source: trunk/kitgen/8.x/blt/win/X11/Xlib.h@ 176

Last change on this file since 176 was 175, checked in by demin, 12 years ago

initial commit

File size: 48.3 KB
RevLine 
[175]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
20/*
21 * Xlib.h - Header definition and support file for the C subroutine
22 * interface library (Xlib) to the X Window System Protocol (V11).
23 * Structures and symbols starting with "_" are private to the library.
24 */
25#ifndef _XLIB_H_
26#define _XLIB_H_
27
28#define XlibSpecificationRelease 5
29
30#ifdef MAC_TCL
31# include <X.h>
32# define Cursor XCursor
33# define Region XRegion
34#else
35# include <X11/X.h>
36#endif
37
38/* applications should not depend on these two headers being included! */
39#ifdef MAC_TCL
40#include <Xfuncproto.h>
41#else
42#include <X11/Xfuncproto.h>
43#endif
44
45#ifndef X_WCHAR
46#ifdef X_NOT_STDC_ENV
47#define X_WCHAR
48#endif
49#endif
50
51#ifndef X_WCHAR
52#include <stddef.h>
53#else
54/* replace this with #include or typedef appropriate for your system */
55typedef unsigned long wchar_t;
56#endif
57
58typedef char *XPointer;
59
60#define Bool int
61#ifdef MAC_TCL
62#define Status int
63#else
64typedef int Status;
65#endif
66#define True 1
67#define False 0
68
69#define QueuedAlready 0
70#define QueuedAfterReading 1
71#define QueuedAfterFlush 2
72
73#define ConnectionNumber(dpy) ((dpy)->fd)
74#define RootWindow(dpy, scr) (((dpy)->screens[(scr)]).root)
75#define DefaultScreen(dpy) ((dpy)->default_screen)
76#define DefaultRootWindow(dpy) (((dpy)->screens[(dpy)->default_screen]).root)
77#define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual)
78#define DefaultGC(dpy, scr) (((dpy)->screens[(scr)]).default_gc)
79#define BlackPixel(dpy, scr) (((dpy)->screens[(scr)]).black_pixel)
80#define WhitePixel(dpy, scr) (((dpy)->screens[(scr)]).white_pixel)
81#define AllPlanes ((unsigned long)~0L)
82#define QLength(dpy) ((dpy)->qlen)
83#define DisplayWidth(dpy, scr) (((dpy)->screens[(scr)]).width)
84#define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height)
85#define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth)
86#define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight)
87#define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
88#define DisplayCells(dpy, scr) (DefaultVisual((dpy), (scr))->map_entries)
89#define ScreenCount(dpy) ((dpy)->nscreens)
90#define ServerVendor(dpy) ((dpy)->vendor)
91#define ProtocolVersion(dpy) ((dpy)->proto_major_version)
92#define ProtocolRevision(dpy) ((dpy)->proto_minor_version)
93#define VendorRelease(dpy) ((dpy)->release)
94#define DisplayString(dpy) ((dpy)->display_name)
95#define DefaultDepth(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
96#define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap)
97#define BitmapUnit(dpy) ((dpy)->bitmap_unit)
98#define BitmapBitOrder(dpy) ((dpy)->bitmap_bit_order)
99#define BitmapPad(dpy) ((dpy)->bitmap_pad)
100#define ImageByteOrder(dpy) ((dpy)->byte_order)
101#define NextRequest(dpy) ((dpy)->request + 1)
102#define LastKnownRequestProcessed(dpy) ((dpy)->request)
103
104/* macros for screen oriented applications (toolkit) */
105#define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)]))
106#define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen]))
107#define DisplayOfScreen(s) ((s)->display)
108#define RootWindowOfScreen(s) ((s)->root)
109#define BlackPixelOfScreen(s) ((s)->black_pixel)
110#define WhitePixelOfScreen(s) ((s)->white_pixel)
111#define DefaultColormapOfScreen(s)((s)->cmap)
112#define DefaultDepthOfScreen(s) ((s)->root_depth)
113#define DefaultGCOfScreen(s) ((s)->default_gc)
114#define DefaultVisualOfScreen(s)((s)->root_visual)
115#define WidthOfScreen(s) ((s)->width)
116#define HeightOfScreen(s) ((s)->height)
117#define WidthMMOfScreen(s) ((s)->mwidth)
118#define HeightMMOfScreen(s) ((s)->mheight)
119#define PlanesOfScreen(s) ((s)->root_depth)
120#define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries)
121#define MinCmapsOfScreen(s) ((s)->min_maps)
122#define MaxCmapsOfScreen(s) ((s)->max_maps)
123#define DoesSaveUnders(s) ((s)->save_unders)
124#define DoesBackingStore(s) ((s)->backing_store)
125#define EventMaskOfScreen(s) ((s)->root_input_mask)
126
127/*
128 * Extensions need a way to hang private data on some structures.
129 */
130typedef struct _XExtData {
131 int number; /* number returned by XRegisterExtension */
132 struct _XExtData *next; /* next item on list of data for structure */
133 int (*free_private)(); /* called to free private storage */
134 XPointer private_data; /* data private to this extension. */
135} XExtData;
136
137/*
138 * This file contains structures used by the extension mechanism.
139 */
140typedef struct { /* public to extension, cannot be changed */
141 int extension; /* extension number */
142 int major_opcode; /* major op-code assigned by server */
143 int first_event; /* first event number for the extension */
144 int first_error; /* first error number for the extension */
145} XExtCodes;
146
147/*
148 * Data structure for retrieving info about pixmap formats.
149 */
150
151typedef struct {
152 int depth;
153 int bits_per_pixel;
154 int scanline_pad;
155} XPixmapFormatValues;
156
157
158/*
159 * Data structure for setting graphics context.
160 */
161typedef struct {
162 int function; /* logical operation */
163 unsigned long plane_mask;/* plane mask */
164 unsigned long foreground;/* foreground pixel */
165 unsigned long background;/* background pixel */
166 int line_width; /* line width */
167 int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
168 int cap_style; /* CapNotLast, CapButt,
169 CapRound, CapProjecting */
170 int join_style; /* JoinMiter, JoinRound, JoinBevel */
171 int fill_style; /* FillSolid, FillTiled,
172 FillStippled, FillOpaeueStippled */
173 int fill_rule; /* EvenOddRule, WindingRule */
174 int arc_mode; /* ArcChord, ArcPieSlice */
175 Pixmap tile; /* tile pixmap for tiling operations */
176 Pixmap stipple; /* stipple 1 plane pixmap for stipping */
177 int ts_x_origin; /* offset for tile or stipple operations */
178 int ts_y_origin;
179 Font font; /* default text font for text operations */
180 int subwindow_mode; /* ClipByChildren, IncludeInferiors */
181 Bool graphics_exposures;/* boolean, should exposures be generated */
182 int clip_x_origin; /* origin for clipping */
183 int clip_y_origin;
184 Pixmap clip_mask; /* bitmap clipping; other calls for rects */
185 int dash_offset; /* patterned/dashed line information */
186 char dashes;
187} XGCValues;
188
189/*
190 * Graphics context. The contents of this structure are implementation
191 * dependent. A GC should be treated as opaque by application code.
192 */
193
194typedef XGCValues *GC;
195
196/*
197 * Visual structure; contains information about colormapping possible.
198 */
199typedef struct {
200 XExtData *ext_data; /* hook for extension to hang data */
201 VisualID visualid; /* visual id of this visual */
202#if defined(__cplusplus) || defined(c_plusplus)
203 int c_class; /* C++ class of screen (monochrome, etc.) */
204#else
205 int class; /* class of screen (monochrome, etc.) */
206#endif
207 unsigned long red_mask, green_mask, blue_mask; /* mask values */
208 int bits_per_rgb; /* log base 2 of distinct color values */
209 int map_entries; /* color map entries */
210} Visual;
211
212/*
213 * Depth structure; contains information for each possible depth.
214 */
215typedef struct {
216 int depth; /* this depth (Z) of the depth */
217 int nvisuals; /* number of Visual types at this depth */
218 Visual *visuals; /* list of visuals possible at this depth */
219} Depth;
220
221/*
222 * Information about the screen. The contents of this structure are
223 * implementation dependent. A Screen should be treated as opaque
224 * by application code.
225 */
226typedef struct {
227 XExtData *ext_data; /* hook for extension to hang data */
228 struct _XDisplay *display;/* back pointer to display structure */
229 Window root; /* Root window id. */
230 int width, height; /* width and height of screen */
231 int mwidth, mheight; /* width and height of in millimeters */
232 int ndepths; /* number of depths possible */
233 Depth *depths; /* list of allowable depths on the screen */
234 int root_depth; /* bits per pixel */
235 Visual *root_visual; /* root visual */
236 GC default_gc; /* GC for the root root visual */
237 Colormap cmap; /* default color map */
238 unsigned long white_pixel;
239 unsigned long black_pixel; /* White and Black pixel values */
240 int max_maps, min_maps; /* max and min color maps */
241 int backing_store; /* Never, WhenMapped, Always */
242 Bool save_unders;
243 long root_input_mask; /* initial root input mask */
244} Screen;
245
246/*
247 * Format structure; describes ZFormat data the screen will understand.
248 */
249typedef struct {
250 XExtData *ext_data; /* hook for extension to hang data */
251 int depth; /* depth of this image format */
252 int bits_per_pixel; /* bits/pixel at this depth */
253 int scanline_pad; /* scanline must padded to this multiple */
254} ScreenFormat;
255
256/*
257 * Data structure for setting window attributes.
258 */
259typedef struct {
260 Pixmap background_pixmap; /* background or None or ParentRelative */
261 unsigned long background_pixel; /* background pixel */
262 Pixmap border_pixmap; /* border of the window */
263 unsigned long border_pixel; /* border pixel value */
264 int bit_gravity; /* one of bit gravity values */
265 int win_gravity; /* one of the window gravity values */
266 int backing_store; /* NotUseful, WhenMapped, Always */
267 unsigned long backing_planes;/* planes to be preseved if possible */
268 unsigned long backing_pixel;/* value to use in restoring planes */
269 Bool save_under; /* should bits under be saved? (popups) */
270 long event_mask; /* set of events that should be saved */
271 long do_not_propagate_mask; /* set of events that should not propagate */
272 Bool override_redirect; /* boolean value for override-redirect */
273 Colormap colormap; /* color map to be associated with window */
274 Cursor cursor; /* cursor to be displayed (or None) */
275} XSetWindowAttributes;
276
277typedef struct {
278 int x, y; /* location of window */
279 int width, height; /* width and height of window */
280 int border_width; /* border width of window */
281 int depth; /* depth of window */
282 Visual *visual; /* the associated visual structure */
283 Window root; /* root of screen containing window */
284#if defined(__cplusplus) || defined(c_plusplus)
285 int c_class; /* C++ InputOutput, InputOnly*/
286#else
287 int class; /* InputOutput, InputOnly*/
288#endif
289 int bit_gravity; /* one of bit gravity values */
290 int win_gravity; /* one of the window gravity values */
291 int backing_store; /* NotUseful, WhenMapped, Always */
292 unsigned long backing_planes;/* planes to be preserved if possible */
293 unsigned long backing_pixel;/* value to be used when restoring planes */
294 Bool save_under; /* boolean, should bits under be saved? */
295 Colormap colormap; /* color map to be associated with window */
296 Bool map_installed; /* boolean, is color map currently installed*/
297 int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
298 long all_event_masks; /* set of events all people have interest in*/
299 long your_event_mask; /* my event mask */
300 long do_not_propagate_mask; /* set of events that should not propagate */
301 Bool override_redirect; /* boolean value for override-redirect */
302 Screen *screen; /* back pointer to correct screen */
303} XWindowAttributes;
304
305/*
306 * Data structure for host setting; getting routines.
307 *
308 */
309
310typedef struct {
311 int family; /* for example FamilyInternet */
312 int length; /* length of address, in bytes */
313 char *address; /* pointer to where to find the bytes */
314} XHostAddress;
315
316/*
317 * Data structure for "image" data, used by image manipulation routines.
318 */
319typedef struct _XImage {
320 int width, height; /* size of image */
321 int xoffset; /* number of pixels offset in X direction */
322 int format; /* XYBitmap, XYPixmap, ZPixmap */
323 char *data; /* pointer to image data */
324 int byte_order; /* data byte order, LSBFirst, MSBFirst */
325 int bitmap_unit; /* quant. of scanline 8, 16, 32 */
326 int bitmap_bit_order; /* LSBFirst, MSBFirst */
327 int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */
328 int depth; /* depth of image */
329 int bytes_per_line; /* accelarator to next line */
330 int bits_per_pixel; /* bits per pixel (ZPixmap) */
331 unsigned long red_mask; /* bits in z arrangment */
332 unsigned long green_mask;
333 unsigned long blue_mask;
334 XPointer obdata; /* hook for the object routines to hang on */
335 struct funcs { /* image manipulation routines */
336 struct _XImage *(*create_image)();
337#if NeedFunctionPrototypes
338 int (*destroy_image) (struct _XImage *);
339 unsigned long (*get_pixel) (struct _XImage *, int, int);
340 int (*put_pixel) (struct _XImage *, int, int, unsigned long);
341 struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
342 int (*add_pixel) (struct _XImage *, long);
343#else
344 int (*destroy_image)();
345 unsigned long (*get_pixel)();
346 int (*put_pixel)();
347 struct _XImage *(*sub_image)();
348 int (*add_pixel)();
349#endif
350 } f;
351} XImage;
352
353/*
354 * Data structure for XReconfigureWindow
355 */
356typedef struct {
357 int x, y;
358 int width, height;
359 int border_width;
360 Window sibling;
361 int stack_mode;
362} XWindowChanges;
363
364/*
365 * Data structure used by color operations
366 */
367typedef struct {
368 unsigned long pixel;
369 unsigned short red, green, blue;
370 char flags; /* do_red, do_green, do_blue */
371 char pad;
372} XColor;
373
374/*
375 * Data structures for graphics operations. On most machines, these are
376 * congruent with the wire protocol structures, so reformatting the data
377 * can be avoided on these architectures.
378 */
379typedef struct {
380 short x1, y1, x2, y2;
381} XSegment;
382
383typedef struct {
384 short x, y;
385} XPoint;
386
387typedef struct {
388 short x, y;
389 unsigned short width, height;
390} XRectangle;
391
392typedef struct {
393 short x, y;
394 unsigned short width, height;
395 short angle1, angle2;
396} XArc;
397
398
399/* Data structure for XChangeKeyboardControl */
400
401typedef struct {
402 int key_click_percent;
403 int bell_percent;
404 int bell_pitch;
405 int bell_duration;
406 int led;
407 int led_mode;
408 int key;
409 int auto_repeat_mode; /* On, Off, Default */
410} XKeyboardControl;
411
412/* Data structure for XGetKeyboardControl */
413
414typedef struct {
415 int key_click_percent;
416 int bell_percent;
417 unsigned int bell_pitch, bell_duration;
418 unsigned long led_mask;
419 int global_auto_repeat;
420 char auto_repeats[32];
421} XKeyboardState;
422
423/* Data structure for XGetMotionEvents. */
424
425typedef struct {
426 Time time;
427 short x, y;
428} XTimeCoord;
429
430/* Data structure for X{Set,Get}ModifierMapping */
431
432typedef struct {
433 int max_keypermod; /* The server's max # of keys per modifier */
434 KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */
435} XModifierKeymap;
436
437
438/*
439 * Display datatype maintaining display specific data.
440 * The contents of this structure are implementation dependent.
441 * A Display should be treated as opaque by application code.
442 */
443typedef struct _XDisplay {
444 XExtData *ext_data; /* hook for extension to hang data */
445 struct _XFreeFuncs *free_funcs; /* internal free functions */
446 int fd; /* Network socket. */
447 int conn_checker; /* ugly thing used by _XEventsQueued */
448 int proto_major_version;/* maj. version of server's X protocol */
449 int proto_minor_version;/* minor version of servers X protocol */
450 char *vendor; /* vendor of the server hardware */
451 XID resource_base; /* resource ID base */
452 XID resource_mask; /* resource ID mask bits */
453 XID resource_id; /* allocator current ID */
454 int resource_shift; /* allocator shift to correct bits */
455 XID (*resource_alloc)(); /* allocator function */
456 int byte_order; /* screen byte order, LSBFirst, MSBFirst */
457 int bitmap_unit; /* padding and data requirements */
458 int bitmap_pad; /* padding requirements on bitmaps */
459 int bitmap_bit_order; /* LeastSignificant or MostSignificant */
460 int nformats; /* number of pixmap formats in list */
461 ScreenFormat *pixmap_format; /* pixmap format list */
462 int vnumber; /* Xlib's X protocol version number. */
463 int release; /* release of the server */
464 struct _XSQEvent *head, *tail; /* Input event queue. */
465 int qlen; /* Length of input event queue */
466 unsigned long request; /* sequence number of last request. */
467 char *last_req; /* beginning of last request, or dummy */
468 char *buffer; /* Output buffer starting address. */
469 char *bufptr; /* Output buffer index pointer. */
470 char *bufmax; /* Output buffer maximum+1 address. */
471 unsigned max_request_size; /* maximum number 32 bit words in request*/
472 struct _XrmHashBucketRec *db;
473 int (*synchandler)(); /* Synchronization handler */
474 char *display_name; /* "host:display" string used on this connect*/
475 int default_screen; /* default screen for operations */
476 int nscreens; /* number of screens on this server*/
477 Screen *screens; /* pointer to list of screens */
478 unsigned long motion_buffer; /* size of motion buffer */
479 unsigned long flags; /* internal connection flags */
480 int min_keycode; /* minimum defined keycode */
481 int max_keycode; /* maximum defined keycode */
482 KeySym *keysyms; /* This server's keysyms */
483 XModifierKeymap *modifiermap; /* This server's modifier keymap */
484 int keysyms_per_keycode;/* number of rows */
485 char *xdefaults; /* contents of defaults from server */
486 char *scratch_buffer; /* place to hang scratch buffer */
487 unsigned long scratch_length; /* length of scratch buffer */
488 int ext_number; /* extension number on this display */
489 struct _XExten *ext_procs; /* extensions initialized on this display */
490 /*
491 * the following can be fixed size, as the protocol defines how
492 * much address space is available.
493 * While this could be done using the extension vector, there
494 * may be MANY events processed, so a search through the extension
495 * list to find the right procedure for each event might be
496 * expensive if many extensions are being used.
497 */
498 Bool (*event_vec[128])(); /* vector for wire to event */
499 Status (*wire_vec[128])(); /* vector for event to wire */
500 KeySym lock_meaning; /* for XLookupString */
501 struct _XLockInfo *lock; /* multi-thread state, display lock */
502 struct _XInternalAsync *async_handlers; /* for internal async */
503 unsigned long bigreq_size; /* max size of big requests */
504 struct _XLockPtrs *lock_fns; /* pointers to threads functions */
505 /* things above this line should not move, for binary compatibility */
506 struct _XKeytrans *key_bindings; /* for XLookupString */
507 Font cursor_font; /* for XCreateFontCursor */
508 struct _XDisplayAtoms *atoms; /* for XInternAtom */
509 unsigned int mode_switch; /* keyboard group modifiers */
510 struct _XContextDB *context_db; /* context database */
511 Bool (**error_vec)(); /* vector for wire to error */
512 /*
513 * Xcms information
514 */
515 struct {
516 XPointer defaultCCCs; /* pointer to an array of default XcmsCCC */
517 XPointer clientCmaps; /* pointer to linked list of XcmsCmapRec */
518 XPointer perVisualIntensityMaps;
519 /* linked list of XcmsIntensityMap */
520 } cms;
521 struct _XIMFilter *im_filters;
522 struct _XSQEvent *qfree; /* unallocated event queue elements */
523 unsigned long next_event_serial_num; /* inserted into next queue elt */
524 int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
525} Display;
526
527#if NeedFunctionPrototypes /* prototypes require event type definitions */
528#undef _XEVENT_
529#endif
530#ifndef _XEVENT_
531
532#define XMaxTransChars 4
533
534/*
535 * Definitions of specific events.
536 */
537typedef struct {
538 int type; /* of event */
539 unsigned long serial; /* # of last request processed by server */
540 Bool send_event; /* true if this came from a SendEvent request */
541 Display *display; /* Display the event was read from */
542 Window window; /* "event" window it is reported relative to */
543 Window root; /* root window that the event occured on */
544 Window subwindow; /* child window */
545 Time time; /* milliseconds */
546 int x, y; /* pointer x, y coordinates in event window */
547 int x_root, y_root; /* coordinates relative to root */
548 unsigned int state; /* key or button mask */
549 unsigned int keycode; /* detail */
550 Bool same_screen; /* same screen flag */
551 char trans_chars[XMaxTransChars];
552 /* translated characters */
553 int nbytes;
554} XKeyEvent;
555typedef XKeyEvent XKeyPressedEvent;
556typedef XKeyEvent XKeyReleasedEvent;
557
558typedef struct {
559 int type; /* of event */
560 unsigned long serial; /* # of last request processed by server */
561 Bool send_event; /* true if this came from a SendEvent request */
562 Display *display; /* Display the event was read from */
563 Window window; /* "event" window it is reported relative to */
564 Window root; /* root window that the event occured on */
565 Window subwindow; /* child window */
566 Time time; /* milliseconds */
567 int x, y; /* pointer x, y coordinates in event window */
568 int x_root, y_root; /* coordinates relative to root */
569 unsigned int state; /* key or button mask */
570 unsigned int button; /* detail */
571 Bool same_screen; /* same screen flag */
572} XButtonEvent;
573typedef XButtonEvent XButtonPressedEvent;
574typedef XButtonEvent XButtonReleasedEvent;
575
576typedef struct {
577 int type; /* of event */
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; /* "event" window reported relative to */
582 Window root; /* root window that the event occured on */
583 Window subwindow; /* child window */
584 Time time; /* milliseconds */
585 int x, y; /* pointer x, y coordinates in event window */
586 int x_root, y_root; /* coordinates relative to root */
587 unsigned int state; /* key or button mask */
588 char is_hint; /* detail */
589 Bool same_screen; /* same screen flag */
590} XMotionEvent;
591typedef XMotionEvent XPointerMovedEvent;
592
593typedef struct {
594 int type; /* of event */
595 unsigned long serial; /* # of last request processed by server */
596 Bool send_event; /* true if this came from a SendEvent request */
597 Display *display; /* Display the event was read from */
598 Window window; /* "event" window reported relative to */
599 Window root; /* root window that the event occured on */
600 Window subwindow; /* child window */
601 Time time; /* milliseconds */
602 int x, y; /* pointer x, y coordinates in event window */
603 int x_root, y_root; /* coordinates relative to root */
604 int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
605 int detail;
606 /*
607 * NotifyAncestor, NotifyVirtual, NotifyInferior,
608 * NotifyNonlinear,NotifyNonlinearVirtual
609 */
610 Bool same_screen; /* same screen flag */
611 Bool focus; /* boolean focus */
612 unsigned int state; /* key or button mask */
613} XCrossingEvent;
614typedef XCrossingEvent XEnterWindowEvent;
615typedef XCrossingEvent XLeaveWindowEvent;
616
617typedef struct {
618 int type; /* FocusIn or FocusOut */
619 unsigned long serial; /* # of last request processed by server */
620 Bool send_event; /* true if this came from a SendEvent request */
621 Display *display; /* Display the event was read from */
622 Window window; /* window of event */
623 int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
624 int detail;
625 /*
626 * NotifyAncestor, NotifyVirtual, NotifyInferior,
627 * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
628 * NotifyPointerRoot, NotifyDetailNone
629 */
630} XFocusChangeEvent;
631typedef XFocusChangeEvent XFocusInEvent;
632typedef XFocusChangeEvent XFocusOutEvent;
633
634/* generated on EnterWindow and FocusIn when KeyMapState selected */
635typedef 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 window;
641 char key_vector[32];
642} XKeymapEvent;
643
644typedef struct {
645 int type;
646 unsigned long serial; /* # of last request processed by server */
647 Bool send_event; /* true if this came from a SendEvent request */
648 Display *display; /* Display the event was read from */
649 Window window;
650 int x, y;
651 int width, height;
652 int count; /* if non-zero, at least this many more */
653} XExposeEvent;
654
655typedef struct {
656 int type;
657 unsigned long serial; /* # of last request processed by server */
658 Bool send_event; /* true if this came from a SendEvent request */
659 Display *display; /* Display the event was read from */
660 Drawable drawable;
661 int x, y;
662 int width, height;
663 int count; /* if non-zero, at least this many more */
664 int major_code; /* core is CopyArea or CopyPlane */
665 int minor_code; /* not defined in the core */
666} XGraphicsExposeEvent;
667
668typedef struct {
669 int type;
670 unsigned long serial; /* # of last request processed by server */
671 Bool send_event; /* true if this came from a SendEvent request */
672 Display *display; /* Display the event was read from */
673 Drawable drawable;
674 int major_code; /* core is CopyArea or CopyPlane */
675 int minor_code; /* not defined in the core */
676} XNoExposeEvent;
677
678typedef struct {
679 int type;
680 unsigned long serial; /* # of last request processed by server */
681 Bool send_event; /* true if this came from a SendEvent request */
682 Display *display; /* Display the event was read from */
683 Window window;
684 int state; /* Visibility state */
685} XVisibilityEvent;
686
687typedef struct {
688 int type;
689 unsigned long serial; /* # of last request processed by server */
690 Bool send_event; /* true if this came from a SendEvent request */
691 Display *display; /* Display the event was read from */
692 Window parent; /* parent of the window */
693 Window window; /* window id of window created */
694 int x, y; /* window location */
695 int width, height; /* size of window */
696 int border_width; /* border width */
697 Bool override_redirect; /* creation should be overridden */
698} XCreateWindowEvent;
699
700typedef struct {
701 int type;
702 unsigned long serial; /* # of last request processed by server */
703 Bool send_event; /* true if this came from a SendEvent request */
704 Display *display; /* Display the event was read from */
705 Window event;
706 Window window;
707} XDestroyWindowEvent;
708
709typedef struct {
710 int type;
711 unsigned long serial; /* # of last request processed by server */
712 Bool send_event; /* true if this came from a SendEvent request */
713 Display *display; /* Display the event was read from */
714 Window event;
715 Window window;
716 Bool from_configure;
717} XUnmapEvent;
718
719typedef struct {
720 int type;
721 unsigned long serial; /* # of last request processed by server */
722 Bool send_event; /* true if this came from a SendEvent request */
723 Display *display; /* Display the event was read from */
724 Window event;
725 Window window;
726 Bool override_redirect; /* boolean, is override set... */
727} XMapEvent;
728
729typedef struct {
730 int type;
731 unsigned long serial; /* # of last request processed by server */
732 Bool send_event; /* true if this came from a SendEvent request */
733 Display *display; /* Display the event was read from */
734 Window parent;
735 Window window;
736} XMapRequestEvent;
737
738typedef struct {
739 int type;
740 unsigned long serial; /* # of last request processed by server */
741 Bool send_event; /* true if this came from a SendEvent request */
742 Display *display; /* Display the event was read from */
743 Window event;
744 Window window;
745 Window parent;
746 int x, y;
747 Bool override_redirect;
748} XReparentEvent;
749
750typedef struct {
751 int type;
752 unsigned long serial; /* # of last request processed by server */
753 Bool send_event; /* true if this came from a SendEvent request */
754 Display *display; /* Display the event was read from */
755 Window event;
756 Window window;
757 int x, y;
758 int width, height;
759 int border_width;
760 Window above;
761 Bool override_redirect;
762} XConfigureEvent;
763
764typedef struct {
765 int type;
766 unsigned long serial; /* # of last request processed by server */
767 Bool send_event; /* true if this came from a SendEvent request */
768 Display *display; /* Display the event was read from */
769 Window event;
770 Window window;
771 int x, y;
772} XGravityEvent;
773
774typedef struct {
775 int type;
776 unsigned long serial; /* # of last request processed by server */
777 Bool send_event; /* true if this came from a SendEvent request */
778 Display *display; /* Display the event was read from */
779 Window window;
780 int width, height;
781} XResizeRequestEvent;
782
783typedef struct {
784 int type;
785 unsigned long serial; /* # of last request processed by server */
786 Bool send_event; /* true if this came from a SendEvent request */
787 Display *display; /* Display the event was read from */
788 Window parent;
789 Window window;
790 int x, y;
791 int width, height;
792 int border_width;
793 Window above;
794 int detail; /* Above, Below, TopIf, BottomIf, Opposite */
795 unsigned long value_mask;
796} XConfigureRequestEvent;
797
798typedef 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 event;
804 Window window;
805 int place; /* PlaceOnTop, PlaceOnBottom */
806} XCirculateEvent;
807
808typedef struct {
809 int type;
810 unsigned long serial; /* # of last request processed by server */
811 Bool send_event; /* true if this came from a SendEvent request */
812 Display *display; /* Display the event was read from */
813 Window parent;
814 Window window;
815 int place; /* PlaceOnTop, PlaceOnBottom */
816} XCirculateRequestEvent;
817
818typedef struct {
819 int type;
820 unsigned long serial; /* # of last request processed by server */
821 Bool send_event; /* true if this came from a SendEvent request */
822 Display *display; /* Display the event was read from */
823 Window window;
824 Atom atom;
825 Time time;
826 int state; /* NewValue, Deleted */
827} XPropertyEvent;
828
829typedef struct {
830 int type;
831 unsigned long serial; /* # of last request processed by server */
832 Bool send_event; /* true if this came from a SendEvent request */
833 Display *display; /* Display the event was read from */
834 Window window;
835 Atom selection;
836 Time time;
837} XSelectionClearEvent;
838
839typedef struct {
840 int type;
841 unsigned long serial; /* # of last request processed by server */
842 Bool send_event; /* true if this came from a SendEvent request */
843 Display *display; /* Display the event was read from */
844 Window owner;
845 Window requestor;
846 Atom selection;
847 Atom target;
848 Atom property;
849 Time time;
850} XSelectionRequestEvent;
851
852typedef struct {
853 int type;
854 unsigned long serial; /* # of last request processed by server */
855 Bool send_event; /* true if this came from a SendEvent request */
856 Display *display; /* Display the event was read from */
857 Window requestor;
858 Atom selection;
859 Atom target;
860 Atom property; /* ATOM or None */
861 Time time;
862} XSelectionEvent;
863
864typedef struct {
865 int type;
866 unsigned long serial; /* # of last request processed by server */
867 Bool send_event; /* true if this came from a SendEvent request */
868 Display *display; /* Display the event was read from */
869 Window window;
870 Colormap colormap; /* COLORMAP or None */
871#if defined(__cplusplus) || defined(c_plusplus)
872 Bool c_new; /* C++ */
873#else
874 Bool new;
875#endif
876 int state; /* ColormapInstalled, ColormapUninstalled */
877} XColormapEvent;
878
879typedef struct {
880 int type;
881 unsigned long serial; /* # of last request processed by server */
882 Bool send_event; /* true if this came from a SendEvent request */
883 Display *display; /* Display the event was read from */
884 Window window;
885 Atom message_type;
886 int format;
887 union {
888 char b[20];
889 short s[10];
890 long l[5];
891 } data;
892} XClientMessageEvent;
893
894typedef struct {
895 int type;
896 unsigned long serial; /* # of last request processed by server */
897 Bool send_event; /* true if this came from a SendEvent request */
898 Display *display; /* Display the event was read from */
899 Window window; /* unused */
900 int request; /* one of MappingModifier, MappingKeyboard,
901 MappingPointer */
902 int first_keycode; /* first keycode */
903 int count; /* defines range of change w. first_keycode*/
904} XMappingEvent;
905
906typedef struct {
907 int type;
908 Display *display; /* Display the event was read from */
909 XID resourceid; /* resource id */
910 unsigned long serial; /* serial number of failed request */
911 unsigned char error_code; /* error code of failed request */
912 unsigned char request_code; /* Major op-code of failed request */
913 unsigned char minor_code; /* Minor op-code of failed request */
914} XErrorEvent;
915
916typedef struct {
917 int type;
918 unsigned long serial; /* # of last request processed by server */
919 Bool send_event; /* true if this came from a SendEvent request */
920 Display *display;/* Display the event was read from */
921 Window window; /* window on which event was requested in event mask */
922} XAnyEvent;
923
924/*
925 * this union is defined so Xlib can always use the same sized
926 * event structure internally, to avoid memory fragmentation.
927 */
928typedef union _XEvent {
929 int type; /* must not be changed; first element */
930 XAnyEvent xany;
931 XKeyEvent xkey;
932 XButtonEvent xbutton;
933 XMotionEvent xmotion;
934 XCrossingEvent xcrossing;
935 XFocusChangeEvent xfocus;
936 XExposeEvent xexpose;
937 XGraphicsExposeEvent xgraphicsexpose;
938 XNoExposeEvent xnoexpose;
939 XVisibilityEvent xvisibility;
940 XCreateWindowEvent xcreatewindow;
941 XDestroyWindowEvent xdestroywindow;
942 XUnmapEvent xunmap;
943 XMapEvent xmap;
944 XMapRequestEvent xmaprequest;
945 XReparentEvent xreparent;
946 XConfigureEvent xconfigure;
947 XGravityEvent xgravity;
948 XResizeRequestEvent xresizerequest;
949 XConfigureRequestEvent xconfigurerequest;
950 XCirculateEvent xcirculate;
951 XCirculateRequestEvent xcirculaterequest;
952 XPropertyEvent xproperty;
953 XSelectionClearEvent xselectionclear;
954 XSelectionRequestEvent xselectionrequest;
955 XSelectionEvent xselection;
956 XColormapEvent xcolormap;
957 XClientMessageEvent xclient;
958 XMappingEvent xmapping;
959 XErrorEvent xerror;
960 XKeymapEvent xkeymap;
961 long pad[24];
962} XEvent;
963#endif
964
965#define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy)))
966
967/*
968 * per character font metric information.
969 */
970typedef struct {
971 short lbearing; /* origin to left edge of raster */
972 short rbearing; /* origin to right edge of raster */
973 short width; /* advance to next char's origin */
974 short ascent; /* baseline to top edge of raster */
975 short descent; /* baseline to bottom edge of raster */
976 unsigned short attributes; /* per char flags (not predefined) */
977} XCharStruct;
978
979/*
980 * To allow arbitrary information with fonts, there are additional properties
981 * returned.
982 */
983typedef struct {
984 Atom name;
985 unsigned long card32;
986} XFontProp;
987
988typedef struct {
989 XExtData *ext_data; /* hook for extension to hang data */
990 Font fid; /* Font id for this font */
991 unsigned direction; /* hint about direction the font is painted */
992 unsigned min_char_or_byte2;/* first character */
993 unsigned max_char_or_byte2;/* last character */
994 unsigned min_byte1; /* first row that exists */
995 unsigned max_byte1; /* last row that exists */
996 Bool all_chars_exist;/* flag if all characters have non-zero size*/
997 unsigned default_char; /* char to print for undefined character */
998 int n_properties; /* how many properties there are */
999 XFontProp *properties; /* pointer to array of additional properties*/
1000 XCharStruct min_bounds; /* minimum bounds over all existing char*/
1001 XCharStruct max_bounds; /* maximum bounds over all existing char*/
1002 XCharStruct *per_char; /* first_char to last_char information */
1003 int ascent; /* log. extent above baseline for spacing */
1004 int descent; /* log. descent below baseline for spacing */
1005} XFontStruct;
1006
1007/*
1008 * PolyText routines take these as arguments.
1009 */
1010typedef struct {
1011 char *chars; /* pointer to string */
1012 int nchars; /* number of characters */
1013 int delta; /* delta between strings */
1014 Font font; /* font to print it in, None don't change */
1015} XTextItem;
1016
1017typedef struct { /* normal 16 bit characters are two bytes */
1018 unsigned char byte1;
1019 unsigned char byte2;
1020} XChar2b;
1021
1022typedef struct {
1023 XChar2b *chars; /* two byte characters */
1024 int nchars; /* number of characters */
1025 int delta; /* delta between strings */
1026 Font font; /* font to print it in, None don't change */
1027} XTextItem16;
1028
1029
1030typedef union { Display *display;
1031 GC gc;
1032 Visual *visual;
1033 Screen *screen;
1034 ScreenFormat *pixmap_format;
1035 XFontStruct *font; } XEDataObject;
1036
1037typedef struct {
1038 XRectangle max_ink_extent;
1039 XRectangle max_logical_extent;
1040} XFontSetExtents;
1041
1042typedef struct _XFontSet *XFontSet;
1043
1044typedef struct {
1045 char *chars;
1046 int nchars;
1047 int delta;
1048 XFontSet font_set;
1049} XmbTextItem;
1050
1051typedef struct {
1052 wchar_t *chars;
1053 int nchars;
1054 int delta;
1055 XFontSet font_set;
1056} XwcTextItem;
1057
1058typedef void (*XIMProc)();
1059
1060typedef struct _XIM *XIM;
1061typedef struct _XIC *XIC;
1062
1063typedef unsigned long XIMStyle;
1064
1065typedef struct {
1066 unsigned short count_styles;
1067 XIMStyle *supported_styles;
1068} XIMStyles;
1069
1070#define XIMPreeditArea 0x0001L
1071#define XIMPreeditCallbacks 0x0002L
1072#define XIMPreeditPosition 0x0004L
1073#define XIMPreeditNothing 0x0008L
1074#define XIMPreeditNone 0x0010L
1075#define XIMStatusArea 0x0100L
1076#define XIMStatusCallbacks 0x0200L
1077#define XIMStatusNothing 0x0400L
1078#define XIMStatusNone 0x0800L
1079
1080#define XNVaNestedList "XNVaNestedList"
1081#define XNClientWindow "clientWindow"
1082#define XNInputStyle "inputStyle"
1083#define XNFocusWindow "focusWindow"
1084#define XNResourceName "resourceName"
1085#define XNResourceClass "resourceClass"
1086#define XNGeometryCallback "geometryCallback"
1087#define XNFilterEvents "filterEvents"
1088#define XNPreeditStartCallback "preeditStartCallback"
1089#define XNPreeditDoneCallback "preeditDoneCallback"
1090#define XNPreeditDrawCallback "preeditDrawCallback"
1091#define XNPreeditCaretCallback "preeditCaretCallback"
1092#define XNPreeditAttributes "preeditAttributes"
1093#define XNStatusStartCallback "statusStartCallback"
1094#define XNStatusDoneCallback "statusDoneCallback"
1095#define XNStatusDrawCallback "statusDrawCallback"
1096#define XNStatusAttributes "statusAttributes"
1097#define XNArea "area"
1098#define XNAreaNeeded "areaNeeded"
1099#define XNSpotLocation "spotLocation"
1100#define XNColormap "colorMap"
1101#define XNStdColormap "stdColorMap"
1102#define XNForeground "foreground"
1103#define XNBackground "background"
1104#define XNBackgroundPixmap "backgroundPixmap"
1105#define XNFontSet "fontSet"
1106#define XNLineSpace "lineSpace"
1107#define XNCursor "cursor"
1108
1109#define XBufferOverflow -1
1110#define XLookupNone 1
1111#define XLookupChars 2
1112#define XLookupKeySym 3
1113#define XLookupBoth 4
1114
1115#if NeedFunctionPrototypes
1116typedef void *XVaNestedList;
1117#else
1118typedef XPointer XVaNestedList;
1119#endif
1120
1121typedef struct {
1122 XPointer client_data;
1123 XIMProc callback;
1124} XIMCallback;
1125
1126typedef unsigned long XIMFeedback;
1127
1128#define XIMReverse 1
1129#define XIMUnderline (1<<1)
1130#define XIMHighlight (1<<2)
1131#define XIMPrimary (1<<5)
1132#define XIMSecondary (1<<6)
1133#define XIMTertiary (1<<7)
1134
1135typedef struct _XIMText {
1136 unsigned short length;
1137 XIMFeedback *feedback;
1138 Bool encoding_is_wchar;
1139 union {
1140 char *multi_byte;
1141 wchar_t *wide_char;
1142 } string;
1143} XIMText;
1144
1145typedef struct _XIMPreeditDrawCallbackStruct {
1146 int caret; /* Cursor offset within pre-edit string */
1147 int chg_first; /* Starting change position */
1148 int chg_length; /* Length of the change in character count */
1149 XIMText *text;
1150} XIMPreeditDrawCallbackStruct;
1151
1152typedef enum {
1153 XIMForwardChar, XIMBackwardChar,
1154 XIMForwardWord, XIMBackwardWord,
1155 XIMCaretUp, XIMCaretDown,
1156 XIMNextLine, XIMPreviousLine,
1157 XIMLineStart, XIMLineEnd,
1158 XIMAbsolutePosition,
1159 XIMDontChange
1160} XIMCaretDirection;
1161
1162typedef enum {
1163 XIMIsInvisible, /* Disable caret feedback */
1164 XIMIsPrimary, /* UI defined caret feedback */
1165 XIMIsSecondary /* UI defined caret feedback */
1166} XIMCaretStyle;
1167
1168typedef struct _XIMPreeditCaretCallbackStruct {
1169 int position; /* Caret offset within pre-edit string */
1170 XIMCaretDirection direction; /* Caret moves direction */
1171 XIMCaretStyle style; /* Feedback of the caret */
1172} XIMPreeditCaretCallbackStruct;
1173
1174typedef enum {
1175 XIMTextType,
1176 XIMBitmapType
1177} XIMStatusDataType;
1178
1179typedef struct _XIMStatusDrawCallbackStruct {
1180 XIMStatusDataType type;
1181 union {
1182 XIMText *text;
1183 Pixmap bitmap;
1184 } data;
1185} XIMStatusDrawCallbackStruct;
1186
1187typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */
1188#if NeedFunctionPrototypes
1189 Display* /* display */,
1190 XErrorEvent* /* error_event */
1191#endif
1192);
1193
1194_XFUNCPROTOBEGIN
1195
1196#include "X11/Xutil.h"
1197
1198extern void XSetDashes(Display * display, GC gc, int dash_offset,
1199 _Xconst char* dash_list, int n);
1200
1201extern XModifierKeymap *XGetModifierMapping(Display *display);
1202
1203extern XImage *XCreateImage(Display *display, Visual *visual, unsigned int ui1,
1204 int i1, int i2, char* cp, unsigned int ui2, unsigned int ui3,
1205 int i3, int i4);
1206
1207extern XImage *XGetImage(Display* display,Drawable dr, int i1, int i2,
1208 unsigned int ui1, unsigned int ui2, unsigned long ul, int i3);
1209
1210extern char *XGetAtomName(Display *d, Atom a);
1211
1212extern char *XKeysymToString(KeySym k);
1213
1214extern Colormap XCreateColormap(Display *d, Window w, Visual* v,
1215 int i);
1216
1217extern Cursor XCreatePixmapCursor(Display *d, Pixmap p1, Pixmap p2,
1218 XColor* x1, XColor* x2, unsigned int ui1, unsigned int ui2);
1219
1220extern Cursor XCreateGlyphCursor(Display *d, Font f1, Font f2,
1221 unsigned int ui1, unsigned int ui2, XColor* x1, XColor* x2);
1222
1223extern GContext XGContextFromGC(GC g);
1224
1225extern XHostAddress *XListHosts(Display *d, int* i, Bool* b);
1226
1227extern KeySym XKeycodeToKeysym(Display *d, unsigned int k, int i);
1228
1229extern KeySym XStringToKeysym(_Xconst char* c);
1230
1231extern Window XRootWindow(Display *d, int i);
1232
1233extern XErrorHandler XSetErrorHandler(XErrorHandler x);
1234
1235extern Status XIconifyWindow(Display *d, Window w, int i);
1236
1237extern Status XWithdrawWindow(Display *d, Window w, int i);
1238
1239extern Status XGetWMColormapWindows(Display *d, Window w, Window** wpp,
1240 int* ip);
1241
1242extern Status XAllocColor(Display *d, Colormap c, XColor* xp);
1243
1244extern void XBell(Display *d, int i);
1245
1246extern void XChangeProperty(Display *d, Window w, Atom a1, Atom a2, int i1,
1247 int i2, _Xconst unsigned char* c, int i3);
1248
1249extern void XChangeWindowAttributes(Display *d, Window w, unsigned long ul,
1250 XSetWindowAttributes* x);
1251
1252extern void XClearWindow(Display *d, Window w);
1253
1254extern void XConfigureWindow(Display *d, Window w, unsigned int i,
1255 XWindowChanges* x);
1256
1257extern void XCopyArea(Display *d, Drawable dr1, Drawable dr2, GC g, int i1,
1258 int i2, unsigned int ui1, unsigned int ui2, int i3, int i4);
1259
1260extern void XCopyPlane(Display *d, Drawable dr1, Drawable dr2, GC g, int i1,
1261 int i2, unsigned int ui1, unsigned int ui2, int i3, int i4,
1262 unsigned long ul);
1263
1264extern Pixmap XCreateBitmapFromData(Display *display, Drawable d,
1265 _Xconst char* data, unsigned int width, unsigned int height);
1266
1267extern void XDefineCursor(Display *d, Window w, Cursor c);
1268
1269extern void XDeleteProperty(Display *d, Window w, Atom a);
1270
1271extern void XDestroyWindow(Display *d, Window w);
1272
1273extern void XDrawArc(Display *d, Drawable dr, GC g, int i1, int i2,
1274 unsigned int ui1, unsigned int ui2, int i3, int i4);
1275
1276extern void XDrawLines(Display *d, Drawable dr, GC g, XPoint* x, int i1,
1277 int i2);
1278
1279extern void XDrawRectangle(Display *d, Drawable dr, GC g, int i1, int i2,
1280 unsigned int ui1, unsigned int ui2);
1281
1282extern void XFillArc(Display *d, Drawable dr, GC g, int i1, int i2,
1283 unsigned int ui1, unsigned int ui2, int i3, int i4);
1284
1285extern void XFillPolygon(Display *d, Drawable dr, GC g, XPoint* x, int i1,
1286 int i2, int i3);
1287
1288extern void XFillRectangles(Display *d, Drawable dr, GC g, XRectangle* x,
1289 int i);
1290
1291extern void XForceScreenSaver(Display *d, int i);
1292
1293extern void XFreeColormap(Display *d, Colormap c);
1294
1295extern void XFreeColors(Display *d, Colormap c, unsigned long* ulp, int i,
1296 unsigned long ul);
1297
1298extern void XFreeCursor(Display *d, Cursor c);
1299
1300extern void XFreeModifiermap(XModifierKeymap* x);
1301
1302extern Status XGetGeometry(Display *d, Drawable dr, Window* w, int* i1,
1303 int* i2, unsigned int* ui1, unsigned int* ui2, unsigned int* ui3,
1304 unsigned int* ui4);
1305
1306extern void XGetInputFocus(Display *d, Window* w, int* i);
1307
1308extern int XGetWindowProperty(Display *d, Window w, Atom a1, long l1, long l2,
1309 Bool b, Atom a2, Atom* ap, int* ip, unsigned long* ulp1,
1310 unsigned long* ulp2, unsigned char** cpp);
1311
1312extern Status XGetWindowAttributes(Display *d, Window w, XWindowAttributes* x);
1313
1314extern int XGrabKeyboard(Display *d, Window w, Bool b, int i1, int i2, Time t);
1315
1316extern int XGrabPointer(Display *d, Window w1, Bool b, unsigned int ui, int i1,
1317 int i2, Window w2, Cursor c, Time t);
1318
1319extern KeyCode XKeysymToKeycode(Display *d, KeySym k);
1320
1321extern Status XLookupColor(Display *d, Colormap c1, _Xconst char* c2,
1322 XColor* x1, XColor* x2);
1323
1324extern void XMapWindow(Display *d, Window w);
1325
1326extern void XMoveResizeWindow(Display *d, Window w, int i1, int i2,
1327 unsigned int ui1, unsigned int ui2);
1328
1329extern void XMoveWindow(Display *d, Window w, int i1, int i2);
1330
1331extern void XNextEvent(Display *d, XEvent* x);
1332
1333extern void XPutBackEvent(Display *d, XEvent* x);
1334
1335extern void XQueryColors(Display *d, Colormap c, XColor* x, int i);
1336
1337extern Bool XQueryPointer(Display *d, Window w1, Window* w2, Window* w3,
1338 int* i1, int* i2, int* i3, int* i4, unsigned int* ui);
1339
1340extern Status XQueryTree(Display *d, Window w1, Window* w2, Window* w3,
1341 Window** w4, unsigned int* ui);
1342
1343extern void XRaiseWindow(Display *d, Window w);
1344
1345extern void XRefreshKeyboardMapping(XMappingEvent* x);
1346
1347extern void XResizeWindow(Display *d, Window w, unsigned int ui1,
1348 unsigned int ui2);
1349
1350extern void XSelectInput(Display *d, Window w, long l);
1351
1352extern Status XSendEvent(Display *d, Window w, Bool b, long l, XEvent* x);
1353
1354extern void XSetCommand(Display *d, Window w, char** c, int i);
1355
1356extern void XSetIconName(Display *d, Window w, _Xconst char* c);
1357
1358extern void XSetInputFocus(Display *d, Window w, int i, Time t);
1359
1360extern void XSetSelectionOwner(Display *d, Atom a, Window w, Time t);
1361
1362extern void XSetWindowBackground(Display *d, Window w, unsigned long ul);
1363
1364extern void XSetWindowBackgroundPixmap(Display *d, Window w, Pixmap p);
1365
1366extern void XSetWindowBorder(Display *d, Window w, unsigned long ul);
1367
1368extern void XSetWindowBorderPixmap(Display *d, Window w, Pixmap p);
1369
1370extern void XSetWindowBorderWidth(Display *d, Window w, unsigned int ui);
1371
1372extern void XSetWindowColormap(Display *d, Window w, Colormap c);
1373
1374extern Bool XTranslateCoordinates(Display *d, Window w1, Window w2, int i1,
1375 int i2, int* i3, int* i4, Window* w3);
1376
1377extern void XUngrabKeyboard(Display *d, Time t);
1378
1379extern void XUngrabPointer(Display *d, Time t);
1380
1381extern void XUnmapWindow(Display *d, Window w);
1382
1383extern void XWindowEvent(Display *d, Window w, long l, XEvent* x);
1384
1385extern void XDestroyIC(XIC x);
1386
1387extern Bool XFilterEvent(XEvent* x, Window w);
1388
1389extern int XmbLookupString(XIC xi, XKeyPressedEvent* xk, char* c, int i,
1390 KeySym* k, Status* s);
1391
1392extern void TkPutImage(unsigned long * colors, int ncolors, Display *display,
1393 Drawable d, GC gc, XImage* image, int src_x, int src_y,
1394 int dest_x, int dest_y, unsigned int width, unsigned int height);
1395
1396extern Status XParseColor(Display * display, Colormap map, _Xconst char* spec,
1397 XColor * colorPtr);
1398
1399extern GC XCreateGC(Display *display, Drawable d, unsigned long valuemask,
1400 XGCValues* values);
1401
1402extern void XFreeGC(Display *display, GC gc);
1403
1404extern Atom XInternAtom(Display *display, _Xconst char* atom_name,
1405 Bool only_if_exists);
1406
1407extern void XSetBackground(Display *display, GC gc, unsigned long foreground);
1408
1409extern void XSetForeground(Display *display, GC gc, unsigned long foreground);
1410
1411extern void XSetClipMask(Display *display, GC gc, Pixmap pixmap);
1412
1413extern void XSetClipOrigin(Display *display, GC gc, int clip_x_origin,
1414 int clip_y_origin);
1415
1416extern void XSetTSOrigin(Display *display, GC gc, int ts_x_origin,
1417 int ts_y_origin);
1418
1419extern void XChangeGC(Display *display, GC gc, unsigned long mask,
1420 XGCValues * values);
1421
1422extern void XSetFont(Display *display, GC gc, Font font);
1423
1424extern void XSetArcMode(Display *display, GC gc, int arc_mode);
1425
1426extern void XSetStipple(Display * display, GC gc,
1427 Pixmap stipple);
1428
1429extern void XSetFillRule(Display *display, GC gc, int fill_rule);
1430
1431extern void XSetFillStyle(Display *display, GC gc, int fill_style);
1432
1433extern void XSetFunction(Display *display, GC gc, int function);
1434
1435extern void XSetLineAttributes(Display *display, GC gc,
1436 unsigned int line_width, int line_style, int cap_style,
1437 int join_style);
1438
1439extern int _XInitImageFuncPtrs(XImage * image);
1440
1441extern XIC XCreateIC(void);
1442
1443extern XVisualInfo *XGetVisualInfo(Display *display, long vinfo_mask,
1444 XVisualInfo* vinfo_template, int* nitems_return);
1445
1446extern void XSetWMClientMachine(Display *display, Window w,
1447 XTextProperty* text_prop);
1448
1449extern Status XStringListToTextProperty(char** list, int count,
1450 XTextProperty* text_prop_return);
1451
1452extern void XDrawLine(Display *d, Drawable dr, GC g, int x1, int y1, int x2,
1453 int y2);
1454
1455extern void XWarpPointer(Display *d, Window s, Window dw, int sx, int sy,
1456 unsigned int sw, unsigned int sh, int dx, int dy);
1457
1458extern void XFillRectangle(Display *display, Drawable d, GC gc, int x, int y,
1459 unsigned int width, unsigned int height);
1460
1461_XFUNCPROTOEND
1462
1463#ifdef MAC_TCL
1464# undef Cursor
1465# undef Region
1466#endif
1467
1468#endif /* _XLIB_H_ */
Note: See TracBrowser for help on using the repository browser.