diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index f62bced764..a4f53e039a 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -48,7 +48,7 @@ efl_eolian_files = \ lib/efl/interfaces/efl_gfx_blur.eo \ lib/efl/interfaces/efl_gfx_hint.eo \ lib/efl/interfaces/efl_model.eo \ - lib/efl/interfaces/efl_orientation.eo \ + lib/efl/interfaces/efl_gfx_orientable.eo \ lib/efl/interfaces/efl_container.eo \ lib/efl/interfaces/efl_content.eo \ lib/efl/interfaces/efl_gfx_arrangement.eo \ diff --git a/src/bin/elementary/test_evas_mask.c b/src/bin/elementary/test_evas_mask.c index 223d657b4c..b432ee0225 100644 --- a/src/bin/elementary/test_evas_mask.c +++ b/src/bin/elementary/test_evas_mask.c @@ -93,12 +93,12 @@ _toggle_map(void *data, const Efl_Event *ev EINA_UNUSED) static void _rotate_win(void *data, const Efl_Event *ev EINA_UNUSED) { - //Efl_Orient orient; + //Efl_Gfx_Orientation orient; Eo *win = data; // FIXME: This is not implemented??? - //orient = efl_orientation_get(win); - //efl_orientation_set(win, (orient + 90) % 360); + //orient = efl_gfx_orientation_get(win); + //efl_gfx_orientation_set(win, (orient + 90) % 360); elm_win_rotation_set(win, (elm_win_rotation_get(win) + 90) % 360); } diff --git a/src/examples/evas/evas-images5.c b/src/examples/evas/evas-images5.c index fa2794e952..7632b7fde1 100644 --- a/src/examples/evas/evas-images5.c +++ b/src/examples/evas/evas-images5.c @@ -76,7 +76,7 @@ _on_keydown(void *data EINA_UNUSED, void *einfo) { Evas_Event_Key_Down *ev = einfo; - Efl_Orient orient = efl_orientation_get(d.img); + Efl_Gfx_Orientation orient = efl_gfx_orientation_get(d.img); if (strcmp(ev->key, "h") == 0) /* print help */ { @@ -110,25 +110,25 @@ _on_keydown(void *data EINA_UNUSED, switch (key_val) { case 0: - efl_orientation_set(d.img, EFL_ORIENT_UP | (orient & EFL_ORIENT_FLIP_BITMASK)); + efl_gfx_orientation_set(d.img, EFL_GFX_ORIENTATION_UP | (orient & EFL_GFX_ORIENTATION_FLIP_BITMASK)); break; case 1: - efl_orientation_set(d.img, EFL_ORIENT_RIGHT | (orient & EFL_ORIENT_FLIP_BITMASK)); + efl_gfx_orientation_set(d.img, EFL_GFX_ORIENTATION_RIGHT | (orient & EFL_GFX_ORIENTATION_FLIP_BITMASK)); break; case 2: - efl_orientation_set(d.img, EFL_ORIENT_DOWN | (orient & EFL_ORIENT_FLIP_BITMASK)); + efl_gfx_orientation_set(d.img, EFL_GFX_ORIENTATION_DOWN | (orient & EFL_GFX_ORIENTATION_FLIP_BITMASK)); break; case 3: - efl_orientation_set(d.img, EFL_ORIENT_LEFT | (orient & EFL_ORIENT_FLIP_BITMASK)); + efl_gfx_orientation_set(d.img, EFL_GFX_ORIENTATION_LEFT | (orient & EFL_GFX_ORIENTATION_FLIP_BITMASK)); break; case 4: - efl_orientation_set(d.img, (orient & EFL_ORIENT_ROTATION_BITMASK) | EFL_ORIENT_FLIP_HORIZONTAL); + efl_gfx_orientation_set(d.img, (orient & EFL_GFX_ORIENTATION_ROTATION_BITMASK) | EFL_GFX_ORIENTATION_FLIP_HORIZONTAL); break; case 5: - efl_orientation_set(d.img, (orient & EFL_ORIENT_ROTATION_BITMASK) | EFL_ORIENT_FLIP_VERTICAL); + efl_gfx_orientation_set(d.img, (orient & EFL_GFX_ORIENTATION_ROTATION_BITMASK) | EFL_GFX_ORIENTATION_FLIP_VERTICAL); break; case 6: - efl_orientation_set(d.img, (orient & EFL_ORIENT_ROTATION_BITMASK)); + efl_gfx_orientation_set(d.img, (orient & EFL_GFX_ORIENTATION_ROTATION_BITMASK)); break; } } diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index c0651a861a..553f5901a7 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -90,12 +90,12 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; #include "interfaces/efl_gfx_image.eo.h" #include "interfaces/efl_gfx_frame_controller.eo.h" #include "interfaces/efl_gfx_image_load_controller.eo.h" +#include "interfaces/efl_gfx_orientable.eo.h" #include "interfaces/efl_part.eo.h" #include "interfaces/efl_playable.eo.h" #include "interfaces/efl_player.eo.h" #include "interfaces/efl_text.eo.h" #include "interfaces/efl_text_types.eot.h" -#include "interfaces/efl_orientation.eo.h" #include "interfaces/efl_ui_i18n.eo.h" #include "interfaces/efl_ui_direction.eo.h" #include "interfaces/efl_ui_direction_readonly.eo.h" @@ -113,10 +113,6 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; #include "interfaces/efl_screen.eo.h" -#define EFL_ORIENT_0 EFL_ORIENT_UP -#define EFL_ORIENT_90 EFL_ORIENT_RIGHT -#define EFL_ORIENT_180 EFL_ORIENT_DOWN -#define EFL_ORIENT_270 EFL_ORIENT_LEFT /* Core interface */ #include "interfaces/efl_interpolator.eo.h" diff --git a/src/lib/efl/interfaces/efl_orientation.eo b/src/lib/efl/interfaces/efl_gfx_orientable.eo similarity index 89% rename from src/lib/efl/interfaces/efl_orientation.eo rename to src/lib/efl/interfaces/efl_gfx_orientable.eo index be42be5eca..0c4d191727 100644 --- a/src/lib/efl/interfaces/efl_orientation.eo +++ b/src/lib/efl/interfaces/efl_gfx_orientable.eo @@ -1,6 +1,6 @@ parse efl_ui_direction; -enum @beta Efl.Orient +enum @beta Efl.Gfx.Orientation { [[An orientation type, to rotate and flip images. @@ -25,9 +25,10 @@ enum @beta Efl.Orient flip_bitmask = 12 [[Bitmask that can be used to isolate flipping values, that is, $flip_vertical and $flip_horizontal.]] } -interface @beta Efl.Orientation +interface @beta Efl.Gfx.Orientable { [[Interface for objects which can be oriented.]] + c_prefix: efl_gfx_orientation; methods { @property orientation { [[Control the orientation (rotation and flipping) of a given object. @@ -36,7 +37,7 @@ interface @beta Efl.Orientation instance. ]] values { - dir: Efl.Orient(Efl.Orient.none); [[The rotation angle (CCW), see @Efl.Orient.]] + dir: Efl.Gfx.Orientation(Efl.Gfx.Orientation.none); [[The final orientation of the object.]] } } } diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 4d7927f6f8..b01587cdda 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -32,6 +32,7 @@ #include "interfaces/efl_gfx_stack.eo.c" #include "interfaces/efl_gfx_fill.eo.c" #include "interfaces/efl_gfx_view.eo.c" +#include "interfaces/efl_gfx_orientable.eo.c" #include "interfaces/efl_gfx_text_class.eo.c" #include "interfaces/efl_gfx_size_class.eo.c" @@ -59,7 +60,6 @@ #include "interfaces/efl_gfx_arrangement.eo.c" #include "interfaces/efl_model.eo.c" #include "interfaces/efl_interpolator.eo.c" -#include "interfaces/efl_orientation.eo.c" #include "interfaces/efl_ui_i18n.eo.c" #include "interfaces/efl_ui_direction.eo.c" #include "interfaces/efl_ui_drag.eo.c" diff --git a/src/lib/efl/interfaces/efl_ui_direction.eo b/src/lib/efl/interfaces/efl_ui_direction.eo index a75872eb85..5e6706b67d 100644 --- a/src/lib/efl/interfaces/efl_ui_direction.eo +++ b/src/lib/efl/interfaces/efl_ui_direction.eo @@ -1,13 +1,13 @@ // FIXME: Documentation lacks proper references due to cyclic imports. // FIXME: What about AnyRTL? And other strange directions? -parse efl_orientation; +parse efl_gfx_orientable; enum @beta Efl.Ui.Dir { [[Direction for UI objects and layouts. - Not to be confused with @Efl.Orient which is for images and canvases. This + Not to be confused with @Efl.Gfx.Orientation which is for images and canvases. This enum is used to define how widgets should expand and orient themselves, not to rotate images. diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build index d29af1cd6d..a88a6b78b4 100644 --- a/src/lib/efl/interfaces/meson.build +++ b/src/lib/efl/interfaces/meson.build @@ -64,7 +64,7 @@ pub_eo_files = [ 'efl_gfx_hint.eo', 'efl_model.eo', 'efl_interpolator.eo', - 'efl_orientation.eo', + 'efl_gfx_orientable.eo', 'efl_container.eo', 'efl_content.eo', 'efl_pack.eo', diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 687bdbcfec..6f46398348 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -807,7 +807,7 @@ _efl_ui_image_sizing_eval(Evas_Object *obj) //Retained way. Nothing does, if either way hasn't been changed. if (!sd->edje) { - efl_orientation_set(sd->img, sd->orient); + efl_gfx_orientation_set(sd->img, sd->orient); } if (sd->img) @@ -1364,7 +1364,7 @@ _efl_ui_image_efl_gfx_image_load_controller_load_size_get(const Eo *obj EINA_UNU } EOLIAN static void -_efl_ui_image_efl_orientation_orientation_set(Eo *obj, Efl_Ui_Image_Data *sd, Efl_Orient orient) +_efl_ui_image_efl_gfx_orientable_orientation_set(Eo *obj, Efl_Ui_Image_Data *sd, Efl_Gfx_Orientation orient) { if (sd->edje) return; if (sd->orient == orient) return; @@ -1373,8 +1373,8 @@ _efl_ui_image_efl_orientation_orientation_set(Eo *obj, Efl_Ui_Image_Data *sd, Ef _efl_ui_image_sizing_eval(obj); } -EOLIAN static Efl_Orient -_efl_ui_image_efl_orientation_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd) +EOLIAN static Efl_Gfx_Orientation +_efl_ui_image_efl_gfx_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd) { return sd->orient; } @@ -2118,23 +2118,23 @@ elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disable) EAPI void elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient elm_orient) { - // This array takes an Elm_Image_Orient and turns it into an Efl_Orient - static const Efl_Orient efl_orient[8] = { - EFL_ORIENT_NONE, - EFL_ORIENT_RIGHT, - EFL_ORIENT_DOWN, - EFL_ORIENT_LEFT, - EFL_ORIENT_FLIP_HORIZONTAL, - EFL_ORIENT_FLIP_VERTICAL, - EFL_ORIENT_LEFT | EFL_ORIENT_FLIP_VERTICAL, - EFL_ORIENT_RIGHT | EFL_ORIENT_FLIP_VERTICAL + // This array takes an Elm_Image_Orient and turns it into an Efl_Gfx_Orientation + static const Efl_Gfx_Orientation efl_orient[8] = { + EFL_GFX_ORIENTATION_NONE, + EFL_GFX_ORIENTATION_RIGHT, + EFL_GFX_ORIENTATION_DOWN, + EFL_GFX_ORIENTATION_LEFT, + EFL_GFX_ORIENTATION_FLIP_HORIZONTAL, + EFL_GFX_ORIENTATION_FLIP_VERTICAL, + EFL_GFX_ORIENTATION_LEFT | EFL_GFX_ORIENTATION_FLIP_VERTICAL, + EFL_GFX_ORIENTATION_RIGHT | EFL_GFX_ORIENTATION_FLIP_VERTICAL }; EFL_UI_IMAGE_CHECK(obj); EFL_UI_IMAGE_DATA_GET(obj, sd); EINA_SAFETY_ON_FALSE_RETURN(elm_orient >= 0 && elm_orient < 8); sd->image_orient = elm_orient; - efl_orientation_set(obj, efl_orient[elm_orient]); + efl_gfx_orientation_set(obj, efl_orient[elm_orient]); } EAPI Elm_Image_Orient diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index d4e766e1b6..f80e2c356e 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -19,7 +19,7 @@ struct @beta Efl.Ui.Image_Error class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.Ui.Draggable, Efl.File, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller, Efl.Player, Efl.Gfx.View, Efl.Access.Component, Efl.Access.Widget.Action, Efl.Gfx.Color, - Efl.Orientation, + Efl.Gfx.Orientable, Efl.Layout.Calc, Efl.Layout.Group, Efl.Layout.Signal { @@ -100,7 +100,7 @@ class @beta Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl. Efl.Gfx.Image_Load_Controller.load_size { get; set; } Efl.Gfx.Image.smooth_scale { get; set; } Efl.Gfx.Image.scale_type { get; set; } - Efl.Orientation.orientation { get; set; } + Efl.Gfx.Orientable.orientation { get; set; } Efl.Player.playable { get; } Efl.Player.play { get; set; } Efl.Layout.Signal.signal_emit; diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index d306608a46..108ab5651f 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -622,7 +622,7 @@ _grid_create(Evas_Object *obj) g->grid[tn].img = evas_object_image_add(evas_object_evas_get(obj)); evas_object_image_load_orientation_set(g->grid[tn].img, EINA_TRUE); - efl_orientation_set(g->grid[tn].img, sd->orient); + efl_gfx_orientation_set(g->grid[tn].img, sd->orient); evas_object_image_scale_hint_set (g->grid[tn].img, EVAS_IMAGE_SCALE_HINT_DYNAMIC); evas_object_pass_events_set(g->grid[tn].img, EINA_TRUE); @@ -1321,7 +1321,7 @@ _orient_apply(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd) } } - efl_orientation_set(sd->img, sd->orient); + efl_gfx_orientation_set(sd->img, sd->orient); evas_object_image_size_get(sd->img, &iw, &ih); sd->size.imw = iw; sd->size.imh = ih; @@ -1331,8 +1331,8 @@ _orient_apply(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd) } EOLIAN static void -_efl_ui_image_zoomable_efl_orientation_orientation_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, - Efl_Orient orient) +_efl_ui_image_zoomable_efl_gfx_orientable_orientation_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, + Efl_Gfx_Orientation orient) { if (sd->orient == orient) return; @@ -1340,8 +1340,8 @@ _efl_ui_image_zoomable_efl_orientation_orientation_set(Eo *obj, Efl_Ui_Image_Zoo _orient_apply(obj, sd); } -EOLIAN static Efl_Orient -_efl_ui_image_zoomable_efl_orientation_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd) +EOLIAN static Efl_Gfx_Orientation +_efl_ui_image_zoomable_efl_gfx_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd) { return sd->orient; } @@ -2056,7 +2056,7 @@ _img_proxy_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd, tz = sd->zoom; sd->zoom = 0.0; elm_photocam_zoom_set(obj, tz); - sd->orient = EFL_ORIENT_NONE; + sd->orient = EFL_GFX_ORIENTATION_NONE; sd->orientation_changed = EINA_FALSE; return 0; @@ -2141,7 +2141,7 @@ _internal_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Evas_Load_Error *ret tz = sd->zoom; sd->zoom = 0.0; elm_photocam_zoom_set(obj, tz); - sd->orient = EFL_ORIENT_NONE; + sd->orient = EFL_GFX_ORIENTATION_NONE; sd->orientation_changed = EINA_FALSE; if (ret) *ret = evas_object_image_load_error_get(sd->img); @@ -3172,45 +3172,45 @@ elm_photocam_add(Evas_Object *parent) return elm_legacy_add(EFL_UI_IMAGE_ZOOMABLE_LEGACY_CLASS, parent); } -static inline Efl_Orient +static inline Efl_Gfx_Orientation _evas_orient_to_efl_orient(const Evas_Image_Orient evas_orient) { - // This array takes an Elm_Image_Orient and turns it into an Efl_Orient - static const Efl_Orient efl_orient[8] = { - EFL_ORIENT_NONE, - EFL_ORIENT_RIGHT, - EFL_ORIENT_DOWN, - EFL_ORIENT_LEFT, - EFL_ORIENT_FLIP_HORIZONTAL, - EFL_ORIENT_FLIP_VERTICAL, - EFL_ORIENT_LEFT | EFL_ORIENT_FLIP_VERTICAL, - EFL_ORIENT_RIGHT | EFL_ORIENT_FLIP_VERTICAL + // This array takes an Elm_Image_Orient and turns it into an Efl_Gfx_Orientation + static const Efl_Gfx_Orientation efl_orient[8] = { + EFL_GFX_ORIENTATION_NONE, + EFL_GFX_ORIENTATION_RIGHT, + EFL_GFX_ORIENTATION_DOWN, + EFL_GFX_ORIENTATION_LEFT, + EFL_GFX_ORIENTATION_FLIP_HORIZONTAL, + EFL_GFX_ORIENTATION_FLIP_VERTICAL, + EFL_GFX_ORIENTATION_LEFT | EFL_GFX_ORIENTATION_FLIP_VERTICAL, + EFL_GFX_ORIENTATION_RIGHT | EFL_GFX_ORIENTATION_FLIP_VERTICAL }; - EINA_SAFETY_ON_FALSE_RETURN_VAL(evas_orient >= 0 && evas_orient < 8, EFL_ORIENT_NONE); + EINA_SAFETY_ON_FALSE_RETURN_VAL(evas_orient >= 0 && evas_orient < 8, EFL_GFX_ORIENTATION_NONE); return efl_orient[evas_orient]; } static inline Evas_Image_Orient -_efl_orient_to_evas_orient(Efl_Orient efl_orient) +_efl_orient_to_evas_orient(Efl_Gfx_Orientation efl_orient) { - // This array takes an Efl_Orient and turns it into an Elm_Image_Orient + // This array takes an Efl_Gfx_Orientation and turns it into an Elm_Image_Orient static const Evas_Image_Orient evas_orient[16] = { - EVAS_IMAGE_ORIENT_NONE, // EFL_ORIENT_NONE - EVAS_IMAGE_ORIENT_90, // EFL_ORIENT_RIGHT - EVAS_IMAGE_ORIENT_180, // EFL_ORIENT_DOWN - EVAS_IMAGE_ORIENT_270, // EFL_ORIENT_LEFT - EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_ORIENT_NONE + FLIP_HOR - EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_ORIENT_RIGHT + FLIP_HOR - EVAS_IMAGE_FLIP_VERTICAL, // EFL_ORIENT_DOWN + FLIP_HOR - EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_ORIENT_LEFT + FLIP_HOR - EVAS_IMAGE_FLIP_VERTICAL, // EFL_ORIENT_NONE + FLIP_VER - EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_ORIENT_RIGHT + FLIP_VER - EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_ORIENT_DOWN + FLIP_VER - EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_ORIENT_LEFT + FLIP_VER - EVAS_IMAGE_ORIENT_180, // EFL_ORIENT_NONE + FLIP_HOR + FLIP_VER - EVAS_IMAGE_ORIENT_270, // EFL_ORIENT_RIGHT + FLIP_HOR + FLIP_VER - EVAS_IMAGE_ORIENT_0, // EFL_ORIENT_DOWN + FLIP_HOR + FLIP_VER - EVAS_IMAGE_ORIENT_90 // EFL_ORIENT_LEFT + FLIP_HOR + FLIP_VER + EVAS_IMAGE_ORIENT_NONE, // EFL_GFX_ORIENTATION_NONE + EVAS_IMAGE_ORIENT_90, // EFL_GFX_ORIENTATION_RIGHT + EVAS_IMAGE_ORIENT_180, // EFL_GFX_ORIENTATION_DOWN + EVAS_IMAGE_ORIENT_270, // EFL_GFX_ORIENTATION_LEFT + EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_ORIENTATION_NONE + FLIP_HOR + EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_ORIENTATION_RIGHT + FLIP_HOR + EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_ORIENTATION_DOWN + FLIP_HOR + EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_ORIENTATION_LEFT + FLIP_HOR + EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_ORIENTATION_NONE + FLIP_VER + EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_ORIENTATION_RIGHT + FLIP_VER + EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_ORIENTATION_DOWN + FLIP_VER + EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_ORIENTATION_LEFT + FLIP_VER + EVAS_IMAGE_ORIENT_180, // EFL_GFX_ORIENTATION_NONE + FLIP_HOR + FLIP_VER + EVAS_IMAGE_ORIENT_270, // EFL_GFX_ORIENTATION_RIGHT + FLIP_HOR + FLIP_VER + EVAS_IMAGE_ORIENT_0, // EFL_GFX_ORIENTATION_DOWN + FLIP_HOR + FLIP_VER + EVAS_IMAGE_ORIENT_90 // EFL_GFX_ORIENTATION_LEFT + FLIP_HOR + FLIP_VER }; EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_orient >= 0 && efl_orient < 16, EVAS_IMAGE_ORIENT_NONE); return evas_orient[efl_orient]; @@ -3219,7 +3219,7 @@ _efl_orient_to_evas_orient(Efl_Orient efl_orient) EAPI void elm_photocam_image_orient_set(Eo *obj, Evas_Image_Orient evas_orient) { - efl_orientation_set(obj, _evas_orient_to_efl_orient(evas_orient)); + efl_gfx_orientation_set(obj, _evas_orient_to_efl_orient(evas_orient)); } EAPI Evas_Image_Orient diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo b/src/lib/elementary/efl_ui_image_zoomable.eo index 42cab4661b..4f66bda9b0 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.eo +++ b/src/lib/elementary/efl_ui_image_zoomable.eo @@ -65,7 +65,7 @@ class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom, Efl.Access.Widget.Action.elm_actions { get; } Efl.File.load; Efl.File.file { get; set; } - Efl.Orientation.orientation { get; set; } + Efl.Gfx.Orientable.orientation { get; set; } Efl.Layout.Group.group_size_min { get; } Efl.Layout.Group.group_size_max { get; } Efl.Layout.Signal.signal_callback_add; diff --git a/src/lib/elementary/efl_ui_image_zoomable_private.h b/src/lib/elementary/efl_ui_image_zoomable_private.h index 7787e30bbb..8bf1dffd72 100644 --- a/src/lib/elementary/efl_ui_image_zoomable_private.h +++ b/src/lib/elementary/efl_ui_image_zoomable_private.h @@ -128,8 +128,8 @@ struct _Efl_Ui_Image_Zoomable_Data int cur_frame; int frame_count; - Eina_List *grids; - Efl_Orient orient; + Eina_List *grids; + Efl_Gfx_Orientation orient; Eina_Bool main_load_pending : 1; Eina_Bool longpressed : 1; diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index fa47bc1d1f..0260ae5d6a 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -2614,7 +2614,7 @@ _efl_ui_layout_base_automatic_theme_rotation_get(const Eo *obj EINA_UNUSED, Efl_ } EOLIAN static void -_efl_ui_layout_base_theme_rotation_apply(Eo *obj, Efl_Ui_Layout_Data *pd EINA_UNUSED, Efl_Orient orientation) +_efl_ui_layout_base_theme_rotation_apply(Eo *obj, Efl_Ui_Layout_Data *pd EINA_UNUSED, int orientation) { char prefix[4], buf[128]; diff --git a/src/lib/elementary/efl_ui_layout_base.eo b/src/lib/elementary/efl_ui_layout_base.eo index 1923bddefa..54a646c1bb 100644 --- a/src/lib/elementary/efl_ui_layout_base.eo +++ b/src/lib/elementary/efl_ui_layout_base.eo @@ -1,5 +1,4 @@ import efl_ui; -import efl_orientation; abstract Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container, Efl.Ui.Factory_Bind, @@ -53,7 +52,7 @@ abstract Efl.Ui.Layout_Base extends Efl.Ui.Widget implements Efl.Container, theme_rotation_apply @beta { [[Apply a new rotation value to this object.]] params { - orientation : Efl.Orient; [[The new rotation value.]] + orientation : int; [[The new rotation angle, in degrees.]] } } } diff --git a/src/lib/elementary/efl_ui_widget_image.h b/src/lib/elementary/efl_ui_widget_image.h index 38afc71f84..8f3c67c4fd 100644 --- a/src/lib/elementary/efl_ui_widget_image.h +++ b/src/lib/elementary/efl_ui_widget_image.h @@ -65,7 +65,7 @@ struct _Efl_Ui_Image_Data int cur_frame; Elm_Image_Orient image_orient; // to support EAPI - Efl_Orient orient; + Efl_Gfx_Orientation orient; struct { Ecore_Thread *th; diff --git a/src/lib/evas/canvas/efl_canvas_image_internal.eo b/src/lib/evas/canvas/efl_canvas_image_internal.eo index 60d3b523d1..96ccc32d22 100644 --- a/src/lib/evas/canvas/efl_canvas_image_internal.eo +++ b/src/lib/evas/canvas/efl_canvas_image_internal.eo @@ -1,7 +1,7 @@ abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements Efl.Canvas.Filter.Internal, Efl.Gfx.Image, Efl.Gfx.Buffer, Efl.Gfx.Fill, Efl.Gfx.View, - Efl.Orientation, Efl.File_Save + Efl.Gfx.Orientable, Efl.File_Save { [[Efl canvas internal image class]] data: Evas_Image_Data; @@ -11,7 +11,7 @@ abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements Ef Efl.Object.finalize; Efl.Object.debug_name_override; Efl.File_Save.save; - Efl.Orientation.orientation { get; set; } + Efl.Gfx.Orientable.orientation { get; set; } Efl.Gfx.Image.smooth_scale { get; set; } Efl.Gfx.Image.ratio { get; } Efl.Gfx.Image.border { get; set; } diff --git a/src/lib/evas/canvas/evas_image_private.h b/src/lib/evas/canvas/evas_image_private.h index 36b5ce5d65..e5b6805442 100644 --- a/src/lib/evas/canvas/evas_image_private.h +++ b/src/lib/evas/canvas/evas_image_private.h @@ -115,7 +115,7 @@ struct _Evas_Image_Data Efl_Gfx_Image_Scale_Hint scale_hint; Efl_Gfx_Image_Content_Hint content_hint; - Efl_Orient orient_value; + Efl_Gfx_Orientation orient_value; struct { short w, h; diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 6bec504038..788b96a48e 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -412,26 +412,26 @@ _evas_image_orientation_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Orient or } EOLIAN static void -_efl_canvas_image_internal_efl_orientation_orientation_set(Eo *obj, Evas_Image_Data *o, Efl_Orient efl_orient) +_efl_canvas_image_internal_efl_gfx_orientable_orientation_set(Eo *obj, Evas_Image_Data *o, Efl_Gfx_Orientation efl_orient) { - // This array takes an Efl_Orient and turns it into an Elm_Image_Orient + // This array takes an Efl_Gfx_Orientation and turns it into an Elm_Image_Orient static const Evas_Image_Orient evas_orient[16] = { - EVAS_IMAGE_ORIENT_NONE, // EFL_ORIENT_NONE - EVAS_IMAGE_ORIENT_90, // EFL_ORIENT_RIGHT - EVAS_IMAGE_ORIENT_180, // EFL_ORIENT_DOWN - EVAS_IMAGE_ORIENT_270, // EFL_ORIENT_LEFT - EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_ORIENT_NONE + FLIP_HOR - EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_ORIENT_RIGHT + FLIP_HOR - EVAS_IMAGE_FLIP_VERTICAL, // EFL_ORIENT_DOWN + FLIP_HOR - EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_ORIENT_LEFT + FLIP_HOR - EVAS_IMAGE_FLIP_VERTICAL, // EFL_ORIENT_NONE + FLIP_VER - EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_ORIENT_RIGHT + FLIP_VER - EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_ORIENT_DOWN + FLIP_VER - EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_ORIENT_LEFT + FLIP_VER - EVAS_IMAGE_ORIENT_180, // EFL_ORIENT_NONE + FLIP_HOR + FLIP_VER - EVAS_IMAGE_ORIENT_270, // EFL_ORIENT_RIGHT + FLIP_HOR + FLIP_VER - EVAS_IMAGE_ORIENT_0, // EFL_ORIENT_DOWN + FLIP_HOR + FLIP_VER - EVAS_IMAGE_ORIENT_90 // EFL_ORIENT_LEFT + FLIP_HOR + FLIP_VER + EVAS_IMAGE_ORIENT_NONE, // EFL_GFX_ORIENTATION_NONE + EVAS_IMAGE_ORIENT_90, // EFL_GFX_ORIENTATION_RIGHT + EVAS_IMAGE_ORIENT_180, // EFL_GFX_ORIENTATION_DOWN + EVAS_IMAGE_ORIENT_270, // EFL_GFX_ORIENTATION_LEFT + EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_ORIENTATION_NONE + FLIP_HOR + EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_ORIENTATION_RIGHT + FLIP_HOR + EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_ORIENTATION_DOWN + FLIP_HOR + EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_ORIENTATION_LEFT + FLIP_HOR + EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_ORIENTATION_NONE + FLIP_VER + EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_ORIENTATION_RIGHT + FLIP_VER + EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_ORIENTATION_DOWN + FLIP_VER + EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_ORIENTATION_LEFT + FLIP_VER + EVAS_IMAGE_ORIENT_180, // EFL_GFX_ORIENTATION_NONE + FLIP_HOR + FLIP_VER + EVAS_IMAGE_ORIENT_270, // EFL_GFX_ORIENTATION_RIGHT + FLIP_HOR + FLIP_VER + EVAS_IMAGE_ORIENT_0, // EFL_GFX_ORIENTATION_DOWN + FLIP_HOR + FLIP_VER + EVAS_IMAGE_ORIENT_90 // EFL_GFX_ORIENTATION_LEFT + FLIP_HOR + FLIP_VER }; EINA_SAFETY_ON_FALSE_RETURN(efl_orient >= 0 && efl_orient < 16); @@ -439,8 +439,8 @@ _efl_canvas_image_internal_efl_orientation_orientation_set(Eo *obj, Evas_Image_D _evas_image_orientation_set(obj, o, evas_orient[efl_orient]); } -EOLIAN static Efl_Orient -_efl_canvas_image_internal_efl_orientation_orientation_get(const Eo *obj EINA_UNUSED, Evas_Image_Data *o) +EOLIAN static Efl_Gfx_Orientation +_efl_canvas_image_internal_efl_gfx_orientable_orientation_get(const Eo *obj EINA_UNUSED, Evas_Image_Data *o) { return o->orient_value; }