objc2_intents/generated/
INSticker.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// An object that describes a sticker someone sends in a message.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/insticker?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct INSticker;
16);
17
18extern_conformance!(
19    unsafe impl NSCoding for INSticker {}
20);
21
22extern_conformance!(
23    unsafe impl NSCopying for INSticker {}
24);
25
26unsafe impl CopyingHelper for INSticker {
27    type Result = Self;
28}
29
30extern_conformance!(
31    unsafe impl NSObjectProtocol for INSticker {}
32);
33
34extern_conformance!(
35    unsafe impl NSSecureCoding for INSticker {}
36);
37
38impl INSticker {
39    extern_methods!(
40        #[cfg(feature = "INStickerType")]
41        /// Creates an object that represents a sticker a person sends in a message.
42        ///
43        /// - Parameters:
44        /// - type: The type of the sticker.
45        /// - emoji: The single emoji character that the sticker represents.
46        #[unsafe(method(initWithType:emoji:))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn initWithType_emoji(
49            this: Allocated<Self>,
50            r#type: INStickerType,
51            emoji: Option<&NSString>,
52        ) -> Retained<Self>;
53
54        #[cfg(feature = "INStickerType")]
55        #[unsafe(method(type))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn r#type(&self) -> INStickerType;
58
59        #[unsafe(method(emoji))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn emoji(&self) -> Option<Retained<NSString>>;
62    );
63}
64
65/// Methods declared on superclass `NSObject`.
66impl INSticker {
67    extern_methods!(
68        #[unsafe(method(init))]
69        #[unsafe(method_family = init)]
70        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72        #[unsafe(method(new))]
73        #[unsafe(method_family = new)]
74        pub unsafe fn new() -> Retained<Self>;
75    );
76}