Package org.gnome.webkit.wpe
Class WebFormManager
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.webkit.wpe.WebFormManager
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
WebFormManager.Builder<B extends WebFormManager.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static interface
Functional interface declaration of theFormControlsAssociatedCallback
callback.static class
static interface
Functional interface declaration of theWillSendSubmitEventCallback
callback.static interface
Functional interface declaration of theWillSubmitFormCallback
callback.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionWebFormManager
(MemorySegment address) Create a WebFormManager proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected WebFormManager
asParent()
Returns this instance as if it were its parent type.static WebFormManager.Builder
<? extends WebFormManager.Builder> builder()
AWebFormManager.Builder
object constructs aWebFormManager
with the specified properties.void
emitFormControlsAssociated
(Frame frame, Value[] elements) Emits the "form-controls-associated" signal.void
emitWillSendSubmitEvent
(Value form, Frame sourceFrame, Frame targetFrame) Emits the "will-send-submit-event" signal.void
emitWillSubmitForm
(Value form, Frame sourceFrame, Frame targetFrame) Emits the "will-submit-form" signal.static MemoryLayout
The memory layout of the native struct.static Type
getType()
Get the GType of the WebFormManager classstatic void
inputElementAutoFill
(Value element, String value) Set the value of an HTML input element as if it had been edited by the user, triggering a change event, and set it as filled automatically.static boolean
inputElementIsAutoFilled
(Value element) Get whetherelement
is an HTML input element that has been filled automatically.static boolean
inputElementIsUserEdited
(Value element) Get whetherelement
is an HTML text input element that has been edited by a user action.Emitted after form elements (or form associated elements) are associated toframe
.This signal is emitted when the DOM submit event is about to be fired forform
.This signal is emitted whenform
will imminently be submitted.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
WebFormManager
Create a WebFormManager proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
inputElementAutoFill
public static void inputElementAutoFill(Value element, String value) throws UnsupportedPlatformException Set the value of an HTML input element as if it had been edited by the user, triggering a change event, and set it as filled automatically. Ifelement
is not an HTML input element this function does nothing.- Parameters:
element
- aJSCValue
value
- the text to set- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
inputElementIsAutoFilled
Get whetherelement
is an HTML input element that has been filled automatically.- Parameters:
element
- aJSCValue
- Returns:
true
ifelement
is an HTML input element that has been filled automatically, orfalse
otherwise- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
inputElementIsUserEdited
Get whetherelement
is an HTML text input element that has been edited by a user action.- Parameters:
element
- aJSCValue
- Returns:
true
ifelement
is an HTML text input element that has been edited by a user action, orfalse
otherwise- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
onFormControlsAssociated
public SignalConnection<WebFormManager.FormControlsAssociatedCallback> onFormControlsAssociated(WebFormManager.FormControlsAssociatedCallback handler) Emitted after form elements (or form associated elements) are associated toframe
. This is useful to implement form auto filling for web pages where form fields are added dynamically. This signal might be emitted multiple times for the same frame.Note that this signal could be also emitted when form controls are moved between forms. In that case, the
elements
array carries the list of those elements which have moved.Clients should take a reference to the members of the
elements
array if it is desired to keep them alive after the signal handler returns.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitFormControlsAssociated
Emits the "form-controls-associated" signal. SeeonFormControlsAssociated(org.gnome.webkit.wpe.WebFormManager.FormControlsAssociatedCallback)
. -
onWillSendSubmitEvent
public SignalConnection<WebFormManager.WillSendSubmitEventCallback> onWillSendSubmitEvent(WebFormManager.WillSendSubmitEventCallback handler) This signal is emitted when the DOM submit event is about to be fired forform
. JavaScript code may rely on the submit event to detect that the user has clicked on a submit button, and to possibly cancel the form submission beforeWebKitWebFormManager
::will-submit-form signal is emitted. However, beware that, for historical reasons, the submit event is not emitted at all if the form submission is triggered by JavaScript. For these reasons, this signal may not be used to reliably detect whether a form will be submitted. Instead, use it to detect if a user has clicked on a form's submit button even if JavaScript later cancels the form submission, or to read the values of the form's fields even if JavaScript later clears certain fields before submitting. This may be needed, for example, to implement a robust browser password manager, as some misguided websites may use such techniques to attempt to thwart password managers.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitWillSendSubmitEvent
Emits the "will-send-submit-event" signal. SeeonWillSendSubmitEvent(org.gnome.webkit.wpe.WebFormManager.WillSendSubmitEventCallback)
. -
onWillSubmitForm
public SignalConnection<WebFormManager.WillSubmitFormCallback> onWillSubmitForm(WebFormManager.WillSubmitFormCallback handler) This signal is emitted whenform
will imminently be submitted. It can no longer be cancelled. This event always occurs immediately before a form is submitted to its target, so use this event to reliably detect when a form is submitted. This signal is emitted afterWebKitWebFormManager
::will-send-submit-event if that signal is emitted.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitWillSubmitForm
Emits the "will-submit-form" signal. SeeonWillSubmitForm(org.gnome.webkit.wpe.WebFormManager.WillSubmitFormCallback)
. -
builder
AWebFormManager.Builder
object constructs aWebFormManager
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withWebFormManager.Builder.build()
.
-