StratoSDK is a framework with a declarative approach similar to Flutter/React, written and designed entirely for Rust.
| 1 | #import <AppKit/AppKit.h> |
| 2 | #import <Carbon/Carbon.h> |
| 3 | |
| 4 | #import "hotkey.h" |
| 5 | |
| 6 | @implementation WarpHotKey |
| 7 | |
| 8 | - (instancetype)initWithEventHotKey:(EventHotKeyRef)eventHotKey |
| 9 | keyCode:(NSUInteger)keyCode |
| 10 | modifierKeys:(NSUInteger)modifierKeys { |
| 11 | self = [super init]; |
| 12 | if (self) { |
| 13 | _eventHotKey = eventHotKey; |
| 14 | _keyCode = keyCode; |
| 15 | _modifierKeys = modifierKeys; |
| 16 | } |
| 17 | return self; |
| 18 | } |
| 19 | |
| 20 | - (BOOL)hotKeyKeyAndModifierEquals:(NSUInteger)keyCode modifierKeys:(NSUInteger)modifierKeys { |
| 21 | return keyCode == _keyCode && modifierKeys == _modifierKeys; |
| 22 | } |
| 23 | |
| 24 | @end |
| 25 |