![]() |
![]() |
![]() |
iBus Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
IBusLookupTable; IBusLookupTable * ibus_lookup_table_new (guint page_size, guint cursor_pos, gboolean cursor_visible, gboolean round); void ibus_lookup_table_append_candidate (IBusLookupTable *table, IBusText *text); IBusText * ibus_lookup_table_get_candidate (IBusLookupTable *table, guint index); void ibus_lookup_table_set_cursor_pos (IBusLookupTable *table, guint cursor_pos); guint ibus_lookup_table_get_cursor_pos (IBusLookupTable *table); void ibus_lookup_table_set_cursor_visible (IBusLookupTable *table, gboolean visible); gboolean ibus_lookup_table_is_cursor_visible (IBusLookupTable *table); guint ibus_lookup_table_get_cursor_in_page (IBusLookupTable *table); void ibus_lookup_table_set_page_size (IBusLookupTable *table, guint page_size); guint ibus_lookup_table_get_page_size (IBusLookupTable *table); void ibus_lookup_table_clear (IBusLookupTable *table); gboolean ibus_lookup_table_page_up (IBusLookupTable *table); gboolean ibus_lookup_table_page_down (IBusLookupTable *table); gboolean ibus_lookup_table_cursor_up (IBusLookupTable *table); gboolean ibus_lookup_table_cursor_down (IBusLookupTable *table);
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.
typedef struct { guint page_size; guint cursor_pos; gboolean cursor_visible; gboolean round; GArray *candidates; } IBusLookupTable;
An IBusLookuptable stores the candidate words or phrases for users to choose from.
IBusLookupTable * ibus_lookup_table_new (guint page_size, guint cursor_pos, gboolean cursor_visible, gboolean round);
New a IBusLookupTable.
|
number of candidate shown per page. |
|
position index of cursor. |
|
whether the cursor is visible. |
|
TRUE for lookup table wrap around. |
Returns : |
A newly allocated IBusLookupTable. |
void ibus_lookup_table_append_candidate (IBusLookupTable *table, IBusText *text);
Append a candidate word/phrase to IBusLookupTable.
|
An IBusLookupTable. |
|
candidate word/phrase to be appended (in IBusText format). |
IBusText * ibus_lookup_table_get_candidate (IBusLookupTable *table, guint index);
Return IBusText at the given index.
|
An IBusLookupTable. |
|
Index in the Lookup table. |
Returns : |
IBusText at the given index; NULL if no such IBusText. |
void ibus_lookup_table_set_cursor_pos (IBusLookupTable *table, guint cursor_pos);
Set the cursor position of IBusLookupTable.
|
An IBusLookupTable. |
|
The position of cursor. |
guint ibus_lookup_table_get_cursor_pos (IBusLookupTable *table);
Get the cursor position of IBusLookupTable.
|
An IBusLookupTable. |
Returns : |
The position of cursor. |
void ibus_lookup_table_set_cursor_visible (IBusLookupTable *table, gboolean visible);
Set whether to make the cursor of an IBusLookupTable visible or not.
|
An IBusLookupTable. |
|
Whether to make the cursor of table visible.
|
gboolean ibus_lookup_table_is_cursor_visible (IBusLookupTable *table);
Returns whether the cursor of an IBusLookupTable is visible.
|
An IBusLookupTable. |
Returns : |
Whether the cursor of table is visible.
|
guint ibus_lookup_table_get_cursor_in_page (IBusLookupTable *table);
Get the cursor position in current page of IBusLookupTable.
|
An IBusLookupTable. |
Returns : |
The position of cursor in current page. |
void ibus_lookup_table_set_page_size (IBusLookupTable *table, guint page_size);
Set the number of candidate shown per page.
|
An IBusLookupTable. |
|
number of candidate shown per page. |
guint ibus_lookup_table_get_page_size (IBusLookupTable *table);
Get the number of candidate shown per page.
|
An IBusLookupTable. |
Returns : |
Page size, i.e., number of candidate shown per page. |
void ibus_lookup_table_clear (IBusLookupTable *table);
Clear and remove all candidate from an IBusLookupTable.
|
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.
|
An IBusLookupTable. |
Returns : |
TRUE if succeed. |
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.
|
An IBusLookupTable. |
Returns : |
TRUE if succeed. |
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.
|
An IBusLookupTable. |
Returns : |
TRUE if succeed. |
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.
|
An IBusLookupTable. |
Returns : |
TRUE if succeed. |