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
16unsafe impl NSObjectProtocol for NSPortMessage {}
17
18impl NSPortMessage {
19 extern_methods!(
20 #[cfg(all(feature = "NSArray", feature = "NSPort"))]
21 #[unsafe(method(initWithSendPort:receivePort:components:))]
22 #[unsafe(method_family = init)]
23 pub unsafe fn initWithSendPort_receivePort_components(
24 this: Allocated<Self>,
25 send_port: Option<&NSPort>,
26 reply_port: Option<&NSPort>,
27 components: Option<&NSArray>,
28 ) -> Retained<Self>;
29
30 #[cfg(feature = "NSArray")]
31 #[unsafe(method(components))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn components(&self) -> Option<Retained<NSArray>>;
34
35 #[cfg(feature = "NSPort")]
36 #[unsafe(method(receivePort))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn receivePort(&self) -> Option<Retained<NSPort>>;
39
40 #[cfg(feature = "NSPort")]
41 #[unsafe(method(sendPort))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn sendPort(&self) -> Option<Retained<NSPort>>;
44
45 #[cfg(feature = "NSDate")]
46 #[unsafe(method(sendBeforeDate:))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool;
49
50 #[unsafe(method(msgid))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn msgid(&self) -> u32;
53
54 #[unsafe(method(setMsgid:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn setMsgid(&self, msgid: u32);
58 );
59}
60
61impl NSPortMessage {
63 extern_methods!(
64 #[unsafe(method(init))]
65 #[unsafe(method_family = init)]
66 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68 #[unsafe(method(new))]
69 #[unsafe(method_family = new)]
70 pub unsafe fn new() -> Retained<Self>;
71 );
72}