- 论坛徽章:
- 0
|
一. Display Struture
443
typedef 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
;
二. Window
43
typedef unsigned long
XID
;
44
45
typedef
XID
Window
;
三. XEvent
typedef 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
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/53499/showart_437868.html |
|