/* check temp */
#include "vp-play-log.h"
-#define MINI_CONTROLLER_HEIGHT (93)
+typedef struct _mini_controller_slider_data {
+ Ecore_Timer *duration_timer;
+ Evas_Object *slider;
+ Eina_Bool is_mouse_down;
+} mini_controller_slider_data;
+
+#define MINI_CONTROLLER_HEIGHT ELM_SCALE_SIZE(112)
+#define MINI_CONTROLLER_WIDTH ELM_SCALE_SIZE(1200)
#define WL_INDI_H 27 //Window Layout Indicator Height
#define PAUSE_TIME_OUT 120.
+#define VP_MINICONTROLLER_SLIDER_TIMER_INTERVAL 0.3
+#define PROGRESSBAR_TIME_LENGTH 9
+#define PROGRESSBAR_TIME_FORMAT "02u:%02u:%02u"
+#define PROGRESSBAR_TIME_ARGS(t) \
+ (t) / (60 * 60), \
+ ((t) / 60) % 60, \
+ (t) % 60
+
static time_t press_time;
static time_t release_time;
-int MINI_CONTROLLER_WIDTH;
-int MINI_CONTROLLER_WIDTH_LANDSCAPE;
-static void _minicontroller_action_cb(void *data, Evas_Object * obj,
- const char *emission,
- const char *source);
static Evas_Object *_load_edj(Evas_Object * parent, const char *file,
const char *group);
static void _load_minicontroller(PlayView * pPlayView);
VideoLogError("pPlayView is NULL");
} else {
VideoLogDebug("Showing controller.");
- minicontrol_send_event(pPlayView->win_minicon,
- MINICONTROL_EVENT_REQUEST_HIDE, NULL);
+ minicontrol_send_event(pPlayView->win_minicon, MINICONTROL_EVENT_REQUEST_HIDE, NULL);
}
vp_play_util_app_resume();
* @param source
*/
static void
-_minicontroller_action_cb(void *data, Evas_Object * obj,
+_minicontroller_close_button_clicked_cb(void *data, Evas_Object * obj,
const char *emission, const char *source)
{
PlayView *pPlayView = (PlayView *) data;
if (!pPlayView) {
VideoLogError("pPlayView is NULL");
}
- if (emission) {
- if (!g_strcmp0(emission, "close_btn_clicked")) {
- VideoLogDebug("close button clicked!!");
- elm_exit();
- } else if (!g_strcmp0(emission, "albumart_clicked")) {
- VideoLogDebug("albumart clicked!!");
- _vp_minicontroller_action_show_player_view(pPlayView);
- return;
- }
- }
+ VideoLogDebug("close button clicked!!");
+ elm_exit();
+}
+static void
+_minicontroller_album_art_clicked_cb(void *data, Evas_Object * obj,
+ const char *emission, const char *source)
+{
+ PlayView *pPlayView = (PlayView *) data;
+ if (!pPlayView) {
+ VideoLogError("pPlayView is NULL");
+ }
+ VideoLogDebug("albumart clicked!!");
+ _vp_minicontroller_action_show_player_view(pPlayView);
}
+
/**
*
* @param parent
bundle * event_arg)
{
VideoLogDebug("Handling events for Minicontroller!!");
- if (event_type ==
- (minicontrol_viewer_event_e) MINICONTROL_EVENT_REQUEST_HIDE) {
- VideoLogDebug("Request to close Video Player");
- }
- if (event_type ==
- (minicontrol_viewer_event_e) MINICONTROL_VIEWER_EVENT_REPORT_ANGLE) {
- char *value = NULL;
- int angle = 0;
- bundle_get_str(event_arg, "angle", &value);
- if (value && strlen(value) > 0) {
- angle = atoi(value);
- VideoLogDebug("Angle is : %d", angle);
+ if (event_type == MINICONTROL_VIEWER_EVENT_HIDE) {
+ VideoLogDebug("Mini Controller is hidden");
+ }
+ if (event_type == MINICONTROL_VIEWER_EVENT_REPORT_ANGLE) {
+ if(event_arg) {
+ char *value = NULL;
+ int angle = 0;
+ bundle_get_str(event_arg, "angle", &value);
+ if (value && strlen(value) > 0) {
+ angle = atoi(value);
+ VideoLogDebug("Angle is : %d", angle);
+ vp_minicontroller_rotate(app_data, angle);
+ }
+ } else {
+ // Video-Player need to be closed when user removes the mini-controller notification from quickpanel and
+ // we have to use the MINICONTROL_VIEWER_EVENT_REPORT_ANGLE event to close because hide event [MINICONTROL_VIEWER_EVENT_HIDE] is also being
+ // emitted when quickpanel is closed on swipe up/down. So to differentiate between quickpanel close and notification remove
+ // scenario we are using the MINICONTROL_VIEWER_EVENT_REPORT_ANGLE with null event_arg so that we can close video-player on correct scenario.
+ VideoLogDebug("Closing video player");
+ elm_exit();
}
- vp_minicontroller_rotate(app_data, angle);
- } else if (event_type == MINICONTROL_EVENT_REQUEST_HIDE) {
- VideoLogDebug("Closing.");
- elm_exit();
+ } else if (event_type == MINICONTROL_VIEWER_EVENT_SHOW) {
+ VideoLogDebug("Mini Controller is shown.");
}
}
VideoLogError("pPlayView is NULL");
return;
}
- int angle = elm_win_rotation_get((Evas_Object *) pPlayView->pWin);
-
- VideoLogError("angle======================%d", angle);
- int w = 0;
- if ((elm_config_scale_get() - 1.7) < 0.0001) {
- MINI_CONTROLLER_WIDTH = 318;
- MINI_CONTROLLER_WIDTH_LANDSCAPE = 564;
- } else if ((elm_config_scale_get() - 1.8) < 0.0001) {
- MINI_CONTROLLER_WIDTH = 267;
- MINI_CONTROLLER_WIDTH_LANDSCAPE = 444;
- } else if ((elm_config_scale_get() - 2.4) < 0.0001) {
- MINI_CONTROLLER_WIDTH = 300;
- MINI_CONTROLLER_WIDTH_LANDSCAPE = 533;
- } else if ((elm_config_scale_get() - 2.6) < 0.0001) {
- MINI_CONTROLLER_WIDTH = 277;
- MINI_CONTROLLER_WIDTH_LANDSCAPE = 492;
- } else if ((elm_config_scale_get() - 2.8) < 0.0001) {
- MINI_CONTROLLER_WIDTH = 257;
- MINI_CONTROLLER_WIDTH_LANDSCAPE = 457;
- }
-
- if (angle == 90 || angle == 270) {
- w = MINI_CONTROLLER_WIDTH_LANDSCAPE;
- } else {
- w = MINI_CONTROLLER_WIDTH;
- }
-
- double scale = elm_config_scale_get();
- VideoLogDebug("scale: %f and width: %d and height: %d", scale, w,
- MINI_CONTROLLER_HEIGHT);
- evas_object_resize(pPlayView->win_minicon, w * scale,
- MINI_CONTROLLER_HEIGHT * scale);
+ evas_object_resize(pPlayView->win_minicon, MINI_CONTROLLER_WIDTH, MINI_CONTROLLER_WIDTH);
return;
}
VideoLogError("pPlayView is NULL");
return -1;
}
-
+ mini_controller_slider_data *pMCSliderHandler = calloc(1, sizeof(mini_controller_slider_data));
+ if(pMCSliderHandler == NULL) {
+ VideoLogError("Failed to allocate memory for handler of mini-controller slider");
+ return -1;
+ }
+ pPlayView->minicon_slider_handler = (void*)pMCSliderHandler;
if (!(pPlayView->minicontroller_layout && pPlayView->win_minicon)) {
_load_minicontroller(pPlayView);
return;
}
- vp_mm_player_state_t nState =
- vp_play_normal_view_get_player_state(pPlayView);
+ vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
VideoLogInfo("nState:%d", nState);
+ Evas_Object *play_pause_button = elm_object_part_content_get(pPlayView->minicontroller_layout, "play.pause.swallow");
+ if(play_pause_button == NULL) {
+ VideoLogError("play/pause button is invalid");
+ return;
+ }
+ Evas_Object *icon = elm_object_part_content_get(play_pause_button, "icon");
+ if(icon == NULL) {
+ VideoLogError("icon for play/pause button is invalid");
+ return;
+ }
+ char image_path[1024] = {0, };
+ char *path = app_get_resource_path();
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
- elm_object_signal_emit(pPlayView->minicontroller_layout,
- "set_pause", "c_source");
+ snprintf(image_path, 1024, "%s%s/%s", path, "edje/images/mini_controller", "mini-controller_pause.png");
+ VideoLogError("Setting Pause: %s", image_path);
+ elm_image_file_set(icon, image_path, NULL);
} else {
- elm_object_signal_emit(pPlayView->minicontroller_layout,
- "set_play", "c_source");
+ snprintf(image_path, 1024, "%s%s/%s", path, "edje/images/mini_controller", "mini-controller_play.png");
+ VideoLogError("Setting Play: %s", image_path);
+ elm_image_file_set(icon, image_path, NULL);
}
-
+ free(path);
+ path = NULL;
}
/**
{
VP_EVAS_TIMER_DEL(pPlayView->minicon_button_timer);
- vp_mm_player_state_t nState =
- vp_play_normal_view_get_player_state(pPlayView);
+ vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
VideoLogInfo("nState:%d", nState);
+ mini_controller_slider_data *slider_handler = (mini_controller_slider_data*)pPlayView->minicon_slider_handler;
+ // No need to update the button state when update is due to mouse down event callbacks
+ // as state of player will resume to original state when mouse up event will be called.
+ if(slider_handler && slider_handler->is_mouse_down) {
+ VideoLogInfo("skiping ..mini-controller button update");
+ return;
+ }
+
if (nState == VP_MM_PLAYER_STATE_PLAYING
|| nState == VP_MM_PLAYER_STATE_PAUSED) {
_vp_minicontroller_update_btn(pPlayView);
VideoLogError("pPlayView->win_minicon is NULL");
return;
}
-
_vp_minicontroller_update_playpause_btn(pPlayView);
}
* @param obj
* @param event_info
*/
-static void _vp_minicontroller_play_pause_btn_clicked_cb(void *data,
- Evas_Object * obj,
- void *event_info)
+static void _vp_minicontroller_play_pause_btn_clicked_cb(void *data, Evas_Object * obj, void *event_info)
{
VideoLogDebug("play/pause button clicked");
return;
}
- vp_mm_player_state_t nState =
- vp_play_normal_view_get_player_state(pPlayView);
+ vp_mm_player_state_t nState = vp_play_normal_view_get_player_state(pPlayView);
VideoLogInfo("nState:%d", nState);
+
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
- /*if playing state then on click it should pause and set button for play */
- elm_object_signal_emit(pPlayView->minicontroller_layout,
- "set_play", "c_source");
- vp_play_normal_view_on_controller_button_press(pPlayView->
- pNormalView,
- CONTROLLER_PAUSE_BUTTON);
+ vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_PAUSE_BUTTON);
} else {
if (_vp_is_current_focus_available() != 0) {
- VideoLogError
- ("Some other application has the focus currently... Returning...");
+ VideoLogError("Some other application has the focus currently... Returning...");
vp_play_util_status_noti_show(VP_PLAY_STRING_UNABLE_TO_PLAY);
return;
}
-
- elm_object_signal_emit(pPlayView->minicontroller_layout,
- "set_pause", "c_source");
- vp_play_normal_view_on_controller_button_press(pPlayView->
- pNormalView,
- CONTROLLER_PLAY_BUTTON);
+ vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_PLAY_BUTTON);
}
}
}
if (_vp_is_current_focus_available() != 0) {
- VideoLogError
- ("Some other application has the focus currently... Changing to paused state...");
+ VideoLogError("Some other application has the focus currently... Changing to paused state...");
stay_pause = true;
}
- vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView,
- CONTROLLER_FF_BUTTON);
-}
-
-/**
- *
- * @param data
- * @param e
- * @param obj
- * @param event_info
- */
-static void
-_vp_minicontroller_ff_btn_del_cb(void *data, Evas * e, Evas_Object * obj,
- void *event_info)
-{
- /* Forward button remove cb */
+ vp_play_normal_view_on_controller_button_press(pPlayView->pNormalView, CONTROLLER_FF_BUTTON);
}
/**
CONTROLLER_REW_BUTTON);
}
-/**
- *
- * @param data
- * @param e
- * @param obj
- * @param event_info
- */
-static void
-_vp_minicontroller_rew_btn_del_cb(void *data, Evas * e, Evas_Object * obj,
- void *event_info)
+
+
+static void __vp_minicontroller_slider_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- /* Rewind button remove cb */
+ PlayView *pPlayView = (PlayView*)data;
+ if(pPlayView == NULL) {
+ VideoLogError("Invalid PlayView data");
+ return;
+ }
+ mini_controller_slider_data *slider_handle = (mini_controller_slider_data*)pPlayView->minicon_slider_handler;
+ slider_handle->is_mouse_down = EINA_TRUE;
+ double ratio = elm_slider_value_get(obj);
+ vp_play_normal_view_on_controller_slider_events(pPlayView->pNormalView, CONTROLLER_SLIDER_MOUSE_DOWN, ((void*)(&ratio)));
}
-/*end of focused UI callbacks*/
+static void __vp_minicontroller_slider_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ PlayView *pPlayView = (PlayView*)data;
+ if(pPlayView == NULL) {
+ VideoLogError("Invalid PlayView data");
+ return;
+ }
+ double ratio = elm_slider_value_get(obj);
+ vp_play_normal_view_on_controller_slider_events(pPlayView->pNormalView, CONTROLLER_SLIDER_MOUSE_UP, ((void*)(&ratio)));
+ mini_controller_slider_data *slider_handle = (mini_controller_slider_data*)pPlayView->minicon_slider_handler;
+ slider_handle->is_mouse_down = EINA_FALSE;
+}
+
+static void __vp_minicontroller_slider_mouse_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ PlayView *pPlayView = (PlayView*)data;
+ if(pPlayView == NULL) {
+ VideoLogError("Invalid PlayView data");
+ return;
+ }
+ double ratio = elm_slider_value_get(obj);
+ vp_play_normal_view_on_controller_slider_events(pPlayView->pNormalView, CONTROLLER_SLIDER_MOUSE_MOVE, ((void*)(&ratio)));
+}
/**
*
VideoLogDebug("isLiveStreaming is %d", isLiveStreaming);
VP_EVAS_TIMER_DEL(pPlayView->minicon_button_timer);
+ mini_controller_slider_data *slider_data = (mini_controller_slider_data*)pPlayView->minicon_slider_handler;
+ if(slider_data) {
+ VP_EVAS_TIMER_DEL(slider_data->duration_timer);
+ }
if (pPlayView->minicontroller_layout) {
evas_object_del(pPlayView->minicontroller_layout);
pPlayView->minicontroller_layout = NULL;
}
- 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 {
- 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");
- }
- }
+ pPlayView->minicontroller_layout = _load_edj(pPlayView->win_minicon, MINICON_EDJ_NAME, "video.player.mini.controller");
if (!pPlayView->minicontroller_layout) {
return;
pPlayView->minicontroller_layout);
/*add focused UI related */
- pPlayView->minicon_icon =
- elm_image_add(pPlayView->minicontroller_layout);
- evas_object_size_hint_align_set(pPlayView->minicon_icon,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(pPlayView->minicon_icon,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ pPlayView->minicon_icon = elm_image_add(pPlayView->minicontroller_layout);
+ evas_object_size_hint_align_set(pPlayView->minicon_icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(pPlayView->minicon_icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_image_fill_outside_set(pPlayView->minicon_icon, true);
- elm_object_part_content_set(pPlayView->minicontroller_layout,
- "albumart_image", pPlayView->minicon_icon);
- elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout,
- pPlayView->minicon_icon, NULL);
+ elm_object_part_content_set(pPlayView->minicontroller_layout, "album.art.swallow", pPlayView->minicon_icon);
+ elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, pPlayView->minicon_icon, NULL);
elm_object_focus_allow_set(pPlayView->minicon_icon, EINA_TRUE);
+ edje_object_signal_callback_add(_EDJ(pPlayView->minicontroller_layout), "album,art,clicked", "vp_edje", _minicontroller_album_art_clicked_cb, pPlayView);
+ char image_path[1024] = {0, };
+ char *res_path = app_get_resource_path();
/*-------> REW button ------->*/
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);
+ Evas_Object *rew_focus_btn = elm_button_add(pPlayView->minicontroller_layout);
+ elm_object_style_set(rew_focus_btn, "icon");
+
+ Evas_Object *prev_icon = elm_image_add(rew_focus_btn);
+ snprintf(image_path, 1024, "%s%s%s", res_path, "edje/images/mini_controller/", "mini-controller_prev.png");
+ VideoLogError("Prev Image Path: %s", image_path);
+ elm_image_file_set(prev_icon, image_path, NULL);
+ elm_image_resizable_set(prev_icon, EINA_FALSE, EINA_FALSE);
+ evas_object_size_hint_align_set(prev_icon, 0.5, 0.5);
+ elm_object_part_content_set(rew_focus_btn, "icon", prev_icon);
+
+ elm_object_part_content_set(pPlayView->minicontroller_layout, "prev.button.swallow", 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);
}
/*-------> play/pause button ------->*/
- Evas_Object *play_pause_focus_btn =
- elm_button_add(pPlayView->minicontroller_layout);
- elm_object_style_set(play_pause_focus_btn, "focus");
- elm_object_part_content_set(pPlayView->minicontroller_layout,
- "play_pause_focus", play_pause_focus_btn);
- elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout,
- play_pause_focus_btn, NULL);
- evas_object_smart_callback_add(play_pause_focus_btn, "clicked",
- _vp_minicontroller_play_pause_btn_clicked_cb,
- pPlayView);
+ Evas_Object *play_pause_focus_btn = elm_button_add(pPlayView->minicontroller_layout);
+ elm_object_style_set(play_pause_focus_btn, "icon");
+
+ Evas_Object *play_pause_icon = elm_image_add(play_pause_focus_btn);
+ snprintf(image_path, 1024, "%s%s%s", res_path, "edje/images/mini_controller/", "mini-controller_pause.png");
+ VideoLogError("Prev Image Path: %s", image_path);
+ elm_image_file_set(play_pause_icon, image_path, NULL);
+ elm_image_resizable_set(play_pause_icon, EINA_FALSE, EINA_FALSE);
+ evas_object_size_hint_align_set(play_pause_icon, 0.5, 0.5);
+ elm_object_part_content_set(play_pause_focus_btn, "icon", play_pause_icon);
+
+ elm_object_part_content_set(pPlayView->minicontroller_layout, "play.pause.swallow", play_pause_focus_btn);
+ elm_object_focus_custom_chain_append(pPlayView->minicontroller_layout, play_pause_focus_btn, NULL);
+ evas_object_smart_callback_add(play_pause_focus_btn, "clicked", _vp_minicontroller_play_pause_btn_clicked_cb, pPlayView);
/*------->FF button ------->*/
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);
- }
+ Evas_Object *ff_focus_btn = elm_button_add(pPlayView->minicontroller_layout);
+ elm_object_style_set(ff_focus_btn, "icon");
+
+ Evas_Object *next_icon = elm_image_add(ff_focus_btn);
+ snprintf(image_path, 1024, "%s%s%s", res_path, "edje/images/mini_controller/", "mini-controller_next.png");
+ VideoLogError("Prev Image Path: %s", image_path);
+ elm_image_file_set(next_icon, image_path, NULL);
+ elm_image_resizable_set(next_icon, EINA_FALSE, EINA_FALSE);
+ evas_object_size_hint_align_set(next_icon, 0.5, 0.5);
+ elm_object_part_content_set(ff_focus_btn, "icon", next_icon);
+
+ elm_object_part_content_set(pPlayView->minicontroller_layout, "next.button.swallow", 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);
+ }
+
+ /*-------> close button ------->*/
+ Evas_Object *close_icon = elm_image_add(pPlayView->minicontroller_layout);
+ snprintf(image_path, 1024, "%s%s%s", res_path, "edje/images/mini_controller/", "mini-controller_close_icon.png");
+ VideoLogError("Close Image Path: %s", image_path);
+ elm_image_file_set(close_icon, image_path, NULL);
+ elm_image_resizable_set(close_icon, EINA_FALSE, EINA_FALSE);
+ evas_object_size_hint_align_set(close_icon, 0.5, 0.5);
+ elm_object_part_content_set(pPlayView->minicontroller_layout, "close.icon.swallow", close_icon);
+ edje_object_signal_callback_add(_EDJ(pPlayView->minicontroller_layout), "close,button,clicked", "vp_edje", _minicontroller_close_button_clicked_cb, pPlayView);
+
+ mini_controller_slider_data *slider_handler= (mini_controller_slider_data*)pPlayView->minicon_slider_handler;
+ slider_handler->is_mouse_down = EINA_FALSE;
+ slider_handler->slider = elm_slider_add(pPlayView->minicontroller_layout);
+ evas_object_size_hint_align_set(slider_handler->slider, EVAS_HINT_FILL, 0.5);
+ evas_object_size_hint_weight_set(slider_handler->slider, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_slider_value_set(slider_handler->slider, 0.0);
+ elm_object_part_content_set(pPlayView->minicontroller_layout, "slider.swallow", slider_handler->slider);
+
+ evas_object_event_callback_add(slider_handler->slider, EVAS_CALLBACK_MOUSE_DOWN, __vp_minicontroller_slider_mouse_down_cb, (void *)pPlayView);
+ evas_object_event_callback_add(slider_handler->slider, EVAS_CALLBACK_MOUSE_UP, __vp_minicontroller_slider_mouse_up_cb, (void *)pPlayView);
+ evas_object_event_callback_add(slider_handler->slider, EVAS_CALLBACK_MOUSE_MOVE, __vp_minicontroller_slider_mouse_move_cb, (void *)pPlayView );
+
+ char szDurationTime[PROGRESSBAR_TIME_LENGTH] = { 0, };
+ int total_duration = 0;
+ vp_play_normal_view_get_video_duration(pPlayView->pNormalView, &total_duration);
+ snprintf(szDurationTime, PROGRESSBAR_TIME_LENGTH, "%" PROGRESSBAR_TIME_FORMAT, PROGRESSBAR_TIME_ARGS(total_duration / 1000));
+ elm_object_part_text_set(pPlayView->minicontroller_layout, "slider.text.right", szDurationTime);
+
_vp_minicontroller_update_btn(pPlayView);
+ free(res_path);
+ res_path = NULL;
}
/**
}
Evas_Object *label =
elm_object_part_content_get(pPlayView->minicontroller_layout,
- "elm.text");
+ "title.text.swallow");
int r = 0;
- int g = 0;
- int b = 0;
+ int g = 12;
+ int b = 43;
int a = 255;
char *markup_title =
title = NULL;
} else {
title =
- g_strdup_printf(title_format, 24, r, g, b, a, markup_title);
+ g_strdup_printf(title_format, 22, r, g, b, a, markup_title);
}
if (!label) {
elm_object_text_set(label, title);
evas_object_show(label);
elm_object_part_content_set(pPlayView->minicontroller_layout,
- "elm.text", label);
+ "title.text.swallow", label);
} else {
elm_object_text_set(label, title);
}
}
+void vp_minicontroller_slider_update(PlayView *pPlayView, int curr_duration, int total_duration)
+{
+ if(pPlayView == NULL) {
+ VideoLogError("PlayView object is NULL");
+ return;
+ }
+ mini_controller_slider_data *slider_handle = (mini_controller_slider_data*)pPlayView->minicon_slider_handler;
+ if(slider_handle == NULL) {
+ VideoLogError("mini controller slider handle is null");
+ return;
+ }
+ if(slider_handle->is_mouse_down == EINA_FALSE) {
+ double ratio = (double)(curr_duration)/(double)(total_duration);
+ elm_slider_value_set(slider_handle->slider, ratio);
+ }
+ char szDurationTime[PROGRESSBAR_TIME_LENGTH] = { 0, };
+ snprintf(szDurationTime, PROGRESSBAR_TIME_LENGTH, "%" PROGRESSBAR_TIME_FORMAT, PROGRESSBAR_TIME_ARGS(curr_duration / 1000));
+ elm_object_part_text_set(pPlayView->minicontroller_layout, "slider.text.left", szDurationTime);
+}
+
+static Eina_Bool __vp_minicontroller_duration_update_timer(void *data)
+{
+ PlayView *pPlayView = (PlayView*)data;
+ if(pPlayView == NULL) {
+ VideoLogError("duration timer update data is null, can't update duration for mini-controller");
+ return ECORE_CALLBACK_CANCEL;
+ }
+
+ char szDurationTime[PROGRESSBAR_TIME_LENGTH] = { 0, };
+ int total_duration = 0;
+ vp_play_normal_view_get_video_duration(pPlayView->pNormalView, &total_duration);
+ snprintf(szDurationTime, PROGRESSBAR_TIME_LENGTH, "%" PROGRESSBAR_TIME_FORMAT, PROGRESSBAR_TIME_ARGS(total_duration / 1000));
+ elm_object_part_text_set(pPlayView->minicontroller_layout, "slider.text.right", szDurationTime);
+
+ mini_controller_slider_data *slider_data = (mini_controller_slider_data*)pPlayView->minicon_slider_handler;
+ slider_data->duration_timer = NULL;
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
/**
*
* @param pPlayView
//_vp_minicontroller_update_btn(pPlayView);
VideoLogDebug("Updating thumbnail!!!!!!!!!!!!!!");
char *thumbnail_path = NULL;
- vp_media_contents_get_video_thumbnail_path(pPlayView->szMediaURL,
- &thumbnail_path);
+ vp_media_contents_get_video_thumbnail_path(pPlayView->szMediaURL, &thumbnail_path);
- if (thumbnail_path == NULL) {
- VideoLogInfo
- ("Cannot generate thumbnail for video file. Switching to default path.");
+ if (thumbnail_path == NULL || strlen(thumbnail_path) == 0) {
+ VideoLogInfo("Cannot generate thumbnail for video file. Switching to default path.");
char edj_path[1024] = { 0 };
char *path = app_get_resource_path();
- snprintf(edj_path, 1024, "%s%s/%s", path, "edje",
- VIDEO_PLAYER_IMAGE_NAME_EDJ);
+ snprintf(edj_path, 1024, "%s%s%s", path, "edje/images/mini_controller/", "mini-controller_default_thumbnail.png");
free(path);
- elm_image_file_set(pPlayView->minicon_icon, edj_path,
- VP_PLAY_NORMAL_AUDIO_ONLY_IMG);
- evas_object_color_set(pPlayView->minicon_icon, 0, 0, 0, 255);
+ elm_image_file_set(pPlayView->minicon_icon, edj_path, NULL);
} else {
- VideoLogInfo("thumbnail = %s:%s", pPlayView->szMediaURL,
- thumbnail_path);
+ VideoLogInfo("thumbnail = %s:%s", pPlayView->szMediaURL, thumbnail_path);
elm_image_file_set(pPlayView->minicon_icon, thumbnail_path, NULL);
+ free(thumbnail_path);
+ thumbnail_path = NULL;
}
evas_object_show(pPlayView->minicon_icon);
_vp_minicontroller_title_set(pPlayView);
}
+ if(pPlayView->minicon_slider_handler) {
+ // We need to user timer here to update the duration because we can't get video duration just after click the next button
+ // as player is not realized at that time..so have to wait for player to realized before updating the duration.
+ mini_controller_slider_data *slider_data = (mini_controller_slider_data*)(pPlayView->minicon_slider_handler);
+ if(slider_data->duration_timer) {
+ ecore_timer_del(slider_data->duration_timer);
+ slider_data->duration_timer = NULL;
+ }
+ slider_data->duration_timer = ecore_timer_add(1.0, __vp_minicontroller_duration_update_timer, (void *)pPlayView);
+ }
+
evas_object_show(pPlayView->minicontroller_layout);
}
vp_play_normal_view_get_player_state(pPlayView);
if (nState == VP_MM_PLAYER_STATE_PLAYING) {
/*if playing state then on click it should pause and set button for play */
- elm_object_signal_emit(pPlayView->minicontroller_layout,
- "set_pause", "c_source");
+ _vp_minicontroller_update_btn(pPlayView);
}
if (pPlayView->win_lockmini) {
evas_object_del(pPlayView->win_minicon);
pPlayView->win_minicon = NULL;
}
-
+ if(pPlayView->minicon_button_timer) {
+ ecore_timer_del(pPlayView->minicon_button_timer);
+ pPlayView->minicon_button_timer = NULL;
+ }
+ if(pPlayView->minicon_slider_handler) {
+ mini_controller_slider_data *slider_data = (mini_controller_slider_data*)pPlayView->minicon_slider_handler;
+ if(slider_data->duration_timer) {
+ ecore_timer_del(slider_data->duration_timer);
+ slider_data->duration_timer = NULL;
+ }
+ free(pPlayView->minicon_slider_handler);
+ pPlayView->minicon_slider_handler = NULL;
+ }
VP_EVAS_TIMER_DEL(pPlayView->minicon_button_timer);
pPlayView->minicon_visible = false;
return;
}
- int w = 0;
const char *signal = NULL;
bool landscape = _vp_minicontroller_landscape_is(pPlayView, angle);
- if (landscape) {
- VideoLogDebug("Landscape mode enabled");
- signal = "sig_set_landscape_mode";
- w = MINI_CONTROLLER_WIDTH_LANDSCAPE;
- landscape = true;
- } else {
- VideoLogDebug("Portrait mode enabled");
- signal = "sig_set_portrait_mode";
- w = MINI_CONTROLLER_WIDTH;
- landscape = false;
- }
-
- elm_object_signal_emit(pPlayView->minicontroller_layout, signal,
- "c_source");
-
- double scale = elm_config_scale_get();
- evas_object_resize(pPlayView->win_minicon, w * scale,
- MINI_CONTROLLER_HEIGHT * scale);
+ evas_object_resize(pPlayView->win_minicon, MINI_CONTROLLER_WIDTH, MINI_CONTROLLER_HEIGHT);
_vp_minicontroller_update_layout(pPlayView, landscape);
vp_minicontroller_update(pPlayView, true);
}
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-#define MINI_H 70
-#define MINI_H_PORT 70
-#define TOP_PADDING 4
-#define LEFT_PADDING 12
-#define RIGHT_PADDING 4
-#define BOTTOM_PADDING 6
-#define ALBUM_ART_SIZE 120 120
-#define BUTTON_SIZE_MIN_MAX 80 80
-#define BIG_BTN_SIZE_MIN_MAX 80 80
-#define BUTTON_EXPAND_OFFSET 0
-#define BUTTON_CLOSE_SIZE_MAX 30 30
-#define PLAY_BTN_SIZE_MIN_MAX 80 80
-#define FF_BTN_SIZE_MIN_MAX 80 80
-
-
-#define MC_BG 30 28 28 0
-
-
-#define MC_MUSIC_LAGRE_BTN_EF "mini_controller/bg_btn_player_01_ef.png"
-#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"
-
-#define MC_MUSIC_CLOSE_BTN "mini_controller/btn_controller_close.png"
-#define MC_MUSIC_PREV_BTN "mini_controller/music_btn_player_prev_nor.png"
-#define MC_MUSIC_NEXT_BTN "mini_controller/music_btn_player_next_nor.png"
-
-#define MC_MUSIC_ALBUM_FRAME "mini_controller/album_frame.png"
-
-#define MC_IMG_REW_NORMAL "mini_controller/btn_video_prev_nor.png"
-#define MC_IMG_REW_PRESSED "mini_controller/btn_video_prev_press.png"
-#define MC_IMG_PLAY_NORMAL "mini_controller/btn_video_play_nor.png"
-#define MC_IMG_PLAY_PRESSED "mini_controller/btn_video_play_press.png"
-#define MC_IMG_PAUSE_NORMAL "mini_controller/btn_video_pause_nor.png"
-#define MC_IMG_PAUSE_PRESSED "mini_controller/btn_video_pause_press.png"
-#define MC_IMG_FF_NORMAL "mini_controller/btn_video_next_nor.png"
-#define MC_IMG_FF_PRESSED "mini_controller/btn_video_next_press.png"
-#define MC_IMG_CLOSE_NORMAL "mini_controller/btn_close_nor.png"
-#define MC_IMG_CLOSE_PRESSED "mini_controller/btn_close_press.png"
-#define MC_IMG_PROGRESS_BG "mini_controller/video_progress_bg.png"
-#define MC_IMG_PROGRESS_BAR "mini_controller/video_progress.png"
-
-
-
-#define MC_FOCUSED_COVER(__name, __over_part_bg) \
-part { \
- name: __name"_focus"; \
- type: SWALLOW; \
- mouse_events: 1; \
- scale: 1; \
- repeat_events: 1; \
- description { \
- state: "default" 0.0; \
- align: 0 0; \
- visible:1; \
- fixed: 1 1;\
- rel1 { \
- relative: 0 0; \
- to: __over_part_bg; \
- } \
- rel2 { \
- relative: 1 1; \
- to: __over_part_bg; \
- } \
- } \
-}
-
-#define MC_PART_AREA_FROM_LEFT(__name, __left_part, __width, __height) \
-part { name: __name; \
- type: SPACER; \
- scale: 1; \
- mouse_events: 0; \
- description { state: "default" 0.0; \
- rel1 { relative: 1.0 0.5; to: __left_part; } \
- rel2 { relative: 1.0 0.5; to: __left_part; } \
- min: __width __height; \
- fixed: 1 1; \
- align: 0.0 0.5; \
- } \
-}
-
-#define MC_PART_AREA_FROM_SWALLOW_LEFT(__name, __left_part, __width, __height) \
-part { name: __name; \
- type: SWALLOW; \
- scale: 1; \
- mouse_events: 1; \
- description { state: "default" 0.0; \
- rel1 { relative: 1.0 0.5; to: __left_part; } \
- rel2 { relative: 1.0 0.5; to: __left_part; } \
- min: __width __height; \
- fixed: 1 1; \
- align: 0.0 0.5; \
- } \
-}
-#define MC_IMAGE_PART_FOCUS(__name,__to,__image,__btn_min_max)\
-part { name: __name;\
- type: IMAGE;\
- scale: 1;\
- mouse_events: 1;\
- description { state: "default" 0.0;\
- rel1 { relative: 0.5 0.5; to: __to; }\
- rel2 { relative: 0.5 0.5; to: __to; }\
- min: __btn_min_max;\
- max: __btn_min_max;\
- image.normal: __image;\
- fixed: 1 1;\
- align: 0.5 0.5;\
- color: 41 215 255 255;\
- }\
- description { state: "pressed" 0.0;\
- inherit: "default" 0.0;\
- color: 41 215 255 255;\
- }\
- description { state: "focus" 0.0;\
- inherit: "default" 0.0;\
- color: 6 119 194 255;\
- }\
- description { state: "hide" 0.0;\
- inherit: "default" 0.0;\
- visible: 0;\
- }\
- }
-
-
-#define MC_IMAGE_PART(__name,__to,__image,__normal_code_red_component,__normal_code_green_component,__normal_code_blue_component,__normal_code_alpha_component,__press_code_red_component,__press_code_green_component,__press_code_blue_component,__press_code_alpha_component,__btn_min_max)\
-part { name: __name;\
- type: IMAGE;\
- scale: 1;\
- mouse_events: 1;\
- description { state: "default" 0.0;\
- rel1 { relative: 0.5 0.5; to: __to; }\
- rel2 { relative: 0.5 0.5; to: __to; }\
- min: __btn_min_max;\
- max: __btn_min_max;\
- image.normal: __image;\
- fixed: 1 1;\
- align: 0.5 0.5;\
- color: __normal_code_red_component __normal_code_green_component __normal_code_blue_component __normal_code_alpha_component;\
- }\
- description { state: "pressed" 0.0;\
- inherit: "default" 0.0;\
- color: __press_code_red_component __press_code_green_component __press_code_blue_component __press_code_alpha_component;\
- }\
- description { state: "hide" 0.0;\
- inherit: "default" 0.0;\
- visible: 0;\
- }\
- }
-
-#define MC_PROGRAM_IMAGE_VISIBLE(__btn, __show_signal, __hide_signal) \
-program { \
- signal: __show_signal; \
- source: "*"; \
- action: STATE_SET "default" 0.0; \
- target: __btn; \
-} \
-program { \
- signal: __hide_signal; \
- source: "*"; \
- action: STATE_SET "hide" 0.0; \
- target: __btn; \
-}
-
-
-#define MC_PART_ICON_BTN(__name, __to, __normal, __pressed, __btn_min_max) \
-part { name: __name"_clip"; \
- type: RECT; \
- scale: 1; \
- mouse_events: 0; \
- description { state: "default" 0.0; \
- rel1.to: __name"_bg"; \
- rel2.to: __name"_bg"; \
- color: 255 255 255 255; \
- } \
- description { state: "hide" 0.0; \
- inherit: "default" 0.0; \
- visible: 0; \
- } \
-} \
-part { name: __name"_bg"; \
- type: IMAGE; \
- scale: 1; \
- mouse_events: 0; \
- clip_to: __name"_clip"; \
- description { state: "default" 0.0; \
- rel1 { relative: 0.5 0.5; to: __to; } \
- rel2 { relative: 0.5 0.5; to: __to; }\
- min: __btn_min_max; \
- max: __btn_min_max; \
- image.normal: __normal; \
- fixed: 1 1; \
- align: 0.5 0.5; \
- } \
- description { state: "pressed" 0.0; \
- inherit: "default" 0.0; \
- image.normal: __pressed; \
- } \
-} \
-part { name: __name; \
- type: RECT; \
- scale: 1; \
- mouse_events: 1; \
- clip_to: __name"_clip"; \
- description { state: "default" 0.0; \
- rel1.to: __name"_bg"; \
- rel2.to: __name"_bg"; \
- color: 0 0 0 0; \
- } \
-}
-
-#define MC_PART_TEXT_BTN(__name, __to, __text_part_name) \
-part { name: __name"_clip"; \
- type: RECT; \
- scale: 1; \
- mouse_events: 0; \
- description { state: "default" 0.0; \
- rel1.to: __to; \
- rel2.to: __to; \
- color: 255 255 255 255; \
- } \
- description { state: "hide" 0.0; \
- inherit: "default" 0.0; \
- visible: 0; \
- } \
-} \
-part { name: __name"_bg"; \
- type: SPACER; \
- scale: 1; \
- mouse_events: 0; \
- clip_to: __name"_clip"; \
- description { state: "default" 0.0; \
- rel1.to: __to; \
- rel2.to: __to; \
- } \
- description { state: "pressed" 0.0; \
- inherit: "default" 0.0; \
- } \
-} \
-part { name: __text_part_name; \
- type: TEXT; \
- scale: 1; \
- mouse_events: 0; \
- clip_to: __name"_clip"; \
- description { state: "default" 0.0; \
- rel1.to: __name"_bg"; \
- rel2.to: __name"_bg"; \
- text { \
- font: "Tizen:style=Medium"; \
- size: 28; \
- align: 0.5 0.5; \
- } \
- color: 149 149 149 255; \
- } \
-} \
-part { name: __name; \
- type: RECT; \
- scale: 1; \
- mouse_events: 1; \
- clip_to: __name"_clip"; \
- description { state: "default" 0.0; \
- rel1.to: __to; \
- rel2.to: __to; \
- color: 0 0 0 0; \
- } \
-}
-
-#define MC_PART_RECT(__name, __to, __sx, __sy, __ex, __ey) \
-part { \
- name: __name; \
- mouse_events: 1; \
- repeat_events: 1; \
- type: RECT; \
- scale: 1; \
- description { \
- state: "default" 0.0; \
- align: 0 0; \
- visible: 1; \
- rel1 { \
- relative: __sx __sy; \
- to: __to; \
- } \
- rel2 { \
- relative: __ex __ey; \
- to: __to; \
- } \
- color: 0 0 0 0; \
- }\
- description { \
- state: "hide" 0.0; \
- visible: 0; \
- }\
-}
-
-#define MC_PART_SWALLOW(__name, __to, __sx, __sy, __ex, __ey) \
-part { \
- name: __name; \
- mouse_events: 1; \
- type: SWALLOW; \
- scale: 1; \
- description { \
- state: "default" 0.0; \
- align: 0.5 0.5; \
- fixed: 1 1; \
- visible: 1; \
- fixed:1 1;\
- rel1 { \
- relative: __sx __sy; \
- to: __to; \
- } \
- rel2 { \
- relative: __ex __ey; \
- to: __to; \
- } \
- color: 0 0 0 0; \
- } \
-}
-
-#define MC_PROGRAM_BTN_ACTION(__btn, __down_emission, __down_src, __up_emission, __up_src, __clicked_emission, __clicked_src) \
-program { \
- name: __btn"_after_down"; \
- signal: "mouse,down,1"; \
- source: __btn; \
- script { \
- set_state(PART:__btn"_bg", "pressed", 0.0); \
- emit(__down_emission, __down_src); \
- } \
-} \
-program { \
- source: __btn; \
- signal: "mouse,down,1"; \
- action: PLAY_SAMPLE "button-pressed" 1.0; \
- after: __btn"_after_down"; \
- transition: ACCELERATE 0.02;\
-} \
-program { \
- signal: "mouse,up,1"; \
- source: __btn; \
- script { \
- set_state(PART:__btn"_bg", "default", 0.0); \
- emit(__up_emission, __up_src); \
- } \
-} \
-program { \
- signal: "mouse,clicked,1"; \
- source: __btn; \
- action: SIGNAL_EMIT __clicked_emission __clicked_src; \
-}
-
-#define MC_PROGRAM_BTN_VISIBLE(__btn, __show_signal, __hide_signal) \
-program { \
- signal: __show_signal; \
- source: "*"; \
- action: STATE_SET "default" 0.0; \
- target: __btn"_clip"; \
-} \
-program { \
- signal: __hide_signal; \
- source: "*"; \
- action: STATE_SET "hide" 0.0; \
- target: __btn"_clip"; \
-}
-
-#define MINI_CONTROL_HIDE_SWALLOW_OPTION(__name, __to) \
-part { \
- name: __name; \
- mouse_events: 1; \
- type: SWALLOW; \
- scale: 1; \
- repeat_events: 1; \
- description { \
- state: "default" 0.0; \
- align: 0.5 0.5; \
- visible: 0; \
- rel1 { \
- relative: 0 0; \
- to: __to; \
- } \
- rel2 { \
- relative: 1 1; \
- to: __to; \
- } \
- color: 0 0 0 0; \
- } \
- description { \
- state: "visible" 0.0; \
- inherit: "default"; \
- visible: 1; \
- } \
-}
-
-#define MINI_CONTROL_BUTTON_INVISIVBLE_PROGRAM(__name) \
-program { \
- name: __name"_visible" ; \
- signal: __name"_visible"; \
- source: __name; \
- action: STATE_SET "visible" 0.0; \
- target: __name; \
-} \
-program { \
- name: __name"_invisible" ; \
- signal: __name"_invisible"; \
- source: __name; \
- action: STATE_SET "default" 0.0; \
- target: __name; \
-}
+#include "custom/pv-custom-define.edc"
externals {
external: "elm";
}
collections {
-base_scale: 2.4;
-/*
-sounds {
- sample {
- name: "button-pressed" AS_IS;
- source: MP_BUTTON_PRESSED_NAME;
- }
-}
+base_scale: CURRENT_BASE_SCALE;
-plugins {
- plugin {
- name: "touch_sound_plugin";
- source: "feedback";
- param: "FEEDBACK_TYPE_SOUND FEEDBACK_PATTERN_TAP";
+styles {
+ style { name: "mini_controller_total_duration_text";
+ base: "font=Tizen:weight=Regular:width=BreezeSans font_size=18 align=right color=#001447 ellipsis=1.0 wrap=none";
+ }
+ style { name: "mini_controller_current_duration_text";
+ base: "font=Tizen:weight=Regular:width=BreezeSans font_size=18 align=left color=#001447 ellipsis=1.0 wrap=none";
}
}
-*/
-group {
- name: "video-minicontroller";
- 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;
-
- image: MC_MUSIC_ALBUM_FRAME COMP;
- }
+group { name: "video.player.mini.controller";
parts {
- part{ name: "bg";
- type : RECT;
- scale : 1;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- min : 0 MINI_H_PORT;
- fixed: 1 1;
- rel1{ relative : 0 0;}
- rel2{ relative : 1 1;}
- color: MC_BG;
- }
- }
-
- 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";
+ part { name: "base";
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;
+ type: SPACER;
+ scale: 1;
description { state: "default" 0.0;
- rel1 { relative: 0 0; to: "bg"; }
- rel2 { relative: 0 1; to: "bg"; }
- min: LEFT_PADDING 0;
+ min: 40 0;
+ max: 40 -1;
fixed: 1 0;
- align: 0 0;
+ rel1 { to: "base"; relative: 0.0 0.0; }
+ rel2 { to: "base"; relative: 0.0 1.0; }
+ align: 0.0 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;
+ min: 8 0;
+ max: 8 -1;
fixed: 1 0;
- align: 1 0;
+ rel1 { to: "base"; relative: 1.0 0.0; }
+ rel2 { to: "base"; relative: 1.0 1.0; }
+ align: 1.0 0.0;
}
}
-
- part { name: "padding.bottom";
+ part { name: "content.area";
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;
- rel1 { relative: 0 0; to: "bg"; }
- rel2 { relative: 1 0; to: "bg"; }
- min: 0 15;
- fixed: 0 1;
+ rel1 { to: "padding.left"; relative: 1.0 0.0; }
+ rel2 { to: "padding.right"; relative: 0.0 1.0; }
align: 0.0 0.0;
}
}
-
- part { name: "padding_for_albumart.bottom";
+ part { name: "close.button.area";
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;
+ min: 40 0;
+ max: 40 -1;
+ fixed: 1 0;
+ rel1 { to: "padding.right"; relative: 0.0 0.0; }
+ rel2 { to: "padding.right"; relative: 0.0 1.0; }
+ align: 1.0 0.0;
}
}
-
- part { name: "albumarmt_bg";
+ part { name: "close.button.bg";
type: RECT;
scale: 1;
- mouse_events: 0;
+ mouse_events: 1;
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;
+ min: 40 40;
+ max: 40 40;
fixed: 1 1;
- align: 0.0 0.5;
+ rel.to: "close.button.area";
+ rel1.relative: 0.0 0.0;
+ rel1.offset: 0 8;
+ rel2.relative: 1.0 0.0;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
}
}
-
- part { name: "albumart_image";
+ part { name: "close.icon.swallow";
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;
+ rel.to: "close.button.bg";
}
}
-
- part { name: "albumarmt_frame";
- type: IMAGE;
+ part { name: "close.padding.left.padding";
+ type: SPACER;
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";
+ min: 32 0;
+ max: 32 -1;
+ fixed: 1 0;
+ rel1 { to: "close.button.area"; relative: 0.0 0.0; }
+ rel2 { to: "close.button.area"; relative: 0.0 1.0; }
+ align: 1.0 0.0;
}
}
-
- part { name: "right_area";
+ part { name: "album.art.area";
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"; }
+ min: 64 0;
+ max: 64 -1;
+ fixed: 1 1;
+ rel1 { to_x: "padding.left"; to_y: "content.area"; relative: 1.0 0.0; }
+ rel2 { to_x: "padding.left"; to_y: "content.area"; relative: 1.0 1.0; }
align: 0.0 0.0;
}
}
-
- part { name: "elm.text"; // title
+ part { name: "album.art.swallow";
type: SWALLOW;
- mouse_events: 1;
scale: 1;
description { state: "default" 0.0;
- 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;
+ min: 64 64;
+ max: 64 64;
+ rel.to: "album.art.area";
}
}
-
- part { name: "close_btn_area";
- type: RECT;
+ part { name: "album.art.padding.right";
+ type: SPACER;
scale: 1;
- mouse_events: 0;
description { state: "default" 0.0;
- 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;
- }
- }
- 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: "mid_padding";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- 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; }
+ min: 20 0;
+ max: 20 -1;
+ fixed: 1 0;
+ rel1 { to_x: "album.art.area"; to_y: "content.area"; relative: 1.0 0.0; }
+ rel2 { to_x: "album.art.area"; to_y: "content.area"; relative: 1.0 1.0; }
align: 0.0 0.0;
- color: 255 0 0 0;
- }
- }
-
- part { name: "button_area";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- rel1 { relative: 0 1; to: "mid_padding";}
- rel2 { relative: 1 0; to_x: "elm.text"; to_y: "padding.bottom"; }
- visible: 1;
- }
- }
-
- part { name: "rew_btn_area";
- type: RECT;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- rel1 { relative: 0.0 0.5; to: "button_area"; offset: 10 0;}
- rel2 { relative: 0.0 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";
+ part { name: "title.text.area";
type: SPACER;
scale: 1;
- mouse_events: 1;
description { state: "default" 0.0;
- 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;
+ min: 324 26;
+ max: 324 26;
+ rel1 { to_x: "album.art.padding.right"; to_y: "content.area"; relative: 1.0 0.0; }
+ rel2 { to_x: "album.art.padding.right"; to_y: "content.area"; relative: 1.0 1.0; }
+ 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)
- 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;
- }
- }
- MC_FOCUSED_COVER("play_pause", "play_pause_btn_area");
-
- part { name: "ff_btn_area";
- type: SPACER;
+ part { name: "title.text.swallow";
+ type: SWALLOW;
scale: 1;
- mouse_events: 1;
description { state: "default" 0.0;
- rel1 { relative:0.8 0.5; to: "button_area";offset: -10 0;}
- rel2 { relative:0.8 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;
- }
- }
- 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: "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";
- 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: "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: "close_area_btn_clicked";
- signal: "mouse,clicked,1";
- source: "close_btn_touch_area";
- script{
- emit("close_btn_clicked", "edje");
- }
- }
-/*
- 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: "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";
- 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;
- image: MC_MUSIC_ALBUM_FRAME COMP;
- }
- parts {
- part{ name: "bg";
- type : RECT;
- scale : 1;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- min : 0 MINI_H_PORT;
- fixed: 1 1;
- rel1{ relative : 0 0;}
- rel2{ relative : 1 1;}
- color: MC_BG;
- }
- }
-
- 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";
- }
+ rel.to: "title.text.area";
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 1.0;
+ align: 0.0 0.0;
}
}
-
- part { name: "padding.top";
+ part { name: "playback.panel.padding.left";
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;
+ min: 60 0;
+ max: 60 -1;
fixed: 1 0;
- align: 0 0;
+ rel1 { to_x: "title.text.area"; to_y: "content.area"; relative: 1.0 0.0; }
+ rel2 { to_x: "title.text.area"; to_y: "content.area"; relative: 1.0 1.0; }
+ align: 0.0 0.0;
}
}
-
- part { name: "padding.right";
+ part { name: "playback.area";
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;
+ min: 184 0;
+ max: 184 -1;
fixed: 1 0;
- align: 1 0;
+ rel1 { to_x: "playback.panel.padding.left"; to_y: "content.area"; relative: 1.0 0.0; }
+ rel2 { to_x: "playback.panel.padding.left"; to_y: "content.area"; relative: 1.0 1.0; }
+ align: 0.0 0.0;
}
}
-
- part { name: "padding.bottom";
- type: SPACER;
+ part { name: "prev.button.swallow";
+ type: SWALLOW;
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;
+ min: 48 48;
+ max: 48 48;
+ fixed: 1 1;
+ rel1 { to: "playback.area"; relative: 0.0 0.0; }
+ rel2 { to: "playback.area"; relative: 0.0 1.0; }
+ align: 0.0 0.5;
}
}
-
- part { name: "padding_for_albumart.top";
+ part { name: "play.pause.padding.left";
type: SPACER;
scale: 1;
- description {
- state: "default" 0.0;
- rel1 { relative: 0 0; to: "bg"; }
- rel2 { relative: 1 0; to: "bg"; }
- min: 0 15;
- fixed: 0 1;
+ description { state: "default" 0.0;
+ min: 20 0;
+ max: 20 -1;
+ fixed: 1 0;
+ rel1 { to_x: "prev.button.swallow"; to_y: "playback.area"; relative: 1.0 0.0; }
+ rel2 { to_x: "prev.button.swallow"; to_y: "playback.area"; relative: 1.0 1.0; }
align: 0.0 0.0;
}
}
-
- part { name: "padding_for_albumart.bottom";
- type: SPACER;
+ part { name: "play.pause.swallow";
+ type: SWALLOW;
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;
+ min: 48 48;
+ max: 48 48;
+ fixed: 1 1;
+ rel1 { to_x: "play.pause.padding.left"; to_y: "playback.area"; relative: 1.0 0.0; }
+ rel2 { to_x: "play.pause.padding.left"; to_y: "playback.area"; relative: 1.0 1.0; }
+ align: 0.0 0.5;
}
}
-
- part { name: "albumarmt_bg";
- type: RECT;
+ part { name: "play.pause.padding.right";
+ type: SPACER;
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;
+ min: 20 0;
+ max: 20 -1;
+ fixed: 1 0;
+ rel1 { to_x: "play.pause.swallow"; to_y: "playback.area"; relative: 1.0 0.0; }
+ rel2 { to_x: "play.pause.swallow"; to_y: "playback.area"; relative: 1.0 1.0; }
+ align: 0.0 0.0;
}
}
-
- part { name: "albumart_image";
+ part { name: "next.button.swallow";
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;
+ min: 48 48;
+ max: 48 48;
fixed: 1 1;
- align: 0.5 0.5;
+ rel1 { to_x: "play.pause.padding.right"; to_y: "playback.area"; relative: 1.0 0.0; }
+ rel2 { to_x: "play.pause.padding.right"; to_y: "playback.area"; relative: 1.0 1.0; }
+ align: 0.0 0.5;
}
}
-
- part { name: "albumarmt_frame";
- type: IMAGE;
+ part { name: "playback.panel.padding.right";
+ type: SPACER;
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";
+ min: 60 0;
+ max: 60 -1;
+ fixed: 1 0;
+ rel1 { to_x: "playback.area"; to_y: "content.area"; relative: 1.0 0.0; }
+ rel2 { to_x: "playback.area"; to_y: "content.area"; relative: 1.0 1.0; }
+ align: 0.0 0.0;
}
}
-
- part { name: "right_area";
+ part { name: "playback.slider.area";
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"; }
+ rel1 { to: "playback.panel.padding.right"; relative: 1.0 0.0; }
+ rel2 { to: "close.padding.left.padding"; relative: 0.0 1.0; }
align: 0.0 0.0;
}
}
-
- part { name: "elm.text"; // title
+ part { name: "slider.swallow";
type: SWALLOW;
- mouse_events: 1;
scale: 1;
+ mouse_events: 1;
description { state: "default" 0.0;
- 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;
+ min: 368 32;
+ max: 368 32;
+ rel.to: "playback.slider.area";
}
}
-
- part { name: "close_btn_area";
- type: RECT;
+ part { name: "slider.text.left";
+ type: TEXTBLOCK;
scale: 1;
- mouse_events: 0;
description { state: "default" 0.0;
- 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;
- }
- }
- 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: "mid_padding";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- 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; }
+ min: 120 22;
+ max: 120 22;
+ rel1 { to: "slider.swallow"; relative: 0.0 1.0; }
+ rel2 { to: "slider.swallow"; relative: 0.0 1.0; }
align: 0.0 0.0;
- color: 255 0 0 0;
- }
- }
-
- part { name: "button_area";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- rel1 { relative: 0 1; to: "mid_padding";}
- rel2 { relative: 1 0; to_x: "elm.text"; to_y: "padding.bottom"; }
- visible: 1;
+ text {
+ style: "mini_controller_current_duration_text";
+ }
}
}
-
- part { name: "play_pause_btn_area";
- type: SPACER;
+ part { name: "slider.text.right";
+ type: TEXTBLOCK;
scale: 1;
- mouse_events: 1;
description { state: "default" 0.0;
- 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_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;
+ min: 120 22;
+ max: 120 22;
+ rel1 { to: "slider.swallow"; relative: 1.0 1.0; }
+ rel2 { to: "slider.swallow"; relative: 1.0 1.0; }
+ align: 1.0 0.0;
+ text {
+ style: "mini_controller_total_duration_text";
}
+ }
}
- 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: "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";
- 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_button_clicked";
+ signal: "mouse,down,1";
+ source: "close.button.bg";
+ action: SIGNAL_EMIT "close,button,clicked" "vp_edje";
}
-
- 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: "album_art_clicked";
+ signal: "mouse,down,1";
+ source: "album.art.swallow";
+ action: SIGNAL_EMIT "album,art,clicked" "vp_edje";
}
-
- 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: "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_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";
- 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";
- 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);
- }
- }
- }
}
} // collection