web_sys/features/
gen_FontFaceDescriptors.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FontFaceDescriptors)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `FontFaceDescriptors` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
12 pub type FontFaceDescriptors;
13 #[doc = "Get the `display` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
16 #[wasm_bindgen(method, getter = "display")]
17 pub fn get_display(this: &FontFaceDescriptors) -> Option<::alloc::string::String>;
18 #[doc = "Change the `display` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
21 #[wasm_bindgen(method, setter = "display")]
22 pub fn set_display(this: &FontFaceDescriptors, val: &str);
23 #[doc = "Get the `featureSettings` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
26 #[wasm_bindgen(method, getter = "featureSettings")]
27 pub fn get_feature_settings(this: &FontFaceDescriptors) -> Option<::alloc::string::String>;
28 #[doc = "Change the `featureSettings` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
31 #[wasm_bindgen(method, setter = "featureSettings")]
32 pub fn set_feature_settings(this: &FontFaceDescriptors, val: &str);
33 #[doc = "Get the `stretch` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
36 #[wasm_bindgen(method, getter = "stretch")]
37 pub fn get_stretch(this: &FontFaceDescriptors) -> Option<::alloc::string::String>;
38 #[doc = "Change the `stretch` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
41 #[wasm_bindgen(method, setter = "stretch")]
42 pub fn set_stretch(this: &FontFaceDescriptors, val: &str);
43 #[doc = "Get the `style` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
46 #[wasm_bindgen(method, getter = "style")]
47 pub fn get_style(this: &FontFaceDescriptors) -> Option<::alloc::string::String>;
48 #[doc = "Change the `style` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
51 #[wasm_bindgen(method, setter = "style")]
52 pub fn set_style(this: &FontFaceDescriptors, val: &str);
53 #[doc = "Get the `unicodeRange` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
56 #[wasm_bindgen(method, getter = "unicodeRange")]
57 pub fn get_unicode_range(this: &FontFaceDescriptors) -> Option<::alloc::string::String>;
58 #[doc = "Change the `unicodeRange` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
61 #[wasm_bindgen(method, setter = "unicodeRange")]
62 pub fn set_unicode_range(this: &FontFaceDescriptors, val: &str);
63 #[doc = "Get the `variant` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
66 #[wasm_bindgen(method, getter = "variant")]
67 pub fn get_variant(this: &FontFaceDescriptors) -> Option<::alloc::string::String>;
68 #[doc = "Change the `variant` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
71 #[wasm_bindgen(method, setter = "variant")]
72 pub fn set_variant(this: &FontFaceDescriptors, val: &str);
73 #[doc = "Get the `variationSettings` field of this object."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
76 #[wasm_bindgen(method, getter = "variationSettings")]
77 pub fn get_variation_settings(this: &FontFaceDescriptors) -> Option<::alloc::string::String>;
78 #[doc = "Change the `variationSettings` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
81 #[wasm_bindgen(method, setter = "variationSettings")]
82 pub fn set_variation_settings(this: &FontFaceDescriptors, val: &str);
83 #[doc = "Get the `weight` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
86 #[wasm_bindgen(method, getter = "weight")]
87 pub fn get_weight(this: &FontFaceDescriptors) -> Option<::alloc::string::String>;
88 #[doc = "Change the `weight` field of this object."]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
91 #[wasm_bindgen(method, setter = "weight")]
92 pub fn set_weight(this: &FontFaceDescriptors, val: &str);
93}
94impl FontFaceDescriptors {
95 #[doc = "Construct a new `FontFaceDescriptors`."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"]
98 pub fn new() -> Self {
99 #[allow(unused_mut)]
100 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
101 ret
102 }
103 #[deprecated = "Use `set_display()` instead."]
104 pub fn display(&mut self, val: &str) -> &mut Self {
105 self.set_display(val);
106 self
107 }
108 #[deprecated = "Use `set_feature_settings()` instead."]
109 pub fn feature_settings(&mut self, val: &str) -> &mut Self {
110 self.set_feature_settings(val);
111 self
112 }
113 #[deprecated = "Use `set_stretch()` instead."]
114 pub fn stretch(&mut self, val: &str) -> &mut Self {
115 self.set_stretch(val);
116 self
117 }
118 #[deprecated = "Use `set_style()` instead."]
119 pub fn style(&mut self, val: &str) -> &mut Self {
120 self.set_style(val);
121 self
122 }
123 #[deprecated = "Use `set_unicode_range()` instead."]
124 pub fn unicode_range(&mut self, val: &str) -> &mut Self {
125 self.set_unicode_range(val);
126 self
127 }
128 #[deprecated = "Use `set_variant()` instead."]
129 pub fn variant(&mut self, val: &str) -> &mut Self {
130 self.set_variant(val);
131 self
132 }
133 #[deprecated = "Use `set_variation_settings()` instead."]
134 pub fn variation_settings(&mut self, val: &str) -> &mut Self {
135 self.set_variation_settings(val);
136 self
137 }
138 #[deprecated = "Use `set_weight()` instead."]
139 pub fn weight(&mut self, val: &str) -> &mut Self {
140 self.set_weight(val);
141 self
142 }
143}
144impl Default for FontFaceDescriptors {
145 fn default() -> Self {
146 Self::new()
147 }
148}