Files
@ d0a14f973771
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public/vmkernel64/release/device/vmkapi_input.h
d0a14f973771
7.9 KiB
text/x-chdr
ESXi-5.0-U1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | /* **********************************************************
* Copyright 2008 - 2009 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
***********************************************************************
* Input */ /**
* \addtogroup Device
* @{
* \defgroup Input Human Input Device Interfaces
*
* Interfaces that allow to enqueue keyboard character(s) to vmkernel
* and forward input events to the host.
* @{
*
***********************************************************************
*/
#ifndef _VMKAPI_INPUT_H_
#define _VMKAPI_INPUT_H_
/** \cond never */
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
#error This vmkapi file should never be included directly but only via vmkapi.h
#endif
/** \endcond never */
/**
* \brief Values for special keys (beyond normal ASCII codes).
*/
enum {
VMK_INPUT_KEY_F1 = (vmk_int8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FT_F11,
VMK_INPUT_KEY_CTRLSHIFT_F12,
VMK_INPUT_KEY_HOME,
VMK_INPUT_KEY_UP,
VMK_INPUT_KEY_PAGEUP,
VMK_INPUT_KEY_NUMMINUS,
VMK_INPUT_KEY_LEFT,
VMK_INPUT_KEY_CENTER,
VMK_INPUT_KEY_RIGHT,
VMK_INPUT_KEY_NUMPLUS,
VMK_INPUT_KEY_END,
VMK_INPUT_KEY_DOWN,
VMK_INPUT_KEY_PAGEDOWN,
VMK_INPUT_KEY_INSERT,
VMK_INPUT_KEY_DELETE,
VMK_INPUT_KEY_UNUSED1,
VMK_INPUT_KEY_UNUSED2,
VMK_INPUT_KEY_UNUSED3,
VMK_INPUT_KEY_ALT_F1,
VMK_INPUT_KEY_ALT_F2,
VMK_INPUT_KEY_ALT_F3,
VMK_INPUT_KEY_ALT_F4,
VMK_INPUT_KEY_ALT_F5,
VMK_INPUT_KEY_ALT_F6,
VMK_INPUT_KEY_ALT_F7,
VMK_INPUT_KEY_ALT_F8,
VMK_INPUT_KEY_ALT_F9,
VMK_INPUT_KEY_ALT_F10,
VMK_INPUT_KEY_ALT_F11,
VMK_INPUT_KEY_ALT_F12,
};
/**
* \brief Keyboard scancode mapping modes.
*/
typedef enum vmk_KeyboardKeymapMode {
VMK_KEYMAP_MODE_INVALID=0,
VMK_KEYMAP_MODE_XLATE=1,
VMK_KEYMAP_MODE_MEDIUMRAW=2,
VMK_KEYMAP_MODE_RAW=3,
VMK_KEYMAP_MODE_UNICODE=4,
} vmk_KeyboardKeymapMode;
/**
* \brief Keyboard driver type identifiers.
*/
typedef enum vmk_KeyboardDriverType {
VMK_KEYBOARD_DRIVER_TYPE_INVALID=0,
VMK_KEYBOARD_DRIVER_TYPE_USB=1,
} vmk_KeyboardDriverType;
/**
* \brief Opaque handle for a keyboard interrupt handler.
*/
typedef void *vmk_KeyboardInterruptHandle;
/**
* \brief Opaque handle for unregistering keyboard driver.
*/
typedef struct vmk_KeyboardDriverHandleInt *vmk_KeyboardDriverHandle;
/**
* \brief Attributes struct for keyboard driver
*/
typedef struct vmk_KeyboardDriverAttributes {
vmk_KeyboardDriverType driverType;
int (*SetKeymapMode)(vmk_KeyboardKeymapMode mode);
vmk_KeyboardKeymapMode (*GetKeymapMode)(void);
} vmk_KeyboardDriverAttributes;
/*
***********************************************************************
* vmk_InputPutQueue -- */ /**
*
* \ingroup Input
* \brief Enqueue a keyboard character to vmkernel.
*
* Does nothing if vmkernel is not the audience.
*
* \param[in] ch Input character (ASCII or special).
*
***********************************************************************
*/
VMK_ReturnStatus vmk_InputPutQueue(int ch);
/*
***********************************************************************
* vmk_InputPutsQueue -- */ /**
*
* \ingroup Input
* \brief Enqueue multiple keyboard characters to vmkernel.
*
* Does nothing if vmkernel is not the audience.
*
* \param[in] cp Input characters (ASCII or special).
*
***********************************************************************
*/
VMK_ReturnStatus vmk_InputPutsQueue(char *cp);
/*
***********************************************************************
* vmk_InterruptHandler -- */ /**
*
* \ingroup Input
* \brief Interrupt handler pointer type provided to VMkernel
*
* \param[in] irq Source specific IRQ info.
* \param[in] context Source specific context info.
* \param[in] registers Source specific register state.
*
***********************************************************************
*/
typedef void (*vmk_InputInterruptHandler)(int irq,
void *context,
void *registers);
/*
***********************************************************************
* vmk_RegisterInputKeyboardInterruptHandler -- */ /**
*
* \ingroup Input
* \brief Register an interrupt handler for polling an external
* keyboard.
*
* \note This function \em must be called at module load time.
*
* \param[in] handler Interrupt handler.
* \param[in] irq Interrupt vector.
* \param[in] context Context info.
* \param[in] registers Register or other state.
* \param[out] handle Handle for registered keyboard interrupt
* handler.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_RegisterInputKeyboardInterruptHandler(vmk_InputInterruptHandler *handler,
vmk_uint32 irq,
void *context,
void *registers,
vmk_KeyboardInterruptHandle *handle);
/*
***********************************************************************
* vmk_UnregisterInputKeyboardInterruptHandler -- */ /**
*
* \ingroup Input
* \brief Unregister a keyboard interrupt handler.
*
* \param[in] handle Handle for registered keyboard interrupt
* handler.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_UnregisterInputKeyboardInterruptHandler(vmk_KeyboardInterruptHandle handle);
/*
***********************************************************************
* vmk_RegisterKeyboardDriver -- */ /**
*
* \ingroup Input
* \brief Register a keyboard driver.
*
* \param[in] attributes Attributes for registered keyboard driver.
* \param[out] handlePtr Handle pointer for registered keyboard driver.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_RegisterKeyboardDriver(vmk_KeyboardDriverAttributes *attributes,
vmk_KeyboardDriverHandle *handlePtr);
/*
***********************************************************************
* vmk_UnregisterKeyboardDriver -- */ /**
*
* \ingroup Input
* \brief Unregister a keyboard driver.
*
* \param[in] handle Handle for registered keyboard driver.
*
***********************************************************************
*/
VMK_ReturnStatus
vmk_UnregisterKeyboardDriver(vmk_KeyboardDriverHandle handle);
#endif
/** @} */
/** @} */
|