Package org.gnome.webkit
Interface WebView.SubmitFormCallback
- 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.
Functional interface declaration of the
SubmitFormCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(FormSubmissionRequest request) This signal is emitted when a form is about to be submitted.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default void
upcall
(MemorySegment sourceWebView, MemorySegment request) Theupcall
method is called from native code.
-
Method Details
-
run
This signal is emitted when a form is about to be submitted. Therequest
argument passed contains information about the text fields of the form. This is typically used to store login information that can be used later to pre-fill the form. The form will not be submitted until webkit_form_submission_request_submit() is called.It is possible to handle the form submission request asynchronously, by simply calling g_object_ref() on the
request
argument and calling webkit_form_submission_request_submit() when done to continue with the form submission. If the last reference is removed on aWebKitFormSubmissionRequest
and the form has not been submitted, webkit_form_submission_request_submit() will be called. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.webkit.FormSubmissionRequest)
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
-