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
21extern_conformance!(
22 unsafe impl NSObjectProtocol for NSDockTile {}
23);
24
25impl NSDockTile {
26 extern_methods!(
27 #[unsafe(method(size))]
28 #[unsafe(method_family = none)]
29 pub fn size(&self) -> NSSize;
30
31 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
32 #[unsafe(method(contentView))]
33 #[unsafe(method_family = none)]
34 pub fn contentView(&self, mtm: MainThreadMarker) -> Option<Retained<NSView>>;
35
36 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
37 #[unsafe(method(setContentView:))]
39 #[unsafe(method_family = none)]
40 pub fn setContentView(&self, content_view: Option<&NSView>);
41
42 #[unsafe(method(display))]
43 #[unsafe(method_family = none)]
44 pub fn display(&self);
45
46 #[unsafe(method(showsApplicationBadge))]
47 #[unsafe(method_family = none)]
48 pub fn showsApplicationBadge(&self) -> bool;
49
50 #[unsafe(method(setShowsApplicationBadge:))]
52 #[unsafe(method_family = none)]
53 pub fn setShowsApplicationBadge(&self, shows_application_badge: bool);
54
55 #[unsafe(method(badgeLabel))]
56 #[unsafe(method_family = none)]
57 pub fn badgeLabel(&self) -> Option<Retained<NSString>>;
58
59 #[unsafe(method(setBadgeLabel:))]
63 #[unsafe(method_family = none)]
64 pub fn setBadgeLabel(&self, badge_label: Option<&NSString>);
65
66 #[unsafe(method(owner))]
67 #[unsafe(method_family = none)]
68 pub fn owner(&self) -> Option<Retained<AnyObject>>;
69 );
70}
71
72impl NSDockTile {
74 extern_methods!(
75 #[unsafe(method(init))]
76 #[unsafe(method_family = init)]
77 pub fn init(this: Allocated<Self>) -> Retained<Self>;
78
79 #[unsafe(method(new))]
80 #[unsafe(method_family = new)]
81 pub fn new() -> Retained<Self>;
82 );
83}
84
85impl DefaultRetained for NSDockTile {
86 #[inline]
87 fn default_retained() -> Retained<Self> {
88 Self::new()
89 }
90}
91
92extern_protocol!(
93 pub unsafe trait NSDockTilePlugIn: NSObjectProtocol {
95 #[unsafe(method(setDockTile:))]
96 #[unsafe(method_family = none)]
97 fn setDockTile(&self, dock_tile: Option<&NSDockTile>);
98
99 #[cfg(feature = "NSMenu")]
100 #[optional]
101 #[unsafe(method(dockMenu))]
102 #[unsafe(method_family = none)]
103 fn dockMenu(&self, mtm: MainThreadMarker) -> Option<Retained<NSMenu>>;
104 }
105);