X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Ftpl_drv_terminal.h;h=ee50392b79620e14d027603407abe6e6bc4421d7;hb=33bcf4b3feb0e5e4548548bf3d2a50c52ffb6115;hp=639d181f96b820145a867acd5d5bb2cfbc20b5cc;hpb=6c5a509b5e14e097ca537c539bc9babe3b8f0c4c;p=tpg%2Facess2.git diff --git a/Kernel/include/tpl_drv_terminal.h b/Kernel/include/tpl_drv_terminal.h index 639d181f..ee50392b 100644 --- a/Kernel/include/tpl_drv_terminal.h +++ b/Kernel/include/tpl_drv_terminal.h @@ -8,7 +8,6 @@ #include /** - * \enum eTplTerminal_IOCtl * \brief Common Terminal IOCtl Calls * \extends eTplDrv_IOCtl */ @@ -16,18 +15,22 @@ enum eTplTerminal_IOCtl { /** * ioctl(..., int *mode) * \brief Get/Set the current video mode type - * see ::eTplTerminal_Modes - * \note If the mode is set the mode is changed at this call + * \param mode Pointer to an integer with the new mode number (or NULL) + * If \a mode is non-NULL the current terminal mode is changed/updated + * to the mode indicated by \a *mode + * \note See ::eTplTerminal_Modes + * \return Current/new terminal mode */ TERM_IOCTL_MODETYPE = 4, /** * ioctl(..., int *width) * \brief Get/set the display width - * \param width Pointer to an integer containing the new width - * \return Current width + * \param width Pointer to an integer containing the new width (or NULL) + * \return Current/new width * - * Set `width` to NULL to just return the current width + * If \a width is non-NULL the current width is updated (but is not + * applied until ::TERM_IOCTL_MODETYPE is called with \a mode non-NULL. */ TERM_IOCTL_WIDTH, @@ -37,28 +40,39 @@ enum eTplTerminal_IOCtl { * \param height Pointer to an integer containing the new height * \return Current height * - * Set \a height to NULL to just return the current height + * If \a height is non-NULL the current height is updated (but is not + * applied until ::TERM_IOCTL_MODETYPE is called with a non-NULL \a mode. */ TERM_IOCTL_HEIGHT, /** * ioctl(..., tTerm_IOCtl_Mode *info) - * \brief Queries the current driver about it's modes - * \param info A pointer to a ::tTerm_IOCtl_Mode with .ID set to the mode index + * \brief Queries the current driver about it's native modes + * \param info A pointer to a ::tTerm_IOCtl_Mode with \a ID set to + * the mode index (or NULL) * \return Number of modes * - * \a info can be NULL + * If \a info is NULL, the number of avaliable vative display modes + * is returned. These display modes will have sequential ID numbers + * from zero up to this value. + * + * \note The id field of \a info is not for use with ::TERM_IOCTL_MODETYPE + * This field is just for indexing the mode to get its information. */ - TERM_IOCTL_QUERYMODE + TERM_IOCTL_QUERYMODE, + + /** + * ioctl(...) + * \brief Forces the current terminal to be shown + */ + TERM_IOCTL_FORCESHOW }; -typedef struct sTerm_IOCtl_Mode tTerm_IOCtl_Mode; - /** * \brief Virtual Terminal Mode * Describes a VTerm mode to the caller of ::TERM_IOCTL_QUERYMODE */ -struct sTerm_IOCtl_Mode +typedef struct sTerm_IOCtl_Mode { short ID; //!< Zero Based index of mode short DriverID; //!< Driver's ID number (from ::tVideo_IOCtl_Mode) @@ -69,7 +83,7 @@ struct sTerm_IOCtl_Mode unsigned bText: 1; //!< Text Mode marker unsigned unused: 7; }; -}; +} tTerm_IOCtl_Mode; /** * \brief Terminal Modes @@ -89,16 +103,48 @@ enum eTplTerminal_Modes { */ TERM_MODE_FB, + /** + * \brief 32bpp 2D Accellerated mode + * Writes to the terminal file will be read as a command stream + * defined in ::eTplTerminal_2D_Commands + */ + TERM_MODE_2DACCEL, + /** * \brief OpenGL 2D/3D * Writes to the terminal file will send 3D commands * Reads will return UTF-32 characters * \note May or may not stay in the spec */ - TERM_MODE_OPENGL, + TERM_MODE_3D, + /** + * \brief Number of terminal modes + */ NUM_TERM_MODES }; +/** + * \brief 2D Command IDs + * \todo Complete this structure + * + * Command IDs for when the terminal type is eTplTerminal_Modes.TERM_MODE_2DACCEL + */ +enum eTplTerminal_2D_Commands +{ + /** + * \brief No Operation - Used for padding + */ + TERM_2DCMD_NOP, + + /** + * (Uint16 X, Y, W, H, Uint32 Data[]) + * \brief Blits a bitmap to the display + * \param X,Y Coordinates of Top-Left corner + * \param W,H Dimensions + * \param Data 32-bpp pixel data + */ + TERM_2DCMD_PUSH +}; #endif