From 968facf2938e5233e6cb80fb35ec31450987b895 Mon Sep 17 00:00:00 2001 From: "bhutani.92" Date: Thu, 17 Nov 2016 12:26:37 +0530 Subject: [PATCH] Removed unused defines [MP_FEATURE_APP_IN_APP, MP_FEATURE_DESKTOP_MODE, MP_FEATURE_LANDSCAPE] Change-Id: I22719a1b6c615a3e02c26b98732b3db3bc50484e Signed-off-by: bhutani.92 --- CMakeLists.txt | 2 - project_def.prop | 2 +- res/edje/mp-defines.h | 40 +- res/edje/mp-play-view.edc | 31 -- sound-player/CMakeLists.txt | 16 - sound-player/project_def.prop | 2 +- src/common/include/mp-app.h | 3 - src/common/mp-app.c | 71 ---- src/common/mp-play.c | 45 -- src/core/mp-view-mgr.c | 5 - src/include/mp-define.h | 5 - src/include/music.h | 18 - src/mp-main.c | 130 +----- src/setting/src/include/ms-effect-view.h | 4 - src/view/include/mp-view.h | 9 - src/view/mp-all-view.c | 26 -- src/view/mp-artist-booklet-view.c | 12 - src/view/mp-create-playlist-view.c | 23 - src/view/mp-detail-view.c | 45 -- src/view/mp-edit-view.c | 5 - src/view/mp-player-view.c | 170 +------- src/view/mp-playlist-detail-view.c | 34 -- src/view/mp-search-view.c | 19 - src/view/mp-set-as-view.c | 20 - src/view/mp-setting-view.c | 14 - src/view/mp-view.c | 109 +---- src/widget/include/mp-mini-player.h | 66 --- src/widget/mp-edit-playlist.c | 20 - src/widget/mp-mini-player.c | 702 ------------------------------- src/widget/mp-now-playing.c | 22 +- src/widget/mp-player-volume-widget.c | 24 +- src/widget/mp-shortcut.c | 36 +- src/widget/mp-track-list.c | 70 +-- 33 files changed, 68 insertions(+), 1732 deletions(-) delete mode 100644 src/widget/include/mp-mini-player.h delete mode 100644 src/widget/mp-mini-player.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fe8ae1..a40b487 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,6 @@ IF (CMAKE_ENABLE_FEATURE_DROPBOX) message("##enable dropbox##") ADD_DEFINITIONS("-DMP_FEATURE_ENABLE_DROPBOX") ENDIF (CMAKE_ENABLE_FEATURE_DROPBOX) -#ADD_DEFINITIONS("-DMP_FEATURE_LANDSCAPE") #IF (CMAKE_ENABLE_MULTIWINDOW) # message("##enable multiwindow##") @@ -131,7 +130,6 @@ SET(COMMON_SRCS src/core/mp-collect-color.c src/view/mp-setting-view.c src/view/mp-detail-view.c - src/widget/mp-mini-player.c src/widget/mp-notification.c src/widget/mp-notification.c #END_START_PUBLIC_REMOVED_STRING diff --git a/project_def.prop b/project_def.prop index a6c8b93..735bb8f 100644 --- a/project_def.prop +++ b/project_def.prop @@ -9,7 +9,7 @@ type = app profile = mobile-3.0 # C Sources -USER_SRCS = src/widget/mp-now-playing.c src/widget/mp-index.c src/widget/mp-shortcut.c src/core/mp-http-mgr.c src/view/mp-edit-view.c src/view/mp-genre-detail-view.c src/widget/mp-all-list.c src/widget/mp-artist-detail-list.c src/setting/src/ms-playlist.c src/widget/mp-track-list.c src/view/mp-folder-view.c src/core/mp-streaming-mgr.c src/view/mp-folder-detail-view.c src/core/mp-file-tag-info.c src/widget/mp-player-volume-widget.c src/widget/mp-notification.c src/core/mp-floating-widget-mgr.c src/widget/mp-folder-list.c src/view/mp-add-track-view.c src/core/mp-lyric-mgr.c src/common/mp-media-info.c src/widget/mp-genre-list.c src/widget/mp-mini-player.c src/common/mp-ta.c src/view/mp-create-playlist-view.c src/view/mp-all-view.c src/common/mp-util.c src/common/mp-edit-callback.c src/view/mp-player-view.c src/common/mp-file-util.c src/widget/mp-album-detail-list.c src/widget/mp-ctxpopup.c src/common/mp-menu.c src/core/mp-view-mgr.c src/core/mp-player-mgr.c src/common/mp-app.c src/widget/mp-album-list.c src/widget/mp-artist-list.c src/view/mp-search-view.c src/mp-main.c src/core/mp-player-drm.c src/view/mp-album-detail-view.c src/widget/mp-lyric.c src/view/mp-list-view.c src/setting/src/ms-util.c src/view/mp-now-playing-list-view.c src/common/mp-widget.c src/core/mp-inotify.c src/view/mp-artist-detail-view.c src/core/mp-collect-color-sort.c src/widget/mp-scroll-page.c src/widget/mp-lockscreenmini.c src/view/mp-playlist-detail-view.c src/view/mp-select-track-view.c src/widget/mp-smart-event-box.c src/common/mp-ug-launch.c src/common/mp-common.c src/widget/mp-search.c src/view/mp-set-as-view.c src/setting/src/ms-key-ctrl.c src/view/mp-setting-view.c src/widget/mp-popup.c src/core/mp-setting-ctrl.c src/core/mp-playlist-mgr.c src/view/mp-detail-view.c src/widget/mp-now-playing-list.c src/core/mp-volume.c src/setting/src/ms-auto-off.c src/core/mp-collect-color.c src/setting/src/ms-play-speed.c src/view/mp-view.c src/widget/mp-edit-playlist.c src/widget/mp-list.c src/core/mp-language-mgr.c src/core/mp-player-control.c src/common/mp-item.c src/widget/mp-playlist-list.c src/widget/mp-minicontroller.c src/common/mp-play.c src/widget/mp-search-list.c +USER_SRCS = src/widget/mp-now-playing.c src/widget/mp-index.c src/widget/mp-shortcut.c src/core/mp-http-mgr.c src/view/mp-edit-view.c src/view/mp-genre-detail-view.c src/widget/mp-all-list.c src/widget/mp-artist-detail-list.c src/setting/src/ms-playlist.c src/widget/mp-track-list.c src/view/mp-folder-view.c src/core/mp-streaming-mgr.c src/view/mp-folder-detail-view.c src/core/mp-file-tag-info.c src/widget/mp-player-volume-widget.c src/widget/mp-notification.c src/core/mp-floating-widget-mgr.c src/widget/mp-folder-list.c src/view/mp-add-track-view.c src/core/mp-lyric-mgr.c src/common/mp-media-info.c src/widget/mp-genre-list.c src/common/mp-ta.c src/view/mp-create-playlist-view.c src/view/mp-all-view.c src/common/mp-util.c src/common/mp-edit-callback.c src/view/mp-player-view.c src/common/mp-file-util.c src/widget/mp-album-detail-list.c src/widget/mp-ctxpopup.c src/common/mp-menu.c src/core/mp-view-mgr.c src/core/mp-player-mgr.c src/common/mp-app.c src/widget/mp-album-list.c src/widget/mp-artist-list.c src/view/mp-search-view.c src/mp-main.c src/core/mp-player-drm.c src/view/mp-album-detail-view.c src/widget/mp-lyric.c src/view/mp-list-view.c src/setting/src/ms-util.c src/view/mp-now-playing-list-view.c src/common/mp-widget.c src/core/mp-inotify.c src/view/mp-artist-detail-view.c src/core/mp-collect-color-sort.c src/widget/mp-scroll-page.c src/widget/mp-lockscreenmini.c src/view/mp-playlist-detail-view.c src/view/mp-select-track-view.c src/widget/mp-smart-event-box.c src/common/mp-ug-launch.c src/common/mp-common.c src/widget/mp-search.c src/view/mp-set-as-view.c src/setting/src/ms-key-ctrl.c src/view/mp-setting-view.c src/widget/mp-popup.c src/core/mp-setting-ctrl.c src/core/mp-playlist-mgr.c src/view/mp-detail-view.c src/widget/mp-now-playing-list.c src/core/mp-volume.c src/setting/src/ms-auto-off.c src/core/mp-collect-color.c src/setting/src/ms-play-speed.c src/view/mp-view.c src/widget/mp-edit-playlist.c src/widget/mp-list.c src/core/mp-language-mgr.c src/core/mp-player-control.c src/common/mp-item.c src/widget/mp-playlist-list.c src/widget/mp-minicontroller.c src/common/mp-play.c src/widget/mp-search-list.c # EDC Sources USER_EDCS = diff --git a/res/edje/mp-defines.h b/res/edje/mp-defines.h index c568ac3..e3c2877 100755 --- a/res/edje/mp-defines.h +++ b/res/edje/mp-defines.h @@ -25,17 +25,13 @@ #define FOCUS_BORDER 8 8 8 8 #ifndef MP_IMAGE_ROTATE_FEATURE -//efine MP_IMAGE_ROTATE_FEATURE #endif -//#define MP_FEATURE_APP_IN_APP - /* main size */ #define MAIN_W 480 #define MAIN_H 800 -//#define PLAYVIEW_H 706 #define PLAYVIEW_H 620 -#define MENUBOX_H /*90*/56 +#define MENUBOX_H 56 #define PROGRESSBOX_H 67 /* bg color */ @@ -46,10 +42,10 @@ #define FONT_STYLE_MEDIUM "TIZEN:style=Medium" #define FONT_STYLE_BOLD "TIZEN:style=Bold" -#define FONT_NAME "system_content" //should be replaced to FONT_CONTENT_NAME -#define FONT_TITLE_NAME "system_title" //"system_title" -#define FONT_CONTENT_NAME "system_content" //"system_content" -#define FONT_SUBCONTENT_NAME "system_subcontent" //"system_subcontent" +#define FONT_NAME "system_content" +#define FONT_TITLE_NAME "system_title" +#define FONT_CONTENT_NAME "system_content" +#define FONT_SUBCONTENT_NAME "system_subcontent" /* soft key*/ #define SOFTKEY_SY (722/MAIN_H) @@ -59,7 +55,7 @@ #define INFO_BOX_SY ((/*595*/634 - MP_NAVI_BAR_H)/MAIN_H) /* play control box*/ #define CTL_BOX_HEIGHT 120/*86*/ -#define CTL_BOX_SY /*((714 -10)/MAIN_H)*/705/MAIN_H +#define CTL_BOX_SY 705/MAIN_H #define CTL_REW_SX (115/MAIN_W) #define CTL_REW_EX (165/MAIN_W) #define CTL_REW_SY (20/CTL_BOX_HEIGHT) @@ -204,31 +200,7 @@ #define OFFSET_TITLE -13 #define OFFSET_TITLE_BOTTOM -14 -/* -#define NAVIFRAME_TITLE_H_INC 100 -#define NAVIFRAME_SEGMENT_TITLE_H_INC 136 -#define NAVIFRAME_OH_OPENED_H_INC 106 -#define NAVIFRAME_OH_CONTENT_H_INC 74 -#define NAVIFRAME_OH_PADDING_INC 16 -#define NAVIFRAME_OH_ARROW_SIZE_INC 19 14 -#define NAVIFRAME_OH_OPENED_DOUBLE_H_INC 196 -#define NAVIFRAME_PREV_BTN_W_INC 124 -#define NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 10 -#define NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC 124 80 -#define NAVIFRAME_TEXT_PADDING_INC 144 -#define NAVIFRAME_TEXT_PADDING_MORE_BUTTON_INC 278 -#define NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 186 -#define NAVIFRAME_TITLE_SEGMENT_H_INC 74 -#define NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC 28 -#define NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC 50 -#define NAVIFRAME_TITLE_FONT_SIZE_INC 36 -#define NAVIFRAME_ICON_SIZE_INC 32 32 -#define NAVIFRAME_ICON_PADDING_INC 16 0 -#define NAVIFRAME_CONTROLBAR_PADDING_INC 5 -*/ - #define CONTROLBAR_LARGE_HEIGHT_INC 122 -//#define CONTROLBAR_SMALL_HEIGHT_INC 102 #define CONTROLBAR_WIDTH_INC 122 #define MP_NAVIFRAME_CONTROLBAR_H 114 diff --git a/res/edje/mp-play-view.edc b/res/edje/mp-play-view.edc index 766c0d0..0e1e158 100755 --- a/res/edje/mp-play-view.edc +++ b/res/edje/mp-play-view.edc @@ -1097,26 +1097,6 @@ group { #define TITILE_PAD 10 -#ifdef MP_FEATURE_APP_IN_APP -#define TITILE_ICON_PAD 5 -#define TITILE_ICON_W 100 - -#define TITLE_MINI_PLAYER_SX ((TITLE_BOX_W-TITILE_ICON_W)/TITLE_BOX_W) -#define TITLE_MINI_PLAYER_SY (TITILE_PAD/TITLE_BOX_H) -#define TITLE_MINI_PLAYER_EX 1.0 -#define TITLE_MINI_PLAYER_EY ((TITLE_BOX_H-TITILE_PAD)/TITLE_BOX_H) - -#define TITLE_SOUND_PATH_BG_SX ((TITLE_BOX_W-TITILE_ICON_W*2-TITILE_ICON_PAD)/TITLE_BOX_W) -#define TITLE_SOUND_PATH_BG_SY TITLE_MINI_PLAYER_SY -#define TITLE_SOUND_PATH_BG_EX (TITLE_MINI_PLAYER_SX-TITILE_ICON_PAD/TITLE_BOX_W) -#define TITLE_SOUND_PATH_BG_EY TITLE_MINI_PLAYER_EY - -#define TITLE_NEARBY_DEVICE_BG_SX ((TITLE_BOX_W-TITILE_ICON_W*3-TITILE_ICON_PAD*2)/TITLE_BOX_W) -#define TITLE_NEARBY_DEVICE_BG_SY TITLE_SOUND_PATH_BG_SY -#define TITLE_NEARBY_DEVICE_BG_EX (TITLE_SOUND_PATH_BG_SX-TITILE_ICON_PAD/TITLE_BOX_W) -#define TITLE_NEARBY_DEVICE_BG_EY TITLE_SOUND_PATH_BG_EY - -#else #define TITILE_ICON_PAD 2 #define TITILE_ICON_W 120 @@ -1129,7 +1109,6 @@ group { #define TITLE_NEARBY_DEVICE_BG_SY TITLE_SOUND_PATH_BG_SY #define TITLE_NEARBY_DEVICE_BG_EX (TITLE_SOUND_PATH_BG_SX-TITILE_ICON_PAD/TITLE_BOX_W) #define TITLE_NEARBY_DEVICE_BG_EY TITLE_SOUND_PATH_BG_EY -#endif #define TITLE_SONG_TITLE_SX (TITILE_PAD/TITLE_BOX_W) #define TITLE_SONG_TITLE_SY (TITILE_PAD/TITLE_BOX_H) @@ -1162,16 +1141,6 @@ group { } } -#ifdef MP_FEATURE_APP_IN_APP - part { name: "mini_player"; - mouse_events: 1; - type : SWALLOW; - description { state: "default" 0.0; - rel1 { relative: TITLE_MINI_PLAYER_SX TITLE_MINI_PLAYER_SY; to: "bg";} - rel2 { relative: TITLE_MINI_PLAYER_EX TITLE_MINI_PLAYER_EY; to: "bg";} - } - } -#endif part { name: "sound_path"; mouse_events: 1; type : SWALLOW; diff --git a/sound-player/CMakeLists.txt b/sound-player/CMakeLists.txt index 5333e5d..fde3353 100755 --- a/sound-player/CMakeLists.txt +++ b/sound-player/CMakeLists.txt @@ -27,7 +27,6 @@ pkg_check_modules(sp_pkgs REQUIRED storage vconf efl-extension -# ecore-x edje evas capi-appfw-application @@ -49,19 +48,10 @@ pkg_check_modules(sp_pkgs REQUIRED # appcore-common #START_PUBLIC_REMOVED_STRING -# shortcut -# capi-system-sensor libcore-context-manager -# capi-context -# capi-network-nfc -# capi-telephony-sim - #libsoup-2.4 -# voice-control-static capi-system-info capi-system-runtime-info capi-network-wifi - #liballshare - #liballshare-core capi-network-wifi-direct capi-web-url-download sqlite3 @@ -96,7 +86,6 @@ SET(SRCS ${CMAKE_SOURCE_DIR}/src/core/mp-http-mgr.c ${CMAKE_SOURCE_DIR}/src/core/mp-volume.c ${CMAKE_SOURCE_DIR}/src/core/mp-view-mgr.c -# ${CMAKE_SOURCE_DIR}/src/core/mp-voice-control-mgr.c ${CMAKE_SOURCE_DIR}/src/common/mp-item.c ${CMAKE_SOURCE_DIR}/src/common/mp-menu.c @@ -108,13 +97,10 @@ SET(SRCS ${CMAKE_SOURCE_DIR}/src/common/mp-app.c ${CMAKE_SOURCE_DIR}/src/common/mp-media-info.c ${CMAKE_SOURCE_DIR}/src/common/mp-common.c -# ${CMAKE_SOURCE_DIR}/src/common/mp-albumart.c ${CMAKE_SOURCE_DIR}/src/view/mp-view.c ${CMAKE_SOURCE_DIR}/src/view/mp-player-view.c -# ${CMAKE_SOURCE_DIR}/src/view/mp-lyric-view.c ${CMAKE_SOURCE_DIR}/src/view/mp-detail-view.c -# ${CMAKE_SOURCE_DIR}/src/view/mp-set-as-view.c ${CMAKE_SOURCE_DIR}/src/widget/mp-smart-event-box.c ${CMAKE_SOURCE_DIR}/src/widget/mp-popup.c @@ -124,11 +110,9 @@ SET(SRCS ${CMAKE_SOURCE_DIR}/src/widget/mp-scroll-page.c ${CMAKE_SOURCE_DIR}/src/widget/mp-lyric.c ${CMAKE_SOURCE_DIR}/src/core/mp-language-mgr.c - ${CMAKE_SOURCE_DIR}/src/widget/mp-mini-player.c ${CMAKE_SOURCE_DIR}/src/widget/mp-lockscreenmini.c ${CMAKE_SOURCE_DIR}/src/core/mp-collect-color-sort.c ${CMAKE_SOURCE_DIR}/src/core/mp-collect-color.c -# ${CMAKE_SOURCE_DIR}/src/common/mp-url-downloader.c ${CMAKE_SOURCE_DIR}/src/widget/mp-notification.c ) diff --git a/sound-player/project_def.prop b/sound-player/project_def.prop index 9314de1..591fd5c 100644 --- a/sound-player/project_def.prop +++ b/sound-player/project_def.prop @@ -9,7 +9,7 @@ type = app profile = mobile-3.0 # C Sources -USER_SRCS = ../src/common/mp-play.c ../src/core/mp-lyric-mgr.c ../src/common/mp-media-info.c ../src/common/mp-ug-launch.c ../src/common/mp-common.c ../src/widget/mp-mini-player.c ../src/widget/mp-popup.c ../src/widget/mp-scroll-page.c ../src/widget/mp-player-volume-widget.c ../src/widget/mp-notification.c ../src/common/mp-item.c ../src/widget/mp-ctxpopup.c ../src/core/mp-player-control.c ../src/view/mp-view.c ../src/view/mp-player-view.c ../src/core/mp-language-mgr.c ../src/core/mp-volume.c ../src/common/mp-widget.c ../src/core/mp-setting-ctrl.c ../src/widget/mp-lyric.c ../src/view/mp-detail-view.c ../src/widget/mp-minicontroller.c ../src/core/mp-http-mgr.c ../src/core/mp-player-drm.c ../src/core/mp-view-mgr.c ../src/core/mp-player-mgr.c ../src/common/mp-app.c ../src/widget/mp-smart-event-box.c ../src/common/mp-file-util.c ../src/core/mp-file-tag-info.c ../src/common/mp-menu.c ../src/widget/mp-lockscreenmini.c ../src/mp-main.c ../src/core/mp-collect-color.c ../src/core/mp-collect-color-sort.c ../src/common/mp-util.c ../src/core/mp-playlist-mgr.c ../src/core/mp-streaming-mgr.c +USER_SRCS = ../src/common/mp-play.c ../src/core/mp-lyric-mgr.c ../src/common/mp-media-info.c ../src/common/mp-ug-launch.c ../src/common/mp-common.c ../src/widget/mp-popup.c ../src/widget/mp-scroll-page.c ../src/widget/mp-player-volume-widget.c ../src/widget/mp-notification.c ../src/common/mp-item.c ../src/widget/mp-ctxpopup.c ../src/core/mp-player-control.c ../src/view/mp-view.c ../src/view/mp-player-view.c ../src/core/mp-language-mgr.c ../src/core/mp-volume.c ../src/common/mp-widget.c ../src/core/mp-setting-ctrl.c ../src/widget/mp-lyric.c ../src/view/mp-detail-view.c ../src/widget/mp-minicontroller.c ../src/core/mp-http-mgr.c ../src/core/mp-player-drm.c ../src/core/mp-view-mgr.c ../src/core/mp-player-mgr.c ../src/common/mp-app.c ../src/widget/mp-smart-event-box.c ../src/common/mp-file-util.c ../src/core/mp-file-tag-info.c ../src/common/mp-menu.c ../src/widget/mp-lockscreenmini.c ../src/mp-main.c ../src/core/mp-collect-color.c ../src/core/mp-collect-color-sort.c ../src/common/mp-util.c ../src/core/mp-playlist-mgr.c ../src/core/mp-streaming-mgr.c # EDC Sources USER_EDCS = diff --git a/src/common/include/mp-app.h b/src/common/include/mp-app.h index 1c3cfcd..cab068f 100755 --- a/src/common/include/mp-app.h +++ b/src/common/include/mp-app.h @@ -48,9 +48,6 @@ int mp_app_inotify_add_watch(const char *path, mp_inotify_cb callback, void *use int mp_app_inotify_rm_watch(int index); #endif -#ifdef MP_FEATURE_LANDSCAPE -int mp_app_rotate(app_device_orientation_e mode, void *data); -#endif Eina_Bool mp_app_key_down_cb(void *data, int type, void *event); Eina_Bool mp_app_key_up_cb(void *data, int type, void *event); Eina_Bool mp_app_mouse_event_cb(void *data, int type, void *event); diff --git a/src/common/mp-app.c b/src/common/mp-app.c index 43c1dab..2919d12 100755 --- a/src/common/mp-app.c +++ b/src/common/mp-app.c @@ -47,11 +47,6 @@ #include "mp-common.h" #endif -#ifdef MP_FEATURE_APP_IN_APP -#include "mp-mini-player.h" -#include -#endif - #ifdef MP_3D_FEATURE #include "dali-music.h" #endif @@ -498,56 +493,6 @@ mp_app_noti_ignore(void *data) return TRUE; } -#ifdef MP_FEATURE_LANDSCAPE -int -mp_app_rotate(app_device_orientation_e mode, void *data) -{ - struct appdata *ad = (struct appdata *)data; - MP_CHECK_VAL(ad, 0); - - int angle; - DEBUG_TRACE("Enum Rotation is %d", mode); - DEBUG_TRACE("Rotation b is %d", elm_win_rotation_get(ad->win_main)); - - switch (mode) { - case APP_DEVICE_ORIENTATION_270: - angle = -90; - break; - - case APP_DEVICE_ORIENTATION_90: - angle = 90; - break; - - case APP_DEVICE_ORIENTATION_180: - angle = 180; - break; - - case APP_DEVICE_ORIENTATION_0: - default: - angle = 0; - break; - } - DEBUG_TRACE("Angle Rotation is %d", angle); - - if (angle == ad->win_angle) { - WARN_TRACE("Not rotated.. skip!!"); - return 0; - } - - MpView_t *top_view = mp_view_mgr_get_top_view(GET_VIEW_MGR); - if (!mp_view_is_rotate_available(top_view)) { - WARN_TRACE("top view is not rotatable"); - return 0; - } - ad->win_angle = angle; - - mp_view_set_nowplaying(top_view); - mp_view_mgr_post_event(GET_VIEW_MGR, MP_VIEW_ROTATE); - - return 0; -} -#endif - Eina_Bool mp_app_key_down_cb(void *data, int type, void *event) { @@ -645,22 +590,6 @@ mp_app_mouse_event_cb(void *data, int type, void *event) ad->mouse.sy = 0; ad->mouse.downed = FALSE; ad->mouse.moving = FALSE; - } else if (type == ECORE_EVENT_MOUSE_MOVE) { -#ifdef MP_FEATURE_APP_IN_APP - Ecore_Event_Mouse_Move *ev = event; - if (ad->mini_player_mode && ad->mouse.downed && !ad->mouse.moving) { - double l = sqrt(pow((float)(ad->mouse.sx - ev->root.x), 2) + pow((float)(ad->mouse.sy - ev->root.y), 2)); - if (l >= 30.0f) { - int x, y; - ecore_x_pointer_last_xy_get(&x, &y); - ecore_x_mouse_up_send(ad->xwin, x, y, buttons); - ecore_x_pointer_ungrab(); - //mp_mini_player_window_drag_start(ad, x, y, buttons); - - ad->mouse.moving = TRUE; - } - } -#endif } return ECORE_CALLBACK_PASS_ON; diff --git a/src/common/mp-play.c b/src/common/mp-play.c index b160001..59a6bc1 100755 --- a/src/common/mp-play.c +++ b/src/common/mp-play.c @@ -41,10 +41,6 @@ #include "mp-common.h" #endif -#ifdef MP_FEATURE_APP_IN_APP -#include "mp-mini-player.h" -#endif - #ifdef MP_FEATURE_CONTEXT_ENGINE #include "mp-context.h" #endif @@ -109,8 +105,6 @@ mp_play_start_in_ready_state(void *data) return false; } - //if (ad->is_focus_out) - //{ if (!ad->win_minicon) { mp_minicontroller_create(ad); } else if (!ad->b_minicontroller_show) { @@ -123,13 +117,6 @@ mp_play_start_in_ready_state(void *data) mp_lockscreenmini_show(ad); } #endif - //} - -#ifdef MP_FEATURE_APP_IN_APP - if (ad->mini_player_mode) { - mp_mini_player_refresh(ad); - } -#endif if (current_item->uid) { @@ -337,12 +324,6 @@ mp_play_prepare(void *data) ad->prepare_by_init = false; -#ifdef MP_FEATURE_APP_IN_APP - if (ad->mini_player_mode) { - mp_mini_player_refresh(ad); - } -#endif - #ifndef MP_SOUND_PLAYER mp_view_mgr_post_event(GET_VIEW_MGR, MP_UPDATE_PLAYING_LIST); mp_setting_save_now_playing(ad); @@ -426,8 +407,6 @@ _mp_play_start_lazy(void *data) #endif mp_util_sleep_lock_set(TRUE, FALSE); - //if (ad->is_focus_out) - //{ if (!ad->win_minicon) { mp_minicontroller_create(ad); } else { @@ -442,13 +421,6 @@ _mp_play_start_lazy(void *data) } mp_setting_save_playing_info(ad); #endif - //} - -#ifdef MP_FEATURE_APP_IN_APP - if (ad->mini_player_mode) { - mp_mini_player_refresh(ad); - } -#endif mp_view_mgr_post_event(GET_VIEW_MGR, MP_START_PLAYBACK); @@ -664,12 +636,6 @@ mp_play_pause(void *data) mp_setting_save_playing_info(ad); #endif -#ifdef MP_FEATURE_APP_IN_APP - if (ad->mini_player_mode) { - mp_mini_player_refresh(ad); - } -#endif - mp_view_mgr_post_event(GET_VIEW_MGR, MP_PAUSE_PLAYBACK); if (ad->current_track_info) { @@ -720,11 +686,6 @@ mp_play_stop(void *data) } mp_setting_save_playing_info(ad); #endif -#ifdef MP_FEATURE_APP_IN_APP - if (ad->mini_player_mode) { - mp_mini_player_refresh(ad); - } -#endif #ifdef MP_FEATURE_DRM_CONSUMPTION mp_drm_stop_consumption(); @@ -792,12 +753,6 @@ mp_play_resume(void *data) mp_setting_save_playing_info(ad); #endif -#ifdef MP_FEATURE_APP_IN_APP - if (ad->mini_player_mode) { - mp_mini_player_refresh(ad); - } -#endif - mp_view_mgr_post_event(GET_VIEW_MGR, MP_RESUME_PLAYBACK); mp_app_grab_mm_keys(ad); diff --git a/src/core/mp-view-mgr.c b/src/core/mp-view-mgr.c index f4db648..240343a 100755 --- a/src/core/mp-view-mgr.c +++ b/src/core/mp-view-mgr.c @@ -488,11 +488,6 @@ static void _view_foreach_cb(void *data, void *user_data) case MP_UPDATE: mp_view_update(view); break; -#ifdef MP_FEATURE_LANDSCAPE - case MP_VIEW_ROTATE: - mp_view_rotate(view); - break; -#endif case MP_DB_UPDATED: if ((view->view_type == MP_VIEW_ADD_TRACK) || (view->view_type == MP_VIEW_SET_AS)) { mp_view_on_event(view, event); diff --git a/src/include/mp-define.h b/src/include/mp-define.h index b8bc900..3a68a71 100755 --- a/src/include/mp-define.h +++ b/src/include/mp-define.h @@ -50,10 +50,6 @@ #define LOG_TAG "MUSIC_PLAYER" #endif -#ifndef MP_IMAGE_ROTATE_FEATURE -//efine MP_IMAGE_ROTATE_FEATURE -#endif - #ifndef bool #define bool Eina_Bool #endif @@ -192,7 +188,6 @@ #define MP_FEATURE_USB_OTG #endif #ifdef MP_DEBUG_MODE -//#define MP_CREATE_FAKE_IMAGE #endif #define MP_FUNC_ALLSHARE_PLAYLIST "music-player:allshare_" diff --git a/src/include/music.h b/src/include/music.h index 3464ae8..e6027b3 100755 --- a/src/include/music.h +++ b/src/include/music.h @@ -431,19 +431,6 @@ struct appdata mp_track_info_t *current_track_info; -#ifdef MP_FEATURE_APP_IN_APP - bool mini_player_mode; - int mini_player_current_size; - Evas_Object *win_mini; - Evas_Object *mini_layout; - Evas_Object *title; - Evas_Object *event_box; - - int click_count; - Ecore_Timer *click_timer; - Ecore_Timer *switch_timer; -#endif - #ifdef MP_3D_FEATURE mp_coverflow_view *coverflow_view; #endif @@ -453,11 +440,6 @@ struct appdata Ecore_Timer *pause_off_timer; #endif -#ifdef MP_FEATURE_DESKTOP_MODE - bool desktop_mode; -#endif - - Evas_Object *more_btn_popup; mp_more_button_type_e more_btn_type; diff --git a/src/mp-main.c b/src/mp-main.c index 5a57e69..61f6837 100755 --- a/src/mp-main.c +++ b/src/mp-main.c @@ -26,8 +26,6 @@ #include "mp-playlist-mgr.h" #include "mp-ug-launch.h" #include "mp-popup.h" -/* TEMP_BLOCK */ -/* #include "csc-feature.h" */ #include "mp-all-view.h" #include #include "mp-player-view.h" @@ -38,8 +36,6 @@ #include #include "mp-player-mgr.h" #include "mp-player-debug.h" -/* TEMP_BLOCK */ -/* #include */ #include #include #include @@ -55,10 +51,6 @@ #endif #include "mp-view-mgr.h" -#ifdef MP_FEATURE_APP_IN_APP -#include "mp-mini-player.h" -#endif - #ifdef MP_3D_FEATURE #include "dali-music.h" #endif @@ -68,7 +60,6 @@ #endif #include -/* #include */ static char *test_uri; @@ -98,10 +89,6 @@ static char *test_uri; #define MP_EXIT_ON_BACK "ExitOnBack" #endif -#ifdef MP_FEATURE_DESKTOP_MODE -#define ELM_PROFILE_DESKTOP "desktop" -#endif - struct appdata *g_ad; static bool g_normal_launched = false; @@ -221,12 +208,6 @@ static void _mp_main_win_focus_in_cb(void *data, Evas_Object *obj, void *event) struct appdata *ad = (struct appdata *)data; mp_retm_if(ad == NULL, "ad is null"); -#ifdef MP_FEATURE_APP_IN_APP - if (ad->mini_player_mode) { - WARN_TRACE("floating window"); - return ECORE_CALLBACK_PASS_ON; - } -#endif /* TODO Know about the event */ /*Ecore_X_Event_Window_Focus_In *ev = (Ecore_X_Event_Window_Focus_In *)event; if (ev->win != ad->xwin) @@ -288,13 +269,6 @@ static void _mp_main_win_focus_out_cb(void *data, Evas_Object *obj, void *event) ad->is_focus_out = true; DEBUG_TRACE("ad->is_focus_out: %d", ad->is_focus_out); -#ifdef MP_FEATURE_APP_IN_APP - if (ad->mini_player_mode) { - WARN_TRACE("floating window"); - return ECORE_CALLBACK_PASS_ON; - } -#endif - /* If a track is getting played or paused, the MiniController should be displayed as soon as the main window goes to back ground. When again the Music ICon in Main menu is pressed, the mini controller will be hidden and @@ -341,12 +315,6 @@ static void __mp_main_lcd_state_changed_cb(device_callback_e type, void *state_d mp_lockscreenmini_update(ad); #endif -#ifdef MP_FEATURE_APP_IN_APP - if (ad->mini_player_mode) { - mp_mini_player_refresh(ad); - } -#endif - if (ad->duration_change_timer && mp_player_mgr_get_state() == PLAYER_STATE_PLAYING) { MP_TIMER_THAW(ad->duration_change_timer); } @@ -1099,59 +1067,6 @@ END: return ret; } -#ifdef MP_FEATURE_DESKTOP_MODE -static void -_mp_main_win_profile_changed_cb(void *data, Evas_Object *obj, void *event) -{ - struct appdata *ad = data; - MP_CHECK(ad); - - const char *profile = elm_config_profile_get(); - if (!g_strcmp0(profile, ELM_PROFILE_DESKTOP)) { - /* desktop mode */ - DEBUG_TRACE("profile = [%s]", profile); - ad->desktop_mode = true; - - elm_win_indicator_mode_set(ad->win_main, ELM_WIN_INDICATOR_HIDE); - - /* set win icon */ - Evas_Object *o = evas_object_image_add(evas_object_evas_get(ad->win_main)); - evas_object_image_file_set(o, DESKTOP_ICON, NULL); - elm_win_icon_object_set(ad->win_main, o); - } else { - /* mobile mode */ - ad->desktop_mode = false; - - elm_win_indicator_mode_set(ad->win_main, ELM_WIN_INDICATOR_SHOW); - } - -#ifdef MP_SOUND_PLAYER - -#else - /*MpView_t *view = mp_view_mgr_get_view(GET_VIEW_MGR, MP_VIEW_ALL); - TODO: unset back button if desktop mode supported */ -#endif -} -#endif - -#ifdef MP_FEATURE_LANDSCAPE -static void -_win_rotation_changed_cb(void *data, Evas_Object *obj, void *event_info) -{ - struct appdata *ad = data; - MP_CHECK(ad); - - static int current_angle = 0; - int changed_angle = elm_win_rotation_get(obj); - - WARN_TRACE("window rotated [%d] => [%d]", current_angle, changed_angle); - if (current_angle != changed_angle) { - current_angle = changed_angle; - mp_device_orientation_cb(changed_angle, data); - } -} -#endif - static void _mp_atexit_cb(void) { @@ -1291,22 +1206,9 @@ mp_create(void *data) evas_object_data_set(ad->win_main, "id_layout_pos", (void *) - 1); #endif -#ifdef MP_FEATURE_LANDSCAPE - if (elm_win_wm_rotation_supported_get(ad->win_main)) { - const int rots[4] = { 0, 90, 180, 270 }; - elm_win_wm_rotation_available_rotations_set(ad->win_main, rots, 4); - evas_object_smart_callback_add(ad->win_main, "wm,rotation,changed", _win_rotation_changed_cb, ad); - } -#else elm_win_wm_rotation_preferred_rotation_set(ad->win_main, 0); -#endif PROFILE_OUT("mp_create_win"); -#ifdef MP_FEATURE_DESKTOP_MODE - evas_object_smart_callback_add(ad->win_main, "profile,changed", _mp_main_win_profile_changed_cb, ad); - -#endif - ad->evas = evas_object_evas_get(ad->win_main); if (!_mp_main_init(ad)) { @@ -1676,14 +1578,6 @@ app_control(app_control_h app_control, void *data) } -#ifdef MP_FEATURE_LANDSCAPE -#ifndef defined (MP_3D_FEATURE) - if (ad->screen_mode == MP_SCREEN_MODE_LANDSCAPE) { - evas_object_hide(ad->conformant); - } -#endif -#endif - evas_object_show(ad->win_main); if (activate_window) { @@ -1790,10 +1684,6 @@ mp_device_orientation(app_event_info_h event_info, void *data) app_device_orientation_e orientation; app_event_get_device_orientation(event_info, &orientation); ad->quickpanel_angle = orientation; -#ifdef MP_FEATURE_LANDSCAPE - mp_view_mgr_post_event(GET_VIEW_MGR, MP_VIEW_ROTATE_START); -#endif - return; } @@ -1804,26 +1694,8 @@ mp_device_orientation_cb(app_device_orientation_e orientation, void *user_data) struct appdata *ad = user_data; MP_CHECK(ad); - -#ifdef MP_FEATURE_DESKTOP_MODE - if (ad->desktop_mode) { - return; - } -#endif - -#ifdef MP_FEATURE_APP_IN_APP - if (ad->mini_player_mode) { - mp_mini_player_rotation_cb(orientation, ad); - return; - } -#endif - -#ifdef MP_FEATURE_LANDSCAPE - mp_app_rotate(orientation, user_data); -#else - ERROR_TRACE("Temporary unsupported"); + ERROR_TRACE("Device Rotation unsupported"); return; -#endif } static void diff --git a/src/setting/src/include/ms-effect-view.h b/src/setting/src/include/ms-effect-view.h index 51ed9c2..a12742c 100644 --- a/src/setting/src/include/ms-effect-view.h +++ b/src/setting/src/include/ms-effect-view.h @@ -35,8 +35,4 @@ EXPORT_API void ms_effect_view_cancel_btn_cb(void *data, Evas_Object *obj, void EXPORT_API void ms_effect_view_save_btn_cb(void *data, Evas_Object *obj, void *event_info); EXPORT_API void ms_auto_check_refresh(MpSettingView_t *view); EXPORT_API void ms_effect_view_refresh(MpSettingView_t *data); -#ifdef MP_FEATURE_LANDSCAPE -EXPORT_API void ms_effect_view_rotate(MpSettingView_t *view, bool landscape_mode); -#endif - #endif //__ms_effect_view_H__ diff --git a/src/view/include/mp-view.h b/src/view/include/mp-view.h index 34a1bb2..745b61b 100644 --- a/src/view/include/mp-view.h +++ b/src/view/include/mp-view.h @@ -81,10 +81,6 @@ typedef enum{ MP_PLAY_TIME_COUNT_UPDATED, MP_ROUTE_CHANGED, MP_DB_UPDATED, -#ifdef MP_FEATURE_LANDSCAPE - MP_VIEW_ROTATE, - MP_VIEW_ROTATE_START, //to indicate rotation start -#endif MP_MMC_MOUNTED, MP_MMC_REMOVED, MP_LANG_CHANGED, @@ -209,11 +205,6 @@ int mp_view_view_resume(MpView_t *view); int mp_view_clear_options(MpView_t *view); Evas_Object *mp_view_get_base_obj(MpView_t *view); EXPORT_API int mp_view_on_event(MpView_t *view, MpViewEvent_e event); -#ifdef MP_FEATURE_LANDSCAPE -int mp_view_is_rotate_available(MpView_t *view); -int mp_view_rotate(MpView_t *view); -#endif int mp_view_is_now_push_transit(MpView_t *view, bool *now_transit); - #endif diff --git a/src/view/mp-all-view.c b/src/view/mp-all-view.c index 834e724..1b02296 100755 --- a/src/view/mp-all-view.c +++ b/src/view/mp-all-view.c @@ -664,11 +664,6 @@ _mp_all_view_on_event(void *thiz, MpViewEvent_e event) mp_list_realized_item_part_update(list, "elm.text.sub.left.bottom", ELM_GENLIST_ITEM_FIELD_TEXT); break; #endif -#ifdef MP_FEATURE_LANDSCAPE - case MP_VIEW_ROTATE: - mp_list_rotate(list); - break; -#endif case MP_PLAYLIST_IMAGE_UPDATED: mp_list_update(list); break; @@ -722,24 +717,6 @@ _mp_all_view_on_event(void *thiz, MpViewEvent_e event) } } -#ifdef MP_FEATURE_LANDSCAPE -static void -_mp_all_view_rotate_cb(void *thiz, int randscape) -{ - DEBUG_TRACE("allview rotated"); - MpAllView_t *view = thiz; - MP_CHECK(view); - - MpView_t *top_view = mp_view_mgr_get_top_view(GET_VIEW_MGR); - - if (mp_util_get_sip_state() && (int)top_view == (int)view) { - _mp_all_view_on_event(view, MP_SIP_STATE_CHANGED); - } - - _mp_all_view_on_event(view, MP_VIEW_ROTATE); -} -#endif - #ifdef MP_FEATURE_SHORTCUT #ifndef MP_DEBUG_MODE static void @@ -778,9 +755,6 @@ _mp_all_view_init(Evas_Object *parent, MpAllView_t *view) view->update = _mp_all_view_update; view->update_options = _mp_all_view_update_options; view->view_destroy_cb = _mp_all_view_destory_cb; -#ifdef MP_FEATURE_LANDSCAPE - view->rotate = _mp_all_view_rotate_cb; -#endif view->on_event = _mp_all_view_on_event; view->all_view_layout = mp_common_load_edj(view->layout, MP_EDJ_NAME, "common_view_layout"); diff --git a/src/view/mp-artist-booklet-view.c b/src/view/mp-artist-booklet-view.c index 30bb838..83b4ee9 100755 --- a/src/view/mp-artist-booklet-view.c +++ b/src/view/mp-artist-booklet-view.c @@ -559,15 +559,6 @@ static void _mp_artist_booklet_view_content_load(void *thiz) } -#ifdef MP_FEATURE_LANDSCAPE -static void -_mp_artist_booklet_view_rotate(void *thiz, int landscape) -{ - MpArtistBookletView_t *view = thiz; - MP_CHECK(view); -} -#endif - static int _mp_artist_booklet_view_init(Evas_Object *parent, MpArtistBookletView_t *view) { @@ -580,9 +571,6 @@ _mp_artist_booklet_view_init(Evas_Object *parent, MpArtistBookletView_t *view) view->update_options = _mp_artist_booklet_view_update_options; view->update_options_edit = NULL; view->view_destroy_cb = _mp_artist_booklet_view_destory_cb; -#ifdef MP_FEATURE_LANDSCAPE - view->rotate = _mp_artist_booklet_view_rotate; -#endif return ret; } diff --git a/src/view/mp-create-playlist-view.c b/src/view/mp-create-playlist-view.c index 2bab654..cb22d09 100644 --- a/src/view/mp-create-playlist-view.c +++ b/src/view/mp-create-playlist-view.c @@ -561,26 +561,6 @@ _mp_create_plst_view_on_event(void *thiz, MpViewEvent_e event) } -#ifdef MP_FEATURE_LANDSCAPE -static void -_mp_create_plst_view_rotate_cb(void *thiz, int randscape) -{ - DEBUG_TRACE("create_plst view rotated"); - MpCreatePlstView_t *view = thiz; - MP_CHECK(view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - if (view->editfiled_entry && !ad->popup[MP_POPUP_NOTIFY]) { - elm_object_focus_set(view->editfiled_entry, EINA_TRUE); - } - if (mp_util_get_sip_state() && (int)mp_view_mgr_get_top_view(GET_VIEW_MGR) == (int)view) { - _mp_create_plst_view_on_event(view, MP_SIP_STATE_CHANGED); - } -} -#endif - static int _mp_create_plst_view_init(Evas_Object *parent, MpCreatePlstView_t *view) { @@ -599,9 +579,6 @@ _mp_create_plst_view_init(Evas_Object *parent, MpCreatePlstView_t *view) view->start_playback = NULL; view->pause_playback = NULL; view->stop_playback = NULL; -#ifdef MP_FEATURE_LANDSCAPE - view->rotate = _mp_create_plst_view_rotate_cb; -#endif view->on_event = _mp_create_plst_view_on_event; view->create_plst_layout = _mp_create_plst_view_content_create(view); diff --git a/src/view/mp-detail-view.c b/src/view/mp-detail-view.c index 5136824..7575c8d 100755 --- a/src/view/mp-detail-view.c +++ b/src/view/mp-detail-view.c @@ -572,31 +572,6 @@ _mp_detail_view_create_default_layout(MpDetailView_t *view) elm_object_part_content_set(view->layout, "list_content", view->content); } -#ifdef MP_FEATURE_LANDSCAPE -static void _mp_detail_view_content_layout_load(void *thiz) -{ - startfunc; - MpDetailView_t *view = (MpDetailView_t *)thiz; - MP_CHECK(view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - MP_CHECK(ad->win_main); - { - _mp_detail_view_create_default_layout(view); - } - endfunc; -} - -static void _mp_detail_view_layout_content_set(void *thiz) -{ - startfunc; - MpDetailView_t *view = (MpDetailView_t *)thiz; - MP_CHECK(view); - return; -} -#endif - static void _mp_detail_view_create_content(void *thiz) { @@ -724,23 +699,6 @@ _mp_detail_view_on_event(void *thiz, MpViewEvent_e event) } } -#ifdef MP_FEATURE_LANDSCAPE -static void -_mp_detail_view_rotate(void *thiz, int init_rotate) -{ - DEBUG_TRACE("mp_player rotated %d", init_rotate); - MpDetailView_t *view = thiz; - MP_CHECK(view); - - _mp_detail_view_content_layout_load(view); - _mp_detail_view_layout_content_set(view); - - mp_view_set_title((MpView_t *)view, view->title); - mp_view_set_sub_title((MpView_t *)view, view->artist); - _mp_detail_view_update_options((MpView_t *)view); -} -#endif - static int _mp_detail_view_init(Evas_Object *parent, MpDetailView_t *view, const char *uri) { @@ -757,9 +715,6 @@ _mp_detail_view_init(Evas_Object *parent, MpDetailView_t *view, const char *uri) view->update_options_edit = NULL; view->view_destroy_cb = _mp_detail_view_destory_cb; view->on_event = _mp_detail_view_on_event; -#ifdef MP_FEATURE_LANDSCAPE - view->rotate = _mp_detail_view_rotate; -#endif return ret; } diff --git a/src/view/mp-edit-view.c b/src/view/mp-edit-view.c index d87ccc1..a947ea4 100755 --- a/src/view/mp-edit-view.c +++ b/src/view/mp-edit-view.c @@ -557,11 +557,6 @@ _mp_edit_view_on_event(void *thiz, MpViewEvent_e event) case MP_ADD_TO_PLAYLIST_DONE: mp_view_mgr_pop_a_view(GET_VIEW_MGR, thiz); break; -#ifdef MP_FEATURE_LANDSCAPE - case MP_VIEW_ROTATE: - mp_list_rotate(view->content_to_show); - break; -#endif case MP_POPUP_CANCEL: mp_view_update_options((MpView_t *)view); break; diff --git a/src/view/mp-player-view.c b/src/view/mp-player-view.c index 27bf89a..759febf 100755 --- a/src/view/mp-player-view.c +++ b/src/view/mp-player-view.c @@ -48,9 +48,6 @@ #endif -#ifdef MP_FEATURE_APP_IN_APP -#include "mp-mini-player.h" -#endif #include "mp-minicontroller.h" #ifdef MP_FEATURE_ALBUM_COVER_BG #include "mp-collect-color.h" @@ -517,29 +514,6 @@ static void _mp_player_view_create_control_queue_btn(void *data) } #endif -#ifdef MP_FEATURE_APP_IN_APP -#ifndef MP_SOUND_PLAYER -static void _mp_player_view_minimize_cb(void *data, Evas_Object *obj, void *event_info) -{ - startfunc - MpPlayerView_t *view = (MpPlayerView_t *)data; - MP_CHECK(view); - CHECK_VIEW(view); - mp_evas_object_del(view->more_btn_ctxpopup); - struct appdata *ad = mp_util_get_appdata(); - elm_win_lower(ad->win_main); - - -#ifdef MP_FEATURE_APP_IN_APP - DEBUG_TRACE("mp_mini_player_show"); - mp_mini_player_show(ad, 0); -#endif - - endfunc -} -#endif -#endif - static void _mp_player_view_update_snd_button_state(void *data) { MpPlayerView_t *view = data; @@ -2967,26 +2941,14 @@ static void _mp_player_view_resize(void *data) evas_object_geometry_get(ad->win_main, NULL, NULL, &w, &h); DEBUG_TRACE("win size w: %d h: %d", w, h); -#ifdef MP_FEATURE_LANDSCAPE - if (mp_util_is_landscape()) { - if (w < MP_MULTI_WINDOW_NO_ALBUMART_WIDTH * scale) { - edje_object_signal_callback_add(_EDJ(view->player_view_layout), "set_hide_albumart", "*", _mp_player_view_albumart_cb, view); - edje_object_signal_emit(_EDJ(view->player_view_layout), "set_hide_albumart", "*"); - } else { - edje_object_signal_emit(_EDJ(view->player_view_layout), "set_show_albumart", "*"); - } - } else -#endif - { - if (h < MP_MULTI_WINDOW_NO_PROGRESS_HEIGHT * scale) { - edje_object_signal_callback_add(_EDJ(view->player_view_layout), "set_hide_progress", "*", _mp_player_view_albumart_cb, view); - edje_object_signal_emit(_EDJ(view->player_view_layout), "set_hide_progress", "*"); - } else if (h < MP_MULTI_WINDOW_NO_OPTION_HEIGHT * scale) { - edje_object_signal_callback_add(_EDJ(view->player_view_layout), "set_hide_option", "*", _mp_player_view_albumart_cb, view); - edje_object_signal_emit(_EDJ(view->player_view_layout), "set_hide_option", "*"); - } else { - edje_object_signal_emit(_EDJ(view->player_view_layout), "set_hide_default", "*"); - } + if (h < MP_MULTI_WINDOW_NO_PROGRESS_HEIGHT * scale) { + edje_object_signal_callback_add(_EDJ(view->player_view_layout), "set_hide_progress", "*", _mp_player_view_albumart_cb, view); + edje_object_signal_emit(_EDJ(view->player_view_layout), "set_hide_progress", "*"); + } else if (h < MP_MULTI_WINDOW_NO_OPTION_HEIGHT * scale) { + edje_object_signal_callback_add(_EDJ(view->player_view_layout), "set_hide_option", "*", _mp_player_view_albumart_cb, view); + edje_object_signal_emit(_EDJ(view->player_view_layout), "set_hide_option", "*"); + } else { + edje_object_signal_emit(_EDJ(view->player_view_layout), "set_hide_default", "*"); } } #endif @@ -3000,49 +2962,14 @@ static void _mp_player_view_add_callbacks(void *data) struct appdata *ad = mp_util_get_appdata(); MP_CHECK(ad); -#ifdef MP_FEATURE_LANDSCAPE - bool landscape = mp_util_is_landscape(); - if (landscape) { - /*side cast has no option area*/ -#ifdef MP_FEATURE_SUGGEST_FOR_YOU -#ifdef MP_SOUND_PLAYER - view->player_view_option_layout = mp_common_load_edj(view->player_view_layout, PLAY_VIEW_EDJ_NAME, "player_view_option_area_ld"); - evas_object_size_hint_align_set(view->player_view_option_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(view->player_view_option_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_content_set(view->player_view_layout, "options_area", view->player_view_option_layout); - evas_object_show(view->player_view_option_layout); - MP_CHECK(view->player_view_option_layout); -#else - view->player_view_option_layout = NULL; -#endif -#endif - } else -#endif - { - view->player_view_option_layout = mp_common_load_edj(view->player_view_layout, PLAY_VIEW_EDJ_NAME, "player_view_option_area"); - evas_object_size_hint_align_set(view->player_view_option_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(view->player_view_option_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_content_set(view->player_view_layout, "options_area", view->player_view_option_layout); - evas_object_show(view->player_view_option_layout); - MP_CHECK(view->player_view_option_layout); - } + view->player_view_option_layout = mp_common_load_edj(view->player_view_layout, PLAY_VIEW_EDJ_NAME, "player_view_option_area"); + evas_object_size_hint_align_set(view->player_view_option_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(view->player_view_option_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_part_content_set(view->player_view_layout, "options_area", view->player_view_option_layout); + evas_object_show(view->player_view_option_layout); + MP_CHECK(view->player_view_option_layout); -#ifdef MP_FEATURE_LANDSCAPE - if (landscape) { -#ifdef MP_FEATURE_SUGGEST_FOR_YOU -#ifndef MP_SOUND_PLAYER - view->player_view_control_layout = mp_common_load_edj(view->player_view_layout, PLAY_VIEW_EDJ_NAME, "player_view_control_area_cast"); -#else - view->player_view_control_layout = mp_common_load_edj(view->player_view_layout, PLAY_VIEW_EDJ_NAME, "player_view_control_area_ld"); -#endif -#else - view->player_view_control_layout = mp_common_load_edj(view->player_view_layout, PLAY_VIEW_EDJ_NAME, "player_view_control_area_ld"); -#endif - } else -#endif - { - view->player_view_control_layout = mp_common_load_edj(view->player_view_layout, PLAY_VIEW_EDJ_NAME, "player_view_control_area"); - } + view->player_view_control_layout = mp_common_load_edj(view->player_view_layout, PLAY_VIEW_EDJ_NAME, "player_view_control_area"); evas_object_size_hint_align_set(view->player_view_control_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_weight_set(view->player_view_control_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_object_part_content_set(view->player_view_layout, "control_area", view->player_view_control_layout); @@ -3871,12 +3798,6 @@ static void _mp_player_view_on_event(void *thiz, MpViewEvent_e event) break; } #endif -#ifdef MP_FEATURE_LANDSCAPE - case MP_VIEW_ROTATE_START: { - view->update_flag = false; - break; - } -#endif case MP_UPDATE_PLAYING_LIST: { #ifdef MP_FEATURE_SUGGEST_FOR_YOU @@ -3949,62 +3870,6 @@ _mp_player_view_update_layout(void *data) } -#ifdef MP_FEATURE_LANDSCAPE -static void -_mp_player_view_rotate(void *thiz, int init_rotate) -{ - DEBUG_TRACE("mp_player rotated %d", init_rotate); - MpPlayerView_t *view = thiz; - MP_CHECK(view); - CHECK_VIEW(view); - - /*check if player position should update during rotation*/ - int current_pos = mp_player_mgr_get_position(); - /*enable update flag to get down/move for next time*/ - view->update_flag = true; - /* - ** view->update_pos >= 0 means update really happened - ** current_pos != view->update_pos* 1000 update position is not the playing position - ** it's long press rotate case. - */ - if (view->update_pos >= 0 && current_pos != view->update_pos * 1000) { - mp_player_mgr_set_position(view->update_pos * 1000, _mp_player_view_progressbar_seek_done_cb, view); - } - /*cancel drag status for timer progress*/ - view->progressbar_dragging = false; - /*clean update_pos. every update_pos use only once*/ - view->update_pos = -1; - - _mp_player_view_content_layout_load(view); - view->queue_list = NULL; - - _mp_player_view_update_layout(view); - mp_player_view_refresh(view); -#ifdef MP_FEATURE_MUSIC_VIEW - if (view->wave_view_status) { - _mp_player_view_show_wave_view_set(view); - } -#endif - - if (view->transition_state) { - WARN_TRACE("transition is not finished yet for prev/next"); - _mp_player_view_transit_by_item_complete_cb(view, NULL); - } -} -#endif -/* -static void -_mp_player_view_layout_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) -{ - startfunc; - - MpPlayerView_t *playing_view = (MpPlayerView_t *)data; - MP_CHECK(playing_view); - - playing_view->player_view_layout = NULL; -} -*/ - static int _mp_player_view_init(Evas_Object *parent, MpPlayerView_t *view) { @@ -4040,11 +3905,6 @@ _mp_player_view_init(Evas_Object *parent, MpPlayerView_t *view) view->on_event = _mp_player_view_on_event; -#ifdef MP_FEATURE_LANDSCAPE - view->rotate = _mp_player_view_rotate; - view->queue_status = false; -#endif - return ret; } diff --git a/src/view/mp-playlist-detail-view.c b/src/view/mp-playlist-detail-view.c index 4bef13f..a06c58b 100755 --- a/src/view/mp-playlist-detail-view.c +++ b/src/view/mp-playlist-detail-view.c @@ -466,23 +466,6 @@ _mp_playlist_detail_view_on_event_cb(void *thiz, MpViewEvent_e event) mp_list_update(view->content_to_show); break; } -#ifdef MP_FEATURE_LANDSCAPE - case MP_VIEW_ROTATE: { - Evas_Object *content = NULL; - content = elm_object_part_content_unset(view->playlist_detail_view_layout, "list-content"); - evas_object_del(content); - /*the selected track can not be removed when screen rotated*/ - mp_track_list_update_genlist(view->content_to_show); - /*mp_list_update(view->content_to_show);*/ - int count = mp_list_get_editable_count((MpList_t *)view->content_to_show, mp_list_get_edit_type(view->content_to_show)); - if (count != 0) { - mp_track_list_update_albumart_index((MpTrackList_t *)view->content_to_show); - } - - mp_view_set_nowplaying(thiz); - break; - } -#endif #ifndef MP_SOUND_PLAYER case MP_UPDATE_PLAYING_LIST: mp_list_realized_item_part_update(view->content_to_show, "elm.text.main.left.top", ELM_GENLIST_ITEM_FIELD_TEXT); @@ -525,20 +508,6 @@ _mp_playlist_detail_view_on_event_cb(void *thiz, MpViewEvent_e event) endfunc; } -#ifdef MP_FEATURE_LANDSCAPE -static void _mp_playlist_detail_view_rotate_cb(void *thiz, int randscape) -{ - startfunc; - - DEBUG_TRACE("playlist_detail_view rotated"); - MpPlaylistDetailView_t *view = thiz; - MP_CHECK(view); - - _mp_playlist_detail_view_on_event_cb(view, MP_VIEW_ROTATE); - endfunc; -} -#endif - static void _mp_playlist_detail_view_resume(void *thiz) { startfunc; @@ -567,9 +536,6 @@ _mp_playlist_detail_view_init(Evas_Object *parent, MpPlaylistDetailView_t *view) view->content_set = _mp_playlist_detail_view_content_load; view->on_event = _mp_playlist_detail_view_on_event_cb; view->view_resume = _mp_playlist_detail_view_resume; -#ifdef MP_FEATURE_LANDSCAPE - view->rotate = _mp_playlist_detail_view_rotate_cb; -#endif /*Todo: we need to add a new layout style*/ view->playlist_detail_view_layout = view->layout; diff --git a/src/view/mp-search-view.c b/src/view/mp-search-view.c index 2e28d9d..93d9b57 100755 --- a/src/view/mp-search-view.c +++ b/src/view/mp-search-view.c @@ -260,21 +260,6 @@ _mp_search_view_on_event_cb(void *thiz, MpViewEvent_e event) } } -#ifdef MP_FEATURE_LANDSCAPE -static void -_mp_search_view_rotate_cb(void *thiz, int randscape) -{ - DEBUG_TRACE("Serach view rotated"); - MpSearchView_t *view = thiz; - MP_CHECK(view); - - if (mp_util_get_sip_state() && (int)mp_view_mgr_get_top_view - (GET_VIEW_MGR) == (int)view) { - _mp_search_view_on_event_cb(view, MP_SIP_STATE_CHANGED); - } -} -#endif - static void _mp_search_view_back_button_clicked(void *data, Evas_Object *o, const char *emission, const char *source) @@ -316,10 +301,6 @@ _mp_search_view_init(Evas_Object *parent, MpSearchView_t *view) view->pause_playback = NULL; view->stop_playback = NULL; view->on_event = _mp_search_view_on_event_cb; -#ifdef MP_FEATURE_LANDSCAPE - view->rotate = _mp_search_view_rotate_cb; -#endif - view->transition = true; Elm_Theme *th = elm_theme_new(); elm_theme_extension_add(th, THEME_NAME); diff --git a/src/view/mp-set-as-view.c b/src/view/mp-set-as-view.c index 19cab30..036095f 100755 --- a/src/view/mp-set-as-view.c +++ b/src/view/mp-set-as-view.c @@ -891,23 +891,6 @@ static void _mp_set_as_view_resume(void *thiz) _mp_set_as_view_update((void *)view); } -#ifdef MP_FEATURE_LANDSCAPE -static void -_mp_set_as_view_rotate_cb(void *thiz, int randscape) -{ - startfunc; - MpSetAsView_t *view = (MpSetAsView_t *)thiz; - MP_CHECK(view); - - elm_genlist_realized_items_update(view->content); - /*_mp_set_as_view_moved_recommended_time(view); - add idler to move text */ - if (view->move_idler == NULL) { - view->move_idler = ecore_idler_add(_move_idler, view); - } -} -#endif - static int _mp_set_as_view_init(Evas_Object *parent, MpSetAsView_t *view, void *data) { @@ -927,9 +910,6 @@ _mp_set_as_view_init(Evas_Object *parent, MpSetAsView_t *view, void *data) view->start_playback = NULL; view->pause_playback = NULL; view->on_event = _mp_set_as_view_on_event; -#ifdef MP_FEATURE_LANDSCAPE - view->rotate = _mp_set_as_view_rotate_cb; -#endif view->view_resume = _mp_set_as_view_resume; view->content = _mp_set_as_view_create_list(view, parent); diff --git a/src/view/mp-setting-view.c b/src/view/mp-setting-view.c index 0897ed0..df63445 100755 --- a/src/view/mp-setting-view.c +++ b/src/view/mp-setting-view.c @@ -641,16 +641,6 @@ _mp_setting_view_destory_cb(void *thiz) free(view); } -#ifdef MP_FEATURE_LANDSCAPE -static void -_mp_setting_view_rotate(void *thiz, int init_rotate) -{ - DEBUG_TRACE("mp_player rotated %d", init_rotate); - MpSettingView_t *view = thiz; - MP_CHECK(view); -} -#endif - static void _mp_setting_view_on_event(void *thiz, MpViewEvent_e event) { @@ -1093,10 +1083,6 @@ _mp_setting_view_init(Evas_Object *parent, MpSettingView_t *view, view->pause_playback = NULL; view->on_event = _mp_setting_view_on_event; view->view_resume = _mp_setting_view_resume; -#ifdef MP_FEATURE_LANDSCAPE - view->rotate = _mp_setting_view_rotate; -#endif - view->setting_type = type; if (type == MP_SETTING_VIEW_DEFAULT) { diff --git a/src/view/mp-view.c b/src/view/mp-view.c index 8e91fd7..03b6acd 100755 --- a/src/view/mp-view.c +++ b/src/view/mp-view.c @@ -182,13 +182,7 @@ static void _mp_view_show_now_playing(void *thiz, int show) MP_CHECK(view->layout); MP_CHECK(view->nowplaying_bar); if (show) { -#ifdef MP_FEATURE_LANDSCAPE - bool landscape = mp_util_is_landscape(); - if (landscape) { - edje_object_signal_emit(_EDJ(view->layout), "LANDSCAPE_SHOW_NOW_PLAING", "music_app"); - } else -#endif - edje_object_signal_emit(_EDJ(view->layout), "SHOW_NOW_PLAING", "music_app"); + edje_object_signal_emit(_EDJ(view->layout), "SHOW_NOW_PLAING", "music_app"); } else { edje_object_signal_emit(_EDJ(view->layout), "HIDE_NOW_PLAING", "music_app"); } @@ -215,24 +209,14 @@ static int _mp_view_set_nowplaying(void *thiz) } #endif -#ifdef MP_FEATURE_LANDSCAPE - if (mp_view_is_rotate_available(view)) { - view->rotate_flag = TRUE; - if (!view->nowplaying_bar || mp_util_is_landscape() != mp_now_playing_is_landscape(view->nowplaying_bar)) { - view->nowplaying_bar = mp_now_playing_create(view->layout, _mp_view_now_playing_play_pause_cb, _mp_view_now_playing_cb, view); - elm_object_part_content_set(view->layout, "now_playing", view->nowplaying_bar); - } + if (!view->nowplaying_bar) { + view->rotate_flag = FALSE; + view->nowplaying_bar = mp_now_playing_create(view->layout, _mp_view_now_playing_play_pause_cb, _mp_view_now_playing_cb, view); + elm_object_part_content_set(view->layout, "now_playing", view->nowplaying_bar); mp_view_update_nowplaying(view, true); - } else -#endif - if (!view->nowplaying_bar) { - view->rotate_flag = FALSE; - view->nowplaying_bar = mp_now_playing_create(view->layout, _mp_view_now_playing_play_pause_cb, _mp_view_now_playing_cb, view); - elm_object_part_content_set(view->layout, "now_playing", view->nowplaying_bar); - mp_view_update_nowplaying(view, true); - } else { - mp_view_update_nowplaying(view, true); - } + } else { + mp_view_update_nowplaying(view, true); + } _mp_view_show_now_playing(thiz, TRUE); if (view == mp_view_mgr_get_top_view(GET_VIEW_MGR)) { @@ -377,41 +361,8 @@ static void _mp_view_view_resume(void *thiz) static void _mp_view_on_event(void *thiz, MpViewEvent_e event) { - startfunc; -#ifdef MP_FEATURE_LANDSCAPE - MpView_t *view = (MpView_t *)thiz; -#endif DEBUG_TRACE("event; %d", event); - switch (event) { -#ifdef MP_FEATURE_LANDSCAPE - case MP_VIEW_ROTATE: - if (view->view_type != MP_VIEW_EDIT) { - mp_view_update_options(thiz); - } - break; -#endif - default: - break; - } - - endfunc; -} - -#ifdef MP_FEATURE_LANDSCAPE -static void -_mp_view_rotate_cb(void *thiz, int randscape) -{ - startfunc; - - DEBUG_TRACE("_mp_view_rotate_cb rotated"); - MpView_t *view = thiz; - MP_CHECK(view); - - _mp_view_on_event(view, MP_VIEW_ROTATE); - - endfunc; } -#endif int mp_view_init(Evas_Object *parent, MpView_t *view, MpViewType_e view_type, ...) { @@ -440,12 +391,7 @@ int mp_view_init(Evas_Object *parent, MpView_t *view, MpViewType_e view_type, .. view->view_lcd_on = _mp_view_view_lcd_on; view->view_pause = _mp_view_view_pause; view->view_resume = _mp_view_view_resume; - -#ifdef MP_FEATURE_LANDSCAPE - view->rotate = _mp_view_rotate_cb; -#endif view->on_event = _mp_view_on_event; - view->layout = mp_common_load_edj(parent, MP_EDJ_NAME, "main_layout"); #ifdef MP_FEATURE_MULTIWINDOW @@ -700,42 +646,3 @@ EXPORT_API int mp_view_on_event(MpView_t *view, MpViewEvent_e event) } return 0; } -#ifdef MP_FEATURE_LANDSCAPE -int mp_view_is_rotate_available(MpView_t *view) -{ - CHECK_VIEW(view, 0); - if (view->is_rotate_available) { - return view->is_rotate_available(view); - } - - return 1; -} - -int mp_view_rotate(MpView_t *view) -{ - CHECK_VIEW(view, -1); - int landscape = (int)mp_util_is_landscape(); - if (view->rotate) { - view->rotate(view, landscape); - } -#ifndef MP_SOUND_PLAYER - if (view->nowplaying_bar) { - if (mp_now_playing_is_landscape(view->nowplaying_bar) != landscape) { - _mp_view_set_nowplaying(view); - } - } -#endif - return 0; -} - -int mp_view_is_now_push_transit(MpView_t *view, bool *now_transit) -{ - CHECK_VIEW(view, -1); - MP_CHECK_VAL(now_transit, -1); - - *now_transit = view->push_transition; - - return 0; -} - -#endif diff --git a/src/widget/include/mp-mini-player.h b/src/widget/include/mp-mini-player.h deleted file mode 100644 index 6b0e73c..0000000 --- a/src/widget/include/mp-mini-player.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - - -#ifndef __MP_APP_IN_APP_H__ -#define __MP_APP_IN_APP_H__ - -#include "music.h" - -typedef enum -{ - WINDOW_SIZE_0, - WINDOW_SIZE_1, - WINDOW_SIZE_2, - WINDOW_SIZE_3, - WINDOW_SIZE_4 -} MULTI_WINDOW_SIZE; - - -typedef struct -{ - INHERIT_MP_VIEW; - /* extention variables */ - Evas_Object *mini_player_view_layout; - /* lyric */ - mp_lyric_view_t *lyric_view; - /* screen mode */ - mp_screen_mode play_view_screen_mode; - - bool mini_player_mode; - int mini_player_current_size; - Evas_Object *win_mini; - Evas_Object *bg; - void *xwin; - Evas_Object *title; - Evas_Object *event_box; - Evas_Object *mini_lyric_view; - - Ecore_Timer *play_delay_timer; - Ecore_Timer *switch_timer; -}MpMwView_t; - - -void mp_mini_player_show(struct appdata *ad, int num); -void mp_mini_player_hide(void *data); -void mp_mini_player_mode_set(void *data, int is_set); -void mp_mini_player_refresh(void *data); -void mp_mini_player_window_drag_resize(void *data, int start_x, int start_y, unsigned int button); -void mp_mini_player_window_drag_start(void *data, int start_x, int start_y, unsigned int button); -int mp_mini_player_rotation_cb(app_device_orientation_e mode, void *data); - -#endif diff --git a/src/widget/mp-edit-playlist.c b/src/widget/mp-edit-playlist.c index 942ba35..6c36730 100755 --- a/src/widget/mp-edit-playlist.c +++ b/src/widget/mp-edit-playlist.c @@ -612,26 +612,6 @@ mp_edit_playlist_rename_done_cb(void *data, Evas_Object * obj, void *event_info) IF_FREE(text); } -/* -#ifdef MP_FEATURE_LANDSCAPE -static void -_mp_edit_playlist_rotate_cb(void *thiz, int randscape) -{ - DEBUG_TRACE("create_plst view rotated"); - Mp_Playlist_Data *mp_playlist_data = thiz; - MP_CHECK(mp_playlist_data); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - if (mp_playlist_data->editfiled_entry && !ad->popup[MP_POPUP_NOTIFY]) - { - elm_object_focus_set(mp_playlist_data->editfiled_entry, EINA_TRUE); - } -} -#endif -*/ - void *mp_edit_playlist_create(mp_plst_operation_type type) { eventfunc; diff --git a/src/widget/mp-mini-player.c b/src/widget/mp-mini-player.c deleted file mode 100644 index 821e164..0000000 --- a/src/widget/mp-mini-player.c +++ /dev/null @@ -1,702 +0,0 @@ -/* -* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - - -#ifdef MP_FEATURE_APP_IN_APP - -#include -#include - -#include "mp-mini-player.h" -#include "mp-player-debug.h" -#include "mp-common.h" -#include "mp-widget.h" -#include "mp-app.h" -#include "mp-player-control.h" -#include "mp-util.h" -#include "mp-mw-lyric-view.h" - -#define CTR_EDJ_SIG_SRC "ctrl_edj" - -#define BASE_W 720 -#define BASE_H 1280 - -#define MINI_PLAYER_W 362 -#define MINI_PLAYER_H 177 -#define MINI_PLAYER_X (BASE_W-MINI_PLAYER_W-12) -#define MINI_PLAYER_Y 85 - -#define MINI_ALBUM_ART_SIZE0_W 90 -#define MINI_ALBUM_ART_SIZE0_H 90 - -#define MINI_ALBUM_ART_SIZE1_W 348 -#define MINI_ALBUM_ART_SIZE1_H 188 - -#define MINI_ALBUM_ART_SIZE2_W 706 -#define MINI_ALBUM_ART_SIZE2_H 546 - - -#define ALBUMART_PART_NAME "albumart" -#define THUMB_NAIL_PART_NAME "thumb_nail" - -static Evas_Coord_Rectangle nLastRect = {0,}; -static bool MINI_CALLED = false; - -static bool _mp_mini_player_view_show_lyric(void *data, bool show_lyric); - - -static Eina_Bool -_mp_mini_player_delay_play_timer_cb(void *data) -{ - TIMER_TRACE(); - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_FALSE(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK_FALSE(ad); - - edje_object_signal_emit(_EDJ(mw_view->mini_player_view_layout), "set_play", "*"); - - mw_view->play_delay_timer = NULL; - - return ECORE_CALLBACK_DONE; -} - -static Eina_Bool -_mp_mini_player_switch_timer_cb(void *data) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_FALSE(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK_FALSE(ad); - - Evas_Coord_Rectangle nCurRect = {0,}; - evas_object_geometry_get(mw_view->win_mini, &nCurRect.x, &nCurRect.y, &nCurRect.w, &nCurRect.h); - - if (nLastRect.w != nCurRect.w || nLastRect.h != nCurRect.h) { - mp_mini_player_mode_set(mw_view, 3); - nLastRect.w = nCurRect.w; - nLastRect.h = nCurRect.h; - } - - return ECORE_CALLBACK_RENEW; -} - -static void -_mp_mini_player_resize_btn_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_NULL(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - MP_CHECK(emission); - - Evas_Coord_Rectangle nCurRect = {0,}; - evas_object_geometry_get(mw_view->win_mini, &nCurRect.x, &nCurRect.y, &nCurRect.w, &nCurRect.h); - int x = 0; - int y = 0; - - if (!g_strcmp0(emission, "sig_size_bt_btn_down")) { -// ecore_x_pointer_last_xy_get(&x, &y); -// ecore_x_mouse_up_send(mw_view->xwin , x, y, 1); -// ecore_x_pointer_ungrab(); - mp_mini_player_window_drag_resize(mw_view, x, y, 1); - edje_object_signal_emit(_EDJ(mw_view->mini_player_view_layout), "bg_edit_show", "*"); - } - - if (mw_view->switch_timer) { - MP_TIMER_THAW(mw_view->switch_timer); - } else { - mw_view->switch_timer = ecore_timer_add(0.5, _mp_mini_player_switch_timer_cb, mw_view); - } - nLastRect.w = nCurRect.w; - nLastRect.h = nCurRect.h; -} - - -static void -_mp_mini_player_close_btn_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_NULL(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - if (mw_view->switch_timer) { - ecore_timer_del(mw_view->switch_timer); - mw_view->switch_timer = NULL; - } - evas_object_hide(mw_view->win_mini); - MINI_CALLED = false; -} - -static void -_mp_mini_player_full_screen_click_cb(void *data, Evas_Object *obj, const char *emission, const char *source) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_NULL(mw_view); - - mp_mini_player_hide(mw_view); -} - - -static void -_mp_mini_player_contrl_btn_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_NULL(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - MP_CHECK(emission); - - if (!g_strcmp0(emission, "sig_rew_btn_down")) { - mp_play_control_rew(true, false, true); - } else if (!g_strcmp0(emission, "sig_rew_btn_up")) { - mp_play_control_rew(false, false, true); - mp_mini_player_refresh(mw_view); - } else if (!g_strcmp0(emission, "sig_ff_btn_down")) { - mp_play_control_ff(true, false, true); - } else if (!g_strcmp0(emission, "sig_ff_btn_up")) { - mp_play_control_ff(false, false, true); - mp_mini_player_refresh(mw_view); - } else if (!g_strcmp0(emission, "sig_play_pause_btn_clicked")) { - if (ad->player_state == PLAY_STATE_PLAYING) { - mp_play_control_play_pause(ad, false); - edje_object_signal_emit(_EDJ(mw_view->mini_player_view_layout), "set_pause", "*"); - } else if (ad->player_state == PLAY_STATE_PAUSED) { - mp_play_control_play_pause(ad, true); - edje_object_signal_emit(_EDJ(mw_view->mini_player_view_layout), "set_play", "*"); - } - - } -} - -static void -_mp_mini_player_eventbox_flick_click_cb(void *data, Evas_Object * obj, void *event_info) -{ - startfunc; - - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_FALSE(mw_view); - MP_CHECK_FALSE(mw_view->mini_player_view_layout); - - struct appdata *ad = mp_util_get_appdata();; - MP_CHECK(ad); - - _mp_mini_player_view_show_lyric(mw_view, !ad->b_show_lyric); -} - - -static void -_mp_mini_player_eventbox_flick_left_cb(void *data, Evas_Object * obj, void *event_info) -{ - startfunc; - Evas_Object *layout = NULL; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_NULL(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - mp_play_control_ff(false, false, true); - mp_mini_player_refresh(mw_view); -} - -static void -_mp_mini_player_eventbox_flick_right_cb(void *data, Evas_Object * obj, void *event_info) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_NULL(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - mp_play_control_rew(false, false true); - mp_mini_player_refresh(mw_view); -} - -static void -_mp_mini_player_title_move_cb(void *data, Evas * e, Evas_Object * obj, void *event_info) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_NULL(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - int x, y; -// ecore_x_pointer_last_xy_get(&x, &y); -// ecore_x_mouse_up_send(mw_view->xwin, x, y, 1); -// ecore_x_pointer_ungrab(); - mp_mini_player_window_drag_start(mw_view, x, y, 1); -} - -Evas_Object* -_mp_mini_player_layout_add(Evas_Object *parent, void *data, int sizenum) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_NULL(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK_NULL(ad); - - int w = 0; - int h = 0; - Evas_Object *albumart = NULL; - - double scale = elm_config_scale_get(); - - if (WINDOW_SIZE_0 == sizenum) { - mw_view->mini_player_view_layout = mp_common_load_edj(parent, PLAY_VIEW_EDJ_NAME, "mini-app-0"); - mw_view->mini_player_current_size = WINDOW_SIZE_0; - } else if (WINDOW_SIZE_1 == sizenum) { - mw_view->mini_player_view_layout = mp_common_load_edj(parent, PLAY_VIEW_EDJ_NAME, "mini-app-1"); - mw_view->mini_player_current_size = WINDOW_SIZE_1; - } else if (WINDOW_SIZE_2 == sizenum) { - mw_view->mini_player_view_layout = mp_common_load_edj(parent, PLAY_VIEW_EDJ_NAME, "mini-app-2"); - MP_CHECK_NULL(mw_view->mini_player_view_layout); - w = MINI_ALBUM_ART_SIZE0_W * scale; - h = MINI_ALBUM_ART_SIZE0_W * scale; - mw_view->mini_player_current_size = WINDOW_SIZE_2; - albumart = elm_image_add(mw_view->mini_player_view_layout); - evas_object_size_hint_align_set(albumart, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(albumart, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_content_set(mw_view->mini_player_view_layout, THUMB_NAIL_PART_NAME, albumart); - } else if (WINDOW_SIZE_3 == sizenum) { - mw_view->mini_player_current_size = WINDOW_SIZE_3; - mw_view->mini_player_view_layout = mp_common_load_edj(parent, PLAY_VIEW_EDJ_NAME, "mini-app-3"); - MP_CHECK_NULL(mw_view->mini_player_view_layout); - albumart = elm_image_add(mw_view->mini_player_view_layout); - evas_object_size_hint_align_set(albumart, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(albumart, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_content_set(mw_view->mini_player_view_layout, ALBUMART_PART_NAME, albumart); - - } else if (WINDOW_SIZE_4 == sizenum) { - mw_view->mini_player_current_size = WINDOW_SIZE_4; - mw_view->mini_player_view_layout = mp_common_load_edj(parent, PLAY_VIEW_EDJ_NAME, "mini-app-4"); - MP_CHECK_NULL(mw_view->mini_player_view_layout); - albumart = elm_image_add(mw_view->mini_player_view_layout); - evas_object_size_hint_align_set(albumart, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_weight_set(albumart, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_content_set(mw_view->mini_player_view_layout, ALBUMART_PART_NAME, albumart); - } - - MP_CHECK_NULL(mw_view->mini_player_view_layout); - evas_object_size_hint_weight_set(mw_view->mini_player_view_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(mw_view->mini_player_view_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - - Evas_Object *edj = _EDJ(mw_view->mini_player_view_layout); - edje_object_signal_callback_add(edj, "sig_exit_btn_clicked", "*", _mp_mini_player_close_btn_clicked_cb, mw_view); - edje_object_signal_callback_add(edj, "sig_full_screen_up", "*", _mp_mini_player_full_screen_click_cb, mw_view); - edje_object_signal_callback_add(edj, "sig_*_btn_down", "*", _mp_mini_player_contrl_btn_clicked_cb, mw_view); - edje_object_signal_callback_add(edj, "sig_*_btn_up", "*", _mp_mini_player_contrl_btn_clicked_cb, mw_view); - edje_object_signal_callback_add(edj, "sig_play_pause_btn_clicked", "*", _mp_mini_player_contrl_btn_clicked_cb, mw_view); - edje_object_signal_callback_add(edj, "sig_size_bt_btn_down", "*", _mp_mini_player_resize_btn_clicked_cb, mw_view); - - mw_view->title = elm_label_add(mw_view->mini_player_view_layout); - evas_object_size_hint_weight_set(mw_view->title, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(mw_view->title, EVAS_HINT_FILL, EVAS_HINT_FILL); - - elm_object_text_set(mw_view->title, ""); - - elm_object_part_content_set(mw_view->mini_player_view_layout, "title_touch", mw_view->title); - evas_object_show(mw_view->title); - evas_object_event_callback_add(mw_view->title, EVAS_CALLBACK_MOUSE_MOVE, _mp_mini_player_title_move_cb, mw_view); - - mw_view->event_box = mp_smart_event_box_add(mw_view->mini_player_view_layout); - MP_CHECK(mw_view->event_box); - evas_object_size_hint_weight_set(mw_view->event_box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(mw_view->event_box, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_smart_callback_add(mw_view->event_box, "mouse.clicked", _mp_mini_player_eventbox_flick_click_cb, mw_view); - evas_object_smart_callback_add(mw_view->event_box, "mouse.flick.left", _mp_mini_player_eventbox_flick_left_cb, mw_view); - evas_object_smart_callback_add(mw_view->event_box, "mouse.flick.right", _mp_mini_player_eventbox_flick_right_cb, mw_view); - evas_object_show(mw_view->event_box); - elm_object_part_content_set(mw_view->mini_player_view_layout, "event_box", mw_view->event_box); - - return mw_view->mini_player_view_layout; -} - -static bool _mp_mini_player_view_show_lyric(void *data, bool show_lyric) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_FALSE(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK_FALSE(ad); - - DEBUG_TRACE("show_lyric=%d", show_lyric); - ad->b_show_lyric = show_lyric; - - if (!show_lyric) { - mp_mw_lyric_view_hide(mw_view); - } else { - mp_mw_lyric_view_show(mw_view); - } - - return true; -} - - -void -mp_mini_player_layout_update(void *data, int num) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_NULL(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - if (mw_view->mini_player_view_layout) { - evas_object_hide(mw_view->mini_player_view_layout); - evas_object_del(mw_view->mini_player_view_layout); - elm_win_resize_object_del(mw_view->win_mini, mw_view->mini_player_view_layout); - } - _mp_mini_player_layout_add(mw_view->win_mini, mw_view, num); - elm_win_resize_object_add(mw_view->win_mini, mw_view->mini_player_view_layout); - - mp_mini_player_refresh(mw_view); -} - - -void mp_mini_player_destory(void *data) -{ - startfunc; - MpMwView_t *mw_view = calloc(1, sizeof(MpMwView_t)); - MP_CHECK_NULL(mw_view); - - if (mw_view->switch_timer) { - ecore_timer_del(mw_view->switch_timer); - mw_view->switch_timer = NULL; - } - - if (mw_view->win_mini) { - evas_object_del(mw_view->win_mini); - } - -// if (mw_view->xwin) -// { -// evas_object_del(mw_view->xwin); -// } - - if (mw_view->bg) { - evas_object_del(mw_view->bg); - } - - if (mw_view->title) { - evas_object_del(mw_view->title); - } - - if (mw_view->event_box) { - evas_object_del(mw_view->event_box); - } - - if (mw_view->mini_lyric_view) { - evas_object_del(mw_view->mini_lyric_view); - } - MINI_CALLED = false; - IF_FREE(mw_view); - -} - -void -mp_mini_player_show(struct appdata *ad, int num) -{ - startfunc; - - if (MINI_CALLED) { - WARN_TRACE("multi window has running"); - return; - } - - MpMwView_t *mw_view = calloc(1, sizeof(MpMwView_t)); - MP_CHECK_NULL(mw_view); - - mw_view->win_mini = mp_create_win("music_multi_window"); -// mw_view->xwin = elm_win_xwindow_get(mw_view->win_mini); - - evas_object_hide(mw_view->win_mini); - mw_view->bg = evas_object_rectangle_add(evas_object_evas_get(mw_view->win_mini)); - evas_object_size_hint_weight_set(mw_view->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(mw_view->win_mini, mw_view->bg); - evas_object_show(mw_view->bg); - - _mp_mini_player_layout_add(mw_view->win_mini, mw_view, num); - elm_win_resize_object_add(mw_view->win_mini, mw_view->mini_player_view_layout); - - mw_view->mini_player_current_size = -1; - mp_mini_player_mode_set(mw_view, 0); - mp_mini_player_refresh(mw_view); - - evas_object_show(mw_view->win_mini); - MINI_CALLED = true; -} - -void -mp_mini_player_hide(void *data) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - mp_ecore_timer_del(mw_view->play_delay_timer); - mp_evas_object_del(mw_view->mini_player_view_layout); - mw_view->mini_player_view_layout = NULL; - - mp_mini_player_mode_set(mw_view, 1); - -#ifdef MP_FEATURE_LANDSCAPE - app_device_orientation_e mode; - mode = app_get_device_orientation(); - mp_app_rotate(mode, ad); -#endif - - elm_win_lower(mw_view->win_mini); - elm_win_raise(ad->win_main); - evas_object_show(ad->win_main); - - mp_mini_player_destory(mw_view); -} - -void -mp_mini_player_mode_set(void *data, int is_set) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - double scale = elm_config_scale_get(); - int x = 0; - int y = 0; - - if (0 == is_set) { - int w = MINI_PLAYER_W * scale; - int h = MINI_PLAYER_H * scale; - - elm_win_floating_mode_set(mw_view->win_mini, EINA_TRUE); - - evas_object_resize(mw_view->win_mini, w, h); - evas_object_move(mw_view->win_mini, MINI_PLAYER_X * scale, MINI_PLAYER_Y * scale); - mw_view->mini_player_mode = true; - } else if (1 == is_set) { - elm_win_floating_mode_set(mw_view->win_mini, EINA_FALSE); - mw_view->mini_player_mode = false; - } else { - elm_win_floating_mode_set(mw_view->win_mini, EINA_TRUE); - MP_TIMER_FREEZE(mw_view->switch_timer); - edje_object_signal_emit(_EDJ(mw_view->mini_player_view_layout), "bg_edit_hide", "*"); - - Evas_Coord_Rectangle nCurRect = {0,}; - evas_object_geometry_get(mw_view->win_mini, &nCurRect.x, &nCurRect.y, &nCurRect.w, &nCurRect.h); - //evas_object_resize(mw_view->win_mini, nCurRect.w, nCurRect.h); - int x = 0; - - if (nCurRect.h < 365) { - if (nCurRect.w < 540) { - mp_mini_player_layout_update(mw_view, WINDOW_SIZE_0); - x = nCurRect.w; - } else { - mp_mini_player_layout_update(mw_view, WINDOW_SIZE_2); - x = nCurRect.w; - } - } else if (nCurRect.w < 540) { - x = nCurRect.w; - mp_mini_player_layout_update(mw_view, WINDOW_SIZE_3); - } else if (nCurRect.w < 720) { - x = nCurRect.w; - mp_mini_player_layout_update(mw_view, WINDOW_SIZE_4); - } - if (nCurRect.h < 177) { - nCurRect.h = 177; - } - - if (x < 362) { - x = 362; - } - - evas_object_resize(mw_view->win_mini, x, nCurRect.h); - mw_view->mini_player_mode = true; - - } - -} - -void -mp_mini_player_refresh(void *data) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK(mw_view); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - MP_CHECK(ad->current_track_info); - - MP_CHECK(!ad->is_lcd_off); - - mp_track_info_t *current_item = mp_playlist_mgr_get_current(ad->playlist_mgr); - MP_CHECK(current_item); - - /* albumart */ - char *albumart_path = NULL; - if (ad->current_track_info && mp_util_is_image_valid(ad->evas, ad->current_track_info->thumbnail_path)) { - albumart_path = ad->current_track_info->thumbnail_path; - } else { - char default_thumbnail[1024] = {0}; - char *shared_path = app_get_shared_resource_path(); - snprintf(default_thumbnail, 1024, "%s%s/%s", shared_path, "shared_images", DEFAULT_THUMBNAIL); - free(shared_path); - albumart_path = g_strdup(default_thumbnail); - } - - DEBUG_TRACE("albumart = %s", albumart_path); - - Evas_Object *thumb_nail = elm_object_part_content_get(mw_view->mini_player_view_layout, THUMB_NAIL_PART_NAME); - Evas_Object *albumart_bg = elm_object_part_content_get(mw_view->mini_player_view_layout, ALBUMART_PART_NAME); - - if (albumart_bg) { - elm_image_file_set(albumart_bg, albumart_path, NULL); - evas_object_show(albumart_bg); - } - - if (thumb_nail) { - elm_image_file_set(thumb_nail, albumart_path, NULL); - evas_object_show(thumb_nail); - } - - /* title */ - //elm_object_part_text_set(mw_view->mini_player_view_layout, "text.title", ad->current_track_info->title); - char *markup_title = elm_entry_utf8_to_markup(ad->current_track_info->title); - char *colored_title = g_strdup_printf("%s", markup_title); - Evas_Object *title_label = mp_widget_slide_title_create(mw_view->mini_player_view_layout, "slide_short", colored_title); - elm_label_slide_go(title_label); - elm_object_part_content_set(mw_view->mini_player_view_layout, "text.title", title_label); - IF_FREE(markup_title); - IF_FREE(colored_title); - - /* artist */ - elm_object_part_text_set(mw_view->mini_player_view_layout, "text.artist", ad->current_track_info->artist); - - if (-1 == mw_view->mini_player_current_size) { - mw_view->mini_player_current_size = WINDOW_SIZE_0; - if (ad->player_state == PLAY_STATE_PLAYING) { - edje_object_signal_emit(_EDJ(mw_view->mini_player_view_layout), "set_play", "*"); - } else if (ad->player_state == PLAY_STATE_PAUSED) { - edje_object_signal_emit(_EDJ(mw_view->mini_player_view_layout), "set_pause", "*"); - } - } else { - edje_object_signal_emit(_EDJ(mw_view->mini_player_view_layout), "set_pause", "*"); - mw_view->play_delay_timer = ecore_timer_add(0.5, _mp_mini_player_delay_play_timer_cb, mw_view); - } - - /* rotation */ - app_device_orientation_e mode; - mode = app_get_device_orientation(); - mp_mini_player_rotation_cb(mode, mw_view); - - evas_object_show(mw_view->mini_player_view_layout); - endfunc; -} - -void -mp_mini_player_window_drag_resize(void *data, int start_x, int start_y, unsigned int button) -{ - startfunc; - - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK(mw_view); -// MP_CHECK(mw_view->xwin); - -// ecore_x_netwm_moveresize_request_send(mw_view->xwin, start_x, start_y, ECORE_X_NETWM_DIRECTION_SIZE_BR, 1); -} - - -void -mp_mini_player_window_drag_start(void *data, int start_x, int start_y, unsigned int button) -{ - startfunc; - - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK(mw_view); -// MP_CHECK(mw_view->xwin); - -// ecore_x_netwm_moveresize_request_send(mw_view->xwin, start_x, start_y, ECORE_X_NETWM_DIRECTION_MOVE, button); -} - -int -mp_mini_player_rotation_cb(app_device_orientation_e mode, void *data) -{ - startfunc; - MpMwView_t *mw_view = (MpMwView_t *)data; - MP_CHECK_VAL(mw_view, 0); - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK_VAL(ad, 0); - MP_CHECK_VAL(mw_view->mini_player_view_layout, 0); - - int angle; - DEBUG_TRACE("Enum Rotation is %d", mode); - DEBUG_TRACE("Rotation b is %d", elm_win_rotation_get(mw_view->win_mini)); - - switch (mode) { - case APP_DEVICE_ORIENTATION_270: - angle = -90; - break; - - case APP_DEVICE_ORIENTATION_90: - angle = 90; - break; - - case APP_DEVICE_ORIENTATION_180: - angle = 180; - break; - - case APP_DEVICE_ORIENTATION_0: - default: - angle = 0; - break; - } - - DEBUG_TRACE("Angle Rotation is %d", angle); - elm_win_rotation_with_resize_set(mw_view->win_mini, angle); - - return 0; -} - -#endif /* MP_FEATURE_APP_IN_APP */ - diff --git a/src/widget/mp-now-playing.c b/src/widget/mp-now-playing.c index ab7e06c..701a9a7 100755 --- a/src/widget/mp-now-playing.c +++ b/src/widget/mp-now-playing.c @@ -616,10 +616,6 @@ Evas_Object *mp_now_playing_create(Evas_Object *parent, MpNowplayingCb play_bt_c int r = -1; -#ifdef MP_FEATURE_LANDSCAPE - bool landscape = false; - landscape = mp_util_is_landscape(); -#endif playing_pannel = elm_layout_add(parent); if (playing_pannel) { char edje_path[1024] ={0}; @@ -798,22 +794,10 @@ static void _mp_now_playing_set_title(Evas_Object *now_playing, const char *titl char *mtitle = NULL; char *martist = NULL; -#ifdef MP_FEATURE_LANDSCAPE - bool landscape = mp_util_is_landscape(); - if (wd->landscape_layout_mode) { - mtitle = g_strdup_printf("%s - %s", - NOW_PLAYING_TITLE_SIZE, NOW_PLAYING_TITLE_COLOR, - markup_title, - NOW_PLAYING_ARTIST_SIZE, NOW_PLAYING_ARTIST_COLOR, - markup_artist); - } else -#endif - { - char *title_format = "%s"; - mtitle = g_strdup_printf(title_format, 28, markup_title); + char *title_format = "%s"; + mtitle = g_strdup_printf(title_format, 28, markup_title); - martist = g_strdup_printf(title_format, 25, markup_artist); - } + martist = g_strdup_printf(title_format, 25, markup_artist); Evas_Object *label_title = elm_label_add(wd->now_playing); elm_object_style_set(label_title, "slide_roll"); elm_label_slide_mode_set(label_title, ELM_LABEL_SLIDE_MODE_AUTO); diff --git a/src/widget/mp-player-volume-widget.c b/src/widget/mp-player-volume-widget.c index 2e19c29..7f36a88 100755 --- a/src/widget/mp-player-volume-widget.c +++ b/src/widget/mp-player-volume-widget.c @@ -142,24 +142,12 @@ _mp_player_volume_widget_mousedown_cb(void *data, Evas * e, Evas_Object * obj, v int max_vol = VOLUME_WIDGET_SLIDER_LEVEL_MAX; -#ifdef MP_FEATURE_LANDSCAPE - if (mp_util_is_landscape()) { - current = ev->canvas.y - VOLUME_WIDGET_SLIDER_LD_START_POINT; - double dval = ((VOLUME_WIDGET_SLIDER_LD_SIZE - current) * max_vol) / VOLUME_WIDGET_SLIDER_LD_SIZE + 1; - val = ((VOLUME_WIDGET_SLIDER_LD_SIZE - current) * max_vol) / VOLUME_WIDGET_SLIDER_LD_SIZE + 1; - if ((dval - val) > 0.5) { - val = val + 1; - } - } else -#endif - { - current = ev->canvas.y; - double dval = (((VOLUME_WIDGET_SLIDER_START_POINT - current) * max_vol) * 1.0) / VOLUME_WIDGET_SLIDER_SIZE ; - val = dval; - DEBUG_TRACE("dval = %f, val = %d, dval-val=%f ", dval, val, (dval - val)); - if ((dval - val) > 0.5) { - val = val + 1; - } + current = ev->canvas.y; + double dval = (((VOLUME_WIDGET_SLIDER_START_POINT - current) * max_vol) * 1.0) / VOLUME_WIDGET_SLIDER_SIZE ; + val = dval; + DEBUG_TRACE("dval = %f, val = %d, dval-val=%f ", dval, val, (dval - val)); + if ((dval - val) > 0.5) { + val = val + 1; } if (val < VOLUME_WIDGET_SLIDER_LEVEL_MIN) { diff --git a/src/widget/mp-shortcut.c b/src/widget/mp-shortcut.c index 8911974..519f65c 100644 --- a/src/widget/mp-shortcut.c +++ b/src/widget/mp-shortcut.c @@ -129,39 +129,21 @@ mp_shortcut_add(Evas_Object *parent, int index) MP_CHECK_NULL(g_cache_data); } -#ifdef MP_FEATURE_LANDSCAPE - bool landscape = mp_util_is_landscape(); - if (landscape) { - layout = mp_common_load_edj(parent, MP_EDJ_NAME, "landscape/shortcut_layout"); - mp_shortcut_update_cache(layout, index); - evas_object_size_hint_min_set(layout, 0, MP_SHORTCUT_BOX_LD_SIZE); - } else -#endif - { - PROFILE_IN("mp_common_load_edj"); - layout = mp_common_load_edj(parent, MP_EDJ_NAME, "shortcut_layout"); - PROFILE_OUT("mp_common_load_edj"); - - PROFILE_IN("mp_shortcut_update_cache"); - mp_shortcut_update_cache(layout, index); - PROFILE_OUT("mp_shortcut_update_cache"); - evas_object_size_hint_min_set(layout, 0, MP_SHORTCUT_LARGE_BOX_SIZE); - } + PROFILE_IN("mp_common_load_edj"); + layout = mp_common_load_edj(parent, MP_EDJ_NAME, "shortcut_layout"); + PROFILE_OUT("mp_common_load_edj"); + + PROFILE_IN("mp_shortcut_update_cache"); + mp_shortcut_update_cache(layout, index); + PROFILE_OUT("mp_shortcut_update_cache"); + evas_object_size_hint_min_set(layout, 0, MP_SHORTCUT_LARGE_BOX_SIZE); return layout; } int mp_shortcut_get_height(void) { -#ifdef MP_FEATURE_LANDSCAPE - bool landscape = mp_util_is_landscape(); - if (landscape) { - return MP_SHORTCUT_BOX_LD_SIZE; - } else -#endif - { - return MP_SHORTCUT_LARGE_BOX_SIZE; - } + return MP_SHORTCUT_LARGE_BOX_SIZE; } void diff --git a/src/widget/mp-track-list.c b/src/widget/mp-track-list.c index 0648875..ee1699c 100644 --- a/src/widget/mp-track-list.c +++ b/src/widget/mp-track-list.c @@ -31,9 +31,6 @@ #define INITIAL_LOAD_COUNT 8 #define ALBUMART_INDEX_SIZE (720 * elm_config_scale_get()) -#ifdef MP_FEATURE_LANDSCAPE -#define LANDSCAPE_ALBUMART_INDEX_SIZE (256 * elm_config_scale_get()) -#endif typedef struct { char *name; @@ -347,65 +344,34 @@ _mp_track_list_albumart_index_contnet_get_cb(void *data, Evas_Object *obj, const shortcut_count = 4; } -#ifdef MP_FEATURE_LANDSCAPE - bool landscape = mp_util_is_landscape(); - int landscape_shortcut_count = 5; -#endif Evas_Object *layout = NULL; char *group = g_strdup_printf("playlist_shortcut_layout_%d", shortcut_count); -#ifdef MP_FEATURE_LANDSCAPE - if (landscape) { - layout = mp_common_load_edj(obj, MP_EDJ_NAME, "landscape_playlist_shortcut_layout"); - } else -#endif - layout = mp_common_load_edj(obj, MP_EDJ_NAME, group); + layout = mp_common_load_edj(obj, MP_EDJ_NAME, group); IF_FREE(group); -#ifdef MP_FEATURE_LANDSCAPE - if (landscape) { - evas_object_size_hint_min_set(layout, LANDSCAPE_ALBUMART_INDEX_SIZE, LANDSCAPE_ALBUMART_INDEX_SIZE * elm_config_scale_get()); - } else -#endif - evas_object_size_hint_min_set(layout, ALBUMART_INDEX_SIZE, ALBUMART_INDEX_SIZE * elm_config_scale_get()); + evas_object_size_hint_min_set(layout, ALBUMART_INDEX_SIZE, ALBUMART_INDEX_SIZE * elm_config_scale_get()); int i = 0; int size = 0; -#ifdef MP_FEATURE_LANDSCAPE - if (landscape) { - for (; i < landscape_shortcut_count; i++) { - albumart_info_s *info = g_list_nth_data(list->albumart_index_list, i); - if (info) { - size = LANDSCAPE_ALBUMART_INDEX_SIZE; - Evas_Object *shortcut = mp_widget_shorcut_box_add(layout, NULL, info->path, NULL, size, size, _mp_track_list_albumart_index_shortcut_clicked_cb, list); - evas_object_data_set(shortcut, "index", (void *)i); - char *part = g_strdup_printf("elm.icon.%d", i + 1); - elm_object_part_content_set(layout, part, shortcut); - IF_FREE(part); - } - } - } else -#endif - { - for (; i < shortcut_count; i++) { - albumart_info_s *info = g_list_nth_data(list->albumart_index_list, i); - if (info) { - if (shortcut_count == 1) { - size = ALBUMART_INDEX_SIZE; - } else if (shortcut_count == 4) { - size = ALBUMART_INDEX_SIZE / 2; - } else { - size = ALBUMART_INDEX_SIZE / 3; - if (i == 0) { - size = size * 2; - } + for (; i < shortcut_count; i++) { + albumart_info_s *info = g_list_nth_data(list->albumart_index_list, i); + if (info) { + if (shortcut_count == 1) { + size = ALBUMART_INDEX_SIZE; + } else if (shortcut_count == 4) { + size = ALBUMART_INDEX_SIZE / 2; + } else { + size = ALBUMART_INDEX_SIZE / 3; + if (i == 0) { + size = size * 2; } - Evas_Object *shortcut = mp_widget_shorcut_box_add(layout, NULL, info->path, NULL, size, size, _mp_track_list_albumart_index_shortcut_clicked_cb, list); - evas_object_data_set(shortcut, "index", (void *)i); - char *part = g_strdup_printf("elm.icon.%d", i + 1); - elm_object_part_content_set(layout, part, shortcut); - IF_FREE(part); } + Evas_Object *shortcut = mp_widget_shorcut_box_add(layout, NULL, info->path, NULL, size, size, _mp_track_list_albumart_index_shortcut_clicked_cb, list); + evas_object_data_set(shortcut, "index", (void *)i); + char *part = g_strdup_printf("elm.icon.%d", i + 1); + elm_object_part_content_set(layout, part, shortcut); + IF_FREE(part); } } -- 2.7.4