summaryrefslogtreecommitdiff
path: root/src/lib/emotion
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2016-08-22 19:40:39 -0300
committerVitor Sousa <vitorsousasilva@gmail.com>2016-08-26 15:45:07 -0300
commit8356b16a49d4f653d61940763eff947466b44e24 (patch)
treeb5d8e533b3df4ad45f2ea97071b7a826ae5d04b5 /src/lib/emotion
parent6b3ca899e8a60642466ddb6d7c7574b0c3ad9d9c (diff)
Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks; calling only event callbacks registered with the given event description pointer. Create the method Efl.Object.event_callback_legacy_call to inherit the old behavior from Efl.Object.event_callback_call, calling both Efl.Object events and legacy smart callbacks. Update all other files accordingly in order to still supply legacy callbacks while they are necessary.
Diffstat (limited to 'src/lib/emotion')
-rw-r--r--src/lib/emotion/emotion_smart.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index f9302e5016..044d63c5a9 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -1310,7 +1310,7 @@ _eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double)
1310 Emotion_Object_Data *sd = data; 1310 Emotion_Object_Data *sd = data;
1311 1311
1312 emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double); 1312 emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double);
1313 efl_event_callback_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL); 1313 efl_event_callback_legacy_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL);
1314 _eio_load_xattr_cleanup(sd, handler); 1314 _eio_load_xattr_cleanup(sd, handler);
1315} 1315}
1316 1316
@@ -1319,7 +1319,7 @@ _eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
1319{ 1319{
1320 Emotion_Object_Data *sd = data; 1320 Emotion_Object_Data *sd = data;
1321 1321
1322 efl_event_callback_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL); 1322 efl_event_callback_legacy_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL);
1323 _eio_load_xattr_cleanup(sd, handler); 1323 _eio_load_xattr_cleanup(sd, handler);
1324} 1324}
1325#endif 1325#endif
@@ -1354,10 +1354,10 @@ emotion_object_last_position_load(Evas_Object *obj)
1354 if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr)) 1354 if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr))
1355 { 1355 {
1356 emotion_object_position_set(obj, xattr); 1356 emotion_object_position_set(obj, xattr);
1357 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL); 1357 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL);
1358 } 1358 }
1359 else 1359 else
1360 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL); 1360 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL);
1361#endif 1361#endif
1362} 1362}
1363 1363
@@ -1380,7 +1380,7 @@ _eio_save_xattr_done(void *data, Eio_File *handler)
1380{ 1380{
1381 Emotion_Object_Data *sd = data; 1381 Emotion_Object_Data *sd = data;
1382 1382
1383 efl_event_callback_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL); 1383 efl_event_callback_legacy_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL);
1384 _eio_save_xattr_cleanup(sd, handler); 1384 _eio_save_xattr_cleanup(sd, handler);
1385} 1385}
1386 1386
@@ -1389,7 +1389,7 @@ _eio_save_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
1389{ 1389{
1390 Emotion_Object_Data *sd = data; 1390 Emotion_Object_Data *sd = data;
1391 1391
1392 efl_event_callback_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL); 1392 efl_event_callback_legacy_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL);
1393 _eio_save_xattr_cleanup(sd, handler); 1393 _eio_save_xattr_cleanup(sd, handler);
1394} 1394}
1395#endif 1395#endif
@@ -1419,9 +1419,9 @@ emotion_object_last_position_save(Evas_Object *obj)
1419 sd); 1419 sd);
1420#else 1420#else
1421 if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0)) 1421 if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0))
1422 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL); 1422 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL);
1423 else 1423 else
1424 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL); 1424 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL);
1425 1425
1426#endif 1426#endif
1427} 1427}
@@ -1483,7 +1483,7 @@ _emotion_frame_anim(void *data)
1483 _emotion_video_pos_update(obj, 1483 _emotion_video_pos_update(obj,
1484 emotion_engine_instance_pos_get(sd->engine_instance), 1484 emotion_engine_instance_pos_get(sd->engine_instance),
1485 emotion_engine_instance_len_get(sd->engine_instance)); 1485 emotion_engine_instance_len_get(sd->engine_instance));
1486 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL); 1486 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL);
1487 return EINA_FALSE; 1487 return EINA_FALSE;
1488} 1488}
1489 1489
@@ -1507,8 +1507,8 @@ _emotion_video_pos_update(Evas_Object *obj, double pos, double len)
1507 if (len != sd->len) nlen = 1; 1507 if (len != sd->len) nlen = 1;
1508 sd->pos = pos; 1508 sd->pos = pos;
1509 sd->len = len; 1509 sd->len = len;
1510 if (npos) efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL); 1510 if (npos) efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL);
1511 if (nlen) efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL); 1511 if (nlen) efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL);
1512} 1512}
1513 1513
1514EAPI void 1514EAPI void
@@ -1537,7 +1537,7 @@ _emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio)
1537 if (changed) 1537 if (changed)
1538 { 1538 {
1539 evas_object_size_hint_request_set(obj, w, h); 1539 evas_object_size_hint_request_set(obj, w, h);
1540 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL); 1540 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL);
1541 evas_object_geometry_get(obj, NULL, NULL, &w, &h); 1541 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
1542 _emotion_object_aspect_border_apply(obj, sd, w, h); 1542 _emotion_object_aspect_border_apply(obj, sd, w, h);
1543 } 1543 }
@@ -1561,7 +1561,7 @@ _emotion_decode_stop(Evas_Object *obj)
1561 if (sd->play) 1561 if (sd->play)
1562 { 1562 {
1563 sd->play = 0; 1563 sd->play = 0;
1564 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_DECODE_STOP, NULL); 1564 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_DECODE_STOP, NULL);
1565 } 1565 }
1566} 1566}
1567 1567
@@ -1577,26 +1577,26 @@ _emotion_open_done(Evas_Object *obj)
1577 emotion_object_position_set(obj, sd->remember_jump); 1577 emotion_object_position_set(obj, sd->remember_jump);
1578 if (sd->remember_play != sd->play) 1578 if (sd->remember_play != sd->play)
1579 emotion_object_play_set(obj, sd->remember_play); 1579 emotion_object_play_set(obj, sd->remember_play);
1580 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_OPEN_DONE, NULL); 1580 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_OPEN_DONE, NULL);
1581 1581
1582} 1582}
1583 1583
1584EAPI void 1584EAPI void
1585_emotion_playback_started(Evas_Object *obj) 1585_emotion_playback_started(Evas_Object *obj)
1586{ 1586{
1587 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL); 1587 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL);
1588} 1588}
1589 1589
1590EAPI void 1590EAPI void
1591_emotion_playback_finished(Evas_Object *obj) 1591_emotion_playback_finished(Evas_Object *obj)
1592{ 1592{
1593 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL); 1593 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL);
1594} 1594}
1595 1595
1596EAPI void 1596EAPI void
1597_emotion_audio_level_change(Evas_Object *obj) 1597_emotion_audio_level_change(Evas_Object *obj)
1598{ 1598{
1599 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL); 1599 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL);
1600} 1600}
1601 1601
1602EAPI void 1602EAPI void
@@ -1605,7 +1605,7 @@ _emotion_channels_change(Evas_Object *obj)
1605 Emotion_Object_Data *sd; 1605 Emotion_Object_Data *sd;
1606 1606
1607 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1607 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1608 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL); 1608 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL);
1609} 1609}
1610 1610
1611EAPI void 1611EAPI void
@@ -1615,7 +1615,7 @@ _emotion_title_set(Evas_Object *obj, char *title)
1615 1615
1616 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1616 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1617 eina_stringshare_replace(&sd->title, title); 1617 eina_stringshare_replace(&sd->title, title);
1618 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL); 1618 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL);
1619 1619
1620} 1620}
1621 1621
@@ -1627,7 +1627,7 @@ _emotion_progress_set(Evas_Object *obj, char *info, double st)
1627 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1627 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1628 eina_stringshare_replace(&sd->progress.info, info); 1628 eina_stringshare_replace(&sd->progress.info, info);
1629 sd->progress.stat = st; 1629 sd->progress.stat = st;
1630 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL); 1630 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL);
1631} 1631}
1632 1632
1633EAPI void 1633EAPI void
@@ -1638,7 +1638,7 @@ _emotion_file_ref_set(Evas_Object *obj, const char *file, int num)
1638 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1638 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1639 eina_stringshare_replace(&sd->ref.file, file); 1639 eina_stringshare_replace(&sd->ref.file, file);
1640 sd->ref.num = num; 1640 sd->ref.num = num;
1641 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_REF_CHANGE, NULL); 1641 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_REF_CHANGE, NULL);
1642} 1642}
1643 1643
1644EAPI void 1644EAPI void
@@ -1648,7 +1648,7 @@ _emotion_spu_button_num_set(Evas_Object *obj, int num)
1648 1648
1649 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1649 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1650 sd->spu.button_num = num; 1650 sd->spu.button_num = num;
1651 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL); 1651 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL);
1652} 1652}
1653 1653
1654EAPI void 1654EAPI void
@@ -1658,7 +1658,7 @@ _emotion_spu_button_set(Evas_Object *obj, int button)
1658 1658
1659 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1659 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1660 sd->spu.button = button; 1660 sd->spu.button = button;
1661 efl_event_callback_call(obj, EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL); 1661 efl_event_callback_legacy_call(obj, EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL);
1662} 1662}
1663 1663
1664EAPI void 1664EAPI void