objc2_foundation/generated/
NSPortMessage.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct NSPortMessage;
14);
15
16extern_conformance!(
17 unsafe impl NSObjectProtocol for NSPortMessage {}
18);
19
20impl NSPortMessage {
21 extern_methods!(
22 #[cfg(all(feature = "NSArray", feature = "NSPort"))]
23 #[unsafe(method(initWithSendPort:receivePort:components:))]
24 #[unsafe(method_family = init)]
25 pub unsafe fn initWithSendPort_receivePort_components(
26 this: Allocated<Self>,
27 send_port: Option<&NSPort>,
28 reply_port: Option<&NSPort>,
29 components: Option<&NSArray>,
30 ) -> Retained<Self>;
31
32 #[cfg(feature = "NSArray")]
33 #[unsafe(method(components))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn components(&self) -> Option<Retained<NSArray>>;
36
37 #[cfg(feature = "NSPort")]
38 #[unsafe(method(receivePort))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn receivePort(&self) -> Option<Retained<NSPort>>;
41
42 #[cfg(feature = "NSPort")]
43 #[unsafe(method(sendPort))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn sendPort(&self) -> Option<Retained<NSPort>>;
46
47 #[cfg(feature = "NSDate")]
48 #[unsafe(method(sendBeforeDate:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool;
51
52 #[unsafe(method(msgid))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn msgid(&self) -> u32;
55
56 #[unsafe(method(setMsgid:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn setMsgid(&self, msgid: u32);
60 );
61}
62
63impl NSPortMessage {
65 extern_methods!(
66 #[unsafe(method(init))]
67 #[unsafe(method_family = init)]
68 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
69
70 #[unsafe(method(new))]
71 #[unsafe(method_family = new)]
72 pub unsafe fn new() -> Retained<Self>;
73 );
74}