ugfx/src/ginput/ginput_options.h

222 lines
7.5 KiB
C
Raw Normal View History

2013-05-03 14:36:17 +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-03 14:36:17 +00:00
* the license was not distributed with this file, you can obtain one at:
*
2018-10-01 15:32:39 +00:00
* http://ugfx.io/license.html
2013-05-03 14:36:17 +00:00
*/
/**
* @file src/ginput/ginput_options.h
* @brief GINPUT sub-system options header file.
*
* @addtogroup GINPUT
* @{
*/
#ifndef _GINPUT_OPTIONS_H
#define _GINPUT_OPTIONS_H
/**
* @name GINPUT Functionality to be included
* @{
*/
/**
* @brief Should mouse/touch functions be included.
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
* @note Also add a mouse/touch hardware driver to your makefile.
* Eg.
2014-11-26 03:53:39 +00:00
* include $(GFXLIB)/drivers/ginput/touch/MCU/driver.mk
*/
#ifndef GINPUT_NEED_MOUSE
2018-02-27 07:44:21 +00:00
#define GINPUT_NEED_MOUSE GFXOFF
#endif
/**
* @brief Should keyboard functions be included.
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
* @note Also add a keyboard hardware driver to your makefile.
* Eg.
2014-11-26 03:53:39 +00:00
* include $(GFXLIB)/drivers/ginput/keyboard/XXXX/driver.mk
*/
#ifndef GINPUT_NEED_KEYBOARD
2018-02-27 07:44:21 +00:00
#define GINPUT_NEED_KEYBOARD GFXOFF
#endif
/**
* @brief Should hardware toggle/switch/button functions be included.
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
* @note Also add a toggle hardware driver to your makefile.
* Eg.
2014-11-26 03:53:39 +00:00
* include $(GFXLIB)/drivers/ginput/toggle/Pal/driver.mk
*/
#ifndef GINPUT_NEED_TOGGLE
2018-02-27 07:44:21 +00:00
#define GINPUT_NEED_TOGGLE GFXOFF
#endif
/**
* @brief Should analog dial functions be included.
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
* @note Also add a dial hardware driver to your makefile.
* Eg.
2014-11-26 03:53:39 +00:00
* include $(GFXLIB)/drivers/ginput/dial/analog/driver.mk
*/
#ifndef GINPUT_NEED_DIAL
2018-02-27 07:44:21 +00:00
#define GINPUT_NEED_DIAL GFXOFF
#endif
/**
* @}
*
* @name GINPUT Optional Sizing Parameters
* @{
*/
/**
* @}
*
* @name GINPUT Optional Low Level Driver Defines
* @{
*/
/**
* @brief Start touch devices without loading or running calibration.
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
* @note This is used if you want to manually control the initial calibration
* process. In practice this is only useful for a touch driver test program.
*/
#ifndef GINPUT_TOUCH_STARTRAW
2018-02-27 07:44:21 +00:00
#define GINPUT_TOUCH_STARTRAW GFXOFF
#endif
/**
* @brief Turn off the touch calibration GUI.
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
* @note Turning off the calibration GUI just turns off the manual calibration
* process. Readings may still be calibrated if calibration data
* can be loaded.
* @note Calibration requires a lot of code. If your device doesn't require it
* using this option can save a lot of space.
*/
#ifndef GINPUT_TOUCH_NOCALIBRATE_GUI
2018-02-27 07:44:21 +00:00
#define GINPUT_TOUCH_NOCALIBRATE_GUI GFXOFF
#endif
/**
* @brief Turn off all touch calibration support.
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
* @note With this set to GFXON touch readings will not be calibrated.
* @note This automatically turns off the calibration GUI too!
* @note Calibration requires a lot of code. If your device doesn't require it
* using this option can save a lot of space.
*/
2014-07-01 23:40:01 +00:00
#ifndef GINPUT_TOUCH_NOCALIBRATE
2018-02-27 07:44:21 +00:00
#define GINPUT_TOUCH_NOCALIBRATE GFXOFF
#endif
/**
* @brief Turn off all touch support.
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
* @note This automatically turns off all calibration and the calibration GUI too!
* @note Touch device handling requires a lot of code. If your device doesn't require it
* using this option can save a lot of space.
*/
#ifndef GINPUT_TOUCH_NOTOUCH
2018-02-27 07:44:21 +00:00
#define GINPUT_TOUCH_NOTOUCH GFXOFF
#endif
/**
2014-07-01 23:40:01 +00:00
* @brief Milliseconds between mouse polls.
2014-11-26 03:53:39 +00:00
* @details Defaults to 25 milliseconds
2014-07-01 23:40:01 +00:00
* @note How often mice should be polled. More often leads to smoother mouse movement
* but increases CPU usage.
*/
2014-07-01 23:40:01 +00:00
#ifndef GINPUT_MOUSE_POLL_PERIOD
#define GINPUT_MOUSE_POLL_PERIOD 25
#endif
2014-07-01 23:40:01 +00:00
/**
* @brief Maximum length of CLICK in milliseconds
2014-11-26 03:53:39 +00:00
* @details Defaults to 300 milliseconds
* @note Mouse down to Mouse up times greater than this are not clicks.
*/
#ifndef GINPUT_MOUSE_CLICK_TIME
#define GINPUT_MOUSE_CLICK_TIME 300
#endif
/**
* @brief Milliseconds to generate a CXTCLICK on a touch device.
2014-11-26 03:53:39 +00:00
* @details Defaults to 500 milliseconds
* @note If you hold the touch down for longer than this a CXTCLICK is generated
* but only on a touch device.
*/
#ifndef GINPUT_TOUCH_CXTCLICK_TIME
#define GINPUT_TOUCH_CXTCLICK_TIME 500
#endif
/**
* @brief There is a user supplied routine to load mouse calibration data
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
* @note If GFXON the user must supply the @p LoadMouseCalibration() routine.
*/
#ifndef GINPUT_TOUCH_USER_CALIBRATION_LOAD
2018-02-27 07:44:21 +00:00
#define GINPUT_TOUCH_USER_CALIBRATION_LOAD GFXOFF
#endif
/**
* @brief There is a user supplied routine to save mouse calibration data
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
* @note If GFXON the user must supply the @p SaveMouseCalibration() routine.
*/
#ifndef GINPUT_TOUCH_USER_CALIBRATION_SAVE
2018-02-27 07:44:21 +00:00
#define GINPUT_TOUCH_USER_CALIBRATION_SAVE GFXOFF
#endif
2014-11-26 03:21:05 +00:00
#if defined(__DOXYGEN__)
/**
* @brief Define multiple static mice
* @details When not defined the system automatically detects a single linked mouse driver
* @note The references to GMOUSEVMT_Win32 in the definition would be replaced
* by the names of the VMT for each of the static mice you want to
* include.
* @note Dynamic mice associated automatically with a display eg Win32, X or GFXnet
* do not need to be specified in this list as the associated display driver will register
* them automatically as the display is created.
*/
2014-11-26 03:21:05 +00:00
#define GMOUSE_DRIVER_LIST GMOUSEVMT_Win32, GMOUSEVMT_Win32
#endif
/**
* @brief Milliseconds between keyboard polls.
* @details Defaults to 200 milliseconds
* @note How often keyboards should be polled.
*/
#ifndef GINPUT_KEYBOARD_POLL_PERIOD
#define GINPUT_KEYBOARD_POLL_PERIOD 200
#endif
#if defined(__DOXYGEN__)
/**
* @brief Define multiple static keyboards
* @details When not defined the system automatically detects a single linked keyboard driver
* @note The references to GKEYBOARDVMT_Win32 in the definition would be replaced
* by the names of the VMT for each of the static keyboards you want to
* include.
* @note Dynamic keyboards associated automatically with a display eg Win32, X or GFXnet
* do not need to be specified in this list as the display driver will register
* them automatically as the display is created.
*/
#define GKEYBOARD_DRIVER_LIST GMOUSEVMT_Win32, GMOUSEVMT_Win32
#endif
/**
* @brief Turn off the layout engine.
* @details When defined the layout engine is removed from the code and characters
* are passed directly from the keyboard driver to the application.
* @note Turning off the layout engine just saves code if it is not needed.
*/
#ifndef GKEYBOARD_LAYOUT_OFF
2018-02-27 07:44:21 +00:00
#define GKEYBOARD_LAYOUT_OFF GFXOFF
#endif
/**
* @brief Various Keyboard Layouts that can be included.
* @details A keyboard layout controls conversion of scancodes to characters
* and enables one keyboard to have multiple language mappings.
* @note Defining a layout does not make it active. The keyboard driver
* must have it active as the default or the application must
* use @p ginputSetKeyboardLayout() to set the active layout.
* @note Multiple layouts can be included but only one will be active
* at a time (per keyboard).
* @{
*/
#ifndef GKEYBOARD_LAYOUT_SCANCODE2_US
2018-02-27 07:44:21 +00:00
#define GKEYBOARD_LAYOUT_SCANCODE2_US GFXOFF // US Keyboard using the ScanCode 2 set.
#endif
/** @} */
/** @} */
#endif /* _GINPUT_OPTIONS_H */
/** @} */