objc2_app_kit/generated/
NSDockTile.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[cfg(feature = "NSApplication")]
12pub static NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = 1001.0 as _;
13
14extern_class!(
15 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct NSDockTile;
19);
20
21unsafe impl NSObjectProtocol for NSDockTile {}
22
23impl NSDockTile {
24 extern_methods!(
25 #[unsafe(method(size))]
26 #[unsafe(method_family = none)]
27 pub unsafe fn size(&self) -> NSSize;
28
29 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
30 #[unsafe(method(contentView))]
31 #[unsafe(method_family = none)]
32 pub unsafe fn contentView(&self, mtm: MainThreadMarker) -> Option<Retained<NSView>>;
33
34 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
35 #[unsafe(method(setContentView:))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn setContentView(&self, content_view: Option<&NSView>);
39
40 #[unsafe(method(display))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn display(&self);
43
44 #[unsafe(method(showsApplicationBadge))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn showsApplicationBadge(&self) -> bool;
47
48 #[unsafe(method(setShowsApplicationBadge:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn setShowsApplicationBadge(&self, shows_application_badge: bool);
52
53 #[unsafe(method(badgeLabel))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn badgeLabel(&self) -> Option<Retained<NSString>>;
56
57 #[unsafe(method(setBadgeLabel:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn setBadgeLabel(&self, badge_label: Option<&NSString>);
61
62 #[unsafe(method(owner))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn owner(&self) -> Option<Retained<AnyObject>>;
65 );
66}
67
68impl NSDockTile {
70 extern_methods!(
71 #[unsafe(method(init))]
72 #[unsafe(method_family = init)]
73 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
74
75 #[unsafe(method(new))]
76 #[unsafe(method_family = new)]
77 pub unsafe fn new() -> Retained<Self>;
78 );
79}
80
81extern_protocol!(
82 pub unsafe trait NSDockTilePlugIn: NSObjectProtocol {
84 #[unsafe(method(setDockTile:))]
85 #[unsafe(method_family = none)]
86 unsafe fn setDockTile(&self, dock_tile: Option<&NSDockTile>);
87
88 #[cfg(feature = "NSMenu")]
89 #[optional]
90 #[unsafe(method(dockMenu))]
91 #[unsafe(method_family = none)]
92 unsafe fn dockMenu(&self, mtm: MainThreadMarker) -> Option<Retained<NSMenu>>;
93 }
94);