Class GestureZoom

All Implemented Interfaces:
PointerInterface

public class GestureZoom extends Gesture
`GtkGestureZoom` is a `GtkGesture` for 2-finger pinch/zoom gestures.

Whenever the distance between both tracked sequences changes, the
[signal@Gtk.GestureZoom::scale-changed] signal is emitted to report
the scale factor.

https://docs.gtk.org/gtk4/class.GestureZoom.html

  • Field Details

  • Constructor Details

    • GestureZoom

      public GestureZoom(PointerContainer pointer)
    • GestureZoom

      public GestureZoom()
      Returns a newly created `GtkGesture` that recognizes
      pinch/zoom gestures.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getScaleDelta

      public double getScaleDelta()
      Gets the scale delta.

      If @gesture is active, this function returns the zooming
      difference since the gesture was recognized (hence the
      starting point is considered 1:1). If @gesture is not
      active, 1 is returned.
      Returns:
      the scale delta
    • onScaleChanged

      public SignalHandler onScaleChanged(GestureZoom.OnScaleChanged signal)
      Connect to signal "scale-changed".
      See GestureZoom.OnScaleChanged.onScaleChanged(double) for signal description.
      Field SIGNAL_ON_SCALE_CHANGED contains original signal name and can be used as resource reference.
      Parameters:
      signal - callback function (lambda).
      Returns:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()