Interface Widget.QueryTooltipCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
Widget
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Widget.QueryTooltipCallback extends FunctionPointer

Functional interface declaration of the QueryTooltipCallback callback.

See Also:
  • Method Details

    • run

      boolean run(int x, int y, boolean keyboardMode, @Nullable Tooltip tooltip)

      Emitted when the widget’s tooltip is about to be shown.

      This happens when the Gtk.Widget:has-tooltip property is true and the hover timeout has expired with the cursor hovering above widget; or emitted when widget got focus in keyboard mode.

      Using the given coordinates, the signal handler should determine whether a tooltip should be shown for widget. If this is the case true should be returned, false otherwise. Note that if keyboardMode is true, the values of x and y are undefined and should not be used.

      The signal handler is free to manipulate tooltip with the therefore destined function calls.

    • upcall

      default int upcall(MemorySegment sourceWidget, int x, int y, int keyboardMode, MemorySegment tooltip)
      The upcall method is called from native code. The parameters are marshaled and run(int, int, boolean, Tooltip) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, int, int, int, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer