[cluttermm] Replaced use of Glib::*Handle containers with std::vector.



commit a8e254c1f470dfaf1e238dff28756490eb11cb78
Author: Chris Kühl <chrisk openismus com>
Date:   Tue Sep 7 16:26:02 2010 +0200

    Replaced use of Glib::*Handle containers with std::vector.
    
    	* clutter/src/behaviour-path.[hg|ccg]: create_with_knots takes std::vector
    					       instead of Glib::ArrayHandle.
    	* clutter/src/behaviour.[hg|ccg]: get_actor returns std::vector instead of
    	                                  Glib::SListHandle.
    	* clutter/src/container.[hg|ccg]: get_children returns std::vector instead of
    	                                  Glib::ListHandle.
    	* clutter/src/score.[hg|ccg]: list_timelines returns std::vector instead of
    	                              Glib::ListHandle.
    	* clutter/src/script.[hg|ccg]: add_search_path takes std::vector
    				       instead of Glib::ArrayHandle.
    	* clutter/src/stage.[hg|ccg]: Removed trailing whitespace.
    	* clutter/src/timeline.[hg|ccg]: list_markers returns std::vector instead of
    	                                 Glib::StringArrayHandle.

 ChangeLog                      |   18 +++++++++++++++++
 clutter/src/behaviour-path.ccg |    2 +-
 clutter/src/behaviour-path.hg  |    2 +-
 clutter/src/behaviour.ccg      |   32 ++++++++++++++++++++++++++++++
 clutter/src/behaviour.hg       |   13 +++++------
 clutter/src/container.ccg      |   32 ++++++++++++++++++++++++++++-
 clutter/src/container.hg       |    6 +---
 clutter/src/score.ccg          |   28 ++++++++++++++++++++++++++
 clutter/src/score.hg           |    8 ++----
 clutter/src/script.ccg         |   42 ++++++++++++++++++++++++++++++++++++++-
 clutter/src/script.hg          |   13 ++++-------
 clutter/src/stage.hg           |   18 ++++++++--------
 clutter/src/timeline.ccg       |   11 ++++++++-
 clutter/src/timeline.hg        |    2 +-
 14 files changed, 185 insertions(+), 42 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d199aa7..e90bc61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2010-09-07  Chris Kühl  <chrisk openismus com>
+
+	Replaced use of Glib::*Handle containers with std::vector.
+
+	* clutter/src/behaviour-path.[hg|ccg]: create_with_knots takes std::vector
+					       instead of Glib::ArrayHandle.
+	* clutter/src/behaviour.[hg|ccg]: get_actor returns std::vector instead of
+	                                  Glib::SListHandle.
+	* clutter/src/container.[hg|ccg]: get_children returns std::vector instead of
+	                                  Glib::ListHandle.
+	* clutter/src/score.[hg|ccg]: list_timelines returns std::vector instead of
+	                              Glib::ListHandle.
+	* clutter/src/script.[hg|ccg]: add_search_path takes std::vector
+				       instead of Glib::ArrayHandle.
+	* clutter/src/stage.[hg|ccg]: Removed trailing whitespace.
+	* clutter/src/timeline.[hg|ccg]: list_markers returns std::vector instead of
+	                                 Glib::StringArrayHandle.
+
 2010-09-02   Luca Wehrstedt  <lerks users sourceforge net>
 
 	Texture: Rename get_amx_tile_waste() to get_max_tile_waste()
diff --git a/clutter/src/behaviour-path.ccg b/clutter/src/behaviour-path.ccg
index 25f723a..2f669fe 100644
--- a/clutter/src/behaviour-path.ccg
+++ b/clutter/src/behaviour-path.ccg
@@ -22,7 +22,7 @@ namespace Clutter
 
 // static
 Glib::RefPtr<BehaviourPath> BehaviourPath::create_with_knots(const Glib::RefPtr<Alpha>& alpha,
-                                                             const Glib::ArrayHandle<Knot>& knots)
+                                                             const std::vector<Knot>& knots)
 {
   const Glib::RefPtr<Path> path = Path::create();
   const Knot* data  = knots.data();
diff --git a/clutter/src/behaviour-path.hg b/clutter/src/behaviour-path.hg
index 4345bc5..af0e962 100644
--- a/clutter/src/behaviour-path.hg
+++ b/clutter/src/behaviour-path.hg
@@ -43,7 +43,7 @@ public:
   _IGNORE(clutter_behaviour_path_new_with_knots,
           clutter_behaviour_path_new_with_description)
   static Glib::RefPtr<BehaviourPath> create_with_knots(const Glib::RefPtr<Alpha>& alpha,
-                                                       const Glib::ArrayHandle<Knot>& knots);
+                                                       const std::vector<Knot>& knots);
   static Glib::RefPtr<BehaviourPath> create_with_description(const Glib::RefPtr<Alpha>& alpha,
                                                              const Glib::ustring& description);
 
diff --git a/clutter/src/behaviour.ccg b/clutter/src/behaviour.ccg
index cfb42e9..5341a86 100644
--- a/clutter/src/behaviour.ccg
+++ b/clutter/src/behaviour.ccg
@@ -45,5 +45,37 @@ void Behaviour::actors_foreach(const SlotForEach& slot)
       gobj(),
       &SignalProxy_behaviours_foreach_callback, const_cast<SlotForEach*>(&slot));
 }
+
+std::vector<Glib::RefPtr<Actor> > Behaviour::get_actors()
+{
+  GSList* actorList = clutter_behaviour_get_actors(gobj());
+
+  uint actorCount = g_slist_length(actorList);
+  std::vector<Glib::RefPtr<Actor> > actorVec(actorCount);
+
+  for(GSList* actorNode = actorList; actorNode->next != NULL; actorNode = actorList->next)
+  {
+    actorVec.push_back(Glib::wrap(static_cast<ClutterActor*>(actorNode->data), true));
+  }
+
+  return actorVec;
+}
+
+std::vector<Glib::RefPtr<const Actor> > Behaviour::get_actors() const
+{
+  GSList* actorList = clutter_behaviour_get_actors(const_cast<ClutterBehaviour*>(gobj()));
+
+  uint actorCount = g_slist_length(actorList);
+  std::vector<Glib::RefPtr<const Actor> > actorVec(actorCount);
+
+  for(GSList* actorNode = actorList; actorNode->next != NULL; actorNode = actorList->next)
+  {
+    actorVec.push_back(Glib::wrap(static_cast<ClutterActor*>(actorNode->data), true));
+  }
+
+  return actorVec;
+}
+
+
 } //namespace Clutter
 
diff --git a/clutter/src/behaviour.hg b/clutter/src/behaviour.hg
index 74f0f61..71cd745 100644
--- a/clutter/src/behaviour.hg
+++ b/clutter/src/behaviour.hg
@@ -17,7 +17,7 @@
 
 #include <cluttermm/alpha.h>
 #include <cluttermm/actor.h>
- 
+
 _DEFS(cluttermm,clutter)
 _PINCLUDE(glibmm/private/object_p.h)
 
@@ -41,10 +41,8 @@ public:
   _WRAP_METHOD(void remove_all(), clutter_behaviour_remove_all)
   _WRAP_METHOD(bool is_applied(const Glib::RefPtr<Actor>& actor), clutter_behaviour_is_applied)
 
-#m4 _CONVERSION(`GSList*', `Glib::SListHandle<Glib::RefPtr<Actor> >', `$2($3, Glib::OWNERSHIP_SHALLOW)')
-#m4 _CONVERSION(`GSList*', `Glib::SListHandle<Glib::RefPtr<const Actor> >', `$2($3, Glib::OWNERSHIP_SHALLOW)')
-  _WRAP_METHOD(Glib::SListHandle<Glib::RefPtr<Actor> > get_actors(), clutter_behaviour_get_actors)
-  _WRAP_METHOD(Glib::SListHandle<Glib::RefPtr<const Actor> > get_actors() const, clutter_behaviour_get_actors)
+  std::vector<Glib::RefPtr<Actor> >       get_actors();
+  std::vector<Glib::RefPtr<Actor const> > get_actors() const;
 
   _WRAP_METHOD(int get_n_actors() const, clutter_behaviour_get_n_actors)
 
@@ -58,7 +56,7 @@ public:
 
   // TODO: does this need the 'behaviour' argument, or could that be
   // approximated with an Object-oriented 'this' pointer?
-  /** For instance, 
+  /** For instance,
    * void on_foreach(const Glib::RefPtr<Behaviour>& behaviour, const Glib::RefPtr<Actor>& actor)
    */
   typedef sigc::slot<void, const Glib::RefPtr<Behaviour>&, const Glib::RefPtr<Actor>&> SlotForEach;
@@ -71,9 +69,10 @@ _CONVERSION(`ClutterActor*',`const Glib::RefPtr<Actor>&',`Glib::wrap($3)')
   _WRAP_SIGNAL(void applied(const Glib::RefPtr<Actor>& actor), "applied")
   _WRAP_SIGNAL(void removed(const Glib::RefPtr<Actor>& actor), "removed")
 
+
+
 protected:
   _WRAP_VFUNC(void alpha_notify(double alpha_value), alpha_notify)
-
 };
 
 } // namespace Clutter
diff --git a/clutter/src/container.ccg b/clutter/src/container.ccg
index 4060db0..fc83eb8 100644
--- a/clutter/src/container.ccg
+++ b/clutter/src/container.ccg
@@ -48,12 +48,12 @@ namespace Clutter
 
 void Container::raise_child(const Glib::RefPtr<Actor>& actor)
 {
-  clutter_container_raise_child(gobj(), Glib::unwrap(actor), 0); 
+  clutter_container_raise_child(gobj(), Glib::unwrap(actor), 0);
 }
 
 void Container::lower_child(const Glib::RefPtr<Actor>& actor)
 {
-  clutter_container_lower_child(gobj(), Glib::unwrap(actor), 0); 
+  clutter_container_lower_child(gobj(), Glib::unwrap(actor), 0);
 }
 
 void Container::foreach(const SlotForEach& slot)
@@ -79,4 +79,32 @@ void Container::actor_removed(const Glib::RefPtr<Actor>& actor)
   g_signal_emit_by_name(gobj(), "actor_removed", actor->gobj());
 }
 
+std::vector<Glib::RefPtr<Actor> > Container::get_children()
+{
+  GList* actorList = clutter_container_get_children(gobj());
+  uint actorCount = g_list_length(actorList);
+  std::vector<Glib::RefPtr<Actor> > actorVec(actorCount);
+
+  for(GList* actorNode = actorList; actorNode->next != NULL; actorNode = actorList->next)
+  {
+    actorVec.push_back(Glib::wrap(static_cast<ClutterActor*>(actorNode->data), true));
+  }
+
+  return actorVec;
+}
+
+std::vector<Glib::RefPtr<const Actor> > Container::get_children() const
+{
+  GList* actorList = clutter_container_get_children(const_cast<ClutterContainer*>(gobj()));
+  uint actorCount = g_list_length(actorList);
+  std::vector<Glib::RefPtr<const Actor> > actorVec(actorCount);
+
+  for(GList* actorNode = actorList; actorNode->next != NULL; actorNode = actorList->next)
+  {
+    actorVec.push_back(Glib::wrap(static_cast<ClutterActor*>(actorNode->data), true));
+  }
+
+  return actorVec;
+}
+
 } // namespace Clutter
diff --git a/clutter/src/container.hg b/clutter/src/container.hg
index 8f0a280..5a095f8 100644
--- a/clutter/src/container.hg
+++ b/clutter/src/container.hg
@@ -35,10 +35,8 @@ 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)
 
-#m4 _CONVERSION(`GList*', `Glib::ListHandle<Glib::RefPtr<Actor> >', `$2(($3), Glib::OWNERSHIP_SHALLOW)')
-#m4 _CONVERSION(`GList*', `Glib::ListHandle<Glib::RefPtr<const Actor> >', `$2(($3), Glib::OWNERSHIP_SHALLOW)')
-  _WRAP_METHOD(Glib::ListHandle<Glib::RefPtr<Actor> > get_children(), clutter_container_get_children)
-  _WRAP_METHOD(Glib::ListHandle<Glib::RefPtr<const Actor> > get_children() const, clutter_container_get_children)
+  std::vector<Glib::RefPtr<Actor> >       get_children();
+  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)
   void lower_child(const Glib::RefPtr<Actor>& actor);
diff --git a/clutter/src/score.ccg b/clutter/src/score.ccg
index 443cbe9..2ca69dd 100644
--- a/clutter/src/score.ccg
+++ b/clutter/src/score.ccg
@@ -25,4 +25,32 @@ gulong Score::append(const Glib::RefPtr<Timeline>& timeline)
   return clutter_score_append(gobj(), NULL, timeline->gobj());
 }
 
+std::vector<Glib::RefPtr<Timeline> > Score::list_timelines()
+{
+  GSList* timelineList = clutter_score_list_timelines(gobj());
+  uint timelineCount = g_slist_length(timelineList);
+  std::vector<Glib::RefPtr<Timeline> > timelineVec(timelineCount);
+
+  for(GSList* timelineNode = timelineList; timelineNode->next != NULL; timelineNode = timelineList->next)
+  {
+    timelineVec.push_back(Glib::wrap(static_cast<ClutterTimeline*>(timelineNode->data), true));
+  }
+
+  return timelineVec;
+}
+
+    std::vector<Glib::RefPtr<const Timeline> > Score::list_timelines() const
+{
+  GSList* timelineList = clutter_score_list_timelines(const_cast<ClutterScore*>(gobj()));
+  uint timelineCount = g_slist_length(timelineList);
+  std::vector<Glib::RefPtr<const Timeline> > timelineVec(timelineCount);
+
+  for(GSList* timelineNode = timelineList; timelineNode->next != NULL; timelineNode = timelineList->next)
+  {
+    timelineVec.push_back(Glib::wrap(static_cast<ClutterTimeline*>(timelineNode->data), true));
+  }
+
+  return timelineVec;
+}
+
 } // namespace Clutter
diff --git a/clutter/src/score.hg b/clutter/src/score.hg
index cf07e71..e32f11b 100644
--- a/clutter/src/score.hg
+++ b/clutter/src/score.hg
@@ -18,7 +18,7 @@
 #include <glibmm/object.h>
 #include <cluttermm/timeline.h>
 #include <clutter/clutter.h>
- 
+
 _DEFS(cluttermm,clutter)
 _PINCLUDE(glibmm/private/object_p.h)
 
@@ -57,10 +57,8 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Timeline> get_timeline(gulong id), clutter_score_get_timeline, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Timeline> get_timeline(gulong id) const, clutter_score_get_timeline, , refreturn, constversion)
 
-#m4 _CONVERSION(`GSList*', `Glib::SListHandle<Glib::RefPtr<Timeline> >', `$2(($3), Glib::OWNERSHIP_SHALLOW)')
-#m4 _CONVERSION(`GSList*', `Glib::SListHandle<Glib::RefPtr<const Timeline> >', `$2(($3), Glib::OWNERSHIP_SHALLOW)')
-  _WRAP_METHOD(Glib::SListHandle<Glib::RefPtr<Timeline> > list_timelines(), clutter_score_list_timelines)
-  _WRAP_METHOD(Glib::SListHandle<Glib::RefPtr<const Timeline> > list_timelines() const, clutter_score_list_timelines)
+  std::vector<Glib::RefPtr<Timeline> > list_timelines();
+  std::vector<Glib::RefPtr<const Timeline> > list_timelines() const;
 
   _WRAP_METHOD(void start(), clutter_score_start)
   _WRAP_METHOD(void pause(), clutter_score_pause)
diff --git a/clutter/src/script.ccg b/clutter/src/script.ccg
index 865751b..5712e05 100644
--- a/clutter/src/script.ccg
+++ b/clutter/src/script.ccg
@@ -39,9 +39,47 @@ guint Script::load_from_data(const Glib::ustring& data, std::auto_ptr<Glib::Erro
   return result;
 }
 
-void Script::add_search_paths(const Glib::ArrayHandle<Glib::ustring>& paths)
+void Script::add_search_paths(const std::vector<Glib::ustring>& paths)
 {
-  clutter_script_add_search_paths(gobj(), paths.data(), paths.size());
+  const int pathCount = paths.size();
+  const char* searchPaths[pathCount];
+
+  for(uint i = 0; i < paths.size(); ++i)
+  {
+      searchPaths[i] = paths[i].data();
+  }
+
+  clutter_script_add_search_paths(gobj(), searchPaths, paths.size());
+}
+
+std::vector<Glib::RefPtr<Glib::Object> > Script::list_objects()
+{
+  GList* objectList = clutter_script_list_objects(gobj());
+
+  uint objectCount = g_list_length(objectList);
+  std::vector<Glib::RefPtr<Glib::Object> > objectVec(objectCount);
+
+  for(GList* objectNode = objectList; objectNode->next != NULL; objectNode = objectList->next)
+  {
+    objectVec.push_back(Glib::wrap(static_cast<GObject*>(objectNode->data), true));
+  }
+
+  return objectVec;
+}
+
+std::vector<Glib::RefPtr<const Glib::Object> > Script::list_objects() const
+{
+  GList* objectList = clutter_script_list_objects(const_cast<ClutterScript*>(gobj()));
+
+  uint objectCount = g_list_length(objectList);
+  std::vector<Glib::RefPtr<const Glib::Object> > objectVec(objectCount);
+
+  for(GList* objectNode = objectList; objectNode->next != NULL; objectNode = objectList->next)
+  {
+    objectVec.push_back(Glib::wrap(static_cast<GObject*>(objectNode->data), true));
+  }
+
+  return objectVec;
 }
 
 #ifdef GLIBMM_VFUNCS_ENABLED
diff --git a/clutter/src/script.hg b/clutter/src/script.hg
index 1d9ffe5..4c9d0df 100644
--- a/clutter/src/script.hg
+++ b/clutter/src/script.hg
@@ -18,7 +18,7 @@
 #include <glibmm/object.h>
 #include <cluttermm/timeline.h>
 #include <clutter/clutter.h>
- 
+
 _DEFS(cluttermm,clutter)
 _PINCLUDE(glibmm/private/object_p.h)
 
@@ -49,7 +49,7 @@ public:
   _WRAP_METHOD(guint load_from_file(const std::string& filename), clutter_script_load_from_file, errthrow)
 
   _IGNORE(clutter_script_add_search_paths)
-  void add_search_paths(const Glib::ArrayHandle<Glib::ustring>& paths);
+  void add_search_paths(const std::vector<Glib::ustring>& paths);
   _WRAP_METHOD(Glib::ustring lookup_filename(const Glib::ustring& filename), clutter_script_lookup_filename)
   _WRAP_METHOD(Glib::RefPtr<Glib::Object> get_object(const Glib::ustring& name), clutter_script_get_object, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Glib::Object> get_object(const Glib::ustring& name) const, clutter_script_get_object, refreturn, constverrsion)
@@ -57,18 +57,15 @@ public:
   //clutter_script_get_objects() is a varargs convenience function for C.
   _IGNORE(clutter_script_get_objects)
 
-#m4 _CONVERSION(`GList*', `Glib::ListHandle<Glib::RefPtr<Glib::Object> >', `$2($3, Glib::OWNERSHIP_SHALLOW)')
-#m4 _CONVERSION(`GList*', `Glib::ListHandle<Glib::RefPtr<const Glib::Object> >', `$2($3, Glib::OWNERSHIP_SHALLOW)')
- 
-  _WRAP_METHOD(Glib::ListHandle<Glib::RefPtr<Glib::Object> > list_objects(), clutter_script_list_objects)
-  _WRAP_METHOD(Glib::ListHandle<Glib::RefPtr<const Glib::Object> > list_objects() const, clutter_script_list_objects)
+  std::vector<Glib::RefPtr<Glib::Object> > list_objects();
+  std::vector<Glib::RefPtr<const Glib::Object> > list_objects() const;
 
   _WRAP_METHOD(void unmerge_object(guint merge_id), clutter_script_unmerge_objects)
   _WRAP_METHOD(void ensure_objects(), clutter_script_ensure_objects)
 
   // TODO: connect_signals functions
   // TODO: do we need get_type_from_name()?
-  // clutter_script_connect_signals() and clutter_script_connect_signals_full() seem to be like glade_xml_autoconnect(), 
+  // clutter_script_connect_signals() and clutter_script_connect_signals_full() seem to be like glade_xml_autoconnect(),
   // and I don't see a way to implement them in C++. murrayc.
 
   _WRAP_METHOD(static std::string get_script_id(const Glib::RefPtr<const Glib::Object>& object), clutter_get_script_id)
diff --git a/clutter/src/stage.hg b/clutter/src/stage.hg
index 551d488..11c0369 100644
--- a/clutter/src/stage.hg
+++ b/clutter/src/stage.hg
@@ -18,7 +18,7 @@
 #include <cluttermm/group.h>
 #include <cluttermm/color.h>
 #include <clutter/clutter.h> // For ClutterPerspective
- 
+
 _DEFS(cluttermm,clutter)
 _PINCLUDE(cluttermm/private/group_p.h)
 
@@ -49,15 +49,15 @@ public:
 
 /** This is a top level 'window' on which child actors are placed and manipulated.
  *
- * Clutter creates a default stage upon initialization, which can be retrieved using Stage::get_default(). Clutter always 
- * provides the default stage, unless the backend is unable to create one. The stage returned by Stage::get_default() is 
+ * Clutter creates a default stage upon initialization, which can be retrieved using Stage::get_default(). Clutter always
+ * provides the default stage, unless the backend is unable to create one. The stage returned by Stage::get_default() is
  * guaranteed to always be the same.
  *
- * Backends might provide support for multiple stages. The support for this feature can be checked at run-time using the 
- * clutter_feature_available() function and the CLUTTER_FEATURE_STAGE_MULTIPLE flag. If the backend used supports multiple 
+ * Backends might provide support for multiple stages. The support for this feature can be checked at run-time using the
+ * clutter_feature_available() function and the CLUTTER_FEATURE_STAGE_MULTIPLE flag. If the backend used supports multiple
  * stages, new Clutter::Stage instances can be created.
- * 
- * Clutter::Stage is a proxy actor, wrapping the backend-specific implementation of the windowing system. It is possible 
+ *
+ * Clutter::Stage is a proxy actor, wrapping the backend-specific implementation of the windowing system. It is possible
  * to subclass ClutterStage, as long as every overridden virtual function calls the implementation in the base class.
  */
 class Stage :
@@ -106,7 +106,7 @@ public:
 #m4 _CONVERSION(`const Fog&',`ClutterFog*',`const_cast<ClutterFog*>(&($3))')
   _WRAP_METHOD(void set_fog(const Fog& fog), clutter_stage_set_fog)
   _WRAP_METHOD(void get_fog(Fog& fog) const, clutter_stage_get_fog)
-  
+
   _WRAP_METHOD(void stage_event(Event* event), clutter_stage_event)
   _WRAP_METHOD(bool is_default() const, clutter_stage_is_default)
   _WRAP_METHOD(void ensure_current(), clutter_stage_ensure_current)
@@ -125,7 +125,7 @@ public:
 
   _WRAP_METHOD(void set_no_clear_hint(bool no_clear = true), clutter_stage_set_no_clear_hint)
   _WRAP_METHOD(bool get_no_clear_hint() const, clutter_stage_get_no_clear_hint)
-  
+
   _WRAP_SIGNAL(void fullscreen(), "fullscreen")
   _WRAP_SIGNAL(void unfullscreen(), "unfullscreen")
   _WRAP_SIGNAL(void activate(), "activate")
diff --git a/clutter/src/timeline.ccg b/clutter/src/timeline.ccg
index 3cde058..3ba5c1e 100644
--- a/clutter/src/timeline.ccg
+++ b/clutter/src/timeline.ccg
@@ -25,12 +25,19 @@ Timeline::Timeline(guint msecs)
   _CONSTRUCT("duration", msecs)
 {}
 
-Glib::StringArrayHandle Timeline::list_markers(gint frame_num) const
+std::vector<Glib::ustring> Timeline::list_markers(gint frame_num) const
 {
   gsize n_markers = 0;
   gchar** const markers = clutter_timeline_list_markers(const_cast<ClutterTimeline*>(gobj()),
                                                         frame_num, &n_markers);
-  return Glib::StringArrayHandle(markers, n_markers, Glib::OWNERSHIP_DEEP);
+  std::vector<Glib::ustring> markerVec(n_markers);
+
+  for (int i = 0; i < n_markers; ++i)
+  {
+      markerVec.push_back(Glib::ustring(markers[i]));
+  }
+
+  return markerVec;
 }
 
 } // namespace Clutter
diff --git a/clutter/src/timeline.hg b/clutter/src/timeline.hg
index 5938487..afa4f63 100644
--- a/clutter/src/timeline.hg
+++ b/clutter/src/timeline.hg
@@ -58,7 +58,7 @@ public:
   _WRAP_METHOD(TimelineDirection get_direction() const, clutter_timeline_get_direction)
 
   _WRAP_METHOD_DOCS_ONLY(clutter_timeline_list_markers)
-  Glib::StringArrayHandle list_markers(int frame_num) const;
+  std::vector<Glib::ustring> list_markers(int frame_num) const;
   _WRAP_METHOD(void add_marker_at_time(const Glib::ustring& marker_name, guint msecs), clutter_timeline_add_marker_at_time)
   _WRAP_METHOD(bool has_marker(const Glib::ustring& marker_name), clutter_timeline_has_marker)
   _WRAP_METHOD(void remove_marker(const Glib::ustring& marker_name), clutter_timeline_remove_marker)



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