Skip to main content

engage/generated/unity_engine/switch/
notification.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-switch-notification-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        r#enum::{Enum, IEnum},
11        valuetype::{IValueType, ValueType},
12    };
13
14    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/notification/Notification_FocusState.md"))]
15    #[repr(C)]
16    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
17    pub struct Notification_FocusState {
18        pub value: i32,
19    }
20    impl ::unity::ClassIdentity for Notification_FocusState {
21        const NAME: &'static str = "Notification.FocusState";
22        const NAMESPACE: &'static str = "UnityEngine.Switch";
23
24        fn class() -> ::unity::Class {
25            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27        }
28    }
29    impl ::unity::IlType for Notification_FocusState {
30        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32        }
33    }
34    impl Notification_FocusState {
35        pub fn in_focus() -> Self {
36            Self { value: 1 }
37        }
38
39        pub fn out_of_focus() -> Self {
40            Self { value: 2 }
41        }
42
43        pub fn background() -> Self {
44            Self { value: 3 }
45        }
46    }
47
48    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/notification/Notification.md"))]
49    #[::unity::class(namespace = "UnityEngine.Switch", name = "Notification")]
50    #[parent(crate::system::object::Object)]
51    pub struct Notification {
52        #[static_field]
53        #[rename(name = "notificationMessageReceived")]
54        pub notification_message_received: crate::system::action_1::Action_1<crate::unity_engine::switch::notification::Notification_Message>,
55    }
56
57    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/notification/Notification_Message.md"))]
58    #[repr(C)]
59    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
60    pub struct Notification_Message {
61        pub value: i32,
62    }
63    impl ::unity::ClassIdentity for Notification_Message {
64        const NAME: &'static str = "Notification.Message";
65        const NAMESPACE: &'static str = "UnityEngine.Switch";
66
67        fn class() -> ::unity::Class {
68            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
69            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
70        }
71    }
72    impl ::unity::IlType for Notification_Message {
73        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
74            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
75        }
76    }
77    impl Notification_Message {
78        pub fn focus_state_changed() -> Self {
79            Self { value: 15 }
80        }
81
82        pub fn resume() -> Self {
83            Self { value: 16 }
84        }
85
86        pub fn operation_mode_changed() -> Self {
87            Self { value: 30 }
88        }
89
90        pub fn performance_mode_changed() -> Self {
91            Self { value: 31 }
92        }
93
94        pub fn exit_request() -> Self {
95            Self { value: 4 }
96        }
97    }
98
99    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/switch/notification/Notification_FocusHandlingMode.md"))]
100    #[repr(C)]
101    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
102    pub struct Notification_FocusHandlingMode {
103        pub value: i32,
104    }
105    impl ::unity::ClassIdentity for Notification_FocusHandlingMode {
106        const NAME: &'static str = "Notification.FocusHandlingMode";
107        const NAMESPACE: &'static str = "UnityEngine.Switch";
108
109        fn class() -> ::unity::Class {
110            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
111            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
112        }
113    }
114    impl ::unity::IlType for Notification_FocusHandlingMode {
115        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
116            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
117        }
118    }
119    impl Notification_FocusHandlingMode {
120        pub fn suspend() -> Self {
121            Self { value: 0 }
122        }
123
124        pub fn notify() -> Self {
125            Self { value: 1 }
126        }
127
128        pub fn suspend_and_notify() -> Self {
129            Self { value: 2 }
130        }
131
132        pub fn in_focus_only() -> Self {
133            Self { value: 3 }
134        }
135    }
136}
137
138#[cfg(feature = "unity_engine-switch-notification-types")]
139pub use __types::*;
140
141#[cfg(feature = "unity_engine-switch-notification")]
142impl Notification {
143    #[doc = "`SetFocusHandlingMode(crate::unity_engine::switch::notification::Notification_FocusHandlingMode)` overload"]
144    pub fn set_focus_handling_mode(
145        mode: impl ::core::convert::Into<crate::unity_engine::switch::notification::Notification_FocusHandlingMode>,
146    ) -> () {
147        unsafe {
148            ::unity::il2cpp_call!((::unity::module_base()+0x3f41230usize)as*mut u8,();
149(crate::unity_engine::switch::notification::Notification_FocusHandlingMode)::core::convert::Into::into(mode))
150        }
151    }
152
153    #[doc = "`SetFocusHandlingMode_Internal(crate::unity_engine::switch::notification::Notification_FocusHandlingMode)` overload"]
154    pub fn set_focus_handling_mode_internal(
155        mode: impl ::core::convert::Into<crate::unity_engine::switch::notification::Notification_FocusHandlingMode>,
156    ) -> () {
157        unsafe {
158            ::unity::il2cpp_call!((::unity::module_base()+0x3f41280usize)as*mut u8,();
159(crate::unity_engine::switch::notification::Notification_FocusHandlingMode)::core::convert::Into::into(mode))
160        }
161    }
162
163    #[doc = "`GetCurrentFocusState()` overload"]
164    pub fn get_current_focus_state() -> crate::unity_engine::switch::notification::Notification_FocusState {
165        unsafe {
166            ::unity::il2cpp_call!((::unity::module_base()+0x3f412d0usize)as*mut u8,crate::unity_engine::switch::notification::Notification_FocusState;
167            )
168        }
169    }
170
171    #[doc = "`GetCurrentFocusState_Internal()` overload"]
172    pub fn get_current_focus_state_internal() -> crate::unity_engine::switch::notification::Notification_FocusState {
173        unsafe {
174            ::unity::il2cpp_call!((::unity::module_base()+0x3f41310usize)as*mut u8,crate::unity_engine::switch::notification::Notification_FocusState;
175            )
176        }
177    }
178
179    #[doc = "`SetResumeNotificationEnabled(bool)` overload"]
180    pub fn set_resume_notification_enabled(enabled: impl ::core::convert::Into<bool>) -> () {
181        unsafe {
182            ::unity::il2cpp_call!((::unity::module_base()+0x3f41350usize)as*mut u8,();
183(bool)::core::convert::Into::into(enabled))
184        }
185    }
186
187    #[doc = "`SetResumeNotificationEnabled_Internal(bool)` overload"]
188    pub fn set_resume_notification_enabled_internal(enabled: impl ::core::convert::Into<bool>) -> () {
189        unsafe {
190            ::unity::il2cpp_call!((::unity::module_base()+0x3f413a0usize)as*mut u8,();
191(bool)::core::convert::Into::into(enabled))
192        }
193    }
194
195    #[doc = "`EnterExitRequestHandlingSection()` overload"]
196    pub fn enter_exit_request_handling_section() -> () {
197        unsafe {
198            ::unity::il2cpp_call!((::unity::module_base()+0x3f413f0usize)as*mut u8,();
199            )
200        }
201    }
202
203    #[doc = "`EnterExitRequestHandlingSection_Internal()` overload"]
204    pub fn enter_exit_request_handling_section_internal() -> () {
205        unsafe {
206            ::unity::il2cpp_call!((::unity::module_base()+0x3f41430usize)as*mut u8,();
207            )
208        }
209    }
210
211    #[doc = "`LeaveExitRequestHandlingSection()` overload"]
212    pub fn leave_exit_request_handling_section() -> () {
213        unsafe {
214            ::unity::il2cpp_call!((::unity::module_base()+0x3f41470usize)as*mut u8,();
215            )
216        }
217    }
218
219    #[doc = "`LeaveExitRequestHandlingSection_Internal()` overload"]
220    pub fn leave_exit_request_handling_section_internal() -> () {
221        unsafe {
222            ::unity::il2cpp_call!((::unity::module_base()+0x3f414b0usize)as*mut u8,();
223            )
224        }
225    }
226
227    #[doc = "`SetOperationModeChangedNotificationEnabled(bool)` overload"]
228    pub fn set_operation_mode_changed_notification_enabled(enabled: impl ::core::convert::Into<bool>) -> () {
229        unsafe {
230            ::unity::il2cpp_call!((::unity::module_base()+0x3f414f0usize)as*mut u8,();
231(bool)::core::convert::Into::into(enabled))
232        }
233    }
234
235    #[doc = "`SetOperationModeChangedNotificationEnabled_Internal(bool)` overload"]
236    pub fn set_operation_mode_changed_notification_enabled_internal(enabled: impl ::core::convert::Into<bool>) -> () {
237        unsafe {
238            ::unity::il2cpp_call!((::unity::module_base()+0x3f41540usize)as*mut u8,();
239(bool)::core::convert::Into::into(enabled))
240        }
241    }
242
243    #[doc = "`SetPerformanceModeChangedNotificationEnabled(bool)` overload"]
244    pub fn set_performance_mode_changed_notification_enabled(enabled: impl ::core::convert::Into<bool>) -> () {
245        unsafe {
246            ::unity::il2cpp_call!((::unity::module_base()+0x3f41590usize)as*mut u8,();
247(bool)::core::convert::Into::into(enabled))
248        }
249    }
250
251    #[doc = "`SetPerformanceModeChangedNotificationEnabled_Internal(bool)` overload"]
252    pub fn set_performance_mode_changed_notification_enabled_internal(enabled: impl ::core::convert::Into<bool>) -> () {
253        unsafe {
254            ::unity::il2cpp_call!((::unity::module_base()+0x3f415e0usize)as*mut u8,();
255(bool)::core::convert::Into::into(enabled))
256        }
257    }
258
259    #[doc = "`InvokeNotificationMessage(i32)` overload"]
260    pub fn invoke_notification_message(message: impl ::core::convert::Into<i32>) -> () {
261        unsafe {
262            ::unity::il2cpp_call!((::unity::module_base()+0x3f41630usize)as*mut u8,();
263(i32)::core::convert::Into::into(message))
264        }
265    }
266
267    #[doc = "`add_notificationMessageReceived(crate::system::action_1::Action_1<crate::unity_engine::switch::notification::Notification_Message>)` overload"]
268    pub fn add_notification_message_received(
269        value: impl ::core::convert::Into<crate::system::action_1::Action_1<crate::unity_engine::switch::notification::Notification_Message>>,
270    ) -> () {
271        unsafe {
272            ::unity::il2cpp_call!((::unity::module_base()+0x3f416c0usize)as*mut u8,();
273(crate::system::action_1::Action_1<crate::unity_engine::switch::notification::Notification_Message>)::core::convert::Into::into(value))
274        }
275    }
276
277    #[doc = "`remove_notificationMessageReceived(crate::system::action_1::Action_1<crate::unity_engine::switch::notification::Notification_Message>)` overload"]
278    pub fn remove_notification_message_received(
279        value: impl ::core::convert::Into<crate::system::action_1::Action_1<crate::unity_engine::switch::notification::Notification_Message>>,
280    ) -> () {
281        unsafe {
282            ::unity::il2cpp_call!((::unity::module_base()+0x3f41780usize)as*mut u8,();
283(crate::system::action_1::Action_1<crate::unity_engine::switch::notification::Notification_Message>)::core::convert::Into::into(value))
284        }
285    }
286}
287
288#[cfg(feature = "unity_engine-switch-notification")]
289impl Notification {
290    pub fn set_focus_handling_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
291        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
292    }
293
294    pub fn set_focus_handling_mode_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
295        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
296    }
297
298    pub fn get_current_focus_state_method_info() -> &'static ::unity::il2cpp::MethodInfo {
299        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
300    }
301
302    pub fn get_current_focus_state_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
303        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
304    }
305
306    pub fn set_resume_notification_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
307        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
308    }
309
310    pub fn set_resume_notification_enabled_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
311        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
312    }
313
314    pub fn enter_exit_request_handling_section_method_info() -> &'static ::unity::il2cpp::MethodInfo {
315        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
316    }
317
318    pub fn enter_exit_request_handling_section_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
319        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
320    }
321
322    pub fn leave_exit_request_handling_section_method_info() -> &'static ::unity::il2cpp::MethodInfo {
323        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
324    }
325
326    pub fn leave_exit_request_handling_section_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
327        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
328    }
329
330    pub fn set_operation_mode_changed_notification_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
331        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
332    }
333
334    pub fn set_operation_mode_changed_notification_enabled_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
335        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
336    }
337
338    pub fn set_performance_mode_changed_notification_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
339        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
340    }
341
342    pub fn set_performance_mode_changed_notification_enabled_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
343        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
344    }
345
346    pub fn invoke_notification_message_method_info() -> &'static ::unity::il2cpp::MethodInfo {
347        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
348    }
349
350    pub fn add_notification_message_received_method_info() -> &'static ::unity::il2cpp::MethodInfo {
351        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
352    }
353
354    pub fn remove_notification_message_received_method_info() -> &'static ::unity::il2cpp::MethodInfo {
355        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
356    }
357}
358
359#[cfg(feature = "unity_engine-switch-notification")]
360#[doc(hidden)]
361pub mod prelude {
362    pub use super::{INotification, Notification, Notification_FocusHandlingMode, Notification_FocusState, Notification_Message};
363    #[cfg(feature = "system-object")]
364    pub use crate::system::object::IObjectMethods;
365    #[cfg(feature = "system-enum")]
366    pub use crate::system::r#enum::IEnumMethods;
367    #[cfg(feature = "system-valuetype")]
368    pub use crate::system::valuetype::IValueTypeMethods;
369    pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
370}