Interface DragSurface

All Superinterfaces:
Proxy
All Known Implementing Classes:
DragSurface.DragSurface$Impl

@Generated("org.javagi.JavaGI") public interface DragSurface extends Proxy
A surface that is used during DND.
  • Method Details

    • getType

      static @Nullable Type getType()
      Get the GType of the DragSurface class.
      Returns:
      the GType
    • present

      default boolean present(int width, int height)
      Present dragSurface.
      Parameters:
      width - the unconstrained drag_surface width to layout
      height - the unconstrained drag_surface height to layout
      Returns:
      false if it failed to be presented, otherwise true.
    • onComputeSize

      Emitted when the size for the surface needs to be computed, when it is present.

      This signal will normally be emitted during the native surface layout cycle when the surface size needs to be recomputed.

      It is the responsibility of the drag surface user to handle this signal and compute the desired size of the surface, storing the computed size in the Gdk.DragSurfaceSize object that is passed to the signal handler, using DragSurfaceSize.setSize(int, int).

      Failing to set a size so will result in an arbitrary size being used as a result.

      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      Since:
      4.12
      See Also:
    • emitComputeSize

      default void emitComputeSize(@Nullable DragSurfaceSize size)
      Emits the "compute-size" signal. See onComputeSize(DragSurface.ComputeSizeCallback).