Commit graph

5162 commits

Author SHA1 Message Date
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
e79c524d90 Fix option value type's copy ctor and move ctor & assignment
Also add an copy assignment operator and allow initialisation from 
char16_t pointers as well as u16string objects.
2018-12-17 05:55:23 +07:00
Tim Eves
2067547640 Add support for char16_t * compatible << operator to json class 2018-12-17 05:42:10 +07:00
Tim Eves
56f85d1a82 Fix wrong overload of std::string:;append 2018-12-17 02:40:35 +07:00
Tim Eves
a3aca838fb Fix ambiguity during type deduction in normalise on Windows. 2018-12-14 09:38:04 +07:00
Tim Eves
5e01266bb7 Revert "Fix ambiguity during type deduction in normalise on Windows."
This reverts commit f3bf0d1c6a.
Checked in to the wrong branch.
2018-12-14 09:36:02 +07:00
Tim Eves
f3bf0d1c6a Fix ambiguity during type deduction in normalise on Windows. 2018-12-14 02:03:18 +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
7c304f678c Turn all kbp::path types into km::kbp::path to keep MSVC happy. 2018-12-14 01:22:04 +07:00
Tim Eves
c7e641b93b Remove last vestiges of std::filesystem use to enable MacOS X build 2018-12-14 01:07:52 +07:00
Tim Eves
4694a7a70b #include <alogrithm> for std::min on Windows
Add json << operator for path objects
2018-12-14 01:02:34 +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
45b89ff5d2 put RALT back into test 000 2018-12-13 12:04:03 +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
Tim Eves
a0b743a869
Merge pull request #1381 from keymanapp/common-kpapi-kmx-test-harness2
[common] Fix kmx test harness and kmx generation in source dir
2018-12-06 22:41:54 +07:00
Daniel Glassey
feb02af907
[linux] debian packaging of libkmnkbp-dev missing pkgconfig file (#1392)
* missing pkgconfig in libkmnkbp-dev package
2018-12-06 10:31:11 +07:00
Marc Durdin
789f166d79 Merge branch 'master' into common-kpapi-kmx-test-harness2 2018-12-06 06:25:44 +11:00
Tim Eves
d985e7b7b7
Add explanatory comments to disabling kmcomp 2018-12-05 17:36:30 +07:00
Marc Durdin
8d0f85b7dd
Merge pull request #1384 from keymanapp/common-msvc-update-to-1916
[Common] Update VS version checks to 19.16 for latest release of VS2017 (bug in VS workaround)
2018-12-05 15:16:40 +11:00
Daniel Glassey
f1f5f85d85
[linux] keyboardprocessor shouldn't be reconfd on jenkins (#1383)
* keyboardprocessor shouldn't be reconfd on jenkins

update launchpad script for disco and new packages

* removed deprecated actions

* add new About Keyman to package descriptions
2018-12-05 10:46:55 +07:00
Marc Durdin
48f6c9d411 [Common] Tweak comment - to trigger agents 2018-12-05 14:22:50 +11:00
Marc Durdin
5a4d50ab8a [Common] Update VS version checks to 19.16 for latest release of VS2017 (bug in VS workaround) 2018-12-05 14:09:44 +11:00
Tim Eves
f7f1da8267 Fix disabler() being unavailable in meson < 0.45
Also handle moved kmn source directory
2018-12-04 17:52:53 +07: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
Marc Durdin
356da843e6
Merge pull request #1348 from keymanapp/common-kpapi-linux-warnings
[common] Eliminate warnings on Linux build
2018-12-03 13:02:19 +11:00
Joshua A. Horton
ea8b1de557 Minor npm update, adds promise polyfill for IE. 2018-12-03 08:58:11 +07:00
Marc Durdin
5d16d508ff [common] Tweak casts and variable types (review comments) 2018-12-03 09:16:14 +11:00
Eddie Antonio Santos
c751646b93
Rename _resolveInitialized to _declareLMLayerReady(). 2018-11-30 13:57:54 -07:00
Eddie Antonio Santos
f1382fe58c
Remove undeveloped "model" interface. 2018-11-30 13:44:58 -07:00
Eddie Antonio Santos
36e18e4019
Refactor: extract interfaces common to worker and top-level. 2018-11-30 13:43:29 -07:00
Eddie Antonio Santos
140efa7dc7
Require the capabilities object in the initialize message. 2018-11-30 13:35:40 -07:00
Eddie Antonio Santos
fe78283b92
Test integration of initialize() in LMLayer and Worker. 2018-11-30 13:07:50 -07:00
Eddie Antonio Santos
75f0fd41dc
Test that the configuration comes back. 2018-11-30 12:59:15 -07:00
Eddie Antonio Santos
31368751e9
Add callAsynchronous() helper for tests. 2018-11-30 12:49:52 -07:00
Eddie Antonio Santos
d6f9398ad2
Implement initialize callback/response. 2018-11-30 12:35:41 -07:00
Eddie Antonio Santos
ca510acd61
Revise tests to take fake postMessage() 2018-11-30 12:35:22 -07:00
Eddie Antonio Santos
d262c37025
Test sending the initialize message. 2018-11-30 12:10:37 -07:00
Eddie Antonio Santos
6ae59882bc
Refactor: extract createFakeWorker() in LMLayer tests. 2018-11-30 10:55:57 -07:00
Eddie Antonio Santos
ac4167d0be
Define initialize's interface. 2018-11-30 10:48:22 -07:00
Eddie Antonio Santos
c13ebe29ce
Test basic usage of LMLayer#initialize() 2018-11-30 09:31:03 -07:00
Daniel Glassey
11639e0236
Merge pull request #1337 from keymanapp/linux-ibus-keyman
[Linux] ibus keyman initial work pre kmx keyboardprocessor
2018-11-30 16:26:56 +07:00
Daniel Glassey
f2c983b81b
Merge pull request #1356 from keymanapp/common-kpapi-utf8context
[common] add km_kbp_context_items_from_utf8 and to_utf8
2018-11-30 15:05:21 +07: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
4667c5bf84 Add all the missing files that should have been in the preceding commit
Co-Authored-By: Daniel Glassey <glasseyes@users.noreply.github.com>
2018-11-30 14:46:54 +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