aboutsummaryrefslogtreecommitdiffstats
path: root/src/ginput/ginput.c
blob: e3d61e6bdbb10b08db50a7c3218ef535b5c6ceaa (plain)
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
/*
 * 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.io/license.html
 */

/**
 * @file    src/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 */
/** @} */