Commit 6f98619
committed
Add autostart and shortcut API bindings
Introduces native bindings and header inclusions for autostart and shortcut management features across iOS and macOS. Updates ffigen.yaml to generate bindings for new C API headers, and extends Dart FFI bindings to support autostart and shortcut functionality.1 parent 59a30de commit 6f98619
7 files changed
Lines changed: 892 additions & 7 deletions
File tree
- packages/cnativeapi
- ios/cnativeapi/Sources/cnativeapi
- include
- lib/src
- macos/cnativeapi/Sources/cnativeapi
- include
- CMakeLists.txt+2
- examples/menu_example/main.cpp+2-2
- examples/shortcut_c_example/CMakeLists.txt+14
- examples/shortcut_c_example/main.c+221
- examples/shortcut_example/CMakeLists.txt+20
- examples/shortcut_example/main.cpp+227
- include/nativeapi.h+8
- src/CMakeLists.txt+1-1
- src/autostart.h+182
- src/capi/autostart_c.cpp+209
- src/capi/autostart_c.h+168
- src/capi/menu_c.cpp+9-9
- src/capi/shortcut_c.cpp+83
- src/capi/shortcut_c.h+115
- src/capi/shortcut_manager_c.cpp+342
- src/capi/shortcut_manager_c.h+201
- src/foundation/keyboard.cpp+39
- src/foundation/keyboard.h+189
- src/keyboard_monitor.h+1-21
- src/menu.cpp+1-37
- src/menu.h+6-60
- src/platform/android/autostart_android.cpp+104
- src/platform/ios/autostart_ios.mm+107
- src/platform/ios/menu_ios.mm+3-3
- src/platform/linux/autostart_linux.cpp+377
- src/platform/linux/menu_linux.cpp+2-2
- src/platform/macos/autostart_macos.mm+330
- src/platform/macos/menu_macos.mm+7-7
- src/platform/macos/window_macos.mm-9
- src/platform/ohos/autostart_ohos.cpp+105
- src/platform/windows/autostart_windows.cpp+287
- src/platform/windows/menu_windows.cpp+6-6
- src/shortcut.cpp+65
- src/shortcut.h+308
- src/shortcut_event.h+242
- src/shortcut_manager.cpp+287
- src/shortcut_manager.h+411
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| 57 | + | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
0 commit comments