1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
31 #include <gtk/gtkstyle.h>
32 #include <gtk/gtkwidget.h>
36 #endif /* __cplusplus */
51 gchar *bg_pixmap_name[5];
53 GtkRcFlags color_flags[5];
59 GtkThemeEngine *engine;
66 void gtk_rc_init (void);
67 void gtk_rc_add_default_file (const gchar *filename);
68 void gtk_rc_set_default_files (gchar **filenames);
69 gchar** gtk_rc_get_default_files (void);
70 void gtk_rc_parse (const gchar *filename);
71 void gtk_rc_parse_string (const gchar *rc_string);
72 gboolean gtk_rc_reparse_all (void);
73 GtkStyle* gtk_rc_get_style (GtkWidget *widget);
74 void gtk_rc_add_widget_name_style (GtkRcStyle *rc_style,
75 const gchar *pattern);
76 void gtk_rc_add_widget_class_style (GtkRcStyle *rc_style,
77 const gchar *pattern);
78 void gtk_rc_add_class_style (GtkRcStyle *rc_style,
79 const gchar *pattern);
81 GtkRcStyle* gtk_rc_style_new (void);
82 void gtk_rc_style_ref (GtkRcStyle *rc_style);
83 void gtk_rc_style_unref (GtkRcStyle *rc_style);
85 /* Tell gtkrc to use a custom routine to load images specified in rc files instead of
86 * the default xpm-only loader
88 typedef GdkPixmap* (*GtkImageLoader) (GdkWindow *window,
89 GdkColormap *colormap,
91 GdkColor *transparent_color,
92 const gchar *filename);
93 void gtk_rc_set_image_loader (GtkImageLoader loader);
95 GdkPixmap* gtk_rc_load_image (GdkColormap *colormap,
96 GdkColor *transparent_color,
97 const gchar *filename);
98 gchar* gtk_rc_find_pixmap_in_path (GScanner *scanner,
99 const gchar *pixmap_file);
100 gchar* gtk_rc_find_module_in_path (const gchar *module_file);
101 gchar* gtk_rc_get_theme_dir (void);
102 gchar* gtk_rc_get_module_dir (void);
104 /* private functions/definitions */
106 GTK_RC_TOKEN_INVALID = G_TOKEN_LAST,
107 GTK_RC_TOKEN_INCLUDE,
110 GTK_RC_TOKEN_PRELIGHT,
111 GTK_RC_TOKEN_SELECTED,
112 GTK_RC_TOKEN_INSENSITIVE,
118 GTK_RC_TOKEN_FONTSET,
119 GTK_RC_TOKEN_BG_PIXMAP,
120 GTK_RC_TOKEN_PIXMAP_PATH,
122 GTK_RC_TOKEN_BINDING,
125 GTK_RC_TOKEN_WIDGET_CLASS,
129 GTK_RC_TOKEN_APPLICATION,
131 GTK_RC_TOKEN_HIGHEST,
133 GTK_RC_TOKEN_MODULE_PATH,
137 guint gtk_rc_parse_color (GScanner *scanner,
139 guint gtk_rc_parse_state (GScanner *scanner,
140 GtkStateType *state);
141 guint gtk_rc_parse_priority (GScanner *scanner,
142 GtkPathPriorityType *priority);
148 #endif /* __cplusplus */
151 #endif /* __GTK_RC_H__ */