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:))]
27 #[unsafe(method_family = init)]
28 pub unsafe fn initWithSendPort_receivePort_components(
29 this: Allocated<Self>,
30 send_port: Option<&NSPort>,
31 reply_port: Option<&NSPort>,
32 components: Option<&NSArray>,
33 ) -> Retained<Self>;
34
35 #[cfg(feature = "NSArray")]
36 #[unsafe(method(components))]
37 #[unsafe(method_family = none)]
38 pub fn components(&self) -> Option<Retained<NSArray>>;
39
40 #[cfg(feature = "NSPort")]
41 #[unsafe(method(receivePort))]
42 #[unsafe(method_family = none)]
43 pub fn receivePort(&self) -> Option<Retained<NSPort>>;
44
45 #[cfg(feature = "NSPort")]
46 #[unsafe(method(sendPort))]
47 #[unsafe(method_family = none)]
48 pub fn sendPort(&self) -> Option<Retained<NSPort>>;
49
50 #[cfg(feature = "NSDate")]
51 #[unsafe(method(sendBeforeDate:))]
52 #[unsafe(method_family = none)]
53 pub fn sendBeforeDate(&self, date: &NSDate) -> bool;
54
55 #[unsafe(method(msgid))]
56 #[unsafe(method_family = none)]
57 pub fn msgid(&self) -> u32;
58
59 #[unsafe(method(setMsgid:))]
61 #[unsafe(method_family = none)]
62 pub fn setMsgid(&self, msgid: u32);
63 );
64}
65
66impl NSPortMessage {
68 extern_methods!(
69 #[unsafe(method(init))]
70 #[unsafe(method_family = init)]
71 pub fn init(this: Allocated<Self>) -> Retained<Self>;
72
73 #[unsafe(method(new))]
74 #[unsafe(method_family = new)]
75 pub fn new() -> Retained<Self>;
76 );
77}
78
79impl DefaultRetained for NSPortMessage {
80 #[inline]
81 fn default_retained() -> Retained<Self> {
82 Self::new()
83 }
84}