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)
13 #ifndef __GTK_ICON_THEME_PARSER_H__
14 #define __GTK_ICON_THEME_PARSER_H__
20 typedef struct _GtkIconThemeFile GtkIconThemeFile
;
22 typedef void (* GtkIconThemeFileSectionFunc
) (GtkIconThemeFile
*df
,
26 /* If @key is %NULL, @value is a comment line. */
27 /* @value is raw, unescaped data. */
28 typedef void (* GtkIconThemeFileLineFunc
) (GtkIconThemeFile
*df
,
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
,
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
,
52 void _rox_icon_theme_file_foreach_key (GtkIconThemeFile
*df
,
54 gboolean include_localized
,
55 GtkIconThemeFileLineFunc func
,
58 /* Gets the raw text of the key, unescaped */
59 gboolean
_rox_icon_theme_file_get_raw (GtkIconThemeFile
*df
,
64 gboolean
_rox_icon_theme_file_get_integer (GtkIconThemeFile
*df
,
68 gboolean
_rox_icon_theme_file_get_string (GtkIconThemeFile
*df
,
72 gboolean
_rox_icon_theme_file_get_locale_string (GtkIconThemeFile
*df
,
79 #endif /* GTK_ICON_THEME_PARSER_H */