summaryrefslogtreecommitdiff
path: root/src/lib/efl
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-05-24 12:30:31 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-24 12:30:32 -0400
commit38d7d33354ce4d13d70f707498c267b120bf2e5a (patch)
tree4b6d9ad3f3e3089b3999d5e10a759fe7f5c73206 /src/lib/efl
parent00851ea53b7d87c2b5be244d4fba0af9253f8039 (diff)
Rename Efl.Ui.Direction -> Efl.Ui.Layout_Orientation
Summary: This clarifies a bit the whole Orientation vs. Direction confusion, at the expense of longer names (Image_Orientation vs. Layout_Orientation). Also, the interfaces are now adjectives (Orientable) and the enums have long names (*_Orientation). Pretty big patch, but no functional changes. Relates to T7863 Test Plan: Everything builds and passes tests. Elementary_tests show same behavior, including the "inverted" widgets, which are the only parts which received a bit of code changes. Proof: https://travis-ci.org/Enlightenment/efl/builds/536277282 Reviewers: zmike, bu5hm4n, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8946
Diffstat (limited to '')
-rw-r--r--src/lib/efl/Efl.h4
-rw-r--r--src/lib/efl/interfaces/efl_gfx_image_orientable.eo4
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c2
-rw-r--r--src/lib/efl/interfaces/efl_ui_direction.eo48
-rw-r--r--src/lib/efl/interfaces/efl_ui_direction_readonly.c17
-rw-r--r--src/lib/efl/interfaces/efl_ui_direction_readonly.eo6
-rw-r--r--src/lib/efl/interfaces/efl_ui_layout_orientable.eo52
-rw-r--r--src/lib/efl/interfaces/efl_ui_layout_orientable_readonly.c17
-rw-r--r--src/lib/efl/interfaces/efl_ui_layout_orientable_readonly.eo6
-rw-r--r--src/lib/efl/interfaces/meson.build6
10 files changed, 83 insertions, 79 deletions
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 2b5f62a04d..aa88196720 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -97,8 +97,8 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
97#include "interfaces/efl_text.eo.h" 97#include "interfaces/efl_text.eo.h"
98#include "interfaces/efl_text_types.eot.h" 98#include "interfaces/efl_text_types.eot.h"
99#include "interfaces/efl_ui_i18n.eo.h" 99#include "interfaces/efl_ui_i18n.eo.h"
100#include "interfaces/efl_ui_direction.eo.h" 100#include "interfaces/efl_ui_layout_orientable.eo.h"
101#include "interfaces/efl_ui_direction_readonly.eo.h" 101#include "interfaces/efl_ui_layout_orientable_readonly.eo.h"
102#include "interfaces/efl_ui_drag.eo.h" 102#include "interfaces/efl_ui_drag.eo.h"
103#include "interfaces/efl_ui_range_display.eo.h" 103#include "interfaces/efl_ui_range_display.eo.h"
104#include "interfaces/efl_ui_range_interactive.eo.h" 104#include "interfaces/efl_ui_range_interactive.eo.h"
diff --git a/src/lib/efl/interfaces/efl_gfx_image_orientable.eo b/src/lib/efl/interfaces/efl_gfx_image_orientable.eo
index 7530b8568c..2070feb737 100644
--- a/src/lib/efl/interfaces/efl_gfx_image_orientable.eo
+++ b/src/lib/efl/interfaces/efl_gfx_image_orientable.eo
@@ -1,4 +1,4 @@
1parse efl_ui_direction; 1parse efl_ui_layout_orientable;
2 2
3enum @beta Efl.Gfx.Image_Orientation 3enum @beta Efl.Gfx.Image_Orientation
4{ 4{
@@ -10,7 +10,7 @@ enum @beta Efl.Gfx.Image_Orientation
10 its roof pointing to the right if the $right orientation is used). 10 its roof pointing to the right if the $right orientation is used).
11 Flipping values ($flip_horizontal and $flip_vertical) can be additionaly added 11 Flipping values ($flip_horizontal and $flip_vertical) can be additionaly added
12 to produce a mirroring in each axis. 12 to produce a mirroring in each axis.
13 Not to be confused with @Efl.Ui.Dir which is meant for widgets, rather 13 Not to be confused with @Efl.Ui.Layout_Orientation which is meant for widgets, rather
14 than images and canvases. This enum is used to rotate images, videos and 14 than images and canvases. This enum is used to rotate images, videos and
15 the like. 15 the like.
16 ]] 16 ]]
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index 57113a52af..0817211ffb 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -61,7 +61,7 @@
61#include "interfaces/efl_model.eo.c" 61#include "interfaces/efl_model.eo.c"
62#include "interfaces/efl_interpolator.eo.c" 62#include "interfaces/efl_interpolator.eo.c"
63#include "interfaces/efl_ui_i18n.eo.c" 63#include "interfaces/efl_ui_i18n.eo.c"
64#include "interfaces/efl_ui_direction.eo.c" 64#include "interfaces/efl_ui_layout_orientable.eo.c"
65#include "interfaces/efl_ui_drag.eo.c" 65#include "interfaces/efl_ui_drag.eo.c"
66#include "interfaces/efl_ui_range_display.eo.c" 66#include "interfaces/efl_ui_range_display.eo.c"
67#include "interfaces/efl_ui_range_interactive.eo.c" 67#include "interfaces/efl_ui_range_interactive.eo.c"
diff --git a/src/lib/efl/interfaces/efl_ui_direction.eo b/src/lib/efl/interfaces/efl_ui_direction.eo
deleted file mode 100644
index ff6e831269..0000000000
--- a/src/lib/efl/interfaces/efl_ui_direction.eo
+++ /dev/null
@@ -1,48 +0,0 @@
1// FIXME: Documentation lacks proper references due to cyclic imports.
2// FIXME: What about AnyRTL? And other strange directions?
3
4parse efl_gfx_image_orientable;
5
6enum @beta Efl.Ui.Dir
7{
8 [[Direction for UI objects and layouts.
9
10 Not to be confused with @Efl.Gfx.Image_Orientation which is for images and canvases. This
11 enum is used to define how widgets should expand and orient themselves,
12 not to rotate images.
13
14 See also @Efl.Ui.Direction.
15 ]]
16 default = 0,[[Default direction. Each widget may have a different default.]]
17 horizontal, [[Horizontal direction, along the X axis. Usually left-to-right,
18 but may be inverted to right-to-left if mirroring is on.]]
19 vertical, [[Vertical direction, along the Y axis. Usually downwards.]]
20 ltr, [[Horizontal, left-to-right direction.]]
21 rtl, [[Horizontal, right-to-left direction.]]
22 down, [[Vertical, top-to-bottom direction.]]
23 up, [[Vertical, bottom-to-top direction.]]
24 right = Efl.Ui.Dir.ltr, [[Right is an alias for LTR.]]
25 left = Efl.Ui.Dir.rtl, [[Left is an alias for RTL.]]
26}
27
28interface @beta Efl.Ui.Direction
29{
30 [[EFL UI object direction interface]]
31 methods {
32 @property direction {
33 [[Control the direction of a given widget.
34
35 Use this function to change how your widget is to be disposed:
36 vertically or horizontally or inverted vertically or inverted
37 horizontally.
38
39 Mirroring as defined in @Efl.Ui.I18n can invert the $horizontal
40 direction: it is $ltr by default, but becomes $rtl if the object
41 is mirrored.
42 ]]
43 values {
44 dir: Efl.Ui.Dir; [[Direction of the widget.]]
45 }
46 }
47 }
48}
diff --git a/src/lib/efl/interfaces/efl_ui_direction_readonly.c b/src/lib/efl/interfaces/efl_ui_direction_readonly.c
deleted file mode 100644
index e972ab2b02..0000000000
--- a/src/lib/efl/interfaces/efl_ui_direction_readonly.c
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Efl.h>
6
7typedef struct {
8
9} Efl_Ui_Direction_Readonly_Data;
10
11EOLIAN static void
12_efl_ui_direction_readonly_efl_ui_direction_direction_set(Eo *obj EINA_UNUSED, Efl_Ui_Direction_Readonly_Data *pd EINA_UNUSED, Efl_Ui_Dir dir EINA_UNUSED)
13{
14 EINA_LOG_ERR("This object does not allow setting of a direction");
15}
16
17#include "interfaces/efl_ui_direction_readonly.eo.c"
diff --git a/src/lib/efl/interfaces/efl_ui_direction_readonly.eo b/src/lib/efl/interfaces/efl_ui_direction_readonly.eo
deleted file mode 100644
index aaba2d45c5..0000000000
--- a/src/lib/efl/interfaces/efl_ui_direction_readonly.eo
+++ /dev/null
@@ -1,6 +0,0 @@
1mixin @beta Efl.Ui.Direction_Readonly extends Efl.Ui.Direction
2{
3 implements {
4 Efl.Ui.Direction.direction { set; [[This will always print and error that this is a readonly object]]}
5 }
6}
diff --git a/src/lib/efl/interfaces/efl_ui_layout_orientable.eo b/src/lib/efl/interfaces/efl_ui_layout_orientable.eo
new file mode 100644
index 0000000000..98142646e9
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_ui_layout_orientable.eo
@@ -0,0 +1,52 @@
1parse efl_gfx_image_orientable;
2
3enum @beta Efl.Ui.Layout_Orientation
4{
5 [[Orientation for UI objects and layouts that can have multiple configurations.
6
7 Select among $horizontal or $vertical orientations (or use $default to let the
8 object decide). Additionally, $inverted can be added to reverse the direction
9 along the selected axis.
10
11 Not to be confused with @Efl.Gfx.Image_Orientation which is for images and canvases. This
12 enum is used to define how widgets should expand and orient themselves,
13 not to rotate images.
14
15 See also @Efl.Ui.Layout_Orientable.
16 ]]
17 default = 0, [[Default direction. Each widget may have a different default.]]
18 horizontal = 1, [[Horizontal direction, along the X axis. Usually left-to-right,
19 but can be inverted.]]
20 vertical = 2, [[Vertical direction, along the Y axis. Usually downwards but
21 can be inverted.]]
22 axis_bitmask = 3, [[This bitmask can be used to isolate the axis value from the rest of bits.]]
23 inverted = 4 [[Add this value to make the object invert its default direction
24 along the selected axis.]]
25}
26
27interface @beta Efl.Ui.Layout_Orientable
28{
29 [[Interface for UI objects which can have more than one orientation.
30
31 For example, sliders, which can be horizontal or vertical, or container
32 boxes, which can arrange their elements in a horizontal or vertical fashion.
33 ]]
34 c_prefix: efl_ui_layout;
35 methods {
36 @property orientation {
37 [[Control the direction of a given widget.
38
39 Use this function to change how your widget is to be disposed:
40 vertically or horizontally or inverted vertically or inverted
41 horizontally.
42
43 Mirroring as defined in @Efl.Ui.I18n can invert the $horizontal
44 direction: it is $ltr by default, but becomes $rtl if the object
45 is mirrored.
46 ]]
47 values {
48 dir: Efl.Ui.Layout_Orientation; [[Direction of the widget.]]
49 }
50 }
51 }
52}
diff --git a/src/lib/efl/interfaces/efl_ui_layout_orientable_readonly.c b/src/lib/efl/interfaces/efl_ui_layout_orientable_readonly.c
new file mode 100644
index 0000000000..eca76dce3d
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_ui_layout_orientable_readonly.c
@@ -0,0 +1,17 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Efl.h>
6
7typedef struct {
8
9} Efl_Ui_Layout_Orientable_Readonly_Data;
10
11EOLIAN static void
12_efl_ui_layout_orientable_readonly_efl_ui_layout_orientable_orientation_set(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Orientable_Readonly_Data *pd EINA_UNUSED, Efl_Ui_Layout_Orientation dir EINA_UNUSED)
13{
14 EINA_LOG_ERR("This object does not allow setting an orientation");
15}
16
17#include "interfaces/efl_ui_layout_orientable_readonly.eo.c"
diff --git a/src/lib/efl/interfaces/efl_ui_layout_orientable_readonly.eo b/src/lib/efl/interfaces/efl_ui_layout_orientable_readonly.eo
new file mode 100644
index 0000000000..8131181025
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_ui_layout_orientable_readonly.eo
@@ -0,0 +1,6 @@
1mixin @beta Efl.Ui.Layout_Orientable_Readonly extends Efl.Ui.Layout_Orientable
2{
3 implements {
4 Efl.Ui.Layout_Orientable.orientation { set; [[This will always print an error saying that this is a readonly object.]] }
5 }
6}
diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build
index 705dbcf444..e3baa55571 100644
--- a/src/lib/efl/interfaces/meson.build
+++ b/src/lib/efl/interfaces/meson.build
@@ -73,8 +73,8 @@ pub_eo_files = [
73 'efl_pack_table.eo', 73 'efl_pack_table.eo',
74 'efl_gfx_arrangement.eo', 74 'efl_gfx_arrangement.eo',
75 'efl_ui_i18n.eo', 75 'efl_ui_i18n.eo',
76 'efl_ui_direction.eo', 76 'efl_ui_layout_orientable.eo',
77 'efl_ui_direction_readonly.eo', 77 'efl_ui_layout_orientable_readonly.eo',
78 'efl_ui_drag.eo', 78 'efl_ui_drag.eo',
79 'efl_ui_range_display.eo', 79 'efl_ui_range_display.eo',
80 'efl_ui_range_interactive.eo', 80 'efl_ui_range_interactive.eo',
@@ -167,7 +167,7 @@ efl_src += files([
167 'efl_observer.c', 167 'efl_observer.c',
168 'efl_file.c', 168 'efl_file.c',
169 'efl_ui_format.c', 169 'efl_ui_format.c',
170 'efl_ui_direction_readonly.c', 170 'efl_ui_layout_orientable_readonly.c',
171 'efl_text_markup_util.c', 171 'efl_text_markup_util.c',
172]) 172])
173 173