| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| |
| |
| |
| |
| |
| #ifndef _XLIB_H_ |
| #define _XLIB_H_ |
|
|
| #define XlibSpecificationRelease 5 |
|
|
| #if !defined(MAC_OSX_TK) |
| # include <X11/X.h> |
| #endif |
| #ifdef MAC_OSX_TK |
| # include <X11/X.h> |
| # define Cursor XCursor |
| # define Region XRegion |
| #endif |
|
|
| |
| #include <X11/Xfuncproto.h> |
|
|
| #ifndef X_WCHAR |
| #ifdef X_NOT_STDC_ENV |
| #define X_WCHAR |
| #endif |
| #endif |
|
|
| #ifndef X_WCHAR |
| #include <stddef.h> |
| #else |
| |
| typedef unsigned long wchar_t; |
| #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) ((dpy)->fd) |
| #define RootWindow(dpy, scr) (((dpy)->screens[(scr)]).root) |
| #define DefaultScreen(dpy) ((dpy)->default_screen) |
| #define DefaultRootWindow(dpy) (((dpy)->screens[(dpy)->default_screen]).root) |
| #define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual) |
| #define DefaultGC(dpy, scr) (((dpy)->screens[(scr)]).default_gc) |
| #define BlackPixel(dpy, scr) (((dpy)->screens[(scr)]).black_pixel) |
| #define WhitePixel(dpy, scr) (((dpy)->screens[(scr)]).white_pixel) |
| #define AllPlanes ((unsigned long)~0L) |
| #define QLength(dpy) ((dpy)->qlen) |
| #define DisplayWidth(dpy, scr) (((dpy)->screens[(scr)]).width) |
| #define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height) |
| #define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth) |
| #define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight) |
| #define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth) |
| #define DisplayCells(dpy, scr) (DefaultVisual((dpy), (scr))->map_entries) |
| #define ScreenCount(dpy) ((dpy)->nscreens) |
| #define ServerVendor(dpy) ((dpy)->vendor) |
| #define ProtocolVersion(dpy) ((dpy)->proto_major_version) |
| #define ProtocolRevision(dpy) ((dpy)->proto_minor_version) |
| #define VendorRelease(dpy) ((dpy)->release) |
| #define DisplayString(dpy) ((dpy)->display_name) |
| #define DefaultDepth(dpy, scr) (((dpy)->screens[(scr)]).root_depth) |
| #define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap) |
| #define BitmapUnit(dpy) ((dpy)->bitmap_unit) |
| #define BitmapBitOrder(dpy) ((dpy)->bitmap_bit_order) |
| #define BitmapPad(dpy) ((dpy)->bitmap_pad) |
| #define ImageByteOrder(dpy) ((dpy)->byte_order) |
| #define NextRequest(dpy) ((dpy)->request + 1) |
| #define LastKnownRequestProcessed(dpy) ((dpy)->request) |
|
|
| |
| #define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)])) |
| #define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen])) |
| #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)(); |
| 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; |
|
|
| |
| |
| |
| |
| |
| 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 _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)(); |
| #if NeedFunctionPrototypes |
| 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); |
| #else |
| int (*destroy_image)(); |
| unsigned long (*get_pixel)(); |
| int (*put_pixel)(); |
| struct _XImage *(*sub_image)(); |
| int (*add_pixel)(); |
| #endif |
| } 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; |
|
|
|
|
| |
| |
| |
| |
| |
| typedef struct _XDisplay { |
| XExtData *ext_data; |
| struct _XFreeFuncs *free_funcs; |
| int fd; |
| int conn_checker; |
| int proto_major_version; |
| int proto_minor_version; |
| char *vendor; |
| XID resource_base; |
| XID resource_mask; |
| XID resource_id; |
| int resource_shift; |
| XID (*resource_alloc)(); |
| int byte_order; |
| int bitmap_unit; |
| int bitmap_pad; |
| int bitmap_bit_order; |
| int nformats; |
| ScreenFormat *pixmap_format; |
| int vnumber; |
| int release; |
| struct _XSQEvent *head, *tail; |
| int qlen; |
| unsigned long request; |
| char *last_req; |
| char *buffer; |
| char *bufptr; |
| char *bufmax; |
| unsigned max_request_size; |
| struct _XrmHashBucketRec *db; |
| int (*synchandler)(); |
| char *display_name; |
| int default_screen; |
| int nscreens; |
| Screen *screens; |
| unsigned long motion_buffer; |
| unsigned long flags; |
| int min_keycode; |
| int max_keycode; |
| KeySym *keysyms; |
| XModifierKeymap *modifiermap; |
| int keysyms_per_keycode; |
| char *xdefaults; |
| char *scratch_buffer; |
| unsigned long scratch_length; |
| int ext_number; |
| struct _XExten *ext_procs; |
| |
| |
| |
| |
| |
| |
| |
| |
| Bool (*event_vec[128])(); |
| Status (*wire_vec[128])(); |
| KeySym lock_meaning; |
| struct _XLockInfo *lock; |
| struct _XInternalAsync *async_handlers; |
| unsigned long bigreq_size; |
| struct _XLockPtrs *lock_fns; |
| |
| struct _XKeytrans *key_bindings; |
| Font cursor_font; |
| struct _XDisplayAtoms *atoms; |
| unsigned int mode_switch; |
| struct _XContextDB *context_db; |
| Bool (**error_vec)(); |
| |
| |
| |
| struct { |
| XPointer defaultCCCs; |
| XPointer clientCmaps; |
| XPointer perVisualIntensityMaps; |
| |
| } cms; |
| struct _XIMFilter *im_filters; |
| struct _XSQEvent *qfree; |
| unsigned long next_event_serial_num; |
| int (*savedsynchandler)(); |
| } Display; |
|
|
| #if NeedFunctionPrototypes |
| #undef _XEVENT_ |
| #endif |
| #ifndef _XEVENT_ |
|
|
| #define XMaxTransChars 7 |
|
|
| |
| |
| |
| 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 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; |
| XID pad[24]; |
| } XEvent; |
| #endif |
|
|
| #define XAllocID(dpy) ((*(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 _XFontSet *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; |
|
|
| typedef void (*XIMProc)(); |
|
|
| typedef struct _XIM *XIM; |
| typedef struct _XIC *XIC; |
|
|
| 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 XNClientWindow "clientWindow" |
| #define XNInputStyle "inputStyle" |
| #define XNFocusWindow "focusWindow" |
| #define XNResourceName "resourceName" |
| #define XNResourceClass "resourceClass" |
| #define XNGeometryCallback "geometryCallback" |
| #define XNFilterEvents "filterEvents" |
| #define XNPreeditStartCallback "preeditStartCallback" |
| #define XNPreeditDoneCallback "preeditDoneCallback" |
| #define XNPreeditDrawCallback "preeditDrawCallback" |
| #define XNPreeditCaretCallback "preeditCaretCallback" |
| #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 XBufferOverflow -1 |
| #define XLookupNone 1 |
| #define XLookupChars 2 |
| #define XLookupKeySym 3 |
| #define XLookupBoth 4 |
|
|
| #if NeedFunctionPrototypes |
| typedef void *XVaNestedList; |
| #else |
| typedef XPointer XVaNestedList; |
| #endif |
|
|
| typedef struct { |
| XPointer client_data; |
| XIMProc callback; |
| } XIMCallback; |
|
|
| typedef unsigned long XIMFeedback; |
|
|
| #define XIMReverse 1 |
| #define XIMUnderline (1<<1) |
| #define XIMHighlight (1<<2) |
| #define XIMPrimary (1<<5) |
| #define XIMSecondary (1<<6) |
| #define XIMTertiary (1<<7) |
|
|
| typedef struct _XIMText { |
| unsigned short length; |
| XIMFeedback *feedback; |
| Bool encoding_is_wchar; |
| union { |
| char *multi_byte; |
| wchar_t *wide_char; |
| } string; |
| } XIMText; |
|
|
| typedef struct _XIMPreeditDrawCallbackStruct { |
| int caret; |
| int chg_first; |
| int chg_length; |
| XIMText *text; |
| } XIMPreeditDrawCallbackStruct; |
|
|
| typedef enum { |
| XIMForwardChar, XIMBackwardChar, |
| XIMForwardWord, XIMBackwardWord, |
| XIMCaretUp, XIMCaretDown, |
| XIMNextLine, XIMPreviousLine, |
| XIMLineStart, XIMLineEnd, |
| XIMAbsolutePosition, |
| XIMDontChange |
| } XIMCaretDirection; |
|
|
| 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 int (*XErrorHandler) ( |
| #if NeedFunctionPrototypes |
| Display* , |
| XErrorEvent* |
| #endif |
| ); |
|
|
| _XFUNCPROTOBEGIN |
|
|
|
|
|
|
| #include "tkIntXlibDecls.h" |
|
|
| _XFUNCPROTOEND |
|
|
| #if defined(MAC_OSX_TK) |
| # undef Cursor |
| # undef Region |
| #endif |
|
|
| #endif |
|
|