Class GestureRotate

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class GestureRotate extends Gesture

Recognizes 2-finger rotation gestures.

Whenever the angle between both handled sequences changes, the Gtk.GestureRotate::angle-changed signal is emitted.

  • Constructor Details

    • GestureRotate

      public GestureRotate(MemorySegment address)
      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

      public static @Nullable Type getType()
      Get the GType of the GestureRotate class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected GestureRotate asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Gesture
      Returns:
      the instance as if it were its parent type
    • 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

      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. See onAngleChanged(GestureRotate.AngleChangedCallback).
    • builder

      public static GestureRotate.Builder<? extends GestureRotate.Builder> builder()
      A GestureRotate.Builder object constructs a GestureRotate with the specified properties. Use the various set...() methods to set properties, and finish construction with GestureRotate.Builder.build().
      Returns:
      the builder object