2 * \file api_drv_terminal.h
\r
3 * \brief Terminal Driver Interface Definitions
\r
5 #ifndef _API_DRV_TERMINAL_H
\r
6 #define _API_DRV_TERMINAL_H
\r
8 #include <api_drv_common.h>
\r
11 * \brief Common Terminal IOCtl Calls
\r
12 * \extends eTplDrv_IOCtl
\r
14 enum eTplTerminal_IOCtl {
\r
16 * ioctl(..., int *mode)
\r
17 * \brief Get/Set the current video mode type
\r
18 * \param mode Pointer to an integer with the new mode number (or NULL)
\r
19 * If \a mode is non-NULL the current terminal mode is changed/updated
\r
20 * to the mode indicated by \a *mode
\r
21 * \note See ::eTplTerminal_Modes
\r
22 * \return Current/new terminal mode
\r
24 TERM_IOCTL_MODETYPE = 4,
\r
27 * ioctl(..., int *width)
\r
28 * \brief Get/set the display width
\r
29 * \param width Pointer to an integer containing the new width (or NULL)
\r
30 * \return Current/new width
\r
32 * If \a width is non-NULL the current width is updated (but is not
\r
33 * applied until ::TERM_IOCTL_MODETYPE is called with \a mode non-NULL.
\r
38 * ioctl(..., int *height)
\r
39 * \brief Get/set the display height
\r
40 * \param height Pointer to an integer containing the new height
\r
41 * \return Current height
\r
43 * If \a height is non-NULL the current height is updated (but is not
\r
44 * applied until ::TERM_IOCTL_MODETYPE is called with a non-NULL \a mode.
\r
49 * ioctl(..., tTerm_IOCtl_Mode *info)
\r
50 * \brief Queries the current driver about it's native modes
\r
51 * \param info A pointer to a ::tTerm_IOCtl_Mode with \a ID set to
\r
52 * the mode index (or NULL)
\r
53 * \return Number of modes
\r
55 * If \a info is NULL, the number of avaliable vative display modes
\r
56 * is returned. These display modes will have sequential ID numbers
\r
57 * from zero up to this value.
\r
59 * \note The id field of \a info is not for use with ::TERM_IOCTL_MODETYPE
\r
60 * This field is just for indexing the mode to get its information.
\r
62 TERM_IOCTL_QUERYMODE,
\r
66 * \brief Forces the current terminal to be shown
\r
68 TERM_IOCTL_FORCESHOW,
\r
72 * \brief Returns the current text cursor position
\r
73 * \return Cursor position (as X+Y*Width)
\r
75 TERM_IOCTL_GETCURSOR
\r
79 * \brief Virtual Terminal Mode
\r
80 * Describes a VTerm mode to the caller of ::TERM_IOCTL_QUERYMODE
\r
82 typedef struct sTerm_IOCtl_Mode
\r
84 short ID; //!< Zero Based index of mode
\r
85 short DriverID; //!< Driver's ID number (from ::tVideo_IOCtl_Mode)
\r
86 Uint16 Height; //!< Height
\r
87 Uint16 Width; //!< Width
\r
88 Uint8 Depth; //!< Bits per cell
\r
90 unsigned bText: 1; //!< Text Mode marker
\r
96 * \brief Terminal Modes
\r
98 enum eTplTerminal_Modes {
\r
100 * \brief UTF-8 Text Mode
\r
101 * Any writes to the terminal file are treated as UTF-8 encoded
\r
102 * strings and reads will also return UTF-8 strings.
\r
107 * \brief 32bpp Framebuffer
\r
108 * Writes to the terminal file will write to the framebuffer.
\r
109 * Reads will return UTF-32 characters
\r
114 * \brief 32bpp 2D Accellerated mode
\r
115 * Writes to the terminal file will be read as a command stream
\r
116 * defined in ::eTplTerminal_2D_Commands
\r
121 * \brief OpenGL 2D/3D
\r
122 * Writes to the terminal file will send 3D commands
\r
123 * Reads will return UTF-32 characters
\r
124 * \note May or may not stay in the spec
\r
129 * \brief Number of terminal modes
\r
135 * \brief 2D Command IDs
\r
136 * \todo Complete this structure
\r
138 * Command IDs for when the terminal type is eTplTerminal_Modes.TERM_MODE_2DACCEL
\r
140 enum eTplTerminal_2D_Commands
\r
143 * \brief No Operation - Used for padding
\r
148 * (Uint16 X, Y, W, H, Uint32 Data[])
\r
149 * \brief Blits a bitmap to the display
\r
150 * \param X,Y Coordinates of Top-Left corner
\r
151 * \param W,H Dimensions
\r
152 * \param Data 32-bpp pixel data
\r