gtk2/gtk/gtkiconthemeparser.h
Owen Taylor a72aed4ea2 Implement a loader for named themed icon based on from gnome-desktop
Wed Jul  2 18:00:56 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkicontheme.[ch]: Implement a loader for
        named themed icon based on from gnome-desktop library
        by Alex Larsson.

        * gtk/gtkiconthemeparser.[ch]: .ini file parsing code
        from gnome-desktop.

        * gtk/gtkiconfactory.[ch]: Add
        gtk_icon_source_set/get_icon_name() to allow stock icons
        to be based off of named theme icons.

        * gtk/gtkiconfactory.c: Rework sources so that the source
        is *either* a pixbuf, or a filename, or an icon name,
        instead of the pixbuf/filename mix it was before. Put a
        workaround for get_pixbuf() so that it can return the
        filename pixbuf, e.g, for render_icon().

        * gtk/gtkiconfactory.c: Make the default setup use
        themed icons, and add builtin icons to the default
        icon theme for all the standard pixbufs, so we
        don't rely on actually having an icon theme on disk.

        * gtk/gtkrc.c: Add support for @"icon-name" to specify
        a themed icon for a stock icon source.

        * tests/Makefile.am test/testicontheme.c: Add a test
        program from gnome-desktop.

        * gdk/x11/gdkevents-x11.c gtk/gtksettings.c: Add
        Net/IconThemeName / gtk-icon-theme-name setting.

        * gtk/gtkiconfactory.c (ensure_cache_up_to_date): Actually
        update the icon cache serial so we don't continually

        * gtk/gtkwidget.c: Fix a couple of references in doc comments
        to ::direction_set that should have been to ::direction-changed
2003-07-02 22:44:09 +00:00

87 lines
3.2 KiB
C

/* GtkIconThemeParser - a parser of icon-theme files
* gtkiconthemeparser.h Copyright (C) 2002, 2003 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GTK_ICON_THEME_PARSER_H__
#define __GTK_ICON_THEME_PARSER_H__
#include <glib.h>
G_BEGIN_DECLS
typedef struct _GtkIconThemeFile GtkIconThemeFile;
typedef void (* GtkIconThemeFileSectionFunc) (GtkIconThemeFile *df,
const char *name,
gpointer data);
/* If @key is %NULL, @value is a comment line. */
/* @value is raw, unescaped data. */
typedef void (* GtkIconThemeFileLineFunc) (GtkIconThemeFile *df,
const char *key,
const char *locale,
const char *value,
gpointer data);
typedef enum
{
GTK_ICON_THEME_FILE_PARSE_ERROR_INVALID_SYNTAX,
GTK_ICON_THEME_FILE_PARSE_ERROR_INVALID_ESCAPES,
GTK_ICON_THEME_FILE_PARSE_ERROR_INVALID_CHARS
} GtkIconThemeFileParseError;
#define GTK_ICON_THEME_FILE_PARSE_ERROR _gtk_icon_theme_file_parse_error_quark()
GQuark _gtk_icon_theme_file_parse_error_quark (void);
GtkIconThemeFile *_gtk_icon_theme_file_new_from_string (char *data,
GError **error);
char * _gtk_icon_theme_file_to_string (GtkIconThemeFile *df);
void _gtk_icon_theme_file_free (GtkIconThemeFile *df);
void _gtk_icon_theme_file_foreach_section (GtkIconThemeFile *df,
GtkIconThemeFileSectionFunc func,
gpointer user_data);
void _gtk_icon_theme_file_foreach_key (GtkIconThemeFile *df,
const char *section,
gboolean include_localized,
GtkIconThemeFileLineFunc func,
gpointer user_data);
/* Gets the raw text of the key, unescaped */
gboolean _gtk_icon_theme_file_get_raw (GtkIconThemeFile *df,
const char *section,
const char *keyname,
const char *locale,
char **val);
gboolean _gtk_icon_theme_file_get_integer (GtkIconThemeFile *df,
const char *section,
const char *keyname,
int *val);
gboolean _gtk_icon_theme_file_get_string (GtkIconThemeFile *df,
const char *section,
const char *keyname,
char **val);
gboolean _gtk_icon_theme_file_get_locale_string (GtkIconThemeFile *df,
const char *section,
const char *keyname,
char **val);
G_END_DECLS
#endif /* GTK_ICON_THEME_PARSER_H */