\&
.sp 1
.ce 3
\s+1\fBSection 2\fP\s-1

\s+1\fBData Structures\fP\s-1
.sp 2
.nr H1 8
.nr H2 0
.nr H3 0
.nr H4 0
.nr H5 0
.na
.LP
.XS
Section 2: Data Structures
.XE
.LP
These data structures are used by routines in VEXlib:
.sp
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef XID VideoIn;
typedef XID VideoOut;
typedef XID VideoDevice;
typedef XID VideoIO;
typedef XID VideoID;
typedef XID VideoReference;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	long	numerator;
	long	denominator;
} XVEXFraction;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	long	num_base;
	long	num_increment;
	long	num_limit;
	int	num_type;	/* VEXGeometricRange or VEXLinearRange */
	long	denom_base;
	long	denom_increment;
	long	denom_limit;
	int	denom_type;	/* VEXGeometricRange or VEXLinearRange */
} XVEXFractionRange;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	Atom	name;	/* Control name */
	int	setting_format;	/* 8, 16, or 32 */
	int	description_format;	/* 8, 16, or 32 */
	unsigned long	setting_length;		/* setting length (bytes) */
	unsigned long	description_length;	/* description length (bytes) */
	union {	/* description data */
	    char	*p8list;
	    short	*p16list;
	    long	*p32list;
	} value
} XVEXControl;
.bp
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	Atom	name;	/* Control name */
	VideoID	id;
	int	format;	/* 8, 16, or 32 */
	unsigned long	length;		/* setting length (bytes) */
	union {	/* setting  data */
	    char	*p8list;
	    short	*p16list;
	    long	*p32list;
	} value
} XVEXSetting;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	XRectangle	base;
	XRectangle	limit;
	int	x_inc;
	int	y_inc;
	int	width_inc;
	int	height_inc;
	int	type;	/* VEXGeometricRange or VEXLinearRange */
} XVEXRectangleRange;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	XVEXFraction	frame_rate;	/* max nominal rate (frames/sec) */
	XVEXRectangleRange	src;	/* set of possible source rectangles */
	XVEXRectangleRange	dest;	/* set of possible dest rectangles */
	XVEXFractionRange	x_scale;	/* set of dst/src width ratios */
	XVEXFractionRange	y_scale;	/* set of dst/src height ratios */
	Bool		identity_aspect;	/* set of dst/src height ratios */
} XVEXPlacement;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	XVEXFraction	frame_rate;	/* frames/sec in signal format */
	XVEXFraction	field_rate;	/* fields/sec in signal format */
	int	width;	/* signal width (in pixels) */
	int	height;	/* signal height (in pixels) */
	int	concurrent_use;	/* max simultaneous use */
	int	nplacement;	/* number of placements */
	XVEXPlacement	*placement;	/* placement list */
} XVEXGeometry;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	Window	window;	/* identifies client requesting ownership */
	VideoID	vid;	/* resource to be owned */
} XVEXOwner;
.bp
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	Bool	composite;	/* True if RenderVideo will modify pixels or
				 * if CaptureGraphics will blend video and
				 *  graphics */
	Bool	opaque;		/* True if pixels cannot be interpreted
				 * by a Core type */
	VisualID	visualid;	/* video window visual ID */
} XVEXWindowModel;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	int	depth;	/* pixmap depth */
	VisualID	visualid;	/* visual ID to use for a colormap in
					 * CaptureGraphics */
	unsigned long	red_mask;
	unsigned long	green_mask;
	unsigned long	blue_mask;
} XVEXPixmapModel;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	int	nwindow_models;
	XVEXWindowModel	*window_models;
	int	npixmap_models;
	XVEXPixmapModel	*pixmap_models;
} XVEXModelInfo;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	VideoReference	id;	/* VideoIn reference ID */
	int	ndevice_controls;
	XVEXControl	*device_controls;
	XVEXGeometry	geometry;
	XVEXModelInfo	model_info;
	XRectangle	clip_size;
} XVEXVin;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	VideoReference	id;	/* VideoOut reference ID */
	int	ndevice_controls;
	XVEXControl	*device_controls;
	XVEXGeometry	geometry;
	XVEXModelInfo	model_info;
} XVEXVout;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	VideoDevice	id;	/* VideoDevice id */
	int	ndevice_controls;
	XVEXControl	*device_controls;
} XVEXVdev;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	VideoID	src;
	VideoID	dst;
	long	matrix1;
	long	matrix2;
} XVEXTransition;
.De
.bp
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	int nrow;		/* number of Rows in connection matrix */
	int ncol;		/* number of Columns in connection matrix */
	XID *row;		/* ID's labelling the rows of the matrix */
	XID *col;		/* ID's labelling the columns of the matrix */
} XVEXConnectLabel;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	unsigned char row;	/* connectivity for devices or videoIns in the
				 * row */
	unsigned char col;	/* connectivity for devices or videoOuts in the
				 * col */
} XVEXConnectCell;
.De
.Ds 0
.TA .5i 2i 4i
.ta .5i 2i 4i
typedef struct {
	XVEXConnectCell	**matrix	/* Matrix representing a possible set
					 * of connections among video inputs, 
					 * outputs and devices */
} XVEXConnectMatrix;
.De
.bp
