summaryrefslogtreecommitdiff
path: root/src/tests/emotion
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-05-30 23:13:02 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-05-31 15:41:20 +0900
commitf767e8bea4b817ca900221d98b432f28488d07a9 (patch)
tree4ae8dd1b635c20a468c21fc7884747c886976da9 /src/tests/emotion
parent2949329d4ba5f7b4b3f59c173b31186dfb381d8b (diff)
edje: Move part drag APIs to efl_part
This moves all part_drag APIs to legacy and implements them for EO using efl_part(). All parts now support these APIs, even if they are not draggable. Making this more fine grained would probably be much extra work for little gain. This creates a new interface Efl.Ui.Drag.
Diffstat (limited to 'src/tests/emotion')
-rw-r--r--src/tests/emotion/emotion_test_main-eo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tests/emotion/emotion_test_main-eo.c b/src/tests/emotion/emotion_test_main-eo.c
index b096137ba6..fd8a51319f 100644
--- a/src/tests/emotion/emotion_test_main-eo.c
+++ b/src/tests/emotion/emotion_test_main-eo.c
@@ -306,7 +306,7 @@ video_obj_time_changed(Evas_Object *obj, Evas_Object *edje)
306 pos = emotion_object_position_get(obj); 306 pos = emotion_object_position_get(obj);
307 len = emotion_object_play_length_get(obj); 307 len = emotion_object_play_length_get(obj);
308 scale = (len > 0.0) ? pos / len : 0.0; 308 scale = (len > 0.0) ? pos / len : 0.0;
309 edje_obj_part_drag_value_set(edje, "video_progress", scale, 0.0); 309 efl_ui_drag_value_set(efl_part(edje, "video_progress"), scale, 0.0);
310 310
311 lh = len / 3600; 311 lh = len / 3600;
312 lm = len / 60 - (lh * 60); 312 lm = len / 60 - (lh * 60);
@@ -461,7 +461,7 @@ video_obj_signal_jump_cb(void *data, Evas_Object *o, const char *emission EINA_U
461 double len; 461 double len;
462 double x, y; 462 double x, y;
463 463
464 edje_obj_part_drag_value_get(o, source, &x, &y); 464 efl_ui_drag_value_get(efl_part(o, source), &x, &y);
465 len = emotion_object_play_length_get(ov); 465 len = emotion_object_play_length_get(ov);
466 emotion_object_position_set(ov, x * len); 466 emotion_object_position_set(ov, x * len);
467} 467}
@@ -474,7 +474,7 @@ video_obj_signal_alpha_cb(void *data, Evas_Object *o, const char *emission EINA_
474 double x, y; 474 double x, y;
475 char buf[256]; 475 char buf[256];
476 476
477 edje_obj_part_drag_value_get(o, source, &x, &y); 477 efl_ui_drag_value_get(efl_part(o, source), &x, &y);
478 alpha = 255 * y; 478 alpha = 255 * y;
479 efl_gfx_color_set(ov, alpha, alpha, alpha, alpha); 479 efl_gfx_color_set(ov, alpha, alpha, alpha, alpha);
480 snprintf(buf, sizeof(buf), "alpha %.0f", alpha); 480 snprintf(buf, sizeof(buf), "alpha %.0f", alpha);
@@ -488,7 +488,7 @@ video_obj_signal_vol_cb(void *data, Evas_Object *o, const char *emission EINA_UN
488 double vol; 488 double vol;
489 char buf[256]; 489 char buf[256];
490 490
491 edje_obj_part_drag_value_get(o, source, NULL, &vol); 491 efl_ui_drag_value_get(efl_part(o, source), NULL, &vol);
492 emotion_object_audio_volume_set(ov, vol); 492 emotion_object_audio_volume_set(ov, vol);
493 snprintf(buf, sizeof(buf), "vol %.2f", vol); 493 snprintf(buf, sizeof(buf), "vol %.2f", vol);
494 edje_obj_part_text_set(o, "video_volume_txt", buf); 494 edje_obj_part_text_set(o, "video_volume_txt", buf);
@@ -641,9 +641,9 @@ init_video_object(const char *module_filename, const char *filename)
641 edje_obj_signal_callback_add(oe, "frame_resize", "start", video_obj_signal_frame_resize_start_cb, oe); 641 edje_obj_signal_callback_add(oe, "frame_resize", "start", video_obj_signal_frame_resize_start_cb, oe);
642 edje_obj_signal_callback_add(oe, "frame_resize", "stop", video_obj_signal_frame_resize_stop_cb, oe); 642 edje_obj_signal_callback_add(oe, "frame_resize", "stop", video_obj_signal_frame_resize_stop_cb, oe);
643 edje_obj_signal_callback_add(oe, "mouse, move", "*", video_obj_signal_frame_move_cb, oe); 643 edje_obj_signal_callback_add(oe, "mouse, move", "*", video_obj_signal_frame_move_cb, oe);
644 edje_obj_part_drag_value_set(oe, "video_alpha", 0.0, 1.0); 644 efl_ui_drag_value_set(efl_part(oe, "video_alpha"), 0.0, 1.0);
645 edje_obj_part_text_set(oe, "video_alpha_txt", "alpha 255"); 645 edje_obj_part_text_set(oe, "video_alpha_txt", "alpha 255");
646 edje_obj_part_drag_value_set(oe, "video_volume", 0.0, 0.5); 646 efl_ui_drag_value_set(efl_part(oe, "video_volume"), 0.0, 0.5);
647 edje_obj_part_text_set(oe, "video_volume_txt", "vol 0.50"); 647 edje_obj_part_text_set(oe, "video_volume_txt", "vol 0.50");
648 edje_obj_signal_emit(oe, "video_state", "play"); 648 edje_obj_signal_emit(oe, "video_state", "play");
649 efl_gfx_visible_set(oe, EINA_TRUE); 649 efl_gfx_visible_set(oe, EINA_TRUE);