aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTeddy Wing2018-08-28 21:02:51 +0200
committerTeddy Wing2018-08-28 21:02:51 +0200
commitbeea50b6c0b30b40abd292a11ded570ec50228a4 (patch)
treefb8f1a8241120313acb1f9572925531f877223da /src
parente4490538e9ef33ce17a262d3981023a6809effac (diff)
downloaddome-key-map-beea50b6c0b30b40abd292a11ded570ec50228a4.tar.bz2
c_run_key_action(): Change signature to take a `Trigger`
Our new `Trigger` type groups together the two arguments this function used to take into a single type.
Diffstat (limited to 'src')
-rw-r--r--src/cocoa_bridge.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cocoa_bridge.rs b/src/cocoa_bridge.rs
index 12b2b62..12b0095 100644
--- a/src/cocoa_bridge.rs
+++ b/src/cocoa_bridge.rs
@@ -61,13 +61,12 @@ pub struct CKeyActionResult {
#[no_mangle]
pub extern "C" fn c_run_key_action(
- trigger: *const HeadphoneButton,
- length: size_t,
+ trigger: Trigger,
) -> *const CKeyActionResult {
let trigger = unsafe {
- assert!(!trigger.is_null());
+ assert!(!trigger.buttons.is_null());
- slice::from_raw_parts(trigger, length as usize)
+ slice::from_raw_parts(trigger.buttons, trigger.length as usize)
};
let result = match run_key_action(trigger) {