WebKit2.HitTestResult¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
|||
r/w/co |
|||
r/w/co |
|||
r/w/co |
|||
r/w/co |
|||
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class WebKit2.HitTestResult(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Result of a Hit Test.
A Hit Test is an operation to get context information about a given point in a
WebKit2.WebView
.WebKit2.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
WebKit2.HitTestResult.get_context
() that returns a bitmask ofWebKit2.HitTestResultContext
flags. You can also useWebKit2.HitTestResult.context_is_link
(),WebKit2.HitTestResult.context_is_image
() andWebKit2.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 severalWebKit2.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
WebKit2.WebView
a Hit Test is performed for the mouse coordinates andWebKit2.WebView
::mouse-target-changed
signal is emitted with aWebKit2.HitTestResult
.- context_is_editable()¶
- Returns:
True
if there’s an editable element at the coordinates of the self, orFalse
otherwise- Return type:
Gets whether
WebKit2.HitTestResultContext.EDITABLE
flag is present inWebKit2.HitTestResult
:context
.
- context_is_image()¶
- Returns:
True
if there’s an image element in the coordinates of the Hit Test, orFalse
otherwise- Return type:
Gets whether
WebKit2.HitTestResultContext.IMAGE
flag is present inWebKit2.HitTestResult
:context
.
- context_is_link()¶
- Returns:
True
if there’s a link element in the coordinates of the Hit Test, orFalse
otherwise- Return type:
Gets whether
WebKit2.HitTestResultContext.LINK
flag is present inWebKit2.HitTestResult
:context
.
- context_is_media()¶
- Returns:
True
if there’s a media element in the coordinates of the Hit Test, orFalse
otherwise- Return type:
Gets whether
WebKit2.HitTestResultContext.MEDIA
flag is present inWebKit2.HitTestResult
:context
.
- context_is_scrollbar()¶
- Returns:
True
if there’s a scrollbar element at the coordinates of the self, orFalse
otherwise- Return type:
Gets whether
WebKit2.HitTestResultContext.SCROLLBAR
flag is present inWebKit2.HitTestResult
:context
.
- context_is_selection()¶
- Returns:
True
if there’s a selected element at the coordinates of the self, orFalse
otherwise- Return type:
Gets whether
WebKit2.HitTestResultContext.SELECTION
flag is present inWebKit2.HitTestResult
:context
.New in version 2.8.
- get_context()¶
- Returns:
a bitmask of
WebKit2.HitTestResultContext
flags- Return type:
Gets the value of the
WebKit2.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:
Gets the value of the
WebKit2.HitTestResult
:image-uri
property.
- get_link_label()¶
- 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:
Gets the value of the
WebKit2.HitTestResult
:link-label
property.
- get_link_title()¶
- 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:
Gets the value of the
WebKit2.HitTestResult
:link-title
property.
- get_link_uri()¶
- 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:
Gets the value of the
WebKit2.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:
Gets the value of the
WebKit2.HitTestResult
:media-uri
property.
Property Details¶
- WebKit2.HitTestResult.props.context¶
- Name:
context
- Type:
- Default Value:
0
- Flags:
Bitmask of
WebKit2.HitTestResultContext
flags representing the context of theWebKit2.HitTestResult
.
- WebKit2.HitTestResult.props.image_uri¶
- Name:
image-uri
- Type:
- Default Value:
- Flags:
The URI of the image if flag
WebKit2.HitTestResultContext.IMAGE
is present inWebKit2.HitTestResult
:context
- WebKit2.HitTestResult.props.link_label¶
- Name:
link-label
- Type:
- Default Value:
- Flags:
The label of the link if flag
WebKit2.HitTestResultContext.LINK
is present inWebKit2.HitTestResult
:context
- WebKit2.HitTestResult.props.link_title¶
- Name:
link-title
- Type:
- Default Value:
- Flags:
The title of the link if flag
WebKit2.HitTestResultContext.LINK
is present inWebKit2.HitTestResult
:context
- WebKit2.HitTestResult.props.link_uri¶
- Name:
link-uri
- Type:
- Default Value:
- Flags:
The URI of the link if flag
WebKit2.HitTestResultContext.LINK
is present inWebKit2.HitTestResult
:context
- WebKit2.HitTestResult.props.media_uri¶
- Name:
media-uri
- Type:
- Default Value:
- Flags:
The URI of the media if flag
WebKit2.HitTestResultContext.MEDIA
is present inWebKit2.HitTestResult
:context