diff options
author | Teddy Wing | 2018-10-04 00:33:23 +0200 |
---|---|---|
committer | Teddy Wing | 2018-10-04 00:33:23 +0200 |
commit | ac99e4b90551d912613abe11d3f55e3efdb2b99d (patch) | |
tree | 38ffd45713883e083e8421de443cfb37922f26cd | |
parent | bb5d021a67fb2895acb717a0ea60c0dbf5276ece (diff) | |
download | DomeKey-ac99e4b90551d912613abe11d3f55e3efdb2b99d.tar.bz2 |
HeadphoneKey: Update for latest dome-key-map API
There is no longer a return value for `c_run_key_action()`, and the
`CKeyActionResult` struct no longer exists. Update the code to reflect
this.
-rw-r--r-- | DomeKey/HeadphoneKey.h | 1 | ||||
-rw-r--r-- | DomeKey/HeadphoneKey.m | 15 |
2 files changed, 1 insertions, 15 deletions
diff --git a/DomeKey/HeadphoneKey.h b/DomeKey/HeadphoneKey.h index 3be7148..861621f 100644 --- a/DomeKey/HeadphoneKey.h +++ b/DomeKey/HeadphoneKey.h @@ -29,6 +29,5 @@ static const unsigned int TIMEOUT_MILLISECONDS = 1000; - (void)handleDeadKey:(HeadphoneButton)button; - (void)runAction; -- (const Trigger *)maybeSwitchToMode:(const CKeyActionResult *)result; @end diff --git a/DomeKey/HeadphoneKey.m b/DomeKey/HeadphoneKey.m index 9d3a9fb..1556427 100644 --- a/DomeKey/HeadphoneKey.m +++ b/DomeKey/HeadphoneKey.m @@ -83,22 +83,9 @@ .length = count }; - const CKeyActionResult *result = c_run_key_action(_state, trigger, _in_mode); + c_run_key_action(_state, trigger, _in_mode); [_key_buffer removeAllObjects]; } -- (const Trigger *)maybeSwitchToMode:(const CKeyActionResult *)result -{ - // if _in_mode is not null, nullify it - // TODO: rename this method - - if (result->kind && - *result->kind == ActionKind_Mode) { - _in_mode = result->in_mode; - } - - return _in_mode; -} - @end |