diff options
Diffstat (limited to 'src/ginput/ginput.c')
-rw-r--r-- | src/ginput/ginput.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/ginput/ginput.c b/src/ginput/ginput.c new file mode 100644 index 00000000..becefc19 --- /dev/null +++ b/src/ginput/ginput.c @@ -0,0 +1,54 @@ +/* + * This file is subject to the terms of the GFX License. If a copy of + * the license was not distributed with this file, you can obtain one at: + * + * http://ugfx.org/license.html + */ + +/** + * @file src/ginput/ginput_ginput.c + * @brief GINPUT subsystem common code. + * + * @addtogroup GINPUT + * @{ + */ +#include "gfx.h" + +#if GFX_USE_GINPUT + +#if GINPUT_NEED_MOUSE + extern void _gmouseInit(void); + extern void _gmouseDeinit(void); +#endif +#if GINPUT_NEED_KEYBOARD + extern void _gkeyboardInit(void); + extern void _gkeyboardDeinit(void); +#endif + +void _ginputInit(void) +{ + #if GINPUT_NEED_MOUSE + _gmouseInit(); + #endif + #if GINPUT_NEED_KEYBOARD + _gkeyboardInit(); + #endif + /** + * This should really call an init routine for each ginput sub-system. + * Maybe we'll do this later. + */ +} + +void _ginputDeinit(void) +{ + #if GINPUT_NEED_KEYBOARD + _gkeyboardDeinit(); + #endif + #if GINPUT_NEED_MOUSE + _gmouseDeinit(); + #endif +} + +#endif /* GFX_USE_GINPUT */ +/** @} */ + |