version 2.8
ginput_rules.h
Go to the documentation of this file.
1 /*
2  * This file is subject to the terms of the GFX License. If a copy of
3  * the license was not distributed with this file, you can obtain one at:
4  *
5  * http://ugfx.org/license.html
6  */
7 
8 /**
9  * @file src/ginput/ginput_rules.h
10  * @brief GINPUT safety rules header file.
11  *
12  * @addtogroup GINPUT
13  * @{
14  */
15 
16 #ifndef _GINPUT_RULES_H
17 #define _GINPUT_RULES_H
18 
19 #if GFX_USE_GINPUT
20  #if !GFX_USE_GEVENT
21  #if GFX_DISPLAY_RULE_WARNINGS
22  #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
23  #warning "GINPUT: GFX_USE_GEVENT is required if GFX_USE_GINPUT is TRUE. It has been turned on for you."
24  #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
25  COMPILER_WARNING("GINPUT: GFX_USE_GEVENT is required if GFX_USE_GINPUT is TRUE. It has been turned on for you.")
26  #endif
27  #endif
28  #undef GFX_USE_GEVENT
29  #define GFX_USE_GEVENT TRUE
30  #endif
31  #if !GFX_USE_GTIMER
32  #if GFX_DISPLAY_RULE_WARNINGS
33  #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
34  #warning "GINPUT: GFX_USE_GTIMER is required if GFX_USE_GINPUT is TRUE. It has been turned on for you."
35  #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
36  COMPILER_WARNING("GINPUT: GFX_USE_GTIMER is required if GFX_USE_GINPUT is TRUE. It has been turned on for you.")
37  #endif
38  #endif
39  #undef GFX_USE_GTIMER
40  #define GFX_USE_GTIMER TRUE
41  #endif
42  #if GINPUT_NEED_MOUSE
43  #if GINPUT_TOUCH_NOTOUCH
44  // No warning needed for this
45  #undef GINPUT_TOUCH_NOCALIBRATE
46  #define GINPUT_TOUCH_NOCALIBRATE TRUE
47  #endif
48  #if GINPUT_TOUCH_NOCALIBRATE
49  // No warning needed for this
50  #undef GINPUT_TOUCH_NOCALIBRATE_GUI
51  #define GINPUT_TOUCH_NOCALIBRATE_GUI TRUE
52  #endif
53  #if !GINPUT_TOUCH_NOTOUCH && GINPUT_MOUSE_CLICK_TIME > GINPUT_TOUCH_CXTCLICK_TIME
54  #error "GINPUT MOUSE: The GINPUT_MOUSE_CLICK_TIME must be <= GINPUT_TOUCH_CXTCLICK_TIME"
55  #endif
56  #endif
57 #endif
58 
59 #endif /* _GINPUT_RULES_H */
60 /** @} */