yakov pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=90b3877dc3012b2a96aee71ee391b95d339099c6

commit 90b3877dc3012b2a96aee71ee391b95d339099c6
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Wed Jul 8 11:39:19 2015 +0300

    elm_genlist: move enums to elm_genlist_item.eo
    
    Move enums from elm_genlist_common.h to elm_genlist_item.eo in order to 
make them
    more accessible for bindings.
---
 src/lib/elm_genlist_common.h | 43 -------------------------------------
 src/lib/elm_genlist_item.eo  | 50 ++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 46 insertions(+), 47 deletions(-)

diff --git a/src/lib/elm_genlist_common.h b/src/lib/elm_genlist_common.h
index f2ed511..d3ed39d 100644
--- a/src/lib/elm_genlist_common.h
+++ b/src/lib/elm_genlist_common.h
@@ -2,49 +2,6 @@
 #define ELM_GENLIST_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_HEADER
 
 /**
- * Defines if the item is of any special type (has subitems or it's the
- * index of a group), or is just a simple item.
- *
- * @ingroup Genlist
- */
-typedef enum
-{
-   ELM_GENLIST_ITEM_NONE = 0, /**< simple item */
-   ELM_GENLIST_ITEM_TREE = (1 << 0), /**< this may be expanded and have child 
items. */
-   ELM_GENLIST_ITEM_GROUP = (1 << 1), /**< an index item of a group of items. 
this item can have child items. */
-
-   ELM_GENLIST_ITEM_MAX = (1 << 2)
-} Elm_Genlist_Item_Type;
-
-/**
- * Defines the type of the item part
- * Used while updating item's parts
- * It can be used at updating multi fields.
- *
- * @ingroup Genlist
- */
-typedef enum
-{
-   ELM_GENLIST_ITEM_FIELD_ALL = 0,
-   ELM_GENLIST_ITEM_FIELD_TEXT = (1 << 0),
-   ELM_GENLIST_ITEM_FIELD_CONTENT = (1 << 1),
-   ELM_GENLIST_ITEM_FIELD_STATE = (1 << 2)
-} Elm_Genlist_Item_Field_Type;
-
-/**
- * Defines where to position the item in the genlist.
- *
- * @ingroup Genlist
- */
-typedef enum
-{
-   ELM_GENLIST_ITEM_SCROLLTO_NONE = 0,   /**< no scrollto */
-   ELM_GENLIST_ITEM_SCROLLTO_IN = (1 << 0),   /**< to the nearest viewport */
-   ELM_GENLIST_ITEM_SCROLLTO_TOP = (1 << 1),   /**< to the top of viewport */
-   ELM_GENLIST_ITEM_SCROLLTO_MIDDLE = (1 << 2)   /**< to the middle of 
viewport */
-} Elm_Genlist_Item_Scrollto_Type;
-
-/**
  * @see Elm_Gen_Item_Class
  */
 typedef Elm_Gen_Item_Class Elm_Genlist_Item_Class;
diff --git a/src/lib/elm_genlist_item.eo b/src/lib/elm_genlist_item.eo
index 3786686..6e46245 100644
--- a/src/lib/elm_genlist_item.eo
+++ b/src/lib/elm_genlist_item.eo
@@ -1,5 +1,47 @@
 import elm_general;
 
+enum Elm.Genlist.Item.Type
+{
+   [[
+      Defines if the item is of any special type (has subitems or it's the
+      index of a group), or is just a simple item.
+      @ingroup Genlist
+   ]]
+   legacy: elm_genlist_item;
+   none = 0, [[Simple item.]]
+   tree = (1 << 0), [[This may be expanded and have child items.]]
+   group = (1 << 1), [[An index item of a group of items. this item can have 
child items.]]
+   max = (1 << 2)
+}
+
+enum Elm.Genlist.Item.Field_Type
+{
+   [[
+      Defines the type of the item part
+      Used while updating item's parts
+      It can be used at updating multi fields.
+      @ingroup Genlist
+   ]]
+   legacy: elm_genlist_item_field;
+   all = 0,
+   text = (1 << 0),
+   content = (1 << 1),
+   state = (1 << 2)
+}
+
+enum Elm.Genlist.Item.Scrollto_Type
+{
+   [[
+      Defines where to position the item in the genlist.
+      @ingroup Genlist
+   ]]
+   legacy: elm_genlist_item_scrollto;
+   none = 0,   [[No scrollto.]]
+   in = (1 << 0),   [[To the nearest viewport.]]
+   top = (1 << 1),   [[To the top of viewport.]]
+   middle = (1 << 2)   [[To the middle of viewport.]]
+}
+
 class Elm.Genlist_Item(Elm.Widget_Item)
 {
       eo_prefix: elm_obj_genlist_item;
@@ -286,7 +328,7 @@ class Elm.Genlist_Item(Elm.Widget_Item)
                       */
                 }
                 values {
-                     type: Elm_Genlist_Item_Type(4); /*@ Item tupe */
+                     type: Elm.Genlist.Item.Type(Elm.Genlist.Item.Type.max); 
/*@ Item type */
                 }
            }
            /*      init { FIXME
@@ -352,7 +394,7 @@ class Elm.Genlist_Item(Elm.Widget_Item)
                  @ingroup Genlist
                  */
                 params {
-                     @in type: Elm_Genlist_Item_Scrollto_Type; /*@ The 
position to bring in, the given item to.
+                     @in type: Elm.Genlist.Item.Scrollto_Type; /*@ The 
position to bring in, the given item to.
                                                                 @ref 
Elm_Genlist_Item_Scrollto_Type */
                 }
            }
@@ -370,7 +412,7 @@ class Elm.Genlist_Item(Elm.Widget_Item)
                  @ingroup Genlist
                  */
                 params {
-                     @in type: Elm_Genlist_Item_Scrollto_Type; /*@ The 
position to bring in, the given item to.
+                     @in type: Elm.Genlist.Item.Scrollto_Type; /*@ The 
position to bring in, the given item to.
                                                                 @ref 
Elm_Genlist_Item_Scrollto_Type */
                 }
            }
@@ -429,7 +471,7 @@ class Elm.Genlist_Item(Elm.Widget_Item)
                  */
                 params {
                      @in parts: const (char) *; /*@ The name of item's part */
-                     @in itf: Elm_Genlist_Item_Field_Type; /*@ The type of 
item's part type */
+                     @in itf: Elm.Genlist.Item.Field_Type; /*@ The type of 
item's part type */
                 }
            }
            item_class_update {

-- 


Reply via email to