misc - Cleaning up warnings that occur on travis
[tpg/acess2.git] / KernelLand / Kernel / include / api_drv_keyboard.h
1 /**\r
2  * \file api_drv_keyboard.h\r
3  * \brief Keyboard Driver Interface Definitions\r
4  * \author John Hodge (thePowersGang)\r
5  * \r
6  * \section dirs VFS Layout\r
7  * Keyboard drivers consist of only a single node, which is a normal file\r
8  * node with a size of zero. All reads and writes to this node are ignored\r
9  * (tVFS_Node.Read and tVFS_Node.Write are NULL)\r
10  */\r
11 #ifndef _API_DRV_KEYBOARD_H\r
12 #define _API_DRV_KEYBOARD_H\r
13 \r
14 #include <api_drv_common.h>\r
15 \r
16 /**\r
17  * \enum eTplKeyboard_IOCtl\r
18  * \brief Common Keyboard IOCtl Calls\r
19  * \extends eTplDrv_IOCtl\r
20  */\r
21 enum eTplKeyboard_IOCtl {\r
22         /**\r
23          * ioctl(..., int *Rate)\r
24          * \brief Get/Set Repeat Rate\r
25          * \param Rate  New repeat rate (pointer)\r
26          * \return Current/New Repeat rate\r
27          * \r
28          * Gets/Set the repeat rate (actually the time in miliseconds between\r
29          * repeats) of a held down key.\r
30          * If the rate is set to zero, repeating will be disabled.\r
31          */\r
32         KB_IOCTL_REPEATRATE = 4,\r
33         \r
34         /**\r
35          * ioctl(..., int *Delay)\r
36          * \brief Get/Set Repeat Delay\r
37          * \param Delay New repeat delay (pointer)\r
38          * \return Current/New repeat delay\r
39          * \r
40          * Gets/Set the time in miliseconds before a key starts repeating\r
41          * after a key is pressed.\r
42          * Setting the delay to a negative number will cause the function to\r
43          * return -1\r
44          */\r
45         KB_IOCTL_REPEATDELAY,\r
46         \r
47         \r
48         /**\r
49          * ioctl(..., tKeybardCallback *Callback)\r
50          * \brief Sets the callback\r
51          * \note Can be called from kernel mode only\r
52          * \r
53          * Sets the function to be called when a key event occurs (press, release\r
54          * or repeat). This function pointer must be in kernel mode (although,\r
55          * kernel->user or kernel->ring3driver abstraction functions can be used)\r
56          *\r
57          * This function is called when a key is pressed, repeated or released.\r
58          * If the raw scancode is to be included with the key event, it should precede\r
59          * the event.\r
60          */\r
61         KB_IOCTL_SETCALLBACK\r
62 };\r
63 \r
64 /**\r
65  * \brief Symbolic names for Keyboard IOCtls\r
66  */\r
67 #define DRV_KEYBAORD_IOCTLNAMES "getset_repeat_rate", "getset_repeat_delay", "set_callback"\r
68 \r
69 /**\r
70  * \brief Callback type for KB_IOCTL_SETCALLBACK\r
71  * \param Key   Key symbol (Unicode or eTplKeyboard_KeyCodes)\r
72  */\r
73 typedef void (*tKeybardCallback)(Uint32 Key);\r
74 \r
75 /**\r
76  * \name Callback key flags\r
77  * \brief Flags for values passed to the callback\r
78  * \{\r
79  */\r
80 #define KEY_CODEPOINT_MASK      0x3FFFFFFF\r
81 #define KEY_ACTION_MASK         0xC0000000\r
82 #define KEY_ACTION_PRESS        0x00000000      //!< Key pressed\r
83 #define KEY_ACTION_RELEASE      0x40000000      //!< Key released\r
84 #define KEY_ACTION_REFIRE       0x80000000      //!< Repeated key\r
85 #define KEY_ACTION_RAWSYM       0xC0000000      //!< Raw key symbol (comes before a press/repeat/release)\r
86 /**\r
87  * \}\r
88  */\r
89 \r
90 #include "keysyms.h"\r
91 \r
92 #endif\r

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