.\" $Header: events,v 1.5 90/04/13 16:13:28 toddb Exp $
\&
.sp 1
.ce 3
\s+1\fBSection 5\fP\s-1

\s+1\fBEvents\fP\s-1
.sp 2
.nr H1 8
.nr H2 0
.nr H3 0
.nr H4 0
.nr H5 0
.na
.LP
.XS
Section 5: Events
.XE
.LP
For each event type,
a corresponding structure is declared in
.Pn <X11/VEX/VEXlib.h >.
In each event, the type member is set to the VEX event base plus the
event type constant name that uniquely identifies it.
For example, when the X server reports a
.PN Control
event to a client application, the client receives a
.PN XVEXControlEvent
structure with the type member set to
.PN VEX
.PN event
.PN base
+
.PN  Control .
The event base is obtained by calling
.PN XQueryExtension .
The display, send_event, and serial members are set as defined in Xlib.
.LP
The event constant names are:
.PN VEXControl ,
.PN VEXViolation ,
.PN VEXSync ,
.PN VEXOverride ,
.PN VEXChange ,
.PN VEXConnectivity ,
.PN VEXRequest.
.LP
There is one new Error code defined by VEX, 
.PN BadVideo .
The error code
of the XErrorEvent will have a value of 
.PN VEX
.PN error
.PN base
+
.PN  BadVideo .
The error base is obtained by calling
.PN XQueryExtension .
.SH 2 XVEXControlEvent
.IN "XVEXControlEvent" "" "@DEF@"
.Ds 0
.TA .5i 3i
.ta .5i 3i
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;		/* unused */
	VideoID vid;		/* from Setting given to ChangeVideoControls */
	Atom name;		/* from Setting given to ChangeVideoControls */
	Time time;		/* current server time */
	int state;		/* VEXControlSuccess, VEXControlFail, 
				 * or VEXControlDenied */
} XVEXControlEvent;
.DE
.SH 2 XVEXViolationEvent
.IN "XVEXViolationEvent" "" "@DEF@"
.Ds 0
.TA .5i 3i
.ta .5i 3i
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;		/* window on which video constraints were violated */
	VideoIO vid;		/* VideoIO whose video constraints were violated */
	Time time;		/* current server time */
	unsigned long action_mask;	/* VEXScale, VEXPlacement, VEXClip, VEXOverlap */
	int state;		/* VEXViolationSuccess, 
				 * VEXViolationFail, or
				 * VEXViolationSubset */
} XVEXViolationEvent;
.bp
.DE
.SH 2 XVEXSyncEvent
.IN "XVEXSyncEvent" "" "@DEF@"
.Ds 0
.TA .5i 3i
.ta .5i 3i
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 */
	Drawable drawable;	/* drawable on which Render/Capture was requested */
	VideoIO vid;		/* vid on which Render/Capture was requested */
	Time time;		/* current server time */
	int state;		/* VEXSyncAcquired or VEXSyncLost */
} XVEXSyncEvent;
.DE
.SH 2 XVEXOverrideEvent
.IN "XVEXOverrideEvent" "" "@DEF@"
.Ds 0
.TA .5i 3i
.ta .5i 3i
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 */
	Drawable drawable;	/* drawable on which Render/Capture was requested */
	VideoIO vid;		/* vid on which Render/Capture was requested */
	Time time;		/* current server time */
} XVEXOverrideEvent;
.DE
.SH 2 XVEXChangeEvent
.IN "XVEXChangeEvent" "" "@DEF@"
.Ds 0
.TA .5i 3i
.ta .5i 3i
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;		/* unused */
	int screen;
	VideoDevice vdev;	/* vdev which changed state */
	Time time;		/* current server time */
	int state;		/* VEXOnline or VEXOffline */
} XVEXChangeEvent;
.DE
.SH 2 XVEXConnectivityEvent
.IN "XVEXConnectivityEvent" "" "@DEF@"
.Ds 0
.TA .5i 3i
.ta .5i 3i
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;		/* unused */
	int screen;
	unsigned long new_state;	/* index into list of adjacency Matrices */
	Time time;		/* of last successful ChangeVideoConnectivity */
} XVEXConnectivityEvent;
.bp
.DE
.SH 2 XVEXRequestEvent
.IN "XVEXRequestEvent" "" "@DEF@"
.Ds 0
.TA .5i 3i
.ta .5i 3i
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;		/* unused */
	XID src;
	XID dst;
	XID cmap;
	int src_x;
	int src_y;
	int dst_x;
	int dst_y;
	int src_width;
	int src_height;
	int dst_width;
	int dst_height;
	Bool redirect;
	Bool full_motion;
	int request;	/* VEXRender or VEXCapture */
	int priority;
	int subwindow_mode;
	Time	time;	/* current server time */
} XVEXRequestEvent;
.DE
.bp
