Rename Efl.Gfx.Orientation -> Efl.Gfx.Image_Orientation

Summary:
This will help disambiguate later on when we rename Efl.Ui.Direction
to Efl.Ui.Layout_Orientation.

Relates to T7919

Test Plan: Everything still builds and passes tests.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8934
This commit is contained in:
Xavi Artigas 2019-05-22 14:16:16 -04:00 committed by Mike Blumenkrantz
parent d15b37eea1
commit 12cab54b9c
18 changed files with 111 additions and 115 deletions

View File

@ -48,7 +48,7 @@ efl_eolian_files = \
lib/efl/interfaces/efl_gfx_blur.eo \ lib/efl/interfaces/efl_gfx_blur.eo \
lib/efl/interfaces/efl_gfx_hint.eo \ lib/efl/interfaces/efl_gfx_hint.eo \
lib/efl/interfaces/efl_model.eo \ lib/efl/interfaces/efl_model.eo \
lib/efl/interfaces/efl_gfx_orientable.eo \ lib/efl/interfaces/efl_gfx_image_orientable.eo \
lib/efl/interfaces/efl_container.eo \ lib/efl/interfaces/efl_container.eo \
lib/efl/interfaces/efl_content.eo \ lib/efl/interfaces/efl_content.eo \
lib/efl/interfaces/efl_gfx_arrangement.eo \ lib/efl/interfaces/efl_gfx_arrangement.eo \

View File

@ -93,12 +93,8 @@ _toggle_map(void *data, const Efl_Event *ev EINA_UNUSED)
static void static void
_rotate_win(void *data, const Efl_Event *ev EINA_UNUSED) _rotate_win(void *data, const Efl_Event *ev EINA_UNUSED)
{ {
//Efl_Gfx_Orientation orient;
Eo *win = data; Eo *win = data;
// FIXME: This is not implemented???
//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); elm_win_rotation_set(win, (elm_win_rotation_get(win) + 90) % 360);
} }

View File

@ -5,15 +5,15 @@
#include <Efl_Ui.h> #include <Efl_Ui.h>
static const struct { static const struct {
Efl_Gfx_Orientation orient; Efl_Gfx_Image_Orientation orient;
const char *name; const char *name;
} images_orient[] = { } images_orient[] = {
{ EFL_GFX_ORIENTATION_NONE, "None" }, { EFL_GFX_IMAGE_ORIENTATION_NONE, "None" },
{ EFL_GFX_ORIENTATION_RIGHT, "Rotate 90" }, { EFL_GFX_IMAGE_ORIENTATION_RIGHT, "Rotate 90" },
{ EFL_GFX_ORIENTATION_DOWN, "Rotate 180" }, { EFL_GFX_IMAGE_ORIENTATION_DOWN, "Rotate 180" },
{ EFL_GFX_ORIENTATION_LEFT, "Rotate 270" }, { EFL_GFX_IMAGE_ORIENTATION_LEFT, "Rotate 270" },
{ EFL_GFX_ORIENTATION_FLIP_HORIZONTAL, "Horizontal Flip" }, { EFL_GFX_IMAGE_ORIENTATION_FLIP_HORIZONTAL, "Horizontal Flip" },
{ EFL_GFX_ORIENTATION_FLIP_VERTICAL, "Vertical Flip" }, { EFL_GFX_IMAGE_ORIENTATION_FLIP_VERTICAL, "Vertical Flip" },
{ 0, NULL } { 0, NULL }
}; };
@ -51,11 +51,11 @@ my_im_ch(void *data, const Efl_Event *ev EINA_UNUSED)
Eo *win = data; Eo *win = data;
Eo *im = efl_key_data_get(win, "im"); Eo *im = efl_key_data_get(win, "im");
Eo *rdg = efl_key_data_get(win, "rdg"); Eo *rdg = efl_key_data_get(win, "rdg");
Efl_Gfx_Orientation v = efl_ui_radio_state_value_get(efl_ui_radio_selected_object_get(rdg)); Efl_Gfx_Image_Orientation v = efl_ui_radio_state_value_get(efl_ui_radio_selected_object_get(rdg));
efl_gfx_orientation_set(im, v); efl_gfx_image_orientation_set(im, v);
fprintf(stderr, "Set %i and got %i\n", fprintf(stderr, "Set %i and got %i\n",
v, efl_gfx_orientation_get(im)); v, efl_gfx_image_orientation_get(im));
} }
void void

View File

@ -76,7 +76,7 @@ _on_keydown(void *data EINA_UNUSED,
void *einfo) void *einfo)
{ {
Evas_Event_Key_Down *ev = einfo; Evas_Event_Key_Down *ev = einfo;
Efl_Gfx_Orientation orient = efl_gfx_orientation_get(d.img); Efl_Gfx_Image_Orientation orient = efl_gfx_image_orientation_get(d.img);
if (strcmp(ev->key, "h") == 0) /* print help */ if (strcmp(ev->key, "h") == 0) /* print help */
{ {
@ -110,25 +110,25 @@ _on_keydown(void *data EINA_UNUSED,
switch (key_val) switch (key_val)
{ {
case 0: case 0:
efl_gfx_orientation_set(d.img, EFL_GFX_ORIENTATION_UP | (orient & EFL_GFX_ORIENTATION_FLIP_BITMASK)); efl_gfx_image_orientation_set(d.img, EFL_GFX_IMAGE_ORIENTATION_UP | (orient & EFL_GFX_IMAGE_ORIENTATION_FLIP_BITMASK));
break; break;
case 1: case 1:
efl_gfx_orientation_set(d.img, EFL_GFX_ORIENTATION_RIGHT | (orient & EFL_GFX_ORIENTATION_FLIP_BITMASK)); efl_gfx_image_orientation_set(d.img, EFL_GFX_IMAGE_ORIENTATION_RIGHT | (orient & EFL_GFX_IMAGE_ORIENTATION_FLIP_BITMASK));
break; break;
case 2: case 2:
efl_gfx_orientation_set(d.img, EFL_GFX_ORIENTATION_DOWN | (orient & EFL_GFX_ORIENTATION_FLIP_BITMASK)); efl_gfx_image_orientation_set(d.img, EFL_GFX_IMAGE_ORIENTATION_DOWN | (orient & EFL_GFX_IMAGE_ORIENTATION_FLIP_BITMASK));
break; break;
case 3: case 3:
efl_gfx_orientation_set(d.img, EFL_GFX_ORIENTATION_LEFT | (orient & EFL_GFX_ORIENTATION_FLIP_BITMASK)); efl_gfx_image_orientation_set(d.img, EFL_GFX_IMAGE_ORIENTATION_LEFT | (orient & EFL_GFX_IMAGE_ORIENTATION_FLIP_BITMASK));
break; break;
case 4: case 4:
efl_gfx_orientation_set(d.img, (orient & EFL_GFX_ORIENTATION_ROTATION_BITMASK) | EFL_GFX_ORIENTATION_FLIP_HORIZONTAL); efl_gfx_image_orientation_set(d.img, (orient & EFL_GFX_IMAGE_ORIENTATION_ROTATION_BITMASK) | EFL_GFX_IMAGE_ORIENTATION_FLIP_HORIZONTAL);
break; break;
case 5: case 5:
efl_gfx_orientation_set(d.img, (orient & EFL_GFX_ORIENTATION_ROTATION_BITMASK) | EFL_GFX_ORIENTATION_FLIP_VERTICAL); efl_gfx_image_orientation_set(d.img, (orient & EFL_GFX_IMAGE_ORIENTATION_ROTATION_BITMASK) | EFL_GFX_IMAGE_ORIENTATION_FLIP_VERTICAL);
break; break;
case 6: case 6:
efl_gfx_orientation_set(d.img, (orient & EFL_GFX_ORIENTATION_ROTATION_BITMASK)); efl_gfx_image_orientation_set(d.img, (orient & EFL_GFX_IMAGE_ORIENTATION_ROTATION_BITMASK));
break; break;
} }
} }

View File

@ -90,7 +90,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
#include "interfaces/efl_gfx_image.eo.h" #include "interfaces/efl_gfx_image.eo.h"
#include "interfaces/efl_gfx_frame_controller.eo.h" #include "interfaces/efl_gfx_frame_controller.eo.h"
#include "interfaces/efl_gfx_image_load_controller.eo.h" #include "interfaces/efl_gfx_image_load_controller.eo.h"
#include "interfaces/efl_gfx_orientable.eo.h" #include "interfaces/efl_gfx_image_orientable.eo.h"
#include "interfaces/efl_part.eo.h" #include "interfaces/efl_part.eo.h"
#include "interfaces/efl_playable.eo.h" #include "interfaces/efl_playable.eo.h"
#include "interfaces/efl_player.eo.h" #include "interfaces/efl_player.eo.h"

View File

@ -1,6 +1,6 @@
parse efl_ui_direction; parse efl_ui_direction;
enum @beta Efl.Gfx.Orientation enum @beta Efl.Gfx.Image_Orientation
{ {
[[An orientation type, to rotate and flip images. [[An orientation type, to rotate and flip images.
@ -25,19 +25,19 @@ enum @beta Efl.Gfx.Orientation
flip_bitmask = 12 [[Bitmask that can be used to isolate flipping values, that is, $flip_vertical and $flip_horizontal.]] flip_bitmask = 12 [[Bitmask that can be used to isolate flipping values, that is, $flip_vertical and $flip_horizontal.]]
} }
interface @beta Efl.Gfx.Orientable interface @beta Efl.Gfx.Image_Orientable
{ {
[[Interface for objects which can be oriented.]] [[Interface for objects which can be oriented.]]
c_prefix: efl_gfx_orientation; c_prefix: efl_gfx_image;
methods { methods {
@property orientation { @property orientation {
[[Control the orientation (rotation and flipping) of a given object. [[Control the orientation (rotation and flipping) of a visual object.
This can be used to set the rotation on an image or a window, for This can be used to set the rotation on an image or a window, for
instance. instance.
]] ]]
values { values {
dir: Efl.Gfx.Orientation(Efl.Gfx.Orientation.none); [[The final orientation of the object.]] dir: Efl.Gfx.Image_Orientation(Efl.Gfx.Image_Orientation.none); [[The final orientation of the object.]]
} }
} }
} }

View File

@ -32,7 +32,7 @@
#include "interfaces/efl_gfx_stack.eo.c" #include "interfaces/efl_gfx_stack.eo.c"
#include "interfaces/efl_gfx_fill.eo.c" #include "interfaces/efl_gfx_fill.eo.c"
#include "interfaces/efl_gfx_view.eo.c" #include "interfaces/efl_gfx_view.eo.c"
#include "interfaces/efl_gfx_orientable.eo.c" #include "interfaces/efl_gfx_image_orientable.eo.c"
#include "interfaces/efl_gfx_text_class.eo.c" #include "interfaces/efl_gfx_text_class.eo.c"
#include "interfaces/efl_gfx_size_class.eo.c" #include "interfaces/efl_gfx_size_class.eo.c"

View File

@ -1,13 +1,13 @@
// FIXME: Documentation lacks proper references due to cyclic imports. // FIXME: Documentation lacks proper references due to cyclic imports.
// FIXME: What about AnyRTL? And other strange directions? // FIXME: What about AnyRTL? And other strange directions?
parse efl_gfx_orientable; parse efl_gfx_image_orientable;
enum @beta Efl.Ui.Dir enum @beta Efl.Ui.Dir
{ {
[[Direction for UI objects and layouts. [[Direction for UI objects and layouts.
Not to be confused with @Efl.Gfx.Orientation which is for images and canvases. This Not to be confused with @Efl.Gfx.Image_Orientation which is for images and canvases. This
enum is used to define how widgets should expand and orient themselves, enum is used to define how widgets should expand and orient themselves,
not to rotate images. not to rotate images.

View File

@ -64,7 +64,7 @@ pub_eo_files = [
'efl_gfx_hint.eo', 'efl_gfx_hint.eo',
'efl_model.eo', 'efl_model.eo',
'efl_interpolator.eo', 'efl_interpolator.eo',
'efl_gfx_orientable.eo', 'efl_gfx_image_orientable.eo',
'efl_container.eo', 'efl_container.eo',
'efl_content.eo', 'efl_content.eo',
'efl_pack.eo', 'efl_pack.eo',

View File

@ -807,7 +807,7 @@ _efl_ui_image_sizing_eval(Evas_Object *obj)
//Retained way. Nothing does, if either way hasn't been changed. //Retained way. Nothing does, if either way hasn't been changed.
if (!sd->edje) if (!sd->edje)
{ {
efl_gfx_orientation_set(sd->img, sd->orient); efl_gfx_image_orientation_set(sd->img, sd->orient);
} }
if (sd->img) 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 EOLIAN static void
_efl_ui_image_efl_gfx_orientable_orientation_set(Eo *obj, Efl_Ui_Image_Data *sd, Efl_Gfx_Orientation orient) _efl_ui_image_efl_gfx_image_orientable_orientation_set(Eo *obj, Efl_Ui_Image_Data *sd, Efl_Gfx_Image_Orientation orient)
{ {
if (sd->edje) return; if (sd->edje) return;
if (sd->orient == orient) return; if (sd->orient == orient) return;
@ -1373,8 +1373,8 @@ _efl_ui_image_efl_gfx_orientable_orientation_set(Eo *obj, Efl_Ui_Image_Data *sd,
_efl_ui_image_sizing_eval(obj); _efl_ui_image_sizing_eval(obj);
} }
EOLIAN static Efl_Gfx_Orientation EOLIAN static Efl_Gfx_Image_Orientation
_efl_ui_image_efl_gfx_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd) _efl_ui_image_efl_gfx_image_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd)
{ {
return sd->orient; return sd->orient;
} }
@ -2118,23 +2118,23 @@ elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disable)
EAPI void EAPI void
elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient elm_orient) 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_Gfx_Orientation // This array takes an Elm_Image_Orient and turns it into an Efl_Gfx_Image_Orientation
static const Efl_Gfx_Orientation efl_orient[8] = { static const Efl_Gfx_Image_Orientation efl_orient[8] = {
EFL_GFX_ORIENTATION_NONE, EFL_GFX_IMAGE_ORIENTATION_NONE,
EFL_GFX_ORIENTATION_RIGHT, EFL_GFX_IMAGE_ORIENTATION_RIGHT,
EFL_GFX_ORIENTATION_DOWN, EFL_GFX_IMAGE_ORIENTATION_DOWN,
EFL_GFX_ORIENTATION_LEFT, EFL_GFX_IMAGE_ORIENTATION_LEFT,
EFL_GFX_ORIENTATION_FLIP_HORIZONTAL, EFL_GFX_IMAGE_ORIENTATION_FLIP_HORIZONTAL,
EFL_GFX_ORIENTATION_FLIP_VERTICAL, EFL_GFX_IMAGE_ORIENTATION_FLIP_VERTICAL,
EFL_GFX_ORIENTATION_LEFT | EFL_GFX_ORIENTATION_FLIP_VERTICAL, EFL_GFX_IMAGE_ORIENTATION_LEFT | EFL_GFX_IMAGE_ORIENTATION_FLIP_VERTICAL,
EFL_GFX_ORIENTATION_RIGHT | EFL_GFX_ORIENTATION_FLIP_VERTICAL EFL_GFX_IMAGE_ORIENTATION_RIGHT | EFL_GFX_IMAGE_ORIENTATION_FLIP_VERTICAL
}; };
EFL_UI_IMAGE_CHECK(obj); EFL_UI_IMAGE_CHECK(obj);
EFL_UI_IMAGE_DATA_GET(obj, sd); EFL_UI_IMAGE_DATA_GET(obj, sd);
EINA_SAFETY_ON_FALSE_RETURN(elm_orient >= 0 && elm_orient < 8); EINA_SAFETY_ON_FALSE_RETURN(elm_orient >= 0 && elm_orient < 8);
sd->image_orient = elm_orient; sd->image_orient = elm_orient;
efl_gfx_orientation_set(obj, efl_orient[elm_orient]); efl_gfx_image_orientation_set(obj, efl_orient[elm_orient]);
} }
EAPI Elm_Image_Orient EAPI Elm_Image_Orient

View File

@ -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, 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.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.Access.Component, Efl.Access.Widget.Action, Efl.Gfx.Color,
Efl.Gfx.Orientable, Efl.Gfx.Image_Orientable,
Efl.Layout.Calc, Efl.Layout.Calc,
Efl.Layout.Group, Efl.Layout.Signal 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_Load_Controller.load_size { get; set; }
Efl.Gfx.Image.smooth_scale { get; set; } Efl.Gfx.Image.smooth_scale { get; set; }
Efl.Gfx.Image.scale_type { get; set; } Efl.Gfx.Image.scale_type { get; set; }
Efl.Gfx.Orientable.orientation { get; set; } Efl.Gfx.Image_Orientable.orientation { get; set; }
Efl.Player.playable { get; } Efl.Player.playable { get; }
Efl.Player.play { get; set; } Efl.Player.play { get; set; }
Efl.Layout.Signal.signal_emit; Efl.Layout.Signal.signal_emit;

View File

@ -622,7 +622,7 @@ _grid_create(Evas_Object *obj)
g->grid[tn].img = g->grid[tn].img =
evas_object_image_add(evas_object_evas_get(obj)); evas_object_image_add(evas_object_evas_get(obj));
evas_object_image_load_orientation_set(g->grid[tn].img, EINA_TRUE); evas_object_image_load_orientation_set(g->grid[tn].img, EINA_TRUE);
efl_gfx_orientation_set(g->grid[tn].img, sd->orient); efl_gfx_image_orientation_set(g->grid[tn].img, sd->orient);
evas_object_image_scale_hint_set evas_object_image_scale_hint_set
(g->grid[tn].img, EVAS_IMAGE_SCALE_HINT_DYNAMIC); (g->grid[tn].img, EVAS_IMAGE_SCALE_HINT_DYNAMIC);
evas_object_pass_events_set(g->grid[tn].img, EINA_TRUE); 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_gfx_orientation_set(sd->img, sd->orient); efl_gfx_image_orientation_set(sd->img, sd->orient);
evas_object_image_size_get(sd->img, &iw, &ih); evas_object_image_size_get(sd->img, &iw, &ih);
sd->size.imw = iw; sd->size.imw = iw;
sd->size.imh = ih; sd->size.imh = ih;
@ -1331,8 +1331,8 @@ _orient_apply(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd)
} }
EOLIAN static void EOLIAN static void
_efl_ui_image_zoomable_efl_gfx_orientable_orientation_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, _efl_ui_image_zoomable_efl_gfx_image_orientable_orientation_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd,
Efl_Gfx_Orientation orient) Efl_Gfx_Image_Orientation orient)
{ {
if (sd->orient == orient) return; if (sd->orient == orient) return;
@ -1340,8 +1340,8 @@ _efl_ui_image_zoomable_efl_gfx_orientable_orientation_set(Eo *obj, Efl_Ui_Image_
_orient_apply(obj, sd); _orient_apply(obj, sd);
} }
EOLIAN static Efl_Gfx_Orientation EOLIAN static Efl_Gfx_Image_Orientation
_efl_ui_image_zoomable_efl_gfx_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd) _efl_ui_image_zoomable_efl_gfx_image_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Zoomable_Data *sd)
{ {
return sd->orient; return sd->orient;
} }
@ -2056,7 +2056,7 @@ _img_proxy_set(Evas_Object *obj, Efl_Ui_Image_Zoomable_Data *sd,
tz = sd->zoom; tz = sd->zoom;
sd->zoom = 0.0; sd->zoom = 0.0;
elm_photocam_zoom_set(obj, tz); elm_photocam_zoom_set(obj, tz);
sd->orient = EFL_GFX_ORIENTATION_NONE; sd->orient = EFL_GFX_IMAGE_ORIENTATION_NONE;
sd->orientation_changed = EINA_FALSE; sd->orientation_changed = EINA_FALSE;
return 0; return 0;
@ -2141,7 +2141,7 @@ _internal_file_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Evas_Load_Error *ret
tz = sd->zoom; tz = sd->zoom;
sd->zoom = 0.0; sd->zoom = 0.0;
elm_photocam_zoom_set(obj, tz); elm_photocam_zoom_set(obj, tz);
sd->orient = EFL_GFX_ORIENTATION_NONE; sd->orient = EFL_GFX_IMAGE_ORIENTATION_NONE;
sd->orientation_changed = EINA_FALSE; sd->orientation_changed = EINA_FALSE;
if (ret) *ret = evas_object_image_load_error_get(sd->img); 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); return elm_legacy_add(EFL_UI_IMAGE_ZOOMABLE_LEGACY_CLASS, parent);
} }
static inline Efl_Gfx_Orientation static inline Efl_Gfx_Image_Orientation
_evas_orient_to_efl_orient(const Evas_Image_Orient evas_orient) _evas_orient_to_efl_orient(const Evas_Image_Orient evas_orient)
{ {
// This array takes an Elm_Image_Orient and turns it into an Efl_Gfx_Orientation // This array takes an Elm_Image_Orient and turns it into an Efl_Gfx_Image_Orientation
static const Efl_Gfx_Orientation efl_orient[8] = { static const Efl_Gfx_Image_Orientation efl_orient[8] = {
EFL_GFX_ORIENTATION_NONE, EFL_GFX_IMAGE_ORIENTATION_NONE,
EFL_GFX_ORIENTATION_RIGHT, EFL_GFX_IMAGE_ORIENTATION_RIGHT,
EFL_GFX_ORIENTATION_DOWN, EFL_GFX_IMAGE_ORIENTATION_DOWN,
EFL_GFX_ORIENTATION_LEFT, EFL_GFX_IMAGE_ORIENTATION_LEFT,
EFL_GFX_ORIENTATION_FLIP_HORIZONTAL, EFL_GFX_IMAGE_ORIENTATION_FLIP_HORIZONTAL,
EFL_GFX_ORIENTATION_FLIP_VERTICAL, EFL_GFX_IMAGE_ORIENTATION_FLIP_VERTICAL,
EFL_GFX_ORIENTATION_LEFT | EFL_GFX_ORIENTATION_FLIP_VERTICAL, EFL_GFX_IMAGE_ORIENTATION_LEFT | EFL_GFX_IMAGE_ORIENTATION_FLIP_VERTICAL,
EFL_GFX_ORIENTATION_RIGHT | EFL_GFX_ORIENTATION_FLIP_VERTICAL EFL_GFX_IMAGE_ORIENTATION_RIGHT | EFL_GFX_IMAGE_ORIENTATION_FLIP_VERTICAL
}; };
EINA_SAFETY_ON_FALSE_RETURN_VAL(evas_orient >= 0 && evas_orient < 8, EFL_GFX_ORIENTATION_NONE); EINA_SAFETY_ON_FALSE_RETURN_VAL(evas_orient >= 0 && evas_orient < 8, EFL_GFX_IMAGE_ORIENTATION_NONE);
return efl_orient[evas_orient]; return efl_orient[evas_orient];
} }
static inline Evas_Image_Orient static inline Evas_Image_Orient
_efl_orient_to_evas_orient(Efl_Gfx_Orientation efl_orient) _efl_orient_to_evas_orient(Efl_Gfx_Image_Orientation efl_orient)
{ {
// This array takes an Efl_Gfx_Orientation and turns it into an Elm_Image_Orient // This array takes an Efl_Gfx_Image_Orientation and turns it into an Elm_Image_Orient
static const Evas_Image_Orient evas_orient[16] = { static const Evas_Image_Orient evas_orient[16] = {
EVAS_IMAGE_ORIENT_NONE, // EFL_GFX_ORIENTATION_NONE EVAS_IMAGE_ORIENT_NONE, // EFL_GFX_IMAGE_ORIENTATION_NONE
EVAS_IMAGE_ORIENT_90, // EFL_GFX_ORIENTATION_RIGHT EVAS_IMAGE_ORIENT_90, // EFL_GFX_IMAGE_ORIENTATION_RIGHT
EVAS_IMAGE_ORIENT_180, // EFL_GFX_ORIENTATION_DOWN EVAS_IMAGE_ORIENT_180, // EFL_GFX_IMAGE_ORIENTATION_DOWN
EVAS_IMAGE_ORIENT_270, // EFL_GFX_ORIENTATION_LEFT EVAS_IMAGE_ORIENT_270, // EFL_GFX_IMAGE_ORIENTATION_LEFT
EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_ORIENTATION_NONE + FLIP_HOR EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_IMAGE_ORIENTATION_NONE + FLIP_HOR
EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_ORIENTATION_RIGHT + FLIP_HOR EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_IMAGE_ORIENTATION_RIGHT + FLIP_HOR
EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_ORIENTATION_DOWN + FLIP_HOR EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_IMAGE_ORIENTATION_DOWN + FLIP_HOR
EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_ORIENTATION_LEFT + FLIP_HOR EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_IMAGE_ORIENTATION_LEFT + FLIP_HOR
EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_ORIENTATION_NONE + FLIP_VER EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_IMAGE_ORIENTATION_NONE + FLIP_VER
EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_ORIENTATION_RIGHT + FLIP_VER EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_IMAGE_ORIENTATION_RIGHT + FLIP_VER
EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_ORIENTATION_DOWN + FLIP_VER EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_IMAGE_ORIENTATION_DOWN + FLIP_VER
EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_ORIENTATION_LEFT + FLIP_VER EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_IMAGE_ORIENTATION_LEFT + FLIP_VER
EVAS_IMAGE_ORIENT_180, // EFL_GFX_ORIENTATION_NONE + FLIP_HOR + FLIP_VER EVAS_IMAGE_ORIENT_180, // EFL_GFX_IMAGE_ORIENTATION_NONE + FLIP_HOR + FLIP_VER
EVAS_IMAGE_ORIENT_270, // EFL_GFX_ORIENTATION_RIGHT + FLIP_HOR + FLIP_VER EVAS_IMAGE_ORIENT_270, // EFL_GFX_IMAGE_ORIENTATION_RIGHT + FLIP_HOR + FLIP_VER
EVAS_IMAGE_ORIENT_0, // EFL_GFX_ORIENTATION_DOWN + FLIP_HOR + FLIP_VER EVAS_IMAGE_ORIENT_0, // EFL_GFX_IMAGE_ORIENTATION_DOWN + FLIP_HOR + FLIP_VER
EVAS_IMAGE_ORIENT_90 // EFL_GFX_ORIENTATION_LEFT + FLIP_HOR + FLIP_VER EVAS_IMAGE_ORIENT_90 // EFL_GFX_IMAGE_ORIENTATION_LEFT + FLIP_HOR + FLIP_VER
}; };
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_orient >= 0 && efl_orient < 16, EVAS_IMAGE_ORIENT_NONE); EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_orient >= 0 && efl_orient < 16, EVAS_IMAGE_ORIENT_NONE);
return evas_orient[efl_orient]; return evas_orient[efl_orient];
@ -3219,7 +3219,7 @@ _efl_orient_to_evas_orient(Efl_Gfx_Orientation efl_orient)
EAPI void EAPI void
elm_photocam_image_orient_set(Eo *obj, Evas_Image_Orient evas_orient) elm_photocam_image_orient_set(Eo *obj, Evas_Image_Orient evas_orient)
{ {
efl_gfx_orientation_set(obj, _evas_orient_to_efl_orient(evas_orient)); efl_gfx_image_orientation_set(obj, _evas_orient_to_efl_orient(evas_orient));
} }
EAPI Evas_Image_Orient EAPI Evas_Image_Orient

View File

@ -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.Access.Widget.Action.elm_actions { get; }
Efl.File.load; Efl.File.load;
Efl.File.file { get; set; } Efl.File.file { get; set; }
Efl.Gfx.Orientable.orientation { get; set; } Efl.Gfx.Image_Orientable.orientation { get; set; }
Efl.Layout.Group.group_size_min { get; } Efl.Layout.Group.group_size_min { get; }
Efl.Layout.Group.group_size_max { get; } Efl.Layout.Group.group_size_max { get; }
Efl.Layout.Signal.signal_callback_add; Efl.Layout.Signal.signal_callback_add;

View File

@ -129,7 +129,7 @@ struct _Efl_Ui_Image_Zoomable_Data
int frame_count; int frame_count;
Eina_List *grids; Eina_List *grids;
Efl_Gfx_Orientation orient; Efl_Gfx_Image_Orientation orient;
Eina_Bool main_load_pending : 1; Eina_Bool main_load_pending : 1;
Eina_Bool longpressed : 1; Eina_Bool longpressed : 1;

View File

@ -65,7 +65,7 @@ struct _Efl_Ui_Image_Data
int cur_frame; int cur_frame;
Elm_Image_Orient image_orient; // to support EAPI Elm_Image_Orient image_orient; // to support EAPI
Efl_Gfx_Orientation orient; Efl_Gfx_Image_Orientation orient;
struct { struct {
Ecore_Thread *th; Ecore_Thread *th;

View File

@ -1,7 +1,7 @@
abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements Efl.Canvas.Filter.Internal, abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements Efl.Canvas.Filter.Internal,
Efl.Gfx.Image, Efl.Gfx.Buffer, Efl.Gfx.Image, Efl.Gfx.Buffer,
Efl.Gfx.Fill, Efl.Gfx.View, Efl.Gfx.Fill, Efl.Gfx.View,
Efl.Gfx.Orientable, Efl.File_Save Efl.Gfx.Image_Orientable, Efl.File_Save
{ {
[[Efl canvas internal image class]] [[Efl canvas internal image class]]
data: Evas_Image_Data; 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.finalize;
Efl.Object.debug_name_override; Efl.Object.debug_name_override;
Efl.File_Save.save; Efl.File_Save.save;
Efl.Gfx.Orientable.orientation { get; set; } Efl.Gfx.Image_Orientable.orientation { get; set; }
Efl.Gfx.Image.smooth_scale { get; set; } Efl.Gfx.Image.smooth_scale { get; set; }
Efl.Gfx.Image.ratio { get; } Efl.Gfx.Image.ratio { get; }
Efl.Gfx.Image.border { get; set; } Efl.Gfx.Image.border { get; set; }

View File

@ -115,7 +115,7 @@ struct _Evas_Image_Data
Efl_Gfx_Image_Scale_Hint scale_hint; Efl_Gfx_Image_Scale_Hint scale_hint;
Efl_Gfx_Image_Content_Hint content_hint; Efl_Gfx_Image_Content_Hint content_hint;
Efl_Gfx_Orientation orient_value; Efl_Gfx_Image_Orientation orient_value;
struct { struct {
short w, h; short w, h;

View File

@ -412,26 +412,26 @@ _evas_image_orientation_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Orient or
} }
EOLIAN static void EOLIAN static void
_efl_canvas_image_internal_efl_gfx_orientable_orientation_set(Eo *obj, Evas_Image_Data *o, Efl_Gfx_Orientation efl_orient) _efl_canvas_image_internal_efl_gfx_image_orientable_orientation_set(Eo *obj, Evas_Image_Data *o, Efl_Gfx_Image_Orientation efl_orient)
{ {
// This array takes an Efl_Gfx_Orientation and turns it into an Elm_Image_Orient // This array takes an Efl_Gfx_Image_Orientation and turns it into an Elm_Image_Orient
static const Evas_Image_Orient evas_orient[16] = { static const Evas_Image_Orient evas_orient[16] = {
EVAS_IMAGE_ORIENT_NONE, // EFL_GFX_ORIENTATION_NONE EVAS_IMAGE_ORIENT_NONE, // EFL_GFX_IMAGE_ORIENTATION_NONE
EVAS_IMAGE_ORIENT_90, // EFL_GFX_ORIENTATION_RIGHT EVAS_IMAGE_ORIENT_90, // EFL_GFX_IMAGE_ORIENTATION_RIGHT
EVAS_IMAGE_ORIENT_180, // EFL_GFX_ORIENTATION_DOWN EVAS_IMAGE_ORIENT_180, // EFL_GFX_IMAGE_ORIENTATION_DOWN
EVAS_IMAGE_ORIENT_270, // EFL_GFX_ORIENTATION_LEFT EVAS_IMAGE_ORIENT_270, // EFL_GFX_IMAGE_ORIENTATION_LEFT
EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_ORIENTATION_NONE + FLIP_HOR EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_IMAGE_ORIENTATION_NONE + FLIP_HOR
EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_ORIENTATION_RIGHT + FLIP_HOR EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_IMAGE_ORIENTATION_RIGHT + FLIP_HOR
EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_ORIENTATION_DOWN + FLIP_HOR EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_IMAGE_ORIENTATION_DOWN + FLIP_HOR
EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_ORIENTATION_LEFT + FLIP_HOR EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_IMAGE_ORIENTATION_LEFT + FLIP_HOR
EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_ORIENTATION_NONE + FLIP_VER EVAS_IMAGE_FLIP_VERTICAL, // EFL_GFX_IMAGE_ORIENTATION_NONE + FLIP_VER
EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_ORIENTATION_RIGHT + FLIP_VER EVAS_IMAGE_FLIP_TRANSVERSE, // EFL_GFX_IMAGE_ORIENTATION_RIGHT + FLIP_VER
EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_ORIENTATION_DOWN + FLIP_VER EVAS_IMAGE_FLIP_HORIZONTAL, // EFL_GFX_IMAGE_ORIENTATION_DOWN + FLIP_VER
EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_ORIENTATION_LEFT + FLIP_VER EVAS_IMAGE_FLIP_TRANSPOSE, // EFL_GFX_IMAGE_ORIENTATION_LEFT + FLIP_VER
EVAS_IMAGE_ORIENT_180, // EFL_GFX_ORIENTATION_NONE + FLIP_HOR + FLIP_VER EVAS_IMAGE_ORIENT_180, // EFL_GFX_IMAGE_ORIENTATION_NONE + FLIP_HOR + FLIP_VER
EVAS_IMAGE_ORIENT_270, // EFL_GFX_ORIENTATION_RIGHT + FLIP_HOR + FLIP_VER EVAS_IMAGE_ORIENT_270, // EFL_GFX_IMAGE_ORIENTATION_RIGHT + FLIP_HOR + FLIP_VER
EVAS_IMAGE_ORIENT_0, // EFL_GFX_ORIENTATION_DOWN + FLIP_HOR + FLIP_VER EVAS_IMAGE_ORIENT_0, // EFL_GFX_IMAGE_ORIENTATION_DOWN + FLIP_HOR + FLIP_VER
EVAS_IMAGE_ORIENT_90 // EFL_GFX_ORIENTATION_LEFT + FLIP_HOR + FLIP_VER EVAS_IMAGE_ORIENT_90 // EFL_GFX_IMAGE_ORIENTATION_LEFT + FLIP_HOR + FLIP_VER
}; };
EINA_SAFETY_ON_FALSE_RETURN(efl_orient >= 0 && efl_orient < 16); EINA_SAFETY_ON_FALSE_RETURN(efl_orient >= 0 && efl_orient < 16);
@ -439,8 +439,8 @@ _efl_canvas_image_internal_efl_gfx_orientable_orientation_set(Eo *obj, Evas_Imag
_evas_image_orientation_set(obj, o, evas_orient[efl_orient]); _evas_image_orientation_set(obj, o, evas_orient[efl_orient]);
} }
EOLIAN static Efl_Gfx_Orientation EOLIAN static Efl_Gfx_Image_Orientation
_efl_canvas_image_internal_efl_gfx_orientable_orientation_get(const Eo *obj EINA_UNUSED, Evas_Image_Data *o) _efl_canvas_image_internal_efl_gfx_image_orientable_orientation_get(const Eo *obj EINA_UNUSED, Evas_Image_Data *o)
{ {
return o->orient_value; return o->orient_value;
} }