Class DropControllerMotion

All Implemented Interfaces:
PointerInterface

public class DropControllerMotion extends EventController
`GtkDropControllerMotion` is an event controller tracking
the pointer during Drag-and-Drop operations.

It is modeled after [class@Gtk.EventControllerMotion] so if you
have used that, this should feel really familiar.

This controller is not able to accept drops, use [class@Gtk.DropTarget]
for that purpose.

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

  • Field Details

  • Constructor Details

    • DropControllerMotion

      public DropControllerMotion(PointerContainer pointer)
    • DropControllerMotion

      public DropControllerMotion()
      Creates a new event controller that will handle pointer motion
      events during drag and drop.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • containsPointer

      public boolean containsPointer()
      Returns if a Drag-and-Drop operation is within the widget
      @self or one of its children.
      Returns:
      %TRUE if a dragging pointer is within @self or one of its children.
    • getDrop

      public Drop getDrop()
      Returns the `GdkDrop` of a current Drag-and-Drop operation
      over the widget of @self.
      Returns:
      The `GdkDrop` currently happening within @self
    • isPointer

      public boolean isPointer()
      Returns if a Drag-and-Drop operation is within the widget
      @self, not one of its children.
      Returns:
      %TRUE if a dragging pointer is within @self but not one of its children
    • onEnter

      Connect to signal "enter".
      See DropControllerMotion.OnEnter.onEnter(double, double) for signal description.
      Field SIGNAL_ON_ENTER 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.
    • onLeave

      Connect to signal "leave".
      See DropControllerMotion.OnLeave.onLeave() for signal description.
      Field SIGNAL_ON_LEAVE 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.
    • onMotion

      public SignalHandler onMotion(DropControllerMotion.OnMotion signal)
      Connect to signal "motion".
      See DropControllerMotion.OnMotion.onMotion(double, double) for signal description.
      Field SIGNAL_ON_MOTION 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()