The G_CONST_RETURN define in GLib is, and has always been, a bit fuzzy.
We always used it to conform to the platform, at least for public-facing
API.
At first I assumed it has something to do with brain-damaged compilers
or with weird platforms where const was not really supported; sadly,
it's something much, much worse: it's a define that can be toggled at
compile-time to remove const from the signature of public API. This is a
truly terrifying feature that I assume was added in the past century,
and whose inception clearly had something to do with massive doses of
absynthe and opium — because any other explanation would make the
existence of such a feature even worse than assuming drugs had anything
to do with it.
Anyway, and pleasing the gods, this dubious feature is being
removed/deprecated in GLib; see bug:
https://bugzilla.gnome.org/show_bug.cgi?id=644611
Before deprecation, though, we should just remove its usage from the
whole API. We should especially remove its usage from Cally's internals,
since there it never made sense in the first place.
This time, in Clutter core.
The ObjC standard library provides a type called 'id', which obviously
requires any library to either drop the useful shadowed variable warning
or stop using 'id' as a variable name.
Yes, it's almost unbearably stupid. Well, at least it's not 'index' in
string.h, or 'y2' in math.h.
The internal copy of JSON-GLib was meant to go away right after the 1.0
release, given that JSON-GLib was still young and relatively unknown.
Nowadays, many projects started depending on this little library, and
distributions ship it and keep it up to date.
Keeping a copy of JSON-GLib means keeping it up to date; unfortunately,
this would also imply updating the code not just for the API but for the
internal implementations.
Starting with the 1.2 release, Clutter preferably dependend on the
system copy; with the 1.4 release we stopped falling back automatically.
The 1.6 cycle finally removes the internal copy and requires a copy of
JSON-GLib installed on the target system in order to compile Clutter.
* clutter/clutter-scriptable.[ch]: Rename ::set_name and ::get_name
to ::set_id and ::get_id, to avoid potential confusion with the
ClutterActor:name property.
* clutter/clutter-script.h:
* clutter/clutter-script.c (clutter_script_construct_object): Use
clutter_scriptable_set_id().
(clutter_get_script_id): Add a public function to retrieve the ID
used in the UI definition files from an object.
* clutter/clutter-actor.c: Do not set the name of the actor with
the ID set in the UI definition files.
* tests/test-script.c: Test clutter_get_script_id().
* clutter.symbols: Update with the new symbols.
* clutter/Makefile.am:
* clutter/clutter.h:
* clutter/clutter-scriptable.[ch]: Add the ClutterScriptable
interface; by implementing this interface, a class can
override the UI definition parsing and transform complex data
types into GObject properties, or allow custom properties.
* clutter/clutter-script.c:
* clutter/clutter-script-parser.c:
* clutter/clutter-script-private.h: Rearrange the code and
use the ClutterScriptable interface to parse and build the
custom properties. This cleans up the code and also it makes
it more reliable (the complex type parsing is now done using
the target type and not just the name of the property).