HitTestResult

class HitTestResult(pointer: <Error class: unknown class><<Error class: unknown class>>)

Result of a Hit Test.

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

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val context: <Error class: unknown class>

Bitmask of #WebKitHitTestResultContext flags representing the context of the #WebKitHitTestResult.

Link copied to clipboard

The URI of the image if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE is present in #WebKitHitTestResult:context

Link copied to clipboard

The label of the link if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK is present in #WebKitHitTestResult:context

Link copied to clipboard

The title of the link if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK is present in #WebKitHitTestResult:context

Link copied to clipboard

The URI of the link if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK is present in #WebKitHitTestResult:context

Link copied to clipboard

The URI of the media if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA is present in #WebKitHitTestResult:context

Link copied to clipboard
val webkitHitTestResultPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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