summaryrefslogtreecommitdiff
path: root/gtk/gtkiconfactory.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-03-19 22:40:35 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-03-19 22:40:35 +0000
commit73e9d113a797c28a08a9a9a4ebefaaefb29e098d (patch)
tree0a0362a0e16bfa68c6803723055be385790955e3 /gtk/gtkiconfactory.h
parent489c376bf4b98f0e521f6ab4992a1c9ac7529657 (diff)
downloadgtk+-73e9d113a797c28a08a9a9a4ebefaaefb29e098d.tar.gz
Make GtkIconSource an opaque datatype, and add a bunch of accessor
2001-03-19 Havoc Pennington <hp@redhat.com> * gtk/gtkiconfactory.c: Make GtkIconSource an opaque datatype, and add a bunch of accessor functions. This is because we have reasonable expectations of extending what fields it contains in the future. * gtk/gtkstyle.c (gtk_default_render_icon): adapt to icon source changes * gtk/gtkrc.c (gtk_rc_parse_icon_source): fix to use new GtkIconSource
Diffstat (limited to 'gtk/gtkiconfactory.h')
-rw-r--r--gtk/gtkiconfactory.h61
1 files changed, 34 insertions, 27 deletions
diff --git a/gtk/gtkiconfactory.h b/gtk/gtkiconfactory.h
index 89c0f161c8..c4b755af7c 100644
--- a/gtk/gtkiconfactory.h
+++ b/gtk/gtkiconfactory.h
@@ -117,34 +117,41 @@ GdkPixbuf* gtk_icon_set_render_icon (GtkIconSet *icon_set,
void gtk_icon_set_add_source (GtkIconSet *icon_set,
const GtkIconSource *source);
-/* INTERNAL */
-void _gtk_icon_set_invalidate_caches (void);
-
-struct _GtkIconSource
-{
- /* Either filename or pixbuf can be NULL. If both are non-NULL,
- * the pixbuf is assumed to be the already-loaded contents of the
- * file.
- */
- gchar *filename;
- GdkPixbuf *pixbuf;
-
- GtkTextDirection direction;
- GtkStateType state;
- GtkIconSize size;
-
- /* If TRUE, then the parameter is wildcarded, and the above
- * fields should be ignored. If FALSE, the parameter is
- * specified, and the above fields should be valid.
- */
- guint any_direction : 1;
- guint any_state : 1;
- guint any_size : 1;
-};
-
-GtkIconSource* gtk_icon_source_copy (const GtkIconSource *source);
-void gtk_icon_source_free (GtkIconSource *source);
+GtkIconSource* gtk_icon_source_new (void);
+GtkIconSource* gtk_icon_source_copy (const GtkIconSource *source);
+void gtk_icon_source_free (GtkIconSource *source);
+
+void gtk_icon_source_set_filename (GtkIconSource *source,
+ const gchar *filename);
+void gtk_icon_source_set_pixbuf (GtkIconSource *source,
+ GdkPixbuf *pixbuf);
+
+G_CONST_RETURN gchar* gtk_icon_source_get_filename (const GtkIconSource *source);
+GdkPixbuf* gtk_icon_source_get_pixbuf (const GtkIconSource *source);
+
+void gtk_icon_source_set_direction_wildcarded (GtkIconSource *source,
+ gboolean setting);
+void gtk_icon_source_set_state_wildcarded (GtkIconSource *source,
+ gboolean setting);
+void gtk_icon_source_set_size_wildcarded (GtkIconSource *source,
+ gboolean setting);
+gboolean gtk_icon_source_get_size_wildcarded (const GtkIconSource *source);
+gboolean gtk_icon_source_get_state_wildcarded (const GtkIconSource *source);
+gboolean gtk_icon_source_get_direction_wildcarded (const GtkIconSource *source);
+void gtk_icon_source_set_direction (GtkIconSource *source,
+ GtkTextDirection direction);
+void gtk_icon_source_set_state (GtkIconSource *source,
+ GtkStateType state);
+void gtk_icon_source_set_size (GtkIconSource *source,
+ GtkIconSize size);
+GtkTextDirection gtk_icon_source_get_direction (const GtkIconSource *source);
+GtkStateType gtk_icon_source_get_state (const GtkIconSource *source);
+GtkIconSize gtk_icon_source_get_size (const GtkIconSource *source);
+
+
+/* ignore this */
+void _gtk_icon_set_invalidate_caches (void);
#ifdef __cplusplus
}