[glibmm] Binding: Change BindingFlags to Binding::Flags.



commit 0e5df130392be8238f5bbbea3c9144e9dd683a17
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Apr 18 20:13:09 2017 +0200

    Binding: Change BindingFlags to Binding::Flags.

 glib/src/binding.ccg     |    4 +++-
 glib/src/binding.hg      |   21 +++++++++++----------
 tools/m4/convert_glib.m4 |    2 +-
 3 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/glib/src/binding.ccg b/glib/src/binding.ccg
index 7d66029..dfad8a6 100644
--- a/glib/src/binding.ccg
+++ b/glib/src/binding.ccg
@@ -14,6 +14,8 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
+using Flags = Glib::Binding::Flags;
+
 #include <glibmm/binding.h>
 #include <glib.h>
 
@@ -80,7 +82,7 @@ namespace Glib
 // static
 Glib::RefPtr<Binding>
 Binding::bind_property_value(const PropertyProxy_Base& source_property,
-  const PropertyProxy_Base& target_property, BindingFlags flags, const SlotTransform& transform_to,
+  const PropertyProxy_Base& target_property, Flags flags, const SlotTransform& transform_to,
   const SlotTransform& transform_from)
 {
   GBinding* binding = nullptr;
diff --git a/glib/src/binding.hg b/glib/src/binding.hg
index 9129893..c99c8ca 100644
--- a/glib/src/binding.hg
+++ b/glib/src/binding.hg
@@ -24,7 +24,6 @@ _PINCLUDE(glibmm/private/object_p.h)
 
 namespace Glib
 {
-_WRAP_ENUM(BindingFlags, GBindingFlags, newin "2,44")
 
 /** Bind two object properties.
  *
@@ -101,6 +100,8 @@ class Binding : public Glib::Object
   _CLASS_GOBJECT(Binding, GBinding, G_BINDING, Glib::Object, GObject)
 
 public:
+  _WRAP_ENUM(Flags, GBindingFlags, newin "2,44")
+
   /** For instance,<br>
    *   bool on_transform_to(const GValue* from_value, GValue* to_value);
    *
@@ -140,7 +141,7 @@ public:
   static Glib::RefPtr<Binding> bind_property_value(
     const PropertyProxy_Base& source_property,
     const PropertyProxy_Base& target_property,
-    BindingFlags flags = BindingFlags::DEFAULT,
+    Flags flags = Flags::DEFAULT,
     const SlotTransform& transform_to = SlotTransform(),
     const SlotTransform& transform_from = SlotTransform());
 
@@ -161,7 +162,7 @@ public:
   static Glib::RefPtr<Binding> bind_property(
     const PropertyProxy_Base& source_property,
     const PropertyProxy_Base& target_property,
-    BindingFlags flags = BindingFlags::DEFAULT)
+    Flags flags = Flags::DEFAULT)
   {
     return bind_property_value(source_property, target_property, flags);
   }
@@ -193,7 +194,7 @@ public:
   static Glib::RefPtr<Binding> bind_property(
     const PropertyProxy<T_source>& source_property,
     const PropertyProxy<T_target>& target_property,
-    BindingFlags flags,
+    Flags flags,
     const T_functor_to& transform_to)
   {
     sigc::slot<bool(const T_source&, T_target&)> slot_transform_to = transform_to;
@@ -229,7 +230,7 @@ public:
   static Glib::RefPtr<Binding> bind_property(
     const PropertyProxy<T_source>& source_property,
     const PropertyProxy_WriteOnly<T_target>& target_property,
-    BindingFlags flags,
+    Flags flags,
     const T_functor_to& transform_to)
   {
     sigc::slot<bool(const T_source&, T_target&)> slot_transform_to = transform_to;
@@ -265,7 +266,7 @@ public:
   static Glib::RefPtr<Binding> bind_property(
     const PropertyProxy_ReadOnly<T_source>& source_property,
     const PropertyProxy<T_target>& target_property,
-    BindingFlags flags,
+    Flags flags,
     const T_functor_to& transform_to)
   {
     sigc::slot<bool(const T_source&, T_target&)> slot_transform_to = transform_to;
@@ -301,7 +302,7 @@ public:
   static Glib::RefPtr<Binding> bind_property(
     const PropertyProxy_ReadOnly<T_source>& source_property,
     const PropertyProxy_WriteOnly<T_target>& target_property,
-    BindingFlags flags,
+    Flags flags,
     const T_functor_to& transform_to)
   {
     sigc::slot<bool(const T_source&, T_target&)> slot_transform_to = transform_to;
@@ -342,7 +343,7 @@ public:
   static Glib::RefPtr<Binding> bind_property(
     const PropertyProxy<T_source>& source_property,
     const PropertyProxy<T_target>& target_property,
-    BindingFlags flags,
+    Flags flags,
     const T_functor_to& transform_to,
     const T_functor_from& transform_from)
   {
@@ -360,7 +361,7 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Glib::ObjectBase> get_target(), g_binding_get_target, refreturn, newin "2,44")
   _WRAP_METHOD(Glib::RefPtr<const Glib::ObjectBase> get_target() const, g_binding_get_target, refreturn, 
constversion, newin "2,44")
   _WRAP_METHOD(Glib::ustring get_target_property() const, g_binding_get_target_property, newin "2,44")
-  _WRAP_METHOD(BindingFlags get_flags() const, g_binding_get_flags, newin "2,44")
+  _WRAP_METHOD(Flags get_flags() const, g_binding_get_flags, newin "2,44")
 
   /** Explicitly releases the binding between the source and the target
    * property expressed by this Binding instance.
@@ -374,7 +375,7 @@ public:
   void unbind();
   _IGNORE(g_binding_unbind)
 
-  _WRAP_PROPERTY("flags", Glib::BindingFlags, newin "2,44")
+  _WRAP_PROPERTY("flags", Flags, newin "2,44")
   _WRAP_PROPERTY("source", Glib::RefPtr<Glib::ObjectBase>, newin "2,44")
   _WRAP_PROPERTY("source-property", Glib::ustring, newin "2,44")
   _WRAP_PROPERTY("target", Glib::RefPtr<Glib::ObjectBase>, newin "2,44")
diff --git a/tools/m4/convert_glib.m4 b/tools/m4/convert_glib.m4
index 5ef04c5..4871482 100644
--- a/tools/m4/convert_glib.m4
+++ b/tools/m4/convert_glib.m4
@@ -65,7 +65,7 @@ dnl
 dnl # These are for fixmegtkconst
 _CONVERSION(`const guchar*',`guchar*',`const_cast<guchar*>($3)',`$3')
 
-_CONV_GLIB_ENUM(BindingFlags)
+_CONV_GLIB_INCLASS_ENUM(Binding,Flags)
 _CONV_GLIB_ENUM(IOCondition)
 _CONV_GLIB_ENUM(IOFlags)
 _CONV_GLIB_ENUM(IOStatus)


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