[atkmm] Text: Move enums into the class.



commit f288ef41b8915f6c880562b1614585f2f7a77a25
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Apr 26 23:17:23 2017 +0200

    Text: Move enums into the class.

 atk/src/text.hg           |   16 ++++++++--------
 codegen/m4/convert_atk.m4 |    4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/atk/src/text.hg b/atk/src/text.hg
index 5bb0270..0b74682 100644
--- a/atk/src/text.hg
+++ b/atk/src/text.hg
@@ -108,9 +108,6 @@ public:
 namespace Atk
 {
 
-_WRAP_ENUM(TextClipType, AtkTextClipType)
-_WRAP_ENUM(TextGranularity, AtkTextGranularity)
-
 /** The ATK interface implemented by components with text content.
  * This should be implemented by Atk::Objects on behalf of widgets that have text content which is either 
attributed
  * or otherwise non-trivial. Atk::Objects whose text content is simple, unattributed, and very brief may 
expose that
@@ -129,13 +126,16 @@ class Text : public Glib::Interface
   _CLASS_INTERFACE(Text, AtkText, ATK_TEXT, AtkTextIface)
 
 public:
+  _WRAP_ENUM(ClipType, AtkTextClipType)
+  _WRAP_ENUM(Granularity, AtkTextGranularity)
+
   _WRAP_METHOD(Glib::ustring get_text(int start_offset, int end_offset) const, atk_text_get_text)
   _WRAP_METHOD(gunichar get_character_at_offset(int offset) const, atk_text_get_character_at_offset)
   _IGNORE(atk_text_get_text_after_offset)
   _IGNORE(atk_text_get_text_at_offset)
   _IGNORE(atk_text_get_text_before_offset)
 
-  _WRAP_METHOD(Glib::ustring get_string_at_offset(int offset, TextGranularity granularity, int& 
start_offset, int& end_offset), atk_text_get_string_at_offset)
+  _WRAP_METHOD(Glib::ustring get_string_at_offset(int offset, Granularity granularity, int& start_offset, 
int& end_offset), atk_text_get_string_at_offset)
 
   _WRAP_METHOD(int get_caret_offset() const, atk_text_get_caret_offset)
   _WRAP_METHOD(void get_character_extents(int offset, int& x, int& y, int& width, int& height, CoordType 
coords) const, atk_text_get_character_extents)
@@ -153,15 +153,15 @@ public:
   _WRAP_METHOD(bool remove_selection(int selection_num), atk_text_remove_selection)
   _WRAP_METHOD(bool set_selection(int selection_num, int start_offset, int end_offset), 
atk_text_set_selection)
   _WRAP_METHOD(bool set_caret_offset(int offset), atk_text_set_caret_offset)
-  
+
   typedef AtkTextRectangle Rectangle;
-    
+
   _WRAP_METHOD(void get_range_extents(int start_offset, int end_offset,
                                       CoordType coord_type,
                                       Rectangle& rect), atk_text_get_range_extents)
   _WRAP_METHOD(AtkTextRange** get_bounded_ranges(const Rectangle& rect, CoordType coord_type,
-                                                 TextClipType x_clip_type, TextClipType y_clip_type), 
atk_text_get_bounded_ranges)
-                                                           
+                                                 ClipType x_clip_type, ClipType y_clip_type), 
atk_text_get_bounded_ranges)
+
 
   _WRAP_SIGNAL(void text_changed(int position, int length), "text_changed")
   _WRAP_SIGNAL(void text_caret_moved(int location), "text_caret_moved")
diff --git a/codegen/m4/convert_atk.m4 b/codegen/m4/convert_atk.m4
index 914fd70..e147261 100644
--- a/codegen/m4/convert_atk.m4
+++ b/codegen/m4/convert_atk.m4
@@ -8,8 +8,8 @@ _CONV_INCLASS_ENUM(Atk,Relation,Type)
 _CONV_ENUM(Atk,StateType)
 _CONV_ENUM(Atk,CoordType)
 _CONV_ENUM(Atk,TextBoundary)
-_CONV_ENUM(Atk,TextClipType)
-_CONV_ENUM(Atk,TextGranularity)
+_CONV_INCLASS_ENUM(Atk,Text,ClipType)
+_CONV_INCLASS_ENUM(Atk,Text,Granularity)
 
 
 _CONVERSION(`AtkObject*',`Glib::RefPtr<Atk::Object>',Glib::wrap($3))


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