/** * clutter_behaviour_ellipse_get_height: * @self: a #ClutterBehaviourEllipse * * Gets the height of the elliptical path. * * Return value: the height of the path * * Since: 0.4 */ gint clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self) { g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0); return self->priv->b * 2; }
/** * clutter_behaviour_ellipse_get_angle_end: * @self: a #ClutterBehaviourEllipse * * Gets the at which movements ends. * * Return value: angle in degrees * * Since: 0.4 */ gdouble clutter_behaviour_ellipse_get_angle_end (ClutterBehaviourEllipse *self) { g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0.0); return self->priv->angle_end; }
/** * clutter_behaviour_ellipse_get_direction: * @self: a #ClutterBehaviourEllipse * * 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_height: * @self: a #ClutterBehaviourEllipse * @height: height of the ellipse * * Sets the height of the elliptical path. * * Since: 0.4 */ void clutter_behaviour_ellipse_set_height (ClutterBehaviourEllipse *self, gint height) { ClutterBehaviourEllipsePrivate *priv; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); priv = self->priv; if (priv->b != height / 2) { priv->b = height / 2; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_HEIGHT]); } }
/** * clutter_behaviour_ellipse_set_width: * @self: a #ClutterBehaviourEllipse * @width: width of the ellipse * * Sets the width of the elliptical path. * * Since: 0.4 */ void clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self, gint width) { ClutterBehaviourEllipsePrivate *priv; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); priv = self->priv; if (priv->a != width / 2) { priv->a = width / 2; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_WIDTH]); } }
/** * clutter_behaviour_ellipse_get_center: * @self: a #ClutterBehaviourEllipse * @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 * * Gets the center of the elliptical path path. * * Since: 0.4 */ void clutter_behaviour_ellipse_get_center (ClutterBehaviourEllipse *self, gint *x, gint *y) { ClutterBehaviourEllipsePrivate *priv; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); priv = self->priv; if (x) *x = priv->center.x; if (y) *y = priv->center.y; }
/** * clutter_behaviour_ellipse_set_direction: * @self: a #ClutterBehaviourEllipse * @direction: the rotation direction * * Sets the rotation direction used by the ellipse behaviour. * * Since: 0.4 */ void clutter_behaviour_ellipse_set_direction (ClutterBehaviourEllipse *self, ClutterRotateDirection direction) { ClutterBehaviourEllipsePrivate *priv; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); priv = self->priv; if (priv->direction != direction) { priv->direction = direction; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_DIRECTION]); } }
/** * clutter_behaviour_ellipse_set_angle_start: * @self: a #ClutterBehaviourEllipse * @angle_start: angle at which movement starts in degrees, between 0 and 360. * * Sets the angle at which movement starts; angles >= 360 degress get clamped * to the canonical interval <0, 360). * * Since: 0.6 */ void clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self, gdouble angle_start) { ClutterBehaviourEllipsePrivate *priv; gdouble new_angle; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); new_angle = clamp_angle (angle_start); priv = self->priv; if (priv->angle_start != new_angle) { priv->angle_start = new_angle; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_START]); } }
/** * clutter_behaviour_ellipse_set_center: * @self: a #ClutterBehaviourEllipse * @x: x coordinace of centre * @y: y coordinace of centre * * Sets the center of the elliptical path to the point represented by knot. * * Since: 0.4 */ void clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self, gint x, gint y) { ClutterBehaviourEllipsePrivate *priv; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); priv = self->priv; if (priv->center.x != x || priv->center.y != y) { priv->center.x = x; priv->center.y = y; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CENTER]); } }
/** * clutter_behaviour_ellipse_get_angle_tilt: * @self: a #ClutterBehaviourEllipse * @axis: a #ClutterRotateAxis * * Gets the tilt of the ellipse around the center in the given axis. * * Return value: angle in degrees. * * Since: 0.4 */ gdouble clutter_behaviour_ellipse_get_angle_tilt (ClutterBehaviourEllipse *self, ClutterRotateAxis axis) { g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0.0); switch (axis) { case CLUTTER_X_AXIS: return self->priv->angle_tilt_x; case CLUTTER_Y_AXIS: return self->priv->angle_tilt_y; case CLUTTER_Z_AXIS: return self->priv->angle_tilt_z; } return 0.0; }
/** * clutter_behaviour_ellipse_set_angle_end: * @self: a #ClutterBehaviourEllipse * @angle_end: angle at which movement ends in degrees, between 0 and 360. * * Sets the angle at which movement ends; angles >= 360 degress get clamped * to the canonical interval <0, 360). * * Since: 0.4 */ void clutter_behaviour_ellipse_set_angle_end (ClutterBehaviourEllipse *self, gdouble angle_end) { ClutterBehaviourEllipsePrivate *priv; gdouble new_angle; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); new_angle = clamp_angle (angle_end); priv = self->priv; if (priv->angle_end != new_angle) { priv->angle_end = new_angle; g_object_notify (G_OBJECT (self), "angle-end"); } }
/** * clutter_behaviour_ellipse_set_angle_tilt: * @self: a #ClutterBehaviourEllipse * @axis: a #ClutterRotateAxis * @angle_tilt: tilt of the elipse around the center in the given axis in * degrees. * * Sets the angle at which the ellipse should be tilted around it's center. * * Since: 0.4 */ void clutter_behaviour_ellipse_set_angle_tilt (ClutterBehaviourEllipse *self, ClutterRotateAxis axis, gdouble angle_tilt) { ClutterBehaviourEllipsePrivate *priv; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); priv = self->priv; switch (axis) { case CLUTTER_X_AXIS: if (priv->angle_tilt_x != angle_tilt) { priv->angle_tilt_x = angle_tilt; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_X]); } break; case CLUTTER_Y_AXIS: if (priv->angle_tilt_y != angle_tilt) { priv->angle_tilt_y = angle_tilt; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Y]); } break; case CLUTTER_Z_AXIS: if (priv->angle_tilt_z != angle_tilt) { priv->angle_tilt_z = angle_tilt; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Z]); } break; } }
/** * clutter_behaviour_ellipse_set_angle_tilt: * @self: a #ClutterBehaviourEllipse * @axis: a #ClutterRotateAxis * @angle_tilt: tilt of the elipse around the center in the given axis in * degrees. * * Sets the angle at which the ellipse should be tilted around it's center. * * Since: 0.4 */ void clutter_behaviour_ellipse_set_angle_tilt (ClutterBehaviourEllipse *self, ClutterRotateAxis axis, gdouble angle_tilt) { ClutterBehaviourEllipsePrivate *priv; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); priv = self->priv; switch (axis) { case CLUTTER_X_AXIS: if (priv->angle_tilt_x != angle_tilt) { priv->angle_tilt_x = angle_tilt; g_object_notify (G_OBJECT (self), "angle-tilt-x"); } break; case CLUTTER_Y_AXIS: if (priv->angle_tilt_y != angle_tilt) { priv->angle_tilt_y = angle_tilt; g_object_notify (G_OBJECT (self), "angle-tilt-y"); } break; case CLUTTER_Z_AXIS: if (priv->angle_tilt_z != angle_tilt) { priv->angle_tilt_z = angle_tilt; g_object_notify (G_OBJECT (self), "angle-tilt-z"); } break; } }
/** * clutter_behaviour_ellipse_get_tilt: * @self: a #ClutterBehaviourEllipse * @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. * * 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) *angle_tilt_x = priv->angle_tilt_x; if (angle_tilt_y) *angle_tilt_y = priv->angle_tilt_y; if (angle_tilt_z) *angle_tilt_z = priv->angle_tilt_z; }
/** * clutter_behaviour_ellipse_set_tilt: * @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) { ClutterBehaviourEllipsePrivate *priv; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); priv = self->priv; g_object_freeze_notify (G_OBJECT (self)); if (priv->angle_tilt_x != angle_tilt_x) { priv->angle_tilt_x = angle_tilt_x; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_X]); } if (priv->angle_tilt_y != angle_tilt_y) { priv->angle_tilt_y = angle_tilt_y; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Y]); } if (priv->angle_tilt_z != angle_tilt_z) { priv->angle_tilt_z = angle_tilt_z; g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_ANGLE_TILT_Z]); } g_object_thaw_notify (G_OBJECT (self)); }
/** * clutter_behaviour_ellipse_set_tilt: * @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) { ClutterBehaviourEllipsePrivate *priv; g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); priv = self->priv; g_object_freeze_notify (G_OBJECT (self)); if (priv->angle_tilt_x != angle_tilt_x) { priv->angle_tilt_x = angle_tilt_x; g_object_notify (G_OBJECT (self), "angle-tilt-x"); } if (priv->angle_tilt_y != angle_tilt_y) { priv->angle_tilt_y = angle_tilt_y; g_object_notify (G_OBJECT (self), "angle-tilt-y"); } if (priv->angle_tilt_z != angle_tilt_z) { priv->angle_tilt_z = angle_tilt_z; g_object_notify (G_OBJECT (self), "angle-tilt-z"); } g_object_thaw_notify (G_OBJECT (self)); }