| 1 |
#ifndef _XWIN_H_ |
| 2 |
#define _XWIN_H_ |
| 3 |
|
| 4 |
extern int help_background, table_background; |
| 5 |
|
| 6 |
#define ES_SHIFT 0x01 |
| 7 |
#define ES_ALT 0x02 |
| 8 |
#define ES_CONTROL 0x04 |
| 9 |
|
| 10 |
typedef enum { |
| 11 |
ev_none, |
| 12 |
ev_keypress, |
| 13 |
ev_buttondown, |
| 14 |
ev_buttonup, |
| 15 |
ev_motion, |
| 16 |
ev_resize, |
| 17 |
ev_expose, |
| 18 |
ev_quit |
| 19 |
} XWin_Event_Type; |
| 20 |
|
| 21 |
typedef struct { |
| 22 |
XWin_Event_Type type; |
| 23 |
int x, y, w, h; |
| 24 |
int button; |
| 25 |
int shifts; |
| 26 |
int key; |
| 27 |
int time; |
| 28 |
} XWin_Event; |
| 29 |
|
| 30 |
|
| 31 |
int xwin_init (int argc, char **argv); |
| 32 |
|
| 33 |
void xwin_create (int width, int height); |
| 34 |
int xwin_nextevent (XWin_Event *event); |
| 35 |
|
| 36 |
void xwin_fixed_size (int width, int height); |
| 37 |
void xwin_clip (int x, int y, int w, int h); |
| 38 |
void xwin_noclip (); |
| 39 |
int pixel_for (int r, int g, int b); |
| 40 |
|
| 41 |
#endif |