Xlib.h 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202
  1. /* $XConsortium: Xlib.h,v 11.221 93/07/02 14:13:28 gildea Exp $ */
  2. /*
  3. * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
  4. *
  5. * Permission to use, copy, modify, and distribute this software and its
  6. * documentation for any purpose and without fee is hereby granted, provided
  7. * that the above copyright notice appear in all copies and that both that
  8. * copyright notice and this permission notice appear in supporting
  9. * documentation, and that the name of M.I.T. not be used in advertising
  10. * or publicity pertaining to distribution of the software without specific,
  11. * written prior permission. M.I.T. makes no representations about the
  12. * suitability of this software for any purpose. It is provided "as is"
  13. * without express or implied warranty.
  14. *
  15. * X Window System is a Trademark of MIT.
  16. *
  17. */
  18. /*
  19. * Xlib.h - Header definition and support file for the C subroutine
  20. * interface library (Xlib) to the X Window System Protocol (V11).
  21. * Structures and symbols starting with "_" are private to the library.
  22. */
  23. #ifndef _XLIB_H_
  24. #define _XLIB_H_
  25. #define XlibSpecificationRelease 5
  26. #if !defined(MAC_OSX_TK)
  27. # include <X11/X.h>
  28. #endif
  29. #ifdef MAC_OSX_TK
  30. # include <X11/X.h>
  31. # define Cursor XCursor
  32. # define Region XRegion
  33. #endif
  34. /* applications should not depend on these two headers being included! */
  35. #include <X11/Xfuncproto.h>
  36. #ifndef X_WCHAR
  37. #ifdef X_NOT_STDC_ENV
  38. #define X_WCHAR
  39. #endif
  40. #endif
  41. #ifndef X_WCHAR
  42. #include <stddef.h>
  43. #else
  44. /* replace this with #include or typedef appropriate for your system */
  45. typedef unsigned long wchar_t;
  46. #endif
  47. typedef char *XPointer;
  48. #define Bool int
  49. #if defined(MAC_OSX_TK)
  50. /* Use define rather than typedef, since may need to undefine this later */
  51. #define Status int
  52. #else
  53. typedef int Status;
  54. #endif
  55. #define True 1
  56. #define False 0
  57. #define QueuedAlready 0
  58. #define QueuedAfterReading 1
  59. #define QueuedAfterFlush 2
  60. #define ConnectionNumber(dpy) ((dpy)->fd)
  61. #define RootWindow(dpy, scr) (((dpy)->screens[(scr)]).root)
  62. #define DefaultScreen(dpy) ((dpy)->default_screen)
  63. #define DefaultRootWindow(dpy) (((dpy)->screens[(dpy)->default_screen]).root)
  64. #define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual)
  65. #define DefaultGC(dpy, scr) (((dpy)->screens[(scr)]).default_gc)
  66. #define BlackPixel(dpy, scr) (((dpy)->screens[(scr)]).black_pixel)
  67. #define WhitePixel(dpy, scr) (((dpy)->screens[(scr)]).white_pixel)
  68. #define AllPlanes ((unsigned long)~0L)
  69. #define QLength(dpy) ((dpy)->qlen)
  70. #define DisplayWidth(dpy, scr) (((dpy)->screens[(scr)]).width)
  71. #define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height)
  72. #define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth)
  73. #define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight)
  74. #define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
  75. #define DisplayCells(dpy, scr) (DefaultVisual((dpy), (scr))->map_entries)
  76. #define ScreenCount(dpy) ((dpy)->nscreens)
  77. #define ServerVendor(dpy) ((dpy)->vendor)
  78. #define ProtocolVersion(dpy) ((dpy)->proto_major_version)
  79. #define ProtocolRevision(dpy) ((dpy)->proto_minor_version)
  80. #define VendorRelease(dpy) ((dpy)->release)
  81. #define DisplayString(dpy) ((dpy)->display_name)
  82. #define DefaultDepth(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
  83. #define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap)
  84. #define BitmapUnit(dpy) ((dpy)->bitmap_unit)
  85. #define BitmapBitOrder(dpy) ((dpy)->bitmap_bit_order)
  86. #define BitmapPad(dpy) ((dpy)->bitmap_pad)
  87. #define ImageByteOrder(dpy) ((dpy)->byte_order)
  88. #define NextRequest(dpy) ((dpy)->request + 1)
  89. #define LastKnownRequestProcessed(dpy) ((dpy)->request)
  90. /* macros for screen oriented applications (toolkit) */
  91. #define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)]))
  92. #define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen]))
  93. #define DisplayOfScreen(s) ((s)->display)
  94. #define RootWindowOfScreen(s) ((s)->root)
  95. #define BlackPixelOfScreen(s) ((s)->black_pixel)
  96. #define WhitePixelOfScreen(s) ((s)->white_pixel)
  97. #define DefaultColormapOfScreen(s)((s)->cmap)
  98. #define DefaultDepthOfScreen(s) ((s)->root_depth)
  99. #define DefaultGCOfScreen(s) ((s)->default_gc)
  100. #define DefaultVisualOfScreen(s)((s)->root_visual)
  101. #define WidthOfScreen(s) ((s)->width)
  102. #define HeightOfScreen(s) ((s)->height)
  103. #define WidthMMOfScreen(s) ((s)->mwidth)
  104. #define HeightMMOfScreen(s) ((s)->mheight)
  105. #define PlanesOfScreen(s) ((s)->root_depth)
  106. #define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries)
  107. #define MinCmapsOfScreen(s) ((s)->min_maps)
  108. #define MaxCmapsOfScreen(s) ((s)->max_maps)
  109. #define DoesSaveUnders(s) ((s)->save_unders)
  110. #define DoesBackingStore(s) ((s)->backing_store)
  111. #define EventMaskOfScreen(s) ((s)->root_input_mask)
  112. /*
  113. * Extensions need a way to hang private data on some structures.
  114. */
  115. typedef struct _XExtData {
  116. int number; /* number returned by XRegisterExtension */
  117. struct _XExtData *next; /* next item on list of data for structure */
  118. int (*free_private)(); /* called to free private storage */
  119. XPointer private_data; /* data private to this extension. */
  120. } XExtData;
  121. /*
  122. * This file contains structures used by the extension mechanism.
  123. */
  124. typedef struct { /* public to extension, cannot be changed */
  125. int extension; /* extension number */
  126. int major_opcode; /* major op-code assigned by server */
  127. int first_event; /* first event number for the extension */
  128. int first_error; /* first error number for the extension */
  129. } XExtCodes;
  130. /*
  131. * Data structure for retrieving info about pixmap formats.
  132. */
  133. typedef struct {
  134. int depth;
  135. int bits_per_pixel;
  136. int scanline_pad;
  137. } XPixmapFormatValues;
  138. /*
  139. * Data structure for setting graphics context.
  140. */
  141. typedef struct {
  142. int function; /* logical operation */
  143. unsigned long plane_mask;/* plane mask */
  144. unsigned long foreground;/* foreground pixel */
  145. unsigned long background;/* background pixel */
  146. int line_width; /* line width */
  147. int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
  148. int cap_style; /* CapNotLast, CapButt,
  149. CapRound, CapProjecting */
  150. int join_style; /* JoinMiter, JoinRound, JoinBevel */
  151. int fill_style; /* FillSolid, FillTiled,
  152. FillStippled, FillOpaeueStippled */
  153. int fill_rule; /* EvenOddRule, WindingRule */
  154. int arc_mode; /* ArcChord, ArcPieSlice */
  155. Pixmap tile; /* tile pixmap for tiling operations */
  156. Pixmap stipple; /* stipple 1 plane pixmap for stipping */
  157. int ts_x_origin; /* offset for tile or stipple operations */
  158. int ts_y_origin;
  159. Font font; /* default text font for text operations */
  160. int subwindow_mode; /* ClipByChildren, IncludeInferiors */
  161. Bool graphics_exposures;/* boolean, should exposures be generated */
  162. int clip_x_origin; /* origin for clipping */
  163. int clip_y_origin;
  164. Pixmap clip_mask; /* bitmap clipping; other calls for rects */
  165. int dash_offset; /* patterned/dashed line information */
  166. char dashes;
  167. } XGCValues;
  168. /*
  169. * Graphics context. The contents of this structure are implementation
  170. * dependent. A GC should be treated as opaque by application code.
  171. */
  172. typedef XGCValues *GC;
  173. /*
  174. * Visual structure; contains information about colormapping possible.
  175. */
  176. typedef struct {
  177. XExtData *ext_data; /* hook for extension to hang data */
  178. VisualID visualid; /* visual id of this visual */
  179. #if defined(__cplusplus) || defined(c_plusplus)
  180. int c_class; /* C++ class of screen (monochrome, etc.) */
  181. #else
  182. int class; /* class of screen (monochrome, etc.) */
  183. #endif
  184. unsigned long red_mask, green_mask, blue_mask; /* mask values */
  185. int bits_per_rgb; /* log base 2 of distinct color values */
  186. int map_entries; /* color map entries */
  187. } Visual;
  188. /*
  189. * Depth structure; contains information for each possible depth.
  190. */
  191. typedef struct {
  192. int depth; /* this depth (Z) of the depth */
  193. int nvisuals; /* number of Visual types at this depth */
  194. Visual *visuals; /* list of visuals possible at this depth */
  195. } Depth;
  196. /*
  197. * Information about the screen. The contents of this structure are
  198. * implementation dependent. A Screen should be treated as opaque
  199. * by application code.
  200. */
  201. typedef struct {
  202. XExtData *ext_data; /* hook for extension to hang data */
  203. struct _XDisplay *display;/* back pointer to display structure */
  204. Window root; /* Root window id. */
  205. int width, height; /* width and height of screen */
  206. int mwidth, mheight; /* width and height of in millimeters */
  207. int ndepths; /* number of depths possible */
  208. Depth *depths; /* list of allowable depths on the screen */
  209. int root_depth; /* bits per pixel */
  210. Visual *root_visual; /* root visual */
  211. GC default_gc; /* GC for the root root visual */
  212. Colormap cmap; /* default color map */
  213. unsigned long white_pixel;
  214. unsigned long black_pixel; /* White and Black pixel values */
  215. int max_maps, min_maps; /* max and min color maps */
  216. int backing_store; /* Never, WhenMapped, Always */
  217. Bool save_unders;
  218. long root_input_mask; /* initial root input mask */
  219. } Screen;
  220. /*
  221. * Format structure; describes ZFormat data the screen will understand.
  222. */
  223. typedef struct {
  224. XExtData *ext_data; /* hook for extension to hang data */
  225. int depth; /* depth of this image format */
  226. int bits_per_pixel; /* bits/pixel at this depth */
  227. int scanline_pad; /* scanline must padded to this multiple */
  228. } ScreenFormat;
  229. /*
  230. * Data structure for setting window attributes.
  231. */
  232. typedef struct {
  233. Pixmap background_pixmap; /* background or None or ParentRelative */
  234. unsigned long background_pixel; /* background pixel */
  235. Pixmap border_pixmap; /* border of the window */
  236. unsigned long border_pixel; /* border pixel value */
  237. int bit_gravity; /* one of bit gravity values */
  238. int win_gravity; /* one of the window gravity values */
  239. int backing_store; /* NotUseful, WhenMapped, Always */
  240. unsigned long backing_planes;/* planes to be preseved if possible */
  241. unsigned long backing_pixel;/* value to use in restoring planes */
  242. Bool save_under; /* should bits under be saved? (popups) */
  243. long event_mask; /* set of events that should be saved */
  244. long do_not_propagate_mask; /* set of events that should not propagate */
  245. Bool override_redirect; /* boolean value for override-redirect */
  246. Colormap colormap; /* color map to be associated with window */
  247. Cursor cursor; /* cursor to be displayed (or None) */
  248. } XSetWindowAttributes;
  249. typedef struct {
  250. int x, y; /* location of window */
  251. int width, height; /* width and height of window */
  252. int border_width; /* border width of window */
  253. int depth; /* depth of window */
  254. Visual *visual; /* the associated visual structure */
  255. Window root; /* root of screen containing window */
  256. #if defined(__cplusplus) || defined(c_plusplus)
  257. int c_class; /* C++ InputOutput, InputOnly*/
  258. #else
  259. int class; /* InputOutput, InputOnly*/
  260. #endif
  261. int bit_gravity; /* one of bit gravity values */
  262. int win_gravity; /* one of the window gravity values */
  263. int backing_store; /* NotUseful, WhenMapped, Always */
  264. unsigned long backing_planes;/* planes to be preserved if possible */
  265. unsigned long backing_pixel;/* value to be used when restoring planes */
  266. Bool save_under; /* boolean, should bits under be saved? */
  267. Colormap colormap; /* color map to be associated with window */
  268. Bool map_installed; /* boolean, is color map currently installed*/
  269. int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
  270. long all_event_masks; /* set of events all people have interest in*/
  271. long your_event_mask; /* my event mask */
  272. long do_not_propagate_mask; /* set of events that should not propagate */
  273. Bool override_redirect; /* boolean value for override-redirect */
  274. Screen *screen; /* back pointer to correct screen */
  275. } XWindowAttributes;
  276. /*
  277. * Data structure for host setting; getting routines.
  278. *
  279. */
  280. typedef struct {
  281. int family; /* for example FamilyInternet */
  282. int length; /* length of address, in bytes */
  283. char *address; /* pointer to where to find the bytes */
  284. } XHostAddress;
  285. /*
  286. * Data structure for "image" data, used by image manipulation routines.
  287. */
  288. typedef struct _XImage {
  289. int width, height; /* size of image */
  290. int xoffset; /* number of pixels offset in X direction */
  291. int format; /* XYBitmap, XYPixmap, ZPixmap */
  292. char *data; /* pointer to image data */
  293. int byte_order; /* data byte order, LSBFirst, MSBFirst */
  294. int bitmap_unit; /* quant. of scanline 8, 16, 32 */
  295. int bitmap_bit_order; /* LSBFirst, MSBFirst */
  296. int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */
  297. int depth; /* depth of image */
  298. int bytes_per_line; /* accelarator to next line */
  299. int bits_per_pixel; /* bits per pixel (ZPixmap) */
  300. unsigned long red_mask; /* bits in z arrangment */
  301. unsigned long green_mask;
  302. unsigned long blue_mask;
  303. XPointer obdata; /* hook for the object routines to hang on */
  304. struct funcs { /* image manipulation routines */
  305. struct _XImage *(*create_image)();
  306. #if NeedFunctionPrototypes
  307. int (*destroy_image) (struct _XImage *);
  308. unsigned long (*get_pixel) (struct _XImage *, int, int);
  309. int (*put_pixel) (struct _XImage *, int, int, unsigned long);
  310. struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
  311. int (*add_pixel) (struct _XImage *, long);
  312. #else
  313. int (*destroy_image)();
  314. unsigned long (*get_pixel)();
  315. int (*put_pixel)();
  316. struct _XImage *(*sub_image)();
  317. int (*add_pixel)();
  318. #endif
  319. } f;
  320. } XImage;
  321. /*
  322. * Data structure for XReconfigureWindow
  323. */
  324. typedef struct {
  325. int x, y;
  326. int width, height;
  327. int border_width;
  328. Window sibling;
  329. int stack_mode;
  330. } XWindowChanges;
  331. /*
  332. * Data structure used by color operations
  333. */
  334. typedef struct {
  335. unsigned long pixel;
  336. unsigned short red, green, blue;
  337. char flags; /* do_red, do_green, do_blue */
  338. char pad;
  339. } XColor;
  340. /*
  341. * Data structures for graphics operations. On most machines, these are
  342. * congruent with the wire protocol structures, so reformatting the data
  343. * can be avoided on these architectures.
  344. */
  345. typedef struct {
  346. short x1, y1, x2, y2;
  347. } XSegment;
  348. typedef struct {
  349. short x, y;
  350. } XPoint;
  351. typedef struct {
  352. short x, y;
  353. unsigned short width, height;
  354. } XRectangle;
  355. typedef struct {
  356. short x, y;
  357. unsigned short width, height;
  358. short angle1, angle2;
  359. } XArc;
  360. /* Data structure for XChangeKeyboardControl */
  361. typedef struct {
  362. int key_click_percent;
  363. int bell_percent;
  364. int bell_pitch;
  365. int bell_duration;
  366. int led;
  367. int led_mode;
  368. int key;
  369. int auto_repeat_mode; /* On, Off, Default */
  370. } XKeyboardControl;
  371. /* Data structure for XGetKeyboardControl */
  372. typedef struct {
  373. int key_click_percent;
  374. int bell_percent;
  375. unsigned int bell_pitch, bell_duration;
  376. unsigned long led_mask;
  377. int global_auto_repeat;
  378. char auto_repeats[32];
  379. } XKeyboardState;
  380. /* Data structure for XGetMotionEvents. */
  381. typedef struct {
  382. Time time;
  383. short x, y;
  384. } XTimeCoord;
  385. /* Data structure for X{Set,Get}ModifierMapping */
  386. typedef struct {
  387. int max_keypermod; /* The server's max # of keys per modifier */
  388. KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */
  389. } XModifierKeymap;
  390. /*
  391. * Display datatype maintaining display specific data.
  392. * The contents of this structure are implementation dependent.
  393. * A Display should be treated as opaque by application code.
  394. */
  395. typedef struct _XDisplay {
  396. XExtData *ext_data; /* hook for extension to hang data */
  397. struct _XFreeFuncs *free_funcs; /* internal free functions */
  398. int fd; /* Network socket. */
  399. int conn_checker; /* ugly thing used by _XEventsQueued */
  400. int proto_major_version;/* maj. version of server's X protocol */
  401. int proto_minor_version;/* minor version of servers X protocol */
  402. char *vendor; /* vendor of the server hardware */
  403. XID resource_base; /* resource ID base */
  404. XID resource_mask; /* resource ID mask bits */
  405. XID resource_id; /* allocator current ID */
  406. int resource_shift; /* allocator shift to correct bits */
  407. XID (*resource_alloc)(); /* allocator function */
  408. int byte_order; /* screen byte order, LSBFirst, MSBFirst */
  409. int bitmap_unit; /* padding and data requirements */
  410. int bitmap_pad; /* padding requirements on bitmaps */
  411. int bitmap_bit_order; /* LeastSignificant or MostSignificant */
  412. int nformats; /* number of pixmap formats in list */
  413. ScreenFormat *pixmap_format; /* pixmap format list */
  414. int vnumber; /* Xlib's X protocol version number. */
  415. int release; /* release of the server */
  416. struct _XSQEvent *head, *tail; /* Input event queue. */
  417. int qlen; /* Length of input event queue */
  418. unsigned long request; /* sequence number of last request. */
  419. char *last_req; /* beginning of last request, or dummy */
  420. char *buffer; /* Output buffer starting address. */
  421. char *bufptr; /* Output buffer index pointer. */
  422. char *bufmax; /* Output buffer maximum+1 address. */
  423. unsigned max_request_size; /* maximum number 32 bit words in request*/
  424. struct _XrmHashBucketRec *db;
  425. int (*synchandler)(); /* Synchronization handler */
  426. char *display_name; /* "host:display" string used on this connect*/
  427. int default_screen; /* default screen for operations */
  428. int nscreens; /* number of screens on this server*/
  429. Screen *screens; /* pointer to list of screens */
  430. unsigned long motion_buffer; /* size of motion buffer */
  431. unsigned long flags; /* internal connection flags */
  432. int min_keycode; /* minimum defined keycode */
  433. int max_keycode; /* maximum defined keycode */
  434. KeySym *keysyms; /* This server's keysyms */
  435. XModifierKeymap *modifiermap; /* This server's modifier keymap */
  436. int keysyms_per_keycode;/* number of rows */
  437. char *xdefaults; /* contents of defaults from server */
  438. char *scratch_buffer; /* place to hang scratch buffer */
  439. unsigned long scratch_length; /* length of scratch buffer */
  440. int ext_number; /* extension number on this display */
  441. struct _XExten *ext_procs; /* extensions initialized on this display */
  442. /*
  443. * the following can be fixed size, as the protocol defines how
  444. * much address space is available.
  445. * While this could be done using the extension vector, there
  446. * may be MANY events processed, so a search through the extension
  447. * list to find the right procedure for each event might be
  448. * expensive if many extensions are being used.
  449. */
  450. Bool (*event_vec[128])(); /* vector for wire to event */
  451. Status (*wire_vec[128])(); /* vector for event to wire */
  452. KeySym lock_meaning; /* for XLookupString */
  453. struct _XLockInfo *lock; /* multi-thread state, display lock */
  454. struct _XInternalAsync *async_handlers; /* for internal async */
  455. unsigned long bigreq_size; /* max size of big requests */
  456. struct _XLockPtrs *lock_fns; /* pointers to threads functions */
  457. /* things above this line should not move, for binary compatibility */
  458. struct _XKeytrans *key_bindings; /* for XLookupString */
  459. Font cursor_font; /* for XCreateFontCursor */
  460. struct _XDisplayAtoms *atoms; /* for XInternAtom */
  461. unsigned int mode_switch; /* keyboard group modifiers */
  462. struct _XContextDB *context_db; /* context database */
  463. Bool (**error_vec)(); /* vector for wire to error */
  464. /*
  465. * Xcms information
  466. */
  467. struct {
  468. XPointer defaultCCCs; /* pointer to an array of default XcmsCCC */
  469. XPointer clientCmaps; /* pointer to linked list of XcmsCmapRec */
  470. XPointer perVisualIntensityMaps;
  471. /* linked list of XcmsIntensityMap */
  472. } cms;
  473. struct _XIMFilter *im_filters;
  474. struct _XSQEvent *qfree; /* unallocated event queue elements */
  475. unsigned long next_event_serial_num; /* inserted into next queue elt */
  476. int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
  477. } Display;
  478. #if NeedFunctionPrototypes /* prototypes require event type definitions */
  479. #undef _XEVENT_
  480. #endif
  481. #ifndef _XEVENT_
  482. #define XMaxTransChars 7
  483. /*
  484. * Definitions of specific events.
  485. */
  486. typedef struct {
  487. int type; /* of event */
  488. unsigned long serial; /* # of last request processed by server */
  489. Bool send_event; /* true if this came from a SendEvent request */
  490. Display *display; /* Display the event was read from */
  491. Window window; /* "event" window it is reported relative to */
  492. Window root; /* root window that the event occurred on */
  493. Window subwindow; /* child window */
  494. Time time; /* milliseconds */
  495. int x, y; /* pointer x, y coordinates in event window */
  496. int x_root, y_root; /* coordinates relative to root */
  497. unsigned int state; /* key or button mask */
  498. unsigned int keycode; /* detail */
  499. Bool same_screen; /* same screen flag */
  500. } XKeyEvent;
  501. typedef XKeyEvent XKeyPressedEvent;
  502. typedef XKeyEvent XKeyReleasedEvent;
  503. typedef struct {
  504. int type; /* of event */
  505. unsigned long serial; /* # of last request processed by server */
  506. Bool send_event; /* true if this came from a SendEvent request */
  507. Display *display; /* Display the event was read from */
  508. Window window; /* "event" window it is reported relative to */
  509. Window root; /* root window that the event occurred on */
  510. Window subwindow; /* child window */
  511. Time time; /* milliseconds */
  512. int x, y; /* pointer x, y coordinates in event window */
  513. int x_root, y_root; /* coordinates relative to root */
  514. unsigned int state; /* key or button mask */
  515. unsigned int button; /* detail */
  516. Bool same_screen; /* same screen flag */
  517. } XButtonEvent;
  518. typedef XButtonEvent XButtonPressedEvent;
  519. typedef XButtonEvent XButtonReleasedEvent;
  520. typedef struct {
  521. int type; /* of event */
  522. unsigned long serial; /* # of last request processed by server */
  523. Bool send_event; /* true if this came from a SendEvent request */
  524. Display *display; /* Display the event was read from */
  525. Window window; /* "event" window reported relative to */
  526. Window root; /* root window that the event occurred on */
  527. Window subwindow; /* child window */
  528. Time time; /* milliseconds */
  529. int x, y; /* pointer x, y coordinates in event window */
  530. int x_root, y_root; /* coordinates relative to root */
  531. unsigned int state; /* key or button mask */
  532. char is_hint; /* detail */
  533. Bool same_screen; /* same screen flag */
  534. } XMotionEvent;
  535. typedef XMotionEvent XPointerMovedEvent;
  536. typedef struct {
  537. int type; /* of event */
  538. unsigned long serial; /* # of last request processed by server */
  539. Bool send_event; /* true if this came from a SendEvent request */
  540. Display *display; /* Display the event was read from */
  541. Window window; /* "event" window reported relative to */
  542. Window root; /* root window that the event occurred on */
  543. Window subwindow; /* child window */
  544. Time time; /* milliseconds */
  545. int x, y; /* pointer x, y coordinates in event window */
  546. int x_root, y_root; /* coordinates relative to root */
  547. int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
  548. int detail;
  549. /*
  550. * NotifyAncestor, NotifyVirtual, NotifyInferior,
  551. * NotifyNonlinear,NotifyNonlinearVirtual
  552. */
  553. Bool same_screen; /* same screen flag */
  554. Bool focus; /* boolean focus */
  555. unsigned int state; /* key or button mask */
  556. } XCrossingEvent;
  557. typedef XCrossingEvent XEnterWindowEvent;
  558. typedef XCrossingEvent XLeaveWindowEvent;
  559. typedef struct {
  560. int type; /* FocusIn or FocusOut */
  561. unsigned long serial; /* # of last request processed by server */
  562. Bool send_event; /* true if this came from a SendEvent request */
  563. Display *display; /* Display the event was read from */
  564. Window window; /* window of event */
  565. int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
  566. int detail;
  567. /*
  568. * NotifyAncestor, NotifyVirtual, NotifyInferior,
  569. * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
  570. * NotifyPointerRoot, NotifyDetailNone
  571. */
  572. } XFocusChangeEvent;
  573. typedef XFocusChangeEvent XFocusInEvent;
  574. typedef XFocusChangeEvent XFocusOutEvent;
  575. /* generated on EnterWindow and FocusIn when KeyMapState selected */
  576. typedef struct {
  577. int type;
  578. unsigned long serial; /* # of last request processed by server */
  579. Bool send_event; /* true if this came from a SendEvent request */
  580. Display *display; /* Display the event was read from */
  581. Window window;
  582. char key_vector[32];
  583. } XKeymapEvent;
  584. typedef struct {
  585. int type;
  586. unsigned long serial; /* # of last request processed by server */
  587. Bool send_event; /* true if this came from a SendEvent request */
  588. Display *display; /* Display the event was read from */
  589. Window window;
  590. int x, y;
  591. int width, height;
  592. int count; /* if non-zero, at least this many more */
  593. } XExposeEvent;
  594. typedef struct {
  595. int type;
  596. unsigned long serial; /* # of last request processed by server */
  597. Bool send_event; /* true if this came from a SendEvent request */
  598. Display *display; /* Display the event was read from */
  599. Drawable drawable;
  600. int x, y;
  601. int width, height;
  602. int count; /* if non-zero, at least this many more */
  603. int major_code; /* core is CopyArea or CopyPlane */
  604. int minor_code; /* not defined in the core */
  605. } XGraphicsExposeEvent;
  606. typedef struct {
  607. int type;
  608. unsigned long serial; /* # of last request processed by server */
  609. Bool send_event; /* true if this came from a SendEvent request */
  610. Display *display; /* Display the event was read from */
  611. Drawable drawable;
  612. int major_code; /* core is CopyArea or CopyPlane */
  613. int minor_code; /* not defined in the core */
  614. } XNoExposeEvent;
  615. typedef struct {
  616. int type;
  617. unsigned long serial; /* # of last request processed by server */
  618. Bool send_event; /* true if this came from a SendEvent request */
  619. Display *display; /* Display the event was read from */
  620. Window window;
  621. int state; /* Visibility state */
  622. } XVisibilityEvent;
  623. typedef struct {
  624. int type;
  625. unsigned long serial; /* # of last request processed by server */
  626. Bool send_event; /* true if this came from a SendEvent request */
  627. Display *display; /* Display the event was read from */
  628. Window parent; /* parent of the window */
  629. Window window; /* window id of window created */
  630. int x, y; /* window location */
  631. int width, height; /* size of window */
  632. int border_width; /* border width */
  633. Bool override_redirect; /* creation should be overridden */
  634. } XCreateWindowEvent;
  635. typedef struct {
  636. int type;
  637. unsigned long serial; /* # of last request processed by server */
  638. Bool send_event; /* true if this came from a SendEvent request */
  639. Display *display; /* Display the event was read from */
  640. Window event;
  641. Window window;
  642. } XDestroyWindowEvent;
  643. typedef struct {
  644. int type;
  645. unsigned long serial; /* # of last request processed by server */
  646. Bool send_event; /* true if this came from a SendEvent request */
  647. Display *display; /* Display the event was read from */
  648. Window event;
  649. Window window;
  650. Bool from_configure;
  651. } XUnmapEvent;
  652. typedef struct {
  653. int type;
  654. unsigned long serial; /* # of last request processed by server */
  655. Bool send_event; /* true if this came from a SendEvent request */
  656. Display *display; /* Display the event was read from */
  657. Window event;
  658. Window window;
  659. Bool override_redirect; /* boolean, is override set... */
  660. } XMapEvent;
  661. typedef struct {
  662. int type;
  663. unsigned long serial; /* # of last request processed by server */
  664. Bool send_event; /* true if this came from a SendEvent request */
  665. Display *display; /* Display the event was read from */
  666. Window parent;
  667. Window window;
  668. } XMapRequestEvent;
  669. typedef struct {
  670. int type;
  671. unsigned long serial; /* # of last request processed by server */
  672. Bool send_event; /* true if this came from a SendEvent request */
  673. Display *display; /* Display the event was read from */
  674. Window event;
  675. Window window;
  676. Window parent;
  677. int x, y;
  678. Bool override_redirect;
  679. } XReparentEvent;
  680. typedef struct {
  681. int type;
  682. unsigned long serial; /* # of last request processed by server */
  683. Bool send_event; /* true if this came from a SendEvent request */
  684. Display *display; /* Display the event was read from */
  685. Window event;
  686. Window window;
  687. int x, y;
  688. int width, height;
  689. int border_width;
  690. Window above;
  691. Bool override_redirect;
  692. } XConfigureEvent;
  693. typedef struct {
  694. int type;
  695. unsigned long serial; /* # of last request processed by server */
  696. Bool send_event; /* true if this came from a SendEvent request */
  697. Display *display; /* Display the event was read from */
  698. Window event;
  699. Window window;
  700. int x, y;
  701. } XGravityEvent;
  702. typedef struct {
  703. int type;
  704. unsigned long serial; /* # of last request processed by server */
  705. Bool send_event; /* true if this came from a SendEvent request */
  706. Display *display; /* Display the event was read from */
  707. Window window;
  708. int width, height;
  709. } XResizeRequestEvent;
  710. typedef struct {
  711. int type;
  712. unsigned long serial; /* # of last request processed by server */
  713. Bool send_event; /* true if this came from a SendEvent request */
  714. Display *display; /* Display the event was read from */
  715. Window parent;
  716. Window window;
  717. int x, y;
  718. int width, height;
  719. int border_width;
  720. Window above;
  721. int detail; /* Above, Below, TopIf, BottomIf, Opposite */
  722. unsigned long value_mask;
  723. } XConfigureRequestEvent;
  724. typedef struct {
  725. int type;
  726. unsigned long serial; /* # of last request processed by server */
  727. Bool send_event; /* true if this came from a SendEvent request */
  728. Display *display; /* Display the event was read from */
  729. Window event;
  730. Window window;
  731. int place; /* PlaceOnTop, PlaceOnBottom */
  732. } XCirculateEvent;
  733. typedef struct {
  734. int type;
  735. unsigned long serial; /* # of last request processed by server */
  736. Bool send_event; /* true if this came from a SendEvent request */
  737. Display *display; /* Display the event was read from */
  738. Window parent;
  739. Window window;
  740. int place; /* PlaceOnTop, PlaceOnBottom */
  741. } XCirculateRequestEvent;
  742. typedef struct {
  743. int type;
  744. unsigned long serial; /* # of last request processed by server */
  745. Bool send_event; /* true if this came from a SendEvent request */
  746. Display *display; /* Display the event was read from */
  747. Window window;
  748. Atom atom;
  749. Time time;
  750. int state; /* NewValue, Deleted */
  751. } XPropertyEvent;
  752. typedef struct {
  753. int type;
  754. unsigned long serial; /* # of last request processed by server */
  755. Bool send_event; /* true if this came from a SendEvent request */
  756. Display *display; /* Display the event was read from */
  757. Window window;
  758. Atom selection;
  759. Time time;
  760. } XSelectionClearEvent;
  761. typedef struct {
  762. int type;
  763. unsigned long serial; /* # of last request processed by server */
  764. Bool send_event; /* true if this came from a SendEvent request */
  765. Display *display; /* Display the event was read from */
  766. Window owner;
  767. Window requestor;
  768. Atom selection;
  769. Atom target;
  770. Atom property;
  771. Time time;
  772. } XSelectionRequestEvent;
  773. typedef struct {
  774. int type;
  775. unsigned long serial; /* # of last request processed by server */
  776. Bool send_event; /* true if this came from a SendEvent request */
  777. Display *display; /* Display the event was read from */
  778. Window requestor;
  779. Atom selection;
  780. Atom target;
  781. Atom property; /* ATOM or None */
  782. Time time;
  783. } XSelectionEvent;
  784. typedef struct {
  785. int type;
  786. unsigned long serial; /* # of last request processed by server */
  787. Bool send_event; /* true if this came from a SendEvent request */
  788. Display *display; /* Display the event was read from */
  789. Window window;
  790. Colormap colormap; /* COLORMAP or None */
  791. #if defined(__cplusplus) || defined(c_plusplus)
  792. Bool c_new; /* C++ */
  793. #else
  794. Bool new;
  795. #endif
  796. int state; /* ColormapInstalled, ColormapUninstalled */
  797. } XColormapEvent;
  798. typedef struct {
  799. int type;
  800. unsigned long serial; /* # of last request processed by server */
  801. Bool send_event; /* true if this came from a SendEvent request */
  802. Display *display; /* Display the event was read from */
  803. Window window;
  804. Atom message_type;
  805. int format;
  806. union {
  807. char b[20];
  808. short s[10];
  809. long l[5];
  810. } data;
  811. } XClientMessageEvent;
  812. typedef struct {
  813. int type;
  814. unsigned long serial; /* # of last request processed by server */
  815. Bool send_event; /* true if this came from a SendEvent request */
  816. Display *display; /* Display the event was read from */
  817. Window window; /* unused */
  818. int request; /* one of MappingModifier, MappingKeyboard,
  819. MappingPointer */
  820. int first_keycode; /* first keycode */
  821. int count; /* defines range of change w. first_keycode*/
  822. } XMappingEvent;
  823. typedef struct {
  824. int type;
  825. Display *display; /* Display the event was read from */
  826. XID resourceid; /* resource id */
  827. unsigned long serial; /* serial number of failed request */
  828. unsigned char error_code; /* error code of failed request */
  829. unsigned char request_code; /* Major op-code of failed request */
  830. unsigned char minor_code; /* Minor op-code of failed request */
  831. } XErrorEvent;
  832. typedef struct {
  833. int type;
  834. unsigned long serial; /* # of last request processed by server */
  835. Bool send_event; /* true if this came from a SendEvent request */
  836. Display *display;/* Display the event was read from */
  837. Window window; /* window on which event was requested in event mask */
  838. } XAnyEvent;
  839. /*
  840. * this union is defined so Xlib can always use the same sized
  841. * event structure internally, to avoid memory fragmentation.
  842. */
  843. typedef union _XEvent {
  844. int type; /* must not be changed; first element */
  845. XAnyEvent xany;
  846. XKeyEvent xkey;
  847. XButtonEvent xbutton;
  848. XMotionEvent xmotion;
  849. XCrossingEvent xcrossing;
  850. XFocusChangeEvent xfocus;
  851. XExposeEvent xexpose;
  852. XGraphicsExposeEvent xgraphicsexpose;
  853. XNoExposeEvent xnoexpose;
  854. XVisibilityEvent xvisibility;
  855. XCreateWindowEvent xcreatewindow;
  856. XDestroyWindowEvent xdestroywindow;
  857. XUnmapEvent xunmap;
  858. XMapEvent xmap;
  859. XMapRequestEvent xmaprequest;
  860. XReparentEvent xreparent;
  861. XConfigureEvent xconfigure;
  862. XGravityEvent xgravity;
  863. XResizeRequestEvent xresizerequest;
  864. XConfigureRequestEvent xconfigurerequest;
  865. XCirculateEvent xcirculate;
  866. XCirculateRequestEvent xcirculaterequest;
  867. XPropertyEvent xproperty;
  868. XSelectionClearEvent xselectionclear;
  869. XSelectionRequestEvent xselectionrequest;
  870. XSelectionEvent xselection;
  871. XColormapEvent xcolormap;
  872. XClientMessageEvent xclient;
  873. XMappingEvent xmapping;
  874. XErrorEvent xerror;
  875. XKeymapEvent xkeymap;
  876. XID pad[24];
  877. } XEvent;
  878. #endif
  879. #define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy)))
  880. /*
  881. * per character font metric information.
  882. */
  883. typedef struct {
  884. short lbearing; /* origin to left edge of raster */
  885. short rbearing; /* origin to right edge of raster */
  886. short width; /* advance to next char's origin */
  887. short ascent; /* baseline to top edge of raster */
  888. short descent; /* baseline to bottom edge of raster */
  889. unsigned short attributes; /* per char flags (not predefined) */
  890. } XCharStruct;
  891. /*
  892. * To allow arbitrary information with fonts, there are additional properties
  893. * returned.
  894. */
  895. typedef struct {
  896. Atom name;
  897. unsigned long card32;
  898. } XFontProp;
  899. typedef struct {
  900. XExtData *ext_data; /* hook for extension to hang data */
  901. Font fid; /* Font id for this font */
  902. unsigned direction; /* hint about direction the font is painted */
  903. unsigned min_char_or_byte2;/* first character */
  904. unsigned max_char_or_byte2;/* last character */
  905. unsigned min_byte1; /* first row that exists */
  906. unsigned max_byte1; /* last row that exists */
  907. Bool all_chars_exist;/* flag if all characters have non-zero size*/
  908. unsigned default_char; /* char to print for undefined character */
  909. int n_properties; /* how many properties there are */
  910. XFontProp *properties; /* pointer to array of additional properties*/
  911. XCharStruct min_bounds; /* minimum bounds over all existing char*/
  912. XCharStruct max_bounds; /* maximum bounds over all existing char*/
  913. XCharStruct *per_char; /* first_char to last_char information */
  914. int ascent; /* log. extent above baseline for spacing */
  915. int descent; /* log. descent below baseline for spacing */
  916. } XFontStruct;
  917. /*
  918. * PolyText routines take these as arguments.
  919. */
  920. typedef struct {
  921. char *chars; /* pointer to string */
  922. int nchars; /* number of characters */
  923. int delta; /* delta between strings */
  924. Font font; /* font to print it in, None don't change */
  925. } XTextItem;
  926. typedef struct { /* normal 16 bit characters are two bytes */
  927. unsigned char byte1;
  928. unsigned char byte2;
  929. } XChar2b;
  930. typedef struct {
  931. XChar2b *chars; /* two byte characters */
  932. int nchars; /* number of characters */
  933. int delta; /* delta between strings */
  934. Font font; /* font to print it in, None don't change */
  935. } XTextItem16;
  936. typedef union { Display *display;
  937. GC gc;
  938. Visual *visual;
  939. Screen *screen;
  940. ScreenFormat *pixmap_format;
  941. XFontStruct *font; } XEDataObject;
  942. typedef struct {
  943. XRectangle max_ink_extent;
  944. XRectangle max_logical_extent;
  945. } XFontSetExtents;
  946. typedef struct _XFontSet *XFontSet;
  947. typedef struct {
  948. char *chars;
  949. int nchars;
  950. int delta;
  951. XFontSet font_set;
  952. } XmbTextItem;
  953. typedef struct {
  954. wchar_t *chars;
  955. int nchars;
  956. int delta;
  957. XFontSet font_set;
  958. } XwcTextItem;
  959. typedef void (*XIMProc)();
  960. typedef struct _XIM *XIM;
  961. typedef struct _XIC *XIC;
  962. typedef unsigned long XIMStyle;
  963. typedef struct {
  964. unsigned short count_styles;
  965. XIMStyle *supported_styles;
  966. } XIMStyles;
  967. #define XIMPreeditArea 0x0001L
  968. #define XIMPreeditCallbacks 0x0002L
  969. #define XIMPreeditPosition 0x0004L
  970. #define XIMPreeditNothing 0x0008L
  971. #define XIMPreeditNone 0x0010L
  972. #define XIMStatusArea 0x0100L
  973. #define XIMStatusCallbacks 0x0200L
  974. #define XIMStatusNothing 0x0400L
  975. #define XIMStatusNone 0x0800L
  976. #define XNVaNestedList "XNVaNestedList"
  977. #define XNClientWindow "clientWindow"
  978. #define XNInputStyle "inputStyle"
  979. #define XNFocusWindow "focusWindow"
  980. #define XNResourceName "resourceName"
  981. #define XNResourceClass "resourceClass"
  982. #define XNGeometryCallback "geometryCallback"
  983. #define XNFilterEvents "filterEvents"
  984. #define XNPreeditStartCallback "preeditStartCallback"
  985. #define XNPreeditDoneCallback "preeditDoneCallback"
  986. #define XNPreeditDrawCallback "preeditDrawCallback"
  987. #define XNPreeditCaretCallback "preeditCaretCallback"
  988. #define XNPreeditAttributes "preeditAttributes"
  989. #define XNStatusStartCallback "statusStartCallback"
  990. #define XNStatusDoneCallback "statusDoneCallback"
  991. #define XNStatusDrawCallback "statusDrawCallback"
  992. #define XNStatusAttributes "statusAttributes"
  993. #define XNArea "area"
  994. #define XNAreaNeeded "areaNeeded"
  995. #define XNSpotLocation "spotLocation"
  996. #define XNColormap "colorMap"
  997. #define XNStdColormap "stdColorMap"
  998. #define XNForeground "foreground"
  999. #define XNBackground "background"
  1000. #define XNBackgroundPixmap "backgroundPixmap"
  1001. #define XNFontSet "fontSet"
  1002. #define XNLineSpace "lineSpace"
  1003. #define XNCursor "cursor"
  1004. #define XBufferOverflow -1
  1005. #define XLookupNone 1
  1006. #define XLookupChars 2
  1007. #define XLookupKeySym 3
  1008. #define XLookupBoth 4
  1009. #if NeedFunctionPrototypes
  1010. typedef void *XVaNestedList;
  1011. #else
  1012. typedef XPointer XVaNestedList;
  1013. #endif
  1014. typedef struct {
  1015. XPointer client_data;
  1016. XIMProc callback;
  1017. } XIMCallback;
  1018. typedef unsigned long XIMFeedback;
  1019. #define XIMReverse 1
  1020. #define XIMUnderline (1<<1)
  1021. #define XIMHighlight (1<<2)
  1022. #define XIMPrimary (1<<5)
  1023. #define XIMSecondary (1<<6)
  1024. #define XIMTertiary (1<<7)
  1025. typedef struct _XIMText {
  1026. unsigned short length;
  1027. XIMFeedback *feedback;
  1028. Bool encoding_is_wchar;
  1029. union {
  1030. char *multi_byte;
  1031. wchar_t *wide_char;
  1032. } string;
  1033. } XIMText;
  1034. typedef struct _XIMPreeditDrawCallbackStruct {
  1035. int caret; /* Cursor offset within pre-edit string */
  1036. int chg_first; /* Starting change position */
  1037. int chg_length; /* Length of the change in character count */
  1038. XIMText *text;
  1039. } XIMPreeditDrawCallbackStruct;
  1040. typedef enum {
  1041. XIMForwardChar, XIMBackwardChar,
  1042. XIMForwardWord, XIMBackwardWord,
  1043. XIMCaretUp, XIMCaretDown,
  1044. XIMNextLine, XIMPreviousLine,
  1045. XIMLineStart, XIMLineEnd,
  1046. XIMAbsolutePosition,
  1047. XIMDontChange
  1048. } XIMCaretDirection;
  1049. typedef enum {
  1050. XIMIsInvisible, /* Disable caret feedback */
  1051. XIMIsPrimary, /* UI defined caret feedback */
  1052. XIMIsSecondary /* UI defined caret feedback */
  1053. } XIMCaretStyle;
  1054. typedef struct _XIMPreeditCaretCallbackStruct {
  1055. int position; /* Caret offset within pre-edit string */
  1056. XIMCaretDirection direction; /* Caret moves direction */
  1057. XIMCaretStyle style; /* Feedback of the caret */
  1058. } XIMPreeditCaretCallbackStruct;
  1059. typedef enum {
  1060. XIMTextType,
  1061. XIMBitmapType
  1062. } XIMStatusDataType;
  1063. typedef struct _XIMStatusDrawCallbackStruct {
  1064. XIMStatusDataType type;
  1065. union {
  1066. XIMText *text;
  1067. Pixmap bitmap;
  1068. } data;
  1069. } XIMStatusDrawCallbackStruct;
  1070. typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */
  1071. #if NeedFunctionPrototypes
  1072. Display* /* display */,
  1073. XErrorEvent* /* error_event */
  1074. #endif
  1075. );
  1076. _XFUNCPROTOBEGIN
  1077. #include "tkIntXlibDecls.h"
  1078. _XFUNCPROTOEND
  1079. #if defined(MAC_OSX_TK)
  1080. # undef Cursor
  1081. # undef Region
  1082. #endif
  1083. #endif /* _XLIB_H_ */