X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgicon.h;h=8f339f69438f0b958e4e661381077b799a983c8d;hb=4f0b18d2031c2c9882c2d5a84435b3613f372c4c;hp=f75dfbfc0ffadfade3db573f18c78aee0b10102d;hpb=cef6abff8e58b597d6ba751999d5ce9989e71b78;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gicon.h b/gio/gicon.h index f75dfbf..8f339f6 100644 --- a/gio/gicon.h +++ b/gio/gicon.h @@ -48,6 +48,12 @@ typedef struct _GIconIface GIconIface; * @g_iface: The parent interface. * @hash: A hash for a given #GIcon. * @equal: Checks if two #GIcons are equal. + * @to_tokens: Serializes a #GIcon into tokens. The tokens must not + * contain any whitespace. Don't implement if the #GIcon can't be + * serialized (Since 2.20). + * @from_tokens: Constructs a #GIcon from tokens. Set the #GError if + * the tokens are malformed. Don't implement if the #GIcon can't be + * serialized (Since 2.20). * * GIconIface is used to implement GIcon types for various * different systems. See #GThemedIcon and #GLoadableIcon for @@ -59,16 +65,26 @@ struct _GIconIface /* Virtual Table */ - guint (* hash) (GIcon *icon); - gboolean (* equal) (GIcon *icon1, - GIcon *icon2); + guint (* hash) (GIcon *icon); + gboolean (* equal) (GIcon *icon1, + GIcon *icon2); + gboolean (* to_tokens) (GIcon *icon, + GPtrArray *tokens, + gint *out_version); + GIcon * (* from_tokens) (gchar **tokens, + gint num_tokens, + gint version, + GError **error); }; -GType g_icon_get_type (void) G_GNUC_CONST; +GType g_icon_get_type (void) G_GNUC_CONST; -guint g_icon_hash (gconstpointer icon); -gboolean g_icon_equal (GIcon *icon1, - GIcon *icon2); +guint g_icon_hash (gconstpointer icon); +gboolean g_icon_equal (GIcon *icon1, + GIcon *icon2); +gchar *g_icon_to_string (GIcon *icon); +GIcon *g_icon_new_for_string (const gchar *str, + GError **error); G_END_DECLS