[cluttermm] Container: Deprecated several methods



commit f6bc9c03480983468fc794841f8ca2a9daf20f2b
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Mar 23 22:41:10 2014 +0100

    Container: Deprecated several methods
    
    Although we have not yet wrapped the replacements.

 clutter/src/container.ccg |    7 +++++++
 clutter/src/container.hg  |   44 +++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 46 insertions(+), 5 deletions(-)
---
diff --git a/clutter/src/container.ccg b/clutter/src/container.ccg
index 485017d..877d026 100644
--- a/clutter/src/container.ccg
+++ b/clutter/src/container.ccg
@@ -17,6 +17,7 @@
 
 #include <clutter/clutter.h>
 
+_DEPRECATE_IFDEF_START
 namespace
 {
 extern "C"
@@ -42,10 +43,13 @@ static void SignalProxy_Container_foreach_callback(ClutterActor *actor, gpointer
 }
 } // extern "C"
 } // anonymous namespace
+_DEPRECATE_IFDEF_END
 
 namespace Clutter
 {
 
+
+_DEPRECATE_IFDEF_START
 void Container::raise_child(const Glib::RefPtr<Actor>& actor)
 {
   clutter_container_raise_child(gobj(), Glib::unwrap(actor), 0);
@@ -61,6 +65,7 @@ void Container::foreach(const SlotForEach& slot)
   clutter_container_foreach(gobj(),
       &SignalProxy_Container_foreach_callback, const_cast<SlotForEach*>(&slot));
 }
+_DEPRECATE_IFDEF_END
 
 void Container::get_child_property_value(const Glib::RefPtr<const Actor>& child,
                      const Glib::ustring& property_name, Glib::ValueBase& value) const
@@ -79,6 +84,7 @@ void Container::actor_removed(const Glib::RefPtr<Actor>& actor)
   g_signal_emit_by_name(gobj(), "actor_removed", actor->gobj());
 }
 
+_DEPRECATE_IFDEF_START
 std::vector<Glib::RefPtr<Actor> > Container::get_children()
 {
   GList* actorList = clutter_container_get_children(gobj());
@@ -108,5 +114,6 @@ std::vector<Glib::RefPtr<const Actor> > Container::get_children() const
 
   return actorVec;
 }
+_DEPRECATE_IFDEF_END
 
 } // namespace Clutter
diff --git a/clutter/src/container.hg b/clutter/src/container.hg
index 8c94317..8e5a239 100644
--- a/clutter/src/container.hg
+++ b/clutter/src/container.hg
@@ -23,6 +23,10 @@
 _DEFS(cluttermm,clutter)
 _PINCLUDE(glibmm/private/interface_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
 namespace Clutter
 {
 
@@ -31,26 +35,56 @@ class Container : public Glib::Interface
   _CLASS_INTERFACE(Container, ClutterContainer, CLUTTER_CONTAINER, ClutterContainerIface)
 
 public:
-  _WRAP_METHOD(void add_actor(const Glib::RefPtr<Actor>& actor), clutter_container_add_actor)
-  _WRAP_METHOD(void remove_actor(const Glib::RefPtr<Actor>& actor), clutter_container_remove_actor)
+  _WRAP_METHOD(void add_actor(const Glib::RefPtr<Actor>& actor), clutter_container_add_actor, deprecated 
"Use Actor::add_child() instead.")
+  _WRAP_METHOD(void remove_actor(const Glib::RefPtr<Actor>& actor), clutter_container_remove_actor, 
deprecated "Use Actor::remove_child() instead.")
 
+_DEPRECATE_IFDEF_START
+  /**
+   * @deprecated Use Actor::get_children() instead.
+   */
   std::vector<Glib::RefPtr<Actor> >       get_children();
+
+  /**
+   * @deprecated Use Actor::get_children() instead.
+   */
   std::vector<Glib::RefPtr<const Actor> > get_children() const;
 
-  _WRAP_METHOD(void lower_child(const Glib::RefPtr<Actor>& actor, const Glib::RefPtr<Actor>& sibling), 
clutter_container_lower_child)
+  _WRAP_METHOD(void lower_child(const Glib::RefPtr<Actor>& actor, const Glib::RefPtr<Actor>& sibling), 
clutter_container_lower_child, deprecated "Use set_child_below_sibling() instead.")
+
+
+  /**
+   * @deprecated "Use set_child_below_sibling() instead.
+   */
   void lower_child(const Glib::RefPtr<Actor>& actor);
-  _WRAP_METHOD(void raise_child(const Glib::RefPtr<Actor>& actor, const Glib::RefPtr<Actor>& sibling), 
clutter_container_raise_child)
+_DEPRECATE_IFDEF_END
+
+  _WRAP_METHOD(void raise_child(const Glib::RefPtr<Actor>& actor, const Glib::RefPtr<Actor>& sibling), 
clutter_container_raise_child, deprecated "Use set_child_above_sibling() instead.")
+
+
+_DEPRECATE_IFDEF_START
+  /**
+   * @deprecated "Use set_child_above_sibling() instead.
+   */
   void raise_child(const Glib::RefPtr<Actor>& actor);
+_DEPRECATE_IFDEF_END
 
   _WRAP_METHOD(Glib::RefPtr<Actor> find_child(const Glib::ustring& child_name), 
clutter_container_find_child_by_name, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Actor> find_child(const Glib::ustring& child_name) const, 
clutter_container_find_child_by_name, constversion)
 
+_DEPRECATE_IFDEF_START
   /** For instance,
    * void on_foreach(const Glib::RefPtr<Actor>& actor)
+   * @deprecated See foreach().
    */
   typedef sigc::slot<void, const Glib::RefPtr<Actor>&> SlotForEach;
 
+  /**
+   * @deprecated Use Actor::get_first_child() or Actor::get_last_child()
+   * to retrieve the beginning of the list of children, and Actor::get_next_sibling()
+   * and Actor::get_previous_sibling() to iterate over it. Alternatively, use the ActorIter API.
+   */
   void foreach(const SlotForEach& slot);
+_DEPRECATE_IFDEF_END
   _IGNORE(clutter_container_foreach)
 
   // not sure the valist stuff is good to wrap in C++
@@ -84,7 +118,7 @@ public:
 protected:
 
   // Only useful as a protected method for derived implementations.
-  _WRAP_METHOD(void sort_depth_order(), clutter_container_sort_depth_order)
+  _WRAP_METHOD(void sort_depth_order(), clutter_container_sort_depth_order, deprecated "This no longer does 
anything.")
 
   _WRAP_VFUNC(void add(const Glib::RefPtr<Actor>& actor), add)
   _WRAP_VFUNC(void remove(const Glib::RefPtr<Actor>& actor), remove)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]