gnome-control-center/capplets/common/gnome-theme-info.h

195 lines
6.2 KiB
C
Raw Normal View History

/* gnome-theme-info.h - GNOME Theme information
Copyright (C) 2002 Jonathan Blandford <jrb@gnome.org>
All rights reserved.
This file is part of the Gnome Library.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef GNOME_THEME_INFO_H
#define GNOME_THEME_INFO_H
#include <glib.h>
port from gnome-vfs to gio (part of bug #524401) 2008-05-01 Jens Granseuer <jensgr@gmx.net> * gnome-theme-apply.c: * gnome-theme-info.c: (get_file_type), (add_theme_to_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_read_meta_theme), (read_icon_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (handle_change_signal), (update_theme_index), (update_gtk2_index), (update_keybinding_index), (update_metacity_index), (update_common_theme_dir_index), (update_meta_theme_index), (update_icon_theme_index), (update_cursor_theme_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (remove_common_icon_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (add_top_theme_dir_monitor), (add_top_icon_theme_dir_monitor), (gnome_theme_init): * gnome-theme-info.h: * gnome-theme-test.c: (main): port from gnome-vfs to gio (part of bug #524401) 2008-05-01 Jens Granseuer <jensgr@gmx.net> * appearance-themes.c: (themes_init): update for changes in the theme-info API 2008-05-01 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (vfs_module_init): * themus-properties-view.c: (themus_properties_view_init), (themus_properties_view_set_location): * themus-theme-applier.c: (main): update users of the theme-info API svn path=/trunk/; revision=8681
2008-05-01 09:08:07 +00:00
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
typedef enum {
GNOME_THEME_TYPE_METATHEME,
GNOME_THEME_TYPE_ICON,
GNOME_THEME_TYPE_CURSOR,
GNOME_THEME_TYPE_REGULAR
} GnomeThemeType;
typedef enum {
GNOME_THEME_CHANGE_CREATED,
GNOME_THEME_CHANGE_DELETED,
GNOME_THEME_CHANGE_CHANGED
} GnomeThemeChangeType;
typedef enum {
GNOME_THEME_METACITY = 1 << 0,
GNOME_THEME_GTK_2 = 1 << 1,
GNOME_THEME_GTK_2_KEYBINDING = 1 << 2
} GnomeThemeElement;
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
typedef struct _GnomeThemeCommonInfo GnomeThemeCommonInfo;
typedef struct _GnomeThemeCommonInfo GnomeThemeIconInfo;
struct _GnomeThemeCommonInfo
{
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
GnomeThemeType type;
gchar *path;
gchar *name;
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
gchar *readable_name;
gint priority;
gboolean hidden;
};
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
typedef struct _GnomeThemeInfo GnomeThemeInfo;
struct _GnomeThemeInfo
{
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
GnomeThemeType type;
gchar *path;
gchar *name;
gchar *readable_name;
gint priority;
gboolean hidden;
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
guint has_gtk : 1;
guint has_keybinding : 1;
guint has_metacity : 1;
};
typedef struct _GnomeThemeCursorInfo GnomeThemeCursorInfo;
struct _GnomeThemeCursorInfo {
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
GnomeThemeType type;
gchar *path;
gchar *name;
gchar *readable_name;
gint priority;
gboolean hidden;
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
GArray *sizes;
GdkPixbuf *thumbnail;
};
typedef struct _GnomeThemeMetaInfo GnomeThemeMetaInfo;
struct _GnomeThemeMetaInfo
{
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
GnomeThemeType type;
gchar *path;
gchar *name;
gchar *readable_name;
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
gint priority;
gboolean hidden;
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
gchar *comment;
gchar *icon_file;
gchar *gtk_theme_name;
gchar *gtk_color_scheme;
gchar *metacity_theme_name;
gchar *icon_theme_name;
gchar *notification_theme_name;
gchar *sound_theme_name;
gchar *cursor_theme_name;
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
guint cursor_size;
gchar *application_font;
gchar *documents_font;
gchar *desktop_font;
gchar *windowtitle_font;
gchar *monospace_font;
gchar *background_image;
};
enum {
COLOR_FG,
COLOR_BG,
COLOR_TEXT,
COLOR_BASE,
COLOR_SELECTED_FG,
COLOR_SELECTED_BG,
COLOR_TOOLTIP_FG,
COLOR_TOOLTIP_BG,
NUM_SYMBOLIC_COLORS
};
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
typedef void (* ThemeChangedCallback) (GnomeThemeCommonInfo *theme,
GnomeThemeChangeType change_type,
GnomeThemeElement element_type,
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
gpointer user_data);
#define GNOME_THEME_ERROR gnome_theme_info_error_quark ()
enum {
GNOME_THEME_ERROR_GTK_THEME_NOT_AVAILABLE = 1,
GNOME_THEME_ERROR_WM_THEME_NOT_AVAILABLE,
GNOME_THEME_ERROR_ICON_THEME_NOT_AVAILABLE,
GNOME_THEME_ERROR_GTK_ENGINE_NOT_AVAILABLE,
GNOME_THEME_ERROR_UNKNOWN
};
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
/* GTK/Metacity/keybinding Themes */
GnomeThemeInfo *gnome_theme_info_new (void);
void gnome_theme_info_free (GnomeThemeInfo *theme_info);
GnomeThemeInfo *gnome_theme_info_find (const gchar *theme_name);
GList *gnome_theme_info_find_by_type (guint elements);
GQuark gnome_theme_info_error_quark (void);
gchar *gtk_theme_info_missing_engine (const gchar *gtk_theme,
gboolean nameOnly);
/* Icon Themes */
GnomeThemeIconInfo *gnome_theme_icon_info_new (void);
void gnome_theme_icon_info_free (GnomeThemeIconInfo *icon_theme_info);
GnomeThemeIconInfo *gnome_theme_icon_info_find (const gchar *icon_theme_name);
GList *gnome_theme_icon_info_find_all (void);
gint gnome_theme_icon_info_compare (GnomeThemeIconInfo *a,
GnomeThemeIconInfo *b);
/* Cursor Themes */
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
GnomeThemeCursorInfo *gnome_theme_cursor_info_new (void);
void gnome_theme_cursor_info_free (GnomeThemeCursorInfo *info);
GnomeThemeCursorInfo *gnome_theme_cursor_info_find (const gchar *name);
GList *gnome_theme_cursor_info_find_all (void);
gint gnome_theme_cursor_info_compare (GnomeThemeCursorInfo *a,
GnomeThemeCursorInfo *b);
/* Meta themes*/
GnomeThemeMetaInfo *gnome_theme_meta_info_new (void);
void gnome_theme_meta_info_free (GnomeThemeMetaInfo *meta_theme_info);
Switch to using a common theme struct that includes a type descriptor so 2007-10-28 Jens Granseuer <jensgr@gmx.net> Switch to using a common theme struct that includes a type descriptor so we can avoid many of the theme type casts. This should also make adding support for live cursor theme changes a little easier. * gnome-theme-info.c: (add_theme_to_hash_by_name), (remove_theme_from_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_compare), (gnome_theme_free), (add_default_cursor_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (look_for_cursor_theme), (read_current_cursor_font), (read_cursor_fonts), (handle_change_signal), (update_theme_index), (update_common_theme_dir_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (gnome_theme_info_new), (gnome_theme_info_free), (gnome_theme_info_find), (gnome_theme_info_find_all_helper), (gnome_theme_icon_info_new), (gnome_theme_icon_info_find), (gnome_theme_icon_info_find_all), (gnome_theme_cursor_info_new), (gnome_theme_cursor_info_find), (gnome_theme_cursor_info_find_all), (gnome_theme_meta_info_new), (gnome_theme_meta_info_free), (gnome_theme_meta_info_find), (gnome_theme_meta_info_find_all), (gnome_theme_color_scheme_parse), (gnome_theme_init): * gnome-theme-info.h: Use CursorThemeCommonInfo wherever possible, remove some unused code. 2007-10-28 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (changed_on_disk_cb): * appearance-themes.c: (theme_changed_on_disk_cb): adapt to changes in theme change notification 2007-10-28 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (theme_changed_callback): adapt to modified callback signature svn path=/trunk/; revision=8224
2007-10-28 15:35:21 +00:00
GnomeThemeMetaInfo *gnome_theme_meta_info_find (const gchar *meta_theme_name);
GList *gnome_theme_meta_info_find_all (void);
gint gnome_theme_meta_info_compare (GnomeThemeMetaInfo *a,
GnomeThemeMetaInfo *b);
gboolean gnome_theme_meta_info_validate (const GnomeThemeMetaInfo *info,
GError **error);
port from gnome-vfs to gio (part of bug #524401) 2008-05-01 Jens Granseuer <jensgr@gmx.net> * gnome-theme-apply.c: * gnome-theme-info.c: (get_file_type), (add_theme_to_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_read_meta_theme), (read_icon_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (handle_change_signal), (update_theme_index), (update_gtk2_index), (update_keybinding_index), (update_metacity_index), (update_common_theme_dir_index), (update_meta_theme_index), (update_icon_theme_index), (update_cursor_theme_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (remove_common_icon_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (add_top_theme_dir_monitor), (add_top_icon_theme_dir_monitor), (gnome_theme_init): * gnome-theme-info.h: * gnome-theme-test.c: (main): port from gnome-vfs to gio (part of bug #524401) 2008-05-01 Jens Granseuer <jensgr@gmx.net> * appearance-themes.c: (themes_init): update for changes in the theme-info API 2008-05-01 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (vfs_module_init): * themus-properties-view.c: (themus_properties_view_init), (themus_properties_view_set_location): * themus-theme-applier.c: (main): update users of the theme-info API svn path=/trunk/; revision=8681
2008-05-01 09:08:07 +00:00
GnomeThemeMetaInfo *gnome_theme_read_meta_theme (GFile *meta_theme_uri);
/* Other */
port from gnome-vfs to gio (part of bug #524401) 2008-05-01 Jens Granseuer <jensgr@gmx.net> * gnome-theme-apply.c: * gnome-theme-info.c: (get_file_type), (add_theme_to_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_read_meta_theme), (read_icon_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (handle_change_signal), (update_theme_index), (update_gtk2_index), (update_keybinding_index), (update_metacity_index), (update_common_theme_dir_index), (update_meta_theme_index), (update_icon_theme_index), (update_cursor_theme_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (remove_common_icon_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (add_top_theme_dir_monitor), (add_top_icon_theme_dir_monitor), (gnome_theme_init): * gnome-theme-info.h: * gnome-theme-test.c: (main): port from gnome-vfs to gio (part of bug #524401) 2008-05-01 Jens Granseuer <jensgr@gmx.net> * appearance-themes.c: (themes_init): update for changes in the theme-info API 2008-05-01 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (vfs_module_init): * themus-properties-view.c: (themus_properties_view_init), (themus_properties_view_set_location): * themus-theme-applier.c: (main): update users of the theme-info API svn path=/trunk/; revision=8681
2008-05-01 09:08:07 +00:00
void gnome_theme_init (void);
void gnome_theme_info_register_theme_change (ThemeChangedCallback func,
gpointer data);
gboolean gnome_theme_color_scheme_parse (const gchar *scheme,
GdkColor *colors);
gboolean gnome_theme_color_scheme_equal (const gchar *s1,
const gchar *s2);
#endif /* GNOME_THEME_INFO_H */