Commit Graph

85 Commits

Author SHA1 Message Date
0ef02ebfa3 levelkeyboard: Drop unused manager references 2020-01-13 13:53:54 +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
83fea8cd31 Drop squeek_key 2019-12-01 15:01:08 +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
1b1fbed7de layouts: Change type based on shape 2019-10-29 13:21:46 +00:00
d47aff357b layout: Remove dead code 2019-09-13 15:21:29 +00:00
b84c402c4a WIP
WIP

WIP: keymap generation test passes

meta: Update features and version

WiP: cargo.lock

WIP: don't crash

WIP: no outlines

parsing: New tests

WIP: base level works

WIP: remove old keyboard

symbols correctly input

WIP: lodaing files

WIP: fallback works

Valid fallback
2019-09-04 09:44:31 +00:00
4a61ab269b layout: Place items using simple loops
The C version of looping over buttons and other items was weakly typed, causing runtime errors, and also C doesn't know how to iterate in abstract, so it was full of callbacks with user-defined data. Moving this to Rust, iteration is made of simple loops, and compile-time type-checked, at the cost of some more verbose code.
2019-08-28 09:41:33 +00:00
f479a36dbe keyboard: Remove references 2019-08-18 13:22:18 +00:00
c4b3a0aaaa row: Moved button sizing closer to row 2019-08-18 13:22:18 +00:00
77d4f45d13 section: Elininate references 2019-08-18 13:22:18 +00:00
4f8de42598 section: Move properties into Row 2019-08-18 13:22:18 +00:00
6fc351d2e8 eekkey: Dropped in favor of Button
Each Button has a KeyState, which may be shared with other buttons. The list of pressed and locked buttons is used as a list of keys, causing a search for the button in the current view.
2019-08-18 13:22:18 +00:00
f60917e466 symbols: Removed redundant info 2019-08-18 13:20:43 +00:00
6309fa8a48 views: Don't lay out views that are missing 2019-08-13 11:59:28 +00:00
1cfec4de50 key: Share state between multiple keys 2019-08-08 20:04:38 +00:00
cc3f2315a7 Use keyboards as views
Got rid of modifiers in the process. Still buggy: dragging over keys.
2019-08-08 19:56:36 +00:00
f745223796 symbols: Stop parsing key groups 2019-08-08 19:26:25 +00:00
25a2e95890 keyboard: Remove unused numlock and altgr masks 2019-08-08 19:26:24 +00:00
f371b14e89 levelkeyboard: Use a layer for managing keyboard views 2019-08-08 19:26:21 +00:00
fb93e25833 eekkey: Moved state to KeyState 2019-08-08 19:18:29 +00:00
ad86cb531a symbol: Store symbols instead of pointers 2019-08-08 19:18:29 +00:00
53b89aae45 symbol: Remove remains 2019-08-08 19:18:29 +00:00
b76e43679e level: Remove level from elements 2019-08-08 19:18:29 +00:00
23d5f18d4a symbols matrix: Remove in favor of a levels vector 2019-08-08 19:18:28 +00:00
c8adb45ab5 keyboard: Expose creating sections directly 2019-08-08 19:18:28 +00:00
18163e3ecc geometry: Simplify keyboard declarations 2019-08-08 19:18:23 +00:00
a18beca50c geometry: Move keycode to costomizations 2019-08-08 19:11:53 +00:00
04b721aed9 geometry: Move customizations to the button table 2019-08-08 19:11:53 +00:00
45f9353164 geometry: Use default outline by default 2019-08-08 19:11:53 +00:00
5abe6ed6be geometry: Remove unused row element 2019-08-08 19:11:43 +00:00
38f81e45f4 Break out symbol handling into Rust 2019-08-08 12:51:15 +00:00
754e79103a keyboard: Drop layout reference 2019-08-05 17:01:22 +00:00
b8389f6736 symbol: Simplify symbol storage 2019-08-01 20:25:01 +00:00
6c1c979414 section: Removed multiple rows in section, row/column in key 2019-08-01 20:10:59 +00:00
d8b26040f9 symbolclass: Remove with surroundings
Collaterals: Enabled strict checking of initializers, fixed scripts generating keycode mappings.
2019-08-01 20:08:37 +00:00
8f1de46381 Simplify layout and rendering
Remove pre-scaling of the bounds for the keyboard and its contents.
Calculate the scale factor based on the allocation and the desired width
and height of each keyboard, using the lower value of the horizontal and
vertical scale factors.
Apply scaling in the renderer and prepare to perform centering there.
2019-07-30 21:48:36 +00:00
70895999c2 Generate XKB keymaps from XML instead of using pre-made ones 2019-07-25 22:25:29 +02:00
a045810af6 Merge branch 'add-built-in-keymaps' into 'master'
Add built in keymaps

See merge request Librem5/squeekboard!78
2019-07-20 14:42:51 +00:00
6eb63f6a4c Refactor layout code, rescale and reformat when changing level 2019-07-19 17:35:49 +02:00
f6d4ca0387 Place keys after symbols have been read, skipping blank keys 2019-07-19 17:35:49 +02:00
7b41466a77 Start to refactor keyboard section layout 2019-07-19 17:35:49 +02:00
dbc8cc14bc Generate config.h
This allows us to remove a lot of #ifdef's. Either we want to use
a config.h or we don't. Since we'll want it for e.g. optional gsound
support later on let's have it.
2019-07-17 19:50:53 +02:00
fbdc5f4a93 Stash for sharing 2019-07-16 14:00:41 +02:00
e5648a82a3 Remove explicit keycodes in XML, auto-generate them instead
This makes it easier to keep the geometry and symbols files in sync.
2019-07-16 14:00:41 +02:00
44110fd4d9 Remove bounds for everything except the geometry element 2019-07-12 14:00:20 +00:00
5efb4cc58d Bundle keyboard definitions
This allows running uninstalled from a git repo

Closes: #21, #29
2019-07-11 13:40:03 +02:00
094aa872ce Cleanups: fix deprecated g_type_class_add_private()
- use G_DECLARE_ and G_DEFINE_ macros
- move all data into ClassNamePrivate
- use _get_instance_private()

This should not introduce any functional changes or breakage.

Skipped two classes (EekKeyboard and EekboardContextService) for now in
order not to break the build.

These two classes are used in some very funky WIP code that tries to
circumvent encapsulation.

(Funky code is in eekboard/key-emitter.c and eekboard/eekboard-context-service.c)
2019-07-08 08:44:05 +02:00
654909261e modifiers: Level 3 works 2019-07-02 13:03:35 +00:00
3a42e66504 layout: Position keys closer to the left edge 2019-07-01 12:57:52 +00:00