From 9c38eead46da823b8eaa350579afbc16705fb86e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 25 Oct 2007 14:32:29 +0000 Subject: [PATCH] 2007-10-25 Emmanuele Bassi * clutter/clutter-json.h: Header for including the JSON parsing and data types. * clutter/json/json-types.h: Add JSON_NODE_VALUE_TYPE() macro. * clutter/json/Makefile.am: Install the JSON headers into a private location. This might change in the future, and might also cause collisions if you're using JSON-GLib and Clutter at the same time, so be warned. --- ChangeLog | 12 ++++++++++++ clutter/clutter-json.h | 8 ++++++++ clutter/json/Makefile.am | 2 ++ clutter/json/json-types.h | 6 +++++- 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 clutter/clutter-json.h diff --git a/ChangeLog b/ChangeLog index 7af804529..5e4f272c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-10-25 Emmanuele Bassi + + * clutter/clutter-json.h: Header for including the JSON + parsing and data types. + + * clutter/json/json-types.h: Add JSON_NODE_VALUE_TYPE() macro. + + * clutter/json/Makefile.am: Install the JSON headers into a + private location. This might change in the future, and might + also cause collisions if you're using JSON-GLib and Clutter + at the same time, so be warned. + 2007-10-22 Emmanuele Bassi * clutter/clutter-label.c (clutter_label_request_coords): If diff --git a/clutter/clutter-json.h b/clutter/clutter-json.h new file mode 100644 index 000000000..d4113ce7a --- /dev/null +++ b/clutter/clutter-json.h @@ -0,0 +1,8 @@ +#ifndef __CLUTTER_JSON_H__ +#define __CLUTTER_JSON_H__ + +#include "json/json-types.h" +#include "json/json-parser.h" +#include "json/json-generator.h" + +#endif /* __CLUTTER_JSON_H__ */ diff --git a/clutter/json/Makefile.am b/clutter/json/Makefile.am index 6e78f0ca0..7f3a7a0dc 100644 --- a/clutter/json/Makefile.am +++ b/clutter/json/Makefile.am @@ -24,3 +24,5 @@ INCLUDES = \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) +clutterjsondir = $(includedir)/clutter-@CLUTTER_MAJORMINOR@/clutter/json +clutterjson_HEADERS = $(source_h) diff --git a/clutter/json/json-types.h b/clutter/json/json-types.h index 26086cbed..82294011d 100644 --- a/clutter/json/json-types.h +++ b/clutter/json/json-types.h @@ -30,7 +30,11 @@ G_BEGIN_DECLS * * Evaluates to the #JsonNodeType contained by @node */ -#define JSON_NODE_TYPE(node) (((JsonNode *) (node))->type) +#define JSON_NODE_TYPE(node) \ + (((JsonNode *) (node))->type) +#define JSON_NODE_VALUE_TYPE(node) \ + (G_VALUE_TYPE ((((JsonNode *) (node))->data.value)) + #define JSON_TYPE_OBJECT (json_object_get_type ()) #define JSON_TYPE_ARRAY (json_array_get_type ())