[monet/bberg-playground] Resolve circular dependencies mostly.
- From: Benjamin Berg <bberg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [monet/bberg-playground] Resolve circular dependencies mostly.
- Date: Sun, 23 Aug 2009 19:55:51 +0000 (UTC)
commit 1db4e0bb2c857bdd825b4a74f305e5ec54b910a5
Author: Benjamin Berg <benjamin sipsolutions net>
Date: Sun Aug 23 21:55:36 2009 +0200
Resolve circular dependencies mostly.
monet/Makefile.am | 1 +
monet/mn-context.c | 1 +
monet/mn-stylesheet.c | 34 +---------------------------------
monet/mn-stylesheet.h | 15 ---------------
monet/mn-theme-type.h | 20 +++++++++-----------
tests/test.c | 1 -
6 files changed, 12 insertions(+), 60 deletions(-)
---
diff --git a/monet/Makefile.am b/monet/Makefile.am
index c65c065..c98b578 100644
--- a/monet/Makefile.am
+++ b/monet/Makefile.am
@@ -11,6 +11,7 @@ source_h = \
mn-theme-type.h \
mn-display.h \
mn-stylesheet.h \
+ mn-stylesheet-intern.h \
mn-context.h \
mn-parts.h \
mn-types.h \
diff --git a/monet/mn-context.c b/monet/mn-context.c
index acf47be..b348928 100644
--- a/monet/mn-context.c
+++ b/monet/mn-context.c
@@ -1,4 +1,5 @@
#include "monet.h"
+#include "mn-stylesheet-intern.h"
G_DEFINE_TYPE (MnContext, mn_context, G_TYPE_OBJECT)
diff --git a/monet/mn-stylesheet.c b/monet/mn-stylesheet.c
index d0f3d8b..b45959d 100644
--- a/monet/mn-stylesheet.c
+++ b/monet/mn-stylesheet.c
@@ -1,5 +1,6 @@
#include <string.h>
#include "monet.h"
+#include "mn-stylesheet-intern.h"
G_DEFINE_TYPE (MnStylesheet, mn_stylesheet, G_TYPE_OBJECT)
@@ -12,15 +13,6 @@ G_DEFINE_TYPE (MnStylesheet, mn_stylesheet, G_TYPE_OBJECT)
#define SHIFT_PRIORITY 24
typedef struct _MnStylesheetPrivate MnStylesheetPrivate;
-typedef struct _MnStyle MnStyle;
-typedef struct _MnSelector MnSelector;
-typedef struct _MnSelectorItem MnSelectorItem;
-typedef struct _MnProperty MnProperty;
-
-typedef enum {
- MN_SELECTOR_PARENT,
- MN_SELECTOR_DIRECT_PARENT
-} MnSelectorType;
struct _MnStylesheetPrivate {
MnPriority priority;
@@ -30,29 +22,6 @@ struct _MnStylesheetPrivate {
GSList *selectors;
};
-struct _MnStyle {
- GSList *properties;
-};
-
-struct _MnProperty {
- gchar *identifier;
- gchar *value;
-};
-
-struct _MnSelector {
- guint64 specifity;
- MnStyle *style;
- MnSelectorItem *sel;
-};
-
-struct _MnSelectorItem {
- MnSelectorType type;
- gchar *identifier;
- gchar **classes;
- gchar **pseudo_classes;
- MnSelectorItem *next;
-};
-
enum {
PROP_PRIORITY = 1,
PROP_STRING
@@ -895,7 +864,6 @@ _mn_stylesheet_resolve_properties (MnStylesheet *stylesheet,
prop_info->parser (prop_info,
plist_item->property,
- context,
plist_item->value,
parent_value,
value,
diff --git a/monet/mn-stylesheet.h b/monet/mn-stylesheet.h
index 44171e4..801cc49 100644
--- a/monet/mn-stylesheet.h
+++ b/monet/mn-stylesheet.h
@@ -5,8 +5,6 @@
typedef struct _MnStylesheet MnStylesheet;
-#include "mn-context.h"
-
G_BEGIN_DECLS
#define MN_TYPE_STYLESHEET mn_stylesheet_get_type()
@@ -61,19 +59,6 @@ GType mn_stylesheet_get_type (void);
MnStylesheet* mn_stylesheet_new_from_string (const gchar *string,
MnPriority priority);
-
-GList* _mn_stylesheet_find_properties (MnStylesheet *stylesheet,
- MnContext *context,
- gpointer *obj,
- GList *plist);
-void _mn_stylesheet_resolve_properties (MnStylesheet *stylesheet,
- MnContext *context,
- GList *plist,
- GHashTable *properties,
- GHashTable *parent_properties);
-void _mn_stylesheet_properties_list_free (MnStylesheet *stylesheet,
- GList *plist);
-
MnPriority mn_stylesheet_get_priority (MnStylesheet *stylesheet);
G_END_DECLS
diff --git a/monet/mn-theme-type.h b/monet/mn-theme-type.h
index c58e322..b6ba6fd 100644
--- a/monet/mn-theme-type.h
+++ b/monet/mn-theme-type.h
@@ -22,28 +22,25 @@ G_BEGIN_DECLS
#define MN_THEME_TYPE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), MN_TYPE_THEME_TYPE, MnThemeTypeClass))
-typedef struct {
- GObject parent;
-} MnThemeType;
-
-typedef struct {
- GObjectClass parent_class;
-} MnThemeTypeClass;
typedef struct _MnPropertyInfo MnPropertyInfo;
-#include "mn-stylesheet.h"
-#include "mn-context.h"
-
/* XXX: Do we need the stylesheet here to open files? */
typedef void (*MnPropertyParser) (MnPropertyInfo *info,
const gchar *alias,
- MnContext *context,
const gchar *rc_string,
GValue *parent_value,
GValue *property_value,
gboolean *constant);
+typedef struct {
+ GObject parent;
+} MnThemeType;
+
+typedef struct {
+ GObjectClass parent_class;
+} MnThemeTypeClass;
+
struct _MnPropertyInfo {
/* < public > */
GType property_type;
@@ -54,6 +51,7 @@ struct _MnPropertyInfo {
void* priv;
};
+
GType mn_theme_type_get_type (void);
MnThemeType* mn_theme_type_find (gchar *name);
diff --git a/tests/test.c b/tests/test.c
index 5741404..549e64e 100644
--- a/tests/test.c
+++ b/tests/test.c
@@ -31,7 +31,6 @@ color_free (TestColor *color)
void
color_parser (MnPropertyInfo *info,
const gchar *alias,
- MnContext *context,
const gchar *rc_string,
GValue *parent_value,
GValue *property_value,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]