* Writes to the driver's file while in component colour modes\r
* must correspond to a change of the contents of the screen. The framebuffer\r
* must start at offset 0 in the file.\r
- * In pallete colour modes the LFB is preceded by a 1024 byte pallete (allowing\r
- * room for 256 entries of 32-bits each)\r
* Reading from the screen must either return zero, or read from the\r
* framebuffer.\r
* \r
*/\r
enum eTplVideo_BufFormats\r
{\r
+ /**\r
+ * \brief Text Mode\r
+ * \r
+ * The device file presents itself as an array of ::tVT_Char\r
+ * each describing a character cell on the screen.\r
+ * These cells are each \a giVT_CharWidth pixels wide and\r
+ * \a giVT_CharHeight high.\r
+ */\r
VIDEO_BUFFMT_TEXT,\r
+ /**\r
+ * \brief Framebuffer Mode\r
+ * \r
+ * The device file presents as an array of 32-bpp pixels describing\r
+ * the entire screen. The format of a single pixel is in xRGB format\r
+ * (top 8 bits ignored, next 8 bits red, next 8 bits green and\r
+ * the bottom 8 bits blue)\r
+ */\r
VIDEO_BUFFMT_FRAMEBUFFER,\r
+ /**\r
+ * \brief 2D Accelerated Mode\r
+ * \r
+ * The device file acts as a character device, accepting a stream of\r
+ * commands described in eTplVideo_2DCommands when written to.\r
+ */\r
+ VIDEO_BUFFMT_2DSTREAM,\r
+ /**\r
+ * \brief 3D Accelerated Mode\r
+ * \r
+ * The device file acts as a character device, accepting a stream of\r
+ * commands described in eTplVideo_3DCommands when written to.\r
+ */\r
VIDEO_BUFFMT_3DSTREAM\r
};\r
\r
+/**\r
+ * \brief 2D Accellerated Video Commands\r
+ * \r
+ * Commands passed in the command stream for ::VIDEO_BUFFMT_2DSTREAM\r
+ */\r
+enum eTplVideo_2DCommands\r
+{\r
+ /**\r
+ * \brief No Operation\r
+ */\r
+ VIDEO_2DOP_NOP,\r
+ /**\r
+ * \brief Fill a region\r
+ * \param X Uint16 - Leftmost pixels of the region\r
+ * \param Y Uint16 - Topmost pixels of the region\r
+ * \param W Uint16 - Width of the region\r
+ * \param H Uint16 - Height of the region\r
+ * \param Colour Uint32 - Value to fill with\r
+ */\r
+ VIDEO_2DOP_FILL,\r
+ /**\r
+ * \brief Copy a region from one part of the framebuffer to another\r
+ * \param DestX Uint16 - Leftmost pixels of the destination\r
+ * \param DestY Uint16 - Topmost pixels of the destination\r
+ * \param SrcX Uint16 - Leftmost pixels of the source\r
+ * \param SrcY Uint16 - Topmost pixels of the source\r
+ * \param Width Uint16 - Width of the region\r
+ * \param Height Uint16 - Height of the region\r
+ */\r
+ VIDEO_2DOP_BLIT,\r
+\r
+\r
+ /**\r
+ * \brief Copy a region from video memory to the framebuffer\r
+ */\r
+ VIDEO_2DOP_BLITBUF,\r
+\r
+ /**\r
+ * \brief Copy and scale a region from video memory to the framebuffer\r
+ */\r
+ VIDEO_2DOP_BLITSCALEBUF,\r
+\r
+ NUM_VIDEO_2DOPS\r
+};\r
+\r
/**\r
* \brief Describes a position in the video framebuffer\r
*/\r
*/\r
extern Uint32 VT_Colour12to24(Uint16 Col12);\r
\r
+/**\r
+ * \brief Handlers for eTplVideo_2DCommands\r
+ */\r
+typedef struct sDrvUtil_Video_2DHandlers\r
+{\r
+ /**\r
+ * \brief No Operation, Ignored\r
+ * \see VIDEO_2DOP_NOP\r
+ */\r
+ void *Nop;\r
+ /**\r
+ * \brief Fill a buffer region\r
+ * \param X Lefthand edge\r
+ * \param Y Top edge\r
+ * \param W Width\r
+ * \param H Height\r
+ * \param Colour Colour to fill with\r
+ * \see VIDEO_2DOP_FILL\r
+ */\r
+ void (*Fill)(void *Ent, Uint16 X, Uint16 Y, Uint16 W, Uint16 H, Uint32 Colour);\r
+ /**\r
+ * \brief Fill a buffer region\r
+ * \param DestX Lefthand edge of destination\r
+ * \param DestY Top edge of destination\r
+ * \param SrcX Lefthand edge of source\r
+ * \param SrcY Top edge of source\r
+ * \param W Width\r
+ * \param H Height\r
+ * \see VIDEO_2DOP_BLIT\r
+ */\r
+ void (*Blit)(void *Ent, Uint16 DestX, Uint16 DestY, Uint16 SrcX, Uint16 SrcY, Uint16 W, Uint16 H);\r
+} tDrvUtil_Video_2DHandlers;\r
+\r
+/**\r
+ * \brief Handle a 2D operation stream for a driver\r
+ * \param Ent Value to pass to handlers\r
+ * \param Buffer Stream buffer\r
+ * \param Length Length of stream\r
+ * \param Handlers Handlers to use for the stream\r
+ * \param SizeofHandlers Size of \a tDrvUtil_Video_2DHandlers according\r
+ * to the driver. Used as version control and error avoidence.\r
+ */\r
+extern Uint64 DrvUtil_Video_2DStream(void *Ent, void *Buffer, int Length,\r
+ tDrvUtil_Video_2DHandlers *Handlers, int SizeofHandlers);\r
+\r
#endif\r