mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 19:12:04 +00:00
2006-11-17 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-alpha.c: * clutter/clutter-behaviour-opacity.c: More docs. * clutter/clutter-behaviour-path.h: * clutter/clutter-behaviour-path.c: More docs, add clutter_behaviour_path_insert_knot(), clutter_behaviour_path_remove_knot() * clutter/clutter-behaviour-scale.h: * clutter/clutter-behaviour-scale.c: More docs, add clutter_behaviour_scale_newx() taking fixed values. * clutter/Makefile.am: * clutter/pango/Makefile.am: Fix linking warning.
This commit is contained in:
parent
252368901f
commit
491e3ca9d2
42
ChangeLog
42
ChangeLog
@ -1,3 +1,45 @@
|
|||||||
|
2006-11-17 Matthew Allum <mallum@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-alpha.c:
|
||||||
|
* clutter/clutter-behaviour-opacity.c:
|
||||||
|
More docs.
|
||||||
|
|
||||||
|
* clutter/clutter-behaviour-path.h:
|
||||||
|
* clutter/clutter-behaviour-path.c:
|
||||||
|
More docs, add clutter_behaviour_path_insert_knot(),
|
||||||
|
clutter_behaviour_path_remove_knot()
|
||||||
|
|
||||||
|
* clutter/clutter-behaviour-scale.h:
|
||||||
|
* clutter/clutter-behaviour-scale.c:
|
||||||
|
More docs, add clutter_behaviour_scale_newx() taking fixed values.
|
||||||
|
|
||||||
|
* clutter/Makefile.am:
|
||||||
|
* clutter/pango/Makefile.am:
|
||||||
|
Fix linking warning.
|
||||||
|
|
||||||
|
2006-11-15 Matthew Allum <mallum@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-actor.h:
|
||||||
|
* clutter/clutter-actor.c:
|
||||||
|
Add new API clutter_actor_move_by(), clutter_actor_get_size()
|
||||||
|
|
||||||
|
* clutter/clutter-alpha.c:
|
||||||
|
* clutter/clutter-alpha.h:
|
||||||
|
Add clutter alpha sine func
|
||||||
|
|
||||||
|
* clutter/clutter-behaviours.h:
|
||||||
|
* clutter/clutter-behaviours.c:
|
||||||
|
Add a basic scale behaviour (needs work)
|
||||||
|
|
||||||
|
* examples/behave.c: (main):
|
||||||
|
More playing with new behaviour functionality
|
||||||
|
|
||||||
|
* clutter/clutter-feature.c:
|
||||||
|
* clutter/clutter-feature.h:
|
||||||
|
* clutter/clutter-main.c:
|
||||||
|
Add new experimental sync to vblank code
|
||||||
|
Set env CLUTTER_VBLANK=none to disable.
|
||||||
|
|
||||||
2006-11-16 Emmanuele Bassi <ebassi@openedhand.com>
|
2006-11-16 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-private.h:
|
* clutter/clutter-private.h:
|
||||||
|
@ -108,7 +108,7 @@ INCLUDES = @GCC_FLAGS@ @CLUTTER_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/clutter/
|
|||||||
lib_LTLIBRARIES = libclutter-@CLUTTER_MAJORMINOR@.la
|
lib_LTLIBRARIES = libclutter-@CLUTTER_MAJORMINOR@.la
|
||||||
|
|
||||||
libclutter_@CLUTTER_MAJORMINOR@_la_LIBADD = \
|
libclutter_@CLUTTER_MAJORMINOR@_la_LIBADD = \
|
||||||
@CLUTTER_LIBS@ $(top_srcdir)/clutter/pango/libpangoclutter.a
|
@CLUTTER_LIBS@ $(top_srcdir)/clutter/pango/libpangoclutter.la
|
||||||
libclutter_@CLUTTER_MAJORMINOR@_la_LDFLAGS = @CLUTTER_LT_LDFLAGS@
|
libclutter_@CLUTTER_MAJORMINOR@_la_LDFLAGS = @CLUTTER_LT_LDFLAGS@
|
||||||
libclutter_@CLUTTER_MAJORMINOR@_la_DEPENDENCIES = \
|
libclutter_@CLUTTER_MAJORMINOR@_la_DEPENDENCIES = \
|
||||||
$(top_srcdir)/clutter/pango/libpangoclutter.a
|
$(top_srcdir)/clutter/pango/libpangoclutter.a
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
* @short_description: A class for calculating an alpha value as a function
|
* @short_description: A class for calculating an alpha value as a function
|
||||||
* of time.
|
* of time.
|
||||||
*
|
*
|
||||||
* #ClutterAlpha is a class for calculating an alpha value as a function
|
* #ClutterAlpha is a class for calculating an integer value between
|
||||||
* of time.
|
* 0 and CLUTTER_ALPHA_MAX_ALPHA as a function of time.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -23,6 +23,15 @@
|
|||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:clutter-behaviour-opacity
|
||||||
|
* @short_description: A behaviour class interpolating actors opacity between
|
||||||
|
* two values.
|
||||||
|
*
|
||||||
|
* #ClutterBehaviourPath interpolates actors opacity between two values.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
@ -107,6 +116,18 @@ clutter_behaviour_opacity_init (ClutterBehaviourOpacity *self)
|
|||||||
self->priv = CLUTTER_BEHAVIOUR_OPACITY_GET_PRIVATE (self);
|
self->priv = CLUTTER_BEHAVIOUR_OPACITY_GET_PRIVATE (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_behaviour_opacity_new :
|
||||||
|
* @alpha: a #ClutterAlpha
|
||||||
|
* @scale_begin: initial opacity value
|
||||||
|
* @scale_end: final opacity value
|
||||||
|
*
|
||||||
|
* Creates a new #ClutterBehaviourOpacity instance.
|
||||||
|
*
|
||||||
|
* Return value: the newly created #ClutterBehaviourOpacity
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
|
*/
|
||||||
ClutterBehaviour*
|
ClutterBehaviour*
|
||||||
clutter_behaviour_opacity_new (ClutterAlpha *alpha,
|
clutter_behaviour_opacity_new (ClutterAlpha *alpha,
|
||||||
guint8 opacity_start,
|
guint8 opacity_start,
|
||||||
|
@ -23,6 +23,16 @@
|
|||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:clutter-behaviour-path
|
||||||
|
* @short_description: A behaviour class interpolating actors along a defined
|
||||||
|
* path.
|
||||||
|
*
|
||||||
|
* #ClutterBehaviourPath interpolates actors along a defined path of points.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
@ -236,9 +246,11 @@ clutter_behaviour_path_init (ClutterBehaviourPath *self)
|
|||||||
* @knots: a list of #ClutterKnots
|
* @knots: a list of #ClutterKnots
|
||||||
* @n_knots: the number of nodes in the path
|
* @n_knots: the number of nodes in the path
|
||||||
*
|
*
|
||||||
* FIXME
|
* Creates a new #ClutterBehaviourPath instance for supplied knots.
|
||||||
*
|
*
|
||||||
* Return value: a #ClutterBehaviour
|
* Return value: a #ClutterBehaviour
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
*/
|
*/
|
||||||
ClutterBehaviour *
|
ClutterBehaviour *
|
||||||
clutter_behaviour_path_new (ClutterAlpha *alpha,
|
clutter_behaviour_path_new (ClutterAlpha *alpha,
|
||||||
@ -262,6 +274,16 @@ clutter_behaviour_path_new (ClutterAlpha *alpha,
|
|||||||
return CLUTTER_BEHAVIOUR (behave);
|
return CLUTTER_BEHAVIOUR (behave);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_behaviour_path_get_knots:
|
||||||
|
* @behave: a #ClutterBehvaiourPath
|
||||||
|
*
|
||||||
|
* Returns a copy of the list of knots contained by the #ClutterBehvaiourPath
|
||||||
|
*
|
||||||
|
* Return value: a #GSList of the paths knots.
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
|
*/
|
||||||
GSList *
|
GSList *
|
||||||
clutter_behaviour_path_get_knots (ClutterBehaviourPath *behave)
|
clutter_behaviour_path_get_knots (ClutterBehaviourPath *behave)
|
||||||
{
|
{
|
||||||
@ -276,6 +298,15 @@ clutter_behaviour_path_get_knots (ClutterBehaviourPath *behave)
|
|||||||
return g_slist_reverse (retval);
|
return g_slist_reverse (retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_behaviour_path_append_knot:
|
||||||
|
* @pathb: a #ClutterBehvaiourPath
|
||||||
|
* @knot: a #ClutterKnot to append.
|
||||||
|
*
|
||||||
|
* Appends a #ClutterKnot to the path
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_path_append_knot (ClutterBehaviourPath *pathb,
|
clutter_behaviour_path_append_knot (ClutterBehaviourPath *pathb,
|
||||||
const ClutterKnot *knot)
|
const ClutterKnot *knot)
|
||||||
@ -289,6 +320,72 @@ clutter_behaviour_path_append_knot (ClutterBehaviourPath *pathb,
|
|||||||
priv->knots = g_slist_append (priv->knots, clutter_knot_copy (knot));
|
priv->knots = g_slist_append (priv->knots, clutter_knot_copy (knot));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_behaviour_path_append_knot:
|
||||||
|
* @pathb: a #ClutterBehvaiourPath
|
||||||
|
* @offset: position in path to insert knot.
|
||||||
|
* @knot: a #ClutterKnot to append.
|
||||||
|
*
|
||||||
|
* Inserts a #ClutterKnot in the path at specified position. Values greater
|
||||||
|
* than total number of knots will append the knot at the end of path.
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_behaviour_path_insert_knot (ClutterBehaviourPath *pathb,
|
||||||
|
guint offset,
|
||||||
|
const ClutterKnot *knot)
|
||||||
|
{
|
||||||
|
ClutterBehaviourPathPrivate *priv;
|
||||||
|
|
||||||
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_PATH (pathb));
|
||||||
|
g_return_if_fail (knot != NULL);
|
||||||
|
|
||||||
|
priv = pathb->priv;
|
||||||
|
priv->knots = g_slist_insert (priv->knots, clutter_knot_copy (knot), offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_behaviour_path_remove_knot:
|
||||||
|
* @pathb: a #ClutterBehvaiourPath
|
||||||
|
* @offset: position in path to remove knot.
|
||||||
|
* @knot: a #ClutterKnot to append.
|
||||||
|
*
|
||||||
|
* Removes a #ClutterKnot in the path at specified offset.
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
clutter_behaviour_path_remove_knot (ClutterBehaviourPath *pathb,
|
||||||
|
guint offset)
|
||||||
|
{
|
||||||
|
ClutterBehaviourPathPrivate *priv;
|
||||||
|
GSList *togo;
|
||||||
|
|
||||||
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_PATH (pathb));
|
||||||
|
|
||||||
|
priv = pathb->priv;
|
||||||
|
|
||||||
|
togo = g_slist_nth (priv->knots, offset);
|
||||||
|
|
||||||
|
if (togo)
|
||||||
|
{
|
||||||
|
clutter_knot_free ((ClutterKnot*)togo->data);
|
||||||
|
priv->knots = g_slist_delete_link (priv->knots, togo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_behaviour_path_append_knots_valist:
|
||||||
|
* @pathb: a #ClutterBehvaiourPath
|
||||||
|
* @first_know: the #ClutterKnot knot to add to the path
|
||||||
|
* @args: the knots to be added
|
||||||
|
*
|
||||||
|
* Similar to clutter_behaviour_path_append_knots() but using a va_list.
|
||||||
|
* Use this function inside bindings.
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
|
*/
|
||||||
static void
|
static void
|
||||||
clutter_behaviour_path_append_knots_valist (ClutterBehaviourPath *pathb,
|
clutter_behaviour_path_append_knots_valist (ClutterBehaviourPath *pathb,
|
||||||
const ClutterKnot *first_knot,
|
const ClutterKnot *first_knot,
|
||||||
@ -304,6 +401,18 @@ clutter_behaviour_path_append_knots_valist (ClutterBehaviourPath *pathb,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_behaviour_path_append_knots:
|
||||||
|
* @pathb: a #ClutterBehvaiourPath
|
||||||
|
* @first_know: the #ClutterKnot knot to add to the path
|
||||||
|
* @Varargs: additional knots to add to the path
|
||||||
|
*
|
||||||
|
* Adds a NULL-terminated list of knots to a path. This function is
|
||||||
|
* equivalent to calling clutter_behaviour_path_append_knot() for each
|
||||||
|
* member of the list.
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_path_append_knots (ClutterBehaviourPath *pathb,
|
clutter_behaviour_path_append_knots (ClutterBehaviourPath *pathb,
|
||||||
const ClutterKnot *first_knot,
|
const ClutterKnot *first_knot,
|
||||||
@ -319,6 +428,14 @@ clutter_behaviour_path_append_knots (ClutterBehaviourPath *pathb,
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_behaviour_path_clear:
|
||||||
|
* @pathb: a #ClutterBehvaiourPath
|
||||||
|
*
|
||||||
|
* Removes all knots from a path
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_path_clear (ClutterBehaviourPath *pathb)
|
clutter_behaviour_path_clear (ClutterBehaviourPath *pathb)
|
||||||
{
|
{
|
||||||
|
@ -93,6 +93,13 @@ void clutter_behaviour_path_append_knot (ClutterBehaviourPath *beh
|
|||||||
void clutter_behaviour_path_append_knots (ClutterBehaviourPath *pathb,
|
void clutter_behaviour_path_append_knots (ClutterBehaviourPath *pathb,
|
||||||
const ClutterKnot *first_knot,
|
const ClutterKnot *first_knot,
|
||||||
...) G_GNUC_NULL_TERMINATED;
|
...) G_GNUC_NULL_TERMINATED;
|
||||||
|
|
||||||
|
void clutter_behaviour_path_insert_knot (ClutterBehaviourPath *pathb,
|
||||||
|
guint offset,
|
||||||
|
const ClutterKnot *knot);
|
||||||
|
void clutter_behaviour_path_remove_knot (ClutterBehaviourPath *pathb,
|
||||||
|
guint offset);
|
||||||
|
|
||||||
void clutter_behaviour_path_clear (ClutterBehaviourPath *path);
|
void clutter_behaviour_path_clear (ClutterBehaviourPath *path);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -23,6 +23,15 @@
|
|||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:clutter-behaviour-scale
|
||||||
|
* @short_description: A behaviour class interpolating actors size between
|
||||||
|
* two values.
|
||||||
|
*
|
||||||
|
* #ClutterBehaviourPath interpolates actors size between two values.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
@ -143,18 +152,44 @@ clutter_behaviour_scale_init (ClutterBehaviourScale *self)
|
|||||||
/**
|
/**
|
||||||
* clutter_behaviour_scale_new:
|
* clutter_behaviour_scale_new:
|
||||||
* @alpha: a #ClutterAlpha
|
* @alpha: a #ClutterAlpha
|
||||||
* @scale_begin: FIXME
|
* @scale_begin: initial scale factor
|
||||||
* @scale_end: FIXME
|
* @scale_end: final scale factor
|
||||||
*
|
*
|
||||||
* FIXME
|
* Creates a new #ClutterBehaviourScale instance.
|
||||||
*
|
*
|
||||||
* Return value: the newly created #ClutterBehaviourScale
|
* Return value: the newly created #ClutterBehaviourScale
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
*/
|
*/
|
||||||
ClutterBehaviour *
|
ClutterBehaviour *
|
||||||
clutter_behaviour_scale_new (ClutterAlpha *alpha,
|
clutter_behaviour_scale_new (ClutterAlpha *alpha,
|
||||||
gdouble scale_begin,
|
gdouble scale_begin,
|
||||||
gdouble scale_end,
|
gdouble scale_end,
|
||||||
ClutterGravity gravity)
|
ClutterGravity gravity)
|
||||||
|
{
|
||||||
|
return clutter_behaviour_scale_newx (alpha,
|
||||||
|
CLUTTER_FLOAT_TO_FIXED (scale_begin),
|
||||||
|
CLUTTER_FLOAT_TO_FIXED (scale_end),
|
||||||
|
gravity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* clutter_behaviour_scale_newx:
|
||||||
|
* @alpha: a #ClutterAlpha
|
||||||
|
* @scale_begin: initial scale factor
|
||||||
|
* @scale_end: final scale factor
|
||||||
|
*
|
||||||
|
* A fixed point implementation of clutter_behaviour_scale_new()
|
||||||
|
*
|
||||||
|
* Return value: the newly created #ClutterBehaviourScale
|
||||||
|
*
|
||||||
|
* Since: 0.2
|
||||||
|
*/
|
||||||
|
ClutterBehaviour *
|
||||||
|
clutter_behaviour_scale_newx (ClutterAlpha *alpha,
|
||||||
|
ClutterFixed scale_begin,
|
||||||
|
ClutterFixed scale_end,
|
||||||
|
ClutterGravity gravity)
|
||||||
{
|
{
|
||||||
ClutterBehaviourScale *behave;
|
ClutterBehaviourScale *behave;
|
||||||
|
|
||||||
@ -162,8 +197,8 @@ clutter_behaviour_scale_new (ClutterAlpha *alpha,
|
|||||||
"alpha", alpha,
|
"alpha", alpha,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
behave->priv->scale_begin = CLUTTER_FLOAT_TO_FIXED (scale_begin);
|
behave->priv->scale_begin = scale_begin;
|
||||||
behave->priv->scale_end = CLUTTER_FLOAT_TO_FIXED (scale_end);
|
behave->priv->scale_end = scale_end;
|
||||||
behave->priv->gravity = gravity;
|
behave->priv->gravity = gravity;
|
||||||
|
|
||||||
return CLUTTER_BEHAVIOUR (behave);
|
return CLUTTER_BEHAVIOUR (behave);
|
||||||
|
@ -91,6 +91,11 @@ clutter_behaviour_scale_new (ClutterAlpha *alpha,
|
|||||||
gdouble scale_end,
|
gdouble scale_end,
|
||||||
ClutterGravity gravity);
|
ClutterGravity gravity);
|
||||||
|
|
||||||
|
ClutterBehaviour*
|
||||||
|
clutter_behaviour_scale_newx (ClutterAlpha *alpha,
|
||||||
|
ClutterFixed scale_begin,
|
||||||
|
ClutterFixed scale_end,
|
||||||
|
ClutterGravity gravity);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -6,11 +6,11 @@ source_h = pangoclutter.h
|
|||||||
|
|
||||||
source_h_priv = pangoclutter-private.h
|
source_h_priv = pangoclutter-private.h
|
||||||
|
|
||||||
noinst_LIBRARIES = libpangoclutter.a
|
noinst_LTLIBRARIES = libpangoclutter.la
|
||||||
|
|
||||||
libpangoclutter_a_SOURCES = $(source_c) \
|
libpangoclutter_la_SOURCES = $(source_c) \
|
||||||
$(source_h) \
|
$(source_h) \
|
||||||
$(source_h_priv)
|
$(source_h_priv)
|
||||||
|
|
||||||
INCLUDES = @GCC_FLAGS@ @CLUTTER_CFLAGS@ -I$(top_srcdir)
|
INCLUDES = @GCC_FLAGS@ @CLUTTER_CFLAGS@ -I$(top_srcdir)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user