script_bindings/home/runner/work/servo/servo/target/debug/build/script_bindings-d55f55d5af1efaee/out/Bindings/
PannerNodeBinding.rs

1/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
2
3#![allow(non_camel_case_types,non_upper_case_globals,unsafe_op_in_unsafe_fn,unused_imports,unused_variables,unused_assignments,unused_mut,clippy::approx_constant,clippy::enum_variant_names,clippy::let_unit_value,clippy::needless_return,clippy::too_many_arguments,clippy::unnecessary_cast,clippy::upper_case_acronyms)]
4
5use crate::codegen::GenericBindings::AudioNodeBinding::AudioNode_Binding;
6use crate::codegen::GenericBindings::AudioNodeBinding::ChannelCountMode;
7use crate::codegen::GenericBindings::AudioNodeBinding::ChannelCountModeValues;
8use crate::codegen::GenericBindings::AudioNodeBinding::ChannelInterpretation;
9use crate::codegen::GenericBindings::AudioNodeBinding::ChannelInterpretationValues;
10use crate::codegen::GenericBindings::EventTargetBinding::EventTarget_Binding;
11use crate::import::base::*;
12
13
14#[repr(usize)]
15#[derive(Copy, Clone, Debug, JSTraceable, MallocSizeOf, PartialEq)]
16pub enum DistanceModelType {
17    Linear,
18    Inverse,
19    Exponential
20}
21pub mod DistanceModelTypeValues {
22
23    use crate::utils::find_enum_value;
24    use js::conversions::ConversionResult;
25    use js::conversions::FromJSValConvertible;
26    use js::conversions::ToJSValConvertible;
27    use js::context::RawJSContext;
28    use js::rust::HandleValue;
29    use js::rust::MutableHandleValue;
30    use js::jsval::JSVal;
31
32    pub(crate) const pairs: &[(&str, super::DistanceModelType)] = &[
33        ("linear", super::DistanceModelType::Linear),
34        ("inverse", super::DistanceModelType::Inverse),
35        ("exponential", super::DistanceModelType::Exponential),
36    ];
37
38    impl super::DistanceModelType {
39        pub fn as_str(&self) -> &'static str {
40            pairs[*self as usize].0
41        }
42    }
43
44    impl Default for super::DistanceModelType {
45        fn default() -> super::DistanceModelType {
46            pairs[0].1
47        }
48    }
49
50    impl std::str::FromStr for super::DistanceModelType {
51        type Err = ();
52
53        fn from_str(s: &str) -> Result<Self, Self::Err> {
54            pairs
55                .iter()
56                .find(|&&(key, _)| s == key)
57                .map(|&(_, ev)| ev)
58                .ok_or(())
59        }
60    }
61
62    impl ToJSValConvertible for super::DistanceModelType {
63        unsafe fn to_jsval(&self, cx: *mut RawJSContext, rval: MutableHandleValue) {
64            pairs[*self as usize].0.to_jsval(cx, rval);
65        }
66    }
67
68    impl FromJSValConvertible for super::DistanceModelType {
69        type Config = ();
70        unsafe fn from_jsval(cx: *mut RawJSContext, value: HandleValue, _option: ())
71                             -> Result<ConversionResult<super::DistanceModelType>, ()> {
72            match find_enum_value(cx, value, pairs) {
73                Err(_) => Err(()),
74                Ok((None, search)) => {
75                    Ok(ConversionResult::Failure(
76                        format!("'{}' is not a valid enum value for enumeration 'DistanceModelType'.", search).into()
77                    ))
78                }
79                Ok((Some(&value), _)) => Ok(ConversionResult::Success(value)),
80            }
81        }
82    }
83        } // mod DistanceModelTypeValues
84
85
86#[repr(usize)]
87#[derive(Copy, Clone, Debug, JSTraceable, MallocSizeOf, PartialEq)]
88pub enum PanningModelType {
89    Equalpower,
90    HRTF
91}
92pub mod PanningModelTypeValues {
93
94    use crate::utils::find_enum_value;
95    use js::conversions::ConversionResult;
96    use js::conversions::FromJSValConvertible;
97    use js::conversions::ToJSValConvertible;
98    use js::context::RawJSContext;
99    use js::rust::HandleValue;
100    use js::rust::MutableHandleValue;
101    use js::jsval::JSVal;
102
103    pub(crate) const pairs: &[(&str, super::PanningModelType)] = &[
104        ("equalpower", super::PanningModelType::Equalpower),
105        ("HRTF", super::PanningModelType::HRTF),
106    ];
107
108    impl super::PanningModelType {
109        pub fn as_str(&self) -> &'static str {
110            pairs[*self as usize].0
111        }
112    }
113
114    impl Default for super::PanningModelType {
115        fn default() -> super::PanningModelType {
116            pairs[0].1
117        }
118    }
119
120    impl std::str::FromStr for super::PanningModelType {
121        type Err = ();
122
123        fn from_str(s: &str) -> Result<Self, Self::Err> {
124            pairs
125                .iter()
126                .find(|&&(key, _)| s == key)
127                .map(|&(_, ev)| ev)
128                .ok_or(())
129        }
130    }
131
132    impl ToJSValConvertible for super::PanningModelType {
133        unsafe fn to_jsval(&self, cx: *mut RawJSContext, rval: MutableHandleValue) {
134            pairs[*self as usize].0.to_jsval(cx, rval);
135        }
136    }
137
138    impl FromJSValConvertible for super::PanningModelType {
139        type Config = ();
140        unsafe fn from_jsval(cx: *mut RawJSContext, value: HandleValue, _option: ())
141                             -> Result<ConversionResult<super::PanningModelType>, ()> {
142            match find_enum_value(cx, value, pairs) {
143                Err(_) => Err(()),
144                Ok((None, search)) => {
145                    Ok(ConversionResult::Failure(
146                        format!("'{}' is not a valid enum value for enumeration 'PanningModelType'.", search).into()
147                    ))
148                }
149                Ok((Some(&value), _)) => Ok(ConversionResult::Success(value)),
150            }
151        }
152    }
153        } // mod PanningModelTypeValues
154
155#[derive(JSTraceable)]
156pub struct PannerOptions {
157    pub parent: crate::codegen::GenericBindings::AudioNodeBinding::AudioNodeOptions,
158    pub coneInnerAngle: Finite<f64>,
159    pub coneOuterAngle: Finite<f64>,
160    pub coneOuterGain: Finite<f64>,
161    pub distanceModel: DistanceModelType,
162    pub maxDistance: Finite<f64>,
163    pub orientationX: Finite<f32>,
164    pub orientationY: Finite<f32>,
165    pub orientationZ: Finite<f32>,
166    pub panningModel: PanningModelType,
167    pub positionX: Finite<f32>,
168    pub positionY: Finite<f32>,
169    pub positionZ: Finite<f32>,
170    pub refDistance: Finite<f64>,
171    pub rolloffFactor: Finite<f64>,
172}
173impl Default for PannerOptions {
174    fn default() -> Self {
175        Self::empty()
176    }
177}
178
179impl PannerOptions {
180    pub fn empty() -> Self {
181        Self {
182                parent: crate::codegen::GenericBindings::AudioNodeBinding::AudioNodeOptions::empty(),
183                coneInnerAngle: Finite::wrap(360.0),
184                coneOuterAngle: Finite::wrap(360.0),
185                coneOuterGain: Finite::wrap(0.0),
186                distanceModel: DistanceModelType::Inverse,
187                maxDistance: Finite::wrap(10000.0),
188                orientationX: Finite::wrap(1.0),
189                orientationY: Finite::wrap(0.0),
190                orientationZ: Finite::wrap(0.0),
191                panningModel: PanningModelType::Equalpower,
192                positionX: Finite::wrap(0.0),
193                positionY: Finite::wrap(0.0),
194                positionZ: Finite::wrap(0.0),
195                refDistance: Finite::wrap(1.0),
196                rolloffFactor: Finite::wrap(1.0),
197        }
198    }
199    pub fn new(cx: SafeJSContext, val: HandleValue, can_gc: CanGc)
200                      -> Result<ConversionResult<PannerOptions>, ()> {
201        unsafe {
202            let object = if val.get().is_null_or_undefined() {
203                ptr::null_mut()
204            } else if val.get().is_object() {
205                val.get().to_object()
206            } else {
207                return Ok(ConversionResult::Failure("Value is not an object.".into()));
208            };
209            rooted!(&in(cx) let object = object);
210        let dictionary = PannerOptions {
211                parent: {
212                    match crate::codegen::GenericBindings::AudioNodeBinding::AudioNodeOptions::new(cx, val, can_gc)? {
213                        ConversionResult::Success(v) => v,
214                        ConversionResult::Failure(error) => {
215                            throw_type_error(cx.raw_cx(), &error);
216                            return Err(());
217                        }
218                    }
219                },
220                coneInnerAngle: {
221                    rooted!(&in(cx) let mut rval = UndefinedValue());
222                    if get_dictionary_property(cx.raw_cx(), object.handle(), "coneInnerAngle", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
223                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
224                                Ok(ConversionResult::Success(value)) => value,
225                                Ok(ConversionResult::Failure(error)) => {
226                                    throw_type_error(cx.raw_cx(), &error);
227                            return Err(());
228
229                                }
230                                _ => {
231                                    return Err(());
232
233                                },
234                            }
235
236                    } else {
237                            Finite::wrap(360.0)
238                    }
239                },
240                coneOuterAngle: {
241                    rooted!(&in(cx) let mut rval = UndefinedValue());
242                    if get_dictionary_property(cx.raw_cx(), object.handle(), "coneOuterAngle", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
243                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
244                                Ok(ConversionResult::Success(value)) => value,
245                                Ok(ConversionResult::Failure(error)) => {
246                                    throw_type_error(cx.raw_cx(), &error);
247                            return Err(());
248
249                                }
250                                _ => {
251                                    return Err(());
252
253                                },
254                            }
255
256                    } else {
257                            Finite::wrap(360.0)
258                    }
259                },
260                coneOuterGain: {
261                    rooted!(&in(cx) let mut rval = UndefinedValue());
262                    if get_dictionary_property(cx.raw_cx(), object.handle(), "coneOuterGain", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
263                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
264                                Ok(ConversionResult::Success(value)) => value,
265                                Ok(ConversionResult::Failure(error)) => {
266                                    throw_type_error(cx.raw_cx(), &error);
267                            return Err(());
268
269                                }
270                                _ => {
271                                    return Err(());
272
273                                },
274                            }
275
276                    } else {
277                            Finite::wrap(0.0)
278                    }
279                },
280                distanceModel: {
281                    rooted!(&in(cx) let mut rval = UndefinedValue());
282                    if get_dictionary_property(cx.raw_cx(), object.handle(), "distanceModel", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
283                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
284                                Ok(ConversionResult::Success(value)) => value,
285                                Ok(ConversionResult::Failure(error)) => {
286                                    throw_type_error(cx.raw_cx(), &error); return Err(());
287
288                                }
289                                _ => {
290                                    return Err(());
291
292                                },
293                            }
294
295                    } else {
296                            DistanceModelType::Inverse
297                    }
298                },
299                maxDistance: {
300                    rooted!(&in(cx) let mut rval = UndefinedValue());
301                    if get_dictionary_property(cx.raw_cx(), object.handle(), "maxDistance", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
302                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
303                                Ok(ConversionResult::Success(value)) => value,
304                                Ok(ConversionResult::Failure(error)) => {
305                                    throw_type_error(cx.raw_cx(), &error);
306                            return Err(());
307
308                                }
309                                _ => {
310                                    return Err(());
311
312                                },
313                            }
314
315                    } else {
316                            Finite::wrap(10000.0)
317                    }
318                },
319                orientationX: {
320                    rooted!(&in(cx) let mut rval = UndefinedValue());
321                    if get_dictionary_property(cx.raw_cx(), object.handle(), "orientationX", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
322                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
323                                Ok(ConversionResult::Success(value)) => value,
324                                Ok(ConversionResult::Failure(error)) => {
325                                    throw_type_error(cx.raw_cx(), &error);
326                            return Err(());
327
328                                }
329                                _ => {
330                                    return Err(());
331
332                                },
333                            }
334
335                    } else {
336                            Finite::wrap(1.0)
337                    }
338                },
339                orientationY: {
340                    rooted!(&in(cx) let mut rval = UndefinedValue());
341                    if get_dictionary_property(cx.raw_cx(), object.handle(), "orientationY", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
342                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
343                                Ok(ConversionResult::Success(value)) => value,
344                                Ok(ConversionResult::Failure(error)) => {
345                                    throw_type_error(cx.raw_cx(), &error);
346                            return Err(());
347
348                                }
349                                _ => {
350                                    return Err(());
351
352                                },
353                            }
354
355                    } else {
356                            Finite::wrap(0.0)
357                    }
358                },
359                orientationZ: {
360                    rooted!(&in(cx) let mut rval = UndefinedValue());
361                    if get_dictionary_property(cx.raw_cx(), object.handle(), "orientationZ", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
362                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
363                                Ok(ConversionResult::Success(value)) => value,
364                                Ok(ConversionResult::Failure(error)) => {
365                                    throw_type_error(cx.raw_cx(), &error);
366                            return Err(());
367
368                                }
369                                _ => {
370                                    return Err(());
371
372                                },
373                            }
374
375                    } else {
376                            Finite::wrap(0.0)
377                    }
378                },
379                panningModel: {
380                    rooted!(&in(cx) let mut rval = UndefinedValue());
381                    if get_dictionary_property(cx.raw_cx(), object.handle(), "panningModel", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
382                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
383                                Ok(ConversionResult::Success(value)) => value,
384                                Ok(ConversionResult::Failure(error)) => {
385                                    throw_type_error(cx.raw_cx(), &error); return Err(());
386
387                                }
388                                _ => {
389                                    return Err(());
390
391                                },
392                            }
393
394                    } else {
395                            PanningModelType::Equalpower
396                    }
397                },
398                positionX: {
399                    rooted!(&in(cx) let mut rval = UndefinedValue());
400                    if get_dictionary_property(cx.raw_cx(), object.handle(), "positionX", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
401                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
402                                Ok(ConversionResult::Success(value)) => value,
403                                Ok(ConversionResult::Failure(error)) => {
404                                    throw_type_error(cx.raw_cx(), &error);
405                            return Err(());
406
407                                }
408                                _ => {
409                                    return Err(());
410
411                                },
412                            }
413
414                    } else {
415                            Finite::wrap(0.0)
416                    }
417                },
418                positionY: {
419                    rooted!(&in(cx) let mut rval = UndefinedValue());
420                    if get_dictionary_property(cx.raw_cx(), object.handle(), "positionY", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
421                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
422                                Ok(ConversionResult::Success(value)) => value,
423                                Ok(ConversionResult::Failure(error)) => {
424                                    throw_type_error(cx.raw_cx(), &error);
425                            return Err(());
426
427                                }
428                                _ => {
429                                    return Err(());
430
431                                },
432                            }
433
434                    } else {
435                            Finite::wrap(0.0)
436                    }
437                },
438                positionZ: {
439                    rooted!(&in(cx) let mut rval = UndefinedValue());
440                    if get_dictionary_property(cx.raw_cx(), object.handle(), "positionZ", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
441                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
442                                Ok(ConversionResult::Success(value)) => value,
443                                Ok(ConversionResult::Failure(error)) => {
444                                    throw_type_error(cx.raw_cx(), &error);
445                            return Err(());
446
447                                }
448                                _ => {
449                                    return Err(());
450
451                                },
452                            }
453
454                    } else {
455                            Finite::wrap(0.0)
456                    }
457                },
458                refDistance: {
459                    rooted!(&in(cx) let mut rval = UndefinedValue());
460                    if get_dictionary_property(cx.raw_cx(), object.handle(), "refDistance", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
461                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
462                                Ok(ConversionResult::Success(value)) => value,
463                                Ok(ConversionResult::Failure(error)) => {
464                                    throw_type_error(cx.raw_cx(), &error);
465                            return Err(());
466
467                                }
468                                _ => {
469                                    return Err(());
470
471                                },
472                            }
473
474                    } else {
475                            Finite::wrap(1.0)
476                    }
477                },
478                rolloffFactor: {
479                    rooted!(&in(cx) let mut rval = UndefinedValue());
480                    if get_dictionary_property(cx.raw_cx(), object.handle(), "rolloffFactor", rval.handle_mut(), can_gc)? && !rval.is_undefined() {
481                            match FromJSValConvertible::from_jsval(cx.raw_cx(), rval.handle(), ()) {
482                                Ok(ConversionResult::Success(value)) => value,
483                                Ok(ConversionResult::Failure(error)) => {
484                                    throw_type_error(cx.raw_cx(), &error);
485                            return Err(());
486
487                                }
488                                _ => {
489                                    return Err(());
490
491                                },
492                            }
493
494                    } else {
495                            Finite::wrap(1.0)
496                    }
497                },
498        };
499            Ok(ConversionResult::Success(dictionary))
500        }
501    }
502}
503
504impl FromJSValConvertible for PannerOptions {
505    type Config = ();
506    unsafe fn from_jsval(cx: *mut RawJSContext, value: HandleValue, _option: ())
507                         -> Result<ConversionResult<PannerOptions>, ()> {
508        PannerOptions::new(SafeJSContext::from_ptr(cx), value, CanGc::note())
509    }
510}
511
512impl PannerOptions {
513    #[allow(clippy::wrong_self_convention)]
514    pub unsafe fn to_jsobject(&self, cx: *mut RawJSContext, mut obj: MutableHandleObject) {
515        self.parent.to_jsobject(cx, obj.reborrow());
516        let coneInnerAngle = &self.coneInnerAngle;
517        rooted!(in(cx) let mut coneInnerAngle_js = UndefinedValue());
518        coneInnerAngle.to_jsval(cx, coneInnerAngle_js.handle_mut());
519        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "coneInnerAngle", coneInnerAngle_js.handle()).unwrap();
520        let coneOuterAngle = &self.coneOuterAngle;
521        rooted!(in(cx) let mut coneOuterAngle_js = UndefinedValue());
522        coneOuterAngle.to_jsval(cx, coneOuterAngle_js.handle_mut());
523        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "coneOuterAngle", coneOuterAngle_js.handle()).unwrap();
524        let coneOuterGain = &self.coneOuterGain;
525        rooted!(in(cx) let mut coneOuterGain_js = UndefinedValue());
526        coneOuterGain.to_jsval(cx, coneOuterGain_js.handle_mut());
527        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "coneOuterGain", coneOuterGain_js.handle()).unwrap();
528        let distanceModel = &self.distanceModel;
529        rooted!(in(cx) let mut distanceModel_js = UndefinedValue());
530        distanceModel.to_jsval(cx, distanceModel_js.handle_mut());
531        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "distanceModel", distanceModel_js.handle()).unwrap();
532        let maxDistance = &self.maxDistance;
533        rooted!(in(cx) let mut maxDistance_js = UndefinedValue());
534        maxDistance.to_jsval(cx, maxDistance_js.handle_mut());
535        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "maxDistance", maxDistance_js.handle()).unwrap();
536        let orientationX = &self.orientationX;
537        rooted!(in(cx) let mut orientationX_js = UndefinedValue());
538        orientationX.to_jsval(cx, orientationX_js.handle_mut());
539        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "orientationX", orientationX_js.handle()).unwrap();
540        let orientationY = &self.orientationY;
541        rooted!(in(cx) let mut orientationY_js = UndefinedValue());
542        orientationY.to_jsval(cx, orientationY_js.handle_mut());
543        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "orientationY", orientationY_js.handle()).unwrap();
544        let orientationZ = &self.orientationZ;
545        rooted!(in(cx) let mut orientationZ_js = UndefinedValue());
546        orientationZ.to_jsval(cx, orientationZ_js.handle_mut());
547        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "orientationZ", orientationZ_js.handle()).unwrap();
548        let panningModel = &self.panningModel;
549        rooted!(in(cx) let mut panningModel_js = UndefinedValue());
550        panningModel.to_jsval(cx, panningModel_js.handle_mut());
551        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "panningModel", panningModel_js.handle()).unwrap();
552        let positionX = &self.positionX;
553        rooted!(in(cx) let mut positionX_js = UndefinedValue());
554        positionX.to_jsval(cx, positionX_js.handle_mut());
555        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "positionX", positionX_js.handle()).unwrap();
556        let positionY = &self.positionY;
557        rooted!(in(cx) let mut positionY_js = UndefinedValue());
558        positionY.to_jsval(cx, positionY_js.handle_mut());
559        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "positionY", positionY_js.handle()).unwrap();
560        let positionZ = &self.positionZ;
561        rooted!(in(cx) let mut positionZ_js = UndefinedValue());
562        positionZ.to_jsval(cx, positionZ_js.handle_mut());
563        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "positionZ", positionZ_js.handle()).unwrap();
564        let refDistance = &self.refDistance;
565        rooted!(in(cx) let mut refDistance_js = UndefinedValue());
566        refDistance.to_jsval(cx, refDistance_js.handle_mut());
567        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "refDistance", refDistance_js.handle()).unwrap();
568        let rolloffFactor = &self.rolloffFactor;
569        rooted!(in(cx) let mut rolloffFactor_js = UndefinedValue());
570        rolloffFactor.to_jsval(cx, rolloffFactor_js.handle_mut());
571        set_dictionary_property(SafeJSContext::from_ptr(cx), obj.handle(), "rolloffFactor", rolloffFactor_js.handle()).unwrap();
572    }
573}
574
575impl ToJSValConvertible for PannerOptions {
576    unsafe fn to_jsval(&self, cx: *mut RawJSContext, mut rval: MutableHandleValue) {
577        rooted!(in(cx) let mut obj = JS_NewObject(cx, ptr::null()));
578        self.to_jsobject(cx, obj.handle_mut());
579        rval.set(ObjectOrNullValue(obj.get()))
580    }
581}
582
583
584pub use self::PannerNode_Binding::{Wrap, PannerNodeMethods, GetProtoObject, DefineDOMInterface};
585pub mod PannerNode_Binding {
586use crate::codegen::GenericBindings::AudioNodeBinding::AudioNode_Binding;
587use crate::codegen::GenericBindings::AudioNodeBinding::ChannelCountMode;
588use crate::codegen::GenericBindings::AudioNodeBinding::ChannelCountModeValues;
589use crate::codegen::GenericBindings::AudioNodeBinding::ChannelInterpretation;
590use crate::codegen::GenericBindings::AudioNodeBinding::ChannelInterpretationValues;
591use crate::codegen::GenericBindings::EventTargetBinding::EventTarget_Binding;
592use crate::codegen::GenericBindings::PannerNodeBinding::DistanceModelType;
593use crate::codegen::GenericBindings::PannerNodeBinding::DistanceModelTypeValues;
594use crate::codegen::GenericBindings::PannerNodeBinding::PannerOptions;
595use crate::codegen::GenericBindings::PannerNodeBinding::PanningModelType;
596use crate::codegen::GenericBindings::PannerNodeBinding::PanningModelTypeValues;
597use crate::import::module::*;
598
599unsafe extern "C" fn get_panningModel<D: DomTypes>
600(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
601    let mut result = false;
602    wrap_panic(&mut || result = (|| {
603        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
604        let this = &*(this as *const D::PannerNode);
605        let result: PanningModelType = this.PanningModel();
606
607        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
608        return true;
609    })());
610    result
611}
612
613unsafe extern "C" fn set_panningModel<D: DomTypes>
614(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
615    let mut result = false;
616    wrap_panic(&mut || result = (|| {
617        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
618        let this = &*(this as *const D::PannerNode);
619        let arg0: PanningModelType = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
620            Ok(ConversionResult::Success(value)) => value,
621            Ok(ConversionResult::Failure(error)) => {
622                return true;
623            }
624            _ => {
625                return false;
626
627            },
628        }
629        ;
630        let result: () = this.SetPanningModel(arg0);
631
632        true
633    })());
634    result
635}
636
637
638static panningModel_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
639
640pub(crate) fn init_panningModel_getterinfo<D: DomTypes>() {
641    panningModel_getterinfo.set(JSJitInfo {
642    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
643        getter: Some(get_panningModel::<D>)
644    },
645    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
646        protoID: PrototypeList::ID::PannerNode as u16,
647    },
648    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
649    _bitfield_align_1: [],
650    _bitfield_1: __BindgenBitfieldUnit::new(
651        new_jsjitinfo_bitfield_1!(
652            JSJitInfo_OpType::Getter as u8,
653            JSJitInfo_AliasSet::AliasEverything as u8,
654            JSValueType::JSVAL_TYPE_STRING as u8,
655            true,
656            false,
657            false,
658            false,
659            false,
660            false,
661            0,
662        ).to_ne_bytes()
663    ),
664});
665}
666static panningModel_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
667
668pub(crate) fn init_panningModel_setterinfo<D: DomTypes>() {
669    panningModel_setterinfo.set(JSJitInfo {
670    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
671        setter: Some(set_panningModel::<D>)
672    },
673    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
674        protoID: PrototypeList::ID::PannerNode as u16,
675    },
676    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
677    _bitfield_align_1: [],
678    _bitfield_1: __BindgenBitfieldUnit::new(
679        new_jsjitinfo_bitfield_1!(
680            JSJitInfo_OpType::Setter as u8,
681            JSJitInfo_AliasSet::AliasEverything as u8,
682            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
683            false,
684            false,
685            false,
686            false,
687            false,
688            false,
689            0,
690        ).to_ne_bytes()
691    ),
692});
693}
694unsafe extern "C" fn get_positionX<D: DomTypes>
695(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
696    let mut result = false;
697    wrap_panic(&mut || result = (|| {
698        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
699        let this = &*(this as *const D::PannerNode);
700        let result: DomRoot<D::AudioParam> = this.PositionX();
701
702        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
703        return true;
704    })());
705    result
706}
707
708
709static positionX_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
710
711pub(crate) fn init_positionX_getterinfo<D: DomTypes>() {
712    positionX_getterinfo.set(JSJitInfo {
713    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
714        getter: Some(get_positionX::<D>)
715    },
716    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
717        protoID: PrototypeList::ID::PannerNode as u16,
718    },
719    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
720    _bitfield_align_1: [],
721    _bitfield_1: __BindgenBitfieldUnit::new(
722        new_jsjitinfo_bitfield_1!(
723            JSJitInfo_OpType::Getter as u8,
724            JSJitInfo_AliasSet::AliasEverything as u8,
725            JSValueType::JSVAL_TYPE_OBJECT as u8,
726            true,
727            false,
728            false,
729            false,
730            false,
731            false,
732            0,
733        ).to_ne_bytes()
734    ),
735});
736}
737unsafe extern "C" fn get_positionY<D: DomTypes>
738(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
739    let mut result = false;
740    wrap_panic(&mut || result = (|| {
741        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
742        let this = &*(this as *const D::PannerNode);
743        let result: DomRoot<D::AudioParam> = this.PositionY();
744
745        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
746        return true;
747    })());
748    result
749}
750
751
752static positionY_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
753
754pub(crate) fn init_positionY_getterinfo<D: DomTypes>() {
755    positionY_getterinfo.set(JSJitInfo {
756    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
757        getter: Some(get_positionY::<D>)
758    },
759    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
760        protoID: PrototypeList::ID::PannerNode as u16,
761    },
762    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
763    _bitfield_align_1: [],
764    _bitfield_1: __BindgenBitfieldUnit::new(
765        new_jsjitinfo_bitfield_1!(
766            JSJitInfo_OpType::Getter as u8,
767            JSJitInfo_AliasSet::AliasEverything as u8,
768            JSValueType::JSVAL_TYPE_OBJECT as u8,
769            true,
770            false,
771            false,
772            false,
773            false,
774            false,
775            0,
776        ).to_ne_bytes()
777    ),
778});
779}
780unsafe extern "C" fn get_positionZ<D: DomTypes>
781(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
782    let mut result = false;
783    wrap_panic(&mut || result = (|| {
784        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
785        let this = &*(this as *const D::PannerNode);
786        let result: DomRoot<D::AudioParam> = this.PositionZ();
787
788        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
789        return true;
790    })());
791    result
792}
793
794
795static positionZ_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
796
797pub(crate) fn init_positionZ_getterinfo<D: DomTypes>() {
798    positionZ_getterinfo.set(JSJitInfo {
799    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
800        getter: Some(get_positionZ::<D>)
801    },
802    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
803        protoID: PrototypeList::ID::PannerNode as u16,
804    },
805    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
806    _bitfield_align_1: [],
807    _bitfield_1: __BindgenBitfieldUnit::new(
808        new_jsjitinfo_bitfield_1!(
809            JSJitInfo_OpType::Getter as u8,
810            JSJitInfo_AliasSet::AliasEverything as u8,
811            JSValueType::JSVAL_TYPE_OBJECT as u8,
812            true,
813            false,
814            false,
815            false,
816            false,
817            false,
818            0,
819        ).to_ne_bytes()
820    ),
821});
822}
823unsafe extern "C" fn get_orientationX<D: DomTypes>
824(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
825    let mut result = false;
826    wrap_panic(&mut || result = (|| {
827        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
828        let this = &*(this as *const D::PannerNode);
829        let result: DomRoot<D::AudioParam> = this.OrientationX();
830
831        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
832        return true;
833    })());
834    result
835}
836
837
838static orientationX_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
839
840pub(crate) fn init_orientationX_getterinfo<D: DomTypes>() {
841    orientationX_getterinfo.set(JSJitInfo {
842    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
843        getter: Some(get_orientationX::<D>)
844    },
845    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
846        protoID: PrototypeList::ID::PannerNode as u16,
847    },
848    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
849    _bitfield_align_1: [],
850    _bitfield_1: __BindgenBitfieldUnit::new(
851        new_jsjitinfo_bitfield_1!(
852            JSJitInfo_OpType::Getter as u8,
853            JSJitInfo_AliasSet::AliasEverything as u8,
854            JSValueType::JSVAL_TYPE_OBJECT as u8,
855            true,
856            false,
857            false,
858            false,
859            false,
860            false,
861            0,
862        ).to_ne_bytes()
863    ),
864});
865}
866unsafe extern "C" fn get_orientationY<D: DomTypes>
867(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
868    let mut result = false;
869    wrap_panic(&mut || result = (|| {
870        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
871        let this = &*(this as *const D::PannerNode);
872        let result: DomRoot<D::AudioParam> = this.OrientationY();
873
874        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
875        return true;
876    })());
877    result
878}
879
880
881static orientationY_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
882
883pub(crate) fn init_orientationY_getterinfo<D: DomTypes>() {
884    orientationY_getterinfo.set(JSJitInfo {
885    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
886        getter: Some(get_orientationY::<D>)
887    },
888    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
889        protoID: PrototypeList::ID::PannerNode as u16,
890    },
891    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
892    _bitfield_align_1: [],
893    _bitfield_1: __BindgenBitfieldUnit::new(
894        new_jsjitinfo_bitfield_1!(
895            JSJitInfo_OpType::Getter as u8,
896            JSJitInfo_AliasSet::AliasEverything as u8,
897            JSValueType::JSVAL_TYPE_OBJECT as u8,
898            true,
899            false,
900            false,
901            false,
902            false,
903            false,
904            0,
905        ).to_ne_bytes()
906    ),
907});
908}
909unsafe extern "C" fn get_orientationZ<D: DomTypes>
910(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
911    let mut result = false;
912    wrap_panic(&mut || result = (|| {
913        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
914        let this = &*(this as *const D::PannerNode);
915        let result: DomRoot<D::AudioParam> = this.OrientationZ();
916
917        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
918        return true;
919    })());
920    result
921}
922
923
924static orientationZ_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
925
926pub(crate) fn init_orientationZ_getterinfo<D: DomTypes>() {
927    orientationZ_getterinfo.set(JSJitInfo {
928    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
929        getter: Some(get_orientationZ::<D>)
930    },
931    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
932        protoID: PrototypeList::ID::PannerNode as u16,
933    },
934    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
935    _bitfield_align_1: [],
936    _bitfield_1: __BindgenBitfieldUnit::new(
937        new_jsjitinfo_bitfield_1!(
938            JSJitInfo_OpType::Getter as u8,
939            JSJitInfo_AliasSet::AliasEverything as u8,
940            JSValueType::JSVAL_TYPE_OBJECT as u8,
941            true,
942            false,
943            false,
944            false,
945            false,
946            false,
947            0,
948        ).to_ne_bytes()
949    ),
950});
951}
952unsafe extern "C" fn get_distanceModel<D: DomTypes>
953(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
954    let mut result = false;
955    wrap_panic(&mut || result = (|| {
956        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
957        let this = &*(this as *const D::PannerNode);
958        let result: DistanceModelType = this.DistanceModel();
959
960        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
961        return true;
962    })());
963    result
964}
965
966unsafe extern "C" fn set_distanceModel<D: DomTypes>
967(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
968    let mut result = false;
969    wrap_panic(&mut || result = (|| {
970        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
971        let this = &*(this as *const D::PannerNode);
972        let arg0: DistanceModelType = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
973            Ok(ConversionResult::Success(value)) => value,
974            Ok(ConversionResult::Failure(error)) => {
975                return true;
976            }
977            _ => {
978                return false;
979
980            },
981        }
982        ;
983        let result: () = this.SetDistanceModel(arg0);
984
985        true
986    })());
987    result
988}
989
990
991static distanceModel_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
992
993pub(crate) fn init_distanceModel_getterinfo<D: DomTypes>() {
994    distanceModel_getterinfo.set(JSJitInfo {
995    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
996        getter: Some(get_distanceModel::<D>)
997    },
998    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
999        protoID: PrototypeList::ID::PannerNode as u16,
1000    },
1001    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1002    _bitfield_align_1: [],
1003    _bitfield_1: __BindgenBitfieldUnit::new(
1004        new_jsjitinfo_bitfield_1!(
1005            JSJitInfo_OpType::Getter as u8,
1006            JSJitInfo_AliasSet::AliasEverything as u8,
1007            JSValueType::JSVAL_TYPE_STRING as u8,
1008            true,
1009            false,
1010            false,
1011            false,
1012            false,
1013            false,
1014            0,
1015        ).to_ne_bytes()
1016    ),
1017});
1018}
1019static distanceModel_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1020
1021pub(crate) fn init_distanceModel_setterinfo<D: DomTypes>() {
1022    distanceModel_setterinfo.set(JSJitInfo {
1023    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1024        setter: Some(set_distanceModel::<D>)
1025    },
1026    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1027        protoID: PrototypeList::ID::PannerNode as u16,
1028    },
1029    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1030    _bitfield_align_1: [],
1031    _bitfield_1: __BindgenBitfieldUnit::new(
1032        new_jsjitinfo_bitfield_1!(
1033            JSJitInfo_OpType::Setter as u8,
1034            JSJitInfo_AliasSet::AliasEverything as u8,
1035            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
1036            false,
1037            false,
1038            false,
1039            false,
1040            false,
1041            false,
1042            0,
1043        ).to_ne_bytes()
1044    ),
1045});
1046}
1047unsafe extern "C" fn get_refDistance<D: DomTypes>
1048(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
1049    let mut result = false;
1050    wrap_panic(&mut || result = (|| {
1051        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1052        let this = &*(this as *const D::PannerNode);
1053        let result: Finite<f64> = this.RefDistance();
1054
1055        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
1056        return true;
1057    })());
1058    result
1059}
1060
1061unsafe extern "C" fn set_refDistance<D: DomTypes>
1062(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
1063    let mut result = false;
1064    wrap_panic(&mut || result = (|| {
1065        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1066        let this = &*(this as *const D::PannerNode);
1067        let arg0: Finite<f64> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
1068            Ok(ConversionResult::Success(value)) => value,
1069            Ok(ConversionResult::Failure(error)) => {
1070                throw_type_error(cx.raw_cx(), &error);
1071        return false;
1072
1073            }
1074            _ => {
1075                return false;
1076
1077            },
1078        }
1079        ;
1080        let result: Result<(), Error> = this.SetRefDistance(arg0);
1081        let result = match result {
1082            Ok(result) => result,
1083            Err(e) => {
1084                <D as DomHelpers<D>>::throw_dom_exception(SafeJSContext::from_ptr(cx.raw_cx()), &this.global_(InRealm::already(&AlreadyInRealm::assert_for_cx(SafeJSContext::from_ptr(cx.raw_cx())))), e, CanGc::note());
1085                return false;
1086            },
1087        };
1088
1089        true
1090    })());
1091    result
1092}
1093
1094
1095static refDistance_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1096
1097pub(crate) fn init_refDistance_getterinfo<D: DomTypes>() {
1098    refDistance_getterinfo.set(JSJitInfo {
1099    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1100        getter: Some(get_refDistance::<D>)
1101    },
1102    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1103        protoID: PrototypeList::ID::PannerNode as u16,
1104    },
1105    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1106    _bitfield_align_1: [],
1107    _bitfield_1: __BindgenBitfieldUnit::new(
1108        new_jsjitinfo_bitfield_1!(
1109            JSJitInfo_OpType::Getter as u8,
1110            JSJitInfo_AliasSet::AliasEverything as u8,
1111            JSValueType::JSVAL_TYPE_DOUBLE as u8,
1112            true,
1113            false,
1114            false,
1115            false,
1116            false,
1117            false,
1118            0,
1119        ).to_ne_bytes()
1120    ),
1121});
1122}
1123static refDistance_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1124
1125pub(crate) fn init_refDistance_setterinfo<D: DomTypes>() {
1126    refDistance_setterinfo.set(JSJitInfo {
1127    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1128        setter: Some(set_refDistance::<D>)
1129    },
1130    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1131        protoID: PrototypeList::ID::PannerNode as u16,
1132    },
1133    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1134    _bitfield_align_1: [],
1135    _bitfield_1: __BindgenBitfieldUnit::new(
1136        new_jsjitinfo_bitfield_1!(
1137            JSJitInfo_OpType::Setter as u8,
1138            JSJitInfo_AliasSet::AliasEverything as u8,
1139            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
1140            false,
1141            false,
1142            false,
1143            false,
1144            false,
1145            false,
1146            0,
1147        ).to_ne_bytes()
1148    ),
1149});
1150}
1151unsafe extern "C" fn get_maxDistance<D: DomTypes>
1152(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
1153    let mut result = false;
1154    wrap_panic(&mut || result = (|| {
1155        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1156        let this = &*(this as *const D::PannerNode);
1157        let result: Finite<f64> = this.MaxDistance();
1158
1159        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
1160        return true;
1161    })());
1162    result
1163}
1164
1165unsafe extern "C" fn set_maxDistance<D: DomTypes>
1166(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
1167    let mut result = false;
1168    wrap_panic(&mut || result = (|| {
1169        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1170        let this = &*(this as *const D::PannerNode);
1171        let arg0: Finite<f64> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
1172            Ok(ConversionResult::Success(value)) => value,
1173            Ok(ConversionResult::Failure(error)) => {
1174                throw_type_error(cx.raw_cx(), &error);
1175        return false;
1176
1177            }
1178            _ => {
1179                return false;
1180
1181            },
1182        }
1183        ;
1184        let result: Result<(), Error> = this.SetMaxDistance(arg0);
1185        let result = match result {
1186            Ok(result) => result,
1187            Err(e) => {
1188                <D as DomHelpers<D>>::throw_dom_exception(SafeJSContext::from_ptr(cx.raw_cx()), &this.global_(InRealm::already(&AlreadyInRealm::assert_for_cx(SafeJSContext::from_ptr(cx.raw_cx())))), e, CanGc::note());
1189                return false;
1190            },
1191        };
1192
1193        true
1194    })());
1195    result
1196}
1197
1198
1199static maxDistance_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1200
1201pub(crate) fn init_maxDistance_getterinfo<D: DomTypes>() {
1202    maxDistance_getterinfo.set(JSJitInfo {
1203    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1204        getter: Some(get_maxDistance::<D>)
1205    },
1206    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1207        protoID: PrototypeList::ID::PannerNode as u16,
1208    },
1209    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1210    _bitfield_align_1: [],
1211    _bitfield_1: __BindgenBitfieldUnit::new(
1212        new_jsjitinfo_bitfield_1!(
1213            JSJitInfo_OpType::Getter as u8,
1214            JSJitInfo_AliasSet::AliasEverything as u8,
1215            JSValueType::JSVAL_TYPE_DOUBLE as u8,
1216            true,
1217            false,
1218            false,
1219            false,
1220            false,
1221            false,
1222            0,
1223        ).to_ne_bytes()
1224    ),
1225});
1226}
1227static maxDistance_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1228
1229pub(crate) fn init_maxDistance_setterinfo<D: DomTypes>() {
1230    maxDistance_setterinfo.set(JSJitInfo {
1231    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1232        setter: Some(set_maxDistance::<D>)
1233    },
1234    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1235        protoID: PrototypeList::ID::PannerNode as u16,
1236    },
1237    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1238    _bitfield_align_1: [],
1239    _bitfield_1: __BindgenBitfieldUnit::new(
1240        new_jsjitinfo_bitfield_1!(
1241            JSJitInfo_OpType::Setter as u8,
1242            JSJitInfo_AliasSet::AliasEverything as u8,
1243            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
1244            false,
1245            false,
1246            false,
1247            false,
1248            false,
1249            false,
1250            0,
1251        ).to_ne_bytes()
1252    ),
1253});
1254}
1255unsafe extern "C" fn get_rolloffFactor<D: DomTypes>
1256(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
1257    let mut result = false;
1258    wrap_panic(&mut || result = (|| {
1259        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1260        let this = &*(this as *const D::PannerNode);
1261        let result: Finite<f64> = this.RolloffFactor();
1262
1263        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
1264        return true;
1265    })());
1266    result
1267}
1268
1269unsafe extern "C" fn set_rolloffFactor<D: DomTypes>
1270(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
1271    let mut result = false;
1272    wrap_panic(&mut || result = (|| {
1273        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1274        let this = &*(this as *const D::PannerNode);
1275        let arg0: Finite<f64> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
1276            Ok(ConversionResult::Success(value)) => value,
1277            Ok(ConversionResult::Failure(error)) => {
1278                throw_type_error(cx.raw_cx(), &error);
1279        return false;
1280
1281            }
1282            _ => {
1283                return false;
1284
1285            },
1286        }
1287        ;
1288        let result: Result<(), Error> = this.SetRolloffFactor(arg0);
1289        let result = match result {
1290            Ok(result) => result,
1291            Err(e) => {
1292                <D as DomHelpers<D>>::throw_dom_exception(SafeJSContext::from_ptr(cx.raw_cx()), &this.global_(InRealm::already(&AlreadyInRealm::assert_for_cx(SafeJSContext::from_ptr(cx.raw_cx())))), e, CanGc::note());
1293                return false;
1294            },
1295        };
1296
1297        true
1298    })());
1299    result
1300}
1301
1302
1303static rolloffFactor_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1304
1305pub(crate) fn init_rolloffFactor_getterinfo<D: DomTypes>() {
1306    rolloffFactor_getterinfo.set(JSJitInfo {
1307    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1308        getter: Some(get_rolloffFactor::<D>)
1309    },
1310    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1311        protoID: PrototypeList::ID::PannerNode as u16,
1312    },
1313    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1314    _bitfield_align_1: [],
1315    _bitfield_1: __BindgenBitfieldUnit::new(
1316        new_jsjitinfo_bitfield_1!(
1317            JSJitInfo_OpType::Getter as u8,
1318            JSJitInfo_AliasSet::AliasEverything as u8,
1319            JSValueType::JSVAL_TYPE_DOUBLE as u8,
1320            true,
1321            false,
1322            false,
1323            false,
1324            false,
1325            false,
1326            0,
1327        ).to_ne_bytes()
1328    ),
1329});
1330}
1331static rolloffFactor_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1332
1333pub(crate) fn init_rolloffFactor_setterinfo<D: DomTypes>() {
1334    rolloffFactor_setterinfo.set(JSJitInfo {
1335    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1336        setter: Some(set_rolloffFactor::<D>)
1337    },
1338    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1339        protoID: PrototypeList::ID::PannerNode as u16,
1340    },
1341    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1342    _bitfield_align_1: [],
1343    _bitfield_1: __BindgenBitfieldUnit::new(
1344        new_jsjitinfo_bitfield_1!(
1345            JSJitInfo_OpType::Setter as u8,
1346            JSJitInfo_AliasSet::AliasEverything as u8,
1347            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
1348            false,
1349            false,
1350            false,
1351            false,
1352            false,
1353            false,
1354            0,
1355        ).to_ne_bytes()
1356    ),
1357});
1358}
1359unsafe extern "C" fn get_coneInnerAngle<D: DomTypes>
1360(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
1361    let mut result = false;
1362    wrap_panic(&mut || result = (|| {
1363        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1364        let this = &*(this as *const D::PannerNode);
1365        let result: Finite<f64> = this.ConeInnerAngle();
1366
1367        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
1368        return true;
1369    })());
1370    result
1371}
1372
1373unsafe extern "C" fn set_coneInnerAngle<D: DomTypes>
1374(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
1375    let mut result = false;
1376    wrap_panic(&mut || result = (|| {
1377        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1378        let this = &*(this as *const D::PannerNode);
1379        let arg0: Finite<f64> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
1380            Ok(ConversionResult::Success(value)) => value,
1381            Ok(ConversionResult::Failure(error)) => {
1382                throw_type_error(cx.raw_cx(), &error);
1383        return false;
1384
1385            }
1386            _ => {
1387                return false;
1388
1389            },
1390        }
1391        ;
1392        let result: () = this.SetConeInnerAngle(arg0);
1393
1394        true
1395    })());
1396    result
1397}
1398
1399
1400static coneInnerAngle_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1401
1402pub(crate) fn init_coneInnerAngle_getterinfo<D: DomTypes>() {
1403    coneInnerAngle_getterinfo.set(JSJitInfo {
1404    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1405        getter: Some(get_coneInnerAngle::<D>)
1406    },
1407    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1408        protoID: PrototypeList::ID::PannerNode as u16,
1409    },
1410    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1411    _bitfield_align_1: [],
1412    _bitfield_1: __BindgenBitfieldUnit::new(
1413        new_jsjitinfo_bitfield_1!(
1414            JSJitInfo_OpType::Getter as u8,
1415            JSJitInfo_AliasSet::AliasEverything as u8,
1416            JSValueType::JSVAL_TYPE_DOUBLE as u8,
1417            true,
1418            false,
1419            false,
1420            false,
1421            false,
1422            false,
1423            0,
1424        ).to_ne_bytes()
1425    ),
1426});
1427}
1428static coneInnerAngle_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1429
1430pub(crate) fn init_coneInnerAngle_setterinfo<D: DomTypes>() {
1431    coneInnerAngle_setterinfo.set(JSJitInfo {
1432    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1433        setter: Some(set_coneInnerAngle::<D>)
1434    },
1435    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1436        protoID: PrototypeList::ID::PannerNode as u16,
1437    },
1438    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1439    _bitfield_align_1: [],
1440    _bitfield_1: __BindgenBitfieldUnit::new(
1441        new_jsjitinfo_bitfield_1!(
1442            JSJitInfo_OpType::Setter as u8,
1443            JSJitInfo_AliasSet::AliasEverything as u8,
1444            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
1445            false,
1446            false,
1447            false,
1448            false,
1449            false,
1450            false,
1451            0,
1452        ).to_ne_bytes()
1453    ),
1454});
1455}
1456unsafe extern "C" fn get_coneOuterAngle<D: DomTypes>
1457(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
1458    let mut result = false;
1459    wrap_panic(&mut || result = (|| {
1460        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1461        let this = &*(this as *const D::PannerNode);
1462        let result: Finite<f64> = this.ConeOuterAngle();
1463
1464        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
1465        return true;
1466    })());
1467    result
1468}
1469
1470unsafe extern "C" fn set_coneOuterAngle<D: DomTypes>
1471(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
1472    let mut result = false;
1473    wrap_panic(&mut || result = (|| {
1474        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1475        let this = &*(this as *const D::PannerNode);
1476        let arg0: Finite<f64> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
1477            Ok(ConversionResult::Success(value)) => value,
1478            Ok(ConversionResult::Failure(error)) => {
1479                throw_type_error(cx.raw_cx(), &error);
1480        return false;
1481
1482            }
1483            _ => {
1484                return false;
1485
1486            },
1487        }
1488        ;
1489        let result: () = this.SetConeOuterAngle(arg0);
1490
1491        true
1492    })());
1493    result
1494}
1495
1496
1497static coneOuterAngle_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1498
1499pub(crate) fn init_coneOuterAngle_getterinfo<D: DomTypes>() {
1500    coneOuterAngle_getterinfo.set(JSJitInfo {
1501    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1502        getter: Some(get_coneOuterAngle::<D>)
1503    },
1504    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1505        protoID: PrototypeList::ID::PannerNode as u16,
1506    },
1507    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1508    _bitfield_align_1: [],
1509    _bitfield_1: __BindgenBitfieldUnit::new(
1510        new_jsjitinfo_bitfield_1!(
1511            JSJitInfo_OpType::Getter as u8,
1512            JSJitInfo_AliasSet::AliasEverything as u8,
1513            JSValueType::JSVAL_TYPE_DOUBLE as u8,
1514            true,
1515            false,
1516            false,
1517            false,
1518            false,
1519            false,
1520            0,
1521        ).to_ne_bytes()
1522    ),
1523});
1524}
1525static coneOuterAngle_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1526
1527pub(crate) fn init_coneOuterAngle_setterinfo<D: DomTypes>() {
1528    coneOuterAngle_setterinfo.set(JSJitInfo {
1529    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1530        setter: Some(set_coneOuterAngle::<D>)
1531    },
1532    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1533        protoID: PrototypeList::ID::PannerNode as u16,
1534    },
1535    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1536    _bitfield_align_1: [],
1537    _bitfield_1: __BindgenBitfieldUnit::new(
1538        new_jsjitinfo_bitfield_1!(
1539            JSJitInfo_OpType::Setter as u8,
1540            JSJitInfo_AliasSet::AliasEverything as u8,
1541            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
1542            false,
1543            false,
1544            false,
1545            false,
1546            false,
1547            false,
1548            0,
1549        ).to_ne_bytes()
1550    ),
1551});
1552}
1553unsafe extern "C" fn get_coneOuterGain<D: DomTypes>
1554(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: JSJitGetterCallArgs) -> bool{
1555    let mut result = false;
1556    wrap_panic(&mut || result = (|| {
1557        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1558        let this = &*(this as *const D::PannerNode);
1559        let result: Finite<f64> = this.ConeOuterGain();
1560
1561        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
1562        return true;
1563    })());
1564    result
1565}
1566
1567unsafe extern "C" fn set_coneOuterGain<D: DomTypes>
1568(cx: *mut RawJSContext, obj: RawHandleObject, this: *mut libc::c_void, args: JSJitSetterCallArgs) -> bool{
1569    let mut result = false;
1570    wrap_panic(&mut || result = (|| {
1571        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1572        let this = &*(this as *const D::PannerNode);
1573        let arg0: Finite<f64> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
1574            Ok(ConversionResult::Success(value)) => value,
1575            Ok(ConversionResult::Failure(error)) => {
1576                throw_type_error(cx.raw_cx(), &error);
1577        return false;
1578
1579            }
1580            _ => {
1581                return false;
1582
1583            },
1584        }
1585        ;
1586        let result: Result<(), Error> = this.SetConeOuterGain(arg0);
1587        let result = match result {
1588            Ok(result) => result,
1589            Err(e) => {
1590                <D as DomHelpers<D>>::throw_dom_exception(SafeJSContext::from_ptr(cx.raw_cx()), &this.global_(InRealm::already(&AlreadyInRealm::assert_for_cx(SafeJSContext::from_ptr(cx.raw_cx())))), e, CanGc::note());
1591                return false;
1592            },
1593        };
1594
1595        true
1596    })());
1597    result
1598}
1599
1600
1601static coneOuterGain_getterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1602
1603pub(crate) fn init_coneOuterGain_getterinfo<D: DomTypes>() {
1604    coneOuterGain_getterinfo.set(JSJitInfo {
1605    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1606        getter: Some(get_coneOuterGain::<D>)
1607    },
1608    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1609        protoID: PrototypeList::ID::PannerNode as u16,
1610    },
1611    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1612    _bitfield_align_1: [],
1613    _bitfield_1: __BindgenBitfieldUnit::new(
1614        new_jsjitinfo_bitfield_1!(
1615            JSJitInfo_OpType::Getter as u8,
1616            JSJitInfo_AliasSet::AliasEverything as u8,
1617            JSValueType::JSVAL_TYPE_DOUBLE as u8,
1618            true,
1619            false,
1620            false,
1621            false,
1622            false,
1623            false,
1624            0,
1625        ).to_ne_bytes()
1626    ),
1627});
1628}
1629static coneOuterGain_setterinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1630
1631pub(crate) fn init_coneOuterGain_setterinfo<D: DomTypes>() {
1632    coneOuterGain_setterinfo.set(JSJitInfo {
1633    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1634        setter: Some(set_coneOuterGain::<D>)
1635    },
1636    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1637        protoID: PrototypeList::ID::PannerNode as u16,
1638    },
1639    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1640    _bitfield_align_1: [],
1641    _bitfield_1: __BindgenBitfieldUnit::new(
1642        new_jsjitinfo_bitfield_1!(
1643            JSJitInfo_OpType::Setter as u8,
1644            JSJitInfo_AliasSet::AliasEverything as u8,
1645            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
1646            false,
1647            false,
1648            false,
1649            false,
1650            false,
1651            false,
1652            0,
1653        ).to_ne_bytes()
1654    ),
1655});
1656}
1657unsafe extern "C" fn setPosition<D: DomTypes>
1658(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: *const JSJitMethodCallArgs) -> bool{
1659    let mut result = false;
1660    wrap_panic(&mut || result = (|| {
1661        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1662        let this = &*(this as *const D::PannerNode);
1663        let args = &*args;
1664        let argc = args.argc_;
1665
1666        if argc < 3 {
1667            throw_type_error(cx.raw_cx(), "Not enough arguments to \"PannerNode.setPosition\".");
1668            return false;
1669        }
1670        let arg0: Finite<f32> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
1671            Ok(ConversionResult::Success(value)) => value,
1672            Ok(ConversionResult::Failure(error)) => {
1673                throw_type_error(cx.raw_cx(), &error);
1674        return false;
1675
1676            }
1677            _ => {
1678                return false;
1679
1680            },
1681        }
1682        ;
1683        let arg1: Finite<f32> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(1)), ()) {
1684            Ok(ConversionResult::Success(value)) => value,
1685            Ok(ConversionResult::Failure(error)) => {
1686                throw_type_error(cx.raw_cx(), &error);
1687        return false;
1688
1689            }
1690            _ => {
1691                return false;
1692
1693            },
1694        }
1695        ;
1696        let arg2: Finite<f32> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(2)), ()) {
1697            Ok(ConversionResult::Success(value)) => value,
1698            Ok(ConversionResult::Failure(error)) => {
1699                throw_type_error(cx.raw_cx(), &error);
1700        return false;
1701
1702            }
1703            _ => {
1704                return false;
1705
1706            },
1707        }
1708        ;
1709        let result: () = this.SetPosition(arg0, arg1, arg2);
1710
1711        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
1712        return true;
1713    })());
1714    result
1715}
1716
1717
1718static setPosition_methodinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1719
1720pub(crate) fn init_setPosition_methodinfo<D: DomTypes>() {
1721    setPosition_methodinfo.set(JSJitInfo {
1722    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1723        method: Some(setPosition::<D>)
1724    },
1725    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1726        protoID: PrototypeList::ID::PannerNode as u16,
1727    },
1728    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1729    _bitfield_align_1: [],
1730    _bitfield_1: __BindgenBitfieldUnit::new(
1731        new_jsjitinfo_bitfield_1!(
1732            JSJitInfo_OpType::Method as u8,
1733            JSJitInfo_AliasSet::AliasEverything as u8,
1734            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
1735            false,
1736            false,
1737            false,
1738            false,
1739            false,
1740            false,
1741            0,
1742        ).to_ne_bytes()
1743    ),
1744});
1745}
1746unsafe extern "C" fn setOrientation<D: DomTypes>
1747(cx: *mut RawJSContext, _obj: RawHandleObject, this: *mut libc::c_void, args: *const JSJitMethodCallArgs) -> bool{
1748    let mut result = false;
1749    wrap_panic(&mut || result = (|| {
1750        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
1751        let this = &*(this as *const D::PannerNode);
1752        let args = &*args;
1753        let argc = args.argc_;
1754
1755        if argc < 3 {
1756            throw_type_error(cx.raw_cx(), "Not enough arguments to \"PannerNode.setOrientation\".");
1757            return false;
1758        }
1759        let arg0: Finite<f32> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(0)), ()) {
1760            Ok(ConversionResult::Success(value)) => value,
1761            Ok(ConversionResult::Failure(error)) => {
1762                throw_type_error(cx.raw_cx(), &error);
1763        return false;
1764
1765            }
1766            _ => {
1767                return false;
1768
1769            },
1770        }
1771        ;
1772        let arg1: Finite<f32> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(1)), ()) {
1773            Ok(ConversionResult::Success(value)) => value,
1774            Ok(ConversionResult::Failure(error)) => {
1775                throw_type_error(cx.raw_cx(), &error);
1776        return false;
1777
1778            }
1779            _ => {
1780                return false;
1781
1782            },
1783        }
1784        ;
1785        let arg2: Finite<f32> = match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(2)), ()) {
1786            Ok(ConversionResult::Success(value)) => value,
1787            Ok(ConversionResult::Failure(error)) => {
1788                throw_type_error(cx.raw_cx(), &error);
1789        return false;
1790
1791            }
1792            _ => {
1793                return false;
1794
1795            },
1796        }
1797        ;
1798        let result: () = this.SetOrientation(arg0, arg1, arg2);
1799
1800        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
1801        return true;
1802    })());
1803    result
1804}
1805
1806
1807static setOrientation_methodinfo: ThreadUnsafeOnceLock<JSJitInfo> = ThreadUnsafeOnceLock::new();
1808
1809pub(crate) fn init_setOrientation_methodinfo<D: DomTypes>() {
1810    setOrientation_methodinfo.set(JSJitInfo {
1811    __bindgen_anon_1: JSJitInfo__bindgen_ty_1 {
1812        method: Some(setOrientation::<D>)
1813    },
1814    __bindgen_anon_2: JSJitInfo__bindgen_ty_2 {
1815        protoID: PrototypeList::ID::PannerNode as u16,
1816    },
1817    __bindgen_anon_3: JSJitInfo__bindgen_ty_3 { depth: 2 },
1818    _bitfield_align_1: [],
1819    _bitfield_1: __BindgenBitfieldUnit::new(
1820        new_jsjitinfo_bitfield_1!(
1821            JSJitInfo_OpType::Method as u8,
1822            JSJitInfo_AliasSet::AliasEverything as u8,
1823            JSValueType::JSVAL_TYPE_UNDEFINED as u8,
1824            false,
1825            false,
1826            false,
1827            false,
1828            false,
1829            false,
1830            0,
1831        ).to_ne_bytes()
1832    ),
1833});
1834}
1835unsafe extern "C" fn _finalize<D: DomTypes>
1836(_cx: *mut GCContext, obj: *mut JSObject){
1837    wrap_panic(&mut || {
1838
1839        let this = native_from_object_static::<D::PannerNode>(obj).unwrap();
1840        finalize_common(this);
1841    })
1842}
1843
1844unsafe extern "C" fn _trace<D: DomTypes>
1845(trc: *mut JSTracer, obj: *mut JSObject){
1846    wrap_panic(&mut || {
1847
1848        let this = native_from_object_static::<D::PannerNode>(obj).unwrap();
1849        if this.is_null() { return; } // GC during obj creation
1850        (*this).trace(trc);
1851    })
1852}
1853
1854
1855static CLASS_OPS: ThreadUnsafeOnceLock<JSClassOps> = ThreadUnsafeOnceLock::new();
1856
1857pub(crate) fn init_class_ops<D: DomTypes>() {
1858    CLASS_OPS.set(JSClassOps {
1859        addProperty: None,
1860        delProperty: None,
1861        enumerate: None,
1862        newEnumerate: None,
1863        resolve: None,
1864        mayResolve: None,
1865        finalize: Some(_finalize::<D>),
1866        call: None,
1867        construct: None,
1868        trace: Some(_trace::<D>),
1869    });
1870}
1871
1872pub static Class: ThreadUnsafeOnceLock<DOMJSClass> = ThreadUnsafeOnceLock::new();
1873
1874pub(crate) fn init_domjs_class<D: DomTypes>() {
1875    init_class_ops::<D>();
1876    Class.set(DOMJSClass {
1877        base: JSClass {
1878            name: c"PannerNode".as_ptr(),
1879            flags: JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE |
1880                   (((1) & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT)
1881                   /* JSCLASS_HAS_RESERVED_SLOTS(1) */,
1882            cOps: unsafe { CLASS_OPS.get() },
1883            spec: ptr::null(),
1884            ext: ptr::null(),
1885            oOps: ptr::null(),
1886        },
1887        dom_class:
1888DOMClass {
1889    interface_chain: [ PrototypeList::ID::EventTarget, PrototypeList::ID::AudioNode, PrototypeList::ID::PannerNode, PrototypeList::ID::Last, PrototypeList::ID::Last, PrototypeList::ID::Last ],
1890    depth: 2,
1891    type_id: crate::codegen::InheritTypes::TopTypeId { eventtarget: (crate::codegen::InheritTypes::EventTargetTypeId::AudioNode(crate::codegen::InheritTypes::AudioNodeTypeId::PannerNode)) },
1892    malloc_size_of: malloc_size_of_including_raw_self::<D::PannerNode> as unsafe fn(&mut _, _) -> _,
1893    global: Globals::EMPTY,
1894},
1895    });
1896}
1897
1898#[cfg_attr(crown, allow(crown::unrooted_must_root))] pub unsafe fn Wrap<D: DomTypes>
1899(cx: SafeJSContext, scope: &D::GlobalScope, given_proto: Option<HandleObject>, object: Box<D::PannerNode>, _can_gc: CanGc) -> DomRoot<D::PannerNode>{
1900
1901    let raw = Root::new(MaybeUnreflectedDom::from_box(object));
1902
1903    let scope = scope.reflector().get_jsobject();
1904    assert!(!scope.get().is_null());
1905    assert!(((*get_object_class(scope.get())).flags & JSCLASS_IS_GLOBAL) != 0);
1906    let _ac = JSAutoRealm::new(cx.raw_cx(), scope.get());
1907
1908    rooted!(&in(cx) let mut canonical_proto = ptr::null_mut::<JSObject>());
1909    GetProtoObject::<D>(cx, scope, canonical_proto.handle_mut());
1910    assert!(!canonical_proto.is_null());
1911
1912
1913    rooted!(&in(cx) let mut proto = ptr::null_mut::<JSObject>());
1914    if let Some(given) = given_proto {
1915        proto.set(*given);
1916        if get_context_realm(cx.raw_cx()) != get_object_realm(*given) {
1917            assert!(JS_WrapObject(cx.raw_cx(), proto.handle_mut()));
1918        }
1919    } else {
1920        proto.set(*canonical_proto);
1921    }
1922    rooted!(&in(cx) let obj = JS_NewObjectWithGivenProto(
1923        cx.raw_cx(),
1924        &Class.get().base,
1925        proto.handle(),
1926    ));
1927    assert!(!obj.is_null());
1928    JS_SetReservedSlot(
1929        obj.get(),
1930        DOM_OBJECT_SLOT,
1931        &PrivateValue(raw.as_ptr() as *const libc::c_void),
1932    );
1933
1934    let root = raw.reflect_with(obj.get());
1935
1936
1937
1938    DomRoot::from_ref(&*root)
1939}
1940
1941pub trait PannerNodeMethods<D: DomTypes> {
1942    fn PanningModel(&self, ) -> PanningModelType;
1943    fn SetPanningModel(&self, r#value: PanningModelType);
1944    fn PositionX(&self, ) -> DomRoot<D::AudioParam>;
1945    fn PositionY(&self, ) -> DomRoot<D::AudioParam>;
1946    fn PositionZ(&self, ) -> DomRoot<D::AudioParam>;
1947    fn OrientationX(&self, ) -> DomRoot<D::AudioParam>;
1948    fn OrientationY(&self, ) -> DomRoot<D::AudioParam>;
1949    fn OrientationZ(&self, ) -> DomRoot<D::AudioParam>;
1950    fn DistanceModel(&self, ) -> DistanceModelType;
1951    fn SetDistanceModel(&self, r#value: DistanceModelType);
1952    fn RefDistance(&self, ) -> Finite<f64>;
1953    fn SetRefDistance(&self, r#value: Finite<f64>) -> ErrorResult;
1954    fn MaxDistance(&self, ) -> Finite<f64>;
1955    fn SetMaxDistance(&self, r#value: Finite<f64>) -> ErrorResult;
1956    fn RolloffFactor(&self, ) -> Finite<f64>;
1957    fn SetRolloffFactor(&self, r#value: Finite<f64>) -> ErrorResult;
1958    fn ConeInnerAngle(&self, ) -> Finite<f64>;
1959    fn SetConeInnerAngle(&self, r#value: Finite<f64>);
1960    fn ConeOuterAngle(&self, ) -> Finite<f64>;
1961    fn SetConeOuterAngle(&self, r#value: Finite<f64>);
1962    fn ConeOuterGain(&self, ) -> Finite<f64>;
1963    fn SetConeOuterGain(&self, r#value: Finite<f64>) -> ErrorResult;
1964    fn SetPosition(&self, r#x: Finite<f32>, r#y: Finite<f32>, r#z: Finite<f32>);
1965    fn SetOrientation(&self, r#x: Finite<f32>, r#y: Finite<f32>, r#z: Finite<f32>);
1966    fn Constructor(r#global: &D::Window, r#proto: Option<HandleObject>, r#can_gc: CanGc, r#context: &D::BaseAudioContext, r#options: &crate::codegen::GenericBindings::PannerNodeBinding::PannerOptions) -> Fallible<DomRoot<D::PannerNode>>;
1967}
1968static sMethods_specs: ThreadUnsafeOnceLock<&[&[JSFunctionSpec]]> = ThreadUnsafeOnceLock::new();
1969
1970pub(crate) fn init_sMethods_specs<D: DomTypes>() {
1971    sMethods_specs.set(Box::leak(Box::new([&Box::leak(Box::new([
1972    JSFunctionSpec {
1973        name: JSPropertySpec_Name { string_: c"setPosition".as_ptr() },
1974        call: JSNativeWrapper { op: Some(generic_method::<false>), info: unsafe { setPosition_methodinfo.get() } as *const _ as *const JSJitInfo },
1975        nargs: 3,
1976        flags: (JSPROP_ENUMERATE) as u16,
1977        selfHostedName: ptr::null()
1978    },
1979    JSFunctionSpec {
1980        name: JSPropertySpec_Name { string_: c"setOrientation".as_ptr() },
1981        call: JSNativeWrapper { op: Some(generic_method::<false>), info: unsafe { setOrientation_methodinfo.get() } as *const _ as *const JSJitInfo },
1982        nargs: 3,
1983        flags: (JSPROP_ENUMERATE) as u16,
1984        selfHostedName: ptr::null()
1985    },
1986    JSFunctionSpec {
1987        name: JSPropertySpec_Name { string_: ptr::null() },
1988        call: JSNativeWrapper { op: None, info: ptr::null() },
1989        nargs: 0,
1990        flags: 0,
1991        selfHostedName: ptr::null()
1992    }]))[..]
1993])));
1994}static sMethods: ThreadUnsafeOnceLock<&[Guard<&[JSFunctionSpec]>]> = ThreadUnsafeOnceLock::new();
1995
1996pub(crate) fn init_sMethods_prefs<D: DomTypes>() {
1997    sMethods.set(Box::leak(Box::new([    Guard::new(&[Condition::Exposed(Globals::WINDOW)], (unsafe { sMethods_specs.get() })[0])])));
1998}static sAttributes_specs: ThreadUnsafeOnceLock<&[&[JSPropertySpec]]> = ThreadUnsafeOnceLock::new();
1999
2000pub(crate) fn init_sAttributes_specs<D: DomTypes>() {
2001    sAttributes_specs.set(Box::leak(Box::new([&Box::leak(Box::new([
2002    JSPropertySpec {
2003                    name: JSPropertySpec_Name { string_: c"panningModel".as_ptr() },
2004                    attributes_: (JSPROP_ENUMERATE),
2005                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2006                    u: JSPropertySpec_AccessorsOrValue {
2007                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2008                            getter: JSPropertySpec_Accessor {
2009                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { panningModel_getterinfo.get() } },
2010                            },
2011                            setter: JSPropertySpec_Accessor {
2012                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { panningModel_setterinfo.get() } },
2013                            }
2014                        }
2015                    }
2016                }
2017,
2018    JSPropertySpec {
2019                    name: JSPropertySpec_Name { string_: c"positionX".as_ptr() },
2020                    attributes_: (JSPROP_ENUMERATE),
2021                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2022                    u: JSPropertySpec_AccessorsOrValue {
2023                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2024                            getter: JSPropertySpec_Accessor {
2025                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { positionX_getterinfo.get() } },
2026                            },
2027                            setter: JSPropertySpec_Accessor {
2028                                native: JSNativeWrapper { op: None, info: ptr::null() },
2029                            }
2030                        }
2031                    }
2032                }
2033,
2034    JSPropertySpec {
2035                    name: JSPropertySpec_Name { string_: c"positionY".as_ptr() },
2036                    attributes_: (JSPROP_ENUMERATE),
2037                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2038                    u: JSPropertySpec_AccessorsOrValue {
2039                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2040                            getter: JSPropertySpec_Accessor {
2041                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { positionY_getterinfo.get() } },
2042                            },
2043                            setter: JSPropertySpec_Accessor {
2044                                native: JSNativeWrapper { op: None, info: ptr::null() },
2045                            }
2046                        }
2047                    }
2048                }
2049,
2050    JSPropertySpec {
2051                    name: JSPropertySpec_Name { string_: c"positionZ".as_ptr() },
2052                    attributes_: (JSPROP_ENUMERATE),
2053                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2054                    u: JSPropertySpec_AccessorsOrValue {
2055                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2056                            getter: JSPropertySpec_Accessor {
2057                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { positionZ_getterinfo.get() } },
2058                            },
2059                            setter: JSPropertySpec_Accessor {
2060                                native: JSNativeWrapper { op: None, info: ptr::null() },
2061                            }
2062                        }
2063                    }
2064                }
2065,
2066    JSPropertySpec {
2067                    name: JSPropertySpec_Name { string_: c"orientationX".as_ptr() },
2068                    attributes_: (JSPROP_ENUMERATE),
2069                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2070                    u: JSPropertySpec_AccessorsOrValue {
2071                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2072                            getter: JSPropertySpec_Accessor {
2073                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { orientationX_getterinfo.get() } },
2074                            },
2075                            setter: JSPropertySpec_Accessor {
2076                                native: JSNativeWrapper { op: None, info: ptr::null() },
2077                            }
2078                        }
2079                    }
2080                }
2081,
2082    JSPropertySpec {
2083                    name: JSPropertySpec_Name { string_: c"orientationY".as_ptr() },
2084                    attributes_: (JSPROP_ENUMERATE),
2085                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2086                    u: JSPropertySpec_AccessorsOrValue {
2087                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2088                            getter: JSPropertySpec_Accessor {
2089                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { orientationY_getterinfo.get() } },
2090                            },
2091                            setter: JSPropertySpec_Accessor {
2092                                native: JSNativeWrapper { op: None, info: ptr::null() },
2093                            }
2094                        }
2095                    }
2096                }
2097,
2098    JSPropertySpec {
2099                    name: JSPropertySpec_Name { string_: c"orientationZ".as_ptr() },
2100                    attributes_: (JSPROP_ENUMERATE),
2101                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2102                    u: JSPropertySpec_AccessorsOrValue {
2103                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2104                            getter: JSPropertySpec_Accessor {
2105                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { orientationZ_getterinfo.get() } },
2106                            },
2107                            setter: JSPropertySpec_Accessor {
2108                                native: JSNativeWrapper { op: None, info: ptr::null() },
2109                            }
2110                        }
2111                    }
2112                }
2113,
2114    JSPropertySpec {
2115                    name: JSPropertySpec_Name { string_: c"distanceModel".as_ptr() },
2116                    attributes_: (JSPROP_ENUMERATE),
2117                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2118                    u: JSPropertySpec_AccessorsOrValue {
2119                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2120                            getter: JSPropertySpec_Accessor {
2121                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { distanceModel_getterinfo.get() } },
2122                            },
2123                            setter: JSPropertySpec_Accessor {
2124                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { distanceModel_setterinfo.get() } },
2125                            }
2126                        }
2127                    }
2128                }
2129,
2130    JSPropertySpec {
2131                    name: JSPropertySpec_Name { string_: c"refDistance".as_ptr() },
2132                    attributes_: (JSPROP_ENUMERATE),
2133                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2134                    u: JSPropertySpec_AccessorsOrValue {
2135                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2136                            getter: JSPropertySpec_Accessor {
2137                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { refDistance_getterinfo.get() } },
2138                            },
2139                            setter: JSPropertySpec_Accessor {
2140                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { refDistance_setterinfo.get() } },
2141                            }
2142                        }
2143                    }
2144                }
2145,
2146    JSPropertySpec {
2147                    name: JSPropertySpec_Name { string_: c"maxDistance".as_ptr() },
2148                    attributes_: (JSPROP_ENUMERATE),
2149                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2150                    u: JSPropertySpec_AccessorsOrValue {
2151                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2152                            getter: JSPropertySpec_Accessor {
2153                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { maxDistance_getterinfo.get() } },
2154                            },
2155                            setter: JSPropertySpec_Accessor {
2156                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { maxDistance_setterinfo.get() } },
2157                            }
2158                        }
2159                    }
2160                }
2161,
2162    JSPropertySpec {
2163                    name: JSPropertySpec_Name { string_: c"rolloffFactor".as_ptr() },
2164                    attributes_: (JSPROP_ENUMERATE),
2165                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2166                    u: JSPropertySpec_AccessorsOrValue {
2167                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2168                            getter: JSPropertySpec_Accessor {
2169                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { rolloffFactor_getterinfo.get() } },
2170                            },
2171                            setter: JSPropertySpec_Accessor {
2172                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { rolloffFactor_setterinfo.get() } },
2173                            }
2174                        }
2175                    }
2176                }
2177,
2178    JSPropertySpec {
2179                    name: JSPropertySpec_Name { string_: c"coneInnerAngle".as_ptr() },
2180                    attributes_: (JSPROP_ENUMERATE),
2181                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2182                    u: JSPropertySpec_AccessorsOrValue {
2183                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2184                            getter: JSPropertySpec_Accessor {
2185                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { coneInnerAngle_getterinfo.get() } },
2186                            },
2187                            setter: JSPropertySpec_Accessor {
2188                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { coneInnerAngle_setterinfo.get() } },
2189                            }
2190                        }
2191                    }
2192                }
2193,
2194    JSPropertySpec {
2195                    name: JSPropertySpec_Name { string_: c"coneOuterAngle".as_ptr() },
2196                    attributes_: (JSPROP_ENUMERATE),
2197                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2198                    u: JSPropertySpec_AccessorsOrValue {
2199                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2200                            getter: JSPropertySpec_Accessor {
2201                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { coneOuterAngle_getterinfo.get() } },
2202                            },
2203                            setter: JSPropertySpec_Accessor {
2204                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { coneOuterAngle_setterinfo.get() } },
2205                            }
2206                        }
2207                    }
2208                }
2209,
2210    JSPropertySpec {
2211                    name: JSPropertySpec_Name { string_: c"coneOuterGain".as_ptr() },
2212                    attributes_: (JSPROP_ENUMERATE),
2213                    kind_: (JSPropertySpec_Kind::NativeAccessor),
2214                    u: JSPropertySpec_AccessorsOrValue {
2215                        accessors: JSPropertySpec_AccessorsOrValue_Accessors {
2216                            getter: JSPropertySpec_Accessor {
2217                                native: JSNativeWrapper { op: Some(generic_getter::<false>), info: unsafe { coneOuterGain_getterinfo.get() } },
2218                            },
2219                            setter: JSPropertySpec_Accessor {
2220                                native: JSNativeWrapper { op: Some(generic_setter), info: unsafe { coneOuterGain_setterinfo.get() } },
2221                            }
2222                        }
2223                    }
2224                }
2225,
2226    JSPropertySpec::ZERO]))[..]
2227,
2228&Box::leak(Box::new([
2229    JSPropertySpec {
2230                    name: JSPropertySpec_Name { symbol_: SymbolCode::toStringTag as usize + 1 },
2231                    attributes_: (JSPROP_READONLY),
2232                    kind_: (JSPropertySpec_Kind::Value),
2233                    u: JSPropertySpec_AccessorsOrValue {
2234                        value: JSPropertySpec_ValueWrapper {
2235                            type_: JSPropertySpec_ValueWrapper_Type::String,
2236                            __bindgen_anon_1: JSPropertySpec_ValueWrapper__bindgen_ty_1 {
2237                                string: c"PannerNode".as_ptr(),
2238                            }
2239                        }
2240                    }
2241                }
2242,
2243    JSPropertySpec::ZERO]))[..]
2244])));
2245}static sAttributes: ThreadUnsafeOnceLock<&[Guard<&[JSPropertySpec]>]> = ThreadUnsafeOnceLock::new();
2246
2247pub(crate) fn init_sAttributes_prefs<D: DomTypes>() {
2248    sAttributes.set(Box::leak(Box::new([    Guard::new(&[Condition::Exposed(Globals::WINDOW)], (unsafe { sAttributes_specs.get() })[0]),
2249    Guard::new(&[Condition::Satisfied], (unsafe { sAttributes_specs.get() })[1])])));
2250}
2251pub fn GetProtoObject<D: DomTypes>
2252(cx: SafeJSContext, global: HandleObject, mut rval: MutableHandleObject){
2253    /* Get the interface prototype object for this class.  This will create the
2254       object as needed. */get_per_interface_object_handle(cx, global, ProtoOrIfaceIndex::ID(PrototypeList::ID::PannerNode), CreateInterfaceObjects::<D>, rval)
2255}
2256
2257
2258static PrototypeClass: JSClass = JSClass {
2259    name: c"PannerNodePrototype".as_ptr(),
2260    flags:
2261        // JSCLASS_HAS_RESERVED_SLOTS()
2262        (0 ) << JSCLASS_RESERVED_SLOTS_SHIFT,
2263    cOps: ptr::null(),
2264    spec: ptr::null(),
2265    ext: ptr::null(),
2266    oOps: ptr::null(),
2267};
2268
2269unsafe extern "C" fn _constructor<D: DomTypes>
2270(cx: *mut RawJSContext, argc: u32, vp: *mut JSVal) -> bool{
2271    let mut result = false;
2272    wrap_panic(&mut || result = {
2273        let mut cx = JSContext::from_ptr(ptr::NonNull::new(cx).unwrap());
2274        let args = CallArgs::from_vp(vp, argc);
2275        let global = D::GlobalScope::from_object(JS_CALLEE(cx.raw_cx(), vp).to_object());
2276
2277                    call_default_constructor::<D>(
2278                        SafeJSContext::from_ptr(cx.raw_cx()),
2279                        &args,
2280                        &global,
2281                        PrototypeList::ID::PannerNode,
2282                        "PannerNode",
2283                        CreateInterfaceObjects::<D>,
2284                        |cx: SafeJSContext, args: &CallArgs, global: &D::GlobalScope, desired_proto: HandleObject| {
2285
2286        if argc < 1 {
2287            throw_type_error(cx.raw_cx(), "Not enough arguments to \"PannerNode.constructor\".");
2288            return false;
2289        }
2290        let arg0: DomRoot<D::BaseAudioContext> = if HandleValue::from_raw(args.get(0)).get().is_object() {
2291            match root_from_handlevalue(HandleValue::from_raw(args.get(0)), SafeJSContext::from_ptr(cx.raw_cx())) {
2292                Ok(val) => val,
2293                Err(()) => {
2294                    throw_type_error(cx.raw_cx(), "value does not implement interface BaseAudioContext.");
2295                    return false;
2296
2297                }
2298            }
2299
2300        } else {
2301            throw_type_error(cx.raw_cx(), "Value is not an object.");
2302            return false;
2303
2304        };
2305        let arg1: crate::codegen::GenericBindings::PannerNodeBinding::PannerOptions = if args.get(1).is_undefined() {
2306            crate::codegen::GenericBindings::PannerNodeBinding::PannerOptions::empty()
2307        } else {
2308            match FromJSValConvertible::from_jsval(cx.raw_cx(), HandleValue::from_raw(args.get(1)), ()) {
2309                Ok(ConversionResult::Success(value)) => value,
2310                Ok(ConversionResult::Failure(error)) => {
2311                    throw_type_error(cx.raw_cx(), &error);
2312            return false;
2313
2314                }
2315                _ => {
2316                    return false;
2317
2318                },
2319            }
2320
2321        };
2322        let result: Result<DomRoot<D::PannerNode>, Error> = <D::PannerNode>::Constructor(global.downcast::<D::Window>().unwrap(), Some(desired_proto), CanGc::note(), &arg0, &arg1);
2323        let result = match result {
2324            Ok(result) => result,
2325            Err(e) => {
2326                <D as DomHelpers<D>>::throw_dom_exception(SafeJSContext::from_ptr(cx.raw_cx()), global.upcast::<D::GlobalScope>(), e, CanGc::note());
2327                return false;
2328            },
2329        };
2330
2331        (result).to_jsval(cx.raw_cx(), MutableHandleValue::from_raw(args.rval()));
2332        return true;
2333                        }
2334                    )
2335
2336    });
2337    result
2338}
2339
2340
2341static INTERFACE_OBJECT_CLASS: ThreadUnsafeOnceLock<NonCallbackInterfaceObjectClass> = ThreadUnsafeOnceLock::new();
2342
2343pub(crate) fn init_interface_object<D: DomTypes>() {
2344    INTERFACE_OBJECT_CLASS.set(NonCallbackInterfaceObjectClass::new(
2345        Box::leak(Box::new(InterfaceConstructorBehavior::call(_constructor::<D>))),
2346        b"function PannerNode() {\n    [native code]\n}",
2347        PrototypeList::ID::PannerNode,
2348        2,
2349    ));
2350}
2351
2352pub fn DefineDOMInterface<D: DomTypes>
2353(cx: SafeJSContext, global: HandleObject){
2354    define_dom_interface(cx, global, ProtoOrIfaceIndex::ID(PrototypeList::ID::PannerNode),CreateInterfaceObjects::<D>, ConstructorEnabled::<D>)
2355}
2356
2357pub fn ConstructorEnabled<D: DomTypes>
2358(aCx: SafeJSContext, aObj: HandleObject) -> bool{
2359    is_exposed_in(aObj, Globals::WINDOW)
2360}
2361
2362unsafe fn CreateInterfaceObjects<D: DomTypes>
2363(cx: SafeJSContext, global: HandleObject, cache: *mut ProtoOrIfaceArray){
2364
2365    rooted!(&in(cx) let mut prototype_proto = ptr::null_mut::<JSObject>());
2366    AudioNode_Binding::GetProtoObject::<D>(cx, global, prototype_proto.handle_mut());
2367    assert!(!prototype_proto.is_null());
2368
2369    rooted!(&in(cx) let mut prototype = ptr::null_mut::<JSObject>());
2370    create_interface_prototype_object::<D>(cx,
2371                                      global,
2372                                      prototype_proto.handle(),
2373                                      &PrototypeClass,
2374                                      sMethods.get(),
2375                                      sAttributes.get(),
2376                                      &[],
2377                                      &[],
2378                                      prototype.handle_mut());
2379    assert!(!prototype.is_null());
2380    assert!((*cache)[PrototypeList::ID::PannerNode as usize].is_null());
2381    (*cache)[PrototypeList::ID::PannerNode as usize] = prototype.get();
2382    <*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::ID::PannerNode as isize),
2383                                  ptr::null_mut(),
2384                                  prototype.get());
2385
2386    rooted!(&in(cx) let mut interface_proto = ptr::null_mut::<JSObject>());
2387
2388    AudioNode_Binding::GetConstructorObject::<D>(cx, global, interface_proto.handle_mut());
2389
2390    assert!(!interface_proto.is_null());
2391
2392    rooted!(&in(cx) let mut interface = ptr::null_mut::<JSObject>());
2393    create_noncallback_interface_object::<D>(cx,
2394                                        global,
2395                                        interface_proto.handle(),
2396                                        INTERFACE_OBJECT_CLASS.get(),
2397                                        &[],
2398                                        &[],
2399                                        &[],
2400                                        prototype.handle(),
2401                                        c"PannerNode",
2402                                        1,
2403                                        &[],
2404                                        interface.handle_mut());
2405    assert!(!interface.is_null());
2406}
2407
2408
2409        pub(crate) fn init_statics<D: DomTypes>() {
2410            init_interface_object::<D>();
2411            init_domjs_class::<D>();
2412            crate::codegen::GenericBindings::PannerNodeBinding::PannerNode_Binding::init_setPosition_methodinfo::<D>();
2413crate::codegen::GenericBindings::PannerNodeBinding::PannerNode_Binding::init_setOrientation_methodinfo::<D>();
2414            init_panningModel_getterinfo::<D>();
2415init_positionX_getterinfo::<D>();
2416init_positionY_getterinfo::<D>();
2417init_positionZ_getterinfo::<D>();
2418init_orientationX_getterinfo::<D>();
2419init_orientationY_getterinfo::<D>();
2420init_orientationZ_getterinfo::<D>();
2421init_distanceModel_getterinfo::<D>();
2422init_refDistance_getterinfo::<D>();
2423init_maxDistance_getterinfo::<D>();
2424init_rolloffFactor_getterinfo::<D>();
2425init_coneInnerAngle_getterinfo::<D>();
2426init_coneOuterAngle_getterinfo::<D>();
2427init_coneOuterGain_getterinfo::<D>();
2428            init_panningModel_setterinfo::<D>();
2429init_distanceModel_setterinfo::<D>();
2430init_refDistance_setterinfo::<D>();
2431init_maxDistance_setterinfo::<D>();
2432init_rolloffFactor_setterinfo::<D>();
2433init_coneInnerAngle_setterinfo::<D>();
2434init_coneOuterAngle_setterinfo::<D>();
2435init_coneOuterGain_setterinfo::<D>();
2436
2437            init_sMethods_specs::<D>();
2438init_sMethods_prefs::<D>();
2439init_sAttributes_specs::<D>();
2440init_sAttributes_prefs::<D>();
2441        }
2442        } // mod PannerNode_Binding
2443
2444