Skip to main content

engage/generated/unity_engine/switch/
switchvideoplayer.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-switch-switchvideoplayer-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        delegate::{Delegate, IDelegate},
10        multicastdelegate::{IMulticastDelegate, MulticastDelegate},
11        object::{IObject, Object},
12        r#enum::{Enum, IEnum},
13        valuetype::{IValueType, ValueType},
14    };
15
16    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/switchvideoplayer/SwitchVideoPlayer_MovieEventDelegate.md"))]
17    #[::unity::class(namespace = "UnityEngine.Switch", name = "SwitchVideoPlayer.MovieEventDelegate")]
18    #[parent(crate::system::multicastdelegate::MulticastDelegate)]
19    pub struct SwitchVideoPlayer_MovieEventDelegate {}
20
21    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/switchvideoplayer/SwitchVideoPlayer_Event.md"))]
22    #[repr(C)]
23    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
24    pub struct SwitchVideoPlayer_Event {
25        pub value: i32,
26    }
27    impl ::unity::ClassIdentity for SwitchVideoPlayer_Event {
28        const NAME: &'static str = "SwitchVideoPlayer.Event";
29        const NAMESPACE: &'static str = "UnityEngine.Switch";
30
31        fn class() -> ::unity::Class {
32            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
33            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
34        }
35    }
36    impl ::unity::IlType for SwitchVideoPlayer_Event {
37        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
38            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
39        }
40    }
41    impl SwitchVideoPlayer_Event {
42        pub fn none() -> Self {
43            Self { value: 0 }
44        }
45
46        pub fn created() -> Self {
47            Self { value: 1 }
48        }
49
50        pub fn end_of_stream() -> Self {
51            Self { value: 2 }
52        }
53
54        pub fn loop_point_reached() -> Self {
55            Self { value: 3 }
56        }
57
58        pub fn first_frame_ready() -> Self {
59            Self { value: 4 }
60        }
61    }
62
63    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/switchvideoplayer/SwitchVideoPlayer.md"))]
64    #[::unity::class(namespace = "UnityEngine.Switch", name = "SwitchVideoPlayer")]
65    #[parent(crate::system::object::Object)]
66    pub struct SwitchVideoPlayer {
67        #[offset(16)]
68        #[rename(name = "m_Ptr")]
69        pub m_ptr: ::unity::IntPtr,
70        #[offset(24)]
71        #[rename(name = "m_MovieEvent")]
72        pub m_movie_event: crate::unity_engine::switch::switchvideoplayer::SwitchVideoPlayer_MovieEventDelegate,
73        #[static_field]
74        #[rename(name = "OnMovieEvent")]
75        pub on_movie_event: crate::unity_engine::switch::switchvideoplayer::SwitchVideoPlayer_MovieEventDelegate,
76    }
77}
78
79#[cfg(feature = "unity_engine-switch-switchvideoplayer-types")]
80pub use __types::*;
81
82#[cfg(feature = "unity_engine-switch-switchvideoplayer")]
83pub trait ISwitchVideoPlayer_MovieEventDelegateMethods: ISwitchVideoPlayer_MovieEventDelegate {
84    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` overload"]
85    fn ctor(self, object: impl ::core::convert::Into<crate::system::object::Object>, method: impl ::core::convert::Into<::unity::IntPtr>) -> () {
86        unsafe {
87            let __receiver = <SwitchVideoPlayer_MovieEventDelegate as ::unity::FromIlInstance>::from_il_instance(
88                <Self as ::unity::SystemObject>::as_instance(self),
89            );
90            ::unity::il2cpp_call!((::unity::module_base()+0x3f41e60usize)as*mut u8,();
91(SwitchVideoPlayer_MovieEventDelegate)__receiver,(crate::system::object::Object)::core::convert::Into::into(object),(::unity::IntPtr)::core::convert::Into::into(method))
92        }
93    }
94    #[doc = "`Invoke(crate::unity_engine::switch::switchvideoplayer::SwitchVideoPlayer_Event)` overload"]
95    fn invoke(self, eventtype: impl ::core::convert::Into<crate::unity_engine::switch::switchvideoplayer::SwitchVideoPlayer_Event>) -> () {
96        unsafe {
97            let __receiver = <SwitchVideoPlayer_MovieEventDelegate as ::unity::FromIlInstance>::from_il_instance(
98                <Self as ::unity::SystemObject>::as_instance(self),
99            );
100            {
101                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
102                let __vi = *__vt.get(13usize).unwrap_or_else(|| {
103                    panic!(
104                        "unity: virtual slot {}
105 out of range (vtable len {}
106) on the runtime class behind {}
107 (method `{}
108`)",
109                        13usize,
110                        __vt.len(),
111                        <SwitchVideoPlayer_MovieEventDelegate as ::unity::ClassIdentity>::NAME,
112                        "Invoke",
113                    )
114                });
115                let __inner: extern "C" fn(
116                    SwitchVideoPlayer_MovieEventDelegate,
117                    crate::unity_engine::switch::switchvideoplayer::SwitchVideoPlayer_Event,
118                    ::unity::OptionalMethod,
119                ) -> () = ::core::mem::transmute(__vi.method_ptr);
120                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
121                __inner(__receiver, ::core::convert::Into::into(eventtype), __mi)
122            }
123        }
124    }
125}
126
127#[cfg(feature = "unity_engine-switch-switchvideoplayer")]
128impl<__T: ISwitchVideoPlayer_MovieEventDelegate> ISwitchVideoPlayer_MovieEventDelegateMethods for __T {}
129
130#[cfg(feature = "unity_engine-switch-switchvideoplayer")]
131impl SwitchVideoPlayer_MovieEventDelegate {
132    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
133        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
134    }
135
136    pub fn invoke_method_info() -> &'static ::unity::il2cpp::MethodInfo {
137        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
138    }
139}
140
141#[cfg(feature = "unity_engine-switch-switchvideoplayer")]
142impl SwitchVideoPlayer_MovieEventDelegate {
143    #[doc = "Direct (non-virtual) call to `SwitchVideoPlayer_MovieEventDelegate`'s own `Invoke`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
144    pub unsafe fn invoke(
145        this: impl ::core::convert::Into<::unity::IlInstance>,
146        eventtype: crate::unity_engine::switch::switchvideoplayer::SwitchVideoPlayer_Event,
147    ) -> () {
148        let __mi = Self::invoke_method_info();
149        let __inner: extern "C" fn(
150            ::unity::IlInstance,
151            crate::unity_engine::switch::switchvideoplayer::SwitchVideoPlayer_Event,
152            ::unity::OptionalMethod,
153        ) -> () = ::core::mem::transmute(__mi.method_ptr);
154        __inner(this.into(), eventtype, ::core::option::Option::None)
155    }
156}
157
158#[cfg(feature = "unity_engine-switch-switchvideoplayer")]
159impl SwitchVideoPlayer_MovieEventDelegate {
160    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` — overload selector"]
161    pub fn new(object: crate::system::object::Object, method: ::unity::IntPtr) -> Self {
162        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
163            panic!(
164                "{}
165::{}
166 failed to instantiate",
167                ::core::stringify!(SwitchVideoPlayer_MovieEventDelegate),
168                ::core::stringify!(new),
169            )
170        });
171        <Self as ISwitchVideoPlayer_MovieEventDelegateMethods>::ctor(this, object, method);
172        this
173    }
174}
175
176#[cfg(feature = "unity_engine-switch-switchvideoplayer")]
177impl SwitchVideoPlayer {
178    #[doc = "`FireMovieEvent(crate::unity_engine::switch::switchvideoplayer::SwitchVideoPlayer_Event)` overload"]
179    pub fn fire_movie_event(event_value: impl ::core::convert::Into<crate::unity_engine::switch::switchvideoplayer::SwitchVideoPlayer_Event>) -> () {
180        unsafe {
181            ::unity::il2cpp_call!((::unity::module_base()+0x3f419e0usize)as*mut u8,();
182(crate::unity_engine::switch::switchvideoplayer::SwitchVideoPlayer_Event)::core::convert::Into::into(event_value))
183        }
184    }
185
186    #[doc = "`.cctor()` overload"]
187    pub fn cctor() -> () {
188        unsafe {
189            ::unity::il2cpp_call!((::unity::module_base()+0x3f41d00usize)as*mut u8,();
190            )
191        }
192    }
193}
194
195#[cfg(feature = "unity_engine-switch-switchvideoplayer")]
196impl SwitchVideoPlayer {
197    pub fn fire_movie_event_method_info() -> &'static ::unity::il2cpp::MethodInfo {
198        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
199    }
200
201    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
202        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
203    }
204}
205
206#[cfg(feature = "unity_engine-switch-switchvideoplayer")]
207#[doc(hidden)]
208pub mod prelude {
209    pub use super::{
210        ISwitchVideoPlayer, ISwitchVideoPlayer_MovieEventDelegate, ISwitchVideoPlayer_MovieEventDelegateMethods, SwitchVideoPlayer,
211        SwitchVideoPlayer_Event, SwitchVideoPlayer_MovieEventDelegate,
212    };
213    #[cfg(feature = "system-delegate")]
214    pub use crate::system::delegate::IDelegateMethods;
215    #[cfg(feature = "system-multicastdelegate")]
216    pub use crate::system::multicastdelegate::IMulticastDelegateMethods;
217    #[cfg(feature = "system-object")]
218    pub use crate::system::object::IObjectMethods;
219    #[cfg(feature = "system-enum")]
220    pub use crate::system::r#enum::IEnumMethods;
221    #[cfg(feature = "system-valuetype")]
222    pub use crate::system::valuetype::IValueTypeMethods;
223    pub use crate::system::{delegate::IDelegate, multicastdelegate::IMulticastDelegate, object::IObject, r#enum::IEnum, valuetype::IValueType};
224}