Commit graph

35 commits

Author SHA1 Message Date
Marc Durdin
8e73a4d729 [Common] Update tests to validate that option persist actions are correctly handled. 2018-12-19 10:45:56 +11:00
Tim Eves
d2e9ef9d49 Enable test support for PERSIST action. 2018-12-18 18:54:06 +07:00
Tim Eves
57b01ad640 Implement new state API using existing machinery. 2018-12-18 08:39:37 +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
Tim Eves
ca150e099f Add add path::native() to get system native character type
Also normalise path separators from '/' to '\\' on windows and correct 
path separator.
2018-12-14 01:59:51 +07:00
Tim Eves
08bab354bd Add a path handling class since std::filesystem is not reliably available
It's not there on Xcode yet and different platforms and compiler put it 
into different library files.
2018-12-14 00:50:04 +07:00
Tim Eves
559824a1b7 Replace utf16_to_utf8 with generic utfcodec based string conversion func
Templated convert for going between any combination of UTF codecs with 
an identity function specialisation for when src & target forms match.
Includes implmentations of json and basic_ostream << operators for 
u16string & u32string.
2018-12-14 00:46:54 +07:00
glasseyes
3f306af8e9 [common] tweak kmx tests for ibus-keyman test
handle python compatible /Uxxxxxxxx format for smp
use e.g. [K_A] instead of a in keys:
RALT K_B is ” on an Alt-Gr keyboard so use LALT instead
2018-12-13 12:04:03 +07:00
Marc Durdin
789f166d79 Merge branch 'master' into common-kpapi-kmx-test-harness2 2018-12-06 06:25:44 +11:00
Tim Eves
b2f56e3072 Make the utf8 to work regardless of km_kbp_path_name defintiion
Use template deduction and inlines to allow automatic conversion base on 
type rather than system defines.
2018-12-04 17:48:42 +07:00
Tim Eves
b343357ae3 Fixes to get kmx building to work under Windows.
Fix encoding issue with refactored kmx.cpp test harness and utf8 to 
wchar_t strings conversion.
Fix meson.build so the wine prefix doesn't interfere with running kmcomp 
natively on Windows.
2018-12-04 17:48:21 +07:00
Tim Eves
9f98f9c22f Fixes to get meson to run kmcomp and place output in source dir.
This may rebuild a little more frequently than necessary, but not much.
Added support for running kmcomp.exe under wine on non-windows OS only 
if wine is available.
2018-12-04 17:48:01 +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
Marc Durdin
8a2b55e58c [Common] Add support for KM_KBP_IT_EMIT_KEYSTROKE to allow the received key event to be passed on to the application 2018-12-04 09:46:04 +11:00
glasseyes
a75ce4106b change kmx test to accept 2 arguments
'kmn' and either source root or build root
2018-11-29 15:29:23 +07:00
Marc Durdin
319d5a800a [Common] Ignore kmcomp if not present and use prebuilt kmx files for tests 2018-11-28 06:28:45 +11:00
Marc Durdin
1c2f68ea76 [common] Cleanup const warnings 2018-11-24 12:47:58 +11:00
Marc Durdin
aa418517f0 [common] Address review comment -- move kmx processor into km::kbp::kmx namespace 2018-11-24 11:51:35 +11:00
Marc Durdin
2a5295e4cd [common] Fix broken modifier test in VKeyToChar, start addressing review comments 2018-11-24 11:19:22 +11:00
Marc Durdin
1da7c555cf [common] Test multiple groups, and test resulting actions 2018-11-23 10:52:49 +11:00
Marc Durdin
751557a41a [common] Add beep test, tweak test config for kmx 2018-11-23 10:36:21 +11:00
Marc Durdin
ce24cab902 [common] Test for SMP characters with KMX 2018-11-23 10:29:35 +11:00
Marc Durdin
b99cd600f6 [common] Full support for environment. Some refactoring of how environment options are set 2018-11-23 10:12:11 +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
09620cb311 [common] Basic options functionality (rework to match api model) 2018-11-20 10:00:29 +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
f0f3f355de [common] kmx tests uses list of kmn files in meson.build 2018-11-19 08:49:46 +11:00
Marc Durdin
a35fdeba00 [common] Add nul test source (not yet tested) and build .kmx files during tests 2018-11-19 08:45:03 +11:00
Marc Durdin
d0f84fa082 [common] resolve hints and warnings 2018-11-19 07:20:07 +11:00
Marc Durdin
becbfeda47 [common] Add <algorithm> for kmx.cpp 2018-11-19 06:47:56 +11:00
Marc Durdin
27f09bbb50 [Common] Refactor and cleanup 2018-11-16 19:05:17 +11:00
Marc Durdin
4c1fc5edee [Common] Cleanup kmx integration code 2018-11-16 18:47:01 +11:00
Marc Durdin
566796eaef [Common] all but one test now passes. Refactoring to come, then cleanup 2018-11-16 13:39:35 +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