IBus Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct IBusLookupTable; struct IBusLookupTableClass; 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
); guint ibus_lookup_table_get_number_of_candidates (IBusLookupTable *table
); IBusText * ibus_lookup_table_get_candidate (IBusLookupTable *table
,guint index
); void ibus_lookup_table_append_label (IBusLookupTable *table
,IBusText *text
); void ibus_lookup_table_set_label (IBusLookupTable *table
,guint index
,IBusText *text
); IBusText * ibus_lookup_table_get_label (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_set_round (IBusLookupTable *table
,gboolean round
); gboolean ibus_lookup_table_is_round (IBusLookupTable *table
); void ibus_lookup_table_set_orientation (IBusLookupTable *table
,gint orientation
); gint ibus_lookup_table_get_orientation (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
);
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.
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()
.
number of candidate shown per page. | |
position index of cursor. | |
whether the cursor is visible. | |
TRUE for lookup table wrap around. | |
orientation of the table. | |
Candidate words/phrases. | |
Candidate labels which identify individual candidates in the same page. Default is 1, 2, 3, 4 ... |
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, the max value is 16. |
|
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, and increase reference.
|
An IBusLookupTable. |
|
candidate word/phrase to be appended (in IBusText format). |
guint ibus_lookup_table_get_number_of_candidates
(IBusLookupTable *table
);
Return the number of candidate in the table.
|
An IBusLookupTable. |
Returns : |
The number of candidates in the table |
IBusText * ibus_lookup_table_get_candidate (IBusLookupTable *table
,guint index
);
Return IBusText at the given index. Borrowed reference.
|
An IBusLookupTable. |
|
Index in the Lookup table. |
Returns : |
IBusText at the given index; NULL if no such IBusText. [transfer none] |
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;".
|
An IBusLookupTable. |
|
A candidate label to be appended (in IBusText format). |
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;".
|
An IBusLookupTable. |
|
Intex in the Lookup table. |
|
A candidate label to be appended (in IBusText format). |
IBusText * ibus_lookup_table_get_label (IBusLookupTable *table
,guint index
);
Return IBusText at the given index. Borrowed reference.
|
An IBusLookupTable. |
|
Index in the Lookup table. |
Returns : |
IBusText at the given index; NULL if no such IBusText. [transfer none] |
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_set_round (IBusLookupTable *table
,gboolean round
);
Set whether to make the IBusLookupTable round or not.
|
An IBusLookupTable. |
|
Whether to make table round. |
gboolean ibus_lookup_table_is_round (IBusLookupTable *table
);
Returns whether the IBusLookupTable is round.
|
An IBusLookupTable. |
Returns : |
Whether the table is round. |
void ibus_lookup_table_set_orientation (IBusLookupTable *table
,gint orientation
);
Set the orientation.
|
An IBusLookupTable. |
|
. |
gint ibus_lookup_table_get_orientation (IBusLookupTable *table
);
Returns the orientation of the IBusLookupTable.
|
An IBusLookupTable. |
Returns : |
The orientation of the table . |
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. |