summaryrefslogtreecommitdiff
path: root/src/lib/emotion/emotion_smart.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/emotion/emotion_smart.c')
-rw-r--r--src/lib/emotion/emotion_smart.c88
1 files changed, 42 insertions, 46 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 26b440d..231a81e 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -243,8 +243,8 @@ emotion_object_add(Evas *evas)
243EOLIAN static Eo * 243EOLIAN static Eo *
244_emotion_object_eo_base_constructor(Eo *obj, Emotion_Object_Data *pd EINA_UNUSED) 244_emotion_object_eo_base_constructor(Eo *obj, Emotion_Object_Data *pd EINA_UNUSED)
245{ 245{
246 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 246 obj = eo_constructor(eo_super(obj, MY_CLASS));
247 eo_do(obj, evas_obj_type_set(E_OBJ_NAME)); 247 evas_obj_type_set(obj, E_OBJ_NAME);
248 248
249 return obj; 249 return obj;
250} 250}
@@ -350,7 +350,7 @@ EAPI Eina_Bool
350emotion_object_file_set(Evas_Object *obj, const char *file) 350emotion_object_file_set(Evas_Object *obj, const char *file)
351{ 351{
352 Eina_Bool ret; 352 Eina_Bool ret;
353 return eo_do_ret(obj, ret, efl_file_set(file, NULL)); 353 return efl_file_set(obj, file, NULL);
354} 354}
355 355
356EOLIAN static Eina_Bool 356EOLIAN static Eina_Bool
@@ -413,7 +413,7 @@ EAPI const char *
413emotion_object_file_get(const Evas_Object *obj) 413emotion_object_file_get(const Evas_Object *obj)
414{ 414{
415 const char *file = NULL; 415 const char *file = NULL;
416 eo_do(obj, efl_file_get(&file, NULL)); 416 efl_file_get(obj, &file, NULL);
417 return file; 417 return file;
418} 418}
419 419
@@ -624,7 +624,7 @@ emotion_object_keep_aspect_get(const Evas_Object *obj)
624EAPI void 624EAPI void
625emotion_object_play_set(Evas_Object *obj, Eina_Bool play) 625emotion_object_play_set(Evas_Object *obj, Eina_Bool play)
626{ 626{
627 eo_do(obj, efl_player_play_set(play)); 627 efl_player_play_set(obj, play);
628} 628}
629 629
630EOLIAN static void 630EOLIAN static void
@@ -649,7 +649,7 @@ EAPI Eina_Bool
649emotion_object_play_get(const Evas_Object *obj) 649emotion_object_play_get(const Evas_Object *obj)
650{ 650{
651 Eina_Bool ret; 651 Eina_Bool ret;
652 return eo_do_ret(obj, ret, efl_player_play_get()); 652 return efl_player_play_get(obj);
653} 653}
654 654
655EOLIAN static Eina_Bool 655EOLIAN static Eina_Bool
@@ -662,7 +662,7 @@ _emotion_object_efl_player_play_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd
662EAPI void 662EAPI void
663emotion_object_position_set(Evas_Object *obj, double sec) 663emotion_object_position_set(Evas_Object *obj, double sec)
664{ 664{
665 eo_do(obj, efl_player_position_set(sec)); 665 efl_player_position_set(obj, sec);
666} 666}
667 667
668EOLIAN static void 668EOLIAN static void
@@ -688,7 +688,7 @@ EAPI double
688emotion_object_position_get(const Evas_Object *obj) 688emotion_object_position_get(const Evas_Object *obj)
689{ 689{
690 double ret; 690 double ret;
691 return eo_do_ret(obj, ret, efl_player_position_get()); 691 return efl_player_position_get(obj);
692} 692}
693 693
694EOLIAN static double 694EOLIAN static double
@@ -713,7 +713,7 @@ EAPI Eina_Bool
713emotion_object_seekable_get(const Evas_Object *obj) 713emotion_object_seekable_get(const Evas_Object *obj)
714{ 714{
715 Eina_Bool ret; 715 Eina_Bool ret;
716 return eo_do_ret(obj, ret, efl_player_seekable_get()); 716 return efl_player_seekable_get(obj);
717} 717}
718 718
719EAPI Eina_Bool 719EAPI Eina_Bool
@@ -740,7 +740,7 @@ EAPI double
740emotion_object_play_length_get(const Evas_Object *obj) 740emotion_object_play_length_get(const Evas_Object *obj)
741{ 741{
742 double ret; 742 double ret;
743 return eo_do_ret(obj, ret, efl_player_length_get()); 743 return efl_player_length_get(obj);
744} 744}
745 745
746EAPI void 746EAPI void
@@ -749,7 +749,7 @@ emotion_object_size_get(const Evas_Object *obj, int *iw, int *ih)
749 if (iw) *iw = 0; 749 if (iw) *iw = 0;
750 if (ih) *ih = 0; 750 if (ih) *ih = 0;
751 751
752 eo_do(obj, efl_image_load_size_get(iw, ih)); 752 efl_image_load_size_get(obj, iw, ih);
753} 753}
754 754
755EOLIAN static void 755EOLIAN static void
@@ -762,7 +762,7 @@ _emotion_object_efl_image_load_size_get(Eo *obj EINA_UNUSED, Emotion_Object_Data
762EAPI void 762EAPI void
763emotion_object_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth) 763emotion_object_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth)
764{ 764{
765 eo_do(obj, efl_image_smooth_scale_set(smooth)); 765 efl_image_smooth_scale_set(obj, smooth);
766} 766}
767 767
768EOLIAN static void 768EOLIAN static void
@@ -775,7 +775,7 @@ EAPI Eina_Bool
775emotion_object_smooth_scale_get(const Evas_Object *obj) 775emotion_object_smooth_scale_get(const Evas_Object *obj)
776{ 776{
777 Eina_Bool ret; 777 Eina_Bool ret;
778 return eo_do_ret(obj, ret, efl_image_smooth_scale_get()); 778 return efl_image_smooth_scale_get(obj);
779} 779}
780 780
781EOLIAN static Eina_Bool 781EOLIAN static Eina_Bool
@@ -788,7 +788,7 @@ EAPI double
788emotion_object_ratio_get(const Evas_Object *obj) 788emotion_object_ratio_get(const Evas_Object *obj)
789{ 789{
790 double ret; 790 double ret;
791 return eo_do_ret(obj, ret, efl_image_ratio_get()); 791 return efl_image_ratio_get(obj);
792} 792}
793 793
794EOLIAN static double 794EOLIAN static double
@@ -814,7 +814,7 @@ emotion_object_event_simple_send(Evas_Object *obj, Emotion_Event ev)
814EAPI void 814EAPI void
815emotion_object_audio_volume_set(Evas_Object *obj, double vol) 815emotion_object_audio_volume_set(Evas_Object *obj, double vol)
816{ 816{
817 eo_do(obj, efl_player_audio_volume_set(vol)); 817 efl_player_audio_volume_set(obj, vol);
818} 818}
819 819
820EOLIAN static void 820EOLIAN static void
@@ -829,7 +829,7 @@ EAPI double
829emotion_object_audio_volume_get(const Evas_Object *obj) 829emotion_object_audio_volume_get(const Evas_Object *obj)
830{ 830{
831 double ret; 831 double ret;
832 return eo_do_ret(obj, ret, efl_player_audio_volume_get()); 832 return efl_player_audio_volume_get(obj);
833} 833}
834 834
835EOLIAN static double 835EOLIAN static double
@@ -842,7 +842,7 @@ _emotion_object_efl_player_audio_volume_get(Eo *obj EINA_UNUSED, Emotion_Object_
842EAPI void 842EAPI void
843emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute) 843emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
844{ 844{
845 eo_do(obj, efl_player_audio_mute_set(mute)); 845 efl_player_audio_mute_set(obj, mute);
846} 846}
847 847
848EOLIAN static void 848EOLIAN static void
@@ -857,7 +857,7 @@ EAPI Eina_Bool
857emotion_object_audio_mute_get(const Evas_Object *obj) 857emotion_object_audio_mute_get(const Evas_Object *obj)
858{ 858{
859 Eina_Bool ret; 859 Eina_Bool ret;
860 return eo_do_ret(obj, ret, efl_player_audio_mute_get()); 860 return efl_player_audio_mute_get(obj);
861} 861}
862 862
863EOLIAN static Eina_Bool 863EOLIAN static Eina_Bool
@@ -1148,7 +1148,7 @@ EAPI double
1148emotion_object_progress_status_get(const Evas_Object *obj) 1148emotion_object_progress_status_get(const Evas_Object *obj)
1149{ 1149{
1150 double ret; 1150 double ret;
1151 return eo_do_ret(obj, ret, efl_player_progress_get()); 1151 return efl_player_progress_get(obj);
1152} 1152}
1153 1153
1154EOLIAN static double 1154EOLIAN static double
@@ -1318,8 +1318,7 @@ _eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double)
1318 Emotion_Object_Data *sd = data; 1318 Emotion_Object_Data *sd = data;
1319 1319
1320 emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double); 1320 emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double);
1321 eo_do(evas_object_smart_parent_get(sd->obj), 1321 eo_event_callback_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL);
1322 eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL));
1323 _eio_load_xattr_cleanup(sd, handler); 1322 _eio_load_xattr_cleanup(sd, handler);
1324} 1323}
1325 1324
@@ -1328,8 +1327,7 @@ _eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
1328{ 1327{
1329 Emotion_Object_Data *sd = data; 1328 Emotion_Object_Data *sd = data;
1330 1329
1331 eo_do(evas_object_smart_parent_get(sd->obj), 1330 eo_event_callback_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL);
1332 eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL));
1333 _eio_load_xattr_cleanup(sd, handler); 1331 _eio_load_xattr_cleanup(sd, handler);
1334} 1332}
1335#endif 1333#endif
@@ -1364,10 +1362,10 @@ emotion_object_last_position_load(Evas_Object *obj)
1364 if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr)) 1362 if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr))
1365 { 1363 {
1366 emotion_object_position_set(obj, xattr); 1364 emotion_object_position_set(obj, xattr);
1367 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL)); 1365 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL);
1368 } 1366 }
1369 else 1367 else
1370 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL)); 1368 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL);
1371#endif 1369#endif
1372} 1370}
1373 1371
@@ -1390,7 +1388,7 @@ _eio_save_xattr_done(void *data, Eio_File *handler)
1390{ 1388{
1391 Emotion_Object_Data *sd = data; 1389 Emotion_Object_Data *sd = data;
1392 1390
1393 eo_do(sd->obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL)); 1391 eo_event_callback_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL);
1394 _eio_save_xattr_cleanup(sd, handler); 1392 _eio_save_xattr_cleanup(sd, handler);
1395} 1393}
1396 1394
@@ -1399,7 +1397,7 @@ _eio_save_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
1399{ 1397{
1400 Emotion_Object_Data *sd = data; 1398 Emotion_Object_Data *sd = data;
1401 1399
1402 eo_do(sd->obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL)); 1400 eo_event_callback_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL);
1403 _eio_save_xattr_cleanup(sd, handler); 1401 _eio_save_xattr_cleanup(sd, handler);
1404} 1402}
1405#endif 1403#endif
@@ -1429,9 +1427,9 @@ emotion_object_last_position_save(Evas_Object *obj)
1429 sd); 1427 sd);
1430#else 1428#else
1431 if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0)) 1429 if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0))
1432 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL)); 1430 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL);
1433 else 1431 else
1434 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL)); 1432 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL);
1435 1433
1436#endif 1434#endif
1437} 1435}
@@ -1493,7 +1491,7 @@ _emotion_frame_anim(void *data)
1493 _emotion_video_pos_update(obj, 1491 _emotion_video_pos_update(obj,
1494 emotion_engine_instance_pos_get(sd->engine_instance), 1492 emotion_engine_instance_pos_get(sd->engine_instance),
1495 emotion_engine_instance_len_get(sd->engine_instance)); 1493 emotion_engine_instance_len_get(sd->engine_instance));
1496 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL)); 1494 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL);
1497 return EINA_FALSE; 1495 return EINA_FALSE;
1498} 1496}
1499 1497
@@ -1517,10 +1515,8 @@ _emotion_video_pos_update(Evas_Object *obj, double pos, double len)
1517 if (len != sd->len) nlen = 1; 1515 if (len != sd->len) nlen = 1;
1518 sd->pos = pos; 1516 sd->pos = pos;
1519 sd->len = len; 1517 sd->len = len;
1520 if (npos) eo_do(obj, 1518 if (npos) eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL);
1521 eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL)); 1519 if (nlen) eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL);
1522 if (nlen) eo_do(obj,
1523 eo_event_callback_call(EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL));
1524} 1520}
1525 1521
1526EAPI void 1522EAPI void
@@ -1549,7 +1545,7 @@ _emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio)
1549 if (changed) 1545 if (changed)
1550 { 1546 {
1551 evas_object_size_hint_request_set(obj, w, h); 1547 evas_object_size_hint_request_set(obj, w, h);
1552 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL)); 1548 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL);
1553 evas_object_geometry_get(obj, NULL, NULL, &w, &h); 1549 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
1554 _emotion_object_aspect_border_apply(obj, sd, w, h); 1550 _emotion_object_aspect_border_apply(obj, sd, w, h);
1555 } 1551 }
@@ -1573,7 +1569,7 @@ _emotion_decode_stop(Evas_Object *obj)
1573 if (sd->play) 1569 if (sd->play)
1574 { 1570 {
1575 sd->play = 0; 1571 sd->play = 0;
1576 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_DECODE_STOP, NULL)); 1572 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_DECODE_STOP, NULL);
1577 } 1573 }
1578} 1574}
1579 1575
@@ -1589,26 +1585,26 @@ _emotion_open_done(Evas_Object *obj)
1589 emotion_object_position_set(obj, sd->remember_jump); 1585 emotion_object_position_set(obj, sd->remember_jump);
1590 if (sd->remember_play != sd->play) 1586 if (sd->remember_play != sd->play)
1591 emotion_object_play_set(obj, sd->remember_play); 1587 emotion_object_play_set(obj, sd->remember_play);
1592 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_OPEN_DONE, NULL)); 1588 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_OPEN_DONE, NULL);
1593 1589
1594} 1590}
1595 1591
1596EAPI void 1592EAPI void
1597_emotion_playback_started(Evas_Object *obj) 1593_emotion_playback_started(Evas_Object *obj)
1598{ 1594{
1599 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL)); 1595 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL);
1600} 1596}
1601 1597
1602EAPI void 1598EAPI void
1603_emotion_playback_finished(Evas_Object *obj) 1599_emotion_playback_finished(Evas_Object *obj)
1604{ 1600{
1605 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL)); 1601 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL);
1606} 1602}
1607 1603
1608EAPI void 1604EAPI void
1609_emotion_audio_level_change(Evas_Object *obj) 1605_emotion_audio_level_change(Evas_Object *obj)
1610{ 1606{
1611 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL)); 1607 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL);
1612} 1608}
1613 1609
1614EAPI void 1610EAPI void
@@ -1617,7 +1613,7 @@ _emotion_channels_change(Evas_Object *obj)
1617 Emotion_Object_Data *sd; 1613 Emotion_Object_Data *sd;
1618 1614
1619 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1615 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1620 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL)); 1616 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL);
1621} 1617}
1622 1618
1623EAPI void 1619EAPI void
@@ -1627,7 +1623,7 @@ _emotion_title_set(Evas_Object *obj, char *title)
1627 1623
1628 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1624 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1629 eina_stringshare_replace(&sd->title, title); 1625 eina_stringshare_replace(&sd->title, title);
1630 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL)); 1626 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL);
1631 1627
1632} 1628}
1633 1629
@@ -1639,7 +1635,7 @@ _emotion_progress_set(Evas_Object *obj, char *info, double st)
1639 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1635 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1640 eina_stringshare_replace(&sd->progress.info, info); 1636 eina_stringshare_replace(&sd->progress.info, info);
1641 sd->progress.stat = st; 1637 sd->progress.stat = st;
1642 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL)); 1638 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL);
1643} 1639}
1644 1640
1645EAPI void 1641EAPI void
@@ -1650,7 +1646,7 @@ _emotion_file_ref_set(Evas_Object *obj, const char *file, int num)
1650 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1646 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1651 eina_stringshare_replace(&sd->ref.file, file); 1647 eina_stringshare_replace(&sd->ref.file, file);
1652 sd->ref.num = num; 1648 sd->ref.num = num;
1653 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_REF_CHANGE, NULL)); 1649 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_REF_CHANGE, NULL);
1654} 1650}
1655 1651
1656EAPI void 1652EAPI void
@@ -1660,7 +1656,7 @@ _emotion_spu_button_num_set(Evas_Object *obj, int num)
1660 1656
1661 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1657 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1662 sd->spu.button_num = num; 1658 sd->spu.button_num = num;
1663 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL)); 1659 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL);
1664} 1660}
1665 1661
1666EAPI void 1662EAPI void
@@ -1670,7 +1666,7 @@ _emotion_spu_button_set(Evas_Object *obj, int button)
1670 1666
1671 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1667 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1672 sd->spu.button = button; 1668 sd->spu.button = button;
1673 eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL)); 1669 eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL);
1674} 1670}
1675 1671
1676EAPI void 1672EAPI void