aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dome-key-map
diff options
context:
space:
mode:
authorTeddy Wing2018-09-21 12:10:21 +0200
committerTeddy Wing2018-09-21 12:10:21 +0200
commit342a2bebed69e57be8a827ff977d636ae9392924 (patch)
tree78706a21188abb7ce372f5da0461eb6a37c3e53d /lib/dome-key-map
parentf6eb63bc9f55f76b5ad2d7496cbeb9afd0a5a0f4 (diff)
downloadDomeKey-342a2bebed69e57be8a827ff977d636ae9392924.tar.bz2
HeadphoneKey: Start of mode handling (WIP)
A nearly-wroking stab at making mode handling work. Here we store the current mode in the `HeadphoneKey` object. We try to save it when getting a mode back from `c_run_key_action()`, and use it as a filter when running `c_run_key_action()`. I had discovered a problem, though. During debugging, I found that the `_in_mode` ivar would end up pointing to the same thing as the current `trigger`. Guessed that this had to do with it being a const pointer, so I started to write some code to store the `Trigger` by value instead of by reference in `HeadphoneKey` `_in_mode`. At this point, a little frustrated, I thought about the overall problem of mode handling again. It occurred to me that I no longer like this idea of storing the current mode in the Objective-C object, as this recent work has left a bad taste in my mouth. Instead, I'm going to try moving mode handling into the Rust library, and make it opaque to the Objective-C code. Hoping that that approach will be a more pleasant endeavor.
Diffstat (limited to 'lib/dome-key-map')
0 files changed, 0 insertions, 0 deletions