aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
parentelm: Remove custom layout signal APIs (diff)
downloadefl-240cc9e5012a08b89711cfd5be102c0efdf20b6b.tar.gz
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 https://phab.enlightenment.org/T5315
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Edje.am1
-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
-rw-r--r--src/lib/elementary/efl_ui_image.c4
-rw-r--r--src/lib/elementary/efl_ui_image.eo10
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.c4
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.eo5
11 files changed, 129 insertions, 112 deletions
diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index 15c3f5cdfa..c1fb5236f4 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -4,6 +4,7 @@
edje_eolian_files = \
lib/edje/efl_canvas_layout_calc.eo \
lib/edje/efl_canvas_layout_signal.eo \
+ lib/edje/efl_canvas_layout_group.eo \
lib/edje/edje_object.eo \
lib/edje/efl_canvas_layout_internal.eo \
lib/edje/efl_canvas_layout_internal_box.eo \
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 @@
#include "efl_canvas_layout_calc.eo.h"
#include "efl_canvas_layout_signal.eo.h"
+#include "efl_canvas_layout_group.eo.h"
#include "edje_object.eo.h"
#include "edje_edit.eo.h"
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
*/
#include "edje_object.eo.legacy.h"
#include "edje_edit.eo.legacy.h"
+#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;
class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part,
Efl.Observer, Efl.Ui.Base, Efl.Canvas.Layout_Calc,
- Efl.Canvas.Layout_Signal)
+ Efl.Canvas.Layout_Signal, Efl.Canvas.Layout_Group)
{
[[Edje object class]]
legacy_prefix: edje_object;
@@ -141,104 +141,6 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part,
}
}
- /* EDJE GROUP DATA APIS BEGIN ---------------------------------------- */
- @property group_size_min {
- get {
- [[Gets the minimum size specified -- as an EDC property -- for a
- given Edje object
-
- This function retrieves the obj object's minimum size values,
- as declared in its EDC group definition. For instance, for an
- Edje object of minimum size 100x100 pixels:
- collections {
- group {
- name: "a_group";
- min: 100 100;
- }
- }
-
- Note: If the $min EDC property was not declared for this object,
- this call will return 0x0.
-
- Note: On failure, this function also return 0x0.
-
- See also @.group_size_max.
- ]]
- legacy: edje_object_size_min_get;
- }
- values {
- minw: int; [[Pointer to a variable where to store the minimum width]]
- minh: int; [[Pointer to a variable where to store the minimum height]]
- }
- }
- @property group_size_max {
- get {
- [[Gets the maximum size specified -- as an EDC property -- for a
- given Edje object
-
- This function retrieves the object's maximum size values,
- as declared in its EDC group definition. For instance, for an
- Edje object of maximum size 100x100 pixels:
- collections {
- group {
- name: "a_group";
- max: 100 100;
- }
- }
-
- Note: If the $max EDC property was not declared for the object,
- this call will return the maximum size a given Edje object may
- have, for each axis.
-
- Note: On failure, this function will return 0x0.
-
- See also @.group_size_min.
- ]]
- legacy: edje_object_size_max_get;
- }
- values {
- maxw: int; [[The maximum width]]
- maxh: int; [[The maximum height]]
- }
- }
- @property group_data {
- get {
- [[Retrives an EDC data field's value from a given Edje object's group.
-
- This function fetches an EDC data field's value, which is declared
- on the objects building EDC file, under its group. EDC data blocks
- are most commonly used to pass arbitrary parameters from an
- application's theme to its code.
-
- EDC data fields always hold strings as values, hence the return
- type of this function. Check the complete "syntax reference"
- for EDC files.
-
- This is how a data item is defined in EDC:
- collections {
- group {
- name: "a_group";
- data {
- item: "key1" "value1";
- item: "key2" "value2";
- }
- }
- }
-
- Warning: Do not confuse this call with edje_file_data_get(), which
- queries for a global EDC data field on an EDC declaration file.
- ]]
- legacy: edje_object_data_get;
- }
- keys {
- key: string; [[The data field's key string]]
- }
- values {
- val: string; [[The data's value string.]]
- }
- }
- /* EDJE GROUP DATA APIS END ------------------------------------------ */
-
/* CLASS APIS BEGIN -------------------------------------------------- */
@property global_color_class @class {
set {
@@ -913,6 +815,9 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part,
Efl.Canvas.Layout_Calc.calc_freeze;
Efl.Canvas.Layout_Calc.calc_thaw;
Efl.Canvas.Layout_Calc.calc_force;
+ Efl.Canvas.Layout_Group.group_size_min { get; }
+ Efl.Canvas.Layout_Group.group_size_max { get; }
+ Efl.Canvas.Layout_Group.group_data { get; }
Efl.Canvas.Layout_Signal.message_send;
Efl.Canvas.Layout_Signal.signal_callback_add;
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,
#include "edje_object.eo.c"
#include "efl_canvas_layout_calc.eo.c"
#include "efl_canvas_layout_signal.eo.c"
+#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)
}
EOLIAN const char *
-_edje_object_group_data_get(Eo *obj EINA_UNUSED, Edje *ed, const char *key)
+_edje_object_efl_canvas_layout_group_group_data_get(Eo *obj EINA_UNUSED, Edje *ed, const char *key)
{
if (!key) return NULL;
if (!ed->collection) return NULL;
@@ -3097,7 +3097,7 @@ _edje_object_efl_part_part(Eo *obj, Edje *ed, const char *part)
}
EOLIAN void
-_edje_object_group_size_min_get(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *minw, Evas_Coord *minh)
+_edje_object_efl_canvas_layout_group_group_size_min_get(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *minw, Evas_Coord *minh)
{
if ((!ed) || (!ed->collection))
{
@@ -3110,7 +3110,7 @@ _edje_object_group_size_min_get(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *minw,
}
EOLIAN void
-_edje_object_group_size_max_get(Eo *obj EINA_UNUSED, Edje *ed EINA_UNUSED, Evas_Coord *maxw, Evas_Coord *maxh)
+_edje_object_efl_canvas_layout_group_group_size_max_get(Eo *obj EINA_UNUSED, Edje *ed EINA_UNUSED, Evas_Coord *maxw, Evas_Coord *maxh)
{
if ((!ed) || (!ed->collection))
{
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 @@
+interface Efl.Canvas.Layout_Group
+{
+ [[APIs representing static data from a group in an edje file.
+
+ @since 1.21
+ ]]
+ methods {
+ @property group_size_min {
+ get {
+ [[Gets the minimum size specified -- as an EDC property -- for a
+ given Edje object
+
+ This function retrieves the obj object's minimum size values, as
+ declared in its EDC group definition. For instance, for an Edje
+ object of minimum size 100x100 pixels:
+ collections {
+ group {
+ name: "a_group";
+ min: 100 100;
+ }
+ }
+
+ Note: If the $min EDC property was not declared for this object,
+ this call will return 0x0.
+
+ Note: On failure, this function also return 0x0.
+
+ See also @.group_size_max.
+ ]]
+ legacy: edje_object_size_min_get;
+ }
+ values {
+ minw: int; [[Pointer to a variable where to store the minimum width]]
+ minh: int; [[Pointer to a variable where to store the minimum height]]
+ }
+ }
+ @property group_size_max {
+ get {
+ [[Gets the maximum size specified -- as an EDC property -- for a
+ given Edje object
+
+ This function retrieves the object's maximum size values, as
+ declared in its EDC group definition. For instance, for an Edje
+ object of maximum size 100x100 pixels:
+ collections {
+ group {
+ name: "a_group";
+ max: 100 100;
+ }
+ }
+
+ Note: If the $max EDC property was not declared for the object,
+ this call will return the maximum size a given Edje object may
+ have, for each axis.
+
+ Note: On failure, this function will return 0x0.
+
+ See also @.group_size_min.
+ ]]
+ legacy: edje_object_size_max_get;
+ }
+ values {
+ maxw: int; [[The maximum width]]
+ maxh: int; [[The maximum height]]
+ }
+ }
+ @property group_data {
+ get {
+ [[Retrives an EDC data field's value from a given Edje object's group.
+
+ This function fetches an EDC data field's value, which is declared
+ on the objects building EDC file, under its group. EDC data blocks
+ are most commonly used to pass arbitrary parameters from an
+ application's theme to its code.
+
+ EDC data fields always hold strings as values, hence the return
+ type of this function. Check the complete "syntax reference" for
+ EDC files.
+
+ This is how a data item is defined in EDC:
+ collections {
+ group {
+ name: "a_group";
+ data {
+ item: "key1" "value1";
+ item: "key2" "value2";
+ }
+ }
+ }
+
+ Warning: Do not confuse this call with edje_file_data_get(), which
+ queries for a global EDC data field on an EDC declaration file.
+ ]]
+ legacy: edje_object_data_get;
+ }
+ keys {
+ key: string; [[The data field's key string]]
+ }
+ values {
+ val: string; [[The data's value string.]]
+ }
+ }
+ }
+}
+
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index c779ff17dd..320b782d1c 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -1175,7 +1175,7 @@ _efl_ui_image_efl_canvas_layout_signal_signal_emit(Eo *obj EINA_UNUSED, Efl_Ui_I
}
EOLIAN static void
-_efl_ui_image_edje_object_group_size_min_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, int *w, int *h)
+_efl_ui_image_efl_canvas_layout_group_group_size_min_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, int *w, int *h)
{
if (sd->edje)
edje_object_size_min_get(sd->img, w, h);
@@ -1184,7 +1184,7 @@ _efl_ui_image_edje_object_group_size_min_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_D
}
EOLIAN static void
-_efl_ui_image_edje_object_group_size_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, int *w, int *h)
+_efl_ui_image_efl_canvas_layout_group_group_size_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, int *w, int *h)
{
if (sd->edje)
edje_object_size_max_get(sd->img, w, h);
diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo
index 973c8c932b..25c35db592 100644
--- a/src/lib/elementary/efl_ui_image.eo
+++ b/src/lib/elementary/efl_ui_image.eo
@@ -45,8 +45,9 @@ struct Efl.Ui.Image.Error
class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable,
Efl.File, Efl.Image, Efl.Image.Load, Efl.Player, Efl.Gfx.View,
Elm.Interface.Atspi_Image, Elm.Interface.Atspi_Widget_Action,
- Edje.Object, Efl.Orientation, Efl.Flipable,
- Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Canvas.Layout_Calc)
+ Efl.Orientation, Efl.Flipable,
+ Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Canvas.Layout_Calc,
+ Efl.Canvas.Layout_Group, Efl.Canvas.Layout_Signal)
{
[[ Efl UI image class]]
event_prefix: efl_ui_image;
@@ -136,8 +137,9 @@ class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable,
Efl.Player.playable { get; }
Efl.Player.play { get; set; }
Efl.Canvas.Layout_Signal.signal_emit;
- Edje.Object.group_size_min { get; }
- Edje.Object.group_size_max { get; }
+ Efl.Canvas.Layout_Group.group_size_min { get; }
+ Efl.Canvas.Layout_Group.group_size_max { get; }
+ //Efl.Canvas.Layout_Group.group_data { get; }
Efl.Canvas.Layout_Calc.calc_size_min;
Efl.Canvas.Layout_Calc.calc_force;
Efl.Canvas.Object.clip { set; }
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c
index 6bc07a9a90..6f021da1a4 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -1571,7 +1571,7 @@ _efl_ui_image_zoomable_efl_image_image_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Imag
}
EOLIAN static void
-_efl_ui_image_zoomable_edje_object_group_size_min_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd, int *w, int *h)
+_efl_ui_image_zoomable_efl_canvas_layout_group_group_size_min_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd, int *w, int *h)
{
if (sd->edje)
edje_object_size_min_get(sd->edje, w, h);
@@ -1580,7 +1580,7 @@ _efl_ui_image_zoomable_edje_object_group_size_min_get(Eo *obj EINA_UNUSED, Efl_U
}
EOLIAN static void
-_efl_ui_image_zoomable_edje_object_group_size_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd, int *w, int *h)
+_efl_ui_image_zoomable_efl_canvas_layout_group_group_size_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd, int *w, int *h)
{
if (sd->edje)
edje_object_size_max_get(sd->edje, w, h);
diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo b/src/lib/elementary/efl_ui_image_zoomable.eo
index 8eecca7dac..e23824b268 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.eo
+++ b/src/lib/elementary/efl_ui_image_zoomable.eo
@@ -68,8 +68,9 @@ class Efl.Ui.Image.Zoomable (Elm.Widget, Efl.Ui.Image, Efl.Ui.Zoom,
Efl.File.file { get; set; }
Efl.Orientation.orientation { get; set; }
Efl.Flipable.flip { get; set; }
- Edje.Object.group_size_min { get; }
- Edje.Object.group_size_max { get; }
+ Efl.Canvas.Layout_Group.group_size_min { get; }
+ Efl.Canvas.Layout_Group.group_size_max { get; }
+ //Efl.Canvas.Layout_Group.group_data { get; }
}
events {
press; [[Called when photocam got pressed]]