Package org.gnome.webkit.wpe
Class WebHitTestResult
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.webkit.wpe.WebHitTestResult
- All Implemented Interfaces:
Proxy
Result of a Hit Test (Web Process Extensions).
WebKitWebHitTestResult extends WebKitHitTestResult
to provide information
about the WebKitDOMNode
in the coordinates of the Hit Test.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
WebHitTestResult.Builder<B extends WebHitTestResult.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.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionWebHitTestResult
(MemorySegment address) Create a WebHitTestResult proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected WebHitTestResult
asParent()
Returns this instance as if it were its parent type.static WebHitTestResult.Builder
<? extends WebHitTestResult.Builder> builder()
AWebHitTestResult.Builder
object constructs aWebHitTestResult
with the specified properties.boolean
Check whether there is an editable element at the hit test position.boolean
Check whether there is an image element at the hit test position.boolean
Check whether there is a link element at the hit test position.boolean
Check whether there is a media element at the hit test position.boolean
Check whether there is a scrollbar at the hit test position.boolean
Check whether there is a selected element at the hit test position.int
Gets the the context flags for the hit test result.Obtains the URI associated with the image element at the hit test position.getJsNode
(@Nullable ScriptWorld world) Get theJSCValue
for the DOM node inworld
at the coordinates of the Hit Test.Obtains the label associated with the link element at the hit test position.Obtains the title associated with the link element at the hit test position.Obtains the URI associated with the link element at the hit test position.Obtains the URI associated with the media element at the hit test position.static Type
getType()
Get the GType of the WebHitTestResult classMethods 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, getMemoryLayout, 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
-
WebHitTestResult
Create a WebHitTestResult proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
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. -
contextIsEditable
public boolean contextIsEditable()Check whether there is an editable element at the hit test position.Checks whether
HitTestResultContext.EDITABLE
flag is present in the context flags.- Returns:
true
if the hit test covers an editable element orfalse
otherwise.
-
contextIsImage
public boolean contextIsImage()Check whether there is an image element at the hit test position.Checks whether
HitTestResultContext.IMAGE
flag is present in the context flags.- Returns:
true
if the hit test covers an image element orfalse
otherwise.
-
contextIsLink
public boolean contextIsLink()Check whether there is a link element at the hit test position.Checks whether
HitTestResultContext.LINK
flag is present in the context flags.- Returns:
true
if the hit test covers a link element orfalse
otherwise.
-
contextIsMedia
public boolean contextIsMedia()Check whether there is a media element at the hit test position.Checks whether
HitTestResultContext.MEDIA
flag is present in the context flags.- Returns:
true
if the hit test covers a media element orfalse
otherwise.
-
contextIsScrollbar
public boolean contextIsScrollbar()Check whether there is a scrollbar at the hit test position.Checks whether
HitTestResultContext.SCROLLBAR
flag is present in the context flags.- Returns:
true
if the hit test covers a scrollbar orfalse
otherwise.
-
contextIsSelection
public boolean contextIsSelection()Check whether there is a selected element at the hit test position.Checks whether
HitTestResultContext.SELECTION
flag is present in the context flags.- Returns:
true
if the hit test covers a selected element orfalse
otherwise.
-
getContext
public int getContext()Gets the the context flags for the hit test result.- Returns:
- a bitmask of
WebKitHitTestResultContext
flags
-
getImageUri
Obtains the URI associated with the image element at the hit test position.- Returns:
- the URI of the image element, or
null
if the hit test does not cover an image element.
-
getJsNode
Get theJSCValue
for the DOM node inworld
at the coordinates of the Hit Test.- Parameters:
world
- aWebKitScriptWorld
, ornull
to use the default- Returns:
- a
JSCValue
for the DOM node, ornull
-
getLinkLabel
Obtains the label associated with the link element at the hit test position.- Returns:
- the label of the link element, or
null
if the hit test does not cover a link element or the link element does not have a label.
-
getLinkTitle
Obtains the title associated with the link element at the hit test position.- Returns:
- the title of the link element, or
null
if the hit test does not cover a link element or the link element does not have a title.
-
getLinkUri
Obtains the URI associated with the link element at the hit test position.- Returns:
- the URI of the link element, or
null
if the hit test does not cover a link element.
-
getMediaUri
Obtains the URI associated with the media element at the hit test position.- Returns:
- the URI of the media element, or
null
if the hit test does not cover a media element.
-
builder
AWebHitTestResult.Builder
object constructs aWebHitTestResult
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withWebHitTestResult.Builder.build()
.
-