Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

qcolor.c File Reference

#include <X11/X.h>
#include <X11/Intrinsic.h>
#include <stdio.h>

Go to the source code of this file.


Functions

int main (int argc, char *argv[])

Function Documentation

int main int    argc,
char *    argv[]
 

\** File : SUMA.c

Author:
: Ziad Saad Date : Thu Dec 27 16:21:01 EST 2001
Purpose :

Input paramters :

Parameters:
param  Usage : SUMA ( )
Returns :
Returns:
Support :
See also:
OpenGL prog. Guide 3rd edition , varray.c from book's sample code
Side effects :

Definition at line 5 of file qcolor.c.

References argc, and display.

00006 {
00007    int ii ;
00008    XColor ex_col , sc_col ;
00009    Widget shell ;
00010    XtAppContext app ;
00011    Display * display ;
00012    Screen *  screen ;
00013    Colormap  colormap ;
00014 
00015    shell = XtVaAppInitialize(
00016               &app , "AFNI" , NULL , 0 , &argc , argv , NULL , NULL ) ;
00017 
00018    display  = XtDisplay(shell) ;
00019    screen   = XtScreen(shell) ;
00020    colormap = DefaultColormapOfScreen( screen ) ;
00021 
00022    ii = XParseColor( display , colormap , argv[1] , &ex_col ) ;
00023    if( ii == 0 ){ fprintf(stderr,"XParseColor failed\n") ; exit(1) ; }
00024 
00025    printf("R = %d  G = %d  B = %d\n",ex_col.red,ex_col.green,ex_col.blue) ;
00026    exit(0) ;
00027 }
 

Powered by Plone

This site conforms to the following standards: