1
0
Fork 0
Commit graph

36 commits

Author SHA1 Message Date
Emmanuele Bassi
8a9890e138 json: Backport JSON_NODE_HOLDS macros
Unbreak the compilation with the internal copy of json-glib.
2010-06-22 07:58:49 +01:00
Emmanuele Bassi
c75a6b1a1d doc: Remove gtk-doc annotations from the json-glib copy
There's no need to use gtk-doc annotations: the API is internal to
Clutter.
2010-05-20 11:45:54 +01:00
Emmanuele Bassi
66e0f18753 json: Update JsonParser
Add another fix from upstream, to clean up the code.
2010-03-19 11:13:04 +00:00
Emmanuele Bassi
295bc517f8 json: Update the internal copy of JsonGenerator
The JsonGenerator we have inside Clutter as a fallback for a missing
system copy of JSON-GLib is way out of date.
2010-03-19 10:40:12 +00:00
Emmanuele Bassi
9ad1197cb2 json: Improve strictness of the JSON parser
Backport of the upstream JSON-GLib commit that improved the strictness
of JsonParser.

The original upstream commit is:

  29881f03468db08bfb404cfcd5b61b4cdc419a87
2010-03-07 20:54:33 +00:00
Emmanuele Bassi
5c162d904b build: Use QUIET_GEN when building ClutterJson GIR 2009-10-18 17:11:42 +01:00
Götz Waschk
366e0f9cd7 Update Clutter to use G-I 0.6.4
Following bug #1762, the syntax of g-ir-scanner was changed in
gobject-introspection, so Clutter does not build anymore with 0.6.4.

See the bugzilla bug:

  http://bugzilla.gnome.org/show_bug.cgi?id=591669

GObject-Introspection now uses a different mechanism to extract the
SONAME when building the gir file and it needs the libtool archive as
option.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-08-17 14:14:18 +01:00
Emmanuele Bassi
5c8ae6d2dc [json] Fix compilation of the internal JSON-GLib
Define the symbols needed to pass the single include policy when
compiling the static object.
2009-08-13 18:05:38 +01:00
Emmanuele Bassi
4d52245637 [json] Update the internal copy of JSON-GLib
JSON-GLib switch to 64 bit integers upstream, to avoid the undefined
integer size of the JSON RFC. All integers are automatically promoted
to gint64.
2009-08-12 16:00:13 +01:00
Emmanuele Bassi
d263e7a78b [build] Install JSON headers inside the right directory
Don't install inside the clutter-MAJOR_MINOR/ directory, but use
the API_VERSION (1.0).

Otherwise we'd have the Clutter headers for 1.x inside:

        $includedir/clutter-1.0/clutter

And the JSON-related headers inside:

        $includedir/clutter-1.<minor>/clutter
2009-08-10 17:19:04 +01:00
Damien Lespiau
94b35a4a5e [build] GCC_FLAGS is no more, MAINTAINER_CFLAGS is the One.
CC_FLAGS was a left over from the 0.8.x age. Killed it and use the
newer MAINTAINER_CFLAGS variable instead.
2009-08-03 14:25:08 +01:00
Ole André Vadla Ravnås
05883af1f6 Remove unused variable to fix compiler warning. 2009-07-28 12:13:44 +01:00
Owen W. Taylor
7654ef10ab Fix building introspection when dolt is not in use
On some platforms (anything but Linux, and on obscure Linux
architectures) dolt isn't used, so $(top_builddir)/doltlibtool
won't exist. $(top_builddir)/libtool will always be generated
even if dolt is used, so just use that unconditionally. We don't
need the extra speed when linking the single program for
introspection.

http://bugzilla.openedhand.com/show_bug.cgi?id=1699

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-07-18 16:52:57 +01:00
Emmanuele Bassi
0415d62d40 Disable single header inclusion for GLib
In order to be ready for the next major version of GLib we need to
disable single header inclusion by using the G_DISABLE_SINGLE_INCLUDES
define in the build process.
2009-06-15 11:29:37 +01:00
Emmanuele Bassi
eb55397423 [build] Fix distcheck for the json-glib internal copy
Since commit d743aeaa updated the internal copy of JSON-GLib and
added a new private header file, we need to fix the build to avoid
a distcheck failure.
2009-06-11 13:24:34 +01:00
Emmanuele Bassi
d743aeaa21 [json] Update the internal JSON-GLib copy
There have been changes in JSON-GLib upstream to clean up the
data structures, and facilitate introspection.

We still not use the updated JsonParser with the (private) JsonScanner
code, since it's a fork of GLib's GScanner.
2009-06-09 14:07:22 +01:00
Emmanuele Bassi
5af99660cb [json] Avoid leaks on error code paths
Bug 1476 - JSON Parser memory leak

Static analysis of the code showed that the in-tree copy of
the JsonParser object leaks objects and arrays on parse errors.

Thanks to Gordon Williams <gordon.williams@collabora.co.uk>
2009-04-15 12:18:55 +01:00
Emmanuele Bassi
ccca24ab76 Remove usage of the grave accent as quotation mark
See:

  http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html

This should make Thomas happy.
2009-03-17 14:13:31 +00:00
Emmanuele Bassi
a3839296c4 [build] Various fixes for distcheck
The generation of the GObject introspection data has broken
the distcheck phase.

The location of the header and source files should always be
depending on the $(top_srcdir) and $(srcdir) variables,
respectively; the special handling of the COGL API inside the
GIR generation should also take those two variables into
account.
2009-03-10 12:38:02 +00:00
Emmanuele Bassi
21aa09748c Add build machinery for gobject-introspection data
configure.ac: Check for gobject-introspection

build/introspection.m4: Include the file that defines the
GOBJECT_CHECK_INTROSPECTION m4 macro in case we want to disable
the introspection data generation.

clutter/json/Makefile.am: Build the .gir for "ClutterJson"
  (json-glib as part of the Clutter library)

clutter/Makefile.am: Build the .gir for clutter, compile the
  Clutter and ClutterJson girs into typelibs, and install them.
  Also move GCC_FLAGS from $(INCLUDES) to $(AM_CFLAGS) since it includes
  non-preprocessor flag like -Wall.

See also:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1450

Based on a patch by: Owen W. Taylor <otaylor@fishsoup.net>

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-02-20 14:39:51 +00:00
Owen W. Taylor
c5afd98416 Add gobject-introspection annotations
Add annotations such as (transfer-none) (out) (element-type ClutterActor),
and so forth to the doc comments as appropriate.

The annotations added here are a combination of the annotations previously
in gir-repository for Clutter and annotations found in a review of all
return values with that were being parsed with a transfer of "full".

http://bugzilla.openedhand.com/show_bug.cgi?id=1452

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-02-20 12:09:07 +00:00
Emmanuele Bassi
497734062c 2008-04-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/Makefile.am: Update the regular expression to match
	all the namespaces we actually use. Thanks to Neil Roberts for
	spotting this. A make distclean is needed.

	* clutter/cogl/gl/Makefile.am:
	* clutter/cogl/gles/Makefile.am:
	* clutter/json/Makefile.am:
	* clutter/pango/Makefile.am: Revert previous commit.
2008-04-09 14:18:42 +00:00
Emmanuele Bassi
05b2e6bc1c 2008-04-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/cogl/Makefile.am:
	* clutter/cogl/gl/Makefile.am:
	* clutter/cogl/gles/Makefile.am:
	* clutter/json/Makefile.am:
	* clutter/pango/Makefile.am: Fix the visibility of all the
	symbols, for the main library and the statically linked ones.
2008-04-09 13:27:00 +00:00
Emmanuele Bassi
ee4bcf6465 2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
* Makefile.am: Move tests build before docs, to cut down the
	distcheck failure discovery

	* clutter.symbols: Add clutter_texture_set_area_from_rgb_data()

	* clutter/clutter-actor.c:
	* clutter/clutter-script.c:
	* clutter/clutter-texture.c:
	* clutter/json/json-generator.c:
	* clutter/json/json-parser.c: Compilation fixes for passing distcheck

	* tests/test-grab.c:
	* tests/test-score.c:
	* tests/test-script.c:
	* tests/test-shader.c:
	* tests/test-unproject.c: Ditto as above
2007-12-21 15:25:00 +00:00
Emmanuele Bassi
6fae4bcfc9 2007-12-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.[ch]: Use gssize, size we allow -1
	as a length (meaning "use the whole string").

	(json_parser_load_from_data): Use the passed length instead of
	using strlen() all the time.

	* clutter/clutter-script.[ch]: Ditto as above.
2007-12-06 11:25:16 +00:00
Emmanuele Bassi
92d4481a68 2007-10-29 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.c: Enable parsing of negative numbers;
	GScanner splits negative numbers into two tokens, so we need to
	special case them.
2007-10-29 16:45:25 +00:00
Emmanuele Bassi
d42153dc69 2007-10-27 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.c:
	(json_scanner_msg_handler): Set the GError to be returned by
	the parsing functions into the GScanner error message handler.

	(json_parser_object): Return the symbol token in case we have
	a parse error after the member name.

	(json_parser_load_from_data): Propagate the error set in the
	message handler, if any.

	* clutter/json/json-node.c (json_node_free): Unref the objects
	only if are set, to avoid a couple of needless criticals we
	get on error.

	* tests/test-script.json: More properties.
2007-10-27 19:49:39 +00:00
Emmanuele Bassi
9c38eead46 2007-10-25 Emmanuele Bassi <ebassi@openedhand.com>
* 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-25 14:32:29 +00:00
Emmanuele Bassi
143a5937e2 2007-10-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-object.c: Automatically transform every
	delimiter into an underscore.

	* clutter/clutter-script.c: Implement the "parent_texture"
	property translation for ClutterCloneTextures, using the
	passed id of the parent texture.
2007-10-16 14:40:00 +00:00
Tomas Frydrych
f8de77ac92 2007-10-16 Tomas Frydrych <tf@o-hand.com>
* clutter.symbols:
	Added a bunch of missing symbols.
	
	* clutter/clutter-script.c:
	* json/json-node.c:
	Use g_slice_new0 instead of g_slice_new to avoid passing garbage to functions.
	
	* tests/test-threads.c:
	Replaced non-portable sleep() with g_usleep().
2007-10-16 08:34:16 +00:00
Tomas Frydrych
abd6832dd9 2007-10-12 Tomas Frydrych <tf@o-hand.com>
* clutter/clutter-actor.c:
        * clutter/clutter-backend.c:
        * clutter/clutter-behaviour-depth.c:
        * clutter/clutter-box.c:
        * clutter/clutter-clone-texture.c:
        * clutter/clutter-container.c:
        * clutter/clutter-entry.c:
        * clutter/clutter-feature.c:
        * clutter/clutter-fixed.c:
        * clutter/clutter-group.c:
        * clutter/clutter-hbox.c:
        * clutter/clutter-label.c:
        * clutter/clutter-layout.c:
        * clutter/clutter-media.c:
        * clutter/clutter-rectangle.c:
        * clutter/clutter-score.c:
        * clutter/clutter-script.c:
        * clutter/clutter-stage.c:
        * clutter/clutter-texture.c:
        * clutter/clutter-timeline.c:
        * clutter/clutter-timeout-pool.c:
        * clutter/clutter-vbox.c:
        * clutter/cogl/gl/cogl.c:
        * clutter/cogl/gles/cogl.c:
        * clutter/eglnative/clutter-backend-egl.c:
        * clutter/eglnative/clutter-event-egl.c:
        * clutter/eglnative/clutter-stage-egl.c:
        * clutter/eglx/clutter-backend-egl.c:
        * clutter/eglx/clutter-event-egl.c:
        * clutter/eglx/clutter-stage-egl.c:
        * clutter/glx/clutter-event-glx.c:
        * clutter/json/json-array.c:
        * clutter/json/json-generator.c:
        * clutter/json/json-node.c:
        * clutter/json/json-object.c:
        * clutter/json/json-parser.c:
        * clutter/sdl/clutter-backend-sdl.c:
        * clutter/sdl/clutter-event-sdl.c:
        * clutter/sdl/clutter-stage-sdl.c:

	Fixedup config.h inclusion (must always be bracketed with #ifdef
	HAVE_CONFIG_H).
2007-10-12 08:17:00 +00:00
Emmanuele Bassi
8b55030c14 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-types.h:
	* clutter/json/json-array.c:
	* clutter/json/json-object.c: Resync with the upstream copy
	of JSON-GLib; add json_object_remove_member() and
	json_array_remove_element() and fix the g_hash_table_get_keys()
	replacement for GLib 2.12.

	* clutter/clutter-script.c: Clean up the complex properties
	parsing code.
2007-10-10 12:51:51 +00:00
Emmanuele Bassi
7aa52af5dd 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.c: Use the commodity JsonNode API
	and accept bare values as root nodes.

	* clutter/clutter-script-private.h:
	* clutter/clutter-script.c: Unreference the created objects
	only if they are top-levels, like ClutterBehaviour and
	ClutterTimelines. Actors have floating references, so we
	just transfer ownership to their containers, and the stage
	is owned by the backend. Add the "type_func" key to the
	object definition, so the user can supply its own GType
	function if the class name doesn't follow the GObject rules.
	Document the ClutterScript public API.
2007-10-10 10:42:19 +00:00
Emmanuele Bassi
1016f27ca8 Fix typo in GLib version check 2007-10-09 12:10:11 +00:00
Emmanuele Bassi
9e81870d0b 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c (json_parse_end):
	* clutter/json/json-object.c (json_object_get_members): Replace
	the GLib 2.14 API with the equivalent code for GLib < 2.14.

	* configure.ac: Revert the dependency bump.
2007-10-08 15:18:31 +00:00
Emmanuele Bassi
991562f536 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
Initial implementation of the UI definition files. (#424)

	* clutter/json/Makefile.am:
	* clutter/json/*.[ch]: In-tree copy of JSON-GLib, a GLib-based
	JSON parser/generator library. We use it in-tree because we might
	need to change the API. Ideally, we'd depend on it.

	* clutter/clutter.h:
	* clutter/clutter-script-private.h:
	* clutter/clutter-script.[ch]: ClutterScript, the scenegraph
	generator class. It parses JSON streams in form of buffers and
	files and builds the scene.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add a "script" debug flag

	* clutter/Makefile.am: Build glue.

	* tests/Makefile.am:
	* tests/test-script.c: Add a test case for the ClutterScript.

	* configure.ac: Depend on GLib 2.14, so we can use the
	g_hash_table_get_key() and g_hash_table_get_values() functions
	for the time being; we can probably reimplement those, but we
	are going to need 2.14 anyway if we are going to implement a
	list model using GSequence.
2007-10-08 15:03:22 +00:00