Commit ad4d475d authored by Emmanuele Bassi's avatar Emmanuele Bassi

2.0: Remove deprecated ClutterContainer API

parent 6155a190
......@@ -895,8 +895,7 @@ clutter_bin_layout_add (ClutterBinLayout *self,
return;
}
clutter_container_add_actor (priv->container, child);
clutter_actor_add_child (CLUTTER_ACTOR (priv->container), child);
manager = CLUTTER_LAYOUT_MANAGER (self);
meta = clutter_layout_manager_get_child_meta (manager,
priv->container,
......
......@@ -1841,7 +1841,7 @@ clutter_box_layout_pack (ClutterBoxLayout *layout,
return;
}
clutter_container_add_actor (priv->container, actor);
clutter_actor_add_child (CLUTTER_ACTOR (priv->container), actor);
manager = CLUTTER_LAYOUT_MANAGER (layout);
meta = clutter_layout_manager_get_child_meta (manager,
......
This diff is collapsed.
......@@ -55,25 +55,6 @@ typedef struct _ClutterContainerIface ClutterContainerIface;
/**
* ClutterContainerIface:
* @add: virtual function for adding an actor to the container. This virtual
* function is deprecated, and it should not be overridden.
* @remove: virtual function for removing an actor from the container. This
* virtual function is deprecated, and it should not be overridden.
* @foreach: virtual function for iterating over the container's children.
* This virtual function is deprecated, and it should not be overridden.
* @foreach_with_internals: virtual functions for iterating over the
* container's children, both added using the #ClutterContainer API
* and internal children. The implementation of this virtual function
* is required only if the #ClutterContainer implementation has
* internal children. This virtual function is deprecated, and it should
* not be overridden.
* @raise: virtual function for raising a child. This virtual function is
* deprecated and it should not be overridden.
* @lower: virtual function for lowering a child. This virtual function is
* deprecated and it should not be overridden.
* @sort_depth_order: virtual function for sorting the children of a
* container depending on their depth. This virtual function is deprecated
* and it should not be overridden.
* @child_meta_type: The GType used for storing auxiliary information about
* each of the containers children.
* @create_child_meta: virtual function that gets called for each added
......@@ -100,27 +81,6 @@ struct _ClutterContainerIface
GTypeInterface g_iface;
/*< public >*/
void (* add) (ClutterContainer *container,
ClutterActor *actor);
void (* remove) (ClutterContainer *container,
ClutterActor *actor);
void (* foreach) (ClutterContainer *container,
ClutterCallback callback,
gpointer user_data);
void (* foreach_with_internals) (ClutterContainer *container,
ClutterCallback callback,
gpointer user_data);
/* child stacking */
void (* raise) (ClutterContainer *container,
ClutterActor *actor,
ClutterActor *sibling);
void (* lower) (ClutterContainer *container,
ClutterActor *actor,
ClutterActor *sibling);
void (* sort_depth_order) (ClutterContainer *container);
/* ClutterChildMeta management */
GType child_meta_type;
void (* create_child_meta) (ClutterContainer *container,
......@@ -141,43 +101,40 @@ struct _ClutterContainerIface
GParamSpec *pspec);
};
GType clutter_container_get_type (void) G_GNUC_CONST;
ClutterActor *clutter_container_find_child_by_name (ClutterContainer *container,
const gchar *child_name);
GParamSpec * clutter_container_class_find_child_property (GObjectClass *klass,
const gchar *property_name);
GParamSpec ** clutter_container_class_list_child_properties (GObjectClass *klass,
guint *n_properties);
void clutter_container_create_child_meta (ClutterContainer *container,
ClutterActor *actor);
void clutter_container_destroy_child_meta (ClutterContainer *container,
ClutterActor *actor);
ClutterChildMeta *clutter_container_get_child_meta (ClutterContainer *container,
ClutterActor *actor);
void clutter_container_child_set_property (ClutterContainer *container,
ClutterActor *child,
const gchar * property,
const GValue *value);
void clutter_container_child_get_property (ClutterContainer *container,
ClutterActor *child,
const gchar *property,
GValue *value);
void clutter_container_child_set (ClutterContainer *container,
ClutterActor *actor,
const gchar *first_prop,
...) G_GNUC_NULL_TERMINATED;
void clutter_container_child_get (ClutterContainer *container,
ClutterActor *actor,
const gchar *first_prop,
...) G_GNUC_NULL_TERMINATED;
void clutter_container_child_notify (ClutterContainer *container,
ClutterActor *child,
GParamSpec *pspec);
GType clutter_container_get_type (void) G_GNUC_CONST;
GParamSpec * clutter_container_class_find_child_property (GObjectClass *klass,
const gchar *property_name);
GParamSpec ** clutter_container_class_list_child_properties (GObjectClass *klass,
guint *n_properties);
void clutter_container_create_child_meta (ClutterContainer *container,
ClutterActor *actor);
void clutter_container_destroy_child_meta (ClutterContainer *container,
ClutterActor *actor);
ClutterChildMeta * clutter_container_get_child_meta (ClutterContainer *container,
ClutterActor *actor);
void clutter_container_child_set_property (ClutterContainer *container,
ClutterActor *child,
const gchar * property,
const GValue *value);
void clutter_container_child_get_property (ClutterContainer *container,
ClutterActor *child,
const gchar *property,
GValue *value);
void clutter_container_child_set (ClutterContainer *container,
ClutterActor *actor,
const gchar *first_prop,
...) G_GNUC_NULL_TERMINATED;
void clutter_container_child_get (ClutterContainer *container,
ClutterActor *actor,
const gchar *first_prop,
...) G_GNUC_NULL_TERMINATED;
void clutter_container_child_notify (ClutterContainer *container,
ClutterActor *child,
GParamSpec *pspec);
G_END_DECLS
......
......@@ -79,11 +79,7 @@
#include "cogl/cogl.h"
static void clutter_container_iface_init (ClutterContainerIface *iface);
G_DEFINE_TYPE_WITH_CODE (ClutterStage, clutter_stage, CLUTTER_TYPE_ACTOR,
G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTAINER,
clutter_container_iface_init))
G_DEFINE_TYPE (ClutterStage, clutter_stage, CLUTTER_TYPE_ACTOR)
#define CLUTTER_STAGE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), CLUTTER_TYPE_STAGE, ClutterStagePrivate))
......@@ -210,70 +206,6 @@ static const ClutterColor default_stage_color = { 255, 255, 255, 255 };
static void _clutter_stage_maybe_finish_queue_redraws (ClutterStage *stage);
static void free_queue_redraw_entry (ClutterStageQueueRedrawEntry *entry);
static void
clutter_stage_real_add (ClutterContainer *container,
ClutterActor *child)
{
clutter_actor_add_child (CLUTTER_ACTOR (container), child);
}
static void
clutter_stage_real_remove (ClutterContainer *container,
ClutterActor *child)
{
clutter_actor_remove_child (CLUTTER_ACTOR (container), child);
}
static void
clutter_stage_real_foreach (ClutterContainer *container,
ClutterCallback callback,
gpointer user_data)
{
ClutterActorIter iter;
ClutterActor *child;
clutter_actor_iter_init (&iter, CLUTTER_ACTOR (container));
while (clutter_actor_iter_next (&iter, &child))
callback (child, user_data);
}
static void
clutter_stage_real_raise (ClutterContainer *container,
ClutterActor *child,
ClutterActor *sibling)
{
clutter_actor_set_child_above_sibling (CLUTTER_ACTOR (container),
child,
sibling);
}
static void
clutter_stage_real_lower (ClutterContainer *container,
ClutterActor *child,
ClutterActor *sibling)
{
clutter_actor_set_child_below_sibling (CLUTTER_ACTOR (container),
child,
sibling);
}
static void
clutter_stage_real_sort_depth_order (ClutterContainer *container)
{
}
static void
clutter_container_iface_init (ClutterContainerIface *iface)
{
iface->add = clutter_stage_real_add;
iface->remove = clutter_stage_real_remove;
iface->foreach = clutter_stage_real_foreach;
iface->raise = clutter_stage_real_raise;
iface->lower = clutter_stage_real_lower;
iface->sort_depth_order = clutter_stage_real_sort_depth_order;
}
static void
clutter_stage_get_preferred_width (ClutterActor *self,
gfloat for_height,
......
......@@ -1896,7 +1896,7 @@ clutter_table_layout_pack (ClutterTableLayout *layout,
update_row_col (CLUTTER_TABLE_LAYOUT (layout), priv->container);
clutter_container_add_actor (priv->container, actor);
clutter_actor_add_child (CLUTTER_ACTOR (priv->container), actor);
manager = CLUTTER_LAYOUT_MANAGER (layout);
meta = clutter_layout_manager_get_child_meta (manager,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment