#include <tpl_drv_common.h>\r
\r
/**\r
- * \enum eTplTerminal_IOCtl\r
* \brief Common Terminal IOCtl Calls\r
* \extends eTplDrv_IOCtl\r
*/\r
/**\r
* ioctl(..., int *mode)\r
* \brief Get/Set the current video mode type\r
- * see ::eTplTerminal_Modes\r
- * \note If the mode is set the mode is changed at this call\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\r
- * \return Current width\r
+ * \param width Pointer to an integer containing the new width (or NULL)\r
+ * \return Current/new width\r
* \r
- * Set `width` to NULL to just return the current width\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
* \param height Pointer to an integer containing the new height\r
* \return Current height\r
* \r
- * Set \a height to NULL to just return the current height\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 modes\r
- * \param info A pointer to a ::tTerm_IOCtl_Mode with .ID set to the mode index\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
- * \a info can be NULL\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_QUERYMODE\r
+ TERM_IOCTL_GETCURSOR\r
};\r
\r
-typedef struct sTerm_IOCtl_Mode tTerm_IOCtl_Mode;\r
-\r
/**\r
* \brief Virtual Terminal Mode\r
* Describes a VTerm mode to the caller of ::TERM_IOCTL_QUERYMODE\r
*/\r
-struct sTerm_IOCtl_Mode\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
unsigned bText: 1; //!< Text Mode marker\r
unsigned unused: 7;\r
};\r
-};\r
+} tTerm_IOCtl_Mode;\r
\r
/**\r
* \brief Terminal Modes\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_OPENGL,\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