spiegel-keyman/core/src/km_kbp_processevent_api.cpp
Steven R. Loomis 21a783a6ca feat(core): add event_flags to process_event
- uint16_t
- defined km_kbp_event_flags to define the bitfield
- bitfield has value KM_KBP_EVENT_FLAG_TOUCH for touch events
- ignored everywhere, currently
2022-08-11 16:14:57 -05:00

35 lines
1 KiB
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,
uint8_t is_key_down,
uint16_t event_flags) {
return state->processor().process_event(state, vk, modifier_state, is_key_down, event_flags);
}
km_kbp_status
km_kbp_process_queued_actions(
km_kbp_state *state
) {
return state->processor().process_queued_actions(state);
}
km_kbp_attr const *
km_kbp_get_engine_attrs(km_kbp_state const *state)
{
return &state->processor().attributes();
}