Loading...
Searching...
No Matches
Input Devices
The Simplified GEIS Interface » Gesture Types » Gesture Primitives » Standard Gesture Types » Vendor Extension Gesture Types » Initialization and Cleanup » Configuration and Control | The Advanced GEIS Interface » The Geis API Object » Error Reporting » Configuration » Input Devices » Gesture Subscription » Attributes » Event Control

## Topics

| Gesture Classes

## Data Structures

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

## Device Attributes

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

## Device Event Attributes

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

## Detailed Description

## Macro Definition Documentation

## GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH

#define GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH

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.

## GEIS_DEVICE_ATTRIBUTE_ID

#define GEIS_DEVICE_ATTRIBUTE_ID

The unique integer ID of the device.

Guaranteed unique within a Geis instance.

The attribute values is of type GeisInteger.

## GEIS_DEVICE_ATTRIBUTE_INDEPENDENT_TOUCH

#define GEIS_DEVICE_ATTRIBUTE_INDEPENDENT_TOUCH

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.

## GEIS_DEVICE_ATTRIBUTE_MAX_X

#define GEIS_DEVICE_ATTRIBUTE_MAX_X

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

The attribute values is of type GeisFloat.

## GEIS_DEVICE_ATTRIBUTE_MAX_Y

#define GEIS_DEVICE_ATTRIBUTE_MAX_Y

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

The attribute values is of type GeisFloat.

## GEIS_DEVICE_ATTRIBUTE_MIN_X

#define GEIS_DEVICE_ATTRIBUTE_MIN_X

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

The attribute values is of type GeisFloat.

## GEIS_DEVICE_ATTRIBUTE_MIN_Y

#define GEIS_DEVICE_ATTRIBUTE_MIN_Y

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

The attribute values is of type GeisFloat.

## GEIS_DEVICE_ATTRIBUTE_NAME

#define GEIS_DEVICE_ATTRIBUTE_NAME

The name of the input device.

Not guaranteed unique.

The attribute value is of type GeisString.

## GEIS_DEVICE_ATTRIBUTE_RES_X

#define GEIS_DEVICE_ATTRIBUTE_RES_X

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

The attribute values is of type GeisFloat.

## GEIS_DEVICE_ATTRIBUTE_RES_Y

#define GEIS_DEVICE_ATTRIBUTE_RES_Y

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

The attribute values is of type GeisFloat.

## GEIS_DEVICE_ATTRIBUTE_TOUCHES

#define GEIS_DEVICE_ATTRIBUTE_TOUCHES

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.

## GEIS_EVENT_ATTRIBUTE_DEVICE

#define GEIS_EVENT_ATTRIBUTE_DEVICE

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.

Examples
  geis2.c.

## Function Documentation

## geis_device_attr()

GeisAttr geis_device_attr | ( | GeisDevice | device,
|  | GeisSize | index )

Gets the indicated attribute of the device.

Parameters

  [in] | device | The device.
  [in] | index | Indicates which attr to retrieve.

## geis_device_attr_by_name()

GeisAttr geis_device_attr_by_name | ( | GeisDevice | device,
|  | GeisString | attr_name )

Gets a named attribute from the device.

Parameters

  [in] | device | The device.
  [in] | attr_name | The name of the attribute to retrieve.

## geis_device_attr_count()

GeisSize geis_device_attr_count | ( | GeisDevice | device | ) |

Gets the number of attributes of the device.

Parameters

  [in] | device | The device.

## geis_device_id()

GeisInteger geis_device_id | ( | GeisDevice | device | ) |

Gets the system identifier of the iput device.

Parameters

  [in] | device | The device.

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

## geis_device_name()

GeisString geis_device_name | ( | GeisDevice | device | ) |

Gets the name of the input device.

Parameters

  [in] | device | The device.

## geis_device_ref()

GeisDevice geis_device_ref | ( | GeisDevice | device | ) |

Adds a reference count to a device.

Parameters

  [in] | device | The 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.

## geis_device_unref()

void geis_device_unref | ( | GeisDevice | device | ) |

Removes a reference count from a device.

Parameters

  [in] | device | The device.

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

## geis_get_device()

GeisDevice geis_get_device | ( | Geis | geis,
|  | GeisInteger | device_id )

Gets a cached device description for an identified device.

Parameters

  [in] | geis | The GEIS API instance.
  [in] | device_id | Identifies 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.