Adding several modules to the Tree, plus some files that escaped earlier
[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  * \enum eTplTerminal_IOCtl\r
12  * \brief Common Terminal IOCtl Calls\r
13  * \extends eTplDrv_IOCtl\r
14  */\r
15 enum eTplTerminal_IOCtl {\r
16         /**\r
17          * ioctl(..., int *mode)\r
18          * \brief Get/Set the current video mode type\r
19          * see ::eTplTerminal_Modes\r
20          * \note If the mode is set the mode is changed at this call\r
21         */\r
22         TERM_IOCTL_MODETYPE = 4,\r
23         \r
24         /**\r
25          * ioctl(..., int *width)\r
26          * \brief Get/set the display width\r
27          * \param width Pointer to an integer containing the new width\r
28          * \return Current width\r
29          * \r
30          * Set `width` to NULL to just return the current width\r
31          */\r
32         TERM_IOCTL_WIDTH,\r
33         \r
34         /**\r
35          * ioctl(..., int *height)\r
36          * \brief Get/set the display height\r
37          * \param height        Pointer to an integer containing the new height\r
38          * \return Current height\r
39          * \r
40          * Set \a height to NULL to just return the current height\r
41          */\r
42         TERM_IOCTL_HEIGHT,\r
43         \r
44         /**\r
45          * ioctl(..., tTerm_IOCtl_Mode *info)\r
46          * \brief Queries the current driver about it's modes\r
47          * \param info  A pointer to a ::tTerm_IOCtl_Mode with .ID set to the mode index\r
48          * \return Number of modes\r
49          * \r
50          * \a info can be NULL\r
51          */\r
52         TERM_IOCTL_QUERYMODE\r
53 };\r
54 \r
55 typedef struct sTerm_IOCtl_Mode tTerm_IOCtl_Mode;\r
56 \r
57 /**\r
58  * \brief Virtual Terminal Mode\r
59  * Describes a VTerm mode to the caller of ::TERM_IOCTL_QUERYMODE\r
60  */\r
61 struct sTerm_IOCtl_Mode\r
62 {\r
63         short   ID;             //!< Zero Based index of mode\r
64         short   DriverID;       //!< Driver's ID number (from ::tVideo_IOCtl_Mode)\r
65         Uint16  Height; //!< Height\r
66         Uint16  Width;  //!< Width\r
67         Uint8   Depth;  //!< Bits per cell\r
68         struct {\r
69                 unsigned bText: 1;      //!< Text Mode marker\r
70                 unsigned unused:        7;\r
71         };\r
72 };\r
73 \r
74 /**\r
75  * \brief Terminal Modes\r
76  */\r
77 enum eTplTerminal_Modes {\r
78         /**\r
79          * \brief UTF-8 Text Mode\r
80          * Any writes to the terminal file are treated as UTF-8 encoded\r
81          * strings and reads will also return UTF-8 strings.\r
82          */\r
83         TERM_MODE_TEXT,\r
84         \r
85         /**\r
86          * \brief 32bpp Framebuffer\r
87          * Writes to the terminal file will write to the framebuffer.\r
88          * Reads will return UTF-32 characters\r
89          */\r
90         TERM_MODE_FB,\r
91         \r
92         /**\r
93          * \brief OpenGL 2D/3D\r
94          * Writes to the terminal file will send 3D commands\r
95          * Reads will return UTF-32 characters\r
96          * \note May or may not stay in the spec\r
97          */\r
98         TERM_MODE_OPENGL,\r
99         \r
100         NUM_TERM_MODES\r
101 };\r
102 \r
103 \r
104 #endif\r

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