gtk-css-engine r133 - in trunk: . libccd libccss libccss/ccd libccss/ccss libccss/doc libccss/doc/tmpl libccss/examples src
- From: robsta svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk-css-engine r133 - in trunk: . libccd libccss libccss/ccd libccss/ccss libccss/doc libccss/doc/tmpl libccss/examples src
- Date: Mon, 29 Sep 2008 09:51:03 +0000 (UTC)
Author: robsta
Date: Mon Sep 29 09:51:02 2008
New Revision: 133
URL: http://svn.gnome.org/viewvc/gtk-css-engine?rev=133&view=rev
Log:
* ChangeLog: correctly format old entries.
* Makefile.am:
* TODO:
* configure.in:
* libccss/Makefile.am:
* libccss/ccss/Makefile.am:
* libccss/ccss/ccss-background.c:
* libccss/ccss/ccss-background.h:
* libccss/ccss/ccss-block.c:
* libccss/ccss/ccss-block.h:
* libccss/ccss/ccss-border.c:
* libccss/ccss/ccss-border.h:
* libccss/ccss/ccss-color.c:
* libccss/ccss/ccss-color.h:
* libccss/ccss/ccss-features.h.in:
* libccss/ccss/ccss-function.c:
* libccss/ccss/ccss-function.h:
* libccss/ccss/ccss-gtk-style.c:
* libccss/ccss/ccss-gtk-style.h:
* libccss/ccss/ccss-image.c:
* libccss/ccss/ccss-image.h:
* libccss/ccss/ccss-node.c:
* libccss/ccss/ccss-node.h:
* libccss/ccss/ccss-parser.c:
* libccss/ccss/ccss-parser.h:
* libccss/ccss/ccss-position.c:
* libccss/ccss/ccss-position.h:
* libccss/ccss/ccss-property.c:
* libccss/ccss/ccss-property.h:
* libccss/ccss/ccss-selector-group-priv.h:
* libccss/ccss/ccss-selector-group.c:
* libccss/ccss/ccss-selector-group.h:
* libccss/ccss/ccss-selector.c:
* libccss/ccss/ccss-selector.h:
* libccss/ccss/ccss-style.c:
* libccss/ccss/ccss-style.h:
* libccss/ccss/ccss-stylesheet.c:
* libccss/ccss/ccss-stylesheet.h:
* libccss/ccss/ccss.c:
* libccss/ccss/ccss.h:
* libccss/ccss/exports.sym:
* libccss/doc/Makefile.am:
* libccss/doc/ccss-docs.sgml:
* libccss/doc/ccss-sections.txt:
* libccss/doc/tmpl/ccss.sgml:
* libccss/doc/tmpl/ccss_gtk_style_functions.sgml:
* libccss/doc/tmpl/node.sgml:
* libccss/doc/tmpl/selector_group.sgml:
* libccss/doc/tmpl/style.sgml:
* libccss/doc/tmpl/stylesheet.sgml:
* libccss/examples/Makefile.am:
* libccss/examples/example1.c:
* libccss/examples/internal.c:
* libccss/libccss-1.pc.in:
* src/Makefile.am:
* src/css2gtkrc.c:
* src/gce-functions.c:
* src/gce-functions.h:
* src/gce-node.c:
* src/gce-node.h:
* src/gce-rc-style.c:
* src/gce-rc-style.h:
* src/gce-serialize.c:
* src/gce-serialize.h:
* src/gce-style.c:
* src/gce-style.h:
* src/gce-theme.c:
Rename from `ccd' to `ccss'.
Added:
trunk/libccss/
- copied from r132, /trunk/libccd/
trunk/libccss/ccss/
- copied from r132, /trunk/libccd/ccd/
trunk/libccss/ccss/ccss-background.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-background.c
trunk/libccss/ccss/ccss-background.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-background.h
trunk/libccss/ccss/ccss-block.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-block.c
trunk/libccss/ccss/ccss-block.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-block.h
trunk/libccss/ccss/ccss-border.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-border.c
trunk/libccss/ccss/ccss-border.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-border.h
trunk/libccss/ccss/ccss-color.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-color.c
trunk/libccss/ccss/ccss-color.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-color.h
trunk/libccss/ccss/ccss-features.h.in
- copied, changed from r132, /trunk/libccd/ccd/ccd-features.h.in
trunk/libccss/ccss/ccss-function.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-function.c
trunk/libccss/ccss/ccss-function.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-function.h
trunk/libccss/ccss/ccss-gtk-style.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-gtk-style.c
trunk/libccss/ccss/ccss-gtk-style.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-gtk-style.h
trunk/libccss/ccss/ccss-image.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-image.c
trunk/libccss/ccss/ccss-image.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-image.h
trunk/libccss/ccss/ccss-node.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-node.c
trunk/libccss/ccss/ccss-node.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-node.h
trunk/libccss/ccss/ccss-parser.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-parser.c
trunk/libccss/ccss/ccss-parser.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-parser.h
trunk/libccss/ccss/ccss-position.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-position.c
trunk/libccss/ccss/ccss-position.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-position.h
trunk/libccss/ccss/ccss-property.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-property.c
trunk/libccss/ccss/ccss-property.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-property.h
trunk/libccss/ccss/ccss-selector-group-priv.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-selector-group-priv.h
trunk/libccss/ccss/ccss-selector-group.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-selector-group.c
trunk/libccss/ccss/ccss-selector-group.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-selector-group.h
trunk/libccss/ccss/ccss-selector.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-selector.c
trunk/libccss/ccss/ccss-selector.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-selector.h
trunk/libccss/ccss/ccss-style.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-style.c
trunk/libccss/ccss/ccss-style.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-style.h
trunk/libccss/ccss/ccss-stylesheet.c
- copied, changed from r132, /trunk/libccd/ccd/ccd-stylesheet.c
trunk/libccss/ccss/ccss-stylesheet.h
- copied, changed from r132, /trunk/libccd/ccd/ccd-stylesheet.h
trunk/libccss/ccss/ccss.c
- copied, changed from r132, /trunk/libccd/ccd/ccd.c
trunk/libccss/ccss/ccss.h
- copied, changed from r132, /trunk/libccd/ccd/ccd.h
trunk/libccss/doc/ccss-docs.sgml
- copied, changed from r132, /trunk/libccd/doc/ccd-docs.sgml
trunk/libccss/doc/ccss-sections.txt
- copied, changed from r132, /trunk/libccd/doc/ccd-sections.txt
trunk/libccss/doc/tmpl/ccss-unused.sgml
- copied, changed from r132, /trunk/libccd/doc/tmpl/ccd-unused.sgml
trunk/libccss/doc/tmpl/ccss.sgml
- copied, changed from r132, /trunk/libccd/doc/tmpl/ccd.sgml
trunk/libccss/doc/tmpl/ccss_gtk_style_functions.sgml
- copied, changed from r132, /trunk/libccd/doc/tmpl/ccd_gtk_style_functions.sgml
trunk/libccss/libccss-1.pc.in
- copied, changed from r132, /trunk/libccd/libccd-1.pc.in
Removed:
trunk/libccd/
trunk/libccss/ccd/
trunk/libccss/ccss/ccd-background.c
trunk/libccss/ccss/ccd-background.h
trunk/libccss/ccss/ccd-block.c
trunk/libccss/ccss/ccd-block.h
trunk/libccss/ccss/ccd-border.c
trunk/libccss/ccss/ccd-border.h
trunk/libccss/ccss/ccd-color.c
trunk/libccss/ccss/ccd-color.h
trunk/libccss/ccss/ccd-features.h.in
trunk/libccss/ccss/ccd-function.c
trunk/libccss/ccss/ccd-function.h
trunk/libccss/ccss/ccd-gtk-style.c
trunk/libccss/ccss/ccd-gtk-style.h
trunk/libccss/ccss/ccd-image.c
trunk/libccss/ccss/ccd-image.h
trunk/libccss/ccss/ccd-node.c
trunk/libccss/ccss/ccd-node.h
trunk/libccss/ccss/ccd-parser.c
trunk/libccss/ccss/ccd-parser.h
trunk/libccss/ccss/ccd-position.c
trunk/libccss/ccss/ccd-position.h
trunk/libccss/ccss/ccd-property.c
trunk/libccss/ccss/ccd-property.h
trunk/libccss/ccss/ccd-selector-group-priv.h
trunk/libccss/ccss/ccd-selector-group.c
trunk/libccss/ccss/ccd-selector-group.h
trunk/libccss/ccss/ccd-selector.c
trunk/libccss/ccss/ccd-selector.h
trunk/libccss/ccss/ccd-style.c
trunk/libccss/ccss/ccd-style.h
trunk/libccss/ccss/ccd-stylesheet.c
trunk/libccss/ccss/ccd-stylesheet.h
trunk/libccss/ccss/ccd.c
trunk/libccss/ccss/ccd.h
trunk/libccss/doc/ccd-docs.sgml
trunk/libccss/doc/ccd-sections.txt
trunk/libccss/doc/tmpl/ccd-unused.sgml
trunk/libccss/doc/tmpl/ccd.sgml
trunk/libccss/doc/tmpl/ccd_gtk_style_functions.sgml
trunk/libccss/libccd-1.pc.in
Modified:
trunk/ (props changed)
trunk/ChangeLog
trunk/Makefile.am
trunk/TODO
trunk/configure.in
trunk/libccss/Makefile.am
trunk/libccss/ccss/Makefile.am
trunk/libccss/ccss/exports.sym
trunk/libccss/doc/Makefile.am
trunk/libccss/doc/tmpl/node.sgml
trunk/libccss/doc/tmpl/selector_group.sgml
trunk/libccss/doc/tmpl/style.sgml
trunk/libccss/doc/tmpl/stylesheet.sgml
trunk/libccss/examples/Makefile.am
trunk/libccss/examples/example1.c
trunk/libccss/examples/internal.c
trunk/src/Makefile.am
trunk/src/css2gtkrc.c
trunk/src/gce-functions.c
trunk/src/gce-functions.h
trunk/src/gce-node.c
trunk/src/gce-node.h
trunk/src/gce-rc-style.c
trunk/src/gce-rc-style.h
trunk/src/gce-serialize.c
trunk/src/gce-serialize.h
trunk/src/gce-style.c
trunk/src/gce-style.h
trunk/src/gce-theme.c
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Mon Sep 29 09:51:02 2008
@@ -2,7 +2,7 @@
ACLOCAL_AMFLAGS = -I .
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-werror
-SUBDIRS = libccd src themes
+SUBDIRS = libccss src themes
EXTRA_DIST = \
AUTHORS \
Modified: trunk/TODO
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Mon Sep 29 09:51:02 2008
@@ -19,7 +19,7 @@
* External gtkrc-from-css tool for actually shipping themes.
-- Internals --
-* Embed `property' struct in all properties, implement ccd_selector_apply()
+* Embed `property' struct in all properties, implement ccss_selector_apply()
in a generic manner.
* Check all list iterators for const-ness.
* Make all string comparisons case insensitive?
@@ -29,7 +29,7 @@
"for (GSList const *iter = list; iter != NULL; iter = iter->next) { ... }"
Done:
-* Have an internal instance of `block' with default values, ccd_style_init()
+* Have an internal instance of `block' with default values, ccss_style_init()
initialises the style to those. Then drawing functions don't have to check
for NULL pointers any more, or, at least not handle them functionally.
* Create `color' property and use it for bg- and fg-color (in block, style, ...).
@@ -48,7 +48,7 @@
* Additional border features, e.g. `collapsed', `none'.
* Implement `inherit' as per CSS spec. Do we need our own set of attributed
inherited by default?
-* Support per-object style attributes in libccd (and maybe also the engine, but how?).
+* Support per-object style attributes in libccss (and maybe also the engine, but how?).
The node-class interface would have to be extended to support a `get_style()'
method.
* Application-specific theming, someting like "@import "gimp.css" gimp;",
@@ -66,9 +66,9 @@
* Unit tests.
* Test using the theme torturer.
* Test using valgrind.
-* Investigate splitting out ccd_css2_style_t from ccd_style_t making it
+* Investigate splitting out ccss_css2_style_t from ccss_style_t making it
an opaque "unsigned char[x]". Install only a minimal number of of required
- headers (ccd, stylesheet, selector-group, style*, node).
+ headers (ccss, stylesheet, selector-group, style*, node).
* Think about per-stylesheet node-class and functions interface.
* Bugzilla module.
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Mon Sep 29 09:51:02 2008
@@ -6,20 +6,20 @@
# Guessing some version.
AC_PREREQ(2.54)
-m4_define([ccd_version_major], [0])
-m4_define([ccd_version_minor], [2])
-m4_define([ccd_version_micro], [0])
+m4_define([ccss_version_major], [0])
+m4_define([ccss_version_minor], [2])
+m4_define([ccss_version_micro], [0])
### For the release:
-# m4_define([ccd_version_extra], [])
+# m4_define([ccss_version_extra], [])
### On trunk:
-m4_define([ccd_version_extra], [.trunk])
-m4_define([ccd_version],
- [ccd_version_major.ccd_version_minor.ccd_version_micro[]ccd_version_extra])
+m4_define([ccss_version_extra], [.trunk])
+m4_define([ccss_version],
+ [ccss_version_major.ccss_version_minor.ccss_version_micro[]ccss_version_extra])
-AC_INIT([gtk-css-engine], [ccd_version])
+AC_INIT([gtk-css-engine], [ccss_version])
AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_HEADERS([libccd/ccd/ccd-features.h])
-AC_CONFIG_SRCDIR([libccd/ccd/ccd-stylesheet.c])
+AC_CONFIG_HEADERS([libccss/ccss/ccss-features.h])
+AC_CONFIG_SRCDIR([libccss/ccss/ccss-stylesheet.c])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
@@ -35,29 +35,29 @@
dnl The easiest way is to declare no ABI compatibility, ie. AGE is always 0.
dnl
m4_define([version_iface],
- m4_eval(100 * ccd_version_major + ccd_version_minor))
+ m4_eval(100 * ccss_version_major + ccss_version_minor))
-AC_SUBST([VERSION_INFO], [version_iface:ccd_version_micro:0])
+AC_SUBST([VERSION_INFO], [version_iface:ccss_version_micro:0])
### Checks for configure arguments. ############################################
-AC_ARG_ENABLE([libccd],
- [AS_HELP_STRING([--enable-libccd], [build standalone libccd])],
+AC_ARG_ENABLE([libccss],
+ [AS_HELP_STRING([--enable-libccss], [build standalone libccss])],
[
case "$enableval" in
yes ) ;;
no ) ;;
- * ) enable_libccd="yes" ;;
+ * ) enable_libccss="yes" ;;
esac
], [
- enable_libccd="no"
+ enable_libccss="no"
])
-if test "$enable_libccd" == "yes"; then
- AC_DEFINE([CCD_STANDALONE], [1], [build standalone libccd])
+if test "$enable_libccss" == "yes"; then
+ AC_DEFINE([CCSS_STANDALONE], [1], [build standalone libccss])
fi
-AM_CONDITIONAL([CCD_STANDALONE], test "$enable_libccd" == "yes")
+AM_CONDITIONAL([CCSS_STANDALONE], test "$enable_libccss" == "yes")
AC_ARG_ENABLE([debug],
@@ -69,10 +69,10 @@
])
if test "$enable_debug" == "yes"; then
- AC_DEFINE([CCD_DEBUG], [1], [enable debug code])
+ AC_DEFINE([CCSS_DEBUG], [1], [enable debug code])
CFLAGS="-g -O0 ${CFLAGS}"
fi
-AM_CONDITIONAL([CCD_DEBUG], test "$enable_debug" == "yes")
+AM_CONDITIONAL([CCSS_DEBUG], test "$enable_debug" == "yes")
# So usually one just sets CFLAGS for this, but a configure
# arguments lets us force this when running `make distcheck'.
@@ -88,6 +88,7 @@
### Checks for programs. #######################################################
AC_PROG_CC
+AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
@@ -121,7 +122,7 @@
enable_libcroco_workaround="yes"
])
if test "$enable_libcroco_workaround" = "yes"; then
- AC_DEFINE([CCD_ENABLE_LIBCROCO_WORKAROUND], [1], [Work around libcroco issue #553937])
+ AC_DEFINE([CCSS_ENABLE_LIBCROCO_WORKAROUND], [1], [Work around libcroco issue #553937])
fi
# Guessing a version.
@@ -135,9 +136,9 @@
])
if test "$with_rsvg" = "yes"; then
- AC_DEFINE([CCD_WITH_RSVG], [1], [SVG support through librsvg])
+ AC_DEFINE([CCSS_WITH_RSVG], [1], [SVG support through librsvg])
fi
-AM_CONDITIONAL([CCD_WITH_RSVG], [test "$with_rsvg" = "yes"])
+AM_CONDITIONAL([CCSS_WITH_RSVG], [test "$with_rsvg" = "yes"])
soup_req='libsoup-2.4'
PKG_CHECK_EXISTS([ $soup_req ],
@@ -149,22 +150,22 @@
])
if test "$with_soup" = "yes"; then
- AC_DEFINE([CCD_WITH_SOUP], [1], [URI parsing support through libsoup])
+ AC_DEFINE([CCSS_WITH_SOUP], [1], [URI parsing support through libsoup])
fi
-AM_CONDITIONAL([CCD_WITH_SOUP], [test "$with_soup" = "yes"])
+AM_CONDITIONAL([CCSS_WITH_SOUP], [test "$with_soup" = "yes"])
-PKG_CHECK_MODULES(CCD, $pkgs)
+PKG_CHECK_MODULES(CCSS, $pkgs)
-AC_SUBST([CCD_CFLAGS])
-AC_SUBST([CCD_LIBS])
-AC_SUBST([CCD_DEPS], $pkgs)
+AC_SUBST([CCSS_CFLAGS])
+AC_SUBST([CCSS_LIBS])
+AC_SUBST([CCSS_DEPS], $pkgs)
-AC_DEFINE([CCD_WITH_GTK], [1], [Support for drawing Gtk+ primitives like `box-gap'])
-AM_CONDITIONAL([CCD_WITH_GTK], [test "yes" = "yes"])
+AC_DEFINE([CCSS_WITH_GTK], [1], [Support for drawing Gtk+ primitives like `box-gap'])
+AM_CONDITIONAL([CCSS_WITH_GTK], [test "yes" = "yes"])
-AC_SUBST([GCE_CFLAGS], [$CCD_CFLAGS])
-AC_SUBST([GCE_LIBS], [$CCD_LIBS])
+AC_SUBST([GCE_CFLAGS], [$CCSS_CFLAGS])
+AC_SUBST([GCE_LIBS], [$CCSS_LIBS])
GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
AC_SUBST(GTK_VERSION)
@@ -203,12 +204,12 @@
AC_CONFIG_FILES([
Makefile
- libccd/Makefile
- libccd/libccd-1.pc
- libccd/ccd/Makefile
- libccd/doc/Makefile
- libccd/doc/version.xml
- libccd/examples/Makefile
+ libccss/Makefile
+ libccss/libccss-1.pc
+ libccss/ccss/Makefile
+ libccss/doc/Makefile
+ libccss/doc/version.xml
+ libccss/examples/Makefile
src/Makefile
themes/Makefile
themes/Gilouche-CSS/Makefile
@@ -221,7 +222,7 @@
Configuration
CFLAGS ${CFLAGS}
Build debugging code $enable_debug
- Standalone libccd $enable_libccd
+ Standalone libccss $enable_libccss
Support for SVG images $with_rsvg (requires librsvg)
WIP Support for SVG fragments $with_soup (requires libsoup)
"
Modified: trunk/libccss/Makefile.am
==============================================================================
--- /trunk/libccd/Makefile.am (original)
+++ trunk/libccss/Makefile.am Mon Sep 29 09:51:02 2008
@@ -1,15 +1,15 @@
-SUBDIRS = ccd doc
+SUBDIRS = ccss doc
-if CCD_WITH_GTK
+if CCSS_WITH_GTK
SUBDIRS += examples
endif
-if CCD_STANDALONE
+if CCSS_STANDALONE
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libccd-1.pc
+pkgconfig_DATA = libccss-1.pc
endif
EXTRA_DIST = \
- libccd-1.pc.in
+ libccss-1.pc.in
Modified: trunk/libccss/ccss/Makefile.am
==============================================================================
--- /trunk/libccd/ccd/Makefile.am (original)
+++ trunk/libccss/ccss/Makefile.am Mon Sep 29 09:51:02 2008
@@ -1,86 +1,86 @@
AM_CPPFLAGS = \
- $(CCD_CFLAGS) \
- -I$(top_srcdir)/libccd \
- -I$(top_builddir)/libccd
-
-if CCD_STANDALONE
-lib_LTLIBRARIES = libccd-1.la
-libccd_1_la_LDFLAGS = -no-undefined -version-info $(VERSION_INFO)
-if CCD_DEBUG
+ $(CCSS_CFLAGS) \
+ -I$(top_srcdir)/libccss \
+ -I$(top_builddir)/libccss
+
+if CCSS_STANDALONE
+lib_LTLIBRARIES = libccss-1.la
+libccss_1_la_LDFLAGS = -no-undefined -version-info $(VERSION_INFO)
+if CCSS_DEBUG
else
-libccd_1_la_LDFLAGS += -export-symbols $(srcdir)/exports.sym
+libccss_1_la_LDFLAGS += -export-symbols $(srcdir)/exports.sym
endif
-headersdir = $(includedir)/libccd-1/ccd
+headersdir = $(includedir)/libccss-1/ccss
headers_DATA = \
- ccd-background.h \
- ccd-block.h \
- ccd-border.h \
- ccd-color.h \
- ccd-features.h \
- ccd-function.h \
- ccd.h \
- ccd-image.h \
- ccd-node.h \
- ccd-position.h \
- ccd-property.h \
- ccd-selector-group.h \
- ccd-selector.h \
- ccd-style.h \
- ccd-stylesheet.h
-if CCD_WITH_GTK
+ ccss-background.h \
+ ccss-block.h \
+ ccss-border.h \
+ ccss-color.h \
+ ccss-features.h \
+ ccss-function.h \
+ ccss.h \
+ ccss-image.h \
+ ccss-node.h \
+ ccss-position.h \
+ ccss-property.h \
+ ccss-selector-group.h \
+ ccss-selector.h \
+ ccss-style.h \
+ ccss-stylesheet.h
+if CCSS_WITH_GTK
headers_DATA += \
- ccd-gtk-style.h
+ ccss-gtk-style.h
endif
else
-noinst_LTLIBRARIES = libccd-1.la
+noinst_LTLIBRARIES = libccss-1.la
endif
-libccd_1_la_SOURCES = \
- ccd-background.c \
- ccd-background.h \
- ccd-block.c \
- ccd-block.h \
- ccd-border.c \
- ccd-border.h \
- ccd-color.c \
- ccd-color.h \
- ccd-features.h \
- ccd-function.c \
- ccd-function.h \
- ccd.c \
- ccd.h \
- ccd-image.c \
- ccd-image.h \
- ccd-node.c \
- ccd-node.h \
- ccd-parser.c \
- ccd-parser.h \
- ccd-position.c \
- ccd-position.h \
- ccd-property.c \
- ccd-property.h \
- ccd-selector-group.c \
- ccd-selector-group.h \
- ccd-selector-group-priv.h \
- ccd-selector.c \
- ccd-selector.h \
- ccd-style.c \
- ccd-style.h \
- ccd-stylesheet.c \
- ccd-stylesheet.h
+libccss_1_la_SOURCES = \
+ ccss-background.c \
+ ccss-background.h \
+ ccss-block.c \
+ ccss-block.h \
+ ccss-border.c \
+ ccss-border.h \
+ ccss-color.c \
+ ccss-color.h \
+ ccss-features.h \
+ ccss-function.c \
+ ccss-function.h \
+ ccss.c \
+ ccss.h \
+ ccss-image.c \
+ ccss-image.h \
+ ccss-node.c \
+ ccss-node.h \
+ ccss-parser.c \
+ ccss-parser.h \
+ ccss-position.c \
+ ccss-position.h \
+ ccss-property.c \
+ ccss-property.h \
+ ccss-selector-group.c \
+ ccss-selector-group.h \
+ ccss-selector-group-priv.h \
+ ccss-selector.c \
+ ccss-selector.h \
+ ccss-style.c \
+ ccss-style.h \
+ ccss-stylesheet.c \
+ ccss-stylesheet.h
opt_src =
-if CCD_WITH_GTK
-libccd_1_la_SOURCES += \
- ccd-gtk-style.c \
- ccd-gtk-style.h
-opt_src += $(libccd_1_la_SOURCES)
+if CCSS_WITH_GTK
+libccss_1_la_SOURCES += \
+ ccss-gtk-style.c \
+ ccss-gtk-style.h
+opt_src += $(libccss_1_la_SOURCES)
endif
EXTRA_DIST = \
$(opt_src) \
- ccd-features.h.in \
+ ccss-features.h.in \
exports.sym
Copied: trunk/libccss/ccss/ccss-background.c (from r132, /trunk/libccd/ccd/ccd-background.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-background.c (original)
+++ trunk/libccss/ccss/ccss-background.c Mon Sep 29 09:51:02 2008
@@ -19,42 +19,42 @@
#include <math.h>
#include <string.h>
-#include "ccd-background.h"
+#include "ccss-background.h"
static const struct {
char const *name;
- const enum ccd_background_repeat repeat;
+ const enum ccss_background_repeat repeat;
} _repeat_map[] = {
- { "repeat", CCD_BACKGROUND_REPEAT },
- { "repeat-x", CCD_BACKGROUND_REPEAT_X },
- { "repeat-y", CCD_BACKGROUND_REPEAT_Y },
- { "no-repeat", CCD_BACKGROUND_NO_REPEAT }
+ { "repeat", CCSS_BACKGROUND_REPEAT },
+ { "repeat-x", CCSS_BACKGROUND_REPEAT_X },
+ { "repeat-y", CCSS_BACKGROUND_REPEAT_Y },
+ { "no-repeat", CCSS_BACKGROUND_NO_REPEAT }
};
-ccd_background_t *
-ccd_background_new (void)
+ccss_background_t *
+ccss_background_new (void)
{
- return g_new0 (ccd_background_t, 1);
+ return g_new0 (ccss_background_t, 1);
}
void
-ccd_background_free (ccd_background_t *self)
+ccss_background_free (ccss_background_t *self)
{
g_free (self);
}
static bool
-bg_attachment_parse (ccd_background_attachment_t *self,
+bg_attachment_parse (ccss_background_attachment_t *self,
CRTerm const **values)
{
- ccd_property_spec_t spec;
+ ccss_property_spec_t spec;
if (!*values) {
return false;
}
- spec = ccd_property_parse_spec (values);
- if (CCD_PROPERTY_SPEC_INHERIT == spec) {
+ spec = ccss_property_parse_spec (values);
+ if (CCSS_PROPERTY_SPEC_INHERIT == spec) {
self->spec = spec;
return true;
}
@@ -63,13 +63,13 @@
char const *attachment;
attachment = cr_string_peek_raw_str ((*values)->content.str);
if (0 == g_ascii_strcasecmp ("scroll", attachment)) {
- self->attachment = CCD_BACKGROUND_SCROLL;
- self->spec = CCD_PROPERTY_SPEC_SET;
+ self->attachment = CCSS_BACKGROUND_SCROLL;
+ self->spec = CCSS_PROPERTY_SPEC_SET;
*values = (*values)->next;
return true;
} else if (0 == g_ascii_strcasecmp ("fixed", attachment)) {
- self->attachment = CCD_BACKGROUND_FIXED;
- self->spec = CCD_PROPERTY_SPEC_SET;
+ self->attachment = CCSS_BACKGROUND_FIXED;
+ self->spec = CCSS_PROPERTY_SPEC_SET;
*values = (*values)->next;
return true;
}
@@ -79,22 +79,22 @@
}
static bool
-bg_image_parse (ccd_background_image_t *self,
+bg_image_parse (ccss_background_image_t *self,
CRTerm const **values)
{
if (!*values) {
return false;
}
- self->spec = ccd_image_parse (&self->image, values);
- return self->spec == CCD_PROPERTY_SPEC_SET;
+ self->spec = ccss_image_parse (&self->image, values);
+ return self->spec == CCSS_PROPERTY_SPEC_SET;
}
static bool
-bg_position_parse (ccd_background_position_t *self,
+bg_position_parse (ccss_background_position_t *self,
CRTerm const **values)
{
- ccd_property_spec_t spec;
+ ccss_property_spec_t spec;
uint32_t flags;
bool have_hpos;
bool have_vpos;
@@ -103,33 +103,33 @@
return false;
}
- spec = ccd_property_parse_spec (values);
- if (CCD_PROPERTY_SPEC_INHERIT == spec) {
+ spec = ccss_property_parse_spec (values);
+ if (CCSS_PROPERTY_SPEC_INHERIT == spec) {
/* Not implemented yet. */
g_assert_not_reached ();
- self->spec = CCD_PROPERTY_SPEC_UNSET;
+ self->spec = CCSS_PROPERTY_SPEC_UNSET;
return false;
}
- flags = CCD_POSITION_MASK_NUMERIC | CCD_POSITION_MASK_HORIZONTAL;
- have_hpos = ccd_position_parse (&self->hpos, flags, values);
+ flags = CCSS_POSITION_MASK_NUMERIC | CCSS_POSITION_MASK_HORIZONTAL;
+ have_hpos = ccss_position_parse (&self->hpos, flags, values);
if (!have_hpos) {
- self->spec = CCD_PROPERTY_SPEC_UNSET;
+ self->spec = CCSS_PROPERTY_SPEC_UNSET;
return false;
}
- flags = CCD_POSITION_MASK_NUMERIC | CCD_POSITION_MASK_VERTICAL;
- have_vpos = ccd_position_parse (&self->vpos, flags, values);
+ flags = CCSS_POSITION_MASK_NUMERIC | CCSS_POSITION_MASK_VERTICAL;
+ have_vpos = ccss_position_parse (&self->vpos, flags, values);
if (have_hpos && !have_vpos) {
/* Fall back to `center' for vpos.
* http://www.w3.org/TR/CSS21/colors.html#propdef-background-position */
- self->vpos.type = CCD_POSITION_PERCENTAGE;
+ self->vpos.type = CCSS_POSITION_PERCENTAGE;
self->vpos.value = 50;
}
/* A bit fuzzy, but let's say we're satisfied with `hpos' only. */
if (have_hpos) {
- self->spec = CCD_PROPERTY_SPEC_SET;
+ self->spec = CCSS_PROPERTY_SPEC_SET;
return true;
}
@@ -137,11 +137,11 @@
}
static bool
-bg_repeat_parse (ccd_background_repeat_t *self,
+bg_repeat_parse (ccss_background_repeat_t *self,
CRTerm const **values)
{
char const *repeat;
- ccd_property_spec_t spec;
+ ccss_property_spec_t spec;
if (!*values || (*values)->type != TERM_IDENT) {
return false;
@@ -151,7 +151,7 @@
for (unsigned int i = 0; i < G_N_ELEMENTS (_repeat_map); i++) {
if (0 == g_ascii_strcasecmp (_repeat_map[i].name, repeat)) {
self->repeat = _repeat_map[i].repeat;
- self->spec = CCD_PROPERTY_SPEC_SET;
+ self->spec = CCSS_PROPERTY_SPEC_SET;
*values = (*values)->next;
return true;
}
@@ -159,18 +159,18 @@
/* Not found, maybe a generic property?
* Only `inherit' is allowed anyway. */
- spec = ccd_property_parse_spec (values);
- if (spec == CCD_PROPERTY_SPEC_INHERIT) {
+ spec = ccss_property_parse_spec (values);
+ if (spec == CCSS_PROPERTY_SPEC_INHERIT) {
self->spec = spec;
return true;
} else {
- self->spec = CCD_PROPERTY_SPEC_UNSET;
+ self->spec = CCSS_PROPERTY_SPEC_UNSET;
return false;
}
}
static bool
-bg_size_parse (ccd_background_size_t *self,
+bg_size_parse (ccss_background_size_t *self,
CRTerm const **values)
{
uint32_t flags;
@@ -180,29 +180,29 @@
return false;
}
- flags = CCD_POSITION_MASK_NUMERIC | CCD_POSITION_MASK_AUTO;
- ret = ccd_position_parse (&self->width, flags, values);
+ flags = CCSS_POSITION_MASK_NUMERIC | CCSS_POSITION_MASK_AUTO;
+ ret = ccss_position_parse (&self->width, flags, values);
if (!ret) {
return false;
}
- if (CCD_POSITION_CONTAIN == self->width.type ||
- CCD_POSITION_COVER == self->width.type) {
+ if (CCSS_POSITION_CONTAIN == self->width.type ||
+ CCSS_POSITION_COVER == self->width.type) {
self->height.type = self->width.type;
- self->spec = CCD_PROPERTY_SPEC_SET;
+ self->spec = CCSS_PROPERTY_SPEC_SET;
return true;
}
- if (CCD_POSITION_MASK_NUMERIC & self->width.type ||
- CCD_POSITION_AUTO == self->width.type) {
- flags = CCD_POSITION_MASK_NUMERIC | CCD_POSITION_MASK_AUTO;
- ret = ccd_position_parse (&self->height, flags, values);
+ if (CCSS_POSITION_MASK_NUMERIC & self->width.type ||
+ CCSS_POSITION_AUTO == self->width.type) {
+ flags = CCSS_POSITION_MASK_NUMERIC | CCSS_POSITION_MASK_AUTO;
+ ret = ccss_position_parse (&self->height, flags, values);
if (ret) {
- self->spec = CCD_PROPERTY_SPEC_SET;
+ self->spec = CCSS_PROPERTY_SPEC_SET;
return true;
} else {
- self->height.type = CCD_POSITION_AUTO;
- self->spec = CCD_PROPERTY_SPEC_SET;
+ self->height.type = CCSS_POSITION_AUTO;
+ self->spec = CCSS_PROPERTY_SPEC_SET;
return true;
}
}
@@ -211,7 +211,7 @@
}
bool
-ccd_background_parse (ccd_background_t *self,
+ccss_background_parse (ccss_background_t *self,
char const *property,
CRTerm const *values)
{
@@ -223,7 +223,7 @@
/* TODO: also support `background-size' here, but let's stick
* to CSS2 for now. */
- ret = ccd_color_parse (&self->bg_color, &values);
+ ret = ccss_color_parse (&self->bg_color, &values);
if (ret && values == NULL)
return true;
else if (!ret)
@@ -261,7 +261,7 @@
if (0 == strcmp ("background-color", property)) {
- return ccd_color_parse (&self->bg_color, &values);
+ return ccss_color_parse (&self->bg_color, &values);
}
if (0 == strcmp ("background-image", property)) {
@@ -288,7 +288,7 @@
}
static cairo_pattern_t *
-create_pattern (ccd_background_image_t const *bg_image,
+create_pattern (ccss_background_image_t const *bg_image,
double width,
double height,
double tile_width,
@@ -326,7 +326,7 @@
}
static void
-repeat (ccd_background_image_t const *bg_image,
+repeat (ccss_background_image_t const *bg_image,
cairo_t *cr,
int32_t width,
int32_t height,
@@ -348,7 +348,7 @@
}
static void
-repeat_x (ccd_background_image_t const *bg_image,
+repeat_x (ccss_background_image_t const *bg_image,
cairo_t *cr,
int32_t width,
int32_t height,
@@ -370,7 +370,7 @@
}
static void
-repeat_y (ccd_background_image_t const *bg_image,
+repeat_y (ccss_background_image_t const *bg_image,
cairo_t *cr,
int32_t width,
int32_t height,
@@ -392,7 +392,7 @@
}
static void
-no_repeat (ccd_background_image_t const *bg_image,
+no_repeat (ccss_background_image_t const *bg_image,
cairo_t *cr,
int32_t width,
int32_t height)
@@ -403,18 +403,18 @@
}
/**
- * ccd_background_fill:
+ * ccss_background_fill:
*
* This function requires that a closed path exists, which is filled with
* the background. The path is not modified.
**/
void
-ccd_background_fill (ccd_background_attachment_t const *bg_attachment,
- ccd_color_t const *bg_color,
- ccd_background_image_t const *bg_image,
- ccd_background_position_t const *bg_position,
- ccd_background_repeat_t const *bg_repeat,
- ccd_background_size_t const *bg_size,
+ccss_background_fill (ccss_background_attachment_t const *bg_attachment,
+ ccss_color_t const *bg_color,
+ ccss_background_image_t const *bg_image,
+ ccss_background_position_t const *bg_position,
+ ccss_background_repeat_t const *bg_repeat,
+ ccss_background_size_t const *bg_size,
cairo_t *cr,
int32_t x,
int32_t y,
@@ -434,7 +434,7 @@
cairo_save (cr);
- if (ccd_property_is_set (bg_color->spec)) {
+ if (ccss_property_is_set (bg_color->spec)) {
cairo_set_source_rgb (cr, bg_color->red,
bg_color->green,
@@ -442,32 +442,32 @@
cairo_fill_preserve (cr);
}
- if (ccd_property_is_set (bg_image->spec)) {
+ if (ccss_property_is_set (bg_image->spec)) {
double tile_width;
double tile_height;
double xoff;
double yoff;
- tile_width = ccd_position_get_hsize (&bg_size->width,
+ tile_width = ccss_position_get_hsize (&bg_size->width,
width, height,
bg_image->image.width,
bg_image->image.height);
- tile_height = ccd_position_get_vsize (&bg_size->height,
+ tile_height = ccss_position_get_vsize (&bg_size->height,
width, height,
bg_image->image.width,
bg_image->image.height);
- xoff = ccd_position_get_pos (&bg_position->hpos,
+ xoff = ccss_position_get_pos (&bg_position->hpos,
width, tile_width);
- yoff = ccd_position_get_pos (&bg_position->vpos,
+ yoff = ccss_position_get_pos (&bg_position->vpos,
height, tile_height);
dx = tile_width / bg_image->image.width;
dy = tile_height / bg_image->image.height;
switch (bg_repeat->repeat) {
- case CCD_BACKGROUND_REPEAT:
+ case CCSS_BACKGROUND_REPEAT:
/* Normalise offsets, we don't create an infinite
* background pattern. */
xoff = fmod (xoff, tile_width) - tile_width;
@@ -480,7 +480,7 @@
repeat (bg_image, cr, width / dx, height / dy,
tile_width / dx, tile_height / dy);
break;
- case CCD_BACKGROUND_REPEAT_X:
+ case CCSS_BACKGROUND_REPEAT_X:
/* Normalise vertical offset, we don't create an infinite
* background pattern. */
xoff = fmod (xoff, tile_width) - tile_width;
@@ -492,7 +492,7 @@
repeat_x (bg_image, cr, width / dx, height / dy,
tile_width / dx, tile_height / dy);
break;
- case CCD_BACKGROUND_REPEAT_Y:
+ case CCSS_BACKGROUND_REPEAT_Y:
/* Normalise horizontal offset, we don't create an infinite
* background pattern. */
yoff = fmod (yoff, tile_height) - tile_height;
@@ -504,7 +504,7 @@
repeat_y (bg_image, cr, width / dx, height / dy,
tile_width / dx, tile_height / dy);
break;
- case CCD_BACKGROUND_NO_REPEAT:
+ case CCSS_BACKGROUND_NO_REPEAT:
/* FIXME: not rounding can make the background edges
* blurry, but when rounding we might be 1px off.
cairo_translate (cr, x + lround (xoff), y + lround (yoff)); */
@@ -527,38 +527,38 @@
cairo_restore (cr);
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
void
-ccd_background_dump (ccd_background_t const *self)
+ccss_background_dump (ccss_background_t const *self)
{
- printf (CCD_PROPERTY_DUMP_PREFIX "background-color: ");
- ccd_color_dump (&self->bg_color);
+ printf (CCSS_PROPERTY_DUMP_PREFIX "background-color: ");
+ ccss_color_dump (&self->bg_color);
printf (";\n");
- printf (CCD_PROPERTY_DUMP_PREFIX "background-image: ");
- ccd_background_image_dump (&self->bg_image);
+ printf (CCSS_PROPERTY_DUMP_PREFIX "background-image: ");
+ ccss_background_image_dump (&self->bg_image);
printf (";\n");
}
// TODO dump functions
void
-ccd_background_image_dump (ccd_background_image_t const *self)
+ccss_background_image_dump (ccss_background_image_t const *self)
{
switch (self->spec) {
- case CCD_PROPERTY_SPEC_UNSET:
- case CCD_PROPERTY_SPEC_NONE:
- ccd_property_spec_dump (self->spec);
+ case CCSS_PROPERTY_SPEC_UNSET:
+ case CCSS_PROPERTY_SPEC_NONE:
+ ccss_property_spec_dump (self->spec);
break;
- case CCD_PROPERTY_SPEC_INHERIT:
- ccd_property_spec_dump (self->spec);
+ case CCSS_PROPERTY_SPEC_INHERIT:
+ ccss_property_spec_dump (self->spec);
/* fall thru */
- case CCD_PROPERTY_SPEC_SET:
- ccd_image_dump (&self->image);
+ case CCSS_PROPERTY_SPEC_SET:
+ ccss_image_dump (&self->image);
break;
}
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-background.h (from r132, /trunk/libccd/ccd/ccd-background.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-background.h (original)
+++ trunk/libccss/ccss/ccss-background.h Mon Sep 29 09:51:02 2008
@@ -17,87 +17,87 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_BACKGROUND_H
-#define CCD_BACKGROUND_H
+#ifndef CCSS_BACKGROUND_H
+#define CCSS_BACKGROUND_H
#include <stdbool.h>
#include <stdint.h>
#include <cairo.h>
#include <glib.h>
#include <libcroco/libcroco.h>
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-color.h>
-#include <ccd/ccd-image.h>
-#include <ccd/ccd-position.h>
-#include <ccd/ccd-property.h>
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-color.h>
+#include <ccss/ccss-image.h>
+#include <ccss/ccss-position.h>
+#include <ccss/ccss-property.h>
G_BEGIN_DECLS
typedef struct {
- ccd_property_spec_t spec;
- enum ccd_background_attachment {
- CCD_BACKGROUND_SCROLL,
- CCD_BACKGROUND_FIXED
+ ccss_property_spec_t spec;
+ enum ccss_background_attachment {
+ CCSS_BACKGROUND_SCROLL,
+ CCSS_BACKGROUND_FIXED
} attachment;
-} ccd_background_attachment_t;
+} ccss_background_attachment_t;
typedef struct {
- ccd_property_spec_t spec;
- ccd_image_t image;
-} ccd_background_image_t;
+ ccss_property_spec_t spec;
+ ccss_image_t image;
+} ccss_background_image_t;
typedef struct {
- ccd_property_spec_t spec;
- ccd_position_t hpos;
- ccd_position_t vpos;
-} ccd_background_position_t;
+ ccss_property_spec_t spec;
+ ccss_position_t hpos;
+ ccss_position_t vpos;
+} ccss_background_position_t;
typedef struct {
- ccd_property_spec_t spec;
- enum ccd_background_repeat {
- CCD_BACKGROUND_REPEAT = 0,
- CCD_BACKGROUND_REPEAT_X,
- CCD_BACKGROUND_REPEAT_Y,
- CCD_BACKGROUND_NO_REPEAT
+ ccss_property_spec_t spec;
+ enum ccss_background_repeat {
+ CCSS_BACKGROUND_REPEAT = 0,
+ CCSS_BACKGROUND_REPEAT_X,
+ CCSS_BACKGROUND_REPEAT_Y,
+ CCSS_BACKGROUND_NO_REPEAT
} repeat;
-} ccd_background_repeat_t;
+} ccss_background_repeat_t;
typedef struct {
- ccd_property_spec_t spec;
- ccd_position_t width;
- ccd_position_t height;
-} ccd_background_size_t;
+ ccss_property_spec_t spec;
+ ccss_position_t width;
+ ccss_position_t height;
+} ccss_background_size_t;
typedef struct {
- ccd_background_attachment_t bg_attachment;
- ccd_color_t bg_color;
- ccd_background_image_t bg_image;
- ccd_background_position_t bg_position;
- ccd_background_repeat_t bg_repeat;
- ccd_background_size_t bg_size;
-} ccd_background_t;
+ ccss_background_attachment_t bg_attachment;
+ ccss_color_t bg_color;
+ ccss_background_image_t bg_image;
+ ccss_background_position_t bg_position;
+ ccss_background_repeat_t bg_repeat;
+ ccss_background_size_t bg_size;
+} ccss_background_t;
-ccd_background_t * ccd_background_new (void);
-void ccd_background_free (ccd_background_t *self);
+ccss_background_t * ccss_background_new (void);
+void ccss_background_free (ccss_background_t *self);
-bool ccd_background_parse (ccd_background_t *self, char const *property,
+bool ccss_background_parse (ccss_background_t *self, char const *property,
CRTerm const *values);
-void ccd_background_fill (ccd_background_attachment_t const *bg_attachment,
- ccd_color_t const *bg_color,
- ccd_background_image_t const *bg_image,
- ccd_background_position_t const *bg_position,
- ccd_background_repeat_t const *bg_repeat,
- ccd_background_size_t const *bg_size,
+void ccss_background_fill (ccss_background_attachment_t const *bg_attachment,
+ ccss_color_t const *bg_color,
+ ccss_background_image_t const *bg_image,
+ ccss_background_position_t const *bg_position,
+ ccss_background_repeat_t const *bg_repeat,
+ ccss_background_size_t const *bg_size,
cairo_t *cr, int32_t x, int32_t y,
int32_t width, int32_t height);
-#ifdef CCD_DEBUG
-void ccd_background_dump (ccd_background_t const *self);
-void ccd_background_image_dump (ccd_background_image_t const *self);
+#ifdef CCSS_DEBUG
+void ccss_background_dump (ccss_background_t const *self);
+void ccss_background_image_dump (ccss_background_image_t const *self);
#endif
G_END_DECLS
-#endif /* CCD_BACKGROUND_H */
+#endif /* CCSS_BACKGROUND_H */
Copied: trunk/libccss/ccss/ccss-block.c (from r132, /trunk/libccd/ccd/ccd-block.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-block.c (original)
+++ trunk/libccss/ccss/ccss-block.c Mon Sep 29 09:51:02 2008
@@ -17,35 +17,35 @@
* MA 02110-1301, USA.
*/
-#include "ccd-block.h"
+#include "ccss-block.h"
-ccd_block_t *
-ccd_block_new (void)
+ccss_block_t *
+ccss_block_new (void)
{
- ccd_block_t *self;
+ ccss_block_t *self;
- self = g_new0 (ccd_block_t, 1);
+ self = g_new0 (ccss_block_t, 1);
return self;
}
void
-ccd_block_free (ccd_block_t *self)
+ccss_block_free (ccss_block_t *self)
{
g_assert (self);
g_free (self);
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
void
-ccd_block_dump (ccd_block_t const *self)
+ccss_block_dump (ccss_block_t const *self)
{
- ccd_background_dump (&self->background);
- ccd_border_dump (&self->border);
- ccd_color_dump (&self->color);
+ ccss_background_dump (&self->background);
+ ccss_border_dump (&self->border);
+ ccss_color_dump (&self->color);
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-block.h (from r132, /trunk/libccd/ccd/ccd-block.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-block.h (original)
+++ trunk/libccss/ccss/ccss-block.h Mon Sep 29 09:51:02 2008
@@ -17,34 +17,34 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_BLOCK_H
-#define CCD_BLOCK_H
+#ifndef CCSS_BLOCK_H
+#define CCSS_BLOCK_H
#include <glib.h>
#include <cairo.h>
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-color.h>
-#include <ccd/ccd-background.h>
-#include <ccd/ccd-border.h>
-#include <ccd/ccd-property.h>
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-color.h>
+#include <ccss/ccss-background.h>
+#include <ccss/ccss-border.h>
+#include <ccss/ccss-property.h>
G_BEGIN_DECLS
typedef struct {
/*< private >*/
- ccd_background_t background;
- ccd_border_t border;
- ccd_color_t color;
-} ccd_block_t;
+ ccss_background_t background;
+ ccss_border_t border;
+ ccss_color_t color;
+} ccss_block_t;
-ccd_block_t * ccd_block_new (void);
-void ccd_block_free (ccd_block_t *self);
+ccss_block_t * ccss_block_new (void);
+void ccss_block_free (ccss_block_t *self);
-#ifdef CCD_DEBUG
-void ccd_block_dump (ccd_block_t const *self);
+#ifdef CCSS_DEBUG
+void ccss_block_dump (ccss_block_t const *self);
#endif
G_END_DECLS
-#endif /* CCD_BLOCK_H */
+#endif /* CCSS_BLOCK_H */
Copied: trunk/libccss/ccss/ccss-border.c (from r132, /trunk/libccd/ccd/ccd-border.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-border.c (original)
+++ trunk/libccss/ccss/ccss-border.c Mon Sep 29 09:51:02 2008
@@ -20,111 +20,111 @@
#include <math.h>
#include <stdio.h>
#include <string.h>
-#include "ccd-border.h"
+#include "ccss-border.h"
/*
* Remember which properties were set explicitely, e.g. using "border-top",
* so it's not overwritten by a subsequent "border" property.
*/
enum {
- CCD_BORDER_FLAGS_COMMON_WIDTH = 1 << 0,
- CCD_BORDER_FLAGS_SPECIFIC_WIDTH = 1 << 1,
- CCD_BORDER_FLAGS_WIDTH_MASK = CCD_BORDER_FLAGS_COMMON_WIDTH |
- CCD_BORDER_FLAGS_SPECIFIC_WIDTH,
-
- CCD_BORDER_FLAGS_COMMON_STYLE = 1 << 2,
- CCD_BORDER_FLAGS_SPECIFIC_STYLE = 1 << 3,
- CCD_BORDER_FLAGS_STYLE_MASK = CCD_BORDER_FLAGS_COMMON_STYLE |
- CCD_BORDER_FLAGS_SPECIFIC_STYLE,
-
- CCD_BORDER_FLAGS_COMMON_COLOR = 1 << 4,
- CCD_BORDER_FLAGS_SPECIFIC_COLOR = 1 << 5,
- CCD_BORDER_FLAGS_COLOR_MASK = CCD_BORDER_FLAGS_COMMON_COLOR |
- CCD_BORDER_FLAGS_SPECIFIC_COLOR,
-
- CCD_BORDER_FLAGS_COMMON_RADIUS = 1 << 6,
- CCD_BORDER_FLAGS_SPECIFIC_RADIUS = 1 << 7,
- CCD_BORDER_FLAGS_RADIUS_MASK = CCD_BORDER_FLAGS_COMMON_RADIUS |
- CCD_BORDER_FLAGS_SPECIFIC_RADIUS
+ CCSS_BORDER_FLAGS_COMMON_WIDTH = 1 << 0,
+ CCSS_BORDER_FLAGS_SPECIFIC_WIDTH = 1 << 1,
+ CCSS_BORDER_FLAGS_WIDTH_MASK = CCSS_BORDER_FLAGS_COMMON_WIDTH |
+ CCSS_BORDER_FLAGS_SPECIFIC_WIDTH,
+
+ CCSS_BORDER_FLAGS_COMMON_STYLE = 1 << 2,
+ CCSS_BORDER_FLAGS_SPECIFIC_STYLE = 1 << 3,
+ CCSS_BORDER_FLAGS_STYLE_MASK = CCSS_BORDER_FLAGS_COMMON_STYLE |
+ CCSS_BORDER_FLAGS_SPECIFIC_STYLE,
+
+ CCSS_BORDER_FLAGS_COMMON_COLOR = 1 << 4,
+ CCSS_BORDER_FLAGS_SPECIFIC_COLOR = 1 << 5,
+ CCSS_BORDER_FLAGS_COLOR_MASK = CCSS_BORDER_FLAGS_COMMON_COLOR |
+ CCSS_BORDER_FLAGS_SPECIFIC_COLOR,
+
+ CCSS_BORDER_FLAGS_COMMON_RADIUS = 1 << 6,
+ CCSS_BORDER_FLAGS_SPECIFIC_RADIUS = 1 << 7,
+ CCSS_BORDER_FLAGS_RADIUS_MASK = CCSS_BORDER_FLAGS_COMMON_RADIUS |
+ CCSS_BORDER_FLAGS_SPECIFIC_RADIUS
};
#define SET_COMMON_WIDTH(spec_, border_, val_) \
-if (CCD_PROPERTY_SPEC_SET == spec_ && \
- !(CCD_BORDER_FLAGS_SPECIFIC_WIDTH & (border_).flags)) { \
+if (CCSS_PROPERTY_SPEC_SET == spec_ && \
+ !(CCSS_BORDER_FLAGS_SPECIFIC_WIDTH & (border_).flags)) { \
(border_).width = val_; \
- (border_).flags |= CCD_BORDER_FLAGS_COMMON_WIDTH; \
+ (border_).flags |= CCSS_BORDER_FLAGS_COMMON_WIDTH; \
} \
-if (spec_ != CCD_PROPERTY_SPEC_UNSET) { \
+if (spec_ != CCSS_PROPERTY_SPEC_UNSET) { \
(border_).width_spec = spec_; \
}
#define SET_SPECIFIC_WIDTH(spec_, border_, val_) \
-if (CCD_PROPERTY_SPEC_SET == spec_) { \
+if (CCSS_PROPERTY_SPEC_SET == spec_) { \
(border_).width = val_; \
- (border_).flags |= CCD_BORDER_FLAGS_SPECIFIC_WIDTH; \
+ (border_).flags |= CCSS_BORDER_FLAGS_SPECIFIC_WIDTH; \
} \
-if (spec_ != CCD_PROPERTY_SPEC_UNSET) { \
+if (spec_ != CCSS_PROPERTY_SPEC_UNSET) { \
(border_).width_spec = spec_; \
}
#define SET_COMMON_STYLE(spec_, border_, val_) \
-if (CCD_PROPERTY_SPEC_SET == spec_ && \
- !(CCD_BORDER_FLAGS_SPECIFIC_STYLE & (border_).flags)) { \
+if (CCSS_PROPERTY_SPEC_SET == spec_ && \
+ !(CCSS_BORDER_FLAGS_SPECIFIC_STYLE & (border_).flags)) { \
(border_).style = val_; \
- (border_).flags |= CCD_BORDER_FLAGS_COMMON_STYLE; \
+ (border_).flags |= CCSS_BORDER_FLAGS_COMMON_STYLE; \
} \
-if (spec_ != CCD_PROPERTY_SPEC_UNSET) { \
+if (spec_ != CCSS_PROPERTY_SPEC_UNSET) { \
(border_).style_spec = spec_; \
}
#define SET_SPECIFIC_STYLE(spec_, border_, val_) \
-if (CCD_PROPERTY_SPEC_SET == spec_) { \
+if (CCSS_PROPERTY_SPEC_SET == spec_) { \
(border_).style = val_; \
- (border_).flags |= CCD_BORDER_FLAGS_SPECIFIC_STYLE; \
+ (border_).flags |= CCSS_BORDER_FLAGS_SPECIFIC_STYLE; \
} \
-if (spec_ != CCD_PROPERTY_SPEC_UNSET) { \
+if (spec_ != CCSS_PROPERTY_SPEC_UNSET) { \
(border_).style_spec = spec_; \
}
#define SET_COMMON_COLOR(spec_, border_, val_) \
-if (CCD_PROPERTY_SPEC_SET == spec_ && \
- !(CCD_BORDER_FLAGS_SPECIFIC_COLOR & (border_).flags)) { \
+if (CCSS_PROPERTY_SPEC_SET == spec_ && \
+ !(CCSS_BORDER_FLAGS_SPECIFIC_COLOR & (border_).flags)) { \
(border_).color.red = val_.red; \
(border_).color.green = val_.green; \
(border_).color.blue = val_.blue; \
- (border_).flags |= CCD_BORDER_FLAGS_COMMON_COLOR; \
+ (border_).flags |= CCSS_BORDER_FLAGS_COMMON_COLOR; \
} \
-if (spec_ != CCD_PROPERTY_SPEC_UNSET) { \
+if (spec_ != CCSS_PROPERTY_SPEC_UNSET) { \
(border_).color.spec = spec_; \
}
#define SET_SPECIFIC_COLOR(spec_, border_, val_) \
-if (CCD_PROPERTY_SPEC_SET == spec_) { \
+if (CCSS_PROPERTY_SPEC_SET == spec_) { \
(border_).color.red = val_.red; \
(border_).color.green = val_.green; \
(border_).color.blue = val_.blue; \
- (border_).flags |= CCD_BORDER_FLAGS_SPECIFIC_COLOR; \
+ (border_).flags |= CCSS_BORDER_FLAGS_SPECIFIC_COLOR; \
} \
-if (spec_ != CCD_PROPERTY_SPEC_UNSET) { \
+if (spec_ != CCSS_PROPERTY_SPEC_UNSET) { \
(border_).color.spec = spec_; \
}
#define SET_COMMON_RADIUS(spec_, join_, val_) \
-if (CCD_PROPERTY_SPEC_SET == spec_ && \
- !(CCD_BORDER_FLAGS_SPECIFIC_RADIUS & (join_).flags)) { \
+if (CCSS_PROPERTY_SPEC_SET == spec_ && \
+ !(CCSS_BORDER_FLAGS_SPECIFIC_RADIUS & (join_).flags)) { \
(join_).radius = val_; \
- (join_).flags |= CCD_BORDER_FLAGS_COMMON_RADIUS; \
+ (join_).flags |= CCSS_BORDER_FLAGS_COMMON_RADIUS; \
} \
-if (spec_ != CCD_PROPERTY_SPEC_UNSET) { \
+if (spec_ != CCSS_PROPERTY_SPEC_UNSET) { \
(join_).spec = spec_; \
}
#define SET_SPECIFIC_RADIUS(spec_, join_, val_) \
-if (CCD_PROPERTY_SPEC_SET == spec_) { \
+if (CCSS_PROPERTY_SPEC_SET == spec_) { \
(join_).radius = val_; \
- (join_).flags |= CCD_BORDER_FLAGS_SPECIFIC_RADIUS; \
+ (join_).flags |= CCSS_BORDER_FLAGS_SPECIFIC_RADIUS; \
} \
-if (spec_ != CCD_PROPERTY_SPEC_UNSET) { \
+if (spec_ != CCSS_PROPERTY_SPEC_UNSET) { \
(join_).spec = spec_; \
}
@@ -146,23 +146,23 @@
* Map between border style css string and internal value.
*/
static const struct {
- ccd_border_style_type_t border_style;
+ ccss_border_style_type_t border_style;
char const *css;
} _border_style_map[] = {
- { CCD_BORDER_STYLE_HIDDEN, "hidden" },
- { CCD_BORDER_STYLE_DOTTED, "dotted" },
- { CCD_BORDER_STYLE_DASHED, "dashed" },
- { CCD_BORDER_STYLE_SOLID, "solid" },
- { CCD_BORDER_STYLE_DOUBLE, "double" },
- { CCD_BORDER_STYLE_GROOVE, "groove" },
- { CCD_BORDER_STYLE_RIDGE, "ridge" },
- { CCD_BORDER_STYLE_INSET, "inset" },
- { CCD_BORDER_STYLE_OUTSET, "outset" }
+ { CCSS_BORDER_STYLE_HIDDEN, "hidden" },
+ { CCSS_BORDER_STYLE_DOTTED, "dotted" },
+ { CCSS_BORDER_STYLE_DASHED, "dashed" },
+ { CCSS_BORDER_STYLE_SOLID, "solid" },
+ { CCSS_BORDER_STYLE_DOUBLE, "double" },
+ { CCSS_BORDER_STYLE_GROOVE, "groove" },
+ { CCSS_BORDER_STYLE_RIDGE, "ridge" },
+ { CCSS_BORDER_STYLE_INSET, "inset" },
+ { CCSS_BORDER_STYLE_OUTSET, "outset" }
};
static bool
match_style (char const *css_border_style,
- ccd_border_style_type_t *style)
+ ccss_border_style_type_t *style)
{
g_return_val_if_fail (css_border_style && *css_border_style, false);
@@ -177,7 +177,7 @@
}
static char const *
-lookup_name (ccd_border_style_type_t border_style)
+lookup_name (ccss_border_style_type_t border_style)
{
for (unsigned int i = 0; i < G_N_ELEMENTS (_border_style_map); i++) {
if (_border_style_map[i].border_style == border_style) {
@@ -188,94 +188,94 @@
return NULL;
}
-ccd_border_t *
-ccd_border_new (void)
+ccss_border_t *
+ccss_border_new (void)
{
- return g_new0 (ccd_border_t, 1);
+ return g_new0 (ccss_border_t, 1);
}
void
-ccd_border_free (ccd_border_t *self)
+ccss_border_free (ccss_border_t *self)
{
g_free (self);
}
-static ccd_property_spec_t
+static ccss_property_spec_t
parse_width (CRTerm const **value,
double *width)
{
- ccd_property_spec_t spec;
+ ccss_property_spec_t spec;
- spec = ccd_property_parse_spec (value);
- if (CCD_PROPERTY_SPEC_SET == spec &&
+ spec = ccss_property_parse_spec (value);
+ if (CCSS_PROPERTY_SPEC_SET == spec &&
*value &&
TERM_NUMBER == (*value)->type) {
*width = (*value)->content.num->val;
(*value) = (*value)->next;
- spec = CCD_PROPERTY_SPEC_SET;
+ spec = CCSS_PROPERTY_SPEC_SET;
}
return spec;
}
-static ccd_property_spec_t
+static ccss_property_spec_t
parse_style (CRTerm const **value,
- ccd_border_style_type_t *style)
+ ccss_border_style_type_t *style)
{
- ccd_property_spec_t spec;
+ ccss_property_spec_t spec;
- spec = ccd_property_parse_spec (value);
- *style = CCD_BORDER_STYLE_SOLID;
- if (CCD_PROPERTY_SPEC_SET == spec &&
+ spec = ccss_property_parse_spec (value);
+ *style = CCSS_BORDER_STYLE_SOLID;
+ if (CCSS_PROPERTY_SPEC_SET == spec &&
*value &&
TERM_IDENT == (*value)->type &&
match_style (cr_string_peek_raw_str ((*value)->content.str), style)) {
(*value) = (*value)->next;
- spec = CCD_PROPERTY_SPEC_SET;
+ spec = CCSS_PROPERTY_SPEC_SET;
}
return spec;
}
-static ccd_property_spec_t
+static ccss_property_spec_t
parse_color (CRTerm const **value,
- ccd_color_t *color)
+ ccss_color_t *color)
{
- ccd_color_parse (color, value);
+ ccss_color_parse (color, value);
return color->spec;
}
-static ccd_property_spec_t
+static ccss_property_spec_t
parse_radius (CRTerm const **value,
double *radius)
{
- ccd_property_spec_t spec;
+ ccss_property_spec_t spec;
- spec = ccd_property_parse_spec (value);
- if (CCD_PROPERTY_SPEC_SET == spec &&
+ spec = ccss_property_parse_spec (value);
+ if (CCSS_PROPERTY_SPEC_SET == spec &&
*value &&
TERM_NUMBER == (*value)->type) {
*radius = (*value)->content.num->val;
(*value) = (*value)->next;
- spec = CCD_PROPERTY_SPEC_SET;
+ spec = CCSS_PROPERTY_SPEC_SET;
}
return spec;
}
static bool
-parse_stroke_property (ccd_border_stroke_t *stroke,
+parse_stroke_property (ccss_border_stroke_t *stroke,
char const *property,
CRTerm const *value)
{
- ccd_property_spec_t spec;
+ ccss_property_spec_t spec;
double width;
- ccd_border_style_type_t style;
- ccd_color_t color;
+ ccss_border_style_type_t style;
+ ccss_color_t color;
if (0 == strcmp ("width", property)) {
@@ -310,27 +310,27 @@
* - border: 1px solid red;
*/
bool
-ccd_border_parse (ccd_border_t *self,
+ccss_border_parse (ccss_border_t *self,
char const *property,
CRTerm const *values)
{
CRTerm const *iter;
double radius;
double width;
- ccd_border_style_type_t style;
- ccd_color_t color;
- ccd_property_spec_t radius_spec;
- ccd_property_spec_t width_spec;
- ccd_property_spec_t style_spec;
+ ccss_border_style_type_t style;
+ ccss_color_t color;
+ ccss_property_spec_t radius_spec;
+ ccss_property_spec_t width_spec;
+ ccss_property_spec_t style_spec;
- ccd_color_init (&color);
+ ccss_color_init (&color);
/* Radius */
iter = values;
if (0 == strcmp ("border-top-right-radius", property)) {
radius_spec = parse_radius (&iter, &radius);
- if (CCD_PROPERTY_SPEC_UNSET == radius_spec) {
+ if (CCSS_PROPERTY_SPEC_UNSET == radius_spec) {
return false;
}
@@ -340,7 +340,7 @@
} else if (0 == strcmp ("border-bottom-right-radius", property)) {
radius_spec = parse_radius (&iter, &radius);
- if (CCD_PROPERTY_SPEC_UNSET == radius_spec) {
+ if (CCSS_PROPERTY_SPEC_UNSET == radius_spec) {
return false;
}
SET_SPECIFIC_RADIUS (radius_spec, self->right_bottom, radius);
@@ -349,7 +349,7 @@
} else if (0 == strcmp ("border-bottom-left-radius", property)) {
radius_spec = parse_radius (&iter, &radius);
- if (CCD_PROPERTY_SPEC_UNSET == radius_spec) {
+ if (CCSS_PROPERTY_SPEC_UNSET == radius_spec) {
return false;
}
SET_SPECIFIC_RADIUS (radius_spec, self->bottom_left, radius);
@@ -358,7 +358,7 @@
} else if (0 == strcmp ("border-top-left-radius", property)) {
radius_spec = parse_radius (&iter, &radius);
- if (CCD_PROPERTY_SPEC_UNSET == radius_spec) {
+ if (CCSS_PROPERTY_SPEC_UNSET == radius_spec) {
return false;
}
SET_SPECIFIC_RADIUS (radius_spec, self->left_top, radius);
@@ -367,7 +367,7 @@
} else if (0 == strcmp ("border-radius", property)) {
radius_spec = parse_radius (&iter, &radius);
- if (CCD_PROPERTY_SPEC_UNSET == radius_spec) {
+ if (CCSS_PROPERTY_SPEC_UNSET == radius_spec) {
return false;
}
SET_COMMON_RADIUS (radius_spec, self->left_top, radius);
@@ -422,8 +422,8 @@
/* Now try to parse multi-value properties. */
iter = values;
width_spec = parse_width (&iter, &width);
- if (CCD_PROPERTY_SPEC_NONE == width_spec && !iter) {
- style_spec = CCD_PROPERTY_SPEC_NONE;
+ if (CCSS_PROPERTY_SPEC_NONE == width_spec && !iter) {
+ style_spec = CCSS_PROPERTY_SPEC_NONE;
} else {
style_spec = parse_style (&iter, &style);
parse_color (&iter, &color);
@@ -479,11 +479,11 @@
/**
* line:
- * @stroke: a #ccd_border_stroke_t or %NULL.
+ * @stroke: a #ccss_border_stroke_t or %NULL.
*
**/
static void
-line (ccd_border_stroke_t const *stroke,
+line (ccss_border_stroke_t const *stroke,
cairo_t *cr,
double x1,
double y1,
@@ -494,7 +494,7 @@
}
static void
-draw_none_line (ccd_border_stroke_t const *stroke,
+draw_none_line (ccss_border_stroke_t const *stroke,
cairo_t *cr,
double x1,
double y1,
@@ -503,7 +503,7 @@
{}
static void
-draw_dotted_line (ccd_border_stroke_t const *stroke,
+draw_dotted_line (ccss_border_stroke_t const *stroke,
cairo_t *cr,
double x1,
double y1,
@@ -528,7 +528,7 @@
}
static void
-draw_dashed_line (ccd_border_stroke_t const *stroke,
+draw_dashed_line (ccss_border_stroke_t const *stroke,
cairo_t *cr,
double x1,
double y1,
@@ -554,7 +554,7 @@
}
static void
-draw_solid_line (ccd_border_stroke_t const *stroke,
+draw_solid_line (ccss_border_stroke_t const *stroke,
cairo_t *cr,
double x1,
double y1,
@@ -574,42 +574,42 @@
cairo_restore (cr);
}
-typedef void (*line_draw_f) (ccd_border_stroke_t const *, cairo_t *,
+typedef void (*line_draw_f) (ccss_border_stroke_t const *, cairo_t *,
double, double, double, double);
static line_draw_f
-get_line_draw_func (ccd_border_stroke_t const *stroke,
+get_line_draw_func (ccss_border_stroke_t const *stroke,
bool path_only)
{
if (path_only) {
return line;
}
- if (CCD_PROPERTY_SPEC_UNSET == stroke->style_spec ||
- CCD_PROPERTY_SPEC_NONE == stroke->style_spec) {
+ if (CCSS_PROPERTY_SPEC_UNSET == stroke->style_spec ||
+ CCSS_PROPERTY_SPEC_NONE == stroke->style_spec) {
return draw_none_line;
}
switch (stroke->style) {
- case CCD_BORDER_STYLE_HIDDEN:
- g_warning ("CCD_BORDER_STYLE_HIDDEN not implemented");
+ case CCSS_BORDER_STYLE_HIDDEN:
+ g_warning ("CCSS_BORDER_STYLE_HIDDEN not implemented");
return draw_none_line;
- case CCD_BORDER_STYLE_DOTTED:
+ case CCSS_BORDER_STYLE_DOTTED:
return draw_dotted_line;
- case CCD_BORDER_STYLE_DASHED:
+ case CCSS_BORDER_STYLE_DASHED:
return draw_dashed_line;
- case CCD_BORDER_STYLE_SOLID:
+ case CCSS_BORDER_STYLE_SOLID:
return draw_solid_line;
- case CCD_BORDER_STYLE_DOUBLE:
- g_warning ("CCD_BORDER_STYLE_DOUBLE not implemented");
- case CCD_BORDER_STYLE_GROOVE:
- g_warning ("CCD_BORDER_STYLE_GROOVE not implemented");
- case CCD_BORDER_STYLE_RIDGE:
- g_warning ("CCD_BORDER_STYLE_RIDGE not implemented");
- case CCD_BORDER_STYLE_INSET:
- g_warning ("CCD_BORDER_STYLE_INSET not implemented");
- case CCD_BORDER_STYLE_OUTSET:
- g_warning ("CCD_BORDER_STYLE_OUTSET not implemented");
+ case CCSS_BORDER_STYLE_DOUBLE:
+ g_warning ("CCSS_BORDER_STYLE_DOUBLE not implemented");
+ case CCSS_BORDER_STYLE_GROOVE:
+ g_warning ("CCSS_BORDER_STYLE_GROOVE not implemented");
+ case CCSS_BORDER_STYLE_RIDGE:
+ g_warning ("CCSS_BORDER_STYLE_RIDGE not implemented");
+ case CCSS_BORDER_STYLE_INSET:
+ g_warning ("CCSS_BORDER_STYLE_INSET not implemented");
+ case CCSS_BORDER_STYLE_OUTSET:
+ g_warning ("CCSS_BORDER_STYLE_OUTSET not implemented");
default:
g_assert_not_reached ();
return draw_solid_line;
@@ -617,8 +617,8 @@
}
static void
-join (ccd_border_stroke_t const *before,
- ccd_border_stroke_t const *after,
+join (ccss_border_stroke_t const *before,
+ ccss_border_stroke_t const *after,
cairo_t *cr,
double xc,
double yc,
@@ -630,8 +630,8 @@
}
static void
-draw_solid_join (ccd_border_stroke_t const *before,
- ccd_border_stroke_t const *after,
+draw_solid_join (ccss_border_stroke_t const *before,
+ ccss_border_stroke_t const *after,
cairo_t *cr,
double xc,
double yc,
@@ -665,14 +665,14 @@
cairo_restore (cr);
}
-typedef void (*join_draw_f) (ccd_border_stroke_t const *,
- ccd_border_stroke_t const *,
+typedef void (*join_draw_f) (ccss_border_stroke_t const *,
+ ccss_border_stroke_t const *,
cairo_t *,
double, double, double, double, double);
static join_draw_f
-get_join_draw_func (ccd_border_stroke_t const *before,
- ccd_border_stroke_t const *after,
+get_join_draw_func (ccss_border_stroke_t const *before,
+ ccss_border_stroke_t const *after,
bool path_only)
{
if (path_only) {
@@ -683,7 +683,7 @@
}
void
-ccd_border_clamp_radii (double x,
+ccss_border_clamp_radii (double x,
double y,
double width,
double height,
@@ -706,14 +706,14 @@
}
static void
-border (ccd_border_stroke_t const *left,
- ccd_border_join_t const *left_top,
- ccd_border_stroke_t const *top,
- ccd_border_join_t const *top_right,
- ccd_border_stroke_t const *right,
- ccd_border_join_t const *right_bottom,
- ccd_border_stroke_t const *bottom,
- ccd_border_join_t const *bottom_left,
+border (ccss_border_stroke_t const *left,
+ ccss_border_join_t const *left_top,
+ ccss_border_stroke_t const *top,
+ ccss_border_join_t const *top_right,
+ ccss_border_stroke_t const *right,
+ ccss_border_join_t const *right_bottom,
+ ccss_border_stroke_t const *bottom,
+ ccss_border_join_t const *bottom_left,
uint32_t visibility_flags,
cairo_t *cr,
double x,
@@ -734,8 +734,8 @@
rtr = top_right && top_right->spec ? top_right->radius : 0;
rrb = right_bottom && right_bottom->spec ? right_bottom->radius : 0;
rbl = bottom_left && bottom_left->spec ? bottom_left->radius : 0;
- if (!(CCD_BORDER_ROUNDING_UNRESTRICTED & visibility_flags)) {
- ccd_border_clamp_radii (x, y, width, height,
+ if (!(CCSS_BORDER_ROUNDING_UNRESTRICTED & visibility_flags)) {
+ ccss_border_clamp_radii (x, y, width, height,
&rlt, &rtr, &rrb, &rbl);
}
@@ -750,7 +750,7 @@
x2 = x1;
y2 = y + rlt;
- if (path_only || !(CCD_BORDER_VISIBILITY_HIDE_LEFT & visibility_flags)) {
+ if (path_only || !(CCSS_BORDER_VISIBILITY_HIDE_LEFT & visibility_flags)) {
if (!have_segment)
cairo_move_to (cr, x1, y1);
line_func (left, cr, x1, y1, x2, y2);
@@ -767,7 +767,7 @@
xc = x1 + rlt;
yc = y1;
- if (path_only || !(CCD_BORDER_VISIBILITY_HIDE_LEFT_TOP & visibility_flags)) {
+ if (path_only || !(CCSS_BORDER_VISIBILITY_HIDE_LEFT_TOP & visibility_flags)) {
if (!have_segment)
cairo_move_to (cr, x1, y1);
join_func (left, top, cr, xc, yc, rlt, _PI, 3 * _PI / 2);
@@ -784,7 +784,7 @@
x2 = x + width - rtr;
y2 = y1;
- if (path_only || !(CCD_BORDER_VISIBILITY_HIDE_TOP & visibility_flags)) {
+ if (path_only || !(CCSS_BORDER_VISIBILITY_HIDE_TOP & visibility_flags)) {
if (!have_segment)
cairo_move_to (cr, x1, y1);
line_func (top, cr, x1, y1, x2, y2);
@@ -801,7 +801,7 @@
xc = x1 - rtr;
yc = y1 + rtr;
- if (path_only || !(CCD_BORDER_VISIBILITY_HIDE_TOP_RIGHT & visibility_flags)) {
+ if (path_only || !(CCSS_BORDER_VISIBILITY_HIDE_TOP_RIGHT & visibility_flags)) {
if (!have_segment)
cairo_move_to (cr, x1, y1);
join_func (top, right, cr, xc, yc, rtr, 3 * _PI / 2., 0);
@@ -818,7 +818,7 @@
x2 = x1;
y2 = y + height - rrb;
- if (path_only || !(CCD_BORDER_VISIBILITY_HIDE_RIGHT & visibility_flags)) {
+ if (path_only || !(CCSS_BORDER_VISIBILITY_HIDE_RIGHT & visibility_flags)) {
if (!have_segment)
cairo_move_to (cr, x1, y1);
line_func (right, cr, x1, y1, x2, y2);
@@ -835,7 +835,7 @@
xc = x1 - rrb;
yc = y1 - rrb;
- if (path_only || !(CCD_BORDER_VISIBILITY_HIDE_RIGHT_BOTTOM & visibility_flags)) {
+ if (path_only || !(CCSS_BORDER_VISIBILITY_HIDE_RIGHT_BOTTOM & visibility_flags)) {
if (!have_segment)
cairo_move_to (cr, x1, y1);
join_func (right, bottom, cr, xc, yc, rrb, 0, _PI / 2.);
@@ -852,7 +852,7 @@
x2 = x + rbl;
y2 = y1;
- if (path_only || !(CCD_BORDER_VISIBILITY_HIDE_BOTTOM & visibility_flags)) {
+ if (path_only || !(CCSS_BORDER_VISIBILITY_HIDE_BOTTOM & visibility_flags)) {
if (!have_segment)
cairo_move_to (cr, x1, y1);
line_func (bottom, cr, x1, y1, x2, y2);
@@ -869,7 +869,7 @@
xc = x1 + rbl;
yc = y1 - rbl;
- if (path_only || !(CCD_BORDER_VISIBILITY_HIDE_BOTTOM_LEFT & visibility_flags)) {
+ if (path_only || !(CCSS_BORDER_VISIBILITY_HIDE_BOTTOM_LEFT & visibility_flags)) {
if (!have_segment)
cairo_move_to (cr, x1, y1);
join_func (bottom, left, cr, xc, yc, rbl, _PI / 2., _PI);
@@ -879,14 +879,14 @@
}
void
-ccd_border_path (ccd_border_stroke_t const *left,
- ccd_border_join_t const *left_top,
- ccd_border_stroke_t const *top,
- ccd_border_join_t const *top_right,
- ccd_border_stroke_t const *right,
- ccd_border_join_t const *right_bottom,
- ccd_border_stroke_t const *bottom,
- ccd_border_join_t const *bottom_left,
+ccss_border_path (ccss_border_stroke_t const *left,
+ ccss_border_join_t const *left_top,
+ ccss_border_stroke_t const *top,
+ ccss_border_join_t const *top_right,
+ ccss_border_stroke_t const *right,
+ ccss_border_join_t const *right_bottom,
+ ccss_border_stroke_t const *bottom,
+ ccss_border_join_t const *bottom_left,
cairo_t *cr,
double x,
double y,
@@ -895,20 +895,20 @@
{
border (left, left_top, top, top_right,
right, right_bottom, bottom, bottom_left,
- CCD_BORDER_VISIBILITY_SHOW_ALL, cr, x, y, width, height, true);
+ CCSS_BORDER_VISIBILITY_SHOW_ALL, cr, x, y, width, height, true);
cairo_close_path (cr);
}
void
-ccd_border_draw (ccd_border_stroke_t const *left,
- ccd_border_join_t const *left_top,
- ccd_border_stroke_t const *top,
- ccd_border_join_t const *top_right,
- ccd_border_stroke_t const *right,
- ccd_border_join_t const *right_bottom,
- ccd_border_stroke_t const *bottom,
- ccd_border_join_t const *bottom_left,
+ccss_border_draw (ccss_border_stroke_t const *left,
+ ccss_border_join_t const *left_top,
+ ccss_border_stroke_t const *top,
+ ccss_border_join_t const *top_right,
+ ccss_border_stroke_t const *right,
+ ccss_border_join_t const *right_bottom,
+ ccss_border_stroke_t const *bottom,
+ ccss_border_join_t const *bottom_left,
uint32_t visibility_flags,
cairo_t *cr,
double x,
@@ -921,12 +921,12 @@
visibility_flags, cr, x, y, width, height, false);
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
void
-ccd_border_join_dump (ccd_border_join_t const *self)
+ccss_border_join_dump (ccss_border_join_t const *self)
{
- if (self->spec != CCD_PROPERTY_SPEC_UNSET) {
+ if (self->spec != CCSS_PROPERTY_SPEC_UNSET) {
printf ("%.1f ", self->radius);
}
@@ -934,64 +934,64 @@
}
void
-ccd_border_stroke_dump (ccd_border_stroke_t const *self)
+ccss_border_stroke_dump (ccss_border_stroke_t const *self)
{
- if (self->width_spec != CCD_PROPERTY_SPEC_UNSET) {
+ if (self->width_spec != CCSS_PROPERTY_SPEC_UNSET) {
printf ("%.1f ", self->width);
}
- if (self->style_spec != CCD_PROPERTY_SPEC_UNSET) {
+ if (self->style_spec != CCSS_PROPERTY_SPEC_UNSET) {
printf ("%s ", lookup_name (self->style));
}
- ccd_color_dump (&self->color);
+ ccss_color_dump (&self->color);
printf (";\n");
}
void
-ccd_border_dump (ccd_border_t const *self)
+ccss_border_dump (ccss_border_t const *self)
{
- if (CCD_BORDER_STROKE_IS_SET (self->left)) {
- printf (CCD_PROPERTY_DUMP_PREFIX "border-left: ");
- ccd_border_stroke_dump (&self->left);
+ if (CCSS_BORDER_STROKE_IS_SET (self->left)) {
+ printf (CCSS_PROPERTY_DUMP_PREFIX "border-left: ");
+ ccss_border_stroke_dump (&self->left);
}
- if (CCD_BORDER_JOIN_IS_SET (self->left_top)) {
- printf (CCD_PROPERTY_DUMP_PREFIX "border-top-left-radius: ");
- ccd_border_join_dump (&self->left_top);
+ if (CCSS_BORDER_JOIN_IS_SET (self->left_top)) {
+ printf (CCSS_PROPERTY_DUMP_PREFIX "border-top-left-radius: ");
+ ccss_border_join_dump (&self->left_top);
}
- if (CCD_BORDER_STROKE_IS_SET (self->top)) {
- printf (CCD_PROPERTY_DUMP_PREFIX "border-top: ");
- ccd_border_stroke_dump (&self->top);
+ if (CCSS_BORDER_STROKE_IS_SET (self->top)) {
+ printf (CCSS_PROPERTY_DUMP_PREFIX "border-top: ");
+ ccss_border_stroke_dump (&self->top);
}
- if (CCD_BORDER_JOIN_IS_SET (self->top_right)) {
- printf (CCD_PROPERTY_DUMP_PREFIX "border-top-right-radius: ");
- ccd_border_join_dump (&self->top_right);
+ if (CCSS_BORDER_JOIN_IS_SET (self->top_right)) {
+ printf (CCSS_PROPERTY_DUMP_PREFIX "border-top-right-radius: ");
+ ccss_border_join_dump (&self->top_right);
}
- if (CCD_BORDER_STROKE_IS_SET (self->right)) {
- printf (CCD_PROPERTY_DUMP_PREFIX "border-right: ");
- ccd_border_stroke_dump (&self->right);
+ if (CCSS_BORDER_STROKE_IS_SET (self->right)) {
+ printf (CCSS_PROPERTY_DUMP_PREFIX "border-right: ");
+ ccss_border_stroke_dump (&self->right);
}
- if (CCD_BORDER_JOIN_IS_SET (self->right_bottom)) {
- printf (CCD_PROPERTY_DUMP_PREFIX "border-bottom-right-radius: ");
- ccd_border_join_dump (&self->right_bottom);
+ if (CCSS_BORDER_JOIN_IS_SET (self->right_bottom)) {
+ printf (CCSS_PROPERTY_DUMP_PREFIX "border-bottom-right-radius: ");
+ ccss_border_join_dump (&self->right_bottom);
}
- if (CCD_BORDER_STROKE_IS_SET (self->bottom)) {
- printf (CCD_PROPERTY_DUMP_PREFIX "border-bottom: ");
- ccd_border_stroke_dump (&self->bottom);
+ if (CCSS_BORDER_STROKE_IS_SET (self->bottom)) {
+ printf (CCSS_PROPERTY_DUMP_PREFIX "border-bottom: ");
+ ccss_border_stroke_dump (&self->bottom);
}
- if (CCD_BORDER_JOIN_IS_SET (self->bottom_left)) {
- printf (CCD_PROPERTY_DUMP_PREFIX "border-bottom-left-radius: ");
- ccd_border_join_dump (&self->bottom_left);
+ if (CCSS_BORDER_JOIN_IS_SET (self->bottom_left)) {
+ printf (CCSS_PROPERTY_DUMP_PREFIX "border-bottom-left-radius: ");
+ ccss_border_join_dump (&self->bottom_left);
}
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-border.h (from r132, /trunk/libccd/ccd/ccd-border.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-border.h (original)
+++ trunk/libccss/ccss/ccss-border.h Mon Sep 29 09:51:02 2008
@@ -17,51 +17,51 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_BORDER_H
-#define CCD_BORDER_H
+#ifndef CCSS_BORDER_H
+#define CCSS_BORDER_H
#include <stdbool.h>
#include <stdint.h>
#include <cairo.h>
#include <glib.h>
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-color.h>
-#include <ccd/ccd-property.h>
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-color.h>
+#include <ccss/ccss-property.h>
G_BEGIN_DECLS
typedef enum {
- CCD_BORDER_STYLE_HIDDEN,
- CCD_BORDER_STYLE_DOTTED,
- CCD_BORDER_STYLE_DASHED,
- CCD_BORDER_STYLE_SOLID,
- CCD_BORDER_STYLE_DOUBLE,
- CCD_BORDER_STYLE_GROOVE,
- CCD_BORDER_STYLE_RIDGE,
- CCD_BORDER_STYLE_INSET,
- CCD_BORDER_STYLE_OUTSET
-} ccd_border_style_type_t;
+ CCSS_BORDER_STYLE_HIDDEN,
+ CCSS_BORDER_STYLE_DOTTED,
+ CCSS_BORDER_STYLE_DASHED,
+ CCSS_BORDER_STYLE_SOLID,
+ CCSS_BORDER_STYLE_DOUBLE,
+ CCSS_BORDER_STYLE_GROOVE,
+ CCSS_BORDER_STYLE_RIDGE,
+ CCSS_BORDER_STYLE_INSET,
+ CCSS_BORDER_STYLE_OUTSET
+} ccss_border_style_type_t;
typedef enum {
- CCD_BORDER_VISIBILITY_SHOW_ALL = 0,
- CCD_BORDER_VISIBILITY_HIDE_LEFT = 1 << 0,
- CCD_BORDER_VISIBILITY_HIDE_LEFT_TOP = 1 << 1,
- CCD_BORDER_VISIBILITY_HIDE_TOP = 1 << 2,
- CCD_BORDER_VISIBILITY_HIDE_TOP_RIGHT = 1 << 3,
- CCD_BORDER_VISIBILITY_HIDE_RIGHT = 1 << 4,
- CCD_BORDER_VISIBILITY_HIDE_RIGHT_BOTTOM = 1 << 5,
- CCD_BORDER_VISIBILITY_HIDE_BOTTOM = 1 << 6,
- CCD_BORDER_VISIBILITY_HIDE_BOTTOM_LEFT = 1 << 7,
-
- CCD_BORDER_ROUNDING_UNRESTRICTED = 1 << 8
-} ccd_border_drawing_flags_t;
-
-#define CCD_BORDER_STROKE_IS_SET(stroke_) \
- ((stroke_).width_spec != CCD_PROPERTY_SPEC_UNSET && \
- (stroke_).style_spec != CCD_PROPERTY_SPEC_UNSET && \
- (stroke_).color.spec != CCD_PROPERTY_SPEC_UNSET)
+ CCSS_BORDER_VISIBILITY_SHOW_ALL = 0,
+ CCSS_BORDER_VISIBILITY_HIDE_LEFT = 1 << 0,
+ CCSS_BORDER_VISIBILITY_HIDE_LEFT_TOP = 1 << 1,
+ CCSS_BORDER_VISIBILITY_HIDE_TOP = 1 << 2,
+ CCSS_BORDER_VISIBILITY_HIDE_TOP_RIGHT = 1 << 3,
+ CCSS_BORDER_VISIBILITY_HIDE_RIGHT = 1 << 4,
+ CCSS_BORDER_VISIBILITY_HIDE_RIGHT_BOTTOM = 1 << 5,
+ CCSS_BORDER_VISIBILITY_HIDE_BOTTOM = 1 << 6,
+ CCSS_BORDER_VISIBILITY_HIDE_BOTTOM_LEFT = 1 << 7,
+
+ CCSS_BORDER_ROUNDING_UNRESTRICTED = 1 << 8
+} ccss_border_drawing_flags_t;
+
+#define CCSS_BORDER_STROKE_IS_SET(stroke_) \
+ ((stroke_).width_spec != CCSS_PROPERTY_SPEC_UNSET && \
+ (stroke_).style_spec != CCSS_PROPERTY_SPEC_UNSET && \
+ (stroke_).color.spec != CCSS_PROPERTY_SPEC_UNSET)
-#define CCD_BORDER_STROKE_ASSIGN(lhs_, rhs_) { \
+#define CCSS_BORDER_STROKE_ASSIGN(lhs_, rhs_) { \
(lhs_).width = (rhs_).width; \
(lhs_).width_spec = (rhs_).width_spec; \
(lhs_).style = (rhs_).style; \
@@ -72,17 +72,17 @@
typedef struct {
double width;
- ccd_property_spec_t width_spec;
- ccd_border_style_type_t style;
- ccd_property_spec_t style_spec;
- ccd_color_t color;
+ ccss_property_spec_t width_spec;
+ ccss_border_style_type_t style;
+ ccss_property_spec_t style_spec;
+ ccss_color_t color;
unsigned int flags;
-} ccd_border_stroke_t;
+} ccss_border_stroke_t;
-#define CCD_BORDER_JOIN_IS_SET(join_) \
- ((join_).spec != CCD_PROPERTY_SPEC_UNSET)
+#define CCSS_BORDER_JOIN_IS_SET(join_) \
+ ((join_).spec != CCSS_PROPERTY_SPEC_UNSET)
-#define CCD_BORDER_JOIN_ASSIGN(lhs_, rhs_) { \
+#define CCSS_BORDER_JOIN_ASSIGN(lhs_, rhs_) { \
(lhs_).radius = (rhs_).radius; \
(lhs_).spec = (rhs_).spec; \
(lhs_).flags = (rhs_).flags; \
@@ -91,60 +91,60 @@
/* TODO just call it "spec"? */
typedef struct {
double radius;
- ccd_property_spec_t spec;
+ ccss_property_spec_t spec;
unsigned int flags;
-} ccd_border_join_t;
+} ccss_border_join_t;
typedef struct {
- ccd_border_stroke_t left;
- ccd_border_join_t left_top;
- ccd_border_stroke_t top;
- ccd_border_join_t top_right;
- ccd_border_stroke_t right;
- ccd_border_join_t right_bottom;
- ccd_border_stroke_t bottom;
- ccd_border_join_t bottom_left;
-} ccd_border_t;
+ ccss_border_stroke_t left;
+ ccss_border_join_t left_top;
+ ccss_border_stroke_t top;
+ ccss_border_join_t top_right;
+ ccss_border_stroke_t right;
+ ccss_border_join_t right_bottom;
+ ccss_border_stroke_t bottom;
+ ccss_border_join_t bottom_left;
+} ccss_border_t;
-ccd_border_t * ccd_border_new (void);
-void ccd_border_free (ccd_border_t *self);
+ccss_border_t * ccss_border_new (void);
+void ccss_border_free (ccss_border_t *self);
-bool ccd_border_parse (ccd_border_t *self, char const *property,
+bool ccss_border_parse (ccss_border_t *self, char const *property,
CRTerm const *values);
-void ccd_border_clamp_radii (double x, double y, double width, double height,
+void ccss_border_clamp_radii (double x, double y, double width, double height,
double *left_top, double *top_right,
double *right_bottom, double *bottom_left);
-void ccd_border_path (ccd_border_stroke_t const *left,
- ccd_border_join_t const *left_top,
- ccd_border_stroke_t const *top,
- ccd_border_join_t const *top_right,
- ccd_border_stroke_t const *right,
- ccd_border_join_t const *right_bottom,
- ccd_border_stroke_t const *bottom,
- ccd_border_join_t const *bottom_left,
+void ccss_border_path (ccss_border_stroke_t const *left,
+ ccss_border_join_t const *left_top,
+ ccss_border_stroke_t const *top,
+ ccss_border_join_t const *top_right,
+ ccss_border_stroke_t const *right,
+ ccss_border_join_t const *right_bottom,
+ ccss_border_stroke_t const *bottom,
+ ccss_border_join_t const *bottom_left,
cairo_t *cr,
double x, double y, double width, double height);
-void ccd_border_draw (ccd_border_stroke_t const *left,
- ccd_border_join_t const *left_top,
- ccd_border_stroke_t const *top,
- ccd_border_join_t const *top_right,
- ccd_border_stroke_t const *right,
- ccd_border_join_t const *right_bottom,
- ccd_border_stroke_t const *bottom,
- ccd_border_join_t const *bottom_left,
+void ccss_border_draw (ccss_border_stroke_t const *left,
+ ccss_border_join_t const *left_top,
+ ccss_border_stroke_t const *top,
+ ccss_border_join_t const *top_right,
+ ccss_border_stroke_t const *right,
+ ccss_border_join_t const *right_bottom,
+ ccss_border_stroke_t const *bottom,
+ ccss_border_join_t const *bottom_left,
uint32_t visibility_flags, cairo_t *cr,
double x, double y, double width, double height);
-#ifdef CCD_DEBUG
-void ccd_border_dump (ccd_border_t const *self);
-void ccd_border_join_dump (ccd_border_join_t const *self);
-void ccd_border_stroke_dump (ccd_border_stroke_t const *self);
+#ifdef CCSS_DEBUG
+void ccss_border_dump (ccss_border_t const *self);
+void ccss_border_join_dump (ccss_border_join_t const *self);
+void ccss_border_stroke_dump (ccss_border_stroke_t const *self);
#endif
G_END_DECLS
-#endif /* CCD_BORDER_H */
+#endif /* CCSS_BORDER_H */
Copied: trunk/libccss/ccss/ccss-color.c (from r132, /trunk/libccd/ccd/ccd-color.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-color.c (original)
+++ trunk/libccss/ccss/ccss-color.c Mon Sep 29 09:51:02 2008
@@ -23,171 +23,171 @@
#include <ctype.h>
#include <stdio.h>
#include <string.h>
-#include "ccd-color.h"
+#include "ccss-color.h"
static const struct {
char const *name;
- const ccd_color_t color;
+ const ccss_color_t color;
} _color_map[] = {
- { "aliceblue", { CCD_PROPERTY_SPEC_SET, 0xf0/255., 0xf8/255., 0xff/255. } },
- { "antiquewhite", { CCD_PROPERTY_SPEC_SET, 0xfa/255., 0xeb/255., 0xd7/255. } },
- { "aqua", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0xff/255., 0xff/255. } },
- { "aquamarine", { CCD_PROPERTY_SPEC_SET, 0x7f/255., 0xff/255., 0xd4/255. } },
- { "azure", { CCD_PROPERTY_SPEC_SET, 0xf0/255., 0xff/255., 0xff/255. } },
- { "beige", { CCD_PROPERTY_SPEC_SET, 0xf5/255., 0xf5/255., 0xdc/255. } },
- { "bisque", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xe4/255., 0xc4/255. } },
- { "black", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0x00/255., 0x00/255. } },
- { "blanchedalmond", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xeb/255., 0xcd/255. } },
- { "blue", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0x00/255., 0xff/255. } },
- { "blueviolet", { CCD_PROPERTY_SPEC_SET, 0x8a/255., 0x2b/255., 0xe2/255. } },
- { "brown", { CCD_PROPERTY_SPEC_SET, 0xa5/255., 0x2a/255., 0x2a/255. } },
- { "burlywood", { CCD_PROPERTY_SPEC_SET, 0xde/255., 0xb8/255., 0x87/255. } },
- { "cadetblue", { CCD_PROPERTY_SPEC_SET, 0x5f/255., 0x9e/255., 0xa0/255. } },
- { "chartreuse", { CCD_PROPERTY_SPEC_SET, 0x7f/255., 0xff/255., 0x00/255. } },
- { "chocolate", { CCD_PROPERTY_SPEC_SET, 0xd2/255., 0x69/255., 0x1e/255. } },
- { "coral", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0x7f/255., 0x50/255. } },
- { "cornflowerblue", { CCD_PROPERTY_SPEC_SET, 0x64/255., 0x95/255., 0xed/255. } },
- { "cornsilk", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xf8/255., 0xdc/255. } },
- { "crimson", { CCD_PROPERTY_SPEC_SET, 0xdc/255., 0x14/255., 0x3c/255. } },
- { "cyan", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0xff/255., 0xff/255. } },
- { "darkblue", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0x00/255., 0x8b/255. } },
- { "darkcyan", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0x8b/255., 0x8b/255. } },
- { "darkgoldenrod", { CCD_PROPERTY_SPEC_SET, 0xb8/255., 0x86/255., 0x0b/255. } },
- { "darkgray", { CCD_PROPERTY_SPEC_SET, 0xa9/255., 0xa9/255., 0xa9/255. } },
- { "darkgrey", { CCD_PROPERTY_SPEC_SET, 0xa9/255., 0xa9/255., 0xa9/255. } },
- { "darkgreen", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0x64/255., 0x00/255. } },
- { "darkkhaki", { CCD_PROPERTY_SPEC_SET, 0xbd/255., 0xb7/255., 0x6b/255. } },
- { "darkmagenta", { CCD_PROPERTY_SPEC_SET, 0x8b/255., 0x00/255., 0x8b/255. } },
- { "darkolivegreen", { CCD_PROPERTY_SPEC_SET, 0x55/255., 0x6b/255., 0x2f/255. } },
- { "darkorange", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0x8c/255., 0x00/255. } },
- { "darkorchid", { CCD_PROPERTY_SPEC_SET, 0x99/255., 0x32/255., 0xcc/255. } },
- { "darkred", { CCD_PROPERTY_SPEC_SET, 0x8b/255., 0x00/255., 0x00/255. } },
- { "darksalmon", { CCD_PROPERTY_SPEC_SET, 0xe9/255., 0x96/255., 0x7a/255. } },
- { "darkseagreen", { CCD_PROPERTY_SPEC_SET, 0x8f/255., 0xbc/255., 0x8f/255. } },
- { "darkslateblue", { CCD_PROPERTY_SPEC_SET, 0x48/255., 0x3d/255., 0x8b/255. } },
- { "darkslategray", { CCD_PROPERTY_SPEC_SET, 0x2f/255., 0x4f/255., 0x4f/255. } },
- { "darkslategrey", { CCD_PROPERTY_SPEC_SET, 0x2f/255., 0x4f/255., 0x4f/255. } },
- { "darkturquoise", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0xce/255., 0xd1/255. } },
- { "darkviolet", { CCD_PROPERTY_SPEC_SET, 0x94/255., 0x00/255., 0xd3/255. } },
- { "deeppink", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0x14/255., 0x93/255. } },
- { "deepskyblue", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0xbf/255., 0xff/255. } },
- { "dimgray", { CCD_PROPERTY_SPEC_SET, 0x69/255., 0x69/255., 0x69/255. } },
- { "dimgrey", { CCD_PROPERTY_SPEC_SET, 0x69/255., 0x69/255., 0x69/255. } },
- { "dodgerblue", { CCD_PROPERTY_SPEC_SET, 0x1e/255., 0x90/255., 0xff/255. } },
- { "firebrick", { CCD_PROPERTY_SPEC_SET, 0xb2/255., 0x22/255., 0x22/255. } },
- { "floralwhite", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xfa/255., 0xf0/255. } },
- { "forestgreen", { CCD_PROPERTY_SPEC_SET, 0x22/255., 0x8b/255., 0x22/255. } },
- { "fuchsia", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0x00/255., 0xff/255. } },
- { "gainsboro", { CCD_PROPERTY_SPEC_SET, 0xdc/255., 0xdc/255., 0xdc/255. } },
- { "ghostwhite", { CCD_PROPERTY_SPEC_SET, 0xf8/255., 0xf8/255., 0xff/255. } },
- { "gold", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xd7/255., 0x00/255. } },
- { "goldenrod", { CCD_PROPERTY_SPEC_SET, 0xda/255., 0xa5/255., 0x20/255. } },
- { "gray", { CCD_PROPERTY_SPEC_SET, 0x80/255., 0x80/255., 0x80/255. } },
- { "grey", { CCD_PROPERTY_SPEC_SET, 0x80/255., 0x80/255., 0x80/255. } },
- { "green", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0x80/255., 0x00/255. } },
- { "greenyellow", { CCD_PROPERTY_SPEC_SET, 0xad/255., 0xff/255., 0x2f/255. } },
- { "honeydew", { CCD_PROPERTY_SPEC_SET, 0xf0/255., 0xff/255., 0xf0/255. } },
- { "hotpink", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0x69/255., 0xb4/255. } },
- { "indianred", { CCD_PROPERTY_SPEC_SET, 0xcd/255., 0x5c/255., 0x5c/255. } },
- { "indigo", { CCD_PROPERTY_SPEC_SET, 0x4b/255., 0x00/255., 0x82/255. } },
- { "ivory", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xff/255., 0xf0/255. } },
- { "khaki", { CCD_PROPERTY_SPEC_SET, 0xf0/255., 0xe6/255., 0x8c/255. } },
- { "lavender", { CCD_PROPERTY_SPEC_SET, 0xe6/255., 0xe6/255., 0xfa/255. } },
- { "lavenderblush", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xf0/255., 0xf5/255. } },
- { "lawngreen", { CCD_PROPERTY_SPEC_SET, 0x7c/255., 0xfc/255., 0x00/255. } },
- { "lemonchiffon", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xfa/255., 0xcd/255. } },
- { "lightblue", { CCD_PROPERTY_SPEC_SET, 0xad/255., 0xd8/255., 0xe6/255. } },
- { "lightcoral", { CCD_PROPERTY_SPEC_SET, 0xf0/255., 0x80/255., 0x80/255. } },
- { "lightcyan", { CCD_PROPERTY_SPEC_SET, 0xe0/255., 0xff/255., 0xff/255. } },
- { "lightgoldenrodyellow", { CCD_PROPERTY_SPEC_SET, 0xfa/255., 0xfa/255., 0xd2/255. } },
- { "lightgray", { CCD_PROPERTY_SPEC_SET, 0xd3/255., 0xd3/255., 0xd3/255. } },
- { "lightgrey", { CCD_PROPERTY_SPEC_SET, 0xd3/255., 0xd3/255., 0xd3/255. } },
- { "lightgreen", { CCD_PROPERTY_SPEC_SET, 0x90/255., 0xee/255., 0x90/255. } },
- { "lightpink", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xb6/255., 0xc1/255. } },
- { "lightsalmon", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xa0/255., 0x7a/255. } },
- { "lightseagreen", { CCD_PROPERTY_SPEC_SET, 0x20/255., 0xb2/255., 0xaa/255. } },
- { "lightskyblue", { CCD_PROPERTY_SPEC_SET, 0x87/255., 0xce/255., 0xfa/255. } },
- { "lightslategray", { CCD_PROPERTY_SPEC_SET, 0x77/255., 0x88/255., 0x99/255. } },
- { "lightslategrey", { CCD_PROPERTY_SPEC_SET, 0x77/255., 0x88/255., 0x99/255. } },
- { "lightsteelblue", { CCD_PROPERTY_SPEC_SET, 0xb0/255., 0xc4/255., 0xde/255. } },
- { "lightyellow", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xff/255., 0xe0/255. } },
- { "lime", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0xff/255., 0x00/255. } },
- { "limegreen", { CCD_PROPERTY_SPEC_SET, 0x32/255., 0xcd/255., 0x32/255. } },
- { "linen", { CCD_PROPERTY_SPEC_SET, 0xfa/255., 0xf0/255., 0xe6/255. } },
- { "magenta", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0x00/255., 0xff/255. } },
- { "maroon", { CCD_PROPERTY_SPEC_SET, 0x80/255., 0x00/255., 0x00/255. } },
- { "mediumaquamarine", { CCD_PROPERTY_SPEC_SET, 0x66/255., 0xcd/255., 0xaa/255. } },
- { "mediumblue", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0x00/255., 0xcd/255. } },
- { "mediumorchid", { CCD_PROPERTY_SPEC_SET, 0xba/255., 0x55/255., 0xd3/255. } },
- { "mediumpurple", { CCD_PROPERTY_SPEC_SET, 0x93/255., 0x70/255., 0xd8/255. } },
- { "mediumseagreen", { CCD_PROPERTY_SPEC_SET, 0x3c/255., 0xb3/255., 0x71/255. } },
- { "mediumslateblue", { CCD_PROPERTY_SPEC_SET, 0x7b/255., 0x68/255., 0xee/255. } },
- { "mediumspringgreen", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0xfa/255., 0x9a/255. } },
- { "mediumturquoise", { CCD_PROPERTY_SPEC_SET, 0x48/255., 0xd1/255., 0xcc/255. } },
- { "mediumvioletred", { CCD_PROPERTY_SPEC_SET, 0xc7/255., 0x15/255., 0x85/255. } },
- { "midnightblue", { CCD_PROPERTY_SPEC_SET, 0x19/255., 0x19/255., 0x70/255. } },
- { "mintcream", { CCD_PROPERTY_SPEC_SET, 0xf5/255., 0xff/255., 0xfa/255. } },
- { "mistyrose", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xe4/255., 0xe1/255. } },
- { "moccasin", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xe4/255., 0xb5/255. } },
- { "navajowhite", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xde/255., 0xad/255. } },
- { "navy", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0x00/255., 0x80/255. } },
- { "oldlace", { CCD_PROPERTY_SPEC_SET, 0xfd/255., 0xf5/255., 0xe6/255. } },
- { "olive", { CCD_PROPERTY_SPEC_SET, 0x80/255., 0x80/255., 0x00/255. } },
- { "olivedrab", { CCD_PROPERTY_SPEC_SET, 0x6b/255., 0x8e/255., 0x23/255. } },
- { "orange", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xa5/255., 0x00/255. } },
- { "orangered", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0x45/255., 0x00/255. } },
- { "orchid", { CCD_PROPERTY_SPEC_SET, 0xda/255., 0x70/255., 0xd6/255. } },
- { "palegoldenrod", { CCD_PROPERTY_SPEC_SET, 0xee/255., 0xe8/255., 0xaa/255. } },
- { "palegreen", { CCD_PROPERTY_SPEC_SET, 0x98/255., 0xfb/255., 0x98/255. } },
- { "paleturquoise", { CCD_PROPERTY_SPEC_SET, 0xaf/255., 0xee/255., 0xee/255. } },
- { "palevioletred", { CCD_PROPERTY_SPEC_SET, 0xd8/255., 0x70/255., 0x93/255. } },
- { "papayawhip", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xef/255., 0xd5/255. } },
- { "peachpuff", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xda/255., 0xb9/255. } },
- { "peru", { CCD_PROPERTY_SPEC_SET, 0xcd/255., 0x85/255., 0x3f/255. } },
- { "pink", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xc0/255., 0xcb/255. } },
- { "plum", { CCD_PROPERTY_SPEC_SET, 0xdd/255., 0xa0/255., 0xdd/255. } },
- { "powderblue", { CCD_PROPERTY_SPEC_SET, 0xb0/255., 0xe0/255., 0xe6/255. } },
- { "purple", { CCD_PROPERTY_SPEC_SET, 0x80/255., 0x00/255., 0x80/255. } },
- { "red", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0x00/255., 0x00/255. } },
- { "rosybrown", { CCD_PROPERTY_SPEC_SET, 0xbc/255., 0x8f/255., 0x8f/255. } },
- { "royalblue", { CCD_PROPERTY_SPEC_SET, 0x41/255., 0x69/255., 0xe1/255. } },
- { "saddlebrown", { CCD_PROPERTY_SPEC_SET, 0x8b/255., 0x45/255., 0x13/255. } },
- { "salmon", { CCD_PROPERTY_SPEC_SET, 0xfa/255., 0x80/255., 0x72/255. } },
- { "sandybrown", { CCD_PROPERTY_SPEC_SET, 0xf4/255., 0xa4/255., 0x60/255. } },
- { "seagreen", { CCD_PROPERTY_SPEC_SET, 0x2e/255., 0x8b/255., 0x57/255. } },
- { "seashell", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xf5/255., 0xee/255. } },
- { "sienna", { CCD_PROPERTY_SPEC_SET, 0xa0/255., 0x52/255., 0x2d/255. } },
- { "silver", { CCD_PROPERTY_SPEC_SET, 0xc0/255., 0xc0/255., 0xc0/255. } },
- { "skyblue", { CCD_PROPERTY_SPEC_SET, 0x87/255., 0xce/255., 0xeb/255. } },
- { "slateblue", { CCD_PROPERTY_SPEC_SET, 0x6a/255., 0x5a/255., 0xcd/255. } },
- { "slategray", { CCD_PROPERTY_SPEC_SET, 0x70/255., 0x80/255., 0x90/255. } },
- { "slategrey", { CCD_PROPERTY_SPEC_SET, 0x70/255., 0x80/255., 0x90/255. } },
- { "snow", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xfa/255., 0xfa/255. } },
- { "springgreen", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0xff/255., 0x7f/255. } },
- { "steelblue", { CCD_PROPERTY_SPEC_SET, 0x46/255., 0x82/255., 0xb4/255. } },
- { "tan", { CCD_PROPERTY_SPEC_SET, 0xd2/255., 0xb4/255., 0x8c/255. } },
- { "teal", { CCD_PROPERTY_SPEC_SET, 0x00/255., 0x80/255., 0x80/255. } },
- { "thistle", { CCD_PROPERTY_SPEC_SET, 0xd8/255., 0xbf/255., 0xd8/255. } },
- { "tomato", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0x63/255., 0x47/255. } },
- { "turquoise", { CCD_PROPERTY_SPEC_SET, 0x40/255., 0xe0/255., 0xd0/255. } },
- { "violet", { CCD_PROPERTY_SPEC_SET, 0xee/255., 0x82/255., 0xee/255. } },
- { "wheat", { CCD_PROPERTY_SPEC_SET, 0xf5/255., 0xde/255., 0xb3/255. } },
- { "white", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xff/255., 0xff/255. } },
- { "whitesmoke", { CCD_PROPERTY_SPEC_SET, 0xf5/255., 0xf5/255., 0xf5/255. } },
- { "yellow", { CCD_PROPERTY_SPEC_SET, 0xff/255., 0xff/255., 0x00/255. } },
- { "yellowgreen", { CCD_PROPERTY_SPEC_SET, 0x9a/255., 0xcd/255., 0x32/255. } },
+ { "aliceblue", { CCSS_PROPERTY_SPEC_SET, 0xf0/255., 0xf8/255., 0xff/255. } },
+ { "antiquewhite", { CCSS_PROPERTY_SPEC_SET, 0xfa/255., 0xeb/255., 0xd7/255. } },
+ { "aqua", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0xff/255., 0xff/255. } },
+ { "aquamarine", { CCSS_PROPERTY_SPEC_SET, 0x7f/255., 0xff/255., 0xd4/255. } },
+ { "azure", { CCSS_PROPERTY_SPEC_SET, 0xf0/255., 0xff/255., 0xff/255. } },
+ { "beige", { CCSS_PROPERTY_SPEC_SET, 0xf5/255., 0xf5/255., 0xdc/255. } },
+ { "bisque", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xe4/255., 0xc4/255. } },
+ { "black", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0x00/255., 0x00/255. } },
+ { "blanchedalmond", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xeb/255., 0xcd/255. } },
+ { "blue", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0x00/255., 0xff/255. } },
+ { "blueviolet", { CCSS_PROPERTY_SPEC_SET, 0x8a/255., 0x2b/255., 0xe2/255. } },
+ { "brown", { CCSS_PROPERTY_SPEC_SET, 0xa5/255., 0x2a/255., 0x2a/255. } },
+ { "burlywood", { CCSS_PROPERTY_SPEC_SET, 0xde/255., 0xb8/255., 0x87/255. } },
+ { "cadetblue", { CCSS_PROPERTY_SPEC_SET, 0x5f/255., 0x9e/255., 0xa0/255. } },
+ { "chartreuse", { CCSS_PROPERTY_SPEC_SET, 0x7f/255., 0xff/255., 0x00/255. } },
+ { "chocolate", { CCSS_PROPERTY_SPEC_SET, 0xd2/255., 0x69/255., 0x1e/255. } },
+ { "coral", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0x7f/255., 0x50/255. } },
+ { "cornflowerblue", { CCSS_PROPERTY_SPEC_SET, 0x64/255., 0x95/255., 0xed/255. } },
+ { "cornsilk", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xf8/255., 0xdc/255. } },
+ { "crimson", { CCSS_PROPERTY_SPEC_SET, 0xdc/255., 0x14/255., 0x3c/255. } },
+ { "cyan", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0xff/255., 0xff/255. } },
+ { "darkblue", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0x00/255., 0x8b/255. } },
+ { "darkcyan", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0x8b/255., 0x8b/255. } },
+ { "darkgoldenrod", { CCSS_PROPERTY_SPEC_SET, 0xb8/255., 0x86/255., 0x0b/255. } },
+ { "darkgray", { CCSS_PROPERTY_SPEC_SET, 0xa9/255., 0xa9/255., 0xa9/255. } },
+ { "darkgrey", { CCSS_PROPERTY_SPEC_SET, 0xa9/255., 0xa9/255., 0xa9/255. } },
+ { "darkgreen", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0x64/255., 0x00/255. } },
+ { "darkkhaki", { CCSS_PROPERTY_SPEC_SET, 0xbd/255., 0xb7/255., 0x6b/255. } },
+ { "darkmagenta", { CCSS_PROPERTY_SPEC_SET, 0x8b/255., 0x00/255., 0x8b/255. } },
+ { "darkolivegreen", { CCSS_PROPERTY_SPEC_SET, 0x55/255., 0x6b/255., 0x2f/255. } },
+ { "darkorange", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0x8c/255., 0x00/255. } },
+ { "darkorchid", { CCSS_PROPERTY_SPEC_SET, 0x99/255., 0x32/255., 0xcc/255. } },
+ { "darkred", { CCSS_PROPERTY_SPEC_SET, 0x8b/255., 0x00/255., 0x00/255. } },
+ { "darksalmon", { CCSS_PROPERTY_SPEC_SET, 0xe9/255., 0x96/255., 0x7a/255. } },
+ { "darkseagreen", { CCSS_PROPERTY_SPEC_SET, 0x8f/255., 0xbc/255., 0x8f/255. } },
+ { "darkslateblue", { CCSS_PROPERTY_SPEC_SET, 0x48/255., 0x3d/255., 0x8b/255. } },
+ { "darkslategray", { CCSS_PROPERTY_SPEC_SET, 0x2f/255., 0x4f/255., 0x4f/255. } },
+ { "darkslategrey", { CCSS_PROPERTY_SPEC_SET, 0x2f/255., 0x4f/255., 0x4f/255. } },
+ { "darkturquoise", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0xce/255., 0xd1/255. } },
+ { "darkviolet", { CCSS_PROPERTY_SPEC_SET, 0x94/255., 0x00/255., 0xd3/255. } },
+ { "deeppink", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0x14/255., 0x93/255. } },
+ { "deepskyblue", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0xbf/255., 0xff/255. } },
+ { "dimgray", { CCSS_PROPERTY_SPEC_SET, 0x69/255., 0x69/255., 0x69/255. } },
+ { "dimgrey", { CCSS_PROPERTY_SPEC_SET, 0x69/255., 0x69/255., 0x69/255. } },
+ { "dodgerblue", { CCSS_PROPERTY_SPEC_SET, 0x1e/255., 0x90/255., 0xff/255. } },
+ { "firebrick", { CCSS_PROPERTY_SPEC_SET, 0xb2/255., 0x22/255., 0x22/255. } },
+ { "floralwhite", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xfa/255., 0xf0/255. } },
+ { "forestgreen", { CCSS_PROPERTY_SPEC_SET, 0x22/255., 0x8b/255., 0x22/255. } },
+ { "fuchsia", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0x00/255., 0xff/255. } },
+ { "gainsboro", { CCSS_PROPERTY_SPEC_SET, 0xdc/255., 0xdc/255., 0xdc/255. } },
+ { "ghostwhite", { CCSS_PROPERTY_SPEC_SET, 0xf8/255., 0xf8/255., 0xff/255. } },
+ { "gold", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xd7/255., 0x00/255. } },
+ { "goldenrod", { CCSS_PROPERTY_SPEC_SET, 0xda/255., 0xa5/255., 0x20/255. } },
+ { "gray", { CCSS_PROPERTY_SPEC_SET, 0x80/255., 0x80/255., 0x80/255. } },
+ { "grey", { CCSS_PROPERTY_SPEC_SET, 0x80/255., 0x80/255., 0x80/255. } },
+ { "green", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0x80/255., 0x00/255. } },
+ { "greenyellow", { CCSS_PROPERTY_SPEC_SET, 0xad/255., 0xff/255., 0x2f/255. } },
+ { "honeydew", { CCSS_PROPERTY_SPEC_SET, 0xf0/255., 0xff/255., 0xf0/255. } },
+ { "hotpink", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0x69/255., 0xb4/255. } },
+ { "indianred", { CCSS_PROPERTY_SPEC_SET, 0xcd/255., 0x5c/255., 0x5c/255. } },
+ { "indigo", { CCSS_PROPERTY_SPEC_SET, 0x4b/255., 0x00/255., 0x82/255. } },
+ { "ivory", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xff/255., 0xf0/255. } },
+ { "khaki", { CCSS_PROPERTY_SPEC_SET, 0xf0/255., 0xe6/255., 0x8c/255. } },
+ { "lavender", { CCSS_PROPERTY_SPEC_SET, 0xe6/255., 0xe6/255., 0xfa/255. } },
+ { "lavenderblush", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xf0/255., 0xf5/255. } },
+ { "lawngreen", { CCSS_PROPERTY_SPEC_SET, 0x7c/255., 0xfc/255., 0x00/255. } },
+ { "lemonchiffon", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xfa/255., 0xcd/255. } },
+ { "lightblue", { CCSS_PROPERTY_SPEC_SET, 0xad/255., 0xd8/255., 0xe6/255. } },
+ { "lightcoral", { CCSS_PROPERTY_SPEC_SET, 0xf0/255., 0x80/255., 0x80/255. } },
+ { "lightcyan", { CCSS_PROPERTY_SPEC_SET, 0xe0/255., 0xff/255., 0xff/255. } },
+ { "lightgoldenrodyellow", { CCSS_PROPERTY_SPEC_SET, 0xfa/255., 0xfa/255., 0xd2/255. } },
+ { "lightgray", { CCSS_PROPERTY_SPEC_SET, 0xd3/255., 0xd3/255., 0xd3/255. } },
+ { "lightgrey", { CCSS_PROPERTY_SPEC_SET, 0xd3/255., 0xd3/255., 0xd3/255. } },
+ { "lightgreen", { CCSS_PROPERTY_SPEC_SET, 0x90/255., 0xee/255., 0x90/255. } },
+ { "lightpink", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xb6/255., 0xc1/255. } },
+ { "lightsalmon", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xa0/255., 0x7a/255. } },
+ { "lightseagreen", { CCSS_PROPERTY_SPEC_SET, 0x20/255., 0xb2/255., 0xaa/255. } },
+ { "lightskyblue", { CCSS_PROPERTY_SPEC_SET, 0x87/255., 0xce/255., 0xfa/255. } },
+ { "lightslategray", { CCSS_PROPERTY_SPEC_SET, 0x77/255., 0x88/255., 0x99/255. } },
+ { "lightslategrey", { CCSS_PROPERTY_SPEC_SET, 0x77/255., 0x88/255., 0x99/255. } },
+ { "lightsteelblue", { CCSS_PROPERTY_SPEC_SET, 0xb0/255., 0xc4/255., 0xde/255. } },
+ { "lightyellow", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xff/255., 0xe0/255. } },
+ { "lime", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0xff/255., 0x00/255. } },
+ { "limegreen", { CCSS_PROPERTY_SPEC_SET, 0x32/255., 0xcd/255., 0x32/255. } },
+ { "linen", { CCSS_PROPERTY_SPEC_SET, 0xfa/255., 0xf0/255., 0xe6/255. } },
+ { "magenta", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0x00/255., 0xff/255. } },
+ { "maroon", { CCSS_PROPERTY_SPEC_SET, 0x80/255., 0x00/255., 0x00/255. } },
+ { "mediumaquamarine", { CCSS_PROPERTY_SPEC_SET, 0x66/255., 0xcd/255., 0xaa/255. } },
+ { "mediumblue", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0x00/255., 0xcd/255. } },
+ { "mediumorchid", { CCSS_PROPERTY_SPEC_SET, 0xba/255., 0x55/255., 0xd3/255. } },
+ { "mediumpurple", { CCSS_PROPERTY_SPEC_SET, 0x93/255., 0x70/255., 0xd8/255. } },
+ { "mediumseagreen", { CCSS_PROPERTY_SPEC_SET, 0x3c/255., 0xb3/255., 0x71/255. } },
+ { "mediumslateblue", { CCSS_PROPERTY_SPEC_SET, 0x7b/255., 0x68/255., 0xee/255. } },
+ { "mediumspringgreen", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0xfa/255., 0x9a/255. } },
+ { "mediumturquoise", { CCSS_PROPERTY_SPEC_SET, 0x48/255., 0xd1/255., 0xcc/255. } },
+ { "mediumvioletred", { CCSS_PROPERTY_SPEC_SET, 0xc7/255., 0x15/255., 0x85/255. } },
+ { "midnightblue", { CCSS_PROPERTY_SPEC_SET, 0x19/255., 0x19/255., 0x70/255. } },
+ { "mintcream", { CCSS_PROPERTY_SPEC_SET, 0xf5/255., 0xff/255., 0xfa/255. } },
+ { "mistyrose", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xe4/255., 0xe1/255. } },
+ { "moccasin", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xe4/255., 0xb5/255. } },
+ { "navajowhite", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xde/255., 0xad/255. } },
+ { "navy", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0x00/255., 0x80/255. } },
+ { "oldlace", { CCSS_PROPERTY_SPEC_SET, 0xfd/255., 0xf5/255., 0xe6/255. } },
+ { "olive", { CCSS_PROPERTY_SPEC_SET, 0x80/255., 0x80/255., 0x00/255. } },
+ { "olivedrab", { CCSS_PROPERTY_SPEC_SET, 0x6b/255., 0x8e/255., 0x23/255. } },
+ { "orange", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xa5/255., 0x00/255. } },
+ { "orangered", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0x45/255., 0x00/255. } },
+ { "orchid", { CCSS_PROPERTY_SPEC_SET, 0xda/255., 0x70/255., 0xd6/255. } },
+ { "palegoldenrod", { CCSS_PROPERTY_SPEC_SET, 0xee/255., 0xe8/255., 0xaa/255. } },
+ { "palegreen", { CCSS_PROPERTY_SPEC_SET, 0x98/255., 0xfb/255., 0x98/255. } },
+ { "paleturquoise", { CCSS_PROPERTY_SPEC_SET, 0xaf/255., 0xee/255., 0xee/255. } },
+ { "palevioletred", { CCSS_PROPERTY_SPEC_SET, 0xd8/255., 0x70/255., 0x93/255. } },
+ { "papayawhip", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xef/255., 0xd5/255. } },
+ { "peachpuff", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xda/255., 0xb9/255. } },
+ { "peru", { CCSS_PROPERTY_SPEC_SET, 0xcd/255., 0x85/255., 0x3f/255. } },
+ { "pink", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xc0/255., 0xcb/255. } },
+ { "plum", { CCSS_PROPERTY_SPEC_SET, 0xdd/255., 0xa0/255., 0xdd/255. } },
+ { "powderblue", { CCSS_PROPERTY_SPEC_SET, 0xb0/255., 0xe0/255., 0xe6/255. } },
+ { "purple", { CCSS_PROPERTY_SPEC_SET, 0x80/255., 0x00/255., 0x80/255. } },
+ { "red", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0x00/255., 0x00/255. } },
+ { "rosybrown", { CCSS_PROPERTY_SPEC_SET, 0xbc/255., 0x8f/255., 0x8f/255. } },
+ { "royalblue", { CCSS_PROPERTY_SPEC_SET, 0x41/255., 0x69/255., 0xe1/255. } },
+ { "saddlebrown", { CCSS_PROPERTY_SPEC_SET, 0x8b/255., 0x45/255., 0x13/255. } },
+ { "salmon", { CCSS_PROPERTY_SPEC_SET, 0xfa/255., 0x80/255., 0x72/255. } },
+ { "sandybrown", { CCSS_PROPERTY_SPEC_SET, 0xf4/255., 0xa4/255., 0x60/255. } },
+ { "seagreen", { CCSS_PROPERTY_SPEC_SET, 0x2e/255., 0x8b/255., 0x57/255. } },
+ { "seashell", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xf5/255., 0xee/255. } },
+ { "sienna", { CCSS_PROPERTY_SPEC_SET, 0xa0/255., 0x52/255., 0x2d/255. } },
+ { "silver", { CCSS_PROPERTY_SPEC_SET, 0xc0/255., 0xc0/255., 0xc0/255. } },
+ { "skyblue", { CCSS_PROPERTY_SPEC_SET, 0x87/255., 0xce/255., 0xeb/255. } },
+ { "slateblue", { CCSS_PROPERTY_SPEC_SET, 0x6a/255., 0x5a/255., 0xcd/255. } },
+ { "slategray", { CCSS_PROPERTY_SPEC_SET, 0x70/255., 0x80/255., 0x90/255. } },
+ { "slategrey", { CCSS_PROPERTY_SPEC_SET, 0x70/255., 0x80/255., 0x90/255. } },
+ { "snow", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xfa/255., 0xfa/255. } },
+ { "springgreen", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0xff/255., 0x7f/255. } },
+ { "steelblue", { CCSS_PROPERTY_SPEC_SET, 0x46/255., 0x82/255., 0xb4/255. } },
+ { "tan", { CCSS_PROPERTY_SPEC_SET, 0xd2/255., 0xb4/255., 0x8c/255. } },
+ { "teal", { CCSS_PROPERTY_SPEC_SET, 0x00/255., 0x80/255., 0x80/255. } },
+ { "thistle", { CCSS_PROPERTY_SPEC_SET, 0xd8/255., 0xbf/255., 0xd8/255. } },
+ { "tomato", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0x63/255., 0x47/255. } },
+ { "turquoise", { CCSS_PROPERTY_SPEC_SET, 0x40/255., 0xe0/255., 0xd0/255. } },
+ { "violet", { CCSS_PROPERTY_SPEC_SET, 0xee/255., 0x82/255., 0xee/255. } },
+ { "wheat", { CCSS_PROPERTY_SPEC_SET, 0xf5/255., 0xde/255., 0xb3/255. } },
+ { "white", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xff/255., 0xff/255. } },
+ { "whitesmoke", { CCSS_PROPERTY_SPEC_SET, 0xf5/255., 0xf5/255., 0xf5/255. } },
+ { "yellow", { CCSS_PROPERTY_SPEC_SET, 0xff/255., 0xff/255., 0x00/255. } },
+ { "yellowgreen", { CCSS_PROPERTY_SPEC_SET, 0x9a/255., 0xcd/255., 0x32/255. } },
};
void
-ccd_color_init (ccd_color_t *self)
+ccss_color_init (ccss_color_t *self)
{
memset (self, 0, sizeof (*self));
- self->spec = CCD_PROPERTY_SPEC_UNSET;
+ self->spec = CCSS_PROPERTY_SPEC_UNSET;
}
static bool
-parse_name (ccd_color_t *self,
+parse_name (ccss_color_t *self,
char const *css_color_name)
{
g_return_val_if_fail (css_color_name && self, false);
@@ -224,7 +224,7 @@
}
static bool
-parse_hex (ccd_color_t *self,
+parse_hex (ccss_color_t *self,
char const *color)
{
size_t len;
@@ -262,24 +262,24 @@
return true;
}
-static ccd_property_spec_t
-parse (ccd_color_t *self,
+static ccss_property_spec_t
+parse (ccss_color_t *self,
CRTerm const **value)
{
- ccd_property_spec_t type;
+ ccss_property_spec_t type;
char const *str;
bool ret;
- g_return_val_if_fail (self, CCD_PROPERTY_SPEC_UNSET);
+ g_return_val_if_fail (self, CCSS_PROPERTY_SPEC_UNSET);
if (!*value) {
- return CCD_PROPERTY_SPEC_UNSET;
+ return CCSS_PROPERTY_SPEC_UNSET;
}
switch ((*value)->type) {
case TERM_IDENT:
- type = ccd_property_parse_spec (value);
- if (type != CCD_PROPERTY_SPEC_SET) {
+ type = ccss_property_parse_spec (value);
+ if (type != CCSS_PROPERTY_SPEC_SET) {
/* Value already advanced. */
return type;
}
@@ -287,23 +287,23 @@
ret = parse_name (self, str);
if (ret) {
*value = (*value)->next;
- return CCD_PROPERTY_SPEC_SET;
+ return CCSS_PROPERTY_SPEC_SET;
}
- return CCD_PROPERTY_SPEC_UNSET;
+ return CCSS_PROPERTY_SPEC_UNSET;
case TERM_HASH:
str = cr_string_peek_raw_str ((*value)->content.str);
ret = parse_hex (self, str);
if (ret) {
*value = (*value)->next;
- return CCD_PROPERTY_SPEC_SET;
+ return CCSS_PROPERTY_SPEC_SET;
}
- return CCD_PROPERTY_SPEC_UNSET;
+ return CCSS_PROPERTY_SPEC_UNSET;
case TERM_RGB:
self->red = (*value)->content.rgb->red;
self->green = (*value)->content.rgb->green;
self->blue = (*value)->content.rgb->blue;
*value = (*value)->next;
- return CCD_PROPERTY_SPEC_SET;
+ return CCSS_PROPERTY_SPEC_SET;
/* fall thru for all other enum values to prevent compiler warnings */
case TERM_NO_TYPE:
case TERM_NUMBER:
@@ -312,12 +312,12 @@
case TERM_URI:
case TERM_UNICODERANGE:
default:
- return CCD_PROPERTY_SPEC_UNSET;
+ return CCSS_PROPERTY_SPEC_UNSET;
}
}
bool
-ccd_color_parse (ccd_color_t *self,
+ccss_color_parse (ccss_color_t *self,
CRTerm const **values)
{
if (!*values) {
@@ -325,25 +325,25 @@
}
self->spec = parse (self, values);
- return self->spec != CCD_PROPERTY_SPEC_UNSET;
+ return self->spec != CCSS_PROPERTY_SPEC_UNSET;
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
void
-ccd_color_dump (ccd_color_t const *self)
+ccss_color_dump (ccss_color_t const *self)
{
switch (self->spec) {
- case CCD_PROPERTY_SPEC_UNSET:
- case CCD_PROPERTY_SPEC_NONE:
- case CCD_PROPERTY_SPEC_INHERIT:
- ccd_property_spec_dump (self->spec);
+ case CCSS_PROPERTY_SPEC_UNSET:
+ case CCSS_PROPERTY_SPEC_NONE:
+ case CCSS_PROPERTY_SPEC_INHERIT:
+ ccss_property_spec_dump (self->spec);
break;
- case CCD_PROPERTY_SPEC_SET:
+ case CCSS_PROPERTY_SPEC_SET:
printf ("rgb(%.3f,%.3f,%.3f)",
self->red, self->green, self->blue);
}
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-color.h (from r132, /trunk/libccd/ccd/ccd-color.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-color.h (original)
+++ trunk/libccss/ccss/ccss-color.h Mon Sep 29 09:51:02 2008
@@ -17,17 +17,17 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_COLOR_H
-#define CCD_COLOR_H
+#ifndef CCSS_COLOR_H
+#define CCSS_COLOR_H
#include <stdbool.h>
#include <glib.h>
#include <libcroco/libcroco.h>
-#include <ccd/ccd-property.h>
+#include <ccss/ccss-property.h>
G_BEGIN_DECLS
-#define CCD_COLOR_ASSIGN(lhs_, rhs_) { \
+#define CCSS_COLOR_ASSIGN(lhs_, rhs_) { \
(lhs_).spec = (rhs_).spec; \
(lhs_).red = (rhs_).red; \
(lhs_).green = (rhs_).green; \
@@ -35,21 +35,21 @@
}
typedef struct {
- ccd_property_spec_t spec;
+ ccss_property_spec_t spec;
double red;
double green;
double blue;
-} ccd_color_t;
+} ccss_color_t;
-void ccd_color_init (ccd_color_t *self);
+void ccss_color_init (ccss_color_t *self);
-bool ccd_color_parse (ccd_color_t *self, CRTerm const **values);
+bool ccss_color_parse (ccss_color_t *self, CRTerm const **values);
-#ifdef CCD_DEBUG
-void ccd_color_dump (ccd_color_t const *self);
+#ifdef CCSS_DEBUG
+void ccss_color_dump (ccss_color_t const *self);
#endif
G_END_DECLS
-#endif /* CCD_COLOR_H */
+#endif /* CCSS_COLOR_H */
Copied: trunk/libccss/ccss/ccss-features.h.in (from r132, /trunk/libccd/ccd/ccd-features.h.in)
==============================================================================
--- /trunk/libccd/ccd/ccd-features.h.in (original)
+++ trunk/libccss/ccss/ccss-features.h.in Mon Sep 29 09:51:02 2008
@@ -17,20 +17,20 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef CCD_FEATURES_H
-#define CCD_FEATURES_H
+#ifndef CCSS_FEATURES_H
+#define CCSS_FEATURES_H
/* Enable debug code */
-#undef CCD_DEBUG
+#undef CCSS_DEBUG
/* Support for drawing Gtk+ primitives like `box-gap' */
-#undef CCD_WITH_GTK
+#undef CCSS_WITH_GTK
/* SVG support through librsvg */
-#undef CCD_WITH_RSVG
+#undef CCSS_WITH_RSVG
/* URI parsing support through libsoup */
-#undef CCD_WITH_SOUP
+#undef CCSS_WITH_SOUP
-#endif /* CCD_FEATURES_H */
+#endif /* CCSS_FEATURES_H */
Copied: trunk/libccss/ccss/ccss-function.c (from r132, /trunk/libccd/ccd/ccd-function.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-function.c (original)
+++ trunk/libccss/ccss/ccss-function.c Mon Sep 29 09:51:02 2008
@@ -18,14 +18,14 @@
*/
#include <string.h>
-#include "ccd-function.h"
+#include "ccss-function.h"
-static ccd_function_t *_vtable = NULL;
+static ccss_function_t *_vtable = NULL;
void
-ccd_function_set_vtable (ccd_function_t const *vtable)
+ccss_function_set_vtable (ccss_function_t const *vtable)
{
- ccd_function_t const *iter;
+ ccss_function_t const *iter;
unsigned int i;
if (_vtable) {
@@ -42,16 +42,16 @@
/* also copy NULL-terminator */
i++;
- _vtable = g_new0 (ccd_function_t, i);
+ _vtable = g_new0 (ccss_function_t, i);
memcpy (_vtable, vtable, sizeof (*vtable) * i);
}
}
char *
-ccd_function_invoke (char const *name,
+ccss_function_invoke (char const *name,
CRTerm const *values)
{
- ccd_function_f function;
+ ccss_function_f function;
GSList *args;
GSList *iter;
char *val;
Copied: trunk/libccss/ccss/ccss-function.h (from r132, /trunk/libccd/ccd/ccd-function.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-function.h (original)
+++ trunk/libccss/ccss/ccss-function.h Mon Sep 29 09:51:02 2008
@@ -17,26 +17,26 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_FUNCTION_H
-#define CCD_FUNCTION_H
+#ifndef CCSS_FUNCTION_H
+#define CCSS_FUNCTION_H
#include <glib.h>
#include <libcroco/libcroco.h>
G_BEGIN_DECLS
-typedef char * (*ccd_function_f) (GSList const *args);
+typedef char * (*ccss_function_f) (GSList const *args);
typedef struct {
char const *name;
- ccd_function_f function;
-} ccd_function_t;
+ ccss_function_f function;
+} ccss_function_t;
-void ccd_function_set_vtable (ccd_function_t const *vtable);
+void ccss_function_set_vtable (ccss_function_t const *vtable);
-char * ccd_function_invoke (char const *name, CRTerm const *args);
+char * ccss_function_invoke (char const *name, CRTerm const *args);
G_END_DECLS
-#endif /* CCD_FUNCTION_H */
+#endif /* CCSS_FUNCTION_H */
Copied: trunk/libccss/ccss/ccss-gtk-style.c (from r132, /trunk/libccd/ccd/ccd-gtk-style.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-gtk-style.c (original)
+++ trunk/libccss/ccss/ccss-gtk-style.c Mon Sep 29 09:51:02 2008
@@ -17,11 +17,11 @@
* MA 02110-1301, USA.
*/
-#include "ccd-gtk-style.h"
+#include "ccss-gtk-style.h"
/**
- * ccd_style_draw_gap:
- * @self: a ccd_style_t.
+ * ccss_style_draw_gap:
+ * @self: a ccss_style_t.
* @cr: the target to draw onto.
* @x: the starting x coordinate.
* @y: the starting y coordinate.
@@ -34,7 +34,7 @@
* Draw a rectangle with gap using this style instance.
**/
void
-ccd_style_draw_gap (ccd_style_t const *self,
+ccss_style_draw_gap (ccss_style_t const *self,
cairo_t *cr,
int32_t x,
int32_t y,
@@ -46,15 +46,15 @@
{
/* The rounding radii will have to be adjusted for certain gap
* positions, so we work on a copied set of them. */
- ccd_border_join_t left_top;
- ccd_border_join_t top_right;
- ccd_border_join_t right_bottom;
- ccd_border_join_t bottom_left;
-
- CCD_BORDER_JOIN_ASSIGN (left_top, self->left_top);
- CCD_BORDER_JOIN_ASSIGN (top_right, self->top_right);
- CCD_BORDER_JOIN_ASSIGN (right_bottom, self->right_bottom);
- CCD_BORDER_JOIN_ASSIGN (bottom_left, self->bottom_left);
+ ccss_border_join_t left_top;
+ ccss_border_join_t top_right;
+ ccss_border_join_t right_bottom;
+ ccss_border_join_t bottom_left;
+
+ CCSS_BORDER_JOIN_ASSIGN (left_top, self->left_top);
+ CCSS_BORDER_JOIN_ASSIGN (top_right, self->top_right);
+ CCSS_BORDER_JOIN_ASSIGN (right_bottom, self->right_bottom);
+ CCSS_BORDER_JOIN_ASSIGN (bottom_left, self->bottom_left);
switch (gap_side) {
case GTK_POS_LEFT:
@@ -91,17 +91,17 @@
if (right_bottom.radius < 0) right_bottom.radius = 0;
if (bottom_left.radius < 0) bottom_left.radius = 0;
- ccd_border_clamp_radii (x, y, width, height,
+ ccss_border_clamp_radii (x, y, width, height,
&left_top.radius, &top_right.radius,
&right_bottom.radius, &bottom_left.radius);
- ccd_border_path (&self->left, &left_top,
+ ccss_border_path (&self->left, &left_top,
&self->top, &top_right,
&self->right, &right_bottom,
&self->bottom, &bottom_left,
cr, x, y, width, height);
- ccd_background_fill (self->bg_attachment, self->bg_color,
+ ccss_background_fill (self->bg_attachment, self->bg_color,
self->bg_image, self->bg_position, self->bg_repeat,
self->bg_size, cr, x, y, width, height);
@@ -117,27 +117,27 @@
* With Gtk+ the portion following the gap might not be visible. */
if (bottom_left.radius < height - gap_start - gap_width &&
gap_start + gap_width < height) {
- ccd_border_draw (&self->left, NULL, NULL, NULL,
+ ccss_border_draw (&self->left, NULL, NULL, NULL,
NULL, NULL, NULL, &bottom_left,
- CCD_BORDER_VISIBILITY_HIDE_BOTTOM_LEFT |
- CCD_BORDER_ROUNDING_UNRESTRICTED,
+ CCSS_BORDER_VISIBILITY_HIDE_BOTTOM_LEFT |
+ CCSS_BORDER_ROUNDING_UNRESTRICTED,
cr, x, y + gap_start + gap_width - 1,
0, height - gap_start - gap_width);
}
/* Rounding reaches until start of gap? */
if (left_top.radius < gap_start) {
- ccd_border_draw (&self->left, &left_top, NULL, NULL,
+ ccss_border_draw (&self->left, &left_top, NULL, NULL,
NULL, NULL, NULL, NULL,
- CCD_BORDER_VISIBILITY_HIDE_LEFT_TOP |
- CCD_BORDER_ROUNDING_UNRESTRICTED,
+ CCSS_BORDER_VISIBILITY_HIDE_LEFT_TOP |
+ CCSS_BORDER_ROUNDING_UNRESTRICTED,
cr, x, y, 0, gap_start + 1);
}
}
- ccd_border_draw (&self->left, &left_top,
+ ccss_border_draw (&self->left, &left_top,
&self->top, &top_right,
&self->right, &right_bottom,
&self->bottom, &bottom_left,
- CCD_BORDER_VISIBILITY_HIDE_LEFT,
+ CCSS_BORDER_VISIBILITY_HIDE_LEFT,
cr, x, y, width, height);
break;
case GTK_POS_TOP:
@@ -145,29 +145,29 @@
if (gap_start > x || gap_width < width) {
/* Rounding reaches until start of gap? */
if (left_top.radius < gap_start) {
- ccd_border_draw (NULL, &left_top, &self->top, NULL,
+ ccss_border_draw (NULL, &left_top, &self->top, NULL,
NULL, NULL, NULL, NULL,
- CCD_BORDER_VISIBILITY_HIDE_LEFT_TOP |
- CCD_BORDER_ROUNDING_UNRESTRICTED,
+ CCSS_BORDER_VISIBILITY_HIDE_LEFT_TOP |
+ CCSS_BORDER_ROUNDING_UNRESTRICTED,
cr, x, y, gap_start + 1, 0);
}
/* Rounding reaches until start of gap?
* With Gtk+ the portion following the gap might not be visible. */
if (top_right.radius < width - gap_start - gap_width &&
gap_start + gap_width < width) {
- ccd_border_draw (NULL, NULL, &self->top, &top_right,
+ ccss_border_draw (NULL, NULL, &self->top, &top_right,
NULL, NULL, NULL, NULL,
- CCD_BORDER_VISIBILITY_HIDE_TOP_RIGHT |
- CCD_BORDER_ROUNDING_UNRESTRICTED,
+ CCSS_BORDER_VISIBILITY_HIDE_TOP_RIGHT |
+ CCSS_BORDER_ROUNDING_UNRESTRICTED,
cr, x + gap_start + gap_width - 1, y,
width - gap_start - gap_width, 0);
}
}
- ccd_border_draw (&self->left, &left_top,
+ ccss_border_draw (&self->left, &left_top,
&self->top, &top_right,
&self->right, &right_bottom,
&self->bottom, &bottom_left,
- CCD_BORDER_VISIBILITY_HIDE_TOP,
+ CCSS_BORDER_VISIBILITY_HIDE_TOP,
cr, x, y, width, height);
break;
case GTK_POS_RIGHT:
@@ -175,29 +175,29 @@
if (gap_start > y || gap_width < height) {
/* Rounding reaches until start of gap? */
if (top_right.radius < gap_start) {
- ccd_border_draw (NULL, NULL, NULL, &top_right,
+ ccss_border_draw (NULL, NULL, NULL, &top_right,
&self->right, NULL, NULL, NULL,
- CCD_BORDER_VISIBILITY_HIDE_TOP_RIGHT |
- CCD_BORDER_ROUNDING_UNRESTRICTED,
+ CCSS_BORDER_VISIBILITY_HIDE_TOP_RIGHT |
+ CCSS_BORDER_ROUNDING_UNRESTRICTED,
cr, x + width, y, 0, gap_start + 1);
}
/* Rounding reaches until start of gap?
* With Gtk+ the portion following the gap might not be visible. */
if (right_bottom.radius < height - gap_start - gap_width &&
gap_start + gap_width < height) {
- ccd_border_draw (NULL, NULL, NULL, NULL,
+ ccss_border_draw (NULL, NULL, NULL, NULL,
&self->right, &right_bottom, NULL, NULL,
- CCD_BORDER_VISIBILITY_HIDE_RIGHT_BOTTOM |
- CCD_BORDER_ROUNDING_UNRESTRICTED,
+ CCSS_BORDER_VISIBILITY_HIDE_RIGHT_BOTTOM |
+ CCSS_BORDER_ROUNDING_UNRESTRICTED,
cr, x + width, y + gap_start + gap_width - 1,
0, height - gap_start - gap_width);
}
}
- ccd_border_draw (&self->left, &left_top,
+ ccss_border_draw (&self->left, &left_top,
&self->top, &top_right,
&self->right, &right_bottom,
&self->bottom, &bottom_left,
- CCD_BORDER_VISIBILITY_HIDE_RIGHT,
+ CCSS_BORDER_VISIBILITY_HIDE_RIGHT,
cr, x, y, width, height);
break;
case GTK_POS_BOTTOM:
@@ -207,27 +207,27 @@
* With Gtk+ the portion following the gap might not be visible. */
if (right_bottom.radius < width - gap_start - gap_width &&
gap_start + gap_width < width) {
- ccd_border_draw (NULL, NULL, NULL, NULL,
+ ccss_border_draw (NULL, NULL, NULL, NULL,
NULL, &right_bottom, &self->bottom, NULL,
- CCD_BORDER_VISIBILITY_HIDE_RIGHT_BOTTOM |
- CCD_BORDER_ROUNDING_UNRESTRICTED,
+ CCSS_BORDER_VISIBILITY_HIDE_RIGHT_BOTTOM |
+ CCSS_BORDER_ROUNDING_UNRESTRICTED,
cr, x + gap_start + gap_width - 1, y + height,
width - gap_start - gap_width, 0);
}
/* Rounding reaches until start of gap? */
if (bottom_left.radius < gap_start) {
- ccd_border_draw (NULL, NULL, NULL, NULL,
+ ccss_border_draw (NULL, NULL, NULL, NULL,
NULL, NULL, &self->bottom, &bottom_left,
- CCD_BORDER_VISIBILITY_HIDE_BOTTOM_LEFT |
- CCD_BORDER_ROUNDING_UNRESTRICTED,
+ CCSS_BORDER_VISIBILITY_HIDE_BOTTOM_LEFT |
+ CCSS_BORDER_ROUNDING_UNRESTRICTED,
cr, x, y + height, gap_start + 1, 0);
}
}
- ccd_border_draw (&self->left, &left_top,
+ ccss_border_draw (&self->left, &left_top,
&self->top, &top_right,
&self->right, &right_bottom,
&self->bottom, &bottom_left,
- CCD_BORDER_VISIBILITY_HIDE_BOTTOM,
+ CCSS_BORDER_VISIBILITY_HIDE_BOTTOM,
cr, x, y, width, height);
break;
default:
@@ -237,8 +237,8 @@
}
/**
- * ccd_style_draw_polygon:
- * @self: a ccd_style_t.
+ * ccss_style_draw_polygon:
+ * @self: a ccss_style_t.
* @cr: the target to draw onto.
* @points: an array of #GdkPoint<!-- -->s.
* @n_points: length of @points.
@@ -247,7 +247,7 @@
* Draw a rectangle with gap using this style instance.
**/
void
-ccd_style_draw_polygon (ccd_style_t const *self,
+ccss_style_draw_polygon (ccss_style_t const *self,
cairo_t *cr,
GdkPoint *points,
int32_t n_points,
Copied: trunk/libccss/ccss/ccss-gtk-style.h (from r132, /trunk/libccd/ccd/ccd-gtk-style.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-gtk-style.h (original)
+++ trunk/libccss/ccss/ccss-gtk-style.h Mon Sep 29 09:51:02 2008
@@ -17,27 +17,27 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_GTK_STYLE_H
-#define CCD_GTK_STYLE_H
+#ifndef CCSS_GTK_STYLE_H
+#define CCSS_GTK_STYLE_H
#include <stdbool.h>
#include <stdint.h>
#include <cairo.h>
#include <glib.h>
#include <gtk/gtk.h>
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-style.h>
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-style.h>
G_BEGIN_DECLS
-void ccd_style_draw_gap (ccd_style_t const *self, cairo_t *cr,
+void ccss_style_draw_gap (ccss_style_t const *self, cairo_t *cr,
int32_t x, int32_t y, int32_t width, int32_t height,
GtkPositionType gap_side, int32_t gap_x, int32_t gap_width);
-void ccd_style_draw_polygon (ccd_style_t const *self, cairo_t *cr,
+void ccss_style_draw_polygon (ccss_style_t const *self, cairo_t *cr,
GdkPoint *points, int32_t n_points, bool fill);
G_END_DECLS
-#endif /* CCD_GTK_STYLE_H */
+#endif /* CCSS_GTK_STYLE_H */
Copied: trunk/libccss/ccss/ccss-image.c (from r132, /trunk/libccd/ccd/ccd-image.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-image.c (original)
+++ trunk/libccss/ccss/ccss-image.c Mon Sep 29 09:51:02 2008
@@ -19,20 +19,20 @@
#include <stdbool.h>
#include <string.h>
-#include "ccd-function.h"
-#include "ccd-image.h"
+#include "ccss-function.h"
+#include "ccss-image.h"
-#ifdef CCD_WITH_SOUP
+#ifdef CCSS_WITH_SOUP
#include <libsoup/soup.h>
#endif
-#if CCD_WITH_RSVG
+#if CCSS_WITH_RSVG
#include <librsvg/rsvg.h>
#include <librsvg/rsvg-cairo.h>
#endif
void
-ccd_image_discard (ccd_image_t *self)
+ccss_image_discard (ccss_image_t *self)
{
if (self->uri) {
g_free (self->uri);
@@ -45,10 +45,10 @@
}
}
-#if CCD_WITH_RSVG
+#if CCSS_WITH_RSVG
static bool
-load_svg (ccd_image_t *self,
+load_svg (ccss_image_t *self,
char const *uri,
char const *id)
{
@@ -90,10 +90,10 @@
return true;
}
-#endif /* CCD_WITH_RSVG */
+#endif /* CCSS_WITH_RSVG */
static bool
-load_png (ccd_image_t *self,
+load_png (ccss_image_t *self,
char const *path)
{
cairo_surface_t *surface;
@@ -118,13 +118,13 @@
}
static bool
-load_image (ccd_image_t *self)
+load_image (ccss_image_t *self)
{
cairo_status_t status;
bool matched;
char const *path;
char const *fragment;
-#if CCD_WITH_SOUP
+#if CCSS_WITH_SOUP
SoupURI *uri;
uri = soup_uri_new (self->uri);
@@ -138,7 +138,7 @@
matched = false;
-#if CCD_WITH_RSVG
+#if CCSS_WITH_RSVG
if (!matched &&
g_str_has_suffix (path, ".svg")) {
matched = load_svg (self, path, fragment);
@@ -151,7 +151,7 @@
matched = load_png (self, path);
}
-#if CCD_WITH_SOUP
+#if CCSS_WITH_SOUP
soup_uri_free (uri), uri = NULL;
#endif
@@ -163,31 +163,31 @@
return matched && self->pattern;
}
-ccd_property_spec_t
-ccd_image_parse (ccd_image_t *self,
+ccss_property_spec_t
+ccss_image_parse (ccss_image_t *self,
CRTerm const **value)
{
switch ((*value)->type) {
case TERM_IDENT:
- return ccd_property_parse_spec (value);
+ return ccss_property_parse_spec (value);
case TERM_URI:
- self->uri = ccd_function_invoke ("url", *value);
+ self->uri = ccss_function_invoke ("url", *value);
*value = (*value)->next;
return load_image (self) ?
- CCD_PROPERTY_SPEC_SET :
- CCD_PROPERTY_SPEC_UNSET;
+ CCSS_PROPERTY_SPEC_SET :
+ CCSS_PROPERTY_SPEC_UNSET;
default:
- return CCD_PROPERTY_SPEC_UNSET;
+ return CCSS_PROPERTY_SPEC_UNSET;
}
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
void
-ccd_image_dump (ccd_image_t const *self)
+ccss_image_dump (ccss_image_t const *self)
{
printf (self->uri);
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-image.h (from r132, /trunk/libccd/ccd/ccd-image.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-image.h (original)
+++ trunk/libccss/ccss/ccss-image.h Mon Sep 29 09:51:02 2008
@@ -17,14 +17,14 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_IMAGE_H
-#define CCD_IMAGE_H
+#ifndef CCSS_IMAGE_H
+#define CCSS_IMAGE_H
#include <cairo.h>
#include <glib.h>
#include <libcroco/libcroco.h>
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-property.h>
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-property.h>
G_BEGIN_DECLS
@@ -33,17 +33,17 @@
cairo_pattern_t *pattern;
double width;
double height;
-} ccd_image_t;
+} ccss_image_t;
-ccd_property_spec_t ccd_image_parse (ccd_image_t *self, CRTerm const **value);
+ccss_property_spec_t ccss_image_parse (ccss_image_t *self, CRTerm const **value);
-void ccd_image_discard (ccd_image_t *self);
+void ccss_image_discard (ccss_image_t *self);
-#ifdef CCD_DEBUG
-void ccd_image_dump (ccd_image_t const *self);
+#ifdef CCSS_DEBUG
+void ccss_image_dump (ccss_image_t const *self);
#endif
G_END_DECLS
-#endif /* CCD_IMAGE_H */
+#endif /* CCSS_IMAGE_H */
Copied: trunk/libccss/ccss/ccss-node.c (from r132, /trunk/libccd/ccd/ccd-node.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-node.c (original)
+++ trunk/libccss/ccss/ccss-node.c Mon Sep 29 09:51:02 2008
@@ -17,65 +17,65 @@
* MA 02110-1301, USA.
*/
-#include "ccd-node.h"
+#include "ccss-node.h"
static bool
-is_a (ccd_node_t const *self,
+is_a (ccss_node_t const *self,
char const *type_name)
{
return FALSE;
}
-static ccd_node_t *
-get_container (ccd_node_t const *self)
+static ccss_node_t *
+get_container (ccss_node_t const *self)
{
return NULL;
}
-static ccd_node_t *
-get_base_style (ccd_node_t const *self)
+static ccss_node_t *
+get_base_style (ccss_node_t const *self)
{
return NULL;
}
static char const *
-get_type (ccd_node_t const *self)
+get_type (ccss_node_t const *self)
{
return NULL;
}
static char const *
-get_id (ccd_node_t const *self)
+get_id (ccss_node_t const *self)
{
return NULL;
}
static char const *
-get_class (ccd_node_t const *self)
+get_class (ccss_node_t const *self)
{
return NULL;
}
static char const *
-get_pseudo_class (ccd_node_t const *self)
+get_pseudo_class (ccss_node_t const *self)
{
return NULL;
}
static char *
-get_attribute (ccd_node_t const *self,
+get_attribute (ccss_node_t const *self,
char const *name)
{
return NULL;
}
static void
-release (ccd_node_t *self)
+release (ccss_node_t *self)
{
return;
}
-static const ccd_node_class_t _default_node_class = {
+static const ccss_node_class_t _default_node_class = {
.is_a = is_a,
.get_container = get_container,
.get_base_style = get_base_style,
@@ -87,7 +87,7 @@
.release = release
};
-static ccd_node_class_t _node_class = {
+static ccss_node_class_t _node_class = {
.is_a = is_a,
.get_container = get_container,
.get_base_style = get_base_style,
@@ -103,7 +103,7 @@
#define N_ELEMENTS(vtable_) (sizeof (vtable_) / sizeof (node_f))
void
-ccd_node_fill_class (ccd_node_class_t *node_class)
+ccss_node_fill_class (ccss_node_class_t *node_class)
{
node_f const *node_vtable;
node_f *new_node_vtable;
@@ -117,14 +117,14 @@
}
}
-ccd_node_class_t const *
-ccd_node_peek_class (void)
+ccss_node_class_t const *
+ccss_node_peek_class (void)
{
return &_node_class;
}
void
-ccd_node_set_class (ccd_node_class_t const *node_class)
+ccss_node_set_class (ccss_node_class_t const *node_class)
{
node_f *node_vtable;
node_f const *new_node_vtable;
@@ -134,7 +134,7 @@
/* Reset if not resetting already, to allow for partial
* node class implementations. */
if (node_class != &_default_node_class) {
- ccd_node_set_class (&_default_node_class);
+ ccss_node_set_class (&_default_node_class);
}
node_vtable = (node_f *) &_node_class;
@@ -148,8 +148,8 @@
}
void
-ccd_node_reset_class (void)
+ccss_node_reset_class (void)
{
- ccd_node_set_class (&_default_node_class);
+ ccss_node_set_class (&_default_node_class);
}
Copied: trunk/libccss/ccss/ccss-node.h (from r132, /trunk/libccd/ccd/ccd-node.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-node.h (original)
+++ trunk/libccss/ccss/ccss-node.h Mon Sep 29 09:51:02 2008
@@ -17,157 +17,157 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_NODE_H
-#define CCD_NODE_H
+#ifndef CCSS_NODE_H
+#define CCSS_NODE_H
#include <stdbool.h>
#include <glib.h>
-#include <ccd/ccd-features.h>
+#include <ccss/ccss-features.h>
G_BEGIN_DECLS
/**
- * ccd_node_t:
+ * ccss_node_t:
*
* Stack-allocatable struct representing a document node. Used for querying the
- * #ccd_stylesheet_t.
+ * #ccss_stylesheet_t.
*
* <emphasis>Memory management:</emphasis> Unless specified otherwise, objects
- * of this kind are under the responsibility of the libccd consumer.
+ * of this kind are under the responsibility of the libccss consumer.
**/
-typedef void * ccd_node_t;
+typedef void * ccss_node_t;
/**
- * ccd_node_is_a_f:
- * @self: a #ccd_node_t.
+ * ccss_node_is_a_f:
+ * @self: a #ccss_node_t.
*
- * Hook function to query whether a #ccd_node_t is of a certain type.
+ * Hook function to query whether a #ccss_node_t is of a certain type.
*
* Returns: %TRUE if matches.
**/
-typedef bool (*ccd_node_is_a_f) (ccd_node_t const *self,
+typedef bool (*ccss_node_is_a_f) (ccss_node_t const *self,
char const *type_name);
/**
- * ccd_node_get_container_f:
- * @self: a #ccd_node_t.
+ * ccss_node_get_container_f:
+ * @self: a #ccss_node_t.
*
- * Hook function to query the container of a #ccd_node_t.
+ * Hook function to query the container of a #ccss_node_t.
*
* Returns: newly allocated container node or %NULL.
**/
-typedef ccd_node_t * (*ccd_node_get_container_f) (ccd_node_t const *self);
+typedef ccss_node_t * (*ccss_node_get_container_f) (ccss_node_t const *self);
/**
- * ccd_node_get_base_style_f:
- * @self: a #ccd_node_t.
+ * ccss_node_get_base_style_f:
+ * @self: a #ccss_node_t.
*
- * Hook function to query the name of the style a #ccd_node_t derives from.
+ * Hook function to query the name of the style a #ccss_node_t derives from.
*
* Returns: base style or %NULL. The returned value must be valid until
* it is released.
**/
-typedef ccd_node_t * (*ccd_node_get_base_style_f) (ccd_node_t const *self);
+typedef ccss_node_t * (*ccss_node_get_base_style_f) (ccss_node_t const *self);
/**
- * ccd_node_get_type_f:
- * @self: a #ccd_node_t.
+ * ccss_node_get_type_f:
+ * @self: a #ccss_node_t.
*
- * Hook function to query the type name of a #ccd_node_t.
+ * Hook function to query the type name of a #ccss_node_t.
*
* Returns: node type name or %NULL. The returned value must be valid until
* the current stylesheet query returns.
**/
-typedef const char * (*ccd_node_get_type_f) (ccd_node_t const *self);
+typedef const char * (*ccss_node_get_type_f) (ccss_node_t const *self);
/**
- * ccd_node_get_id_f:
- * @self: a #ccd_node_t.
+ * ccss_node_get_id_f:
+ * @self: a #ccss_node_t.
*
- * Hook function to query the ID of a #ccd_node_t.
+ * Hook function to query the ID of a #ccss_node_t.
*
* Returns: node ID or %NULL. The returned value must be valid until
* the current stylesheet query returns.
**/
-typedef const char * (*ccd_node_get_id_f) (ccd_node_t const *self);
+typedef const char * (*ccss_node_get_id_f) (ccss_node_t const *self);
/**
- * ccd_node_get_class_f:
- * @self: a #ccd_node_t.
+ * ccss_node_get_class_f:
+ * @self: a #ccss_node_t.
*
- * Hook function to query the class name of a #ccd_node_t.
+ * Hook function to query the class name of a #ccss_node_t.
*
* Returns: node class name or %NULL. The returned value must be valid until
* the current stylesheet query returns.
**/
-typedef const char * (*ccd_node_get_class_f) (ccd_node_t const *self);
+typedef const char * (*ccss_node_get_class_f) (ccss_node_t const *self);
/**
- * ccd_node_get_pseudo_class_f:
- * @self: a #ccd_node_t.
+ * ccss_node_get_pseudo_class_f:
+ * @self: a #ccss_node_t.
*
- * Hook function to query the pseudo-class name of a #ccd_node_t.
+ * Hook function to query the pseudo-class name of a #ccss_node_t.
*
* Returns: node pseudo-class name or %NULL. The returned value must be valid until
* the current stylesheet query returns.
**/
-typedef const char * (*ccd_node_get_pseudo_class_f) (ccd_node_t const *self);
+typedef const char * (*ccss_node_get_pseudo_class_f) (ccss_node_t const *self);
/**
- * ccd_node_get_attribute_f:
- * @self: a #ccd_node_t.
+ * ccss_node_get_attribute_f:
+ * @self: a #ccss_node_t.
* @name: attribute name.
*
- * Hook function to query a #ccd_node_t's attributes.
+ * Hook function to query a #ccss_node_t's attributes.
*
* Returns: attribute value or %NULL. The returned value must be valid until
* the current stylesheet query returns.
**/
-typedef char * (*ccd_node_get_attribute_f) (ccd_node_t const *self,
+typedef char * (*ccss_node_get_attribute_f) (ccss_node_t const *self,
char const *name);
/**
- * ccd_node_release_f:
- * @self: a #ccd_node_t.
+ * ccss_node_release_f:
+ * @self: a #ccss_node_t.
*
- * Hook function to deallocate a #ccd_node_t instance.
+ * Hook function to deallocate a #ccss_node_t instance.
**/
-typedef void (*ccd_node_release_f) (ccd_node_t *self);
+typedef void (*ccss_node_release_f) (ccss_node_t *self);
/**
- * ccd_node_class_t:
- * @get_container: a #ccd_node_get_container_f.
- * @get_base_style: a #ccd_node_get_base_style_f.
- * @get_id: a #ccd_node_get_id_f.
- * @get_type: a #ccd_node_get_type_f.
- * @get_class: a #ccd_node_get_class_f.
- * @get_pseudo_class: a #ccd_node_get_pseudo_class_f.
- * @get_attribute: a #ccd_node_get_attribute_f.
- * @release: a #ccd_node_release_f.
+ * ccss_node_class_t:
+ * @get_container: a #ccss_node_get_container_f.
+ * @get_base_style: a #ccss_node_get_base_style_f.
+ * @get_id: a #ccss_node_get_id_f.
+ * @get_type: a #ccss_node_get_type_f.
+ * @get_class: a #ccss_node_get_class_f.
+ * @get_pseudo_class: a #ccss_node_get_pseudo_class_f.
+ * @get_attribute: a #ccss_node_get_attribute_f.
+ * @release: a #ccss_node_release_f.
*
- * Dispatch table a CCD consumer has to fill so the selection engine can
+ * Dispatch table a CCSS consumer has to fill so the selection engine can
* retrieve information about the document the document.
*
- * The implemented dispatch table needs to be passed to #ccd_init.
+ * The implemented dispatch table needs to be passed to #ccss_init.
**/
typedef struct {
- ccd_node_is_a_f is_a;
- ccd_node_get_container_f get_container;
- ccd_node_get_base_style_f get_base_style;
- ccd_node_get_id_f get_id;
- ccd_node_get_type_f get_type;
- ccd_node_get_class_f get_class;
- ccd_node_get_pseudo_class_f get_pseudo_class;
- ccd_node_get_attribute_f get_attribute;
- ccd_node_release_f release;
-} ccd_node_class_t;
-
-void ccd_node_fill_class (ccd_node_class_t *node_class);
-ccd_node_class_t const * ccd_node_peek_class (void);
-void ccd_node_set_class (ccd_node_class_t const *node_class);
-void ccd_node_reset_class (void);
+ ccss_node_is_a_f is_a;
+ ccss_node_get_container_f get_container;
+ ccss_node_get_base_style_f get_base_style;
+ ccss_node_get_id_f get_id;
+ ccss_node_get_type_f get_type;
+ ccss_node_get_class_f get_class;
+ ccss_node_get_pseudo_class_f get_pseudo_class;
+ ccss_node_get_attribute_f get_attribute;
+ ccss_node_release_f release;
+} ccss_node_class_t;
+
+void ccss_node_fill_class (ccss_node_class_t *node_class);
+ccss_node_class_t const * ccss_node_peek_class (void);
+void ccss_node_set_class (ccss_node_class_t const *node_class);
+void ccss_node_reset_class (void);
G_END_DECLS
-#endif /* CCD_NODE_H */
+#endif /* CCSS_NODE_H */
Copied: trunk/libccss/ccss/ccss-parser.c (from r132, /trunk/libccd/ccd/ccd-parser.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-parser.c (original)
+++ trunk/libccss/ccss/ccss-parser.c Mon Sep 29 09:51:02 2008
@@ -21,31 +21,31 @@
#include <string.h>
#include <libcroco/libcroco.h>
#include "config.h"
-#include "ccd-block.h"
-#include "ccd-color.h"
-#include "ccd-parser.h"
-#include "ccd-property.h"
-#include "ccd-selector.h"
-#include "ccd-selector-group-priv.h"
+#include "ccss-block.h"
+#include "ccss-color.h"
+#include "ccss-parser.h"
+#include "ccss-property.h"
+#include "ccss-selector.h"
+#include "ccss-selector-group-priv.h"
typedef struct {
GSList *blocks;
GHashTable *type_rules;
GHashTable *class_rules;
GHashTable *id_rules;
- ccd_block_t *block;
-} ccd_parser_info_t;
+ ccss_block_t *block;
+} ccss_parser_info_t;
-#define HANDLER_GET_INFO(handler_) ((ccd_parser_info_t *) handler->app_data)
+#define HANDLER_GET_INFO(handler_) ((ccss_parser_info_t *) handler->app_data)
-static ccd_attribute_selector_match_t
+static ccss_attribute_selector_match_t
map_attribute_selector_match (enum AttrMatchWay cr_match)
{
switch (cr_match) {
case SET:
- return CCD_ATTRIBUTE_SELECTOR_MATCH_EXISTS;
+ return CCSS_ATTRIBUTE_SELECTOR_MATCH_EXISTS;
case EQUALS:
- return CCD_ATTRIBUTE_SELECTOR_MATCH_EQUALS;
+ return CCSS_ATTRIBUTE_SELECTOR_MATCH_EQUALS;
case INCLUDES:
case DASHMATCH:
case NO_MATCH:
@@ -54,16 +54,16 @@
}
/* fall back to (my interpretation of) default behaviour */
- return CCD_ATTRIBUTE_SELECTOR_MATCH_EXISTS;
+ return CCSS_ATTRIBUTE_SELECTOR_MATCH_EXISTS;
}
-static ccd_selector_t *
+static ccss_selector_t *
walk_additional_selector (CRAdditionalSel *cr_add_sel)
{
- ccd_selector_t *selector;
+ ccss_selector_t *selector;
char const *name;
char const *value;
- ccd_attribute_selector_match_t match;
+ ccss_attribute_selector_match_t match;
g_return_val_if_fail (cr_add_sel, NULL);
@@ -73,21 +73,21 @@
switch (cr_add_sel->type) {
case CLASS_ADD_SELECTOR:
name = cr_string_peek_raw_str (cr_add_sel->content.class_name);
- selector = ccd_class_selector_new (name);
+ selector = ccss_class_selector_new (name);
break;
case PSEUDO_CLASS_ADD_SELECTOR:
name = cr_string_peek_raw_str (cr_add_sel->content.pseudo->name);
- selector = ccd_pseudo_class_selector_new (name);
+ selector = ccss_pseudo_class_selector_new (name);
break;
case ID_ADD_SELECTOR:
name = cr_string_peek_raw_str (cr_add_sel->content.id_name);
- selector = ccd_pseudo_class_selector_new (name);
+ selector = ccss_pseudo_class_selector_new (name);
break;
case ATTRIBUTE_ADD_SELECTOR:
name = cr_string_peek_raw_str (cr_add_sel->content.attr_sel->name);
value = cr_string_peek_raw_str (cr_add_sel->content.attr_sel->value);
match = map_attribute_selector_match (cr_add_sel->content.attr_sel->match_way);
- selector = ccd_attribute_selector_new (name, value, match);
+ selector = ccss_attribute_selector_new (name, value, match);
break;
case NO_ADD_SELECTOR:
default:
@@ -96,26 +96,26 @@
}
if (cr_add_sel->next) {
- ccd_selector_t *refinement;
+ ccss_selector_t *refinement;
refinement = walk_additional_selector (cr_add_sel->next);
- ccd_selector_refine (selector, refinement);
+ ccss_selector_refine (selector, refinement);
}
return selector;
}
-static ccd_selector_t *
+static ccss_selector_t *
walk_simple_selector_r (CRSimpleSel *cr_simple_sel)
{
- ccd_selector_t *selector;
+ ccss_selector_t *selector;
g_return_val_if_fail (cr_simple_sel, NULL);
selector = NULL;
if (UNIVERSAL_SELECTOR & cr_simple_sel->type_mask) {
- selector = ccd_universal_selector_new ();
+ selector = ccss_universal_selector_new ();
} else if (TYPE_SELECTOR & cr_simple_sel->type_mask) {
- selector = ccd_type_selector_new (cr_string_peek_raw_str (cr_simple_sel->name));
+ selector = ccss_type_selector_new (cr_string_peek_raw_str (cr_simple_sel->name));
} else {
char const *sel;
sel = cr_simple_sel->name ? cr_string_peek_raw_str (cr_simple_sel->name) : NULL;
@@ -126,19 +126,19 @@
g_return_val_if_fail (selector, NULL);
if (cr_simple_sel->add_sel) {
- ccd_selector_t *refinement;
+ ccss_selector_t *refinement;
refinement = walk_additional_selector (cr_simple_sel->add_sel);
- ccd_selector_refine (selector, refinement);
+ ccss_selector_refine (selector, refinement);
}
if (cr_simple_sel->next) {
- ccd_selector_t *descendant;
+ ccss_selector_t *descendant;
descendant = walk_simple_selector_r (cr_simple_sel->next);
if (COMB_WS == cr_simple_sel->next->combinator) {
- selector = ccd_selector_append_descendant (selector,
+ selector = ccss_selector_append_descendant (selector,
descendant);
} else if (COMB_GT == cr_simple_sel->next->combinator) {
- selector = ccd_selector_append_child (selector,
+ selector = ccss_selector_append_child (selector,
descendant);
} else {
g_assert_not_reached ();
@@ -152,13 +152,13 @@
start_selector_cb (CRDocHandler *handler,
CRSelector *cr_sel)
{
- ccd_parser_info_t *info;
+ ccss_parser_info_t *info;
info = HANDLER_GET_INFO (handler);
g_assert (info && info->block == NULL);
- info->block = ccd_block_new ();
+ info->block = ccss_block_new ();
}
static void
@@ -167,7 +167,7 @@
CRTerm *values,
gboolean is_important)
{
- ccd_parser_info_t *info;
+ ccss_parser_info_t *info;
char const *property;
info = HANDLER_GET_INFO (handler);
@@ -177,12 +177,12 @@
property = cr_string_peek_raw_str (name);
if (0 == strcmp ("background", property) ||
0 == strncmp ("background-", property, sizeof ("background-") - 1)) {
- ccd_background_parse (&info->block->background, property, values);
+ ccss_background_parse (&info->block->background, property, values);
} else if (0 == strcmp ("border", property) ||
0 == strncmp ("border-", property, sizeof ("border-") - 1)) {
- ccd_border_parse (&info->block->border, property, values);
+ ccss_border_parse (&info->block->border, property, values);
} else if (0 == strcmp ("color", property)) {
- ccd_color_parse (&info->block->color,
+ ccss_color_parse (&info->block->color,
(CRTerm const **) &values);
}
}
@@ -191,9 +191,9 @@
end_selector_cb (CRDocHandler *handler,
CRSelector *cr_sel)
{
- ccd_parser_info_t *info;
- ccd_selector_t *selector;
- ccd_selector_group_t *group;
+ ccss_parser_info_t *info;
+ ccss_selector_t *selector;
+ ccss_selector_group_t *group;
CRSelector *iter;
GHashTable *rules;
char const *key;
@@ -206,28 +206,28 @@
do {
selector = walk_simple_selector_r (iter->simple_sel);
if (selector) {
- ccd_selector_set_block (selector, info->block);
+ ccss_selector_set_block (selector, info->block);
rules = NULL;
- if (ccd_selector_is_type (selector)) {
+ if (ccss_selector_is_type (selector)) {
rules = info->type_rules;
- } else if (ccd_selector_is_class (selector)) {
+ } else if (ccss_selector_is_class (selector)) {
rules = info->class_rules;
- } else if (ccd_selector_is_id (selector)) {
+ } else if (ccss_selector_is_id (selector)) {
rules = info->id_rules;
} else {
g_assert_not_reached ();
}
- key = ccd_selector_get_key (selector);
+ key = ccss_selector_get_key (selector);
g_assert (key);
- group = (ccd_selector_group_t *) g_hash_table_lookup (rules, key);
+ group = (ccss_selector_group_t *) g_hash_table_lookup (rules, key);
if (!group) {
- group = ccd_selector_group_new ();
+ group = ccss_selector_group_new ();
g_hash_table_insert (rules, (char *) key, group);
}
- ccd_selector_group_add_selector (group, selector);
+ ccss_selector_group_add_selector (group, selector);
}
} while (NULL != (iter = iter->next));
@@ -235,14 +235,14 @@
}
GSList *
-ccd_parser_parse_file (char const *css_file,
+ccss_parser_parse_file (char const *css_file,
GHashTable *type_rules,
GHashTable *class_rules,
GHashTable *id_rules)
{
CRParser *parser;
CRDocHandler *handler;
- ccd_parser_info_t info;
+ ccss_parser_info_t info;
enum CRStatus ret;
g_assert (css_file && type_rules && class_rules && id_rules);
@@ -270,7 +270,7 @@
}
/* See http://bugzilla.gnome.org/show_bug.cgi?id=553937 . */
-#ifndef CCD_ENABLE_LIBCROCO_WORKAROUND
+#ifndef CCSS_ENABLE_LIBCROCO_WORKAROUND
cr_doc_handler_unref (handler), handler = NULL;
#endif
cr_parser_destroy (parser), parser = NULL;
@@ -279,7 +279,7 @@
}
GSList *
-ccd_parser_parse_buffer (char const *buffer,
+ccss_parser_parse_buffer (char const *buffer,
size_t size,
GHashTable *type_rules,
GHashTable *class_rules,
@@ -287,7 +287,7 @@
{
CRParser *parser;
CRDocHandler *handler;
- ccd_parser_info_t info;
+ ccss_parser_info_t info;
enum CRStatus ret;
g_assert (buffer && size && type_rules && class_rules && id_rules);
Copied: trunk/libccss/ccss/ccss-parser.h (from r132, /trunk/libccd/ccd/ccd-parser.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-parser.h (original)
+++ trunk/libccss/ccss/ccss-parser.h Mon Sep 29 09:51:02 2008
@@ -17,23 +17,23 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_PARSER_H
-#define CCD_PARSER_H
+#ifndef CCSS_PARSER_H
+#define CCSS_PARSER_H
#include <stdbool.h>
#include <glib.h>
-#include <ccd/ccd-features.h>
+#include <ccss/ccss-features.h>
G_BEGIN_DECLS
-GSList * ccd_parser_parse_buffer (char const *buffer, size_t size,
+GSList * ccss_parser_parse_buffer (char const *buffer, size_t size,
GHashTable *type_rules,
GHashTable *class_rules, GHashTable *id_rules);
-GSList * ccd_parser_parse_file (char const *css_file, GHashTable *type_rules,
+GSList * ccss_parser_parse_file (char const *css_file, GHashTable *type_rules,
GHashTable *class_rules, GHashTable *id_rules);
G_END_DECLS
-#endif /* CCD_PARSER_H */
+#endif /* CCSS_PARSER_H */
Copied: trunk/libccss/ccss/ccss-position.c (from r132, /trunk/libccd/ccd/ccd-position.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-position.c (original)
+++ trunk/libccss/ccss/ccss-position.c Mon Sep 29 09:51:02 2008
@@ -17,26 +17,26 @@
* MA 02110-1301, USA.
*/
-#include "ccd-position.h"
+#include "ccss-position.h"
static const struct {
char const *name;
- ccd_position_type_t type;
+ ccss_position_type_t type;
const double percentage;
} _position_map[] = {
- { "left", CCD_POSITION_LEFT, 0 },
- { "top", CCD_POSITION_TOP, 0 },
- { "right", CCD_POSITION_RIGHT, 100 },
- { "bottom", CCD_POSITION_BOTTOM, 100 },
- { "center", CCD_POSITION_CENTER, 50 },
-
- { "auto", CCD_POSITION_AUTO, -1 },
- { "contain", CCD_POSITION_CONTAIN, -1 },
- { "cover", CCD_POSITION_COVER, -1 }
+ { "left", CCSS_POSITION_LEFT, 0 },
+ { "top", CCSS_POSITION_TOP, 0 },
+ { "right", CCSS_POSITION_RIGHT, 100 },
+ { "bottom", CCSS_POSITION_BOTTOM, 100 },
+ { "center", CCSS_POSITION_CENTER, 50 },
+
+ { "auto", CCSS_POSITION_AUTO, -1 },
+ { "contain", CCSS_POSITION_CONTAIN, -1 },
+ { "cover", CCSS_POSITION_COVER, -1 }
};
bool
-ccd_position_parse (ccd_position_t *self,
+ccss_position_parse (ccss_position_t *self,
uint32_t flags,
CRTerm const **values)
{
@@ -53,7 +53,7 @@
if (_position_map[i].type & flags &&
0 == g_ascii_strcasecmp (_position_map[i].name, name)) {
if (_position_map[i].percentage > -1) {
- self->type = CCD_POSITION_PERCENTAGE;
+ self->type = CCSS_POSITION_PERCENTAGE;
self->value = _position_map[i].percentage;
} else {
self->type = _position_map[i].type;
@@ -65,15 +65,15 @@
}
break;
case TERM_NUMBER:
- if (CCD_POSITION_PERCENTAGE & flags &&
+ if (CCSS_POSITION_PERCENTAGE & flags &&
NUM_PERCENTAGE == (*values)->content.num->type) {
- self->type = CCD_POSITION_PERCENTAGE;
+ self->type = CCSS_POSITION_PERCENTAGE;
self->value = (*values)->content.num->val;
*values = (*values)->next;
return true;
- } else if (CCD_POSITION_LENGTH & flags &&
+ } else if (CCSS_POSITION_LENGTH & flags &&
NUM_GENERIC == (*values)->content.num->type) {
- self->type = CCD_POSITION_LENGTH;
+ self->type = CCSS_POSITION_LENGTH;
self->value = (*values)->content.num->val;
*values = (*values)->next;
return true;
@@ -91,18 +91,18 @@
}
double
-ccd_position_get_pos (ccd_position_t const *self,
+ccss_position_get_pos (ccss_position_t const *self,
double extent,
double size)
{
switch (self->type) {
- case CCD_POSITION_LENGTH:
+ case CCSS_POSITION_LENGTH:
return self->value;
- case CCD_POSITION_PERCENTAGE:
+ case CCSS_POSITION_PERCENTAGE:
return self->value / 100. * (extent - size);
- case CCD_POSITION_CONTAIN:
- case CCD_POSITION_COVER:
- case CCD_POSITION_AUTO:
+ case CCSS_POSITION_CONTAIN:
+ case CCSS_POSITION_COVER:
+ case CCSS_POSITION_AUTO:
default:
g_assert_not_reached ();
/* Need some code here when building w/o assertions. */
@@ -153,7 +153,7 @@
}
double
-ccd_position_get_hsize (ccd_position_t const *self,
+ccss_position_get_hsize (ccss_position_t const *self,
double extent_x,
double extent_y,
double width,
@@ -163,17 +163,17 @@
double y;
switch (self->type) {
- case CCD_POSITION_LENGTH:
+ case CCSS_POSITION_LENGTH:
return self->value;
- case CCD_POSITION_PERCENTAGE:
+ case CCSS_POSITION_PERCENTAGE:
return self->value * extent_x / 100.;
- case CCD_POSITION_CONTAIN:
+ case CCSS_POSITION_CONTAIN:
contain (extent_x, extent_y, width, height, &x, &y);
return x;
- case CCD_POSITION_COVER:
+ case CCSS_POSITION_COVER:
cover (extent_x, extent_y, width, height, &x, &y);
return x;
- case CCD_POSITION_AUTO:
+ case CCSS_POSITION_AUTO:
return width;
default:
g_assert_not_reached ();
@@ -185,7 +185,7 @@
}
double
-ccd_position_get_vsize (ccd_position_t const *self,
+ccss_position_get_vsize (ccss_position_t const *self,
double extent_x,
double extent_y,
double width,
@@ -195,17 +195,17 @@
double y;
switch (self->type) {
- case CCD_POSITION_LENGTH:
+ case CCSS_POSITION_LENGTH:
return self->value;
- case CCD_POSITION_PERCENTAGE:
+ case CCSS_POSITION_PERCENTAGE:
return self->value * extent_y / 100.;
- case CCD_POSITION_CONTAIN:
+ case CCSS_POSITION_CONTAIN:
contain (extent_x, extent_y, width, height, &x, &y);
return y;
- case CCD_POSITION_COVER:
+ case CCSS_POSITION_COVER:
cover (extent_x, extent_y, width, height, &x, &y);
return y;
- case CCD_POSITION_AUTO:
+ case CCSS_POSITION_AUTO:
return height;
default:
g_assert_not_reached ();
@@ -216,13 +216,13 @@
return 0;
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
void
-ccd_position_dump (ccd_position_t const *self)
+ccss_position_dump (ccss_position_t const *self)
{
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-position.h (from r132, /trunk/libccd/ccd/ccd-position.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-position.h (original)
+++ trunk/libccss/ccss/ccss-position.h Mon Sep 29 09:51:02 2008
@@ -17,76 +17,76 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_POSITION_H
-#define CCD_POSITION_H
+#ifndef CCSS_POSITION_H
+#define CCSS_POSITION_H
#include <stdbool.h>
#include <stdint.h>
#include <glib.h>
#include <libcroco/libcroco.h>
-#include <ccd/ccd-features.h>
+#include <ccss/ccss-features.h>
G_BEGIN_DECLS
typedef enum {
/* Remember to revisit all locations where a mask is used when it's
* being extended. */
- CCD_POSITION_LENGTH = 1 << 0,
- CCD_POSITION_PERCENTAGE = 1 << 1,
+ CCSS_POSITION_LENGTH = 1 << 0,
+ CCSS_POSITION_PERCENTAGE = 1 << 1,
- CCD_POSITION_MASK_NUMERIC = CCD_POSITION_LENGTH |
- CCD_POSITION_PERCENTAGE,
+ CCSS_POSITION_MASK_NUMERIC = CCSS_POSITION_LENGTH |
+ CCSS_POSITION_PERCENTAGE,
- CCD_POSITION_LEFT = 1 << 2,
- CCD_POSITION_TOP = 1 << 3,
- CCD_POSITION_RIGHT = 1 << 4,
- CCD_POSITION_BOTTOM = 1 << 5,
- CCD_POSITION_CENTER = 1 << 6,
-
- CCD_POSITION_MASK_HORIZONTAL = CCD_POSITION_LEFT |
- CCD_POSITION_RIGHT |
- CCD_POSITION_CENTER,
-
- CCD_POSITION_MASK_VERTICAL = CCD_POSITION_TOP |
- CCD_POSITION_BOTTOM |
- CCD_POSITION_CENTER,
-
- CCD_POSITION_AUTO = 1 << 7,
- CCD_POSITION_CONTAIN = 1 << 8,
- CCD_POSITION_COVER = 1 << 9,
- CCD_POSITION_MASK_AUTO = CCD_POSITION_AUTO |
- CCD_POSITION_CONTAIN |
- CCD_POSITION_COVER
-} ccd_position_type_t;
+ CCSS_POSITION_LEFT = 1 << 2,
+ CCSS_POSITION_TOP = 1 << 3,
+ CCSS_POSITION_RIGHT = 1 << 4,
+ CCSS_POSITION_BOTTOM = 1 << 5,
+ CCSS_POSITION_CENTER = 1 << 6,
+
+ CCSS_POSITION_MASK_HORIZONTAL = CCSS_POSITION_LEFT |
+ CCSS_POSITION_RIGHT |
+ CCSS_POSITION_CENTER,
+
+ CCSS_POSITION_MASK_VERTICAL = CCSS_POSITION_TOP |
+ CCSS_POSITION_BOTTOM |
+ CCSS_POSITION_CENTER,
+
+ CCSS_POSITION_AUTO = 1 << 7,
+ CCSS_POSITION_CONTAIN = 1 << 8,
+ CCSS_POSITION_COVER = 1 << 9,
+ CCSS_POSITION_MASK_AUTO = CCSS_POSITION_AUTO |
+ CCSS_POSITION_CONTAIN |
+ CCSS_POSITION_COVER
+} ccss_position_type_t;
typedef struct {
- ccd_position_type_t type;
+ ccss_position_type_t type;
double value;
-} ccd_position_t;
+} ccss_position_t;
-bool ccd_position_parse (ccd_position_t *self, uint32_t flags,
+bool ccss_position_parse (ccss_position_t *self, uint32_t flags,
CRTerm const **value);
-double ccd_position_get_pos (ccd_position_t const *self,
+double ccss_position_get_pos (ccss_position_t const *self,
double extent, double size);
-double ccd_position_get_vpos (ccd_position_t const *self,
+double ccss_position_get_vpos (ccss_position_t const *self,
double extent_x, double extent_y,
double width, double height);
-double ccd_position_get_hsize (ccd_position_t const *self,
+double ccss_position_get_hsize (ccss_position_t const *self,
double extent_x, double extent_y,
double width, double height);
-double ccd_position_get_vsize (ccd_position_t const *self,
+double ccss_position_get_vsize (ccss_position_t const *self,
double extent_x, double extent_y,
double width, double height);
-#ifdef CCD_DEBUG
-void ccd_position_dump (ccd_position_t const *self);
+#ifdef CCSS_DEBUG
+void ccss_position_dump (ccss_position_t const *self);
#endif
G_END_DECLS
-#endif /* CCD_POSITION_H */
+#endif /* CCSS_POSITION_H */
Copied: trunk/libccss/ccss/ccss-property.c (from r132, /trunk/libccd/ccd/ccd-property.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-property.c (original)
+++ trunk/libccss/ccss/ccss-property.c Mon Sep 29 09:51:02 2008
@@ -19,58 +19,58 @@
#include <stdio.h>
#include <string.h>
-#include "ccd-property.h"
+#include "ccss-property.h"
-ccd_property_spec_t
-ccd_property_parse_spec (CRTerm const **value)
+ccss_property_spec_t
+ccss_property_parse_spec (CRTerm const **value)
{
char const *str;
if (!*value) {
- return CCD_PROPERTY_SPEC_UNSET;
+ return CCSS_PROPERTY_SPEC_UNSET;
} else if (TERM_IDENT == (*value)->type) {
str = cr_string_peek_raw_str ((*value)->content.str);
if (0 == strcmp ("none", str)) {
*value = (*value)->next;
- return CCD_PROPERTY_SPEC_NONE;
+ return CCSS_PROPERTY_SPEC_NONE;
} else if (0 == strcmp ("inherit", str)) {
g_warning ("Property `inherit' not supported yet.");
*value = (*value)->next;
- return CCD_PROPERTY_SPEC_INHERIT;
+ return CCSS_PROPERTY_SPEC_INHERIT;
}
}
- return CCD_PROPERTY_SPEC_SET;
+ return CCSS_PROPERTY_SPEC_SET;
}
bool
-ccd_property_is_set (ccd_property_spec_t property)
+ccss_property_is_set (ccss_property_spec_t property)
{
- return CCD_PROPERTY_SPEC_SET == property ||
- CCD_PROPERTY_SPEC_INHERIT == property;
+ return CCSS_PROPERTY_SPEC_SET == property ||
+ CCSS_PROPERTY_SPEC_INHERIT == property;
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
void
-ccd_property_spec_dump (ccd_property_spec_t const spec)
+ccss_property_spec_dump (ccss_property_spec_t const spec)
{
switch (spec) {
- case CCD_PROPERTY_SPEC_UNSET:
+ case CCSS_PROPERTY_SPEC_UNSET:
printf ("<unset>");
break;
- case CCD_PROPERTY_SPEC_NONE:
+ case CCSS_PROPERTY_SPEC_NONE:
printf ("none");
break;
- case CCD_PROPERTY_SPEC_INHERIT:
+ case CCSS_PROPERTY_SPEC_INHERIT:
printf ("<inherit>");
break;
- case CCD_PROPERTY_SPEC_SET:
+ case CCSS_PROPERTY_SPEC_SET:
/* Needs custom printing. */
break;
}
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-property.h (from r132, /trunk/libccd/ccd/ccd-property.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-property.h (original)
+++ trunk/libccss/ccss/ccss-property.h Mon Sep 29 09:51:02 2008
@@ -17,36 +17,36 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_PROPERTY_H
-#define CCD_PROPERTY_H
+#ifndef CCSS_PROPERTY_H
+#define CCSS_PROPERTY_H
#include <glib.h>
#include <stdbool.h>
#include <libcroco/libcroco.h>
-#include <ccd/ccd-features.h>
+#include <ccss/ccss-features.h>
G_BEGIN_DECLS
-#define CCD_PROPERTY_DUMP_PREFIX " "
+#define CCSS_PROPERTY_DUMP_PREFIX " "
-/* TODO maybe make this flags, include a CCD_PROPERTY_SPEC_RESOLVED
- * and resolve in ccd_style_init(). */
+/* TODO maybe make this flags, include a CCSS_PROPERTY_SPEC_RESOLVED
+ * and resolve in ccss_style_init(). */
typedef enum {
- CCD_PROPERTY_SPEC_UNSET = 0,
- CCD_PROPERTY_SPEC_NONE,
- CCD_PROPERTY_SPEC_INHERIT,
- CCD_PROPERTY_SPEC_SET
-} ccd_property_spec_t;
+ CCSS_PROPERTY_SPEC_UNSET = 0,
+ CCSS_PROPERTY_SPEC_NONE,
+ CCSS_PROPERTY_SPEC_INHERIT,
+ CCSS_PROPERTY_SPEC_SET
+} ccss_property_spec_t;
-ccd_property_spec_t ccd_property_parse_spec (CRTerm const **value);
+ccss_property_spec_t ccss_property_parse_spec (CRTerm const **value);
-bool ccd_property_is_set (ccd_property_spec_t property);
+bool ccss_property_is_set (ccss_property_spec_t property);
-#ifdef CCD_DEBUG
-void ccd_property_spec_dump (ccd_property_spec_t const spec);
+#ifdef CCSS_DEBUG
+void ccss_property_spec_dump (ccss_property_spec_t const spec);
#endif
G_END_DECLS
-#endif /* CCD_PROPERTY_H */
+#endif /* CCSS_PROPERTY_H */
Copied: trunk/libccss/ccss/ccss-selector-group-priv.h (from r132, /trunk/libccd/ccd/ccd-selector-group-priv.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-selector-group-priv.h (original)
+++ trunk/libccss/ccss/ccss-selector-group-priv.h Mon Sep 29 09:51:02 2008
@@ -17,37 +17,37 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_SELECTOR_GROUP_PRIV_H
-#define CCD_SELECTOR_GROUP_PRIV_H
+#ifndef CCSS_SELECTOR_GROUP_PRIV_H
+#define CCSS_SELECTOR_GROUP_PRIV_H
#include <stdbool.h>
#include <glib.h>
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-node.h>
-#include <ccd/ccd-selector-group.h>
-#include <ccd/ccd-selector.h>
-#include <ccd/ccd-style.h>
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-node.h>
+#include <ccss/ccss-selector-group.h>
+#include <ccss/ccss-selector.h>
+#include <ccss/ccss-style.h>
G_BEGIN_DECLS
-void ccd_selector_group_add_selector (ccd_selector_group_t *self,
- ccd_selector_t *selector);
-void ccd_selector_group_merge (ccd_selector_group_t *self,
- ccd_selector_group_t const *group);
-void ccd_selector_group_merge_base (ccd_selector_group_t *self,
- ccd_selector_group_t const *group);
-
-GSList const * ccd_selector_group_get_dangling_selectors (ccd_selector_group_t const *self);
-void ccd_selector_group_clear_dangling_selectors (ccd_selector_group_t *self);
-
-bool ccd_selector_group_query_collect (ccd_selector_group_t const *self,
- ccd_node_t const *node,
- ccd_selector_group_t *result_group,
+void ccss_selector_group_add_selector (ccss_selector_group_t *self,
+ ccss_selector_t *selector);
+void ccss_selector_group_merge (ccss_selector_group_t *self,
+ ccss_selector_group_t const *group);
+void ccss_selector_group_merge_base (ccss_selector_group_t *self,
+ ccss_selector_group_t const *group);
+
+GSList const * ccss_selector_group_get_dangling_selectors (ccss_selector_group_t const *self);
+void ccss_selector_group_clear_dangling_selectors (ccss_selector_group_t *self);
+
+bool ccss_selector_group_query_collect (ccss_selector_group_t const *self,
+ ccss_node_t const *node,
+ ccss_selector_group_t *result_group,
bool as_base);
-bool ccd_selector_group_query_apply (ccd_selector_group_t const *self,
- ccd_node_t const *node, ccd_style_t *style);
+bool ccss_selector_group_query_apply (ccss_selector_group_t const *self,
+ ccss_node_t const *node, ccss_style_t *style);
G_END_DECLS
-#endif /* CCD_SELECTOR_GROUP_PRIV_H */
+#endif /* CCSS_SELECTOR_GROUP_PRIV_H */
Copied: trunk/libccss/ccss/ccss-selector-group.c (from r132, /trunk/libccd/ccd/ccd-selector-group.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-selector-group.c (original)
+++ trunk/libccss/ccss/ccss-selector-group.c Mon Sep 29 09:51:02 2008
@@ -17,21 +17,21 @@
* MA 02110-1301, USA.
*/
-#include "ccd-selector-group-priv.h"
+#include "ccss-selector-group-priv.h"
typedef struct {
GSList *selectors;
-} ccd_selector_set_t;
+} ccss_selector_set_t;
/**
- * ccd_selector_group_t:
+ * ccss_selector_group_t:
* @sets:
* @min_specificity_e:
* @dangling_selectors:
*
* Represents a set of associated styling information.
**/
-struct ccd_selector_group_ {
+struct ccss_selector_group_ {
GTree *sets;
unsigned int n_selectors;
unsigned int min_specificity_e;
@@ -47,52 +47,52 @@
}
static void
-free_set (ccd_selector_set_t *set)
+free_set (ccss_selector_set_t *set)
{
GSList *iter;
- ccd_selector_t *selector;
+ ccss_selector_t *selector;
g_assert (set);
iter = set->selectors;
while (iter) {
- selector = (ccd_selector_t *) iter->data;
+ selector = (ccss_selector_t *) iter->data;
iter = g_slist_remove (iter, selector);
- ccd_selector_free (selector);
+ ccss_selector_free (selector);
}
g_free (set);
}
/**
- * ccd_selector_group_new:
+ * ccss_selector_group_new:
*
* Create an empty selector group.
*
- * A newly allocated #ccd_selector_group_t.
+ * A newly allocated #ccss_selector_group_t.
**/
-ccd_selector_group_t *
-ccd_selector_group_new (void)
+ccss_selector_group_t *
+ccss_selector_group_new (void)
{
- ccd_selector_group_t *self;
+ ccss_selector_group_t *self;
- self = g_new0 (ccd_selector_group_t, 1);
+ self = g_new0 (ccss_selector_group_t, 1);
self->sets = g_tree_new_full ((GCompareDataFunc) compare, NULL, NULL,
(GDestroyNotify) free_set);
self->n_selectors = 0;
- self->min_specificity_e = CCD_SELECTOR_MAX_SPECIFICITY;
+ self->min_specificity_e = CCSS_SELECTOR_MAX_SPECIFICITY;
return self;
}
/**
- * ccd_selector_group_free:
- * @self: a #ccd_selector_group_t.
+ * ccss_selector_group_free:
+ * @self: a #ccss_selector_group_t.
*
* Free the selector group and all associated resources.
**/
void
-ccd_selector_group_free (ccd_selector_group_t *self)
+ccss_selector_group_free (ccss_selector_group_t *self)
{
g_assert (self);
@@ -105,18 +105,18 @@
* invocation, so base styles are cascaded root-first.
*/
static void
-query_base_r (ccd_selector_group_t *self,
- ccd_node_t const *node)
+query_base_r (ccss_selector_group_t *self,
+ ccss_node_t const *node)
{
- ccd_node_class_t const *node_class;
- ccd_selector_t *selector;
- ccd_node_t *base;
+ ccss_node_class_t const *node_class;
+ ccss_selector_t *selector;
+ ccss_node_t *base;
char const *type_name;
unsigned int specificity_e;
g_assert (self->min_specificity_e >= 0);
- node_class = ccd_node_peek_class ();
+ node_class = ccss_node_peek_class ();
specificity_e = self->min_specificity_e;
base = node_class->get_base_style (node);
@@ -130,7 +130,7 @@
/* create dangling base type selector and remember for later fixup */
type_name = node_class->get_type (node);
- selector = ccd_base_type_selector_new (type_name, specificity_e);
+ selector = ccss_base_type_selector_new (type_name, specificity_e);
self->dangling_selectors = g_slist_prepend (self->dangling_selectors, selector);
}
@@ -138,19 +138,19 @@
* Takes ownership of the selector.
*/
void
-ccd_selector_group_add_selector (ccd_selector_group_t *self,
- ccd_selector_t *selector)
+ccss_selector_group_add_selector (ccss_selector_group_t *self,
+ ccss_selector_t *selector)
{
- ccd_selector_set_t *set;
+ ccss_selector_set_t *set;
size_t specificity;
g_return_if_fail (self && selector);
/* insert or update the selector group */
- specificity = ccd_selector_get_specificity (selector);
+ specificity = ccss_selector_get_specificity (selector);
set = g_tree_lookup (self->sets, GSIZE_TO_POINTER (specificity));
if (!set) {
- set = g_new0 (ccd_selector_set_t, 1);
+ set = g_new0 (ccss_selector_set_t, 1);
g_tree_insert (self->sets, GSIZE_TO_POINTER (specificity), set);
}
set->selectors = g_slist_prepend (set->selectors, selector);
@@ -158,7 +158,7 @@
}
static unsigned int
-calculate_min_specificity_e (ccd_selector_group_t *group,
+calculate_min_specificity_e (ccss_selector_group_t *group,
unsigned int n_specificities)
{
unsigned int specificity_e;
@@ -177,31 +177,31 @@
}
typedef struct {
- ccd_selector_group_t *self;
+ ccss_selector_group_t *self;
bool as_base;
unsigned int specificity_e;
} traverse_merge_info_t;
static bool
traverse_merge (size_t specificity,
- ccd_selector_set_t const *set,
+ ccss_selector_set_t const *set,
traverse_merge_info_t *info)
{
GSList const *iter;
- ccd_selector_t const *selector;
- ccd_selector_t *new_selector;
+ ccss_selector_t const *selector;
+ ccss_selector_t *new_selector;
g_assert (info->self && set);
iter = set->selectors;
while (iter) {
- selector = (ccd_selector_t const *) iter->data;
+ selector = (ccss_selector_t const *) iter->data;
if (info->as_base) {
- new_selector = ccd_selector_copy_as_base (selector, info->specificity_e);
+ new_selector = ccss_selector_copy_as_base (selector, info->specificity_e);
} else {
- new_selector = ccd_selector_copy (selector);
+ new_selector = ccss_selector_copy (selector);
}
- ccd_selector_group_add_selector (info->self, new_selector);
+ ccss_selector_group_add_selector (info->self, new_selector);
iter = iter->next;
}
@@ -211,8 +211,8 @@
}
void
-ccd_selector_group_merge (ccd_selector_group_t *self,
- ccd_selector_group_t const *group)
+ccss_selector_group_merge (ccss_selector_group_t *self,
+ ccss_selector_group_t const *group)
{
traverse_merge_info_t info;
@@ -225,8 +225,8 @@
}
void
-ccd_selector_group_merge_base (ccd_selector_group_t *self,
- ccd_selector_group_t const *group)
+ccss_selector_group_merge_base (ccss_selector_group_t *self,
+ ccss_selector_group_t const *group)
{
traverse_merge_info_t info;
@@ -241,7 +241,7 @@
}
GSList const *
-ccd_selector_group_get_dangling_selectors (ccd_selector_group_t const *self)
+ccss_selector_group_get_dangling_selectors (ccss_selector_group_t const *self)
{
g_assert (self);
@@ -249,26 +249,26 @@
}
void
-ccd_selector_group_clear_dangling_selectors (ccd_selector_group_t *self)
+ccss_selector_group_clear_dangling_selectors (ccss_selector_group_t *self)
{
- ccd_selector_t *selector;
+ ccss_selector_t *selector;
GSList *iter;
g_return_if_fail (self && self->dangling_selectors);
iter = self->dangling_selectors;
while (iter) {
- selector = (ccd_selector_t *) iter->data;
+ selector = (ccss_selector_t *) iter->data;
iter = g_slist_remove (iter, selector);
- ccd_selector_free (selector);
+ ccss_selector_free (selector);
}
self->dangling_selectors = NULL;
}
typedef struct {
- ccd_node_t const *node;
- ccd_selector_group_t *result_group;
+ ccss_node_t const *node;
+ ccss_selector_group_t *result_group;
bool as_base;
unsigned int specificity_e;
bool ret;
@@ -276,26 +276,26 @@
static bool
traverse_query (size_t specificity,
- ccd_selector_set_t *set,
+ ccss_selector_set_t *set,
traverse_query_info_t *info)
{
- ccd_selector_t const *selector;
- ccd_selector_t *new_selector;
+ ccss_selector_t const *selector;
+ ccss_selector_t *new_selector;
GSList const *iter;
bool ret;
iter = set->selectors;
while (iter) {
- selector = (ccd_selector_t const *) iter->data;
- ret = ccd_selector_query_apply (selector, info->node, NULL);
+ selector = (ccss_selector_t const *) iter->data;
+ ret = ccss_selector_query_apply (selector, info->node, NULL);
if (ret) {
if (info->as_base) {
- new_selector = ccd_selector_copy_as_base (selector, info->specificity_e);
+ new_selector = ccss_selector_copy_as_base (selector, info->specificity_e);
info->specificity_e++;
} else {
- new_selector = ccd_selector_copy (selector);
+ new_selector = ccss_selector_copy (selector);
}
- ccd_selector_group_add_selector (info->result_group, new_selector);
+ ccss_selector_group_add_selector (info->result_group, new_selector);
info->ret = true;
}
iter = iter->next;
@@ -305,9 +305,9 @@
}
bool
-ccd_selector_group_query_collect (ccd_selector_group_t const *self,
- ccd_node_t const *node,
- ccd_selector_group_t *result_group,
+ccss_selector_group_query_collect (ccss_selector_group_t const *self,
+ ccss_node_t const *node,
+ ccss_selector_group_t *result_group,
bool as_base)
{
traverse_query_info_t info;
@@ -329,21 +329,21 @@
}
typedef struct {
- ccd_node_t const *node;
- ccd_style_t *style;
+ ccss_node_t const *node;
+ ccss_style_t *style;
bool ret;
} traverse_match_info_t;
static bool
traverse_match (size_t specificity,
- ccd_selector_set_t *set,
+ ccss_selector_set_t *set,
traverse_match_info_t *info)
{
GSList const *iter;
iter = set->selectors;
while (iter) {
- info->ret |= ccd_selector_query_apply ((ccd_selector_t const *) iter->data,
+ info->ret |= ccss_selector_query_apply ((ccss_selector_t const *) iter->data,
info->node, info->style);
iter = iter->next;
}
@@ -352,9 +352,9 @@
}
bool
-ccd_selector_group_query_apply (ccd_selector_group_t const *self,
- ccd_node_t const *node,
- ccd_style_t *style)
+ccss_selector_group_query_apply (ccss_selector_group_t const *self,
+ ccss_node_t const *node,
+ ccss_style_t *style)
{
traverse_match_info_t info;
@@ -371,40 +371,40 @@
typedef struct {
char const *type_name;
- ccd_style_t *style;
+ ccss_style_t *style;
bool ret;
} traverse_apply_info_t;
static bool
traverse_apply (size_t specificity,
- ccd_selector_set_t *set,
+ ccss_selector_set_t *set,
traverse_apply_info_t *info)
{
- ccd_selector_t const *selector;
+ ccss_selector_t const *selector;
for (GSList const *iter = set->selectors; iter != NULL; iter = iter->next) {
- selector = (ccd_selector_t const *) iter->data;
+ selector = (ccss_selector_t const *) iter->data;
if (info->type_name) {
/* Apply only if it's a specific type. */
char const *key;
unsigned int a, b, c, d, e;
- key = ccd_selector_get_key (selector);
- ccd_selector_get_specificity_values (selector,
+ key = ccss_selector_get_key (selector);
+ ccss_selector_get_specificity_values (selector,
&a, &b, &c, &d, &e);
- if (ccd_selector_is_type (selector) &&
+ if (ccss_selector_is_type (selector) &&
0 == g_ascii_strcasecmp (info->type_name, key) &&
a == 0 && b == 0 && c == 0 && d == 1 && e == 0) {
- info->ret |= ccd_selector_apply (selector,
+ info->ret |= ccss_selector_apply (selector,
info->style);
}
} else {
- info->ret |= ccd_selector_apply (selector, info->style);
+ info->ret |= ccss_selector_apply (selector, info->style);
}
}
@@ -412,15 +412,15 @@
}
/**
- * ccd_selector_group_apply:
- * @self: a #ccd_selector_group_t.
- * @style: a #ccd_style_t.
+ * ccss_selector_group_apply:
+ * @self: a #ccss_selector_group_t.
+ * @style: a #ccss_style_t.
*
* Apply the styling information held by #self to #style.
**/
bool
-ccd_selector_group_apply (ccd_selector_group_t const *self,
- ccd_style_t *style)
+ccss_selector_group_apply (ccss_selector_group_t const *self,
+ ccss_style_t *style)
{
traverse_apply_info_t info;
@@ -436,19 +436,19 @@
}
/**
- * ccd_selector_group_apply_type:
- * @self: a #ccd_selector_group_t.
+ * ccss_selector_group_apply_type:
+ * @self: a #ccss_selector_group_t.
* @type: style information matching exactly this type name will be applied.
- * @style: a #ccd_style_t.
+ * @style: a #ccss_style_t.
*
* Apply the styling information held by #self to #style.
*
* Returns: %TRUE if applicable style information available.
**/
bool
-ccd_selector_group_apply_type (ccd_selector_group_t const *self,
+ccss_selector_group_apply_type (ccss_selector_group_t const *self,
char const *type_name,
- ccd_style_t *style)
+ ccss_style_t *style)
{
traverse_apply_info_t info;
@@ -463,18 +463,18 @@
return info.ret;
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
static bool
traverse_dump (size_t specificity,
- ccd_selector_set_t *set,
+ ccss_selector_set_t *set,
void *data)
{
GSList const *iter;
iter = set->selectors;
while (iter) {
- ccd_selector_dump ((ccd_selector_t const *) iter->data);
+ ccss_selector_dump ((ccss_selector_t const *) iter->data);
iter = iter->next;
}
@@ -482,13 +482,13 @@
}
/**
- * ccd_selector_group_dump:
- * @self: a ccd_selector_group_t.
+ * ccss_selector_group_dump:
+ * @self: a ccss_selector_group_t.
*
* Print informations about the internal state of this object.
**/
void
-ccd_selector_group_dump (ccd_selector_group_t const *self)
+ccss_selector_group_dump (ccss_selector_group_t const *self)
{
GSList const *iter;
@@ -499,10 +499,10 @@
iter = self->dangling_selectors;
while (iter) {
printf ("(dangling) ");
- ccd_selector_dump ((ccd_selector_t const *) iter->data);
+ ccss_selector_dump ((ccss_selector_t const *) iter->data);
iter = iter->next;
}
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-selector-group.h (from r132, /trunk/libccd/ccd/ccd-selector-group.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-selector-group.h (original)
+++ trunk/libccss/ccss/ccss-selector-group.h Mon Sep 29 09:51:02 2008
@@ -17,34 +17,34 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_SELECTOR_GROUP_H
-#define CCD_SELECTOR_GROUP_H
+#ifndef CCSS_SELECTOR_GROUP_H
+#define CCSS_SELECTOR_GROUP_H
#include <stdbool.h>
#include <glib.h>
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-node.h>
-#include <ccd/ccd-selector.h>
-#include <ccd/ccd-style.h>
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-node.h>
+#include <ccss/ccss-selector.h>
+#include <ccss/ccss-style.h>
G_BEGIN_DECLS
-typedef struct ccd_selector_group_ ccd_selector_group_t;
+typedef struct ccss_selector_group_ ccss_selector_group_t;
-ccd_selector_group_t * ccd_selector_group_new (void);
-void ccd_selector_group_free (ccd_selector_group_t *self);
+ccss_selector_group_t * ccss_selector_group_new (void);
+void ccss_selector_group_free (ccss_selector_group_t *self);
-bool ccd_selector_group_apply (ccd_selector_group_t const *self,
- ccd_style_t *style);
+bool ccss_selector_group_apply (ccss_selector_group_t const *self,
+ ccss_style_t *style);
-bool ccd_selector_group_apply_type (ccd_selector_group_t const *self,
- char const *type, ccd_style_t *style);
+bool ccss_selector_group_apply_type (ccss_selector_group_t const *self,
+ char const *type, ccss_style_t *style);
-#ifdef CCD_DEBUG
-void ccd_selector_group_dump (ccd_selector_group_t const *self);
+#ifdef CCSS_DEBUG
+void ccss_selector_group_dump (ccss_selector_group_t const *self);
#endif
G_END_DECLS
-#endif /* CCD_SELECTOR_GROUP_H */
+#endif /* CCSS_SELECTOR_GROUP_H */
Copied: trunk/libccss/ccss/ccss-selector.c (from r132, /trunk/libccd/ccd/ccd-selector.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-selector.c (original)
+++ trunk/libccss/ccss/ccss-selector.c Mon Sep 29 09:51:02 2008
@@ -19,20 +19,20 @@
#include <stdio.h>
#include <string.h>
-#include "ccd-node.h"
-#include "ccd-selector.h"
-#include "ccd-style.h"
-#include "ccd-stylesheet.h"
+#include "ccss-node.h"
+#include "ccss-selector.h"
+#include "ccss-style.h"
+#include "ccss-stylesheet.h"
typedef enum {
- CCD_SELECTOR_MODALITY_UNIVERSAL, /* Universal selector. */
- CCD_SELECTOR_MODALITY_TYPE, /* By element type. */
- CCD_SELECTOR_MODALITY_BASE_TYPE, /* By element type. */
- CCD_SELECTOR_MODALITY_CLASS, /* By element class. */
- CCD_SELECTOR_MODALITY_ID, /* By element ID. */
- CCD_SELECTOR_MODALITY_ATTRIBUTE, /* By element attribute. */
- CCD_SELECTOR_MODALITY_PSEUDO_CLASS /* By pseudo class. */
-} ccd_selector_modality_t;
+ CCSS_SELECTOR_MODALITY_UNIVERSAL, /* Universal selector. */
+ CCSS_SELECTOR_MODALITY_TYPE, /* By element type. */
+ CCSS_SELECTOR_MODALITY_BASE_TYPE, /* By element type. */
+ CCSS_SELECTOR_MODALITY_CLASS, /* By element class. */
+ CCSS_SELECTOR_MODALITY_ID, /* By element ID. */
+ CCSS_SELECTOR_MODALITY_ATTRIBUTE, /* By element attribute. */
+ CCSS_SELECTOR_MODALITY_PSEUDO_CLASS /* By pseudo class. */
+} ccss_selector_modality_t;
/*
* Abstract base selector.
@@ -40,22 +40,22 @@
* of the meaning of the fields `a', `b', `c' and `d'. Field `e' (lowest priority)
* is used for merging base styles. Field `a' is not used currently.
*/
-struct ccd_selector_ {
- ccd_selector_modality_t modality;
+struct ccss_selector_ {
+ ccss_selector_modality_t modality;
uint8_t a;
uint8_t b;
uint8_t c;
uint8_t d;
uint8_t e;
- struct ccd_selector_ *refinement;
- struct ccd_selector_ *container;
- struct ccd_selector_ *antecessor;
- ccd_block_t const *block;
+ struct ccss_selector_ *refinement;
+ struct ccss_selector_ *container;
+ struct ccss_selector_ *antecessor;
+ ccss_block_t const *block;
};
static void
-selector_sync (ccd_selector_t const *self,
- ccd_selector_t *to)
+selector_sync (ccss_selector_t const *self,
+ ccss_selector_t *to)
{
g_assert (self && to);
@@ -74,85 +74,85 @@
/*
* Universal selector.
*/
-typedef ccd_selector_t ccd_universal_selector_t;
+typedef ccss_selector_t ccss_universal_selector_t;
-ccd_selector_t *
-ccd_universal_selector_new (void)
+ccss_selector_t *
+ccss_universal_selector_new (void)
{
- ccd_universal_selector_t *self;
+ ccss_universal_selector_t *self;
- self = g_new0 (ccd_universal_selector_t, 1);
- self->modality = CCD_SELECTOR_MODALITY_UNIVERSAL;
+ self = g_new0 (ccss_universal_selector_t, 1);
+ self->modality = CCSS_SELECTOR_MODALITY_UNIVERSAL;
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
-static ccd_selector_t *
-universal_selector_dup (ccd_universal_selector_t const *original)
+static ccss_selector_t *
+universal_selector_dup (ccss_universal_selector_t const *original)
{
- ccd_universal_selector_t *self;
+ ccss_universal_selector_t *self;
- self = g_new0 (ccd_universal_selector_t, 1);
- selector_sync ((ccd_selector_t const *) original, self);
+ self = g_new0 (ccss_universal_selector_t, 1);
+ selector_sync ((ccss_selector_t const *) original, self);
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
static void
-universal_selector_free (ccd_universal_selector_t *self)
+universal_selector_free (ccss_universal_selector_t *self)
{
g_assert (self);
g_free (self);
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
static void
-universal_selector_dump (ccd_universal_selector_t const *self)
+universal_selector_dump (ccss_universal_selector_t const *self)
{
printf (" *");
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
/*
* Select by element type.
*/
typedef struct {
- ccd_selector_t parent;
+ ccss_selector_t parent;
char *type_name;
-} ccd_type_selector_t;
+} ccss_type_selector_t;
-ccd_selector_t *
-ccd_type_selector_new (char const *type_name)
+ccss_selector_t *
+ccss_type_selector_new (char const *type_name)
{
- ccd_type_selector_t *self;
+ ccss_type_selector_t *self;
g_assert (type_name);
- self = g_new0 (ccd_type_selector_t, 1);
- self->parent.modality = CCD_SELECTOR_MODALITY_TYPE;
+ self = g_new0 (ccss_type_selector_t, 1);
+ self->parent.modality = CCSS_SELECTOR_MODALITY_TYPE;
self->parent.d = 1;
self->type_name = g_strdup (type_name);
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
-static ccd_selector_t *
-type_selector_dup (ccd_type_selector_t const *original)
+static ccss_selector_t *
+type_selector_dup (ccss_type_selector_t const *original)
{
- ccd_type_selector_t *self;
+ ccss_type_selector_t *self;
- self = g_new0 (ccd_type_selector_t, 1);
- selector_sync ((ccd_selector_t const *) original, &self->parent);
+ self = g_new0 (ccss_type_selector_t, 1);
+ selector_sync ((ccss_selector_t const *) original, &self->parent);
self->type_name = g_strdup (original->type_name);
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
static void
-type_selector_free (ccd_type_selector_t *self)
+type_selector_free (ccss_type_selector_t *self)
{
g_assert (self);
@@ -160,28 +160,28 @@
g_free (self);
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
static void
-type_selector_dump (ccd_type_selector_t const *self)
+type_selector_dump (ccss_type_selector_t const *self)
{
printf (" %s", self->type_name);
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
/*
* Select by element's base type.
* Derived from the type selector
*/
-ccd_selector_t *
-ccd_base_type_selector_new (char const *type_name,
+ccss_selector_t *
+ccss_base_type_selector_new (char const *type_name,
unsigned int specificity_e)
{
- ccd_selector_t *self;
+ ccss_selector_t *self;
- self = ccd_type_selector_new (type_name);
- self->modality = CCD_SELECTOR_MODALITY_BASE_TYPE;
+ self = ccss_type_selector_new (type_name);
+ self->modality = CCSS_SELECTOR_MODALITY_BASE_TYPE;
self->a = 0;
self->b = 0;
self->c = 0;
@@ -195,39 +195,39 @@
* Select by element class.
*/
typedef struct {
- ccd_selector_t parent;
+ ccss_selector_t parent;
char *class_name;
-} ccd_class_selector_t;
+} ccss_class_selector_t;
-ccd_selector_t *
-ccd_class_selector_new (char const *class_name)
+ccss_selector_t *
+ccss_class_selector_new (char const *class_name)
{
- ccd_class_selector_t *self;
+ ccss_class_selector_t *self;
g_assert (class_name);
- self = g_new0 (ccd_class_selector_t, 1);
- self->parent.modality = CCD_SELECTOR_MODALITY_CLASS;
+ self = g_new0 (ccss_class_selector_t, 1);
+ self->parent.modality = CCSS_SELECTOR_MODALITY_CLASS;
self->parent.c = 1;
self->class_name = g_strdup (class_name);
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
-static ccd_selector_t *
-class_selector_dup (ccd_class_selector_t const *original)
+static ccss_selector_t *
+class_selector_dup (ccss_class_selector_t const *original)
{
- ccd_class_selector_t *self;
+ ccss_class_selector_t *self;
- self = g_new0 (ccd_class_selector_t, 1);
- selector_sync ((ccd_selector_t const *) original, &self->parent);
+ self = g_new0 (ccss_class_selector_t, 1);
+ selector_sync ((ccss_selector_t const *) original, &self->parent);
self->class_name = g_strdup (original->class_name);
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
static void
-class_selector_free (ccd_class_selector_t *self)
+class_selector_free (ccss_class_selector_t *self)
{
g_assert (self);
@@ -235,53 +235,53 @@
g_free (self);
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
static void
-class_selector_dump (ccd_class_selector_t const *self)
+class_selector_dump (ccss_class_selector_t const *self)
{
printf (".%s", self->class_name);
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
/*
* Select by element ID.
*/
typedef struct {
- ccd_selector_t parent;
+ ccss_selector_t parent;
char *id;
-} ccd_id_selector_t;
+} ccss_id_selector_t;
-ccd_selector_t *
-ccd_id_selector_new (char const *id)
+ccss_selector_t *
+ccss_id_selector_new (char const *id)
{
- ccd_id_selector_t *self;
+ ccss_id_selector_t *self;
g_assert (id);
- self = g_new0 (ccd_id_selector_t, 1);
- self->parent.modality = CCD_SELECTOR_MODALITY_ID;
+ self = g_new0 (ccss_id_selector_t, 1);
+ self->parent.modality = CCSS_SELECTOR_MODALITY_ID;
self->parent.b = 1;
self->id = g_strdup (id);
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
-static ccd_selector_t *
-id_selector_dup (ccd_id_selector_t const *original)
+static ccss_selector_t *
+id_selector_dup (ccss_id_selector_t const *original)
{
- ccd_id_selector_t *self;
+ ccss_id_selector_t *self;
- self = g_new0 (ccd_id_selector_t, 1);
- selector_sync ((ccd_selector_t const *) original, &self->parent);
+ self = g_new0 (ccss_id_selector_t, 1);
+ selector_sync ((ccss_selector_t const *) original, &self->parent);
self->id = g_strdup (original->id);
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
static void
-id_selector_free (ccd_id_selector_t *self)
+id_selector_free (ccss_id_selector_t *self)
{
g_assert (self);
@@ -289,61 +289,61 @@
g_free (self);
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
static void
-id_selector_dump (ccd_id_selector_t const *self)
+id_selector_dump (ccss_id_selector_t const *self)
{
printf ("#%s", self->id);
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
/*
* Select by attribute.
*/
typedef struct {
- ccd_selector_t parent;
+ ccss_selector_t parent;
char *name;
char *value;
- ccd_attribute_selector_match_t match;
-} ccd_attribute_selector_t;
+ ccss_attribute_selector_match_t match;
+} ccss_attribute_selector_t;
-ccd_selector_t *
-ccd_attribute_selector_new (char const *name,
+ccss_selector_t *
+ccss_attribute_selector_new (char const *name,
char const *value,
- ccd_attribute_selector_match_t match)
+ ccss_attribute_selector_match_t match)
{
- ccd_attribute_selector_t *self;
+ ccss_attribute_selector_t *self;
g_assert (name && value);
- self = g_new0 (ccd_attribute_selector_t, 1);
- self->parent.modality = CCD_SELECTOR_MODALITY_ATTRIBUTE;
+ self = g_new0 (ccss_attribute_selector_t, 1);
+ self->parent.modality = CCSS_SELECTOR_MODALITY_ATTRIBUTE;
self->parent.c = 1;
self->name = g_strdup (name);
self->value = g_strdup (value);
self->match = match;
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
-static ccd_selector_t *
-attribute_selector_dup (ccd_attribute_selector_t const *original)
+static ccss_selector_t *
+attribute_selector_dup (ccss_attribute_selector_t const *original)
{
- ccd_attribute_selector_t *self;
+ ccss_attribute_selector_t *self;
- self = g_new0 (ccd_attribute_selector_t, 1);
- selector_sync ((ccd_selector_t const *) original, &self->parent);
+ self = g_new0 (ccss_attribute_selector_t, 1);
+ selector_sync ((ccss_selector_t const *) original, &self->parent);
self->name = g_strdup (original->name);
self->value = g_strdup (original->value);
self->match = original->match;
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
static void
-attribute_selector_free (ccd_attribute_selector_t *self)
+attribute_selector_free (ccss_attribute_selector_t *self)
{
g_assert (self);
@@ -352,16 +352,16 @@
g_free (self);
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
static void
-attribute_selector_dump (ccd_attribute_selector_t const *self)
+attribute_selector_dump (ccss_attribute_selector_t const *self)
{
switch (self->match) {
- case CCD_ATTRIBUTE_SELECTOR_MATCH_EXISTS:
+ case CCSS_ATTRIBUTE_SELECTOR_MATCH_EXISTS:
printf ("[%s]", self->name);
break;
- case CCD_ATTRIBUTE_SELECTOR_MATCH_EQUALS:
+ case CCSS_ATTRIBUTE_SELECTOR_MATCH_EQUALS:
printf ("[%s=%s]", self->name, self->value);
break;
default:
@@ -369,45 +369,45 @@
}
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
/*
* Select by pseudo class.
*/
typedef struct {
- ccd_selector_t parent;
+ ccss_selector_t parent;
char *pseudo_class;
-} ccd_pseudo_class_selector_t;
+} ccss_pseudo_class_selector_t;
-ccd_selector_t *
-ccd_pseudo_class_selector_new (char const *pseudo_class)
+ccss_selector_t *
+ccss_pseudo_class_selector_new (char const *pseudo_class)
{
- ccd_pseudo_class_selector_t *self;
+ ccss_pseudo_class_selector_t *self;
g_assert (pseudo_class);
- self = g_new0 (ccd_pseudo_class_selector_t, 1);
- self->parent.modality = CCD_SELECTOR_MODALITY_PSEUDO_CLASS;
+ self = g_new0 (ccss_pseudo_class_selector_t, 1);
+ self->parent.modality = CCSS_SELECTOR_MODALITY_PSEUDO_CLASS;
self->parent.d = 1;
self->pseudo_class = g_strdup (pseudo_class);
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
-static ccd_selector_t *
-pseudo_class_selector_dup (ccd_pseudo_class_selector_t const *original)
+static ccss_selector_t *
+pseudo_class_selector_dup (ccss_pseudo_class_selector_t const *original)
{
- ccd_pseudo_class_selector_t *self;
+ ccss_pseudo_class_selector_t *self;
- self = g_new0 (ccd_pseudo_class_selector_t, 1);
- selector_sync ((ccd_selector_t const *) original, &self->parent);
+ self = g_new0 (ccss_pseudo_class_selector_t, 1);
+ selector_sync ((ccss_selector_t const *) original, &self->parent);
self->pseudo_class = g_strdup (original->pseudo_class);
- return (ccd_selector_t *) self;
+ return (ccss_selector_t *) self;
}
static void
-pseudo_class_selector_free (ccd_pseudo_class_selector_t *self)
+pseudo_class_selector_free (ccss_pseudo_class_selector_t *self)
{
g_assert (self);
@@ -415,42 +415,42 @@
g_free (self);
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
static void
-pseudo_class_selector_dump (ccd_pseudo_class_selector_t const *self)
+pseudo_class_selector_dump (ccss_pseudo_class_selector_t const *self)
{
printf (":%s", self->pseudo_class);
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
-ccd_selector_t *
-ccd_selector_copy (ccd_selector_t const *original)
+ccss_selector_t *
+ccss_selector_copy (ccss_selector_t const *original)
{
- ccd_selector_t *self;
+ ccss_selector_t *self;
g_assert (original);
switch (original->modality) {
- case CCD_SELECTOR_MODALITY_UNIVERSAL:
- self = universal_selector_dup ((ccd_universal_selector_t const *) original);
+ case CCSS_SELECTOR_MODALITY_UNIVERSAL:
+ self = universal_selector_dup ((ccss_universal_selector_t const *) original);
break;
- case CCD_SELECTOR_MODALITY_TYPE:
- case CCD_SELECTOR_MODALITY_BASE_TYPE:
- self = type_selector_dup ((ccd_type_selector_t const *) original);
+ case CCSS_SELECTOR_MODALITY_TYPE:
+ case CCSS_SELECTOR_MODALITY_BASE_TYPE:
+ self = type_selector_dup ((ccss_type_selector_t const *) original);
break;
- case CCD_SELECTOR_MODALITY_CLASS:
- self = class_selector_dup ((ccd_class_selector_t const *) original);
+ case CCSS_SELECTOR_MODALITY_CLASS:
+ self = class_selector_dup ((ccss_class_selector_t const *) original);
break;
- case CCD_SELECTOR_MODALITY_ID:
- self = id_selector_dup ((ccd_id_selector_t const *) original);
+ case CCSS_SELECTOR_MODALITY_ID:
+ self = id_selector_dup ((ccss_id_selector_t const *) original);
break;
- case CCD_SELECTOR_MODALITY_ATTRIBUTE:
- self = attribute_selector_dup ((ccd_attribute_selector_t const *) original);
+ case CCSS_SELECTOR_MODALITY_ATTRIBUTE:
+ self = attribute_selector_dup ((ccss_attribute_selector_t const *) original);
break;
- case CCD_SELECTOR_MODALITY_PSEUDO_CLASS:
- self = pseudo_class_selector_dup ((ccd_pseudo_class_selector_t const *) original);
+ case CCSS_SELECTOR_MODALITY_PSEUDO_CLASS:
+ self = pseudo_class_selector_dup ((ccss_pseudo_class_selector_t const *) original);
break;
default:
g_warning ("Unknown selector modality %d", original->modality);
@@ -459,15 +459,15 @@
}
if (original->refinement) {
- self->refinement = ccd_selector_copy (original->refinement);
+ self->refinement = ccss_selector_copy (original->refinement);
}
if (original->container) {
- self->container = ccd_selector_copy (original->container);
+ self->container = ccss_selector_copy (original->container);
}
if (original->antecessor) {
- self->antecessor = ccd_selector_copy (original->antecessor);
+ self->antecessor = ccss_selector_copy (original->antecessor);
}
return self;
@@ -476,16 +476,16 @@
/*
* Create a selector based on an existing one.
*/
-ccd_selector_t *
-ccd_selector_copy_as_base (ccd_selector_t const *original,
+ccss_selector_t *
+ccss_selector_copy_as_base (ccss_selector_t const *original,
int specificity_e)
{
- ccd_selector_t *self;
+ ccss_selector_t *self;
- g_assert (original && original->modality == CCD_SELECTOR_MODALITY_TYPE);
+ g_assert (original && original->modality == CCSS_SELECTOR_MODALITY_TYPE);
- self = ccd_selector_copy (original);
- self->modality = CCD_SELECTOR_MODALITY_BASE_TYPE;
+ self = ccss_selector_copy (original);
+ self->modality = CCSS_SELECTOR_MODALITY_BASE_TYPE;
if (specificity_e > -1) {
if (original->d > 0) {
@@ -496,12 +496,12 @@
if (original->e == 0) {
#if DEBUG
- if (specificity_e > CCD_SELECTOR_MAX_SPECIFICITY) {
+ if (specificity_e > CCSS_SELECTOR_MAX_SPECIFICITY) {
//g_assert_not_reached ();
printf ("foo\n");
}
#endif
- g_assert (specificity_e <= CCD_SELECTOR_MAX_SPECIFICITY);
+ g_assert (specificity_e <= CCSS_SELECTOR_MAX_SPECIFICITY);
self->e = (unsigned) specificity_e;
} else {
g_warning ("Specificity e != 0");
@@ -515,41 +515,41 @@
* Free the whole selector chain.
*/
void
-ccd_selector_free (ccd_selector_t *self)
+ccss_selector_free (ccss_selector_t *self)
{
g_assert (self);
if (self->refinement) {
- ccd_selector_free (self->refinement), self->refinement = NULL;
+ ccss_selector_free (self->refinement), self->refinement = NULL;
}
if (self->container) {
- ccd_selector_free (self->container), self->container = NULL;
+ ccss_selector_free (self->container), self->container = NULL;
}
if (self->antecessor) {
- ccd_selector_free (self->antecessor), self->antecessor = NULL;
+ ccss_selector_free (self->antecessor), self->antecessor = NULL;
}
switch (self->modality) {
- case CCD_SELECTOR_MODALITY_UNIVERSAL:
- universal_selector_free ((ccd_universal_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_UNIVERSAL:
+ universal_selector_free ((ccss_universal_selector_t *) self);
break;
- case CCD_SELECTOR_MODALITY_TYPE:
- case CCD_SELECTOR_MODALITY_BASE_TYPE:
- type_selector_free ((ccd_type_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_TYPE:
+ case CCSS_SELECTOR_MODALITY_BASE_TYPE:
+ type_selector_free ((ccss_type_selector_t *) self);
break;
- case CCD_SELECTOR_MODALITY_CLASS:
- class_selector_free ((ccd_class_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_CLASS:
+ class_selector_free ((ccss_class_selector_t *) self);
break;
- case CCD_SELECTOR_MODALITY_ID:
- id_selector_free ((ccd_id_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_ID:
+ id_selector_free ((ccss_id_selector_t *) self);
break;
- case CCD_SELECTOR_MODALITY_ATTRIBUTE:
- attribute_selector_free ((ccd_attribute_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_ATTRIBUTE:
+ attribute_selector_free ((ccss_attribute_selector_t *) self);
break;
- case CCD_SELECTOR_MODALITY_PSEUDO_CLASS:
- pseudo_class_selector_free ((ccd_pseudo_class_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_PSEUDO_CLASS:
+ pseudo_class_selector_free ((ccss_pseudo_class_selector_t *) self);
break;
default:
g_warning ("Unknown selector modality %d", self->modality);
@@ -560,8 +560,8 @@
* Does it matter that the refinements order is reversed?
*/
void
-ccd_selector_refine (ccd_selector_t *self,
- ccd_selector_t *selector)
+ccss_selector_refine (ccss_selector_t *self,
+ ccss_selector_t *selector)
{
g_assert (self && self->refinement == NULL && selector);
@@ -580,9 +580,9 @@
* Add a selector to the chain.
* This can change the selector instance, make sure to regard the return value.
*/
-ccd_selector_t *
-ccd_selector_append_child (ccd_selector_t *self,
- ccd_selector_t *selector)
+ccss_selector_t *
+ccss_selector_append_child (ccss_selector_t *self,
+ ccss_selector_t *selector)
{
/* propagate specificity */
selector->a += self->a;
@@ -603,9 +603,9 @@
* Add a selector to the chain.
* This can change the selector instance, make sure to regard the return value.
*/
-ccd_selector_t *
-ccd_selector_append_descendant (ccd_selector_t *self,
- ccd_selector_t *selector)
+ccss_selector_t *
+ccss_selector_append_descendant (ccss_selector_t *self,
+ ccss_selector_t *selector)
{
/* propagate specificity */
selector->a += self->a;
@@ -623,58 +623,58 @@
}
bool
-ccd_selector_is_type (ccd_selector_t const *self)
+ccss_selector_is_type (ccss_selector_t const *self)
{
switch (self->modality) {
- case CCD_SELECTOR_MODALITY_UNIVERSAL:
- case CCD_SELECTOR_MODALITY_TYPE:
+ case CCSS_SELECTOR_MODALITY_UNIVERSAL:
+ case CCSS_SELECTOR_MODALITY_TYPE:
return true;
- case CCD_SELECTOR_MODALITY_BASE_TYPE:
- case CCD_SELECTOR_MODALITY_CLASS:
- case CCD_SELECTOR_MODALITY_ID:
- case CCD_SELECTOR_MODALITY_ATTRIBUTE:
- case CCD_SELECTOR_MODALITY_PSEUDO_CLASS:
+ case CCSS_SELECTOR_MODALITY_BASE_TYPE:
+ case CCSS_SELECTOR_MODALITY_CLASS:
+ case CCSS_SELECTOR_MODALITY_ID:
+ case CCSS_SELECTOR_MODALITY_ATTRIBUTE:
+ case CCSS_SELECTOR_MODALITY_PSEUDO_CLASS:
default:
return false;
}
}
bool
-ccd_selector_is_class (ccd_selector_t const *self)
+ccss_selector_is_class (ccss_selector_t const *self)
{
switch (self->modality) {
- case CCD_SELECTOR_MODALITY_CLASS:
+ case CCSS_SELECTOR_MODALITY_CLASS:
return true;
- case CCD_SELECTOR_MODALITY_UNIVERSAL:
- case CCD_SELECTOR_MODALITY_TYPE:
- case CCD_SELECTOR_MODALITY_BASE_TYPE:
- case CCD_SELECTOR_MODALITY_ID:
- case CCD_SELECTOR_MODALITY_ATTRIBUTE:
- case CCD_SELECTOR_MODALITY_PSEUDO_CLASS:
+ case CCSS_SELECTOR_MODALITY_UNIVERSAL:
+ case CCSS_SELECTOR_MODALITY_TYPE:
+ case CCSS_SELECTOR_MODALITY_BASE_TYPE:
+ case CCSS_SELECTOR_MODALITY_ID:
+ case CCSS_SELECTOR_MODALITY_ATTRIBUTE:
+ case CCSS_SELECTOR_MODALITY_PSEUDO_CLASS:
default:
return false;
}
}
bool
-ccd_selector_is_id (ccd_selector_t const *self)
+ccss_selector_is_id (ccss_selector_t const *self)
{
switch (self->modality) {
- case CCD_SELECTOR_MODALITY_ID:
+ case CCSS_SELECTOR_MODALITY_ID:
return true;
- case CCD_SELECTOR_MODALITY_UNIVERSAL:
- case CCD_SELECTOR_MODALITY_TYPE:
- case CCD_SELECTOR_MODALITY_BASE_TYPE:
- case CCD_SELECTOR_MODALITY_CLASS:
- case CCD_SELECTOR_MODALITY_ATTRIBUTE:
- case CCD_SELECTOR_MODALITY_PSEUDO_CLASS:
+ case CCSS_SELECTOR_MODALITY_UNIVERSAL:
+ case CCSS_SELECTOR_MODALITY_TYPE:
+ case CCSS_SELECTOR_MODALITY_BASE_TYPE:
+ case CCSS_SELECTOR_MODALITY_CLASS:
+ case CCSS_SELECTOR_MODALITY_ATTRIBUTE:
+ case CCSS_SELECTOR_MODALITY_PSEUDO_CLASS:
default:
return false;
}
}
-ccd_block_t const *
-ccd_selector_get_block (ccd_selector_t const *self)
+ccss_block_t const *
+ccss_selector_get_block (ccss_selector_t const *self)
{
g_assert (self);
@@ -682,8 +682,8 @@
}
void
-ccd_selector_set_block (ccd_selector_t *self,
- ccd_block_t const *block)
+ccss_selector_set_block (ccss_selector_t *self,
+ ccss_block_t const *block)
{
g_assert (self);
@@ -694,41 +694,41 @@
* Depending on the modality of the selector this may return NULL.
*/
char const *
-ccd_selector_get_key (ccd_selector_t const *self)
+ccss_selector_get_key (ccss_selector_t const *self)
{
g_return_val_if_fail (self, NULL);
switch (self->modality) {
- case CCD_SELECTOR_MODALITY_UNIVERSAL:
+ case CCSS_SELECTOR_MODALITY_UNIVERSAL:
return "*";
- case CCD_SELECTOR_MODALITY_TYPE:
- case CCD_SELECTOR_MODALITY_BASE_TYPE:
- return ((ccd_type_selector_t *) self)->type_name;
- case CCD_SELECTOR_MODALITY_CLASS:
- return ((ccd_class_selector_t *) self)->class_name;
- case CCD_SELECTOR_MODALITY_ID:
- return ((ccd_id_selector_t *) self)->id;
- case CCD_SELECTOR_MODALITY_ATTRIBUTE:
- case CCD_SELECTOR_MODALITY_PSEUDO_CLASS:
+ case CCSS_SELECTOR_MODALITY_TYPE:
+ case CCSS_SELECTOR_MODALITY_BASE_TYPE:
+ return ((ccss_type_selector_t *) self)->type_name;
+ case CCSS_SELECTOR_MODALITY_CLASS:
+ return ((ccss_class_selector_t *) self)->class_name;
+ case CCSS_SELECTOR_MODALITY_ID:
+ return ((ccss_id_selector_t *) self)->id;
+ case CCSS_SELECTOR_MODALITY_ATTRIBUTE:
+ case CCSS_SELECTOR_MODALITY_PSEUDO_CLASS:
default:
return NULL;
}
}
uint32_t
-ccd_selector_get_specificity (ccd_selector_t const *self)
+ccss_selector_get_specificity (ccss_selector_t const *self)
{
- g_assert (self->a <= CCD_SELECTOR_MAX_SPECIFICITY &&
- self->b <= CCD_SELECTOR_MAX_SPECIFICITY &&
- self->c <= CCD_SELECTOR_MAX_SPECIFICITY &&
- self->d <= CCD_SELECTOR_MAX_SPECIFICITY &&
- self->e <= CCD_SELECTOR_MAX_SPECIFICITY);
+ g_assert (self->a <= CCSS_SELECTOR_MAX_SPECIFICITY &&
+ self->b <= CCSS_SELECTOR_MAX_SPECIFICITY &&
+ self->c <= CCSS_SELECTOR_MAX_SPECIFICITY &&
+ self->d <= CCSS_SELECTOR_MAX_SPECIFICITY &&
+ self->e <= CCSS_SELECTOR_MAX_SPECIFICITY);
return self->e | (self->d << 6) | (self->c << 12) | (self->b << 18) | (self->a << 24);
}
void
-ccd_selector_get_specificity_values (ccd_selector_t const *self,
+ccss_selector_get_specificity_values (ccss_selector_t const *self,
unsigned int *a,
unsigned int *b,
unsigned int *c,
@@ -754,18 +754,18 @@
}
static bool
-match_antecessor_r (ccd_selector_t const *self,
- ccd_node_t const *node)
+match_antecessor_r (ccss_selector_t const *self,
+ ccss_node_t const *node)
{
- ccd_node_class_t const *node_class;
- ccd_node_t *container;
+ ccss_node_class_t const *node_class;
+ ccss_node_t *container;
bool is_matching;
- node_class = ccd_node_peek_class ();
+ node_class = ccss_node_peek_class ();
container = node_class->get_container (node);
if (container) {
- is_matching = ccd_selector_query_apply (self, container, NULL);
+ is_matching = ccss_selector_query_apply (self, container, NULL);
if (!is_matching) {
is_matching = match_antecessor_r (self, container);
}
@@ -781,49 +781,49 @@
* `style' may be NULL, in which case this just tests for a match.
*/
bool
-ccd_selector_query_apply (ccd_selector_t const *self,
- ccd_node_t const *node,
- ccd_style_t *style)
+ccss_selector_query_apply (ccss_selector_t const *self,
+ ccss_node_t const *node,
+ ccss_style_t *style)
{
- ccd_node_class_t const *node_class;
+ ccss_node_class_t const *node_class;
char const *name;
char *value;
bool is_matching;
g_return_val_if_fail (self && node, false);
- node_class = ccd_node_peek_class ();
+ node_class = ccss_node_peek_class ();
is_matching = false;
switch (self->modality) {
- case CCD_SELECTOR_MODALITY_UNIVERSAL:
+ case CCSS_SELECTOR_MODALITY_UNIVERSAL:
is_matching = true;
break;
- case CCD_SELECTOR_MODALITY_TYPE:
- is_matching = node_class->is_a (node, ((ccd_type_selector_t *) self)->type_name);
+ case CCSS_SELECTOR_MODALITY_TYPE:
+ is_matching = node_class->is_a (node, ((ccss_type_selector_t *) self)->type_name);
break;
- case CCD_SELECTOR_MODALITY_BASE_TYPE:
+ case CCSS_SELECTOR_MODALITY_BASE_TYPE:
/* HACK warning: let's just say it matches, because the base type selectors have
* been set up internally -- that is in the fixup run after loading the stylesheet. */
is_matching = true;
break;
- case CCD_SELECTOR_MODALITY_CLASS:
+ case CCSS_SELECTOR_MODALITY_CLASS:
name = node_class->get_class (node);
- is_matching = name ? 0 == strcmp (name, ((ccd_class_selector_t *) self)->class_name) : false;
+ is_matching = name ? 0 == strcmp (name, ((ccss_class_selector_t *) self)->class_name) : false;
break;
- case CCD_SELECTOR_MODALITY_ID:
+ case CCSS_SELECTOR_MODALITY_ID:
name = node_class->get_id (node);
- is_matching = name ? 0 == strcmp (name, ((ccd_id_selector_t *) self)->id) : false;
+ is_matching = name ? 0 == strcmp (name, ((ccss_id_selector_t *) self)->id) : false;
break;
- case CCD_SELECTOR_MODALITY_ATTRIBUTE:
- name = ((ccd_attribute_selector_t *) self)->name;
+ case CCSS_SELECTOR_MODALITY_ATTRIBUTE:
+ name = ((ccss_attribute_selector_t *) self)->name;
value = node_class->get_attribute (node, name);
- switch (((ccd_attribute_selector_t *) self)->match) {
- case CCD_ATTRIBUTE_SELECTOR_MATCH_EXISTS:
+ switch (((ccss_attribute_selector_t *) self)->match) {
+ case CCSS_ATTRIBUTE_SELECTOR_MATCH_EXISTS:
is_matching = value ? true : false;
break;
- case CCD_ATTRIBUTE_SELECTOR_MATCH_EQUALS:
- is_matching = value ? 0 == strcmp (value, ((ccd_attribute_selector_t *) self)->value) : false;
+ case CCSS_ATTRIBUTE_SELECTOR_MATCH_EQUALS:
+ is_matching = value ? 0 == strcmp (value, ((ccss_attribute_selector_t *) self)->value) : false;
break;
default:
g_assert_not_reached ();
@@ -831,9 +831,9 @@
}
g_free (value), value = NULL;
break;
- case CCD_SELECTOR_MODALITY_PSEUDO_CLASS:
+ case CCSS_SELECTOR_MODALITY_PSEUDO_CLASS:
name = node_class->get_pseudo_class (node);
- is_matching = name ? 0 == strcmp (name, ((ccd_pseudo_class_selector_t *) self)->pseudo_class) : false;
+ is_matching = name ? 0 == strcmp (name, ((ccss_pseudo_class_selector_t *) self)->pseudo_class) : false;
break;
default:
g_assert_not_reached ();
@@ -845,7 +845,7 @@
/* recursively match refinements */
if (self->refinement) {
- is_matching = ccd_selector_query_apply (self->refinement, node, style);
+ is_matching = ccss_selector_query_apply (self->refinement, node, style);
if (!is_matching) {
return false;
}
@@ -853,11 +853,11 @@
/* match container */
if (self->container) {
- ccd_node_t *container;
+ ccss_node_t *container;
container = node_class->get_container (node);
is_matching = false;
if (container) {
- is_matching = ccd_selector_query_apply (self->container, container, style);
+ is_matching = ccss_selector_query_apply (self->container, container, style);
node_class->release (container);
}
if (!is_matching) {
@@ -875,158 +875,158 @@
/* merge */
if (self->block && style) {
- ccd_selector_apply (self, style);
+ ccss_selector_apply (self, style);
}
return true;
}
bool
-ccd_selector_apply (ccd_selector_t const *self,
- ccd_style_t *style)
+ccss_selector_apply (ccss_selector_t const *self,
+ ccss_style_t *style)
{
g_return_val_if_fail (self && self->block && style, false);
/* apply */
switch (self->block->background.bg_attachment.spec) {
- case CCD_PROPERTY_SPEC_UNSET:
+ case CCSS_PROPERTY_SPEC_UNSET:
/* do nothing */
break;
- case CCD_PROPERTY_SPEC_NONE:
+ case CCSS_PROPERTY_SPEC_NONE:
/* reset */
style->bg_color = NULL;
break;
- case CCD_PROPERTY_SPEC_INHERIT:
+ case CCSS_PROPERTY_SPEC_INHERIT:
/* not implemented */
g_assert_not_reached ();
break;
- case CCD_PROPERTY_SPEC_SET:
+ case CCSS_PROPERTY_SPEC_SET:
/* use */
style->bg_attachment = &self->block->background.bg_attachment;
break;
}
switch (self->block->background.bg_color.spec) {
- case CCD_PROPERTY_SPEC_UNSET:
+ case CCSS_PROPERTY_SPEC_UNSET:
/* do nothing */
break;
- case CCD_PROPERTY_SPEC_NONE:
+ case CCSS_PROPERTY_SPEC_NONE:
/* reset */
style->bg_color = NULL;
break;
- case CCD_PROPERTY_SPEC_INHERIT:
+ case CCSS_PROPERTY_SPEC_INHERIT:
/* not implemented */
g_assert_not_reached ();
break;
- case CCD_PROPERTY_SPEC_SET:
+ case CCSS_PROPERTY_SPEC_SET:
/* use */
style->bg_color = &self->block->background.bg_color;
break;
}
switch (self->block->background.bg_image.spec) {
- case CCD_PROPERTY_SPEC_UNSET:
+ case CCSS_PROPERTY_SPEC_UNSET:
/* do nothing */
break;
- case CCD_PROPERTY_SPEC_NONE:
+ case CCSS_PROPERTY_SPEC_NONE:
/* reset */
style->bg_image = NULL;
break;
- case CCD_PROPERTY_SPEC_INHERIT:
+ case CCSS_PROPERTY_SPEC_INHERIT:
/* not implemented */
g_assert_not_reached ();
break;
- case CCD_PROPERTY_SPEC_SET:
+ case CCSS_PROPERTY_SPEC_SET:
/* use */
style->bg_image = &self->block->background.bg_image;
break;
}
switch (self->block->background.bg_position.spec) {
- case CCD_PROPERTY_SPEC_UNSET:
+ case CCSS_PROPERTY_SPEC_UNSET:
/* do nothing */
break;
- case CCD_PROPERTY_SPEC_NONE:
+ case CCSS_PROPERTY_SPEC_NONE:
/* reset */
style->bg_position = NULL;
break;
- case CCD_PROPERTY_SPEC_INHERIT:
+ case CCSS_PROPERTY_SPEC_INHERIT:
/* not implemented */
g_assert_not_reached ();
break;
- case CCD_PROPERTY_SPEC_SET:
+ case CCSS_PROPERTY_SPEC_SET:
/* use */
style->bg_position = &self->block->background.bg_position;
break;
}
switch (self->block->background.bg_repeat.spec) {
- case CCD_PROPERTY_SPEC_UNSET:
+ case CCSS_PROPERTY_SPEC_UNSET:
/* do nothing */
break;
- case CCD_PROPERTY_SPEC_NONE:
+ case CCSS_PROPERTY_SPEC_NONE:
/* reset */
style->bg_position = NULL;
break;
- case CCD_PROPERTY_SPEC_INHERIT:
+ case CCSS_PROPERTY_SPEC_INHERIT:
/* not implemented */
g_assert_not_reached ();
break;
- case CCD_PROPERTY_SPEC_SET:
+ case CCSS_PROPERTY_SPEC_SET:
/* use */
style->bg_repeat = &self->block->background.bg_repeat;
break;
}
switch (self->block->background.bg_size.spec) {
- case CCD_PROPERTY_SPEC_UNSET:
+ case CCSS_PROPERTY_SPEC_UNSET:
/* do nothing */
break;
- case CCD_PROPERTY_SPEC_NONE:
+ case CCSS_PROPERTY_SPEC_NONE:
/* reset */
style->bg_position = NULL;
break;
- case CCD_PROPERTY_SPEC_INHERIT:
+ case CCSS_PROPERTY_SPEC_INHERIT:
/* not implemented */
g_assert_not_reached ();
break;
- case CCD_PROPERTY_SPEC_SET:
+ case CCSS_PROPERTY_SPEC_SET:
/* use */
style->bg_size = &self->block->background.bg_size;
break;
}
- if (CCD_BORDER_STROKE_IS_SET (self->block->border.left))
- CCD_BORDER_STROKE_ASSIGN (style->left, self->block->border.left);
- if (CCD_BORDER_JOIN_IS_SET (self->block->border.left_top))
- CCD_BORDER_JOIN_ASSIGN (style->left_top, self->block->border.left_top);
- if (CCD_BORDER_STROKE_IS_SET (self->block->border.top))
- CCD_BORDER_STROKE_ASSIGN (style->top, self->block->border.top);
- if (CCD_BORDER_JOIN_IS_SET (self->block->border.top_right))
- CCD_BORDER_JOIN_ASSIGN (style->top_right, self->block->border.top_right);
- if (CCD_BORDER_STROKE_IS_SET (self->block->border.right))
- CCD_BORDER_STROKE_ASSIGN (style->right, self->block->border.right);
- if (CCD_BORDER_JOIN_IS_SET (self->block->border.right_bottom))
- CCD_BORDER_JOIN_ASSIGN (style->right_bottom, self->block->border.right_bottom);
- if (CCD_BORDER_STROKE_IS_SET (self->block->border.bottom))
- CCD_BORDER_STROKE_ASSIGN (style->bottom, self->block->border.bottom);
- if (CCD_BORDER_JOIN_IS_SET (self->block->border.bottom_left))
- CCD_BORDER_JOIN_ASSIGN (style->bottom_left, self->block->border.bottom_left);
+ if (CCSS_BORDER_STROKE_IS_SET (self->block->border.left))
+ CCSS_BORDER_STROKE_ASSIGN (style->left, self->block->border.left);
+ if (CCSS_BORDER_JOIN_IS_SET (self->block->border.left_top))
+ CCSS_BORDER_JOIN_ASSIGN (style->left_top, self->block->border.left_top);
+ if (CCSS_BORDER_STROKE_IS_SET (self->block->border.top))
+ CCSS_BORDER_STROKE_ASSIGN (style->top, self->block->border.top);
+ if (CCSS_BORDER_JOIN_IS_SET (self->block->border.top_right))
+ CCSS_BORDER_JOIN_ASSIGN (style->top_right, self->block->border.top_right);
+ if (CCSS_BORDER_STROKE_IS_SET (self->block->border.right))
+ CCSS_BORDER_STROKE_ASSIGN (style->right, self->block->border.right);
+ if (CCSS_BORDER_JOIN_IS_SET (self->block->border.right_bottom))
+ CCSS_BORDER_JOIN_ASSIGN (style->right_bottom, self->block->border.right_bottom);
+ if (CCSS_BORDER_STROKE_IS_SET (self->block->border.bottom))
+ CCSS_BORDER_STROKE_ASSIGN (style->bottom, self->block->border.bottom);
+ if (CCSS_BORDER_JOIN_IS_SET (self->block->border.bottom_left))
+ CCSS_BORDER_JOIN_ASSIGN (style->bottom_left, self->block->border.bottom_left);
switch (self->block->color.spec) {
- case CCD_PROPERTY_SPEC_UNSET:
+ case CCSS_PROPERTY_SPEC_UNSET:
/* do nothing */
break;
- case CCD_PROPERTY_SPEC_NONE:
+ case CCSS_PROPERTY_SPEC_NONE:
/* reset */
style->color = NULL;
break;
- case CCD_PROPERTY_SPEC_INHERIT:
+ case CCSS_PROPERTY_SPEC_INHERIT:
/* not implemented */
g_assert_not_reached ();
break;
- case CCD_PROPERTY_SPEC_SET:
+ case CCSS_PROPERTY_SPEC_SET:
/* use */
style->color = &self->block->color;
break;
@@ -1035,20 +1035,20 @@
/* fixup */
if (style->color) {
- if (CCD_PROPERTY_SPEC_UNSET == style->left.color.spec) {
- CCD_COLOR_ASSIGN (style->left.color, *style->color);
+ if (CCSS_PROPERTY_SPEC_UNSET == style->left.color.spec) {
+ CCSS_COLOR_ASSIGN (style->left.color, *style->color);
style->left.color.spec = style->color->spec;
}
- if (CCD_PROPERTY_SPEC_UNSET == style->top.color.spec) {
- CCD_COLOR_ASSIGN (style->top.color, *style->color);
+ if (CCSS_PROPERTY_SPEC_UNSET == style->top.color.spec) {
+ CCSS_COLOR_ASSIGN (style->top.color, *style->color);
style->top.color.spec = style->color->spec;
}
- if (CCD_PROPERTY_SPEC_UNSET == style->right.color.spec) {
- CCD_COLOR_ASSIGN (style->right.color, *style->color);
+ if (CCSS_PROPERTY_SPEC_UNSET == style->right.color.spec) {
+ CCSS_COLOR_ASSIGN (style->right.color, *style->color);
style->right.color.spec = style->color->spec;
}
- if (CCD_PROPERTY_SPEC_UNSET == style->bottom.color.spec) {
- CCD_COLOR_ASSIGN (style->bottom.color, *style->color);
+ if (CCSS_PROPERTY_SPEC_UNSET == style->bottom.color.spec) {
+ CCSS_COLOR_ASSIGN (style->bottom.color, *style->color);
style->bottom.color.spec = style->color->spec;
}
}
@@ -1056,68 +1056,68 @@
return true;
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
void
-ccd_selector_dump (ccd_selector_t const *self)
+ccss_selector_dump (ccss_selector_t const *self)
{
g_assert (self);
printf ("%p: ", (void *) self);
if (self->container) {
- ccd_selector_t const *container;
+ ccss_selector_t const *container;
printf ("( ");
container = self->container;
while (container) {
- printf("%s < ", ccd_selector_get_key (container));
+ printf("%s < ", ccss_selector_get_key (container));
container = container->container;
}
printf (")");
}
if (self->antecessor) {
- ccd_selector_t const *container;
+ ccss_selector_t const *container;
printf ("( ");
container = self->antecessor;
while (container) {
- printf("%s", ccd_selector_get_key (container));
+ printf("%s", ccss_selector_get_key (container));
container = container->antecessor;
}
printf (")");
}
switch (self->modality) {
- case CCD_SELECTOR_MODALITY_UNIVERSAL:
- universal_selector_dump ((ccd_universal_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_UNIVERSAL:
+ universal_selector_dump ((ccss_universal_selector_t *) self);
break;
- case CCD_SELECTOR_MODALITY_TYPE:
- case CCD_SELECTOR_MODALITY_BASE_TYPE:
- type_selector_dump ((ccd_type_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_TYPE:
+ case CCSS_SELECTOR_MODALITY_BASE_TYPE:
+ type_selector_dump ((ccss_type_selector_t *) self);
break;
- case CCD_SELECTOR_MODALITY_CLASS:
- class_selector_dump ((ccd_class_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_CLASS:
+ class_selector_dump ((ccss_class_selector_t *) self);
break;
- case CCD_SELECTOR_MODALITY_ID:
- id_selector_dump ((ccd_id_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_ID:
+ id_selector_dump ((ccss_id_selector_t *) self);
break;
- case CCD_SELECTOR_MODALITY_ATTRIBUTE:
- attribute_selector_dump ((ccd_attribute_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_ATTRIBUTE:
+ attribute_selector_dump ((ccss_attribute_selector_t *) self);
break;
- case CCD_SELECTOR_MODALITY_PSEUDO_CLASS:
- pseudo_class_selector_dump ((ccd_pseudo_class_selector_t *) self);
+ case CCSS_SELECTOR_MODALITY_PSEUDO_CLASS:
+ pseudo_class_selector_dump ((ccss_pseudo_class_selector_t *) self);
break;
default:
g_warning ("Unknown selector modality %d", self->modality);
}
if (self->refinement) {
- ccd_selector_dump (self->refinement);
+ ccss_selector_dump (self->refinement);
}
if (self->block) {
printf (" {\n");
- ccd_block_dump (self->block);
+ ccss_block_dump (self->block);
printf ("}");
}
@@ -1125,5 +1125,5 @@
self->modality, self->a, self->b, self->c, self->d, self->e);
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-selector.h (from r132, /trunk/libccd/ccd/ccd-selector.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-selector.h (original)
+++ trunk/libccss/ccss/ccss-selector.h Mon Sep 29 09:51:02 2008
@@ -17,69 +17,69 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_SELECTOR_H
-#define CCD_SELECTOR_H
+#ifndef CCSS_SELECTOR_H
+#define CCSS_SELECTOR_H
#include <stdbool.h>
#include <stdint.h>
#include <glib.h>
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-block.h>
-#include <ccd/ccd-node.h>
-#include <ccd/ccd-style.h>
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-block.h>
+#include <ccss/ccss-node.h>
+#include <ccss/ccss-style.h>
G_BEGIN_DECLS
-#define CCD_SELECTOR_MAX_SPECIFICITY ((1 << 5) - 1)
+#define CCSS_SELECTOR_MAX_SPECIFICITY ((1 << 5) - 1)
-typedef struct ccd_rule_set_ ccd_rule_set_t;
-typedef struct ccd_selector_ ccd_selector_t;
+typedef struct ccss_rule_set_ ccss_rule_set_t;
+typedef struct ccss_selector_ ccss_selector_t;
typedef enum {
- CCD_ATTRIBUTE_SELECTOR_MATCH_EXISTS,
- CCD_ATTRIBUTE_SELECTOR_MATCH_EQUALS
+ CCSS_ATTRIBUTE_SELECTOR_MATCH_EXISTS,
+ CCSS_ATTRIBUTE_SELECTOR_MATCH_EQUALS
/* more match types go here */
-} ccd_attribute_selector_match_t;
+} ccss_attribute_selector_match_t;
-ccd_selector_t * ccd_universal_selector_new (void);
-ccd_selector_t * ccd_type_selector_new (char const *type_name);
-ccd_selector_t * ccd_base_type_selector_new (char const *type_name, unsigned int specificity_e);
-ccd_selector_t * ccd_class_selector_new (char const *class_name);
-ccd_selector_t * ccd_id_selector_new (char const *id);
-ccd_selector_t * ccd_attribute_selector_new (char const *name, char const *value, ccd_attribute_selector_match_t match);
-ccd_selector_t * ccd_pseudo_class_selector_new (char const *pseudo_class);
+ccss_selector_t * ccss_universal_selector_new (void);
+ccss_selector_t * ccss_type_selector_new (char const *type_name);
+ccss_selector_t * ccss_base_type_selector_new (char const *type_name, unsigned int specificity_e);
+ccss_selector_t * ccss_class_selector_new (char const *class_name);
+ccss_selector_t * ccss_id_selector_new (char const *id);
+ccss_selector_t * ccss_attribute_selector_new (char const *name, char const *value, ccss_attribute_selector_match_t match);
+ccss_selector_t * ccss_pseudo_class_selector_new (char const *pseudo_class);
-ccd_selector_t * ccd_selector_copy (ccd_selector_t const *original);
-ccd_selector_t * ccd_selector_copy_as_base (ccd_selector_t const *original,
+ccss_selector_t * ccss_selector_copy (ccss_selector_t const *original);
+ccss_selector_t * ccss_selector_copy_as_base (ccss_selector_t const *original,
int specificity_e);
-void ccd_selector_free (ccd_selector_t *self);
+void ccss_selector_free (ccss_selector_t *self);
-void ccd_selector_refine (ccd_selector_t *self, ccd_selector_t *selector);
-ccd_selector_t * ccd_selector_append_child (ccd_selector_t *self, ccd_selector_t *selector);
-ccd_selector_t * ccd_selector_append_descendant (ccd_selector_t *self, ccd_selector_t *selector);
-
-bool ccd_selector_is_type (ccd_selector_t const *self);
-bool ccd_selector_is_class (ccd_selector_t const *self);
-bool ccd_selector_is_id (ccd_selector_t const *self);
-
-ccd_block_t const * ccd_selector_get_block (ccd_selector_t const *self);
-void ccd_selector_set_block (ccd_selector_t *self, ccd_block_t const *block);
-
-char const * ccd_selector_get_key (ccd_selector_t const *self);
-uint32_t ccd_selector_get_specificity (ccd_selector_t const *self);
-void ccd_selector_get_specificity_values (ccd_selector_t const *self,
+void ccss_selector_refine (ccss_selector_t *self, ccss_selector_t *selector);
+ccss_selector_t * ccss_selector_append_child (ccss_selector_t *self, ccss_selector_t *selector);
+ccss_selector_t * ccss_selector_append_descendant (ccss_selector_t *self, ccss_selector_t *selector);
+
+bool ccss_selector_is_type (ccss_selector_t const *self);
+bool ccss_selector_is_class (ccss_selector_t const *self);
+bool ccss_selector_is_id (ccss_selector_t const *self);
+
+ccss_block_t const * ccss_selector_get_block (ccss_selector_t const *self);
+void ccss_selector_set_block (ccss_selector_t *self, ccss_block_t const *block);
+
+char const * ccss_selector_get_key (ccss_selector_t const *self);
+uint32_t ccss_selector_get_specificity (ccss_selector_t const *self);
+void ccss_selector_get_specificity_values (ccss_selector_t const *self,
unsigned int *a, unsigned int *b, unsigned int *c, unsigned int *d, unsigned int *e);
-bool ccd_selector_query_apply (ccd_selector_t const *self, ccd_node_t const *node,
- ccd_style_t *style);
-bool ccd_selector_apply (ccd_selector_t const *self, ccd_style_t *style);
+bool ccss_selector_query_apply (ccss_selector_t const *self, ccss_node_t const *node,
+ ccss_style_t *style);
+bool ccss_selector_apply (ccss_selector_t const *self, ccss_style_t *style);
-#ifdef CCD_DEBUG
-void ccd_selector_dump (ccd_selector_t const *self);
+#ifdef CCSS_DEBUG
+void ccss_selector_dump (ccss_selector_t const *self);
#endif
G_END_DECLS
-#endif /* CCD_SELECTOR_H */
+#endif /* CCSS_SELECTOR_H */
Copied: trunk/libccss/ccss/ccss-style.c (from r132, /trunk/libccd/ccd/ccd-style.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-style.c (original)
+++ trunk/libccss/ccss/ccss-style.c Mon Sep 29 09:51:02 2008
@@ -18,49 +18,49 @@
*/
#include <string.h>
-#include "ccd-style.h"
+#include "ccss-style.h"
-static const ccd_background_attachment_t const _bg_attachment = {
- .spec = CCD_PROPERTY_SPEC_SET,
- .attachment = CCD_BACKGROUND_SCROLL
+static const ccss_background_attachment_t const _bg_attachment = {
+ .spec = CCSS_PROPERTY_SPEC_SET,
+ .attachment = CCSS_BACKGROUND_SCROLL
};
-static const ccd_color_t const _bg_color = {
- .spec = CCD_PROPERTY_SPEC_SET,
+static const ccss_color_t const _bg_color = {
+ .spec = CCSS_PROPERTY_SPEC_SET,
.red = 1.,
.green = 1.,
.blue = 1.
};
-static const ccd_background_image_t const _bg_image = {
- .spec = CCD_PROPERTY_SPEC_NONE
+static const ccss_background_image_t const _bg_image = {
+ .spec = CCSS_PROPERTY_SPEC_NONE
};
-static const ccd_background_position_t const _bg_position = {
- .spec = CCD_PROPERTY_SPEC_SET,
- .hpos = { CCD_POSITION_LENGTH, 0 },
- .vpos = { CCD_POSITION_LENGTH, 0 }
+static const ccss_background_position_t const _bg_position = {
+ .spec = CCSS_PROPERTY_SPEC_SET,
+ .hpos = { CCSS_POSITION_LENGTH, 0 },
+ .vpos = { CCSS_POSITION_LENGTH, 0 }
};
-static const ccd_background_repeat_t const _bg_repeat = {
- .spec = CCD_PROPERTY_SPEC_SET,
- .repeat = CCD_BACKGROUND_REPEAT
+static const ccss_background_repeat_t const _bg_repeat = {
+ .spec = CCSS_PROPERTY_SPEC_SET,
+ .repeat = CCSS_BACKGROUND_REPEAT
};
-static const ccd_background_size_t const _bg_size = {
- .spec = CCD_PROPERTY_SPEC_SET,
- .width = { CCD_POSITION_AUTO, 0 },
- .height = { CCD_POSITION_AUTO, 0 }
+static const ccss_background_size_t const _bg_size = {
+ .spec = CCSS_PROPERTY_SPEC_SET,
+ .width = { CCSS_POSITION_AUTO, 0 },
+ .height = { CCSS_POSITION_AUTO, 0 }
};
-static const ccd_color_t const _color = {
- .spec = CCD_PROPERTY_SPEC_SET,
+static const ccss_color_t const _color = {
+ .spec = CCSS_PROPERTY_SPEC_SET,
.red = 0.,
.green = 0.,
.blue = 0.
};
-static const ccd_style_t const _default_style = {
+static const ccss_style_t const _default_style = {
.bg_attachment = &_bg_attachment,
.bg_color = &_bg_color,
.bg_image = &_bg_image,
@@ -69,62 +69,62 @@
.bg_size = &_bg_size,
.left = {
.width = 0,
- .width_spec = CCD_PROPERTY_SPEC_SET,
- .style = CCD_BORDER_STYLE_SOLID,
- .style_spec = CCD_PROPERTY_SPEC_SET,
- .color = { CCD_PROPERTY_SPEC_SET, 0, 0, 0 } },
+ .width_spec = CCSS_PROPERTY_SPEC_SET,
+ .style = CCSS_BORDER_STYLE_SOLID,
+ .style_spec = CCSS_PROPERTY_SPEC_SET,
+ .color = { CCSS_PROPERTY_SPEC_SET, 0, 0, 0 } },
.left_top = {
.radius = 0,
- .spec = CCD_PROPERTY_SPEC_SET
+ .spec = CCSS_PROPERTY_SPEC_SET
},
.top = {
.width = 0,
- .width_spec = CCD_PROPERTY_SPEC_SET,
- .style = CCD_BORDER_STYLE_SOLID,
- .style_spec = CCD_PROPERTY_SPEC_SET,
- .color = { CCD_PROPERTY_SPEC_SET, 0, 0, 0 } },
+ .width_spec = CCSS_PROPERTY_SPEC_SET,
+ .style = CCSS_BORDER_STYLE_SOLID,
+ .style_spec = CCSS_PROPERTY_SPEC_SET,
+ .color = { CCSS_PROPERTY_SPEC_SET, 0, 0, 0 } },
.top_right = {
.radius = 0,
- .spec = CCD_PROPERTY_SPEC_SET
+ .spec = CCSS_PROPERTY_SPEC_SET
},
.right = {
.width = 0,
- .width_spec = CCD_PROPERTY_SPEC_SET,
- .style = CCD_BORDER_STYLE_SOLID,
- .style_spec = CCD_PROPERTY_SPEC_SET,
- .color = { CCD_PROPERTY_SPEC_SET, 0, 0, 0 } },
+ .width_spec = CCSS_PROPERTY_SPEC_SET,
+ .style = CCSS_BORDER_STYLE_SOLID,
+ .style_spec = CCSS_PROPERTY_SPEC_SET,
+ .color = { CCSS_PROPERTY_SPEC_SET, 0, 0, 0 } },
.right_bottom = {
.radius = 0,
- .spec = CCD_PROPERTY_SPEC_SET
+ .spec = CCSS_PROPERTY_SPEC_SET
},
.bottom = {
.width = 0,
- .width_spec = CCD_PROPERTY_SPEC_SET,
- .style = CCD_BORDER_STYLE_SOLID,
- .style_spec = CCD_PROPERTY_SPEC_SET,
- .color = { CCD_PROPERTY_SPEC_SET, 0, 0, 0 } },
+ .width_spec = CCSS_PROPERTY_SPEC_SET,
+ .style = CCSS_BORDER_STYLE_SOLID,
+ .style_spec = CCSS_PROPERTY_SPEC_SET,
+ .color = { CCSS_PROPERTY_SPEC_SET, 0, 0, 0 } },
.bottom_left = {
.radius = 0,
- .spec = CCD_PROPERTY_SPEC_SET
+ .spec = CCSS_PROPERTY_SPEC_SET
},
.color = &_color
};
/**
- * ccd_style_init:
- * @self: a ccd_style_t.
+ * ccss_style_init:
+ * @self: a ccss_style_t.
*
* Reset the object's internal state.
**/
void
-ccd_style_init (ccd_style_t *self)
+ccss_style_init (ccss_style_t *self)
{
memcpy (self, &_default_style, sizeof (*self));
}
/**
- * ccd_style_draw_horizontal_line:
- * @self: a ccd_style_t.
+ * ccss_style_draw_horizontal_line:
+ * @self: a ccss_style_t.
* @cr: the target to draw onto.
* @x1: the starting x coordinate.
* @x2: the ending x coordinate.
@@ -134,42 +134,42 @@
* border from the CSS, if specified.
**/
void
-ccd_style_draw_line (ccd_style_t const *self,
+ccss_style_draw_line (ccss_style_t const *self,
cairo_t *cr,
int32_t x1,
int32_t x2,
int32_t y1,
int32_t y2)
{
- ccd_border_stroke_t const *stroke;
+ ccss_border_stroke_t const *stroke;
double off;
if (y1 == y2) {
/* Horizontal: try to use top, then bottom border.
* Fallback based on flags is flawed, however. */
- stroke = CCD_BORDER_STROKE_IS_SET (self->top) ? &self->top : &self->bottom;
+ stroke = CCSS_BORDER_STROKE_IS_SET (self->top) ? &self->top : &self->bottom;
if (stroke) {
/* Unlike borders, lines are not drawn inside the box,
* account for that. */
off = stroke->width / 2.;
- ccd_border_draw (NULL, NULL, stroke, NULL,
+ ccss_border_draw (NULL, NULL, stroke, NULL,
NULL, NULL, NULL, NULL,
- CCD_BORDER_VISIBILITY_SHOW_ALL,
+ CCSS_BORDER_VISIBILITY_SHOW_ALL,
cr, x1, y1 - off, x2 - x1, 0);
}
} else {
/* Vertical: try to use left, then right border.
* Fallback based on flags is flawed, however. */
- stroke = CCD_BORDER_STROKE_IS_SET (self->left) ? &self->left : &self->right;
+ stroke = CCSS_BORDER_STROKE_IS_SET (self->left) ? &self->left : &self->right;
if (stroke) {
/* Unlike borders, lines are not drawn inside the box,
* account for that. */
off = stroke->width / 2.;
- ccd_border_draw (stroke, NULL, NULL, NULL,
+ ccss_border_draw (stroke, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
- CCD_BORDER_VISIBILITY_SHOW_ALL,
+ CCSS_BORDER_VISIBILITY_SHOW_ALL,
cr, x1 - off, y1, 0, y2 - y1);
}
}
@@ -177,8 +177,8 @@
}
/**
- * ccd_style_draw_outline:
- * @self: a ccd_style_t.
+ * ccss_style_draw_outline:
+ * @self: a ccss_style_t.
* @cr: the target to draw onto.
* @x: the starting x coordinate.
* @y: the starting y coordinate.
@@ -189,24 +189,24 @@
* this style's background is diregarded.
**/
void
-ccd_style_draw_outline (ccd_style_t const *self,
+ccss_style_draw_outline (ccss_style_t const *self,
cairo_t *cr,
int32_t x,
int32_t y,
int32_t width,
int32_t height)
{
- ccd_border_draw (&self->left, &self->left_top,
+ ccss_border_draw (&self->left, &self->left_top,
&self->top, &self->top_right,
&self->right, &self->right_bottom,
&self->bottom, &self->bottom_left,
- CCD_BORDER_VISIBILITY_SHOW_ALL,
+ CCSS_BORDER_VISIBILITY_SHOW_ALL,
cr, x, y, width, height);
}
/**
- * ccd_style_draw_rectangle:
- * @self: a ccd_style_t.
+ * ccss_style_draw_rectangle:
+ * @self: a ccss_style_t.
* @cr: the target to draw onto.
* @x: the starting x coordinate.
* @y: the starting y coordinate.
@@ -216,35 +216,35 @@
* Draw a rectangle using this style instance.
**/
void
-ccd_style_draw_rectangle (ccd_style_t const *self,
+ccss_style_draw_rectangle (ccss_style_t const *self,
cairo_t *cr,
int32_t x,
int32_t y,
int32_t width,
int32_t height)
{
- ccd_border_path (&self->left, &self->left_top,
+ ccss_border_path (&self->left, &self->left_top,
&self->top, &self->top_right,
&self->right, &self->right_bottom,
&self->bottom, &self->bottom_left,
cr, x, y, width, height);
- ccd_background_fill (self->bg_attachment, self->bg_color,
+ ccss_background_fill (self->bg_attachment, self->bg_color,
self->bg_image, self->bg_position, self->bg_repeat,
self->bg_size, cr, x, y, width, height);
cairo_new_path (cr);
- ccd_border_draw (&self->left, &self->left_top,
+ ccss_border_draw (&self->left, &self->left_top,
&self->top, &self->top_right,
&self->right, &self->right_bottom,
&self->bottom, &self->bottom_left,
- CCD_BORDER_VISIBILITY_SHOW_ALL,
+ CCSS_BORDER_VISIBILITY_SHOW_ALL,
cr, x, y, width, height);
}
bool
-ccd_style_get_color (ccd_style_t const *self,
+ccss_style_get_color (ccss_style_t const *self,
double *red,
double *green,
double *blue)
@@ -268,7 +268,7 @@
}
bool
-ccd_style_get_background_color (ccd_style_t const *self,
+ccss_style_get_background_color (ccss_style_t const *self,
double *red,
double *green,
double *blue)
@@ -292,7 +292,7 @@
}
bool
-ccd_style_get_border_color (ccd_style_t const *self,
+ccss_style_get_border_color (ccss_style_t const *self,
double *red,
double *green,
double *blue)
@@ -313,26 +313,26 @@
return true;
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
/**
- * ccd_style_dump:
- * @self: a ccd_style_t.
+ * ccss_style_dump:
+ * @self: a ccss_style_t.
*
* Print informations about the internal state of this object.
**/
void
-ccd_style_dump (ccd_style_t const *self)
+ccss_style_dump (ccss_style_t const *self)
{
if (self->bg_color)
- ccd_color_dump (self->bg_color);
+ ccss_color_dump (self->bg_color);
if (self->bg_image)
- ccd_background_image_dump (self->bg_image);
- ccd_border_stroke_dump (&self->left);
- ccd_border_stroke_dump (&self->top);
- ccd_border_stroke_dump (&self->right);
- ccd_border_stroke_dump (&self->bottom);
+ ccss_background_image_dump (self->bg_image);
+ ccss_border_stroke_dump (&self->left);
+ ccss_border_stroke_dump (&self->top);
+ ccss_border_stroke_dump (&self->right);
+ ccss_border_stroke_dump (&self->bottom);
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-style.h (from r132, /trunk/libccd/ccd/ccd-style.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-style.h (original)
+++ trunk/libccss/ccss/ccss-style.h Mon Sep 29 09:51:02 2008
@@ -17,75 +17,75 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_STYLE_H
-#define CCD_STYLE_H
+#ifndef CCSS_STYLE_H
+#define CCSS_STYLE_H
#include <stdint.h>
#include <glib.h>
#include <cairo.h>
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-background.h>
-#include <ccd/ccd-border.h>
-#include <ccd/ccd-color.h>
-#include <ccd/ccd-property.h>
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-background.h>
+#include <ccss/ccss-border.h>
+#include <ccss/ccss-color.h>
+#include <ccss/ccss-property.h>
G_BEGIN_DECLS
/**
- * ccd_style_t:
+ * ccss_style_t:
*
* Representation of a block of CSS statements.
*
* <emphasis>Memory management:</emphasis> Style objects are owned by the
- * stylesheet, and therefore not created or modified by the CCD consumer.
+ * stylesheet, and therefore not created or modified by the CCSS consumer.
**/
typedef struct {
/*< private >*/
- ccd_background_attachment_t const *bg_attachment;
- ccd_color_t const *bg_color;
- ccd_background_image_t const *bg_image;
- ccd_background_position_t const *bg_position;
- ccd_background_repeat_t const *bg_repeat;
- ccd_background_size_t const *bg_size;
- ccd_border_stroke_t left;
- ccd_border_join_t left_top;
- ccd_border_stroke_t top;
- ccd_border_join_t top_right;
- ccd_border_stroke_t right;
- ccd_border_join_t right_bottom;
- ccd_border_stroke_t bottom;
- ccd_border_join_t bottom_left;
- ccd_color_t const *color;
-} ccd_style_t;
+ ccss_background_attachment_t const *bg_attachment;
+ ccss_color_t const *bg_color;
+ ccss_background_image_t const *bg_image;
+ ccss_background_position_t const *bg_position;
+ ccss_background_repeat_t const *bg_repeat;
+ ccss_background_size_t const *bg_size;
+ ccss_border_stroke_t left;
+ ccss_border_join_t left_top;
+ ccss_border_stroke_t top;
+ ccss_border_join_t top_right;
+ ccss_border_stroke_t right;
+ ccss_border_join_t right_bottom;
+ ccss_border_stroke_t bottom;
+ ccss_border_join_t bottom_left;
+ ccss_color_t const *color;
+} ccss_style_t;
-void ccd_style_init (ccd_style_t *self);
+void ccss_style_init (ccss_style_t *self);
-void ccd_style_draw_line (ccd_style_t const *self, cairo_t *cr,
+void ccss_style_draw_line (ccss_style_t const *self, cairo_t *cr,
int32_t x1, int32_t x2, int32_t y1, int32_t y2);
-void ccd_style_draw_outline (ccd_style_t const *self, cairo_t *cr,
+void ccss_style_draw_outline (ccss_style_t const *self, cairo_t *cr,
int32_t x, int32_t y, int32_t width, int32_t height);
-void ccd_style_draw_rectangle (ccd_style_t const *self, cairo_t *cr,
+void ccss_style_draw_rectangle (ccss_style_t const *self, cairo_t *cr,
int32_t x, int32_t y, int32_t width, int32_t height);
/* Somewhat obscure, undocumented API, primarily for the css engine.
* Maybe we should return a cairo pattern instead? */
-bool ccd_style_get_color (ccd_style_t const *self,
+bool ccss_style_get_color (ccss_style_t const *self,
double *red, double *green, double *blue);
-bool ccd_style_get_background_color (ccd_style_t const *self,
+bool ccss_style_get_background_color (ccss_style_t const *self,
double *red, double *green, double *blue);
-bool ccd_style_get_border_color (ccd_style_t const *self,
+bool ccss_style_get_border_color (ccss_style_t const *self,
double *red, double *green, double *blue);
-#ifdef CCD_DEBUG
-void ccd_style_dump (ccd_style_t const *self);
+#ifdef CCSS_DEBUG
+void ccss_style_dump (ccss_style_t const *self);
#endif
G_END_DECLS
-#endif /* CCD_STYLE_H */
+#endif /* CCSS_STYLE_H */
Copied: trunk/libccss/ccss/ccss-stylesheet.c (from r132, /trunk/libccd/ccd/ccd-stylesheet.c)
==============================================================================
--- /trunk/libccd/ccd/ccd-stylesheet.c (original)
+++ trunk/libccss/ccss/ccss-stylesheet.c Mon Sep 29 09:51:02 2008
@@ -18,15 +18,15 @@
*/
#include <string.h>
-#include "ccd-block.h"
-#include "ccd-node.h"
-#include "ccd-parser.h"
-#include "ccd-selector-group-priv.h"
-#include "ccd-selector.h"
-#include "ccd-stylesheet.h"
+#include "ccss-block.h"
+#include "ccss-node.h"
+#include "ccss-parser.h"
+#include "ccss-selector-group-priv.h"
+#include "ccss-selector.h"
+#include "ccss-stylesheet.h"
/**
- * ccd_stylesheet_t:
+ * ccss_stylesheet_t:
* @blocks: List owning all blocks parsed from the stylesheet.
* @type_rules: Associates type names with all applying selectors.
* @class_rules: Associates class names with all applying selectors.
@@ -34,19 +34,19 @@
*
* Represents a parsed instance of a stylesheet.
**/
-struct ccd_stylesheet_ {
+struct ccss_stylesheet_ {
GSList *blocks;
GHashTable *type_rules;
GHashTable *class_rules;
GHashTable *id_rules;
};
-static ccd_stylesheet_t *
-ccd_stylesheet_new (void)
+static ccss_stylesheet_t *
+ccss_stylesheet_new (void)
{
- ccd_stylesheet_t *self;
+ ccss_stylesheet_t *self;
- self = g_new0 (ccd_stylesheet_t, 1);
+ self = g_new0 (ccss_stylesheet_t, 1);
self->type_rules = g_hash_table_new (g_str_hash, g_str_equal);
self->class_rules = g_hash_table_new (g_str_hash, g_str_equal);
self->id_rules = g_hash_table_new (g_str_hash, g_str_equal);
@@ -55,13 +55,13 @@
}
static void
-fix_dangling_selectors (ccd_stylesheet_t *self)
+fix_dangling_selectors (ccss_stylesheet_t *self)
{
GHashTableIter iter;
char const *key;
char const *dangling_key;
- ccd_selector_group_t *group;
- ccd_selector_group_t *fixup_group;
+ ccss_selector_group_t *group;
+ ccss_selector_group_t *fixup_group;
GSList const *item;
bool have_dangling;
void *k;
@@ -73,50 +73,50 @@
/* walk extra mile to prevent warnings */
key = (char const *) k;
- group = (ccd_selector_group_t *) v;
+ group = (ccss_selector_group_t *) v;
- item = ccd_selector_group_get_dangling_selectors (group);
+ item = ccss_selector_group_get_dangling_selectors (group);
have_dangling = (bool) item;
/* walk the list of dangling selectors in the current group */
while (item) {
- ccd_selector_t const *selector;
+ ccss_selector_t const *selector;
/* Merge fixup-group to satisfy dangling selectors.
* If no fixup_group is found that's ok too, the remaining dangling
* selectors will be removed in clear_dangling_selectors(). */
- selector = (ccd_selector_t const *) item->data;
- dangling_key = ccd_selector_get_key (selector);
+ selector = (ccss_selector_t const *) item->data;
+ dangling_key = ccss_selector_get_key (selector);
fixup_group = g_hash_table_lookup (self->type_rules, dangling_key);
if (fixup_group) {
- ccd_selector_group_merge_base (group, fixup_group);
+ ccss_selector_group_merge_base (group, fixup_group);
}
item = item->next;
}
if (have_dangling) {
- ccd_selector_group_clear_dangling_selectors (group);
+ ccss_selector_group_clear_dangling_selectors (group);
}
}
}
/**
- * ccd_stylesheet_new_from_buffer:
+ * ccss_stylesheet_new_from_buffer:
* @buffer: buffer to parse.
* @size: size of the buffer.
*
* Create a new stylesheet instance based on a CSS string.
*
- * Returns: a #ccd_stylesheet_t representation of the CSS string.
+ * Returns: a #ccss_stylesheet_t representation of the CSS string.
**/
-ccd_stylesheet_t *
-ccd_stylesheet_new_from_buffer (char const *buffer,
+ccss_stylesheet_t *
+ccss_stylesheet_new_from_buffer (char const *buffer,
size_t size)
{
- ccd_stylesheet_t *self;
+ ccss_stylesheet_t *self;
g_critical ("%s() not tested", __FUNCTION__);
- self = ccd_stylesheet_new ();
+ self = ccss_stylesheet_new ();
- self->blocks = ccd_parser_parse_buffer (buffer, size, self->type_rules,
+ self->blocks = ccss_parser_parse_buffer (buffer, size, self->type_rules,
self->class_rules, self->id_rules);
fix_dangling_selectors (self);
@@ -125,21 +125,21 @@
}
/**
- * ccd_stylesheet_new_from_file:
+ * ccss_stylesheet_new_from_file:
* @css_file: file to parse.
*
* Create a new stylesheet instance based on a CSS file.
*
- * Returns: a #ccd_stylesheet_t representation of the CSS file.
+ * Returns: a #ccss_stylesheet_t representation of the CSS file.
**/
-ccd_stylesheet_t *
-ccd_stylesheet_new_from_file (char const *css_file)
+ccss_stylesheet_t *
+ccss_stylesheet_new_from_file (char const *css_file)
{
- ccd_stylesheet_t *self;
+ ccss_stylesheet_t *self;
- self = ccd_stylesheet_new ();
+ self = ccss_stylesheet_new ();
- self->blocks = ccd_parser_parse_file (css_file, self->type_rules,
+ self->blocks = ccss_parser_parse_file (css_file, self->type_rules,
self->class_rules, self->id_rules);
fix_dangling_selectors (self);
@@ -148,24 +148,24 @@
}
/**
- * ccd_stylesheet_free:
- * @self: a #ccd_stylesheet_t.
+ * ccss_stylesheet_free:
+ * @self: a #ccss_stylesheet_t.
*
* Free the stylesheet and all associated resources.
**/
void
-ccd_stylesheet_free (ccd_stylesheet_t *self)
+ccss_stylesheet_free (ccss_stylesheet_t *self)
{
GSList *iter;
- ccd_block_t *block;
+ ccss_block_t *block;
g_assert (self);
iter = self->blocks;
while (iter) {
- block = (ccd_block_t *) iter->data;
+ block = (ccss_block_t *) iter->data;
iter = g_slist_remove (iter, block);
- ccd_block_free (block);
+ ccss_block_free (block);
}
g_hash_table_destroy (self->type_rules);
@@ -175,23 +175,23 @@
}
/**
- * ccd_stylesheet_query_type:
- * @self: a #ccd_stylesheet_t.
+ * ccss_stylesheet_query_type:
+ * @self: a #ccss_stylesheet_t.
* @type_name: the type to query for, e.g. `h1'.
*
* Query the stylesheet for styling information regarding a type.
*
- * Returns: a #ccd_selector_group_t containing the requested information of %NULL.
+ * Returns: a #ccss_selector_group_t containing the requested information of %NULL.
**/
-ccd_selector_group_t const *
-ccd_stylesheet_query_type (ccd_stylesheet_t const *self,
+ccss_selector_group_t const *
+ccss_stylesheet_query_type (ccss_stylesheet_t const *self,
char const *type_name)
{
- ccd_selector_group_t const *group;
+ ccss_selector_group_t const *group;
g_assert (self && type_name && self->type_rules);
- group = (ccd_selector_group_t const *) g_hash_table_lookup (self->type_rules, type_name);
+ group = (ccss_selector_group_t const *) g_hash_table_lookup (self->type_rules, type_name);
return group;
}
@@ -200,18 +200,18 @@
* `iter' is used for the recursion.
*/
static bool
-collect_type_r (ccd_stylesheet_t const *self,
- ccd_node_t const *node,
- ccd_node_t const *iter,
- ccd_selector_group_t *result_group,
+collect_type_r (ccss_stylesheet_t const *self,
+ ccss_node_t const *node,
+ ccss_node_t const *iter,
+ ccss_selector_group_t *result_group,
bool as_base)
{
- ccd_node_class_t const *node_class;
- ccd_selector_group_t *group;
+ ccss_node_class_t const *node_class;
+ ccss_selector_group_t *group;
char const *type_name;
bool ret;
- node_class = ccd_node_peek_class ();
+ node_class = ccss_node_peek_class ();
if (!iter) {
iter = node;
@@ -222,11 +222,11 @@
ret = false;
if (type_name) {
- ccd_node_t *base;
+ ccss_node_t *base;
group = g_hash_table_lookup (self->type_rules, type_name);
if (group) {
- ret = ccd_selector_group_query_collect (group, node, result_group, as_base);
+ ret = ccss_selector_group_query_collect (group, node, result_group, as_base);
}
/* Try to match base types. */
@@ -243,10 +243,10 @@
}
/**
- * ccd_stylesheet_query_collect:
- * @self: a #ccd_stylesheet_t.
- * @node: a #ccd_node_t implementation that is used by libccd to retrieve information about the underlying document.
- * @result_group: a #ccd_selector_group_t that accumulates the results of the query.
+ * ccss_stylesheet_query_collect:
+ * @self: a #ccss_stylesheet_t.
+ * @node: a #ccss_node_t implementation that is used by libccss to retrieve information about the underlying document.
+ * @result_group: a #ccss_selector_group_t that accumulates the results of the query.
* @as_base: whether the results should be accumulates with lowered priority, e.g. when querying for base style information.
*
* Query the stylesheet for styling information regarding a document node and collect the results.
@@ -254,16 +254,16 @@
* Returns: %TRUE if styling information has been found.
**/
bool
-ccd_stylesheet_query_collect (ccd_stylesheet_t const *self,
- ccd_node_t const *node,
- ccd_selector_group_t *result_group,
+ccss_stylesheet_query_collect (ccss_stylesheet_t const *self,
+ ccss_node_t const *node,
+ ccss_selector_group_t *result_group,
bool as_base)
{
- ccd_node_class_t const *node_class;
- ccd_selector_group_t const *group;
+ ccss_node_class_t const *node_class;
+ ccss_selector_group_t const *group;
bool ret;
- node_class = ccd_node_peek_class ();
+ node_class = ccss_node_peek_class ();
g_return_val_if_fail (self && node && result_group, false);
@@ -272,7 +272,7 @@
/* Match wildcard styles. */
group = g_hash_table_lookup (self->type_rules, "*");
if (group) {
- ret |= ccd_selector_group_query_collect (group, node,
+ ret |= ccss_selector_group_query_collect (group, node,
result_group, false);
}
@@ -294,17 +294,17 @@
* `iter' is used for the recursion.
*/
static bool
-apply_type_r (ccd_stylesheet_t const *self,
- ccd_node_t const *node,
- ccd_node_t const *iter,
- ccd_style_t *style)
+apply_type_r (ccss_stylesheet_t const *self,
+ ccss_node_t const *node,
+ ccss_node_t const *iter,
+ ccss_style_t *style)
{
- ccd_node_class_t const *node_class;
- ccd_selector_group_t *group;
+ ccss_node_class_t const *node_class;
+ ccss_selector_group_t *group;
char const *type_name;
bool ret;
- node_class = ccd_node_peek_class ();
+ node_class = ccss_node_peek_class ();
if (!iter) {
iter = node;
@@ -315,11 +315,11 @@
ret = false;
if (type_name) {
- ccd_node_t *base;
+ ccss_node_t *base;
group = g_hash_table_lookup (self->type_rules, type_name);
if (group) {
- ret = ccd_selector_group_query_apply (group, node, style);
+ ret = ccss_selector_group_query_apply (group, node, style);
}
/* Try to match base types. */
@@ -341,23 +341,23 @@
* Note: not yet supported by libcroco.
*/
static bool
-match_class (ccd_stylesheet_t const *self,
- ccd_node_t const *node,
- ccd_style_t *style)
+match_class (ccss_stylesheet_t const *self,
+ ccss_node_t const *node,
+ ccss_style_t *style)
{
- ccd_node_class_t const *node_class;
- ccd_selector_group_t *group;
+ ccss_node_class_t const *node_class;
+ ccss_selector_group_t *group;
char const *class_name;
bool ret;
- node_class = ccd_node_peek_class ();
+ node_class = ccss_node_peek_class ();
ret = false;
class_name = node_class->get_class (node);
if (class_name) {
group = g_hash_table_lookup (self->class_rules, class_name);
if (group) {
- ret |= ccd_selector_group_query_apply (group, node, style);
+ ret |= ccss_selector_group_query_apply (group, node, style);
}
}
@@ -369,23 +369,23 @@
* Note: not yet supported by libcroco.
*/
static bool
-match_id (ccd_stylesheet_t const *self,
- ccd_node_t const *node,
- ccd_style_t *style)
+match_id (ccss_stylesheet_t const *self,
+ ccss_node_t const *node,
+ ccss_style_t *style)
{
- ccd_node_class_t const *node_class;
- ccd_selector_group_t *group;
+ ccss_node_class_t const *node_class;
+ ccss_selector_group_t *group;
char const *id;
bool ret;
- node_class = ccd_node_peek_class ();
+ node_class = ccss_node_peek_class ();
ret = false;
id = node_class->get_id (node);
if (id) {
group = g_hash_table_lookup (self->id_rules, id);
if (group) {
- ret |= ccd_selector_group_query_apply (group, node, style);
+ ret |= ccss_selector_group_query_apply (group, node, style);
}
}
@@ -393,26 +393,26 @@
}
/**
- * ccd_stylesheet_query_apply:
- * @self: a #ccd_stylesheet_t.
- * @node: a #ccd_node_t implementation that is used by libccd to retrieve information about the underlying document.
- * @style: a #ccd_style_t that the results of the query are applied to.
+ * ccss_stylesheet_query_apply:
+ * @self: a #ccss_stylesheet_t.
+ * @node: a #ccss_node_t implementation that is used by libccss to retrieve information about the underlying document.
+ * @style: a #ccss_style_t that the results of the query are applied to.
*
- * Query the stylesheet for styling information regarding a document node and apply the results to a #ccd_style_t object.
+ * Query the stylesheet for styling information regarding a document node and apply the results to a #ccss_style_t object.
*
* Returns: %TRUE if styling information has been found.
**/
bool
-ccd_stylesheet_query_apply (ccd_stylesheet_t const *self,
- ccd_node_t const *node,
- ccd_style_t *style)
+ccss_stylesheet_query_apply (ccss_stylesheet_t const *self,
+ ccss_node_t const *node,
+ ccss_style_t *style)
{
- ccd_node_class_t const *node_class;
+ ccss_node_class_t const *node_class;
bool have_type;
bool have_class;
bool have_id;
- node_class = ccd_node_peek_class ();
+ node_class = ccss_node_peek_class ();
g_return_val_if_fail (self && node && style, false);
@@ -429,15 +429,15 @@
}
/**
- * ccd_stylesheet_iter_init:
- * @self: a #ccd_stylesheet_iter_t.
+ * ccss_stylesheet_iter_init:
+ * @self: a #ccss_stylesheet_iter_t.
* @stylesheet: the stylesheet to iterate.
*
* Modifying the underlying stylesheet invalidates the iterator.
**/
void
-ccd_stylesheet_iter_init (ccd_stylesheet_iter_t *self,
- ccd_stylesheet_t const *stylesheet)
+ccss_stylesheet_iter_init (ccss_stylesheet_iter_t *self,
+ ccss_stylesheet_t const *stylesheet)
{
g_return_if_fail (stylesheet && stylesheet->type_rules);
@@ -445,54 +445,54 @@
}
/**
- * ccd_stylesheet_iter_next:
- * @self: a #ccd_stylesheet_iter_t.
+ * ccss_stylesheet_iter_next:
+ * @self: a #ccss_stylesheet_iter_t.
* @type_name: type the selector group regards, e.g. DIV in HTML.
- * @group: the #ccd_selector_group_t containing rules for #type_name.
+ * @group: the #ccss_selector_group_t containing rules for #type_name.
*
* Returns: %FALSE when the last element is reached.
**/
bool
-ccd_stylesheet_iter_next (ccd_stylesheet_iter_t *self,
+ccss_stylesheet_iter_next (ccss_stylesheet_iter_t *self,
char const **type_name,
- ccd_selector_group_t const **group)
+ ccss_selector_group_t const **group)
{
return g_hash_table_iter_next (self, (gpointer *) type_name,
(gpointer *) group);
}
-#ifdef CCD_DEBUG
+#ifdef CCSS_DEBUG
/**
- * ccd_stylesheet_dump:
- * @self: a #ccd_stylesheet_t.
+ * ccss_stylesheet_dump:
+ * @self: a #ccss_stylesheet_t.
*
* Print informations about the internal state of this object.
**/
void
-ccd_stylesheet_dump (ccd_stylesheet_t const *self)
+ccss_stylesheet_dump (ccss_stylesheet_t const *self)
{
GHashTableIter iter;
char const *key;
- ccd_selector_group_t *value;
+ ccss_selector_group_t *value;
g_return_if_fail (self && self->class_rules);
g_hash_table_iter_init (&iter, self->type_rules);
while (g_hash_table_iter_next (&iter, (gpointer) &key, (gpointer) &value)) {
- ccd_selector_group_dump (value);
+ ccss_selector_group_dump (value);
}
g_hash_table_iter_init (&iter, self->class_rules);
while (g_hash_table_iter_next (&iter, (gpointer) &key, (gpointer) &value)) {
- ccd_selector_group_dump (value);
+ ccss_selector_group_dump (value);
}
g_hash_table_iter_init (&iter, self->id_rules);
while (g_hash_table_iter_next (&iter, (gpointer) &key, (gpointer) &value)) {
- ccd_selector_group_dump (value);
+ ccss_selector_group_dump (value);
}
}
-#endif /* CCD_DEBUG */
+#endif /* CCSS_DEBUG */
Copied: trunk/libccss/ccss/ccss-stylesheet.h (from r132, /trunk/libccd/ccd/ccd-stylesheet.h)
==============================================================================
--- /trunk/libccd/ccd/ccd-stylesheet.h (original)
+++ trunk/libccss/ccss/ccss-stylesheet.h Mon Sep 29 09:51:02 2008
@@ -17,52 +17,52 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_STYLESHEET_H
-#define CCD_STYLESHEET_H
+#ifndef CCSS_STYLESHEET_H
+#define CCSS_STYLESHEET_H
#include <stdbool.h>
#include <glib.h>
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-selector-group.h>
-#include <ccd/ccd-style.h>
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-selector-group.h>
+#include <ccss/ccss-style.h>
G_BEGIN_DECLS
-typedef struct ccd_stylesheet_ ccd_stylesheet_t;
+typedef struct ccss_stylesheet_ ccss_stylesheet_t;
-ccd_stylesheet_t * ccd_stylesheet_new_from_buffer (char const *buffer,
+ccss_stylesheet_t * ccss_stylesheet_new_from_buffer (char const *buffer,
size_t size);
-ccd_stylesheet_t * ccd_stylesheet_new_from_file (char const *css_file);
-void ccd_stylesheet_free (ccd_stylesheet_t *self);
+ccss_stylesheet_t * ccss_stylesheet_new_from_file (char const *css_file);
+void ccss_stylesheet_free (ccss_stylesheet_t *self);
-ccd_selector_group_t const * ccd_stylesheet_query_type (ccd_stylesheet_t const *self,
+ccss_selector_group_t const * ccss_stylesheet_query_type (ccss_stylesheet_t const *self,
char const *type_name);
-bool ccd_stylesheet_query_collect (ccd_stylesheet_t const *self, ccd_node_t const *node,
- ccd_selector_group_t *result_group, bool as_base);
+bool ccss_stylesheet_query_collect (ccss_stylesheet_t const *self, ccss_node_t const *node,
+ ccss_selector_group_t *result_group, bool as_base);
-bool ccd_stylesheet_query_apply (ccd_stylesheet_t const *self, ccd_node_t const *node,
- ccd_style_t *style);
+bool ccss_stylesheet_query_apply (ccss_stylesheet_t const *self, ccss_node_t const *node,
+ ccss_style_t *style);
/**
- * ccd_stylesheet_iter_t:
+ * ccss_stylesheet_iter_t:
*
* Stack-allocatable iterator for walking a stylesheet.
**/
-typedef GHashTableIter ccd_stylesheet_iter_t;
+typedef GHashTableIter ccss_stylesheet_iter_t;
-void ccd_stylesheet_iter_init (ccd_stylesheet_iter_t *self,
- ccd_stylesheet_t const *stylesheet);
+void ccss_stylesheet_iter_init (ccss_stylesheet_iter_t *self,
+ ccss_stylesheet_t const *stylesheet);
-bool ccd_stylesheet_iter_next (ccd_stylesheet_iter_t *self,
+bool ccss_stylesheet_iter_next (ccss_stylesheet_iter_t *self,
char const **type_name,
- ccd_selector_group_t const **group);
+ ccss_selector_group_t const **group);
-#ifdef CCD_DEBUG
-void ccd_stylesheet_dump (ccd_stylesheet_t const *self);
+#ifdef CCSS_DEBUG
+void ccss_stylesheet_dump (ccss_stylesheet_t const *self);
#endif
G_END_DECLS
-#endif /* CCD_STYLESHEET_H */
+#endif /* CCSS_STYLESHEET_H */
Copied: trunk/libccss/ccss/ccss.c (from r132, /trunk/libccd/ccd/ccd.c)
==============================================================================
--- /trunk/libccd/ccd/ccd.c (original)
+++ trunk/libccss/ccss/ccss.c Mon Sep 29 09:51:02 2008
@@ -17,34 +17,34 @@
* MA 02110-1301, USA.
*/
-#include "ccd.h"
+#include "ccss.h"
/**
- * ccd_init:
- * @node_class: dispatch table as described at #ccd_node_class_t.
+ * ccss_init:
+ * @node_class: dispatch table as described at #ccss_node_class_t.
* @functions: table of functions that can be used in CSS.
* @n_functions: size of the function table.
*
- * Initialize the CCD library before making any calls to it.
+ * Initialize the CCSS library before making any calls to it.
**/
void
-ccd_init (ccd_node_class_t const *node_class,
- ccd_function_t const *vtable)
+ccss_init (ccss_node_class_t const *node_class,
+ ccss_function_t const *vtable)
{
g_assert (node_class);
- ccd_node_set_class (node_class);
- ccd_function_set_vtable (vtable);
+ ccss_node_set_class (node_class);
+ ccss_function_set_vtable (vtable);
}
/**
- * ccd_shutdown:
+ * ccss_shutdown:
*
- * Shut down the CCD library.
+ * Shut down the CCSS library.
**/
void
-ccd_shutdown (void)
+ccss_shutdown (void)
{
- ccd_node_reset_class ();
+ ccss_node_reset_class ();
}
Copied: trunk/libccss/ccss/ccss.h (from r132, /trunk/libccd/ccd/ccd.h)
==============================================================================
--- /trunk/libccd/ccd/ccd.h (original)
+++ trunk/libccss/ccss/ccss.h Mon Sep 29 09:51:02 2008
@@ -17,37 +17,37 @@
* MA 02110-1301, USA.
*/
-#ifndef CCD_H
-#define CCD_H
+#ifndef CCSS_H
+#define CCSS_H
#include <glib.h>
G_BEGIN_DECLS
-#include <ccd/ccd-features.h>
-#include <ccd/ccd-function.h>
-#include <ccd/ccd-background.h>
-#include <ccd/ccd-border.h>
-#include <ccd/ccd-color.h>
-#include <ccd/ccd-function.h>
-#include <ccd/ccd-node.h>
-#include <ccd/ccd-style.h>
-#include <ccd/ccd-stylesheet.h>
-
-#ifdef CCD_WITH_GTK
-#include <ccd/ccd-gtk-style.h>
-#endif /* CCD_WITH_GTK */
+#include <ccss/ccss-features.h>
+#include <ccss/ccss-function.h>
+#include <ccss/ccss-background.h>
+#include <ccss/ccss-border.h>
+#include <ccss/ccss-color.h>
+#include <ccss/ccss-function.h>
+#include <ccss/ccss-node.h>
+#include <ccss/ccss-style.h>
+#include <ccss/ccss-stylesheet.h>
+
+#ifdef CCSS_WITH_GTK
+#include <ccss/ccss-gtk-style.h>
+#endif /* CCSS_WITH_GTK */
#define XH(n_) (n_)
#define YH(n_) (n_ + 0.5)
#define XV(n_) (n_ + 0.5)
#define YV(n_) (n_)
-void ccd_init (ccd_node_class_t const *node_class,
- ccd_function_t const *vtable);
-void ccd_shutdown (void);
+void ccss_init (ccss_node_class_t const *node_class,
+ ccss_function_t const *vtable);
+void ccss_shutdown (void);
G_END_DECLS
-#endif /* CCD_H */
+#endif /* CCSS_H */
Modified: trunk/libccss/ccss/exports.sym
==============================================================================
--- /trunk/libccd/ccd/exports.sym (original)
+++ trunk/libccss/ccss/exports.sym Mon Sep 29 09:51:02 2008
@@ -1,23 +1,23 @@
-ccd_init
-ccd_shutdown
-ccd_style_init
-ccd_style_draw_line
-ccd_style_draw_outline
-ccd_style_draw_rectangle
-ccd_style_get_color
-ccd_style_get_background_color
-ccd_style_get_border_color
-ccd_stylesheet_new_from_buffer
-ccd_stylesheet_new_from_file
-ccd_stylesheet_free
-ccd_stylesheet_query_type
-ccd_stylesheet_query_collect
-ccd_stylesheet_query_apply
-ccd_stylesheet_iter_init
-ccd_stylesheet_iter_next
-ccd_selector_group_new
-ccd_selector_group_free
-ccd_selector_group_apply
-ccd_selector_group_apply_type
-ccd_style_draw_gap
-ccd_style_draw_polygon
+ccss_init
+ccss_shutdown
+ccss_style_init
+ccss_style_draw_line
+ccss_style_draw_outline
+ccss_style_draw_rectangle
+ccss_style_get_color
+ccss_style_get_background_color
+ccss_style_get_border_color
+ccss_stylesheet_new_from_buffer
+ccss_stylesheet_new_from_file
+ccss_stylesheet_free
+ccss_stylesheet_query_type
+ccss_stylesheet_query_collect
+ccss_stylesheet_query_apply
+ccss_stylesheet_iter_init
+ccss_stylesheet_iter_next
+ccss_selector_group_new
+ccss_selector_group_free
+ccss_selector_group_apply
+ccss_selector_group_apply_type
+ccss_style_draw_gap
+ccss_style_draw_polygon
Modified: trunk/libccss/doc/Makefile.am
==============================================================================
--- /trunk/libccd/doc/Makefile.am (original)
+++ trunk/libccss/doc/Makefile.am Mon Sep 29 09:51:02 2008
@@ -1,16 +1,16 @@
## Process this file with automake to produce Makefile.in
# The name of the module.
-DOC_MODULE=ccd
+DOC_MODULE=ccss
# The top-level SGML file.
-DOC_MAIN_SGML_FILE=ccd-docs.sgml
+DOC_MAIN_SGML_FILE=ccss-docs.sgml
# The directory containing the source code. Relative to $(srcdir)
-DOC_SOURCE_DIR=../ccd
+DOC_SOURCE_DIR=../ccss
# Extra options to pass to gtkdoc-scangobj
-SCANGOBJ_OPTIONS= --nogtkinit --type-init-func="ccd_init ()"
+SCANGOBJ_OPTIONS= --nogtkinit --type-init-func="ccss_init ()"
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS=
@@ -22,8 +22,8 @@
FIXXREF_OPTIONS=
# Used for dependencies
-HFILE_GLOB=$(top_srcdir)/libccd/ccd/*.h
-CFILE_GLOB=$(top_srcdir)/libccd/ccd/*.c
+HFILE_GLOB=$(top_srcdir)/libccss/ccss/*.h
+CFILE_GLOB=$(top_srcdir)/libccss/ccss/*.c
# Header files to ignore when scanning
IGNORE_HFILES =
@@ -41,12 +41,12 @@
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
-GTKDOC_CFLAGS = # -I$(top_srcdir) $(CCD_CFLAGS)
-GTKDOC_LIBS = # $(top_builddir)/libccd/ccd/libccd.la $(CCD_LIBS)
+GTKDOC_CFLAGS = # -I$(top_srcdir) $(CCSS_CFLAGS)
+GTKDOC_LIBS = # $(top_builddir)/libccss/ccss/libccss.la $(CCSS_LIBS)
if GTK_DOC_INSTALLED
include $(top_srcdir)/gtk-doc.make
-CLEANFILES += ccd-scan.*
+CLEANFILES += ccss-scan.*
.PHONY : dist-hook-local
endif
Copied: trunk/libccss/doc/ccss-docs.sgml (from r132, /trunk/libccd/doc/ccd-docs.sgml)
==============================================================================
--- /trunk/libccd/doc/ccd-docs.sgml (original)
+++ trunk/libccss/doc/ccss-docs.sgml Mon Sep 29 09:51:02 2008
@@ -2,25 +2,25 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-<!ENTITY ccd SYSTEM "xml/ccd.xml">
-<!ENTITY ccd_node_t SYSTEM "xml/node.xml">
-<!ENTITY ccd_style_t SYSTEM "xml/style.xml">
-<!ENTITY ccd_stylesheet_t SYSTEM "xml/stylesheet.xml">
-<!ENTITY ccd_selector_group_t SYSTEM "xml/selector_group.xml">
+<!ENTITY ccss SYSTEM "xml/ccss.xml">
+<!ENTITY ccss_node_t SYSTEM "xml/node.xml">
+<!ENTITY ccss_style_t SYSTEM "xml/style.xml">
+<!ENTITY ccss_stylesheet_t SYSTEM "xml/stylesheet.xml">
+<!ENTITY ccss_selector_group_t SYSTEM "xml/selector_group.xml">
-<!ENTITY ccd_gtk_style_functions SYSTEM "xml/ccd_gtk_style_functions.xml">
+<!ENTITY ccss_gtk_style_functions SYSTEM "xml/ccss_gtk_style_functions.xml">
<!ENTITY TreeIndex SYSTEM "xml/tree_index.sgml">
]>
<book id="index">
<bookinfo>
- <title>CCD Reference Manual</title>
+ <title>CCSS Reference Manual</title>
</bookinfo>
<part id="intro">
- <title>CCD: Introduction</title>
- <partintro id="ccd-into">
+ <title>CCSS: Introduction</title>
+ <partintro id="ccss-into">
<para>
TODO
</para>
@@ -28,9 +28,9 @@
</part>
<part id="dependencies">
- <title>CCD: Dependencies</title>
+ <title>CCSS: Dependencies</title>
<para>
-CCD depends on the following libraries:
+CCSS depends on the following libraries:
<variablelist>
<varlistentry>
@@ -71,11 +71,11 @@
</para>
</part>
-<part id="ccd-users">
- <title>Projects using CCD</title>
- <partintro id="ccd-projects">
+<part id="ccss-users">
+ <title>Projects using CCSS</title>
+ <partintro id="ccss-projects">
<para>
-CCD is used by
+CCSS is used by
<variablelist>
<varlistentry>
<term><ulink url="http://www.gnome.org/~robsta/gtk-css-engine/">Gtk CSS Engine</ulink></term>
@@ -92,25 +92,25 @@
<part id="api">
<title>API Reference</title>
- <partintro id="ccd-api-ref">
+ <partintro id="ccss-api-ref">
<para>
TODO.
</para>
</partintro>
<chapter id="basic">
<title>Basic Usage</title>
- &ccd;
- &ccd_stylesheet_t;
- &ccd_selector_group_t;
- &ccd_style_t;
- &ccd_node_t;
+ &ccss;
+ &ccss_stylesheet_t;
+ &ccss_selector_group_t;
+ &ccss_style_t;
+ &ccss_node_t;
</chapter>
<chapter id="gtk-support">
<title>Gtk+ Support</title>
- &ccd_gtk_style_functions;
+ &ccss_gtk_style_functions;
</chapter>
</part>
-<index id="ccd-index">
+<index id="ccss-index">
&TreeIndex;
</index>
</book>
Copied: trunk/libccss/doc/ccss-sections.txt (from r132, /trunk/libccd/doc/ccd-sections.txt)
==============================================================================
--- /trunk/libccd/doc/ccd-sections.txt (original)
+++ trunk/libccss/doc/ccss-sections.txt Mon Sep 29 09:51:02 2008
@@ -1,67 +1,67 @@
<SECTION>
<SECTION>
<TITLE>Initialization</TITLE>
-<FILE>ccd</FILE>
-ccd_init
-ccd_shutdown
+<FILE>ccss</FILE>
+ccss_init
+ccss_shutdown
</SECTION>
-<TITLE>ccd_node_t</TITLE>
+<TITLE>ccss_node_t</TITLE>
<FILE>node</FILE>
-ccd_node_t
-ccd_node_class_t
-ccd_node_get_container_f
-ccd_node_get_base_style_f
-ccd_node_get_id_f
-ccd_node_get_type_f
-ccd_node_get_class_f
-ccd_node_get_pseudo_class_f
-ccd_node_get_attribute_f
-ccd_node_release_f
+ccss_node_t
+ccss_node_class_t
+ccss_node_get_container_f
+ccss_node_get_base_style_f
+ccss_node_get_id_f
+ccss_node_get_type_f
+ccss_node_get_class_f
+ccss_node_get_pseudo_class_f
+ccss_node_get_attribute_f
+ccss_node_release_f
</SECTION>
<SECTION>
-<TITLE>ccd_style_t</TITLE>
+<TITLE>ccss_style_t</TITLE>
<FILE>style</FILE>
-ccd_style_t
-ccd_style_init
-ccd_style_draw_line
-ccd_style_draw_outline
-ccd_style_draw_rectangle
-ccd_style_dump
+ccss_style_t
+ccss_style_init
+ccss_style_draw_line
+ccss_style_draw_outline
+ccss_style_draw_rectangle
+ccss_style_dump
</SECTION>
<SECTION>
-<TITLE>ccd_stylesheet_t</TITLE>
+<TITLE>ccss_stylesheet_t</TITLE>
<FILE>stylesheet</FILE>
-ccd_stylesheet_t
-ccd_stylesheet_new_from_buffer
-ccd_stylesheet_new_from_file
-ccd_stylesheet_free
-ccd_stylesheet_query_type
-ccd_stylesheet_query_collect
-ccd_stylesheet_query_apply
-ccd_stylesheet_dump
-ccd_stylesheet_iter_t
-ccd_stylesheet_iter_init
-ccd_stylesheet_iter_next
+ccss_stylesheet_t
+ccss_stylesheet_new_from_buffer
+ccss_stylesheet_new_from_file
+ccss_stylesheet_free
+ccss_stylesheet_query_type
+ccss_stylesheet_query_collect
+ccss_stylesheet_query_apply
+ccss_stylesheet_dump
+ccss_stylesheet_iter_t
+ccss_stylesheet_iter_init
+ccss_stylesheet_iter_next
</SECTION>
<SECTION>
-<TITLE>ccd_selector_group_t</TITLE>
+<TITLE>ccss_selector_group_t</TITLE>
<FILE>selector_group</FILE>
-ccd_selector_group_t
-ccd_selector_group_new
-ccd_selector_group_free
-ccd_selector_group_apply
-ccd_selector_group_apply_type
-ccd_selector_group_dump
+ccss_selector_group_t
+ccss_selector_group_new
+ccss_selector_group_free
+ccss_selector_group_apply
+ccss_selector_group_apply_type
+ccss_selector_group_dump
</SECTION>
<SECTION>
-<TITLE>ccd_style_t Gtk+ Support</TITLE>
-<FILE>ccd_gtk_style_functions</FILE>
-ccd_style_draw_gap
-ccd_style_draw_polygon
+<TITLE>ccss_style_t Gtk+ Support</TITLE>
+<FILE>ccss_gtk_style_functions</FILE>
+ccss_style_draw_gap
+ccss_style_draw_polygon
</SECTION>
Copied: trunk/libccss/doc/tmpl/ccss-unused.sgml (from r132, /trunk/libccd/doc/tmpl/ccd-unused.sgml)
==============================================================================
Copied: trunk/libccss/doc/tmpl/ccss.sgml (from r132, /trunk/libccd/doc/tmpl/ccd.sgml)
==============================================================================
--- /trunk/libccd/doc/tmpl/ccd.sgml (original)
+++ trunk/libccss/doc/tmpl/ccss.sgml Mon Sep 29 09:51:02 2008
@@ -17,7 +17,7 @@
<!-- ##### SECTION Stability_Level ##### -->
-<!-- ##### FUNCTION ccd_init ##### -->
+<!-- ##### FUNCTION ccss_init ##### -->
<para>
</para>
@@ -26,7 +26,7 @@
@vtable:
-<!-- ##### FUNCTION ccd_shutdown ##### -->
+<!-- ##### FUNCTION ccss_shutdown ##### -->
<para>
</para>
Copied: trunk/libccss/doc/tmpl/ccss_gtk_style_functions.sgml (from r132, /trunk/libccd/doc/tmpl/ccd_gtk_style_functions.sgml)
==============================================================================
--- /trunk/libccd/doc/tmpl/ccd_gtk_style_functions.sgml (original)
+++ trunk/libccss/doc/tmpl/ccss_gtk_style_functions.sgml Mon Sep 29 09:51:02 2008
@@ -1,5 +1,5 @@
<!-- ##### SECTION Title ##### -->
-ccd_style_t Gtk+ Support
+ccss_style_t Gtk+ Support
<!-- ##### SECTION Short_Description ##### -->
@@ -17,7 +17,7 @@
<!-- ##### SECTION Stability_Level ##### -->
-<!-- ##### FUNCTION ccd_style_draw_gap ##### -->
+<!-- ##### FUNCTION ccss_style_draw_gap ##### -->
<para>
</para>
@@ -33,7 +33,7 @@
@gap_width:
-<!-- ##### FUNCTION ccd_style_draw_polygon ##### -->
+<!-- ##### FUNCTION ccss_style_draw_polygon ##### -->
<para>
</para>
Modified: trunk/libccss/doc/tmpl/node.sgml
==============================================================================
--- /trunk/libccd/doc/tmpl/node.sgml (original)
+++ trunk/libccss/doc/tmpl/node.sgml Mon Sep 29 09:51:02 2008
@@ -1,5 +1,5 @@
<!-- ##### SECTION Title ##### -->
-ccd_node_t
+ccss_node_t
<!-- ##### SECTION Short_Description ##### -->
@@ -17,7 +17,7 @@
<!-- ##### SECTION Stability_Level ##### -->
-<!-- ##### FUNCTION ccd_init ##### -->
+<!-- ##### FUNCTION ccss_init ##### -->
<para>
</para>
@@ -26,20 +26,20 @@
@vtable:
-<!-- ##### FUNCTION ccd_shutdown ##### -->
+<!-- ##### FUNCTION ccss_shutdown ##### -->
<para>
</para>
-<!-- ##### TYPEDEF ccd_node_t ##### -->
+<!-- ##### TYPEDEF ccss_node_t ##### -->
<para>
</para>
-<!-- ##### STRUCT ccd_node_class_t ##### -->
+<!-- ##### STRUCT ccss_node_class_t ##### -->
<para>
</para>
@@ -54,7 +54,7 @@
@get_attribute:
@release:
-<!-- ##### USER_FUNCTION ccd_node_get_container_f ##### -->
+<!-- ##### USER_FUNCTION ccss_node_get_container_f ##### -->
<para>
</para>
@@ -63,7 +63,7 @@
@Returns:
-<!-- ##### USER_FUNCTION ccd_node_get_base_style_f ##### -->
+<!-- ##### USER_FUNCTION ccss_node_get_base_style_f ##### -->
<para>
</para>
@@ -72,7 +72,7 @@
@Returns:
-<!-- ##### USER_FUNCTION ccd_node_get_id_f ##### -->
+<!-- ##### USER_FUNCTION ccss_node_get_id_f ##### -->
<para>
</para>
@@ -81,7 +81,7 @@
@Returns:
-<!-- ##### USER_FUNCTION ccd_node_get_type_f ##### -->
+<!-- ##### USER_FUNCTION ccss_node_get_type_f ##### -->
<para>
</para>
@@ -90,7 +90,7 @@
@Returns:
-<!-- ##### USER_FUNCTION ccd_node_get_class_f ##### -->
+<!-- ##### USER_FUNCTION ccss_node_get_class_f ##### -->
<para>
</para>
@@ -99,7 +99,7 @@
@Returns:
-<!-- ##### USER_FUNCTION ccd_node_get_pseudo_class_f ##### -->
+<!-- ##### USER_FUNCTION ccss_node_get_pseudo_class_f ##### -->
<para>
</para>
@@ -108,7 +108,7 @@
@Returns:
-<!-- ##### USER_FUNCTION ccd_node_get_attribute_f ##### -->
+<!-- ##### USER_FUNCTION ccss_node_get_attribute_f ##### -->
<para>
</para>
@@ -118,7 +118,7 @@
@Returns:
-<!-- ##### USER_FUNCTION ccd_node_release_f ##### -->
+<!-- ##### USER_FUNCTION ccss_node_release_f ##### -->
<para>
</para>
Modified: trunk/libccss/doc/tmpl/selector_group.sgml
==============================================================================
--- /trunk/libccd/doc/tmpl/selector_group.sgml (original)
+++ trunk/libccss/doc/tmpl/selector_group.sgml Mon Sep 29 09:51:02 2008
@@ -1,5 +1,5 @@
<!-- ##### SECTION Title ##### -->
-ccd_selector_group_t
+ccss_selector_group_t
<!-- ##### SECTION Short_Description ##### -->
@@ -17,13 +17,13 @@
<!-- ##### SECTION Stability_Level ##### -->
-<!-- ##### TYPEDEF ccd_selector_group_t ##### -->
+<!-- ##### TYPEDEF ccss_selector_group_t ##### -->
<para>
</para>
-<!-- ##### FUNCTION ccd_selector_group_new ##### -->
+<!-- ##### FUNCTION ccss_selector_group_new ##### -->
<para>
</para>
@@ -31,7 +31,7 @@
@Returns:
-<!-- ##### FUNCTION ccd_selector_group_free ##### -->
+<!-- ##### FUNCTION ccss_selector_group_free ##### -->
<para>
</para>
@@ -39,7 +39,7 @@
@self:
-<!-- ##### FUNCTION ccd_selector_group_apply ##### -->
+<!-- ##### FUNCTION ccss_selector_group_apply ##### -->
<para>
</para>
@@ -49,7 +49,7 @@
@Returns:
-<!-- ##### FUNCTION ccd_selector_group_apply_type ##### -->
+<!-- ##### FUNCTION ccss_selector_group_apply_type ##### -->
<para>
</para>
@@ -60,7 +60,7 @@
@Returns:
-<!-- ##### FUNCTION ccd_selector_group_dump ##### -->
+<!-- ##### FUNCTION ccss_selector_group_dump ##### -->
<para>
</para>
Modified: trunk/libccss/doc/tmpl/style.sgml
==============================================================================
--- /trunk/libccd/doc/tmpl/style.sgml (original)
+++ trunk/libccss/doc/tmpl/style.sgml Mon Sep 29 09:51:02 2008
@@ -1,5 +1,5 @@
<!-- ##### SECTION Title ##### -->
-ccd_style_t
+ccss_style_t
<!-- ##### SECTION Short_Description ##### -->
@@ -17,13 +17,13 @@
<!-- ##### SECTION Stability_Level ##### -->
-<!-- ##### STRUCT ccd_style_t ##### -->
+<!-- ##### STRUCT ccss_style_t ##### -->
<para>
</para>
-<!-- ##### FUNCTION ccd_style_init ##### -->
+<!-- ##### FUNCTION ccss_style_init ##### -->
<para>
</para>
@@ -31,7 +31,7 @@
@self:
-<!-- ##### FUNCTION ccd_style_draw_line ##### -->
+<!-- ##### FUNCTION ccss_style_draw_line ##### -->
<para>
</para>
@@ -44,7 +44,7 @@
@y2:
-<!-- ##### FUNCTION ccd_style_draw_outline ##### -->
+<!-- ##### FUNCTION ccss_style_draw_outline ##### -->
<para>
</para>
@@ -57,7 +57,7 @@
@height:
-<!-- ##### FUNCTION ccd_style_draw_rectangle ##### -->
+<!-- ##### FUNCTION ccss_style_draw_rectangle ##### -->
<para>
</para>
@@ -70,7 +70,7 @@
@height:
-<!-- ##### FUNCTION ccd_style_dump ##### -->
+<!-- ##### FUNCTION ccss_style_dump ##### -->
<para>
</para>
Modified: trunk/libccss/doc/tmpl/stylesheet.sgml
==============================================================================
--- /trunk/libccd/doc/tmpl/stylesheet.sgml (original)
+++ trunk/libccss/doc/tmpl/stylesheet.sgml Mon Sep 29 09:51:02 2008
@@ -1,5 +1,5 @@
<!-- ##### SECTION Title ##### -->
-ccd_stylesheet_t
+ccss_stylesheet_t
<!-- ##### SECTION Short_Description ##### -->
@@ -17,13 +17,13 @@
<!-- ##### SECTION Stability_Level ##### -->
-<!-- ##### TYPEDEF ccd_stylesheet_t ##### -->
+<!-- ##### TYPEDEF ccss_stylesheet_t ##### -->
<para>
</para>
-<!-- ##### FUNCTION ccd_stylesheet_new_from_buffer ##### -->
+<!-- ##### FUNCTION ccss_stylesheet_new_from_buffer ##### -->
<para>
</para>
@@ -33,7 +33,7 @@
@Returns:
-<!-- ##### FUNCTION ccd_stylesheet_new_from_file ##### -->
+<!-- ##### FUNCTION ccss_stylesheet_new_from_file ##### -->
<para>
</para>
@@ -42,7 +42,7 @@
@Returns:
-<!-- ##### FUNCTION ccd_stylesheet_free ##### -->
+<!-- ##### FUNCTION ccss_stylesheet_free ##### -->
<para>
</para>
@@ -50,7 +50,7 @@
@self:
-<!-- ##### FUNCTION ccd_stylesheet_query_type ##### -->
+<!-- ##### FUNCTION ccss_stylesheet_query_type ##### -->
<para>
</para>
@@ -60,7 +60,7 @@
@Returns:
-<!-- ##### FUNCTION ccd_stylesheet_query_collect ##### -->
+<!-- ##### FUNCTION ccss_stylesheet_query_collect ##### -->
<para>
</para>
@@ -72,7 +72,7 @@
@Returns:
-<!-- ##### FUNCTION ccd_stylesheet_query_apply ##### -->
+<!-- ##### FUNCTION ccss_stylesheet_query_apply ##### -->
<para>
</para>
@@ -83,7 +83,7 @@
@Returns:
-<!-- ##### FUNCTION ccd_stylesheet_dump ##### -->
+<!-- ##### FUNCTION ccss_stylesheet_dump ##### -->
<para>
</para>
@@ -91,13 +91,13 @@
@self:
-<!-- ##### TYPEDEF ccd_stylesheet_iter_t ##### -->
+<!-- ##### TYPEDEF ccss_stylesheet_iter_t ##### -->
<para>
</para>
-<!-- ##### FUNCTION ccd_stylesheet_iter_init ##### -->
+<!-- ##### FUNCTION ccss_stylesheet_iter_init ##### -->
<para>
</para>
@@ -106,7 +106,7 @@
@stylesheet:
-<!-- ##### FUNCTION ccd_stylesheet_iter_next ##### -->
+<!-- ##### FUNCTION ccss_stylesheet_iter_next ##### -->
<para>
</para>
Modified: trunk/libccss/examples/Makefile.am
==============================================================================
--- /trunk/libccd/examples/Makefile.am (original)
+++ trunk/libccss/examples/Makefile.am Mon Sep 29 09:51:02 2008
@@ -1,20 +1,20 @@
AM_CPPFLAGS = \
- $(CCD_CFLAGS) \
- -I$(top_srcdir)/libccd \
- -I$(top_builddir)/libccd
+ $(CCSS_CFLAGS) \
+ -I$(top_srcdir)/libccss \
+ -I$(top_builddir)/libccss
AM_LDFLAGS = \
- $(CCD_LIBS) \
- ../ccd/libccd-1.la
+ $(CCSS_LIBS) \
+ ../ccss/libccss-1.la
noinst_PROGRAMS = example1
example1_SOURCES = example1.c
-# The `internal' example can't link against the libccd so, because
+# The `internal' example can't link against the libccss so, because
# it relies on internal API.
-if CCD_STANDALONE
+if CCSS_STANDALONE
else
noinst_PROGRAMS += internal
internal_SOURCES = internal.c
Modified: trunk/libccss/examples/example1.c
==============================================================================
--- /trunk/libccd/examples/example1.c (original)
+++ trunk/libccss/examples/example1.c Mon Sep 29 09:51:02 2008
@@ -1,19 +1,19 @@
#include <stdlib.h>
#include <cairo.h>
-#include <ccd/ccd.h>
+#include <ccss/ccss.h>
#include <gtk/gtk.h>
static gboolean
expose_cb (GtkWidget *widget,
GdkEventExpose *event,
- ccd_style_t const *style)
+ ccss_style_t const *style)
{
cairo_t *cr;
cr = gdk_cairo_create (widget->window);
- ccd_style_draw_rectangle (style, cr,
+ ccss_style_draw_rectangle (style, cr,
widget->allocation.x + 10,
widget->allocation.y + 10,
widget->allocation.width - 20,
@@ -36,21 +36,21 @@
main (int argc,
char **argv)
{
- ccd_stylesheet_t *stylesheet;
- ccd_selector_group_t const *group;
- ccd_style_t style;
+ ccss_stylesheet_t *stylesheet;
+ ccss_selector_group_t const *group;
+ ccss_style_t style;
GtkWidget *window;
gtk_init (&argc, &argv);
- /* stylesheet = ccd_stylesheet_new_from_buffer (_css, sizeof (_css)); */
- stylesheet = ccd_stylesheet_new_from_file ("example1.css");
+ /* stylesheet = ccss_stylesheet_new_from_buffer (_css, sizeof (_css)); */
+ stylesheet = ccss_stylesheet_new_from_file ("example1.css");
- group = ccd_stylesheet_query_type (stylesheet, "box");
+ group = ccss_stylesheet_query_type (stylesheet, "box");
g_assert (group);
- ccd_style_init (&style);
- ccd_selector_group_apply_type (group, "box", &style);
+ ccss_style_init (&style);
+ ccss_selector_group_apply_type (group, "box", &style);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), 160, 90);
@@ -63,7 +63,7 @@
gtk_widget_show_all (window);
gtk_main ();
- ccd_stylesheet_free (stylesheet);
+ ccss_stylesheet_free (stylesheet);
return EXIT_SUCCESS;
}
Modified: trunk/libccss/examples/internal.c
==============================================================================
--- /trunk/libccd/examples/internal.c (original)
+++ trunk/libccss/examples/internal.c Mon Sep 29 09:51:02 2008
@@ -4,7 +4,7 @@
*/
#include <gtk/gtk.h>
-#include <ccd/ccd.h>
+#include <ccss/ccss.h>
static void
draw_decorations (GtkAllocation *allocation,
@@ -50,18 +50,18 @@
double width,
double height)
{
- ccd_border_t border = {
- .left.width = 3, .left.style = CCD_BORDER_STYLE_SOLID, .left.color.red = 0, .left.color.green = 0, .left.color.blue = 0,
- .top.width = 10, .top.style = CCD_BORDER_STYLE_DOTTED, .top.color.red = 1, .top.color.green = 0, .top.color.blue = 0,
- .right.width = 1, .right.style = CCD_BORDER_STYLE_DASHED, .right.color.red = 0, .right.color.green = 0, .right.color.blue = 0,
- .bottom.width = 3, .bottom.style = CCD_BORDER_STYLE_SOLID, .bottom.color.red = 0, .bottom.color.green = 0, .bottom.color.blue = 0
+ ccss_border_t border = {
+ .left.width = 3, .left.style = CCSS_BORDER_STYLE_SOLID, .left.color.red = 0, .left.color.green = 0, .left.color.blue = 0,
+ .top.width = 10, .top.style = CCSS_BORDER_STYLE_DOTTED, .top.color.red = 1, .top.color.green = 0, .top.color.blue = 0,
+ .right.width = 1, .right.style = CCSS_BORDER_STYLE_DASHED, .right.color.red = 0, .right.color.green = 0, .right.color.blue = 0,
+ .bottom.width = 3, .bottom.style = CCSS_BORDER_STYLE_SOLID, .bottom.color.red = 0, .bottom.color.green = 0, .bottom.color.blue = 0
};
- ccd_border_draw (&border.left, NULL,
+ ccss_border_draw (&border.left, NULL,
&border.top, NULL,
&border.right, NULL,
&border.bottom, NULL,
- CCD_BORDER_VISIBILITY_SHOW_ALL,
+ CCSS_BORDER_VISIBILITY_SHOW_ALL,
cr, x, y, width, height);
}
Copied: trunk/libccss/libccss-1.pc.in (from r132, /trunk/libccd/libccd-1.pc.in)
==============================================================================
--- /trunk/libccd/libccd-1.pc.in (original)
+++ trunk/libccss/libccss-1.pc.in Mon Sep 29 09:51:02 2008
@@ -6,7 +6,7 @@
Name: libgsf-1
Description: The Cairo CSS Box Drawing Library
Version: @VERSION@
-Requires: @CCD_DEPS@
-Libs: -L${libdir} -lccd-1
-Cflags: -I${includedir}/libccd-1
+Requires: @CCSS_DEPS@
+Libs: -L${libdir} -lccss-1
+Cflags: -I${includedir}/libccss-1
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Mon Sep 29 09:51:02 2008
@@ -4,8 +4,8 @@
_cppflags = \
$(GCE_CFLAGS) \
- -I$(top_srcdir)/libccd \
- -I$(top_builddir)/libccd
+ -I$(top_srcdir)/libccss \
+ -I$(top_builddir)/libccss
enginedir = $(libdir)/gtk-2.0/$(GTK_VERSION)/engines
@@ -21,7 +21,7 @@
libcss_la_LIBADD = \
$(GCE_LIBS) \
- ./../libccd/ccd/libccd-1.la
+ ./../libccss/ccss/libccss-1.la
libcss_la_SOURCES = \
gce-functions.c \
@@ -49,7 +49,7 @@
css2gtkrc_LDADD = \
$(GCE_LIBS) \
- ./../libccd/ccd/libccd-1.la
+ ./../libccss/ccss/libccss-1.la
EXTRA_DIST = \
exports.sym
Modified: trunk/src/css2gtkrc.c
==============================================================================
--- trunk/src/css2gtkrc.c (original)
+++ trunk/src/css2gtkrc.c Mon Sep 29 09:51:02 2008
@@ -17,7 +17,7 @@
* MA 02110-1301, USA.
*/
-#include <ccd/ccd.h>
+#include <ccss/ccss.h>
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
@@ -27,7 +27,7 @@
main (int argc,
char **argv)
{
- ccd_stylesheet_t *stylesheet;
+ ccss_stylesheet_t *stylesheet;
char *gtkrc;
if (argc <= 1) {
@@ -35,11 +35,11 @@
return EXIT_FAILURE;
}
- stylesheet = ccd_stylesheet_new_from_file (argv[1]);
+ stylesheet = ccss_stylesheet_new_from_file (argv[1]);
g_assert (stylesheet);
gtkrc = gce_serialize (stylesheet);
- ccd_stylesheet_free (stylesheet), stylesheet = NULL;
+ ccss_stylesheet_free (stylesheet), stylesheet = NULL;
if (NULL == gtkrc) {
fprintf (stderr, "Conversion failed.\n");
Modified: trunk/src/gce-functions.c
==============================================================================
--- trunk/src/gce-functions.c (original)
+++ trunk/src/gce-functions.c Mon Sep 29 09:51:02 2008
@@ -17,10 +17,10 @@
* MA 02110-1301, USA.
*/
-#include <ccd/ccd.h>
+#include <ccss/ccss.h>
-/* Need the ccd include above for the feature defs. */
-#ifdef CCD_WITH_SOUP
+/* Need the ccss include above for the feature defs. */
+#ifdef CCSS_WITH_SOUP
#include <libsoup/soup.h>
#endif
@@ -35,7 +35,7 @@
char *given_path;
char *resolved_path;
char *ret;
-#ifdef CCD_WITH_SOUP
+#ifdef CCSS_WITH_SOUP
SoupURI *uri;
g_return_val_if_fail (args, NULL);
@@ -61,13 +61,13 @@
return ret;
}
-static ccd_function_t const _functions[] =
+static ccss_function_t const _functions[] =
{
{ "url", url },
{ NULL }
};
-ccd_function_t const *
+ccss_function_t const *
gce_functions_get_vtable (void)
{
return _functions;
Modified: trunk/src/gce-functions.h
==============================================================================
--- trunk/src/gce-functions.h (original)
+++ trunk/src/gce-functions.h Mon Sep 29 09:51:02 2008
@@ -20,12 +20,12 @@
#ifndef GCE_FUNCTIONS_H
#define GCE_FUNCTIONS_H
-#include <ccd/ccd.h>
+#include <ccss/ccss.h>
#include <glib.h>
G_BEGIN_DECLS
-ccd_function_t const * gce_functions_get_vtable (void);
+ccss_function_t const * gce_functions_get_vtable (void);
G_END_DECLS
Modified: trunk/src/gce-node.c
==============================================================================
--- trunk/src/gce-node.c (original)
+++ trunk/src/gce-node.c Mon Sep 29 09:51:02 2008
@@ -24,7 +24,7 @@
* TODO: split into load- and run-time variants?
*/
struct GceNode_ {
- ccd_node_t parent;
+ ccss_node_t parent;
GtkWidget *widget;
/* custom attributes { */
char const *class_name;
@@ -321,7 +321,7 @@
return g_strdup_printf ("%ld", g_value_get_long (value));
case G_TYPE_ULONG:
return g_strdup_printf ("%ld", g_value_get_ulong (value));
-/* Not supported by C99. TODO: enable after splitting out libccd.
+/* Not supported by C99. TODO: enable after splitting out libccss.
case G_TYPE_INT64:
return g_strdup_printf ("%Ld", g_value_get_int64 (value));
case G_TYPE_UINT64:
@@ -401,19 +401,19 @@
gce_node_cache_release_node (node);
}
-static const ccd_node_class_t const _node_class = {
- .is_a = (ccd_node_is_a_f) is_a,
- .get_container = (ccd_node_get_container_f) get_container,
- .get_base_style = (ccd_node_get_base_style_f) get_base_style,
- .get_id = (ccd_node_get_id_f) get_id,
- .get_type = (ccd_node_get_type_f) get_type,
- .get_class = (ccd_node_get_class_f) get_class,
- .get_pseudo_class = (ccd_node_get_pseudo_class_f) get_pseudo_class,
- .get_attribute = (ccd_node_get_attribute_f) get_attribute,
- .release = (ccd_node_release_f) release
+static const ccss_node_class_t const _node_class = {
+ .is_a = (ccss_node_is_a_f) is_a,
+ .get_container = (ccss_node_get_container_f) get_container,
+ .get_base_style = (ccss_node_get_base_style_f) get_base_style,
+ .get_id = (ccss_node_get_id_f) get_id,
+ .get_type = (ccss_node_get_type_f) get_type,
+ .get_class = (ccss_node_get_class_f) get_class,
+ .get_pseudo_class = (ccss_node_get_pseudo_class_f) get_pseudo_class,
+ .get_attribute = (ccss_node_get_attribute_f) get_attribute,
+ .release = (ccss_node_release_f) release
};
-ccd_node_class_t const *
+ccss_node_class_t const *
gce_node_get_class (void)
{
return &_node_class;
Modified: trunk/src/gce-node.h
==============================================================================
--- trunk/src/gce-node.h (original)
+++ trunk/src/gce-node.h Mon Sep 29 09:51:02 2008
@@ -20,7 +20,7 @@
#ifndef GCE_NODE_H
#define GCE_NODE_H
-#include <ccd/ccd.h>
+#include <ccss/ccss.h>
#include <glib.h>
#include <gtk/gtk.h>
@@ -50,7 +50,7 @@
GceNode * gce_node_cache_get_top_node (void);
void gce_node_cache_release_node (GceNode *node);
-ccd_node_class_t const * gce_node_get_class (void);
+ccss_node_class_t const * gce_node_get_class (void);
GtkWidget * gce_node_get_widget (const GceNode *node);
char const * gce_node_get_primitive (const GceNode *node);
Modified: trunk/src/gce-rc-style.c
==============================================================================
--- trunk/src/gce-rc-style.c (original)
+++ trunk/src/gce-rc-style.c Mon Sep 29 09:51:02 2008
@@ -23,10 +23,10 @@
#include "gce-serialize.h"
#include "gce-style.h"
-static ccd_stylesheet_t *_stylesheet = NULL;
+static ccss_stylesheet_t *_stylesheet = NULL;
gpointer *_stylesheet_owner = NULL;
-ccd_stylesheet_t const *
+ccss_stylesheet_t const *
gce_rc_style_get_stylesheet (void)
{
return _stylesheet;
@@ -83,10 +83,10 @@
g_assert (_stylesheet == NULL);
gce_file = gtk_rc_find_pixmap_in_path (gtk_settings_get_default (),
scanner, scanner->value.v_string);
- _stylesheet = ccd_stylesheet_new_from_file (gce_file);
+ _stylesheet = ccss_stylesheet_new_from_file (gce_file);
rc_string = gce_serialize (_stylesheet);
#ifdef DEBUG
- ccd_stylesheet_dump (_stylesheet);
+ ccss_stylesheet_dump (_stylesheet);
fprintf (stderr, "%s\n\n", rc_string);
#endif
if (rc_string) {
@@ -120,7 +120,7 @@
*/
if (_stylesheet_owner == (gpointer) instance) {
- ccd_stylesheet_free (_stylesheet);
+ ccss_stylesheet_free (_stylesheet);
}
G_OBJECT_CLASS (gce_rc_style_parent_class)->finalize (instance);
Modified: trunk/src/gce-rc-style.h
==============================================================================
--- trunk/src/gce-rc-style.h (original)
+++ trunk/src/gce-rc-style.h Mon Sep 29 09:51:02 2008
@@ -20,7 +20,7 @@
#ifndef GCE_RC_STYLE_H
#define GCE_RC_STYLE_H
-#include <ccd/ccd.h>
+#include <ccss/ccss.h>
#include <glib.h>
#include <glib-object.h>
@@ -39,7 +39,7 @@
void gce_rc_style_register_type (GTypeModule *module);
GType gce_rc_style_get_type (void) G_GNUC_CONST;
-ccd_stylesheet_t const * gce_rc_style_get_stylesheet (void);
+ccss_stylesheet_t const * gce_rc_style_get_stylesheet (void);
G_END_DECLS
Modified: trunk/src/gce-serialize.c
==============================================================================
--- trunk/src/gce-serialize.c (original)
+++ trunk/src/gce-serialize.c Mon Sep 29 09:51:02 2008
@@ -26,7 +26,7 @@
*/
typedef struct {
- ccd_node_t parent;
+ ccss_node_t parent;
char const *type_name;
char const *id;
char const *pseudo_class;
@@ -57,14 +57,14 @@
return self->pseudo_class;
}
-static const ccd_node_class_t const _node_class = {
- .is_a = (ccd_node_is_a_f) is_a,
+static const ccss_node_class_t const _node_class = {
+ .is_a = (ccss_node_is_a_f) is_a,
.get_container = NULL,
.get_base_style = NULL,
- .get_id = (ccd_node_get_id_f) get_id,
- .get_type = (ccd_node_get_type_f) get_type,
+ .get_id = (ccss_node_get_id_f) get_id,
+ .get_type = (ccss_node_get_type_f) get_type,
.get_class = NULL,
- .get_pseudo_class = (ccd_node_get_pseudo_class_f) get_pseudo_class,
+ .get_pseudo_class = (ccss_node_get_pseudo_class_f) get_pseudo_class,
.get_attribute = NULL,
.release = NULL
};
@@ -102,32 +102,32 @@
};
static gboolean
-accumulate_state (ccd_stylesheet_t const *stylesheet,
+accumulate_state (ccss_stylesheet_t const *stylesheet,
char const *type_name,
char const *state_name,
struct RcState *state)
{
- ccd_style_t style;
+ ccss_style_t style;
Node node;
gboolean ret;
- ccd_style_init (&style);
+ ccss_style_init (&style);
node.type_name = type_name;
node.id = NULL;
node.pseudo_class = state_name;
- ret = ccd_stylesheet_query_apply (stylesheet,
- (ccd_node_t const *) &node, &style);
+ ret = ccss_stylesheet_query_apply (stylesheet,
+ (ccss_node_t const *) &node, &style);
if (!ret) {
return false;
}
- ret = ccd_style_get_color (&style, &state->fg[RED], &state->fg[GREEN], &state->fg[BLUE]);
+ ret = ccss_style_get_color (&style, &state->fg[RED], &state->fg[GREEN], &state->fg[BLUE]);
if (ret) {
state->flags |= FG_SET;
}
- ret = ccd_style_get_background_color (&style, &state->bg[RED], &state->bg[GREEN], &state->bg[BLUE]);
+ ret = ccss_style_get_background_color (&style, &state->bg[RED], &state->bg[GREEN], &state->bg[BLUE]);
if (ret) {
state->flags |= BG_SET;
/* FIXME: also setting "base" to the background color, let's see how this works out. */
@@ -141,7 +141,7 @@
}
static gboolean
-accumulate (ccd_stylesheet_t const *stylesheet,
+accumulate (ccss_stylesheet_t const *stylesheet,
struct RcBlock *block)
{
gboolean ret;
@@ -255,27 +255,27 @@
}
char *
-gce_serialize (ccd_stylesheet_t const *stylesheet)
+gce_serialize (ccss_stylesheet_t const *stylesheet)
{
- ccd_stylesheet_iter_t iter;
- ccd_node_class_t original_node_class;
+ ccss_stylesheet_iter_t iter;
+ ccss_node_class_t original_node_class;
char const *type_name;
- ccd_selector_group_t const *group;
+ ccss_selector_group_t const *group;
struct RcBlock block;
GString *rc_string;
char *str;
gboolean ret;
- ccd_node_fill_class (&original_node_class);
- ccd_node_set_class (&_node_class);
+ ccss_node_fill_class (&original_node_class);
+ ccss_node_set_class (&_node_class);
rc_string = g_string_new ("");
- ccd_stylesheet_iter_init (&iter, stylesheet);
+ ccss_stylesheet_iter_init (&iter, stylesheet);
type_name = NULL;
group = NULL;
- while (ccd_stylesheet_iter_next (&iter, &type_name, &group)) {
+ while (ccss_stylesheet_iter_next (&iter, &type_name, &group)) {
/* Only feed widget styles back into gtk, not primitives. */
if (strcmp ("*", type_name) != 0 &&
@@ -291,7 +291,7 @@
}
}
- ccd_node_set_class (&original_node_class);
+ ccss_node_set_class (&original_node_class);
str = rc_string->str;
g_string_free (rc_string, FALSE), rc_string = NULL;
Modified: trunk/src/gce-serialize.h
==============================================================================
--- trunk/src/gce-serialize.h (original)
+++ trunk/src/gce-serialize.h Mon Sep 29 09:51:02 2008
@@ -20,12 +20,12 @@
#ifndef GCE_PARSER_H
#define GCE_PARSER_H
-#include <ccd/ccd.h>
+#include <ccss/ccss.h>
#include <glib.h>
G_BEGIN_DECLS
-char * gce_serialize (ccd_stylesheet_t const *stylesheet);
+char * gce_serialize (ccss_stylesheet_t const *stylesheet);
G_END_DECLS
Modified: trunk/src/gce-style.c
==============================================================================
--- trunk/src/gce-style.c (original)
+++ trunk/src/gce-style.c Mon Sep 29 09:51:02 2008
@@ -36,28 +36,28 @@
static GType gce_style_type = 0;
static GtkStyleClass *gce_style_parent_class = NULL;
-static ccd_selector_group_t *
+static ccss_selector_group_t *
setup (GceNode const *node,
GceNode const *base)
{
- ccd_stylesheet_t const *stylesheet;
- ccd_selector_group_t *group;
+ ccss_stylesheet_t const *stylesheet;
+ ccss_selector_group_t *group;
gboolean status;
stylesheet = gce_rc_style_get_stylesheet ();
- group = ccd_selector_group_new ();
+ group = ccss_selector_group_new ();
status = FALSE;
/* query for widget theming */
- status |= ccd_stylesheet_query_collect (stylesheet, (ccd_node_t const *) node, group, FALSE);
+ status |= ccss_stylesheet_query_collect (stylesheet, (ccss_node_t const *) node, group, FALSE);
/* query for primitive theming */
- status |= ccd_stylesheet_query_collect (stylesheet, (ccd_node_t const *) base, group, TRUE);
+ status |= ccss_stylesheet_query_collect (stylesheet, (ccss_node_t const *) base, group, TRUE);
if (!status) {
g_warning ("Un-themed widget `%s', primitive `%s'.",
G_OBJECT_TYPE_NAME (G_OBJECT (gce_node_get_widget (node))), gce_node_get_primitive (base));
- ccd_selector_group_free (group);
+ ccss_selector_group_free (group);
group = NULL;
}
@@ -77,14 +77,14 @@
gint height,
gboolean fill)
{
- ccd_selector_group_t *group;
- ccd_style_t style;
+ ccss_selector_group_t *group;
+ ccss_style_t style;
cairo_t *cr;
group = setup (node, base);
if (group) {
cr = gdk_cairo_create (window);
- ccd_style_init (&style);
+ ccss_style_init (&style);
if (area) {
gdk_cairo_rectangle (cr, area);
@@ -99,15 +99,15 @@
height = height == -1 ? h : height;
}
- ccd_selector_group_apply (group, &style);
+ ccss_selector_group_apply (group, &style);
if (fill) {
- ccd_style_draw_rectangle (&style, cr, x, y, width, height);
+ ccss_style_draw_rectangle (&style, cr, x, y, width, height);
} else {
- ccd_style_draw_outline (&style, cr, x, y, width, height);
+ ccss_style_draw_outline (&style, cr, x, y, width, height);
}
cairo_destroy (cr);
- ccd_selector_group_free (group);
+ ccss_selector_group_free (group);
}
}
@@ -126,14 +126,14 @@
gint gap_start,
gint gap_width)
{
- ccd_selector_group_t *group;
- ccd_style_t style;
+ ccss_selector_group_t *group;
+ ccss_style_t style;
cairo_t *cr;
group = setup (node, base);
if (group) {
cr = gdk_cairo_create (window);
- ccd_style_init (&style);
+ ccss_style_init (&style);
if (area) {
gdk_cairo_rectangle (cr, area);
@@ -148,11 +148,11 @@
height = height == -1 ? h : height;
}
- ccd_selector_group_apply (group, &style);
- ccd_style_draw_gap (&style, cr, x, y, width, height, gap_side, gap_start, gap_width);
+ ccss_selector_group_apply (group, &style);
+ ccss_style_draw_gap (&style, cr, x, y, width, height, gap_side, gap_start, gap_width);
cairo_destroy (cr);
- ccd_selector_group_free (group);
+ ccss_selector_group_free (group);
}
}
@@ -168,25 +168,25 @@
gint y1,
gint y2)
{
- ccd_selector_group_t *group;
- ccd_style_t style;
+ ccss_selector_group_t *group;
+ ccss_style_t style;
cairo_t *cr;
group = setup (node, base);
if (group) {
cr = gdk_cairo_create (window);
- ccd_style_init (&style);
+ ccss_style_init (&style);
if (area) {
gdk_cairo_rectangle (cr, area);
cairo_clip (cr);
}
- ccd_selector_group_apply (group, &style);
- ccd_style_draw_line (&style, cr, x1, x2, y1, y2);
+ ccss_selector_group_apply (group, &style);
+ ccss_style_draw_line (&style, cr, x1, x2, y1, y2);
cairo_destroy (cr);
- ccd_selector_group_free (group);
+ ccss_selector_group_free (group);
}
}
Modified: trunk/src/gce-style.h
==============================================================================
--- trunk/src/gce-style.h (original)
+++ trunk/src/gce-style.h Mon Sep 29 09:51:02 2008
@@ -20,7 +20,7 @@
#ifndef GCE_STYLE_H
#define GCE_STYLE_H
-#include <ccd/ccd.h>
+#include <ccss/ccss.h>
#include <glib.h>
#include <glib-object.h>
Modified: trunk/src/gce-theme.c
==============================================================================
--- trunk/src/gce-theme.c (original)
+++ trunk/src/gce-theme.c Mon Sep 29 09:51:02 2008
@@ -17,7 +17,7 @@
* MA 02110-1301, USA.
*/
-#include <ccd/ccd.h>
+#include <ccss/ccss.h>
#include <gmodule.h>
#include <gtk/gtk.h>
@@ -35,21 +35,21 @@
G_MODULE_EXPORT void
theme_init (GTypeModule *module)
{
- ccd_node_class_t const *node_class;
- ccd_function_t const *vtable;
+ ccss_node_class_t const *node_class;
+ ccss_function_t const *vtable;
gce_rc_style_register_type (module);
gce_style_register_type (module);
node_class = gce_node_get_class ();
vtable = gce_functions_get_vtable ();
- ccd_init (node_class, vtable);
+ ccss_init (node_class, vtable);
}
G_MODULE_EXPORT void
theme_exit (void)
{
- ccd_shutdown ();
+ ccss_shutdown ();
}
G_MODULE_EXPORT GtkRcStyle*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]