Commit graph

22 commits

Author SHA1 Message Date
Tim Eves
57b01ad640 Implement new state API using existing machinery. 2018-12-18 08:39:37 +07:00
Tim Eves
8598daa447 Remove vkey and erased members of action_items union 2018-12-17 23:30:07 +07:00
Tim Eves
0bf44af891 Whitespace, warnings and header tidy ups 2018-12-17 23:28:59 +07:00
Tim Eves
18ce72e7c8 Refactor keyboard processor initialisation code.
Turn the keyboard class backing the km_kbp_keyboard and km_kbp_keyboard_attr objects into just keyboard_attributes.
Move the abstract_processor and sublcasses as the objects that back km_kbp_keyboard and make keyboard_attrs a member of the asbtract_processor.
Move kmx_processor and mock_processor declarations into their own headers.
Make all vector<km_kbp_option_item> into vector<option> to handle memory management, moving and copying correctly.
Update test cases accordingly
2018-12-17 06:02:22 +07:00
Marc Durdin
de6f7d681f [Common] Add KM_KBP_IT_INVALIDATE_CONTEXT to request that context buffer is flushed 2018-12-04 09:50:33 +11:00
Tim Eves
70b6310a19 Fix misnamed km_kbp_context_items_to_utf8 call & add test case.
And fix the type of the buffer to match the type in the definition.

Co-Authored-By: Daniel Glassey <glasseyes@users.noreply.github.com>
2018-11-30 15:02:07 +07:00
Tim Eves
70ec24a6e1 Refactor context_items_{from,to}_utf{8,16}, fix utftest and sz_lut defns 2018-11-30 14:35:51 +07:00
glasseyes
68aca71111 add km_kbp_context_items_from_utf8
avoids unnecessary conversions and string duplication

utf8codec private vars needed in cpp for
linker to find them?
2018-11-28 11:56:38 +07:00
Marc Durdin
1c2f68ea76 [common] Cleanup const warnings 2018-11-24 12:47:58 +11:00
Marc Durdin
827b00c43c [common] Addressing review comments 2018-11-24 11:33:05 +11:00
Marc Durdin
37f424f090 [common] Working options model. Introduces some gunk around state and options which should be reviewed with TSE 2018-11-20 12:19:43 +11:00
Marc Durdin
396d552c81 [common] Add test framework and tests for keyboard options (failing right now because no implementation) 2018-11-19 11:14:06 +11:00
Marc Durdin
646c322b4c [Common] First kmx test case (currently fails, as it should) and KMX integration started 2018-11-16 11:12:56 +11:00
Marc Durdin
ac4448f350 [Common] Refactor KPAPI to support multiple processors (kmx, mock, ldml?) 2018-11-14 11:58:44 +11:00
Marc Durdin
9ca7bab5f9 [Common] Final checks 2018-11-12 19:23:54 +11:00
Marc Durdin
1ab04f681a [Common] Code Review updates, some minor changes to API, mostly comments and tests; one bug fix 2018-11-12 19:12:59 +11:00
Tim Eves
4afe030627 Add number USVs erased to BACK action item
Possible but difficult to get from state object if not provided.  IBus 
will use this.
2018-11-07 04:26:49 +07:00
Tim Eves
d70fe629e8 Fix state API implmentation to use new options, keyboard and context objects. 2018-11-07 04:25:28 +07:00
Tim Eves
b27fc67259 Rework keyboard API and add more robust checking. 2018-11-07 03:04:45 +07:00
Tim Eves
242105216a Rename options_set -> options and option -> option_item 2018-11-07 02:13:40 +07:00
Tim Eves
9cb22221c6 Rework options API per review
Additionally refactored option.hpp into option.hpp & option.cpp.
lookup now returns just the value since scope and key are fully 
specified in the arguments, but updates and SAVE/RESET action items 
still provide scope, key & value.
2018-11-07 01:37:32 +07:00
Tim Eves
93c76c14df Move headers into include/keyman from include/
Necessary to allow keyboardprocessor.h to refer to auxillary headers as 
<keyboard/header.h>
2018-11-06 16:19:14 +07:00
Renamed from common/engine/keyboardprocessor/include/keyboardprocessor.h.in (Browse further)