#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
-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_OPENGL,\r
\r
+ /**\r
+ * \brief Number of terminal modes\r
+ */\r
NUM_TERM_MODES\r
};\r
\r