home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / demos / xgc / xgc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-07-21  |  1.7 KB  |  69 lines

  1. /*
  2. ** xgc
  3. **
  4. ** xgc.h
  5. */
  6.  
  7. #include "constants.h"
  8.  
  9. typedef struct {
  10.   char *string;
  11.   int    code;
  12. } StringTable;
  13.  
  14. typedef struct {
  15.   Display  *dpy;        /* the display! */
  16.   Screen   *scr;        /* the screen! */
  17.   Window    win;        /* the window the test runs in */
  18.   GC        gc;            /* the GC! */
  19.   GC        miscgc;        /* used for doing stuff when we don't want
  20.                    to change the normal GC */
  21.   XGCValues gcv;        /* a separate copy of what's in the GC,
  22.                    since we're not allowed to look in it */
  23.   Pixmap    tile;        /* what we tile with */
  24.   Pixmap    stipple;        /* what we stipple with */
  25.   XImage   *image;        /* image for GetImage & PutImage */
  26.   int       test;        /* which test is being run */
  27.   float     percent;        /* percentage of test to run */
  28.   Pixel     foreground;
  29.   Pixel     background;
  30.   char      *fontname;
  31. } XStuff;                       /* All the stuff that only X needs to
  32.                                    know about */
  33.  
  34. typedef struct {
  35.   char name[40];          /* name as it will appear on the screen */
  36.   char text[40];               /* Xgc command it translates to */
  37.   int num_commands;        /* number of command buttons inside it */
  38.   int columns;            /* how many columns of command buttons; if
  39.                    0, then there's only one row */
  40.   struct {
  41.     char name[40];        /* name as it will appear on the screen */
  42.     char text[40];           /* Xgc command it translates to */
  43.   } command_data[MAXCHOICES];
  44. } ChoiceStuff;            /* All the info needed to deal with a 
  45.                    choice widget */
  46. typedef struct {
  47.   char *name;
  48.   char *text;
  49.   int code;
  50. } XgcData;
  51.  
  52. typedef struct {
  53.   struct {
  54.     char *name;
  55.     char *text;
  56.     int   num_toggles;
  57.     int   columns;
  58.   } choice;
  59.   XgcData *data;
  60. } XgcStuff;
  61.  
  62. typedef struct {
  63.   Widget label;
  64.   int size;
  65.   WidgetList widgets;
  66. } ChoiceDesc;
  67.  
  68. /************/
  69.