Commit Graph

60 Commits

Author SHA1 Message Date
20c44476a3 Merge branch 'master' into x11kb 2020-10-03 12:34:50 +00:00
e6c136918c keymaps: Use multiple key maps, each within the limit of what Xorg can accept.
Key maps are switched on key press whenever needed.
2020-10-03 12:22:01 +00:00
c686cf7e81 syntax: Let older rustc understand symbolmap's lifetime 2020-10-01 14:12:15 +00:00
88d3a45083 keymap: Concentrate special handling of BackSpace, which is implicit in Erase action 2020-09-28 20:37:34 +00:00
edc330d683 data: Restore testability of action->keysym conversion 2020-09-28 20:37:31 +00:00
44e06bc0dc keymap: Generate from symbol map, not layout 2020-09-28 17:52:00 +00:00
d93e9c2b11 rust: Fix deprecation warnings 2020-09-21 10:57:01 +00:00
ecfc45c2de build: Make compatible with Debian Bullseye
This commit is a bit bigger than it could have: Meson changes could have gone in separately from CI and Debian.

This commit looks more complicated than it should reasonably be. Alas, Cargo is a piece of work, and it doesn't let honest people just choose different versions of dependencies, leading to a cascade of misery. Several things were tried to curb the disaster:

- Cargo [feature] supports choosing dependencies, but doesn't support specifying dependency versions
- Cargo has a cfg() syntax in sections for choosing dependencies by build options, but it explicitly doesn't support selecting on features…
- Cargo allows choosing different dependencies based on features, so perhaps dependencies with different versions could live in stub crates pulled in as needed? Nope! If a dependency doesn't exist in the repo (and that's the point here), Cargo throws up its hands.

This means Cargo.toml needs to be generated based on the build type. More misery:

- we lose the simplicity of just doing `cargo.sh` for simple housekeeping like deps updates. HACKING.md was updated to reflect that. Perhaps that's inevitable - build options need to be like this.
- Some flaky adjustments needed in `cargo.sh` because of an additional argument that can be mistaken for an argument to the exec in `cargo run`.
- Specifying a custom `Cargo.toml` means Cargo can no longer find any tests, examples, benchmarks, or binaries, because it searches relative to the directory of `Cargo.toml`, which is now the build dir. Extra care needed to not forget about them now.

As soon as Cargo allows anything better for managing deps versions, the above should be undone in its favor.

Good side is that a couple bugs went away:

- build flags not always making it to Cargo
- arm64 builds were optional while they shouldn't
- test layouts in unit tests are loaded from an explicit directory now

The Bullseye versions of dependencies are canonical now, Buster considered legacy.
2020-06-24 15:51:21 +00:00
92e9d994fe modifiers: Support Control and Alt
Control and Alt are special in that they aren't expected to switch levels, and so don't need to change what characters are output.

Use in layouts by adding `modifier: Control` or `modifier: Alt` in place of `text: "foo"`.

The latching of the modifier will force the keyboard to emit raw key presses and prevent it from outputting text.
2020-02-28 11:21:07 +00:00
10178d204b Merge remote-tracking branch 'upstream/master' into center 2020-02-05 10:32:07 +00:00
0ac8c620fd Merge branch 'lock' into 'master'
Turn locking stateless

See merge request Librem5/squeekboard!322
2020-02-05 09:25:49 +00:00
37e1ed93a6 Merge branch 'text_input_enable' into 'master'
Submit and delete strings via text_input

See merge request Librem5/squeekboard!304
2020-02-03 15:06:25 +00:00
40b79f6209 layout: Center views relative to each other and the layout bounds 2020-02-02 18:07:28 +00:00
782d80a007 row: Eliminate angle 2020-02-02 17:11:25 +00:00
500c23beec locking: Lock keys statelessly
Locking is not determined by button state any more, but rather based on the view active at the moment. If pressing/locking a key results in the current view being active, the key is active. If locking a key results in the current view, the unlock view is activated.
2020-02-02 15:41:47 +00:00
7a588460bf setup: Connect ui to the state manager
This ensures that the layout type information is accessible to the state manager when new layout information arrive.

The should be thought of as a stopgap measure. A proper solution would be to separate the state properly, and probably turn layout information coming from random places into messages that some object (thread?) collects and displays.
2020-01-28 21:32:47 +00:00
de8aaa1a47 Merge remote-tracking branch 'upstream/master' into text_input_enable 2020-01-28 12:39:42 +00:00
585ed5e97d input_method: Use for erasing 2020-01-23 15:39:40 +00:00
c75e085dc8 logging: Unified to remove random eprint calls 2020-01-17 12:25:39 +00:00
ea84f4f031 logging: Try to improve common operations
This adds sugar for logging `Result`s with a handler, makes names evoke something closer to "logging" than "warning", tries to remove any redundant `Logging` where the module name will do, and introduces a type strictly for bad things happening.
2020-01-16 15:57:46 +00:00
e77eccf7db action: Rename Level to View 2020-01-08 18:52:09 +00:00
a799178b6a Merge branch 'logging' into 'master'
Logging

See merge request Librem5/squeekboard!288
2019-12-24 10:10:30 +00:00
e2b89e85f7 logging: Move all facilities to one file 2019-12-16 19:15:40 +00:00
257b97e9ca layout: Respect margins 2019-12-15 18:43:56 +00:00
5e700219f9 parsing: Remove bounds which weren't used anyway 2019-12-15 18:43:56 +00:00
dd21bfed8d positioning: Calculate sizes instead of storing, move position out of widgets
Sizes of widgets can be derived, so storing them was only for C compatibility. Similar with storing position inside of widgets.

Some layout margin and scaling changes could be introduced, meaning a possibility of visual differences.
2019-12-07 21:20:21 +00:00
36362291ef cleanup: Unbox View and Row
They are no longer referenced anywhere in C, so it's safe to let Rust memory management deal with them.
2019-12-07 17:19:39 +00:00
b252f7659b rust: Be compatible with older Rust 2019-11-27 16:52:50 +00:00
af6ad1fce6 buttons: Accept "text" and drop xkb keysym derivation 2019-11-27 16:52:50 +00:00
9571adb107 tests: Executable for testing layouts 2019-11-19 09:47:32 +00:00
3c0b142c4f warnings: Print at runtime, crash at test time 2019-11-19 08:29:57 +00:00
47c4119ab7 Add a popover menu to switch languages 2019-11-05 13:10:55 +00:00
c917a1f818 layout: Keep kind metadata in loaded layouts
It will come useful for applying per-kind styling later without having to give each layout a new stylesheet
2019-10-29 13:27:54 +00:00
bd3b27eceb build: Make borrowing compliant with older Rust 2019-10-29 13:21:46 +00:00
1b1fbed7de layouts: Change type based on shape 2019-10-29 13:21:46 +00:00
55410a005c Merge branch 'vecset' into 'master'
Move event handling to Rust

See merge request Librem5/squeekboard!223
2019-10-24 14:03:21 +00:00
c99efc430c presses: Move press handling to Rust
This fixes some rendering things which would happen with multiple state-sharing buttons. It also removes some interfaces exposing rows, views, layouts, and buttons, bringing the code closer to removing them from the FFI entirely.
2019-10-23 15:11:16 +00:00
4cdfc30c29 Merge branch 'fallbacks' into 'master'
layouts: Simplify fallbackss handling

See merge request Librem5/squeekboard!221
2019-10-22 13:25:15 +00:00
162b828c4c Merge branch 'targets' into 'master'
buttons: Buttons are next to each other, padding is visual only

Closes #110

See merge request Librem5/squeekboard!209
2019-10-18 19:14:04 +00:00
ac58b675ef layouts: Simplify fallbackss handling 2019-10-16 09:43:41 +00:00
9e078be603 buttons: Buttons are next to each other, padding is visual only 2019-10-09 20:34:46 +00:00
dc2bc46167 keymap: Simplified key state passing
There's no need to treat states as a shared resource before they are placed inside buttons.
2019-10-09 15:38:21 +00:00
9cd439767e virtual_keyboard: Submit multi-codepoint strings 2019-10-09 15:13:46 +00:00
10bad4ebe3 warnings: Fix and silence 2019-10-09 08:15:03 +00:00
da5a83f367 action: Rename file to action.rs 2019-10-09 08:11:28 +00:00
ef38fd3e64 symbol: Eliminate in favor of Action 2019-10-09 08:06:17 +00:00
e14d411150 logs: Silence missing file warnings 2019-10-03 12:59:26 +00:00
1e08adb26b Merge branch 'fallbacks' into 'master'
layout: Fallback to builtin before switching layouts

See merge request Librem5/squeekboard!186
2019-09-29 16:29:47 +00:00
9b5e0109a7 Merge branch 'style_better' into 'master'
Style better

See merge request Librem5/squeekboard!180
2019-09-29 14:28:42 +00:00
1b424bd663 layout: Attempt to build xdg keymap at every load 2019-09-29 07:54:32 +00:00