g_array_append_val (table->labels, text);
}
+void
+ibus_lookup_table_set_label (IBusLookupTable *table,
+ guint index,
+ IBusText *text)
+{
+ g_assert (IBUS_IS_LOOKUP_TABLE (table));
+ g_assert (IBUS_IS_TEXT (text));
+
+ IBusText *old = ibus_lookup_table_get_label (table, index);
+ if (old != NULL) {
+ g_object_unref (old);
+ }
+
+ g_object_ref_sink (text);
+ g_array_index (table->labels, IBusText *, index) = text;
+}
+
IBusText *
ibus_lookup_table_get_label (IBusLookupTable *table,
guint index)
(IBusLookupTable *table,
IBusText *text);
+/**
+ * ibus_lookup_table_set_label:
+ * @table: An IBusLookupTable.
+ * @index: Intex in the Lookup table.
+ * @text: A candidate label to be appended (in IBusText format).
+ *
+ * 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);
+
/**
* ibus_lookup_table_get_label:
* @table: An IBusLookupTable.