Doxygen Source Code Documentation
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
| 
 | ||||||||||||
| \** File : SUMA.c 
 Input paramters : 
 
 
 Definition at line 5 of file qcolor.c. 
 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 }
 | 
 
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
 
 
 
 
       
	   
	   
	   
	  