]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Xlib compatibility | |
3 | */ | |
4 | ||
5 | #include "XtoNX.h" | |
6 | ||
7 | /* Data types */ | |
8 | ||
9 | typedef GR_PALETTE Colormap; | |
10 | typedef GR_DRAW_ID Drawable ; | |
11 | typedef int Status; | |
12 | ||
13 | #define Success 0 | |
14 | #define GrabSuccess Success | |
15 | #define GrabNotViewable (Success+1) | |
16 | #define InputOutput 1 | |
17 | #define InputOnly 2 | |
18 | #define IsUnmapped 0 | |
19 | #define IsUnviewable 1 | |
20 | #define IsViewable 2 | |
21 | ||
22 | typedef struct { | |
23 | int x, y; /* location of window */ | |
24 | int width, height; /* width and height of window */ | |
25 | int border_width; /* border width of window */ | |
26 | int depth; /* depth of window */ | |
27 | Visual *visual; /* the associated visual structure */ | |
28 | Window root; /* root of screen containing window */ | |
29 | int class; /* InputOutput, InputOnly*/ | |
30 | int bit_gravity; /* one of the bit gravity values */ | |
31 | int win_gravity; /* one of the window gravity values */ | |
32 | int backing_store; /* NotUseful, WhenMapped, Always */ | |
33 | unsigned long backing_planes;/* planes to be preserved if possible */ | |
34 | unsigned long backing_pixel;/* value to be used when restoring planes */ | |
35 | Bool save_under; /* boolean, should bits under be saved? */ | |
36 | Colormap colormap; /* color map to be associated with window */ | |
37 | Bool map_installed; /* boolean, is color map currently installed*/ | |
38 | int map_state; /* IsUnmapped, IsUnviewable, IsViewable */ | |
39 | long all_event_masks; /* set of events all people have interest in*/ | |
40 | long your_event_mask; /* my event mask */ | |
41 | long do_not_propagate_mask;/* set of events that should not propagate */ | |
42 | Bool override_redirect; /* boolean value for override-redirect */ | |
43 | Screen *screen; /* back pointer to correct screen */ | |
44 | } XWindowAttributes; | |
45 | ||
46 | /* events*/ | |
47 | ||
48 | /* What should this be? */ | |
49 | #if 0 | |
50 | #ifndef ResizeRequest | |
51 | #define ResizeRequest ?? | |
52 | #endif | |
53 | #endif | |
54 | ||
55 | #ifndef MotionNotify | |
56 | #define MotionNotify GR_EVENT_TYPE_MOUSE_POSITION | |
57 | #define PointerMotionMask GR_EVENT_MASK_MOUSE_POSITION | |
58 | #endif | |
59 | ||
60 | #ifndef FocusIn | |
61 | #define FocusIn GR_EVENT_TYPE_FOCUS_IN | |
62 | #define FocusOut GR_EVENT_TYPE_FOCUS_OUT | |
63 | #define FocusChangeMask GR_EVENT_MASK_FOCUS_IN|GR_EVENT_MASK_FOCUS_OUT | |
64 | #endif | |
65 | ||
66 | /* Fuunctions */ | |
67 | ||
68 | #ifdef __cpluplus | |
69 | extern "C" { | |
70 | #endif | |
71 | ||
72 | Colormap DefaultColormapOfScreen(Screen /* screen */) ; | |
73 | int XSetGraphicsExposures( Display* /* display */, GC /* gc */, Bool /* graphics_exposures */) ; | |
74 | int XWarpPointer( Display* /* display */, Window /* srcW */, Window /* srcW */, | |
75 | int /* srcX */, int /* srcY */, | |
76 | unsigned int /* srcWidth */, | |
77 | unsigned int /* srcHeight */, | |
78 | int destX, int destY); | |
79 | int XSetInputFocus(Display* /* display */, Window focus, int /* revert_to */, Time /* time */) ; | |
80 | int XGetInputFocus(Display* /* display */, Window* /* focus_return */, int* /* revert_to_return */) ; | |
81 | int XGrabPointer(Display* /* display */, Window /* grab_window */, | |
82 | Bool /* owner_events */, unsigned int /* event_mask */, | |
83 | int /* pointer_mode */, int /* keyboard_mode */, | |
84 | Window /* confine_to */, Cursor /* cursor */, Time /* time */) ; | |
85 | int XUngrabPointer(Display /* display */, Time /* time */) ; | |
86 | int XCopyArea(Display* /* display */, Drawable src, Drawable dest, GC gc, | |
87 | int src_x, int src_y, unsigned int width, unsigned int height, | |
88 | int dest_x, int dest_y) ; | |
89 | int XCopyPlane(Display* /* display */, Drawable src, Drawable dest, GC gc, | |
90 | int src_x, int src_y, unsigned int width, unsigned int height, | |
91 | int dest_x, int dest_y, unsigned long /* plane */) ; | |
92 | ||
93 | #ifdef __cpluplus | |
94 | } | |
95 | #endif | |
96 | ||
97 | #define XGetMaxRequestSize(display) 16384 | |
98 |