Class GestureRotate
- All Implemented Interfaces:
Proxy
Recognizes 2-finger rotation gestures.
Whenever the angle between both handled sequences changes, the
Gtk.GestureRotate::angle-changed signal is emitted.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunctional interface declaration of theAngleChangedCallbackcallback.static classGestureRotate.Builder<B extends GestureRotate.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class Gesture
Gesture.BeginCallback, Gesture.CancelCallback, Gesture.EndCallback, Gesture.Gesture$Impl, Gesture.GestureClass, Gesture.SequenceStateChangedCallback, Gesture.UpdateCallbackNested classes/interfaces inherited from class EventController
EventController.EventController$Impl, EventController.EventControllerClassNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new GestureRotate.GestureRotate(MemorySegment address) Create a GestureRotate instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected GestureRotateasParent()Return this instance as if it were its parent type.static GestureRotate.Builder<? extends GestureRotate.Builder> builder()AGestureRotate.Builderobject constructs aGestureRotatewith the specified properties.voidemitAngleChanged(double angle, double angleDelta) Emits the "angle-changed" signal.doubleGets the angle delta in radians.static MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the GestureRotate class.Emitted when the angle between both tracked points changes.Methods inherited from class Gesture
emitBegin, emitCancel, emitEnd, emitSequenceStateChanged, emitUpdate, getBoundingBox, getBoundingBoxCenter, getDevice, getGroup, getLastEvent, getLastUpdatedSequence, getPoint, getSequences, getSequenceState, group, handlesSequence, isActive, isGroupedWith, isRecognized, onBegin, onCancel, onEnd, onSequenceStateChanged, onUpdate, setSequenceState, setState, ungroupMethods inherited from class EventController
getCurrentEvent, getCurrentEventDevice, getCurrentEventState, getCurrentEventTime, getName, getPropagationLimit, getPropagationPhase, getWidget, reset, setName, setPropagationLimit, setPropagationPhase, setStaticNameMethods inherited from class GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
GestureRotate
Create a GestureRotate instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
GestureRotate
public GestureRotate()Create a new GestureRotate.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code. -
getAngleDelta
public double getAngleDelta()Gets the angle delta in radians.
If this GestureRotate is active, this function returns the angle difference in radians since the gesture was first recognized. If this GestureRotate is not active, 0 is returned.
- Returns:
- the angle delta in radians
-
onAngleChanged
public SignalConnection<GestureRotate.AngleChangedCallback> onAngleChanged(GestureRotate.AngleChangedCallback handler) Emitted when the angle between both tracked points changes.- Parameters:
handler- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitAngleChanged
public void emitAngleChanged(double angle, double angleDelta) Emits the "angle-changed" signal. SeeonAngleChanged(GestureRotate.AngleChangedCallback). -
builder
AGestureRotate.Builderobject constructs aGestureRotatewith the specified properties. Use the variousset...()methods to set properties, and finish construction withGestureRotate.Builder.build().- Returns:
- the builder object
-