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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSPortMessage;

    unsafe impl ClassType for NSPortMessage {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSObjectProtocol for NSPortMessage {}

extern_methods!(
    unsafe impl NSPortMessage {
        #[cfg(all(feature = "NSArray", feature = "NSPort"))]
        #[method_id(@__retain_semantics Init initWithSendPort:receivePort:components:)]
        pub unsafe fn initWithSendPort_receivePort_components(
            this: Allocated<Self>,
            send_port: Option<&NSPort>,
            reply_port: Option<&NSPort>,
            components: Option<&NSArray>,
        ) -> Retained<Self>;

        #[cfg(feature = "NSArray")]
        #[method_id(@__retain_semantics Other components)]
        pub unsafe fn components(&self) -> Option<Retained<NSArray>>;

        #[cfg(feature = "NSPort")]
        #[method_id(@__retain_semantics Other receivePort)]
        pub unsafe fn receivePort(&self) -> Option<Retained<NSPort>>;

        #[cfg(feature = "NSPort")]
        #[method_id(@__retain_semantics Other sendPort)]
        pub unsafe fn sendPort(&self) -> Option<Retained<NSPort>>;

        #[cfg(feature = "NSDate")]
        #[method(sendBeforeDate:)]
        pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool;

        #[method(msgid)]
        pub unsafe fn msgid(&self) -> u32;

        #[method(setMsgid:)]
        pub unsafe fn setMsgid(&self, msgid: u32);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl NSPortMessage {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;
    }
);