aboutsummaryrefslogtreecommitdiffstats
path: root/includer.c
AgeCommit message (Collapse)Author
2018-08-29c_run_key_action(): Add `mode` argumentTeddy Wing
Add a nullable `mode` argument like `trigger`. Change `trigger` to make it non-nullable again. We can now pass a mode trigger in from FFI and handle it in our Rust function.
2018-08-29c_run_key_action(): Make `trigger` argument nullableTeddy Wing
Actually, now that I think about it, the trigger argument shouldn't be nullable, since one should always be passed in. But this was really more of a test to make sure we could do the same for a new `mode` argument, which will also be a `Trigger`, but which might be null.
2018-08-28c_run_key_action(): Change signature to take a `Trigger`Teddy Wing
Our new `Trigger` type groups together the two arguments this function used to take into a single type.
2018-08-28cbindgen.toml: Prefix enum variants with enum nameTeddy Wing
For better namespacing and local context information. Thank goodness 'cbindgen' supports this.
2018-08-26Link library with a test C programTeddy Wing
Make a test `includer.c` program that includes the Rust library and calls our `c_run_key_action()` to see if it actually works. Currently it doesn't, we get `(null)` printed to stdout. Add a Makefile with the build command for the C program. cbindgen.toml: Remove `KeyActionResult` from exported types, as the `Option` field it contains caused `gcc` to complain. cocoa_bridge.rs: * Comment out all 'cocoa' crate related code as the 'cocoa' code was interfering with GCC compilation as a result of my not linking to Cocoa frameworks. * Add a new test map definition that corresponds with the one we look for in `includer.c`. parser.rs: Add `#[repr(C)]` to `MapKind` because it needs to be exported in the library and generated into our C header file.