µGFX  2.9
version 2.9
ginput_options.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.io/license.html
6  */
7 
8 /**
9  * @file src/ginput/ginput_options.h
10  * @brief GINPUT sub-system options header file.
11  *
12  * @addtogroup GINPUT
13  * @{
14  */
15 
16 #ifndef _GINPUT_OPTIONS_H
17 #define _GINPUT_OPTIONS_H
18 
19 /**
20  * @name GINPUT Functionality to be included
21  * @{
22  */
23  /**
24  * @brief Should mouse/touch functions be included.
25  * @details Defaults to GFXOFF
26  * @note Also add a mouse/touch hardware driver to your makefile.
27  * Eg.
28  * include $(GFXLIB)/drivers/ginput/touch/MCU/driver.mk
29  */
30  #ifndef GINPUT_NEED_MOUSE
31  #define GINPUT_NEED_MOUSE GFXOFF
32  #endif
33  /**
34  * @brief Should keyboard functions be included.
35  * @details Defaults to GFXOFF
36  * @note Also add a keyboard hardware driver to your makefile.
37  * Eg.
38  * include $(GFXLIB)/drivers/ginput/keyboard/XXXX/driver.mk
39  */
40  #ifndef GINPUT_NEED_KEYBOARD
41  #define GINPUT_NEED_KEYBOARD GFXOFF
42  #endif
43  /**
44  * @brief Should hardware toggle/switch/button functions be included.
45  * @details Defaults to GFXOFF
46  * @note Also add a toggle hardware driver to your makefile.
47  * Eg.
48  * include $(GFXLIB)/drivers/ginput/toggle/Pal/driver.mk
49  */
50  #ifndef GINPUT_NEED_TOGGLE
51  #define GINPUT_NEED_TOGGLE GFXOFF
52  #endif
53  /**
54  * @brief Should analog dial functions be included.
55  * @details Defaults to GFXOFF
56  * @note Also add a dial hardware driver to your makefile.
57  * Eg.
58  * include $(GFXLIB)/drivers/ginput/dial/analog/driver.mk
59  */
60  #ifndef GINPUT_NEED_DIAL
61  #define GINPUT_NEED_DIAL GFXOFF
62  #endif
63 /**
64  * @}
65  *
66  * @name GINPUT Optional Sizing Parameters
67  * @{
68  */
69 /**
70  * @}
71  *
72  * @name GINPUT Optional Low Level Driver Defines
73  * @{
74  */
75  /**
76  * @brief Start touch devices without loading or running calibration.
77  * @details Defaults to GFXOFF
78  * @note This is used if you want to manually control the initial calibration
79  * process. In practice this is only useful for a touch driver test program.
80  */
81  #ifndef GINPUT_TOUCH_STARTRAW
82  #define GINPUT_TOUCH_STARTRAW GFXOFF
83  #endif
84  /**
85  * @brief Turn off the touch calibration GUI.
86  * @details Defaults to GFXOFF
87  * @note Turning off the calibration GUI just turns off the manual calibration
88  * process. Readings may still be calibrated if calibration data
89  * can be loaded.
90  * @note Calibration requires a lot of code. If your device doesn't require it
91  * using this option can save a lot of space.
92  */
93  #ifndef GINPUT_TOUCH_NOCALIBRATE_GUI
94  #define GINPUT_TOUCH_NOCALIBRATE_GUI GFXOFF
95  #endif
96  /**
97  * @brief Turn off all touch calibration support.
98  * @details Defaults to GFXOFF
99  * @note With this set to GFXON touch readings will not be calibrated.
100  * @note This automatically turns off the calibration GUI too!
101  * @note Calibration requires a lot of code. If your device doesn't require it
102  * using this option can save a lot of space.
103  */
104  #ifndef GINPUT_TOUCH_NOCALIBRATE
105  #define GINPUT_TOUCH_NOCALIBRATE GFXOFF
106  #endif
107  /**
108  * @brief Turn off all touch support.
109  * @details Defaults to GFXOFF
110  * @note This automatically turns off all calibration and the calibration GUI too!
111  * @note Touch device handling requires a lot of code. If your device doesn't require it
112  * using this option can save a lot of space.
113  */
114  #ifndef GINPUT_TOUCH_NOTOUCH
115  #define GINPUT_TOUCH_NOTOUCH GFXOFF
116  #endif
117  /**
118  * @brief Milliseconds between mouse polls.
119  * @details Defaults to 25 milliseconds
120  * @note How often mice should be polled. More often leads to smoother mouse movement
121  * but increases CPU usage.
122  */
123  #ifndef GINPUT_MOUSE_POLL_PERIOD
124  #define GINPUT_MOUSE_POLL_PERIOD 25
125  #endif
126 
127  /**
128  * @brief Maximum length of CLICK in milliseconds
129  * @details Defaults to 300 milliseconds
130  * @note Mouse down to Mouse up times greater than this are not clicks.
131  */
132  #ifndef GINPUT_MOUSE_CLICK_TIME
133  #define GINPUT_MOUSE_CLICK_TIME 300
134  #endif
135  /**
136  * @brief Milliseconds to generate a CXTCLICK on a touch device.
137  * @details Defaults to 500 milliseconds
138  * @note If you hold the touch down for longer than this a CXTCLICK is generated
139  * but only on a touch device.
140  */
141  #ifndef GINPUT_TOUCH_CXTCLICK_TIME
142  #define GINPUT_TOUCH_CXTCLICK_TIME 500
143  #endif
144  /**
145  * @brief There is a user supplied routine to load mouse calibration data
146  * @details Defaults to GFXOFF
147  * @note If GFXON the user must supply the @p LoadMouseCalibration() routine.
148  */
149  #ifndef GINPUT_TOUCH_USER_CALIBRATION_LOAD
150  #define GINPUT_TOUCH_USER_CALIBRATION_LOAD GFXOFF
151  #endif
152  /**
153  * @brief There is a user supplied routine to save mouse calibration data
154  * @details Defaults to GFXOFF
155  * @note If GFXON the user must supply the @p SaveMouseCalibration() routine.
156  */
157  #ifndef GINPUT_TOUCH_USER_CALIBRATION_SAVE
158  #define GINPUT_TOUCH_USER_CALIBRATION_SAVE GFXOFF
159  #endif
160  #if defined(__DOXYGEN__)
161  /**
162  * @brief Define multiple static mice
163  * @details When not defined the system automatically detects a single linked mouse driver
164  * @note The references to GMOUSEVMT_Win32 in the definition would be replaced
165  * by the names of the VMT for each of the static mice you want to
166  * include.
167  * @note Dynamic mice associated automatically with a display eg Win32, X or GFXnet
168  * do not need to be specified in this list as the associated display driver will register
169  * them automatically as the display is created.
170  */
171  #define GMOUSE_DRIVER_LIST GMOUSEVMT_Win32, GMOUSEVMT_Win32
172  #endif
173  /**
174  * @brief Milliseconds between keyboard polls.
175  * @details Defaults to 200 milliseconds
176  * @note How often keyboards should be polled.
177  */
178  #ifndef GINPUT_KEYBOARD_POLL_PERIOD
179  #define GINPUT_KEYBOARD_POLL_PERIOD 200
180  #endif
181  #if defined(__DOXYGEN__)
182  /**
183  * @brief Define multiple static keyboards
184  * @details When not defined the system automatically detects a single linked keyboard driver
185  * @note The references to GKEYBOARDVMT_Win32 in the definition would be replaced
186  * by the names of the VMT for each of the static keyboards you want to
187  * include.
188  * @note Dynamic keyboards associated automatically with a display eg Win32, X or GFXnet
189  * do not need to be specified in this list as the display driver will register
190  * them automatically as the display is created.
191  */
192  #define GKEYBOARD_DRIVER_LIST GMOUSEVMT_Win32, GMOUSEVMT_Win32
193  #endif
194  /**
195  * @brief Turn off the layout engine.
196  * @details When defined the layout engine is removed from the code and characters
197  * are passed directly from the keyboard driver to the application.
198  * @note Turning off the layout engine just saves code if it is not needed.
199  */
200  #ifndef GKEYBOARD_LAYOUT_OFF
201  #define GKEYBOARD_LAYOUT_OFF GFXOFF
202  #endif
203  /**
204  * @brief Various Keyboard Layouts that can be included.
205  * @details A keyboard layout controls conversion of scancodes to characters
206  * and enables one keyboard to have multiple language mappings.
207  * @note Defining a layout does not make it active. The keyboard driver
208  * must have it active as the default or the application must
209  * use @p ginputSetKeyboardLayout() to set the active layout.
210  * @note Multiple layouts can be included but only one will be active
211  * at a time (per keyboard).
212  * @{
213  */
214  #ifndef GKEYBOARD_LAYOUT_SCANCODE2_US
215  #define GKEYBOARD_LAYOUT_SCANCODE2_US GFXOFF // US Keyboard using the ScanCode 2 set.
216  #endif
217  /** @} */
218 /** @} */
219 
220 #endif /* _GINPUT_OPTIONS_H */
221 /** @} */