Package org.gnome.webkit
Interface WebView.ShowNotificationCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
WebView
- 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 WebView.ShowNotificationCallback
extends FunctionPointer
Functional interface declaration of the
ShowNotificationCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
run
(Notification notification) This signal is emitted when a notification should be presented to the user.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default int
upcall
(MemorySegment sourceWebView, MemorySegment notification) Theupcall
method is called from native code.
-
Method Details
-
run
This signal is emitted when a notification should be presented to the user. Thenotification
is kept alive until either: 1) the web page cancels it or 2) a navigation happens.The default handler will emit a notification using libnotify, if built with support for it.
-
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.webkit.Notification)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, 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
-