⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xlib.h

📁 是初学者升入中级必看的书籍
💻 H
📖 第 1 页 / 共 3 页
字号:
/* Data structure for XChangeKeyboardControl */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;/* Data structure for XGetKeyboardControl */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;/* Data structure for XGetMotionEvents.  */typedef struct {        Time time;	short x, y;} XTimeCoord;/* Data structure for X{Set,Get}ModifierMapping */typedef struct { 	int max_keypermod;	/* The server's max # of keys per modifier */ 	KeyCode *modifiermap;	/* An 8 by max_keypermod array of modifiers */} XModifierKeymap;/* * Display datatype maintaining display specific data. * The contents of this structure are implementation dependent. * A Display should be treated as opaque by application code. */typedef struct _XDisplay {	XExtData *ext_data;	/* hook for extension to hang data */	struct _XFreeFuncs *free_funcs; /* internal free functions */	int fd;			/* Network socket. */	int conn_checker;         /* ugly thing used by _XEventsQueued */	int proto_major_version;/* maj. version of server's X protocol */	int proto_minor_version;/* minor version of servers X protocol */	char *vendor;		/* vendor of the server hardware */        XID resource_base;	/* resource ID base */	XID resource_mask;	/* resource ID mask bits */	XID resource_id;	/* allocator current ID */	int resource_shift;	/* allocator shift to correct bits */	XID (*resource_alloc)(); /* allocator function */	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 vnumber;		/* Xlib's X protocol version number. */	int release;		/* release of the server */	struct _XSQEvent *head, *tail;	/* Input event queue. */	int qlen;		/* Length of input event queue */	unsigned long request;	/* sequence number of last request. */	char *last_req;		/* beginning of last request, or dummy */	char *buffer;		/* Output buffer starting address. */	char *bufptr;		/* Output buffer index pointer. */	char *bufmax;		/* Output buffer maximum+1 address. */	unsigned max_request_size; /* maximum number 32 bit words in request*/	struct _XrmHashBucketRec *db;	int (*synchandler)();	/* Synchronization handler */	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 flags;	/* internal connection flags */	int min_keycode;	/* minimum defined keycode */	int max_keycode;	/* maximum defined keycode */	KeySym *keysyms;	/* This server's keysyms */	XModifierKeymap *modifiermap;	/* This server's modifier keymap */	int keysyms_per_keycode;/* number of rows */	char *xdefaults;	/* contents of defaults from server */	char *scratch_buffer;	/* place to hang scratch buffer */	unsigned long scratch_length;	/* length of scratch buffer */	int ext_number;		/* extension number on this display */	struct _XExten *ext_procs; /* extensions initialized on this display */	/*	 * the following can be fixed size, as the protocol defines how	 * much address space is available. 	 * While this could be done using the extension vector, there	 * may be MANY events processed, so a search through the extension	 * list to find the right procedure for each event might be	 * expensive if many extensions are being used.	 */	Bool (*event_vec[128])();  /* vector for wire to event */	Status (*wire_vec[128])(); /* vector for event to wire */	KeySym lock_meaning;	   /* for XLookupString */	struct _XLockInfo *lock;   /* multi-thread state, display lock */	struct _XInternalAsync *async_handlers; /* for internal async */	unsigned long bigreq_size; /* max size of big requests */	struct _XLockPtrs *lock_fns; /* pointers to threads functions */	/* things above this line should not move, for binary compatibility */	struct _XKeytrans *key_bindings; /* for XLookupString */	Font cursor_font;	   /* for XCreateFontCursor */	struct _XDisplayAtoms *atoms; /* for XInternAtom */	unsigned int mode_switch;  /* keyboard group modifiers */	struct _XContextDB *context_db; /* context database */	Bool (**error_vec)();      /* vector for wire to error */	/*	 * Xcms information	 */	struct {	   XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */	   XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */	   XPointer perVisualIntensityMaps;				  /* linked list of XcmsIntensityMap */	} cms;	struct _XIMFilter *im_filters;	struct _XSQEvent *qfree; /* unallocated event queue elements */	unsigned long next_event_serial_num; /* inserted into next queue elt */	int (*savedsynchandler)(); /* user synchandler when Xlib usurps */} Display;#if NeedFunctionPrototypes	/* prototypes require event type definitions */#undef _XEVENT_#endif#ifndef _XEVENT_#define XMaxTransChars 4/* * Definitions of specific events. */typedef struct {	int type;		/* of event */	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window window;	        /* "event" window it is reported relative to */	Window root;	        /* root window that the event occured on */	Window subwindow;	/* child window */	Time time;		/* milliseconds */	int x, y;		/* pointer x, y coordinates in event window */	int x_root, y_root;	/* coordinates relative to root */	unsigned int state;	/* key or button mask */	unsigned int keycode;	/* detail */	Bool same_screen;	/* same screen flag */        char trans_chars[XMaxTransChars];				/* translated characters */	int nbytes;} XKeyEvent;typedef XKeyEvent XKeyPressedEvent;typedef XKeyEvent XKeyReleasedEvent;typedef struct {	int type;		/* of event */	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window window;	        /* "event" window it is reported relative to */	Window root;	        /* root window that the event occured on */	Window subwindow;	/* child window */	Time time;		/* milliseconds */	int x, y;		/* pointer x, y coordinates in event window */	int x_root, y_root;	/* coordinates relative to root */	unsigned int state;	/* key or button mask */	unsigned int button;	/* detail */	Bool same_screen;	/* same screen flag */} XButtonEvent;typedef XButtonEvent XButtonPressedEvent;typedef XButtonEvent XButtonReleasedEvent;typedef struct {	int type;		/* of event */	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window window;	        /* "event" window reported relative to */	Window root;	        /* root window that the event occured on */	Window subwindow;	/* child window */	Time time;		/* milliseconds */	int x, y;		/* pointer x, y coordinates in event window */	int x_root, y_root;	/* coordinates relative to root */	unsigned int state;	/* key or button mask */	char is_hint;		/* detail */	Bool same_screen;	/* same screen flag */} XMotionEvent;typedef XMotionEvent XPointerMovedEvent;typedef struct {	int type;		/* of event */	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window window;	        /* "event" window reported relative to */	Window root;	        /* root window that the event occured on */	Window subwindow;	/* child window */	Time time;		/* milliseconds */	int x, y;		/* pointer x, y coordinates in event window */	int x_root, y_root;	/* coordinates relative to root */	int mode;		/* NotifyNormal, NotifyGrab, NotifyUngrab */	int detail;	/*	 * NotifyAncestor, NotifyVirtual, NotifyInferior, 	 * NotifyNonlinear,NotifyNonlinearVirtual	 */	Bool same_screen;	/* same screen flag */	Bool focus;		/* boolean focus */	unsigned int state;	/* key or button mask */} XCrossingEvent;typedef XCrossingEvent XEnterWindowEvent;typedef XCrossingEvent XLeaveWindowEvent;typedef struct {	int type;		/* FocusIn or FocusOut */	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window window;		/* window of event */	int mode;		/* NotifyNormal, NotifyGrab, NotifyUngrab */	int detail;	/*	 * NotifyAncestor, NotifyVirtual, NotifyInferior, 	 * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,	 * NotifyPointerRoot, NotifyDetailNone 	 */} XFocusChangeEvent;typedef XFocusChangeEvent XFocusInEvent;typedef XFocusChangeEvent XFocusOutEvent;/* generated on EnterWindow and FocusIn  when KeyMapState selected */typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window window;	char key_vector[32];} XKeymapEvent;	typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window window;	int x, y;	int width, height;	int count;		/* if non-zero, at least this many more */} XExposeEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Drawable drawable;	int x, y;	int width, height;	int count;		/* if non-zero, at least this many more */	int major_code;		/* core is CopyArea or CopyPlane */	int minor_code;		/* not defined in the core */} XGraphicsExposeEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Drawable drawable;	int major_code;		/* core is CopyArea or CopyPlane */	int minor_code;		/* not defined in the core */} XNoExposeEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window window;	int state;		/* Visibility state */} XVisibilityEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window parent;		/* parent of the window */	Window window;		/* window id of window created */	int x, y;		/* window location */	int width, height;	/* size of window */	int border_width;	/* border width */	Bool override_redirect;	/* creation should be overridden */} XCreateWindowEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window event;	Window window;} XDestroyWindowEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window event;	Window window;	Bool from_configure;} XUnmapEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window event;	Window window;	Bool override_redirect;	/* boolean, is override set... */} XMapEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window parent;	Window window;} XMapRequestEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window event;	Window window;	Window parent;	int x, y;	Bool override_redirect;} XReparentEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	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;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window event;	Window window;	int x, y;} XGravityEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window window;	int width, height;} XResizeRequestEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window parent;	Window window;	int x, y;	int width, height;	int border_width;	Window above;	int detail;		/* Above, Below, TopIf, BottomIf, Opposite */	unsigned long value_mask;} XConfigureRequestEvent;typedef struct {	int type;	unsigned long serial;	/* # of last request processed by server */	Bool send_event;	/* true if this came from a SendEvent request */	Display *display;	/* Display the event was read from */	Window event;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -