r3247: Experimental extended attributes support for setting MIME types
[rox-filer.git] / ROX-Filer / src / gtkiconthemeparser.h
blob58b5436a22e012594e9eb8e18b4a9c9f3e353ed6
1 /* GtkIconThemeParser - a parser of icon-theme files
2 * gtkiconthemeparser.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)
10 * any later version.
13 #ifndef __GTK_ICON_THEME_PARSER_H__
14 #define __GTK_ICON_THEME_PARSER_H__
16 #include <glib.h>
18 G_BEGIN_DECLS
20 typedef struct _GtkIconThemeFile GtkIconThemeFile;
22 typedef void (* GtkIconThemeFileSectionFunc) (GtkIconThemeFile *df,
23 const char *name,
24 gpointer data);
26 /* If @key is %NULL, @value is a comment line. */
27 /* @value is raw, unescaped data. */
28 typedef void (* GtkIconThemeFileLineFunc) (GtkIconThemeFile *df,
29 const char *key,
30 const char *locale,
31 const char *value,
32 gpointer data);
34 typedef enum
36 GTK_ICON_THEME_FILE_PARSE_ERROR_INVALID_SYNTAX,
37 GTK_ICON_THEME_FILE_PARSE_ERROR_INVALID_ESCAPES,
38 GTK_ICON_THEME_FILE_PARSE_ERROR_INVALID_CHARS
39 } GtkIconThemeFileParseError;
41 #define GTK_ICON_THEME_FILE_PARSE_ERROR _rox_icon_theme_file_parse_error_quark()
42 GQuark _rox_icon_theme_file_parse_error_quark (void);
44 GtkIconThemeFile *_rox_icon_theme_file_new_from_string (char *data,
45 GError **error);
46 char * _rox_icon_theme_file_to_string (GtkIconThemeFile *df);
47 void _rox_icon_theme_file_free (GtkIconThemeFile *df);
49 void _rox_icon_theme_file_foreach_section (GtkIconThemeFile *df,
50 GtkIconThemeFileSectionFunc func,
51 gpointer user_data);
52 void _rox_icon_theme_file_foreach_key (GtkIconThemeFile *df,
53 const char *section,
54 gboolean include_localized,
55 GtkIconThemeFileLineFunc func,
56 gpointer user_data);
58 /* Gets the raw text of the key, unescaped */
59 gboolean _rox_icon_theme_file_get_raw (GtkIconThemeFile *df,
60 const char *section,
61 const char *keyname,
62 const char *locale,
63 char **val);
64 gboolean _rox_icon_theme_file_get_integer (GtkIconThemeFile *df,
65 const char *section,
66 const char *keyname,
67 int *val);
68 gboolean _rox_icon_theme_file_get_string (GtkIconThemeFile *df,
69 const char *section,
70 const char *keyname,
71 char **val);
72 gboolean _rox_icon_theme_file_get_locale_string (GtkIconThemeFile *df,
73 const char *section,
74 const char *keyname,
75 char **val);
77 G_END_DECLS
79 #endif /* GTK_ICON_THEME_PARSER_H */