+++ /dev/null
-/**\r
- * \file api_drv_terminal.h\r
- * \brief Terminal Driver Interface Definitions\r
-*/\r
-#ifndef _API_DRV_TERMINAL_H\r
-#define _API_DRV_TERMINAL_H\r
-\r
-#include <api_drv_common.h>\r
-\r
-/**\r
- * \brief Common Terminal IOCtl Calls\r
- * \extends eTplDrv_IOCtl\r
- */\r
-enum eTplTerminal_IOCtl {\r
- /**\r
- * ioctl(..., int *mode)\r
- * \brief Get/Set the current video mode type\r
- * \param mode Pointer to an integer with the new mode number (or NULL)\r
- * If \a mode is non-NULL the current terminal mode is changed/updated\r
- * to the mode indicated by \a *mode\r
- * \note See ::eTplTerminal_Modes\r
- * \return Current/new terminal mode\r
- */\r
- TERM_IOCTL_MODETYPE = 4,\r
- \r
- /**\r
- * ioctl(..., int *width)\r
- * \brief Get/set the display width\r
- * \param width Pointer to an integer containing the new width (or NULL)\r
- * \return Current/new width\r
- * \r
- * If \a width is non-NULL the current width is updated (but is not\r
- * applied until ::TERM_IOCTL_MODETYPE is called with \a mode non-NULL.\r
- */\r
- TERM_IOCTL_WIDTH,\r
- \r
- /**\r
- * ioctl(..., int *height)\r
- * \brief Get/set the display height\r
- * \param height Pointer to an integer containing the new height\r
- * \return Current height\r
- * \r
- * If \a height is non-NULL the current height is updated (but is not\r
- * applied until ::TERM_IOCTL_MODETYPE is called with a non-NULL \a mode.\r
- */\r
- TERM_IOCTL_HEIGHT,\r
- \r
- /**\r
- * ioctl(..., tTerm_IOCtl_Mode *info)\r
- * \brief Queries the current driver about it's native modes\r
- * \param info A pointer to a ::tTerm_IOCtl_Mode with \a ID set to\r
- * the mode index (or NULL)\r
- * \return Number of modes\r
- * \r
- * If \a info is NULL, the number of avaliable vative display modes\r
- * is returned. These display modes will have sequential ID numbers\r
- * from zero up to this value.\r
- * \r
- * \note The id field of \a info is not for use with ::TERM_IOCTL_MODETYPE\r
- * This field is just for indexing the mode to get its information.\r
- */\r
- TERM_IOCTL_QUERYMODE,\r
- \r
- /**\r
- * ioctl(...)\r
- * \brief Forces the current terminal to be shown\r
- */\r
- TERM_IOCTL_FORCESHOW,\r
- \r
- /**\r
- * ioctl(...)\r
- * \brief Returns the current text cursor position\r
- * \return Cursor position (as X+Y*Width)\r
- */\r
- TERM_IOCTL_GETCURSOR\r
-};\r
-\r
-/**\r
- * \brief Virtual Terminal Mode\r
- * Describes a VTerm mode to the caller of ::TERM_IOCTL_QUERYMODE\r
- */\r
-typedef struct sTerm_IOCtl_Mode\r
-{\r
- short ID; //!< Zero Based index of mode\r
- short DriverID; //!< Driver's ID number (from ::tVideo_IOCtl_Mode)\r
- Uint16 Height; //!< Height\r
- Uint16 Width; //!< Width\r
- Uint8 Depth; //!< Bits per cell\r
- struct {\r
- unsigned bText: 1; //!< Text Mode marker\r
- unsigned unused: 7;\r
- };\r
-} tTerm_IOCtl_Mode;\r
-\r
-/**\r
- * \brief Terminal Modes\r
- */\r
-enum eTplTerminal_Modes {\r
- /**\r
- * \brief UTF-8 Text Mode\r
- * Any writes to the terminal file are treated as UTF-8 encoded\r
- * strings and reads will also return UTF-8 strings.\r
- */\r
- TERM_MODE_TEXT,\r
- \r
- /**\r
- * \brief 32bpp Framebuffer\r
- * Writes to the terminal file will write to the framebuffer.\r
- * Reads will return UTF-32 characters\r
- */\r
- TERM_MODE_FB,\r
- \r
- /**\r
- * \brief 32bpp 2D Accellerated mode\r
- * Writes to the terminal file will be read as a command stream\r
- * defined in ::eTplTerminal_2D_Commands\r
- */\r
- TERM_MODE_2DACCEL,\r
- \r
- /**\r
- * \brief OpenGL 2D/3D\r
- * Writes to the terminal file will send 3D commands\r
- * Reads will return UTF-32 characters\r
- * \note May or may not stay in the spec\r
- */\r
- TERM_MODE_3D,\r
- \r
- /**\r
- * \brief Number of terminal modes\r
- */\r
- NUM_TERM_MODES\r
-};\r
-\r
-/**\r
- * \brief 2D Command IDs\r
- * \todo Complete this structure\r
- * \r
- * Command IDs for when the terminal type is eTplTerminal_Modes.TERM_MODE_2DACCEL\r
- */\r
-enum eTplTerminal_2D_Commands\r
-{\r
- /**\r
- * \brief No Operation - Used for padding\r
- */\r
- TERM_2DCMD_NOP,\r
- \r
- /**\r
- * (Uint16 X, Y, W, H, Uint32 Data[])\r
- * \brief Blits a bitmap to the display\r
- * \param X,Y Coordinates of Top-Left corner\r
- * \param W,H Dimensions\r
- * \param Data 32-bpp pixel data\r
- */\r
- TERM_2DCMD_PUSH\r
-};\r
-\r
-#endif\r