mutter/clutter/clutter-behaviour.h
Emmanuele Bassi 3f62c72d07 2006-11-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-alpha.h:
	* clutter/clutter-alpha.c: ClutterAlpha is an initially
	floating object, as it makes sense only when bound to
	a ClutterBehaviour; add checks for public API.

	* clutter/clutter-behaviour.h:
	* clutter/clutter-behaviour.c: Remove the ClutterBehaviour
	constructor: ClutterBehaviour is an abstract class which
	must be implemented by subclassing; add checks for public
	API; unref the actors on finalize; sink the ClutterAlpha
	object.

	* clutter/clutter-behaviours.h: ClutterKnot is a boxed
	type: add the _get_type() function declaration and the
	type macro.
2006-11-14 14:12:56 +00:00

71 lines
1.7 KiB
C

#ifndef _HAVE_CLUTTER_BEHAVIOUR_H
#define _HAVE_CLUTTER_BEHAVIOUR_H
#include <glib-object.h>
#include "clutter-alpha.h"
G_BEGIN_DECLS
#define CLUTTER_TYPE_BEHAVIOUR clutter_behaviour_get_type()
#define CLUTTER_BEHAVIOUR(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
CLUTTER_TYPE_BEHAVIOUR, ClutterBehaviour))
#define CLUTTER_BEHAVIOUR_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
CLUTTER_TYPE_BEHAVIOUR, ClutterBehaviourClass))
#define CLUTTER_IS_BEHAVIOUR(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
CLUTTER_TYPE_BEHAVIOUR))
#define CLUTTER_IS_BEHAVIOUR_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
CLUTTER_TYPE_BEHAVIOUR))
#define CLUTTER_BEHAVIOUR_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
CLUTTER_TYPE_BEHAVIOUR, ClutterBehaviourClass))
typedef struct _ClutterBehaviour ClutterBehaviour;
typedef struct _ClutterBehaviourPrivate ClutterBehaviourPrivate;
typedef struct _ClutterBehaviourClass ClutterBehaviourClass;
struct _ClutterBehaviour
{
GObject parent;
ClutterBehaviourPrivate *priv;
};
struct _ClutterBehaviourClass
{
GObjectClass parent_class;
void (*alpha_notify) (ClutterBehaviour *behave);
};
GType clutter_behaviour_get_type (void);
void
clutter_behaviour_apply (ClutterBehaviour *behave, ClutterActor *actor);
void
clutter_behaviour_remove (ClutterBehaviour *behave, ClutterActor *actor);
void
clutter_behaviour_actors_foreach (ClutterBehaviour *behave,
GFunc func,
gpointer userdata);
ClutterAlpha*
clutter_behaviour_get_alpha (ClutterBehaviour *behave);
void
clutter_behaviour_set_alpha (ClutterBehaviour *behave,
ClutterAlpha *alpha);
G_END_DECLS
#endif