HitTestResult

A Hit Test is an operation to get context information about a given point in a #WebKitWebView. #WebKitHitTestResult 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 webkit_hit_test_result_get_context() that returns a bitmask of #WebKitHitTestResultContext flags. You can also use webkit_hit_test_result_context_is_link(), webkit_hit_test_result_context_is_image() and webkit_hit_test_result_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 #WebKitHitTestResultContext 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 #WebKitHitTestResult.

Constructors

this
this(WebKitHitTestResult* webKitHitTestResult, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

contextIsEditable
bool contextIsEditable()

Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE flag is present in #WebKitHitTestResult:context.

contextIsImage
bool contextIsImage()

Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE flag is present in #WebKitHitTestResult:context.

contextIsLink
bool contextIsLink()

Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK flag is present in #WebKitHitTestResult:context.

contextIsMedia
bool contextIsMedia()

Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA flag is present in #WebKitHitTestResult:context.

contextIsScrollbar
bool contextIsScrollbar()

Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR flag is present in #WebKitHitTestResult:context.

contextIsSelection
bool contextIsSelection()

Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION flag is present in #WebKitHitTestResult:context.

getContext
uint getContext()

Gets the value of the #WebKitHitTestResult:context property.

getHitTestResultStruct
WebKitHitTestResult* getHitTestResultStruct(bool transferOwnership)

Get the main Gtk struct

getImageUri
string getImageUri()

Gets the value of the #WebKitHitTestResult:image-uri property.

getLinkLabel
string getLinkLabel()

Gets the value of the #WebKitHitTestResult:link-label property.

getLinkTitle
string getLinkTitle()

Gets the value of the #WebKitHitTestResult:link-title property.

getLinkUri
string getLinkUri()

Gets the value of the #WebKitHitTestResult:link-uri property.

getMediaUri
string getMediaUri()

Gets the value of the #WebKitHitTestResult:media-uri property.

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

getType
GType getType()

Variables

webKitHitTestResult
WebKitHitTestResult* webKitHitTestResult;

the main Gtk struct

Meta