Gtk.GestureRotate

g GObject.Object GObject.Object Gtk.EventController Gtk.EventController GObject.Object->Gtk.EventController Gtk.Gesture Gtk.Gesture Gtk.EventController->Gtk.Gesture Gtk.GestureRotate Gtk.GestureRotate Gtk.Gesture->Gtk.GestureRotate

Subclasses:None

Virtual Methods

Inherited:GObject.Object (7)

Signals

Inherited:Gtk.Gesture (5), GObject.Object (1)
Name Short Description
angle-changed This signal is emitted when the angle between both tracked points changes.

Class Details

class Gtk.GestureRotate(**kwargs)
Bases:Gtk.Gesture
Abstract:No
Structure:Gtk.GestureRotateClass

Gtk.GestureRotate is a Gtk.Gesture implementation able to recognize 2-finger rotations, whenever the angle between both handled sequences changes, the Gtk.GestureRotate ::angle-changed signal is emitted.

classmethod new(widget)[source]
Parameters:widget (Gtk.Widget) – a Gtk.Widget
Returns:a newly created Gtk.GestureRotate
Return type:Gtk.Gesture

Returns a newly created Gtk.Gesture that recognizes 2-touch rotation gestures.

New in version 3.14.

get_angle_delta()[source]
Returns:the angle delta in radians
Return type:float

If self is active, this function returns the angle difference in radians since the gesture was first recognized. If self is not active, 0 is returned.

New in version 3.14.

Signal Details

Gtk.GestureRotate.signals.angle_changed(gesture_rotate, angle, angle_delta)
Signal Name:

angle-changed

Flags:

RUN_FIRST

Parameters:
  • gesture_rotate (Gtk.GestureRotate) – The object which received the signal
  • angle (float) – Current angle in radians
  • angle_delta (float) – Difference with the starting angle, in radians

This signal is emitted when the angle between both tracked points changes.

New in version 3.14.