:right-sidebar: True HitTestResult =================================================================== .. currentmodule:: gi.repository.WebKitWebProcessExtension .. class:: HitTestResult(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Result of a Hit Test. A Hit Test is an operation to get context information about a given point in a ``WebKitWebView``. :obj:`~gi.repository.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 :func:`~gi.repository.WebKitWebProcessExtension.HitTestResult.get_context` that returns a bitmask of ``WebKitHitTestResultContext`` flags. You can also use :func:`~gi.repository.WebKitWebProcessExtension.HitTestResult.context_is_link`, :func:`~gi.repository.WebKitWebProcessExtension.HitTestResult.context_is_image` and :func:`~gi.repository.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 ``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 :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\. Methods ------- .. rst-class:: interim-class .. class:: HitTestResult :no-index: .. method:: context_is_editable() -> bool Gets whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.EDITABLE` flag is present in :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:context. .. method:: context_is_image() -> bool Gets whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.IMAGE` flag is present in :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:context. .. method:: context_is_link() -> bool Gets whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.LINK` flag is present in :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:context. .. method:: context_is_media() -> bool Gets whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.MEDIA` flag is present in :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:context. .. method:: context_is_scrollbar() -> bool Gets whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.SCROLLBAR` flag is present in :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:context. .. method:: context_is_selection() -> bool Gets whether :const:`~gi.repository.WebKitWebProcessExtension.HitTestResultContext.SELECTION` flag is present in :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:context. .. versionadded:: 2.8 .. method:: get_context() -> int Gets the value of the :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:context property. .. method:: get_image_uri() -> str Gets the value of the :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:image-uri property. .. method:: get_link_label() -> str Gets the value of the :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:link-label property. .. method:: get_link_title() -> str Gets the value of the :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:link-title property. .. method:: get_link_uri() -> str Gets the value of the :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:link-uri property. .. method:: get_media_uri() -> str Gets the value of the :obj:`~gi.repository.WebKitWebProcessExtension.HitTestResult`\:media-uri property. Properties ---------- .. rst-class:: interim-class .. class:: HitTestResult :no-index: .. attribute:: props.context :type: int The type of the None singleton. .. attribute:: props.image_uri :type: str The type of the None singleton. .. attribute:: props.link_label :type: str The type of the None singleton. .. attribute:: props.link_title :type: str The type of the None singleton. .. attribute:: props.link_uri :type: str The type of the None singleton. .. attribute:: props.media_uri :type: str The type of the None singleton.