#include <Elementary.h>
#include "elm_priv.h"
-#include "elm_widget_flip.h"
+#include "efl_ui_widget_flip.h"
#include "elm_widget_container.h"
-#include "elm_flip_internal_part.eo.h"
+#include "efl_ui_flip_internal_part.eo.h"
#include "elm_part_helper.h"
-#define MY_CLASS ELM_FLIP_CLASS
+#define MY_CLASS EFL_UI_FLIP_CLASS
-#define MY_CLASS_NAME "Elm_Flip"
+#define MY_CLASS_NAME "Efl_Ui_Flip"
#define MY_CLASS_NAME_LEGACY "elm_flip"
static const char SIG_ANIMATE_BEGIN[] = "animate,begin";
static Eina_Bool _flip(Evas_Object *obj);
+static void _update_front_back(Eo *obj, Efl_Ui_Flip_Data *sd);
+
static void
_slice_free(Slice *sl)
{
}
static void
-_state_slices_clear(Elm_Flip_Data *sd)
+_state_slices_clear(Efl_Ui_Flip_Data *sd)
{
int i, j, num;
Evas_Coord maxw = -1, maxh = -1, maxw2 = -1, maxh2 = -1;
int fingx = 0, fingy = 0;
- ELM_FLIP_DATA_GET(obj, sd);
+ EFL_UI_FLIP_DATA_GET(obj, sd);
if (sd->front.content)
evas_object_size_hint_min_get(sd->front.content, &minw, &minh);
}
EOLIAN static Eina_Bool
-_elm_flip_elm_widget_theme_apply(Eo *obj, Elm_Flip_Data *sd EINA_UNUSED)
+_efl_ui_flip_elm_widget_theme_apply(Eo *obj, Efl_Ui_Flip_Data *sd EINA_UNUSED)
{
Eina_Bool int_ret = EINA_FALSE;
int_ret = elm_obj_widget_theme_apply(eo_super(obj, MY_CLASS));
}
EOLIAN static Eina_Bool
-_elm_flip_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Flip_Data *_pd EINA_UNUSED)
+_efl_ui_flip_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *_pd EINA_UNUSED)
{
return EINA_TRUE;
}
EOLIAN static Eina_Bool
-_elm_flip_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
+_efl_ui_flip_elm_widget_focus_next(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *sd, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
{
/* attempt to cycle focus on in sub-items */
}
EOLIAN static Eina_Bool
-_elm_flip_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Flip_Data *_pd EINA_UNUSED)
+_efl_ui_flip_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *_pd EINA_UNUSED)
{
if (!elm_widget_can_focus_get(obj))
return EINA_TRUE;
}
EOLIAN static Eina_Bool
-_elm_flip_elm_widget_focus_direction(Eo *obj, Elm_Flip_Data *sd, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
+_efl_ui_flip_elm_widget_focus_direction(Eo *obj, Efl_Ui_Flip_Data *sd, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
{
Eina_Bool ret;
}
EOLIAN static Eina_Bool
-_elm_flip_elm_widget_sub_object_add(Eo *obj, Elm_Flip_Data *_pd EINA_UNUSED, Evas_Object *sobj)
+_efl_ui_flip_elm_widget_sub_object_add(Eo *obj, Efl_Ui_Flip_Data *_pd EINA_UNUSED, Evas_Object *sobj)
{
Eina_Bool int_ret = EINA_FALSE;
}
EOLIAN static Eina_Bool
-_elm_flip_elm_widget_sub_object_del(Eo *obj, Elm_Flip_Data *sd, Evas_Object *sobj)
+_efl_ui_flip_elm_widget_sub_object_del(Eo *obj, Efl_Ui_Flip_Data *sd, Evas_Object *sobj)
{
Eina_Bool int_ret = EINA_FALSE;
}
static void
-_slice_apply(Elm_Flip_Data *sd,
+_slice_apply(Efl_Ui_Flip_Data *sd,
Slice *sl,
Evas_Coord x EINA_UNUSED,
Evas_Coord y EINA_UNUSED,
}
static void
-_slice_3d(Elm_Flip_Data *sd EINA_UNUSED,
+_slice_3d(Efl_Ui_Flip_Data *sd EINA_UNUSED,
Slice *sl,
Evas_Coord x,
Evas_Coord y,
}
static void
-_slice_light(Elm_Flip_Data *sd EINA_UNUSED,
+_slice_light(Efl_Ui_Flip_Data *sd EINA_UNUSED,
Slice *sl,
Evas_Coord x,
Evas_Coord y,
}
static void
-_slice_xyz(Elm_Flip_Data *sd EINA_UNUSED,
+_slice_xyz(Efl_Ui_Flip_Data *sd EINA_UNUSED,
Slice *sl,
double xx1,
double yy1,
}
static void
-_slice_uv(Elm_Flip_Data *sd EINA_UNUSED,
+_slice_uv(Efl_Ui_Flip_Data *sd EINA_UNUSED,
Slice *sl,
double u1,
double v1,
static int
_state_update(Evas_Object *obj)
{
- Elm_Flip_Data *sd = eo_data_scope_get(obj, MY_CLASS);
+ Efl_Ui_Flip_Data *sd = eo_data_scope_get(obj, MY_CLASS);
Slice *sl;
Vertex3 *tvo, *tvol;
Evas_Object *front, *back;
}
static void
-_state_end(Elm_Flip_Data *sd)
+_state_end(Efl_Ui_Flip_Data *sd)
{
_state_slices_clear(sd);
}
static void
_flip_show_hide(Evas_Object *obj)
{
- ELM_FLIP_DATA_GET(obj, sd);
+ EFL_UI_FLIP_DATA_GET(obj, sd);
if (elm_flip_front_visible_get(obj))
{
if (sd->pageflip)
Evas_Coord cx, cy, px, py, foc;
int lx, ly, lz, lr, lg, lb, lar, lag, lab;
- ELM_FLIP_DATA_GET(obj, sd);
+ EFL_UI_FLIP_DATA_GET(obj, sd);
mf = evas_map_new(4);
evas_map_smooth_set(mf, EINA_FALSE);
static void
_show_hide(Evas_Object *obj)
{
- ELM_FLIP_DATA_GET(obj, sd);
+ EFL_UI_FLIP_DATA_GET(obj, sd);
Evas_Coord x, y, w, h;
if (!sd) return;
Evas_Coord x, y, w, h;
Evas_Coord fsize;
- ELM_FLIP_DATA_GET(obj, sd);
+ EFL_UI_FLIP_DATA_GET(obj, sd);
_show_hide(obj);
evas_object_geometry_get(obj, &x, &y, &w, &h);
// FIXME: manual flip wont get fixed
double t;
Evas_Coord w, h;
- ELM_FLIP_DATA_GET(obj, sd);
+ EFL_UI_FLIP_DATA_GET(obj, sd);
t = ecore_loop_time_get() - sd->start;
sd->state = sd->next_state;
_configure(obj);
_flip_show_hide(obj);
- eo_event_callback_call(obj, ELM_FLIP_EVENT_ANIMATE_DONE, NULL);
+ eo_event_callback_call(obj, EFL_UI_FLIP_EVENT_ANIMATE_DONE, NULL);
+
+ // update the new front and back object.
+ _update_front_back(obj, sd);
return ECORE_CALLBACK_CANCEL;
}
static double
_pos_get(Evas_Object *obj,
- Elm_Flip_Data *sd,
+ Efl_Ui_Flip_Data *sd,
int *rev,
Elm_Flip_Mode *m)
{
evas_object_geometry_get(obj, &x, &y, &w, &h);
switch (sd->intmode)
{
- case ELM_FLIP_INTERACTION_ROTATE:
- case ELM_FLIP_INTERACTION_CUBE:
+ case EFL_UI_FLIP_INTERACTION_ROTATE:
+ case EFL_UI_FLIP_INTERACTION_CUBE:
{
if (sd->dir == ELM_FLIP_DIRECTION_LEFT)
{
if ((sd->dir == ELM_FLIP_DIRECTION_LEFT) ||
(sd->dir == ELM_FLIP_DIRECTION_RIGHT))
{
- if (sd->intmode == ELM_FLIP_INTERACTION_ROTATE)
+ if (sd->intmode == EFL_UI_FLIP_INTERACTION_ROTATE)
*m = ELM_FLIP_ROTATE_Y_CENTER_AXIS;
- else if (sd->intmode == ELM_FLIP_INTERACTION_CUBE)
+ else if (sd->intmode == EFL_UI_FLIP_INTERACTION_CUBE)
{
if (*rev)
*m = ELM_FLIP_CUBE_LEFT;
}
else
{
- if (sd->intmode == ELM_FLIP_INTERACTION_ROTATE)
+ if (sd->intmode == EFL_UI_FLIP_INTERACTION_ROTATE)
*m = ELM_FLIP_ROTATE_X_CENTER_AXIS;
- else if (sd->intmode == ELM_FLIP_INTERACTION_CUBE)
+ else if (sd->intmode == EFL_UI_FLIP_INTERACTION_CUBE)
{
if (*rev)
*m = ELM_FLIP_CUBE_UP;
_event_anim(void *data,
double pos)
{
- Elm_Flip_Data *sd = data;
+ Efl_Ui_Flip_Data *sd = data;
double p;
p = ecore_animator_pos_map(pos, ECORE_POS_MAP_ACCELERATE, 0.0, 0.0);
}
switch (sd->intmode)
{
- case ELM_FLIP_INTERACTION_NONE:
+ case EFL_UI_FLIP_INTERACTION_NONE:
break;
- case ELM_FLIP_INTERACTION_ROTATE:
- case ELM_FLIP_INTERACTION_CUBE:
+ case EFL_UI_FLIP_INTERACTION_ROTATE:
+ case EFL_UI_FLIP_INTERACTION_CUBE:
{
Elm_Flip_Mode m = ELM_FLIP_ROTATE_X_CENTER_AXIS;
int rev = 0;
}
break;
- case ELM_FLIP_INTERACTION_PAGE:
+ case EFL_UI_FLIP_INTERACTION_PAGE:
sd->pageflip = EINA_TRUE;
_configure(sd->obj);
_state_update(sd->obj);
_configure(sd->obj);
sd->animator = NULL;
eo_event_callback_call
- (sd->obj, ELM_FLIP_EVENT_ANIMATE_DONE, NULL);
+ (sd->obj, EFL_UI_FLIP_EVENT_ANIMATE_DONE, NULL);
return ECORE_CALLBACK_CANCEL;
}
{
Elm_Flip_Mode m = ELM_FLIP_ROTATE_X_CENTER_AXIS;
Evas_Object *obj = data;
- Elm_Flip_Data *sd = eo_data_scope_get(obj, MY_CLASS);
+ Efl_Ui_Flip_Data *sd = eo_data_scope_get(obj, MY_CLASS);
int rev = 0;
double p;
sd->job = NULL;
switch (sd->intmode)
{
- case ELM_FLIP_INTERACTION_ROTATE:
- case ELM_FLIP_INTERACTION_CUBE:
+ case EFL_UI_FLIP_INTERACTION_ROTATE:
+ case EFL_UI_FLIP_INTERACTION_CUBE:
p = _pos_get(obj, sd, &rev, &m);
_flip_do(obj, p, m, 1, rev);
break;
- case ELM_FLIP_INTERACTION_PAGE:
+ case EFL_UI_FLIP_INTERACTION_PAGE:
sd->pageflip = EINA_TRUE;
_configure(obj);
_state_update(obj);
Evas_Object *fl = data;
Evas_Coord x, y, w, h;
- ELM_FLIP_DATA_GET(fl, sd);
+ EFL_UI_FLIP_DATA_GET(fl, sd);
if (ev->button != 1) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
Evas_Coord x, y, w, h;
double tm = 0.5;
- ELM_FLIP_DATA_GET(fl, sd);
+ EFL_UI_FLIP_DATA_GET(fl, sd);
if (ev->button != 1) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
Evas_Object *fl = data;
Evas_Coord x, y, w, h;
- ELM_FLIP_DATA_GET(fl, sd);
+ EFL_UI_FLIP_DATA_GET(fl, sd);
if (!sd->mouse_down) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
evas_object_geometry_get(data, &x, &y, &w, &h);
else return;
sd->started = EINA_TRUE;
- if (sd->intmode == ELM_FLIP_INTERACTION_PAGE)
+ if (sd->intmode == EFL_UI_FLIP_INTERACTION_PAGE)
sd->pageflip = EINA_TRUE;
_flip_show_hide(data);
evas_smart_objects_calculate(evas_object_evas_get(data));
evas_smart_objects_calculate(evas_object_evas_get(data));
_configure(fl);
// FIXME: end hack
- eo_event_callback_call(fl, ELM_FLIP_EVENT_ANIMATE_BEGIN, NULL);
+ eo_event_callback_call(fl, EFL_UI_FLIP_EVENT_ANIMATE_BEGIN, NULL);
}
else return;
}
int i;
Evas_Object **cont;
- ELM_FLIP_DATA_GET(obj, sd);
+ EFL_UI_FLIP_DATA_GET(obj, sd);
cont = front ? &(sd->front.content) : &(sd->back.content);
_configure(obj);
_sizing_eval(obj);
- if (sd->intmode != ELM_FLIP_INTERACTION_NONE)
+ if (sd->intmode != EFL_UI_FLIP_INTERACTION_NONE)
{
for (i = 0; i < 4; i++)
evas_object_raise(sd->event[i]);
Evas_Object *content;
Evas_Object **cont;
- ELM_FLIP_DATA_GET(obj, sd);
+ EFL_UI_FLIP_DATA_GET(obj, sd);
cont = front ? &(sd->front.content) : &(sd->back.content);
}
static Eina_Bool
-_elm_flip_content_set(Eo *obj, Elm_Flip_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content)
+_efl_ui_flip_content_set(Eo *obj, Efl_Ui_Flip_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content)
{
if (!part || !strcmp(part, "front"))
return _flip_content_set(obj, content, EINA_TRUE);
}
static Evas_Object*
-_elm_flip_content_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, const char *part)
+_efl_ui_flip_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *sd, const char *part)
{
if (!part || !strcmp(part, "front"))
return sd->front.content;
}
static Evas_Object*
-_elm_flip_content_unset(Eo *obj EINA_UNUSED, Elm_Flip_Data *_pd EINA_UNUSED, const char *part)
+_efl_ui_flip_content_unset(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *_pd EINA_UNUSED, const char *part)
{
if (!part || !strcmp(part, "front"))
return _flip_content_unset(obj, EINA_TRUE);
}
EOLIAN static void
-_elm_flip_evas_object_smart_add(Eo *obj, Elm_Flip_Data *priv)
+_efl_ui_flip_evas_object_smart_add(Eo *obj, Efl_Ui_Flip_Data *priv)
{
evas_obj_smart_add(eo_super(obj, MY_CLASS));
elm_widget_sub_object_parent_add(obj);
priv->state = EINA_TRUE;
priv->next_state = EINA_TRUE;
- priv->intmode = ELM_FLIP_INTERACTION_NONE;
+ priv->intmode = EFL_UI_FLIP_INTERACTION_NONE;
elm_widget_can_focus_set(obj, EINA_FALSE);
}
EOLIAN static void
-_elm_flip_evas_object_smart_del(Eo *obj, Elm_Flip_Data *sd)
+_efl_ui_flip_evas_object_smart_del(Eo *obj, Efl_Ui_Flip_Data *sd)
{
ecore_animator_del(sd->animator);
_state_slices_clear(sd);
}
EOLIAN static Eo *
-_elm_flip_eo_base_constructor(Eo *obj, Elm_Flip_Data *sd)
+_efl_ui_flip_eo_base_constructor(Eo *obj, Efl_Ui_Flip_Data *sd)
{
obj = eo_constructor(eo_super(obj, MY_CLASS));
sd->obj = obj;
}
EOLIAN static Eina_Bool
-_elm_flip_front_visible_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd)
+_efl_ui_flip_front_visible_get(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *sd)
{
return sd->state;
}
static void
_internal_elm_flip_go_to(Evas_Object *obj,
- Elm_Flip_Data *sd,
+ Efl_Ui_Flip_Data *sd,
Eina_Bool front,
Elm_Flip_Mode mode)
{
evas_smart_objects_calculate(evas_object_evas_get(obj));
_configure(obj);
// FIXME: end hack
- eo_event_callback_call(obj, ELM_FLIP_EVENT_ANIMATE_BEGIN, NULL);
+ eo_event_callback_call(obj, EFL_UI_FLIP_EVENT_ANIMATE_BEGIN, NULL);
// set focus to the content object when flip go to is called
if (elm_object_focus_get(obj))
}
EOLIAN static void
-_elm_flip_go_to(Eo *obj, Elm_Flip_Data *sd, Eina_Bool front, Elm_Flip_Mode mode)
+_efl_ui_flip_go_to(Eo *obj, Efl_Ui_Flip_Data *sd, Eina_Bool front, Elm_Flip_Mode mode)
{
if (sd->next_state == front) return;
}
EOLIAN static void
-_elm_flip_go(Eo *obj, Elm_Flip_Data *sd, Elm_Flip_Mode mode)
+_efl_ui_flip_go(Eo *obj, Efl_Ui_Flip_Data *sd, Elm_Flip_Mode mode)
{
_internal_elm_flip_go_to(obj, sd, !sd->state, mode);
}
static void
-_event_rect_create(Eo *obj, Elm_Flip_Data *sd, int i)
+_event_rect_create(Eo *obj, Efl_Ui_Flip_Data *sd, int i)
{
Evas_Object *clip;
Evas *e;
}
EOLIAN static void
-_elm_flip_interaction_set(Eo *obj, Elm_Flip_Data *sd, Elm_Flip_Interaction mode)
+_efl_ui_flip_interaction_set(Eo *obj, Efl_Ui_Flip_Data *sd, Efl_Ui_Flip_Interaction mode)
{
int i;
for (i = 0; i < 4; i++)
{
- if (sd->intmode == ELM_FLIP_INTERACTION_NONE)
+ if (sd->intmode == EFL_UI_FLIP_INTERACTION_NONE)
ELM_SAFE_FREE(sd->event[i], evas_object_del);
else if (sd->dir_enabled[i])
{
_configure(obj);
}
-EOLIAN static Elm_Flip_Interaction
-_elm_flip_interaction_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd)
+EOLIAN static Efl_Ui_Flip_Interaction
+_efl_ui_flip_interaction_get(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *sd)
{
return sd->intmode;
}
EOLIAN static void
-_elm_flip_interaction_direction_enabled_set(Eo *obj, Elm_Flip_Data *sd, Elm_Flip_Direction dir, Eina_Bool enabled)
+_efl_ui_flip_interaction_direction_enabled_set(Eo *obj, Efl_Ui_Flip_Data *sd, Efl_Orient dir, Eina_Bool enabled)
{
int i = (int) dir;
int area;
enabled = !!enabled;
if (sd->dir_enabled[i] == enabled) return;
sd->dir_enabled[i] = enabled;
- if (sd->intmode == ELM_FLIP_INTERACTION_NONE) return;
+ if (sd->intmode == EFL_UI_FLIP_INTERACTION_NONE) return;
area = (i & 0x2) | (i ^ 0x1); // up <-> down, left <-> right
if (enabled && (sd->dir_hitsize[area] >= 0.0))
}
EOLIAN static Eina_Bool
-_elm_flip_interaction_direction_enabled_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, Elm_Flip_Direction dir)
+_efl_ui_flip_interaction_direction_enabled_get(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *sd, Efl_Orient dir)
{
return sd->dir_enabled[(int) dir];
}
EOLIAN static void
-_elm_flip_interaction_direction_hitsize_set(Eo *obj, Elm_Flip_Data *sd, Elm_Flip_Direction dir, double hitsize)
+_efl_ui_flip_interaction_direction_hitsize_set(Eo *obj, Efl_Ui_Flip_Data *sd, Efl_Orient dir, double hitsize)
{
int i = (int) dir;
_configure(obj);
}
+static void
+_update_front_back(Eo *obj, Efl_Ui_Flip_Data *pd)
+{
+ int count, index;
+ Efl_Gfx *content;
+
+ count = eina_list_count(pd->content_list);
+ if (count <= 2) return;
+
+ // update the next state object
+ content = _flip_content_unset(obj, !pd->state);
+ evas_object_hide(content);
+ content = pd->state ? pd->front.content : pd->back.content;
+ index = eina_list_data_idx(pd->content_list, content);
+ index = (index == count-1) ? 0 : index + 1;
+ content = eina_list_nth(pd->content_list, index);
+ evas_object_show(content);
+ _flip_content_set(obj, content, !pd->state);
+}
+
+static void
+_content_added(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *content)
+{
+ evas_object_smart_member_add(content, obj);
+
+ if (!pd->front.content)
+ {
+ _flip_content_set(obj, content, EINA_TRUE);
+ return;
+ }
+ if (!pd->back.content)
+ {
+ _flip_content_set(obj, content, EINA_FALSE);
+ return;
+ }
+}
+
+static void
+_content_removed(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *content)
+{
+ Efl_Gfx *back_face, *cur_face, *face;
+ int index, count;
+ Eina_Bool state;
+
+ evas_object_smart_member_del(content);
+ // if its not the front or back object just return.
+ if ((pd->front.content != content) ||
+ (pd->back.content != content))
+ return;
+
+ cur_face = pd->state ? pd->front.content : pd->back.content;
+ back_face = pd->state ? pd->back.content : pd->front.content;
+
+ if (cur_face == content)
+ {
+ face = back_face;
+ state = EINA_TRUE;
+ }
+ else
+ {
+ face = cur_face;
+ state = EINA_FALSE;
+ }
+
+ _flip_content_unset(obj, state);
+
+ count = eina_list_count(pd->content_list);
+ if (count == 1) return;
+
+ _flip_content_unset(obj, state);
+ index = eina_list_data_idx(pd->content_list, face);
+ index = (index == count-1) ? 0 : index + 1;
+ _flip_content_set(obj, eina_list_nth(pd->content_list, index), state);
+}
+
EOLIAN static double
-_elm_flip_interaction_direction_hitsize_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, Elm_Flip_Direction dir)
+_efl_ui_flip_interaction_direction_hitsize_get(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *sd, Efl_Orient dir)
{
int i = (int) dir;
return sd->dir_hitsize[i];
}
+EOLIAN static Eina_Iterator *
+_efl_ui_flip_efl_container_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *pd)
+{
+ return eina_list_iterator_new(pd->content_list);
+}
+
+EOLIAN static int
+_efl_ui_flip_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *pd)
+{
+ return eina_list_count(pd->content_list);
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_flip_efl_container_content_remove(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *content)
+{
+ pd->content_list = eina_list_remove(pd->content_list, content);
+ _content_removed(obj, pd, content);
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_flip_efl_pack_unpack(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *subobj)
+{
+ pd->content_list = eina_list_remove(pd->content_list, subobj);
+ _content_removed(obj, pd, subobj);
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_flip_efl_pack_pack(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *subobj)
+{
+ pd->content_list = eina_list_append(pd->content_list, subobj);
+ _content_added(obj, pd, subobj);
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_flip_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *subobj)
+{
+ pd->content_list = eina_list_prepend(pd->content_list, subobj);
+ _content_added(obj, pd, subobj);
+
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_flip_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *subobj)
+{
+ pd->content_list = eina_list_append(pd->content_list, subobj);
+ _content_added(obj, pd, subobj);
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_flip_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *subobj, const Efl_Gfx *existing)
+{
+ pd->content_list = eina_list_prepend_relative(pd->content_list, subobj, existing);
+ _content_added(obj, pd, subobj);
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_flip_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *subobj, const Efl_Gfx *existing)
+{
+ pd->content_list = eina_list_append_relative(pd->content_list, subobj, existing);
+ _content_added(obj, pd, subobj);
+ return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_flip_efl_pack_linear_pack_at(Eo *obj, Efl_Ui_Flip_Data *pd, Efl_Gfx *subobj, int index)
+{
+ Efl_Gfx *existing = NULL;
+ existing = eina_list_nth(pd->content_list, index);
+ pd->content_list = eina_list_prepend_relative(pd->content_list, subobj, existing);
+ _content_added(obj, pd, subobj);
+ return EINA_TRUE;
+}
+
+EOLIAN static Efl_Gfx *
+_efl_ui_flip_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *pd, int index)
+{
+ return eina_list_nth(pd->content_list, index);
+}
+
+EOLIAN static Efl_Gfx *
+_efl_ui_flip_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Flip_Data *pd, int index)
+{
+ Efl_Gfx *content = eina_list_nth(pd->content_list ,index);
+
+ pd->content_list = eina_list_remove(pd->content_list, content);
+ _content_removed(obj, pd, content);
+ return content;
+}
+
+EOLIAN static int
+_efl_ui_flip_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Flip_Data *pd, const Efl_Gfx *subobj)
+{
+ return eina_list_data_idx(pd->content_list, (void *)subobj);
+}
+
static void
-_elm_flip_class_constructor(Eo_Class *klass)
+_efl_ui_flip_class_constructor(Eo_Class *klass)
{
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
+static Efl_Orient
+_to_efl_orientation(Elm_Flip_Direction dir)
+{
+ Efl_Orient res;
+ switch (dir)
+ {
+ case ELM_FLIP_DIRECTION_RIGHT:
+ res = EFL_ORIENT_RIGHT;
+ break;
+ case ELM_FLIP_DIRECTION_DOWN:
+ res = EFL_ORIENT_DOWN;
+ break;
+ case ELM_FLIP_DIRECTION_LEFT:
+ res = EFL_ORIENT_LEFT;
+ break;
+ default:
+ res = EFL_ORIENT_UP;
+ break;
+ }
+ return res;
+}
+
+EAPI void
+elm_flip_interaction_direction_hitsize_set(Efl_Ui_Flip *obj, Elm_Flip_Direction dir, double hitsize)
+{
+ Efl_Orient orient = _to_efl_orientation(dir);
+ efl_ui_flip_interaction_direction_hitsize_set((Efl_Ui_Flip *)obj, orient, hitsize);
+}
+
+EAPI double
+elm_flip_interaction_direction_hitsize_get(Efl_Ui_Flip *obj, Elm_Flip_Direction dir)
+{
+ Efl_Orient orient = _to_efl_orientation(dir);
+ return efl_ui_flip_interaction_direction_hitsize_get((Efl_Ui_Flip *)obj, orient);
+}
+
+EOAPI void
+elm_flip_interaction_direction_enabled_set(Efl_Ui_Flip *obj, Elm_Flip_Direction dir, Eina_Bool enabled)
+{
+ Efl_Orient orient = _to_efl_orientation(dir);
+ efl_ui_flip_interaction_direction_enabled_set((Efl_Ui_Flip *)obj, orient, enabled);
+}
+
+EOAPI Eina_Bool
+elm_flip_interaction_direction_enabled_get(Efl_Ui_Flip *obj, Elm_Flip_Direction dir)
+{
+ Efl_Orient orient = _to_efl_orientation(dir);
+ return efl_ui_flip_interaction_direction_enabled_get((Efl_Ui_Flip *)obj, orient);
+}
+
/* Efl.Part begin */
-ELM_PART_IMPLEMENT(elm_flip, ELM_FLIP, Elm_Flip_Data, Elm_Part_Data)
-ELM_PART_IMPLEMENT_CONTENT_SET(elm_flip, ELM_FLIP, Elm_Flip_Data, Elm_Part_Data)
-ELM_PART_IMPLEMENT_CONTENT_GET(elm_flip, ELM_FLIP, Elm_Flip_Data, Elm_Part_Data)
-ELM_PART_IMPLEMENT_CONTENT_UNSET(elm_flip, ELM_FLIP, Elm_Flip_Data, Elm_Part_Data)
-#include "elm_flip_internal_part.eo.c"
+ELM_PART_IMPLEMENT(efl_ui_flip, EFL_UI_FLIP, Efl_Ui_Flip_Data, Elm_Part_Data)
+ELM_PART_IMPLEMENT_CONTENT_SET(efl_ui_flip, EFL_UI_FLIP, Efl_Ui_Flip_Data, Elm_Part_Data)
+ELM_PART_IMPLEMENT_CONTENT_GET(efl_ui_flip, EFL_UI_FLIP, Efl_Ui_Flip_Data, Elm_Part_Data)
+ELM_PART_IMPLEMENT_CONTENT_UNSET(efl_ui_flip, EFL_UI_FLIP, Efl_Ui_Flip_Data, Elm_Part_Data)
+#include "efl_ui_flip_internal_part.eo.c"
/* Efl.Part end */
-#include "elm_flip.eo.c"
+#include "efl_ui_flip.eo.c"