17 #ifndef _LLD_GINPUT_KEYBOARD_H
18 #define _LLD_GINPUT_KEYBOARD_H
20 #if GINPUT_NEED_KEYBOARD
23 #include "../gdriver/gdriver.h"
25 typedef struct GKeyboard {
33 #define GKEYBOARD_FLG_NEEDREAD 0x0001
39 typedef struct GKeyboardVMT {
41 #define GKEYBOARD_VFLG_NOPOLL 0x0001
42 #define GKEYBOARD_VFLG_DYNAMICONLY 0x8000
43 const gU8 * defLayout;
44 gBool (*init)(GKeyboard *m,
unsigned driverinstance);
45 void (*deinit)(GKeyboard *m);
46 int (*getdata)(GKeyboard *k, gU8 *pch,
int sz);
47 void (*putdata)(GKeyboard *k,
char ch);
50 #define gkvmt(m) ((const GKeyboardVMT const *)((m)->d.vmt))
57 #if !defined(GINPUT_KEYBOARD_DRIVER_LIST)
58 #undef GKEYBOARD_DRIVER_VMT
59 #define GKEYBOARD_DRIVER_VMT GKEYBOARDVMT_OnlyOne
79 gBool _gkeyboardInitDriver(
GDriver *g,
void *param,
unsigned driverinstance,
unsigned systeminstance);
90 void _gkeyboardPostInitDriver(
GDriver *g);
101 void _gkeyboardDeInitDriver(
GDriver *g);
110 void _gkeyboardWakeup(GKeyboard *k);
120 void _gkeyboardWakeupI(GKeyboard *k);
All runtime driver structures start with this structure.
All driver VMT's start with this structure.