Loading...
Searching...
No Matches
Gesture Filter
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 » Input Devices » Gesture Classes » Gesture Regions

## Topics

| Gesture Subscription

## Data Structures

class | GeisFilter
| Selects a subset of possible gestures in a subscription. More...

## Region Initialization Arguments

  Gesture regions are created to describe a particular display/feedback region. The type of the region can not be changed after creation (just create a new region for that). The types of regions are platform specific and each type may require addition arguments.

  The following region initialization argument names are required by the GEIS v2.0 specification.

enum | _GeisFilterFacility { GEIS_FILTER_DEVICE , GEIS_FILTER_CLASS , GEIS_FILTER_REGION , GEIS_FILTER_SPECIAL }
| Indicates the type of filter. More...
enum | _GeisFilterOperation { GEIS_FILTER_OP_EQ , GEIS_FILTER_OP_NE , GEIS_FILTER_OP_GT , GEIS_FILTER_OP_GE , GEIS_FILTER_OP_LT , GEIS_FILTER_OP_LE }
| Indicates the type of filter operation. More...
typedef enum _GeisFilterFacility | GeisFilterFacility
| Indicates the type of filter.
typedef enum _GeisFilterOperation | GeisFilterOperation
| Indicates the type of filter operation.
GeisFilter | geis_filter_new (Geis geis, GeisString name)
| Creates a new, empty filter.
GeisFilter | geis_filter_clone (GeisFilter original, GeisString name)
| Creates a new filter by copying an existing filter.
GeisStatus | geis_filter_delete (GeisFilter filter)
| Destroys a GeisFilter.
GeisString | geis_filter_name (GeisFilter filter)
| Gets the name given to the filter when it was created.
GEIS_VARARG GeisStatus | geis_filter_add_term (GeisFilter filter, GeisFilterFacility facility,...)
| Adds a term to a filter.

## Detailed Description

## Typedef Documentation

## GeisFilterFacility

typedef enum _GeisFilterFacility GeisFilterFacility

Indicates the type of filter.

## GeisFilterOperation

typedef enum _GeisFilterOperation GeisFilterOperation

Indicates the type of filter operation.

## Enumeration Type Documentation

## _GeisFilterFacility

enum _GeisFilterFacility

Indicates the type of filter.

Enumerator
GEIS_FILTER_DEVICE | Filters on device attributes.
GEIS_FILTER_CLASS | Filters on gesture class and gesture attributes.
GEIS_FILTER_REGION | Filters on region attributes.
GEIS_FILTER_SPECIAL | Filters on special attributes.

## _GeisFilterOperation

enum _GeisFilterOperation

Indicates the type of filter operation.

Enumerator
GEIS_FILTER_OP_EQ | Compares for equality.
GEIS_FILTER_OP_NE | Compares for inequality.
GEIS_FILTER_OP_GT | Compares for greater-than.
GEIS_FILTER_OP_GE | Compares for greater-than-or-equal.
GEIS_FILTER_OP_LT | Compares for less-than.
GEIS_FILTER_OP_LE | Compares for less-tha-or-equal.

## Function Documentation

## geis_filter_add_term()

GEIS_VARARG GeisStatus geis_filter_add_term | ( | GeisFilter | filter,
|  | GeisFilterFacility | facility,
|  |  | ... )

Adds a term to a filter.

Parameters

  [in] | filter | The filter.
  [in] | facility | The term facility.
  [in] | ... | A list of zero or more term descriptions.

A term description is generally a (attr-name, filter-op, value) triple in which the meaning of the filter-op and value depend on the type of the attr.

The term description list must be terminated by a NULL.

In the following example we add terms to filter drag gestures made with three touch points:

geis_filter_add_term(filter,
GEIS_FILTER_CLASS,
GEIS_CLASS_ATTRIBUTE_NAME, GEIS_FILTER_OP_EQ, GEIS_GESTURE_DRAG,
GEIS_GESTURE_ATTRIBUTE_TOUCHES, GEIS_FILTER_OP_EQ, 3,
NULL);
GEIS_CLASS_ATTRIBUTE_NAME
#define GEIS_CLASS_ATTRIBUTE_NAME
The name of the gesture class.
Definition geis.h:1512
GEIS_FILTER_CLASS
@ GEIS_FILTER_CLASS
Filters on gesture class and gesture attributes.
Definition geis.h:1714
GEIS_FILTER_OP_EQ
@ GEIS_FILTER_OP_EQ
Compares for equality.
Definition geis.h:1724
GeisFilter::geis_filter_add_term
GEIS_VARARG GeisStatus geis_filter_add_term(GeisFilter filter, GeisFilterFacility facility,...)
Adds a term to a filter.

Term descriptions are usually ANDed together, so that specifying a class name and a number of touches will filter only for gestures that have both characteristics. But if you specify several class names (e.g. drag and pinch), those classes are ORed together instead. So you can receive events from a gesture that belongs to either drag, drag&pinch or only pinch classes.

## geis_filter_clone()

GeisFilter geis_filter_clone | ( | GeisFilter | original,
|  | GeisString | name )

Creates a new filter by copying an existing filter.

Parameters

  [in] | original | An existing geisFilter instance.
  [in] | name | A name.

The original filter remains unchanged.

Returns
  a GeisFilter object or NULL on failure.

## geis_filter_delete()

GeisStatus geis_filter_delete | ( | GeisFilter | filter | ) |

Destroys a GeisFilter.

Parameters

  [in] | filter | The filter.

## geis_filter_name()

GeisString geis_filter_name | ( | GeisFilter | filter | ) |

Gets the name given to the filter when it was created.

Parameters

  [in] | filter | The filter.

## geis_filter_new()

GeisFilter geis_filter_new | ( | Geis | geis,
|  | GeisString | name )

Creates a new, empty filter.

Parameters

  [in] | geis | The GEIS API instance.
  [in] | name | A name.

Returns
  a GeisFilter object or NULL on failure.