Data Fields | |
| MInputMethod * | im |
| MText * | produced |
| void * | arg |
| int | active |
| struct { | |
| int x | |
| int y | |
| int ascent | |
| int descent | |
| int fontsize | |
| MText * mt | |
| int pos | |
| } | spot |
| void * | info |
| MText * | status |
| int | status_changed |
| MText * | preedit |
| int | preedit_changed |
| int | cursor_pos |
| int | cursor_pos_changed |
| MPlist * | candidate_list |
| int | candidate_index |
| int | candidate_from |
| int | candidate_to |
| int | candidate_show |
| int | candidates_changed |
| MPlist * | plist |
The type MInputContext is the structure of input context objects.
Backward pointer to the input method. It is set up be the function minput_create_ic().
M-text produced by the input method. It is set up by the function minput_lookup() .
| void* MInputContext::arg |
Argument given to the function minput_create_im().
Flag telling whether the input context is currently active or inactive. The value is set to 1 (active) when the input context is created. It is toggled by the function minput_toggle().
| int MInputContext::x |
X and Y coordinate of the spot.
Ascent and descent pixels of the line of the spot.
Font size for preedit text in 1/10 point.
M-text at the spot, or NULL.
Character position in <mt> at the spot.
| void* MInputContext::info |
The usage of the following members depends on the input method driver. The descriptions below are for the driver of an internal input method. They are set by the function <im>->driver.filter(). Pointer to extra information that <im>->driver.create_ic() setups. It is used to record the internal state of the input context.
M-text describing the current status of the input context.
The function <im>->driver.filter() sets the value to 1 when it changes <status>.
M-text containing the current preedit text. The function <im>->driver.filter() sets the value.
The function <im>->driver.filter() sets the value to 1 when it changes <preedit>.
Cursor position of <preedit>.
The function <im>->driver.filter() sets the value to 1 when it changes <cursor_pos>.
Plist of the current candidate groups. Each element is an M-text or a plist. If an element is an M-text (i.e. the key is Mtext), candidates in that group are characters in the M-text. If it is a plist (i.e. the key is Mplist), each element is an M-text, and candidates in that group are those M-texts.
Index number of the currently selected candidate in all the candidates. The index of the first candidate is 0. If the number is 8, and the first candidate group contains 7 candidates, the currently selected candidate is the second element of the second candidate group.
Start and the end positions of the preedit text where <candidate_list> corresponds to.
Flag telling whether the current candidate group must be shown or not. The function <im>->driver.filter() sets the value to 1 when an input method required to show candidates, and sets the value to 0 otherwise.
The function <im>->driver.filter() sets the value to bitwise OR of enum MInputCandidatesChanged when it changed any of the above members (<candidate_XXX>), and sets the value to 0 otherwise.
Plist that can be freely used by <im>->driver functions. The driver of internal input method uses it to exchange extra arguments and result for callback functions. The function <im>->driver.create_ic() sets this to an empty plist, and the function <im>->driver.destroy_ic() frees it by using m17n_object_unref().