doxygen fixes
[tpg/acess2.git] / Kernel / include / tpl_drv_terminal.h
1 /**\r
2  * \file tpl_drv_terminal.h\r
3  * \brief Terminal Driver Interface Definitions\r
4 */\r
5 #ifndef _TPL_TERMINAL_H\r
6 #define _TPL_TERMINAL_H\r
7 \r
8 #include <tpl_drv_common.h>\r
9 \r
10 /**\r
11  * \brief Common Terminal IOCtl Calls\r
12  * \extends eTplDrv_IOCtl\r
13  */\r
14 enum eTplTerminal_IOCtl {\r
15         /**\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
23         */\r
24         TERM_IOCTL_MODETYPE = 4,\r
25         \r
26         /**\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
31          * \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
34          */\r
35         TERM_IOCTL_WIDTH,\r
36         \r
37         /**\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
42          * \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
45          */\r
46         TERM_IOCTL_HEIGHT,\r
47         \r
48         /**\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
54          * \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
58          * \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
61          */\r
62         TERM_IOCTL_QUERYMODE,\r
63         \r
64         /**\r
65          * ioctl(...)\r
66          * \brief Forces the current terminal to be shown\r
67          */\r
68         TERM_IOCTL_FORCESHOW\r
69 };\r
70 \r
71 /**\r
72  * \brief Virtual Terminal Mode\r
73  * Describes a VTerm mode to the caller of ::TERM_IOCTL_QUERYMODE\r
74  */\r
75 typedef struct sTerm_IOCtl_Mode\r
76 {\r
77         short   ID;             //!< Zero Based index of mode\r
78         short   DriverID;       //!< Driver's ID number (from ::tVideo_IOCtl_Mode)\r
79         Uint16  Height; //!< Height\r
80         Uint16  Width;  //!< Width\r
81         Uint8   Depth;  //!< Bits per cell\r
82         struct {\r
83                 unsigned bText: 1;      //!< Text Mode marker\r
84                 unsigned unused:        7;\r
85         };\r
86 }       tTerm_IOCtl_Mode;\r
87 \r
88 /**\r
89  * \brief Terminal Modes\r
90  */\r
91 enum eTplTerminal_Modes {\r
92         /**\r
93          * \brief UTF-8 Text Mode\r
94          * Any writes to the terminal file are treated as UTF-8 encoded\r
95          * strings and reads will also return UTF-8 strings.\r
96          */\r
97         TERM_MODE_TEXT,\r
98         \r
99         /**\r
100          * \brief 32bpp Framebuffer\r
101          * Writes to the terminal file will write to the framebuffer.\r
102          * Reads will return UTF-32 characters\r
103          */\r
104         TERM_MODE_FB,\r
105         \r
106         /**\r
107          * \brief 32bpp 2D Accellerated mode\r
108          * Writes to the terminal file will be read as a command stream\r
109          * defined in ::eTplTerminal_2D_Commands\r
110          */\r
111         TERM_MODE_2DACCEL,\r
112         \r
113         /**\r
114          * \brief OpenGL 2D/3D\r
115          * Writes to the terminal file will send 3D commands\r
116          * Reads will return UTF-32 characters\r
117          * \note May or may not stay in the spec\r
118          */\r
119         TERM_MODE_3D,\r
120         \r
121         /**\r
122          * \brief Number of terminal modes\r
123          */\r
124         NUM_TERM_MODES\r
125 };\r
126 \r
127 /**\r
128  * \brief 2D Command IDs\r
129  * \todo Complete this structure\r
130  * \r
131  * Command IDs for when the terminal type is eTplTerminal_Modes.TERM_MODE_2DACCEL\r
132  */\r
133 enum eTplTerminal_2D_Commands\r
134 {\r
135         /**\r
136          * \brief No Operation - Used for padding\r
137          */\r
138         TERM_2DCMD_NOP,\r
139         \r
140         /**\r
141          * (Uint16 X, Y, W, H, Uint32 Data[])\r
142          * \brief Blits a bitmap to the display\r
143          * \param X,Y   Coordinates of Top-Left corner\r
144          * \param W,H   Dimensions\r
145          * \param Data  32-bpp pixel data\r
146          */\r
147         TERM_2DCMD_PUSH\r
148 };\r
149 \r
150 #endif\r

UCC git Repository :: git.ucc.asn.au