GLXSELECTEVENT(3GL)GLXSELECTEVENT(3GL)NAMEglXSelectEvent - ask to receive GLX events on a drawable
C SPECIFICATION
void glXSelectEvent ( Display *dpy,
GLXDrawable drawable,
unsigned long event_mask)
PARAMETERS
dpy Specifies the connection to the X server.
drawable Specifies the drawable whose event to receive.
event_mask
Specifies the event mask for the drawable
DESCRIPTIONglXSelectEvent asks the server to receive GLX event on a drwable speci‐
fied in event_mask. Only one GLX event, GLX_BUFFER_CLOBBER_MASK, can
be selected.
The data structure describing a buffer clobber event is:
typdef struct {
int event_type; /* GLX_DAMAGED or GLX_SAVED */
int draw_type; /* GLX_WINDOW or GLX_PBUFFER */
unsigned long serial; /* no. of last request processed by server */
Bool send_event; /* event was generated by a SendEvent request */
Display *display; /* display the event was read from */
GLXDrawable drawable; /* i.d. of Drawable */
unsigned int buffer_mask; /* mask indicating which buffers are affected*/
unsigned int aux_buffer; /* which aux buffers are affected*/
int x, y;
int width, height;
int count; /* if nonzero, at least this many more */
} GLXBufferClobberEvent;
event_type Indicates the event type for a "buffer clobber" event. For
"preserved" pbuffers, an event, with GLX_SAVED, is gener‐
ated whenever the contents of a pbuffer has to be moved to
avoid being damaged. For "unpreserved" pbuffers, an event
with GLX_DAMAGED is generated whenever a portion of the
pbuffer becomes invalid. For GLX windows, "buffer clobber"
events, with GLX_DAMAGED or GLX_SAVED, occur whenever an
ancillary buffer, associated with the window, gets clob‐
bered or moved out of offscreen memory.
draw_type Indicates the drwable tye: GLX_WINDOW or GLX_PBUFFER.
buffer_mask
Indicates which color or ancillary buffers were affected.
The following event is returned:
GLX_FRONT_LEFT_BUFFER_BIT
GLX_FRONT_RIGHT_BUFFER_BIT
GLX_BACK_LEFT_BUFFER_BIT
GLX_BACK_RIGHT_BUFFER_BIT
GLX_AUX_BUFFERS_BIT
GLX_DEPTH_BUFFER_BIT
GLX_STENCIL_BUFFER_BIT
GLX_ACCUM_BUFFER_BIT
GLX_SAMPLE_BUFFERS_BIT
When the GLX_AUX_BUFFERS_BIT is set in buffer_mask, then aux_buffer is
set to indicate which buffer was affected. If more than one aux buffer
was affected, then additional events are generated as part of the same
contiguous event group. Each additional event will have only the
GLX_AUX_BUFFERS_BIT set in buffer_mask, and aux_buffer will be set
appropriately. For non-stereo drawables, pGLX_FRONT_LEFT_BUFFER_BIT and
GLX_FRONT_RIGHT_BUFFER_BIT are used to specify the front and back color
buffers.
NOTESglXSelectEvent is part of the GLX Version 1.3 command set. The function
is only valid if the connection supports GLX Version 1.3 or later.
ERRORS
GLXBadDrawable is generated if drawable is not a valid GLXPbuffer or a
valid window.
SEE ALSO
glXCreatePbuffer, glXGetSelectedEvent
20 May 01 GLXSELECTEVENT(3GL)