summaryrefslogtreecommitdiff
path: root/ccss-gtk
diff options
context:
space:
mode:
authorRobert Staudinger <robsta@gnome.org>2008-12-03 13:38:24 +0100
committerRobert Staudinger <robsta@gnome.org>2008-12-03 13:38:24 +0100
commit3d795cdfe294f7a09d939be97da9fefb192d80ed (patch)
tree4dc9b4b7c2c46050c43e107319135f64153a5c26 /ccss-gtk
parent39d1fcfcf34054cb673192ec26e9e0d3d05466a4 (diff)
* ccss-gtk/Makefile.am:
* ccss-gtk/ccss-gtk-grammar.c (ccss_gtk_grammar_create): * ccss-gtk/ccss-gtk-grammar.h: * ccss-gtk/ccss-gtk-style.c (ccss_gtk_style_serialize): * ccss-gtk/ccss-gtk-style.h: * ccss-gtk/ccss-gtk.c (ccss_gtk_init), (ccss_gtk_shutdown): * ccss-gtk/ccss-gtk.h: * ccss-gtk/ccss-gtk.sym: Skeleton implementation for gtk support, not in the build chain yet.
Diffstat (limited to 'ccss-gtk')
-rw-r--r--ccss-gtk/Makefile.am36
-rw-r--r--ccss-gtk/ccss-gtk-grammar.c50
-rw-r--r--ccss-gtk/ccss-gtk-grammar.h33
-rw-r--r--ccss-gtk/ccss-gtk-style.c29
-rw-r--r--ccss-gtk/ccss-gtk-style.h33
-rw-r--r--ccss-gtk/ccss-gtk.c44
-rw-r--r--ccss-gtk/ccss-gtk.h38
-rw-r--r--ccss-gtk/ccss-gtk.sym4
8 files changed, 267 insertions, 0 deletions
diff --git a/ccss-gtk/Makefile.am b/ccss-gtk/Makefile.am
new file mode 100644
index 0000000..7bde7e4
--- /dev/null
+++ b/ccss-gtk/Makefile.am
@@ -0,0 +1,36 @@
+
+AM_CPPFLAGS = \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ $(CCSS_GTK_CFLAGS)
+
+lib_LTLIBRARIES = libccss-gtk-1.la
+
+libccss_gtk_1_la_DEPENDENCIES = \
+ ccss-gtk.sym
+
+libccss_gtk_1_la_LDFLAGS = \
+ -no-undefined \
+ -version-info $(VERSION_INFO) \
+ -export-symbols $(srcdir)/ccss-gtk.sym
+
+libccss_gtk_1_la_LIBADD = \
+ ../ccss/libccss-1.la \
+ $(CCSS_GTK_LIBS)
+
+libccss_gtk_1_la_SOURCES = \
+ $(headers_DATA) \
+ ccss-gtk.c \
+ ccss-gtk-grammar.c \
+ ccss-gtk-style.c
+
+headersdir = $(includedir)/libccss-1/ccss-gtk
+
+headers_DATA = \
+ ccss-gtk.h \
+ ccss-gtk-grammar.h \
+ ccss-gtk-style.h
+
+EXTRA_DIST = \
+ ccss-gtk.sym
+
diff --git a/ccss-gtk/ccss-gtk-grammar.c b/ccss-gtk/ccss-gtk-grammar.c
new file mode 100644
index 0000000..feedbd2
--- /dev/null
+++ b/ccss-gtk/ccss-gtk-grammar.c
@@ -0,0 +1,50 @@
+/* The Gtk+ CSS Drawing Library.
+ * Copyright (C) 2008 Robert Staudinger
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include <ccss-cairo/ccss-cairo.h>
+#include "ccss-gtk-grammar.h"
+#include "config.h"
+
+/**
+ * ccss_gtk_grammar_create:
+ *
+ * Create a new gtk-grammar instance.
+ *
+ * The gtk-grammar object provides a factory to load stylesheets restricted to
+ * the supported CSS subset.
+ *
+ * Returns: a new #ccss_grammar_t instance.
+ **/
+ccss_grammar_t *
+ccss_gtk_grammar_create (void)
+{
+ ccss_grammar_t *self;
+
+ self = ccss_cairo_grammar_create ();
+
+ /* TODO add properties
+ ccss_grammar_add_properties (self, ccss_background_get_ptable ());
+ ccss_grammar_add_properties (self, ccss_border_get_ptable ());
+ ccss_grammar_add_properties (self, ccss_border_image_get_ptable ());
+ ccss_grammar_add_properties (self, ccss_color_get_ptable ());
+ */
+
+ return self;
+}
+
diff --git a/ccss-gtk/ccss-gtk-grammar.h b/ccss-gtk/ccss-gtk-grammar.h
new file mode 100644
index 0000000..56dcd87
--- /dev/null
+++ b/ccss-gtk/ccss-gtk-grammar.h
@@ -0,0 +1,33 @@
+/* The Gtk+ CSS Drawing Library.
+ * Copyright (C) 2008 Robert Staudinger
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#ifndef CCSS_GTK_GRAMMAR_H
+#define CCSS_GTK_GRAMMAR_H
+
+#include <ccss/ccss.h>
+
+CCSS_BEGIN_DECLS
+
+ccss_grammar_t *
+ccss_gtk_grammar_create (void);
+
+CCSS_END_DECLS
+
+#endif /* CCSS_GTK_GRAMMAR_H */
+
diff --git a/ccss-gtk/ccss-gtk-style.c b/ccss-gtk/ccss-gtk-style.c
new file mode 100644
index 0000000..1be89a7
--- /dev/null
+++ b/ccss-gtk/ccss-gtk-style.c
@@ -0,0 +1,29 @@
+/* The Gtk+ CSS Drawing Library.
+ * Copyright (C) 2008 Robert Staudinger
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "ccss-gtk-style.h"
+#include "config.h"
+
+char *
+ccss_gtk_style_serialize (ccss_style_t const *self)
+{
+ /* TODO */
+ return NULL;
+}
+
diff --git a/ccss-gtk/ccss-gtk-style.h b/ccss-gtk/ccss-gtk-style.h
new file mode 100644
index 0000000..de49c18
--- /dev/null
+++ b/ccss-gtk/ccss-gtk-style.h
@@ -0,0 +1,33 @@
+/* The Gtk+ CSS Drawing Library.
+ * Copyright (C) 2008 Robert Staudinger
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#ifndef CCSS_GTK_STYLE_H
+#define CCSS_GTK_STYLE_H
+
+#include <ccss-cairo/ccss-cairo.h>
+
+CCSS_BEGIN_DECLS
+
+char *
+ccss_gtk_style_serialize (ccss_style_t const *self);
+
+CCSS_END_DECLS
+
+#endif /* CCSS_GTK_STYLE_H */
+
diff --git a/ccss-gtk/ccss-gtk.c b/ccss-gtk/ccss-gtk.c
new file mode 100644
index 0000000..9804515
--- /dev/null
+++ b/ccss-gtk/ccss-gtk.c
@@ -0,0 +1,44 @@
+/* The Gtk+ CSS Drawing Library.
+ * Copyright (C) 2008 Robert Staudinger
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "ccss-gtk.h"
+#include "config.h"
+
+/**
+ * ccss_gtk_init:
+ *
+ * Initialize the ccss-gtk library before making any calls to it.
+ **/
+void
+ccss_gtk_init (void)
+{
+ ccss_cairo_init ();
+}
+
+/**
+ * ccss_gtk_shutdown:
+ *
+ * Shut down the ccss-gtk library.
+ **/
+void
+ccss_gtk_shutdown (void)
+{
+ ccss_cairo_shutdown ();
+}
+
diff --git a/ccss-gtk/ccss-gtk.h b/ccss-gtk/ccss-gtk.h
new file mode 100644
index 0000000..d1a4cf7
--- /dev/null
+++ b/ccss-gtk/ccss-gtk.h
@@ -0,0 +1,38 @@
+/* The Gtk+ CSS Drawing Library.
+ * Copyright (C) 2008 Robert Staudinger
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#ifndef CCSS_GTK_H
+#define CCSS_GTK_H
+
+#include <ccss-cairo/ccss-cairo.h>
+#include <ccss-gtk/ccss-gtk-grammar.h>
+#include <ccss-gtk/ccss-gtk-style.h>
+
+CCSS_BEGIN_DECLS
+
+void
+ccss_gtk_init (void);
+
+void
+ccss_gtk_shutdown (void);
+
+CCSS_END_DECLS
+
+#endif /* CCSS_GTK_H */
+
diff --git a/ccss-gtk/ccss-gtk.sym b/ccss-gtk/ccss-gtk.sym
new file mode 100644
index 0000000..8954eef
--- /dev/null
+++ b/ccss-gtk/ccss-gtk.sym
@@ -0,0 +1,4 @@
+ccss_gtk_init
+ccss_gtk_shutdown
+ccss_gtk_grammar_create
+ccss_gtk_style_serialize