* but they may choose not to allow direct user access to the framebuffer.\r
* \r
* \section Screen Contents\r
- * Reads and writes to the driver's file while in component colour modes\r
+ * 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
-*/\r
+ * Reading from the screen must either return zero, or read from the\r
+ * framebuffer.\r
+ * \r
+ * \section Mode Support\r
+ * All video drivers must support at least one text mode (Mode #0)\r
+ * For each graphics mode the driver exposes, there must be a corresponding\r
+ * text mode with the same resolution, this mode will be used when the\r
+ * user switches to a text Virtual Terminal while in graphics mode.\r
+ */\r
#ifndef _TPL_VIDEO_H\r
#define _TPL_VIDEO_H\r
\r
*/\r
VIDEO_IOCTL_MODEINFO,\r
\r
+ /**\r
+ * ioctl(..., int *NewFormat)\r
+ * \brief Switches between Text, Framebuffer and 3D modes\r
+ * \param NewFormat Pointer to the new format code (see eTplVideo_BufFormats)\r
+ * \return Original format\r
+ * \r
+ * Enabes and disables the video text mode, changing the behavior of\r
+ * writes to the device file.\r
+ */\r
+ VIDEO_IOCTL_SETBUFFORMAT,\r
+ \r
/**\r
* ioctl(..., tVideo_IOCtl_Pos *pos)\r
* \brief Sets the cursor position\r
Uint8 flags; //!< Mode Flags\r
} tVideo_IOCtl_Mode;\r
\r
-//! \name Video Mode flags\r
-//! \{\r
/**\r
- * \brief Text Mode Flag\r
- * \note A text mode should have the ::sVideo_IOCtl_Mode.bpp set to 12\r
+ * \brief Buffer Format Codes\r
*/\r
-#define VIDEO_FLAG_TEXT 0x1\r
-/**\r
- * \brief Slow (non-accellerated mode)\r
- */\r
-#define VIDEO_FLAG_SLOW 0x2\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 Describes a position in the video framebuffer\r