2007-08-03 09:52:52 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
/* -*- mode:C; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
|
|
|
/*
|
|
|
|
* Clutter.
|
|
|
|
*
|
|
|
|
* An OpenGL based 'interactive canvas' library.
|
|
|
|
*
|
2009-06-19 15:38:35 +00:00
|
|
|
* Authored By Tomas Frydrych <tf@openedhand.com>
|
2007-04-30 08:39:11 +00:00
|
|
|
*
|
2009-06-19 15:38:35 +00:00
|
|
|
* Copyright (C) 2007 OpenedHand Ltd
|
|
|
|
* Copyright (C) 2009 Intel Corp.
|
2007-04-30 08:39:11 +00:00
|
|
|
*
|
|
|
|
* 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
|
2010-03-01 12:56:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2007-04-30 08:39:11 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SECTION:clutter-behaviour-ellipse
|
2007-11-19 16:35:46 +00:00
|
|
|
* @short_description: A behaviour interpolating position along an ellipse
|
2007-04-30 08:39:11 +00:00
|
|
|
*
|
|
|
|
* #ClutterBehaviourEllipse interpolates actors along a path defined by
|
2007-06-01 10:00:35 +00:00
|
|
|
* an ellipse.
|
2007-04-30 08:39:11 +00:00
|
|
|
*
|
2008-11-13 10:54:06 +00:00
|
|
|
* <note><para>When applying an ellipse behaviour to an actor, the
|
|
|
|
* behaviour will update the actor's position and depth and set them
|
|
|
|
* to what is dictated by the ellipses initial position.</para></note>
|
2007-08-07 12:17:15 +00:00
|
|
|
*
|
2007-04-30 08:39:11 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
|
2010-06-03 11:56:17 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2010-10-21 11:16:05 +00:00
|
|
|
#include <math.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
#include "clutter-fixed.h"
|
|
|
|
#include "clutter-marshal.h"
|
|
|
|
#include "clutter-behaviour-ellipse.h"
|
2007-07-22 22:35:45 +00:00
|
|
|
#include "clutter-debug.h"
|
2007-04-30 08:39:11 +00:00
|
|
|
#include "clutter-enum-types.h"
|
|
|
|
#include "clutter-private.h"
|
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
G_DEFINE_TYPE (ClutterBehaviourEllipse,
|
2007-04-30 08:39:11 +00:00
|
|
|
clutter_behaviour_ellipse,
|
|
|
|
CLUTTER_TYPE_BEHAVIOUR);
|
|
|
|
|
|
|
|
#define CLUTTER_BEHAVIOUR_ELLIPSE_GET_PRIVATE(obj) \
|
|
|
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
|
|
|
|
CLUTTER_TYPE_BEHAVIOUR_ELLIPSE, \
|
|
|
|
ClutterBehaviourEllipsePrivate))
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
|
|
|
|
|
|
|
PROP_CENTER,
|
|
|
|
PROP_WIDTH,
|
|
|
|
PROP_HEIGHT,
|
2007-11-13 13:21:56 +00:00
|
|
|
PROP_ANGLE_START,
|
2007-04-30 08:39:11 +00:00
|
|
|
PROP_ANGLE_END,
|
2007-07-27 08:18:41 +00:00
|
|
|
PROP_ANGLE_TILT_X,
|
|
|
|
PROP_ANGLE_TILT_Y,
|
|
|
|
PROP_ANGLE_TILT_Z,
|
2007-07-26 13:48:44 +00:00
|
|
|
PROP_DIRECTION,
|
2010-06-21 09:20:32 +00:00
|
|
|
|
|
|
|
PROP_LAST
|
2007-04-30 08:39:11 +00:00
|
|
|
};
|
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
static GParamSpec *obj_props[PROP_LAST];
|
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
struct _ClutterBehaviourEllipsePrivate
|
|
|
|
{
|
|
|
|
ClutterKnot center;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
/* a = width / 2 */
|
2009-01-23 16:50:17 +00:00
|
|
|
gint a;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
|
|
|
/* b = height / 2 */
|
2009-01-23 16:50:17 +00:00
|
|
|
gint b;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
gdouble angle_start;
|
|
|
|
gdouble angle_end;
|
|
|
|
|
|
|
|
gdouble angle_tilt_x;
|
|
|
|
gdouble angle_tilt_y;
|
|
|
|
gdouble angle_tilt_z;
|
2007-07-26 13:48:50 +00:00
|
|
|
|
2007-07-26 13:48:44 +00:00
|
|
|
ClutterRotateDirection direction;
|
2007-04-30 08:39:11 +00:00
|
|
|
};
|
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
typedef struct _knot3d
|
|
|
|
{
|
|
|
|
gint x;
|
|
|
|
gint y;
|
|
|
|
gint z;
|
|
|
|
} knot3d;
|
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
static void
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_ellipse_advance (ClutterBehaviourEllipse *e,
|
2009-01-22 11:46:23 +00:00
|
|
|
float angle,
|
2007-07-27 08:18:41 +00:00
|
|
|
knot3d *knot)
|
2007-04-30 08:39:11 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
ClutterBehaviourEllipsePrivate *priv = e->priv;
|
2007-07-27 08:18:41 +00:00
|
|
|
gint x, y, z;
|
|
|
|
|
2009-01-23 16:50:17 +00:00
|
|
|
x = priv->a * cosf (angle * (G_PI / 180.0));
|
|
|
|
y = priv->b * sinf (angle * (G_PI / 180.0));
|
2007-07-27 08:18:41 +00:00
|
|
|
z = 0;
|
2007-04-30 08:39:11 +00:00
|
|
|
|
2007-07-29 08:54:24 +00:00
|
|
|
if (priv->angle_tilt_z)
|
2007-05-15 11:51:14 +00:00
|
|
|
{
|
2007-05-29 09:21:18 +00:00
|
|
|
/*
|
2007-07-27 08:18:41 +00:00
|
|
|
* x2 = r * cos (angle + tilt_z)
|
|
|
|
* y2 = r * sin (angle + tilt_z)
|
2007-05-29 09:21:18 +00:00
|
|
|
*
|
|
|
|
* These can be trasformed to the formulas below using properties of
|
|
|
|
* sin (a + b) and cos (a + b)
|
2007-05-15 11:51:14 +00:00
|
|
|
*
|
|
|
|
*/
|
2009-01-23 16:50:17 +00:00
|
|
|
gfloat x2, y2;
|
2007-05-15 11:51:14 +00:00
|
|
|
|
2009-01-23 16:50:17 +00:00
|
|
|
x2 = x * cosf (priv->angle_tilt_z * (G_PI / 180.0))
|
|
|
|
- y * sinf (priv->angle_tilt_z * (G_PI / 180.0));
|
2007-05-15 11:51:14 +00:00
|
|
|
|
2009-01-23 16:50:17 +00:00
|
|
|
y2 = y * cosf (priv->angle_tilt_z * (G_PI / 180.0))
|
|
|
|
+ x * sinf (priv->angle_tilt_z * (G_PI / 180.0));
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2009-01-20 16:20:54 +00:00
|
|
|
x = (x2);
|
|
|
|
y = (y2);
|
2007-05-29 09:21:18 +00:00
|
|
|
}
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2007-07-29 08:54:24 +00:00
|
|
|
if (priv->angle_tilt_x)
|
2007-07-27 08:18:41 +00:00
|
|
|
{
|
2009-01-23 16:50:17 +00:00
|
|
|
gfloat z2, y2;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2009-01-23 16:50:17 +00:00
|
|
|
z2 = - y * sinf (priv->angle_tilt_x * (G_PI / 180.0));
|
|
|
|
y2 = y * cosf (priv->angle_tilt_x * (G_PI / 180.0));
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2009-01-23 16:50:17 +00:00
|
|
|
z = z2;
|
|
|
|
y = y2;
|
2007-07-27 08:18:41 +00:00
|
|
|
}
|
|
|
|
|
2007-07-29 08:54:24 +00:00
|
|
|
if (priv->angle_tilt_y)
|
2007-05-29 09:21:18 +00:00
|
|
|
{
|
2009-01-23 16:50:17 +00:00
|
|
|
gfloat x2, z2;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2009-01-23 16:50:17 +00:00
|
|
|
x2 = x * cosf (priv->angle_tilt_y * (G_PI / 180.0))
|
|
|
|
- z * sinf (priv->angle_tilt_y * (G_PI / 180.0));
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2009-01-23 16:50:17 +00:00
|
|
|
z2 = z * cosf (priv->angle_tilt_y * (G_PI / 180.0))
|
|
|
|
+ x * sinf (priv->angle_tilt_y * (G_PI / 180.0));
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2009-01-23 16:50:17 +00:00
|
|
|
x = x2;
|
|
|
|
z = z2;
|
2007-05-15 11:51:14 +00:00
|
|
|
}
|
2007-07-27 08:18:41 +00:00
|
|
|
|
|
|
|
knot->x = x;
|
|
|
|
knot->y = y;
|
|
|
|
knot->z = z;
|
|
|
|
|
2009-01-22 11:46:23 +00:00
|
|
|
CLUTTER_NOTE (BEHAVIOUR, "advancing to angle %.2f [%d, %d] (a: %d, b: %d)",
|
2007-07-22 22:35:45 +00:00
|
|
|
angle,
|
|
|
|
knot->x, knot->y,
|
|
|
|
priv->a, priv->b);
|
2007-04-30 08:39:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
actor_apply_knot_foreach (ClutterBehaviour *behave,
|
|
|
|
ClutterActor *actor,
|
|
|
|
gpointer data)
|
|
|
|
{
|
2009-01-23 16:50:17 +00:00
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
2007-07-27 08:18:41 +00:00
|
|
|
knot3d *knot = data;
|
2007-07-22 22:35:45 +00:00
|
|
|
|
2009-01-23 16:50:17 +00:00
|
|
|
priv = ((ClutterBehaviourEllipse *) behave)->priv;
|
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
clutter_actor_set_position (actor, knot->x, knot->y);
|
2009-01-23 16:50:17 +00:00
|
|
|
|
2008-12-10 11:27:14 +00:00
|
|
|
if (priv->angle_tilt_x != 0 || priv->angle_tilt_y != 0)
|
|
|
|
clutter_actor_set_depth (actor, knot->z);
|
2007-04-30 08:39:11 +00:00
|
|
|
}
|
|
|
|
|
2009-01-20 16:20:54 +00:00
|
|
|
static inline float
|
|
|
|
clamp_angle (float a)
|
2007-12-17 17:16:49 +00:00
|
|
|
{
|
|
|
|
gint rounds;
|
|
|
|
|
2009-01-20 16:20:54 +00:00
|
|
|
rounds = a / 360;
|
|
|
|
if (a < 0)
|
|
|
|
rounds--;
|
2007-12-17 17:16:49 +00:00
|
|
|
|
2009-01-20 16:20:54 +00:00
|
|
|
return a - 360 * rounds;
|
2007-12-17 17:16:49 +00:00
|
|
|
}
|
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
static void
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_ellipse_alpha_notify (ClutterBehaviour *behave,
|
2009-01-20 16:42:49 +00:00
|
|
|
gdouble alpha)
|
2007-04-30 08:39:11 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
ClutterBehaviourEllipse *self = CLUTTER_BEHAVIOUR_ELLIPSE (behave);
|
|
|
|
ClutterBehaviourEllipsePrivate *priv = self->priv;
|
2009-01-23 16:50:17 +00:00
|
|
|
gfloat start, end;
|
|
|
|
gfloat angle = 0;
|
2007-07-27 08:18:41 +00:00
|
|
|
knot3d knot;
|
2007-04-30 08:39:11 +00:00
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
/* we do everything in single precision because it's easier, even
|
|
|
|
* though all the parameters are stored in double precision for
|
|
|
|
* consistency with the equivalent ClutterActor API
|
|
|
|
*/
|
2007-12-17 17:16:49 +00:00
|
|
|
start = priv->angle_start;
|
|
|
|
end = priv->angle_end;
|
|
|
|
|
|
|
|
if (priv->direction == CLUTTER_ROTATE_CW && start >= end)
|
2009-03-09 17:03:00 +00:00
|
|
|
end += 360;
|
2007-12-17 17:16:49 +00:00
|
|
|
else if (priv->direction == CLUTTER_ROTATE_CCW && start <= end)
|
2009-03-09 17:03:00 +00:00
|
|
|
end -= 360;
|
2007-05-31 09:29:12 +00:00
|
|
|
|
2009-01-20 16:42:49 +00:00
|
|
|
angle = (end - start) * alpha + start;
|
2007-11-27 12:34:28 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
clutter_behaviour_ellipse_advance (self, angle, &knot);
|
|
|
|
|
2007-07-22 22:35:45 +00:00
|
|
|
knot.x += priv->center.x;
|
|
|
|
knot.y += priv->center.y;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_actors_foreach (behave, actor_apply_knot_foreach, &knot);
|
2007-04-30 08:39:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
clutter_behaviour_ellipse_set_property (GObject *gobject,
|
|
|
|
guint prop_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
ClutterBehaviourEllipse *el = CLUTTER_BEHAVIOUR_ELLIPSE (gobject);
|
|
|
|
ClutterBehaviourEllipsePrivate *priv = el->priv;
|
2007-04-30 08:39:11 +00:00
|
|
|
|
|
|
|
switch (prop_id)
|
|
|
|
{
|
2007-11-13 13:21:56 +00:00
|
|
|
case PROP_ANGLE_START:
|
2009-01-20 16:20:54 +00:00
|
|
|
priv->angle_start = g_value_get_double (value);
|
2007-04-30 08:39:11 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
case PROP_ANGLE_END:
|
2009-01-20 16:20:54 +00:00
|
|
|
priv->angle_end = g_value_get_double (value);
|
2007-04-30 08:39:11 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
case PROP_ANGLE_TILT_X:
|
2009-01-20 16:20:54 +00:00
|
|
|
priv->angle_tilt_x = g_value_get_double (value);
|
2007-07-27 08:18:41 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
case PROP_ANGLE_TILT_Y:
|
2009-01-20 16:20:54 +00:00
|
|
|
priv->angle_tilt_y = g_value_get_double (value);
|
2007-07-27 08:18:41 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
case PROP_ANGLE_TILT_Z:
|
2009-01-20 16:20:54 +00:00
|
|
|
priv->angle_tilt_z = g_value_get_double (value);
|
2007-05-15 11:51:14 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
case PROP_WIDTH:
|
2009-03-09 17:03:00 +00:00
|
|
|
clutter_behaviour_ellipse_set_width (el, g_value_get_int (value));
|
2007-04-30 08:39:11 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
case PROP_HEIGHT:
|
2009-03-09 17:03:00 +00:00
|
|
|
clutter_behaviour_ellipse_set_height (el, g_value_get_int (value));
|
2007-04-30 08:39:11 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
case PROP_CENTER:
|
2007-05-25 12:07:24 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
ClutterKnot *knot = g_value_get_boxed (value);
|
|
|
|
if (knot)
|
|
|
|
clutter_behaviour_ellipse_set_center (el, knot->x, knot->y);
|
2007-05-25 12:07:24 +00:00
|
|
|
}
|
2007-04-30 08:39:11 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-07-26 13:48:44 +00:00
|
|
|
case PROP_DIRECTION:
|
|
|
|
priv->direction = g_value_get_enum (value);
|
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
clutter_behaviour_ellipse_get_property (GObject *gobject,
|
|
|
|
guint prop_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
|
|
|
|
priv = CLUTTER_BEHAVIOUR_ELLIPSE (gobject)->priv;
|
|
|
|
|
|
|
|
switch (prop_id)
|
|
|
|
{
|
2007-11-13 13:21:56 +00:00
|
|
|
case PROP_ANGLE_START:
|
2009-01-20 16:20:54 +00:00
|
|
|
g_value_set_double (value, priv->angle_start);
|
2007-04-30 08:39:11 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
case PROP_ANGLE_END:
|
2009-01-20 16:20:54 +00:00
|
|
|
g_value_set_double (value, priv->angle_end);
|
2007-04-30 08:39:11 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
case PROP_ANGLE_TILT_X:
|
2009-01-20 16:20:54 +00:00
|
|
|
g_value_set_double (value, priv->angle_tilt_x);
|
2007-07-27 08:18:41 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
case PROP_ANGLE_TILT_Y:
|
2009-01-20 16:20:54 +00:00
|
|
|
g_value_set_double (value, priv->angle_tilt_y);
|
2007-07-27 08:18:41 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
case PROP_ANGLE_TILT_Z:
|
2009-01-20 16:20:54 +00:00
|
|
|
g_value_set_double (value, priv->angle_tilt_z);
|
2007-05-15 11:51:14 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
case PROP_WIDTH:
|
2009-01-20 16:20:54 +00:00
|
|
|
g_value_set_int (value, (priv->a * 2));
|
2007-04-30 08:39:11 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
case PROP_HEIGHT:
|
2009-01-20 16:20:54 +00:00
|
|
|
g_value_set_int (value, (priv->b * 2));
|
2007-04-30 08:39:11 +00:00
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
case PROP_CENTER:
|
|
|
|
g_value_set_boxed (value, &priv->center);
|
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-07-26 13:48:44 +00:00
|
|
|
case PROP_DIRECTION:
|
|
|
|
g_value_set_enum (value, priv->direction);
|
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-07-11 07:16:21 +00:00
|
|
|
static void
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_ellipse_applied (ClutterBehaviour *behave,
|
|
|
|
ClutterActor *actor)
|
2007-07-11 07:16:21 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
ClutterBehaviourEllipse *e = CLUTTER_BEHAVIOUR_ELLIPSE (behave);
|
2008-12-13 11:53:03 +00:00
|
|
|
ClutterBehaviourEllipsePrivate *priv = e->priv;
|
2008-11-13 10:54:06 +00:00
|
|
|
knot3d knot = { 0, };
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2008-11-13 10:54:06 +00:00
|
|
|
clutter_behaviour_ellipse_advance (e, priv->angle_start, &knot);
|
2007-07-11 07:16:21 +00:00
|
|
|
|
|
|
|
clutter_actor_set_position (actor, knot.x, knot.y);
|
2007-07-22 22:35:45 +00:00
|
|
|
|
2008-11-13 10:54:06 +00:00
|
|
|
/* the depth should be changed only if there is a tilt on
|
|
|
|
* any of the X or the Y axis
|
2007-07-22 22:35:45 +00:00
|
|
|
*/
|
2008-11-13 10:54:06 +00:00
|
|
|
if (priv->angle_tilt_x != 0 || priv->angle_tilt_y != 0)
|
|
|
|
clutter_actor_set_depth (actor, knot.z);
|
2007-07-11 07:16:21 +00:00
|
|
|
}
|
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
static void
|
|
|
|
clutter_behaviour_ellipse_class_init (ClutterBehaviourEllipseClass *klass)
|
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
|
|
ClutterBehaviourClass *behave_class = CLUTTER_BEHAVIOUR_CLASS (klass);
|
2009-03-09 17:03:00 +00:00
|
|
|
GParamSpec *pspec = NULL;
|
|
|
|
|
|
|
|
g_type_class_add_private (klass, sizeof (ClutterBehaviourEllipsePrivate));
|
2007-04-30 08:39:11 +00:00
|
|
|
|
|
|
|
object_class->set_property = clutter_behaviour_ellipse_set_property;
|
|
|
|
object_class->get_property = clutter_behaviour_ellipse_get_property;
|
|
|
|
|
|
|
|
behave_class->alpha_notify = clutter_behaviour_ellipse_alpha_notify;
|
2007-07-22 22:35:45 +00:00
|
|
|
behave_class->applied = clutter_behaviour_ellipse_applied;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
/**
|
2007-11-13 13:21:56 +00:00
|
|
|
* ClutterBehaviourEllipse:angle-start:
|
2007-04-30 08:39:11 +00:00
|
|
|
*
|
2007-11-13 13:21:56 +00:00
|
|
|
* The initial angle from where the rotation should start.
|
2007-04-30 08:39:11 +00:00
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
2009-03-09 17:03:00 +00:00
|
|
|
pspec = g_param_spec_double ("angle-start",
|
2010-06-03 11:57:50 +00:00
|
|
|
P_("Start Angle"),
|
|
|
|
P_("Initial angle"),
|
2009-03-09 17:03:00 +00:00
|
|
|
0.0, 360.0,
|
|
|
|
0.0,
|
|
|
|
CLUTTER_PARAM_READWRITE);
|
2010-06-21 09:20:32 +00:00
|
|
|
obj_props[PROP_ANGLE_START] = pspec;
|
2009-03-09 17:03:00 +00:00
|
|
|
g_object_class_install_property (object_class, PROP_ANGLE_START, pspec);
|
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
/**
|
|
|
|
* ClutterBehaviourEllipse:angle-end:
|
|
|
|
*
|
|
|
|
* The final angle to where the rotation should end.
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-04-30 08:39:11 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
2009-03-09 17:03:00 +00:00
|
|
|
pspec = g_param_spec_double ("angle-end",
|
2010-06-03 11:57:50 +00:00
|
|
|
P_("End Angle"),
|
|
|
|
P_("Final angle"),
|
2009-03-09 17:03:00 +00:00
|
|
|
0.0, 360.0,
|
|
|
|
0.0,
|
|
|
|
CLUTTER_PARAM_READWRITE);
|
2010-06-21 09:20:32 +00:00
|
|
|
obj_props[PROP_ANGLE_END] = pspec;
|
2009-03-09 17:03:00 +00:00
|
|
|
g_object_class_install_property (object_class, PROP_ANGLE_END, pspec);
|
|
|
|
|
2007-05-15 11:51:14 +00:00
|
|
|
/**
|
2007-07-27 08:18:41 +00:00
|
|
|
* ClutterBehaviourEllipse:angle-tilt-x:
|
|
|
|
*
|
2009-03-09 17:03:00 +00:00
|
|
|
* The tilt angle for the rotation around center in X axis
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
2009-03-09 17:03:00 +00:00
|
|
|
pspec = g_param_spec_double ("angle-tilt-x",
|
2010-06-03 11:57:50 +00:00
|
|
|
P_("Angle x tilt"),
|
|
|
|
P_("Tilt of the ellipse around x axis"),
|
2009-03-09 17:03:00 +00:00
|
|
|
0.0, 360.0,
|
|
|
|
360.0,
|
|
|
|
CLUTTER_PARAM_READWRITE);
|
2010-06-21 09:20:32 +00:00
|
|
|
obj_props[PROP_ANGLE_TILT_X] = pspec;
|
2009-03-09 17:03:00 +00:00
|
|
|
g_object_class_install_property (object_class, PROP_ANGLE_TILT_X, pspec);
|
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
/**
|
|
|
|
* ClutterBehaviourEllipse:angle-tilt-y:
|
|
|
|
*
|
2009-03-09 17:03:00 +00:00
|
|
|
* The tilt angle for the rotation around center in Y axis
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
2009-03-09 17:03:00 +00:00
|
|
|
pspec = g_param_spec_double ("angle-tilt-y",
|
2010-06-03 11:57:50 +00:00
|
|
|
P_("Angle y tilt"),
|
|
|
|
P_("Tilt of the ellipse around y axis"),
|
2009-03-09 17:03:00 +00:00
|
|
|
0.0, 360.0,
|
|
|
|
360.0,
|
|
|
|
CLUTTER_PARAM_READWRITE);
|
2010-06-21 09:20:32 +00:00
|
|
|
obj_props[PROP_ANGLE_TILT_Y] = pspec;
|
2009-03-09 17:03:00 +00:00
|
|
|
g_object_class_install_property (object_class, PROP_ANGLE_TILT_Y, pspec);
|
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
/**
|
|
|
|
* ClutterBehaviourEllipse:angle-tilt-z:
|
|
|
|
*
|
2009-03-09 17:03:00 +00:00
|
|
|
* The tilt angle for the rotation on the Z axis
|
2007-05-15 11:51:14 +00:00
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
2009-03-09 17:03:00 +00:00
|
|
|
pspec = g_param_spec_double ("angle-tilt-z",
|
2010-06-03 11:57:50 +00:00
|
|
|
P_("Angle z tilt"),
|
|
|
|
P_("Tilt of the ellipse around z axis"),
|
2009-03-09 17:03:00 +00:00
|
|
|
0.0, 360.0,
|
|
|
|
360.0,
|
|
|
|
CLUTTER_PARAM_READWRITE);
|
2010-06-21 09:20:32 +00:00
|
|
|
obj_props[PROP_ANGLE_TILT_Z] = pspec;
|
2009-03-09 17:03:00 +00:00
|
|
|
g_object_class_install_property (object_class, PROP_ANGLE_TILT_Z, pspec);
|
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
/**
|
|
|
|
* ClutterBehaviourEllipse:width:
|
|
|
|
*
|
2009-03-09 17:03:00 +00:00
|
|
|
* Width of the ellipse, in pixels
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-04-30 08:39:11 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
2009-03-09 17:03:00 +00:00
|
|
|
pspec = g_param_spec_int ("width",
|
2010-06-03 11:57:50 +00:00
|
|
|
P_("Width"),
|
|
|
|
P_("Width of the ellipse"),
|
2009-03-09 17:03:00 +00:00
|
|
|
0, G_MAXINT,
|
|
|
|
100,
|
|
|
|
CLUTTER_PARAM_READWRITE);
|
2010-06-21 09:20:32 +00:00
|
|
|
obj_props[PROP_WIDTH] = pspec;
|
2009-03-09 17:03:00 +00:00
|
|
|
g_object_class_install_property (object_class, PROP_WIDTH, pspec);
|
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
/**
|
|
|
|
* ClutterBehaviourEllipse:height:
|
|
|
|
*
|
2009-03-09 17:03:00 +00:00
|
|
|
* Height of the ellipse, in pixels
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-04-30 08:39:11 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
2009-03-09 17:03:00 +00:00
|
|
|
pspec = g_param_spec_int ("height",
|
2010-06-03 11:57:50 +00:00
|
|
|
P_("Height"),
|
|
|
|
P_("Height of ellipse"),
|
2009-03-09 17:03:00 +00:00
|
|
|
0, G_MAXINT,
|
|
|
|
50,
|
|
|
|
CLUTTER_PARAM_READWRITE);
|
2010-06-21 09:20:32 +00:00
|
|
|
obj_props[PROP_HEIGHT] = pspec;
|
2009-03-09 17:03:00 +00:00
|
|
|
g_object_class_install_property (object_class, PROP_HEIGHT, pspec);
|
|
|
|
|
2007-04-30 08:39:11 +00:00
|
|
|
/**
|
|
|
|
* ClutterBehaviourEllipse:center:
|
|
|
|
*
|
|
|
|
* The center of the ellipse.
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
2009-03-09 17:03:00 +00:00
|
|
|
pspec = g_param_spec_boxed ("center",
|
2010-06-03 11:57:50 +00:00
|
|
|
P_("Center"),
|
|
|
|
P_("Center of ellipse"),
|
2009-03-09 17:03:00 +00:00
|
|
|
CLUTTER_TYPE_KNOT,
|
|
|
|
CLUTTER_PARAM_READWRITE);
|
2010-06-21 09:20:32 +00:00
|
|
|
obj_props[PROP_CENTER] = pspec;
|
2009-03-09 17:03:00 +00:00
|
|
|
g_object_class_install_property (object_class, PROP_CENTER, pspec);
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2007-07-26 13:48:44 +00:00
|
|
|
/**
|
|
|
|
* ClutterBehaviourEllipse:direction:
|
|
|
|
*
|
|
|
|
* The direction of the rotation.
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
2009-03-09 17:03:00 +00:00
|
|
|
pspec = g_param_spec_enum ("direction",
|
2010-06-03 11:57:50 +00:00
|
|
|
P_("Direction"),
|
|
|
|
P_("Direction of rotation"),
|
2009-03-09 17:03:00 +00:00
|
|
|
CLUTTER_TYPE_ROTATE_DIRECTION,
|
|
|
|
CLUTTER_ROTATE_CW,
|
|
|
|
CLUTTER_PARAM_READWRITE);
|
2010-06-21 09:20:32 +00:00
|
|
|
obj_props[PROP_DIRECTION] = pspec;
|
2009-03-09 17:03:00 +00:00
|
|
|
g_object_class_install_property (object_class, PROP_DIRECTION, pspec);
|
2007-04-30 08:39:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
clutter_behaviour_ellipse_init (ClutterBehaviourEllipse * self)
|
|
|
|
{
|
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
|
|
|
|
self->priv = priv = CLUTTER_BEHAVIOUR_ELLIPSE_GET_PRIVATE (self);
|
2007-07-26 13:48:44 +00:00
|
|
|
|
|
|
|
priv->direction = CLUTTER_ROTATE_CW;
|
2007-12-17 17:16:49 +00:00
|
|
|
|
2009-01-20 16:20:54 +00:00
|
|
|
priv->angle_start = 0;
|
|
|
|
priv->angle_end = 0;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
|
|
|
priv->a = 50;
|
|
|
|
priv->b = 25;
|
|
|
|
|
|
|
|
priv->angle_tilt_x = 360;
|
|
|
|
priv->angle_tilt_y = 360;
|
|
|
|
priv->angle_tilt_z = 360;
|
2007-04-30 08:39:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clutter_behaviour_ellipse_new:
|
2010-09-09 14:41:37 +00:00
|
|
|
* @alpha: (allow-none): a #ClutterAlpha instance, or %NULL
|
2007-05-25 12:07:24 +00:00
|
|
|
* @x: x coordinace of the center
|
|
|
|
* @y: y coordiance of the center
|
2007-04-30 08:39:11 +00:00
|
|
|
* @width: width of the ellipse
|
2007-04-30 08:39:20 +00:00
|
|
|
* @height: height of the ellipse
|
2007-08-03 09:52:52 +00:00
|
|
|
* @direction: #ClutterRotateDirection of rotation
|
2007-12-17 17:16:49 +00:00
|
|
|
* @start: angle in degrees at which movement starts, between 0 and 360
|
|
|
|
* @end: angle in degrees at which movement ends, between 0 and 360
|
2007-04-30 08:39:11 +00:00
|
|
|
*
|
2007-04-30 08:39:20 +00:00
|
|
|
* Creates a behaviour that drives actors along an elliptical path with
|
2009-03-09 17:03:00 +00:00
|
|
|
* given center, width and height; the movement starts at @start
|
|
|
|
* degrees (with 0 corresponding to 12 o'clock) and ends at @end
|
|
|
|
* degrees. Angles greated than 360 degrees get clamped to the canonical
|
|
|
|
* interval <0, 360); if @start is equal to @end, the behaviour will
|
|
|
|
* rotate by exacly 360 degrees.
|
2007-12-17 17:16:49 +00:00
|
|
|
*
|
2010-09-09 14:41:37 +00:00
|
|
|
* If @alpha is not %NULL, the #ClutterBehaviour will take ownership
|
|
|
|
* of the #ClutterAlpha instance. In the case when @alpha is %NULL,
|
|
|
|
* it can be set later with clutter_behaviour_set_alpha().
|
|
|
|
*
|
2007-07-29 08:54:24 +00:00
|
|
|
* Return value: the newly created #ClutterBehaviourEllipse
|
2007-04-30 08:39:11 +00:00
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
ClutterBehaviour *
|
2009-03-09 17:03:00 +00:00
|
|
|
clutter_behaviour_ellipse_new (ClutterAlpha *alpha,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height,
|
|
|
|
ClutterRotateDirection direction,
|
|
|
|
gdouble start,
|
|
|
|
gdouble end)
|
2007-04-30 08:39:11 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
ClutterKnot center;
|
2007-04-30 08:39:11 +00:00
|
|
|
|
|
|
|
g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL);
|
2007-05-25 12:07:24 +00:00
|
|
|
|
|
|
|
center.x = x;
|
|
|
|
center.y = y;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
|
|
|
return g_object_new (CLUTTER_TYPE_BEHAVIOUR_ELLIPSE,
|
2007-07-22 22:35:45 +00:00
|
|
|
"alpha", alpha,
|
|
|
|
"center", ¢er,
|
|
|
|
"width", width,
|
|
|
|
"height", height,
|
2007-08-03 09:52:52 +00:00
|
|
|
"direction", direction,
|
2007-11-13 13:21:56 +00:00
|
|
|
"angle-start", start,
|
2007-07-22 22:35:45 +00:00
|
|
|
"angle-end", end,
|
|
|
|
NULL);
|
2007-04-30 08:39:11 +00:00
|
|
|
}
|
|
|
|
|
2007-05-25 12:07:24 +00:00
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_set_center:
|
2007-04-30 08:39:11 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
2007-05-25 12:07:24 +00:00
|
|
|
* @x: x coordinace of centre
|
|
|
|
* @y: y coordinace of centre
|
2007-04-30 08:39:11 +00:00
|
|
|
*
|
2007-04-30 08:39:20 +00:00
|
|
|
* Sets the center of the elliptical path to the point represented by knot.
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-04-30 08:39:11 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
void
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self,
|
|
|
|
gint x,
|
|
|
|
gint y)
|
2007-04-30 08:39:11 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
|
|
|
|
|
|
|
priv = self->priv;
|
|
|
|
|
|
|
|
if (priv->center.x != x || priv->center.y != y)
|
2007-04-30 08:39:20 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
priv->center.x = x;
|
|
|
|
priv->center.y = y;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CENTER]);
|
2007-04-30 08:39:20 +00:00
|
|
|
}
|
2007-04-30 08:39:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_get_center:
|
2007-04-30 08:39:11 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
2010-09-08 14:37:58 +00:00
|
|
|
* @x: (out): return location for the X coordinate of the center, or %NULL
|
|
|
|
* @y: (out): return location for the Y coordinate of the center, or %NULL
|
2007-04-30 08:39:11 +00:00
|
|
|
*
|
2007-04-30 08:39:20 +00:00
|
|
|
* Gets the center of the elliptical path path.
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-04-30 08:39:11 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
void
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_ellipse_get_center (ClutterBehaviourEllipse *self,
|
|
|
|
gint *x,
|
|
|
|
gint *y)
|
2007-04-30 08:39:11 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
|
|
|
|
|
|
|
priv = self->priv;
|
|
|
|
|
2007-05-25 12:07:24 +00:00
|
|
|
if (x)
|
2007-07-22 22:35:45 +00:00
|
|
|
*x = priv->center.x;
|
2007-05-25 12:07:24 +00:00
|
|
|
|
|
|
|
if (y)
|
2007-07-22 22:35:45 +00:00
|
|
|
*y = priv->center.y;
|
2007-04-30 08:39:11 +00:00
|
|
|
}
|
|
|
|
|
2007-04-30 08:39:20 +00:00
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_set_width:
|
2007-04-30 08:39:20 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
|
|
|
* @width: width of the ellipse
|
|
|
|
*
|
|
|
|
* Sets the width of the elliptical path.
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-04-30 08:39:20 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
void
|
2009-03-09 17:03:00 +00:00
|
|
|
clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self,
|
|
|
|
gint width)
|
2007-04-30 08:39:20 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
|
|
|
|
|
|
|
priv = self->priv;
|
|
|
|
|
2009-01-20 16:20:54 +00:00
|
|
|
if (priv->a != width / 2)
|
2007-04-30 08:39:20 +00:00
|
|
|
{
|
2009-01-20 16:20:54 +00:00
|
|
|
priv->a = width / 2;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_WIDTH]);
|
2007-04-30 08:39:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_get_width:
|
2007-04-30 08:39:20 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
|
|
|
*
|
|
|
|
* Gets the width of the elliptical path.
|
2007-05-17 12:03:43 +00:00
|
|
|
*
|
2007-06-01 10:00:35 +00:00
|
|
|
* Return value: the width of the path
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-04-30 08:39:20 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
gint
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_ellipse_get_width (ClutterBehaviourEllipse *self)
|
2007-04-30 08:39:20 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0);
|
|
|
|
|
2009-01-20 16:20:54 +00:00
|
|
|
return self->priv->a * 2;
|
2007-04-30 08:39:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_set_height:
|
2007-04-30 08:39:20 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
|
|
|
* @height: height of the ellipse
|
|
|
|
*
|
|
|
|
* Sets the height of the elliptical path.
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-04-30 08:39:20 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
void
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_ellipse_set_height (ClutterBehaviourEllipse *self,
|
|
|
|
gint height)
|
2007-04-30 08:39:20 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
|
|
|
|
|
|
|
priv = self->priv;
|
|
|
|
|
2009-01-20 16:20:54 +00:00
|
|
|
if (priv->b != height / 2)
|
2007-04-30 08:39:20 +00:00
|
|
|
{
|
2009-01-20 16:20:54 +00:00
|
|
|
priv->b = height / 2;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_HEIGHT]);
|
2007-04-30 08:39:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_get_height:
|
2007-04-30 08:39:20 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
|
|
|
*
|
|
|
|
* Gets the height of the elliptical path.
|
2007-05-17 12:03:43 +00:00
|
|
|
*
|
|
|
|
* Return value: the height of the path
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-04-30 08:39:20 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
gint
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self)
|
2007-04-30 08:39:20 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0);
|
|
|
|
|
2009-01-20 16:20:54 +00:00
|
|
|
return self->priv->b * 2;
|
2007-04-30 08:39:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_set_angle_start:
|
2007-04-30 08:39:20 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
2007-12-17 17:16:49 +00:00
|
|
|
* @angle_start: angle at which movement starts in degrees, between 0 and 360.
|
2007-04-30 08:39:20 +00:00
|
|
|
*
|
2007-12-17 17:16:49 +00:00
|
|
|
* Sets the angle at which movement starts; angles >= 360 degress get clamped
|
|
|
|
* to the canonical interval <0, 360).
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-11-13 13:21:56 +00:00
|
|
|
* Since: 0.6
|
2007-04-30 08:39:20 +00:00
|
|
|
*/
|
|
|
|
void
|
2007-11-13 13:21:56 +00:00
|
|
|
clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self,
|
|
|
|
gdouble angle_start)
|
2007-07-11 07:16:21 +00:00
|
|
|
{
|
2009-03-09 17:03:00 +00:00
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
gdouble new_angle;
|
2009-01-20 16:20:54 +00:00
|
|
|
|
2007-07-22 22:35:45 +00:00
|
|
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
new_angle = clamp_angle (angle_start);
|
|
|
|
|
|
|
|
priv = self->priv;
|
|
|
|
|
|
|
|
if (priv->angle_start != new_angle)
|
|
|
|
{
|
|
|
|
priv->angle_start = new_angle;
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_START]);
|
2009-03-09 17:03:00 +00:00
|
|
|
}
|
2007-07-11 07:16:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_get_angle_start:
|
2007-04-30 08:39:20 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
|
|
|
*
|
2007-11-13 13:21:56 +00:00
|
|
|
* Gets the angle at which movements starts.
|
2007-05-17 12:03:43 +00:00
|
|
|
*
|
2007-07-11 07:16:21 +00:00
|
|
|
* Return value: angle in degrees
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-11-13 13:21:56 +00:00
|
|
|
* Since: 0.6
|
2007-07-11 07:16:21 +00:00
|
|
|
*/
|
|
|
|
gdouble
|
2007-11-13 13:21:56 +00:00
|
|
|
clutter_behaviour_ellipse_get_angle_start (ClutterBehaviourEllipse *self)
|
2007-07-11 07:16:21 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0.0);
|
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
return self->priv->angle_start;
|
2007-07-11 07:16:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_set_angle_end:
|
2007-04-30 08:39:20 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
2007-12-17 17:16:49 +00:00
|
|
|
* @angle_end: angle at which movement ends in degrees, between 0 and 360.
|
2007-04-30 08:39:20 +00:00
|
|
|
*
|
2007-12-17 17:16:49 +00:00
|
|
|
* Sets the angle at which movement ends; angles >= 360 degress get clamped
|
|
|
|
* to the canonical interval <0, 360).
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-04-30 08:39:20 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
void
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_ellipse_set_angle_end (ClutterBehaviourEllipse *self,
|
|
|
|
gdouble angle_end)
|
2007-07-11 07:16:21 +00:00
|
|
|
{
|
2009-03-09 17:03:00 +00:00
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
gdouble new_angle;
|
2009-01-20 16:20:54 +00:00
|
|
|
|
2007-07-22 22:35:45 +00:00
|
|
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
new_angle = clamp_angle (angle_end);
|
|
|
|
|
|
|
|
priv = self->priv;
|
|
|
|
|
|
|
|
if (priv->angle_end != new_angle)
|
|
|
|
{
|
|
|
|
priv->angle_end = new_angle;
|
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_END]);
|
2009-03-09 17:03:00 +00:00
|
|
|
}
|
2007-07-11 07:16:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_get_angle_end:
|
2007-04-30 08:39:20 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
|
|
|
*
|
|
|
|
* Gets the at which movements ends.
|
2007-05-17 12:03:43 +00:00
|
|
|
*
|
2007-07-11 07:16:21 +00:00
|
|
|
* Return value: angle in degrees
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-07-11 07:16:21 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
gdouble
|
2007-07-22 22:35:45 +00:00
|
|
|
clutter_behaviour_ellipse_get_angle_end (ClutterBehaviourEllipse *self)
|
2007-07-11 07:16:21 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0.0);
|
|
|
|
|
2009-01-20 16:20:54 +00:00
|
|
|
return self->priv->angle_end;
|
2007-07-11 07:16:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_set_angle_tilt:
|
2007-07-27 08:18:41 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
2007-07-27 13:44:42 +00:00
|
|
|
* @axis: a #ClutterRotateAxis
|
|
|
|
* @angle_tilt: tilt of the elipse around the center in the given axis in
|
|
|
|
* degrees.
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
|
|
|
* Sets the angle at which the ellipse should be tilted around it's center.
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
void
|
2007-07-27 13:44:42 +00:00
|
|
|
clutter_behaviour_ellipse_set_angle_tilt (ClutterBehaviourEllipse *self,
|
|
|
|
ClutterRotateAxis axis,
|
|
|
|
gdouble angle_tilt)
|
2007-07-27 08:18:41 +00:00
|
|
|
{
|
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
|
|
|
|
|
|
|
priv = self->priv;
|
|
|
|
|
2007-07-27 13:44:42 +00:00
|
|
|
switch (axis)
|
2007-07-27 08:18:41 +00:00
|
|
|
{
|
2007-07-27 13:44:42 +00:00
|
|
|
case CLUTTER_X_AXIS:
|
2009-03-09 17:03:00 +00:00
|
|
|
if (priv->angle_tilt_x != angle_tilt)
|
2007-07-27 13:44:42 +00:00
|
|
|
{
|
2009-03-09 17:03:00 +00:00
|
|
|
priv->angle_tilt_x = angle_tilt;
|
2007-07-11 07:16:21 +00:00
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_X]);
|
2007-07-27 13:44:42 +00:00
|
|
|
}
|
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-07-27 13:44:42 +00:00
|
|
|
case CLUTTER_Y_AXIS:
|
2009-03-09 17:03:00 +00:00
|
|
|
if (priv->angle_tilt_y != angle_tilt)
|
2007-07-27 13:44:42 +00:00
|
|
|
{
|
2009-03-09 17:03:00 +00:00
|
|
|
priv->angle_tilt_y = angle_tilt;
|
2007-07-22 22:35:45 +00:00
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Y]);
|
2007-07-27 13:44:42 +00:00
|
|
|
}
|
|
|
|
break;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-07-27 13:44:42 +00:00
|
|
|
case CLUTTER_Z_AXIS:
|
2009-03-09 17:03:00 +00:00
|
|
|
if (priv->angle_tilt_z != angle_tilt)
|
2007-07-27 13:44:42 +00:00
|
|
|
{
|
2009-03-09 17:03:00 +00:00
|
|
|
priv->angle_tilt_z = angle_tilt;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Z]);
|
2007-07-27 13:44:42 +00:00
|
|
|
}
|
|
|
|
break;
|
2007-05-15 11:51:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_get_angle_tilt:
|
2007-05-15 11:51:14 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
2007-07-27 13:44:42 +00:00
|
|
|
* @axis: a #ClutterRotateAxis
|
2007-05-15 11:51:14 +00:00
|
|
|
*
|
2007-07-27 13:44:42 +00:00
|
|
|
* Gets the tilt of the ellipse around the center in the given axis.
|
2007-05-17 12:03:43 +00:00
|
|
|
*
|
2007-07-11 07:16:21 +00:00
|
|
|
* Return value: angle in degrees.
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
2007-07-11 07:16:21 +00:00
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
gdouble
|
2007-07-27 13:44:42 +00:00
|
|
|
clutter_behaviour_ellipse_get_angle_tilt (ClutterBehaviourEllipse *self,
|
|
|
|
ClutterRotateAxis axis)
|
2007-07-11 07:16:21 +00:00
|
|
|
{
|
2007-07-22 22:35:45 +00:00
|
|
|
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0.0);
|
|
|
|
|
2007-12-10 12:00:08 +00:00
|
|
|
switch (axis)
|
|
|
|
{
|
|
|
|
case CLUTTER_X_AXIS:
|
2009-01-20 16:20:54 +00:00
|
|
|
return self->priv->angle_tilt_x;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-12-10 12:00:08 +00:00
|
|
|
case CLUTTER_Y_AXIS:
|
2009-01-20 16:20:54 +00:00
|
|
|
return self->priv->angle_tilt_y;
|
2009-03-09 17:03:00 +00:00
|
|
|
|
2007-12-10 12:00:08 +00:00
|
|
|
case CLUTTER_Z_AXIS:
|
2009-01-20 16:20:54 +00:00
|
|
|
return self->priv->angle_tilt_z;
|
2007-12-10 12:00:08 +00:00
|
|
|
}
|
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
return 0.0;
|
2007-07-11 07:16:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_set_tilt:
|
2007-07-27 08:18:41 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
|
|
|
* @angle_tilt_x: tilt of the elipse around the center in X axis in degrees.
|
|
|
|
* @angle_tilt_y: tilt of the elipse around the center in Y axis in degrees.
|
|
|
|
* @angle_tilt_z: tilt of the elipse around the center in Z axis in degrees.
|
|
|
|
*
|
|
|
|
* Sets the angles at which the ellipse should be tilted around it's center.
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_behaviour_ellipse_set_tilt (ClutterBehaviourEllipse *self,
|
|
|
|
gdouble angle_tilt_x,
|
|
|
|
gdouble angle_tilt_y,
|
|
|
|
gdouble angle_tilt_z)
|
|
|
|
{
|
2007-12-10 12:00:08 +00:00
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
|
2007-07-27 08:18:41 +00:00
|
|
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
|
|
|
|
2007-12-10 12:00:08 +00:00
|
|
|
priv = self->priv;
|
|
|
|
|
|
|
|
g_object_freeze_notify (G_OBJECT (self));
|
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
if (priv->angle_tilt_x != angle_tilt_x)
|
2007-12-10 12:00:08 +00:00
|
|
|
{
|
2009-03-09 17:03:00 +00:00
|
|
|
priv->angle_tilt_x = angle_tilt_x;
|
2007-12-10 12:00:08 +00:00
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_X]);
|
2007-12-10 12:00:08 +00:00
|
|
|
}
|
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
if (priv->angle_tilt_y != angle_tilt_y)
|
2007-12-10 12:00:08 +00:00
|
|
|
{
|
2009-03-09 17:03:00 +00:00
|
|
|
priv->angle_tilt_y = angle_tilt_y;
|
2007-12-10 12:00:08 +00:00
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Y]);
|
2007-12-10 12:00:08 +00:00
|
|
|
}
|
|
|
|
|
2009-03-09 17:03:00 +00:00
|
|
|
if (priv->angle_tilt_z != angle_tilt_z)
|
2007-12-10 12:00:08 +00:00
|
|
|
{
|
2009-03-09 17:03:00 +00:00
|
|
|
priv->angle_tilt_z = angle_tilt_z;
|
2007-12-10 12:00:08 +00:00
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Z]);
|
2007-12-10 12:00:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
g_object_thaw_notify (G_OBJECT (self));
|
2007-07-27 08:18:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2009-06-19 15:38:35 +00:00
|
|
|
* clutter_behaviour_ellipse_get_tilt:
|
2007-07-27 08:18:41 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
2010-09-08 14:37:58 +00:00
|
|
|
* @angle_tilt_x: (out): return location for tilt angle on the X axis, or %NULL.
|
|
|
|
* @angle_tilt_y: (out): return location for tilt angle on the Y axis, or %NULL.
|
|
|
|
* @angle_tilt_z: (out): return location for tilt angle on the Z axis, or %NULL.
|
2007-07-27 08:18:41 +00:00
|
|
|
*
|
|
|
|
* Gets the tilt of the ellipse around the center in Y axis.
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_behaviour_ellipse_get_tilt (ClutterBehaviourEllipse *self,
|
|
|
|
gdouble *angle_tilt_x,
|
|
|
|
gdouble *angle_tilt_y,
|
|
|
|
gdouble *angle_tilt_z)
|
|
|
|
{
|
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
|
|
|
|
|
|
|
priv = self->priv;
|
|
|
|
|
|
|
|
if (angle_tilt_x)
|
2009-01-20 16:20:54 +00:00
|
|
|
*angle_tilt_x = priv->angle_tilt_x;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
|
|
|
if (angle_tilt_y)
|
2009-01-20 16:20:54 +00:00
|
|
|
*angle_tilt_y = priv->angle_tilt_y;
|
2007-07-27 08:18:41 +00:00
|
|
|
|
|
|
|
if (angle_tilt_z)
|
2009-01-20 16:20:54 +00:00
|
|
|
*angle_tilt_z = priv->angle_tilt_z;
|
2007-07-27 08:18:41 +00:00
|
|
|
}
|
|
|
|
|
2007-07-26 13:48:44 +00:00
|
|
|
/**
|
|
|
|
* clutter_behaviour_ellipse_get_direction:
|
2007-07-26 15:14:45 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
2007-07-26 13:48:44 +00:00
|
|
|
*
|
|
|
|
* Retrieves the #ClutterRotateDirection used by the ellipse behaviour.
|
|
|
|
*
|
|
|
|
* Return value: the rotation direction
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
ClutterRotateDirection
|
|
|
|
clutter_behaviour_ellipse_get_direction (ClutterBehaviourEllipse *self)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self),
|
|
|
|
CLUTTER_ROTATE_CW);
|
|
|
|
|
|
|
|
return self->priv->direction;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clutter_behaviour_ellipse_set_direction:
|
2007-07-26 15:14:45 +00:00
|
|
|
* @self: a #ClutterBehaviourEllipse
|
2007-07-26 13:48:44 +00:00
|
|
|
* @direction: the rotation direction
|
|
|
|
*
|
|
|
|
* Sets the rotation direction used by the ellipse behaviour.
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_behaviour_ellipse_set_direction (ClutterBehaviourEllipse *self,
|
2007-07-26 15:14:45 +00:00
|
|
|
ClutterRotateDirection direction)
|
2007-07-26 13:48:44 +00:00
|
|
|
{
|
|
|
|
ClutterBehaviourEllipsePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
|
|
|
|
|
|
|
priv = self->priv;
|
|
|
|
|
|
|
|
if (priv->direction != direction)
|
|
|
|
{
|
|
|
|
priv->direction = direction;
|
|
|
|
|
2010-06-21 09:20:32 +00:00
|
|
|
_clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_DIRECTION]);
|
2007-07-26 13:48:44 +00:00
|
|
|
}
|
|
|
|
}
|