Package org.gnome.webkit.wpe
Class UserMessage
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.gobject.InitiallyUnowned
org.gnome.webkit.wpe.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().
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
UserMessage.Builder<B extends UserMessage.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
Nested classes/interfaces inherited from class org.gnome.gobject.InitiallyUnowned
InitiallyUnowned.InitiallyUnownedClass
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionUserMessage
(MemorySegment address) Create a UserMessage proxy instance for the provided memory address.UserMessage
(String name, @Nullable Variant parameters) Create a newWebKitUserMessage
withname
. -
Method Summary
Modifier and TypeMethodDescriptionprotected UserMessage
asParent()
Returns this instance as if it were its parent type.static UserMessage.Builder
<? extends UserMessage.Builder> builder()
AUserMessage.Builder
object constructs aUserMessage
with the specified properties.static Quark
Gets the quark for the domain of user message errors.Get the this UserMessage list of file descritpor.getName()
Get the this UserMessage name.Get the this UserMessage parameters.static Type
getType()
Get the GType of the UserMessage classvoid
sendReply
(UserMessage reply) Send a reply to an user message.static UserMessage
withFdList
(String name, @Nullable Variant parameters, @Nullable UnixFDList fdList) Create a newWebKitUserMessage
including also a list of UNIX file descriptors to be sent.Methods inherited from class org.gnome.gobject.InitiallyUnowned
getMemoryLayout
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
-
UserMessage
Create a UserMessage proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
UserMessage
public UserMessage(String name, @Nullable @Nullable Variant parameters) throws UnsupportedPlatformException Create a newWebKitUserMessage
withname
.- Parameters:
name
- the message nameparameters
- the message parameters as aGVariant
, ornull
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
-
Method Details
-
getType
-
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.- Overrides:
asParent
in classInitiallyUnowned
-
withFdList
public static UserMessage withFdList(String name, @Nullable @Nullable Variant parameters, @Nullable @Nullable UnixFDList fdList) Create a newWebKitUserMessage
including also a list of UNIX file descriptors to be sent.- Parameters:
name
- the message nameparameters
- the message parameters as aGVariant
fdList
- the message file descriptors- Returns:
- the newly created
WebKitUserMessage
object. - Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
errorQuark
Gets the quark for the domain of user message errors.- Returns:
- user message error domain.
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
getFdList
Get the this UserMessage list of file descritpor.- Returns:
- the message list of file descriptors
-
getName
-
getParameters
-
sendReply
Send a reply to an user message.If
reply
is floating, it's consumed. You can only send a reply to aWebKitUserMessage
that has been received.- Parameters:
reply
- aWebKitUserMessage
to send as reply
-
builder
AUserMessage.Builder
object constructs aUserMessage
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withUserMessage.Builder.build()
.
-