2013-05-24 15:26:52 +00:00
|
|
|
/*
|
2013-06-15 11:37:22 +00:00
|
|
|
* This file is subject to the terms of the GFX License. If a copy of
|
2013-05-24 15:26:52 +00:00
|
|
|
* the license was not distributed with this file, you can obtain one at:
|
|
|
|
*
|
2013-07-21 20:20:37 +00:00
|
|
|
* http://ugfx.org/license.html
|
2013-05-24 15:26:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-05-16 18:17:50 +00:00
|
|
|
* @file src/ginput/ginput.c
|
2013-05-24 15:26:52 +00:00
|
|
|
* @brief GINPUT subsystem common code.
|
|
|
|
*
|
|
|
|
* @addtogroup GINPUT
|
|
|
|
* @{
|
|
|
|
*/
|
2015-11-21 09:27:08 +00:00
|
|
|
#include "../../gfx.h"
|
2013-05-24 15:26:52 +00:00
|
|
|
|
|
|
|
#if GFX_USE_GINPUT
|
|
|
|
|
2014-09-16 22:44:31 +00:00
|
|
|
#if GINPUT_NEED_MOUSE
|
|
|
|
extern void _gmouseInit(void);
|
|
|
|
extern void _gmouseDeinit(void);
|
|
|
|
#endif
|
2015-01-07 03:20:23 +00:00
|
|
|
#if GINPUT_NEED_KEYBOARD
|
|
|
|
extern void _gkeyboardInit(void);
|
|
|
|
extern void _gkeyboardDeinit(void);
|
|
|
|
#endif
|
2014-09-16 22:44:31 +00:00
|
|
|
|
2014-02-02 18:24:43 +00:00
|
|
|
void _ginputInit(void)
|
|
|
|
{
|
2014-09-16 22:44:31 +00:00
|
|
|
#if GINPUT_NEED_MOUSE
|
|
|
|
_gmouseInit();
|
|
|
|
#endif
|
2015-01-07 03:20:23 +00:00
|
|
|
#if GINPUT_NEED_KEYBOARD
|
|
|
|
_gkeyboardInit();
|
|
|
|
#endif
|
2014-02-02 18:24:43 +00:00
|
|
|
/**
|
|
|
|
* This should really call an init routine for each ginput sub-system.
|
|
|
|
* Maybe we'll do this later.
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
void _ginputDeinit(void)
|
|
|
|
{
|
2015-01-07 03:20:23 +00:00
|
|
|
#if GINPUT_NEED_KEYBOARD
|
|
|
|
_gkeyboardDeinit();
|
|
|
|
#endif
|
2014-09-16 22:44:31 +00:00
|
|
|
#if GINPUT_NEED_MOUSE
|
|
|
|
_gmouseDeinit();
|
|
|
|
#endif
|
2014-02-02 18:24:43 +00:00
|
|
|
}
|
2013-05-24 15:26:52 +00:00
|
|
|
|
|
|
|
#endif /* GFX_USE_GINPUT */
|
|
|
|
/** @} */
|
2014-02-02 18:24:43 +00:00
|
|
|
|