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 TypeMethodDescriptionbooleanEmitted when the widget’s tooltip is about to be shown.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, int, int, java.lang.foreign.MemorySegment)method.default intupcall(MemorySegment sourceWidget, int x, int y, int keyboardMode, MemorySegment tooltip) Theupcallmethod 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-tooltipproperty is true and the hover timeout has expired with the cursor hovering abovewidget;or emitted whenwidgetgot 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 ifkeyboardModeis true, the values ofxandyare undefined and should not be used.The signal handler is free to manipulate
tooltipwith the therefore destined function calls. -
upcall
default int upcall(MemorySegment sourceWidget, int x, int y, int keyboardMode, MemorySegment tooltip) Theupcallmethod 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:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-