Skip to main content

engage/generated/system/
eventhandler.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-eventhandler-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    };
13
14    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/eventhandler/EventHandler.md"))]
15    #[::unity::class(namespace = "System", name = "EventHandler")]
16    #[parent(crate::system::multicastdelegate::MulticastDelegate)]
17    pub struct EventHandler {}
18}
19
20#[cfg(feature = "system-eventhandler-types")]
21pub use __types::*;
22
23#[cfg(feature = "system-eventhandler")]
24pub trait IEventHandlerMethods: IEventHandler {
25    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` overload"]
26    fn ctor(self, object: impl ::core::convert::Into<crate::system::object::Object>, method: impl ::core::convert::Into<::unity::IntPtr>) -> () {
27        unsafe {
28            let __receiver = <EventHandler as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
29            ::unity::il2cpp_call!((::unity::module_base()+0x3ad2f40usize)as*mut u8,();
30(EventHandler)__receiver,(crate::system::object::Object)::core::convert::Into::into(object),(::unity::IntPtr)::core::convert::Into::into(method))
31        }
32    }
33}
34
35#[cfg(feature = "system-eventhandler")]
36impl<__T: IEventHandler> IEventHandlerMethods for __T {}
37
38#[cfg(feature = "system-eventhandler")]
39impl EventHandler {
40    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
41        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
42    }
43}
44
45#[cfg(feature = "system-eventhandler")]
46impl EventHandler {
47    #[doc = "`.ctor(crate::system::object::Object, ::unity::IntPtr)` — overload selector"]
48    pub fn new(object: crate::system::object::Object, method: ::unity::IntPtr) -> Self {
49        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
50            panic!(
51                "{}
52::{}
53 failed to instantiate",
54                ::core::stringify!(EventHandler),
55                ::core::stringify!(new),
56            )
57        });
58        <Self as IEventHandlerMethods>::ctor(this, object, method);
59        this
60    }
61}
62
63#[cfg(feature = "system-eventhandler")]
64#[doc(hidden)]
65pub mod prelude {
66    pub use super::{EventHandler, IEventHandler, IEventHandlerMethods};
67    #[cfg(feature = "system-delegate")]
68    pub use crate::system::delegate::IDelegateMethods;
69    #[cfg(feature = "system-multicastdelegate")]
70    pub use crate::system::multicastdelegate::IMulticastDelegateMethods;
71    #[cfg(feature = "system-object")]
72    pub use crate::system::object::IObjectMethods;
73    pub use crate::system::{delegate::IDelegate, multicastdelegate::IMulticastDelegate, object::IObject};
74}