µGFX  2.9
version 2.9
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 GFXON 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   GFXOFF
 Should mouse/touch functions be included. More...
 
#define GINPUT_NEED_KEYBOARD   GFXOFF
 Should keyboard functions be included. More...
 
#define GINPUT_NEED_TOGGLE   GFXOFF
 Should hardware toggle/switch/button functions be included. More...
 
#define GINPUT_NEED_DIAL   GFXOFF
 Should analog dial functions be included. More...
 

GINPUT Optional Low Level Driver Defines

#define GINPUT_TOUCH_STARTRAW   GFXOFF
 Start touch devices without loading or running calibration. More...
 
#define GINPUT_TOUCH_NOCALIBRATE_GUI   GFXOFF
 Turn off the touch calibration GUI. More...
 
#define GINPUT_TOUCH_NOCALIBRATE   GFXOFF
 Turn off all touch calibration support. More...
 
#define GINPUT_TOUCH_NOTOUCH   GFXOFF
 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   GFXOFF
 There is a user supplied routine to load mouse calibration data. More...
 
#define GINPUT_TOUCH_USER_CALIBRATION_SAVE   GFXOFF
 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   GFXOFF
 Turn off the layout engine. More...
 
#define GKEYBOARD_LAYOUT_SCANCODE2_US   GFXOFF
 Various Keyboard Layouts that can be included. More...
 

Macro Definition Documentation

◆ GINPUT_KEYBOARD_POLL_PERIOD

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

◆ GINPUT_MOUSE_CLICK_TIME

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

◆ GINPUT_MOUSE_POLL_PERIOD

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

◆ GINPUT_NEED_DIAL

#define GINPUT_NEED_DIAL   GFXOFF

Should analog dial functions be included.

Defaults to GFXOFF

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.

◆ GINPUT_NEED_KEYBOARD

#define GINPUT_NEED_KEYBOARD   GFXOFF

Should keyboard functions be included.

Defaults to GFXOFF

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.

◆ GINPUT_NEED_MOUSE

#define GINPUT_NEED_MOUSE   GFXOFF

Should mouse/touch functions be included.

Defaults to GFXOFF

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.

◆ GINPUT_NEED_TOGGLE

#define GINPUT_NEED_TOGGLE   GFXOFF

Should hardware toggle/switch/button functions be included.

Defaults to GFXOFF

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.

◆ GINPUT_TOUCH_CXTCLICK_TIME

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

◆ GINPUT_TOUCH_NOCALIBRATE

#define GINPUT_TOUCH_NOCALIBRATE   GFXOFF

Turn off all touch calibration support.

Defaults to GFXOFF

Note
With this set to GFXON 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.

◆ GINPUT_TOUCH_NOCALIBRATE_GUI

#define GINPUT_TOUCH_NOCALIBRATE_GUI   GFXOFF

Turn off the touch calibration GUI.

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

◆ GINPUT_TOUCH_NOTOUCH

#define GINPUT_TOUCH_NOTOUCH   GFXOFF

Turn off all touch support.

Defaults to GFXOFF

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.

◆ GINPUT_TOUCH_STARTRAW

#define GINPUT_TOUCH_STARTRAW   GFXOFF

Start touch devices without loading or running calibration.

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.

Definition at line 82 of file ginput_options.h.

◆ GINPUT_TOUCH_USER_CALIBRATION_LOAD

#define GINPUT_TOUCH_USER_CALIBRATION_LOAD   GFXOFF

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

Defaults to GFXOFF

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

Definition at line 150 of file ginput_options.h.

◆ GINPUT_TOUCH_USER_CALIBRATION_SAVE

#define GINPUT_TOUCH_USER_CALIBRATION_SAVE   GFXOFF

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

Defaults to GFXOFF

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

Definition at line 158 of file ginput_options.h.

◆ GKEYBOARD_DRIVER_LIST

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

◆ GKEYBOARD_LAYOUT_OFF

#define GKEYBOARD_LAYOUT_OFF   GFXOFF

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.

◆ GKEYBOARD_LAYOUT_SCANCODE2_US

#define GKEYBOARD_LAYOUT_SCANCODE2_US   GFXOFF

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.

◆ GMOUSE_DRIVER_LIST

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