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 unsafe fn size(&self) -> NSSize;
30
31 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
32 #[unsafe(method(contentView))]
33 #[unsafe(method_family = none)]
34 pub unsafe 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 unsafe fn setContentView(&self, content_view: Option<&NSView>);
41
42 #[unsafe(method(display))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn display(&self);
45
46 #[unsafe(method(showsApplicationBadge))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn showsApplicationBadge(&self) -> bool;
49
50 #[unsafe(method(setShowsApplicationBadge:))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn setShowsApplicationBadge(&self, shows_application_badge: bool);
54
55 #[unsafe(method(badgeLabel))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn badgeLabel(&self) -> Option<Retained<NSString>>;
58
59 #[unsafe(method(setBadgeLabel:))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn setBadgeLabel(&self, badge_label: Option<&NSString>);
63
64 #[unsafe(method(owner))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn owner(&self) -> Option<Retained<AnyObject>>;
67 );
68}
69
70impl NSDockTile {
72 extern_methods!(
73 #[unsafe(method(init))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77 #[unsafe(method(new))]
78 #[unsafe(method_family = new)]
79 pub unsafe fn new() -> Retained<Self>;
80 );
81}
82
83extern_protocol!(
84 pub unsafe trait NSDockTilePlugIn: NSObjectProtocol {
86 #[unsafe(method(setDockTile:))]
87 #[unsafe(method_family = none)]
88 unsafe fn setDockTile(&self, dock_tile: Option<&NSDockTile>);
89
90 #[cfg(feature = "NSMenu")]
91 #[optional]
92 #[unsafe(method(dockMenu))]
93 #[unsafe(method_family = none)]
94 unsafe fn dockMenu(&self, mtm: MainThreadMarker) -> Option<Retained<NSMenu>>;
95 }
96);