tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=84e06f7234335836d175cb1583aa91f183b98803

commit 84e06f7234335836d175cb1583aa91f183b98803
Author: Tom Hacohen <t...@stosb.com>
Date:   Wed Aug 7 14:54:45 2019 +0100

    Evas: migrate Evas_BiDi_Direction -> Efl_Text_Bidirectional_Type.
---
 src/lib/evas/Evas_Common.h                  | 14 ++++++--------
 src/lib/evas/canvas/evas_object_textblock.c |  6 +++---
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index bd6102d702..1ae09bf259 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -368,14 +368,12 @@ typedef enum _Evas_Aspect_Control
    EVAS_ASPECT_CONTROL_BOTH = 4 /**< Use all horizontal @b and vertical 
container spaces to place an object (never growing it out of those bounds), 
using the given aspect */
 } Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used 
for evas_object_size_hint_aspect_set() */
 
-typedef enum _Evas_BiDi_Direction
-{
-   EVAS_BIDI_DIRECTION_NATURAL,
-   EVAS_BIDI_DIRECTION_NEUTRAL = EVAS_BIDI_DIRECTION_NATURAL,
-   EVAS_BIDI_DIRECTION_LTR,
-   EVAS_BIDI_DIRECTION_RTL,
-   EVAS_BIDI_DIRECTION_INHERIT
-} Evas_BiDi_Direction;
+typedef Efl_Text_Bidirectional_Type Evas_BiDi_Direction;
+#define EVAS_BIDI_DIRECTION_NEUTRAL EFL_TEXT_BIDIRECTIONAL_TYPE_NEUTRAL
+#define EVAS_BIDI_DIRECTION_NATURAL EFL_TEXT_BIDIRECTIONAL_TYPE_NATURAL
+#define EVAS_BIDI_DIRECTION_LTR     EFL_TEXT_BIDIRECTIONAL_TYPE_LTR
+#define EVAS_BIDI_DIRECTION_RTL     EFL_TEXT_BIDIRECTIONAL_TYPE_RTL
+#define EVAS_BIDI_DIRECTION_INHERIT EFL_TEXT_BIDIRECTIONAL_TYPE_INHERIT
 
 /**
  * How the mouse pointer should be handled by Evas.
diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 1135527ad2..e069e04ce7 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -15244,11 +15244,11 @@ 
_efl_canvas_text_efl_canvas_object_paragraph_direction_set(Eo *eo_obj,
 #ifdef BIDI_SUPPORT
    Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
 
-   if ((!(o->inherit_paragraph_direction) && (o->paragraph_direction == 
(Evas_BiDi_Direction)dir)) ||
-       (o->inherit_paragraph_direction && ((Evas_BiDi_Direction)dir == 
EVAS_BIDI_DIRECTION_INHERIT)))
+   if ((!(o->inherit_paragraph_direction) && (o->paragraph_direction == dir)) 
||
+       (o->inherit_paragraph_direction && (dir == 
EVAS_BIDI_DIRECTION_INHERIT)))
      return;
 
-   if (dir == (Efl_Text_Bidirectional_Type)EVAS_BIDI_DIRECTION_INHERIT)
+   if (dir == EVAS_BIDI_DIRECTION_INHERIT)
      {
         o->inherit_paragraph_direction = EINA_TRUE;
         Evas_BiDi_Direction parent_dir = EVAS_BIDI_DIRECTION_NEUTRAL;

-- 


Reply via email to