| Age | Commit message (Collapse) | Author |
|
Take a function pointer argument that will be called whenever a mode is
activated or deactivated. We'll be using this on the Objective-C side to
play audio when the mode changes.
|
|
Mirror the `map::run_key_action()` function and add an extra `PlayAudio`
argument, which will control whether audio cues are played when a mode
is activated or deactivated.
The Objective-C code will pass in this value based on the value of a
`Config` setting, which will have come from a command line argument.
|
|
Play audio on mode activation and deactivation depending on the value of
the new argument.
Decided to make it an enum instead of a bool for better readability.
Will need to get rid of the `unwrap`s.
|
|
Now that this function no longer takes a "current mode" argument, the
"mode" part of the name doesn't make sense.
|
|
This was for the `KeyActionResult` struct, which no longer exists.
|
|
Instead of just unwrapping, print the error message in our error format.
|
|
Keep FFI functions separate from the rest.
|
|
When I first created the file, it was going to be used to call Cocoa
methods using the 'cocoa' crate. It's since turned into a module that
contains C functions called by Objective-C code. This new name makes
more sense.
We'll need to move one or two non-FFI functions outside of this module
for better organisation.
|