GEIS  2.0
Gesture Engine Interface Support
Input Devices

Data Structures

class  GeisDevice
 A gesture-capable input device. More...

Functions

void geis_register_device_callback (Geis geis, GeisEventCallback event_callback, void *context)
GeisDevice geis_get_device (Geis geis, GeisInteger device_id)
 Gets a cached device description for an identified device.
GeisDevice geis_device_ref (GeisDevice device)
 Adds a reference count to a device.
void geis_device_unref (GeisDevice device)
 Removes a reference count from a device.
GeisString geis_device_name (GeisDevice device)
 Gets the name of the input device.
GeisInteger geis_device_id (GeisDevice device)
 Gets the system identifier of the iput device.
GeisSize geis_device_attr_count (GeisDevice device)
 Gets the number of attributes of the device.
GeisAttr geis_device_attr (GeisDevice device, GeisSize index)
 Gets the indicated attribute of the device.
GeisAttr geis_device_attr_by_name (GeisDevice device, GeisString attr_name)
 Gets a named attribute from the device.

Device Event Attributes

#define GEIS_EVENT_ATTRIBUTE_DEVICE
 The event attribute containing a pointer to a GeisDevice.

Device Attributes

#define GEIS_DEVICE_ATTRIBUTE_NAME
 The name of the input device.
#define GEIS_DEVICE_ATTRIBUTE_ID
 The unique integer ID of the device.
#define GEIS_DEVICE_ATTRIBUTE_TOUCHES
 The maximum number of touches a device is capable of reporting.
#define GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH
 Indicates the device is a direct touch device.
#define GEIS_DEVICE_ATTRIBUTE_INDEPENDENT_TOUCH
 Indicates the device is an independent touch device.
#define GEIS_DEVICE_ATTRIBUTE_MIN_X
 The lower bound of the X-axis (nominally horizontal) coordinate values reported by the device.
#define GEIS_DEVICE_ATTRIBUTE_MAX_X
 The upper bound of the X-axis (nominally horizontal) coordinate values reported by the device.
#define GEIS_DEVICE_ATTRIBUTE_RES_X
 The resolution of the X-axis (nominally horizontal) coordinate values reported by the device.
#define GEIS_DEVICE_ATTRIBUTE_MIN_Y
 The lower bound of the Y-axis (nominally vertical) coordinate values reported by the device.
#define GEIS_DEVICE_ATTRIBUTE_MAX_Y
 The upper bound of the Y-axis (nominally vertical) coordinate values reported by the device.
#define GEIS_DEVICE_ATTRIBUTE_RES_Y
 The resolution of the Y-axis (nominally vertical) coordinate values reported by the device.

Define Documentation

Indicates the device is a direct touch device.

The present of this boolean attribute with a value of GEIS_TRUE indicates the device is a direct touch multi-touch device (for example, a touchscreen), otherwise it is an indirect touch device (such as a touchpad) or not a touch device at all.

The attribute value is of type GeisBoolean.

The unique integer ID of the device.

Guaranteed unique within a Geis instance.

The attribute values is of type GeisInteger.

Indicates the device is an independent touch device.

The presence of this boolean attribute with a value of GEIS_TRUE indicates the device is an independent touch device (for example, an Apple MagicMouse). Other multi-touch devices should report GEIS_FALSE.

The attribute value is of type GeisBoolean.

The upper bound of the X-axis (nominally horizontal) coordinate values reported by the device.

The attribute values is of type GeisFloat.

The upper bound of the Y-axis (nominally vertical) coordinate values reported by the device.

The attribute values is of type GeisFloat.

The lower bound of the X-axis (nominally horizontal) coordinate values reported by the device.

The attribute values is of type GeisFloat.

The lower bound of the Y-axis (nominally vertical) coordinate values reported by the device.

The attribute values is of type GeisFloat.

The name of the input device.

Not guaranteed unique.

The attribute value is of type GeisString.

The resolution of the X-axis (nominally horizontal) coordinate values reported by the device.

The attribute values is of type GeisFloat.

The resolution of the Y-axis (nominally vertical) coordinate values reported by the device.

The attribute values is of type GeisFloat.

The maximum number of touches a device is capable of reporting.

This integer is the number if simultaneous touches the device claims to be able to detect if it is a multi-touch device. A value of zero indicates the maximum number of touches can not be determined.

The attribute value is of type GeisInteger.

The event attribute containing a pointer to a GeisDevice.

The GEIS_EVENT_DEVICE_AVAILABLE and GEIS_EVENT_DEVICE_UNAVAILABLE events should have a GEIS_ATTR_TYPE_POINTER attribute with this name. It should contain a pointer to a GeisDevice describing the device made available or unavailable.


Function Documentation

GeisAttr geis_device_attr ( GeisDevice  device,
GeisSize  index 
)

Gets the indicated attribute of the device.

Parameters:
[in]deviceThe device.
[in]indexIndicates which attr to retrieve.
GeisAttr geis_device_attr_by_name ( GeisDevice  device,
GeisString  attr_name 
)

Gets a named attribute from the device.

Parameters:
[in]deviceThe device.
[in]attr_nameThe name of the attribute to retrieve.
GeisSize geis_device_attr_count ( GeisDevice  device)

Gets the number of attributes of the device.

Parameters:
[in]deviceThe device.
GeisInteger geis_device_id ( GeisDevice  device)

Gets the system identifier of the iput device.

Parameters:
[in]deviceThe device.

The system-defined device identifier is system- and possibly device-dependent.

GeisString geis_device_name ( GeisDevice  device)

Gets the name of the input device.

Parameters:
[in]deviceThe device.

Adds a reference count to a device.

Parameters:
[in]deviceThe device.

An application that wishes to guarantee the device object remains valid should add a reference using this call, and unref when the object is no longer needed.

Returns:
device for syntactic convenience.
void geis_device_unref ( GeisDevice  device)

Removes a reference count from a device.

Parameters:
[in]deviceThe device.

This function decrements the number of references to the device and, if the number of references hits zero, deletes the device.

GeisDevice geis_get_device ( Geis  geis,
GeisInteger  device_id 
)

Gets a cached device description for an identified device.

Parameters:
[in]geisThe GEIS API instance.
[in]device_idIdentifies the device.

The GEIS instance caches a list of gesture-capable input devices that have been reported. The GeisDevice description for an identified device may be retrieved from that cache with this call.

Returns:
a valid GeisDevice for the identified device, or NULL if no such device is in the cache.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines