[gtk+/parser: 45/57] cssprovider: Add a private structure to the scanner
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/parser: 45/57] cssprovider: Add a private structure to the scanner
- Date: Mon, 11 Apr 2011 14:59:57 +0000 (UTC)
commit 460b260cee69ce9a0bebcf70340f41e0eb5ead26
Author: Benjamin Otte <otte redhat com>
Date: Sun Apr 10 03:39:52 2011 +0200
cssprovider: Add a private structure to the scanner
So far, it's unused
gtk/gtkcssprovider.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 4fd5e40..81570c7 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -735,6 +735,7 @@
typedef struct SelectorElement SelectorElement;
typedef struct SelectorPath SelectorPath;
typedef struct SelectorStyleInfo SelectorStyleInfo;
+typedef struct _GtkCssScannerPrivate GtkCssScannerPrivate;
typedef enum SelectorElementType SelectorElementType;
typedef enum CombinatorType CombinatorType;
typedef enum ParserScope ParserScope;
@@ -785,6 +786,11 @@ struct SelectorStyleInfo
GHashTable *style;
};
+struct _GtkCssScannerPrivate
+{
+ int unused;
+};
+
struct _GtkCssProviderPrivate
{
GScanner *scanner;
@@ -1093,16 +1099,23 @@ selector_style_info_set_style (SelectorStyleInfo *info,
static void
gtk_css_scanner_destroy (GScanner *scanner)
{
+ GtkCssScannerPrivate *priv = scanner->user_data;
+
+ g_slice_free (GtkCssScannerPrivate, priv);
+
g_scanner_destroy (scanner);
}
static GScanner *
gtk_css_provider_create_scanner (GtkCssProvider *provider)
{
+ GtkCssScannerPrivate *priv;
GScanner *scanner;
scanner = g_scanner_new (NULL);
+ priv = scanner->user_data = g_slice_new0 (GtkCssScannerPrivate);
+
g_scanner_scope_add_symbol (scanner, SCOPE_PSEUDO_CLASS, "active", GUINT_TO_POINTER (GTK_STATE_ACTIVE));
g_scanner_scope_add_symbol (scanner, SCOPE_PSEUDO_CLASS, "prelight", GUINT_TO_POINTER (GTK_STATE_PRELIGHT));
g_scanner_scope_add_symbol (scanner, SCOPE_PSEUDO_CLASS, "hover", GUINT_TO_POINTER (GTK_STATE_PRELIGHT));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]