Struct cskk::CskkContext [−][src]
pub struct CskkContext { /* fields omitted */ }Expand description
Rough design prototype yet
TODO: Rustのstructまわりの一部分mutに変更があったら非mutでstateアクセスしているところを直す
Implementations
impl CskkContext[src]
impl CskkContext[src]pub fn get_preedit(&self) -> Option<String>[src]
pub fn get_preedit(&self) -> Option<String>[src]pollされていない入力を状態に応じて修飾して返す。 preeditという名称はueno/libskkより。 TODO: 常に返るので、Optionである必要がなかった。caller側できちんとOption扱いするか、返り値の型を変えるか。
pub fn get_preedit_underline(&self) -> (isize, isize)[src]
pub fn get_preedit_underline(&self) -> (isize, isize)[src]UTF-8 character range of text to emphasize in preedit.
Currently we don’t have expand/shrink-preedit feature, thus we have no text we want to emphasize.
pub fn process_key_event(&mut self, key_event: &CskkKeyEvent) -> bool[src]
pub fn process_key_event(&mut self, key_event: &CskkKeyEvent) -> bool[src]process that key event and change the internal states. if key_event is not processable by current CSKK state, then return false
pub fn save_dictionary(&mut self)[src]
pub fn reload_dictionary(&mut self)[src]
pub fn set_dictionaries(&mut self, dicts: Vec<Arc<CskkDictionary>>)[src]
pub fn will_process(&self, key_event: &CskkKeyEvent) -> bool[src]
pub fn will_process(&self, key_event: &CskkKeyEvent) -> bool[src]Returns if that key event can be processed by current CSKK Only checking, doesn’t change internal states TODO: maybe not a proper impl for IM? can be replaced with just checking meta of keyevent?
pub fn new(
input_mode: InputMode,
composition_mode: CompositionMode,
dictionaries: Vec<Arc<CskkDictionary>>
) -> Self[src]
input_mode: InputMode,
composition_mode: CompositionMode,
dictionaries: Vec<Arc<CskkDictionary>>
) -> Self
pub fn new_from_shared_files(
input_mode: InputMode,
composition_mode: CompositionMode,
dictionaries: Vec<Arc<CskkDictionary>>,
kana_converter_filepath: &str,
kana_form_changer_filepath: &str
) -> Self[src]
pub fn new_from_shared_files(
input_mode: InputMode,
composition_mode: CompositionMode,
dictionaries: Vec<Arc<CskkDictionary>>,
kana_converter_filepath: &str,
kana_form_changer_filepath: &str
) -> Self[src]For e2e test purpose. Use new() instead.