1
/* gnome-theme-info.h - GNOME Theme information
3
Copyright (C) 2002 Jonathan Blandford <jrb@gnome.org>
6
This file is part of the Gnome Library.
8
The Gnome Library is free software; you can redistribute it and/or
9
modify it under the terms of the GNU Library General Public License as
10
published by the Free Software Foundation; either version 2 of the
11
License, or (at your option) any later version.
13
The Gnome Library is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
Library General Public License for more details.
18
You should have received a copy of the GNU Library General Public
19
License along with the Gnome Library; see the file COPYING.LIB. If not,
20
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
Boston, MA 02111-1307, USA. */
23
#ifndef GNOME_THEME_INFO_H
24
#define GNOME_THEME_INFO_H
28
#include <gdk-pixbuf/gdk-pixbuf.h>
32
GNOME_THEME_TYPE_METATHEME,
33
GNOME_THEME_TYPE_ICON,
34
GNOME_THEME_TYPE_CURSOR,
35
GNOME_THEME_TYPE_REGULAR
39
GNOME_THEME_CHANGE_CREATED,
40
GNOME_THEME_CHANGE_DELETED,
41
GNOME_THEME_CHANGE_CHANGED
42
} GnomeThemeChangeType;
45
GNOME_THEME_METACITY = 1 << 0,
46
GNOME_THEME_GTK_2 = 1 << 1,
47
GNOME_THEME_GTK_2_KEYBINDING = 1 << 2
50
typedef struct _GnomeThemeCommonInfo GnomeThemeCommonInfo;
51
typedef struct _GnomeThemeCommonInfo GnomeThemeIconInfo;
52
struct _GnomeThemeCommonInfo
62
typedef struct _GnomeThemeInfo GnomeThemeInfo;
63
struct _GnomeThemeInfo
73
guint has_keybinding : 1;
74
guint has_metacity : 1;
77
typedef struct _GnomeThemeCursorInfo GnomeThemeCursorInfo;
78
struct _GnomeThemeCursorInfo {
90
typedef struct _GnomeThemeMetaInfo GnomeThemeMetaInfo;
91
struct _GnomeThemeMetaInfo
103
gchar *gtk_theme_name;
104
gchar *gtk_color_scheme;
105
gchar *metacity_theme_name;
106
gchar *icon_theme_name;
107
gchar *notification_theme_name;
108
gchar *sound_theme_name;
109
gchar *cursor_theme_name;
112
gchar *application_font;
113
gchar *documents_font;
115
gchar *windowtitle_font;
116
gchar *monospace_font;
117
gchar *background_image;
132
typedef void (* ThemeChangedCallback) (GnomeThemeCommonInfo *theme,
133
GnomeThemeChangeType change_type,
134
GnomeThemeElement element_type,
137
#define GNOME_THEME_ERROR gnome_theme_info_error_quark ()
140
GNOME_THEME_ERROR_GTK_THEME_NOT_AVAILABLE = 1,
141
GNOME_THEME_ERROR_WM_THEME_NOT_AVAILABLE,
142
GNOME_THEME_ERROR_ICON_THEME_NOT_AVAILABLE,
143
GNOME_THEME_ERROR_GTK_ENGINE_NOT_AVAILABLE,
144
GNOME_THEME_ERROR_UNKNOWN
148
/* GTK/Metacity/keybinding Themes */
149
GnomeThemeInfo *gnome_theme_info_new (void);
150
void gnome_theme_info_free (GnomeThemeInfo *theme_info);
151
GnomeThemeInfo *gnome_theme_info_find (const gchar *theme_name);
152
GList *gnome_theme_info_find_by_type (guint elements);
153
GQuark gnome_theme_info_error_quark (void);
154
gchar *gtk_theme_info_missing_engine (const gchar *gtk_theme,
158
GnomeThemeIconInfo *gnome_theme_icon_info_new (void);
159
void gnome_theme_icon_info_free (GnomeThemeIconInfo *icon_theme_info);
160
GnomeThemeIconInfo *gnome_theme_icon_info_find (const gchar *icon_theme_name);
161
GList *gnome_theme_icon_info_find_all (void);
162
gint gnome_theme_icon_info_compare (GnomeThemeIconInfo *a,
163
GnomeThemeIconInfo *b);
166
GnomeThemeCursorInfo *gnome_theme_cursor_info_new (void);
167
void gnome_theme_cursor_info_free (GnomeThemeCursorInfo *info);
168
GnomeThemeCursorInfo *gnome_theme_cursor_info_find (const gchar *name);
169
GList *gnome_theme_cursor_info_find_all (void);
170
gint gnome_theme_cursor_info_compare (GnomeThemeCursorInfo *a,
171
GnomeThemeCursorInfo *b);
174
GnomeThemeMetaInfo *gnome_theme_meta_info_new (void);
175
void gnome_theme_meta_info_free (GnomeThemeMetaInfo *meta_theme_info);
176
GnomeThemeMetaInfo *gnome_theme_meta_info_find (const gchar *meta_theme_name);
177
GList *gnome_theme_meta_info_find_all (void);
178
gint gnome_theme_meta_info_compare (GnomeThemeMetaInfo *a,
179
GnomeThemeMetaInfo *b);
180
gboolean gnome_theme_meta_info_validate (const GnomeThemeMetaInfo *info,
182
GnomeThemeMetaInfo *gnome_theme_read_meta_theme (GFile *meta_theme_uri);
185
void gnome_theme_init (void);
186
void gnome_theme_info_register_theme_change (ThemeChangedCallback func,
189
gboolean gnome_theme_color_scheme_parse (const gchar *scheme,
191
gboolean gnome_theme_color_scheme_equal (const gchar *s1,
194
#endif /* GNOME_THEME_INFO_H */