SugarGestures.TouchController

g GObject.Object GObject.Object SugarGestures.EventController SugarGestures.EventController GObject.Object->SugarGestures.EventController SugarGestures.TouchController SugarGestures.TouchController SugarGestures.EventController->SugarGestures.TouchController

Subclasses:

SugarGestures.RotateController, SugarGestures.ZoomController

Methods

Inherited:

SugarGestures.EventController (5), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_center ()

get_coords (sequence)

get_num_touches ()

get_sequences ()

Virtual Methods

Inherited:

SugarGestures.EventController (6), GObject.Object (7)

Properties

Inherited:

SugarGestures.EventController (2)

Name

Type

Flags

Short Description

max-touches

int

r/w/c

Maximum Number of touches

min-touches

int

r/w/c

Minimum Number of touches

Signals

Inherited:

SugarGestures.EventController (3), GObject.Object (1)

Fields

Inherited:

SugarGestures.EventController (3), GObject.Object (1)

Name

Type

Access

Description

parent_instance

SugarGestures.EventController

r

priv

SugarGestures.TouchControllerPrivate

r

Class Details

class SugarGestures.TouchController(**kwargs)
Bases:

SugarGestures.EventController

Abstract:

Yes

Structure:

SugarGestures.TouchControllerClass

get_center()
Returns:

True if a gesture is in progress

center_x:

Return location for the X axis of the bounding box center

center_y:

Return location for the Y axis of the bounding box center

Return type:

(bool, center_x: int, center_y: int)

If a gesture is ongoing, this function returns the center of the bounding box containing all ongoing touches.

get_coords(sequence)
Parameters:

sequence (Gdk.EventSequence) – a Gdk.EventSequence

Returns:

True if sequence operates on self

x:

Return location for the X coordinate of the touch

y:

Return location for the X coordinate of the touch

Return type:

(bool, x: int, y: int)

If sequence is operating on self, this function returns True and fills in x and y with the latest coordinates for that sequence.

get_num_touches()
Returns:

The number of touches

Return type:

int

Returns the number of touches currently operating on self

get_sequences()
Returns:

The list of sequences

Return type:

[Gdk.EventSequence]

Returns the touch sequences currently operating on self

Property Details

SugarGestures.TouchController.props.max_touches
Name:

max-touches

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE, CONSTRUCT

Maximum Number of touches

SugarGestures.TouchController.props.min_touches
Name:

min-touches

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE, CONSTRUCT

Minimum Number of touches