[atkmm] Relation: Change RelationType to Relation::Type.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atkmm] Relation: Change RelationType to Relation::Type.
- Date: Wed, 26 Apr 2017 21:29:47 +0000 (UTC)
commit e79f3f655f72158037ff36f480e6421e5fac4da1
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Apr 26 23:15:04 2017 +0200
Relation: Change RelationType to Relation::Type.
atk/src/object.hg | 4 ++--
atk/src/relation.ccg | 3 ++-
atk/src/relation.hg | 10 ++++++----
atk/src/relationset.hg | 6 +++---
codegen/m4/convert_atk.m4 | 2 +-
5 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/atk/src/object.hg b/atk/src/object.hg
index 50f87d7..ea018f2 100644
--- a/atk/src/object.hg
+++ b/atk/src/object.hg
@@ -77,8 +77,8 @@ public:
//_WRAP_METHOD(void remove_property_change_handler(guint handler_id),
atk_object_remove_property_change_handler)
_WRAP_METHOD(void notify_state_change(State state, bool value), atk_object_notify_state_change)
- _WRAP_METHOD(bool add_relationship(RelationType relationship, const Glib::RefPtr<Object>& target),
atk_object_add_relationship)
- _WRAP_METHOD(bool remove_relationship(RelationType relationship, const Glib::RefPtr<Object>& target),
atk_object_remove_relationship)
+ _WRAP_METHOD(bool add_relationship(Relation::Type relationship, const Glib::RefPtr<Object>& target),
atk_object_add_relationship)
+ _WRAP_METHOD(bool remove_relationship(Relation::Type relationship, const Glib::RefPtr<Object>& target),
atk_object_remove_relationship)
_WRAP_SIGNAL(void children_changed(guint change_index, gpointer changed_child), "children_changed")
_WRAP_SIGNAL(void focus_event(bool focus_in), "focus_event")
diff --git a/atk/src/relation.ccg b/atk/src/relation.ccg
index 7139020..a7c170e 100644
--- a/atk/src/relation.ccg
+++ b/atk/src/relation.ccg
@@ -22,13 +22,14 @@
#include <atk/atkobject.h>
#include <atk/atkrelation.h>
+using Type = Atk::Relation::Type;
namespace Atk
{
//TODO: Implement this with the new GValue array thingy. See bug #74246.
Relation::Relation(const std::vector<Glib::RefPtr<Atk::Object>>& targets,
- RelationType relationship)
+ Relation::Type relationship)
:
Glib::Object((GObject*)
atk_relation_new(const_cast<AtkObject**>(Glib::ArrayHandler<Glib::RefPtr<Atk::Object>>::vector_to_array(targets).data()),
targets.size(),
(AtkRelationType) relationship))
diff --git a/atk/src/relation.hg b/atk/src/relation.hg
index 96c4081..9bcc813 100644
--- a/atk/src/relation.hg
+++ b/atk/src/relation.hg
@@ -25,7 +25,6 @@ namespace Atk
{
_CC_INCLUDE(atk/atk-enum-types.h)
-_WRAP_ENUM(RelationType, AtkRelationType, s#^NULL$#NONE#)
class Object;
@@ -37,15 +36,18 @@ class Relation : public Glib::Object
{
_CLASS_GOBJECT(Relation, AtkRelation, ATK_RELATION, Glib::Object, GObject)
+public:
+ _WRAP_ENUM(Type, AtkRelationType, s#^NULL$#NONE#)
+
protected:
explicit Relation(const std::vector<Glib::RefPtr<Atk::Object>>& targets,
- RelationType relationship);
+ Relation::Type relationship);
public:
_WRAP_CREATE(const std::vector<Glib::RefPtr<Atk::Object>>& targets,
- RelationType relationship = RelationType::NONE)
+ Type relationship = Type::NONE)
- _WRAP_METHOD(RelationType get_relation_type() const, atk_relation_get_relation_type)
+ _WRAP_METHOD(Type get_relation_type() const, atk_relation_get_relation_type)
std::vector<Glib::RefPtr<Atk::Object>> get_target();
std::vector<Glib::RefPtr<const Atk::Object>> get_target() const;
diff --git a/atk/src/relationset.hg b/atk/src/relationset.hg
index 54eeb0a..d2f3fc6 100644
--- a/atk/src/relationset.hg
+++ b/atk/src/relationset.hg
@@ -38,14 +38,14 @@ protected:
public:
_WRAP_CREATE()
- _WRAP_METHOD(bool set_contains(RelationType relationship), atk_relation_set_contains)
+ _WRAP_METHOD(bool set_contains(Relation::Type relationship), atk_relation_set_contains)
_WRAP_METHOD(void set_remove(const Glib::RefPtr<Relation>& relation), atk_relation_set_remove)
_WRAP_METHOD(void set_add(const Glib::RefPtr<Relation>& relation), atk_relation_set_add)
_WRAP_METHOD(int get_n_relations() const, atk_relation_set_get_n_relations)
_WRAP_METHOD(Glib::RefPtr<Relation> get_relation(gint i), atk_relation_set_get_relation, refreturn)
- _WRAP_METHOD(Glib::RefPtr<Relation> get_relation(RelationType relationship),
atk_relation_set_get_relation_by_type, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<Relation> get_relation(Relation::Type relationship),
atk_relation_set_get_relation_by_type, refreturn)
- _WRAP_METHOD(void add_relation_by_type(RelationType relationship, const Glib::RefPtr<Atk::Object>&
target), atk_relation_set_add_relation_by_type)
+ _WRAP_METHOD(void add_relation_by_type(Relation::Type relationship, const Glib::RefPtr<Atk::Object>&
target), atk_relation_set_add_relation_by_type)
};
} // namespace Atk
diff --git a/codegen/m4/convert_atk.m4 b/codegen/m4/convert_atk.m4
index a1fb26e..914fd70 100644
--- a/codegen/m4/convert_atk.m4
+++ b/codegen/m4/convert_atk.m4
@@ -4,7 +4,7 @@ _EQUAL(State,AtkState)
_CONV_ENUM(Atk,Role)
_CONV_ENUM(Atk,Layer)
-_CONV_ENUM(Atk,RelationType)
+_CONV_INCLASS_ENUM(Atk,Relation,Type)
_CONV_ENUM(Atk,StateType)
_CONV_ENUM(Atk,CoordType)
_CONV_ENUM(Atk,TextBoundary)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]