[cluttermm] Revert "Removed deprecated API."



commit cd8fdabfd5b17a82fc2eb916f7b7b834ba8e0e54
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Aug 21 00:19:47 2016 +0200

    Revert "Removed deprecated API."
    
    This reverts commit 80361abd16c1eda6739945d804ea69075f39ddb8.

 clutter/src/actor.ccg         |   27 ++++++++++
 clutter/src/actor.hg          |  115 +++++++++++++++++++++++++++++++----------
 clutter/src/backend.hg        |   20 ++++---
 clutter/src/bin-layout.hg     |   15 +++++
 clutter/src/box-layout.hg     |   27 +++++++++-
 clutter/src/container.ccg     |   78 ++++++++++++++++++++++++++++
 clutter/src/container.hg      |   52 ++++++++++++++++++-
 clutter/src/device-manager.hg |    2 +-
 clutter/src/effect.hg         |    4 +-
 clutter/src/input-device.hg   |    6 ++-
 clutter/src/layout-manager.hg |   11 ++++
 clutter/src/script.hg         |    3 +
 clutter/src/stage.hg          |   28 ++++++++--
 clutter/src/timeline.hg       |   12 +++--
 14 files changed, 349 insertions(+), 51 deletions(-)
---
diff --git a/clutter/src/actor.ccg b/clutter/src/actor.ccg
index 3c7b2f3..37e2c0b 100644
--- a/clutter/src/actor.ccg
+++ b/clutter/src/actor.ccg
@@ -44,6 +44,24 @@ bool Actor::is_reactive() const
   return (CLUTTER_ACTOR_IS_REACTIVE(gobj()) != 0);
 }
 
+_DEPRECATE_IFDEF_START
+Geometry Actor::get_geometry() const
+{
+  Geometry geom;
+  clutter_actor_get_geometry(const_cast<ClutterActor*>(gobj()), geom.gobj());
+  return geom;
+}
+_DEPRECATE_IFDEF_END
+
+#if 0
+ActorBox Actor::get_paint_area() const
+{
+  ActorBox box;
+  clutter_actor_get_paint_area(const_cast<ClutterActor*>(gobj()), box.gobj());
+  return box;
+}
+#endif
+
 void Actor::get_abs_allocation_vertices(Vertex vertices[4]) const
 {
   clutter_actor_get_abs_allocation_vertices(const_cast<ClutterActor*>(gobj()), 
reinterpret_cast<ClutterVertex*>(vertices));
@@ -78,6 +96,15 @@ void Actor::apply_relative_transform_to_point(const Vertex& point, Vertex& verte
   clutter_actor_apply_relative_transform_to_point(const_cast<ClutterActor*>(gobj()), NULL, 
const_cast<ClutterVertex*>(point.gobj()), vertex.gobj());
 }
 
+_DEPRECATE_IFDEF_START
+Geometry Actor::get_allocation_geometry() const
+{
+  Geometry geom;
+  clutter_actor_get_allocation_geometry(const_cast<ClutterActor*>(gobj()), geom.gobj());
+  return geom;
+}
+_DEPRECATE_IFDEF_END
+
 void Actor::set_margins(float top, float left, float bottom, float right)
 {
   set_margin_top(top);
diff --git a/clutter/src/actor.hg b/clutter/src/actor.hg
index ab1bc9a..02551aa 100644
--- a/clutter/src/actor.hg
+++ b/clutter/src/actor.hg
@@ -35,6 +35,10 @@
 _DEFS(cluttermm,clutter)
 _PINCLUDE(glibmm/private/object_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
 namespace Clutter
 {
 
@@ -83,9 +87,9 @@ public:
   _IGNORE(clutter_actor_destroy)
 
   _WRAP_METHOD(void show(), clutter_actor_show)
-
+  _WRAP_METHOD(void show_all(), clutter_actor_show_all, deprecated "Actors are visible by default.")
   _WRAP_METHOD(void hide(), clutter_actor_hide)
-
+  _WRAP_METHOD(void hide_all(), clutter_actor_hide_all, deprecated "Using hide() on the actor will now 
prevent its children from being painted as well.")
   _WRAP_METHOD(void realize(), clutter_actor_realize)
   _WRAP_METHOD(void unrealize(), clutter_actor_unrealize)
   _WRAP_METHOD(void map(), clutter_actor_map)
@@ -144,7 +148,7 @@ public:
    * */
   Matrix get_transform() const;
 
-
+  _WRAP_METHOD(void get_transformation_matrix(ClutterMatrix* matrix), 
clutter_actor_get_transformation_matrix, deprecated "Use get_transform() instead")
   _WRAP_METHOD(void set_transform(const Matrix& transform), clutter_actor_set_transform)
   _WRAP_METHOD(void set_child_transform(const Matrix& transform), clutter_actor_set_child_transform)
 
@@ -165,6 +169,17 @@ public:
   _WRAP_METHOD(void set_child_above_sibling(const Glib::RefPtr<Actor>& child, const Glib::RefPtr<Actor>& 
sibling), clutter_actor_set_child_above_sibling)
   _WRAP_METHOD(void set_child_at_index(const Glib::RefPtr<Actor>& child, int index), 
clutter_actor_set_child_at_index)
 
+#m4 _CONVERSION(`const Geometry&', `const ClutterGeometry*', `($3).gobj()')
+  _WRAP_METHOD(void set_geometry(const Geometry& geometry), clutter_actor_set_geometry, deprecated "Use 
set_position() and set_size() instead.")
+
+_DEPRECATE_IFDEF_START
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_geometry)
+  /**
+   * @deprecated Use get_position() and get_size(), or get_allocation_geometry() instead.
+   */
+  Geometry get_geometry() const;
+_DEPRECATE_IFDEF_END
+
   //_WRAP_METHOD(void get_coords(float *x_1, float *y_1, float *x_2, float *y_2) const, 
clutter_actor_get_coords)
   _WRAP_METHOD(void set_size(float width, float height), clutter_actor_set_size)
   _WRAP_METHOD(void get_position(float& x, float& y), clutter_actor_get_position)
@@ -207,10 +222,10 @@ public:
   _WRAP_METHOD(bool has_key_focus() const, clutter_actor_has_key_focus)
 
 
-
-
-
-
+  _WRAP_METHOD(void set_rotation(RotateAxis axis, double angle, float x, float y, float z), 
clutter_actor_set_rotation, deprecated "Use set_rotation_angle() and set_pivot_point() instead.")
+  _WRAP_METHOD(void set_z_rotation_from_gravity(double angle, Gravity gravity), 
clutter_actor_set_z_rotation_from_gravity, deprecated "Use set_rotation_angle() and set_pivot_point() 
instead.")
+  _WRAP_METHOD(double get_rotation(RotateAxis axis, float& x, float& y, float& z) const, 
clutter_actor_get_rotation, deprecated "Use get_rotation_angle() and get_pivot_point() instead.")
+  _WRAP_METHOD(Gravity get_z_rotation_gravity() const, clutter_actor_get_z_rotation_gravity, deprecated "Use 
the “pivot-point” instead of a Gravity.")
   _WRAP_METHOD(void set_opacity(guint8 opacity), clutter_actor_set_opacity)
   _WRAP_METHOD(guint8 get_opacity() const, clutter_actor_get_opacity)
 
@@ -262,17 +277,29 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Actor> get_last_child(), clutter_actor_get_last_child, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Actor> get_last_child() const, clutter_actor_get_last_child, refreturn, 
constversion)
 
-
+  _WRAP_METHOD(void set_parent(const Glib::RefPtr<Actor>& parent), clutter_actor_set_parent, deprecated "Use 
add_child() instead.")
   _WRAP_METHOD(Glib::RefPtr<Actor> get_parent(), clutter_actor_get_parent, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Actor> get_parent() const, clutter_actor_get_parent, refreturn, 
constversion)
-
-
+  _WRAP_METHOD(void reparent(const Glib::RefPtr<Actor>& new_parent), clutter_actor_reparent, deprecated "Use 
remove_child() and add_child() instead.")
+  _WRAP_METHOD(void unparent(), clutter_actor_unparent, deprecated "Use remove_child() instead.")
   _WRAP_METHOD(bool contains(const Glib::RefPtr<const Actor>& descendant) const, clutter_actor_contains)
-
-
+  _WRAP_METHOD(void raise(const Glib::RefPtr<Actor>& below), clutter_actor_raise, deprecated "Use 
set_child_above_sibling() instead.")
+  _WRAP_METHOD(void lower(const Glib::RefPtr<Actor>& above), clutter_actor_lower, deprecated "Use 
set_child_below_sibling() instead")
   _WRAP_METHOD(void raise_top (), clutter_actor_raise_top)
   _WRAP_METHOD(void lower_bottom(), clutter_actor_lower_bottom)
 
+  _WRAP_METHOD(Glib::RefPtr<Shader> get_shader(), clutter_actor_get_shader, refreturn, deprecated "Use 
get_effect() instead.")
+  _WRAP_METHOD(Glib::RefPtr<const Shader> get_shader() const, clutter_actor_get_shader, refreturn, 
constversion, deprecated "Use get_effect() instead.")
+  _WRAP_METHOD(void set_shader(const Glib::RefPtr<Shader>& shader), clutter_actor_set_shader, deprecated 
"Use add_effect() instead.")
+
+_DEPRECATE_IFDEF_START
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_set_shader_param)
+  /**
+   * @deprecated Use ShaderEffect::set_uniform_value() instead."
+   */
+  template <class ParamType> void set_shader_param(const Glib::ustring& param, const ParamType& value);
+_DEPRECATE_IFDEF_END
+  _IGNORE(clutter_actor_set_shader_param_int, clutter_actor_set_shader_param_float)
 
   //_WRAP_METHOD_DOCS_ONLY(clutter_actor_get_paint_area)
   //ActorBox get_paint_area() const;
@@ -336,8 +363,8 @@ public:
   _WRAP_METHOD(void get_preferred_height(float for_width, float& min_height_p, float& natural_height_p) 
const, clutter_actor_get_preferred_height)
   _WRAP_METHOD(guint8 get_paint_opacity() const, clutter_actor_get_paint_opacity)
   _WRAP_METHOD(bool get_paint_visibility() const, clutter_actor_get_paint_visibility)
-
-
+  _WRAP_METHOD(void move_anchor_point_from_gravity(Gravity gravity), 
clutter_actor_move_anchor_point_from_gravity, deprecated "Use “pivot-point” instead.")
+  _WRAP_METHOD(void move_anchor_point(float anchor_x, float anchor_y), clutter_actor_move_anchor_point, 
deprecated "Use “pivot-point” instead.")
 
 // IM: ClutterMargin.
   _IGNORE(clutter_actor_set_margin, clutter_actor_get_margin)
@@ -362,29 +389,36 @@ public:
   _WRAP_METHOD(bool get_fixed_position_set() const, clutter_actor_get_fixed_position_set)
   _WRAP_METHOD(void set_fixed_position_set(bool is_set), clutter_actor_set_fixed_position_set)
 
+_DEPRECATE_IFDEF_START
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_geometry)
+  /**
+   * @deprecated Use get_allocation_box() instead.
+   */
+  Geometry get_allocation_geometry() const;
+_DEPRECATE_IFDEF_END
 
-
-
+  _WRAP_METHOD(void set_depth(float depth), clutter_actor_set_depth, deprecated "Use set_z_position() 
instead.)
+  _WRAP_METHOD(float get_depth() const, clutter_actor_get_depth, deprecated "Use get_z_position() instead.")
   _WRAP_METHOD(void set_scale(double scale_x, double scale_y), clutter_actor_set_scale)
   _WRAP_METHOD(void set_scale_z(double scale_z), clutter_actor_set_scale_z)
-
-
+  _WRAP_METHOD(void set_scale_full(double scale_x, double scale_y, float center_x, float center_y), 
clutter_actor_set_scale_full, deprecated "Use set_pivot_point() to control the scale center.")
+  _WRAP_METHOD(void set_scale_with_gravity(double scale_x, double scale_y, Gravity gravity), 
clutter_actor_set_scale_with_gravity, deprecated "Use set_pivot_point() to set the scale center using 
normalized coordinates instead.")
   _WRAP_METHOD(void get_scale(double& scale_x, double& scale_y) const, clutter_actor_get_scale)
   _WRAP_METHOD(double get_scale_z() const, clutter_actor_get_scale_z)
-
-
+  _WRAP_METHOD(void get_scale_center(float& center_x, float& center_y) const, 
clutter_actor_get_scale_center, deprecated "Use get_pivot_point() instead.")
+  _WRAP_METHOD(Gravity get_scale_gravity() const, clutter_actor_get_scale_gravity, deprecated "Use 
get_pivot_point() instead.")
 
   //_WRAP_METHOD(void get_abs_size(float& width, float& height) const, clutter_actor_get_abs_size)
   _WRAP_METHOD(void get_size(float& width, float& height) const, clutter_actor_get_size)
   _WRAP_METHOD(void move_by(float dx, float dy), clutter_actor_move_by)
 
   _WRAP_METHOD(bool event(const ClutterEvent* event, bool capture), clutter_actor_event)
+  _WRAP_METHOD(static Glib::RefPtr<Actor> get_actor_by_gid(guint32 id), clutter_get_actor_by_gid, refreturn, 
deprecated "The ID is no longer used.")
 
-
-
-
-
-
+  _WRAP_METHOD(void set_anchor_point(float anchor_x, float anchor_y), clutter_actor_set_anchor_point, 
deprecated "Use “pivot-point” instead.")
+  _WRAP_METHOD(void get_anchor_point(float& anchor_x, float& anchor_y) const, 
clutter_actor_get_anchor_point, deprecated "Use “pivot-point” instead.")
+  _WRAP_METHOD(void set_anchor_point_from_gravity(ClutterGravity gravity), 
clutter_actor_set_anchor_point_from_gravity, deprecated "Use “pivot-point” instead.")
+  _WRAP_METHOD(Gravity get_anchor_point_gravity(), clutter_actor_get_anchor_point_gravity, deprecated "Use 
“pivot-point” instead.")
 
   _WRAP_METHOD(void grab_key_focus(), clutter_actor_grab_key_focus)
 
@@ -397,14 +431,17 @@ public:
   _WRAP_METHOD(void remove_child(const Glib::RefPtr<Actor>& child), clutter_actor_remove_child )
   _WRAP_METHOD(void remove_all_children(), clutter_actor_remove_all_children )
 
+   //deprecated
+  _IGNORE(clutter_actor_animate, clutter_actor_animatev, clutter_actor_animate_with_timelinev, 
clutter_actor_animate_with_alphav)
 
-
+  _WRAP_METHOD(Glib::RefPtr<Animation> get_animation(), clutter_actor_get_animation, refreturn, deprecated 
"Use the implicit transition for animatable properties in ClutterActor instead, and 
clutter_actor_get_transition() to retrieve the transition.")
+  _WRAP_METHOD(Glib::RefPtr<const Animation> get_animation() const, clutter_actor_get_animation, refreturn, 
constversion, deprecated "Use the implicit transition for animatable properties in ClutterActor instead, and 
clutter_actor_get_transition() to retrieve the transition.")
 
   _WRAP_METHOD(void detach_animation(), clutter_actor_detach_animation)
 
 
-
-
+  _WRAP_METHOD(void push_internal(), clutter_actor_push_internal, deprecated "All children of an actor are 
accessible through the ClutterActor API, and ClutterActor implements the ClutterContainer interface, so this 
function is only useful for legacy containers overriding the default implementation.")
+  _WRAP_METHOD(void pop_internal(), clutter_actor_pop_internal, deprecated "All children of an actor are 
accessible through the ClutterActor API. This function is only useful for legacy containers overriding the 
default implementation of the ClutterContainer interface.")
 
   _WRAP_METHOD(bool has_allocation() const, clutter_actor_has_allocation)
 
@@ -608,6 +645,14 @@ public:
 
 protected:
   //TODO: Wrap ClutterShaderEffect.
+  _WRAP_METHOD(void set_shader_param_value(const Glib::ustring& param, const Glib::ValueBase& value),
+               clutter_actor_set_shader_param, deprecated "Use ShaderEffect::set_uniform_value() instead.")
+
+  //TODO: These are deprecated. Remove them when we can break ABI:
+  _WRAP_VFUNC(void show_all(), show_all)
+  _WRAP_VFUNC(void hide_all(), hide_all)
+
+  //The realize and unrealize vfuncs are deprecated.
 
   _WRAP_VFUNC(void map(), map)
   _WRAP_VFUNC(void unmap(), unmap)
@@ -633,4 +678,18 @@ protected:
   _WRAP_VFUNC(void paint_node(ClutterPaintNode* root), paint_node)
 };
 
+_DEPRECATE_IFDEF_START
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <class ParamType>
+void Actor::set_shader_param(const Glib::ustring& param, const ParamType& value)
+{
+  Glib::Value<ParamType> param_value;
+  param_value.init(Glib::Value<ParamType>::value_type());
+
+  param_value.set(value);
+  this->set_shader_param_value(param, param_value);
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+_DEPRECATE_IFDEF_END
+
 } // namespace Clutter
diff --git a/clutter/src/backend.hg b/clutter/src/backend.hg
index acfd28e..01ced7b 100644
--- a/clutter/src/backend.hg
+++ b/clutter/src/backend.hg
@@ -21,6 +21,10 @@
 _DEFS(cluttermm,clutter)
 _PINCLUDE(glibmm/private/object_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
 namespace Clutter
 {
 
@@ -35,20 +39,20 @@ protected:
 public:
   _WRAP_METHOD(static Glib::RefPtr<Backend> get_default(), clutter_get_default_backend, refreturn)
 
+  _WRAP_METHOD(double get_resolution() const, clutter_backend_get_resolution, deprecated "Use Settings's 
front-dpi property instead.")
+  _WRAP_METHOD(void set_resolution(double dpi), clutter_backend_set_resolution, deprecated "Use Settings's 
front-dpi property instead.")
 
+  _WRAP_METHOD(guint get_double_click_time() const, clutter_backend_get_double_click_time, deprecated "Use 
Settings's double-click-time property instead.")
+  _WRAP_METHOD(void set_double_click_time(guint msec), clutter_backend_set_double_click_time, deprecated 
"Use Settings's double-click-time property instead.")
 
-
-
-
-
-
-
+  _WRAP_METHOD(guint get_double_click_distance() const, clutter_backend_get_double_click_distance, 
deprecated "Use Settings's double-click-distance property instead.")
+  _WRAP_METHOD(void set_double_click_distance(guint distance), clutter_backend_set_double_click_distance, 
deprecated "Use Settings's double-click-distance property instead.")
 
   _WRAP_METHOD(::Cairo::FontOptions get_font_options() const, clutter_backend_get_font_options)
   _WRAP_METHOD(void set_font_options(const ::Cairo::FontOptions& options), clutter_backend_set_font_options)
 
-
-
+  _WRAP_METHOD(Glib::ustring get_font_name() const, clutter_backend_get_font_name, deprecated "Use 
Settings's font-name property instead.")
+  _WRAP_METHOD(void set_font_name(const Glib::ustring& font_name), clutter_backend_set_font_name, deprecated 
"Use Settings's font-name property instead.")
 
   //Experimental API: clutter_backend_get_cogl_context
 
diff --git a/clutter/src/bin-layout.hg b/clutter/src/bin-layout.hg
index 4063022..b0b0ec4 100644
--- a/clutter/src/bin-layout.hg
+++ b/clutter/src/bin-layout.hg
@@ -20,9 +20,18 @@
 _DEFS(cluttermm,clutter)
 _PINCLUDE(cluttermm/private/layout-manager_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
 namespace Clutter
 {
 
+/**
+ * @deprecated Use ActorAlign and the Actor API instead.
+ */
+_WRAP_ENUM(BinAlignment, ClutterBinAlignment)
+
 class BinLayout :
     public LayoutManager
 {
@@ -34,6 +43,12 @@ protected:
 public:
   _WRAP_CREATE(BinAlignment x_align, BinAlignment y_align)
 
+  _WRAP_METHOD(void set_alignment(const Glib::RefPtr<Actor>& child, BinAlignment x_align, BinAlignment 
y_align), clutter_bin_layout_set_alignment, deprecated "Use the x-align and y-align properties of Actor 
instead.")
+  _WRAP_METHOD(void get_alignment(const Glib::RefPtr<Actor>& child, BinAlignment& x_align, BinAlignment& 
y_align) const, clutter_bin_layout_get_alignment, deprecated "Use the x-align and y-align properties of Actor 
instead.")
+  _WRAP_METHOD(void add(const Glib::RefPtr<Actor>& child, BinAlignment x_align, BinAlignment y_align), 
clutter_bin_layout_add, deprecated "Use Actor::add_child() instead.")
+
+  _WRAP_PROPERTY("x-align", BinAlignment, deprecated "Use the x-align and y-align properties of Actor 
instead.")
+  _WRAP_PROPERTY("y-align", BinAlignment, deprecated "Use the x-align and y-align properties of Actor 
instead.")
 };
 
 } // namespace Clutter
diff --git a/clutter/src/box-layout.hg b/clutter/src/box-layout.hg
index 7690bf7..20e4ada 100644
--- a/clutter/src/box-layout.hg
+++ b/clutter/src/box-layout.hg
@@ -20,6 +20,10 @@
 _DEFS(cluttermm,clutter)
 _PINCLUDE(cluttermm/private/layout-manager_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
 namespace Clutter
 {
 
@@ -43,15 +47,36 @@ public:
   _WRAP_METHOD(bool get_pack_start() const, clutter_box_layout_get_pack_start)
   _WRAP_METHOD(void set_spacing(guint spacing), clutter_box_layout_set_spacing)
   _WRAP_METHOD(guint get_spacing() const, clutter_box_layout_get_spacing)
-
+  _WRAP_METHOD(void set_vertical(bool vertical), clutter_box_layout_set_vertical, deprecated "Use 
set_orientation() instead.")
+  _WRAP_METHOD(bool get_vertical() const, clutter_box_layout_get_vertical, deprecated "Use get_orientation() 
instead.")
   _WRAP_METHOD(void set_homogeneous(bool homogeneous), clutter_box_layout_set_homogeneous)
   _WRAP_METHOD(bool get_homogeneous() const, clutter_box_layout_get_homogeneous)
 
   _WRAP_METHOD(void pack(const Glib::RefPtr<Actor>&, bool expand, bool x_fill, bool y_fill, BoxAlignment 
x_align, BoxAlignment y_align), clutter_box_layout_pack)
+
+  _WRAP_METHOD(void set_alignment(const Glib::RefPtr<Actor>& child, BoxAlignment x_align, BoxAlignment 
y_align), clutter_box_layout_set_alignment, deprecated "Use Actor's x-align and y-align properties instead.")
+  _WRAP_METHOD(void get_alignment(const Glib::RefPtr<Actor>& child, BoxAlignment &x_align, BoxAlignment 
&y_align) const, clutter_box_layout_get_alignment, deprecated "Use Actor's x-align and y-align properties 
instead.")
+  _WRAP_METHOD(void set_expand(const Glib::RefPtr<Actor>& child, bool expand), 
clutter_box_layout_set_expand, deprecated "Use Actor's x-expand and y-expand properties instead.")
+  _WRAP_METHOD(bool get_expand(const Glib::RefPtr<Actor>& child) const, clutter_box_layout_get_expand, 
deprecated "Use Actor's x-expand and y-expand properties instead.")
+  _WRAP_METHOD(void set_fill(const Glib::RefPtr<Actor>& child, bool x_fill, bool y_fill), 
clutter_box_layout_set_fill, deprecated "Use Actor's x-align and y-align properties instead.")
+  #m4 _CONVERSION(`bool&',`gboolean*',`(($2) &($3))')
+  _WRAP_METHOD(void get_fill(const Glib::RefPtr<Actor>& child, bool &x_fill, bool &y_fill) const, 
clutter_box_layout_get_fill, deprecated "Use Actor's x-align and y-align properties instead.")
+
+  _WRAP_METHOD(void set_use_animations(bool animate), clutter_box_layout_set_use_animations, deprecated "The 
layout manager will honour the easing state of the children when allocating them.")
+  _WRAP_METHOD(bool get_use_animations() const, clutter_box_layout_get_use_animations, deprecated "The 
layout manager will honour the easing state of the children when allocating them.")
+  _WRAP_METHOD(void set_easing_duration(guint msecs), clutter_box_layout_set_easing_duration, deprecated 
"The layout manager will honour the easing state of the children when allocating them.")
+  _WRAP_METHOD(guint get_easing_duration() const, clutter_box_layout_get_easing_duration, deprecated "The 
layout manager will honour the easing state of the children when allocating them.")
+  _WRAP_METHOD(void set_easing_mode(gulong mode), clutter_box_layout_set_easing_mode, deprecated "The layout 
manager will honour the easing state of the children when allocating them.")
+  _WRAP_METHOD(gulong get_easing_mode() const, clutter_box_layout_get_easing_mode, deprecated "The layout 
manager will honour the easing state of the children when allocating them.")
+
+  _WRAP_PROPERTY("easing-duration", guint, deprecated "The layout manager will honour the easing state of 
the children when allocating them.")
+  _WRAP_PROPERTY("easing-mode", unsigned long, deprecated "The layout manager will honour the easing state 
of the children when allocating them.")
   _WRAP_PROPERTY("homogeneous", bool)
   _WRAP_PROPERTY("orientation", Orientation)
   _WRAP_PROPERTY("pack-start", bool)
   _WRAP_PROPERTY("spacing", guint)
+  _WRAP_PROPERTY("use-animations", bool, deprecated "The layout manager will honour the easing state of the 
children when allocating them.")
+  _WRAP_PROPERTY("vertical", bool, deprecated "Use orientation instead.")
 };
 
 } // namespace Clutter
diff --git a/clutter/src/container.ccg b/clutter/src/container.ccg
index 4557d13..877d026 100644
--- a/clutter/src/container.ccg
+++ b/clutter/src/container.ccg
@@ -17,10 +17,56 @@
 
 #include <clutter/clutter.h>
 
+_DEPRECATE_IFDEF_START
+namespace
+{
+extern "C"
+{
+static void SignalProxy_Container_foreach_callback(ClutterActor *actor, gpointer user_data)
+{
+  Clutter::Container::SlotForEach *const
+    the_slot = static_cast<Clutter::Container::SlotForEach*>(user_data);
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  try
+#endif
+  {
+    const Glib::RefPtr<Clutter::Actor> cpp_actor = Glib::wrap(actor, true /* take reference */);
+    (*the_slot)(cpp_actor);
+  }
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+  catch (...)
+  {
+    Glib::exception_handlers_invoke();
+  }
+#endif
+}
+} // 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);
+}
+
+void Container::lower_child(const Glib::RefPtr<Actor>& actor)
+{
+  clutter_container_lower_child(gobj(), Glib::unwrap(actor), 0);
+}
+
+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
 {
@@ -38,4 +84,36 @@ 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());
+  const guint actorCount = g_list_length(actorList);
+  std::vector<Glib::RefPtr<Actor> > actorVec;
+  actorVec.reserve(actorCount);
+
+  for(GList* actorNode = actorList; actorNode->next; 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()));
+  const guint actorCount = g_list_length(actorList);
+  std::vector<Glib::RefPtr<const Actor> > actorVec;
+  actorVec.reserve(actorCount);
+
+  for(GList* actorNode = actorList; actorNode->next; actorNode = actorList->next)
+  {
+    actorVec.push_back(Glib::wrap(static_cast<ClutterActor*>(actorNode->data), true));
+  }
+
+  return actorVec;
+}
+_DEPRECATE_IFDEF_END
+
 } // namespace Clutter
diff --git a/clutter/src/container.hg b/clutter/src/container.hg
index 33a6345..b2a97c8 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,12 +35,58 @@ 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, 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, deprecated "Use set_child_below_sibling() instead.")
+
+
+  /**
+   * @deprecated "Use set_child_below_sibling() instead.
+   */
+  void lower_child(const Glib::RefPtr<Actor>& actor);
+_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++
   _IGNORE(clutter_container_add_valist, clutter_container_remove_valist, clutter_container_add,
           clutter_container_remove, clutter_container_child_get, clutter_container_child_set,
@@ -68,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, 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)
diff --git a/clutter/src/device-manager.hg b/clutter/src/device-manager.hg
index 3c07b2f..077819b 100644
--- a/clutter/src/device-manager.hg
+++ b/clutter/src/device-manager.hg
@@ -48,7 +48,7 @@ public:
   _WRAP_METHOD(Glib::RefPtr<InputDevice> get_core_device(InputDeviceType device_type), 
clutter_device_manager_get_core_device, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const InputDevice> get_core_device(InputDeviceType device_type) const, 
clutter_device_manager_get_core_device, refreturn, constversion)
 
-
+  _IGNORE(clutter_get_input_device_for_id)// deprecated.
 
   _WRAP_PROPERTY("backend", Glib::RefPtr<Backend>)
 };
diff --git a/clutter/src/effect.hg b/clutter/src/effect.hg
index ef37cab..ab43459 100644
--- a/clutter/src/effect.hg
+++ b/clutter/src/effect.hg
@@ -49,8 +49,8 @@ protected:
    //TODO: Signals, properties, vfuncs
   _WRAP_VFUNC(void paint(EffectPaintFlags flags), paint)
   _WRAP_VFUNC(void pick(EffectPaintFlags flags), pick)
-
-
+  _WRAP_VFUNC(void pre_paint(EffectPaintFlags flags), pre_paint, deprecated)
+  _WRAP_VFUNC(void post_paint(EffectPaintFlags flags), post_paint, deprecated)
 
   _WRAP_VFUNC(bool get_paint_volume(PaintVolume volume), get_paint_volume)
 };
diff --git a/clutter/src/input-device.hg b/clutter/src/input-device.hg
index 383a5eb..c284901 100644
--- a/clutter/src/input-device.hg
+++ b/clutter/src/input-device.hg
@@ -21,6 +21,10 @@
 _DEFS(cluttermm,clutter)
 _PINCLUDE(glibmm/private/object_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
 //TODO: Wrap this?
 typedef struct _ClutterEventSequence            ClutterEventSequence;
 
@@ -57,7 +61,7 @@ public:
   _WRAP_METHOD(ModifierType get_modifier_state() const,  clutter_input_device_get_modifier_state)
   _WRAP_METHOD(InputDeviceType get_device_type() const, clutter_input_device_get_device_type)
   _WRAP_METHOD(Glib::ustring get_device_name() const, clutter_input_device_get_device_name)
-
+  _WRAP_METHOD(void get_device_coords(int &x, int &y) const, clutter_input_device_get_device_coords, 
deprecated "Use get_coords() instead.")
 
   _WRAP_METHOD(InputMode get_device_mode() const, clutter_input_device_get_device_mode)
   _WRAP_METHOD(bool get_has_cursor() const, clutter_input_device_get_has_cursor)
diff --git a/clutter/src/layout-manager.hg b/clutter/src/layout-manager.hg
index 671b9fa..af2e109 100644
--- a/clutter/src/layout-manager.hg
+++ b/clutter/src/layout-manager.hg
@@ -21,6 +21,10 @@
 _DEFS(cluttermm,clutter)
 _PINCLUDE(glibmm/private/object_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
 namespace Clutter
 {
 
@@ -77,6 +81,13 @@ public:
   _WRAP_METHOD(Glib::RefPtr<LayoutMeta> get_child_meta(const Glib::RefPtr<Container>& container, const 
Glib::RefPtr<Actor>& actor), clutter_layout_manager_get_child_meta, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const LayoutMeta> get_child_meta(const Glib::RefPtr<Container>& container, const 
Glib::RefPtr<Actor>& actor) const, clutter_layout_manager_get_child_meta, refreturn, constversion)
 
+#m4 _CONVERSION(`Glib::RefPtr<Alpha>',`ClutterAlpha*',__CONVERT_REFPTR_TO_P)
+  _WRAP_METHOD(Glib::RefPtr<Alpha> begin_animation(guint duration, gulong mode), 
clutter_layout_manager_begin_animation, refreturn, deprecated)
+  _WRAP_METHOD(Glib::RefPtr<const Alpha> begin_animation(guint duration, gulong mode) const, 
clutter_layout_manager_begin_animation, refreturn, constversion, deprecated)
+
+  _WRAP_METHOD(double get_animation_progress(), clutter_layout_manager_get_animation_progress, deprecated)
+  _WRAP_METHOD(void end_animation(), clutter_layout_manager_end_animation, deprecated)
+
   _WRAP_VFUNC(void get_preferred_width(const Glib::RefPtr<Container>& container, float for_height, float& 
min_width_p, float& natural_width_p) const, "get_preferred_width")
 
   _WRAP_VFUNC(void get_preferred_height(const Glib::RefPtr<Container>& container, float for_width, float& 
min_height_p, float& natural_height_p) const, "get_preferred_height")
diff --git a/clutter/src/script.hg b/clutter/src/script.hg
index 7117028..0c5019a 100644
--- a/clutter/src/script.hg
+++ b/clutter/src/script.hg
@@ -96,6 +96,9 @@ public:
   _WRAP_METHOD(void unmerge_object(guint merge_id), clutter_script_unmerge_objects)
   _WRAP_METHOD(void ensure_objects(), clutter_script_ensure_objects)
 
+  //Ignore deprecated API that uses State.
+  _IGNORE(clutter_script_add_states, clutter_script_get_states)
+
   _WRAP_METHOD(void set_translation_domain(const Glib::ustring& domain), 
clutter_script_set_translation_domain)
   _WRAP_METHOD(Glib::ustring get_translation_domain() const, clutter_script_get_translation_domain)
 
diff --git a/clutter/src/stage.hg b/clutter/src/stage.hg
index 09231ae..b2a0286 100644
--- a/clutter/src/stage.hg
+++ b/clutter/src/stage.hg
@@ -21,11 +21,19 @@
 _DEFS(cluttermm,clutter)
 _PINCLUDE(cluttermm/private/group_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
 namespace Clutter
 {
 
 _WRAP_ENUM(PickMode, ClutterPickMode)
 
+/**
+ * @deprecated Fog settings are ignored.
+ */
+typedef ClutterFog Fog;
 
 class Perspective
 {
@@ -85,6 +93,11 @@ protected:
 
 public:
   _WRAP_CREATE()
+#m4 _CONVERSION(`ClutterActor*',`Glib::RefPtr<Stage>',`Glib::wrap((ClutterStage*)$3)')
+  _WRAP_METHOD(static Glib::RefPtr<Stage> get_default(), clutter_stage_get_default, refreturn, deprecated 
"Use Stage::create() instead, and keep track of the Glib::RefPtr returned.")
+  _WRAP_METHOD(void set_color(const Color& color), clutter_stage_set_color, deprecated "Use 
Actor::set_background_color() instead.")
+  _WRAP_METHOD_DOCS_ONLY(clutter_stage_get_color)
+  Color get_color() const;
 
 #m4 _CONVERSION(`const Perspective&', `ClutterPerspective*',`const_cast<$2>(($3).gobj())')
 #m4 _CONVERSION(`Perspective&', `ClutterPerspective*',`const_cast<$2>(($3).gobj())')
@@ -114,9 +127,14 @@ public:
   // TODO: Should we rather wrap this as std::string, or
   // as std::vector<unsigned char>, or Glib::ArrayHandle<guchar>?
   _WRAP_METHOD(guchar* read_pixels(int x, int y, int width, int height) const, clutter_stage_read_pixels)
- values.")
+  _WRAP_METHOD(bool get_use_fog() const, clutter_stage_get_use_fog, deprecated "This method will always 
return false.")
+  _WRAP_METHOD(void set_use_fog(bool fog = true), clutter_stage_set_use_fog, deprecated "This method has no 
visible effect.")
+#m4 _CONVERSION(`const Fog&',`ClutterFog*',`const_cast<ClutterFog*>(&($3))')
+  _WRAP_METHOD(void set_fog(const Fog& fog), clutter_stage_set_fog, deprecated "Fog settings are ignored.")
+  _WRAP_METHOD(void get_fog(Fog& fog) const, clutter_stage_get_fog, deprecated "This function will always 
return default values.")
 
   _WRAP_METHOD(void stage_event(Event* event), clutter_stage_event)
+  _WRAP_METHOD(bool is_default() const, clutter_stage_is_default, deprecated "Track the stage pointer inside 
your application code, or use Actor::get_stage() to retrieve the stage for a given actor.")
   _WRAP_METHOD(void ensure_current(), clutter_stage_ensure_current)
   _WRAP_METHOD(void ensure_viewport(), clutter_stage_ensure_viewport)
 
@@ -158,16 +176,16 @@ public:
 
   //properties:
   _WRAP_PROPERTY("accept-focus", bool)
-
+  _WRAP_PROPERTY("color", Color)// deprecated; use background-color.
   _WRAP_PROPERTY("cursor-visible", bool)
   _WRAP_PROPERTY("fullscreen-set", bool)
   _WRAP_PROPERTY("no-clear-hint", bool)
-
+  _WRAP_PROPERTY("offscreen", bool) //deprecated, does not do anything.
   _WRAP_PROPERTY("perspective", Perspective)
   _WRAP_PROPERTY("title", Glib::ustring)
-
+  _WRAP_PROPERTY("use-fog", bool) //deprecated, does not do anything.
   _WRAP_PROPERTY("user-resizable", bool)
-
+  _WRAP_PROPERTY("fog", Fog) //deprecated, does not do anything.
   _WRAP_PROPERTY("use-alpha", bool)
   _WRAP_PROPERTY("key-focus", Glib::RefPtr<Actor>)
 
diff --git a/clutter/src/timeline.hg b/clutter/src/timeline.hg
index a987604..5ce6a04 100644
--- a/clutter/src/timeline.hg
+++ b/clutter/src/timeline.hg
@@ -21,6 +21,10 @@
 _DEFS(cluttermm,clutter)
 _PINCLUDE(glibmm/private/object_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#define CLUTTER_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
 namespace Clutter
 {
 
@@ -36,7 +40,7 @@ protected:
 
 public:
   _WRAP_CREATE(guint msecs)
-
+  _WRAP_METHOD(Glib::RefPtr<Timeline> clone() const, clutter_timeline_clone, deprecated "Use create() 
instead.")
 
   _WRAP_METHOD(void set_duration(guint msecs), clutter_timeline_set_duration)
   _WRAP_METHOD(guint get_duration() const, clutter_timeline_get_duration)
@@ -50,8 +54,8 @@ public:
   _WRAP_METHOD(int get_repeat_count() const, clutter_timeline_get_repeat_count)
 
   _WRAP_METHOD(void rewind(), clutter_timeline_rewind)
-
-
+  _WRAP_METHOD(void set_loop(bool loop = true), clutter_timeline_set_loop, deprecated "Use 
set_repeat_count() instead.")
+  _WRAP_METHOD(bool get_loop() const, clutter_timeline_get_loop, deprecated "Use get_repeat_count() 
instead.")
   _WRAP_METHOD(void skip(guint n_frames), clutter_timeline_skip)
   _WRAP_METHOD(void advance(guint frame_num), clutter_timeline_advance)
   _WRAP_METHOD(guint get_delta() const, clutter_timeline_get_delta)
@@ -79,7 +83,7 @@ public:
   _WRAP_PROPERTY("delay", guint)
   _WRAP_PROPERTY("direction", TimelineDirection)
   _WRAP_PROPERTY("duration", guint)
-
+  _WRAP_PROPERTY("loop", bool, deprecated "Use the “repeat-count” property instead.")
   _WRAP_PROPERTY("auto-reverse", bool)
   _WRAP_PROPERTY("repeat-count", int)
   _WRAP_PROPERTY("progress-mode", AnimationMode)


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