#ifndef _DISPLAY_X_H_de87cc38_ #define _DISPLAY_X_H_de87cc38_ /* * Flags to setup_X. */ /* * Slower, but makes fewer assumptions about the underlying X * implementation. * * No additional arguments. */ #define DXF_SLOW_AND_SAFE 0x00000001 /* * Support for overlaying other data onto an image before displaying. * * Two additional arguments: * void (*callback)(void *, XImage *) * void *cookie * * The callback is called with cookie as its first arg and the XImage * that is about to be XPutImage()d as its second arg. It is expected * to make any appropriate changes. */ #define DXF_OVERLAY 0x00000002 /* * Support for rotation (by multiples of 90°). * * No additional arguments in any case. * * Conceptually, rotation is applied very late. In particular, the * size passed to setup_X() is the unrotated size, and when using a * video format such as YCbCr422 that is asymmetric, the input is laid * out exactly the same in the rotated and unrotated cases. */ #define DXF_ROT_NONE 0x00000000 #define DXF_ROT_CW 0x00000004 #define DXF_ROT_180 0x00000008 #define DXF_ROT_CCW 0x0000000c #define DXF_ROT_MASK 0x0000000c /* * Formats. */ typedef enum { DX_FMT_RGB888, DX_FMT_YCbCr422, } DX_FMT; /* * Initialize the X display module. * * The unvarying arguments: * * unsigned int xsize * unsigned int ysize * DX_FMT fmt * unsigned int flags * * xsize and ysize are of course the size of the image; fmt specifies * the image format; flags is a bitmask of zero or more of the XDF_* * flags, from above. Following this are zero or more arguments as * called for by those flags. If multiple flags call for arguments, * they appear in the arglist in order of increasing flag bit value. */ extern void setup_X(unsigned int, unsigned int, DX_FMT, unsigned int, ...); /* * Display a frame. The data block is assumed to be 4:2:2 YCbCr data, * ordered as pairs of pixels stored Y'-Cb-Y'-Cr. */ extern void display_frame(const unsigned char *); #endif