spiegel-keyman/common/engine/keyboardprocessor/src/km_kbp_processevent_api.cpp
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

27 lines
793 B
C++

/*
Copyright: © 2018 SIL International.
Description: This is a wrapper for the process_event API.
TODO: Add a mecahnism to trigger output of PERSIST_OPT &
RESET_OPT actions items, options support and context matching.
Create Date: 17 Oct 2018
Authors: Tim Eves (TSE)
History: 17 Oct 2018 - TSE - Initial implementation.
*/
#include <keyman/keyboardprocessor.h>
#include "processor.hpp"
#include "state.hpp"
km_kbp_status
km_kbp_process_event(km_kbp_state *state,
km_kbp_virtual_key vk, uint16_t modifier_state)
{
return state->processor().process_event(state, vk, modifier_state);
}
km_kbp_attr const *
km_kbp_get_engine_attrs(km_kbp_state const *state)
{
return &state->processor().attributes();
}