]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/nanox/X11/Xlib.h
8698db12a35606bdc9fe23adb3aef7fa167bb7da
12 typedef GR_PALETTE
* Colormap
;
13 typedef GR_DRAW_ID Drawable
;
15 typedef unsigned long VisualID
;
19 /* typedef unsigned long Time; */
22 #define GrabSuccess Success
23 #define GrabNotViewable (Success+1)
27 #define IsUnviewable 1
30 #define PropertyChangeMask GR_EVENT_MASK_SELECTION_CHANGED
31 #define GraphicsExpose GR_EVENT_TYPE_EXPOSURE
32 #define GraphicsExposeMask GR_EVENT_MASK_EXPOSURE
34 #define XSynchronize(display,sync)
35 #define XDefaultRootWindow(d) GR_ROOT_WINDOW_ID
36 #define XFreePixmap(d, p) GrDestroyWindow(p)
37 #define XFreeCursor(d, c) GrDestroyCursor(c)
38 #define DefaultVisual(d, s) ((Visual*) NULL)
40 /* These defines are wrongly defined in XtoNX.h, IMHO,
41 * since they reference a static global.
42 * Redefined as functions, below.
50 * Data structure used by color operations
54 unsigned short red
, green
, blue
;
55 char flags
; /* do_red, do_green, do_blue */
61 Display
*display
; /* Display the event was read from */
62 XID resourceid
; /* resource id */
63 unsigned long serial
; /* serial number of failed request */
64 unsigned char error_code
; /* error code of failed request */
65 unsigned char request_code
; /* Major op-code of failed request */
66 unsigned char minor_code
; /* Minor op-code of failed request */
70 * Visual structure; contains information about colormapping possible.
73 void *ext_data
; /* hook for extension to hang data */
74 VisualID visualid
; /* visual id of this visual */
75 #if defined(__cplusplus) || defined(c_plusplus)
76 int c_class
; /* C++ class of screen (monochrome, etc.) */
78 int class; /* class of screen (monochrome, etc.) */
80 unsigned long red_mask
, green_mask
, blue_mask
; /* mask values */
81 int bits_per_rgb
; /* log base 2 of distinct color values */
82 int map_entries
; /* color map entries */
86 * Depth structure; contains information for each possible depth.
89 int depth
; /* this depth (Z) of the depth */
90 int nvisuals
; /* number of Visual types at this depth */
91 Visual
*visuals
; /* list of visuals possible at this depth */
95 * Information about the screen. The contents of this structure are
96 * implementation dependent. A Screen should be treated as opaque
97 * by application code.
100 struct _XDisplay
; /* Forward declare before use for C++ */
103 void *ext_data
; /* hook for extension to hang data */
104 struct _XDisplay
*display
;/* back pointer to display structure */
105 Window root
; /* Root window id. */
106 int width
, height
; /* width and height of screen */
107 int mwidth
, mheight
; /* width and height of in millimeters */
108 int ndepths
; /* number of depths possible */
109 Depth
*depths
; /* list of allowable depths on the screen */
110 int root_depth
; /* bits per pixel */
111 Visual
*root_visual
; /* root visual */
112 GC default_gc
; /* GC for the root root visual */
113 Colormap cmap
; /* default color map */
114 unsigned long white_pixel
;
115 unsigned long black_pixel
; /* White and Black pixel values */
116 int max_maps
, min_maps
; /* max and min color maps */
117 int backing_store
; /* Never, WhenMapped, Always */
119 long root_input_mask
; /* initial root input mask */
124 int x
, y
; /* location of window */
125 int width
, height
; /* width and height of window */
126 int border_width
; /* border width of window */
127 int depth
; /* depth of window */
128 Visual
*visual
; /* the associated visual structure */
129 Window root
; /* root of screen containing window */
130 int _class
; /* InputOutput, InputOnly*/
131 int bit_gravity
; /* one of the bit gravity values */
132 int win_gravity
; /* one of the window gravity values */
133 int backing_store
; /* NotUseful, WhenMapped, Always */
134 unsigned long backing_planes
;/* planes to be preserved if possible */
135 unsigned long backing_pixel
;/* value to be used when restoring planes */
136 Bool save_under
; /* boolean, should bits under be saved? */
137 Colormap colormap
; /* color map to be associated with window */
138 Bool map_installed
; /* boolean, is color map currently installed*/
139 int map_state
; /* IsUnmapped, IsUnviewable, IsViewable */
140 long all_event_masks
; /* set of events all people have interest in*/
141 long your_event_mask
; /* my event mask */
142 long do_not_propagate_mask
;/* set of events that should not propagate */
143 Bool override_redirect
; /* boolean value for override-redirect */
144 Screen
*screen
; /* back pointer to correct screen */
147 typedef int (*XErrorHandler
) ( /* WARNING, this type not in Xlib spec */
148 Display
* /* display */,
149 XErrorEvent
* /* error_event */
154 /* What should this be? */
156 #ifndef ResizeRequest
157 #define ResizeRequest ??
162 #define MotionNotify GR_EVENT_TYPE_MOUSE_POSITION
163 #define PointerMotionMask GR_EVENT_MASK_MOUSE_POSITION
167 #define FocusIn GR_EVENT_TYPE_FOCUS_IN
168 #define FocusOut GR_EVENT_TYPE_FOCUS_OUT
169 #define FocusChangeMask GR_EVENT_MASK_FOCUS_IN|GR_EVENT_MASK_FOCUS_OUT
178 Colormap
DefaultColormapOfScreen(Screen
* /* screen */) ;
179 int XSetGraphicsExposures( Display
* /* display */, GC
/* gc */, Bool
/* graphics_exposures */) ;
180 int XWarpPointer( Display
* /* display */, Window
/* srcW */, Window
/* srcW */,
181 int /* srcX */, int /* srcY */,
182 unsigned int /* srcWidth */,
183 unsigned int /* srcHeight */,
184 int destX
, int destY
);
185 int XSetInputFocus(Display
* /* display */, Window focus
, int /* revert_to */, Time
/* time */) ;
186 int XGetInputFocus(Display
* /* display */, Window
* /* focus_return */, int* /* revert_to_return */) ;
187 int XGrabPointer(Display
* /* display */, Window
/* grab_window */,
188 Bool
/* owner_events */, unsigned int /* event_mask */,
189 int /* pointer_mode */, int /* keyboard_mode */,
190 Window
/* confine_to */, Cursor
/* cursor */, Time
/* time */) ;
191 int XUngrabPointer(Display
/* display */, Time
/* time */) ;
192 int XCopyArea(Display
* /* display */, Drawable src
, Drawable dest
, GC gc
,
193 int src_x
, int src_y
, unsigned int width
, unsigned int height
,
194 int dest_x
, int dest_y
) ;
195 int XCopyPlane(Display
* /* display */, Drawable src
, Drawable dest
, GC gc
,
196 int src_x
, int src_y
, unsigned int width
, unsigned int height
,
197 int dest_x
, int dest_y
, unsigned long /* plane */) ;
199 XErrorHandler
XSetErrorHandler (XErrorHandler
/* handler */);
200 Display
*XOpenDisplay(const char *name
);
201 Screen
*XScreenOfDisplay(Display
* /* display */,
202 int /* screen_number */);
203 int DisplayWidth(Display
* /* display */, int /* screen */);
204 int DisplayHeight(Display
* /* display */, int /* screen */);
205 int DefaultDepth(Display
* /* display */, int /* screen */);
206 int XAllocColor(Display
* /* display */, Colormap
/* cmap */,
208 int XParseColor(Display
* display
, Colormap cmap
,
209 const char* cname
, XColor
* color
);
215 #define XMaxRequestSize(display) 16384