objc2_intents/generated/
INUserContext.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inusercontext?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct INUserContext;
15);
16
17extern_conformance!(
18    unsafe impl NSCoding for INUserContext {}
19);
20
21extern_conformance!(
22    unsafe impl NSObjectProtocol for INUserContext {}
23);
24
25extern_conformance!(
26    unsafe impl NSSecureCoding for INUserContext {}
27);
28
29impl INUserContext {
30    extern_methods!(
31        #[unsafe(method(init))]
32        #[unsafe(method_family = init)]
33        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
34
35        /// Each call replaces previous context object of the same underlying type. Use this only in your iOS/watchOS app. Do not try to set the user context as current from your Intents extension or Intents UI extension.
36        #[unsafe(method(becomeCurrent))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn becomeCurrent(&self);
39    );
40}
41
42/// Methods declared on superclass `NSObject`.
43impl INUserContext {
44    extern_methods!(
45        #[unsafe(method(new))]
46        #[unsafe(method_family = new)]
47        pub unsafe fn new() -> Retained<Self>;
48    );
49}