webkitwebprocessextension.hit_test_result
Module for [HitTestResult] class
Types 3
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 [webkitwebprocessextension.hit_test_result.HitTestResult.getContext] that returns a bitmask of #WebKitHitTestResultContext flags. You can also use [webkitwebprocessextension.hit_test_result.HitTestResult.contextIsLink], [webkitwebprocessextension.hit_test_result.HitTestResult.contextIsImage] and [webkitwebprocessextension.hit_test_result.HitTestResult.contextIsMedia] 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.
HitTestResult self()Returns `this`, for use in `with` statements.HitTestResultGidBuilder builder()Get builder for [webkitwebprocessextension.hittestresult.HitTestResult] Returns: New builder objectuint context() @propertyGet `context` property. Returns: Bitmask of #WebKitHitTestResultContext flags representing the context of the #WebKitHitTestResult.string imageUri() @propertyGet `imageUri` property. Returns: The URI of the image if flag [webkit.types.HitTestResultContext.Image] is present in #WebKitHitTestResult:contextstring linkLabel() @propertyGet `linkLabel` property. Returns: The label of the link if flag [webkit.types.HitTestResultContext.Link] is present in #WebKitHitTestResult:contextstring linkTitle() @propertyGet `linkTitle` property. Returns: The title of the link if flag [webkit.types.HitTestResultContext.Link] is present in #WebKitHitTestResult:contextstring linkUri() @propertyGet `linkUri` property. Returns: The URI of the link if flag [webkit.types.HitTestResultContext.Link] is present in #WebKitHitTestResult:contextstring mediaUri() @propertyGet `mediaUri` property. Returns: The URI of the media if flag [webkit.types.HitTestResultContext.Media] is present in #WebKitHitTestResult:contextbool contextIsEditable()Gets whether [webkit.types.HitTestResultContext.Editable] flag is present in #WebKitHitTestResult:context. Returns: true if there's an editable element at the coordinates of the hittestresult, or f...bool contextIsImage()Gets whether [webkit.types.HitTestResultContext.Image] flag is present in #WebKitHitTestResult:context. Returns: true if there's an image element in the coordinates of the Hit Test, or false otherwisebool contextIsLink()Gets whether [webkit.types.HitTestResultContext.Link] flag is present in #WebKitHitTestResult:context. Returns: true if there's a link element in the coordinates of the Hit Test, or false otherwisebool contextIsMedia()Gets whether [webkit.types.HitTestResultContext.Media] flag is present in #WebKitHitTestResult:context. Returns: true if there's a media element in the coordinates of the Hit Test, or false otherwisebool contextIsScrollbar()Gets whether [webkit.types.HitTestResultContext.Scrollbar] flag is present in #WebKitHitTestResult:context. Returns: true if there's a scrollbar element at the coordinates of the hittestresult, or ...bool contextIsSelection()Gets whether [webkit.types.HitTestResultContext.Selection] flag is present in #WebKitHitTestResult:context. Returns: true if there's a selected element at the coordinates of the hittestresult, or f...uint getContext()Gets the value of the #WebKitHitTestResult:context property. Returns: a bitmask of #WebKitHitTestResultContext flagsstring getImageUri()Gets the value of the #WebKitHitTestResult:image-uri property. Returns: the URI of the image element in the coordinates of the Hit Test, or null if there isn't an image element in hittestresult con...string getLinkLabel()Gets the value of the #WebKitHitTestResult:link-label property. Returns: the label of the link element in the coordinates of the Hit Test, or null if there isn't a link element in hittestresult con...string getLinkTitle()Gets the value of the #WebKitHitTestResult:link-title property. Returns: the title of the link element in the coordinates of the Hit Test, or null if there isn't a link element in hittestresult con...string getLinkUri()Gets the value of the #WebKitHitTestResult:link-uri property. Returns: the URI of the link element in the coordinates of the Hit Test, or null if there isn't a link element in hittestresult contextstring getMediaUri()Gets the value of the #WebKitHitTestResult:media-uri property. Returns: the URI of the media element in the coordinates of the Hit Test, or null if there isn't a media element in hittestresult contextT context(uint propval)Set `context` property. Params: propval = Bitmask of #WebKitHitTestResultContext flags representing the context of the #WebKitHitTestResult. Returns: Builder instance for fluent chainingT imageUri(string propval)Set `imageUri` property. Params: propval = The URI of the image if flag [webkit.types.HitTestResultContext.Image] is present in #WebKitHitTestResult:context Returns: Builder instance for fluent cha...T linkLabel(string propval)Set `linkLabel` property. Params: propval = The label of the link if flag [webkit.types.HitTestResultContext.Link] is present in #WebKitHitTestResult:context Returns: Builder instance for fluent ch...T linkTitle(string propval)Set `linkTitle` property. Params: propval = The title of the link if flag [webkit.types.HitTestResultContext.Link] is present in #WebKitHitTestResult:context Returns: Builder instance for fluent ch...T linkUri(string propval)Set `linkUri` property. Params: propval = The URI of the link if flag [webkit.types.HitTestResultContext.Link] is present in #WebKitHitTestResult:context Returns: Builder instance for fluent chainingT mediaUri(string propval)Set `mediaUri` property. Params: propval = The URI of the media if flag [webkit.types.HitTestResultContext.Media] is present in #WebKitHitTestResult:context Returns: Builder instance for fluent cha...Fluent builder for [webkitwebprocessextension.hit_test_result.HitTestResult]