icrate/generated/AppKit/
NSColorPicking.rs1use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8extern_protocol!(
9 pub unsafe trait NSColorPickingDefault: IsMainThreadOnly {
10 #[cfg(feature = "AppKit_NSColorPanel")]
11 #[method_id(@__retain_semantics Init initWithPickerMask:colorPanel:)]
12 unsafe fn initWithPickerMask_colorPanel(
13 this: Allocated<Self>,
14 mask: NSUInteger,
15 owning_color_panel: &NSColorPanel,
16 ) -> Option<Id<Self>>;
17
18 #[cfg(feature = "AppKit_NSImage")]
19 #[method_id(@__retain_semantics Other provideNewButtonImage)]
20 unsafe fn provideNewButtonImage(&self) -> Id<NSImage>;
21
22 #[cfg(all(feature = "AppKit_NSButtonCell", feature = "AppKit_NSImage"))]
23 #[method(insertNewButtonImage:in:)]
24 unsafe fn insertNewButtonImage_in(
25 &self,
26 new_button_image: &NSImage,
27 button_cell: &NSButtonCell,
28 );
29
30 #[method(viewSizeChanged:)]
31 unsafe fn viewSizeChanged(&self, sender: Option<&AnyObject>);
32
33 #[method(alphaControlAddedOrRemoved:)]
34 unsafe fn alphaControlAddedOrRemoved(&self, sender: Option<&AnyObject>);
35
36 #[cfg(feature = "AppKit_NSColorList")]
37 #[method(attachColorList:)]
38 unsafe fn attachColorList(&self, color_list: &NSColorList);
39
40 #[cfg(feature = "AppKit_NSColorList")]
41 #[method(detachColorList:)]
42 unsafe fn detachColorList(&self, color_list: &NSColorList);
43
44 #[method(setMode:)]
45 unsafe fn setMode(&self, mode: NSColorPanelMode);
46
47 #[cfg(feature = "Foundation_NSString")]
48 #[method_id(@__retain_semantics Other buttonToolTip)]
49 unsafe fn buttonToolTip(&self) -> Id<NSString>;
50
51 #[method(minContentSize)]
52 unsafe fn minContentSize(&self) -> NSSize;
53 }
54
55 unsafe impl ProtocolType for dyn NSColorPickingDefault {}
56);
57
58extern_protocol!(
59 pub unsafe trait NSColorPickingCustom: NSColorPickingDefault + IsMainThreadOnly {
60 #[method(supportsMode:)]
61 unsafe fn supportsMode(&self, mode: NSColorPanelMode) -> bool;
62
63 #[method(currentMode)]
64 unsafe fn currentMode(&self) -> NSColorPanelMode;
65
66 #[cfg(feature = "AppKit_NSView")]
67 #[method_id(@__retain_semantics Other provideNewView:)]
68 unsafe fn provideNewView(&self, initial_request: bool) -> Id<NSView>;
69
70 #[cfg(feature = "AppKit_NSColor")]
71 #[method(setColor:)]
72 unsafe fn setColor(&self, new_color: &NSColor);
73 }
74
75 unsafe impl ProtocolType for dyn NSColorPickingCustom {}
76);