Start eradicating the CoglHandle typedef
authorRobert Bragg <robert@linux.intel.com>
Thu, 27 May 2010 22:31:40 +0000 (23:31 +0100)
committerRobert Bragg <robert@linux.intel.com>
Fri, 28 May 2010 17:39:22 +0000 (18:39 +0100)
commita8c8cbee5139427f4daf222e2f3b98276d1507b5
tree1789b10f191f7ac6497eae2c580f4a27037c92c4
parenta4fc5074faa3cda9d1c920ac94fe46e310a4ee2d
Start eradicating the CoglHandle typedef

CoglHandle is a common source of complaints and confusion because people
expect a "handle" to be some form of integer type with some indirection
to lookup the corresponding objects as opposed to a direct pointer.

This patch starts by renaming CoglHandle to CoglObject * and creating
corresponding cogl_object_ APIs to replace the cogl_handle ones.

The next step though is to remove all use of CoglHandle in the Cogl APIs
and replace with strongly typed pointer types such as CoglMaterial * or
CoglTexture * etc also all occurrences of COGL_INVALID_HANDLE can just
use NULL instead.

After this we will consider switching to GTypeInstance internally so we
can have inheritance for our types and hopefully improve how we handle
bindings.

Note all these changes will be done in a way that maintains the API and
ABI.
clutter/cogl/cogl/cogl-handle.h
clutter/cogl/cogl/cogl-object.h [new file with mode: 0644]
clutter/cogl/cogl/cogl-types.h
clutter/cogl/cogl/cogl-util.c