#ifndef _DISPLAY_X_H_0749cb8f_ #define _DISPLAY_X_H_0749cb8f_ /* * 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 /* * 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