Efl: Rename flip and orient enums

Efl.Flip is now the enum, the interface is Flipable.
We could even use names like Efl.IFlip a la Java.

eo_prefix is used to have pretty names in C. legacy: null
is removed from the enums. orient_x0 is removed and only
defined in C with #define
This commit is contained in:
Jean-Philippe Andre 2016-04-07 17:32:40 +09:00
parent 7f9036dce5
commit d1709a2b57
11 changed files with 40 additions and 40 deletions

View File

@ -24,7 +24,7 @@ efl_eolian_files = \
lib/efl/interfaces/efl_model_base.eo \
lib/efl/interfaces/efl_animator.eo \
lib/efl/interfaces/efl_orientation.eo \
lib/efl/interfaces/efl_flip.eo \
lib/efl/interfaces/efl_flipable.eo \
lib/efl/interfaces/efl_vpath.eo \
lib/efl/interfaces/efl_vpath_manager.eo \
lib/efl/interfaces/efl_vpath_file.eo \

View File

@ -70,9 +70,14 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
#include "interfaces/efl_text.eo.h"
#include "interfaces/efl_text_properties.eo.h"
#include "interfaces/efl_orientation.eo.h"
#include "interfaces/efl_flip.eo.h"
#include "interfaces/efl_flipable.eo.h"
#include "interfaces/efl_ui_progress.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_animator.eo.h"

View File

@ -1,20 +1,20 @@
enum Efl.Flip_Value
enum Efl.Flip
{
[[Flip
See also @Efl.Flip
See also @Efl.Flipable
]]
legacy: efl;
flip_none = 0, [[no flip]]
flip_horizontal = 1, [[flip image horizontally]]
flip_vertical = 2 [[flip image vertically]]
none = 0, [[no flip]]
horizontal = 1, [[flip image horizontally]]
vertical = 2 [[flip image vertically]]
}
interface Efl.Flip
interface Efl.Flipable
{
legacy_prefix: null;
eo_prefix: efl_flip;
methods {
@property flip{
@property flip {
[[Control the flip of the given image
Use this function to change how your image is to be
@ -25,7 +25,7 @@ interface Efl.Flip
get {
}
values {
flip: Efl.Flip_Value; [[Flip]]
flip: Efl.Flip; [[Flip]]
}
}
}

View File

@ -36,7 +36,7 @@ EAPI const Eo_Event_Description _EFL_GFX_PATH_CHANGED =
#include "interfaces/efl_model_base.eo.c"
#include "interfaces/efl_animator.eo.c"
#include "interfaces/efl_orientation.eo.c"
#include "interfaces/efl_flip.eo.c"
#include "interfaces/efl_flipable.eo.c"
#include "interfaces/efl_ui_progress.eo.c"
EAPI void

View File

@ -4,18 +4,13 @@ enum Efl.Orient
See also @Efl.Orientation
]]
legacy: efl;
orient_none = 0,
orient_0 = 0, [[no orientation change]]
orient_90 = 90, [[orient 90 degrees clockwise]]
orient_180 = 180, [[orient 180 degrees clockwise]]
orient_270 = 270, [[rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise)]]
orient_up = 0, [[orient up]]
orient_right = 90, [[orient right]]
orient_down = 180, [[orient down]]
orient_left = 270, [[orient left]]
orient_vertical = 0, [[orient vertical]]
orient_horizontal = 90 [[orient horizontal]]
none = 0,
up = 0, [[orient up]]
right = 90, [[orient right]]
down = 180, [[orient down]]
left = 270, [[orient left]]
vertical = 0, [[orient vertical]]
horizontal = 90 [[orient horizontal]]
}

View File

@ -1248,7 +1248,7 @@ _elm_image_efl_orientation_orientation_get(Eo *obj EINA_UNUSED, Elm_Image_Data *
EOLIAN static void
_elm_image_efl_flip_flip_set(Eo *obj, Elm_Image_Data *sd, Efl_Flip_Value flip)
_elm_image_efl_flipable_flip_set(Eo *obj, Elm_Image_Data *sd, Efl_Flip flip)
{
if (sd->edje) return;
if (sd->flip == flip) return;
@ -1259,8 +1259,8 @@ _elm_image_efl_flip_flip_set(Eo *obj, Elm_Image_Data *sd, Efl_Flip_Value flip)
_elm_image_internal_sizing_eval(obj, sd);
}
EOLIAN static Efl_Flip_Value
_elm_image_efl_flip_flip_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
EOLIAN static Efl_Flip
_elm_image_efl_flipable_flip_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
{
return sd->flip;
}
@ -1654,7 +1654,7 @@ EAPI void
elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient)
{
Efl_Orient dir;
Efl_Flip_Value flip;
Efl_Flip flip;
ELM_IMAGE_DATA_GET(obj, sd);
sd->image_orient = orient;

View File

@ -23,7 +23,7 @@ struct Elm.Image.Error
class Elm.Image (Elm.Widget, Evas.Clickable_Interface, Evas.Draggable_Interface,
Efl.File, Efl.Image, Efl.Image_Load, Efl.Player, Efl.Gfx.View, Efl.Player,
Elm.Interface_Atspi_Image, Elm.Interface_Atspi_Widget_Action,
Edje.Object, Efl.Orientation, Efl.Flip)
Edje.Object, Efl.Orientation, Efl.Flipable)
{
eo_prefix: elm_obj_image;
methods {
@ -117,8 +117,8 @@ class Elm.Image (Elm.Widget, Evas.Clickable_Interface, Evas.Draggable_Interface,
Efl.Image.smooth_scale.get;
Efl.Orientation.orientation.set;
Efl.Orientation.orientation.get;
Efl.Flip.flip.set;
Efl.Flip.flip.get;
Efl.Flipable.flip.set;
Efl.Flipable.flip.get;
Efl.Player.playable.get;
Efl.Player.play.set;
Efl.Player.play.get;

View File

@ -63,7 +63,7 @@ struct _Elm_Image_Data
Elm_Image_Orient image_orient; // to support EAPI
Efl_Orient orient;
Efl_Flip_Value flip;
Efl_Flip flip;
struct {
Ecore_Thread *th;

View File

@ -2,7 +2,7 @@ type @extern Evas_Object_Image_Pixels_Get_Cb: __undefined_type; /* FIXME: func p
class Evas.Image (Evas.Object, Evas.Filter,
Efl.Image, Efl.Gfx.Buffer, Efl.Gfx.Fill, Efl.Gfx.View, Efl.File,
Efl.Orientation, Efl.Flip)
Efl.Orientation, Efl.Flipable)
{
/* Legacy is implement inside Efl.Canvas.Image */
legacy_prefix: evas_object_image;
@ -15,8 +15,8 @@ class Evas.Image (Evas.Object, Evas.Filter,
Efl.File.save;
Efl.Orientation.orientation.get;
Efl.Orientation.orientation.set;
Efl.Flip.flip.set;
Efl.Flip.flip.get;
Efl.Flipable.flip.set;
Efl.Flipable.flip.get;
Efl.Image.smooth_scale.set;
Efl.Image.smooth_scale.get;
Efl.Image.ratio.get;

View File

@ -114,7 +114,7 @@ struct _Evas_Image_Data
Efl_Image_Scale_Hint scale_hint;
Efl_Image_Content_Hint content_hint;
Efl_Flip_Value flip_value;
Efl_Flip flip_value;
Efl_Orient orient_value;
Eina_Bool changed : 1;

View File

@ -391,7 +391,7 @@ _evas_image_orientation_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Orient or
}
static Evas_Image_Orient
_get_image_orient_from_orient_flip(Efl_Orient orient, Efl_Flip_Value flip)
_get_image_orient_from_orient_flip(Efl_Orient orient, Efl_Flip flip)
{
switch (orient)
{
@ -446,7 +446,7 @@ _evas_image_efl_orientation_orientation_get(Eo *obj EINA_UNUSED, Evas_Image_Data
}
EOLIAN static void
_evas_image_efl_flip_flip_set(Eo *obj, Evas_Image_Data *o, Efl_Flip_Value flip)
_evas_image_efl_flipable_flip_set(Eo *obj, Evas_Image_Data *o, Efl_Flip flip)
{
Evas_Image_Orient orient;
@ -456,8 +456,8 @@ _evas_image_efl_flip_flip_set(Eo *obj, Evas_Image_Data *o, Efl_Flip_Value flip)
_evas_image_orientation_set(obj, o, orient);
}
EOLIAN static Efl_Flip_Value
_evas_image_efl_flip_flip_get(Eo *obj EINA_UNUSED, Evas_Image_Data *o)
EOLIAN static Efl_Flip
_evas_image_efl_flipable_flip_get(Eo *obj EINA_UNUSED, Evas_Image_Data *o)
{
return o->flip_value;
}