1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/messages/mssticker?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MSSticker;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MSSticker {}
);
impl MSSticker {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
/// Initializes a sticker with the contents of the URL and the localized description.
///
/// Initializes a sticker with the contents of the URL and the localized description.
/// The specified file must have a maximum size of 500KB and must conform to kUTTypePNG, kUTTypeGIF
/// or kUTTypeJPEG. The image loaded from the file must be no smaller than 300px X 300px and must
/// be no larger 618px x 618px. This localized description string is limited to 150 Unicode
/// characters in length.
///
/// Parameter `fileURL`: The URL from which to read sticker data.
///
/// Parameter `localizedDescription`: A succinct localized string describing the sticker.
///
/// Parameter `error`: If this method could not initialize a sticker, this will contain an NSError object describing the failure.
///
/// Returns: A new sticker object or nil if the method could not initialize a sticker from the specified file and localizedDescription.
#[unsafe(method(initWithContentsOfFileURL:localizedDescription:error:_))]
#[unsafe(method_family = init)]
pub unsafe fn initWithContentsOfFileURL_localizedDescription_error(
this: Allocated<Self>,
file_url: &NSURL,
localized_description: &NSString,
) -> Result<Retained<Self>, Retained<NSError>>;
/// The file URL to the Sticker was initialized with.
#[unsafe(method(imageFileURL))]
#[unsafe(method_family = none)]
pub unsafe fn imageFileURL(&self) -> Retained<NSURL>;
/// A succinct localized string describing the sticker.
#[unsafe(method(localizedDescription))]
#[unsafe(method_family = none)]
pub unsafe fn localizedDescription(&self) -> Retained<NSString>;
);
}
/// Methods declared on superclass `NSObject`.
impl MSSticker {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}