WebKitWebProcessExtension.HitTestResult

g GObject.Object GObject.Object WebKitWebProcessExtension.HitTestResult WebKitWebProcessExtension.HitTestResult GObject.Object->WebKitWebProcessExtension.HitTestResult

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

context_is_editable ()

context_is_image ()

context_is_link ()

context_is_media ()

context_is_scrollbar ()

context_is_selection ()

get_context ()

get_image_uri ()

get_link_label ()

get_link_title ()

get_link_uri ()

get_media_uri ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

context

int

r/w/co

image-uri

str

r/w/co

link-label

str

r/w/co

link-title

str

r/w/co

link-uri

str

r/w/co

media-uri

str

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class WebKitWebProcessExtension.HitTestResult(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

WebKitWebProcessExtension.HitTestResultClass

Result of a Hit Test.

A Hit Test is an operation to get context information about a given point in a #WebKitWebView. WebKitWebProcessExtension.HitTestResult represents the result of a Hit Test. It provides context information about what is at the coordinates of the Hit Test, such as if there’s a link, an image or a media.

You can get the context of the HitTestResult with WebKitWebProcessExtension.HitTestResult.get_context() that returns a bitmask of WebKitWebProcessExtension.HitTestResultContext flags. You can also use WebKitWebProcessExtension.HitTestResult.context_is_link(), WebKitWebProcessExtension.HitTestResult.context_is_image() and WebKitWebProcessExtension.HitTestResult.context_is_media() to determine whether there’s a link, image or a media element at the coordinates of the Hit Test. Note that it’s possible that several WebKitWebProcessExtension.HitTestResultContext flags are active at the same time, for example if there’s a link containing an image.

When the mouse is moved over a #WebKitWebView a Hit Test is performed for the mouse coordinates and #WebKitWebView::mouse-target-changed signal is emitted with a WebKitWebProcessExtension.HitTestResult.

context_is_editable()
Returns:

True if there’s an editable element at the coordinates of the self, or False otherwise

Return type:

bool

Gets whether WebKitWebProcessExtension.HitTestResultContext.EDITABLE flag is present in WebKitWebProcessExtension.HitTestResult :context.

context_is_image()
Returns:

True if there’s an image element in the coordinates of the Hit Test, or False otherwise

Return type:

bool

Gets whether WebKitWebProcessExtension.HitTestResultContext.IMAGE flag is present in WebKitWebProcessExtension.HitTestResult :context.

Returns:

True if there’s a link element in the coordinates of the Hit Test, or False otherwise

Return type:

bool

Gets whether WebKitWebProcessExtension.HitTestResultContext.LINK flag is present in WebKitWebProcessExtension.HitTestResult :context.

context_is_media()
Returns:

True if there’s a media element in the coordinates of the Hit Test, or False otherwise

Return type:

bool

Gets whether WebKitWebProcessExtension.HitTestResultContext.MEDIA flag is present in WebKitWebProcessExtension.HitTestResult :context.

context_is_scrollbar()
Returns:

True if there’s a scrollbar element at the coordinates of the self, or False otherwise

Return type:

bool

Gets whether WebKitWebProcessExtension.HitTestResultContext.SCROLLBAR flag is present in WebKitWebProcessExtension.HitTestResult :context.

context_is_selection()
Returns:

True if there’s a selected element at the coordinates of the self, or False otherwise

Return type:

bool

Gets whether WebKitWebProcessExtension.HitTestResultContext.SELECTION flag is present in WebKitWebProcessExtension.HitTestResult :context.

New in version 2.8.

get_context()
Returns:

a bitmask of WebKitWebProcessExtension.HitTestResultContext flags

Return type:

int

Gets the value of the WebKitWebProcessExtension.HitTestResult :context property.

get_image_uri()
Returns:

the URI of the image element in the coordinates of the Hit Test, or None if there isn’t an image element in self context

Return type:

str

Gets the value of the WebKitWebProcessExtension.HitTestResult :image-uri property.

Returns:

the label of the link element in the coordinates of the Hit Test, or None if there isn’t a link element in self context or the link element doesn’t have a label

Return type:

str

Gets the value of the WebKitWebProcessExtension.HitTestResult :link-label property.

Returns:

the title of the link element in the coordinates of the Hit Test, or None if there isn’t a link element in self context or the link element doesn’t have a title

Return type:

str

Gets the value of the WebKitWebProcessExtension.HitTestResult :link-title property.

Returns:

the URI of the link element in the coordinates of the Hit Test, or None if there isn’t a link element in self context

Return type:

str

Gets the value of the WebKitWebProcessExtension.HitTestResult :link-uri property.

get_media_uri()
Returns:

the URI of the media element in the coordinates of the Hit Test, or None if there isn’t a media element in self context

Return type:

str

Gets the value of the WebKitWebProcessExtension.HitTestResult :media-uri property.

Property Details

WebKitWebProcessExtension.HitTestResult.props.context
Name:

context

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Bitmask of WebKitWebProcessExtension.HitTestResultContext flags representing the context of the WebKitWebProcessExtension.HitTestResult.

WebKitWebProcessExtension.HitTestResult.props.image_uri
Name:

image-uri

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The URI of the image if flag WebKitWebProcessExtension.HitTestResultContext.IMAGE is present in WebKitWebProcessExtension.HitTestResult :context

Name:

link-label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The label of the link if flag WebKitWebProcessExtension.HitTestResultContext.LINK is present in WebKitWebProcessExtension.HitTestResult :context

Name:

link-title

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The title of the link if flag WebKitWebProcessExtension.HitTestResultContext.LINK is present in WebKitWebProcessExtension.HitTestResult :context

Name:

link-uri

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The URI of the link if flag WebKitWebProcessExtension.HitTestResultContext.LINK is present in WebKitWebProcessExtension.HitTestResult :context

WebKitWebProcessExtension.HitTestResult.props.media_uri
Name:

media-uri

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The URI of the media if flag WebKitWebProcessExtension.HitTestResultContext.MEDIA is present in WebKitWebProcessExtension.HitTestResult :context