The m17n Library 1.8.4
Loading...
Searching...
No Matches
Data Fields
MInputContext Struct Reference

Structure of input context. More...

#include <m17n.h>

Data Fields

MInputMethodim
 
MTextproduced
 
void * arg
 
int active
 
struct {
   int   x
 
   int   y
 
   int   ascent
 
   int   descent
 
   int   fontsize
 
   MText *   mt
 
   int   pos
 
spot
 
void * info
 
MTextstatus
 
int status_changed
 
MTextpreedit
 
int preedit_changed
 
int cursor_pos
 
int cursor_pos_changed
 
MPlistcandidate_list
 
int candidate_index
 
int candidate_from
 
int candidate_to
 
int candidate_show
 
int candidates_changed
 
MPlistplist
 

Detailed Description

Structure of input context.

See struct MInputContext

The type MInputContext is the structure of input context objects.

Field Documentation

◆ im

MInputMethod* MInputContext::im

Backward pointer to the input method. It is set up by the function minput_create_ic().

◆ produced

MText* MInputContext::produced

M-text produced by the input method. It is set up by the function minput_filter() .

◆ arg

void* MInputContext::arg

Argument given to the function minput_create_ic().

◆ active

int MInputContext::active

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().

◆ x

int MInputContext::x

X and Y coordinate of the spot.

◆ y

int MInputContext::y

◆ ascent

int MInputContext::ascent

Ascent and descent pixels of the line of the spot.

◆ descent

int MInputContext::descent

◆ fontsize

int MInputContext::fontsize

Font size for preedit text in 1/10 point.

◆ mt

MText* MInputContext::mt

M-text at the spot, or NULL.

◆ pos

int MInputContext::pos

Character position in <mt> at the spot.

◆ 

struct { ... } MInputContext::spot

Spot location and size of the input context.

◆ info

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.

◆ status

MText* MInputContext::status

M-text describing the current status of the input context.

◆ status_changed

int MInputContext::status_changed

The function <im>->driver.filter() sets the value to 1 when it changes <status>.

◆ preedit

MText* MInputContext::preedit

M-text containing the current preedit text. The function <im>->driver.filter() sets the value.

◆ preedit_changed

int MInputContext::preedit_changed

The function <im>->driver.filter() sets the value to 1 when it changes <preedit>.

◆ cursor_pos

int MInputContext::cursor_pos

Cursor position of <preedit>.

◆ cursor_pos_changed

int MInputContext::cursor_pos_changed

The function <im>->driver.filter() sets the value to 1 when it changes <cursor_pos>.

◆ candidate_list

MPlist* MInputContext::candidate_list

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.

◆ candidate_index

int MInputContext::candidate_index

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.

◆ candidate_from

int MInputContext::candidate_from

Start and the end positions of the preedit text where <candidate_list> corresponds to.

◆ candidate_to

int MInputContext::candidate_to

◆ candidate_show

int MInputContext::candidate_show

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.

◆ candidates_changed

int MInputContext::candidates_changed

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

MPlist* MInputContext::plist

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().


m17n-lib Home