summaryrefslogtreecommitdiff
path: root/gtk/gtkimage.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2008-05-29 14:33:49 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-05-29 14:33:49 +0000
commitee8253f908d2541321d72a0151fcfeb7446f7b8f (patch)
treeaba76516a9370271ff86850367542c38b61a7d7b /gtk/gtkimage.h
parent24ac36693bebbd22416f91fc78c6fe189f953d94 (diff)
downloadgtk+-ee8253f908d2541321d72a0151fcfeb7446f7b8f.tar.gz
Bug 522084 – GIcon support for GtkIconTheme & GtkImage
2008-05-27 Matthias Clasen <mclasen@redhat.com> Bug 522084 – GIcon support for GtkIconTheme & GtkImage * gtk/gtkicontheme.[hc]: Add support for GIcon based lookups. * gtk/gtkimage.[hc]: Allow setting an image from a GIcon. * gtk/gtk.symbols: Additions * tests/testimage.c: Add a GIcon test svn path=/trunk/; revision=20236
Diffstat (limited to 'gtk/gtkimage.h')
-rw-r--r--gtk/gtkimage.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/gtk/gtkimage.h b/gtk/gtkimage.h
index 2fb0f61bd3..c4dacfeefa 100644
--- a/gtk/gtkimage.h
+++ b/gtk/gtkimage.h
@@ -33,6 +33,7 @@
#include <gdk/gdk.h>
+#include <gio/gio.h>
#include <gtk/gtkmisc.h>
@@ -56,6 +57,7 @@ typedef struct _GtkImageStockData GtkImageStockData;
typedef struct _GtkImageIconSetData GtkImageIconSetData;
typedef struct _GtkImageAnimationData GtkImageAnimationData;
typedef struct _GtkImageIconNameData GtkImageIconNameData;
+typedef struct _GtkImageGIconData GtkImageGIconData;
struct _GtkImagePixmapData
{
@@ -96,6 +98,13 @@ struct _GtkImageIconNameData
guint theme_change_id;
};
+struct _GtkImageGIconData
+{
+ GIcon *icon;
+ GdkPixbuf *pixbuf;
+ guint theme_change_id;
+};
+
typedef enum
{
GTK_IMAGE_EMPTY,
@@ -105,7 +114,8 @@ typedef enum
GTK_IMAGE_STOCK,
GTK_IMAGE_ICON_SET,
GTK_IMAGE_ANIMATION,
- GTK_IMAGE_ICON_NAME
+ GTK_IMAGE_ICON_NAME,
+ GTK_IMAGE_GICON
} GtkImageType;
struct _GtkImage
@@ -123,6 +133,7 @@ struct _GtkImage
GtkImageIconSetData icon_set;
GtkImageAnimationData anim;
GtkImageIconNameData name;
+ GtkImageGIconData gicon;
} data;
/* Only used with GTK_IMAGE_PIXMAP, GTK_IMAGE_IMAGE */
@@ -165,6 +176,8 @@ GtkWidget* gtk_image_new_from_icon_set (GtkIconSet *icon_set,
GtkWidget* gtk_image_new_from_animation (GdkPixbufAnimation *animation);
GtkWidget* gtk_image_new_from_icon_name (const gchar *icon_name,
GtkIconSize size);
+GtkWidget* gtk_image_new_from_gicon (GIcon *icon,
+ GtkIconSize size);
void gtk_image_clear (GtkImage *image);
void gtk_image_set_from_pixmap (GtkImage *image,
@@ -188,6 +201,9 @@ void gtk_image_set_from_animation (GtkImage *image,
void gtk_image_set_from_icon_name (GtkImage *image,
const gchar *icon_name,
GtkIconSize size);
+void gtk_image_set_from_gicon (GtkImage *image,
+ GIcon *icon,
+ GtkIconSize size);
void gtk_image_set_pixel_size (GtkImage *image,
gint pixel_size);
@@ -210,6 +226,9 @@ GdkPixbufAnimation* gtk_image_get_animation (GtkImage *image);
void gtk_image_get_icon_name (GtkImage *image,
G_CONST_RETURN gchar **icon_name,
GtkIconSize *size);
+void gtk_image_get_gicon (GtkImage *image,
+ GIcon **gicon,
+ GtkIconSize *size);
gint gtk_image_get_pixel_size (GtkImage *image);
#ifndef GTK_DISABLE_DEPRECATED