1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSCursor;

    unsafe impl ClassType for NSCursor {
        type Super = NSObject;
        type Mutability = Immutable;
    }
);

unsafe impl NSCoding for NSCursor {}

unsafe impl NSObjectProtocol for NSCursor {}

unsafe impl NSSecureCoding for NSCursor {}

extern_methods!(
    unsafe impl NSCursor {
        #[method_id(@__retain_semantics Other currentCursor)]
        pub unsafe fn currentCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other currentSystemCursor)]
        pub unsafe fn currentSystemCursor() -> Option<Id<NSCursor>>;

        #[method_id(@__retain_semantics Other arrowCursor)]
        pub fn arrowCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other IBeamCursor)]
        pub fn IBeamCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other pointingHandCursor)]
        pub fn pointingHandCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other closedHandCursor)]
        pub fn closedHandCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other openHandCursor)]
        pub fn openHandCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other resizeLeftCursor)]
        pub fn resizeLeftCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other resizeRightCursor)]
        pub fn resizeRightCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other resizeLeftRightCursor)]
        pub fn resizeLeftRightCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other resizeUpCursor)]
        pub fn resizeUpCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other resizeDownCursor)]
        pub fn resizeDownCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other resizeUpDownCursor)]
        pub fn resizeUpDownCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other crosshairCursor)]
        pub fn crosshairCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other disappearingItemCursor)]
        pub fn disappearingItemCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other operationNotAllowedCursor)]
        pub fn operationNotAllowedCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other dragLinkCursor)]
        pub fn dragLinkCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other dragCopyCursor)]
        pub fn dragCopyCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other contextualMenuCursor)]
        pub fn contextualMenuCursor() -> Id<NSCursor>;

        #[method_id(@__retain_semantics Other IBeamCursorForVerticalLayout)]
        pub fn IBeamCursorForVerticalLayout() -> Id<NSCursor>;

        #[cfg(feature = "NSImage")]
        #[method_id(@__retain_semantics Init initWithImage:hotSpot:)]
        pub fn initWithImage_hotSpot(
            this: Allocated<Self>,
            new_image: &NSImage,
            point: NSPoint,
        ) -> Id<Self>;

        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Id<Self>;

        #[method(hide)]
        pub unsafe fn hide();

        #[method(unhide)]
        pub unsafe fn unhide();

        #[method(setHiddenUntilMouseMoves:)]
        pub unsafe fn setHiddenUntilMouseMoves(flag: bool);

        #[method(pop)]
        pub unsafe fn pop_class();

        #[cfg(feature = "NSImage")]
        #[method_id(@__retain_semantics Other image)]
        pub unsafe fn image(&self) -> Id<NSImage>;

        #[method(hotSpot)]
        pub unsafe fn hotSpot(&self) -> NSPoint;

        #[method(push)]
        pub unsafe fn push(&self);

        #[method(pop)]
        pub unsafe fn pop(&self);

        #[method(set)]
        pub unsafe fn set(&self);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl NSCursor {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

#[cfg(feature = "NSApplication")]
pub static NSAppKitVersionNumberWithCursorSizeSupport: NSAppKitVersion = 682.0 as _;

extern_methods!(
    /// NSDeprecated
    unsafe impl NSCursor {
        #[cfg(all(feature = "NSColor", feature = "NSImage"))]
        #[deprecated = "Color hints are ignored. Use -initWithImage:hotSpot: instead"]
        #[method_id(@__retain_semantics Init initWithImage:foregroundColorHint:backgroundColorHint:hotSpot:)]
        pub unsafe fn initWithImage_foregroundColorHint_backgroundColorHint_hotSpot(
            this: Allocated<Self>,
            new_image: &NSImage,
            fg: Option<&NSColor>,
            bg: Option<&NSColor>,
            hot_spot: NSPoint,
        ) -> Id<Self>;

        #[deprecated = "setOnMouseExited is unused and should not be called"]
        #[method(setOnMouseExited:)]
        pub unsafe fn setOnMouseExited(&self, flag: bool);

        #[deprecated = "setOnMouseEntered is unused and should not be called"]
        #[method(setOnMouseEntered:)]
        pub unsafe fn setOnMouseEntered(&self, flag: bool);

        #[deprecated = "isSetOnMouseExited is unused"]
        #[method(isSetOnMouseExited)]
        pub unsafe fn isSetOnMouseExited(&self) -> bool;

        #[deprecated = "isSetOnMouseEntered is unused"]
        #[method(isSetOnMouseEntered)]
        pub unsafe fn isSetOnMouseEntered(&self) -> bool;

        #[cfg(feature = "NSEvent")]
        #[deprecated = "mouseEntered: is unused and should not be called"]
        #[method(mouseEntered:)]
        pub unsafe fn mouseEntered(&self, event: &NSEvent);

        #[cfg(feature = "NSEvent")]
        #[deprecated = "mouseExited: is unused and should not be called"]
        #[method(mouseExited:)]
        pub unsafe fn mouseExited(&self, event: &NSEvent);
    }
);