felipealmeida pushed a commit to branch master.

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

commit f66f3215d714ee59aaa14f2f7554a94d610824da
Author: Vitor Sousa <vitorsousasi...@gmail.com>
Date:   Thu Jan 21 19:16:22 2016 -0200

    elementary: move definition of Elm_Gen_Item_Class to elm_general.eot
    
    Move the definition of Elm_Gen_Item_Class from elm_gen.h to
    elm_general.eot.
    Also move the definition of its aliases Elm_Gengrid_Item_Class and
    Elm_Genlist_Item_Class from elm_gengrid_common.h and
    elm_genlist_common.h to elm_general.eot.
    
    Rename these types to Elm.Gen.Item.Class, Elm.Gengrid.Item.Class and
    Elm.Genlist.Item.Class to follow Eolian standards. And rename all
    occurrences in .eo files accordingly.
    
    Put elm_gen.h include above elm_general.h to allow the callback fields
    to be defined in elm_general.eot.
---
 src/lib/Elementary.h.in      |  2 +-
 src/lib/elm_gen.h            | 26 --------------------------
 src/lib/elm_general.eot      | 41 +++++++++++++++++++++++++++++++++++++++++
 src/lib/elm_gengrid.eo       | 10 +++++-----
 src/lib/elm_gengrid_common.h |  4 ----
 src/lib/elm_gengrid_item.eo  |  4 ++--
 src/lib/elm_genlist.eo       | 10 +++++-----
 src/lib/elm_genlist_common.h |  6 ------
 src/lib/elm_genlist_item.eo  |  4 ++--
 9 files changed, 56 insertions(+), 51 deletions(-)

diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in
index 7dceefa..3b5d73d 100644
--- a/src/lib/Elementary.h.in
+++ b/src/lib/Elementary.h.in
@@ -150,6 +150,7 @@ typedef struct _Elm_Version
 EAPI extern Elm_Version *elm_version;
 
 /* include these first for general used definitions */
+#include <elm_gen.h>
 #include <elm_general.h>
 #include <elm_config.h>
 #include <elm_focus.h>
@@ -217,7 +218,6 @@ EAPI extern Elm_Version *elm_version;
 #include <elm_flipselector.h>
 #include <elm_font.h>
 #include <elm_frame.h>
-#include <elm_gen.h>
 #include <elm_gengrid.h>
 #include <elm_genlist.h>
 #include <elm_gesture_layer.h>
diff --git a/src/lib/elm_gen.h b/src/lib/elm_gen.h
index 2ef3d86..9d09e71 100644
--- a/src/lib/elm_gen.h
+++ b/src/lib/elm_gen.h
@@ -1,14 +1,6 @@
 typedef struct Elm_Gen_Item             Elm_Gen_Item;
 
 /**
- * @struct Elm_Gen_Item_Class
- *
- * Gengrid or Genlist item class definition.
- * field details.
- */
-typedef struct _Elm_Gen_Item_Class      Elm_Gen_Item_Class;
-
-/**
  * Text fetching class function for Elm_Gen_Item_Class.
  * @param data The data passed in the item creation function
  * @param obj The base widget object
@@ -51,24 +43,6 @@ typedef void                          
(*Elm_Gen_Item_Del_Cb)(void *data, Evas_Ob
  */
 typedef Eina_Bool                     (*Elm_Gen_Item_Filter_Get_Cb)(void 
*data, Evas_Object *obj, void *key); /**< Filter seeking class function for gen 
item classes. */
 
-struct _Elm_Gen_Item_Class
-{
-   int           version;  /**< Set by elementary if you alloc an item class 
using elm_genlist/gengrid_item_class_new(), or if you set your own class (must 
be const) then set it to ELM_GENLIST/GENGRID_ITEM_CLASS_VERSION */
-   unsigned int  refcount; /**< Set it to 0 if you use your own const class, 
or its managed for you by class ref/unref calls */
-   Eina_Bool     delete_me : 1; /**< Leave this alone - set it to 0 if you 
have a const class of your own */
-   const char   *item_style; /**< Name of the visual style to use for this 
item. If you don't know use "default" */
-   const char   *decorate_item_style; /**< Style used if item is set to a 
decorate mode. @see elm_genlist_item_decorate_mode_set() or NULL if you don't 
care. currently it's used only in genlist. */
-   const char   *decorate_all_item_style; /**< Style to use when in edit mode, 
or NULL if you don't care. currently it's used only in genlist. */
-   struct
-     {
-        Elm_Gen_Item_Text_Get_Cb    text_get; /**< Text fetching class 
function for genlist/gengrid item classes.*/
-        Elm_Gen_Item_Content_Get_Cb content_get; /**< Content fetching class 
function for genlist/gengrid item classes. */
-        Elm_Gen_Item_State_Get_Cb   state_get; /**< State fetching class 
function for genlist/gengrid item classes. */
-        Elm_Gen_Item_Del_Cb         del; /**< Deletion class function for 
genlist/gengrid item classes. */
-        Elm_Gen_Item_Filter_Get_Cb  filter_get;  /**< Filter seeking class 
function for genlist/gengrid item classes. */
-     } func;
-}; /**< #Elm_Gen_Item_Class member definitions */
-
 #define ELM_GEN_ITEM_CLASS_VERSION 2
 #define ELM_GEN_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_VERSION, 0, 0
 
diff --git a/src/lib/elm_general.eot b/src/lib/elm_general.eot
index b175c9b..ac19ca1 100644
--- a/src/lib/elm_general.eot
+++ b/src/lib/elm_general.eot
@@ -6,6 +6,47 @@ struct Elm.Event.Policy_Changed
    old_value: int; [[new value the policy got]]
 }
 
+struct Elm.Gen.Item.Class.Functions
+{
+   text_get: Elm_Gen_Item_Text_Get_Cb; [[ Text fetching class function for
+                                          genlist/gengrid item classes. ]]
+   content_get: Elm_Gen_Item_Content_Get_Cb; [[ Content fetching class function
+                                                for genlist/gengrid item 
classes. ]]
+   state_get: Elm_Gen_Item_State_Get_Cb; [[ State fetching class function for
+                                            genlist/gengrid item classes. ]]
+   del: Elm_Gen_Item_Del_Cb; [[ Deletion class function for genlist/gengrid
+                                item classes. ]]
+   filter_get: Elm_Gen_Item_Filter_Get_Cb;  [[ Filter seeking class function 
for
+                                               genlist/gengrid item classes. ]]
+}
+
+struct Elm.Gen.Item.Class
+{
+   [[ Gengrid or Genlist item class definition. ]]
+   version: int; [[Set by elementary if you alloc an item class using
+                   elm_genlist/gengrid_item_class_new(), or if you set your own
+                   class (must be const) then set it to
+                   ELM_GENLIST/GENGRID_ITEM_CLASS_VERSION. ]]
+   refcount: uint; [[ Set it to 0 if you use your own const class, or
+                              its managed for you by class ref/unref calls. ]]
+   delete_me: bool; [[ Leave this alone - set it to 0 if you have a
+                               const class of your own. ]]
+   item_style: const(char) *; [[ Name of the visual style to use for this item.
+                                If you don't know use "default". ]]
+   decorate_item_style: const(char) *; [[ Style used if item is set to a 
decorate
+                                         mode. see 
elm_genlist_item_decorate_mode_set()
+                                         or NULL if you don't care. currently
+                                         it's used only in genlist. ]]
+   decorate_all_item_style: const(char) *; [[ Style to use when in edit mode, 
or
+                                             NULL if you don't care. Currently
+                                             it's used only in genlist. ]]
+   func: Elm.Gen.Item.Class.Functions; [[ Set of callbacks ]]
+}
+
+type Elm.Gengrid.Item.Class: Elm.Gen.Item.Class; [[ See @Elm.Gen.Item.Class. ]]
+
+type Elm.Genlist.Item.Class: Elm.Gen.Item.Class; [[ See @Elm.Gen.Item.Class. ]]
+
 enum Elm.Policy
 {
    [[Policy identifiers.]]
diff --git a/src/lib/elm_gengrid.eo b/src/lib/elm_gengrid.eo
index 1f3e565..9fa3952 100644
--- a/src/lib/elm_gengrid.eo
+++ b/src/lib/elm_gengrid.eo
@@ -370,7 +370,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
          ]]
          return: Elm.Widget_Item *; [[A handle to the item added or $null on 
errors.]]
          params {
-            @in itc: const(Elm_Gengrid_Item_Class)*; [[The item class for the 
item.]]
+            @in itc: const(Elm.Gengrid.Item.Class)*; [[The item class for the 
item.]]
             @in data: const(void)*; [[The item data.]]
             @in relative: Elm.Widget_Item *; [[The item to place this new one 
before.]]
             @in func: Evas_Smart_Cb @optional; [[Convenience function called
@@ -396,7 +396,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
          ]]
          return: Elm.Widget_Item *; [[A handle to the item added or $null on 
error.]]
          params {
-            @in itc: const(Elm_Gengrid_Item_Class)*; [[The item class for the 
item.]]
+            @in itc: const(Elm.Gengrid.Item.Class)*; [[The item class for the 
item.]]
             @in data: const(void)*; [[The item data.]]
             @in relative: Elm.Widget_Item *; [[The item to place this new one 
after.]]
             @in func: Evas_Smart_Cb @optional; [[Convenience function called
@@ -444,7 +444,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
          ]]
          return: Elm.Widget_Item *; [[A handle to the item added or $null on 
errors.]]
          params {
-            @in itc: const(Elm_Gengrid_Item_Class)*; [[The item class for the 
item.]]
+            @in itc: const(Elm.Gengrid.Item.Class)*; [[The item class for the 
item.]]
             @in data: const(void)*; [[The item data.]]
             @in func: Evas_Smart_Cb @optional; [[Convenience function called
                                                  when the item is selected.]]
@@ -458,7 +458,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
          ]]
          return: Elm.Widget_Item *; [[A handle to the item added or $null on 
errors.]]
          params {
-            @in itc: const(Elm_Gengrid_Item_Class)*; [[The item class for the 
item.]]
+            @in itc: const(Elm.Gengrid.Item.Class)*; [[The item class for the 
item.]]
             @in data: const(void)*; [[The item data.]]
             @in func: Evas_Smart_Cb @optional; [[Convenience function called
                                                  when the item is selected.]]
@@ -483,7 +483,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
          ]]
          return: Elm.Widget_Item *; [[A handle to the item added or $null on 
errors.]]
          params {
-            @in itc: const(Elm_Gengrid_Item_Class)*; [[The item class for the 
item.]]
+            @in itc: const(Elm.Gengrid.Item.Class)*; [[The item class for the 
item.]]
             @in data: const(void)*; [[The item data.]]
             @in comp: Eina_Compare_Cb; [[User defined comparison function
                                          that defines the sort order based
diff --git a/src/lib/elm_gengrid_common.h b/src/lib/elm_gengrid_common.h
index 7b919cf..37e4214 100644
--- a/src/lib/elm_gengrid_common.h
+++ b/src/lib/elm_gengrid_common.h
@@ -1,9 +1,5 @@
 #define ELM_GENGRID_ITEM_CLASS_VERSION ELM_GEN_ITEM_CLASS_VERSION
 #define ELM_GENGRID_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_HEADER
-/**
- * @see Elm_Gen_Item_Class
- */
-typedef Elm_Gen_Item_Class Elm_Gengrid_Item_Class;
 
 /**
  * @see Elm_Gen_Item_Text_Get_Cb
diff --git a/src/lib/elm_gengrid_item.eo b/src/lib/elm_gengrid_item.eo
index 78189f9..efc8c4c 100644
--- a/src/lib/elm_gengrid_item.eo
+++ b/src/lib/elm_gengrid_item.eo
@@ -76,7 +76,7 @@ class Elm.Gengrid_Item(Elm.Widget_Item)
                        the function pointers and item_style.]]
                 }
                 values {
-                     itc: const (Elm_Gengrid_Item_Class) *; [[Gengrid Item 
class for the given item]]
+                     itc: const (Elm.Gengrid.Item.Class) *; [[Gengrid Item 
class for the given item]]
                 }
            }
            @property index {
@@ -188,7 +188,7 @@ class Elm.Gengrid_Item(Elm.Widget_Item)
                   displayed. After changing the item class, 
elm_gengrid_item_update() is
                   called on the item $it.]]
                 params {
-                     @in itc: const (Elm_Gengrid_Item_Class) *; [[The gengrid 
item class describing the function pointers and the item style.]]
+                     @in itc: const (Elm.Gengrid.Item.Class) *; [[The gengrid 
item class describing the function pointers and the item style.]]
                 }
            }
       }
diff --git a/src/lib/elm_genlist.eo b/src/lib/elm_genlist.eo
index c695b71..cad2689 100644
--- a/src/lib/elm_genlist.eo
+++ b/src/lib/elm_genlist.eo
@@ -341,7 +341,7 @@ class Elm.Genlist (Elm.Layout, Elm.Interface_Scrollable, 
Evas.Clickable_Interfac
          ]]
          return: Elm.Widget_Item *;
          params {
-            @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the 
item.]]
+            @in itc: const(Elm.Genlist.Item.Class)*; [[The item class for the 
item.]]
             @in data: const(void)*; [[The item data.]]
             @in parent: Elm.Widget_Item * @nullable; [[The parent item, or 
$null if none.]]
             @in before_it: Elm.Widget_Item *; [[The item to place this new one 
before.]]
@@ -369,7 +369,7 @@ class Elm.Genlist (Elm.Layout, Elm.Interface_Scrollable, 
Evas.Clickable_Interfac
          ]]
          return: Elm.Widget_Item *;
          params {
-            @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the 
item.]]
+            @in itc: const(Elm.Genlist.Item.Class)*; [[The item class for the 
item.]]
             @in data: const(void)*; [[The item data.]]
             @in parent: Elm.Widget_Item * @nullable; [[The parent item, or 
$null if none.]]
             @in after_it: Elm.Widget_Item *; [[The item to place this new one 
after.]]
@@ -438,7 +438,7 @@ class Elm.Genlist (Elm.Layout, Elm.Interface_Scrollable, 
Evas.Clickable_Interfac
          ]]
          return: Elm.Widget_Item *;
          params {
-            @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the 
item.]]
+            @in itc: const(Elm.Genlist.Item.Class)*; [[The item class for the 
item.]]
             @in data: const(void)*; [[The item data.]]
             @in parent: Elm.Widget_Item * @nullable; [[The parent item, or 
$null if none.]]
             @in type: Elm_Genlist_Item_Type; [[Item type.]]
@@ -460,7 +460,7 @@ class Elm.Genlist (Elm.Layout, Elm.Interface_Scrollable, 
Evas.Clickable_Interfac
          ]]
          return: Elm.Widget_Item *;
          params {
-            @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the 
item.]]
+            @in itc: const(Elm.Genlist.Item.Class)*; [[The item class for the 
item.]]
             @in data: const(void)*; [[The item data.]]
             @in parent: Elm.Widget_Item * @nullable; [[The parent item, or 
$null if none.]]
             @in type: Elm_Genlist_Item_Type; [[Item type.]]
@@ -477,7 +477,7 @@ class Elm.Genlist (Elm.Layout, Elm.Interface_Scrollable, 
Evas.Clickable_Interfac
          ]]
          return: Elm.Widget_Item *;
          params {
-            @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the 
item.]]
+            @in itc: const(Elm.Genlist.Item.Class)*; [[The item class for the 
item.]]
             @in data: const(void)*; [[The item data.]]
             @in parent: Elm.Widget_Item * @nullable; [[The parent item, or 
$null if none.]]
             @in type: Elm_Genlist_Item_Type; [[Item type.]]
diff --git a/src/lib/elm_genlist_common.h b/src/lib/elm_genlist_common.h
index b1d1d9f..094e1eb 100644
--- a/src/lib/elm_genlist_common.h
+++ b/src/lib/elm_genlist_common.h
@@ -1,11 +1,5 @@
 #define ELM_GENLIST_ITEM_CLASS_VERSION ELM_GEN_ITEM_CLASS_VERSION
 #define ELM_GENLIST_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_HEADER
-
-/**
- * @see Elm_Gen_Item_Class
- */
-typedef Elm_Gen_Item_Class Elm_Genlist_Item_Class;
-
 /**
  * @see Elm_Gen_Item_Text_Get_Cb
  */
diff --git a/src/lib/elm_genlist_item.eo b/src/lib/elm_genlist_item.eo
index 4773a16..5a966c0 100644
--- a/src/lib/elm_genlist_item.eo
+++ b/src/lib/elm_genlist_item.eo
@@ -163,7 +163,7 @@ class Elm.Genlist_Item(Elm.Widget_Item)
                      ]]
                 }
                 values {
-                     itc: const (Elm_Genlist_Item_Class) *; [[Genlist Item 
class for the given item.]]
+                     itc: const (Elm.Genlist.Item.Class) *; [[Genlist Item 
class for the given item.]]
                 }
            }
            @property index {
@@ -373,7 +373,7 @@ class Elm.Genlist_Item(Elm.Widget_Item)
                   @.update is called on the item $it.
                 ]]
                 params {
-                     @in itc: const (Elm_Genlist_Item_Class) *; [[The item 
class for the item.]]
+                     @in itc: const (Elm.Genlist.Item.Class) *; [[The item 
class for the item.]]
                 }
            }
            decorate_mode_set {

-- 


Reply via email to