Package org.gnome.gtk
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.
Functional interface declaration of the
QueryTooltipCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Emitted when the widget’s tooltip is about to be shown.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, int, int, java.lang.foreign.MemorySegment)
method.default int
upcall
(MemorySegment sourceWidget, int x, int y, int keyboardMode, MemorySegment tooltip) Theupcall
method is called from native code.
-
Method Details
-
run
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 abovewidget
; or emitted whenwidget
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 ifkeyboardMode
is true, the values ofx
andy
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) Theupcall
method is called from native code. The parameters are marshaled andrun(int, int, boolean, org.gnome.gtk.Tooltip)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, int, int, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-