Lines Matching +refs:unicode +refs:data
72 static void ibus_unicode_data_set_property (IBusUnicodeData *unicode,
76 static void ibus_unicode_data_get_property (IBusUnicodeData *unicode,
80 static void ibus_unicode_data_destroy (IBusUnicodeData *unicode);
81 static gboolean ibus_unicode_data_serialize (IBusUnicodeData *unicode,
83 static gint ibus_unicode_data_deserialize (IBusUnicodeData *unicode,
187 ibus_unicode_data_init (IBusUnicodeData *unicode) in ibus_unicode_data_init() argument
189 unicode->priv = IBUS_UNICODE_DATA_GET_PRIVATE (unicode); in ibus_unicode_data_init()
193 ibus_unicode_data_destroy (IBusUnicodeData *unicode) in ibus_unicode_data_destroy() argument
195 g_clear_pointer (&unicode->priv->name, g_free); in ibus_unicode_data_destroy()
196 g_clear_pointer (&unicode->priv->alias, g_free); in ibus_unicode_data_destroy()
197 g_clear_pointer (&unicode->priv->block_name, g_free); in ibus_unicode_data_destroy()
200 destroy (IBUS_OBJECT (unicode)); in ibus_unicode_data_destroy()
204 ibus_unicode_data_set_property (IBusUnicodeData *unicode, in ibus_unicode_data_set_property() argument
211 g_assert (unicode->priv->code == 0); in ibus_unicode_data_set_property()
212 unicode->priv->code = g_value_get_uint (value); in ibus_unicode_data_set_property()
215 g_assert (unicode->priv->name == NULL); in ibus_unicode_data_set_property()
216 unicode->priv->name = g_value_dup_string (value); in ibus_unicode_data_set_property()
219 g_assert (unicode->priv->alias == NULL); in ibus_unicode_data_set_property()
220 unicode->priv->alias = g_value_dup_string (value); in ibus_unicode_data_set_property()
223 g_free (unicode->priv->block_name); in ibus_unicode_data_set_property()
224 unicode->priv->block_name = g_value_dup_string (value); in ibus_unicode_data_set_property()
227 G_OBJECT_WARN_INVALID_PROPERTY_ID (unicode, prop_id, pspec); in ibus_unicode_data_set_property()
232 ibus_unicode_data_get_property (IBusUnicodeData *unicode, in ibus_unicode_data_get_property() argument
239 g_value_set_uint (value, ibus_unicode_data_get_code (unicode)); in ibus_unicode_data_get_property()
242 g_value_set_string (value, ibus_unicode_data_get_name (unicode)); in ibus_unicode_data_get_property()
245 g_value_set_string (value, ibus_unicode_data_get_alias (unicode)); in ibus_unicode_data_get_property()
248 g_value_set_string (value, ibus_unicode_data_get_block_name (unicode)); in ibus_unicode_data_get_property()
251 G_OBJECT_WARN_INVALID_PROPERTY_ID (unicode, prop_id, pspec); in ibus_unicode_data_get_property()
256 ibus_unicode_data_serialize (IBusUnicodeData *unicode, in ibus_unicode_data_serialize() argument
260 serialize ((IBusSerializable *)unicode, builder); in ibus_unicode_data_serialize()
268 g_variant_builder_add (builder, "u", unicode->priv->code); in ibus_unicode_data_serialize()
269 g_variant_builder_add (builder, "s", NOTNULL (unicode->priv->name)); in ibus_unicode_data_serialize()
270 g_variant_builder_add (builder, "s", NOTNULL (unicode->priv->alias)); in ibus_unicode_data_serialize()
279 ibus_unicode_data_deserialize (IBusUnicodeData *unicode, in ibus_unicode_data_deserialize() argument
283 deserialize ((IBusSerializable *)unicode, variant); in ibus_unicode_data_deserialize()
290 g_variant_get_child (variant, retval++, "u", &unicode->priv->code); in ibus_unicode_data_deserialize()
292 &unicode->priv->name); in ibus_unicode_data_deserialize()
294 &unicode->priv->alias); in ibus_unicode_data_deserialize()
322 IBusUnicodeData *unicode; in ibus_unicode_data_new() local
326 unicode = (IBusUnicodeData *) g_object_new_valist (IBUS_TYPE_UNICODE_DATA, in ibus_unicode_data_new()
331 g_assert (unicode->priv->name != NULL); in ibus_unicode_data_new()
332 g_assert (unicode->priv->alias != NULL); in ibus_unicode_data_new()
333 g_assert (unicode->priv->block_name != NULL); in ibus_unicode_data_new()
334 return unicode; in ibus_unicode_data_new()
338 ibus_unicode_data_get_code (IBusUnicodeData *unicode) in ibus_unicode_data_get_code() argument
340 g_return_val_if_fail (IBUS_IS_UNICODE_DATA (unicode), G_MAXUINT32); in ibus_unicode_data_get_code()
342 return unicode->priv->code; in ibus_unicode_data_get_code()
346 ibus_unicode_data_get_name (IBusUnicodeData *unicode) in ibus_unicode_data_get_name() argument
348 g_return_val_if_fail (IBUS_IS_UNICODE_DATA (unicode), ""); in ibus_unicode_data_get_name()
350 return unicode->priv->name; in ibus_unicode_data_get_name()
354 ibus_unicode_data_get_alias (IBusUnicodeData *unicode) in ibus_unicode_data_get_alias() argument
356 g_return_val_if_fail (IBUS_IS_UNICODE_DATA (unicode), ""); in ibus_unicode_data_get_alias()
358 return unicode->priv->alias; in ibus_unicode_data_get_alias()
362 ibus_unicode_data_get_block_name (IBusUnicodeData *unicode) in ibus_unicode_data_get_block_name() argument
364 g_return_val_if_fail (IBUS_IS_UNICODE_DATA (unicode), ""); in ibus_unicode_data_get_block_name()
366 return unicode->priv->block_name; in ibus_unicode_data_get_block_name()
370 ibus_unicode_data_set_block_name (IBusUnicodeData *unicode, in ibus_unicode_data_set_block_name() argument
373 g_return_if_fail (IBUS_IS_UNICODE_DATA (unicode)); in ibus_unicode_data_set_block_name()
375 g_free (unicode->priv->block_name); in ibus_unicode_data_set_block_name()
376 unicode->priv->block_name = g_strdup (block_name); in ibus_unicode_data_set_block_name()
380 variant_foreach_add_unicode (IBusUnicodeData *unicode, in variant_foreach_add_unicode() argument
385 ibus_serializable_serialize (IBUS_SERIALIZABLE (unicode))); in variant_foreach_add_unicode()
424 IBusUnicodeData *data = in ibus_unicode_data_list_deserialize() local
427 list = g_slist_append (list, data); in ibus_unicode_data_list_deserialize()
460 if (list->data == NULL) { in ibus_unicode_data_save()
632 IBusUnicodeDataLoadData *data = (IBusUnicodeDataLoadData*)user_data; in ibus_unicode_data_load_async_done() local
635 g_assert (data != NULL); in ibus_unicode_data_load_async_done()
640 data->callback (NULL, data->user_data); in ibus_unicode_data_load_async_done()
642 data->callback (list, data->user_data); in ibus_unicode_data_load_async_done()
644 g_slice_free (IBusUnicodeDataLoadData, data); in ibus_unicode_data_load_async_done()
656 IBusUnicodeDataLoadData *data; in ibus_unicode_data_load_async() local
660 data = g_slice_new0 (IBusUnicodeDataLoadData); in ibus_unicode_data_load_async()
661 data->callback = callback; in ibus_unicode_data_load_async()
662 data->user_data = user_data; in ibus_unicode_data_load_async()
666 data); in ibus_unicode_data_load_async()
930 IBusUnicodeBlock *data = in ibus_unicode_block_list_deserialize() local
933 list = g_slist_append (list, data); in ibus_unicode_block_list_deserialize()
955 if (list->data == NULL) { in ibus_unicode_block_save()