|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _X11_XLIB_H_ |
|
#define _X11_XLIB_H_ |
|
|
|
#define XlibSpecificationRelease 6 |
|
|
|
#include <sys/types.h> |
|
|
|
#if defined(__SCO__) || defined(__UNIXWARE__) |
|
#include <stdint.h> |
|
#endif |
|
|
|
#include <X11/X.h> |
|
|
|
#ifdef MAC_OSX_TK |
|
# define Cursor XCursor |
|
# define Region XRegion |
|
#endif |
|
|
|
|
|
#include <X11/Xfuncproto.h> |
|
|
|
#ifndef X_WCHAR |
|
#include <stddef.h> |
|
#else |
|
#ifdef __UNIXOS2__ |
|
#include <stdlib.h> |
|
#else |
|
|
|
typedef unsigned long wchar_t; |
|
#endif |
|
#endif |
|
|
|
|
|
#define X_HAVE_UTF8_STRING 1 |
|
|
|
|
|
|
|
|
|
#ifdef __clang__ |
|
#pragma clang diagnostic push |
|
#pragma clang diagnostic ignored "-Wpadded" |
|
#endif |
|
|
|
typedef char *XPointer; |
|
|
|
#define Bool int |
|
#if defined(MAC_OSX_TK) |
|
|
|
#define Status int |
|
#else |
|
typedef int Status; |
|
#endif |
|
#define True 1 |
|
#define False 0 |
|
|
|
#define QueuedAlready 0 |
|
#define QueuedAfterReading 1 |
|
#define QueuedAfterFlush 2 |
|
|
|
#define ConnectionNumber(dpy) (((_XPrivDisplay)(dpy))->fd) |
|
#define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root) |
|
#define DefaultScreen(dpy) (((_XPrivDisplay)(dpy))->default_screen) |
|
#define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root) |
|
#define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual) |
|
#define DefaultGC(dpy, scr) (ScreenOfDisplay(dpy,scr)->default_gc) |
|
#define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel) |
|
#define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel) |
|
#define AllPlanes ((unsigned long)~0L) |
|
#define QLength(dpy) (((_XPrivDisplay)(dpy))->qlen) |
|
#define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width) |
|
#define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height) |
|
#define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth) |
|
#define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight) |
|
#define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth) |
|
#define DisplayCells(dpy, scr) (DefaultVisual(dpy,scr)->map_entries) |
|
#define ScreenCount(dpy) (((_XPrivDisplay)(dpy))->nscreens) |
|
#define ServerVendor(dpy) (((_XPrivDisplay)(dpy))->vendor) |
|
#define ProtocolVersion(dpy) (((_XPrivDisplay)(dpy))->proto_major_version) |
|
#define ProtocolRevision(dpy) (((_XPrivDisplay)(dpy))->proto_minor_version) |
|
#define VendorRelease(dpy) (((_XPrivDisplay)(dpy))->release) |
|
#define DisplayString(dpy) (((_XPrivDisplay)(dpy))->display_name) |
|
#define DefaultDepth(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth) |
|
#define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap) |
|
#define BitmapUnit(dpy) (((_XPrivDisplay)(dpy))->bitmap_unit) |
|
#define BitmapBitOrder(dpy) (((_XPrivDisplay)(dpy))->bitmap_bit_order) |
|
#define BitmapPad(dpy) (((_XPrivDisplay)(dpy))->bitmap_pad) |
|
#define ImageByteOrder(dpy) (((_XPrivDisplay)(dpy))->byte_order) |
|
#define NextRequest(dpy) (((_XPrivDisplay)(dpy))->request + 1) |
|
#define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)(dpy))->request) |
|
|
|
|
|
#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)(dpy))->screens[scr]) |
|
#define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy)) |
|
#define DisplayOfScreen(s) ((s)->display) |
|
#define RootWindowOfScreen(s) ((s)->root) |
|
#define BlackPixelOfScreen(s) ((s)->black_pixel) |
|
#define WhitePixelOfScreen(s) ((s)->white_pixel) |
|
#define DefaultColormapOfScreen(s)((s)->cmap) |
|
#define DefaultDepthOfScreen(s) ((s)->root_depth) |
|
#define DefaultGCOfScreen(s) ((s)->default_gc) |
|
#define DefaultVisualOfScreen(s)((s)->root_visual) |
|
#define WidthOfScreen(s) ((s)->width) |
|
#define HeightOfScreen(s) ((s)->height) |
|
#define WidthMMOfScreen(s) ((s)->mwidth) |
|
#define HeightMMOfScreen(s) ((s)->mheight) |
|
#define PlanesOfScreen(s) ((s)->root_depth) |
|
#define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries) |
|
#define MinCmapsOfScreen(s) ((s)->min_maps) |
|
#define MaxCmapsOfScreen(s) ((s)->max_maps) |
|
#define DoesSaveUnders(s) ((s)->save_unders) |
|
#define DoesBackingStore(s) ((s)->backing_store) |
|
#define EventMaskOfScreen(s) ((s)->root_input_mask) |
|
|
|
|
|
|
|
|
|
typedef struct _XExtData { |
|
int number; |
|
struct _XExtData *next; |
|
int (*free_private)( |
|
struct _XExtData *extension |
|
); |
|
XPointer private_data; |
|
} XExtData; |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
int extension; |
|
int major_opcode; |
|
int first_event; |
|
int first_error; |
|
} XExtCodes; |
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
int depth; |
|
int bits_per_pixel; |
|
int scanline_pad; |
|
} XPixmapFormatValues; |
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
int function; |
|
unsigned long plane_mask; |
|
unsigned long foreground; |
|
unsigned long background; |
|
int line_width; |
|
int line_style; |
|
int cap_style; |
|
|
|
int join_style; |
|
int fill_style; |
|
|
|
int fill_rule; |
|
int arc_mode; |
|
Pixmap tile; |
|
Pixmap stipple; |
|
int ts_x_origin; |
|
int ts_y_origin; |
|
Font font; |
|
int subwindow_mode; |
|
Bool graphics_exposures; |
|
int clip_x_origin; |
|
int clip_y_origin; |
|
Pixmap clip_mask; |
|
int dash_offset; |
|
char dashes; |
|
} XGCValues; |
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef XGCValues *GC; |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
XExtData *ext_data; |
|
VisualID visualid; |
|
#if defined(__cplusplus) || defined(c_plusplus) |
|
int c_class; |
|
#else |
|
int class; |
|
#endif |
|
unsigned long red_mask, green_mask, blue_mask; |
|
int bits_per_rgb; |
|
int map_entries; |
|
} Visual; |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
int depth; |
|
int nvisuals; |
|
Visual *visuals; |
|
} Depth; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct _XDisplay; |
|
|
|
typedef struct { |
|
XExtData *ext_data; |
|
struct _XDisplay *display; |
|
Window root; |
|
int width, height; |
|
int mwidth, mheight; |
|
int ndepths; |
|
Depth *depths; |
|
int root_depth; |
|
Visual *root_visual; |
|
GC default_gc; |
|
Colormap cmap; |
|
unsigned long white_pixel; |
|
unsigned long black_pixel; |
|
int max_maps, min_maps; |
|
int backing_store; |
|
Bool save_unders; |
|
long root_input_mask; |
|
} Screen; |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
XExtData *ext_data; |
|
int depth; |
|
int bits_per_pixel; |
|
int scanline_pad; |
|
} ScreenFormat; |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
Pixmap background_pixmap; |
|
unsigned long background_pixel; |
|
Pixmap border_pixmap; |
|
unsigned long border_pixel; |
|
int bit_gravity; |
|
int win_gravity; |
|
int backing_store; |
|
unsigned long backing_planes; |
|
unsigned long backing_pixel; |
|
Bool save_under; |
|
long event_mask; |
|
long do_not_propagate_mask; |
|
Bool override_redirect; |
|
Colormap colormap; |
|
Cursor cursor; |
|
} XSetWindowAttributes; |
|
|
|
typedef struct { |
|
int x, y; |
|
int width, height; |
|
int border_width; |
|
int depth; |
|
Visual *visual; |
|
Window root; |
|
#if defined(__cplusplus) || defined(c_plusplus) |
|
int c_class; |
|
#else |
|
int class; |
|
#endif |
|
int bit_gravity; |
|
int win_gravity; |
|
int backing_store; |
|
unsigned long backing_planes; |
|
unsigned long backing_pixel; |
|
Bool save_under; |
|
Colormap colormap; |
|
Bool map_installed; |
|
int map_state; |
|
long all_event_masks; |
|
long your_event_mask; |
|
long do_not_propagate_mask; |
|
Bool override_redirect; |
|
Screen *screen; |
|
} XWindowAttributes; |
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
int family; |
|
int length; |
|
char *address; |
|
} XHostAddress; |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
int typelength; |
|
int valuelength; |
|
char *type; |
|
char *value; |
|
} XServerInterpretedAddress; |
|
|
|
|
|
|
|
|
|
typedef struct _XImage { |
|
int width, height; |
|
int xoffset; |
|
int format; |
|
char *data; |
|
int byte_order; |
|
int bitmap_unit; |
|
int bitmap_bit_order; |
|
int bitmap_pad; |
|
int depth; |
|
int bytes_per_line; |
|
int bits_per_pixel; |
|
unsigned long red_mask; |
|
unsigned long green_mask; |
|
unsigned long blue_mask; |
|
XPointer obdata; |
|
struct funcs { |
|
struct _XImage *(*create_image)( |
|
struct _XDisplay* /* display */, |
|
Visual* /* visual */, |
|
unsigned int /* depth */, |
|
int /* format */, |
|
int /* offset */, |
|
char* /* data */, |
|
unsigned int /* width */, |
|
unsigned int /* height */, |
|
int /* bitmap_pad */, |
|
int /* bytes_per_line */); |
|
int (*destroy_image) (struct _XImage *); |
|
unsigned long (*get_pixel) (struct _XImage *, int, int); |
|
int (*put_pixel) (struct _XImage *, int, int, unsigned long); |
|
struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int); |
|
int (*add_pixel) (struct _XImage *, long); |
|
} f; |
|
} XImage; |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
int x, y; |
|
int width, height; |
|
int border_width; |
|
Window sibling; |
|
int stack_mode; |
|
} XWindowChanges; |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
unsigned long pixel; |
|
unsigned short red, green, blue; |
|
char flags; |
|
char pad; |
|
} XColor; |
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
short x1, y1, x2, y2; |
|
} XSegment; |
|
|
|
typedef struct { |
|
short x, y; |
|
} XPoint; |
|
|
|
typedef struct { |
|
short x, y; |
|
unsigned short width, height; |
|
} XRectangle; |
|
|
|
typedef struct { |
|
short x, y; |
|
unsigned short width, height; |
|
short angle1, angle2; |
|
} XArc; |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
int key_click_percent; |
|
int bell_percent; |
|
int bell_pitch; |
|
int bell_duration; |
|
int led; |
|
int led_mode; |
|
int key; |
|
int auto_repeat_mode; |
|
} XKeyboardControl; |
|
|
|
|
|
|
|
typedef struct { |
|
int key_click_percent; |
|
int bell_percent; |
|
unsigned int bell_pitch, bell_duration; |
|
unsigned long led_mask; |
|
int global_auto_repeat; |
|
char auto_repeats[32]; |
|
} XKeyboardState; |
|
|
|
|
|
|
|
typedef struct { |
|
Time time; |
|
short x, y; |
|
} XTimeCoord; |
|
|
|
|
|
|
|
typedef struct { |
|
int max_keypermod; |
|
KeyCode *modifiermap; |
|
} XModifierKeymap; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct _XPrivate; |
|
struct _XrmHashBucketRec; |
|
|
|
typedef struct |
|
_XDisplay |
|
{ |
|
XExtData *ext_data; |
|
struct _XPrivate *private1; |
|
int fd; |
|
int private2; |
|
int proto_major_version; |
|
int proto_minor_version; |
|
char *vendor; |
|
XID private3; |
|
XID private4; |
|
XID private5; |
|
int private6; |
|
XID (*resource_alloc)( |
|
struct _XDisplay* |
|
); |
|
int byte_order; |
|
int bitmap_unit; |
|
int bitmap_pad; |
|
int bitmap_bit_order; |
|
int nformats; |
|
ScreenFormat *pixmap_format; |
|
int private8; |
|
int release; |
|
struct _XPrivate *private9, *private10; |
|
int qlen; |
|
unsigned long request; |
|
XPointer private11; |
|
XPointer private12; |
|
XPointer private13; |
|
XPointer private14; |
|
unsigned max_request_size; |
|
struct _XrmHashBucketRec *db; |
|
int (*private15)( |
|
struct _XDisplay* |
|
); |
|
char *display_name; |
|
int default_screen; |
|
int nscreens; |
|
Screen *screens; |
|
unsigned long motion_buffer; |
|
unsigned long private16; |
|
int min_keycode; |
|
int max_keycode; |
|
XPointer private17; |
|
XPointer private18; |
|
int private19; |
|
char *xdefaults; |
|
|
|
} |
|
Display, |
|
*_XPrivDisplay; |
|
|
|
#define XMaxTransChars 7 |
|
|
|
#undef _XEVENT_ |
|
#ifndef _XEVENT_ |
|
|
|
|
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
Window root; |
|
Window subwindow; |
|
Time time; |
|
int x, y; |
|
int x_root, y_root; |
|
unsigned int state; |
|
unsigned int keycode; |
|
Bool same_screen; |
|
} XKeyEvent; |
|
typedef XKeyEvent XKeyPressedEvent; |
|
typedef XKeyEvent XKeyReleasedEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
Window root; |
|
Window subwindow; |
|
Time time; |
|
int x, y; |
|
int x_root, y_root; |
|
unsigned int state; |
|
unsigned int button; |
|
Bool same_screen; |
|
} XButtonEvent; |
|
typedef XButtonEvent XButtonPressedEvent; |
|
typedef XButtonEvent XButtonReleasedEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
Window root; |
|
Window subwindow; |
|
Time time; |
|
int x, y; |
|
int x_root, y_root; |
|
unsigned int state; |
|
char is_hint; |
|
Bool same_screen; |
|
} XMotionEvent; |
|
typedef XMotionEvent XPointerMovedEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
Window root; |
|
Window subwindow; |
|
Time time; |
|
int x, y; |
|
int x_root, y_root; |
|
int mode; |
|
int detail; |
|
|
|
|
|
|
|
|
|
Bool same_screen; |
|
Bool focus; |
|
unsigned int state; |
|
} XCrossingEvent; |
|
typedef XCrossingEvent XEnterWindowEvent; |
|
typedef XCrossingEvent XLeaveWindowEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
int mode; |
|
|
|
int detail; |
|
|
|
|
|
|
|
|
|
|
|
} XFocusChangeEvent; |
|
typedef XFocusChangeEvent XFocusInEvent; |
|
typedef XFocusChangeEvent XFocusOutEvent; |
|
|
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
char key_vector[32]; |
|
} XKeymapEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
int x, y; |
|
int width, height; |
|
int count; |
|
} XExposeEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Drawable drawable; |
|
int x, y; |
|
int width, height; |
|
int count; |
|
int major_code; |
|
int minor_code; |
|
} XGraphicsExposeEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Drawable drawable; |
|
int major_code; |
|
int minor_code; |
|
} XNoExposeEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
int state; |
|
} XVisibilityEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window parent; |
|
Window window; |
|
int x, y; |
|
int width, height; |
|
int border_width; |
|
Bool override_redirect; |
|
} XCreateWindowEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window event; |
|
Window window; |
|
} XDestroyWindowEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window event; |
|
Window window; |
|
Bool from_configure; |
|
} XUnmapEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window event; |
|
Window window; |
|
Bool override_redirect; |
|
} XMapEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window parent; |
|
Window window; |
|
} XMapRequestEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window event; |
|
Window window; |
|
Window parent; |
|
int x, y; |
|
Bool override_redirect; |
|
} XReparentEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window event; |
|
Window window; |
|
int x, y; |
|
int width, height; |
|
int border_width; |
|
Window above; |
|
Bool override_redirect; |
|
} XConfigureEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window event; |
|
Window window; |
|
int x, y; |
|
} XGravityEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
int width, height; |
|
} XResizeRequestEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window parent; |
|
Window window; |
|
int x, y; |
|
int width, height; |
|
int border_width; |
|
Window above; |
|
int detail; |
|
unsigned long value_mask; |
|
} XConfigureRequestEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window event; |
|
Window window; |
|
int place; |
|
} XCirculateEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window parent; |
|
Window window; |
|
int place; |
|
} XCirculateRequestEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
Atom atom; |
|
Time time; |
|
int state; |
|
} XPropertyEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
Atom selection; |
|
Time time; |
|
} XSelectionClearEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window owner; |
|
Window requestor; |
|
Atom selection; |
|
Atom target; |
|
Atom property; |
|
Time time; |
|
} XSelectionRequestEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window requestor; |
|
Atom selection; |
|
Atom target; |
|
Atom property; |
|
Time time; |
|
} XSelectionEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
Colormap colormap; |
|
#if defined(__cplusplus) || defined(c_plusplus) |
|
Bool c_new; |
|
#else |
|
Bool new; |
|
#endif |
|
int state; |
|
} XColormapEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
Atom message_type; |
|
int format; |
|
union { |
|
char b[20]; |
|
short s[10]; |
|
long l[5]; |
|
} data; |
|
} XClientMessageEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
int request; |
|
|
|
int first_keycode; |
|
int count; |
|
} XMappingEvent; |
|
|
|
typedef struct { |
|
int type; |
|
Display *display; |
|
XID resourceid; |
|
unsigned long serial; |
|
unsigned char error_code; |
|
unsigned char request_code; |
|
unsigned char minor_code; |
|
} XErrorEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
Window window; |
|
} XAnyEvent; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct |
|
{ |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
int extension; |
|
int evtype; |
|
} XGenericEvent; |
|
|
|
typedef struct { |
|
int type; |
|
unsigned long serial; |
|
Bool send_event; |
|
Display *display; |
|
int extension; |
|
int evtype; |
|
unsigned int cookie; |
|
void *data; |
|
} XGenericEventCookie; |
|
|
|
|
|
|
|
|
|
|
|
typedef union _XEvent { |
|
int type; |
|
XAnyEvent xany; |
|
XKeyEvent xkey; |
|
XButtonEvent xbutton; |
|
XMotionEvent xmotion; |
|
XCrossingEvent xcrossing; |
|
XFocusChangeEvent xfocus; |
|
XExposeEvent xexpose; |
|
XGraphicsExposeEvent xgraphicsexpose; |
|
XNoExposeEvent xnoexpose; |
|
XVisibilityEvent xvisibility; |
|
XCreateWindowEvent xcreatewindow; |
|
XDestroyWindowEvent xdestroywindow; |
|
XUnmapEvent xunmap; |
|
XMapEvent xmap; |
|
XMapRequestEvent xmaprequest; |
|
XReparentEvent xreparent; |
|
XConfigureEvent xconfigure; |
|
XGravityEvent xgravity; |
|
XResizeRequestEvent xresizerequest; |
|
XConfigureRequestEvent xconfigurerequest; |
|
XCirculateEvent xcirculate; |
|
XCirculateRequestEvent xcirculaterequest; |
|
XPropertyEvent xproperty; |
|
XSelectionClearEvent xselectionclear; |
|
XSelectionRequestEvent xselectionrequest; |
|
XSelectionEvent xselection; |
|
XColormapEvent xcolormap; |
|
XClientMessageEvent xclient; |
|
XMappingEvent xmapping; |
|
XErrorEvent xerror; |
|
XKeymapEvent xkeymap; |
|
XGenericEvent xgeneric; |
|
XGenericEventCookie xcookie; |
|
XID pad[24]; |
|
} XEvent; |
|
#endif |
|
|
|
#define XAllocID(dpy) ((*((_XPrivDisplay)(dpy))->resource_alloc)((dpy))) |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
short lbearing; |
|
short rbearing; |
|
short width; |
|
short ascent; |
|
short descent; |
|
unsigned short attributes; |
|
} XCharStruct; |
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
Atom name; |
|
unsigned long card32; |
|
} XFontProp; |
|
|
|
typedef struct { |
|
XExtData *ext_data; |
|
Font fid; |
|
unsigned direction; |
|
unsigned min_char_or_byte2; |
|
unsigned max_char_or_byte2; |
|
unsigned min_byte1; |
|
unsigned max_byte1; |
|
Bool all_chars_exist; |
|
unsigned default_char; |
|
int n_properties; |
|
XFontProp *properties; |
|
XCharStruct min_bounds; |
|
XCharStruct max_bounds; |
|
XCharStruct *per_char; |
|
int ascent; |
|
int descent; |
|
} XFontStruct; |
|
|
|
|
|
|
|
|
|
typedef struct { |
|
char *chars; |
|
int nchars; |
|
int delta; |
|
Font font; |
|
} XTextItem; |
|
|
|
typedef struct { |
|
unsigned char byte1; |
|
unsigned char byte2; |
|
} XChar2b; |
|
|
|
typedef struct { |
|
XChar2b *chars; |
|
int nchars; |
|
int delta; |
|
Font font; |
|
} XTextItem16; |
|
|
|
|
|
typedef union { Display *display; |
|
GC gc; |
|
Visual *visual; |
|
Screen *screen; |
|
ScreenFormat *pixmap_format; |
|
XFontStruct *font; } XEDataObject; |
|
|
|
typedef struct { |
|
XRectangle max_ink_extent; |
|
XRectangle max_logical_extent; |
|
} XFontSetExtents; |
|
|
|
|
|
|
|
|
|
|
|
typedef struct _XOM *XOM; |
|
typedef struct _XOC *XOC, *XFontSet; |
|
|
|
typedef struct { |
|
char *chars; |
|
int nchars; |
|
int delta; |
|
XFontSet font_set; |
|
} XmbTextItem; |
|
|
|
typedef struct { |
|
wchar_t *chars; |
|
int nchars; |
|
int delta; |
|
XFontSet font_set; |
|
} XwcTextItem; |
|
|
|
#define XNRequiredCharSet "requiredCharSet" |
|
#define XNQueryOrientation "queryOrientation" |
|
#define XNBaseFontName "baseFontName" |
|
#define XNOMAutomatic "omAutomatic" |
|
#define XNMissingCharSet "missingCharSet" |
|
#define XNDefaultString "defaultString" |
|
#define XNOrientation "orientation" |
|
#define XNDirectionalDependentDrawing "directionalDependentDrawing" |
|
#define XNContextualDrawing "contextualDrawing" |
|
#define XNFontInfo "fontInfo" |
|
|
|
typedef struct { |
|
int charset_count; |
|
char **charset_list; |
|
} XOMCharSetList; |
|
|
|
typedef enum { |
|
XOMOrientation_LTR_TTB, |
|
XOMOrientation_RTL_TTB, |
|
XOMOrientation_TTB_LTR, |
|
XOMOrientation_TTB_RTL, |
|
XOMOrientation_Context |
|
} XOrientation; |
|
|
|
typedef struct { |
|
int num_orientation; |
|
XOrientation *orientation; |
|
} XOMOrientation; |
|
|
|
typedef struct { |
|
int num_font; |
|
XFontStruct **font_struct_list; |
|
char **font_name_list; |
|
} XOMFontInfo; |
|
|
|
typedef struct _XIM *XIM; |
|
typedef struct _XIC *XIC; |
|
|
|
typedef void (*XIMProc)( |
|
XIM, |
|
XPointer, |
|
XPointer |
|
); |
|
|
|
typedef Bool (*XICProc)( |
|
XIC, |
|
XPointer, |
|
XPointer |
|
); |
|
|
|
typedef void (*XIDProc)( |
|
Display*, |
|
XPointer, |
|
XPointer |
|
); |
|
|
|
typedef unsigned long XIMStyle; |
|
|
|
typedef struct { |
|
unsigned short count_styles; |
|
XIMStyle *supported_styles; |
|
} XIMStyles; |
|
|
|
#define XIMPreeditArea 0x0001L |
|
#define XIMPreeditCallbacks 0x0002L |
|
#define XIMPreeditPosition 0x0004L |
|
#define XIMPreeditNothing 0x0008L |
|
#define XIMPreeditNone 0x0010L |
|
#define XIMStatusArea 0x0100L |
|
#define XIMStatusCallbacks 0x0200L |
|
#define XIMStatusNothing 0x0400L |
|
#define XIMStatusNone 0x0800L |
|
|
|
#define XNVaNestedList "XNVaNestedList" |
|
#define XNQueryInputStyle "queryInputStyle" |
|
#define XNClientWindow "clientWindow" |
|
#define XNInputStyle "inputStyle" |
|
#define XNFocusWindow "focusWindow" |
|
#define XNResourceName "resourceName" |
|
#define XNResourceClass "resourceClass" |
|
#define XNGeometryCallback "geometryCallback" |
|
#define XNDestroyCallback "destroyCallback" |
|
#define XNFilterEvents "filterEvents" |
|
#define XNPreeditStartCallback "preeditStartCallback" |
|
#define XNPreeditDoneCallback "preeditDoneCallback" |
|
#define XNPreeditDrawCallback "preeditDrawCallback" |
|
#define XNPreeditCaretCallback "preeditCaretCallback" |
|
#define XNPreeditStateNotifyCallback "preeditStateNotifyCallback" |
|
#define XNPreeditAttributes "preeditAttributes" |
|
#define XNStatusStartCallback "statusStartCallback" |
|
#define XNStatusDoneCallback "statusDoneCallback" |
|
#define XNStatusDrawCallback "statusDrawCallback" |
|
#define XNStatusAttributes "statusAttributes" |
|
#define XNArea "area" |
|
#define XNAreaNeeded "areaNeeded" |
|
#define XNSpotLocation "spotLocation" |
|
#define XNColormap "colorMap" |
|
#define XNStdColormap "stdColorMap" |
|
#define XNForeground "foreground" |
|
#define XNBackground "background" |
|
#define XNBackgroundPixmap "backgroundPixmap" |
|
#define XNFontSet "fontSet" |
|
#define XNLineSpace "lineSpace" |
|
#define XNCursor "cursor" |
|
|
|
#define XNQueryIMValuesList "queryIMValuesList" |
|
#define XNQueryICValuesList "queryICValuesList" |
|
#define XNVisiblePosition "visiblePosition" |
|
#define XNR6PreeditCallback "r6PreeditCallback" |
|
#define XNStringConversionCallback "stringConversionCallback" |
|
#define XNStringConversion "stringConversion" |
|
#define XNResetState "resetState" |
|
#define XNHotKey "hotKey" |
|
#define XNHotKeyState "hotKeyState" |
|
#define XNPreeditState "preeditState" |
|
#define XNSeparatorofNestedList "separatorofNestedList" |
|
|
|
#define XBufferOverflow -1 |
|
#define XLookupNone 1 |
|
#define XLookupChars 2 |
|
#define XLookupKeySym 3 |
|
#define XLookupBoth 4 |
|
|
|
typedef void *XVaNestedList; |
|
|
|
typedef struct { |
|
XPointer client_data; |
|
XIMProc callback; |
|
} XIMCallback; |
|
|
|
typedef struct { |
|
XPointer client_data; |
|
XICProc callback; |
|
} XICCallback; |
|
|
|
typedef unsigned long XIMFeedback; |
|
|
|
#define XIMReverse 1L |
|
#define XIMUnderline (1L<<1) |
|
#define XIMHighlight (1L<<2) |
|
#define XIMPrimary (1L<<5) |
|
#define XIMSecondary (1L<<6) |
|
#define XIMTertiary (1L<<7) |
|
#define XIMVisibleToForward (1L<<8) |
|
#define XIMVisibleToBackword (1L<<9) |
|
#define XIMVisibleToCenter (1L<<10) |
|
|
|
typedef struct _XIMText { |
|
unsigned short length; |
|
XIMFeedback *feedback; |
|
Bool encoding_is_wchar; |
|
union { |
|
char *multi_byte; |
|
wchar_t *wide_char; |
|
} string; |
|
} XIMText; |
|
|
|
typedef unsigned long XIMPreeditState; |
|
|
|
#define XIMPreeditUnKnown 0L |
|
#define XIMPreeditEnable 1L |
|
#define XIMPreeditDisable (1L<<1) |
|
|
|
typedef struct _XIMPreeditStateNotifyCallbackStruct { |
|
XIMPreeditState state; |
|
} XIMPreeditStateNotifyCallbackStruct; |
|
|
|
typedef unsigned long XIMResetState; |
|
|
|
#define XIMInitialState 1L |
|
#define XIMPreserveState (1L<<1) |
|
|
|
typedef unsigned long XIMStringConversionFeedback; |
|
|
|
#define XIMStringConversionLeftEdge (0x00000001) |
|
#define XIMStringConversionRightEdge (0x00000002) |
|
#define XIMStringConversionTopEdge (0x00000004) |
|
#define XIMStringConversionBottomEdge (0x00000008) |
|
#define XIMStringConversionConcealed (0x00000010) |
|
#define XIMStringConversionWrapped (0x00000020) |
|
|
|
typedef struct _XIMStringConversionText { |
|
unsigned short length; |
|
XIMStringConversionFeedback *feedback; |
|
Bool encoding_is_wchar; |
|
union { |
|
char *mbs; |
|
wchar_t *wcs; |
|
} string; |
|
} XIMStringConversionText; |
|
|
|
typedef unsigned short XIMStringConversionPosition; |
|
|
|
typedef unsigned short XIMStringConversionType; |
|
|
|
#define XIMStringConversionBuffer (0x0001) |
|
#define XIMStringConversionLine (0x0002) |
|
#define XIMStringConversionWord (0x0003) |
|
#define XIMStringConversionChar (0x0004) |
|
|
|
typedef unsigned short XIMStringConversionOperation; |
|
|
|
#define XIMStringConversionSubstitution (0x0001) |
|
#define XIMStringConversionRetrieval (0x0002) |
|
|
|
typedef enum { |
|
XIMForwardChar, XIMBackwardChar, |
|
XIMForwardWord, XIMBackwardWord, |
|
XIMCaretUp, XIMCaretDown, |
|
XIMNextLine, XIMPreviousLine, |
|
XIMLineStart, XIMLineEnd, |
|
XIMAbsolutePosition, |
|
XIMDontChange |
|
} XIMCaretDirection; |
|
|
|
typedef struct _XIMStringConversionCallbackStruct { |
|
XIMStringConversionPosition position; |
|
XIMCaretDirection direction; |
|
XIMStringConversionOperation operation; |
|
unsigned short factor; |
|
XIMStringConversionText *text; |
|
} XIMStringConversionCallbackStruct; |
|
|
|
typedef struct _XIMPreeditDrawCallbackStruct { |
|
int caret; |
|
int chg_first; |
|
int chg_length; |
|
XIMText *text; |
|
} XIMPreeditDrawCallbackStruct; |
|
|
|
typedef enum { |
|
XIMIsInvisible, |
|
XIMIsPrimary, |
|
XIMIsSecondary |
|
} XIMCaretStyle; |
|
|
|
typedef struct _XIMPreeditCaretCallbackStruct { |
|
int position; |
|
XIMCaretDirection direction; |
|
XIMCaretStyle style; |
|
} XIMPreeditCaretCallbackStruct; |
|
|
|
typedef enum { |
|
XIMTextType, |
|
XIMBitmapType |
|
} XIMStatusDataType; |
|
|
|
typedef struct _XIMStatusDrawCallbackStruct { |
|
XIMStatusDataType type; |
|
union { |
|
XIMText *text; |
|
Pixmap bitmap; |
|
} data; |
|
} XIMStatusDrawCallbackStruct; |
|
|
|
typedef struct _XIMHotKeyTrigger { |
|
KeySym keysym; |
|
int modifier; |
|
int modifier_mask; |
|
} XIMHotKeyTrigger; |
|
|
|
typedef struct _XIMHotKeyTriggers { |
|
int num_hot_key; |
|
XIMHotKeyTrigger *key; |
|
} XIMHotKeyTriggers; |
|
|
|
typedef unsigned long XIMHotKeyState; |
|
|
|
#define XIMHotKeyStateON (0x0001L) |
|
#define XIMHotKeyStateOFF (0x0002L) |
|
|
|
typedef struct { |
|
unsigned short count_values; |
|
char **supported_values; |
|
} XIMValuesList; |
|
|
|
_XFUNCPROTOBEGIN |
|
|
|
#if defined(WIN32) && !defined(_XLIBINT_) |
|
#define _Xdebug *_Xdebug_p |
|
#endif |
|
|
|
typedef int (*XErrorHandler) ( |
|
Display* , |
|
XErrorEvent* |
|
); |
|
|
|
typedef int (*XIOErrorHandler) ( |
|
Display* |
|
); |
|
|
|
typedef void (*XIOErrorExitHandler) ( |
|
Display*, |
|
void* |
|
); |
|
|
|
typedef void (*XConnectionWatchProc)( |
|
Display* , |
|
XPointer , |
|
int , |
|
Bool , |
|
XPointer* |
|
); |
|
|
|
#include "tkIntXlibDecls.h" |
|
|
|
#ifdef __clang__ |
|
#pragma clang diagnostic pop |
|
#endif |
|
|
|
_XFUNCPROTOEND |
|
|
|
#if defined(MAC_OSX_TK) |
|
# undef Cursor |
|
# undef Region |
|
#endif |
|
|
|
#endif |
|
|