elm_transit_add(void)
{
Elm_Transit *transit = ELM_NEW(Elm_Transit);
- if (!transit) return NULL;
+ if (!transit)
+ {
+ ERR("Failed to allocate a elm_transit object!");
+ return NULL;
+ }
EINA_MAGIC_SET(transit, ELM_TRANSIT_MAGIC);
Elm_Transit_Effect_Module *effect_module;
EINA_INLIST_FOREACH(transit->effect_list, effect_module)
- if ((effect_module->transition_cb == transition_cb) && (effect_module->effect == effect)) return;
+ if ((effect_module->transition_cb == transition_cb) && (effect_module->effect == effect))
+ {
+ WRN("elm_transit does not allow to add the duplicated effect! : transit=%p", transit);
+ return;
+ }
effect_module = ELM_NEW(Elm_Transit_Effect_Module);
- if (!effect_module) return;
+ if (!effect_module)
+ {
+ ERR("Failed to allocate a new effect!: transit=%p", transit);
+ return;
+ }
effect_module->end_cb = end_cb;
effect_module->transition_cb = transition_cb;
elm_transit_duration_set(Elm_Transit *transit, double duration)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit);
- if (transit->animator) return;
+ if (transit->animator)
+ {
+ WRN("elm_transit does not allow to set the duration time in operating! : transit=%p", transit);
+ return;
+ }
transit->time.duration = duration;
}
ELM_TRANSIT_CHECK_OR_RETURN(transit);
if (transit->state_keep == state_keep) return;
- if (transit->animator) return;
+ if (transit->animator)
+ {
+ WRN("elm_transit does not allow to change final state keep mode in operating! : transit=%p", transit);
+ return;
+ }
transit->state_keep = !!state_keep;
}
ELM_TRANSIT_CHECK_OR_RETURN(transit);
ELM_TRANSIT_CHECK_OR_RETURN(chain_transit);
- if (transit == chain_transit) return;
- if (transit == chain_transit->prev_chain_transit) return;
+ if (transit == chain_transit)
+ {
+ WRN("You add a same transit as a chain transit! : transit=%p, chain_transit=%p", transit, chain_transit);
+ return;
+ }
+ if (transit == chain_transit->prev_chain_transit)
+ return;
if (chain_transit->prev_chain_transit)
chain_transit->prev_chain_transit->next_chain_transits = eina_list_remove(chain_transit->prev_chain_transit->next_chain_transits, chain_transit);
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
Elm_Transit_Effect *effect = _transit_effect_resizing_context_new(from_w, from_h, to_w, to_h);
- if (!effect) return NULL;
+ if (!effect)
+ {
+ ERR("Failed to allocate resizing effect! : transit=%p", transit);
+ return NULL;
+ }
elm_transit_effect_add(transit,
_transit_effect_resizing_op, effect,
_transit_effect_resizing_context_free);
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
Elm_Transit_Effect *effect_context = _transit_effect_translation_context_new(from_dx, from_dy, to_dx, to_dy);
- if (!effect_context) return NULL;
+ if (!effect_context)
+ {
+ ERR("Failed to allocate translation effect! : transit=%p", transit);
+ return NULL;
+ }
elm_transit_effect_add(transit,
_transit_effect_translation_op, effect_context,
_transit_effect_translation_context_free);
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
Elm_Transit_Effect *effect_context = _transit_effect_zoom_context_new(from_rate, to_rate);
- if (!effect_context) return NULL;
+ if (!effect_context)
+ {
+ ERR("Failed to allocate zoom effect! : transit=%p", transit);
+ return NULL;
+ }
elm_transit_effect_add(transit,
_transit_effect_zoom_op, effect_context,
_transit_effect_zoom_context_free);
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
Elm_Transit_Effect *effect_context = _transit_effect_flip_context_new(axis, cw);
- if (!effect_context) return NULL;
+ if (!effect_context)
+ {
+ ERR("Failed to allocate flip effect! : transit=%p", transit);
+ return NULL;
+ }
elm_transit_effect_add(transit,
_transit_effect_flip_op, effect_context,
_transit_effect_flip_context_free);
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
Elm_Transit_Effect *effect_context = _transit_effect_resizable_flip_context_new(axis, cw);
- if (!effect_context) return NULL;
+ if (!effect_context)
+ {
+ ERR("Failed to allocate resizable_flip effect! : transit=%p", transit);
+ return NULL;
+ }
elm_transit_effect_add(transit,
_transit_effect_resizable_flip_op, effect_context,
_transit_effect_resizable_flip_context_free);
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
void *effect_context = _transit_effect_wipe_context_new(type, dir);
- if (!effect_context) return NULL;
+ if (!effect_context)
+ {
+ ERR("Failed to allocate wipe effect! : transit=%p", transit);
+ return NULL;
+ }
elm_transit_effect_add(transit,
_transit_effect_wipe_op, effect_context,
_transit_effect_wipe_context_free);
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
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;
+ if (!effect_context)
+ {
+ ERR("Failed to allocate color effect! : transit=%p", transit);
+ return NULL;
+ }
elm_transit_effect_add(transit,
_transit_effect_color_op, effect_context,
_transit_effect_color_context_free);
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
Elm_Transit_Effect *effect_context = _transit_effect_fade_context_new();
- if (!effect_context) return NULL;
+
+ if (!effect_context)
+ {
+ ERR("Failed to allocate fade effect! : transit=%p", transit);
+ return NULL;
+ }
elm_transit_effect_add(transit,
_transit_effect_fade_op, effect_context,
_transit_effect_fade_context_free);
ELM_TRANSIT_CHECK_OR_RETURN(transit, NULL);
Elm_Transit_Effect *effect = _transit_effect_image_animation_context_new(images);
- if (!effect) return NULL;
+ if (!effect)
+ {
+ ERR("Failed to allocate image_animation effect! : transit=%p", transit);
+ return NULL;
+ }
elm_transit_effect_add(transit,
_transit_effect_image_animation_op, effect,
_transit_effect_image_animation_context_free);