summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-03 17:50:01 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-04 11:52:17 +0900
commit240cc9e5012a08b89711cfd5be102c0efdf20b6b (patch)
treec381d83ee4114d642478d08b02d9ec33b0e5c3ef /src/lib/edje
parent3e5cfb83c092652cf0306b7f4b1a0b230fdf21bf (diff)
edje: Move size_min/max and data to an interface
The new interface is: Efl.Canvas.Layout_Group I'm not fan of the name. Ref T5315
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/Edje_Eo.h1
-rw-r--r--src/lib/edje/Edje_Legacy.h1
-rw-r--r--src/lib/edje/edje_object.eo103
-rw-r--r--src/lib/edje/edje_smart.c1
-rw-r--r--src/lib/edje/edje_util.c6
-rw-r--r--src/lib/edje/efl_canvas_layout_group.eo105
6 files changed, 115 insertions, 102 deletions
diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h
index e59610b2bc..1d3d4e4cd1 100644
--- a/src/lib/edje/Edje_Eo.h
+++ b/src/lib/edje/Edje_Eo.h
@@ -2,6 +2,7 @@
2 2
3#include "efl_canvas_layout_calc.eo.h" 3#include "efl_canvas_layout_calc.eo.h"
4#include "efl_canvas_layout_signal.eo.h" 4#include "efl_canvas_layout_signal.eo.h"
5#include "efl_canvas_layout_group.eo.h"
5#include "edje_object.eo.h" 6#include "edje_object.eo.h"
6#include "edje_edit.eo.h" 7#include "edje_edit.eo.h"
7 8
diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h
index 0ffbc28135..d62c53ff97 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -2161,3 +2161,4 @@ EAPI void edje_object_part_text_insert(Edje_Object *obj, const char *part, const
2161 */ 2161 */
2162#include "edje_object.eo.legacy.h" 2162#include "edje_object.eo.legacy.h"
2163#include "edje_edit.eo.legacy.h" 2163#include "edje_edit.eo.legacy.h"
2164#include "efl_canvas_layout_group.eo.legacy.h"
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index 6f403ba0fe..90e82ba7be 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -4,7 +4,7 @@ import edje_types;
4 4
5class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part, 5class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part,
6 Efl.Observer, Efl.Ui.Base, Efl.Canvas.Layout_Calc, 6 Efl.Observer, Efl.Ui.Base, Efl.Canvas.Layout_Calc,
7 Efl.Canvas.Layout_Signal) 7 Efl.Canvas.Layout_Signal, Efl.Canvas.Layout_Group)
8{ 8{
9 [[Edje object class]] 9 [[Edje object class]]
10 legacy_prefix: edje_object; 10 legacy_prefix: edje_object;
@@ -141,104 +141,6 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part,
141 } 141 }
142 } 142 }
143 143
144 /* EDJE GROUP DATA APIS BEGIN ---------------------------------------- */
145 @property group_size_min {
146 get {
147 [[Gets the minimum size specified -- as an EDC property -- for a
148 given Edje object
149
150 This function retrieves the obj object's minimum size values,
151 as declared in its EDC group definition. For instance, for an
152 Edje object of minimum size 100x100 pixels:
153 collections {
154 group {
155 name: "a_group";
156 min: 100 100;
157 }
158 }
159
160 Note: If the $min EDC property was not declared for this object,
161 this call will return 0x0.
162
163 Note: On failure, this function also return 0x0.
164
165 See also @.group_size_max.
166 ]]
167 legacy: edje_object_size_min_get;
168 }
169 values {
170 minw: int; [[Pointer to a variable where to store the minimum width]]
171 minh: int; [[Pointer to a variable where to store the minimum height]]
172 }
173 }
174 @property group_size_max {
175 get {
176 [[Gets the maximum size specified -- as an EDC property -- for a
177 given Edje object
178
179 This function retrieves the object's maximum size values,
180 as declared in its EDC group definition. For instance, for an
181 Edje object of maximum size 100x100 pixels:
182 collections {
183 group {
184 name: "a_group";
185 max: 100 100;
186 }
187 }
188
189 Note: If the $max EDC property was not declared for the object,
190 this call will return the maximum size a given Edje object may
191 have, for each axis.
192
193 Note: On failure, this function will return 0x0.
194
195 See also @.group_size_min.
196 ]]
197 legacy: edje_object_size_max_get;
198 }
199 values {
200 maxw: int; [[The maximum width]]
201 maxh: int; [[The maximum height]]
202 }
203 }
204 @property group_data {
205 get {
206 [[Retrives an EDC data field's value from a given Edje object's group.
207
208 This function fetches an EDC data field's value, which is declared
209 on the objects building EDC file, under its group. EDC data blocks
210 are most commonly used to pass arbitrary parameters from an
211 application's theme to its code.
212
213 EDC data fields always hold strings as values, hence the return
214 type of this function. Check the complete "syntax reference"
215 for EDC files.
216
217 This is how a data item is defined in EDC:
218 collections {
219 group {
220 name: "a_group";
221 data {
222 item: "key1" "value1";
223 item: "key2" "value2";
224 }
225 }
226 }
227
228 Warning: Do not confuse this call with edje_file_data_get(), which
229 queries for a global EDC data field on an EDC declaration file.
230 ]]
231 legacy: edje_object_data_get;
232 }
233 keys {
234 key: string; [[The data field's key string]]
235 }
236 values {
237 val: string; [[The data's value string.]]
238 }
239 }
240 /* EDJE GROUP DATA APIS END ------------------------------------------ */
241
242 /* CLASS APIS BEGIN -------------------------------------------------- */ 144 /* CLASS APIS BEGIN -------------------------------------------------- */
243 @property global_color_class @class { 145 @property global_color_class @class {
244 set { 146 set {
@@ -913,6 +815,9 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part,
913 Efl.Canvas.Layout_Calc.calc_freeze; 815 Efl.Canvas.Layout_Calc.calc_freeze;
914 Efl.Canvas.Layout_Calc.calc_thaw; 816 Efl.Canvas.Layout_Calc.calc_thaw;
915 Efl.Canvas.Layout_Calc.calc_force; 817 Efl.Canvas.Layout_Calc.calc_force;
818 Efl.Canvas.Layout_Group.group_size_min { get; }
819 Efl.Canvas.Layout_Group.group_size_max { get; }
820 Efl.Canvas.Layout_Group.group_data { get; }
916 Efl.Canvas.Layout_Signal.message_send; 821 Efl.Canvas.Layout_Signal.message_send;
917 Efl.Canvas.Layout_Signal.signal_callback_add; 822 Efl.Canvas.Layout_Signal.signal_callback_add;
918 Efl.Canvas.Layout_Signal.signal_callback_del; 823 Efl.Canvas.Layout_Signal.signal_callback_del;
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index e33482ad3c..20ebb0a050 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -563,3 +563,4 @@ _edje_object_efl_observer_update(Eo *obj EINA_UNUSED, Edje *ed, Efl_Object *obs,
563#include "edje_object.eo.c" 563#include "edje_object.eo.c"
564#include "efl_canvas_layout_calc.eo.c" 564#include "efl_canvas_layout_calc.eo.c"
565#include "efl_canvas_layout_signal.eo.c" 565#include "efl_canvas_layout_signal.eo.c"
566#include "efl_canvas_layout_group.eo.c"
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 8b75432981..74d9dc4d9d 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -453,7 +453,7 @@ _edje_object_efl_ui_base_mirrored_set(Eo *obj, Edje *ed, Eina_Bool rtl)
453} 453}
454 454
455EOLIAN const char * 455EOLIAN const char *
456_edje_object_group_data_get(Eo *obj EINA_UNUSED, Edje *ed, const char *key) 456_edje_object_efl_canvas_layout_group_group_data_get(Eo *obj EINA_UNUSED, Edje *ed, const char *key)
457{ 457{
458 if (!key) return NULL; 458 if (!key) return NULL;
459 if (!ed->collection) return NULL; 459 if (!ed->collection) return NULL;
@@ -3097,7 +3097,7 @@ _edje_object_efl_part_part(Eo *obj, Edje *ed, const char *part)
3097} 3097}
3098 3098
3099EOLIAN void 3099EOLIAN void
3100_edje_object_group_size_min_get(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *minw, Evas_Coord *minh) 3100_edje_object_efl_canvas_layout_group_group_size_min_get(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *minw, Evas_Coord *minh)
3101{ 3101{
3102 if ((!ed) || (!ed->collection)) 3102 if ((!ed) || (!ed->collection))
3103 { 3103 {
@@ -3110,7 +3110,7 @@ _edje_object_group_size_min_get(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *minw,
3110} 3110}
3111 3111
3112EOLIAN void 3112EOLIAN void
3113_edje_object_group_size_max_get(Eo *obj EINA_UNUSED, Edje *ed EINA_UNUSED, Evas_Coord *maxw, Evas_Coord *maxh) 3113_edje_object_efl_canvas_layout_group_group_size_max_get(Eo *obj EINA_UNUSED, Edje *ed EINA_UNUSED, Evas_Coord *maxw, Evas_Coord *maxh)
3114{ 3114{
3115 if ((!ed) || (!ed->collection)) 3115 if ((!ed) || (!ed->collection))
3116 { 3116 {
diff --git a/src/lib/edje/efl_canvas_layout_group.eo b/src/lib/edje/efl_canvas_layout_group.eo
new file mode 100644
index 0000000000..44714bbc8e
--- /dev/null
+++ b/src/lib/edje/efl_canvas_layout_group.eo
@@ -0,0 +1,105 @@
1interface Efl.Canvas.Layout_Group
2{
3 [[APIs representing static data from a group in an edje file.
4
5 @since 1.21
6 ]]
7 methods {
8 @property group_size_min {
9 get {
10 [[Gets the minimum size specified -- as an EDC property -- for a
11 given Edje object
12
13 This function retrieves the obj object's minimum size values, as
14 declared in its EDC group definition. For instance, for an Edje
15 object of minimum size 100x100 pixels:
16 collections {
17 group {
18 name: "a_group";
19 min: 100 100;
20 }
21 }
22
23 Note: If the $min EDC property was not declared for this object,
24 this call will return 0x0.
25
26 Note: On failure, this function also return 0x0.
27
28 See also @.group_size_max.
29 ]]
30 legacy: edje_object_size_min_get;
31 }
32 values {
33 minw: int; [[Pointer to a variable where to store the minimum width]]
34 minh: int; [[Pointer to a variable where to store the minimum height]]
35 }
36 }
37 @property group_size_max {
38 get {
39 [[Gets the maximum size specified -- as an EDC property -- for a
40 given Edje object
41
42 This function retrieves the object's maximum size values, as
43 declared in its EDC group definition. For instance, for an Edje
44 object of maximum size 100x100 pixels:
45 collections {
46 group {
47 name: "a_group";
48 max: 100 100;
49 }
50 }
51
52 Note: If the $max EDC property was not declared for the object,
53 this call will return the maximum size a given Edje object may
54 have, for each axis.
55
56 Note: On failure, this function will return 0x0.
57
58 See also @.group_size_min.
59 ]]
60 legacy: edje_object_size_max_get;
61 }
62 values {
63 maxw: int; [[The maximum width]]
64 maxh: int; [[The maximum height]]
65 }
66 }
67 @property group_data {
68 get {
69 [[Retrives an EDC data field's value from a given Edje object's group.
70
71 This function fetches an EDC data field's value, which is declared
72 on the objects building EDC file, under its group. EDC data blocks
73 are most commonly used to pass arbitrary parameters from an
74 application's theme to its code.
75
76 EDC data fields always hold strings as values, hence the return
77 type of this function. Check the complete "syntax reference" for
78 EDC files.
79
80 This is how a data item is defined in EDC:
81 collections {
82 group {
83 name: "a_group";
84 data {
85 item: "key1" "value1";
86 item: "key2" "value2";
87 }
88 }
89 }
90
91 Warning: Do not confuse this call with edje_file_data_get(), which
92 queries for a global EDC data field on an EDC declaration file.
93 ]]
94 legacy: edje_object_data_get;
95 }
96 keys {
97 key: string; [[The data field's key string]]
98 }
99 values {
100 val: string; [[The data's value string.]]
101 }
102 }
103 }
104}
105