Class UserMessage
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.gobject.InitiallyUnowned
org.webkitgtk.webprocessextension.UserMessage
- All Implemented Interfaces:
Proxy
Message that can be sent between the UI process and web process extensions.
A WebKitUserMessage is a message that can be used for the communication between the UI process
and web process extensions. A WebKitUserMessage always has a name, and it can also include parameters and
UNIX file descriptors. Messages can be sent from a WebKitWebContext to all web process extensions,
from a web process extension to its corresponding WebKitWebContext, and from a WebKitWebView to its
corresponding WebKitWebPage (and vice versa). One to one messages can be replied to directly with
webkit_user_message_send_reply().
- Since:
- 2.28
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUserMessage.Builder<B extends UserMessage.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class InitiallyUnowned
InitiallyUnowned.InitiallyUnownedClassNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new UserMessage.UserMessage(MemorySegment address) Create a UserMessage instance for the provided memory address.UserMessage(String name, @Nullable Variant parameters) Create a newWebKitUserMessagewithname. -
Method Summary
Modifier and TypeMethodDescriptionprotected UserMessageasParent()Return this instance as if it were its parent type.static UserMessage.Builder<? extends UserMessage.Builder> builder()AUserMessage.Builderobject constructs aUserMessagewith the specified properties.static QuarkGets the quark for the domain of user message errors.@Nullable UnixFDListGet the this UserMessage list of file descritpor.static MemoryLayoutThe memory layout of the native struct.getName()Get the this UserMessage name.@Nullable VariantGet the this UserMessage parameters.static @Nullable TypegetType()Get the GType of the UserMessage class.voidsendReply(UserMessage reply) Send a reply to an user message.static UserMessagewithFdList(String name, @Nullable Variant parameters, @Nullable UnixFDList fdList) Create a newWebKitUserMessageincluding also a list of UNIX file descriptors to be sent.Methods inherited from class 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, 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, withPropertiesMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
UserMessage
Create a UserMessage instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
UserMessage
-
UserMessage
public UserMessage()Create a new UserMessage.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code.- Overrides:
asParentin classInitiallyUnowned- Returns:
- the instance as if it were its parent type
-
withFdList
public static UserMessage withFdList(String name, @Nullable Variant parameters, @Nullable UnixFDList fdList) Create a newWebKitUserMessageincluding also a list of UNIX file descriptors to be sent.- Parameters:
name- the message nameparameters- the message parameters as aGVariantfdList- the message file descriptors- Returns:
- the newly created
WebKitUserMessageobject. - Since:
- 2.28
-
errorQuark
Gets the quark for the domain of user message errors.- Returns:
- user message error domain.
-
getFdList
Get the this UserMessage list of file descritpor.- Returns:
- the message list of file descriptors
- Since:
- 2.28
-
getName
-
getParameters
Get the this UserMessage parameters.- Returns:
- the message parameters
- Since:
- 2.28
-
sendReply
Send a reply to an user message.
If
replyis floating, it's consumed. You can only send a reply to aWebKitUserMessagethat has been received.- Parameters:
reply- aWebKitUserMessageto send as reply- Since:
- 2.28
-
builder
AUserMessage.Builderobject constructs aUserMessagewith the specified properties. Use the variousset...()methods to set properties, and finish construction withUserMessage.Builder.build().- Returns:
- the builder object
-