version 2.8
GINPUT

Detailed Description

Module to interface different hardware input sources such as touchscreens.

GINPUT provides an easy and common interface to use different input devices such as touchscreens and mices.

Precondition
GFX_USE_GINPUT must be set to TRUE in your gfxconf.h

Modules

 Dial
 Sub-Module to handle physical controls that provide a range value (eg. potentiometers and rotary encoders).
 
 Keyboard
 Sub-Module to handle physical keyboards.
 
 Mouse
 Sub-Module to handle touchscreens and mices.
 
 Toggle
 Sub-Module to handle physical controls that provide provide a digital value (on/off, pressed/released, 1/0, ...).
 

GINPUT Functionality to be included

#define GINPUT_NEED_MOUSE   FALSE
 Should mouse/touch functions be included. More...
 
#define GINPUT_NEED_KEYBOARD   FALSE
 Should keyboard functions be included. More...
 
#define GINPUT_NEED_TOGGLE   FALSE
 Should hardware toggle/switch/button functions be included. More...
 
#define GINPUT_NEED_DIAL   FALSE
 Should analog dial functions be included. More...
 

GINPUT Optional Low Level Driver Defines

#define GINPUT_TOUCH_STARTRAW   FALSE
 Start touch devices without loading or running calibration. More...
 
#define GINPUT_TOUCH_NOCALIBRATE_GUI   FALSE
 Turn off the touch calibration GUI. More...
 
#define GINPUT_TOUCH_NOCALIBRATE   FALSE
 Turn off all touch calibration support. More...
 
#define GINPUT_TOUCH_NOTOUCH   FALSE
 Turn off all touch support. More...
 
#define GINPUT_MOUSE_POLL_PERIOD   25
 Milliseconds between mouse polls. More...
 
#define GINPUT_MOUSE_CLICK_TIME   300
 Maximum length of CLICK in milliseconds. More...
 
#define GINPUT_TOUCH_CXTCLICK_TIME   500
 Milliseconds to generate a CXTCLICK on a touch device. More...
 
#define GINPUT_TOUCH_USER_CALIBRATION_LOAD   FALSE
 There is a user supplied routine to load mouse calibration data. More...
 
#define GINPUT_TOUCH_USER_CALIBRATION_SAVE   FALSE
 There is a user supplied routine to save mouse calibration data. More...
 
#define GMOUSE_DRIVER_LIST   GMOUSEVMT_Win32, GMOUSEVMT_Win32
 Define multiple static mice. More...
 
#define GINPUT_KEYBOARD_POLL_PERIOD   200
 Milliseconds between keyboard polls. More...
 
#define GKEYBOARD_DRIVER_LIST   GMOUSEVMT_Win32, GMOUSEVMT_Win32
 Define multiple static keyboards. More...
 
#define GKEYBOARD_LAYOUT_OFF   FALSE
 Turn off the layout engine. More...
 
#define GKEYBOARD_LAYOUT_SCANCODE2_US   FALSE
 Various Keyboard Layouts that can be included. More...
 

Macro Definition Documentation

#define GINPUT_KEYBOARD_POLL_PERIOD   200

Milliseconds between keyboard polls.

Defaults to 200 milliseconds

Note
How often keyboards should be polled.

Definition at line 179 of file ginput_options.h.

#define GINPUT_MOUSE_CLICK_TIME   300

Maximum length of CLICK in milliseconds.

Defaults to 300 milliseconds

Note
Mouse down to Mouse up times greater than this are not clicks.

Definition at line 133 of file ginput_options.h.

#define GINPUT_MOUSE_POLL_PERIOD   25

Milliseconds between mouse polls.

Defaults to 25 milliseconds

Note
How often mice should be polled. More often leads to smoother mouse movement but increases CPU usage.

Definition at line 124 of file ginput_options.h.

#define GINPUT_NEED_DIAL   FALSE

Should analog dial functions be included.

Defaults to FALSE

Note
Also add a dial hardware driver to your makefile. Eg. include /drivers/ginput/dial/analog/driver.mk

Definition at line 61 of file ginput_options.h.

#define GINPUT_NEED_KEYBOARD   FALSE

Should keyboard functions be included.

Defaults to FALSE

Note
Also add a keyboard hardware driver to your makefile. Eg. include /drivers/ginput/keyboard/XXXX/driver.mk

Definition at line 41 of file ginput_options.h.

#define GINPUT_NEED_MOUSE   FALSE

Should mouse/touch functions be included.

Defaults to FALSE

Note
Also add a mouse/touch hardware driver to your makefile. Eg. include /drivers/ginput/touch/MCU/driver.mk

Definition at line 31 of file ginput_options.h.

#define GINPUT_NEED_TOGGLE   FALSE

Should hardware toggle/switch/button functions be included.

Defaults to FALSE

Note
Also add a toggle hardware driver to your makefile. Eg. include /drivers/ginput/toggle/Pal/driver.mk

Definition at line 51 of file ginput_options.h.

#define GINPUT_TOUCH_CXTCLICK_TIME   500

Milliseconds to generate a CXTCLICK on a touch device.

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.

Definition at line 142 of file ginput_options.h.

#define GINPUT_TOUCH_NOCALIBRATE   FALSE

Turn off all touch calibration support.

Defaults to FALSE

Note
With this set to TRUE touch readings will not be calibrated.
This automatically turns off the calibration GUI too!
Calibration requires a lot of code. If your device doesn't require it using this option can save a lot of space.

Definition at line 105 of file ginput_options.h.

#define GINPUT_TOUCH_NOCALIBRATE_GUI   FALSE

Turn off the touch calibration GUI.

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.
Calibration requires a lot of code. If your device doesn't require it using this option can save a lot of space.

Definition at line 94 of file ginput_options.h.

#define GINPUT_TOUCH_NOTOUCH   FALSE

Turn off all touch support.

Defaults to FALSE

Note
This automatically turns off all calibration and the calibration GUI too!
Touch device handling requires a lot of code. If your device doesn't require it using this option can save a lot of space.

Definition at line 115 of file ginput_options.h.

#define GINPUT_TOUCH_STARTRAW   FALSE

Start touch devices without loading or running calibration.

Defaults to FALSE

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.

Definition at line 82 of file ginput_options.h.

#define GINPUT_TOUCH_USER_CALIBRATION_LOAD   FALSE

There is a user supplied routine to load mouse calibration data.

Defaults to FALSE

Note
If TRUE the user must supply the LoadMouseCalibration() routine.

Definition at line 150 of file ginput_options.h.

#define GINPUT_TOUCH_USER_CALIBRATION_SAVE   FALSE

There is a user supplied routine to save mouse calibration data.

Defaults to FALSE

Note
If TRUE the user must supply the SaveMouseCalibration() routine.

Definition at line 158 of file ginput_options.h.

#define GKEYBOARD_DRIVER_LIST   GMOUSEVMT_Win32, GMOUSEVMT_Win32

Define multiple static keyboards.

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.
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.

Definition at line 192 of file ginput_options.h.

#define GKEYBOARD_LAYOUT_OFF   FALSE

Turn off the layout engine.

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.

Definition at line 201 of file ginput_options.h.

#define GKEYBOARD_LAYOUT_SCANCODE2_US   FALSE

Various Keyboard Layouts that can be included.

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 ginputSetKeyboardLayout() to set the active layout.
Multiple layouts can be included but only one will be active at a time (per keyboard).

Definition at line 215 of file ginput_options.h.

#define GMOUSE_DRIVER_LIST   GMOUSEVMT_Win32, GMOUSEVMT_Win32

Define multiple static mice.

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.
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.

Definition at line 171 of file ginput_options.h.