aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-08-28 20:47:24 +0200
committerTeddy Wing2018-08-28 20:47:24 +0200
commite4490538e9ef33ce17a262d3981023a6809effac (patch)
treeb5b902931750d35c8aee1ab121dc692926aa4b5d
parent98529aa0bc8d7188cb1ed577e06a576e4096319c (diff)
downloaddome-key-map-e4490538e9ef33ce17a262d3981023a6809effac.tar.bz2
cocoa_bridge: Add a `Trigger` struct to use in `run_key_action()`
This struct will be used as function arguments to the C version of `run_key_action()`. It will enable us to pass in both a trigger and a mode context more concisely.
-rw-r--r--src/cocoa_bridge.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs
index 49fc9f2..12b2b62 100644
--- a/src/cocoa_bridge.rs
+++ b/src/cocoa_bridge.rs
@@ -42,6 +42,12 @@ struct renameMeMapGroup {
// Somehow: switch mode inside Rust
#[repr(C)]
+pub struct Trigger {
+ pub buttons: *const HeadphoneButton,
+ pub length: size_t,
+}
+
+#[repr(C)]
pub struct KeyActionResult {
pub action: Option<CString>,
pub kind: MapKind,