From 92d972cfd83b67961dc63d60c5317ec2651eb256 Mon Sep 17 00:00:00 2001 From: inmarket Date: Wed, 2 Jul 2014 09:40:01 +1000 Subject: First part new mouse infrastructure --- src/ginput/sys_options.h | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'src/ginput/sys_options.h') diff --git a/src/ginput/sys_options.h b/src/ginput/sys_options.h index c606262b..7ccc7b78 100644 --- a/src/ginput/sys_options.h +++ b/src/ginput/sys_options.h @@ -73,40 +73,41 @@ * @{ */ /** - * @brief Use a custom board definition for the mouse/touch driver even if a board definition exists. + * @brief Turn off touch mouse support. * @details Defaults to FALSE - * @details If TRUE, add ginput_lld_mouse_board.h to your project directory and customise it. - * @note Not all GINPUT mouse/touch low level drivers use board definition files. + * @note Touch device handling requires a lot of code. If your mouse doesn't require it + * this can be turned off to save a lot of space. */ - #ifndef GINPUT_MOUSE_USE_CUSTOM_BOARD - #define GINPUT_MOUSE_USE_CUSTOM_BOARD FALSE + #ifndef GINPUT_TOUCH_NOTOUCH + #define GINPUT_TOUCH_NOTOUCH FALSE #endif /** - * @brief Use a custom board definition for the keyboard driver even if a board definition exists. + * @brief Turn off calibration support. * @details Defaults to FALSE - * @details If TRUE, add ginput_lld_keyboard_board.h to your project directory and customise it. - * @note Not all GINPUT keyboard low level drivers use board definition files. + * @note Calibration requires a lot of code. If your mouse doesn't require it + * this can be turned off to save a lot of space. */ - #ifndef GINPUT_KEYBOARD_USE_CUSTOM_BOARD - #define GINPUT_KEYBOARD_USE_CUSTOM_BOARD FALSE + #ifndef GINPUT_TOUCH_NOCALIBRATE + #define GINPUT_TOUCH_NOCALIBRATE FALSE #endif /** - * @brief Use a custom board definition for the toggle driver even if a board definition exists. - * @details Defaults to FALSE - * @details If TRUE, add ginput_lld_toggle_board.h to your project directory and customise it. - * @note Not all GINPUT toggle low level drivers use board definition files. + * @brief Milliseconds between mouse polls. + * @details Defaults to 25 millseconds + * @note How often mice should be polled. More often leads to smoother mouse movement + * but increases CPU usage. If no mouse drivers need polling the poll is not + * started. */ - #ifndef GINPUT_TOGGLE_USE_CUSTOM_BOARD - #define GINPUT_TOGGLE_USE_CUSTOM_BOARD FALSE + #ifndef GINPUT_MOUSE_POLL_PERIOD + #define GINPUT_MOUSE_POLL_PERIOD 25 #endif + /** - * @brief Use a custom board definition for the dial driver even if a board definition exists. - * @details Defaults to FALSE - * @details If TRUE, add ginput_lld_dial_board.h to your project directory and customise it. - * @note Not all GINPUT dial low level drivers use board definition files. + * @brief Milliseconds separating a CLICK from a CXTCLICK. + * @details Defaults to 700 millseconds + * @note How long it takes for a click to turn into a CXTCLICK on a touch device. */ - #ifndef GINPUT_DIAL_USE_CUSTOM_BOARD - #define GINPUT_DIAL_USE_CUSTOM_BOARD FALSE + #ifndef GINPUT_TOUCH_CLICK_TIME + #define GINPUT_TOUCH_CLICK_TIME 700 #endif /** @} */ -- cgit v1.2.3 From 10dc968427ed1ec846342dd1932b273acea414bd Mon Sep 17 00:00:00 2001 From: inmarket Date: Thu, 25 Sep 2014 17:44:16 +1000 Subject: New mouse updates. Just need a driver now. --- src/ginput/sys_options.h | 84 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 14 deletions(-) (limited to 'src/ginput/sys_options.h') diff --git a/src/ginput/sys_options.h b/src/ginput/sys_options.h index 7ccc7b78..e67a03ce 100644 --- a/src/ginput/sys_options.h +++ b/src/ginput/sys_options.h @@ -73,41 +73,97 @@ * @{ */ /** - * @brief Turn off touch mouse support. + * @brief Start touch devices without loading or running calibration. * @details Defaults to FALSE - * @note Touch device handling requires a lot of code. If your mouse doesn't require it - * this can be turned off to save a lot of space. + * @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_NOTOUCH - #define GINPUT_TOUCH_NOTOUCH FALSE + #ifndef GINPUT_TOUCH_STARTRAW + #define GINPUT_TOUCH_STARTRAW FALSE + #endif + /** + * @brief Turn off the touch calibration GUI. + * @details Defaults to FALSE + * @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 + #define GINPUT_TOUCH_NOCALIBRATE_GUI FALSE #endif /** - * @brief Turn off calibration support. + * @brief Turn off all touch calibration support. * @details Defaults to FALSE - * @note Calibration requires a lot of code. If your mouse doesn't require it - * this can be turned off to save a lot of space. + * @note With this set to TRUE 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. */ #ifndef GINPUT_TOUCH_NOCALIBRATE #define GINPUT_TOUCH_NOCALIBRATE FALSE #endif + /** + * @brief Turn off all touch support. + * @details Defaults to FALSE + * @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 + #define GINPUT_TOUCH_NOTOUCH FALSE + #endif /** * @brief Milliseconds between mouse polls. * @details Defaults to 25 millseconds * @note How often mice should be polled. More often leads to smoother mouse movement - * but increases CPU usage. If no mouse drivers need polling the poll is not - * started. + * but increases CPU usage. */ #ifndef GINPUT_MOUSE_POLL_PERIOD #define GINPUT_MOUSE_POLL_PERIOD 25 #endif /** - * @brief Milliseconds separating a CLICK from a CXTCLICK. + * @brief Maximum length of CLICK in milliseconds + * @details Defaults to 300 millseconds + * @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. * @details Defaults to 700 millseconds - * @note How long it takes for a click to turn into a CXTCLICK on a touch device. + * @note If you hold the touch down for longer than this a CXTCLICK is generated + * but only on a touch device. */ - #ifndef GINPUT_TOUCH_CLICK_TIME - #define GINPUT_TOUCH_CLICK_TIME 700 + #ifndef GINPUT_TOUCH_CXTCLICK_TIME + #define GINPUT_TOUCH_CXTCLICK_TIME 700 + #endif + /** + * @brief There is a user supplied routine to load mouse calibration data + * @details Defaults to FALSE + * @note If TRUE the user must supply the @p LoadMouseCalibration() routine. + */ + #ifndef GINPUT_TOUCH_USER_CALIBRATION_LOAD + #define GINPUT_TOUCH_USER_CALIBRATION_LOAD FALSE + #endif + /** + * @brief The buffer returned by the users @p LoadMouseCalibration() routine must be gfxFree()'d + * by the mouse code. + * @details Defaults to FALSE + */ + #ifndef GINPUT_TOUCH_USER_CALIBRATION_FREE + #define GINPUT_TOUCH_USER_CALIBRATION_FREE FALSE + #endif + /** + * @brief There is a user supplied routine to save mouse calibration data + * @details Defaults to FALSE + * @note If TRUE the user must supply the @p SaveMouseCalibration() routine. + */ + #ifndef GINPUT_TOUCH_USER_CALIBRATION_SAVE + #define GINPUT_TOUCH_USER_CALIBRATION_SAVE FALSE #endif /** @} */ -- cgit v1.2.3