Fixed a bug in the heap manager where if an exact match of the block is found, garbag...
[tpg/acess2.git] / Kernel / include / tpl_drv_video.h
index bf3d286..ebbe98f 100644 (file)
  * 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
@@ -59,6 +67,17 @@ enum eTplVideo_IOCtl {
         */\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
@@ -101,18 +120,15 @@ typedef struct sVideo_IOCtl_Mode
        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
- */\r
-#define VIDEO_FLAG_TEXT        0x1\r
 /**\r
- * \brief Slow (non-accellerated mode)\r
+ * \brief Buffer Format Codes\r
  */\r
-#define VIDEO_FLAG_SLOW        0x2\r
-//! \}\r
+enum eTplVideo_BufFormats\r
+{\r
+       VIDEO_BUFFMT_TEXT,\r
+       VIDEO_BUFFMT_FRAMEBUFFER,\r
+       VIDEO_BUFFMT_3DSTREAM\r
+};\r
 \r
 /**\r
  * \brief Describes a position in the video framebuffer\r

UCC git Repository :: git.ucc.asn.au