GraphicsExpose events indicate that the source area for a XCopyArea() or XCopyPlane() request was not available because it was outside the source window or obscured by a window. NoExpose events indicate that the source region was completely available.
These events are not selected with XSelectInput but are sent if the GC in the XCopyArea or XCopyPlane request had its graphics_exposures flag set to True. If graphics_exposures is True in the GC used for the copy, either one NoExpose event or one or more GraphicsExpose events will be generated for every XCopyArea or XCopyPlane call made.
typedef union _XEvent { ... XNoExposeEvent xnoexpose; XGraphicsExposeEvent xgraphicsexpose; ... } XEvent; |
typedef struct { int type; unsigned long serial; /* # of last request processed by server */ Bool send_event; /* True if this came from SendEvent request */ Display *display; /* Display the event was read from */ Drawable drawable; int x, y; int width, height; int count; /* if nonzero, at least this many more */ int major_code; /* core is X_CopyArea or X_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 SendEvent request */ Display *display; /* Display the event was read from */ Drawable drawable; int major_code; /* core is X_CopyArea or X_CopyPlane */ int minor_code; /* not defined in the core */ } XNoExposeEvent; |
drawable | A window or an off-screen pixmap. This specifies the destination of the graphics request that generated the event. | |
x, y | The coordinates of the upper-left corner of the exposed region relative to the origin of the window. | |
width, height | The width and height in pixels of the exposed region. | |
count | The approximate number of remaining contiguous GraphicsExpose events that were generated as a result of the XCopyArea or XCopyPlane call. | |
major_code | The graphics request used. This may be one of the symbols CopyArea or CopyPlane or a symbol defined by a loaded extension. | |
minor_code | Zero unless the request is part of an extension. |
Expose events and GraphicsExpose events both indicate the region of a window that was actually exposed (x, y, width, and height). Therefore, they can often be handled similarly. The symbols X_CopyPlane and X_CopyArea are defined in <X11/Xproto.h>. These symbols are used to determine whether a GraphicsExpose or NoExpose event occurred because of an XCopyArea call or an XCopyPlane call.