icrate/generated/AppKit/
NSSwitch.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use crate::common::*;
4use crate::AppKit::*;
5use crate::CoreData::*;
6use crate::Foundation::*;
7
8extern_class!(
9    #[derive(Debug, PartialEq, Eq, Hash)]
10    #[cfg(feature = "AppKit_NSSwitch")]
11    pub struct NSSwitch;
12
13    #[cfg(feature = "AppKit_NSSwitch")]
14    unsafe impl ClassType for NSSwitch {
15        #[inherits(NSView, NSResponder, NSObject)]
16        type Super = NSControl;
17        type Mutability = MainThreadOnly;
18    }
19);
20
21#[cfg(feature = "AppKit_NSSwitch")]
22unsafe impl NSAccessibility for NSSwitch {}
23
24#[cfg(feature = "AppKit_NSSwitch")]
25unsafe impl NSAccessibilityButton for NSSwitch {}
26
27#[cfg(feature = "AppKit_NSSwitch")]
28unsafe impl NSAccessibilityElementProtocol for NSSwitch {}
29
30#[cfg(feature = "AppKit_NSSwitch")]
31unsafe impl NSAccessibilitySwitch for NSSwitch {}
32
33#[cfg(feature = "AppKit_NSSwitch")]
34unsafe impl NSAnimatablePropertyContainer for NSSwitch {}
35
36#[cfg(feature = "AppKit_NSSwitch")]
37unsafe impl NSAppearanceCustomization for NSSwitch {}
38
39#[cfg(feature = "AppKit_NSSwitch")]
40unsafe impl NSCoding for NSSwitch {}
41
42#[cfg(feature = "AppKit_NSSwitch")]
43unsafe impl NSDraggingDestination for NSSwitch {}
44
45#[cfg(feature = "AppKit_NSSwitch")]
46unsafe impl NSObjectProtocol for NSSwitch {}
47
48#[cfg(feature = "AppKit_NSSwitch")]
49unsafe impl NSUserInterfaceItemIdentification for NSSwitch {}
50
51extern_methods!(
52    #[cfg(feature = "AppKit_NSSwitch")]
53    unsafe impl NSSwitch {
54        #[method(state)]
55        pub unsafe fn state(&self) -> NSControlStateValue;
56
57        #[method(setState:)]
58        pub unsafe fn setState(&self, state: NSControlStateValue);
59    }
60);
61
62extern_methods!(
63    /// Methods declared on superclass `NSControl`
64    #[cfg(feature = "AppKit_NSSwitch")]
65    unsafe impl NSSwitch {
66        #[method_id(@__retain_semantics Init initWithFrame:)]
67        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Id<Self>;
68
69        #[cfg(feature = "Foundation_NSCoder")]
70        #[method_id(@__retain_semantics Init initWithCoder:)]
71        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Option<Id<Self>>;
72    }
73);
74
75extern_methods!(
76    /// Methods declared on superclass `NSResponder`
77    #[cfg(feature = "AppKit_NSSwitch")]
78    unsafe impl NSSwitch {
79        #[method_id(@__retain_semantics Init init)]
80        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
81    }
82);
83
84extern_methods!(
85    /// Methods declared on superclass `NSObject`
86    #[cfg(feature = "AppKit_NSSwitch")]
87    unsafe impl NSSwitch {
88        #[method_id(@__retain_semantics New new)]
89        pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>;
90    }
91);