File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44#include < string>
55#include < memory>
66
7- #include " modian/common/core/protocol/v1/input/instruction.h"
87#include " modian/common/core/ipc/isync_ipc_client.h"
98
109namespace modian ::brush::infra::tsf {
11- constexpr auto parse_content = [](const auto & p){ return p.payload ; };
12- constexpr auto parse_commit_flag = [](const auto & p){ return p.type == common::core::protocol::input::v1::message_type::COMMIT ; };
13-
1410 class tsf_key_event_service final : public ITfKeyEventSink, public ITfCompositionSink {
1511 public:
1612 explicit tsf_key_event_service (IUnknown* owner);
Original file line number Diff line number Diff line change 11#include " modian/tsf/tsf_key_event_service.h"
22
3- #include < cwctype>
43#include < windows.h>
54
65#include " modian/tsf/tsf_edit_session.h"
@@ -47,8 +46,9 @@ namespace modian::brush::infra::tsf {
4746 const auto key_event = common::core::protocol::input::v1::key_event::from_os_key (w_param);
4847 const std::string req_data = common::service::input_protocol_service::build_key_event_request (key_event);
4948 const std::string response = input_protocol_ipc_client_->sync_send (req_data);
50- const auto [content, is_commit] = common::service::input_protocol_service::parse_instruction_response (response)
51- .unpack (parse_content, parse_commit_flag);
49+ const auto instruction = common::service::input_protocol_service::parse_instruction_response (response);
50+ const auto content = instruction.payload ;
51+ const auto is_commit = instruction.type == common::core::protocol::input::v1::message_type::COMMIT ;
5252
5353 if (pic != nullptr && client_id_ != TF_CLIENTID_NULL ) {
5454 if (!content.empty () || current_composition_) {
You can’t perform that action at this time.
0 commit comments