From e4490538e9ef33ce17a262d3981023a6809effac Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 28 Aug 2018 20:47:24 +0200 Subject: 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. --- src/cocoa_bridge.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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 @@ -41,6 +41,12 @@ struct renameMeMapGroup { // or run command (from Rust?) // 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, -- cgit v1.2.3