2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-group.c:
	* clutter/clutter-group.h: Add the clutter_group_add() convenience
	function; it's now "undeprecated" and implemented as a macro

	* clutter/clutter-stage.h: Add clutter_stage_add() as a convenience
	macro

	* clutter/cogl/cogl.h: Include just the needed headers instead
	of the whole clutter.h; this avoids rebuild cogl when not needed
This commit is contained in:
Emmanuele Bassi 2007-12-21 16:04:39 +00:00
parent ee4bcf6465
commit e3ebfdb14b
7 changed files with 50 additions and 30 deletions

View File

@ -1,3 +1,15 @@
2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-group.c:
* clutter/clutter-group.h: Add the clutter_group_add() convenience
function; it's now "undeprecated" and implemented as a macro
* clutter/clutter-stage.h: Add clutter_stage_add() as a convenience
macro
* clutter/cogl/cogl.h: Include just the needed headers instead
of the whole clutter.h; this avoids rebuild cogl when not needed
2007-12-21 Emmanuele Bassi <ebassi@openedhand.com> 2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
* Makefile.am: Move tests build before docs, to cut down the * Makefile.am: Move tests build before docs, to cut down the

View File

@ -492,23 +492,6 @@ clutter_group_new (void)
return g_object_new (CLUTTER_TYPE_GROUP, NULL); return g_object_new (CLUTTER_TYPE_GROUP, NULL);
} }
/**
* clutter_group_add:
* @group: A #ClutterGroup
* @actor: A #ClutterActor
*
* Adds a new child #ClutterActor to the #ClutterGroup.
*
* @Deprecated: 0.4: This function is obsolete, use
* clutter_container_add_actor() instead.
*/
void
clutter_group_add (ClutterGroup *group,
ClutterActor *actor)
{
clutter_container_add_actor (CLUTTER_CONTAINER (group), actor);
}
/** /**
* clutter_group_add_many_valist: * clutter_group_add_many_valist:
* @group: a #ClutterGroup * @group: a #ClutterGroup

View File

@ -23,8 +23,8 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef _HAVE_CLUTTER_GROUP_H #ifndef __CLUTTER_GROUP_H__
#define _HAVE_CLUTTER_GROUP_H #define __CLUTTER_GROUP_H__
#include <glib-object.h> #include <glib-object.h>
#include <clutter/clutter-actor.h> #include <clutter/clutter-actor.h>
@ -76,12 +76,12 @@ struct _ClutterGroupClass
ClutterActor *child); ClutterActor *child);
/* padding for future expansion */ /* padding for future expansion */
void (*_clutter_group_1) (void); void (*_clutter_reserved1) (void);
void (*_clutter_group_2) (void); void (*_clutter_reserved2) (void);
void (*_clutter_group_3) (void); void (*_clutter_reserved3) (void);
void (*_clutter_group_4) (void); void (*_clutter_reserved4) (void);
void (*_clutter_group_5) (void); void (*_clutter_reserved5) (void);
void (*_clutter_group_6) (void); void (*_clutter_reserved6) (void);
}; };
GType clutter_group_get_type (void) G_GNUC_CONST; GType clutter_group_get_type (void) G_GNUC_CONST;
@ -91,9 +91,15 @@ ClutterActor *clutter_group_get_nth_child (ClutterGroup *self,
gint clutter_group_get_n_children (ClutterGroup *self); gint clutter_group_get_n_children (ClutterGroup *self);
void clutter_group_remove_all (ClutterGroup *group); void clutter_group_remove_all (ClutterGroup *group);
#define clutter_group_add(group,actor) G_STMT_START { \
if (CLUTTER_IS_GROUP ((group)) && CLUTTER_IS_ACTOR ((actor))) \
{ \
ClutterContainer *_container = (ClutterContainer *) (group); \
ClutterActor *_actor = (ClutterActor *) (actor); \
clutter_container_add_actor (_container, _actor); \
} } G_STMT_END
#ifndef CLUTTER_DISABLE_DEPRECATED #ifndef CLUTTER_DISABLE_DEPRECATED
void clutter_group_add (ClutterGroup *group,
ClutterActor *actor);
void clutter_group_add_many (ClutterGroup *group, void clutter_group_add_many (ClutterGroup *group,
ClutterActor *first_actor, ClutterActor *first_actor,
...) G_GNUC_NULL_TERMINATED; ...) G_GNUC_NULL_TERMINATED;
@ -113,4 +119,4 @@ void clutter_group_sort_depth_order (ClutterGroup *self);
G_END_DECLS G_END_DECLS
#endif #endif /* __CLUTTER_GROUP_H__ */

View File

@ -219,6 +219,15 @@ void clutter_stage_set_key_focus (ClutterStage *stage,
ClutterActor *actor); ClutterActor *actor);
ClutterActor * clutter_stage_get_key_focus (ClutterStage *stage); ClutterActor * clutter_stage_get_key_focus (ClutterStage *stage);
/* Commodity macro */
#define clutter_stage_add(stage,actor) G_STMT_START { \
if (CLUTTER_IS_STAGE ((stage)) && CLUTTER_IS_ACTOR ((actor))) \
{ \
ClutterContainer *_container = (ClutterContainer *) (stage); \
ClutterActor *_actor = (ClutterActor *) (actor); \
clutter_container_add_actor (_container, _actor); \
} } G_STMT_END
G_END_DECLS G_END_DECLS
#endif /* __CLUTTER_STAGE_H__ */ #endif /* __CLUTTER_STAGE_H__ */

View File

@ -43,7 +43,10 @@
#define __COGL_H__ #define __COGL_H__
#include <glib.h> #include <glib.h>
#include <clutter/clutter.h> #include <clutter/clutter-color.h>
#include <clutter/clutter-feature.h>
#include <clutter/clutter-fixed.h>
#include <clutter/clutter-types.h>
#include "cogl-defines.h" #include "cogl-defines.h"

View File

@ -1,3 +1,9 @@
2007-12-21 Emmanuele Bassi,,, <ebassi@sprite>
reviewed by: <delete if not using a buddy>
* clutter-sections.txt:
2007-12-21 Emmanuele Bassi <ebassi@openedhand.com> 2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-sections.txt: Add clutter_texture_set_area_from_rgb_data() * clutter-sections.txt: Add clutter_texture_set_area_from_rgb_data()

View File

@ -195,7 +195,6 @@ clutter_clone_texture_get_type
ClutterGroup ClutterGroup
ClutterGroupClass ClutterGroupClass
clutter_group_new clutter_group_new
clutter_group_add
clutter_group_add_many clutter_group_add_many
clutter_group_add_many_valist clutter_group_add_many_valist
clutter_group_remove clutter_group_remove
@ -215,6 +214,7 @@ CLUTTER_GROUP_GET_CLASS
<SUBSECTION Private> <SUBSECTION Private>
ClutterGroupPrivate ClutterGroupPrivate
clutter_group_get_type clutter_group_get_type
clutter_group_add
</SECTION> </SECTION>
<SECTION> <SECTION>
@ -506,6 +506,7 @@ ClutterStagePrivate
clutter_stage_get_type clutter_stage_get_type
clutter_perspective_get_type clutter_perspective_get_type
clutter_fog_get_type clutter_fog_get_type
clutter_stage_add
</SECTION> </SECTION>
<SECTION> <SECTION>