aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Levin <avi.levin@samsung.com>2015-05-18 14:44:09 +0300
committerAvi Levin <avi.levin@samsung.com>2015-06-29 17:03:33 +0300
commitef2ea27669838868ba3e2da2506397e7ad590f3c (patch)
tree10ff85b2af68617091b4eda47ffe06d5e21e507c
parentelc_fileselector_entry, elm_bubble: porting evas smart callbacks to eo (diff)
downloadelementary-devs/avilog/replace_smart_callbacks_with_eo_elm.tar.gz
elm_video: porting evas smart callbacks to eodevs/avilog/replace_smart_callbacks_with_eo_elm
-rw-r--r--src/lib/elm_video.c84
1 files changed, 48 insertions, 36 deletions
diff --git a/src/lib/elm_video.c b/src/lib/elm_video.c
index 09bb4ce8a..0afdbd471 100644
--- a/src/lib/elm_video.c
+++ b/src/lib/elm_video.c
@@ -134,44 +134,52 @@ _on_size_hints_changed(void *data EINA_UNUSED,
elm_layout_sizing_eval(obj);
}
-static void
-_on_open_done(void *data,
- Evas_Object *obj EINA_UNUSED,
- void *event_info EINA_UNUSED)
+static Eina_Bool
+_on_open_done(void *data EINA_UNUSED,
+ Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
elm_layout_signal_emit(data, "elm,video,open", "elm");
+
+ return EINA_TRUE;
}
-static void
-_on_playback_started(void *data,
- Evas_Object *obj EINA_UNUSED,
+static Eina_Bool
+_on_playback_started(void *data EINA_UNUSED,
+ Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
void *event_info EINA_UNUSED)
{
elm_layout_signal_emit(data, "elm,video,play", "elm");
-}
-static void
-_on_playback_finished(void *data,
- Evas_Object *obj EINA_UNUSED,
- void *event_info EINA_UNUSED)
+ return EINA_TRUE;
+
+}
+static Eina_Bool
+_on_playback_finished(void *data EINA_UNUSED,
+ Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
ELM_VIDEO_DATA_GET(data, sd);
emotion_object_play_set(sd->emotion, EINA_FALSE);
elm_layout_signal_emit(data, "elm,video,end", "elm");
+
+ return EINA_TRUE;
}
-static void
-_on_aspect_ratio_updated(void *data,
- Evas_Object *obj EINA_UNUSED,
- void *event_info EINA_UNUSED)
+static Eina_Bool
+_on_aspect_ratio_updated(void *data EINA_UNUSED,
+ Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
elm_layout_sizing_eval(data);
+
+ return EINA_TRUE;
}
-static void
-_on_title_changed(void *data,
- Evas_Object *obj EINA_UNUSED,
- void *event_info EINA_UNUSED)
+static Eina_Bool
+_on_title_changed(void *data EINA_UNUSED,
+ Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
const char *title;
@@ -180,14 +188,18 @@ _on_title_changed(void *data,
title = emotion_object_title_get(sd->emotion);
elm_layout_text_set(data, "elm,title", title);
elm_layout_signal_emit(data, "elm,video,title", "elm");
+
+ return EINA_TRUE;
}
-static void
-_on_audio_level_changed(void *data,
- Evas_Object *obj EINA_UNUSED,
- void *event_info EINA_UNUSED)
+static Eina_Bool
+_on_audio_level_changed(void *data EINA_UNUSED,
+ Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED,
+ void *event_info EINA_UNUSED)
{
(void)data;
+
+ return EINA_TRUE;
}
static Eina_Bool
@@ -238,18 +250,18 @@ _elm_video_evas_object_smart_add(Eo *obj, Elm_Video_Data *priv)
elm_layout_content_set(obj, "elm.swallow.video", priv->emotion);
- evas_object_smart_callback_add
- (priv->emotion, "open_done", _on_open_done, obj);
- evas_object_smart_callback_add
- (priv->emotion, "playback_started", _on_playback_started, obj);
- evas_object_smart_callback_add
- (priv->emotion, "playback_finished", _on_playback_finished, obj);
- evas_object_smart_callback_add
- (priv->emotion, "frame_resize", _on_aspect_ratio_updated, obj);
- evas_object_smart_callback_add
- (priv->emotion, "title_change", _on_title_changed, obj);
- evas_object_smart_callback_add
- (priv->emotion, "audio_level_change", _on_audio_level_changed, obj);
+ eo_do(priv->emotion, eo_event_callback_add
+ (EMOTION_OBJECT_EVENT_OPEN_DONE, _on_open_done, obj));
+ eo_do(priv->emotion, eo_event_callback_add
+ (EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _on_playback_started, obj));
+ eo_do(priv->emotion, eo_event_callback_add
+ (EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, _on_playback_finished, obj));
+ eo_do(priv->emotion, eo_event_callback_add
+ (EMOTION_OBJECT_EVENT_FRAME_RESIZE, _on_aspect_ratio_updated, obj));
+ eo_do(priv->emotion, eo_event_callback_add
+ (EMOTION_OBJECT_EVENT_TITLE_CHANGE, _on_title_changed, obj));
+ eo_do(priv->emotion, eo_event_callback_add
+ (EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, _on_audio_level_changed, obj));
evas_object_event_callback_add
(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_size_hints_changed, NULL);