summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Staudinger <robsta@gnome.org>2009-08-31 15:31:12 +0200
committerRobert Staudinger <robsta@gnome.org>2009-08-31 15:31:12 +0200
commit5735a6387bef4738108fdff573eb52039184fe4c (patch)
tree06589419ca2e1c460b2642a020442695a31af62a
parentb2aaf22effbfa9945dbc6213e74652523b46ae79 (diff)
[function] Deprecate struct fields.
-rw-r--r--ccss-gtk/ccss-gtk-functions.c1
-rw-r--r--ccss/Makefile.am1
-rw-r--r--ccss/ccss-background-parser.c1
-rw-r--r--ccss/ccss-color-impl.h3
-rw-r--r--ccss/ccss-function-impl.h70
-rw-r--r--ccss/ccss-function.h30
-rw-r--r--ccss/ccss-grammar-function.c1
-rw-r--r--ccss/ccss-grammar.c1
-rw-r--r--ccss/ccss-padding-parser.c1
-rw-r--r--ccss/ccss-property-parser.c1
-rw-r--r--examples/example-3.c1
-rw-r--r--examples/example-5.c1
12 files changed, 82 insertions, 30 deletions
diff --git a/ccss-gtk/ccss-gtk-functions.c b/ccss-gtk/ccss-gtk-functions.c
index 3192892..c2c5106 100644
--- a/ccss-gtk/ccss-gtk-functions.c
+++ b/ccss-gtk/ccss-gtk-functions.c
@@ -20,6 +20,7 @@
*/
#include <ccss/ccss.h>
+#include <ccss/ccss-function-impl.h>
#include <gtk/gtk.h>
#include "ccss-gtk-functions.h"
#include "ccss-gtk-color.h"
diff --git a/ccss/Makefile.am b/ccss/Makefile.am
index dd1ef42..0424234 100644
--- a/ccss/Makefile.am
+++ b/ccss/Makefile.am
@@ -70,6 +70,7 @@ headers_DATA = \
ccss-color.h \
ccss-color-impl.h \
ccss-function.h \
+ ccss-function-impl.h \
ccss-grammar.h \
ccss.h \
ccss-macros.h \
diff --git a/ccss/ccss-background-parser.c b/ccss/ccss-background-parser.c
index 3ae4591..8230690 100644
--- a/ccss/ccss-background-parser.c
+++ b/ccss/ccss-background-parser.c
@@ -24,6 +24,7 @@
#include <glib.h>
#include "ccss-background-parser.h"
#include "ccss-background.h"
+#include "ccss-block.h"
#include "ccss-color-impl.h"
#include "ccss-position-parser.h"
#include "ccss-property-impl.h"
diff --git a/ccss/ccss-color-impl.h b/ccss/ccss-color-impl.h
index 676a575..b76874a 100644
--- a/ccss/ccss-color-impl.h
+++ b/ccss/ccss-color-impl.h
@@ -20,7 +20,7 @@
*/
/*
- * Declarations for the implementation of custom properties.
+ * Declarations for the implementation of custom colors.
* This declarations are not to be considered part of the stable
* ccss interface. Use with care.
*
@@ -35,6 +35,7 @@
#include <stdbool.h>
#include <libcroco/libcroco.h>
+#include <ccss/ccss-block.h>
#include <ccss/ccss-color.h>
#include <ccss/ccss-grammar.h>
#include <ccss/ccss-macros.h>
diff --git a/ccss/ccss-function-impl.h b/ccss/ccss-function-impl.h
new file mode 100644
index 0000000..0d73dbc
--- /dev/null
+++ b/ccss/ccss-function-impl.h
@@ -0,0 +1,70 @@
+/* vim: set ts=8 sw=8 noexpandtab: */
+
+/* The `C' CSS Library.
+ * Copyright (C) 2008 Robert Staudinger
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+/*
+ * Declarations for the implementation of custom functions.
+ * This declarations are not to be considered part of the stable
+ * ccss interface. Use with care.
+ *
+ * FIXME: split out to a section of its own in the docs.
+ */
+
+#ifndef CCSS_FUNCTION_IMPL_H
+#define CCSS_FUNCTION_IMPL_H
+
+#include <ccss/ccss-function.h>
+#include <ccss/ccss-macros.h>
+
+CCSS_BEGIN_DECLS
+
+/* Let's just forward declare this, so we don't have to pull in <glib.h>. */
+struct _GSList;
+
+/**
+ * ccss_function_f:
+ * @args: argument-list passed to the function.
+ * @user_data: user data associated to the function handler.
+ *
+ * Prototype for a custom `CSS function' handler.
+ *
+ * Returns: the function's result as a string.
+ **/
+typedef char * (*ccss_function_f) (struct _GSList const *args,
+ void *user_data);
+
+/**
+ * ccss_function_t:
+ * @name: identifier of the function, as used in CSS.
+ * @function: handler, see #ccss_function_f.
+ * @user_data: data to pass to the function handler.
+ *
+ * This datastructure represents one line in the libccss' consumers vtable.
+ **/
+struct ccss_function_ {
+ CCSS_DEPRECATED (char const *name);
+ CCSS_DEPRECATED (ccss_function_f function);
+ CCSS_DEPRECATED (void *user_data);
+};
+
+CCSS_END_DECLS
+
+#endif /* CCSS_FUNCTION_IMPL_H */
+
diff --git a/ccss/ccss-function.h b/ccss/ccss-function.h
index c0e24d9..4945756 100644
--- a/ccss/ccss-function.h
+++ b/ccss/ccss-function.h
@@ -22,39 +22,11 @@
#ifndef CCSS_FUNCTION_H
#define CCSS_FUNCTION_H
-#include <ccss/ccss-block.h>
#include <ccss/ccss-macros.h>
CCSS_BEGIN_DECLS
-/* Let's just forward declare this, so we don't have to pull in <glib.h>. */
-struct _GSList;
-
-/**
- * ccss_function_f:
- * @args: argument-list passed to the function.
- * @user_data: user data associated to the function handler.
- *
- * Prototype for a custom `CSS function' handler.
- *
- * Returns: the function's result as a string.
- **/
-typedef char * (*ccss_function_f) (struct _GSList const *args,
- void *user_data);
-
-/**
- * ccss_function_t:
- * @name: identifier of the function, as used in CSS.
- * @function: handler, see #ccss_function_f.
- * @user_data: data to pass to the function handler.
- *
- * This datastructure represents one line in the libccss' consumers vtable.
- **/
-typedef struct {
- char const *name;
- ccss_function_f function;
- void *user_data;
-} ccss_function_t;
+typedef struct ccss_function_ ccss_function_t;
CCSS_END_DECLS
diff --git a/ccss/ccss-grammar-function.c b/ccss/ccss-grammar-function.c
index a3ca58b..f095dab 100644
--- a/ccss/ccss-grammar-function.c
+++ b/ccss/ccss-grammar-function.c
@@ -21,6 +21,7 @@
#include <string.h>
#include <glib.h>
+#include "ccss-function-impl.h"
#include "ccss-grammar-priv.h"
#include "ccss-property-impl.h"
#include "config.h"
diff --git a/ccss/ccss-grammar.c b/ccss/ccss-grammar.c
index c05765e..6f18498 100644
--- a/ccss/ccss-grammar.c
+++ b/ccss/ccss-grammar.c
@@ -28,6 +28,7 @@
#include "ccss-border-parser.h"
#include "ccss-border-image-parser.h"
#include "ccss-color-impl.h"
+#include "ccss-function-impl.h"
#include "ccss-padding-parser.h"
#include "ccss-property-impl.h"
diff --git a/ccss/ccss-padding-parser.c b/ccss/ccss-padding-parser.c
index a0f6d78..38bbdfb 100644
--- a/ccss/ccss-padding-parser.c
+++ b/ccss/ccss-padding-parser.c
@@ -20,6 +20,7 @@
*/
#include <string.h>
+#include "ccss-block.h"
#include "ccss-grammar.h"
#include "ccss-padding.h"
#include "ccss-padding-parser.h"
diff --git a/ccss/ccss-property-parser.c b/ccss/ccss-property-parser.c
index 419d20d..ffd190e 100644
--- a/ccss/ccss-property-parser.c
+++ b/ccss/ccss-property-parser.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <glib.h>
#include <libcroco/libcroco.h>
+#include "ccss-block.h"
#include "ccss-grammar.h"
#include "ccss-property-generic.h"
#include "ccss-property-impl.h"
diff --git a/examples/example-3.c b/examples/example-3.c
index e073f08..1b6367e 100644
--- a/examples/example-3.c
+++ b/examples/example-3.c
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <cairo.h>
#include <ccss-cairo/ccss-cairo.h>
+#include <ccss/ccss-function-impl.h>
#include <gtk/gtk.h>
#include "config.h"
diff --git a/examples/example-5.c b/examples/example-5.c
index e4c9e89..3c50155 100644
--- a/examples/example-5.c
+++ b/examples/example-5.c
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <cairo.h>
#include <ccss-cairo/ccss-cairo.h>
+#include <ccss/ccss-function-impl.h>
#include <gtk/gtk.h>
#include "config.h"