2 * \file tpl_drv_terminal.h
\r
3 * \brief Terminal Driver Interface Definitions
\r
5 #ifndef _TPL_TERMINAL_H
\r
6 #define _TPL_TERMINAL_H
\r
8 #include <tpl_drv_common.h>
\r
11 * \enum eTplTerminal_IOCtl
\r
12 * \brief Common Terminal IOCtl Calls
\r
13 * \extends eTplDrv_IOCtl
\r
15 enum eTplTerminal_IOCtl {
\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
22 TERM_IOCTL_MODETYPE = 4,
\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
30 * Set `width` to NULL to just return the current width
\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
40 * Set \a height to NULL to just return the current height
\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
50 * \a info can be NULL
\r
52 TERM_IOCTL_QUERYMODE
\r
55 typedef struct sTerm_IOCtl_Mode tTerm_IOCtl_Mode;
\r
58 * \brief Virtual Terminal Mode
\r
59 * Describes a VTerm mode to the caller of ::TERM_IOCTL_QUERYMODE
\r
61 struct sTerm_IOCtl_Mode
\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
69 unsigned bText: 1; //!< Text Mode marker
\r
75 * \brief Terminal Modes
\r
77 enum eTplTerminal_Modes {
\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
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
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