summaryrefslogtreecommitdiff
path: root/gtk/gtkrc.h
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2001-03-18 04:50:34 +0000
committerTim Janik <timj@src.gnome.org>2001-03-18 04:50:34 +0000
commitac68581f9655392ab4b41ac5d6b0b76c0adf532f (patch)
tree3a8c1043c94817b941e70dfce7fefb309b0cf517 /gtk/gtkrc.h
parent882bb853891b30c98c58d384d311fa24fbd1b326 (diff)
downloadgtk+-ac68581f9655392ab4b41ac5d6b0b76c0adf532f.tar.gz
added rc-style argument GtkSpinButton::shadow_type. removed
Sun Mar 18 01:15:30 2001 Tim Janik <timj@gtk.org> * gtk/gtkspinbutton.[hc]: added rc-style argument GtkSpinButton::shadow_type. removed spin_button->shadow_type, gtk_spin_button_set_shadow_type() and ARG_SHADOW_TYPE as it doesn' make much sense to try to override rc-style settings. * gtk/gtkfixed.c: removed gtk_fixed_paint() (was unused). * gtk/gtkwidget.c: quark cleanups. * gtk/gtkrc.[hc]: added gtk_rc_scanner_new() to create an rc-file scanner with appropriate configuration, renamed GtkRcStyleClass.clone to create_rc_style() (we don't do cloning in standard OO sense). added per rc style properties. * gtk/gtkstyle.[hc]: added code to retrive pspec conformant rc-style property values and for caching those. some cleanups. * gtk/Makefile.am: -DG_DISABLE_CONST_RETURNS. * gtk/gtksettings.[hc]: new file for global rc-file properties (at least currently, should get extended to support X properties and other communication mechanisms). * gtk/gtkwidget.[hc]: added style property support: (gtk_widget_class_install_style_property_parser): install style property pspec with parser function for rc-file values other than LONG, DOUBLE or STRING. (gtk_widget_class_install_style_property): same as above without parser (parsers are going to be needed quite infrequently). (gtk_widget_style_get_property): retrive style property value. (gtk_widget_style_get_valist): same as above with varargs support, has NOCOPY semantics. (gtk_widget_style_get): wrapper around gtk_widget_style_get_valist().
Diffstat (limited to 'gtk/gtkrc.h')
-rw-r--r--gtk/gtkrc.h37
1 files changed, 28 insertions, 9 deletions
diff --git a/gtk/gtkrc.h b/gtk/gtkrc.h
index 29f8b61a02..c68a13d209 100644
--- a/gtk/gtkrc.h
+++ b/gtk/gtkrc.h
@@ -75,6 +75,7 @@ struct _GtkRcStyle
gint ythickness;
/*< private >*/
+ GBSearchArray *rc_properties;
/* list of RC style lists including this RC style */
GSList *rc_style_lists;
@@ -91,7 +92,7 @@ struct _GtkRcStyleClass
* g_object_new (G_OBJECT_TYPE (style), NULL);
* should work in most cases.
*/
- GtkRcStyle * (*clone) (GtkRcStyle *rc_style);
+ GtkRcStyle * (*create_rc_style) (GtkRcStyle *rc_style);
/* Fill in engine specific parts of GtkRcStyle by parsing contents
* of brackets. Returns G_TOKEN_NONE if succesful, otherwise returns
@@ -112,7 +113,7 @@ struct _GtkRcStyleClass
};
void gtk_rc_init (void);
-void gtk_rc_add_default_file (const gchar *filename);
+void gtk_rc_add_default_file (const gchar *filename);
void gtk_rc_set_default_files (gchar **filenames);
gchar** gtk_rc_get_default_files (void);
void gtk_rc_parse (const gchar *filename);
@@ -128,7 +129,7 @@ void gtk_rc_add_class_style (GtkRcStyle *rc_style,
GType gtk_rc_style_get_type (void) G_GNUC_CONST;
GtkRcStyle* gtk_rc_style_new (void);
-GtkRcStyle *gtk_rc_style_copy (GtkRcStyle *orig);
+GtkRcStyle* gtk_rc_style_copy (GtkRcStyle *orig);
void gtk_rc_style_ref (GtkRcStyle *rc_style);
void gtk_rc_style_unref (GtkRcStyle *rc_style);
@@ -194,17 +195,35 @@ typedef enum {
GTK_RC_TOKEN_LAST
} GtkRcTokenType;
-guint gtk_rc_parse_color (GScanner *scanner,
+GScanner* gtk_rc_scanner_new (void);
+guint gtk_rc_parse_color (GScanner *scanner,
GdkColor *color);
-guint gtk_rc_parse_state (GScanner *scanner,
+guint gtk_rc_parse_state (GScanner *scanner,
GtkStateType *state);
-guint gtk_rc_parse_priority (GScanner *scanner,
+guint gtk_rc_parse_priority (GScanner *scanner,
GtkPathPriorityType *priority);
-
-#ifdef G_OS_WIN32
-gchar *gtk_win32_get_installation_directory (void);
+/* rc properties
+ * (structure forward declared in gtkstyle.h)
+ */
+struct _GtkRcProperty
+{
+ /* quark-ified property identifier like "GtkScrollbar::spacing" */
+ GQuark type_name;
+ GQuark property_name;
+
+ /* fields similar to GtkSettingsValue */
+ gchar *origin;
+ GValue value;
+};
+const GtkRcProperty* _gtk_rc_style_lookup_rc_property (GtkRcStyle *rc_style,
+ GQuark type_name,
+ GQuark property_name);
+
+
+#ifdef G_OS_WIN32
+gchar* gtk_win32_get_installation_directory (void);
#endif