Skip to main content

webkit_web_process_extension6/auto/
hit_test_result.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from webkit-gir-files
4// DO NOT EDIT
5
6use crate::ffi;
7use glib::translate::*;
8
9glib::wrapper! {
10    #[doc(alias = "WebKitHitTestResult")]
11    pub struct HitTestResult(Object<ffi::WebKitHitTestResult, ffi::WebKitHitTestResultClass>);
12
13    match fn {
14        type_ => || ffi::webkit_hit_test_result_get_type(),
15    }
16}
17
18impl HitTestResult {
19    #[doc(alias = "webkit_hit_test_result_context_is_editable")]
20    pub fn context_is_editable(&self) -> bool {
21        unsafe {
22            from_glib(ffi::webkit_hit_test_result_context_is_editable(
23                self.to_glib_none().0,
24            ))
25        }
26    }
27
28    #[doc(alias = "webkit_hit_test_result_context_is_image")]
29    pub fn context_is_image(&self) -> bool {
30        unsafe {
31            from_glib(ffi::webkit_hit_test_result_context_is_image(
32                self.to_glib_none().0,
33            ))
34        }
35    }
36
37    #[doc(alias = "webkit_hit_test_result_context_is_link")]
38    pub fn context_is_link(&self) -> bool {
39        unsafe {
40            from_glib(ffi::webkit_hit_test_result_context_is_link(
41                self.to_glib_none().0,
42            ))
43        }
44    }
45
46    #[doc(alias = "webkit_hit_test_result_context_is_media")]
47    pub fn context_is_media(&self) -> bool {
48        unsafe {
49            from_glib(ffi::webkit_hit_test_result_context_is_media(
50                self.to_glib_none().0,
51            ))
52        }
53    }
54
55    #[doc(alias = "webkit_hit_test_result_context_is_scrollbar")]
56    pub fn context_is_scrollbar(&self) -> bool {
57        unsafe {
58            from_glib(ffi::webkit_hit_test_result_context_is_scrollbar(
59                self.to_glib_none().0,
60            ))
61        }
62    }
63
64    #[doc(alias = "webkit_hit_test_result_context_is_selection")]
65    pub fn context_is_selection(&self) -> bool {
66        unsafe {
67            from_glib(ffi::webkit_hit_test_result_context_is_selection(
68                self.to_glib_none().0,
69            ))
70        }
71    }
72
73    #[doc(alias = "webkit_hit_test_result_get_context")]
74    #[doc(alias = "get_context")]
75    pub fn context(&self) -> u32 {
76        unsafe { ffi::webkit_hit_test_result_get_context(self.to_glib_none().0) }
77    }
78
79    #[doc(alias = "webkit_hit_test_result_get_image_uri")]
80    #[doc(alias = "get_image_uri")]
81    #[doc(alias = "image-uri")]
82    pub fn image_uri(&self) -> Option<glib::GString> {
83        unsafe {
84            from_glib_none(ffi::webkit_hit_test_result_get_image_uri(
85                self.to_glib_none().0,
86            ))
87        }
88    }
89
90    #[doc(alias = "webkit_hit_test_result_get_link_label")]
91    #[doc(alias = "get_link_label")]
92    #[doc(alias = "link-label")]
93    pub fn link_label(&self) -> Option<glib::GString> {
94        unsafe {
95            from_glib_none(ffi::webkit_hit_test_result_get_link_label(
96                self.to_glib_none().0,
97            ))
98        }
99    }
100
101    #[doc(alias = "webkit_hit_test_result_get_link_title")]
102    #[doc(alias = "get_link_title")]
103    #[doc(alias = "link-title")]
104    pub fn link_title(&self) -> Option<glib::GString> {
105        unsafe {
106            from_glib_none(ffi::webkit_hit_test_result_get_link_title(
107                self.to_glib_none().0,
108            ))
109        }
110    }
111
112    #[doc(alias = "webkit_hit_test_result_get_link_uri")]
113    #[doc(alias = "get_link_uri")]
114    #[doc(alias = "link-uri")]
115    pub fn link_uri(&self) -> Option<glib::GString> {
116        unsafe {
117            from_glib_none(ffi::webkit_hit_test_result_get_link_uri(
118                self.to_glib_none().0,
119            ))
120        }
121    }
122
123    #[doc(alias = "webkit_hit_test_result_get_media_uri")]
124    #[doc(alias = "get_media_uri")]
125    #[doc(alias = "media-uri")]
126    pub fn media_uri(&self) -> Option<glib::GString> {
127        unsafe {
128            from_glib_none(ffi::webkit_hit_test_result_get_media_uri(
129                self.to_glib_none().0,
130            ))
131        }
132    }
133}