Skip to main content

web_sys/features/
gen_HighlightRegistry.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    #[wasm_bindgen(
9        extends = "::js_sys::Object",
10        js_name = "HighlightRegistry",
11        typescript_type = "HighlightRegistry"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `HighlightRegistry` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `HighlightRegistry`*"]
19    #[doc = ""]
20    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22    pub type HighlightRegistry;
23    #[cfg(web_sys_unstable_apis)]
24    #[wasm_bindgen(method, getter, js_class = "HighlightRegistry", js_name = "size")]
25    #[doc = "Getter for the `size` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/size)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `HighlightRegistry`*"]
30    #[doc = ""]
31    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    pub fn size(this: &HighlightRegistry) -> u32;
34    #[cfg(web_sys_unstable_apis)]
35    #[wasm_bindgen(method, js_class = "HighlightRegistry")]
36    #[doc = "The `clear()` method."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/clear)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `HighlightRegistry`*"]
41    #[doc = ""]
42    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
44    pub fn clear(this: &HighlightRegistry);
45    #[cfg(web_sys_unstable_apis)]
46    #[wasm_bindgen(method, js_class = "HighlightRegistry")]
47    #[doc = "The `delete()` method."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/delete)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `HighlightRegistry`*"]
52    #[doc = ""]
53    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55    pub fn delete(this: &HighlightRegistry, key: &str) -> bool;
56    #[cfg(web_sys_unstable_apis)]
57    #[cfg(feature = "Highlight")]
58    #[wasm_bindgen(catch, method, js_class = "HighlightRegistry", js_name = "forEach")]
59    #[doc = "The `forEach()` method."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/forEach)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `Highlight`, `HighlightRegistry`*"]
64    #[doc = ""]
65    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
66    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
67    pub fn for_each(
68        this: &HighlightRegistry,
69        callback: &::js_sys::Function<fn(Highlight, ::js_sys::JsString) -> ::js_sys::Undefined>,
70    ) -> Result<(), JsValue>;
71    #[cfg(web_sys_unstable_apis)]
72    #[cfg(feature = "Highlight")]
73    #[wasm_bindgen(method, js_class = "HighlightRegistry")]
74    #[doc = "The `get()` method."]
75    #[doc = ""]
76    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/get)"]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `Highlight`, `HighlightRegistry`*"]
79    #[doc = ""]
80    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
81    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
82    pub fn get(this: &HighlightRegistry, key: &str) -> Option<Highlight>;
83    #[cfg(web_sys_unstable_apis)]
84    #[wasm_bindgen(method, js_class = "HighlightRegistry")]
85    #[doc = "The `has()` method."]
86    #[doc = ""]
87    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/has)"]
88    #[doc = ""]
89    #[doc = "*This API requires the following crate features to be activated: `HighlightRegistry`*"]
90    #[doc = ""]
91    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
92    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
93    pub fn has(this: &HighlightRegistry, key: &str) -> bool;
94    #[cfg(web_sys_unstable_apis)]
95    #[cfg(feature = "HighlightHitResult")]
96    #[wasm_bindgen(
97        method,
98        js_class = "HighlightRegistry",
99        js_name = "highlightsFromPoint"
100    )]
101    #[doc = "The `highlightsFromPoint()` method."]
102    #[doc = ""]
103    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/highlightsFromPoint)"]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `HighlightHitResult`, `HighlightRegistry`*"]
106    #[doc = ""]
107    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
108    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
109    pub fn highlights_from_point(
110        this: &HighlightRegistry,
111        x: f32,
112        y: f32,
113    ) -> ::js_sys::Array<HighlightHitResult>;
114    #[cfg(web_sys_unstable_apis)]
115    #[cfg(all(feature = "HighlightHitResult", feature = "HighlightsFromPointOptions",))]
116    #[wasm_bindgen(
117        method,
118        js_class = "HighlightRegistry",
119        js_name = "highlightsFromPoint"
120    )]
121    #[doc = "The `highlightsFromPoint()` method."]
122    #[doc = ""]
123    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/highlightsFromPoint)"]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `HighlightHitResult`, `HighlightRegistry`, `HighlightsFromPointOptions`*"]
126    #[doc = ""]
127    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
128    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
129    pub fn highlights_from_point_with_options(
130        this: &HighlightRegistry,
131        x: f32,
132        y: f32,
133        options: &HighlightsFromPointOptions,
134    ) -> ::js_sys::Array<HighlightHitResult>;
135    #[cfg(web_sys_unstable_apis)]
136    #[cfg(feature = "Highlight")]
137    #[wasm_bindgen(method, js_class = "HighlightRegistry")]
138    #[doc = "The `set()` method."]
139    #[doc = ""]
140    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/set)"]
141    #[doc = ""]
142    #[doc = "*This API requires the following crate features to be activated: `Highlight`, `HighlightRegistry`*"]
143    #[doc = ""]
144    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
145    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
146    pub fn set(this: &HighlightRegistry, key: &str, value: &Highlight) -> HighlightRegistry;
147    #[cfg(web_sys_unstable_apis)]
148    #[cfg(feature = "Highlight")]
149    #[wasm_bindgen(method, js_class = "HighlightRegistry")]
150    #[doc = "The `entries()` method."]
151    #[doc = ""]
152    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/entries)"]
153    #[doc = ""]
154    #[doc = "*This API requires the following crate features to be activated: `Highlight`, `HighlightRegistry`*"]
155    #[doc = ""]
156    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
157    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
158    pub fn entries(
159        this: &HighlightRegistry,
160    ) -> ::js_sys::Iterator<::js_sys::ArrayTuple<(::js_sys::JsString, Highlight)>>;
161    #[cfg(web_sys_unstable_apis)]
162    #[wasm_bindgen(method, js_class = "HighlightRegistry")]
163    #[doc = "The `keys()` method."]
164    #[doc = ""]
165    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/keys)"]
166    #[doc = ""]
167    #[doc = "*This API requires the following crate features to be activated: `HighlightRegistry`*"]
168    #[doc = ""]
169    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
170    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
171    pub fn keys(this: &HighlightRegistry) -> ::js_sys::Iterator<::js_sys::JsString>;
172    #[cfg(web_sys_unstable_apis)]
173    #[cfg(feature = "Highlight")]
174    #[wasm_bindgen(method, js_class = "HighlightRegistry")]
175    #[doc = "The `values()` method."]
176    #[doc = ""]
177    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry/values)"]
178    #[doc = ""]
179    #[doc = "*This API requires the following crate features to be activated: `Highlight`, `HighlightRegistry`*"]
180    #[doc = ""]
181    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
182    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
183    pub fn values(this: &HighlightRegistry) -> ::js_sys::Iterator<Highlight>;
184}