2006-11-15 18:37:53 -05:00
|
|
|
/*
|
|
|
|
* Clutter.
|
|
|
|
*
|
|
|
|
* An OpenGL based 'interactive canvas' library.
|
|
|
|
*
|
|
|
|
* Authored By Matthew Allum <mallum@openedhand.com>
|
|
|
|
* Jorn Baayen <jorn@openedhand.com>
|
|
|
|
* Emmanuele Bassi <ebassi@openedhand.com>
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 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.
|
|
|
|
*/
|
|
|
|
|
2006-09-08 16:57:31 -04:00
|
|
|
#ifndef _HAVE_CLUTTER_BEHAVIOUR_H
|
|
|
|
#define _HAVE_CLUTTER_BEHAVIOUR_H
|
2006-08-13 19:55:52 -04:00
|
|
|
|
|
|
|
#include <glib-object.h>
|
2006-11-15 18:37:53 -05:00
|
|
|
#include <clutter/clutter-alpha.h>
|
2006-08-13 19:55:52 -04:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2006-09-08 16:57:31 -04:00
|
|
|
#define CLUTTER_TYPE_BEHAVIOUR clutter_behaviour_get_type()
|
2006-08-13 19:55:52 -04:00
|
|
|
|
2006-09-08 16:57:31 -04:00
|
|
|
#define CLUTTER_BEHAVIOUR(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
|
|
|
CLUTTER_TYPE_BEHAVIOUR, ClutterBehaviour))
|
2006-08-13 19:55:52 -04:00
|
|
|
|
2006-09-08 16:57:31 -04:00
|
|
|
#define CLUTTER_BEHAVIOUR_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST ((klass), \
|
|
|
|
CLUTTER_TYPE_BEHAVIOUR, ClutterBehaviourClass))
|
2006-08-13 19:55:52 -04:00
|
|
|
|
2006-09-08 16:57:31 -04:00
|
|
|
#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))
|
|
|
|
|
2006-11-14 09:12:56 -05:00
|
|
|
typedef struct _ClutterBehaviour ClutterBehaviour;
|
|
|
|
typedef struct _ClutterBehaviourPrivate ClutterBehaviourPrivate;
|
|
|
|
typedef struct _ClutterBehaviourClass ClutterBehaviourClass;
|
2006-12-08 11:12:52 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ClutterBehaviourFunction:
|
|
|
|
* @behaviour: the #ClutterBehaviour
|
|
|
|
* @actor: an actor driven by @behaviour
|
|
|
|
* @data: optional data passed to the function
|
|
|
|
*
|
|
|
|
* This function is passed to clutter_behaviour_foreach_actor() and
|
|
|
|
* will be called for each actor driven by @behaviour.
|
|
|
|
*/
|
|
|
|
typedef void (*ClutterBehaviourForeachFunc) (ClutterBehaviour *behaviour,
|
|
|
|
ClutterActor *actor,
|
|
|
|
gpointer data);
|
|
|
|
|
2006-08-13 19:55:52 -04:00
|
|
|
struct _ClutterBehaviour
|
|
|
|
{
|
2006-11-15 18:37:53 -05:00
|
|
|
/*< private >*/
|
|
|
|
GObject parent;
|
2006-08-13 19:55:52 -04:00
|
|
|
ClutterBehaviourPrivate *priv;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _ClutterBehaviourClass
|
|
|
|
{
|
2006-08-15 16:38:25 -04:00
|
|
|
GObjectClass parent_class;
|
2006-08-29 Jorn Baayen <jorn@openedhand.com>
* clutter/clutter-behaviour.c: (_clutter_behaviour_finalize),
(_clutter_behaviour_set_property),
(_clutter_behaviour_get_property), (clutter_behaviour_class_init),
(clutter_behaviour_init), (clutter_behaviour_apply),
(clutter_behaviour_remove), (clutter_behaviour_remove_all),
(clutter_behaviour_actors_foreach):
* clutter/clutter-behaviour.h:
* clutter/clutter-behaviours.c:
(clutter_behaviour_property_change),
(clutter_behaviour_opacity_dispose),
(clutter_behaviour_opacity_finalize),
(clutter_behaviour_opacity_class_init),
(clutter_behaviour_opacity_init):
* clutter/clutter-behaviours.h:
* clutter/clutter-marshal.list:
* examples/behave.c: (main):
Behaviours track generic GObject properties.
* clutter/clutter-video-texture.h:
Remove signal prototypes - they are already specified in
clutter-media.h.
2006-08-29 09:20:29 -04:00
|
|
|
|
2006-11-17 13:45:31 -05:00
|
|
|
/* vfunc, not signal */
|
|
|
|
void (*alpha_notify) (ClutterBehaviour *behave,
|
|
|
|
guint32 alpha_value);
|
2006-09-08 16:57:31 -04:00
|
|
|
|
2006-11-17 13:45:31 -05:00
|
|
|
/* padding, for future expansion */
|
2006-11-15 18:37:53 -05:00
|
|
|
void (*_clutter_behaviour1) (void);
|
|
|
|
void (*_clutter_behaviour2) (void);
|
|
|
|
void (*_clutter_behaviour3) (void);
|
|
|
|
void (*_clutter_behaviour4) (void);
|
|
|
|
void (*_clutter_behaviour5) (void);
|
|
|
|
void (*_clutter_behaviour6) (void);
|
|
|
|
};
|
2006-09-08 16:57:31 -04:00
|
|
|
|
2006-11-15 18:37:53 -05:00
|
|
|
GType clutter_behaviour_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2006-12-08 11:12:52 -05:00
|
|
|
void clutter_behaviour_apply (ClutterBehaviour *behave,
|
|
|
|
ClutterActor *actor);
|
|
|
|
void clutter_behaviour_remove (ClutterBehaviour *behave,
|
|
|
|
ClutterActor *actor);
|
|
|
|
void clutter_behaviour_actors_foreach (ClutterBehaviour *behave,
|
|
|
|
ClutterBehaviourForeachFunc func,
|
|
|
|
gpointer data);
|
2007-01-16 09:19:39 -05:00
|
|
|
gint clutter_behaviour_get_n_actors (ClutterBehaviour *behave);
|
|
|
|
|
|
|
|
ClutterActor* clutter_behaviour_get_nth_actor (ClutterBehaviour *behave,
|
|
|
|
gint num);
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-12-08 11:12:52 -05:00
|
|
|
GSList * clutter_behaviour_get_actors (ClutterBehaviour *behave);
|
|
|
|
ClutterAlpha *clutter_behaviour_get_alpha (ClutterBehaviour *behave);
|
|
|
|
void clutter_behaviour_set_alpha (ClutterBehaviour *behave,
|
|
|
|
ClutterAlpha *alpha);
|
2006-08-13 19:55:52 -04:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2006-09-08 16:57:31 -04:00
|
|
|
#endif
|