} Elm_Transit_Effect_Wipe_Type;
typedef struct _Elm_Transit Elm_Transit;
-
- EAPI Elm_Transit *elm_transit_add(void);
- EAPI void elm_transit_del(Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_effect_add(Elm_Transit *transit, void (*cb)(void *data, Elm_Transit *transit, double progress), void *data, void (*data_free_cb)(void *data, Elm_Transit *transit)) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_transit_effect_del(Elm_Transit *transit, void (*cb)(void *data, Elm_Transit *transit, double progress), void *data) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
- EAPI void elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
- EAPI const Eina_List *elm_transit_objects_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_objects_final_state_keep_set(Elm_Transit *transit, Eina_Bool state_keep) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_transit_objects_final_state_keep_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EINA_DEPRECATED EAPI void elm_transit_event_block_set(Elm_Transit *transit, Eina_Bool disabled) EINA_ARG_NONNULL(1);
- EINA_DEPRECATED EAPI Eina_Bool elm_transit_event_block_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_transit_event_enabled_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_del_cb_set(Elm_Transit *transit, void (*cb)(void *data, Elm_Transit* transit), void *data) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_auto_reverse_set(Elm_Transit *transit, Eina_Bool reverse) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_transit_auto_reverse_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_repeat_times_set(Elm_Transit *transit, int repeat) EINA_ARG_NONNULL(1);
- EAPI int elm_transit_repeat_times_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_tween_mode_set(Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode) EINA_ARG_NONNULL(1);
- EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_duration_set(Elm_Transit *transit, double duration) EINA_ARG_NONNULL(1);
- EAPI double elm_transit_duration_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_go(Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_transit_paused_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI double elm_transit_progress_value_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
-
- EAPI void *elm_transit_effect_resizing_add(Elm_Transit* transit, Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h);
- EAPI void *elm_transit_effect_translation_add(Elm_Transit* transit, Evas_Coord from_dx, Evas_Coord dy, Evas_Coord to_dx, Evas_Coord to_dy);
- EAPI void *elm_transit_effect_zoom_add(Elm_Transit *transit, float from_rate, float to_rate);
- EAPI void *elm_transit_effect_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
- EAPI void *elm_transit_effect_resizable_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
- EAPI void *elm_transit_effect_wipe_add(Elm_Transit *transit, Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir);
- EAPI void *elm_transit_effect_color_add(Elm_Transit *transit, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a);
- EAPI void *elm_transit_effect_fade_add(Elm_Transit *transit);
- EAPI void *elm_transit_effect_blend_add(Elm_Transit *transit);
- EAPI void *elm_transit_effect_rotation_add(Elm_Transit *transit, float from_degree, float to_degree);
- EAPI void *elm_transit_effect_image_animation_add(Elm_Transit *transit, Eina_List *images);
+ typedef void Elm_Transit_Effect;
+
+ EAPI Elm_Transit *elm_transit_add(void);
+ EAPI void elm_transit_del(Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_effect_add(Elm_Transit *transit, void (*cb)(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress), Elm_Transit_Effect *effect, void (*effect_free_cb)(Elm_Transit_Effect *effect, Elm_Transit *transit)) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_transit_effect_del(Elm_Transit *transit, void (*cb)(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress), Elm_Transit_Effect *effect) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
+ EAPI void elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
+ EAPI const Eina_List *elm_transit_objects_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_objects_final_state_keep_set(Elm_Transit *transit, Eina_Bool state_keep) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_transit_objects_final_state_keep_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_transit_event_block_set(Elm_Transit *transit, Eina_Bool disabled) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_transit_event_block_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_transit_event_enabled_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_del_cb_set(Elm_Transit *transit, void (*cb)(void *data, Elm_Transit* transit), void *data) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_auto_reverse_set(Elm_Transit *transit, Eina_Bool reverse) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_transit_auto_reverse_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_repeat_times_set(Elm_Transit *transit, int repeat) EINA_ARG_NONNULL(1);
+ EAPI int elm_transit_repeat_times_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_tween_mode_set(Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode) EINA_ARG_NONNULL(1);
+ EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_duration_set(Elm_Transit *transit, double duration) EINA_ARG_NONNULL(1);
+ EAPI double elm_transit_duration_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_go(Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_transit_paused_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI double elm_transit_progress_value_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+
+ EAPI Elm_Transit_Effect *elm_transit_effect_resizing_add(Elm_Transit* transit, Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h);
+ EAPI Elm_Transit_Effect *elm_transit_effect_translation_add(Elm_Transit* transit, Evas_Coord from_dx, Evas_Coord dy, Evas_Coord to_dx, Evas_Coord to_dy);
+ EAPI Elm_Transit_Effect *elm_transit_effect_zoom_add(Elm_Transit *transit, float from_rate, float to_rate);
+ EAPI Elm_Transit_Effect *elm_transit_effect_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
+ EAPI Elm_Transit_Effect *elm_transit_effect_resizable_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw);
+ EAPI Elm_Transit_Effect *elm_transit_effect_wipe_add(Elm_Transit *transit, Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir);
+ EAPI Elm_Transit_Effect *elm_transit_effect_color_add(Elm_Transit *transit, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a);
+ EAPI Elm_Transit_Effect *elm_transit_effect_fade_add(Elm_Transit *transit);
+ EAPI Elm_Transit_Effect *elm_transit_effect_blend_add(Elm_Transit *transit);
+ EAPI Elm_Transit_Effect *elm_transit_effect_rotation_add(Elm_Transit *transit, float from_degree, float to_degree);
+ EAPI Elm_Transit_Effect *elm_transit_effect_image_animation_add(Elm_Transit *transit, Eina_List *images);
typedef struct _Elm_Store Elm_Store;
typedef struct _Elm_Store_Filesystem Elm_Store_Filesystem;
struct _Elm_Transit_Effect_Module
{
- void (*animation_op) (void *data, Elm_Transit *transit, double progress);
- void (*user_data_free) (void *data, Elm_Transit *transit);
- void *user_data;
+ void (*animation_op) (Elm_Transit_Effect *effect, Elm_Transit *transit, double progress);
+ void (*user_effect_free) (Elm_Transit_Effect *effect, Elm_Transit *transit);
+ Elm_Transit_Effect *user_effect;
Eina_Bool deleted : 1;
};
static void
_elm_transit_effect_del(Elm_Transit *transit, Elm_Transit_Effect_Module *effect_module, Eina_List *elist)
{
- if (effect_module->user_data_free)
- effect_module->user_data_free(effect_module->user_data, transit);
+ if (effect_module->user_effect_free)
+ effect_module->user_effect_free(effect_module->user_effect, transit);
transit->effect_list = eina_list_remove_list(transit->effect_list, elist);
free(effect_module);
{
if (transit->deleted) break;
if (!effect_module->deleted)
- effect_module->animation_op(effect_module->user_data, transit, progress);
+ effect_module->animation_op(effect_module->user_effect, transit, progress);
}
transit->walking--;
* the data_free_cb function, do not use the context data in another transit.
*/
EAPI void
-elm_transit_effect_add(Elm_Transit *transit, void (*cb)(void *data, Elm_Transit *transit, double progress), void *data, void (*data_free_cb)(void *data, Elm_Transit *transit))
+elm_transit_effect_add(Elm_Transit *transit, void (*cb)(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress), Elm_Transit_Effect *effect, void (*effect_free_cb)(Elm_Transit_Effect *effect, Elm_Transit *transit))
{
ELM_TRANSIT_CHECK_OR_RETURN(transit);
EINA_SAFETY_ON_NULL_RETURN(cb);
Eina_List *elist;
EINA_LIST_FOREACH(transit->effect_list, elist, effect_module)
- if ((effect_module->animation_op == cb) && (effect_module->user_data == data)) return;
+ if ((effect_module->animation_op == cb) && (effect_module->user_effect == effect)) return;
effect_module = ELM_NEW(Elm_Transit_Effect_Module);
if (!effect_module) return;
- effect_module->user_data_free = data_free_cb;
+ effect_module->user_effect_free = effect_free_cb;
effect_module->animation_op = cb;
- effect_module->user_data = data;
+ effect_module->user_effect = effect;
transit->effect_list = eina_list_append(transit->effect_list, effect_module);
}
* @ingroup Transit
*/
EAPI void
-elm_transit_effect_del(Elm_Transit *transit, void (*cb)(void *data, Elm_Transit *transit, double progress), void *data)
+elm_transit_effect_del(Elm_Transit *transit, void (*cb)(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress), Elm_Transit_Effect *effect)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit);
EINA_SAFETY_ON_NULL_RETURN(cb);
EINA_LIST_FOREACH_SAFE(transit->effect_list, elist, elist_next, effect_module)
{
- if ((effect_module->animation_op == cb) && (effect_module->user_data == data))
+ if ((effect_module->animation_op == cb) && (effect_module->user_effect == effect))
{
if (transit->walking)
{
};
static void
-_transit_effect_resizing_context_free(void *data, Elm_Transit *transit __UNUSED__)
+_transit_effect_resizing_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__)
{
- free(data);
+ Elm_Transit_Effect_Resizing *resizing = effect;
+ free(effect);
}
static void
-_transit_effect_resizing_op(void *data, Elm_Transit *transit, double progress)
+_transit_effect_resizing_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
Evas_Coord w, h;
Evas_Object *obj;
Eina_List *elist;
- Elm_Transit_Effect_Resizing *resizing = data;
+ Elm_Transit_Effect_Resizing *resizing = effect;
w = resizing->from.w + (resizing->to.w * progress);
h = resizing->from.h + (resizing->to.h * progress);
evas_object_resize(obj, w, h);
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_resizing_context_new(Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h)
{
Elm_Transit_Effect_Resizing *resizing;
*
* @ingroup Transit
*/
-EAPI void *
+EAPI Elm_Transit_Effect *
elm_transit_effect_resizing_add(Elm_Transit *transit, Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
- void *effect_context = _transit_effect_resizing_context_new(from_w, from_h, to_w, to_h);
+ Elm_Transit_Effect *effect = _transit_effect_resizing_context_new(from_w, from_h, to_w, to_h);
- if (!effect_context) return NULL;
+ if (!effect) return NULL;
elm_transit_effect_add(transit,
- _transit_effect_resizing_op, effect_context,
+ _transit_effect_resizing_op, effect,
_transit_effect_resizing_context_free);
- return effect_context;
+ return effect;
}
///////////////////////////////////////////////////////////////////////////////
}
void
-_transit_effect_translation_context_free(void *data, Elm_Transit *transit __UNUSED__)
+_transit_effect_translation_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
- Elm_Transit_Effect_Translation *translation = data;
+ EINA_SAFETY_ON_NULL_RETURN(effect);
+ Elm_Transit_Effect_Translation *translation = effect;
Eina_List *elist, *elist_next;
Elm_Transit_Effect_Translation_Node *translation_node;
}
void
-_transit_effect_translation_op(void *data, Elm_Transit *transit, double progress __UNUSED__)
+_transit_effect_translation_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress __UNUSED__)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
Evas_Coord x, y;
- Elm_Transit_Effect_Translation *translation = data;
+ Elm_Transit_Effect_Translation *translation = effect;
Elm_Transit_Effect_Translation_Node *translation_node;
Eina_List *elist;
}
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_translation_context_new(Evas_Coord from_dx, Evas_Coord from_dy, Evas_Coord to_dx, Evas_Coord to_dy)
{
Elm_Transit_Effect_Translation *translation;
* This is because this effect needs the geometry information about the objects,
* and if the window was not created yet, it can get a wrong information.
*/
-EAPI void *
+EAPI Elm_Transit_Effect *
elm_transit_effect_translation_add(Elm_Transit *transit, Evas_Coord from_dx, Evas_Coord from_dy, Evas_Coord to_dx, Evas_Coord to_dy)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
- void *effect_context = _transit_effect_translation_context_new(from_dx, from_dy, to_dx, to_dy);
+ Elm_Transit_Effect *effect_context = _transit_effect_translation_context_new(from_dx, from_dy, to_dx, to_dy);
if (!effect_context) return NULL;
elm_transit_effect_add(transit,
};
void
-_transit_effect_zoom_context_free(void *data, Elm_Transit *transit __UNUSED__)
+_transit_effect_zoom_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__)
{
- free(data);
+ Elm_Transit_Effect_Zoom *zoom = effect;
+ free(zoom);
}
static void
-_transit_effect_zoom_op(void *data, Elm_Transit *transit , double progress)
+_transit_effect_zoom_op(Elm_Transit_Effect *effect, Elm_Transit *transit , double progress)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
Evas_Object *obj;
Eina_List *elist;
- Elm_Transit_Effect_Zoom *zoom = data;
+ Elm_Transit_Effect_Zoom *zoom = effect;
Evas_Map *map;
Evas_Coord x, y, w, h;
evas_map_free(map);
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_zoom_context_new(float from_rate, float to_rate)
{
Elm_Transit_Effect_Zoom *zoom;
* This is because this effect needs the geometry information about the objects,
* and if the window was not created yet, it can get a wrong information.
*/
-EAPI void *
+EAPI Elm_Transit_Effect *
elm_transit_effect_zoom_add(Elm_Transit *transit, float from_rate, float to_rate)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
- void *effect_context = _transit_effect_zoom_context_new(from_rate, to_rate);
+ Elm_Transit_Effect *effect_context = _transit_effect_zoom_context_new(from_rate, to_rate);
if (!effect_context) return NULL;
elm_transit_effect_add(transit,
};
static void
-_transit_effect_flip_context_free(void *data, Elm_Transit *transit)
+_transit_effect_flip_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
+ Elm_Transit_Effect_Flip *flip = effect;
Evas_Object *front, *back;
int i;
int count = eina_list_count(transit->objs);
evas_object_map_enable_set(front, EINA_FALSE);
evas_object_map_enable_set(back, EINA_FALSE);
}
- free(data);
+ free(flip);
}
static void
-_transit_effect_flip_op(void *data, Elm_Transit *transit, double progress)
+_transit_effect_flip_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
Evas_Object *obj, *front, *back;
int count, i;
- Elm_Transit_Effect_Flip *flip = data;
+ Elm_Transit_Effect_Flip *flip = effect;
Evas_Map *map;
float degree;
Evas_Coord x, y, w, h;
evas_map_free(map);
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_flip_context_new(Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw)
{
Elm_Transit_Effect_Flip *flip;
* This is because this effect needs the geometry information about the objects,
* and if the window was not created yet, it can get a wrong information.
*/
-EAPI void *
+EAPI Elm_Transit_Effect *
elm_transit_effect_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
- void *effect_context = _transit_effect_flip_context_new(axis, cw);
+ Elm_Transit_Effect *effect_context = _transit_effect_flip_context_new(axis, cw);
if (!effect_context) return NULL;
elm_transit_effect_add(transit,
}
void
-_transit_effect_resizable_flip_context_free(void *data, Elm_Transit *transit __UNUSED__)
+_transit_effect_resizable_flip_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
- Elm_Transit_Effect_ResizableFlip *resizable_flip = data;
+ Elm_Transit_Effect_ResizableFlip *resizable_flip = effect;
Eina_List *elist, *elist_next;
Elm_Transit_Effect_ResizableFlip_Node *resizable_flip_node;
}
void
-_transit_effect_resizable_flip_op(void *data, Elm_Transit *transit __UNUSED__, double progress)
+_transit_effect_resizable_flip_op(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__, double progress)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
Evas_Map *map;
Evas_Object *obj;
float x, y, w, h;
float degree;
Evas_Coord half_w, half_h;
- Elm_Transit_Effect_ResizableFlip *resizable_flip = data;
+ Elm_Transit_Effect_ResizableFlip *resizable_flip = effect;
Elm_Transit_Effect_ResizableFlip_Node *resizable_flip_node;
Eina_List *elist;
evas_map_free(map);
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_resizable_flip_context_new(Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw)
{
Elm_Transit_Effect_ResizableFlip *resizable_flip;
* This is because this effect needs the geometry information about the objects,
* and if the window was not created yet, it can get a wrong information.
*/
-EAPI void *
+EAPI Elm_Transit_Effect *
elm_transit_effect_resizable_flip_add(Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
- void *effect_context = _transit_effect_resizable_flip_context_new(axis, cw);
+ Elm_Transit_Effect *effect_context = _transit_effect_resizable_flip_context_new(axis, cw);
if (!effect_context) return NULL;
elm_transit_effect_add(transit,
}
static void
-_transit_effect_wipe_context_free(void *data, Elm_Transit *transit)
+_transit_effect_wipe_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
Eina_List *elist;
Evas_Object *obj;
- Elm_Transit_Effect_Wipe *wipe = data;
+ Elm_Transit_Effect_Wipe *wipe = effect;
Eina_Bool reverse = elm_transit_auto_reverse_get(transit);
EINA_LIST_FOREACH(transit->objs, elist, obj)
}
static void
-_transit_effect_wipe_op(void *data, Elm_Transit *transit, double progress)
+_transit_effect_wipe_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
- Elm_Transit_Effect_Wipe *wipe = data;
+ Elm_Transit_Effect_Wipe *wipe = effect;
Evas_Map *map;
Evas_Coord _x, _y, _w, _h;
Eina_List *elist;
evas_map_free(map);
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_wipe_context_new(Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir)
{
Elm_Transit_Effect_Wipe *wipe;
};
static void
-_transit_effect_color_context_free(void *data, Elm_Transit *transit __UNUSED__)
+_transit_effect_color_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__)
{
- free(data);
+ Elm_Transit_Effect_Color *color = effect;
+ free(color);
}
static void
-_transit_effect_color_op(void *data, Elm_Transit *transit, double progress)
+_transit_effect_color_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
- Elm_Transit_Effect_Color *color = data;
+ Elm_Transit_Effect_Color *color = effect;
Evas_Object *obj;
Eina_List *elist;
unsigned int r, g, b, a;
evas_object_color_set(obj, r, g, b, a);
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_color_context_new(unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a)
{
Elm_Transit_Effect_Color *color;
*
* @ingroup Transit
*/
-EAPI void *
+EAPI Elm_Transit_Effect *
elm_transit_effect_color_add(Elm_Transit *transit, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
- void *effect_context = _transit_effect_color_context_new(from_r, from_g, from_b, from_a, to_r, to_g, to_b, to_a);
+ Elm_Transit_Effect *effect_context = _transit_effect_color_context_new(from_r, from_g, from_b, from_a, to_r, to_g, to_b, to_a);
if (!effect_context) return NULL;
elm_transit_effect_add(transit,
}
static void
-_transit_effect_fade_context_free(void *data, Elm_Transit *transit __UNUSED__)
+_transit_effect_fade_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
- Elm_Transit_Effect_Fade *fade = data;
+ EINA_SAFETY_ON_NULL_RETURN(effect);
+ Elm_Transit_Effect_Fade *fade = effect;
Elm_Transit_Effect_Fade_Node *fade_node;
Eina_List *elist, *elist_next;
}
static void
-_transit_effect_fade_op(void *data, Elm_Transit *transit __UNUSED__, double progress)
+_transit_effect_fade_op(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__, double progress)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
- Elm_Transit_Effect_Fade *fade = data;
+ EINA_SAFETY_ON_NULL_RETURN(effect);
+ Elm_Transit_Effect_Fade *fade = effect;
Eina_List *elist;
Elm_Transit_Effect_Fade_Node *fade_node;
float _progress;
}
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_fade_context_new(void)
{
Elm_Transit_Effect_Fade *fade;
* This is because this effect needs the color information about the objects,
* and if the window was not created yet, it can get a wrong information.
*/
-EAPI void *
+EAPI Elm_Transit_Effect *
elm_transit_effect_fade_add(Elm_Transit *transit)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
- void *effect_context = _transit_effect_fade_context_new();
+ Elm_Transit_Effect *effect_context = _transit_effect_fade_context_new();
if (!effect_context) return NULL;
elm_transit_effect_add(transit,
_transit_effect_fade_op, effect_context,
}
void
-_transit_effect_blend_context_free(void *data, Elm_Transit *transit __UNUSED__)
+_transit_effect_blend_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
- Elm_Transit_Effect_Blend *blend = data;
+ EINA_SAFETY_ON_NULL_RETURN(effect);
+ Elm_Transit_Effect_Blend *blend = effect;
Elm_Transit_Effect_Blend_Node *blend_node;
Eina_List *elist, *elist_next;
EVAS_CALLBACK_DEL, _blend_object_del_cb);
free(blend_node);
}
- free(data);
+ free(blend);
}
void
-_transit_effect_blend_op(void *data, Elm_Transit *transit, double progress)
+_transit_effect_blend_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
- Elm_Transit_Effect_Blend *blend = data;
+ Elm_Transit_Effect_Blend *blend = effect;
Elm_Transit_Effect_Blend_Node *blend_node;
Eina_List *elist;
}
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_blend_context_new(void)
{
Elm_Transit_Effect_Blend *blend;
* This is because this effect needs the color information about the objects,
* and if the window was not created yet, it can get a wrong information.
*/
-EAPI void *
+EAPI Elm_Transit_Effect *
elm_transit_effect_blend_add(Elm_Transit *transit)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
- void *effect_context = _transit_effect_blend_context_new();
+ Elm_Transit_Effect *effect_context = _transit_effect_blend_context_new();
if (!effect_context) return NULL;
elm_transit_effect_add(transit,
};
static void
-_transit_effect_rotation_context_free(void *data, Elm_Transit *transit __UNUSED__)
+_transit_effect_rotation_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__)
{
- free(data);
+ Elm_Transit_Effect_Rotation *rotation = effect;
+ free(rotation);
}
static void
-_transit_effect_rotation_op(void *data, Elm_Transit *transit, double progress)
+_transit_effect_rotation_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
- Elm_Transit_Effect_Rotation *rotation = data;
+ Elm_Transit_Effect_Rotation *rotation = effect;
Evas_Map *map;
Evas_Coord x, y, w, h;
float degree;
evas_map_free(map);
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_rotation_context_new(float from_degree, float to_degree)
{
Elm_Transit_Effect_Rotation *rotation;
* This is because this effect needs the geometry information about the objects,
* and if the window was not created yet, it can get a wrong information.
*/
-EAPI void *
+EAPI Elm_Transit_Effect *
elm_transit_effect_rotation_add(Elm_Transit *transit, float from_degree, float to_degree)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
- void *effect_context = _transit_effect_rotation_context_new(from_degree, to_degree);
+ Elm_Transit_Effect *effect_context = _transit_effect_rotation_context_new(from_degree, to_degree);
if (!effect_context) return NULL;
elm_transit_effect_add(transit,
};
static void
-_transit_effect_image_animation_context_free(void *data, Elm_Transit *transit __UNUSED__)
+_transit_effect_image_animation_context_free(Elm_Transit_Effect *effect, Elm_Transit *transit __UNUSED__)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
- Elm_Transit_Effect_Image_Animation *image_animation = data;
+ EINA_SAFETY_ON_NULL_RETURN(effect);
+ Elm_Transit_Effect_Image_Animation *image_animation = effect;
const char *image;
Eina_List *elist, *elist_next;
eina_stringshare_del(image);
}
- free(data);
+ free(image_animation);
}
static void
-_transit_effect_image_animation_op(void *data, Elm_Transit *transit, double progress)
+_transit_effect_image_animation_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
{
- EINA_SAFETY_ON_NULL_RETURN(data);
+ EINA_SAFETY_ON_NULL_RETURN(effect);
EINA_SAFETY_ON_NULL_RETURN(transit);
Eina_List *elist;
Evas_Object *obj;
const char *type;
- Elm_Transit_Effect_Image_Animation *image_animation = data;
+ Elm_Transit_Effect_Image_Animation *image_animation = effect;
unsigned int count = 0;
int len;
eina_stringshare_del(type);
}
-static void *
+static Elm_Transit_Effect *
_transit_effect_image_animation_context_new(Eina_List *images)
{
Elm_Transit_Effect_Image_Animation *image_animation;
*
* @ingroup Transit
*/
-EAPI void *
+EAPI Elm_Transit_Effect *
elm_transit_effect_image_animation_add(Elm_Transit *transit, Eina_List *images)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
- void *effect_context = _transit_effect_image_animation_context_new(images);
+ Elm_Transit_Effect *effect = _transit_effect_image_animation_context_new(images);
- if (!effect_context) return NULL;
+ if (!effect) return NULL;
elm_transit_effect_add(transit,
- _transit_effect_image_animation_op, effect_context,
+ _transit_effect_image_animation_op, effect,
_transit_effect_image_animation_context_free);
- return effect_context;
+ return effect;
}