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]

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]

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]

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]

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]

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.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.