Commit 1636a3f
committed
Add platform shortcut manager implementations
Introduce platform-specific ShortcutManager implementations and refactor core API.
- Add native implementations for Linux (X11), macOS (Carbon/Carbon HotKey API), and Windows (RegisterHotKey) including accelerator parsing, registration/unregistration, and event monitoring/threads.
- Add stub implementations for Android, iOS, and OHOS to provide platform placeholders.
- Expose a PIMPL interface in shortcut_manager.h (Impl) and add EmitShortcutActivated() for platform backends to notify the manager.
- Update shortcut_manager.cpp to use the PIMPL idiom, switch mutex guards to std::unique_lock where unlocking/relocking is required, remove the internal default Impl, and add EmitShortcutActivated implementation.
- Update CMakeLists.txt to link the Carbon framework on Apple builds.
The change centralizes platform differences behind the Impl interface and implements full hotkey handling on major desktop platforms while providing no-op stubs for mobile/embedded platforms.1 parent 92c305e commit 1636a3f
File tree
9 files changed
+1122
-72
lines changed- src
- platform
- android
- ios
- linux
- macos
- ohos
- windows
9 files changed
+1122
-72
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments