aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-10-22 22:11:10 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-10-22 22:11:10 +0200
commit6c592d3b8e1808a000d219a2e40fd34f3d471773 (patch)
treed60309913cce82bd682fd3d2ec2543699395d5ce
parenta41af55a2ac4ac8db5c5a4cc982bdeb845ff36c2 (diff)
add css.hh css.cc
-rw-r--r--src/Makefile.am2
-rw-r--r--src/css.cc19
-rw-r--r--src/css.hh21
3 files changed, 42 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index d4d03eea..d3f46af1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -65,6 +65,8 @@ dillo_SOURCES = \
dicache.h \
capi.c \
capi.h \
+ css.cc \
+ css.hh \
plain.cc \
html.cc \
html.hh \
diff --git a/src/css.cc b/src/css.cc
new file mode 100644
index 00000000..3aa93c39
--- /dev/null
+++ b/src/css.cc
@@ -0,0 +1,19 @@
+/*
+ * File: css.cc
+ *
+ * Copyright 2008 Jorge Arellano Cid <jcid@dillo.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ */
+
+#include "css.hh"
+
+StyleEngine::StyleEngine (DilloHtml *html) {
+ this->html = html;
+}
+
+StyleEngine::~StyleEngine () {
+}
diff --git a/src/css.hh b/src/css.hh
new file mode 100644
index 00000000..31147db7
--- /dev/null
+++ b/src/css.hh
@@ -0,0 +1,21 @@
+#ifndef __CSS_HH__
+#define __CSS_HH__
+
+#include "dw/core.hh"
+#include "html_common.hh"
+
+class StyleEngine {
+ private:
+ DilloHtml *html;
+ dw::core::style::Style *currentStyle;
+
+ public:
+ StyleEngine (DilloHtml *html);
+ ~StyleEngine ();
+
+ void startElement (const char *name);
+ void endElement (const char *name);
+ inline dw::core::style::Style *style () { return currentStyle; };
+};
+
+#endif