diff options
author | Chris Lord <chris@linux.intel.com> | 2009-07-16 17:26:04 +0100 |
---|---|---|
committer | Chris Lord <chris@linux.intel.com> | 2009-07-16 17:26:04 +0100 |
commit | 2560f55a6766b54d90a299835053e5a277a518f3 (patch) | |
tree | 2f9f6917cae479998b0b6820c5dfef0f85591164 /clutter-gtk/gtk-clutter-util.h | |
parent | 39aee7284af2836542d7e8ec081158af9b7e5ac9 (diff) | |
download | clutter-gtk-2560f55a6766b54d90a299835053e5a277a518f3.tar.gz |
[util] Add error arguments to texture functions
Add boolean returns and GError arguments to gtk_clutter_texture_set_*
This lets you discover if the call was successful more easily. Also
remove the fallback situation of setting missing-icon, this can now be
handled by the application.
Reviewed by Emmanuele Bassi <ebassi@linux.intel.com>
Diffstat (limited to 'clutter-gtk/gtk-clutter-util.h')
-rw-r--r-- | clutter-gtk/gtk-clutter-util.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/clutter-gtk/gtk-clutter-util.h b/clutter-gtk/gtk-clutter-util.h index c228a01..013da99 100644 --- a/clutter-gtk/gtk-clutter-util.h +++ b/clutter-gtk/gtk-clutter-util.h @@ -47,6 +47,22 @@ typedef enum { CLUTTER_INIT_ERROR_GTK = (CLUTTER_INIT_ERROR_LAST - 1) } ClutterGtkInitError; +/** + * ClutterGtkTextureError: + * @CLUTTER_INVALID_TYPE: Invalid type given as parameter + * + * An enumeration of error types used in ClutterGtk texture functions + * + * Since: 1.0 + * */ +typedef enum { + CLUTTER_GTK_TEXTURE_INVALID_STOCK_ID, + + CLUTTER_GTK_TEXTURE_ERROR_LAST +} ClutterGtkTextureError; + +#define CLUTTER_GTK_TEXTURE_ERROR gtk_clutter_texture_error_quark () + ClutterInitError gtk_clutter_init (int *argc, char ***argv); ClutterInitError gtk_clutter_init_with_args (int *argc, @@ -88,16 +104,20 @@ ClutterActor *gtk_clutter_texture_new_from_stock (GtkWidget *widget, ClutterActor *gtk_clutter_texture_new_from_icon_name (GtkWidget *widget, const gchar *icon_name, GtkIconSize size); -void gtk_clutter_texture_set_from_pixbuf (ClutterTexture *texture, - GdkPixbuf *pixbuf); -void gtk_clutter_texture_set_from_stock (ClutterTexture *texture, +GQuark gtk_clutter_texture_error_quark (void); +gboolean gtk_clutter_texture_set_from_pixbuf (ClutterTexture *texture, + GdkPixbuf *pixbuf, + GError **error); +gboolean gtk_clutter_texture_set_from_stock (ClutterTexture *texture, GtkWidget *widget, const gchar *stock_id, - GtkIconSize size); -void gtk_clutter_texture_set_from_icon_name (ClutterTexture *texture, + GtkIconSize size, + GError **error); +gboolean gtk_clutter_texture_set_from_icon_name (ClutterTexture *texture, GtkWidget *widget, const gchar *icon_name, - GtkIconSize size); + GtkIconSize size, + GError **error); G_END_DECLS |