Loading...
Searching...
No Matches
Gesture Frames
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 » Gesture Filter » Gesture Subscription

Gesture state information. More...

## Data Structures

class | GeisGroup
| A collection of gesture frames. More...
class | GeisGroupSet
| A collection of GeisGroups. More...
class | GeisTouch
| An instance of a touch. More...
class | GeisTouchId
| Relates a touch in a frame to a touch object in a set. More...
class | GeisTouchSet
| A collection of GeisTouch. More...
class | GeisFrame
| A collection of information describing the state of a gesture. More...

## Variables

uint32_t | win_type
| Selects the implementation-specific window type.
void * | win_info
| Additional info dependent on the window type.
GeisInputCallback | added
| Receives new input device notices.
GeisInputCallback | changed
| Receives modified input device notices.
GeisInputCallback | removed
| Receives removes input device notices.
GeisString | name
| The name of the gesture attribute.
GeisAttrType | type
| The data type of the gesture attribute.
GeisBoolean boolean_val |
GeisFloat float_val |
GeisInteger integer_val |
GeisString string_val |
union { |
GeisBoolean boolean_val |
GeisFloat float_val |
GeisInteger integer_val |
GeisString string_val |
}; |
| The value of the attributes.
GeisGestureCallback | added
| Invoked when a new gesture type has been defined.
GeisGestureCallback | removed
| Invoked when a defined gesture type is no longer available.
GeisGestureCallback | start
| Invoked when a new gesture starts.
GeisGestureCallback | update
| Invoked when a gesture has changed values.
GeisGestureCallback | finish
| Invoked when a gesture finishes.

## Touch Attributes

  Each touch has zero or more attributes associated with it. Differing hardware is capable of reporting differing sets of touch attributes, so there is no guarantee that any or all of the defined touch attributes will bre present.

If the touch comes from a direct device (see GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH) its position (x and y attributes) will be in window coordinates, otherwise it will be in the input device's own coordinate system.

GeisStatus | geis_gesture_accept (Geis geis, GeisGroup group, GeisGestureId gesture_id)
| Marks a gesture as accepted.
GeisStatus | geis_gesture_reject (Geis geis, GeisGroup group, GeisGestureId gesture_id)
| Marks a gesture as rejected.
GeisSize | geis_groupset_group_count (GeisGroupSet groupset)
| Gets the number of gesture groups in a groupset.
GeisGroup | geis_groupset_group (GeisGroupSet groupset, GeisSize index)
| Gets an indicated gesture group from a groupset.
GeisInteger | geis_group_id (GeisGroup group)
| Gets the identifier of a gesture group.
GeisSize | geis_group_frame_count (GeisGroup group)
| Gets the number of gesture frames in a gesture group.
GeisFrame | geis_group_frame (GeisGroup group, GeisSize index)
| Gets an indicated gesture frame from a gesture group.
void | geis_group_reject (GeisGroup group)
| Marks a gesture group as rejected.
GeisSize | geis_touchset_touch_count (GeisTouchSet touchset)
| Gets the number of touches in a touchset.
GeisTouch | geis_touchset_touch (GeisTouchSet touchset, GeisSize index)
| Gets an indicated touch from a touchset.
GeisTouch | geis_touchset_touch_by_id (GeisTouchSet touchset, GeisTouchId touchid)
| Gets an identified touch from a touchset.
GeisTouchId | geis_touch_id (GeisTouch touch)
| Gets the identifier of a touch.
GeisSize | geis_touch_attr_count (GeisTouch touch)
| Gets the number of attrs associated with a touch.
GeisAttr | geis_touch_attr (GeisTouch touch, GeisSize index)
| Gets an indicated attr from a touch.
GeisAttr | geis_touch_attr_by_name (GeisTouch touch, GeisString name)
| Gets a named attr from a touch.
GeisGestureId | geis_frame_id (GeisFrame frame)
| Gets the identifier of a gesture frame.
GeisBoolean | geis_frame_is_class (GeisFrame frame, GeisGestureClass gesture_class)
| Indicates if a gesture frame belongs to a gesture class.
GeisSize | geis_frame_attr_count (GeisFrame frame)
| Gets the number of attrs associated with a gesture frame.
GeisAttr | geis_frame_attr (GeisFrame frame, GeisSize index)
| Gets an indicated attr from a gesture frame.
GeisAttr | geis_frame_attr_by_name (GeisFrame frame, GeisString name)
| Gets a named attr from a gesture frame.
GeisFloat * | geis_frame_matrix (GeisFrame frame)
| Gets the current transform matrix of a gesture.
GeisSize | geis_frame_touchid_count (GeisFrame frame)
| Gets the number of touches making up a gesture for the frame.
GeisTouchId | geis_frame_touchid (GeisFrame frame, GeisSize index)
| Gets the ID of the indicated touch within the gesture frame.
#define | GEIS_TOUCH_ATTRIBUTE_ID
| Identifies the touch.
#define | GEIS_TOUCH_ATTRIBUTE_X
| The X coordinate of the touch.
#define | GEIS_TOUCH_ATTRIBUTE_Y
| The Y coordinate of the touch.

## Gesture Frame Event Attributes

  A gesture event (GEIS_EVENT_GESTURE_BEGIN, GEIS_EVENT_GESTURE_UPDATE, GEIS_EVENT_GESTURE_END) should have two GEIS_ATTR_TYPE_POINTER attributes, one containing a GeisGroupSet and one containing a GeisTouchSet.

For example: If four fingers are being simultaneously moved over a touchpad or touchscreen surface, Geis could start generating gesture events containing two groups: One group having a single frame from a four-fingers gesture of some class and a second group having two frames, each from a different two-fingers gesture (like one from a Rotate and the other from a Pinch gesture). This means that geis could interpret the movements of those four touch points as both a single four-fingers gesture and as two separate two-fingers gestures.

There can be only a single frame per gesture in a gesture event. I.e. no two frames will return the same GeisGestureId in the same gesture event.

#define | GEIS_EVENT_ATTRIBUTE_GROUPSET
| The event attribute containing a pointer to a GeisGroupSet.
#define | GEIS_EVENT_ATTRIBUTE_TOUCHSET
| The event attribute containing a pointer to a GeisTouchSet.
#define | GEIS_EVENT_ATTRIBUTE_CONSTRUCTION_FINISHED
| Event attribute containing a boolean.

## Detailed Description

Gesture state information.

Gesture frames, and their associated groups and touches, convey information about the current state of recognized gestures.

## Macro Definition Documentation

## GEIS_EVENT_ATTRIBUTE_CONSTRUCTION_FINISHED

#define GEIS_EVENT_ATTRIBUTE_CONSTRUCTION_FINISHED

Event attribute containing a boolean.

This property allows the client to determine if all the possible gestures from the set of touches in this event have already been presented. When this value is true, the client will have received all the information needed to make a gesture accept and reject decision based on potentially overlapping gestures. An example is when both one and two touch gestures are subscribed on the same window with the same gesture classes and thresholds. When this property is true for one touch gesture events, the client can be sure there are no other touches unless a two touch gesture event has already been sent. Another example is when you subscribe for three touches Touch and four touches Drag. As soon as a third finger is detected a three touches Touch gesture will begin, but you cannot be sure a fourth finger isn't coming right after (that can eventually cause a four touches Drag) until this property is true.

## GEIS_EVENT_ATTRIBUTE_GROUPSET

#define GEIS_EVENT_ATTRIBUTE_GROUPSET

The event attribute containing a pointer to a GeisGroupSet.

Examples
  geis2.c.

## GEIS_EVENT_ATTRIBUTE_TOUCHSET

#define GEIS_EVENT_ATTRIBUTE_TOUCHSET

The event attribute containing a pointer to a GeisTouchSet.

Examples
  geis2.c.

## GEIS_TOUCH_ATTRIBUTE_ID

#define GEIS_TOUCH_ATTRIBUTE_ID

Identifies the touch.

## GEIS_TOUCH_ATTRIBUTE_X

#define GEIS_TOUCH_ATTRIBUTE_X

The X coordinate of the touch.

## GEIS_TOUCH_ATTRIBUTE_Y

#define GEIS_TOUCH_ATTRIBUTE_Y

The Y coordinate of the touch.

## Function Documentation

## geis_frame_attr()

GeisAttr geis_frame_attr | ( | GeisFrame | frame,
|  | GeisSize | index )

Gets an indicated attr from a gesture frame.

Parameters

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

## geis_frame_attr_by_name()

GeisAttr geis_frame_attr_by_name | ( | GeisFrame | frame,
|  | GeisString | name )

Gets a named attr from a gesture frame.

Parameters

  [in] | frame | The gesture frame.
  [in] | name | Names the attr to retrieve, such as one of the GEIS_GESTURE_ATTRIBUTE_* constants.

Returns
  the named attr if it is present, NULL otherwise.

Usage example:

GeisAttr angle = geis_frame_attr_by_name(frame, GEIS_GESTURE_ATTRIBUTE_ANGLE);
GEIS_GESTURE_ATTRIBUTE_ANGLE
#define GEIS_GESTURE_ATTRIBUTE_ANGLE
Angle covered by a gesture since it has started, in radians, counterclockwise.
Definition geis.h:334
GeisFrame::geis_frame_attr_by_name
GeisAttr geis_frame_attr_by_name(GeisFrame frame, GeisString name)
Gets a named attr from a gesture frame.

## geis_frame_attr_count()

GeisSize geis_frame_attr_count | ( | GeisFrame | frame | ) |

Gets the number of attrs associated with a gesture frame.

Parameters

  [in] | frame | The gesture frame.

## geis_frame_id()

GeisGestureId geis_frame_id | ( | GeisFrame | frame | ) |

Gets the identifier of a gesture frame.

Parameters

  [in] | frame | the gesture frame.

Returns
  the identifier of the gesture to which the given frame belongs.

## geis_frame_is_class()

GeisBoolean geis_frame_is_class | ( | GeisFrame | frame,
|  | GeisGestureClass | gesture_class )

Indicates if a gesture frame belongs to a gesture class.

Parameters

  [in] | frame | The gesture frame.
  [in] | gesture_class | The gesture class.

Returns
  true if the gesture can currently be classified by the `gesture_class`, false otherwise.

## geis_frame_matrix()

GeisFloat * geis_frame_matrix | ( | GeisFrame | frame | ) |

Gets the current transform matrix of a gesture.

Parameters

  [in] | frame | The gesture frame.

## geis_frame_touchid()

GeisTouchId geis_frame_touchid | ( | GeisFrame | frame,
|  | GeisSize | index )

Gets the ID of the indicated touch within the gesture frame.

Parameters

  [in] | frame | The gesture frame.
  [in] | index | Indicates which touch ID to retrieve.

## geis_frame_touchid_count()

GeisSize geis_frame_touchid_count | ( | GeisFrame | frame | ) |

Gets the number of touches making up a gesture for the frame.

Parameters

  [in] | frame | The gesture frame.

## geis_gesture_accept()

GeisStatus geis_gesture_accept | ( | Geis | geis,
|  | GeisGroup | group,
|  | GeisGestureId | gesture_id )

Marks a gesture as accepted.

Parameters

  [in] | geis | The GEIS instance.
  [in] | group | The gesture group containing the accepted gesture.
  [in] | gesture_id | Identifies the gesture.

See also
  geis_frame_id

## geis_gesture_reject()

GeisStatus geis_gesture_reject | ( | Geis | geis,
|  | GeisGroup | group,
|  | GeisGestureId | gesture_id )

Marks a gesture as rejected.

Parameters

  [in] | geis | The GEIS instance.
  [in] | group | The gesture group containing the rejected gesture.
  [in] | gesture_id | Identifies the gesture.

After you reject a gesture you no longer get its frames.

See also
  geis_frame_id

## geis_group_frame()

GeisFrame geis_group_frame | ( | GeisGroup | group,
|  | GeisSize | index )

Gets an indicated gesture frame from a gesture group.

Parameters

  [in] | group | The gesture group.
  [in] | index | Indicates which gesture frame to retrieve.

## geis_group_frame_count()

GeisSize geis_group_frame_count | ( | GeisGroup | group | ) |

Gets the number of gesture frames in a gesture group.

Parameters

  [in] | group | The gesture group.

## geis_group_id()

GeisInteger geis_group_id | ( | GeisGroup | group | ) |

Gets the identifier of a gesture group.

Parameters

  [in] | group | The gesture group.

## geis_group_reject()

void geis_group_reject | ( | GeisGroup | group | ) |

Marks a gesture group as rejected.

Parameters

  [in] | group | The gesture group to reject.

## geis_groupset_group()

GeisGroup geis_groupset_group | ( | GeisGroupSet | groupset,
|  | GeisSize | index )

Gets an indicated gesture group from a groupset.

Parameters

  [in] | groupset | The groupset.
  [in] | index | Indicates which gesture group to retrieve.

## geis_groupset_group_count()

GeisSize geis_groupset_group_count | ( | GeisGroupSet | groupset | ) |

Gets the number of gesture groups in a groupset.

Parameters

  [in] | groupset | The groupset.

## geis_touch_attr()

GeisAttr geis_touch_attr | ( | GeisTouch | touch,
|  | GeisSize | index )

Gets an indicated attr from a touch.

Parameters

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

## geis_touch_attr_by_name()

GeisAttr geis_touch_attr_by_name | ( | GeisTouch | touch,
|  | GeisString | name )

Gets a named attr from a touch.

Parameters

  [in] | touch | The touch.
  [in] | name | Names the attr to retrieve.

Returns
  the named attr if it is present, NULL otherwise.

## geis_touch_attr_count()

GeisSize geis_touch_attr_count | ( | GeisTouch | touch | ) |

Gets the number of attrs associated with a touch.

Parameters

  [in] | touch | The touch.

## geis_touch_id()

GeisTouchId geis_touch_id | ( | GeisTouch | touch | ) |

Gets the identifier of a touch.

Parameters

  [in] | touch | The touch.

## geis_touchset_touch()

GeisTouch geis_touchset_touch | ( | GeisTouchSet | touchset,
|  | GeisSize | index )

Gets an indicated touch from a touchset.

Parameters

  [in] | touchset | The touchset.
  [in] | index | Indicates which touch to retrieve.

## geis_touchset_touch_by_id()

GeisTouch geis_touchset_touch_by_id | ( | GeisTouchSet | touchset,
|  | GeisTouchId | touchid )

Gets an identified touch from a touchset.

Parameters

  [in] | touchset | The touchset.
  [in] | touchid | Identifies a touch.

Returns the identified touch, or NULL if the touchid is not in the touchset.

## geis_touchset_touch_count()

GeisSize geis_touchset_touch_count | ( | GeisTouchSet | touchset | ) |

Gets the number of touches in a touchset.

Parameters

  [in] | touchset | The touchset,

## Variable Documentation

## [union]

__extension__ union { ... }

The value of the attributes.

## added [1/2]

GeisGestureCallback added

Invoked when a new gesture type has been defined.

## added [2/2]

GeisInputCallback added

Receives new input device notices.

## changed

GeisInputCallback changed

Receives modified input device notices.

## finish

GeisGestureCallback finish

Invoked when a gesture finishes.

## name

GeisString name

The name of the gesture attribute.

## removed [1/2]

GeisGestureCallback removed

Invoked when a defined gesture type is no longer available.

## removed [2/2]

GeisInputCallback removed

Receives removes input device notices.

## start

GeisGestureCallback start

Invoked when a new gesture starts.

## type

GeisAttrType type

The data type of the gesture attribute.

## update

GeisGestureCallback update

Invoked when a gesture has changed values.

## win_info

void* win_info

Additional info dependent on the window type.

## win_type

uint32_t win_type

Selects the implementation-specific window type.