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.
This commit is contained in:
Vitor Sousa 2016-01-21 19:16:22 -02:00 committed by Felipe Magno de Almeida
parent e1881b05f4
commit a2f29b86c5
9 changed files with 56 additions and 51 deletions

View File

@ -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>

View File

@ -1,13 +1,5 @@
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
@ -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

View File

@ -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.]]

View File

@ -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

View File

@ -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

View File

@ -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.]]
}
}
}

View File

@ -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.]]

View File

@ -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
*/

View File

@ -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 {