1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2011 Red Hat, Inc.
4 * Authors: Cosimo Cecchi <cosimoc@gnome.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GTK_ICON_HELPER_H__
23 #define __GTK_ICON_HELPER_H__
25 #include <glib-object.h>
31 #define GTK_TYPE_ICON_HELPER _gtk_icon_helper_get_type()
33 #define GTK_ICON_HELPER(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
35 GTK_TYPE_ICON_HELPER, GtkIconHelper))
37 #define GTK_ICON_HELPER_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_CAST ((klass), \
39 GTK_TYPE_ICON_HELPER, GtkIconHelperClass))
41 #define GTK_IS_ICON_HELPER(obj) \
42 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
43 GTK_TYPE_ICON_HELPER))
45 #define GTK_IS_ICON_HELPER_CLASS(klass) \
46 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
47 GTK_TYPE_ICON_HELPER))
49 #define GTK_ICON_HELPER_GET_CLASS(obj) \
50 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
51 GTK_TYPE_ICON_HELPER, GtkIconHelperClass))
53 typedef struct _GtkIconHelper GtkIconHelper;
54 typedef struct _GtkIconHelperClass GtkIconHelperClass;
55 typedef struct _GtkIconHelperPrivate GtkIconHelperPrivate;
61 GtkIconHelperPrivate *priv;
64 struct _GtkIconHelperClass
66 GObjectClass parent_class;
69 GType _gtk_icon_helper_get_type (void) G_GNUC_CONST;
71 GtkIconHelper *_gtk_icon_helper_new (void);
73 void _gtk_icon_helper_clear (GtkIconHelper *self);
74 void _gtk_icon_helper_invalidate (GtkIconHelper *self);
76 gboolean _gtk_icon_helper_get_is_empty (GtkIconHelper *self);
78 void _gtk_icon_helper_set_gicon (GtkIconHelper *self,
80 GtkIconSize icon_size);
81 void _gtk_icon_helper_set_pixbuf (GtkIconHelper *self,
83 void _gtk_icon_helper_set_animation (GtkIconHelper *self,
84 GdkPixbufAnimation *animation);
85 void _gtk_icon_helper_set_icon_set (GtkIconHelper *self,
87 GtkIconSize icon_size);
89 void _gtk_icon_helper_set_icon_name (GtkIconHelper *self,
90 const gchar *icon_name,
91 GtkIconSize icon_size);
92 void _gtk_icon_helper_set_stock_id (GtkIconHelper *self,
93 const gchar *stock_id,
94 GtkIconSize icon_size);
96 void _gtk_icon_helper_set_icon_size (GtkIconHelper *self,
97 GtkIconSize icon_size);
98 void _gtk_icon_helper_set_pixel_size (GtkIconHelper *self,
100 void _gtk_icon_helper_set_use_fallback (GtkIconHelper *self,
101 gboolean use_fallback);
103 GtkImageType _gtk_icon_helper_get_storage_type (GtkIconHelper *self);
104 GtkIconSize _gtk_icon_helper_get_icon_size (GtkIconHelper *self);
105 gint _gtk_icon_helper_get_pixel_size (GtkIconHelper *self);
106 gboolean _gtk_icon_helper_get_use_fallback (GtkIconHelper *self);
108 GdkPixbuf *_gtk_icon_helper_peek_pixbuf (GtkIconHelper *self);
109 GIcon *_gtk_icon_helper_peek_gicon (GtkIconHelper *self);
110 GtkIconSet *_gtk_icon_helper_peek_icon_set (GtkIconHelper *self);
111 GdkPixbufAnimation *_gtk_icon_helper_peek_animation (GtkIconHelper *self);
113 const gchar *_gtk_icon_helper_get_stock_id (GtkIconHelper *self);
114 const gchar *_gtk_icon_helper_get_icon_name (GtkIconHelper *self);
116 GdkPixbuf *_gtk_icon_helper_ensure_pixbuf (GtkIconHelper *self,
117 GtkStyleContext *context);
118 void _gtk_icon_helper_get_size (GtkIconHelper *self,
119 GtkStyleContext *context,
123 void _gtk_icon_helper_draw (GtkIconHelper *self,
124 GtkStyleContext *context,
131 #endif /* __GTK_ICON_HELPER_H__ */