static Rotation_Zone *_rotation_zone = NULL;
+static void
+_rotation_effect_ready_send(E_Zone *zone)
+{
+ E_Event_Zone_Rotation_Effect_Ready *ev;
+
+ ev = E_NEW(E_Event_Zone_Rotation_Effect_Ready, 1);
+ if (!ev) return;
+
+ ev->zone = zone;
+ ecore_event_add(E_EVENT_ZONE_ROTATION_EFFECT_READY, ev, NULL, NULL);
+
+ EFFINF("Rotation Effect Event Ready", NULL, NULL);
+}
+
+static void
+_rotation_effect_cancel_send(E_Zone *zone)
+{
+ E_Event_Zone_Rotation_Effect_Cancel *ev;
+
+ ev = E_NEW(E_Event_Zone_Rotation_Effect_Cancel, 1);
+ if (!ev) return;
+
+ ev->zone = zone;
+ ecore_event_add(E_EVENT_ZONE_ROTATION_EFFECT_CANCEL, ev, NULL, NULL);
+
+ EFFINF("Rotation Effect Event Cancel", NULL, NULL);
+}
+
+static void
+_rotation_effect_done_send(E_Zone *zone)
+{
+ E_Event_Zone_Rotation_Effect_Done *ev;
+
+ ev = E_NEW(E_Event_Zone_Rotation_Effect_Done, 1);
+ if (!ev) return;
+
+ ev->zone = zone;
+ ecore_event_add(E_EVENT_ZONE_ROTATION_EFFECT_DONE, ev, NULL, NULL);
+
+ EFFINF("Rotation Effect Event Done", NULL, NULL);
+}
+
static Eina_Bool
_rotation_effect_available(const E_Client *ec, int ang)
{
}
if (effect->ctx_end)
- _rotation_effect_animator_end_context_free(effect->ctx_end);
+ {
+ _rotation_effect_animator_end_context_free(effect->ctx_end);
+ _rotation_effect_done_send(effect->zone);
+ }
effect->running = EINA_FALSE;
effect->wait_for_buffer = EINA_FALSE;
evas_object_hide(effect->bg);
e_comp_override_del();
+ _rotation_effect_done_send(effect->zone);
return ECORE_CALLBACK_CANCEL;
}
_rotation_effect_animator_begin_prepare(effect);
+ if (effect->targets)
+ _rotation_effect_ready_send(zone);
+
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_rotation_effect_cb_zone_rotation_cancel(void *data, int type, void *event)
{
+ E_Event_Zone_Rotation_Change_Cancel *ev = event;
Rotation_Effect *effect;
+ E_Zone *zone;
- EFFINF("Zone Rotation Canceld", NULL, NULL);
+ zone = ev->zone;
+ if (!zone) return ECORE_CALLBACK_PASS_ON;
effect = (Rotation_Effect *)data;
if (!effect) return ECORE_CALLBACK_PASS_ON;
- if (effect->running) return ECORE_CALLBACK_PASS_ON;
+ EFFINF("Zone Rotation Cancelled", NULL, NULL);
+
+ if (effect->running) return ECORE_CALLBACK_PASS_ON;
+ if (effect->targets) _rotation_effect_cancel_send(zone);
_rotation_effect_clear(effect);
return ECORE_CALLBACK_PASS_ON;