+2007-05-22 Tomas Frydrych <tf@openedhand.com>
+
+ * configure.ac:
+ * Makefile.am:
+ * clutter.pc.in:
+ * clutter/Makefile.am:
+ * clutter/clutter-actor.c:
+ * clutter/clutter-actor.h:
+ * clutter/clutter-group.c:
+ * clutter/clutter-label.c:
+ * clutter/clutter-real.h:
+ * clutter/clutter-units.h:
+ * clutter/clutter.h:
+ * clutter/egl/clutter-stage-egl.c:
+ * clutter/glx/clutter-stage-glx.c:
+ * clutter/sdl/clutter-stage-sdl.c:
+ * examples/Makefile.am:
+ * tests/Makefile.am:
+ Removed ClutterReal; added clutter-units.
+
2007-05-18 Tomas Frydrych <tf@openedhand.com>
* configure.ac:
SUBDIRS=clutter doc examples tests
-pcfiles = clutter@CLUTTER_REAL@-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc
+pcfiles = clutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc
-%@CLUTTER_REAL@-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc: %.pc
+%-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc: %.pc
cp $< $@
pkgconfig_DATA = $(pcfiles)
libdir=${exec_prefix}/lib
includedir=${prefix}/include
backend=@clutterbackend@
-real=@CLUTTER_REAL@
apiversion=@CLUTTER_API_VERSION@
Name: Clutter
Description: Clutter Core Library (${backend} backend)
Version: @VERSION@
-Libs: -L${libdir} -lclutter${real}-${backend}-${apiversion}
+Libs: -L${libdir} -lclutter-${backend}-${apiversion}
Cflags: -I${includedir}/clutter-${apiversion}
Requires: glib-2.0 >= 2.10 gobject-2.0 gthread-2.0 pangoft2 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0
$(srcdir)/clutter-texture.h \
$(srcdir)/clutter-timeline.h \
$(srcdir)/clutter-effect.h \
+ $(srcdir)/clutter-units.h \
$(srcdir)/clutter-util.h \
$(srcdir)/clutter-version.h \
$(NULL)
$(NULL)
-libclutter@CLUTTER_REAL@_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_LIBADD = \
+libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_LIBADD = \
$(CLUTTER_LIBS) pango/libpangoclutter.la \
@CLUTTER_FLAVOUR@/libclutter-@CLUTTER_FLAVOUR@.la \
cogl/@CLUTTER_COGL@/libclutter-cogl.la
-libclutter@CLUTTER_REAL@_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_SOURCES = \
+libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_SOURCES = \
$(source_c) $(source_h) $(source_h_priv)
-libclutter@CLUTTER_REAL@_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_LDFLAGS = $(LDADD)
+libclutter_@CLUTTER_FLAVOUR@_@CLUTTER_API_VERSION@_la_LDFLAGS = $(LDADD)
lib_LTLIBRARIES = $(clutterbackendlib)
-EXTRA_LTLIBRARIES = libclutter@CLUTTER_REAL@-@CLUTTER_FLAVOUR@-@CLUTTER_API_VERSION@.la
+EXTRA_LTLIBRARIES = libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_API_VERSION@.la
clutterdir = $(includedir)/clutter-@CLUTTER_API_VERSION@/clutter
#include "clutter-marshal.h"
#include "clutter-private.h"
#include "clutter-debug.h"
+#include "clutter-units.h"
#include "cogl.h"
#include <GL/gl.h>
struct _ClutterActorPrivate
{
- ClutterActorBoxReal coords;
+ ClutterActorBox coords;
ClutterGeometry clip;
guint has_clip : 1;
if (clutter_actor_get_parent (self) != NULL)
{
- cogl_translate (CLUTTER_REAL_TO_FLOAT (priv->coords.x1),
- CLUTTER_REAL_TO_FLOAT (priv->coords.y1),
+ cogl_translate (CLUTTER_FIXED_TO_FLOAT (priv->coords.x1),
+ CLUTTER_FIXED_TO_FLOAT (priv->coords.y1),
0);
}
cogl_pop_matrix();
}
+/**
+ * clutter_actor_request_coords:
+ * @self: A #ClutterActor
+ * @box: A #ClutterActorBox with requested new co-ordinates.
+ *
+ * Requests new co-ordinates for the #ClutterActor ralative to any parent.
+ *
+ * This function should not be called directly by applications instead
+ * the various position/geometry methods should be used.
+ **/
void
-_clutter_actor_request_coords_real (ClutterActor *self,
- ClutterActorBoxReal *box)
+clutter_actor_request_coords (ClutterActor *self,
+ ClutterActorBox *box)
{
ClutterActorClass *klass;
gboolean x_change, y_change, width_change, height_change;
if (klass->request_coords)
klass->request_coords (self, box);
- x_change = CLUTTER_REAL_NE (self->priv->coords.x1, box->x1);
- y_change = CLUTTER_REAL_NE (self->priv->coords.y1, box->y1);
- width_change = CLUTTER_REAL_NE ((self->priv->coords.x2 - self->priv->coords.x1),
- (box->x2 - box->x1));
- height_change = CLUTTER_REAL_NE ((self->priv->coords.y2 - self->priv->coords.y1),
- (box->y2 - box->y1));
+ x_change = (self->priv->coords.x1 != box->x1);
+ y_change = (self->priv->coords.y1 != box->y1);
+ width_change = ((self->priv->coords.x2 - self->priv->coords.x1) !=
+ (box->x2 - box->x1));
+ height_change = ((self->priv->coords.y2 - self->priv->coords.y1) !=
+ (box->y2 - box->y1));
if (x_change || y_change || width_change || height_change)
{
}
/**
- * clutter_actor_request_coords:
+ * clutter_actor_allocate_coords:
* @self: A #ClutterActor
- * @box: A #ClutterActorBox with requested new co-ordinates.
+ * @box: A location to store the actors #ClutterActorBox co-ordinates
*
- * Requests new co-ordinates for the #ClutterActor ralative to any parent.
+ * Requests the allocated co-ordinates for the #ClutterActor relative
+ * to any parent.
*
* This function should not be called directly by applications instead
* the various position/geometry methods should be used.
**/
void
-clutter_actor_request_coords (ClutterActor *self,
- ClutterActorBox *box)
-{
- ClutterActorBoxReal rbox;
-
- rbox.x1 = CLUTTER_REAL_FROM_INT (box->x1);
- rbox.y1 = CLUTTER_REAL_FROM_INT (box->y1);
- rbox.x2 = CLUTTER_REAL_FROM_INT (box->x2);
- rbox.y2 = CLUTTER_REAL_FROM_INT (box->y2);
-
- _clutter_actor_request_coords_real (self, &rbox);
-}
-
-void
-_clutter_actor_allocate_coords_real (ClutterActor *self,
- ClutterActorBoxReal *rbox)
+clutter_actor_allocate_coords (ClutterActor *self,
+ ClutterActorBox *box)
{
ClutterActorClass *klass;
klass = CLUTTER_ACTOR_GET_CLASS (self);
- rbox->x1 = self->priv->coords.x1;
- rbox->y1 = self->priv->coords.y1;
- rbox->x2 = self->priv->coords.x2;
- rbox->y2 = self->priv->coords.y2;
+ box->x1 = self->priv->coords.x1;
+ box->y1 = self->priv->coords.y1;
+ box->x2 = self->priv->coords.x2;
+ box->y2 = self->priv->coords.y2;
if (klass->allocate_coords)
{
* we then resync any changes. Needed for group class.
* Need to figure out nicer way.
*/
- klass->allocate_coords(self, rbox);
+ klass->allocate_coords(self, box);
- self->priv->coords.x1 = rbox->x1;
- self->priv->coords.y1 = rbox->y1;
- self->priv->coords.x2 = rbox->x2;
- self->priv->coords.y2 = rbox->y2;
+ self->priv->coords.x1 = box->x1;
+ self->priv->coords.y1 = box->y1;
+ self->priv->coords.x2 = box->x2;
+ self->priv->coords.y2 = box->y2;
}
}
-/**
- * clutter_actor_allocate_coords:
- * @self: A #ClutterActor
- * @box: A location to store the actors #ClutterActorBox co-ordinates
- *
- * Requests the allocated co-ordinates for the #ClutterActor relative
- * to any parent.
- *
- * This function should not be called directly by applications instead
- * the various position/geometry methods should be used.
- **/
-void
-clutter_actor_allocate_coords (ClutterActor *self,
- ClutterActorBox *box)
-{
- ClutterActorBoxReal rbox;
-
- _clutter_actor_allocate_coords_real (self, &rbox);
-
- box->x1 = CLUTTER_REAL_TO_INT (rbox.x1);
- box->y1 = CLUTTER_REAL_TO_INT (rbox.y1);
- box->x2 = CLUTTER_REAL_TO_INT (rbox.x2);
- box->y2 = CLUTTER_REAL_TO_INT (rbox.y2);
-}
-
static void
clutter_actor_set_property (GObject *object,
guint prop_id,
{
ClutterActorBox box;
- box.x1 = geometry->x;
- box.y1 = geometry->y;
- box.x2 = geometry->x + geometry->width;
- box.y2 = geometry->y + geometry->height;
+ box.x1 = CLUTTER_UNITS_FROM_INT (geometry->x);
+ box.y1 = CLUTTER_UNITS_FROM_INT (geometry->y);
+ box.x2 = CLUTTER_UNITS_FROM_INT (geometry->x + geometry->width);
+ box.y2 = CLUTTER_UNITS_FROM_INT (geometry->y + geometry->height);
clutter_actor_request_coords (self, &box);
}
clutter_actor_allocate_coords (self, &box);
- geometry->x = box.x1;
- geometry->y = box.y1;
- geometry->width = box.x2 - box.x1;
- geometry->height = box.y2 - box.y1;
+ geometry->x = CLUTTER_UNITS_TO_INT (box.x1);
+ geometry->y = CLUTTER_UNITS_TO_INT (box.y1);
+ geometry->width = CLUTTER_UNITS_TO_INT (box.x2 - box.x1);
+ geometry->height = CLUTTER_UNITS_TO_INT (box.y2 - box.y1);
}
/**
gint *x2,
gint *y2)
{
- ClutterActorBoxReal box;
+ ClutterActorBox box;
g_return_if_fail (CLUTTER_IS_ACTOR (self));
- _clutter_actor_allocate_coords_real (self, &box);
+ clutter_actor_allocate_coords (self, &box);
if (x1)
- *x1 = CLUTTER_REAL_TO_INT (box.x1);
+ *x1 = CLUTTER_UNITS_TO_INT (box.x1);
if (y1)
- *y1 = CLUTTER_REAL_TO_INT (box.y1);
+ *y1 = CLUTTER_UNITS_TO_INT (box.y1);
if (x2)
- *x2 = CLUTTER_REAL_TO_INT (box.x2);
+ *x2 = CLUTTER_UNITS_TO_INT (box.x2);
if (y2)
- *y2 = CLUTTER_REAL_TO_INT (box.y2);
-}
-
-static void
-_clutter_actor_set_position_real (ClutterActor *self,
- ClutterReal x,
- ClutterReal y)
-{
- ClutterActorBoxReal box;
-
- g_return_if_fail (CLUTTER_IS_ACTOR (self));
-
- _clutter_actor_allocate_coords_real (self, &box);
-
- box.x2 += (x - box.x1);
- box.y2 += (y - box.y1);
-
- box.x1 = x;
- box.y1 = y;
-
- _clutter_actor_request_coords_real (self, &box);
+ *y2 = CLUTTER_UNITS_TO_INT (box.y2);
}
/**
gint x,
gint y)
{
- ClutterReal xr = CLUTTER_REAL_FROM_INT (x);
- ClutterReal yr = CLUTTER_REAL_FROM_INT (y);
-
- _clutter_actor_set_position_real (self, xr, yr);
+ ClutterActorBox box;
+
+ g_return_if_fail (CLUTTER_IS_ACTOR (self));
+
+ clutter_actor_allocate_coords (self, &box);
+
+ box.x2 += (CLUTTER_UNITS_FROM_INT (x) - box.x1);
+ box.y2 += (CLUTTER_UNITS_FROM_INT (y) - box.y1);
+
+ box.x1 = CLUTTER_UNITS_FROM_INT (x);
+ box.y1 = CLUTTER_UNITS_FROM_INT (y);
+
+ clutter_actor_request_coords (self, &box);
}
/**
gint dx,
gint dy)
{
- ClutterActorBoxReal box;
- ClutterReal dxr = CLUTTER_REAL_FROM_INT (dx);
- ClutterReal dyr = CLUTTER_REAL_FROM_INT (dy);
+ ClutterActorBox box;
+ gint32 dxu = CLUTTER_UNITS_FROM_INT (dx);
+ gint32 dyu = CLUTTER_UNITS_FROM_INT (dy);
g_return_if_fail (CLUTTER_IS_ACTOR (self));
- _clutter_actor_allocate_coords_real (self, &box);
+ clutter_actor_allocate_coords (self, &box);
- box.x2 += dxr;
- box.y2 += dyr;
- box.x1 += dxr;
- box.y1 += dyr;
+ box.x2 += dxu;
+ box.y2 += dyu;
+ box.x1 += dxu;
+ box.y1 += dyu;
- _clutter_actor_request_coords_real (self, &box);
+ clutter_actor_request_coords (self, &box);
}
/**
gint width,
gint height)
{
- ClutterActorBoxReal box;
+ ClutterActorBox box;
g_return_if_fail (CLUTTER_IS_ACTOR (self));
- _clutter_actor_allocate_coords_real (self, &box);
+ clutter_actor_allocate_coords (self, &box);
- box.x2 = CLUTTER_REAL_ADD_INT (box.x1, width);
- box.y2 = CLUTTER_REAL_ADD_INT (box.y1, height);
+ box.x2 = box.x1 + CLUTTER_UNITS_FROM_INT (width);
+ box.y2 = box.y1 + CLUTTER_UNITS_FROM_INT (height);
- _clutter_actor_request_coords_real (self, &box);
+ clutter_actor_request_coords (self, &box);
}
/**
*height = clutter_actor_get_height (self);
}
+/**
+ * clutter_actor_get_abs_position
+ * @self: A #ClutterActor
+ * @x: Location to store x position if non NULL.
+ * @y: Location to store y position if non NULL.
+ *
+ * Gets the absolute position of an actor in pixels relative
+ * to the stage.
+ */
+void
+clutter_actor_get_abs_position (ClutterActor *self,
+ gint *x,
+ gint *y)
+{
+ gint32 xu, yu;
+ clutter_actor_get_abs_position_units (self, &xu, &yu);
+
+ *x = CLUTTER_UNITS_TO_INT (xu);
+ *y = CLUTTER_UNITS_TO_INT (yu);
+}
+
+/**
+ * clutter_actor_get_abs_position_units
+ * @self: A #ClutterActor
+ * @x: Location to store x position if non NULL.
+ * @y: Location to store y position if non NULL.
+ *
+ * Gets the absolute position of an actor in clutter units relative
+ * to the stage.
+ *
+ * Since: 0.4
+ */
void
-_clutter_actor_get_abs_position_real (ClutterActor *self,
- ClutterReal *x,
- ClutterReal *y)
+clutter_actor_get_abs_position_units (ClutterActor *self,
+ gint32 *x,
+ gint32 *y)
{
- ClutterActorBoxReal box;
- ClutterActor *parent;
- ClutterReal px = 0, py = 0;
+ ClutterActorBox box;
+ ClutterActor *parent;
+ gint32 px = 0, py = 0;
g_return_if_fail (CLUTTER_IS_ACTOR (self));
- _clutter_actor_allocate_coords_real (self, &box);
+ clutter_actor_allocate_coords (self, &box);
parent = self->priv->parent_actor;
if (parent)
{
ClutterFixed parent_scale_x, parent_scale_y;
- ClutterReal sx, sy;
clutter_actor_get_scalex (parent,
&parent_scale_x,
&parent_scale_y);
- sx = CLUTTER_REAL_FROM_FIXED (parent_scale_x);
- sy = CLUTTER_REAL_FROM_FIXED (parent_scale_y);
-
if (parent_scale_x != CFX_ONE ||
parent_scale_y != CFX_ONE)
{
- box.x1 = CLUTTER_REAL_MUL (box.x1, sx);
- box.y1 = CLUTTER_REAL_MUL (box.y1, sy);
+ box.x1 = CFX_MUL (box.x1, parent_scale_x);
+ box.y1 = CFX_MUL (box.y1, parent_scale_y);
}
if (!CLUTTER_IS_STAGE (parent))
- _clutter_actor_get_abs_position_real (parent, &px, &py);
+ clutter_actor_get_abs_position_units (parent, &px, &py);
}
if (x)
}
/**
- * clutter_actor_get_abs_position
+ * clutter_actor_get_abs_size:
* @self: A #ClutterActor
- * @x: Location to store x position if non NULL.
- * @y: Location to store y position if non NULL.
+ * @width: Location to store width if non NULL.
+ * @height: Location to store height if non NULL.
*
- * Gets the absolute position of an actor in pixels relative
- * to the stage.
+ * Gets the absolute size of an actor taking into account
+ * an scaling factors
*/
void
-clutter_actor_get_abs_position (ClutterActor *self,
- gint *x,
- gint *y)
+clutter_actor_get_abs_size (ClutterActor *self,
+ guint *width,
+ guint *height)
{
- ClutterReal xr, yr;
- _clutter_actor_get_abs_position_real (self, &xr, &yr);
-
- if (x)
- *x = CLUTTER_REAL_TO_INT (xr);
-
- if (y)
- *y = CLUTTER_REAL_TO_INT (yr);
+ gint32 wu, hu;
+ clutter_actor_get_abs_size_units (self, &wu, &hu);
+
+ *width = CLUTTER_UNITS_TO_INT (wu);
+ *height = CLUTTER_UNITS_TO_INT (hu);
}
/**
- * clutter_actor_get_abs_size:
+ * clutter_actor_get_abs_size_units:
* @self: A #ClutterActor
* @width: Location to store width if non NULL.
* @height: Location to store height if non NULL.
*
- * Gets the absolute size of an actor taking into account
- * an scaling factors
+ * Gets the absolute size of an actor in clutter units taking into account
+ * an scaling factors.
+ *
+ * Since: 0.4
*/
void
-clutter_actor_get_abs_size (ClutterActor *self,
- guint *width,
- guint *height)
+clutter_actor_get_abs_size_units (ClutterActor *self,
+ gint32 *width,
+ gint32 *height)
{
ClutterActorBox box;
ClutterActor *parent;
if (width)
{
- fx = CLUTTER_FIXED_MUL (CLUTTER_INT_TO_FIXED (*width),
- parent->priv->scale_x);
- *width = CLUTTER_FIXED_INT (fx);
+ fx = CLUTTER_FIXED_MUL (CLUTTER_UNITS_TO_FIXED (*width),
+ parent->priv->scale_x);
+ *width = CLUTTER_UNITS_FROM_FIXED (fx);
}
if (height)
{
- fy = CLUTTER_FIXED_MUL (CLUTTER_INT_TO_FIXED (*height),
- parent->priv->scale_x);
- *height = CLUTTER_FIXED_INT (fy);
- }
- }
- }
- while ((parent = clutter_actor_get_parent (parent)) != NULL);
-}
-
-static void
-_clutter_actor_get_abs_size_real (ClutterActor *self,
- ClutterReal *width,
- ClutterReal *height)
-{
- ClutterActorBoxReal box;
- ClutterActor *parent;
-
- _clutter_actor_allocate_coords_real (self, &box);
-
- if (width)
- *width = box.x2 - box.x1;
-
- if (height)
- *height = box.y2 - box.y1;
-
- parent = self;
-
- do
- {
- if (parent->priv->scale_x != CFX_ONE ||
- parent->priv->scale_y != CFX_ONE)
- {
-
- if (width)
- {
- ClutterReal scale = CLUTTER_REAL_FROM_FIXED (parent->priv->scale_x);
- *width = CLUTTER_REAL_MUL (*width, scale);
- }
-
- if (height)
- {
- ClutterReal scale = CLUTTER_REAL_FROM_FIXED (parent->priv->scale_y);
- *height = CLUTTER_REAL_MUL (*height, scale);
+ fy = CLUTTER_FIXED_MUL (CLUTTER_UNITS_TO_FIXED (*height),
+ parent->priv->scale_x);
+ *height = CLUTTER_UNITS_FROM_FIXED (fy);
}
}
}
clutter_actor_allocate_coords (self, &box);
- return box.x2 - box.x1;
+ return CLUTTER_UNITS_TO_INT (box.x2 - box.x1);
}
/**
clutter_actor_allocate_coords (self, &box);
- return box.y2 - box.y1;
+ return CLUTTER_UNITS_TO_INT (box.y2 - box.y1);
}
/**
clutter_actor_allocate_coords (self, &box);
- return box.x1;
-}
-
-static ClutterReal
-_clutter_actor_get_x_real (ClutterActor *self)
-{
- ClutterActorBoxReal box;
-
- g_return_val_if_fail (CLUTTER_IS_ACTOR (self), 0);
-
- _clutter_actor_allocate_coords_real (self, &box);
-
- return box.x1;
+ return CLUTTER_UNITS_TO_INT (box.x1);
}
/**
clutter_actor_allocate_coords (self, &box);
- return box.y1;
-}
-
-static ClutterReal
-_clutter_actor_get_y_real (ClutterActor *self)
-{
- ClutterActorBoxReal box;
-
- g_return_val_if_fail (CLUTTER_IS_ACTOR (self), 0);
-
- _clutter_actor_allocate_coords_real (self, &box);
-
- return box.y1;
+ return CLUTTER_UNITS_TO_INT (box.y1);
}
/**
ClutterFixed scale_y,
ClutterGravity gravity)
{
- ClutterReal sw, sh, w, h;
- ClutterReal x, y;
+ ClutterActorBox box;
+ gint32 sw, sh, w, h;
+ gint32 x, y;
- _clutter_actor_get_abs_size_real (self, &w, &h);
+ clutter_actor_get_abs_size_units (self, &w, &h);
clutter_actor_set_scalex (self, scale_x, scale_y);
if (gravity == CLUTTER_GRAVITY_NONE ||
gravity == CLUTTER_GRAVITY_NORTH_WEST)
return;
- _clutter_actor_get_abs_size_real (self, &sw, &sh);
-
- x = _clutter_actor_get_x_real (self);
- y = _clutter_actor_get_y_real (self);
+ clutter_actor_get_abs_size_units (self, &sw, &sh);
+ clutter_actor_allocate_coords (self, &box);
+ x = box.x1;
+ y = box.y1;
+
switch (gravity)
{
case CLUTTER_GRAVITY_NORTH:
break;
}
- _clutter_actor_set_position_real (self, x, y);
+ box.x2 += (x - box.x1);
+ box.y2 += (y - box.y1);
+ box.x1 = x;
+ box.y1 = y;
+
+ clutter_actor_request_coords (self, &box);
}
/**
*/
void
clutter_actor_set_opacity (ClutterActor *self,
- guint8 opacity)
+ guint8 opacity)
{
g_return_if_fail (CLUTTER_IS_ACTOR (self));
return our_type;
}
-/*
- * ClutterActorBoxReal
- */
-static ClutterActorBoxReal *
-clutter_actor_box_real_copy (const ClutterActorBoxReal *box)
-{
- ClutterActorBoxReal *result = g_new (ClutterActorBoxReal, 1);
-
- *result = *box;
-
- return result;
-}
-
-GType
-clutter_actor_box_real_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0)
- our_type = g_boxed_type_register_static (
- g_intern_static_string ("ClutterActorBoxReal"),
- (GBoxedCopyFunc) clutter_actor_box_real_copy,
- (GBoxedFreeFunc) g_free);
- return our_type;
-}
/* clutter-actor.h */
#include <glib-object.h>
-
-#include "clutter-real.h"
+#include <clutter/clutter-fixed.h>
G_BEGIN_DECLS
typedef struct _ClutterActor ClutterActor;
typedef struct _ClutterActorClass ClutterActorClass;
typedef struct _ClutterActorBox ClutterActorBox;
-typedef struct _ClutterActorBoxReal ClutterActorBoxReal;
typedef struct _ClutterActorPrivate ClutterActorPrivate;
typedef struct _ClutterGeometry ClutterGeometry;
/* FIXME:
* It is likely gonna save a load of pain if we make
* x,y unsigned...
- */
- gint x;
- gint y;
- guint width;
- guint height;
+ *
+ * No, no, no, usigned is evil; we should make width and height signed.
+ */
+ gint x;
+ gint y;
+ guint width;
+ guint height;
};
GType clutter_geometry_get_type (void) G_GNUC_CONST;
CLUTTER_ACTOR_REALIZED = 1 << 2
} ClutterActorFlags;
-struct _ClutterActorBox { gint x1, y1, x2, y2; };
-struct _ClutterActorBoxReal { ClutterReal x1, y1, x2, y2; };
+struct _ClutterActorBox { gint32 x1, y1, x2, y2; };
GType clutter_actor_box_get_type (void) G_GNUC_CONST;
void (* unrealize) (ClutterActor *actor);
void (* paint) (ClutterActor *actor);
void (* request_coords) (ClutterActor *actor,
- ClutterActorBoxReal *box);
+ ClutterActorBox *box);
void (* allocate_coords) (ClutterActor *actor,
- ClutterActorBoxReal *box);
+ ClutterActorBox *box);
void (* set_depth) (ClutterActor *actor,
gint depth);
gint (* get_depth) (ClutterActor *actor);
void clutter_actor_get_abs_position (ClutterActor *self,
gint *x,
gint *y);
+void clutter_actor_get_abs_position_units (ClutterActor *self,
+ gint32 *x,
+ gint32 *y);
guint clutter_actor_get_width (ClutterActor *self);
guint clutter_actor_get_height (ClutterActor *self);
void clutter_actor_get_abs_size (ClutterActor *self,
guint *width,
guint *height);
+void clutter_actor_get_abs_size_units (ClutterActor *self,
+ gint32 *width,
+ gint32 *height);
void clutter_actor_get_size (ClutterActor *self,
guint *width,
guint *height);
gint dx,
gint dy);
-/*<private*/
-void _clutter_actor_request_coords_real (ClutterActor *self,
- ClutterActorBoxReal *rbox);
-
-void _clutter_actor_allocate_coords_real (ClutterActor *self,
- ClutterActorBoxReal *rbox);
-
G_END_DECLS
#endif /* _HAVE_CLUTTER_ACTOR_H */
static void
clutter_group_request_coords (ClutterActor *self,
- ClutterActorBoxReal *box)
+ ClutterActorBox *box)
{
- ClutterActorBoxReal cbox;
+ ClutterActorBox cbox;
- _clutter_actor_allocate_coords_real (self, &cbox);
+ clutter_actor_allocate_coords (self, &cbox);
/* Only positioning works.
* Sizing requests fail, use scale() instead
static void
clutter_group_allocate_coords (ClutterActor *self,
- ClutterActorBoxReal *box)
+ ClutterActorBox *box)
{
ClutterGroupPrivate *priv;
GList *child_item;
/* Once added we include in sizing - doesn't matter if visible */
/* if (CLUTTER_ACTOR_IS_VISIBLE (child)) */
{
- ClutterActorBoxReal cbox;
+ ClutterActorBox cbox;
- _clutter_actor_allocate_coords_real (child, &cbox);
+ clutter_actor_allocate_coords (child, &cbox);
/* Ignore any children with offscreen ( negaive )
* positions.
*
* Also x1 and x2 will be set by parent caller.
*/
- if (CLUTTER_REAL_EZ (box->x2) ||
- CLUTTER_REAL_GT (cbox.x2, box->x2))
+ if (box->x2 == 0 || cbox.x2 > box->x2)
box->x2 = cbox.x2;
- if (CLUTTER_REAL_EZ (box->y2) ||
- CLUTTER_REAL_GT (cbox.y2, box->y2))
+ if (box->y2 == 0 || cbox.y2 > box->y2)
box->y2 = cbox.y2;
}
}
#include "clutter-enum-types.h"
#include "clutter-private.h"
#include "clutter-debug.h"
+#include "clutter-units.h"
#include "pangoclutter.h"
static void
clutter_label_allocate_coords (ClutterActor *self,
- ClutterActorBoxReal *box)
+ ClutterActorBox *box)
{
ClutterLabel *label = CLUTTER_LABEL(self);
ClutterLabelPrivate *priv;
priv = label->priv;
- clutter_label_ensure_layout (label, CLUTTER_REAL_TO_INT (box->x2 - box->x1));
+ clutter_label_ensure_layout (label, CLUTTER_UNITS_TO_INT (box->x2 - box->x1));
pango_layout_get_extents (priv->layout, NULL, &logical_rect);
- box->x2 = box->x1 + PANGO_PIXELS (logical_rect.width);
- box->y2 = box->y1 + PANGO_PIXELS (logical_rect.height);
+ box->x2 = box->x1 + CLUTTER_UNITS_FROM_PANGO_UNIT (logical_rect.width);
+ box->y2 = box->y1 + CLUTTER_UNITS_FROM_PANGO_UNIT (logical_rect.height);
return;
}
static void
clutter_label_request_coords (ClutterActor *self,
- ClutterActorBoxReal *box)
+ ClutterActorBox *box)
{
/* do we need to do anything ? */
clutter_label_clear_layout (CLUTTER_LABEL(self));
+++ /dev/null
-/* -*- mode:C; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Clutter.
- *
- * An OpenGL based 'interactive canvas' library.
- *
- * Authored By Tomas Frydrych <tf@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * SECTION:clutter-real
- * @short_description: An abstract numeric type encapsulating either float
- * or fixed point number, depending whether clutter was configured using
- * FPU or not.
- *
- * Since: 0.4
- */
-
-#ifndef _HAVE_CLUTTER_REAL_H
-#define _HAVE_CLUTTER_REAL_H
-
-#include "clutter-fixed.h"
-
-#if 1
-#if CLUTTER_NO_FPU
-
-#define CLUTTER_REAL_IS_FIXED() 1
-#define CLUTTER_REAL_IS_FLOAT() 0
-
-typedef ClutterFixed ClutterReal;
-
-#define CLUTTER_REAL_MUL(x,y) CFX_MUL((x),(y))
-#define CLUTTER_REAL_DIV(x,y) CFX_DIV((x),(y))
-#define CLUTTER_REAL_ADD_INT(x,i) ((x) + CLUTTER_INT_TO_FIXED(i))
-#define CLUTTER_REAL_SUB_INT(x,i) ((x) - CLUTTER_INT_TO_FIXED(i))
-
-#define CLUTTER_REAL_TO_INT(x) CFX_INT((x) + (CFX_ONE >> 1))
-#define CLUTTER_REAL_FROM_INT(i) CLUTTER_INT_TO_FIXED(i)
-
-#define CLUTTER_REAL_TO_FLOAT(x) CLUTTER_FIXED_TO_FLOAT(x)
-#define CLUTTER_REAL_FROM_FLOAT(f) CLUTTER_FLOAT_TO_FIXED(f)
-
-#define CLUTTER_REAL_TO_FIXED(x) (x)
-#define CLUTTER_REAL_FROM_FIXED(x) (x)
-
-#define CLUTTER_REAL_ZERO 0
-
-#else
-
-#define CLUTTER_REAL_IS_FIXED() 0
-#define CLUTTER_REAL_IS_FLOAT() 1
-
-typedef float ClutterReal;
-
-#define CLUTTER_REAL_MUL(x,y) ((x)*(y))
-#define CLUTTER_REAL_DIV(x,y) ((x)/(y))
-#define CLUTTER_REAL_ADD_INT(x,i) (x+i)
-#define CLUTTER_REAL_SUB_INT(x,i) (x-i)
-
-#define CLUTTER_REAL_TO_INT(x) CLUTTER_FLOAT_TO_INT(x+0.5)
-#define CLUTTER_REAL_FROM_INT(i) ((float)i)
-
-#define CLUTTER_REAL_TO_FLOAT(x) (x)
-#define CLUTTER_REAL_FROM_FLOAT(f) (f)
-
-#define CLUTTER_REAL_TO_FIXED(x) CLLUTER_FLOAT_TO_FIXED(x)
-#define CLUTTER_REAL_FROM_FIXED(x) CLUTTER_FIXED_TO_FLOAT(x)
-
-#define CLUTTER_REAL_ZERO 0.0
-
-#endif
-
-#else
-/*
- * This is an int defintion for reference / debugging purposes only
- *
- * FIXME : remove this when no longer needed.
- */
-typedef gint ClutterReal;
-
-#define CLUTTER_REAL_MUL(x,y) ((x)*(y))
-#define CLUTTER_REAL_DIV(x,y) ((x)/(y))
-#define CLUTTER_REAL_ADD_INT(x,i) (x + i)
-#define CLUTTER_REAL_SUB_INT(x,i) (x - i)
-
-#define CLUTTER_REAL_TO_INT(x) (x)
-#define CLUTTER_REAL_FROM_INT(i) (i)
-
-#define CLUTTER_REAL_TO_FLOAT(x) ((float)(x))
-#define CLUTTER_REAL_FROM_FLOAT(f) ((gint)(f))
-
-#define CLUTTER_REAL_TO_FIXED(x) CLUTTER_INT_TO_FIXED(x)
-#define CLUTTER_REAL_FROM_FIXED(x) CFX_INT(x)
-
-#define CLUTTER_REAL_ZERO 0
-
-#endif
-
-#define CLUTTER_REAL_EZ(x) (CLUTTER_REAL_TO_INT(x) == 0)
-#define CLUTTER_REAL_NZ(x) (CLUTTER_REAL_TO_INT(x) != 0)
-#define CLUTTER_REAL_EQ(x,y) (CLUTTER_REAL_TO_INT(x) == CLUTTER_REAL_TO_INT(y))
-#define CLUTTER_REAL_NE(x,y) (CLUTTER_REAL_TO_INT(x) != CLUTTER_REAL_TO_INT(y))
-#define CLUTTER_REAL_LT(x,y) (CLUTTER_REAL_TO_INT(x) < CLUTTER_REAL_TO_INT(y))
-#define CLUTTER_REAL_GT(x,y) (CLUTTER_REAL_TO_INT(x) > CLUTTER_REAL_TO_INT(y))
-#define CLUTTER_REAL_LE(x,y) (CLUTTER_REAL_TO_INT(x) <= CLUTTER_REAL_TO_INT(y))
-#define CLUTTER_REAL_GE(x,y) (CLUTTER_REAL_TO_INT(x) >= CLUTTER_REAL_TO_INT(y))
-
-#endif /* ifndef _HAVE_CLUTTER_REAL_H */
--- /dev/null
+/* -*- mode:C; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Clutter.
+ *
+ * An OpenGL based 'interactive canvas' library.
+ *
+ * Authored By Tomas Frydrych <tf@openedhand.com>
+ *
+ * Copyright (C) 2007 OpenedHand
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:clutter-units
+ * @short_description: A logical distance unit.
+ *
+ * Clutter units are logical units with granularity greater than that of the
+ * device units; they are used by #ClutterActorBox and the _units() family of
+ * ClutterActor functions. To convert between clutter units and device units,
+ * use #CLUTTER_UNITS_FROM_DEVICE and #CLUTTER_UNITS_TO_DEVICE macros.
+ *
+ * Note: It is expected that as of version 0.6 all dimensions in the public
+ * Clutter API will be given in clutter units. In order to ease the transition,
+ * two extra macros have been provided, #CLUTTER_UNITS_TMP_TO_DEVICE and
+ * #CLUTTER_UNITS_TMP_FROM_DEVICE. In version 0.4 these are identity macros,
+ * but when the API transition happens will map to #CLUTTER_UNITS_TO_DEVICE and
+ * #CLUTTER_UNITS_FROM_DEVICE respectively. You can use these in newly written
+ * code as place holders.
+ *
+ * Since: 0.4
+ */
+
+#ifndef _HAVE_CLUTTER_UNITS_H
+#define _HAVE_CLUTTER_UNITS_H
+
+#include <clutter/clutter-fixed.h>
+
+/*
+ * Currently CLUTTER_UNIT maps directly onto ClutterFixed. Nevertheless, the
+ * _FROM_FIXED and _TO_FIXED macros should always be used in case that we
+ * decide to change this relationship in the future.
+ */
+#define CLUTTER_UNITS_FROM_DEVICE(x) CLUTTER_UNITS_FROM_INT (x)
+#define CLUTTER_UNITS_TO_DEVICE(x) CLUTTER_UNITS_TO_INT (x)
+
+#define CLUTTER_UNITS_TMP_FROM_DEVICE(x) (x)
+#define CLUTTER_UNITS_TMP_TO_DEVICE(x) (x)
+
+#define CLUTTER_UNITS_FROM_INT(x) CLUTTER_INT_TO_FIXED (x)
+#define CLUTTER_UNITS_TO_INT(x) CFX_INT (x)
+
+#define CLUTTER_UNITS_FROM_FLOAT(x) CLUTTER_FLOAT_TO_FIXED (x)
+#define CLUTTER_UNITS_TO_FLOAT(x) CLUTTER_FIXED_TO_FLOAT (x)
+
+#define CLUTTER_UNITS_FROM_FIXED(x) (x)
+#define CLUTTER_UNITS_TO_FIXED(x) (x)
+
+#define CLUTTER_UNITS_FROM_PANGO_UNIT(x) (x << 6)
+
+#endif /* _HAVE_CLUTTER_UNITS_H */
#include "clutter-feature.h"
#include "clutter-version.h"
#include "clutter-enum-types.h"
+#include "clutter-units.h"
#endif
#include "../clutter-enum-types.h"
#include "../clutter-private.h"
#include "../clutter-debug.h"
+#include "../clutter-units.h"
#ifdef HAVE_XFIXES
#include <X11/extensions/Xfixes.h>
static void
clutter_stage_egl_allocate_coords (ClutterActor *self,
- ClutterActorBoxReal *box)
+ ClutterActorBox *box)
{
ClutterStageEgl *stage_egl = CLUTTER_STAGE_EGL (self);
box->x1 = box->y1 = 0;
- box->x2 = CLUTTER_REAL_ADD_INT (box->x1, stage_egl->xwin_width);
- box->y2 = CLUTTER_REAL_ADD_INT (box->y1, stage_egl->xwin_height);
+ box->x2 = box->x1 + CLUTTER_UNITS_FROM_INT (stage_egl->xwin_width);
+ box->y2 = box->y1 + CLUTTER_UNITS_FROM_INT (stage_egl->xwin_height);
}
static void
clutter_stage_egl_request_coords (ClutterActor *self,
- ClutterActorBoxReal *box)
+ ClutterActorBox *box)
{
ClutterStageEgl *stage_egl = CLUTTER_STAGE_EGL (self);
gint new_width, new_height;
/* FIXME: some how have X configure_notfiys call this ? */
- new_width = ABS (CLUTTER_REAL_TO_INT (box->x2 - box->x1));
- new_height = ABS (CLUTTER_REAL_TO_INT (box->y2 - box->y1));
+ new_width = ABS (CLUTTER_UNITS_TO_INT (box->x2 - box->x1));
+ new_height = ABS (CLUTTER_UNITS_TO_INT (box->y2 - box->y1));
if (new_width != stage_egl->xwin_width ||
new_height != stage_egl->xwin_height)
if (stage_egl->xwin != None) /* Do we want to bother ? */
XMoveWindow (stage_egl->xdpy,
stage_egl->xwin,
- CLUTTER_REAL_TO_INT (box->x1),
- CLUTTER_REAL_TO_INT (box->y1));
+ CLUTTER_UNITS_TO_INT (box->x1),
+ CLUTTER_UNITS_TO_INT (box->y1));
}
static void
#include "../clutter-enum-types.h"
#include "../clutter-private.h"
#include "../clutter-debug.h"
+#include "../clutter-units.h"
#include "cogl.h"
static void
clutter_stage_glx_allocate_coords (ClutterActor *self,
- ClutterActorBoxReal *box)
+ ClutterActorBox *box)
{
ClutterStageGlx *stage_glx = CLUTTER_STAGE_GLX (self);
box->x1 = box->y1 = 0;
- box->x2 = CLUTTER_REAL_ADD_INT (box->x1, stage_glx->xwin_width);
- box->y2 = CLUTTER_REAL_ADD_INT (box->y1, stage_glx->xwin_height);
+ box->x2 = box->x1 + CLUTTER_UNITS_FROM_INT (stage_glx->xwin_width);
+ box->y2 = box->y1 + CLUTTER_UNITS_FROM_INT (stage_glx->xwin_height);
}
static void
clutter_stage_glx_request_coords (ClutterActor *self,
- ClutterActorBoxReal *box)
+ ClutterActorBox *box)
{
ClutterStageGlx *stage_glx = CLUTTER_STAGE_GLX (self);
gint new_width, new_height;
- new_width = ABS (CLUTTER_REAL_TO_INT (box->x2 - box->x1));
- new_height = ABS (CLUTTER_REAL_TO_INT (box->y2 - box->y1));
+ new_width = ABS (CLUTTER_UNITS_TO_INT (box->x2 - box->x1));
+ new_height = ABS (CLUTTER_UNITS_TO_INT (box->y2 - box->y1));
if (new_width != stage_glx->xwin_width ||
new_height != stage_glx->xwin_height)
if (stage_glx->xwin != None) /* Do we want to bother ? */
XMoveWindow (stage_glx->xdpy,
stage_glx->xwin,
- CLUTTER_REAL_TO_INT (box->x1),
- CLUTTER_REAL_TO_INT (box->y1));
+ CLUTTER_UNITS_TO_INT (box->x1),
+ CLUTTER_UNITS_TO_INT (box->y1));
}
static void
#include "../clutter-enum-types.h"
#include "../clutter-private.h"
#include "../clutter-debug.h"
+#include "../clutter-units.h"
#include "cogl.h"
ClutterStageSDL *stage_sdl = CLUTTER_STAGE_SDL (self);
box->x1 = box->y1 = 0;
- box->x2 = box->x1 + stage_sdl->win_width;
- box->y2 = box->y1 + stage_sdl->win_height;
+ box->x2 = box->x1 + CLUTTER_UNITS_FROM_INT (stage_sdl->win_width);
+ box->y2 = box->y1 + CLUTTER_UNITS_FROM_INT (stage_sdl->win_height);
}
static void
gint new_width, new_height;
/* FIXME: some how have X configure_notfiys call this ? */
- new_width = ABS (box->x2 - box->x1);
- new_height = ABS (box->y2 - box->y1);
+ new_width = ABS (CLUTTER_UNITS_TO_INT (box->x2 - box->x1));
+ new_height = ABS (CLUTTER_UNITS_TO_INT (box->y2 - box->y1));
if (new_width != stage_sdl->win_width ||
new_height != stage_sdl->win_height)
fi
CLUTTER_NO_FPU="0"
-CLUTTER_REAL=""
-
AC_ARG_WITH(fpu,
AS_HELP_STRING([--without-fpu],
[Assume target hardware has no fpu]),
if test "x$with_fpu" != "xyes" ; then
CLUTTER_NO_FPU="1"
- CLUTTER_REAL="-fx"
fi
AC_SUBST(CLUTTER_NO_FPU)
-AC_SUBST(CLUTTER_REAL)
clutterbackend=glx
AC_ARG_WITH([flavour],
+2007-05-22 Tomas Frydrych <tf@openedhand.com>
+
+ * clutter-sections.txt:
+ * clutter-docs.sgml:
+ * tmpl/clutter-units.sgml:
+ Added clutter-units.
+
+ * tmpl/clutter-alpha.sgml:
+ * tmpl/clutter-actor.sgml:
+ * tmpl/clutter-media.sgml:
+ Updated templates.
+
2007-05-17 Emmanuele Bassi <ebassi@openedhand.com>
* Makefile.am: Ignore the sdl backend.
<xi:include href="xml/clutter-util.xml"/>
<xi:include href="xml/clutter-fixed.xml"/>
<xi:include href="xml/clutter-version.xml"/>
+ <xi:include href="xml/clutter-units.xml"/>
</chapter>
<chapter>
<title>Clutter Backends</title>
</SECTION>
<SECTION>
+<FILE>clutter-units</FILE>
+<TITLE>clutter-units</TITLE>
+CLUTTER_UNITS_FROM_DEVICE
+CLUTTER_UNITS_FROM_FIXED
+CLUTTER_UNITS_FROM_FLOAT
+CLUTTER_UNITS_FROM_INT
+CLUTTER_UNITS_FROM_PANGO_UNIT
+CLUTTER_UNITS_TMP_FROM_DEVICE
+CLUTTER_UNITS_TMP_TO_DEVICE
+CLUTTER_UNITS_TO_DEVICE
+CLUTTER_UNITS_TO_FIXED
+CLUTTER_UNITS_TO_FLOAT
+CLUTTER_UNITS_TO_INT
+</SECTION>
+
+<SECTION>
<FILE>clutter-label</FILE>
<TITLE>ClutterLabel</TITLE>
ClutterLabel
<!-- ##### STRUCT ClutterActorBox ##### -->
<para>
-Coordinates (top-left to bottom-right) of a box surrounding an actor.
+Coordinates (top-left to bottom-right) of a box surrounding an actor; in
+cluttter units.
</para>
@x1: X coordinate of the top left corner of the box
@Returns:
+<!-- ##### MACRO CLUTTER_ALPHA_SINE_INC ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION clutter_sine_inc_func ##### -->
+<para>
+
+</para>
+
+@alpha:
+@dummy:
+@Returns:
+
+
+<!-- ##### MACRO CLUTTER_ALPHA_SINE_DEC ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION clutter_sine_dec_func ##### -->
+<para>
+
+</para>
+
+@alpha:
+@dummy:
+@Returns:
+
+
+<!-- ##### MACRO CLUTTER_ALPHA_SINE_HALF ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION clutter_sine_half_func ##### -->
+<para>
+
+</para>
+
+@alpha:
+@dummy:
+@Returns:
+
+
<!-- ##### MACRO CLUTTER_ALPHA_SQUARE ##### -->
<para>
@Returns:
+<!-- ##### MACRO CLUTTER_ALPHA_EXP_INC ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION clutter_exp_inc_func ##### -->
+<para>
+
+</para>
+
+@alpha:
+@dummy:
+@Returns:
+
+
+<!-- ##### MACRO CLUTTER_ALPHA_EXP_DEC ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION clutter_exp_dec_func ##### -->
+<para>
+
+</para>
+
+@alpha:
+@dummy:
+@Returns:
+
+
</para>
-<!-- ##### SIGNAL ClutterMedia::eos ##### -->
-<para>
-
-</para>
-
-@cluttermedia: the object which received the signal.
-
-<!-- ##### SIGNAL ClutterMedia::error ##### -->
-<para>
-
-</para>
-
-@cluttermedia: the object which received the signal.
-@arg1:
-
<!-- ##### ARG ClutterMedia:buffer-percent ##### -->
<para>
--- /dev/null
+<!-- ##### SECTION Title ##### -->
+Clutter Units
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO CLUTTER_UNITS_FROM_DEVICE ##### -->
+<para>
+
+</para>
+
+@x:
+
+
+<!-- ##### MACRO CLUTTER_UNITS_FROM_FIXED ##### -->
+<para>
+
+</para>
+
+@x:
+
+
+<!-- ##### MACRO CLUTTER_UNITS_FROM_FLOAT ##### -->
+<para>
+
+</para>
+
+@x:
+
+
+<!-- ##### MACRO CLUTTER_UNITS_FROM_INT ##### -->
+<para>
+
+</para>
+
+@x:
+
+
+<!-- ##### MACRO CLUTTER_UNITS_FROM_PANGO_UNIT ##### -->
+<para>
+
+</para>
+
+@x:
+
+
+<!-- ##### MACRO CLUTTER_UNITS_TMP_FROM_DEVICE ##### -->
+<para>
+
+</para>
+
+@x:
+
+
+<!-- ##### MACRO CLUTTER_UNITS_TMP_TO_DEVICE ##### -->
+<para>
+
+</para>
+
+@x:
+
+
+<!-- ##### MACRO CLUTTER_UNITS_TO_DEVICE ##### -->
+<para>
+
+</para>
+
+@x:
+
+
+<!-- ##### MACRO CLUTTER_UNITS_TO_FIXED ##### -->
+<para>
+
+</para>
+
+@x:
+
+
+<!-- ##### MACRO CLUTTER_UNITS_TO_FLOAT ##### -->
+<para>
+
+</para>
+
+@x:
+
+
+<!-- ##### MACRO CLUTTER_UNITS_TO_INT ##### -->
+<para>
+
+</para>
+
+@x:
+
+
noinst_PROGRAMS = test super-oh behave test-text slider
INCLUDES = -I$(top_srcdir)/
-LDADD = $(top_builddir)/clutter/libclutter@CLUTTER_REAL@-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
+LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
AM_CFLAGS = $(CLUTTER_CFLAGS)
LDFLAGS = $(CLUTTER_LIBS)
noinst_PROGRAMS = test-textures test-events
INCLUDES = -I$(top_srcdir)/
-LDADD = $(top_builddir)/clutter/libclutter@CLUTTER_REAL@-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
+LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
AM_CFLAGS = $(CLUTTER_CFLAGS)
LDFLAGS = $(CLUTTER_LIBS)