1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FontFace , typescript_type = "FontFace")] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `FontFace` class."] 9 #[doc = ""] 10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace)"] 11 #[doc = ""] 12 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] 13 pub type FontFace; 14 # [wasm_bindgen (structural , method , getter , js_class = "FontFace" , js_name = family)] 15 #[doc = "Getter for the `family` field of this object."] 16 #[doc = ""] 17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/family)"] 18 #[doc = ""] 19 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] family(this: &FontFace) -> String20 pub fn family(this: &FontFace) -> String; 21 # [wasm_bindgen (structural , method , setter , js_class = "FontFace" , js_name = family)] 22 #[doc = "Setter for the `family` field of this object."] 23 #[doc = ""] 24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/family)"] 25 #[doc = ""] 26 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] set_family(this: &FontFace, value: &str)27 pub fn set_family(this: &FontFace, value: &str); 28 # [wasm_bindgen (structural , method , getter , js_class = "FontFace" , js_name = style)] 29 #[doc = "Getter for the `style` field of this object."] 30 #[doc = ""] 31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/style)"] 32 #[doc = ""] 33 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] style(this: &FontFace) -> String34 pub fn style(this: &FontFace) -> String; 35 # [wasm_bindgen (structural , method , setter , js_class = "FontFace" , js_name = style)] 36 #[doc = "Setter for the `style` field of this object."] 37 #[doc = ""] 38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/style)"] 39 #[doc = ""] 40 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] set_style(this: &FontFace, value: &str)41 pub fn set_style(this: &FontFace, value: &str); 42 # [wasm_bindgen (structural , method , getter , js_class = "FontFace" , js_name = weight)] 43 #[doc = "Getter for the `weight` field of this object."] 44 #[doc = ""] 45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/weight)"] 46 #[doc = ""] 47 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] weight(this: &FontFace) -> String48 pub fn weight(this: &FontFace) -> String; 49 # [wasm_bindgen (structural , method , setter , js_class = "FontFace" , js_name = weight)] 50 #[doc = "Setter for the `weight` field of this object."] 51 #[doc = ""] 52 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/weight)"] 53 #[doc = ""] 54 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] set_weight(this: &FontFace, value: &str)55 pub fn set_weight(this: &FontFace, value: &str); 56 # [wasm_bindgen (structural , method , getter , js_class = "FontFace" , js_name = stretch)] 57 #[doc = "Getter for the `stretch` field of this object."] 58 #[doc = ""] 59 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/stretch)"] 60 #[doc = ""] 61 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] stretch(this: &FontFace) -> String62 pub fn stretch(this: &FontFace) -> String; 63 # [wasm_bindgen (structural , method , setter , js_class = "FontFace" , js_name = stretch)] 64 #[doc = "Setter for the `stretch` field of this object."] 65 #[doc = ""] 66 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/stretch)"] 67 #[doc = ""] 68 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] set_stretch(this: &FontFace, value: &str)69 pub fn set_stretch(this: &FontFace, value: &str); 70 # [wasm_bindgen (structural , method , getter , js_class = "FontFace" , js_name = unicodeRange)] 71 #[doc = "Getter for the `unicodeRange` field of this object."] 72 #[doc = ""] 73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/unicodeRange)"] 74 #[doc = ""] 75 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] unicode_range(this: &FontFace) -> String76 pub fn unicode_range(this: &FontFace) -> String; 77 # [wasm_bindgen (structural , method , setter , js_class = "FontFace" , js_name = unicodeRange)] 78 #[doc = "Setter for the `unicodeRange` field of this object."] 79 #[doc = ""] 80 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/unicodeRange)"] 81 #[doc = ""] 82 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] set_unicode_range(this: &FontFace, value: &str)83 pub fn set_unicode_range(this: &FontFace, value: &str); 84 # [wasm_bindgen (structural , method , getter , js_class = "FontFace" , js_name = variant)] 85 #[doc = "Getter for the `variant` field of this object."] 86 #[doc = ""] 87 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variant)"] 88 #[doc = ""] 89 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] variant(this: &FontFace) -> String90 pub fn variant(this: &FontFace) -> String; 91 # [wasm_bindgen (structural , method , setter , js_class = "FontFace" , js_name = variant)] 92 #[doc = "Setter for the `variant` field of this object."] 93 #[doc = ""] 94 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variant)"] 95 #[doc = ""] 96 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] set_variant(this: &FontFace, value: &str)97 pub fn set_variant(this: &FontFace, value: &str); 98 # [wasm_bindgen (structural , method , getter , js_class = "FontFace" , js_name = featureSettings)] 99 #[doc = "Getter for the `featureSettings` field of this object."] 100 #[doc = ""] 101 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/featureSettings)"] 102 #[doc = ""] 103 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] feature_settings(this: &FontFace) -> String104 pub fn feature_settings(this: &FontFace) -> String; 105 # [wasm_bindgen (structural , method , setter , js_class = "FontFace" , js_name = featureSettings)] 106 #[doc = "Setter for the `featureSettings` field of this object."] 107 #[doc = ""] 108 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/featureSettings)"] 109 #[doc = ""] 110 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] set_feature_settings(this: &FontFace, value: &str)111 pub fn set_feature_settings(this: &FontFace, value: &str); 112 # [wasm_bindgen (structural , method , getter , js_class = "FontFace" , js_name = variationSettings)] 113 #[doc = "Getter for the `variationSettings` field of this object."] 114 #[doc = ""] 115 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variationSettings)"] 116 #[doc = ""] 117 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] variation_settings(this: &FontFace) -> String118 pub fn variation_settings(this: &FontFace) -> String; 119 # [wasm_bindgen (structural , method , setter , js_class = "FontFace" , js_name = variationSettings)] 120 #[doc = "Setter for the `variationSettings` field of this object."] 121 #[doc = ""] 122 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/variationSettings)"] 123 #[doc = ""] 124 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] set_variation_settings(this: &FontFace, value: &str)125 pub fn set_variation_settings(this: &FontFace, value: &str); 126 # [wasm_bindgen (structural , method , getter , js_class = "FontFace" , js_name = display)] 127 #[doc = "Getter for the `display` field of this object."] 128 #[doc = ""] 129 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/display)"] 130 #[doc = ""] 131 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] display(this: &FontFace) -> String132 pub fn display(this: &FontFace) -> String; 133 # [wasm_bindgen (structural , method , setter , js_class = "FontFace" , js_name = display)] 134 #[doc = "Setter for the `display` field of this object."] 135 #[doc = ""] 136 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/display)"] 137 #[doc = ""] 138 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] set_display(this: &FontFace, value: &str)139 pub fn set_display(this: &FontFace, value: &str); 140 #[cfg(feature = "FontFaceLoadStatus")] 141 # [wasm_bindgen (structural , method , getter , js_class = "FontFace" , js_name = status)] 142 #[doc = "Getter for the `status` field of this object."] 143 #[doc = ""] 144 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/status)"] 145 #[doc = ""] 146 #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceLoadStatus`*"] status(this: &FontFace) -> FontFaceLoadStatus147 pub fn status(this: &FontFace) -> FontFaceLoadStatus; 148 # [wasm_bindgen (structural , catch , method , getter , js_class = "FontFace" , js_name = loaded)] 149 #[doc = "Getter for the `loaded` field of this object."] 150 #[doc = ""] 151 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/loaded)"] 152 #[doc = ""] 153 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] loaded(this: &FontFace) -> Result<::js_sys::Promise, JsValue>154 pub fn loaded(this: &FontFace) -> Result<::js_sys::Promise, JsValue>; 155 #[wasm_bindgen(catch, constructor, js_class = "FontFace")] 156 #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."] 157 #[doc = ""] 158 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"] 159 #[doc = ""] 160 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] new_with_str(family: &str, source: &str) -> Result<FontFace, JsValue>161 pub fn new_with_str(family: &str, source: &str) -> Result<FontFace, JsValue>; 162 #[wasm_bindgen(catch, constructor, js_class = "FontFace")] 163 #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."] 164 #[doc = ""] 165 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"] 166 #[doc = ""] 167 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] new_with_array_buffer( family: &str, source: &::js_sys::ArrayBuffer, ) -> Result<FontFace, JsValue>168 pub fn new_with_array_buffer( 169 family: &str, 170 source: &::js_sys::ArrayBuffer, 171 ) -> Result<FontFace, JsValue>; 172 #[wasm_bindgen(catch, constructor, js_class = "FontFace")] 173 #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."] 174 #[doc = ""] 175 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"] 176 #[doc = ""] 177 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] new_with_array_buffer_view( family: &str, source: &::js_sys::Object, ) -> Result<FontFace, JsValue>178 pub fn new_with_array_buffer_view( 179 family: &str, 180 source: &::js_sys::Object, 181 ) -> Result<FontFace, JsValue>; 182 #[wasm_bindgen(catch, constructor, js_class = "FontFace")] 183 #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."] 184 #[doc = ""] 185 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"] 186 #[doc = ""] 187 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] new_with_u8_array(family: &str, source: &mut [u8]) -> Result<FontFace, JsValue>188 pub fn new_with_u8_array(family: &str, source: &mut [u8]) -> Result<FontFace, JsValue>; 189 #[cfg(feature = "FontFaceDescriptors")] 190 #[wasm_bindgen(catch, constructor, js_class = "FontFace")] 191 #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."] 192 #[doc = ""] 193 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"] 194 #[doc = ""] 195 #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceDescriptors`*"] new_with_str_and_descriptors( family: &str, source: &str, descriptors: &FontFaceDescriptors, ) -> Result<FontFace, JsValue>196 pub fn new_with_str_and_descriptors( 197 family: &str, 198 source: &str, 199 descriptors: &FontFaceDescriptors, 200 ) -> Result<FontFace, JsValue>; 201 #[cfg(feature = "FontFaceDescriptors")] 202 #[wasm_bindgen(catch, constructor, js_class = "FontFace")] 203 #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."] 204 #[doc = ""] 205 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"] 206 #[doc = ""] 207 #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceDescriptors`*"] new_with_array_buffer_and_descriptors( family: &str, source: &::js_sys::ArrayBuffer, descriptors: &FontFaceDescriptors, ) -> Result<FontFace, JsValue>208 pub fn new_with_array_buffer_and_descriptors( 209 family: &str, 210 source: &::js_sys::ArrayBuffer, 211 descriptors: &FontFaceDescriptors, 212 ) -> Result<FontFace, JsValue>; 213 #[cfg(feature = "FontFaceDescriptors")] 214 #[wasm_bindgen(catch, constructor, js_class = "FontFace")] 215 #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."] 216 #[doc = ""] 217 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"] 218 #[doc = ""] 219 #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceDescriptors`*"] new_with_array_buffer_view_and_descriptors( family: &str, source: &::js_sys::Object, descriptors: &FontFaceDescriptors, ) -> Result<FontFace, JsValue>220 pub fn new_with_array_buffer_view_and_descriptors( 221 family: &str, 222 source: &::js_sys::Object, 223 descriptors: &FontFaceDescriptors, 224 ) -> Result<FontFace, JsValue>; 225 #[cfg(feature = "FontFaceDescriptors")] 226 #[wasm_bindgen(catch, constructor, js_class = "FontFace")] 227 #[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."] 228 #[doc = ""] 229 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"] 230 #[doc = ""] 231 #[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceDescriptors`*"] new_with_u8_array_and_descriptors( family: &str, source: &mut [u8], descriptors: &FontFaceDescriptors, ) -> Result<FontFace, JsValue>232 pub fn new_with_u8_array_and_descriptors( 233 family: &str, 234 source: &mut [u8], 235 descriptors: &FontFaceDescriptors, 236 ) -> Result<FontFace, JsValue>; 237 # [wasm_bindgen (catch , method , structural , js_class = "FontFace" , js_name = load)] 238 #[doc = "The `load()` method."] 239 #[doc = ""] 240 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/load)"] 241 #[doc = ""] 242 #[doc = "*This API requires the following crate features to be activated: `FontFace`*"] load(this: &FontFace) -> Result<::js_sys::Promise, JsValue>243 pub fn load(this: &FontFace) -> Result<::js_sys::Promise, JsValue>; 244 } 245