Code: Select all
#VisualNoMask = $0
#VisualIDMask = $1
#VisualScreenMask = $2
#VisualDepthMask = $4
#VisualClassMask = $8
#VisualRedMaskMask = $10
#VisualGreenMaskMask = $20
#VisualBlueMaskMask = $40
#VisualColormapSizeMask = $80
#VisualBitsPerRGBMask = $100
#VisualAllMask = $1FF
#KeyPress = 2
#KeyRelease = 3
#ButtonPress = 4
#ButtonRelease = 5
#MotionNotify = 6
#EnterNotify = 7
#LeaveNotify = 8
#FocusIn = 9
#FocusOut = 10
#KeymapNotify = 11
#Expose = 12
#GraphicsExpose = 13
#NoExpose = 14
#VisibilityNotify = 15
#CreateNotify = 16
#DestroyNotify = 17
#UnmapNotify = 18
#MapNotify = 19
#MapRequest = 20
#ReparentNotify = 21
#ConfigureNotify = 22
#ConfigureRequest = 23
#GravityNotify = 24
#ResizeRequest = 25
#CirculateNotify = 26
#CirculateRequest = 27
#PropertyNotify = 28
#SelectionClear = 29
#SelectionRequest = 30
#SelectionNotify = 31
#ColormapNotify = 32
#ClientMessage = 33
#MappingNotify = 34
#GenericEvent = 35
#LASTEvent = 36
; typedef struct _XExtData {
; int number; /* number returned by XInitExtension */
; struct _XExtData *Next; /* next item on list of data for structure */
; Int (*free_private)(); /* if defined, called to free private */
; XPointer private_data; /* data private to this extension. */
; } XExtData;
Structure XExtData
number.l
*next.XExtData
*free_private
*private_data
EndStructure
; typedef struct {
; XExtData *ext_data; /* hook for extension to hang data */
; VisualID visualid; /* visual id of this visual */
; #if Defined(__cplusplus) || Defined(c_plusplus)
; int c_class; /* C++ class of screen (monochrome, etc.) */
; #else
; int class; /* class of screen (monochrome, etc.) */
; #endif
; unsigned long red_mask, green_mask, blue_mask; /* mask values */
; int bits_per_rgb; /* log base 2 of distinct color values */
; int map_entries; /* color map entries */
; } Visual;
Structure Visual
*ext_data.XExtData
visualid.i
class.l
red_mask.i
green_mask.i
blue_mask.i
bits_per_rgb.l
map_entries.l
EndStructure
; typedef struct {
; Visual *visual;
; VisualID visualid;
; int screen;
; unsigned int depth;
; int class;
; unsigned long red_mask;
; unsigned long green_mask;
; unsigned long blue_mask;
; int colormap_size;
; int bits_per_rgb;
; } XVisualInfo;
Structure XVisualInfo
*visual.Visual
VisualID.i
screen.l
depth.l
class.l
red_mask.i
green_mask.i
blue_mask.i
colormap_size.l
bits_per_rgb.l
EndStructure
; typedef struct {
; short lbearing; /* origin to left edge of raster */
; short rbearing; /* origin to right edge of raster */
; short width; /* advance to next char's origin */
; short ascent; /* baseline to top edge of raster */
; short descent; /* baseline to bottom edge of raster */
; unsigned short attributes; /* per char flags (not predefined) */
; } XCharStruct;
Structure XCharStruct
lbearing.w
rbearing.w
width.w
ascent.w
descent.w
attributes.w
EndStructure
; typedef struct {
; Atom name;
; unsigned long card32;
; } XFontProp;
Structure XFontProp
name.i
card32.i
EndStructure
; typedef struct { /* public To extension, cannot be changed */
; int extension; /* extension number */
; int major_opcode; /* major op-code assigned by server */
; int first_event; /* first event number for the extension */
; int first_error; /* first error number for the extension */
; } XExtCodes;
Structure XExtCodes
extension.l
major_opcode.l
first_event.l
first_error.l
EndStructure
; typedef struct {
; int depth;
; int bits_per_pixel;
; int scanline_pad;
; } XPixmapFormatValues;
Structure XPixmapFormatValues
depth.l
bits_per_pixel.l
scanline_pad.l
EndStructure
; typedef struct {
; XExtData *ext_data; /* hook for extension to hang data */
; Font fid; /* Font id for this font */
; unsigned direction; /* hint about the direction font is painted */
; unsigned min_char_or_byte2; /* first character */
; unsigned max_char_or_byte2; /* last character */
; unsigned min_byte1; /* first row that exists */
; unsigned max_byte1; /* last row that exists */
; Bool all_chars_exist; /* flag if all characters have nonzero size */
; unsigned default_char; /* char to print for undefined character */
; int n_properties; /* how many properties there are */
; XFontProp *properties; /* pointer to array of additional properties */
; XCharStruct min_bounds; /* minimum bounds over all existing char */
; XCharStruct max_bounds; /* maximum bounds over all existing char */
; XCharStruct *per_char; /* first_char to last_char information */
; int ascent; /* logical extent above baseline for spacing */
; int descent; /* logical decent below baseline for spacing */
; } XFontStruct;
Structure XFontStruct
*ext_data.XExtData
fid.i
direction.l
min_char_or_byte2.l
max_char_or_byte2.l
min_byte1.l
max_byte1.l
all_chars_exist.l
default_char.l
n_properties.l
*properties.XFontProp
min_bounds.XCharStruct
max_bounds.XCharStruct
*per_char.XCharStruct
ascent.l
descent.l
EndStructure
; typedef struct {
; int function; /* logical operation */
; unsigned long plane_mask;/* plane mask */
; unsigned long foreground;/* foreground pixel */
; unsigned long background;/* background pixel */
; int line_width; /* line width */
; int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
; int cap_style; /* CapNotLast, CapButt,
; CapRound, CapProjecting */
; int join_style; /* JoinMiter, JoinRound, JoinBevel */
; int fill_style; /* FillSolid, FillTiled,
; FillStippled, FillOpaeueStippled */
; int fill_rule; /* EvenOddRule, WindingRule */
; int arc_mode; /* ArcChord, ArcPieSlice */
; Pixmap tile; /* tile pixmap for tiling operations */
; Pixmap stipple; /* stipple 1 plane pixmap for stipping */
; int ts_x_origin; /* offset for tile or stipple operations */
; int ts_y_origin;
; Font font; /* default text font for text operations */
; int subwindow_mode; /* ClipByChildren, IncludeInferiors */
; Bool graphics_exposures;/* boolean, should exposures be generated */
; int clip_x_origin; /* origin for clipping */
; int clip_y_origin;
; Pixmap clip_mask; /* bitmap clipping; other calls for rects */
; int dash_offset; /* patterned/dashed line information */
; char dashes;
; } XGCValues;
Structure XGCValues
function.l
plane_mask.i
foreground.i
background.i
line_width.l
line_style.l
cap_style.l
join_style.l
fill_style.l
fill_rule.l
arc_mode.l
tile.i
stipple.i
ts_x_origin.l
ts_y_origin.l
font.i
subwindow_mode.l
graphics_exposures.l
clip_x_origin.l
clip_y_origin.l
clip_mask.i
dash_offset.l
dashes.a ; NEED CHECK
EndStructure
; typedef struct {
; int depth; /* this depth (Z) of the depth */
; int nvisuals; /* number of Visual types at this depth */
; Visual *visuals; /* list of visuals possible at this depth */
; } Depth;
Structure Depth
depth.l
nvisuals.l
*visuals.Visual
EndStructure
; typedef struct _XGC
; #ifdef XLIB_ILLEGAL_ACCESS
; {
; XExtData *ext_data; /* hook for extension to hang data */
; GContext gid; /* protocol ID for graphics context */
; /* there is more To this Structure, but it is private To Xlib */
; }
; #endif
; *GC;
Structure GC
*ext_data.XExtData
gid.l
EndStructure
; typedef struct
; #ifdef XLIB_ILLEGAL_ACCESS
; _XDisplay
; #endif
; {
; XExtData *ext_data; /* hook for extension to hang data */
; struct _XPrivate *private1;
; int fd; /* Network socket. */
; int private2;
; int proto_major_version;/* major version of server's X protocol */
; int proto_minor_version;/* minor version of servers X protocol */
; char *vendor; /* vendor of the server hardware */
; XID private3;
; XID private4;
; XID private5;
; int private6;
; XID (*resource_alloc)( /* allocator function */
; struct _XDisplay*
; );
; int byte_order; /* screen byte order, LSBFirst, MSBFirst */
; int bitmap_unit; /* padding and data requirements */
; int bitmap_pad; /* padding requirements on bitmaps */
; int bitmap_bit_order; /* LeastSignificant or MostSignificant */
; int nformats; /* number of pixmap formats in list */
; ScreenFormat *pixmap_format; /* pixmap format list */
; int private8;
; int release; /* release of the server */
; struct _XPrivate *private9, *private10;
; int qlen; /* Length of input event queue */
; unsigned long last_request_read; /* seq number of last event read */
; unsigned long request; /* sequence number of last request. */
; XPointer private11;
; XPointer private12;
; XPointer private13;
; XPointer private14;
; unsigned max_request_size; /* maximum number 32 bit words in request*/
; struct _XrmHashBucketRec *db;
; Int (*private15)(
; struct _XDisplay*
; );
; char *display_name; /* "host:display" string used on this connect*/
; int default_screen; /* default screen for operations */
; int nscreens; /* number of screens on this server*/
; Screen *screens; /* pointer to list of screens */
; unsigned long motion_buffer; /* size of motion buffer */
; unsigned long private16;
; int min_keycode; /* minimum defined keycode */
; int max_keycode; /* maximum defined keycode */
; XPointer private17;
; XPointer private18;
; int private19;
; char *xdefaults; /* contents of defaults from server */
; /* there is more To this Structure, but it is private To Xlib */
; }
; #ifdef XLIB_ILLEGAL_ACCESS
; Display,
; #endif
; *_XPrivDisplay;
Structure Display
*ext_data.XExtData
*private1
fd.l
private2.l
proto_major_version.l
proto_minor_version.l
*vendor
private3.i
private4.i
private5.i
private6.l
*resource_alloc
byte_order.l
bitmap_unit.l
bitmap_pad.l
bitmap_bit_order.l
nformats.l
*pixmap_format.ScreenFormat
private8.l
release.l
*private9
*private10
qlen.l
last_request_read.i
request.i
*private11
*private12
*private13
*private14
max_request_size.l
*db
*private15
*display_name
default_screen.l
nscreens.l
*screens.Screen
motion_buffer.i
private16.i
min_keycode.l
max_keycode.l
*private17
*private18
private19.l
*xdefaults
EndStructure
; typedef struct {
; XExtData *ext_data; /* hook for extension to hang data */
; struct _XDisplay *display;/* back pointer to display structure */
; Window root; /* Root window id. */
; int width, height; /* width and height of screen */
; int mwidth, mheight; /* width and height of in millimeters */
; int ndepths; /* number of depths possible */
; Depth *depths; /* list of allowable depths on the screen */
; int root_depth; /* bits per pixel */
; Visual *root_visual; /* root visual */
; GC default_gc; /* GC for the root root visual */
; Colormap cmap; /* default color map */
; unsigned long white_pixel;
; unsigned long black_pixel; /* White and Black pixel values */
; int max_maps, min_maps; /* max and min color maps */
; int backing_store; /* Never, WhenMapped, Always */
; Bool save_unders;
; long root_input_mask; /* initial root input mask */
; } Screen;
Structure Screen
*ext_data.XExtData
*display.Display
Window.i
width.l
height.l
mwidth.l
mheight.l
ndepths.l
*depths.Depth
root_depth.l
*root_visual.Visual
*default_gc.GC
Colormap.i
white_pixel.i
black_pixel.i
max_maps.l
min_maps.l
backing_store.l
save_unders.l
root_input_mask.i
EndStructure
; typedef struct {
; unsigned long pixel;
; unsigned short red, green, blue;
; char flags; /* do_red, do_green, do_blue */
; char pad;
; } XColor;
Structure XColor
pixel.i
red.w
green.w
blue.w
flags.a
pad.a
EndStructure
; typedef struct {
; short x1, y1, x2, y2;
; } XSegment;
Structure XSegment
x1.w
y1.w
x2.w
y2.w
EndStructure
; typedef struct {
; short x, y;
; } XPoint;
Structure XPoint
x.w
y.w
EndStructure
; typedef struct {
; short x, y;
; unsigned short width, height;
; } XRectangle;
Structure XRectangle
x.w
y.w
width.w
height.w
EndStructure
; typedef struct {
; short x, y;
; unsigned short width, height;
; short angle1, angle2;
; } XArc;
Structure XArc
x.w
y.w
width.w
height.w
angle.w
angle2.w
EndStructure
; 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; /* On, Off, Default */
; } XKeyboardControl;
Structure XKeyboardControl
key_click_percent.l
bell_percent.l
bell_pitch.l
bell_duration.l
led.l
led_mode.l
key.l
auto_repeat_mode.l
EndStructure
; 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;
Structure XKeyboardState
key_click_percent.l
bell_percent.l
bell_pitch.l
bell_duration.l
led_mask.i
global_auto_repeat.l
auto_repeats.a[32]
EndStructure
; typedef struct {
; Time time;
; short x, y;
; } XTimeCoord;
Structure XTimeCoord
time.i
x.w
y.w
EndStructure
; typedef struct {
; XExtData *ext_data; /* hook for extension to hang data */
; int depth; /* depth of this image format */
; int bits_per_pixel; /* bits/pixel at this depth */
; int scanline_pad; /* scanline must padded to this multiple */
; } ScreenFormat;
Structure ScreenFormat
*ext_data.XExtData
depth.l
bits_per_pixel.l
scanline_pad.l
EndStructure
; typedef struct {
; char *chars; /* pointer to string */
; int nchars; /* number of characters */
; int delta; /* delta between strings */
; Font font; /* font to print it in, None don't change */
; } XTextItem;
Structure XTextItem
*chars
nchars.l
delta.l
font.i
EndStructure
; typedef struct { /* normal 16 bit characters are two bytes */
; unsigned char byte1;
; unsigned char byte2;
; } XChar2b;
Structure XChar2b
byte1.a
byte2.a
EndStructure