From d99b921c4cabe857f3ffc0e06b3f78e99fe94195 Mon Sep 17 00:00:00 2001 From: "bhutani.92" Date: Mon, 15 May 2017 10:45:13 +0530 Subject: [PATCH] MiniController and Lock Screen MiniController created Change-Id: I85dc9e76d0bae9495a2e3148be54ee74702936c7 --- .../mini_controller/control_circle_icon_stop.png | Bin 0 -> 1129 bytes playview/res/edje/pv-lockscreenmini.edc | 227 +++- playview/res/edje/pv-minicontroller.edc | 1131 ++++++++++++++++---- playview/src/view/include/vp-play-view-priv.h | 2 +- playview/src/view/vp-play-normal-view.c | 79 +- playview/src/widget/vp-play-lockscreenmc.c | 82 +- playview/src/widget/vp-play-minicontroller.c | 126 ++- 7 files changed, 1314 insertions(+), 333 deletions(-) create mode 100755 playview/res/edje/images/mini_controller/control_circle_icon_stop.png diff --git a/playview/res/edje/images/mini_controller/control_circle_icon_stop.png b/playview/res/edje/images/mini_controller/control_circle_icon_stop.png new file mode 100755 index 0000000000000000000000000000000000000000..992538ee92c7801c6e0db963ffe9286076a3cbb9 GIT binary patch literal 1129 zcmbVL&1=(O7|-T5W?`_y6ci63yG&X0(WGe;TKkbSu4rfJA}fe!mb_g>(a5ph^?1z!vHmJ|IdKTmxj)G1fr?7}nPP_aH|QXIi%2 zM9ta_*@O;lL^gEjco@cpCca z3@1ra#F0uRu|+c2a*+`x-C#auP(fh&wufx!k`be^2D>OvVNVAkI9{zbB6fpeqHxNX z(C`?JW*Ntc;_6!mr~!VvaiVpgZ+U=efB<%V6W>Q`J_h65oh}p^VsGS|zKt)%*ifO_ zb%2YiYM#O;v}Ieerlb_LTuSq*maXs{mn{oYiIp@}lCot^RAP>kutJ6{t65E9v%JJ{ z6`_kw|l6;N+O1cNs8NM%JN z7glZ8g1z8!bUlM;Rp8s3z|wr^kp2A1_6ho|SW(g%uL=CW;vQhF|H&DHonfNl_@h|j zEnI=obX59yF=`&*;*RlgYn0|bXt=HRt7=IPkG>v#JWG(%#ly!x?|yzdyZ7exj(7a* z$^P}OGf~_fKUY5}PR=dV$0ieV&v(WruN)M26ASf&@dVzyg&uy{Ea-bP-S7Q1HqwWf uU5fY{P{{mPJTH!pha55GQ0Mseov|q*bSGYPKjmIV&0no7tFOxU9{d8>3t7+r literal 0 HcmV?d00001 diff --git a/playview/res/edje/pv-lockscreenmini.edc b/playview/res/edje/pv-lockscreenmini.edc index a2d380f..a4a285f 100644 --- a/playview/res/edje/pv-lockscreenmini.edc +++ b/playview/res/edje/pv-lockscreenmini.edc @@ -39,7 +39,7 @@ #define MC_LOCKSCREEN_PAUSE "lock_screen/control_circle_icon_pause.png" #define MC_LOCKSCREEN_PLAY_PRESS "lock_screen/control_circle_icon_play_press.png" #define MC_LOCKSCREEN_PAUSE_PRESS "lock_screen/control_circle_icon_pause_press.png" - +#define MC_MUSIC_STOP_BTN "lock_screen/control_circle_icon_stop.png" #define MC_MUSIC_ALBUM_FRAME "lock_screen/album_frame.png" @@ -834,6 +834,231 @@ group { } +group { + name: "video-lockscreenmini-live-streaming"; + images { + image: MC_LOCKSCREEN_PLAY COMP; + image: MC_MUSIC_STOP_BTN COMP; + image: MC_LOCKSCREEN_PLAY_PRESS COMP; + image: MC_MUSIC_ALBUM_FRAME COMP; + } + parts { + part{ name: "bg"; + type : RECT; + scale : 1; + mouse_events: 0; + description { + state: "default" 0.0; + min : 0 LOCKSCREEN_MINI_H; + fixed: 1 1; + rel1{ relative : 0 0;} + rel2{ relative : 1 1;} + color : MC_LOCKSCREEN_BG; + } + } + + part { name: "padding.top"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0 0; to: "bg"; } + rel2 { relative: 1 0; to: "bg"; } + min: 0 LOCKSCREEN_TOP_PADDING; + fixed: 0 1; + align: 0 0; + } + } + + part { name: "padding.left"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0 0; to: "bg"; } + rel2 { relative: 0 1; to: "bg"; } + min: LOCKSCREEN_LEFT_PADDING 0; + fixed: 1 0; + align: 0 0; + } + } + + part { name: "padding.right"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 1 0; to: "bg"; } + rel2 { relative: 1 1; to: "bg"; } + min: LOCKSCREEN_RIGHT_PADDING 0; + fixed: 1 0; + align: 1 0; + } + } + + part { name: "padding.bottom"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0 1; to: "bg"; } + rel2 { relative: 1 1; to: "bg"; } + min: 0 LOCKSCREEN_BOTTOM_PADDING; + fixed: 0 1; + align: 0 1; + } + } + part { name: "padding_for_albumart.top"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1 { relative: 0 0; to: "bg"; } + rel2 { relative: 1 0; to: "bg"; } + min: 0 40; + fixed: 0 1; + align: 0.0 0.0; + } + } + + part { name: "padding_for_albumart.bottom"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + rel1 { relative: 0 1; to: "bg"; } + rel2 { relative: 1 1; to: "bg"; } + min: 0 15; + fixed: 0 1; + align: 0 1; + } + } + part { name: "albumarmt_bg"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding_for_albumart.top"; } + rel2 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding_for_albumart.bottom"; } + min: ALBUM_ART_SIZE; + max: ALBUM_ART_SIZE; + fixed: 1 1; + align: 0.0 0.5; + } + } + part { name: "albumart_image"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + clip_to: "albumarmt_bg"; + description { state: "default" 0.0; + rel1 { relative: 0.5 0.5; to: "albumarmt_bg"; } + rel2 { relative: 0.5 0.5; to: "albumarmt_bg"; } + min: ALBUM_ART_SIZE; + max: ALBUM_ART_SIZE; + fixed: 1 1; + align: 0.5 0.5; + } + } + + part { name: "albumarmt_frame"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: "albumarmt_bg";} + rel2 { relative: 1.0 1.0; to: "albumarmt_bg";} + min: ALBUM_ART_SIZE; + image.normal: MC_MUSIC_ALBUM_FRAME; + color_class:"AO009"; + } + } + part { name: "elm.text"; + type: SWALLOW; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding.top";} + rel2 { relative: 0 1.0; to_x: "padding.right"; to_y: "padding.top"; offset: 0 45;} + fixed: 1 1; + } + } + + part { name: "control_area"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "elm.text"; } + rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "padding.bottom"; } + min: 0 134.4; + fixed: 0 1; + align: 0.5 0.5; + } + } + + part { name: "left_side_area"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0.27 0.45; to_x: "control_area"; to_y: "control_area";} + rel2 { relative: 0.27 0.45; to_x: "control_area"; to_y: "control_area";} + min: 99 134; + fixed: 1 1; + align: 0.5 0.5; + } + } + + part { name: "left_area"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: "left_side_area"; } + rel2 { relative: 1.0 1.0; to: "left_side_area"; } + min: LOCKSCREEN_BUTTON_SIZE_MIN_MAX; + fixed: 1 1; + align: 0.5 0.5; + } + } + + MC_LOCKSCREEN_PART_AREA_FROM_LEFT("left_area_padding", "left_area", LOCKSCREEN_INTERVAL, 134) + + MC_LOCKSCREEN_PART_AREA_FROM_LEFT("play_pause_btn_area", "left_area_padding", 126, 134) + + MC_LOCKSCREEN_PART_BUTTON("play_btn", "play_pause_btn_area", MC_MUSIC_STOP_BTN, MC_MUSIC_STOP_BTN, LOCKSCREEN_BIG_BTN_SIZE_MIN_MAX) + MC_LOCKSCREEN_PAUSE_PART_BUTTON("pause_btn", "play_pause_btn_area", MC_LOCKSCREEN_PLAY, MC_LOCKSCREEN_PLAY_PRESS, LOCKSCREEN_BIG_BTN_SIZE_MIN_MAX) + + MC_LOCKSCREEN_FOCUSED_COVER("play_pause", "play_pause_btn_area"); + + MC_LOCKSCREEN_PART_AREA_FROM_LEFT("play_pause_right_padding", "play_pause_btn_area", LOCKSCREEN_INTERVAL, 134) + } + + programs { + MC_LOCKSCREEN_BUTTON_PROGRAM("play_btn") + MC_LOCKSCREEN_BUTTON_VISIVBLE_PROGRAM("play_btn") + MC_LOCKSCREEN_BUTTON_PROGRAM("pause_btn") + MC_LOCKSCREEN_BUTTON_VISIVBLE_PROGRAM("pause_btn") + + program { name: "set_pause_icon"; + signal: "set_pause"; + source: "*"; + script{ + emit("hide_play_btn", "edje"); + emit("show_pause_btn", "edje"); + } + } + program { name: "set_play_icon"; + signal: "set_play"; + source: "*"; + script{ + emit("show_play_btn", "edje"); + emit("hide_pause_btn", "edje"); + } + } + } + +} } // collection diff --git a/playview/res/edje/pv-minicontroller.edc b/playview/res/edje/pv-minicontroller.edc index 49cfb31..e5fdfa9 100644 --- a/playview/res/edje/pv-minicontroller.edc +++ b/playview/res/edje/pv-minicontroller.edc @@ -36,7 +36,7 @@ #define MC_MUSIC_LAGRE_BTN_BG "mini_controller/bg_btn_player_01.png" #define MC_MUSIC_PLAY_BTN "mini_controller/music_btn_player_play_nor.png" #define MC_MUSIC_PAUSE_BTN "mini_controller/music_btn_player_pause_nor.png" - +#define MC_MUSIC_STOP_BTN "mini_controller/control_circle_icon_stop.png" #define MC_MUSIC_SMALL_BTN_EF "mini_controller/bg_btn_player_02_ef.png" #define MC_MUSIC_SMALL_BTN_BG "mini_controller/bg_btn_player_02.png" @@ -961,20 +961,17 @@ group { } - group { - name: "video-minicontroller-ld"; + name: "video-minicontroller-live-streaming"; images { image: MC_MUSIC_LAGRE_BTN_EF COMP; image: MC_MUSIC_LAGRE_BTN_BG COMP; image: MC_MUSIC_PLAY_BTN COMP; - image: MC_MUSIC_PAUSE_BTN COMP; + image: MC_MUSIC_STOP_BTN COMP; image: MC_MUSIC_SMALL_BTN_EF COMP; image: MC_MUSIC_SMALL_BTN_BG COMP; - image: MC_MUSIC_CLOSE_BTN COMP; - image: MC_MUSIC_PREV_BTN COMP; - image: MC_MUSIC_NEXT_BTN COMP; + image: MC_MUSIC_ALBUM_FRAME COMP; } parts { part{ name: "bg"; @@ -983,7 +980,7 @@ group { mouse_events: 0; description { state: "default" 0.0; - min : 0 MINI_H; + min : 0 MINI_H_PORT; fixed: 1 1; rel1{ relative : 0 0;} rel2{ relative : 1 1;} @@ -991,6 +988,23 @@ group { } } + part { name: "event_box"; + type : SWALLOW; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + rel1 { + relative: 0 0; + to: "bg"; + } + rel2 { + relative: 1 1; + to: "bg"; + } + } + } + part { name: "padding.top"; type: SPACER; scale: 1; @@ -1005,8 +1019,7 @@ group { } part { name: "padding.left"; - type: SPACER; - scale: 1; + type: SPACER; scale: 1; mouse_events: 0; description { state: "default" 0.0; rel1 { relative: 0 0; to: "bg"; } @@ -1046,9 +1059,11 @@ group { part { name: "padding_for_albumart.top"; type: SPACER; scale: 1; - description { state: "default" 0.0; - rel2 { relative: 1.0 0.0; } - min: 0 7; + description { + state: "default" 0.0; + rel1 { relative: 0 0; to: "bg"; } + rel2 { relative: 1 0; to: "bg"; } + min: 0 15; fixed: 0 1; align: 0.0 0.0; } @@ -1060,7 +1075,7 @@ group { description { state: "default" 0.0; rel1 { relative: 0 1; to: "bg"; } rel2 { relative: 1 1; to: "bg"; } - min: 0 7; + min: 0 15; fixed: 0 1; align: 0 1; } @@ -1079,6 +1094,7 @@ group { align: 0.0 0.5; } } + part { name: "albumart_image"; type: SWALLOW; scale: 1; @@ -1093,6 +1109,7 @@ group { align: 0.5 0.5; } } + part { name: "albumarmt_frame"; type: IMAGE; scale: 1; @@ -1107,54 +1124,39 @@ group { } part { name: "right_area"; - type: RECT; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 1.0 1.0; to_x: "albumarmt_bg"; to_y: "padding.top"; } - rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "padding.bottom"; } - align: 0.0 0.0; - color:0 255 0 0; - } + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 1.0 1.0; to_x: "albumarmt_bg"; to_y: "padding.top"; } + rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "padding.bottom"; } + align: 0.0 0.0; + } } + part { name: "elm.text"; // title type: SWALLOW; mouse_events: 1; scale: 1; description { state: "default" 0.0; - rel1 { relative: 0.1 1.0; to_x: "right_area"; to_y: "padding.top";} - rel2 { relative: 290/329 1.0; to_x: "right_area"; to_y: "padding.top";} + rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "padding.top"; offset: 38 0;} + rel2 { relative: 0.83 1.0; to_x: "right_area"; to_y: "padding.top";} + min: 143 17; fixed: 1 1; align: 0.5 0.0; } } - part { name: "mid_padding"; - type: RECT; - mouse_events: 0; - scale: 1; - description - { state: "default" 0.0; - //min: 323 3; - //max: 323 3; - fixed: 1 1; - rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "elm.text"; offset: 40 0; } - rel2 { relative: 1.0 1.0; to_x: "right_area"; to_y: "elm.text"; } - fixed: 1 1; - align: 0.0 0.0; - color: 255 0 0 0; - } - } - part { name: "close_btn_area"; - type: SPACER; + type: RECT; scale: 1; - mouse_events: 1; + mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "elm.text";offset: -30 15;} - rel2 { relative: 0.0 0.0; to: "padding.right";to_y: "elm.text"; offset: -30 15;} + rel1 { relative: 0.0 1.0; to_x: "padding.right"; to_y: "elm.text";offset: -25 1;} + rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "elm.text"; offset: -25 1;} min: BUTTON_CLOSE_SIZE_MAX; max: BUTTON_CLOSE_SIZE_MAX; + color: 255 0 0 0; fixed: 1 1; } } @@ -1163,210 +1165,931 @@ group { type: RECT; scale: 1; mouse_events: 1; - repeat_events: 1; - description { - state: "default" 0.0; - rel1 { to: "close_btn_area"; offset: -7 -7;} - rel2 { to: "close_btn_area"; offset: 7 7;} + repeat_events: 1; + description { state: "default" 0.0; + rel1 { to: "close_btn_area"; offset: -7 -7; } + rel2 { to: "close_btn_area"; offset: 7 7; } color: 0 0 0 0; } } - part { name: "button_area"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - rel1 { relative: 0 1; to_x:"elm.text"; to_y: "mid_padding";} - rel2 { relative: 1 0; to_x: "elm.text"; to_y: "padding.bottom"; } - visible: 1; - color: 0 255 0 0; - } - } - - part { name: "rew_btn_area"; + part { name: "mid_padding"; type: RECT; + mouse_events: 0; scale: 1; - mouse_events: 1; - description { state: "default" 0.0; - rel1 { relative: 0.2 0.5; to: "button_area"; offset: 10 0;} - rel2 { relative: 0.2 0.5; to: "button_area"; offset: 10 -16;} - min: BUTTON_SIZE_MIN_MAX; - fixed: 1 1; - align: 0.0 0.5; - visible: 0; + description + { state: "default" 0.0; + rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "elm.text"; offset: 40 0; } + rel2 { relative: 1.0 1.0; to_x: "padding.right"; to_y: "elm.text"; offset: 0 0; } + align: 0.0 0.0; + color: 255 0 0 0; } } - - MC_IMAGE_PART("rew_btn_bg","rew_btn_area",MC_MUSIC_SMALL_BTN_BG,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("rew_btn_ef","rew_btn_area",MC_MUSIC_SMALL_BTN_EF,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("rew_btn","rew_btn_area",MC_MUSIC_PREV_BTN,61,185,204,255,34,104,115,255,FF_BTN_SIZE_MIN_MAX) - part { name: "rew_btn_touch_area"; + part { name: "button_area"; type: RECT; scale: 1; - mouse_events: 1; - repeat_events: 1; description { state: "default" 0.0; - rel1 { to: "rew_btn_area"; } - rel2 { to: "rew_btn_area";} - color: 0 0 0 0; + rel1 { relative: 0 1; to: "mid_padding";} + rel2 { relative: 1 0; to_x: "elm.text"; to_y: "padding.bottom"; } + visible: 1; } } - MC_FOCUSED_COVER("rew_btn", "rew_btn_area"); - - part { name: "play_pause_btn_area"; type: SPACER; scale: 1; mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "button_area";offset: 0 0;} - rel2 { relative: 0.5 0.5; to: "button_area";offset: 0 -16;} - min: PLAY_BTN_SIZE_MIN_MAX; - max: PLAY_BTN_SIZE_MIN_MAX; + rel1 { relative: 0.4 0.5; to: "button_area"; offset: 0 0;} + rel2 { relative: 0.4 0.5; to: "button_area"; offset: 0 -16; } + min: BUTTON_SIZE_MIN_MAX; + max: BUTTON_SIZE_MIN_MAX; fixed: 1 1; + align:0.0 0.5; } } - MC_IMAGE_PART("play_btn_bg","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_BG,61,185,204,255,34,104,115,255,BIG_BTN_SIZE_MIN_MAX) MC_IMAGE_PART_FOCUS("play_btn_ef","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_EF,BIG_BTN_SIZE_MIN_MAX) MC_IMAGE_PART("play_btn","play_pause_btn_area",MC_MUSIC_PLAY_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) - MC_IMAGE_PART("pause_btn","play_pause_btn_area",MC_MUSIC_PAUSE_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) + MC_IMAGE_PART("pause_btn","play_pause_btn_area",MC_MUSIC_STOP_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) part { name: "play_btn_touch_area"; - type: RECT; - scale: 1; - mouse_events: 1; - repeat_events: 1; - description { state: "default" 0.0; - rel1 { to: "play_pause_btn_area"; } - rel2 { to: "play_pause_btn_area";} - color: 0 0 0 0; - fixed: 1 1; - } - } - MC_FOCUSED_COVER("play_pause", "play_pause_btn_area"); - - - part { name: "ff_btn_area"; - type: SPACER; - scale: 1; - mouse_events: 1; - description { state: "default" 0.0; - rel1 { relative: 0.7 0.5; to: "button_area";offset: -10 0;} - rel2 { relative: 0.7 0.5; to: "button_area";offset: -10 -16;} - min: FF_BTN_SIZE_MIN_MAX; - max: FF_BTN_SIZE_MIN_MAX; - fixed: 1 1; - align:0.0 0.5; - } - } - - MC_IMAGE_PART("ff_btn_bg","ff_btn_area",MC_MUSIC_SMALL_BTN_BG,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("ff_btn_ef","ff_btn_area",MC_MUSIC_SMALL_BTN_EF,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) - MC_IMAGE_PART("ff_btn","ff_btn_area",MC_MUSIC_NEXT_BTN,61,185,204,255,34,104,115,255,FF_BTN_SIZE_MIN_MAX) - part { name: "ff_btn_touch_area"; type: RECT; scale: 1; mouse_events: 1; repeat_events: 1; description { state: "default" 0.0; - rel1 { to: "ff_btn_area"; } - rel2 { to: "ff_btn_area";} + rel1 { to: "play_pause_btn_area"; } + rel2 { to: "play_pause_btn_area"; } color: 0 0 0 0; - fixed: 1 1; } } - MC_FOCUSED_COVER("ff_btn", "ff_btn_area"); - } + MC_FOCUSED_COVER("play_pause", "play_pause_btn_area"); + } programs { - MC_PROGRAM_IMAGE_VISIBLE("play_btn", "show_play_btn", "hide_play_btn") MC_PROGRAM_IMAGE_VISIBLE("pause_btn", "show_pause_btn", "hide_pause_btn") - program { name: "play_pause_btn_area_press"; + program { name: "albumart_cb"; signal: "mouse,down,1"; - source: "play_btn_touch_area"; - script{ - set_state(PART:"play_btn_bg", "pressed", 0.0); - set_state(PART:"play_btn_ef", "pressed", 0.0); - } - } - - program { name: "play_pause_btn_area_up"; - signal: "mouse,up,1"; - source: "play_btn_touch_area"; + source: "albumart_image"; script{ - set_state(PART:"play_btn_bg", "default", 0.0); - set_state(PART:"play_btn_ef", "default", 0.0); + emit("albumart_clicked", "edje"); } } - program { name: "rew_btn_touch_area_press"; + program { name: "close_area_btn_down"; signal: "mouse,down,1"; - source: "rew_btn_touch_area"; + source: "close_btn_touch_area"; script{ - set_state(PART:"rew_btn_bg", "pressed", 0.0); - set_state(PART:"rew_btn_ef", "pressed", 0.0); - set_state(PART:"rew_btn", "pressed", 0.0); + set_state(PART:"close_btn", "pressed", 0.0); + emit("close_btn_down", "edje"); } } - program { name: "rew_btn_touch_area_up"; + program { name: "close_area_btn_up"; signal: "mouse,up,1"; - source: "rew_btn_touch_area"; + source: "close_btn_touch_area"; script{ - set_state(PART:"rew_btn_bg", "default", 0.0); - set_state(PART:"rew_btn_ef", "default", 0.0); - set_state(PART:"rew_btn", "default", 0.0); + set_state(PART:"close_btn", "default", 0.0); + emit("close_btn_up", "edje"); } } - program { name: "ff_btn_touch_area_press"; + program { name: "play_pause_btn_area_press"; signal: "mouse,down,1"; - source: "ff_btn_touch_area"; + source: "play_btn_touch_area"; script{ - set_state(PART:"ff_btn_bg", "pressed", 0.0); - set_state(PART:"ff_btn_ef", "pressed", 0.0); - set_state(PART:"ff_btn", "pressed", 0.0); + set_state(PART:"play_btn_bg", "pressed", 0.0); + set_state(PART:"play_btn_ef", "pressed", 0.0); } } - program { name: "ff_btn_touch_area_up"; + program { name: "play_pause_btn_area_up"; signal: "mouse,up,1"; - source: "ff_btn_touch_area"; + source: "play_btn_touch_area"; script{ - set_state(PART:"ff_btn_bg", "default", 0.0); - set_state(PART:"ff_btn_ef", "default", 0.0); - set_state(PART:"ff_btn", "default", 0.0); + set_state(PART:"play_btn_bg", "default", 0.0); + set_state(PART:"play_btn_ef", "default", 0.0); } } - program { name: "albumart_cb"; - signal: "mouse,down,1"; - source: "albumart_image"; + program { name: "close_area_btn_clicked"; + signal: "mouse,clicked,1"; + source: "close_btn_touch_area"; + script{ + emit("close_btn_clicked", "edje"); + } + } + + program { name: "set_pause_icon"; + signal: "set_pause"; + source: "*"; + script{ + set_state(PART:"play_btn", "hide", 0.0); + set_state(PART:"pause_btn", "default",0.0); + set_state(PART:"play_btn_ef", "focus", 0.0); + } + } + program { name: "set_play_icon"; + signal: "set_play"; + source: "*"; + script{ + set_state(PART:"play_btn", "default", 0.0); + set_state(PART:"pause_btn", "hide",0.0); + set_state(PART:"play_btn_ef", "default", 0.0); + } + } + } +} + +group { + name: "video-minicontroller-ld"; + images { + image: MC_MUSIC_LAGRE_BTN_EF COMP; + image: MC_MUSIC_LAGRE_BTN_BG COMP; + image: MC_MUSIC_PLAY_BTN COMP; + image: MC_MUSIC_PAUSE_BTN COMP; + image: MC_MUSIC_SMALL_BTN_EF COMP; + image: MC_MUSIC_SMALL_BTN_BG COMP; + + image: MC_MUSIC_CLOSE_BTN COMP; + image: MC_MUSIC_PREV_BTN COMP; + image: MC_MUSIC_NEXT_BTN COMP; + } + parts { + part{ name: "bg"; + type : RECT; + scale : 1; + mouse_events: 0; + description { + state: "default" 0.0; + min : 0 MINI_H; + fixed: 1 1; + rel1{ relative : 0 0;} + rel2{ relative : 1 1;} + color: MC_BG; + } + } + + part { name: "padding.top"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0 0; to: "bg"; } + rel2 { relative: 1 0; to: "bg"; } + min: 0 TOP_PADDING; + fixed: 0 1; + align: 0 0; + } + } + + part { name: "padding.left"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0 0; to: "bg"; } + rel2 { relative: 0 1; to: "bg"; } + min: LEFT_PADDING 0; + fixed: 1 0; + align: 0 0; + } + } + + part { name: "padding.right"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 1 0; to: "bg"; } + rel2 { relative: 1 1; to: "bg"; } + min: RIGHT_PADDING 0; + fixed: 1 0; + align: 1 0; + } + } + + part { name: "padding.bottom"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0 1; to: "bg"; } + rel2 { relative: 1 1; to: "bg"; } + min: 0 BOTTOM_PADDING; + fixed: 0 1; + align: 0 1; + } + } + + part { name: "padding_for_albumart.top"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + rel2 { relative: 1.0 0.0; } + min: 0 7; + fixed: 0 1; + align: 0.0 0.0; + } + } + + part { name: "padding_for_albumart.bottom"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + rel1 { relative: 0 1; to: "bg"; } + rel2 { relative: 1 1; to: "bg"; } + min: 0 7; + fixed: 0 1; + align: 0 1; + } + } + + part { name: "albumarmt_bg"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding_for_albumart.top"; } + rel2 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding_for_albumart.bottom"; } + min: ALBUM_ART_SIZE; + max: ALBUM_ART_SIZE; + fixed: 1 1; + align: 0.0 0.5; + } + } + part { name: "albumart_image"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + clip_to: "albumarmt_bg"; + description { state: "default" 0.0; + rel1 { relative: 0.5 0.5; to: "albumarmt_bg"; } + rel2 { relative: 0.5 0.5; to: "albumarmt_bg"; } + min: ALBUM_ART_SIZE; + max: ALBUM_ART_SIZE; + fixed: 1 1; + align: 0.5 0.5; + } + } + part { name: "albumarmt_frame"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: "albumarmt_bg";} + rel2 { relative: 1.0 1.0; to: "albumarmt_bg";} + min: ALBUM_ART_SIZE; + image.normal: MC_MUSIC_ALBUM_FRAME; + color_class:"AO009"; + } + } + + part { name: "right_area"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 1.0 1.0; to_x: "albumarmt_bg"; to_y: "padding.top"; } + rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "padding.bottom"; } + align: 0.0 0.0; + color:0 255 0 0; + } + } + part { name: "elm.text"; // title + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + rel1 { relative: 0.1 1.0; to_x: "right_area"; to_y: "padding.top";} + rel2 { relative: 290/329 1.0; to_x: "right_area"; to_y: "padding.top";} + fixed: 1 1; + align: 0.5 0.0; + } + } + + part { name: "mid_padding"; + type: RECT; + mouse_events: 0; + scale: 1; + description + { state: "default" 0.0; + //min: 323 3; + //max: 323 3; + fixed: 1 1; + rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "elm.text"; offset: 40 0; } + rel2 { relative: 1.0 1.0; to_x: "right_area"; to_y: "elm.text"; } + fixed: 1 1; + align: 0.0 0.0; + color: 255 0 0 0; + } + } + + part { name: "close_btn_area"; + type: SPACER; + scale: 1; + mouse_events: 1; + description { state: "default" 0.0; + rel1 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "elm.text";offset: -30 15;} + rel2 { relative: 0.0 0.0; to: "padding.right";to_y: "elm.text"; offset: -30 15;} + min: BUTTON_CLOSE_SIZE_MAX; + max: BUTTON_CLOSE_SIZE_MAX; + fixed: 1 1; + } + } + MC_IMAGE_PART("close_btn","close_btn_area",MC_MUSIC_CLOSE_BTN,61,185,204,255,61,185,204,255,BUTTON_CLOSE_SIZE_MAX) + part { name: "close_btn_touch_area"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + rel1 { to: "close_btn_area"; offset: -7 -7;} + rel2 { to: "close_btn_area"; offset: 7 7;} + color: 0 0 0 0; + } + } + + part { name: "button_area"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + rel1 { relative: 0 1; to_x:"elm.text"; to_y: "mid_padding";} + rel2 { relative: 1 0; to_x: "elm.text"; to_y: "padding.bottom"; } + visible: 1; + color: 0 255 0 0; + } + } + + part { name: "rew_btn_area"; + type: RECT; + scale: 1; + mouse_events: 1; + description { state: "default" 0.0; + rel1 { relative: 0.2 0.5; to: "button_area"; offset: 10 0;} + rel2 { relative: 0.2 0.5; to: "button_area"; offset: 10 -16;} + min: BUTTON_SIZE_MIN_MAX; + fixed: 1 1; + align: 0.0 0.5; + visible: 0; + } + } + + + MC_IMAGE_PART("rew_btn_bg","rew_btn_area",MC_MUSIC_SMALL_BTN_BG,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) + MC_IMAGE_PART("rew_btn_ef","rew_btn_area",MC_MUSIC_SMALL_BTN_EF,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) + MC_IMAGE_PART("rew_btn","rew_btn_area",MC_MUSIC_PREV_BTN,61,185,204,255,34,104,115,255,FF_BTN_SIZE_MIN_MAX) + part { name: "rew_btn_touch_area"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + rel1 { to: "rew_btn_area"; } + rel2 { to: "rew_btn_area";} + color: 0 0 0 0; + } + } + MC_FOCUSED_COVER("rew_btn", "rew_btn_area"); + + + + part { name: "play_pause_btn_area"; + type: SPACER; + scale: 1; + mouse_events: 1; + description { state: "default" 0.0; + rel1 { relative: 0.5 0.5; to: "button_area";offset: 0 0;} + rel2 { relative: 0.5 0.5; to: "button_area";offset: 0 -16;} + min: PLAY_BTN_SIZE_MIN_MAX; + max: PLAY_BTN_SIZE_MIN_MAX; + fixed: 1 1; + } + } + + + MC_IMAGE_PART("play_btn_bg","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_BG,61,185,204,255,34,104,115,255,BIG_BTN_SIZE_MIN_MAX) + MC_IMAGE_PART_FOCUS("play_btn_ef","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_EF,BIG_BTN_SIZE_MIN_MAX) + MC_IMAGE_PART("play_btn","play_pause_btn_area",MC_MUSIC_PLAY_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) + MC_IMAGE_PART("pause_btn","play_pause_btn_area",MC_MUSIC_PAUSE_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) + part { name: "play_btn_touch_area"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + rel1 { to: "play_pause_btn_area"; } + rel2 { to: "play_pause_btn_area";} + color: 0 0 0 0; + fixed: 1 1; + } + } + MC_FOCUSED_COVER("play_pause", "play_pause_btn_area"); + + + part { name: "ff_btn_area"; + type: SPACER; + scale: 1; + mouse_events: 1; + description { state: "default" 0.0; + rel1 { relative: 0.7 0.5; to: "button_area";offset: -10 0;} + rel2 { relative: 0.7 0.5; to: "button_area";offset: -10 -16;} + min: FF_BTN_SIZE_MIN_MAX; + max: FF_BTN_SIZE_MIN_MAX; + fixed: 1 1; + align:0.0 0.5; + } + } + + MC_IMAGE_PART("ff_btn_bg","ff_btn_area",MC_MUSIC_SMALL_BTN_BG,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) + MC_IMAGE_PART("ff_btn_ef","ff_btn_area",MC_MUSIC_SMALL_BTN_EF,0,0,0,0,0,0,0,0,BUTTON_SIZE_MIN_MAX) + MC_IMAGE_PART("ff_btn","ff_btn_area",MC_MUSIC_NEXT_BTN,61,185,204,255,34,104,115,255,FF_BTN_SIZE_MIN_MAX) + part { name: "ff_btn_touch_area"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + rel1 { to: "ff_btn_area"; } + rel2 { to: "ff_btn_area";} + color: 0 0 0 0; + fixed: 1 1; + } + } + MC_FOCUSED_COVER("ff_btn", "ff_btn_area"); + } + + programs { + + MC_PROGRAM_IMAGE_VISIBLE("play_btn", "show_play_btn", "hide_play_btn") + MC_PROGRAM_IMAGE_VISIBLE("pause_btn", "show_pause_btn", "hide_pause_btn") + + program { name: "play_pause_btn_area_press"; + signal: "mouse,down,1"; + source: "play_btn_touch_area"; + script{ + set_state(PART:"play_btn_bg", "pressed", 0.0); + set_state(PART:"play_btn_ef", "pressed", 0.0); + } + } + + program { name: "play_pause_btn_area_up"; + signal: "mouse,up,1"; + source: "play_btn_touch_area"; + script{ + set_state(PART:"play_btn_bg", "default", 0.0); + set_state(PART:"play_btn_ef", "default", 0.0); + } + } + + program { name: "rew_btn_touch_area_press"; + signal: "mouse,down,1"; + source: "rew_btn_touch_area"; + script{ + set_state(PART:"rew_btn_bg", "pressed", 0.0); + set_state(PART:"rew_btn_ef", "pressed", 0.0); + set_state(PART:"rew_btn", "pressed", 0.0); + } + } + + program { name: "rew_btn_touch_area_up"; + signal: "mouse,up,1"; + source: "rew_btn_touch_area"; + script{ + set_state(PART:"rew_btn_bg", "default", 0.0); + set_state(PART:"rew_btn_ef", "default", 0.0); + set_state(PART:"rew_btn", "default", 0.0); + } + } + + program { name: "ff_btn_touch_area_press"; + signal: "mouse,down,1"; + source: "ff_btn_touch_area"; + script{ + set_state(PART:"ff_btn_bg", "pressed", 0.0); + set_state(PART:"ff_btn_ef", "pressed", 0.0); + set_state(PART:"ff_btn", "pressed", 0.0); + } + } + + program { name: "ff_btn_touch_area_up"; + signal: "mouse,up,1"; + source: "ff_btn_touch_area"; + script{ + set_state(PART:"ff_btn_bg", "default", 0.0); + set_state(PART:"ff_btn_ef", "default", 0.0); + set_state(PART:"ff_btn", "default", 0.0); + } + } + + program { name: "albumart_cb"; + signal: "mouse,down,1"; + source: "albumart_image"; script{ emit("albumart_clicked", "edje"); } } - /* - program{ - name: "albumart_cb_after_down"; - source: "albumart_image"; - signal: "mouse,down,1"; - transition: ACCELERATE 0.02; + /* + program{ + name: "albumart_cb_after_down"; + source: "albumart_image"; + signal: "mouse,down,1"; + transition: ACCELERATE 0.02; + } + program { + name: "albumart_cb_down"; + source: "albumart_image"; + signal: "mouse,down,1"; + action: PLAY_SAMPLE "button-pressed" 1.0; + after: "albumart_cb_after_down"; + transition: ACCELERATE 0.02; + } +*/ + program { name: "close_area_btn_down"; + signal: "mouse,down,1"; + source: "close_btn_touch_area"; + script{ + set_state(PART:"close_btn", "pressed", 0.0); + emit("close_btn_down", "edje"); + } + } + + program { name: "close_area_btn_up"; + signal: "mouse,up,1"; + source: "close_btn_touch_area"; + script{ + set_state(PART:"close_btn", "default", 0.0); + emit("close_btn_up", "edje"); + } + } + + program { name: "close_area_btn_clicked"; + signal: "mouse,up,1"; + source: "close_btn_touch_area"; + script{ + emit("close_btn_clicked", "edje"); + } + } + + program { name: "set_pause_icon"; + signal: "set_pause"; + source: "*"; + script{ + set_state(PART:"play_btn", "hide", 0.0); + set_state(PART:"pause_btn", "default",0.0); + set_state(PART:"play_btn_ef", "focus", 0.0); + } + } + program { name: "set_play_icon"; + signal: "set_play"; + source: "*"; + script{ + set_state(PART:"play_btn", "default", 0.0); + set_state(PART:"pause_btn", "hide",0.0); + set_state(PART:"play_btn_ef", "default", 0.0); + } + } + + program { name: "set_ff_btn_uppressed"; + signal: "ff_btn_unpressed"; + source: "*"; + script{ + set_state(PART:"ff_btn_bg", "default", 0.0); + set_state(PART:"ff_btn_ef", "default", 0.0); + set_state(PART:"ff_btn", "default", 0.0); + } + } + program { name: "set_rew_btn_uppressed"; + signal: "rew_btn_unpressed"; + source: "*"; + script{ + set_state(PART:"rew_btn_bg", "default", 0.0); + set_state(PART:"rew_btn_ef", "default", 0.0); + set_state(PART:"rew_btn", "default", 0.0); + } + } + /* + program { name: "touch_snd_rew"; + signal: "mouse,down,1"; + source: "rew_btn_touch_area"; + action: RUN_PLUGIN "touch_sound_plugin"; + } + + program { name: "touch_snd_ff"; + signal: "mouse,down,1"; + source: "ff_btn_touch_area"; + action: RUN_PLUGIN "touch_sound_plugin"; + } + program { name: "touch_snd_play_pause"; + signal: "mouse,down,1"; + source: "play_btn_touch_area"; + action: RUN_PLUGIN "touch_sound_plugin"; + } + program { name: "touch_snd_shuffle"; + signal: "mouse,down,1"; + source: "shuffle_btn_touch_area"; + action: RUN_PLUGIN "touch_sound_plugin"; + } + program { name: "touch_snd_close"; + signal: "mouse,down,1"; + source: "close_btn_touch_area"; + action: RUN_PLUGIN "touch_sound_plugin"; + } + program { name: "touch_snd_repeat"; + signal: "mouse,down,1"; + source: "repeat_btn_touch_area"; + action: RUN_PLUGIN "touch_sound_plugin"; + } +*/ + } +} + +group { + name: "video-minicontroller-live-streaming-ld"; + images { + image: MC_MUSIC_LAGRE_BTN_EF COMP; + image: MC_MUSIC_LAGRE_BTN_BG COMP; + image: MC_MUSIC_PLAY_BTN COMP; + image: MC_MUSIC_STOP_BTN COMP; + image: MC_MUSIC_SMALL_BTN_EF COMP; + image: MC_MUSIC_SMALL_BTN_BG COMP; + image: MC_MUSIC_CLOSE_BTN COMP; + } + parts { + part{ name: "bg"; + type : RECT; + scale : 1; + mouse_events: 0; + description { + state: "default" 0.0; + min : 0 MINI_H; + fixed: 1 1; + rel1{ relative : 0 0;} + rel2{ relative : 1 1;} + color: MC_BG; + } + } + + part { name: "padding.top"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0 0; to: "bg"; } + rel2 { relative: 1 0; to: "bg"; } + min: 0 TOP_PADDING; + fixed: 0 1; + align: 0 0; + } + } + + part { name: "padding.left"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0 0; to: "bg"; } + rel2 { relative: 0 1; to: "bg"; } + min: LEFT_PADDING 0; + fixed: 1 0; + align: 0 0; + } + } + + part { name: "padding.right"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 1 0; to: "bg"; } + rel2 { relative: 1 1; to: "bg"; } + min: RIGHT_PADDING 0; + fixed: 1 0; + align: 1 0; + } + } + + part { name: "padding.bottom"; + type: SPACER; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0 1; to: "bg"; } + rel2 { relative: 1 1; to: "bg"; } + min: 0 BOTTOM_PADDING; + fixed: 0 1; + align: 0 1; + } + } + + part { name: "padding_for_albumart.top"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + rel2 { relative: 1.0 0.0; } + min: 0 7; + fixed: 0 1; + align: 0.0 0.0; + } + } + + part { name: "padding_for_albumart.bottom"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + rel1 { relative: 0 1; to: "bg"; } + rel2 { relative: 1 1; to: "bg"; } + min: 0 7; + fixed: 0 1; + align: 0 1; + } + } + + part { name: "albumarmt_bg"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 1.0 1.0; to_x: "padding.left"; to_y: "padding_for_albumart.top"; } + rel2 { relative: 1.0 0.0; to_x: "padding.left"; to_y: "padding_for_albumart.bottom"; } + min: ALBUM_ART_SIZE; + max: ALBUM_ART_SIZE; + fixed: 1 1; + align: 0.0 0.5; + } + } + part { name: "albumart_image"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + clip_to: "albumarmt_bg"; + description { state: "default" 0.0; + rel1 { relative: 0.5 0.5; to: "albumarmt_bg"; } + rel2 { relative: 0.5 0.5; to: "albumarmt_bg"; } + min: ALBUM_ART_SIZE; + max: ALBUM_ART_SIZE; + fixed: 1 1; + align: 0.5 0.5; + } + } + part { name: "albumarmt_frame"; + type: IMAGE; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: "albumarmt_bg";} + rel2 { relative: 1.0 1.0; to: "albumarmt_bg";} + min: ALBUM_ART_SIZE; + image.normal: MC_MUSIC_ALBUM_FRAME; + color_class:"AO009"; + } + } + + part { name: "right_area"; + type: RECT; + scale: 1; + mouse_events: 0; + description { state: "default" 0.0; + rel1 { relative: 1.0 1.0; to_x: "albumarmt_bg"; to_y: "padding.top"; } + rel2 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "padding.bottom"; } + align: 0.0 0.0; + color:0 255 0 0; + } + } + part { name: "elm.text"; // title + type: SWALLOW; + mouse_events: 1; + scale: 1; + description { state: "default" 0.0; + rel1 { relative: 0.1 1.0; to_x: "right_area"; to_y: "padding.top";} + rel2 { relative: 290/329 1.0; to_x: "right_area"; to_y: "padding.top";} + fixed: 1 1; + align: 0.5 0.0; + } + } + + part { name: "mid_padding"; + type: RECT; + mouse_events: 0; + scale: 1; + description + { + state: "default" 0.0; + fixed: 1 1; + rel1 { relative: 0.0 1.0; to_x: "right_area"; to_y: "elm.text"; offset: 40 0; } + rel2 { relative: 1.0 1.0; to_x: "right_area"; to_y: "elm.text"; } + fixed: 1 1; + align: 0.0 0.0; + color: 255 0 0 0; + } + } + + part { name: "close_btn_area"; + type: SPACER; + scale: 1; + mouse_events: 1; + description { state: "default" 0.0; + rel1 { relative: 0.0 0.0; to_x: "padding.right"; to_y: "elm.text";offset: -30 15;} + rel2 { relative: 0.0 0.0; to: "padding.right";to_y: "elm.text"; offset: -30 15;} + min: BUTTON_CLOSE_SIZE_MAX; + max: BUTTON_CLOSE_SIZE_MAX; + fixed: 1 1; + } + } + MC_IMAGE_PART("close_btn","close_btn_area",MC_MUSIC_CLOSE_BTN,61,185,204,255,61,185,204,255,BUTTON_CLOSE_SIZE_MAX) + part { name: "close_btn_touch_area"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + rel1 { to: "close_btn_area"; offset: -7 -7;} + rel2 { to: "close_btn_area"; offset: 7 7;} + color: 0 0 0 0; + } + } + + part { name: "button_area"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + rel1 { relative: 0 1; to_x:"elm.text"; to_y: "mid_padding";} + rel2 { relative: 1 0; to_x: "elm.text"; to_y: "padding.bottom"; } + visible: 1; + color: 0 255 0 0; + } + } + + part { name: "play_pause_btn_area"; + type: SPACER; + scale: 1; + mouse_events: 1; + description { state: "default" 0.0; + rel1 { relative: 0.5 0.5; to: "button_area";offset: 0 0;} + rel2 { relative: 0.5 0.5; to: "button_area";offset: 0 -16;} + min: PLAY_BTN_SIZE_MIN_MAX; + max: PLAY_BTN_SIZE_MIN_MAX; + fixed: 1 1; + } + } + + + MC_IMAGE_PART("play_btn_bg","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_BG,61,185,204,255,34,104,115,255,BIG_BTN_SIZE_MIN_MAX) + MC_IMAGE_PART_FOCUS("play_btn_ef","play_pause_btn_area",MC_MUSIC_LAGRE_BTN_EF,BIG_BTN_SIZE_MIN_MAX) + MC_IMAGE_PART("play_btn","play_pause_btn_area",MC_MUSIC_PLAY_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) + MC_IMAGE_PART("pause_btn","play_pause_btn_area",MC_MUSIC_STOP_BTN,255,255,255,255,255,255,255,255,PLAY_BTN_SIZE_MIN_MAX) + part { name: "play_btn_touch_area"; + type: RECT; + scale: 1; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + rel1 { to: "play_pause_btn_area"; } + rel2 { to: "play_pause_btn_area";} + color: 0 0 0 0; + fixed: 1 1; + } + } + MC_FOCUSED_COVER("play_pause", "play_pause_btn_area"); + } + + programs { + + MC_PROGRAM_IMAGE_VISIBLE("play_btn", "show_play_btn", "hide_play_btn") + MC_PROGRAM_IMAGE_VISIBLE("pause_btn", "show_pause_btn", "hide_pause_btn") + + program { name: "play_pause_btn_area_press"; + signal: "mouse,down,1"; + source: "play_btn_touch_area"; + script{ + set_state(PART:"play_btn_bg", "pressed", 0.0); + set_state(PART:"play_btn_ef", "pressed", 0.0); + } + } + + program { name: "play_pause_btn_area_up"; + signal: "mouse,up,1"; + source: "play_btn_touch_area"; + script{ + set_state(PART:"play_btn_bg", "default", 0.0); + set_state(PART:"play_btn_ef", "default", 0.0); + } } - program { - name: "albumart_cb_down"; - source: "albumart_image"; - signal: "mouse,down,1"; - action: PLAY_SAMPLE "button-pressed" 1.0; - after: "albumart_cb_after_down"; - transition: ACCELERATE 0.02; + + program { name: "albumart_cb"; + signal: "mouse,down,1"; + source: "albumart_image"; + script{ + emit("albumart_clicked", "edje"); + } } -*/ + program { name: "close_area_btn_down"; signal: "mouse,down,1"; source: "close_btn_touch_area"; @@ -1411,58 +2134,6 @@ group { set_state(PART:"play_btn_ef", "default", 0.0); } } - - program { name: "set_ff_btn_uppressed"; - signal: "ff_btn_unpressed"; - source: "*"; - script{ - set_state(PART:"ff_btn_bg", "default", 0.0); - set_state(PART:"ff_btn_ef", "default", 0.0); - set_state(PART:"ff_btn", "default", 0.0); - } - } - program { name: "set_rew_btn_uppressed"; - signal: "rew_btn_unpressed"; - source: "*"; - script{ - set_state(PART:"rew_btn_bg", "default", 0.0); - set_state(PART:"rew_btn_ef", "default", 0.0); - set_state(PART:"rew_btn", "default", 0.0); - } - } - /* - program { name: "touch_snd_rew"; - signal: "mouse,down,1"; - source: "rew_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - - program { name: "touch_snd_ff"; - signal: "mouse,down,1"; - source: "ff_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_play_pause"; - signal: "mouse,down,1"; - source: "play_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_shuffle"; - signal: "mouse,down,1"; - source: "shuffle_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_close"; - signal: "mouse,down,1"; - source: "close_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } - program { name: "touch_snd_repeat"; - signal: "mouse,down,1"; - source: "repeat_btn_touch_area"; - action: RUN_PLUGIN "touch_sound_plugin"; - } -*/ } } diff --git a/playview/src/view/include/vp-play-view-priv.h b/playview/src/view/include/vp-play-view-priv.h index 401225e..f607c41 100644 --- a/playview/src/view/include/vp-play-view-priv.h +++ b/playview/src/view/include/vp-play-view-priv.h @@ -171,6 +171,6 @@ typedef struct _PlayView { bool lockmini_visible; bool lockmini_hide; bool b_lockmini_show; - + bool isLiveStreaming; app_control_h pServiceShare; } PlayView; diff --git a/playview/src/view/vp-play-normal-view.c b/playview/src/view/vp-play-normal-view.c index 92c6089..f0d5741 100644 --- a/playview/src/view/vp-play-normal-view.c +++ b/playview/src/view/vp-play-normal-view.c @@ -143,6 +143,9 @@ #define VP_NORMAL_DEFAULT_HEIGHT (800 * elm_config_scale_get()) #endif +#define VP_NORMAL_STREAMING_PROTOCOLS_MAX 2 +#define VP_NORMAL_MAX_STR_LEN 8 + bool stay_pause = false; typedef struct _ProgressMouseInfo { @@ -392,6 +395,7 @@ typedef struct _NormalView { bool bSharepopup; bool bSharePanelPause; bool bSharePanelFocusIn; //first focus in is menu popup hide, second is share panel hdie + bool isLiveStreaming; #ifdef SUBTITLE_K_FEATURE bool bSubtitleDown; @@ -5515,7 +5519,6 @@ static void __vp_normal_more_btn_clicked_cb(void *pUserData, if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_WEB) { VideoLogInfo("current launching type not support menu."); - return; } if (strstr(pPlayView->szMediaURL, "/.") != NULL) { VideoLogInfo("hidden file not suport menu."); @@ -5626,26 +5629,50 @@ static void __vp_normal_more_btn_clicked_cb(void *pUserData, /* Play speed */ elm_ctxpopup_item_append(pNormalView->pCtxPopup, - VP_PLAY_STRING_POPUP_PLAY_SPEED, NULL, - __vp_normal_ctx_popup_play_speed_cb, - (void *) pNormalView); + VP_PLAY_STRING_POPUP_PLAY_SPEED, NULL, + __vp_normal_ctx_popup_play_speed_cb, + (void *) pNormalView); /* subtitles */ elm_ctxpopup_item_append(pNormalView->pCtxPopup, - VP_PLAY_STRING_POPUP_SUBTITLE, NULL, - __vp_normal_ctx_popup_subtitle_cb, - (void *) pNormalView); + VP_PLAY_STRING_POPUP_SUBTITLE, NULL, + __vp_normal_ctx_popup_subtitle_cb, + (void *) pNormalView); break; case VIDEO_PLAY_TYPE_WEB: - /* Settings */ - if (FALSE) { + /* Audio only */ + if (pNormalView->bAudioOnly) elm_ctxpopup_item_append(pNormalView->pCtxPopup, - VP_PLAY_STRING_POPUP_SETTINGS, NULL, - __vp_normal_ctx_popup_setting_cb, - (void *) pNormalView); - } + VP_PLAY_STRING_POPUP_DISABLE_AUDIO_ONLY, + NULL, + __vp_normal_ctx_popup_audio_only_cb, + (void *) pNormalView); + else + elm_ctxpopup_item_append(pNormalView->pCtxPopup, + VP_PLAY_STRING_POPUP_ENABLE_AUDIO_ONLY, + NULL, + __vp_normal_ctx_popup_audio_only_cb, + (void *) pNormalView); + + /* Play speed */ + elm_ctxpopup_item_append(pNormalView->pCtxPopup, + VP_PLAY_STRING_POPUP_PLAY_SPEED, NULL, + __vp_normal_ctx_popup_play_speed_cb, + (void *) pNormalView); + + /* subtitles */ + elm_ctxpopup_item_append(pNormalView->pCtxPopup, + VP_PLAY_STRING_POPUP_SUBTITLE, NULL, + __vp_normal_ctx_popup_subtitle_cb, + (void *) pNormalView); + + /* Details */ + elm_ctxpopup_item_append(pNormalView->pCtxPopup, + VP_PLAY_STRING_COM_DETAILS, NULL, + __vp_normal_ctx_popup_detail_cb, + (void *) pNormalView); break; case VIDEO_PLAY_TYPE_MULTI_PATH: @@ -13169,6 +13196,30 @@ static void _vp_play_normal_view_prepare_pipe_cb(void *data, } +void vp_check_is_live_streming(NormalView *pNormalView, PlayView * pPlayView, char *path) +{ + /* Supported streaming protocols */ + char streamingProtocols[VP_NORMAL_STREAMING_PROTOCOLS_MAX][VP_NORMAL_MAX_STR_LEN] = + { + "http://", + "rtsp://" + }; + + int ctr; + + pNormalView->isLiveStreaming = false; + pPlayView->isLiveStreaming = false; + + for(ctr = 0; ctr < VP_NORMAL_STREAMING_PROTOCOLS_MAX; ctr++) + { + if(!strncmp(streamingProtocols[ctr], path, strlen(streamingProtocols[ctr]))) { + pNormalView->isLiveStreaming = true; + pPlayView->isLiveStreaming = true; + break; + } + } +} + normal_view_handle vp_play_normal_view_create(PlayView * pPlayView, video_play_launching_type_t nLaunchingType) @@ -13340,6 +13391,8 @@ bool vp_play_normal_view_realize(normal_view_handle pViewHandle) _vp_play_normal_view_set_volume_state(pNormalView); + vp_check_is_live_streming(pNormalView, pPlayView, pNormalView->szMediaURL); + if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_GALLERY || pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MYFILE) { char *szFolder = diff --git a/playview/src/widget/vp-play-lockscreenmc.c b/playview/src/widget/vp-play-lockscreenmc.c index 1c8b73f..fbd19cb 100644 --- a/playview/src/widget/vp-play-lockscreenmc.c +++ b/playview/src/widget/vp-play-lockscreenmc.c @@ -413,14 +413,23 @@ _vp_lockscreenmini_update_layout(PlayView * pPlayView, bool landscape) return; } + bool isLiveStreaming = pPlayView->isLiveStreaming; + VP_EVAS_TIMER_DEL(pPlayView->lockmini_button_timer); if (pPlayView->lockmini_layout) { evas_object_del(pPlayView->lockmini_layout); } - pPlayView->lockmini_layout = - _load_edj(pPlayView->win_lockmini, LOCKSCREENMINI_EDJ_NAME, - "video-lockscreenmini"); + + if (isLiveStreaming) { + pPlayView->lockmini_layout = + _load_edj(pPlayView->win_lockmini, LOCKSCREENMINI_EDJ_NAME, + "video-lockscreenmini-live-streaming"); + } else { + pPlayView->lockmini_layout = + _load_edj(pPlayView->win_lockmini, LOCKSCREENMINI_EDJ_NAME, + "video-lockscreenmini"); + } if (!pPlayView->lockmini_layout) { VideoLogError("layout making failed"); @@ -444,22 +453,24 @@ _vp_lockscreenmini_update_layout(PlayView * pPlayView, bool landscape) elm_object_focus_allow_set(pPlayView->lsicon_icon, EINA_TRUE); /*-------> REW button ------->*/ - Evas_Object *rew_focus_btn = - elm_button_add(pPlayView->lockmini_layout); - elm_object_style_set(rew_focus_btn, "focus"); - elm_object_part_content_set(pPlayView->lockmini_layout, "rew_focus", - rew_focus_btn); - elm_object_focus_custom_chain_append(pPlayView->lockmini_layout, - rew_focus_btn, NULL); - evas_object_smart_callback_add(rew_focus_btn, "clicked", - _vp_lockscreenmini_rew_btn_clicked_cb, - pPlayView); - evas_object_smart_callback_add(rew_focus_btn, "pressed", - _vp_lockscreenmini_rew_btn_pressed_cb, - pPlayView); - evas_object_smart_callback_add(rew_focus_btn, "unpressed", - _vp_lockscreenmini_rew_btn_unpressed_cb, - pPlayView); + if (!isLiveStreaming) { + Evas_Object *rew_focus_btn = + elm_button_add(pPlayView->lockmini_layout); + elm_object_style_set(rew_focus_btn, "focus"); + elm_object_part_content_set(pPlayView->lockmini_layout, "rew_focus", + rew_focus_btn); + elm_object_focus_custom_chain_append(pPlayView->lockmini_layout, + rew_focus_btn, NULL); + evas_object_smart_callback_add(rew_focus_btn, "clicked", + _vp_lockscreenmini_rew_btn_clicked_cb, + pPlayView); + evas_object_smart_callback_add(rew_focus_btn, "pressed", + _vp_lockscreenmini_rew_btn_pressed_cb, + pPlayView); + evas_object_smart_callback_add(rew_focus_btn, "unpressed", + _vp_lockscreenmini_rew_btn_unpressed_cb, + pPlayView); + } /*-------> play/pause button ------->*/ Evas_Object *play_pause_focus_btn = @@ -474,22 +485,23 @@ _vp_lockscreenmini_update_layout(PlayView * pPlayView, bool landscape) pPlayView); /*------->FF button ------->*/ - Evas_Object *ff_focus_btn = elm_button_add(pPlayView->lockmini_layout); - elm_object_style_set(ff_focus_btn, "focus"); - elm_object_part_content_set(pPlayView->lockmini_layout, "ff_focus", - ff_focus_btn); - elm_object_focus_custom_chain_append(pPlayView->lockmini_layout, - ff_focus_btn, NULL); - evas_object_smart_callback_add(ff_focus_btn, "clicked", - _vp_lockscreenmini_ff_btn_clicked_cb, - pPlayView); - evas_object_smart_callback_add(ff_focus_btn, "pressed", - _vp_lockscreenmini_ff_btn_pressed_cb, - pPlayView); - evas_object_smart_callback_add(ff_focus_btn, "unpressed", - _vp_lockscreenmini_ff_btn_unpressed_cb, - pPlayView); - + if (!isLiveStreaming) { + Evas_Object *ff_focus_btn = elm_button_add(pPlayView->lockmini_layout); + elm_object_style_set(ff_focus_btn, "focus"); + elm_object_part_content_set(pPlayView->lockmini_layout, "ff_focus", + ff_focus_btn); + elm_object_focus_custom_chain_append(pPlayView->lockmini_layout, + ff_focus_btn, NULL); + evas_object_smart_callback_add(ff_focus_btn, "clicked", + _vp_lockscreenmini_ff_btn_clicked_cb, + pPlayView); + evas_object_smart_callback_add(ff_focus_btn, "pressed", + _vp_lockscreenmini_ff_btn_pressed_cb, + pPlayView); + evas_object_smart_callback_add(ff_focus_btn, "unpressed", + _vp_lockscreenmini_ff_btn_unpressed_cb, + pPlayView); + } _vp_lockscreenmini_update_btn(pPlayView); } diff --git a/playview/src/widget/vp-play-minicontroller.c b/playview/src/widget/vp-play-minicontroller.c index abeafa6..4304395 100644 --- a/playview/src/widget/vp-play-minicontroller.c +++ b/playview/src/widget/vp-play-minicontroller.c @@ -592,6 +592,8 @@ _vp_minicontroller_update_layout(PlayView * pPlayView, bool landscape) VideoLogError("pPlayView is NULL"); return; } + bool isLiveStreaming = pPlayView->isLiveStreaming; + VideoLogDebug("isLiveStreaming is %d", isLiveStreaming); VP_EVAS_TIMER_DEL(pPlayView->minicon_button_timer); @@ -600,16 +602,30 @@ _vp_minicontroller_update_layout(PlayView * pPlayView, bool landscape) pPlayView->minicontroller_layout = NULL; } - if (landscape) { - VideoLogDebug("angle: 90 or 270"); - pPlayView->minicontroller_layout = - _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, - "video-minicontroller-ld"); + if (isLiveStreaming) { + if (landscape) { + VideoLogDebug("angle: 90 or 270"); + pPlayView->minicontroller_layout = + _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, + "video-minicontroller-live-streaming-ld"); + } else { + VideoLogDebug("angle: 0"); + pPlayView->minicontroller_layout = + _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, + "video-minicontroller-live-streaming"); + } } else { - VideoLogDebug("angle: 0"); - pPlayView->minicontroller_layout = - _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, - "video-minicontroller"); + if (landscape) { + VideoLogDebug("angle: 90 or 270"); + pPlayView->minicontroller_layout = + _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, + "video-minicontroller-ld"); + } else { + VideoLogDebug("angle: 0"); + pPlayView->minicontroller_layout = + _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, + "video-minicontroller"); + } } if (!pPlayView->minicontroller_layout) { @@ -634,26 +650,28 @@ _vp_minicontroller_update_layout(PlayView * pPlayView, bool landscape) elm_object_focus_allow_set(pPlayView->minicon_icon, EINA_TRUE); /*-------> REW button ------->*/ - Evas_Object *rew_focus_btn = - elm_button_add(pPlayView->minicontroller_layout); - elm_object_style_set(rew_focus_btn, "focus"); - elm_object_part_content_set(pPlayView->minicontroller_layout, - "rew_btn_focus", rew_focus_btn); - - elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, - rew_focus_btn, NULL); - evas_object_smart_callback_add(rew_focus_btn, "clicked", - _vp_minicontroller_rew_btn_clicked_cb, - pPlayView); - evas_object_smart_callback_add(rew_focus_btn, "pressed", - _vp_minicontroller_rew_btn_pressed_cb, - pPlayView); - evas_object_smart_callback_add(rew_focus_btn, "unpressed", - _vp_minicontroller_rew_btn_unpressed_cb, - pPlayView); - evas_object_event_callback_add(rew_focus_btn, EVAS_CALLBACK_DEL, - _vp_minicontroller_rew_btn_del_cb, - NULL); + if (!isLiveStreaming) { + Evas_Object *rew_focus_btn = + elm_button_add(pPlayView->minicontroller_layout); + elm_object_style_set(rew_focus_btn, "focus"); + elm_object_part_content_set(pPlayView->minicontroller_layout, + "rew_btn_focus", rew_focus_btn); + + elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, + rew_focus_btn, NULL); + evas_object_smart_callback_add(rew_focus_btn, "clicked", + _vp_minicontroller_rew_btn_clicked_cb, + pPlayView); + evas_object_smart_callback_add(rew_focus_btn, "pressed", + _vp_minicontroller_rew_btn_pressed_cb, + pPlayView); + evas_object_smart_callback_add(rew_focus_btn, "unpressed", + _vp_minicontroller_rew_btn_unpressed_cb, + pPlayView); + evas_object_event_callback_add(rew_focus_btn, EVAS_CALLBACK_DEL, + _vp_minicontroller_rew_btn_del_cb, + NULL); + } /*-------> play/pause button ------->*/ Evas_Object *play_pause_focus_btn = @@ -668,30 +686,32 @@ _vp_minicontroller_update_layout(PlayView * pPlayView, bool landscape) pPlayView); /*------->FF button ------->*/ - Evas_Object *ff_focus_btn = - elm_button_add(pPlayView->minicontroller_layout); - elm_object_style_set(ff_focus_btn, "focus"); - elm_object_part_content_set(pPlayView->minicontroller_layout, - "ff_btn_focus", ff_focus_btn); - - elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, - ff_focus_btn, NULL); - evas_object_smart_callback_add(ff_focus_btn, "clicked", - _vp_minicontroller_ff_btn_clicked_cb, - pPlayView); - evas_object_smart_callback_add(ff_focus_btn, "pressed", - _vp_minicontroller_ff_btn_pressed_cb, - pPlayView); - evas_object_smart_callback_add(ff_focus_btn, "unpressed", - _vp_minicontroller_ff_btn_unpressed_cb, - pPlayView); - evas_object_event_callback_add(ff_focus_btn, EVAS_CALLBACK_DEL, - _vp_minicontroller_ff_btn_del_cb, NULL); - - /*-------> close button ------->*/ - edje_object_signal_callback_add(_EDJ(pPlayView->minicontroller_layout), - "*", "*", _minicontroller_action_cb, - pPlayView); + if (!isLiveStreaming) { + Evas_Object *ff_focus_btn = + elm_button_add(pPlayView->minicontroller_layout); + elm_object_style_set(ff_focus_btn, "focus"); + elm_object_part_content_set(pPlayView->minicontroller_layout, + "ff_btn_focus", ff_focus_btn); + + elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, + ff_focus_btn, NULL); + evas_object_smart_callback_add(ff_focus_btn, "clicked", + _vp_minicontroller_ff_btn_clicked_cb, + pPlayView); + evas_object_smart_callback_add(ff_focus_btn, "pressed", + _vp_minicontroller_ff_btn_pressed_cb, + pPlayView); + evas_object_smart_callback_add(ff_focus_btn, "unpressed", + _vp_minicontroller_ff_btn_unpressed_cb, + pPlayView); + evas_object_event_callback_add(ff_focus_btn, EVAS_CALLBACK_DEL, + _vp_minicontroller_ff_btn_del_cb, NULL); + + /*-------> close button ------->*/ + edje_object_signal_callback_add(_EDJ(pPlayView->minicontroller_layout), + "*", "*", _minicontroller_action_cb, + pPlayView); + } _vp_minicontroller_update_btn(pPlayView); } -- 2.7.4