Top |
GObject ╰── GInitiallyUnowned ╰── IBusObject ╰── IBusSerializable ╰── IBusLookupTable
An IBusLookuptable stores the candidate words or phrases for users to choose from.
Use ibus_engine_update_lookup_table()
, ibus_engine_show_lookup_table()
,
and ibus_engine_hide_lookup_table()
to update, show and hide the lookup
table.
see_also: IBusEngine
IBusLookupTable * ibus_lookup_table_new (guint page_size
,guint cursor_pos
,gboolean cursor_visible
,gboolean round
);
Craetes a new IBusLookupTable.
void ibus_lookup_table_append_candidate (IBusLookupTable *table
,IBusText *text
);
Append a candidate word/phrase to IBusLookupTable, and increase reference.
guint
ibus_lookup_table_get_number_of_candidates
(IBusLookupTable *table
);
Return the number of candidate in the table.
IBusText * ibus_lookup_table_get_candidate (IBusLookupTable *table
,guint index
);
Return IBusText at the given index. Borrowed reference.
void ibus_lookup_table_append_label (IBusLookupTable *table
,IBusText *text
);
Append a candidate word/phrase to IBusLookupTable, and increase reference. This function is needed if the input method select candidate with non-numeric keys such as "asdfghjkl;".
void ibus_lookup_table_set_label (IBusLookupTable *table
,guint index
,IBusText *text
);
Append a candidate word/phrase to IBusLookupTable, and increase reference. This function is needed if the input method select candidate with non-numeric keys such as "asdfghjkl;".
IBusText * ibus_lookup_table_get_label (IBusLookupTable *table
,guint index
);
Return IBusText at the given index. Borrowed reference.
void ibus_lookup_table_set_cursor_pos (IBusLookupTable *table
,guint cursor_pos
);
Set the cursor position of IBusLookupTable.
guint
ibus_lookup_table_get_cursor_pos (IBusLookupTable *table
);
Gets the cursor position of IBusLookupTable.
void ibus_lookup_table_set_cursor_visible (IBusLookupTable *table
,gboolean visible
);
Set whether to make the cursor of an IBusLookupTable visible or not.
gboolean
ibus_lookup_table_is_cursor_visible (IBusLookupTable *table
);
Returns whether the cursor of an IBusLookupTable is visible.
guint
ibus_lookup_table_get_cursor_in_page (IBusLookupTable *table
);
Gets the cursor position in current page of IBusLookupTable.
void ibus_lookup_table_set_page_size (IBusLookupTable *table
,guint page_size
);
Set the number of candidate shown per page.
guint
ibus_lookup_table_get_page_size (IBusLookupTable *table
);
Gets the number of candidate shown per page.
void ibus_lookup_table_set_round (IBusLookupTable *table
,gboolean round
);
Set whether to make the IBusLookupTable round or not.
gboolean
ibus_lookup_table_is_round (IBusLookupTable *table
);
Returns whether the IBusLookupTable is round.
void ibus_lookup_table_set_orientation (IBusLookupTable *table
,gint orientation
);
Set the orientation.
gint
ibus_lookup_table_get_orientation (IBusLookupTable *table
);
Returns the orientation of the IBusLookupTable.
void
ibus_lookup_table_clear (IBusLookupTable *table
);
Clear and remove all candidate from an IBusLookupTable.
gboolean
ibus_lookup_table_page_up (IBusLookupTable *table
);
Go to previous page of an IBusLookupTable.
It returns FALSE if it is already at the first page,
unless table>-round==TRUE
, where it will go
to the last page.
gboolean
ibus_lookup_table_page_down (IBusLookupTable *table
);
Go to next page of an IBusLookupTable.
It returns FALSE if it is already at the last page,
unless table>-round==TRUE
, where it will go
to the first page.
gboolean
ibus_lookup_table_cursor_up (IBusLookupTable *table
);
Go to previous candidate of an IBusLookupTable.
It returns FALSE if it is already at the first candidate,
unless table>-round==TRUE
, where it will go
to the last candidate.
gboolean
ibus_lookup_table_cursor_down (IBusLookupTable *table
);
Go to next candidate of an IBusLookupTable.
It returns FALSE if it is already at the last candidate,
unless table>-round==TRUE
, where it will go
to the first candidate.
struct IBusLookupTable { guint page_size; guint cursor_pos; gboolean cursor_visible; gboolean round; gint orientation; GArray *candidates; GArray *labels; };
An IBusLookuptable stores the candidate words or phrases for users to choose from.
Note that some input methods allow you to select candidate by pressing non-numeric
keys such as "asdfghjkl;".
Developers of these input methods should change the labels with
ibus_lookup_table_append_label()
.
guint |
number of candidate shown per page. |
|
guint |
position index of cursor. |
|
gboolean |
whether the cursor is visible. |
|
gboolean |
TRUE for lookup table wrap around. |
|
gint |
orientation of the table. |
|
GArray * |
Candidate words/phrases. |
|
GArray * |
Candidate labels which identify individual candidates in the same page. Default is 1, 2, 3, 4 ... |