summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2016-01-21 19:16:22 -0200
committerVitor Sousa <vitorsousasilva@gmail.com>2016-02-01 12:33:18 -0200
commit169cf82d7df01d64b1f6d2ef6d7143ab17311cd3 (patch)
treef03e11fbd3ed53afa5ea56334cdbf517b04c0e92
parent01688f307f69545ee3608ca70e1f25b4d0f0f5f9 (diff)
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.
-rw-r--r--src/lib/Elementary.h.in2
-rw-r--r--src/lib/elm_gen.h26
-rw-r--r--src/lib/elm_general.eot41
-rw-r--r--src/lib/elm_gengrid.eo10
-rw-r--r--src/lib/elm_gengrid_common.h4
-rw-r--r--src/lib/elm_gengrid_item.eo4
-rw-r--r--src/lib/elm_genlist.eo10
-rw-r--r--src/lib/elm_genlist_common.h6
-rw-r--r--src/lib/elm_genlist_item.eo4
9 files changed, 56 insertions, 51 deletions
diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in
index 7dceefaca..3b5d73d1d 100644
--- a/src/lib/Elementary.h.in
+++ b/src/lib/Elementary.h.in
@@ -150,6 +150,7 @@ typedef struct _Elm_Version
150EAPI extern Elm_Version *elm_version; 150EAPI extern Elm_Version *elm_version;
151 151
152/* include these first for general used definitions */ 152/* include these first for general used definitions */
153#include <elm_gen.h>
153#include <elm_general.h> 154#include <elm_general.h>
154#include <elm_config.h> 155#include <elm_config.h>
155#include <elm_focus.h> 156#include <elm_focus.h>
@@ -217,7 +218,6 @@ EAPI extern Elm_Version *elm_version;
217#include <elm_flipselector.h> 218#include <elm_flipselector.h>
218#include <elm_font.h> 219#include <elm_font.h>
219#include <elm_frame.h> 220#include <elm_frame.h>
220#include <elm_gen.h>
221#include <elm_gengrid.h> 221#include <elm_gengrid.h>
222#include <elm_genlist.h> 222#include <elm_genlist.h>
223#include <elm_gesture_layer.h> 223#include <elm_gesture_layer.h>
diff --git a/src/lib/elm_gen.h b/src/lib/elm_gen.h
index 2ef3d8648..9d09e7152 100644
--- a/src/lib/elm_gen.h
+++ b/src/lib/elm_gen.h
@@ -1,14 +1,6 @@
1typedef struct Elm_Gen_Item Elm_Gen_Item; 1typedef struct Elm_Gen_Item Elm_Gen_Item;
2 2
3/** 3/**
4 * @struct Elm_Gen_Item_Class
5 *
6 * Gengrid or Genlist item class definition.
7 * field details.
8 */
9typedef struct _Elm_Gen_Item_Class Elm_Gen_Item_Class;
10
11/**
12 * Text fetching class function for Elm_Gen_Item_Class. 4 * Text fetching class function for Elm_Gen_Item_Class.
13 * @param data The data passed in the item creation function 5 * @param data The data passed in the item creation function
14 * @param obj The base widget object 6 * @param obj The base widget object
@@ -51,24 +43,6 @@ typedef void (*Elm_Gen_Item_Del_Cb)(void *data, Evas_Ob
51 */ 43 */
52typedef Eina_Bool (*Elm_Gen_Item_Filter_Get_Cb)(void *data, Evas_Object *obj, void *key); /**< Filter seeking class function for gen item classes. */ 44typedef Eina_Bool (*Elm_Gen_Item_Filter_Get_Cb)(void *data, Evas_Object *obj, void *key); /**< Filter seeking class function for gen item classes. */
53 45
54struct _Elm_Gen_Item_Class
55{
56 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 */
57 unsigned int refcount; /**< Set it to 0 if you use your own const class, or its managed for you by class ref/unref calls */
58 Eina_Bool delete_me : 1; /**< Leave this alone - set it to 0 if you have a const class of your own */
59 const char *item_style; /**< Name of the visual style to use for this item. If you don't know use "default" */
60 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. */
61 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. */
62 struct
63 {
64 Elm_Gen_Item_Text_Get_Cb text_get; /**< Text fetching class function for genlist/gengrid item classes.*/
65 Elm_Gen_Item_Content_Get_Cb content_get; /**< Content fetching class function for genlist/gengrid item classes. */
66 Elm_Gen_Item_State_Get_Cb state_get; /**< State fetching class function for genlist/gengrid item classes. */
67 Elm_Gen_Item_Del_Cb del; /**< Deletion class function for genlist/gengrid item classes. */
68 Elm_Gen_Item_Filter_Get_Cb filter_get; /**< Filter seeking class function for genlist/gengrid item classes. */
69 } func;
70}; /**< #Elm_Gen_Item_Class member definitions */
71
72#define ELM_GEN_ITEM_CLASS_VERSION 2 46#define ELM_GEN_ITEM_CLASS_VERSION 2
73#define ELM_GEN_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_VERSION, 0, 0 47#define ELM_GEN_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_VERSION, 0, 0
74 48
diff --git a/src/lib/elm_general.eot b/src/lib/elm_general.eot
index b175c9b35..ac19ca196 100644
--- a/src/lib/elm_general.eot
+++ b/src/lib/elm_general.eot
@@ -6,6 +6,47 @@ struct Elm.Event.Policy_Changed
6 old_value: int; [[new value the policy got]] 6 old_value: int; [[new value the policy got]]
7} 7}
8 8
9struct Elm.Gen.Item.Class.Functions
10{
11 text_get: Elm_Gen_Item_Text_Get_Cb; [[ Text fetching class function for
12 genlist/gengrid item classes. ]]
13 content_get: Elm_Gen_Item_Content_Get_Cb; [[ Content fetching class function
14 for genlist/gengrid item classes. ]]
15 state_get: Elm_Gen_Item_State_Get_Cb; [[ State fetching class function for
16 genlist/gengrid item classes. ]]
17 del: Elm_Gen_Item_Del_Cb; [[ Deletion class function for genlist/gengrid
18 item classes. ]]
19 filter_get: Elm_Gen_Item_Filter_Get_Cb; [[ Filter seeking class function for
20 genlist/gengrid item classes. ]]
21}
22
23struct Elm.Gen.Item.Class
24{
25 [[ Gengrid or Genlist item class definition. ]]
26 version: int; [[Set by elementary if you alloc an item class using
27 elm_genlist/gengrid_item_class_new(), or if you set your own
28 class (must be const) then set it to
29 ELM_GENLIST/GENGRID_ITEM_CLASS_VERSION. ]]
30 refcount: uint; [[ Set it to 0 if you use your own const class, or
31 its managed for you by class ref/unref calls. ]]
32 delete_me: bool; [[ Leave this alone - set it to 0 if you have a
33 const class of your own. ]]
34 item_style: const(char) *; [[ Name of the visual style to use for this item.
35 If you don't know use "default". ]]
36 decorate_item_style: const(char) *; [[ Style used if item is set to a decorate
37 mode. see elm_genlist_item_decorate_mode_set()
38 or NULL if you don't care. currently
39 it's used only in genlist. ]]
40 decorate_all_item_style: const(char) *; [[ Style to use when in edit mode, or
41 NULL if you don't care. Currently
42 it's used only in genlist. ]]
43 func: Elm.Gen.Item.Class.Functions; [[ Set of callbacks ]]
44}
45
46type Elm.Gengrid.Item.Class: Elm.Gen.Item.Class; [[ See @Elm.Gen.Item.Class. ]]
47
48type Elm.Genlist.Item.Class: Elm.Gen.Item.Class; [[ See @Elm.Gen.Item.Class. ]]
49
9enum Elm.Policy 50enum Elm.Policy
10{ 51{
11 [[Policy identifiers.]] 52 [[Policy identifiers.]]
diff --git a/src/lib/elm_gengrid.eo b/src/lib/elm_gengrid.eo
index 1f3e5657e..9fa39524d 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,
370 ]] 370 ]]
371 return: Elm.Widget_Item *; [[A handle to the item added or $null on errors.]] 371 return: Elm.Widget_Item *; [[A handle to the item added or $null on errors.]]
372 params { 372 params {
373 @in itc: const(Elm_Gengrid_Item_Class)*; [[The item class for the item.]] 373 @in itc: const(Elm.Gengrid.Item.Class)*; [[The item class for the item.]]
374 @in data: const(void)*; [[The item data.]] 374 @in data: const(void)*; [[The item data.]]
375 @in relative: Elm.Widget_Item *; [[The item to place this new one before.]] 375 @in relative: Elm.Widget_Item *; [[The item to place this new one before.]]
376 @in func: Evas_Smart_Cb @optional; [[Convenience function called 376 @in func: Evas_Smart_Cb @optional; [[Convenience function called
@@ -396,7 +396,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
396 ]] 396 ]]
397 return: Elm.Widget_Item *; [[A handle to the item added or $null on error.]] 397 return: Elm.Widget_Item *; [[A handle to the item added or $null on error.]]
398 params { 398 params {
399 @in itc: const(Elm_Gengrid_Item_Class)*; [[The item class for the item.]] 399 @in itc: const(Elm.Gengrid.Item.Class)*; [[The item class for the item.]]
400 @in data: const(void)*; [[The item data.]] 400 @in data: const(void)*; [[The item data.]]
401 @in relative: Elm.Widget_Item *; [[The item to place this new one after.]] 401 @in relative: Elm.Widget_Item *; [[The item to place this new one after.]]
402 @in func: Evas_Smart_Cb @optional; [[Convenience function called 402 @in func: Evas_Smart_Cb @optional; [[Convenience function called
@@ -444,7 +444,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
444 ]] 444 ]]
445 return: Elm.Widget_Item *; [[A handle to the item added or $null on errors.]] 445 return: Elm.Widget_Item *; [[A handle to the item added or $null on errors.]]
446 params { 446 params {
447 @in itc: const(Elm_Gengrid_Item_Class)*; [[The item class for the item.]] 447 @in itc: const(Elm.Gengrid.Item.Class)*; [[The item class for the item.]]
448 @in data: const(void)*; [[The item data.]] 448 @in data: const(void)*; [[The item data.]]
449 @in func: Evas_Smart_Cb @optional; [[Convenience function called 449 @in func: Evas_Smart_Cb @optional; [[Convenience function called
450 when the item is selected.]] 450 when the item is selected.]]
@@ -458,7 +458,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
458 ]] 458 ]]
459 return: Elm.Widget_Item *; [[A handle to the item added or $null on errors.]] 459 return: Elm.Widget_Item *; [[A handle to the item added or $null on errors.]]
460 params { 460 params {
461 @in itc: const(Elm_Gengrid_Item_Class)*; [[The item class for the item.]] 461 @in itc: const(Elm.Gengrid.Item.Class)*; [[The item class for the item.]]
462 @in data: const(void)*; [[The item data.]] 462 @in data: const(void)*; [[The item data.]]
463 @in func: Evas_Smart_Cb @optional; [[Convenience function called 463 @in func: Evas_Smart_Cb @optional; [[Convenience function called
464 when the item is selected.]] 464 when the item is selected.]]
@@ -483,7 +483,7 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
483 ]] 483 ]]
484 return: Elm.Widget_Item *; [[A handle to the item added or $null on errors.]] 484 return: Elm.Widget_Item *; [[A handle to the item added or $null on errors.]]
485 params { 485 params {
486 @in itc: const(Elm_Gengrid_Item_Class)*; [[The item class for the item.]] 486 @in itc: const(Elm.Gengrid.Item.Class)*; [[The item class for the item.]]
487 @in data: const(void)*; [[The item data.]] 487 @in data: const(void)*; [[The item data.]]
488 @in comp: Eina_Compare_Cb; [[User defined comparison function 488 @in comp: Eina_Compare_Cb; [[User defined comparison function
489 that defines the sort order based 489 that defines the sort order based
diff --git a/src/lib/elm_gengrid_common.h b/src/lib/elm_gengrid_common.h
index 7b919cff7..37e4214ac 100644
--- a/src/lib/elm_gengrid_common.h
+++ b/src/lib/elm_gengrid_common.h
@@ -1,9 +1,5 @@
1#define ELM_GENGRID_ITEM_CLASS_VERSION ELM_GEN_ITEM_CLASS_VERSION 1#define ELM_GENGRID_ITEM_CLASS_VERSION ELM_GEN_ITEM_CLASS_VERSION
2#define ELM_GENGRID_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_HEADER 2#define ELM_GENGRID_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_HEADER
3/**
4 * @see Elm_Gen_Item_Class
5 */
6typedef Elm_Gen_Item_Class Elm_Gengrid_Item_Class;
7 3
8/** 4/**
9 * @see Elm_Gen_Item_Text_Get_Cb 5 * @see Elm_Gen_Item_Text_Get_Cb
diff --git a/src/lib/elm_gengrid_item.eo b/src/lib/elm_gengrid_item.eo
index 78189f98b..efc8c4ce9 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)
76 the function pointers and item_style.]] 76 the function pointers and item_style.]]
77 } 77 }
78 values { 78 values {
79 itc: const (Elm_Gengrid_Item_Class) *; [[Gengrid Item class for the given item]] 79 itc: const (Elm.Gengrid.Item.Class) *; [[Gengrid Item class for the given item]]
80 } 80 }
81 } 81 }
82 @property index { 82 @property index {
@@ -188,7 +188,7 @@ class Elm.Gengrid_Item(Elm.Widget_Item)
188 displayed. After changing the item class, elm_gengrid_item_update() is 188 displayed. After changing the item class, elm_gengrid_item_update() is
189 called on the item $it.]] 189 called on the item $it.]]
190 params { 190 params {
191 @in itc: const (Elm_Gengrid_Item_Class) *; [[The gengrid item class describing the function pointers and the item style.]] 191 @in itc: const (Elm.Gengrid.Item.Class) *; [[The gengrid item class describing the function pointers and the item style.]]
192 } 192 }
193 } 193 }
194 } 194 }
diff --git a/src/lib/elm_genlist.eo b/src/lib/elm_genlist.eo
index c695b719b..cad2689c8 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
341 ]] 341 ]]
342 return: Elm.Widget_Item *; 342 return: Elm.Widget_Item *;
343 params { 343 params {
344 @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the item.]] 344 @in itc: const(Elm.Genlist.Item.Class)*; [[The item class for the item.]]
345 @in data: const(void)*; [[The item data.]] 345 @in data: const(void)*; [[The item data.]]
346 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]] 346 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]]
347 @in before_it: Elm.Widget_Item *; [[The item to place this new one before.]] 347 @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
369 ]] 369 ]]
370 return: Elm.Widget_Item *; 370 return: Elm.Widget_Item *;
371 params { 371 params {
372 @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the item.]] 372 @in itc: const(Elm.Genlist.Item.Class)*; [[The item class for the item.]]
373 @in data: const(void)*; [[The item data.]] 373 @in data: const(void)*; [[The item data.]]
374 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]] 374 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]]
375 @in after_it: Elm.Widget_Item *; [[The item to place this new one after.]] 375 @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
438 ]] 438 ]]
439 return: Elm.Widget_Item *; 439 return: Elm.Widget_Item *;
440 params { 440 params {
441 @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the item.]] 441 @in itc: const(Elm.Genlist.Item.Class)*; [[The item class for the item.]]
442 @in data: const(void)*; [[The item data.]] 442 @in data: const(void)*; [[The item data.]]
443 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]] 443 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]]
444 @in type: Elm_Genlist_Item_Type; [[Item type.]] 444 @in type: Elm_Genlist_Item_Type; [[Item type.]]
@@ -460,7 +460,7 @@ class Elm.Genlist (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interfac
460 ]] 460 ]]
461 return: Elm.Widget_Item *; 461 return: Elm.Widget_Item *;
462 params { 462 params {
463 @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the item.]] 463 @in itc: const(Elm.Genlist.Item.Class)*; [[The item class for the item.]]
464 @in data: const(void)*; [[The item data.]] 464 @in data: const(void)*; [[The item data.]]
465 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]] 465 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]]
466 @in type: Elm_Genlist_Item_Type; [[Item type.]] 466 @in type: Elm_Genlist_Item_Type; [[Item type.]]
@@ -477,7 +477,7 @@ class Elm.Genlist (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interfac
477 ]] 477 ]]
478 return: Elm.Widget_Item *; 478 return: Elm.Widget_Item *;
479 params { 479 params {
480 @in itc: const(Elm_Genlist_Item_Class)*; [[The item class for the item.]] 480 @in itc: const(Elm.Genlist.Item.Class)*; [[The item class for the item.]]
481 @in data: const(void)*; [[The item data.]] 481 @in data: const(void)*; [[The item data.]]
482 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]] 482 @in parent: Elm.Widget_Item * @nullable; [[The parent item, or $null if none.]]
483 @in type: Elm_Genlist_Item_Type; [[Item type.]] 483 @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 b1d1d9f1b..094e1eba8 100644
--- a/src/lib/elm_genlist_common.h
+++ b/src/lib/elm_genlist_common.h
@@ -1,11 +1,5 @@
1#define ELM_GENLIST_ITEM_CLASS_VERSION ELM_GEN_ITEM_CLASS_VERSION 1#define ELM_GENLIST_ITEM_CLASS_VERSION ELM_GEN_ITEM_CLASS_VERSION
2#define ELM_GENLIST_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_HEADER 2#define ELM_GENLIST_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_HEADER
3
4/**
5 * @see Elm_Gen_Item_Class
6 */
7typedef Elm_Gen_Item_Class Elm_Genlist_Item_Class;
8
9/** 3/**
10 * @see Elm_Gen_Item_Text_Get_Cb 4 * @see Elm_Gen_Item_Text_Get_Cb
11 */ 5 */
diff --git a/src/lib/elm_genlist_item.eo b/src/lib/elm_genlist_item.eo
index 4773a1696..5a966c0af 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)
163 ]] 163 ]]
164 } 164 }
165 values { 165 values {
166 itc: const (Elm_Genlist_Item_Class) *; [[Genlist Item class for the given item.]] 166 itc: const (Elm.Genlist.Item.Class) *; [[Genlist Item class for the given item.]]
167 } 167 }
168 } 168 }
169 @property index { 169 @property index {
@@ -373,7 +373,7 @@ class Elm.Genlist_Item(Elm.Widget_Item)
373 @.update is called on the item $it. 373 @.update is called on the item $it.
374 ]] 374 ]]
375 params { 375 params {
376 @in itc: const (Elm_Genlist_Item_Class) *; [[The item class for the item.]] 376 @in itc: const (Elm.Genlist.Item.Class) *; [[The item class for the item.]]
377 } 377 }
378 } 378 }
379 decorate_mode_set { 379 decorate_mode_set {