1 /* $Header: /home/yav/xpx/RCS/xpx.h,v 1.15 1995/11/25 16:08:13 yav Exp $ 2 * xpx global def. 3 * written by yav (UHD98984@pcvan.or.jp) 4 */ 5 6 #ifndef XPX_H 7 #define XPX_H 8 9 #ifndef XPX_CONFIG_H 10 #include "config.h" 11 #endif 12 13 #ifndef Bool 14 #define Bool int 15 #endif 16 #ifndef True 17 #define True 1 18 #endif 19 #ifndef False 20 #define False 0 21 #endif 22 23 #define BDW 1 /* Menu window boarder width */ 24 25 #define MAXTOPLEVELWINDOW 32 26 27 #define MAXPALSET 16 28 #define MAXCOLSET 16 29 30 #define MENUX 8 /* menu x position */ 31 #define MENUY 4 /* menu y position */ 32 #define PALSETX 8 /* color windows x position */ 33 #define PALSETY 54 /* color windows y position */ 34 #define IMGSCRLW 16 /* image window scroll bar width */ 35 36 #define MAXUNDO 128 37 38 /* coltbl bitmask */ 39 #define CM_ALLOCED (1<<0) 40 #define CM_PRIVATE (1<<1) 41 #define CM_UPDATING (1<<2) 42 #define CM_UPDATED (1<<3) 43 #define CM_REQUEST (1<<4) 44 45 typedef union { 46 struct { 47 unsigned char red; 48 unsigned char green; 49 unsigned char blue; 50 unsigned char padding; 51 } rgb; 52 #if 0 53 unsigned int all; 54 #endif 55 } COL; 56 57 typedef struct { 58 short n; /* menu number (-1:end mark) */ 59 short mode; /* c.f. MenuModeMask??? */ 60 short x, y; /* Position */ 61 unsigned short w, h; /* Size */ 62 Window win; /* Window id */ 63 unsigned long im; /* Inputmask */ 64 int gr; /* Gravity */ 65 int (*event)(); /* Event function */ 66 char *(*strfunc)(); /* menu str gen func */ 67 int cursor; /* cursor position in str */ 68 int strlen; /* string length max */ 69 char *str; /* display string (input buffer) */ 70 } MENU; 71 72 #define MenuModeMaskOn (1<<0) 73 #define MenuModeMaskEnter (1<<1) 74 #define MenuModeMaskLeft (1<<2) 75 #define MenuModeMaskRight (1<<3) 76 #define MenuModeMaskBorder (1<<4) 77 78 typedef struct {int x; int y;} POS; 79 typedef struct {int x; int y; int w; int h;} AREA; 80 81 #endif /* XPX_H */ 82 83 /* End of file */ 84