if (!smart) return ret; \
}
-#define E_OBJ_NAME "emotion_object"
+#define E_OBJ_NAME "efl_canvas_video"
#ifdef MY_CLASS
# undef MY_CLASS
#endif
-#define MY_CLASS EMOTION_OBJECT_CLASS
+#define MY_CLASS EFL_CANVAS_VIDEO_CLASS
-typedef struct _Emotion_Object_Data Emotion_Object_Data;
+typedef struct _Efl_Canvas_Video_Data Efl_Canvas_Video_Data;
-struct _Emotion_Object_Data
+struct _Efl_Canvas_Video_Data
{
EINA_REFCOUNT;
Emotion_Engine_Instance *engine_instance;
static void _pixels_get(void *data, Evas_Object *obj);
static void
-_engine_init(Eo *obj, Emotion_Object_Data *sd)
+_engine_init(Eo *obj, Efl_Canvas_Video_Data *sd)
{
if (sd->engine_instance) return;
sd->engine_instance = emotion_engine_instance_new(sd->engine, obj,
}
static void
-_smart_data_free(Emotion_Object_Data *sd)
+_smart_data_free(Efl_Canvas_Video_Data *sd)
{
#ifdef HAVE_EIO
/* Only cancel the load_xattr or we will loose ref to time_seek stringshare */
static void
_clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int vid_w, int vid_h)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
double scale_w, scale_h;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
}
EOLIAN static Eo *
-_emotion_object_efl_object_constructor(Eo *obj, Emotion_Object_Data *pd EINA_UNUSED)
+_efl_canvas_video_efl_object_constructor(Eo *obj, Efl_Canvas_Video_Data *pd EINA_UNUSED)
{
obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, E_OBJ_NAME);
EAPI Evas_Object *
emotion_object_image_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
sd = evas_object_smart_data_get(obj);
if (!sd) return NULL;
}
EOLIAN static void
-_emotion_object_option_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *pd, const char *opt, const char *val)
+_efl_canvas_video_option_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *pd, const char *opt, const char *val)
{
- Emotion_Object_Data *sd = pd;
+ Efl_Canvas_Video_Data *sd = pd;
if ((!opt) || (!val)) return;
}
EOLIAN static Eina_Bool
-_emotion_object_engine_set(Eo *obj, Emotion_Object_Data *pd, const char *engine)
+_efl_canvas_video_engine_set(Eo *obj, Efl_Canvas_Video_Data *pd, const char *engine)
{
- Emotion_Object_Data *sd = pd;
+ Efl_Canvas_Video_Data *sd = pd;
const char *file;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
}
EOLIAN static Eina_Bool
-_emotion_object_efl_file_file_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, const char *file, const char *key EINA_UNUSED)
+_efl_canvas_video_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, const char *file, const char *key EINA_UNUSED)
{
DBG("file=%s", file);
}
EOLIAN static void
-_emotion_object_efl_file_file_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, const char **file, const char **key)
+_efl_canvas_video_efl_file_file_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, const char **file, const char **key)
{
if (file) *file = sd->file;
if (key) *key = NULL;
}
static void
-_emotion_aspect_borders_apply(Evas_Object *obj, Emotion_Object_Data *sd, int w, int h, int iw, int ih)
+_emotion_aspect_borders_apply(Evas_Object *obj, Efl_Canvas_Video_Data *sd, int w, int h, int iw, int ih)
{
int x, y;
}
static void
-_emotion_object_aspect_border_apply(Evas_Object *obj, Emotion_Object_Data *sd, int w, int h)
+_efl_canvas_video_aspect_border_apply(Evas_Object *obj, Efl_Canvas_Video_Data *sd, int w, int h)
{
int iw, ih;
double ir;
EAPI void
emotion_object_border_set(Evas_Object *obj, int l, int r, int t, int b)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
int w, h;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->crop.t = -t;
sd->crop.b = -b;
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
- _emotion_object_aspect_border_apply(obj, sd, w, h);
+ _efl_canvas_video_aspect_border_apply(obj, sd, w, h);
}
EAPI void
emotion_object_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
*l = -sd->crop.l;
EAPI void
emotion_object_bg_color_set(Evas_Object *obj, int r, int g, int b, int a)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
EAPI void
emotion_object_bg_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
evas_object_color_get(sd->bg, r, g, b, a);
EAPI void
emotion_object_keep_aspect_set(Evas_Object *obj, Emotion_Aspect a)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
int w, h;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->aspect = a;
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
- _emotion_object_aspect_border_apply(obj, sd, w, h);
+ _efl_canvas_video_aspect_border_apply(obj, sd, w, h);
}
EAPI Emotion_Aspect
emotion_object_keep_aspect_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_ASPECT_KEEP_NONE);
return sd->aspect;
}
EOLIAN static void
-_emotion_object_efl_player_play_set(Eo *obj, Emotion_Object_Data *sd, Eina_Bool play)
+_efl_canvas_video_efl_player_play_set(Eo *obj, Efl_Canvas_Video_Data *sd, Eina_Bool play)
{
DBG("play=" FMT_UCHAR ", was=" FMT_UCHAR, play, sd->play);
if (!sd->engine_instance) return;
}
EOLIAN static Eina_Bool
-_emotion_object_efl_player_play_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_player_play_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (!sd->engine_instance) return EINA_FALSE;
return sd->play;
}
EOLIAN static void
-_emotion_object_efl_player_position_set(Eo *obj, Emotion_Object_Data *sd, double sec)
+_efl_canvas_video_efl_player_position_set(Eo *obj, Efl_Canvas_Video_Data *sd, double sec)
{
DBG("sec=%f", sec);
if (!sd->engine_instance) return;
}
EOLIAN static double
-_emotion_object_efl_player_position_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_player_position_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (!sd->engine_instance) return 0.0;
sd->pos = emotion_engine_instance_pos_get(sd->engine_instance);
EAPI double
emotion_object_buffer_size_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 1.0);
if (!sd->engine_instance) return 0.0;
EAPI Eina_Bool
emotion_object_video_handled_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return EINA_FALSE;
EAPI Eina_Bool
emotion_object_audio_handled_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return EINA_FALSE;
}
EOLIAN static void
-_emotion_object_efl_image_load_load_size_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, int *iw, int *ih)
+_efl_canvas_video_efl_image_load_load_size_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, int *iw, int *ih)
{
if (iw) *iw = sd->video.w;
if (ih) *ih = sd->video.h;
}
EOLIAN static void
-_emotion_object_efl_image_smooth_scale_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, Eina_Bool smooth)
+_efl_canvas_video_efl_image_smooth_scale_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, Eina_Bool smooth)
{
evas_object_image_smooth_scale_set(sd->obj, smooth);
}
}
EOLIAN static Eina_Bool
-_emotion_object_efl_image_smooth_scale_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_image_smooth_scale_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
return evas_object_image_smooth_scale_get(sd->obj);
}
}
EOLIAN static double
-_emotion_object_efl_image_ratio_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_image_ratio_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (!sd->engine_instance) return 0.0;
return sd->ratio;
EAPI void
emotion_object_event_simple_send(Evas_Object *obj, Emotion_Event ev)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
if (!sd->engine_instance) return;
EAPI void
emotion_object_audio_volume_set(Evas_Object *obj, double vol)
{
- efl_player_audio_volume_set(obj, vol);
+ efl_player_volume_set(obj, vol);
}
EOLIAN static void
-_emotion_object_efl_player_audio_volume_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, double vol)
+_efl_canvas_video_efl_player_volume_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, double vol)
{
DBG("vol=%f", vol);
if (!sd->engine_instance) return;
EAPI double
emotion_object_audio_volume_get(const Evas_Object *obj)
{
- return efl_player_audio_volume_get(obj);
+ return efl_player_volume_get(obj);
}
EOLIAN static double
-_emotion_object_efl_player_audio_volume_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_player_volume_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (!sd->engine_instance) return 0.0;
return emotion_engine_instance_audio_channel_volume_get(sd->engine_instance);
EAPI void
emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
{
- efl_player_audio_mute_set(obj, mute);
+ efl_player_mute_set(obj, mute);
}
EOLIAN static void
-_emotion_object_efl_player_audio_mute_set(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, Eina_Bool mute)
+_efl_canvas_video_efl_player_mute_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, Eina_Bool mute)
{
DBG("mute=" FMT_UCHAR, mute);
if (!sd->engine_instance) return;
EAPI Eina_Bool
emotion_object_audio_mute_get(const Evas_Object *obj)
{
- return efl_player_audio_mute_get(obj);
+ return efl_player_mute_get(obj);
}
EOLIAN static Eina_Bool
-_emotion_object_efl_player_audio_mute_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_player_mute_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (!sd->engine_instance) return EINA_FALSE;
return emotion_engine_instance_audio_channel_mute_get(sd->engine_instance);
EAPI int
emotion_object_audio_channel_count(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return 0;
EAPI const char *
emotion_object_audio_channel_name_get(const Evas_Object *obj, int channel)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
if (!sd->engine_instance) return NULL;
EAPI void
emotion_object_audio_channel_set(Evas_Object *obj, int channel)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
DBG("channel=%d", channel);
EAPI int
emotion_object_audio_channel_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return 0;
EAPI void
emotion_object_video_mute_set(Evas_Object *obj, Eina_Bool mute)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
DBG("mute=" FMT_UCHAR, mute);
EAPI Eina_Bool
emotion_object_video_mute_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return EINA_FALSE;
EAPI void
emotion_object_video_subtitle_file_set(Evas_Object *obj, const char *filepath)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
DBG("subtitle=%s", filepath);
EAPI const char *
emotion_object_video_subtitle_file_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return NULL;
EAPI int
emotion_object_video_channel_count(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return 0;
EAPI const char *
emotion_object_video_channel_name_get(const Evas_Object *obj, int channel)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
if (!sd->engine_instance) return NULL;
EAPI void
emotion_object_video_channel_set(Evas_Object *obj, int channel)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
DBG("channel=%d", channel);
EAPI int
emotion_object_video_channel_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return 0;
EAPI void
emotion_object_spu_mute_set(Evas_Object *obj, Eina_Bool mute)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
DBG("mute=" FMT_UCHAR, mute);
EAPI Eina_Bool
emotion_object_spu_mute_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return EINA_FALSE;
EAPI int
emotion_object_spu_channel_count(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return 0;
EAPI const char *
emotion_object_spu_channel_name_get(const Evas_Object *obj, int channel)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
if (!sd->engine_instance) return NULL;
EAPI void
emotion_object_spu_channel_set(Evas_Object *obj, int channel)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
DBG("channel=%d", channel);
EAPI int
emotion_object_spu_channel_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return 0;
EAPI int
emotion_object_chapter_count(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return 0;
EAPI void
emotion_object_chapter_set(Evas_Object *obj, int chapter)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
DBG("chapter=%d", chapter);
EAPI int
emotion_object_chapter_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
if (!sd->engine_instance) return 0;
EAPI const char *
emotion_object_chapter_name_get(const Evas_Object *obj, int chapter)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
if (!sd->engine_instance) return NULL;
EAPI void
emotion_object_play_speed_set(Evas_Object *obj, double speed)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
DBG("speed=%f", speed);
EAPI double
emotion_object_play_speed_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0.0);
if (!sd->engine_instance) return 0.0;
EAPI void
emotion_object_eject(Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
if (!sd->engine_instance) return;
EAPI const char *
emotion_object_title_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
return sd->title;
EAPI const char *
emotion_object_progress_info_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
return sd->progress.info;
}
EOLIAN static double
-_emotion_object_efl_player_progress_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_player_progress_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
return sd->progress.stat;
}
EOLIAN static double
-_emotion_object_efl_player_length_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_player_length_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (!sd->engine_instance) return 0.0;
sd->len = emotion_engine_instance_len_get(sd->engine_instance);
}
EOLIAN static Eina_Bool
-_emotion_object_efl_player_seekable_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_player_seekable_get(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (!sd->engine_instance) return EINA_FALSE;
return emotion_engine_instance_seekable(sd->engine_instance);
EAPI const char *
emotion_object_ref_file_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
return sd->ref.file;
EAPI int
emotion_object_ref_num_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
return sd->ref.num;
EAPI int
emotion_object_spu_button_count_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
return sd->spu.button_num;
EAPI int
emotion_object_spu_button_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
return sd->spu.button;
EAPI const char *
emotion_object_meta_info_get(const Evas_Object *obj, Emotion_Meta_Info meta)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
int id;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
EAPI void
emotion_object_vis_set(Evas_Object *obj, Emotion_Vis visualization)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
DBG("visualization=%d", visualization);
EAPI Emotion_Vis
emotion_object_vis_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_VIS_NONE);
if (!sd->engine_instance) return EMOTION_VIS_NONE;
EAPI Eina_Bool
emotion_object_vis_supported(const Evas_Object *obj, Emotion_Vis visualization)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE);
if (!sd->engine_instance) return EINA_FALSE;
EAPI void
emotion_object_priority_set(Evas_Object *obj, Eina_Bool priority)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
if (!sd->engine_instance) return;
EAPI Eina_Bool
emotion_object_priority_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE);
if (!sd->engine_instance) return EINA_FALSE;
#ifdef HAVE_EIO
static void
-_eio_load_xattr_cleanup(Emotion_Object_Data *sd, Eio_File *handler)
+_eio_load_xattr_cleanup(Efl_Canvas_Video_Data *sd, Eio_File *handler)
{
if (handler == sd->load_xattr) sd->load_xattr = NULL;
static void
_eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double)
{
- Emotion_Object_Data *sd = data;
+ Efl_Canvas_Video_Data *sd = data;
emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double);
- efl_event_callback_legacy_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL);
+ efl_event_callback_call(evas_object_smart_parent_get(sd->obj), EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_DONE, NULL);
+ evas_object_smart_callback_call(evas_object_smart_parent_get(sd->obj), "position_load,succeed", NULL);
_eio_load_xattr_cleanup(sd, handler);
}
static void
_eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
{
- Emotion_Object_Data *sd = data;
+ Efl_Canvas_Video_Data *sd = data;
- efl_event_callback_legacy_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL);
+ efl_event_callback_call(evas_object_smart_parent_get(sd->obj), EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_FAIL, NULL);
+ evas_object_smart_callback_call(evas_object_smart_parent_get(sd->obj), "position_load,failed", NULL);
_eio_load_xattr_cleanup(sd, handler);
}
#endif
EAPI void
emotion_object_last_position_load(Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
const char *tmp;
#ifndef HAVE_EIO
double xattr;
if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr))
{
emotion_object_position_set(obj, xattr);
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL);
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_DONE, NULL);
+ evas_object_smart_callback_call(obj, "position_load,succeed", NULL);
}
else
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL);
+ {
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_LOAD_FAIL, NULL);
+ evas_object_smart_callback_call(obj, "position_load,failed", NULL);
+ }
#endif
}
#ifdef HAVE_EIO
static void
-_eio_save_xattr_cleanup(Emotion_Object_Data *sd, Eio_File *handler)
+_eio_save_xattr_cleanup(Efl_Canvas_Video_Data *sd, Eio_File *handler)
{
if (handler == sd->save_xattr) sd->save_xattr = NULL;
static void
_eio_save_xattr_done(void *data, Eio_File *handler)
{
- Emotion_Object_Data *sd = data;
+ Efl_Canvas_Video_Data *sd = data;
- efl_event_callback_legacy_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL);
+ efl_event_callback_call(sd->obj, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_DONE, NULL);
+ evas_object_smart_callback_call(sd->obj, "position_save,succeed", NULL);
_eio_save_xattr_cleanup(sd, handler);
}
static void
_eio_save_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
{
- Emotion_Object_Data *sd = data;
+ Efl_Canvas_Video_Data *sd = data;
- efl_event_callback_legacy_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL);
+ efl_event_callback_call(sd->obj, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_FAIL, NULL);
+ evas_object_smart_callback_call(sd->obj, "position_save,failed", NULL);
_eio_save_xattr_cleanup(sd, handler);
}
#endif
EAPI void
emotion_object_last_position_save(Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
const char *tmp;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd);
#else
if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0))
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL);
+ {
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_DONE, NULL);
+ evas_object_smart_callback_call(obj, "position_save,succeed", NULL);
+ }
else
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL);
-
+ {
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_SAVE_FAIL, NULL);
+ evas_object_smart_callback_call(obj, "position_save,failed", NULL);
+ }
#endif
}
EAPI void
emotion_object_suspend_set(Evas_Object *obj, Emotion_Suspend state)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
switch (state)
EAPI Emotion_Suspend
emotion_object_suspend_get(Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_WAKEUP);
return sd->state;
EAPI void *
_emotion_video_get(const Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL);
return emotion_engine_instance_data_get(sd->engine_instance);
_emotion_frame_anim(void *data)
{
Evas_Object *obj = data;
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE);
_emotion_video_pos_update(obj,
emotion_engine_instance_pos_get(sd->engine_instance),
emotion_engine_instance_len_get(sd->engine_instance));
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL);
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_FRAME_DECODE, NULL);
+ evas_object_smart_callback_call(obj, "frame_decode", NULL);
return EINA_FALSE;
}
EAPI void
_emotion_frame_new(Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
if (!sd->anim) sd->anim = ecore_animator_add(_emotion_frame_anim, obj);
EAPI void
_emotion_video_pos_update(Evas_Object *obj, double pos, double len)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
int npos = 0, nlen = 0;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
if (len != sd->len) nlen = 1;
sd->pos = pos;
sd->len = len;
- if (npos) efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL);
- if (nlen) efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL);
+ if (npos)
+ {
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_POSITION_CHANGE, NULL);
+ evas_object_smart_callback_call(obj, "position_update", NULL);
+ }
+ if (nlen)
+ {
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_LENGTH_CHANGE, NULL);
+ evas_object_smart_callback_call(obj, "length_change", NULL);
+ }
}
EAPI void
_emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
double tmp;
int changed = 0;
if (changed)
{
evas_object_size_hint_request_set(obj, w, h);
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL);
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_FRAME_RESIZE, NULL);
+ evas_object_smart_callback_call(obj, "frame_resize", NULL);
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
- _emotion_object_aspect_border_apply(obj, sd, w, h);
+ _efl_canvas_video_aspect_border_apply(obj, sd, w, h);
}
}
EAPI void
_emotion_image_reset(Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
_emotion_image_data_zero(sd->obj);
EAPI void
_emotion_decode_stop(Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
if (sd->play)
{
sd->play = 0;
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_DECODE_STOP, NULL);
+ evas_object_smart_callback_call(obj, "decode_stop", NULL);
}
}
EAPI void
_emotion_open_done(Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->open = 1;
emotion_object_position_set(obj, sd->remember_jump);
if (sd->remember_play != sd->play)
emotion_object_play_set(obj, sd->remember_play);
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_OPEN_DONE, NULL);
-
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_OPEN_DONE, NULL);
+ evas_object_smart_callback_call(obj, "open_done", NULL);
}
EAPI void
_emotion_playback_started(Evas_Object *obj)
{
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL);
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_PLAYBACK_START, NULL);
+ evas_object_smart_callback_call(obj, "playback_started", NULL);
}
EAPI void
_emotion_playback_finished(Evas_Object *obj)
{
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL);
+ Efl_Canvas_Video_Data *sd;
+
+ E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
+ if (sd->play)
+ {
+ sd->play = 0;
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_PLAYBACK_STOP, NULL);
+ evas_object_smart_callback_call(obj, "playback_finished", NULL);
+ }
}
EAPI void
_emotion_audio_level_change(Evas_Object *obj)
{
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL);
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_VOLUME_CHANGE, NULL);
+ evas_object_smart_callback_call(obj, "audio_level_change", NULL);
}
EAPI void
_emotion_channels_change(Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL);
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_CHANNELS_CHANGE, NULL);
+ evas_object_smart_callback_call(obj, "channels_change", NULL);
}
EAPI void
_emotion_title_set(Evas_Object *obj, char *title)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
eina_stringshare_replace(&sd->title, title);
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL);
-
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_TITLE_CHANGE, NULL);
+ evas_object_smart_callback_call(obj, "title_change", NULL);
}
EAPI void
_emotion_progress_set(Evas_Object *obj, char *info, double st)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
eina_stringshare_replace(&sd->progress.info, info);
sd->progress.stat = st;
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL);
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_PROGRESS_CHANGE, NULL);
+ evas_object_smart_callback_call(obj, "progress_change", NULL);
}
EAPI void
_emotion_file_ref_set(Evas_Object *obj, const char *file, int num)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
eina_stringshare_replace(&sd->ref.file, file);
sd->ref.num = num;
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_REF_CHANGE, NULL);
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_REF_CHANGE, NULL);
+ evas_object_smart_callback_call(obj, "ref_change", NULL);
}
EAPI void
_emotion_spu_button_num_set(Evas_Object *obj, int num)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->spu.button_num = num;
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL);
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_BUTTON_NUM_CHANGE, NULL);
+ evas_object_smart_callback_call(obj, "button_num_change", NULL);
}
EAPI void
_emotion_spu_button_set(Evas_Object *obj, int button)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->spu.button = button;
- efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL);
+ efl_event_callback_call(obj, EFL_CANVAS_VIDEO_EVENT_BUTTON_CHANGE, NULL);
+ evas_object_smart_callback_call(obj, "button_change", NULL);
}
EAPI void
_emotion_seek_done(Evas_Object *obj)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
if (sd->seeking)
EAPI void
_emotion_frame_refill(Evas_Object *obj, double w, double h)
{
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
if ((sd->fill.w != w) || (sd->fill.h != h))
_mouse_move(void *data, Evas *ev EINA_UNUSED, Evas_Object *obj, void *event_info)
{
Evas_Event_Mouse_Move *e;
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
int x, y, iw, ih;
Evas_Coord ox, oy, ow, oh;
_mouse_down(void *data, Evas *ev EINA_UNUSED, Evas_Object *obj, void *event_info)
{
Evas_Event_Mouse_Down *e;
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
int x, y, iw, ih;
Evas_Coord ox, oy, ow, oh;
_pos_set_job(void *data)
{
Evas_Object *obj;
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
obj = data;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
_pixels_get(void *data, Evas_Object *obj)
{
int iw, ih, w, h;
- Emotion_Object_Data *sd;
+ Efl_Canvas_Video_Data *sd;
Emotion_Format format;
unsigned char *bgra_data;
/*******************************************/
EOLIAN static void
-_emotion_object_efl_canvas_group_group_add(Evas_Object *obj, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_canvas_group_group_add(Evas_Object *obj, Efl_Canvas_Video_Data *sd)
{
unsigned int *pixel;
}
EOLIAN static void
-_emotion_object_efl_canvas_group_group_del(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_canvas_group_group_del(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (!sd) return;
if (sd->engine_instance)
}
EOLIAN static void
-_emotion_object_efl_canvas_group_group_move(Evas_Object *obj, Emotion_Object_Data *sd, Evas_Coord x, Evas_Coord y)
+_efl_canvas_video_efl_canvas_group_group_move(Evas_Object *obj, Efl_Canvas_Video_Data *sd, Evas_Coord x, Evas_Coord y)
{
int w, h;
}
EOLIAN static void
-_emotion_object_efl_canvas_group_group_resize(Evas_Object *obj, Emotion_Object_Data *sd, Evas_Coord w, Evas_Coord h)
+_efl_canvas_video_efl_canvas_group_group_resize(Evas_Object *obj, Efl_Canvas_Video_Data *sd, Evas_Coord w, Evas_Coord h)
{
- _emotion_object_aspect_border_apply(obj, sd, w, h);
+ _efl_canvas_video_aspect_border_apply(obj, sd, w, h);
evas_object_resize(sd->bg, w, h);
}
EOLIAN static void
-_emotion_object_efl_canvas_group_group_show(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_canvas_group_group_show(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
int a;
}
EOLIAN static void
-_emotion_object_efl_canvas_group_group_hide(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_canvas_group_group_hide(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
evas_object_hide(sd->obj);
if (sd->crop.clipper) evas_object_hide(sd->crop.clipper);
}
EOLIAN static void
-_emotion_object_efl_canvas_group_group_color_set(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd, int r, int g, int b, int a)
+_efl_canvas_video_efl_canvas_group_group_color_set(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, int r, int g, int b, int a)
{
evas_object_color_set(sd->obj, r, g, b, a);
evas_object_color_set(sd->crop.clipper, r, g, b, a);
}
EOLIAN static void
-_emotion_object_efl_canvas_group_group_clip_set(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd, Evas_Object * clip)
+_efl_canvas_video_efl_canvas_group_group_clip_set(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd, Evas_Object * clip)
{
if (sd->crop.clipper) evas_object_clip_set(sd->crop.clipper, clip);
else evas_object_clip_set(sd->obj, clip);
}
EOLIAN static void
-_emotion_object_efl_canvas_group_group_clip_unset(Evas_Object *obj EINA_UNUSED, Emotion_Object_Data *sd)
+_efl_canvas_video_efl_canvas_group_group_clip_unset(Evas_Object *obj EINA_UNUSED, Efl_Canvas_Video_Data *sd)
{
if (sd->crop.clipper) evas_object_clip_unset(sd->crop.clipper);
else evas_object_clip_unset(sd->obj);
}
-#include "emotion_object.eo.c"
+#include "efl_canvas_video.eo.c"