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

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

Fields

Inherited:SugarGestures.EventController (3), GObject.Object (1)
Name Type Access Description
parent_instance SugarGestures.EventController 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