Class WebHitTestResult
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.webkitgtk.webprocessextension.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.
- Since:
- 2.8
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWebHitTestResult.Builder<B extends WebHitTestResult.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new WebHitTestResult.WebHitTestResult(MemorySegment address) Create a WebHitTestResult proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected WebHitTestResultasParent()Returns this instance as if it were its parent type.static WebHitTestResult.Builder<? extends WebHitTestResult.Builder> builder()AWebHitTestResult.Builderobject constructs aWebHitTestResultwith the specified properties.booleanCheck whether there is an editable element at the hit test position.booleanCheck whether there is an image element at the hit test position.booleanCheck whether there is a link element at the hit test position.booleanCheck whether there is a media element at the hit test position.booleanCheck whether there is a scrollbar at the hit test position.booleanCheck whether there is a selected element at the hit test position.intGets the the context flags for the hit test result.Obtains the URI associated with the image element at the hit test position.@Nullable ValuegetJsNode(@Nullable ScriptWorld world) Get theJSCValuefor the DOM node inworldat 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 @Nullable TypegetType()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, 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 org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.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
-
WebHitTestResult
public WebHitTestResult()Creates a new WebHitTestResult.
-
-
Method Details
-
getType
Get the GType of the WebHitTestResult class- Returns:
- the GType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, 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.EDITABLEflag is present in the context flags.- Returns:
trueif the hit test covers an editable element orfalseotherwise.
-
contextIsImage
public boolean contextIsImage()Check whether there is an image element at the hit test position.Checks whether
HitTestResultContext.IMAGEflag is present in the context flags.- Returns:
trueif the hit test covers an image element orfalseotherwise.
-
contextIsLink
public boolean contextIsLink()Check whether there is a link element at the hit test position.Checks whether
HitTestResultContext.LINKflag is present in the context flags.- Returns:
trueif the hit test covers a link element orfalseotherwise.
-
contextIsMedia
public boolean contextIsMedia()Check whether there is a media element at the hit test position.Checks whether
HitTestResultContext.MEDIAflag is present in the context flags.- Returns:
trueif the hit test covers a media element orfalseotherwise.
-
contextIsScrollbar
public boolean contextIsScrollbar()Check whether there is a scrollbar at the hit test position.Checks whether
HitTestResultContext.SCROLLBARflag is present in the context flags.- Returns:
trueif the hit test covers a scrollbar orfalseotherwise.
-
contextIsSelection
public boolean contextIsSelection()Check whether there is a selected element at the hit test position.Checks whether
HitTestResultContext.SELECTIONflag is present in the context flags.- Returns:
trueif the hit test covers a selected element orfalseotherwise.
-
getContext
public int getContext()Gets the the context flags for the hit test result.- Returns:
- a bitmask of
WebKitHitTestResultContextflags
-
getImageUri
Obtains the URI associated with the image element at the hit test position.- Returns:
- the URI of the image element, or
nullif the hit test does not cover an image element.
-
getJsNode
Get theJSCValuefor the DOM node inworldat the coordinates of the Hit Test.- Parameters:
world- aWebKitScriptWorld, ornullto use the default- Returns:
- a
JSCValuefor the DOM node, ornull - Since:
- 2.40
-
getLinkLabel
Obtains the label associated with the link element at the hit test position.- Returns:
- the label of the link element, or
nullif 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
nullif 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
nullif 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
nullif the hit test does not cover a media element.
-
builder
AWebHitTestResult.Builderobject constructs aWebHitTestResultwith the specified properties. Use the variousset...()methods to set properties, and finish construction withWebHitTestResult.Builder.build().- Returns:
- the builder object
-