1 /* ---------------------------------------------------------------------- *
2  * lcx11.h
3  * This file is part of lincity.
4  * Lincity is copyright (c) I J Peters 1995-1997, (c) Greg Sharp 1997-2001.
5  * ---------------------------------------------------------------------- */
6 #ifndef __lcx11_h__
7 #define __lcx11_h__
8 
9 #include "lin-city.h"
10 
11 #define TRUE 1
12 #define FALSE 0
13 
14 #if defined (commentout)
15 #define MOUSE_LEFTBUTTON Button1
16 #define MOUSE_MIDDLEBUTTON Button2
17 #define MOUSE_RIGHTBUTTON Button3
18 #endif
19 
20 #define WINWIDTH 640		/* default window width */
21 #define WINHEIGHT 480		/* default window height */
22 
23 
24 /* Type Definitions */
25 typedef struct _disp
26 {
27     Display *dpy;
28     int screen;
29     char *dname;
30 
31     Window win;
32     Window confinewin;
33     Window root;
34 
35     unsigned int winH;
36     unsigned int winW;
37 
38     long bg;			/* colors */
39     XColor bg_xcolor;
40     GC pixcolour_gc[256];
41     Atom kill_atom, protocol_atom;
42     Colormap cmap;
43 
44     int pointer_confined;
45 }
46 disp;
47 
48 extern int winX, winY, mouse_button, cs_mouse_shifted;
49 extern disp display;
50 
51 extern char *bg_color;
52 extern int verbose;
53 extern int pix_double;
54 extern int text_bg;
55 extern int text_fg;
56 extern int x_key_value;
57 extern int x_key_shifted;
58 extern int borderx, bordery;
59 extern long unsigned int colour_table[256];
60 extern int xclip_x1, xclip_y1, xclip_x2, xclip_y2, clipping_flag;
61 extern unsigned char *open_font;
62 extern int open_font_height;
63 extern int suppress_next_expose;
64 extern int cs_mouse_x, cs_mouse_y;
65 extern float gamma_correct_red, gamma_correct_green, gamma_correct_blue;
66 extern Cursor pirate_cursor;
67 
68 void parse_xargs (int, char **, char **);
69 void set_pointer_confinement (void);
70 void do_setcustompalette (XColor *);
71 void Create_Window (char *);
72 void HandleError (char *, int);
73 void HandleEvent (XEvent *);
74 void refresh_screen (int, int, int, int);
75 void my_x_putchar (int, int, unsigned char);
76 void open_x_putchar (int, int, unsigned char);
77 void do_call_event (int);
78 void call_event (void);
79 void call_wait_event (void);
80 void open_setcustompalette (XColor *);
81 void drag_screen(void); /* WCK */
82 void draw_border (void);
83 void init_x_mouse (void);
84 void unlock_window_size (void);
85 
86 int lc_get_keystroke (void);
87 
88 #ifdef USE_PIXMAPS
89 extern Pixmap icon_pixmap[];
90 #endif
91 
92 #endif /* __lcx11_h__ */
93