Deprecate mallum's add() macros for Group and Stage

I think we're way past overdue.
This commit is contained in:
Emmanuele Bassi 2011-07-03 19:31:15 +01:00
parent d65161a7fd
commit e9a42f23fe
2 changed files with 9 additions and 1 deletions

View File

@ -104,7 +104,9 @@ 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);
/* for Mr. Mallum */ #ifndef CLUTTER_DISABLE_DEPRECATED
/* for Mr. Mallum only */
#define clutter_group_add(group,actor) G_STMT_START { \ #define clutter_group_add(group,actor) G_STMT_START { \
ClutterActor *_actor = (ClutterActor *) (actor); \ ClutterActor *_actor = (ClutterActor *) (actor); \
if (CLUTTER_IS_GROUP ((group)) && CLUTTER_IS_ACTOR ((_actor))) \ if (CLUTTER_IS_GROUP ((group)) && CLUTTER_IS_ACTOR ((_actor))) \
@ -113,6 +115,8 @@ void clutter_group_remove_all (ClutterGroup *group);
clutter_container_add_actor (_container, _actor); \ clutter_container_add_actor (_container, _actor); \
} } G_STMT_END } } G_STMT_END
#endif /* CLUTTER_DISABLE_DEPRECATED */
G_END_DECLS G_END_DECLS
#endif /* __CLUTTER_GROUP_H__ */ #endif /* __CLUTTER_GROUP_H__ */

View File

@ -267,6 +267,8 @@ void clutter_stage_set_motion_events_enabled (ClutterStage *sta
gboolean enabled); gboolean enabled);
gboolean clutter_stage_get_motion_events_enabled (ClutterStage *stage); gboolean clutter_stage_get_motion_events_enabled (ClutterStage *stage);
#ifndef CLUTTER_DISABLE_DEPRECATED
/* Commodity macro, for mallum only */ /* Commodity macro, for mallum only */
#define clutter_stage_add(stage,actor) G_STMT_START { \ #define clutter_stage_add(stage,actor) G_STMT_START { \
if (CLUTTER_IS_STAGE ((stage)) && CLUTTER_IS_ACTOR ((actor))) \ if (CLUTTER_IS_STAGE ((stage)) && CLUTTER_IS_ACTOR ((actor))) \
@ -276,6 +278,8 @@ gboolean clutter_stage_get_motion_events_enabled (ClutterStage *sta
clutter_container_add_actor (_container, _actor); \ clutter_container_add_actor (_container, _actor); \
} } G_STMT_END } } G_STMT_END
#endif /* CLUTTER_DISABLE_DEPRECATED */
G_END_DECLS G_END_DECLS
#endif /* __CLUTTER_STAGE_H__ */ #endif /* __CLUTTER_STAGE_H__ */