icrate/generated/Foundation/
NSAppleEventManager.rs1use crate::common::*;
4use crate::Foundation::*;
5
6pub type NSAppleEventManagerSuspensionID = *mut c_void;
7
8extern_static!(NSAppleEventTimeOutDefault: c_double);
9
10extern_static!(NSAppleEventTimeOutNone: c_double);
11
12extern_static!(NSAppleEventManagerWillProcessFirstEventNotification: &'static NSNotificationName);
13
14extern_class!(
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "Foundation_NSAppleEventManager")]
17 pub struct NSAppleEventManager;
18
19 #[cfg(feature = "Foundation_NSAppleEventManager")]
20 unsafe impl ClassType for NSAppleEventManager {
21 type Super = NSObject;
22 type Mutability = InteriorMutable;
23 }
24);
25
26#[cfg(feature = "Foundation_NSAppleEventManager")]
27unsafe impl NSObjectProtocol for NSAppleEventManager {}
28
29extern_methods!(
30 #[cfg(feature = "Foundation_NSAppleEventManager")]
31 unsafe impl NSAppleEventManager {
32 #[method_id(@__retain_semantics Other sharedAppleEventManager)]
33 pub unsafe fn sharedAppleEventManager() -> Id<NSAppleEventManager>;
34
35 #[cfg(feature = "Foundation_NSAppleEventDescriptor")]
36 #[method_id(@__retain_semantics Other currentAppleEvent)]
37 pub unsafe fn currentAppleEvent(&self) -> Option<Id<NSAppleEventDescriptor>>;
38
39 #[cfg(feature = "Foundation_NSAppleEventDescriptor")]
40 #[method_id(@__retain_semantics Other currentReplyAppleEvent)]
41 pub unsafe fn currentReplyAppleEvent(&self) -> Option<Id<NSAppleEventDescriptor>>;
42
43 #[method(suspendCurrentAppleEvent)]
44 pub unsafe fn suspendCurrentAppleEvent(&self) -> NSAppleEventManagerSuspensionID;
45
46 #[cfg(feature = "Foundation_NSAppleEventDescriptor")]
47 #[method_id(@__retain_semantics Other appleEventForSuspensionID:)]
48 pub unsafe fn appleEventForSuspensionID(
49 &self,
50 suspension_id: NSAppleEventManagerSuspensionID,
51 ) -> Id<NSAppleEventDescriptor>;
52
53 #[cfg(feature = "Foundation_NSAppleEventDescriptor")]
54 #[method_id(@__retain_semantics Other replyAppleEventForSuspensionID:)]
55 pub unsafe fn replyAppleEventForSuspensionID(
56 &self,
57 suspension_id: NSAppleEventManagerSuspensionID,
58 ) -> Id<NSAppleEventDescriptor>;
59
60 #[method(setCurrentAppleEventAndReplyEventWithSuspensionID:)]
61 pub unsafe fn setCurrentAppleEventAndReplyEventWithSuspensionID(
62 &self,
63 suspension_id: NSAppleEventManagerSuspensionID,
64 );
65
66 #[method(resumeWithSuspensionID:)]
67 pub unsafe fn resumeWithSuspensionID(&self, suspension_id: NSAppleEventManagerSuspensionID);
68 }
69);
70
71extern_methods!(
72 #[cfg(feature = "Foundation_NSAppleEventManager")]
74 unsafe impl NSAppleEventManager {
75 #[method_id(@__retain_semantics Init init)]
76 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
77
78 #[method_id(@__retain_semantics New new)]
79 pub unsafe fn new() -> Id<Self>;
80 }
81);