5 #import <objc/message.h>
30 @"alias" : [NSCursor dragLinkCursor],
31 @"basic" : [NSCursor arrowCursor],
32 @"click" : [NSCursor pointingHandCursor],
33 @"contextMenu" : [NSCursor contextualMenuCursor],
34 @"copy" : [NSCursor dragCopyCursor],
35 @"disappearing" : [NSCursor disappearingItemCursor],
36 @"forbidden" : [NSCursor operationNotAllowedCursor],
37 @"grab" : [NSCursor openHandCursor],
38 @"grabbing" : [NSCursor closedHandCursor],
39 @"noDrop" : [NSCursor operationNotAllowedCursor],
40 @"precise" : [NSCursor crosshairCursor],
41 @"text" : [NSCursor IBeamCursor],
42 @"resizeColumn" : [NSCursor resizeLeftRightCursor],
43 @"resizeDown" : [NSCursor resizeDownCursor],
44 @"resizeLeft" : [NSCursor resizeLeftCursor],
45 @"resizeLeftRight" : [NSCursor resizeLeftRightCursor],
46 @"resizeRight" : [NSCursor resizeRightCursor],
47 @"resizeRow" : [NSCursor resizeUpDownCursor],
48 @"resizeUp" : [NSCursor resizeUpCursor],
49 @"resizeUpDown" : [NSCursor resizeUpDownCursor],
50 @"verticalText" : [NSCursor IBeamCursorForVerticalLayout],
55 return [NSCursor arrowCursor];
64 @property(nonatomic) BOOL hidden;
72 - (
FlutterError*)activateSystemCursor:(nonnull NSDictionary*)arguments;
80 - (void)displayCursorObject:(nonnull NSCursor*)cursorObject;
96 #pragma mark - Private
100 - (instancetype)init {
114 - (
FlutterError*)activateSystemCursor:(nonnull NSDictionary*)arguments {
115 NSString* kindArg = arguments[kKindKey];
119 details:@"Missing argument while trying to activate system cursor"];
126 [
self displayCursorObject:cursorObject];
130 - (void)displayCursorObject:(nonnull NSCursor*)cursorObject {
145 + (NSCursor*)cursorFromKind:(NSString*)kind {
146 NSCursor* cachedValue = [cachedSystemCursors objectForKey:kind];
149 [cachedSystemCursors setValue:cachedValue forKey:kind];
154 #pragma mark - FlutterPlugin implementation
164 NSString* method = call.
method;
166 result([
self activateSystemCursor:call.
arguments]);