#pragma once #include "key_event.h" #include "fuzzy_pinyin_options.h" #include "scheme_type.h" #include #include struct KeyStroke { ImeKeyCode vk = 0; ImeModifierMask modifiers_down = 0; ImeCharacter wch = 0; }; struct QueryRequest { SchemeType scheme = SchemeType::Quanpin; std::string raw_input; std::string raw_input_with_cases; std::string normalized_input; std::string raw_segmentation; std::string normalized_segmentation; std::string segmentation; bool enable_shuangpin_helpcode = false; bool enable_quanpin_helpcode = false; // Autocorrection is type-gated (bit0 transposition, bit1 neighbor in the session-level // mask); both default off, so a fresh install never rewrites the user's spelling. bool enable_quanpin_autocorrect_transposition = false; bool enable_quanpin_autocorrect_neighbor = false; std::vector key_strokes; metasequoia::FuzzyPinyinOptions fuzzy_pinyin; bool valid = false; };