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 | #import <UserNotifications/UserNotifications.h> |
| 4 | |
| 5 | // Our NSApplication subclass. |
| 6 | @interface WarpApplication : NSApplication |
| 7 | @end |
| 8 | |
| 9 | // WarpDelegate is the delegate of the NSApp and also all menus. |
| 10 | @interface WarpDelegate |
| 11 | : NSObject <NSApplicationDelegate, NSMenuDelegate, UNUserNotificationCenterDelegate> |
| 12 | |
| 13 | @property(strong) NSMenu *dockMenu; |
| 14 | |
| 15 | @end |
| 16 | |
| 17 | // Functions implemented in Rust. |
| 18 | void warp_app_will_finish_launching(id app); |
| 19 | void warp_app_did_become_active(id app); |
| 20 | void warp_app_did_resign_active(id app); |
| 21 | void warp_app_will_terminate(id app); |
| 22 | void warp_app_open_files(id app, id filenames); |
| 23 | void warp_app_send_global_keybinding(id app, NSUInteger modifiers, NSUInteger key_code); |
| 24 | void warp_app_new_window(id app); |
| 25 | void warp_app_window_did_resize(id app); |
| 26 | void warp_app_window_did_move(id app); |
| 27 | void warp_app_window_will_close(id app, id window); |
| 28 | void warp_app_screen_did_change(id app); |
| 29 | void cpu_awakened(id app); |
| 30 | void cpu_will_sleep(id app); |
| 31 | void warp_app_active_window_changed(id app); |
| 32 | void warp_app_notification_clicked(id app, double date, id data); |
| 33 | void warp_app_open_urls(id app, id urls); |
| 34 | void warp_app_os_appearance_changed(id app); |
| 35 | BOOL warp_app_should_terminate_app(id app); |
| 36 | BOOL warp_app_should_close_window(id app, id window); |
| 37 | BOOL warp_app_are_key_bindings_disabled_for_window(id app, id window); |
| 38 | BOOL warp_app_has_binding_for_keystroke(id app, id event); |
| 39 | BOOL warp_app_has_custom_action_for_keystroke(id app, id event); |
| 40 | void warp_app_disable_warning_modal(id app); |
| 41 | void warp_app_internet_reachability_changed(id app, BOOL can_reach); |
| 42 | void warp_app_process_modal_response(id app, NSUInteger modal_id, NSModalResponse response, |
| 43 | BOOL disable_modal); |
| 44 |