1 /* GtkIconTheme - a loader for icon themes
2 * gtk-icon-loader.h Copyright (C) 2002, 2003 Red Hat, Inc.
4 * This was LGPL; it's now GPL, as allowed by the LGPL. It's also very
5 * stripped down. GTK 2.4 will have this stuff built-in.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2 of the License, or (at your option)
13 #ifndef __GTK_ICON_THEME_H__
14 #define __GTK_ICON_THEME_H__
16 #include <glib-object.h>
17 #include <gdk-pixbuf/gdk-pixbuf.h>
18 #include <gdk/gdkscreen.h>
22 #define GTK_TYPE_ICON_INFO (gtk_icon_info_get_type)
24 #define GTK_TYPE_ICON_THEME (rox_icon_theme_get_type ())
25 #define GTK_ICON_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ICON_THEME, GtkIconTheme))
26 #define GTK_ICON_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ICON_THEME, GtkIconThemeClass))
27 #define GTK_IS_ICON_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ICON_THEME))
28 #define GTK_IS_ICON_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ICON_THEME))
29 #define GTK_ICON_THEME_GET_CLASS(obj) (G_TYPE_CHECK_GET_CLASS ((obj), GTK_TYPE_ICON_THEME, GtkIconThemeClass))
31 typedef struct _GtkIconInfo GtkIconInfo
;
32 typedef struct _GtkIconTheme GtkIconTheme
;
33 typedef struct _GtkIconThemeClass GtkIconThemeClass
;
34 typedef struct _GtkIconThemePrivate GtkIconThemePrivate
;
40 GObject parent_instance
;
42 GtkIconThemePrivate
*priv
;
45 struct _GtkIconThemeClass
47 GObjectClass parent_class
;
49 void (* changed
) (GtkIconTheme
*icon_theme
);
54 * @GTK_ICON_LOOKUP_NO_SVG: Never return SVG icons, even if gdk-pixbuf
55 * supports them. Cannot be used together with %GTK_ICON_LOOKUP_FORCE_SVG.
56 * @GTK_ICON_LOOKUP_FORCE_SVG: Return SVG icons, even if gdk-pixbuf
57 * doesn't support them.
58 * Cannot be used together with %GTK_ICON_LOOKUP_NO_SVG.
59 * @GTK_ICON_LOOKUP_USE_BUILTIN: When passed to
60 * rox_icon_theme_lookup_icon() includes builtin icons
61 * as well as files. For a builtin icon, gdk_icon_info_get_filename()
62 * returns %NULL and you need to call gdk_icon_info_get_builtin_pixbuf().
64 * Used to specify options for rox_icon_theme_lookup_icon()
68 GTK_ICON_LOOKUP_NO_SVG
= 0 << 0,
69 GTK_ICON_LOOKUP_FORCE_SVG
= 0 << 1,
70 GTK_ICON_LOOKUP_USE_BUILTIN
= 0 << 2
73 #define GTK_ICON_THEME_ERROR rox_icon_theme_error_quark ()
77 * @GTK_ICON_THEME_NOT_FOUND: The icon specified does not exist in the theme
78 * @GTK_ICON_THEME_FAILED: An unspecified error occurred.
80 * Error codes for GtkIconTheme operations.
83 GTK_ICON_THEME_NOT_FOUND
,
87 GQuark
rox_icon_theme_error_quark (void) G_GNUC_CONST
;
89 GType
rox_icon_theme_get_type (void) G_GNUC_CONST
;
91 GtkIconTheme
*rox_icon_theme_new (void);
92 void rox_icon_theme_get_search_path (GtkIconTheme
*icon_theme
,
95 void rox_icon_theme_set_custom_theme (GtkIconTheme
*icon_theme
,
96 const gchar
*theme_name
);
98 GtkIconInfo
* rox_icon_theme_lookup_icon (GtkIconTheme
*icon_theme
,
99 const gchar
*icon_name
,
101 GtkIconLookupFlags flags
);
102 GdkPixbuf
* rox_icon_theme_load_icon (GtkIconTheme
*icon_theme
,
103 const gchar
*icon_name
,
105 GtkIconLookupFlags flags
,
108 gboolean
rox_icon_theme_rescan_if_needed (GtkIconTheme
*icon_theme
);
110 GType
gtk_icon_info_get_type (void);
111 GtkIconInfo
*gtk_icon_info_copy (GtkIconInfo
*icon_info
);
112 void gtk_icon_info_free (GtkIconInfo
*icon_info
);
117 #endif /* __GTK_ICON_THEME_H__ */