-CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
-PROJECT(video-player C)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(video-player C CXX)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_VERSION)
SET(SRCS
src/video-player.c
src/mp-util.c
src/mp-video-app-ctrl.c
src/mp-xml-parser.c
-src/mp-video-view-ctrl.c
+src/mp-video-view-mgr.c
src/mp-video-display-view.c
+src/mp-video-info-view.c
+src/mp-external-ug.c
src/mp-video-progressbar.c
src/mp-util-media-service.c
src/mp-video-sound-path-ctrl.c
src/mp-video-player-mgr.c
src/mp-video-animation-ctrl.c
src/mp-video-streaming-ctrl.c
-src/mp-video-subtitle-ctrl.c
src/mp-video-info-ctrl.c
+src/mp-video-service-ctrl.c
+src/mp-drm-ctrl.c
)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}/include
+)
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED elementary
-appcore-efl
-ui-gadget
-utilX
-mm-common
-mm-player
-mm-sound
-dlog
-pmapi
-mm-session
-vconf
-mm-ta
-mm-fileinfo
-appcore-common
-libmedia-service
-libxml-2.0
-syspopup-caller
-ecore
-ecore-file
-ecore-imf
-ecore-x
-ecore-input
-ecore-evas
-eina
-evas
-edje
-appsvc
-ail
-efreet-mime
-icu-i18n
-icu-io
-icu-le
-icu-lx
-icu-uc)
+pkg_check_modules(pkgs REQUIRED
+ elementary
+ drm-client
+ utilX
+ dlog
+ vconf
+ libxml-2.0
+ syspopup-caller
+ ecore-imf
+ ecore-x
+ ecore-input
+ ecore-evas
+ eina
+ evas
+ ecore
+ ecore-file
+ edje
+ icu-i18n
+ icu-io
+ icu-le
+ icu-lx
+ icu-uc
+ efreet-mime
+ capi-appfw-application
+ capi-media-player
+ capi-media-sound-manager
+ capi-media-image-util
+ capi-system-power
+ capi-media-metadata-extractor
+ capi-content-media-content
+ capi-content-mime-type
+ ui-gadget-1
+)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DMACHINE_$ENV{MACHINE} -fPIC")
-ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
-ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
-ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
-ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
-ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
-ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
+SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
+
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(BINDIR "${PREFIX}/bin")
SET(EDJDIR "${RESDIR}/edje")
SET(SLP_LD_PATH_FLAGS -L${CMAKE_CURRENT_SOURCE_DIR}/src/ext)
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-
+ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
+ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
+ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
+ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
+ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
+#ADD_DEFINITIONS("-DUSE_XVIMAGESINK")
-CONFIGURE_FILE(org.tizen.video-player.desktop.in org.tizen.video-player.desktop)
-FIND_PROGRAM(UNAME NAMES uname)
-EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
IF("${ARCH}" STREQUAL "arm")
ADD_DEFINITIONS("-DTARGET")
- MESSAGE("add -DTARGET")
ENDIF("${ARCH}" STREQUAL "arm")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
+SET(CMAKE_LDFLAGS "-Wl,-zdefs" )
ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${gles_pkg_LDFLAGS} -lmmffile -lmmfsound -ldl)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${gles_pkg_LDFLAGS} -ldl)
ADD_CUSTOM_TARGET(main.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
${CMAKE_SOURCE_DIR}/res/edc/main.edc
${CMAKE_BINARY_DIR}/res/edc/progress.edj DEPENDS
${CMAKE_SOURCE_DIR}/res/edc/progress.edc)
-
ADD_CUSTOM_TARGET(control.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
${CMAKE_SOURCE_DIR}/res/edc/control.edc
${CMAKE_BINARY_DIR}/res/edc/control.edj DEPENDS
${CMAKE_SOURCE_DIR}/res/edc/control.edc)
-ADD_CUSTOM_TARGET(add_tag.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
-${CMAKE_SOURCE_DIR}/res/edc/add_tag.edc
-${CMAKE_BINARY_DIR}/res/edc/add_tag.edj DEPENDS
-${CMAKE_SOURCE_DIR}/res/edc/add_tag.edc)
-
ADD_CUSTOM_TARGET(animation.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
${CMAKE_SOURCE_DIR}/res/edc/animation.edc
${CMAKE_BINARY_DIR}/res/edc/animation.edj DEPENDS
${CMAKE_BINARY_DIR}/res/edc/detail.edj DEPENDS
${CMAKE_SOURCE_DIR}/res/edc/detail.edc)
-ADD_CUSTOM_TARGET(subtitle.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
-${CMAKE_SOURCE_DIR}/res/edc/subtitle.edc
-${CMAKE_BINARY_DIR}/res/edc/subtitle.edj DEPENDS
-${CMAKE_SOURCE_DIR}/res/edc/subtitle.edc)
-
ADD_CUSTOM_TARGET(vp-custom-winset-style.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
${CMAKE_SOURCE_DIR}/res/edc/vp-custom-winset-style.edc
${CMAKE_BINARY_DIR}/res/edc/vp-custom-winset-style.edj DEPENDS
${CMAKE_BINARY_DIR}/res/edc/hidden_button_panel.edj DEPENDS
${CMAKE_SOURCE_DIR}/res/edc/hidden_button_panel.edc)
-ADD_CUSTOM_TARGET(option_button.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
-${CMAKE_SOURCE_DIR}/res/edc/option_button.edc
-${CMAKE_BINARY_DIR}/res/edc/option_button.edj DEPENDS
-${CMAKE_SOURCE_DIR}/res/edc/option_button.edc)
+ADD_CUSTOM_TARGET(popup_progressbar.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/popup_progressbar.edc
+${CMAKE_BINARY_DIR}/res/edc/popup_progressbar.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/popup_progressbar.edc)
+
+ADD_CUSTOM_TARGET(multi_win.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/multi_win.edc
+${CMAKE_BINARY_DIR}/res/edc/multi_win.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/multi_win.edc)
ADD_DEPENDENCIES(${PROJECT_NAME} main.edj)
ADD_DEPENDENCIES(${PROJECT_NAME} vp_font.edj)
ADD_DEPENDENCIES(${PROJECT_NAME} panel.edj)
ADD_DEPENDENCIES(${PROJECT_NAME} progress.edj)
ADD_DEPENDENCIES(${PROJECT_NAME} control.edj)
-ADD_DEPENDENCIES(${PROJECT_NAME} add_tag.edj)
ADD_DEPENDENCIES(${PROJECT_NAME} animation.edj)
ADD_DEPENDENCIES(${PROJECT_NAME} detail.edj)
-ADD_DEPENDENCIES(${PROJECT_NAME} subtitle.edj)
ADD_DEPENDENCIES(${PROJECT_NAME} vp-custom-winset-style.edj)
ADD_DEPENDENCIES(${PROJECT_NAME} hidden_button_panel.edj)
-ADD_DEPENDENCIES(${PROJECT_NAME} option_button.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} popup_progressbar.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} multi_win.edj)
######################################
INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/panel.edj DESTINATION ${EDJDIR})
INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/progress.edj DESTINATION ${EDJDIR})
INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/control.edj DESTINATION ${EDJDIR})
-INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/add_tag.edj DESTINATION ${EDJDIR})
INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/animation.edj DESTINATION ${EDJDIR})
INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/detail.edj DESTINATION ${EDJDIR})
-INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/subtitle.edj DESTINATION ${EDJDIR})
INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/vp-custom-winset-style.edj DESTINATION ${EDJDIR})
INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/hidden_button_panel.edj DESTINATION ${EDJDIR})
-INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/option_button.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/popup_progressbar.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/multi_win.edj DESTINATION ${EDJDIR})
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.video-player.desktop DESTINATION /opt/share/applications)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.video-player.xml DESTINATION /opt/share/packages)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/org.tizen.video-player.png DESTINATION /opt/apps/org.tizen.video-player/res/icons/default/small)
-INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images/ DESTINATION ${RESDIR}/images)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/org.tizen.video-player.png DESTINATION /opt/share/icons/default/small/)
+#INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images/ DESTINATION ${RESDIR}/images)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images/icon/ DESTINATION ${RESDIR}/images/icon)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images/toolbar/ DESTINATION ${RESDIR}/images/toolbar)
ADD_SUBDIRECTORY(res/po)
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.
-
-
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
--- /dev/null
+/*\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
+ * \r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _MP_DRM_CTRL_H_\r
+#define _MP_DRM_CTRL_H_\r
+\r
+#define DRM_STR_LEN_MAX 2048\r
+\r
+typedef enum\r
+{\r
+ MP_VIDEO_DRM_ERROR_NONE = 0,\r
+ MP_VIDEO_DRM_ERROR_INTERNAL,\r
+ MP_VIDEO_DRM_ERROR_TIME_BASED,\r
+ MP_VIDEO_DRM_ERROR_INTERVAL,\r
+ MP_VIDEO_DRM_ERROR_INTERVAL_FIRST_USE,\r
+ MP_VIDEO_DRM_ERROR_ACCUMULATED,\r
+ MP_VIDEO_DRM_ERROR_COUNT,\r
+ MP_VIDEO_DRM_ERROR_COUNT_SMALL,\r
+ MP_VIDEO_DRM_ERROR_TIME_COUNT_BASED,\r
+ MP_VIDEO_DRM_ERROR_TIME_INDIVIDULAL,\r
+ MP_VIDEO_DRM_ERROR_TIME_SYSTEM,\r
+ MP_VIDEO_DRM_ERROR_MAX,\r
+}MpVideoDrmErrorType;\r
+\r
+\r
+\r
+typedef struct\r
+{\r
+ int nErrorCode;\r
+ int nData;\r
+}MpVideoDrmInfo;\r
+\r
+\r
+typedef enum\r
+{\r
+ VIDEO_DRM_CONSUMPTION_STATE_DISABLE = 0,\r
+ VIDEO_DRM_CONSUMPTION_STATE_ENABLE,\r
+}MpVideoDrmConsumptionStateType;\r
+\r
+\r
+void MpVideoDrmInit(void);\r
+bool MpVideoDrmGetForwardLookState(void);\r
+void MpVideoDrmSetConsumptionState(int nState);\r
+int MpVideoDrmGetConsumption(void);\r
+void MpVideoDrmStartConsumption(char *szPath);\r
+void MpVideoDrmPauseConsumption(void);\r
+void MpVideoDrmResumeConsumption(void);\r
+void MpVideoDrmStopConsumption(void);\r
+bool MpVideoDrmIsDrmFile(char* szPath); //bool MpVideoDrmFileRight(char* szPath);\r
+bool MpVideoDrmHasValidRo(char* szPath);\r
+bool MpVideoDrmCheckForward(char* szPath);\r
+MpVideoDrmInfo *MpVideoDrmCheckLeftRo(char* szVideoTitle, char* szPath);\r
+bool MpVideoDrmCheckExpiration(char* szPath);\r
+\r
+/* DivX DRM functions */\r
+void MpVideoDrmGetFileExtension(char *szPath, char *szContentType, int nContentTypeStrSize);\r
+\r
+#endif //_MP_DRM_CTRL_H_\r
--- /dev/null
+/*\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
+ * \r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+\r
+#ifndef _MP_EXTERNAL_UG_\r
+#define _MP_EXTERNAL_UG_\r
+\r
+\r
+#include <ui-gadget.h>\r
+\r
+\r
+typedef enum\r
+{\r
+ MP_EXTERNAL_UG_NONE = -1,\r
+ MP_EXTERNAL_UG_MESSAGE = 0,\r
+ MP_EXTERNAL_UG_EMAIL,\r
+ MP_EXTERNAL_UG_MYFILE_DETAIL,\r
+ MP_EXTERNAL_UG_YOUTUBE,\r
+ MP_EXTERNAL_UG_BLUETOOTH,\r
+ MP_EXTERNAL_UG_FTM,\r
+ MP_EXTERNAL_UG_FACEBOOK,\r
+ MP_EXTERNAL_UG_MAX,\r
+}MpExternalUGType;\r
+\r
+\r
+bool MpExternalUgLoad(MpExternalUGType nExternalUGType, void* pUserData);\r
+void MpExternalUgUnload(void);\r
+void MpExternalUgDestroyAll(void);\r
+int MpExternalUgGetCurUgState(void);\r
+void MpExternalUgSetUgState(MpExternalUGType nExternalUGType);\r
+bool MpExternalUgShow(void *pUserData, void *pParent);\r
+void MpExternalUgHide();\r
+\r
+#endif // _MP_EXTERNAL_UG_\r
/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
* \r
- * http://www.tizenopensource.org/license\r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
* \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
*/\r
\r
\r
+\r
#ifndef _MP_UTIL_DATABASE_\r
#define _MP_UTIL_DATABASE_\r
\r
-\r
#include "video-player.h"\r
#include <glib.h>\r
\r
-void MpUtilMediaSvcInitSession(void);\r
-void MpUtilMediaSvcFinishSession(void);\r
+typedef enum\r
+{\r
+ MP_MEDIA_VIDEO_FILE_TYPE = 0,\r
+ MP_MEDIA_CAMERA_FILE_TYPE,\r
+ MP_MEDIA_ALL_FILE_TYPE,\r
+ MP_MEDIA_FILE_TYPE_MAX,\r
+}MpMediaSvcVideoFileType;\r
+\r
+typedef enum\r
+{\r
+ MP_MEDIA_SORT_BY_NONE = 0,\r
+ MP_MEDIA_SORT_BY_NAME_ASC,\r
+ MP_MEDIA_SORT_BY_NAME_DESC,\r
+ MP_MEDIA_SORT_BY_DATE_MOST_RECENT,\r
+ MP_MEDIA_SORT_BY_OLDEST,\r
+ MP_MEDIA_SORT_BY_MAX,\r
+}MpMediaSvcSortType;\r
+\r
+typedef enum\r
+{\r
+ MP_MEDIA_LIST_TYPE_FOLDER = 0,\r
+ MP_MEDIA_LIST_TYPE_ALL_FOLDER_GALLERY,\r
+ MP_MEDIA_LIST_TYPE_TAG_GALLERY,\r
+ MP_MEDIA_LIST_TYPE_FAVORITE,\r
+ MP_MEDIA_LIST_TYPE_ALLSHARE,\r
+ MP_MEDIA_LIST_TYPE_MAX,\r
+}MpMediaSvcListType;\r
+\r
+\r
+void MpUtilMediaSvcInitSession(void);\r
+void MpUtilMediaSvcFinishSession(void);\r
+\r
+////////////////////////////////////////////////////////\r
+// Manage video item list\r
+\r
+// For gallery list\r
+bool MpUtilMediaSvcExtractVideoListFromFolder(char* szFolderPath, int nSortType); // For myfiles.\r
+bool MpUtilMediaSvcExtractVideoListFromAllFolderOfGallery(int nSortType); // For 'All' folder of gallery.\r
+bool MpUtilMediaSvcExtractVideoListVideoType(int nSortType); // For only video type files of video list view.\r
+bool MpUtilMediaSvcExtractVideoListRecordedType(int nSortType); // For only recorded type files of video list view.\r
+bool MpUtilMediaSvcExtractVideoListByTagName(char *szTagName); // For tag folder of gallery.\r
+bool MpUtilMediaSvcExtractVideoListFromFavorite(int nSortType); // For favorite naming of gallery.\r
+bool MpUtilMediaSvcExtractVideoListForSearchView(const char *keyword); // For only video type files of video search view*/\r
+\r
+\r
+void MpUtilMediaSvcDestoryVideoList(void);\r
+bool MpUtilMediaSvcRemoveItemByUrlWithList(char *szFilePath);\r
+bool MpUtilMediaSvcRemoveItemByListIndex(int nVideoItemIndex);\r
+bool MpUtilMediaSvcRemoveItemByListIndexWithoutListItem(int nVideoItemIndex);\r
+\r
\r
-void MpUtilMediaSvcDestoryVideoList(void);\r
-bool MpUtilMediaSvcDestroyItem(char* szFilePath);\r
+bool MpUtilMediaSvcGetVideoIDByVideoUri(const char *szPath, char *szVideoID);\r
+char* MpUtilMediaSvcGetVideoThumbnailByVideoUri(const char *szMediaUri);\r
+unsigned int MpUtilMediaSvcGetVideoLastPlayTimeByVideoUri(const char *szPath);\r
+unsigned int MpUtilMediaSvcGetVideoDurationByVideoUri(const char *szPath);\r
+int MpUtilMediaSvcGetVideoFilesizeByVideoUri(const char *szPath);\r
+void MpUtilMediaSvcSetVideoLastPlayedTimeByUri(char* szMediaUri, unsigned int nLastPlayedTime);\r
\r
-bool MpUtilMediaSvcGetVideoFileListFromFolder(char* szFilePath, int nSortType);\r
-bool MpUtilMediaSvcGetVideoFileListFromAllFolderOfGallery(int nSortType);\r
-bool MpUtilMediaSvcGetVideoFileListByTagName(char* szTagName);\r
-bool MpUtilMediaSvcGetVideoFileListFromFavorite(int nSortType);\r
+bool MpUtilMediaSvcGetVideoCurrentUrlPreNextItem(char* szCurrMediaUri, char* szPreMediaUri, char* szNextMediaUri,bool bLoop);\r
\r
-void MpUtilMediaSvcMtagIterateDestroyTagList(void);\r
-int MpUtilMediaSvcMtagGetAllTagList(char* pTagList[]);\r
+// For video list\r
+char* MpUtilMediaSvcGetVideoUrl(const int nVideoItemIndex);\r
+char* MpUtilMediaSvcGetVideoThumbnail(const int nVideoItemIndex);\r
+char* MpUtilMediaSvcGetVideoTitle(const int nVideoItemIndex);\r
+int MpUtilMediaSvcGetVideoDurationTime(const int nVideoItemIndex);\r
+int MpUtilMediaSvcGetVideoLastPlayedPos(const int nVideoItemIndex);\r
+int MpUtilMediaSvcGetVideoItemSize(const int nVideoItemIndex);\r
+int MpUtilMediaSvcGetVideoItemWidth(const int nVideoItemIndex);\r
+int MpUtilMediaSvcGetVideoItemHeight(const int nVideoItemIndex);\r
+time_t MpUtilMediaSvcGetVideoItemDateTime(const int nVideoItemIndex);\r
+char *MpUtilMediaSvcGetVideoItemExtension(const int nVideoItemIndex);\r
+double MpUtilMediaSvcGetVideoItemLongitude(const int nVideoItemIndex);\r
+double MpUtilMediaSvcGetVideoItemLatitude(const int nVideoItemIndex);\r
\r
-bool MpUtilMediaSvcMtagAddItemToTag(const char* szTagName, char* szMediaUri);\r
-bool MpUtilMediaSvcMtagGetItemToFavorite(char* szMediaUri);\r
-bool MpUtilMediaSvcMtagAddItemToFavorite(char* szMediaUri,bool bFavorite);\r
-char* MpUtilMediaSvcMitemGetThumbnailUrl(char* szMediaUri);\r
-bool MpUtilMediaSvcGetPreNextVideoUrl(char* szCurrMediaUri, char* szPreMediaUri, char* szNextMediaUri);\r
+int MpUtilMediaSvcGetVideoListSize(void);\r
+void MpUtilMediaSvcPrintListInfo(void);\r
+int MpUtilMediaSvcFindVideoItemIndexByUrl(const char *szPath);\r
\r
-void MpUtilMediaSvcGetVideoID(const char *szPath, char *szVideoID);\r
-void MpUtilMediaSvcSaveLastPlayedTime(char* szMediaUri, unsigned int nLastPlayedTime);\r
+// For folder list\r
+bool MpUtilMediaSvcExtractVideoFolderList(int nSortType);\r
+bool MpUtilMediaSvcDestoryVideoFolderList(void);\r
+int MpUtilMediaSvcGetVideoFolderListSize(void);\r
+char* MpUtilMediaSvcGetVideoFolderName(int nVideoFolderIndex);\r
+char* MpUtilMediaSvcGetVideoFolderUrl(int nVideoFolderIndex);\r
\r
+////////////////////////////////////////////////////////\r
+// Manage bookmark\r
\r
+bool MpUtilMediaSvcBookmarkListGet(char *vid, GList **list);\r
+void MpUtilMediaSvcBookmarkListClear(GList *list);\r
+int MpUtilMediaSvcBookmarkInsert(char *vid, int position, char *path);\r
+int MpUtilMediaSvcBookmarkDelete(char *vid, int position);\r
+int MpUtilMediaSvcBookmarkDeleteAll(char *vid);\r
+char* MpUtilMediaSvcBookmarkGetThumbnail(void* pBookmarkItemHandle);\r
+int MpUtilMediaSvcBookmarkGetPos(void* pBookmarkItemHandle);\r
\r
-#endif // _MP_UTIL_DATABASE_\r
+#endif // _MP_UTIL_DATABASE_
\ No newline at end of file
/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
* \r
- * http://www.tizenopensource.org/license\r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
* \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
*/\r
\r
\r
\r
-\r
#ifndef _MP_UTIL_\r
#define _MP_UTIL_\r
\r
\r
\r
void MpUtilResetForRelaunching(void);\r
+void MpUtilSetAlphaOfMainWindow(bool bSetAlpha);\r
void* MpUtilCreateMainWindow(const char *pStrName);\r
-void* MpUtilCreateWindow(const char *pStrName);\r
-int MpUtilSetKeyGrab(const char* szKeyName, int nGrabMode);\r
-int MpUtilSetKeyUngrab(const char* szKeyName);\r
-bool MpUtilCheckRTSPType(char *szUriPath);\r
-int MpUtilCheckPlayerType(char *szUriPath);\r
-\r
-bool MpUtilGetURIFromBundle(bundle* pBundleData, VideoAppData* pAppData);\r
-bool MpUtilGetCookieFromBundle(bundle* pBundleData, VideoAppData* pAppData);\r
-bool MpUtilGetURIFromAUL(bundle * pBundleData, VideoAppData *pAppData);\r
-\r
-bool MpUtilCheckLocalFileExist(char *uri);\r
-bool MpUtilCheckVideoURI(VideoAppData* pAppData);\r
- bool MpUtilCheckBatteryStatus(void);\r
-\r
-int MpUtilBatteryStatusNoti(VideoAppData* pAppData);\r
-int MpUtilBatteryStatusNotiIgnore(void);\r
-int MpUtilMMCstatusNoti(VideoAppData* pAppData);\r
-int MpUtilMMCstatusNotiIgnore(void);\r
-\r
-void MpUtilLanguageInit(VideoAppData* pAppData);\r
-int MpUtilCheckStartPositionTime(void* pBundle, char* szBundleKey);\r
-bool MpUtilCheckLaunchingByMime(void* pBundle, char* szMediaUri);\r
-int MpUtilCheckLaunchingByOtherApp(void* pBundle, char* szBundleKey);\r
-int MpUtilCheckSortType(void* pBundle, char* szBundleKey);\r
-int MpUtilCheckListType(void* pBundle, char* szBundleKey);\r
-bool MpUtilGetTagNameOfGallery(void* pBundle, char* szBundleKey, char* szTagName);\r
-int MpUtilCheckDlnaSortType(void* pBundle, char* szBundleKey);\r
-int MpUtilCheckDlnaMediaID(void* pBundle, char* szBundleKey);\r
-\r
-void MpUtilInitXML();\r
-void MpUtilDestroyXML();\r
-char* MpUtilGetXMLQualityURL(void);\r
-bool MpUtilIsXMLUrl(char* szMediaUri);\r
-bool MpUtilParsingXML(char* szMediaUri, VideoAppData* pAppData);\r
-int MpUtilGetXMLItemCount(void);\r
-\r
-bool MpUtilGetTitleFromFilepath(char* szFilepath, char* szTitle);\r
-void MpUtilInitSession(void);\r
-void MpUtilFinishSession(void);\r
-void MpUtilVolumeTypeSet(void);\r
-void MpUtilVolumeTypeUnset(void);\r
-void MpUtilDeletePopupHandle(void);\r
-bool MpUtilNotifyPopUp(VideoAppData* pAppData, char* szContents, void* PopupButtonCallbackFunc);\r
-bool MpUtilWarinigPopUp(VideoAppData *pAppData, char *szContents,void *PopupButtonCallbackFunc);\r
-bool MpUtilYesNoPopUp(VideoAppData *pAppData, char *szTitle, char *szContents, void *PopupYesButtonCallbackFunc, void *PopupNoButtonCallbackFunc);\r
-bool MpUtilDetailPopup(VideoAppData *pAppData, char *szTitle, void *PopupButtonCallbackFunc);\r
-bool MpUtilProgressPopUp(VideoAppData* pAppData, char* szLabel);\r
-void* MpUtilCreateButtonIcon(void *pParent, const char *szIconPath, bool bX, bool bY, void *pUserData, char* szButtonStyle, void *func);\r
-int MpUtilSendFileViaBluetooth(char *szFilepath);\r
-void* MpUtilLoadEdjFile(Evas* pEvas, char* szEdjName, char* szGroupName);\r
-bool MpUtilCheckCallStatus(void);\r
-bool MpUtilIsConnectEarjack(void);\r
-bool MpUtilRegisteEarjackCbFunc(void* pEarjackCb, void* pUserData);\r
-int* MpUtilGetMainWindowXID(void);\r
-void MpUtilGetUserAgent(VideoAppData* pAppData);\r
-double MpUtilGetSysTime(void);\r
-void MpUtilLcdNormalPowerLockForResume(void);\r
-void MpUtilLcdNormalPowerUnlockForPause(void);\r
-void MpUtilLcdOffForPowerButton(void);\r
-void MpUtilMultimediaKeyGrab(void);\r
-void MpUtilMultimediaKeyUngrab(void);\r
\r
+int MpUtilSetKeyGrab(const char* szKeyName, int nGrabMode);\r
+int MpUtilSetKeyUngrab(const char* szKeyName);\r
+bool MpUtilCheckRTSPType(char *szUriPath);\r
+int MpUtilCheckPlayerType(char *szUriPath);\r
+bool MpUtilCheckLocalFileExist(char *uri);\r
+bool MpUtilCheckBatteryStatus(void);\r
+int MpUtilBatteryStatusNoti(VideoAppData* pAppData);\r
+int MpUtilBatteryStatusNotiIgnore(void);\r
+int MpUtilMMCstatusNoti(VideoAppData* pAppData);\r
+int MpUtilMMCstatusNotiIgnore(void);\r
+void MpUtilLanguageInit(VideoAppData* pAppData);\r
+int MpUtilCheckDlnaSortType(void* pSvcHandle, char* szBundleKey);\r
+int MpUtilCheckDlnaMediaID(void* pSvcHandle, char* szBundleKey);\r
+void MpUtilInitXML();\r
+void MpUtilDestroyXML();\r
+char* MpUtilGetXMLQualityURL(void);\r
+bool MpUtilIsXMLUrl(char* szMediaUri);\r
+bool MpUtilParsingXML(char* szMediaUri);\r
+int MpUtilGetXMLItemCount(void);\r
+int MpUtilGetRotationStateFromAppcore(void);\r
+int MpUtilGetRotationState(void);\r
+void MpUtilSetRotationState(int nCurRotation);\r
+bool MpUtilGetTitleFromFilepath(char* szFilepath, char* szTitle, int nLengthTitle);\r
+void MpUtilInitSession(void);\r
+void MpUtilFinishSession(void);\r
+void MpUtilVolumeTypeSet(void);\r
+void MpUtilVolumeTypeUnset(void);\r
+void MpUtilDeletePopupHandle(void);\r
+bool MpUtilNotifyPopUp(VideoAppData* pAppData, char* szContents, void* PopupButtonCallbackFunc);\r
+bool MpUtilWarinigPopUp(VideoAppData *pAppData, char *szContents,void *PopupButtonCallbackFunc);\r
+bool MpUtilYesNoPopUp(VideoAppData *pAppData, char *szTitle, char *szContents, void *PopupYesButtonCallbackFunc, void *PopupNoButtonCallbackFunc);\r
+bool MpUtilRemoveQuestionPopUp(VideoAppData *pAppData, void *PopupDeleteButtonCallbackFunc, void *PopupCancelButtonCallbackFunc, void *pUserData);\r
+bool MpUtilDetailPopup(VideoAppData *pAppData, int nVideoItemIndex, char *szTitle, void *PopupButtonCallbackFunc);\r
+bool MpUtilProgressPopUp(VideoAppData* pAppData, char* szLabel);\r
+void *MpUtilCreateButtonIcon(void *pParent, const char *szIconPath, bool bSizeUp, bool bSizeDown, int nAspectWidth, int nAspectHeight, void *pUserData, char* szButtonStyle, void *func);\r
+void* MpUtilCreateStyleButton(void *pParent, const char* szButtonText, const void *pUserData, char* szButtonStyle, void *func);\r
+void* MpUtilLoadEdjFile(Evas* pEvas, char* szEdjName, char* szGroupName);\r
+bool MpUtilCheckCallStatus(void);\r
+bool MpUtilIsConnectEarjack(void);\r
+unsigned int MpUtilGetMainWindowXID(void);\r
+bool MpUtilRegisteEarjackCbFunc(void* pEarjackCb, void* pUserData);\r
+void MpUtilRotateWindow(int nRotateMode, void* pWindowHandle);\r
+void MpUtilGetUserAgent(VideoAppData* pAppData);\r
+double MpUtilGetSysTime(void);\r
+void MpUtilLcdNormalPowerLockForResume(void);\r
+void MpUtilLcdNormalPowerUnlockForPause(void);\r
+void MpUtilLcdOffForPowerButton(void);\r
+bool MpUtilTurnOverSensorInit(void *pUserData);\r
+bool MpUtilTurnOverSensorDestroy(void);\r
+void MpUtilMultimediaKeyGrab(void);\r
+void MpUtilMultimediaKeyUngrab(void);\r
#endif // _MP_UTIL_\r
/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
* \r
- * http://www.tizenopensource.org/license\r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
* \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
*/\r
\r
\r
-\r
#ifndef _VIDEO_LOADING_ANIMATION_CTRL_\r
#define _VIDEO_LOADING_ANIMATION_CTRL_\r
\r
/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
* \r
- * http://www.tizenopensource.org/license\r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
* \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
*/\r
\r
\r
-\r
#ifndef _VIDEO_APP_CTRL_\r
#define _VIDEO_APP_CTRL_\r
\r
#include "video-player.h"\r
\r
\r
-bool MpVideoAppCtrlInit(VideoAppData* pAppData);\r
-bool MpVideoAppCtrlResetForRelaunching(VideoAppData* pAppData);\r
-bool MpVideoAppCtrlIsTopView(void* pUserData);\r
-bool MpVideoAppCtrlIsExistPlayerHandle(void);\r
-\r
+bool MpVideoAppCtrlInit(VideoAppData* pAppData);\r
+bool MpVideoAppCtrlResetForRelaunching(VideoAppData* pAppData);\r
+bool MpVideoAppCtrlIsTopView(void* pUserData);\r
+bool MpVideoAppCtrlIsExistPlayerHandle(void);\r
+void MpVideoAppCtrlSetForCheckingForegroundwindow(bool bForwgroundState);\r
+void MpVideoAppCtrlSetRotation(int nRotateMode, void *pUserData);\r
\r
#endif /* _VIDEO_APP_CTRL_ */\r
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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_VIDEO_CTRL_MGR_H_
#define _MP_VIDEO_CTRL_MGR_H_
-bool MpVideoCtrlMgrMediaCreate(char *szMediaURI, void *pMmfPlayerCallback, void *pOverlayXid, char* szSubtitleUri, void *pUserData);
+bool MpVideoCtrlMgrMediaCreate(char *szMediaURI, void *pOverlayXid, void *pUserData);
void MpVideoCtrlMgrMediaDestroy(void* pUserData);
bool MpVideoCtrlMgrMediaPlay(void* pUserData);
void MpVideoCtrlMgrMediaStop(void* pUserData);
void MpVideoCtrlMgrMediaPause(void* pUserData);
void MpVideoCtrlMgrMediaResume(void* pUserData);
+void MpVideoCtrlMgrSetPlayerCallback(void *PlayerCompletedCb, void *PlayerInterruptedCb, void *PlayerErrorCb, void *PlayerBufferingCb, void *pUserData);
void MpVideoCtrlMgrSetOverlayXid(void* pXid);
-void MpVideoCtrlMgrSetPosition(int nSetPosition);
+void MpVideoCtrlMgrSetPosition(int nSetPosition, void *pSeekCb, void *pUserData);
+
int MpVideoCtrlMgrGetPosition(void);
int MpVideoCtrlMgrGetDuration(void);
-void MpVideoCtrlMgrSetROI(void* pUserData, int nOverlayX, int nOverlayY, int nOverlayWidth, int nOverlayHeight);
+void MpVideoCtrlMgrResetPlaySpeed(void* pUserData);
+void MpVideoCtrlMgrSetPlaySpeedUp(void* pUserData);
+void MpVideoCtrlMgrSetPlaySpeedDown(void* pUserData);
int MpVideoCtrlMgrGetVideoWidthResolution(void);
int MpVideoCtrlMgrGetVideoHeightResolution(void);
void MpVideoCtrlMgrSetRatioVideoScreen(void* pUserData, int nRatioScreenSize);
-void MpVideoCtrlMgrSetVerticalOverlayPos(int nOverlayY);
+void MpVideoCtrlMgrRotateVideoScreen(int nVideoRotateValue);
void MpVideoCtrlMgrSetMute(bool bMuteEnable);
bool MpVideoCtrlMgrGetMuteState(void);
int MpVideoCtrlMgrGetBufferingPosition(void);
bool MpVideoCtrlMgrIsExistPlayerHandle(void);
+bool MpVideoCtrlMgrIsOnlyAudio(void);
+bool MpVideoCtrlMgrSetScaling(bool bScale);
+int MpVideoCtrlMgrGetErrorType(int nErrorVal);
+void MpVideoCtrlMgrSetMute(bool bState);
+bool MpVideoCtrlMgrMediaRealize(void);
+bool MpVideoCtrlMgrMediaRealizeAsync(void *pReailzeCb, void *pUserData);
+
#endif
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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 _VIDEO_DISPLAY_VIEW_
#define _VIDEO_DISPLAY_VIEW_
MP_DISPLAY_VIEW_STATE_MAX,
}VideoDisplayViewState;
+typedef void (*ChangeDisplayViewCbFunc)(int nChangePlayerView, void* pUserData);
-void MpVideoDisplayViewPush(void* pNaviFrame, void* pShowInfoViewCb, int nLaunchingAppType, void* pUserData);
-void MpVideoDisplayViewPop(void* pNaviFrame, void* pUserData);
-void MpVideoDisplayViewDestroy(void* pUserData);
+void MpVideoDisplayViewPush(void *pNaviFrame, int nPlayerType, void *pUserData, ChangeDisplayViewCbFunc pChangeViewCb);
+void MpVideoDisplayViewPop(void *pNaviFrame, void* pUserData);
+void MpVideoDisplayViewDestroy(void *pUserData);
-void MpVideoDisplayViewInitAfterBeginOfStream(void* pUserData);
+void MpVideoDisplayViewInitAfterBeginOfStream(void *pUserData);
void MpVideoDisplayViewUpdatePauseKey(void);
void MpVideoDisplayViewUpdateResumeKey(void);
-void MpVideoDisplayViewShowControlPanel(void* pUserData);
-void MpVideoDisplayViewHideControlPanel(void* pUserData);
+void MpVideoDisplayViewShowControlPanel(void *pUserData);
+void MpVideoDisplayViewHideControlPanel(void *pUserData);
void MpVideoDisplayViewActivate(void);
void MpVideoDisplayViewUnactivate(void);
void MpVideoDisplayViewHideSoundpath(void);
void MpVideoDisplayViewChangeNaviFrameTitle(void *pUserData);
-void MpVideoDisplayViewUpdateSubtitle(double nDuration, char* szSubtitleString);
bool MpVideoDisplayViewIsTopView(void);
-void MpVideoDisplayViewShowNocontentImage(void);
+void MpVideoDisplayViewShowNocontentImage(void *pUserData);
void MpVideoDisplayViewHideNocontentImage(void);
+void MpVideoDisplayViewPortrate(void);
+void MpVideoDisplayViewLandscape(void);
void MpVideoDisplayViewResetProgressBar(void *pUserData);
+void MpVideoDisplayViewLockScreen(void *pUserData);
+void MpVideoDisplayViewUnlockScreen(void *pUserData);
+bool MpVideoDisplayViewGetScreenLockState(void);
+int MpVideoDisplayViewGetScreenSize(void);
+bool MpVideoDisplayViewIsPauseByUser(void);
+void MpVideoDisplayViewUpdateProgressBar(void *pUserData);
#endif
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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 _VIDEO_INFO_CTRL_
#define _VIDEO_INFO_CTRL_
--- /dev/null
+/*\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
+ * \r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VIDEO_INFO_VIEW_\r
+#define _VIDEO_INFO_VIEW_\r
+\r
+\r
+void MpVideoInfoViewPush(void* pNaviFrame, void* pUserData);\r
+void MpVideoInfoViewPop(void* pNaviFrame, void* pUserData);\r
+void MpVideoInfoViewDestroy(void);\r
+\r
+\r
+#endif\r
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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 _VIDEO_LOG_H_
#define _VIDEO_LOG_H_
#define LOG_TAG "video-player"
+
#define VideoLogInfoWithTid(fmt,arg...) LOGI( "[VP][TID:%d][%s][%d]" fmt "\n", syscall(__NR_gettid), __FUNCTION__, __LINE__, ##arg)
#define VideoLogInfo(fmt,arg...) LOGI( "[VP][%s][%d]" fmt "\n", __FUNCTION__,__LINE__, ##arg)
#define VideoLogDebug(fmt,arg...) LOGD( "[%s %s : %d] " fmt "\n",__FILE__, __FUNCTION__,__LINE__, ##arg)
#define VideoLogWarning(fmt,arg...) LOGD( "[%s %s : %d] " fmt "\n",__FILE__, __FUNCTION__,__LINE__, ##arg)
#define VideoLogError( fmt,arg...) LOGD( "[%s %s : %d] " fmt "\n", __FILE__,__FUNCTION__,__LINE__, ##arg)
- #endif /*_MPVIDEO_LOG_H_*/
+#endif /*_MPVIDEO_LOG_H_*/
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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_VIDEO_PLAYER_MGR_H_
#define _MP_VIDEO_PLAYER_MGR_H_
-#include <mm_player.h>
-#include <mm_message.h>
+
+#include <player.h>
+#include <sound_manager.h>
+#include <image_util.h>
+#include <mm_util_imgp.h>
typedef enum
}MpPlayerMgrDisplayMethod;
-bool MpPlayerMgrIsActive(void);
+typedef enum
+{
+ VIDEO_SCREEN_UNKNOWN = 0,
+ VIDEO_SCREEN_PORTRAIT,
+ VIDEO_SCREEN_LANDSCAPE,
+ VIDEO_SCREEN_PORTRAIT_UPSIDEDOWN,
+ VIDEO_SCREEN_LANDSCAPE_UPSIDEDOWN,
+}MpVideoRotation;
+
-bool MpPlayerMgrGetAttrs(MMHandleType* Attrs, MMPlayerAttrsType Type);
-void MpPlayerMgrSetAttrs(MMHandleType Attrs, MMPlayerAttrsType Type);
+typedef enum
+{
+ SOUND_EFFECT_NORMAL = 0,
+ SOUND_EFFECT_VOICE,
+ SOUND_EFFECT_MOVIE,
+ SOUND_EFFECT_51CH,
+ SOUND_EFFECT_MAX,
+}MpSoundEffectType;
+
+
+typedef enum
+{
+ FILE_STREAM_TYPE_NOTHING = 0,
+ FILE_STREAM_TYPE_VIDEO_AUDIO,
+ FILE_STREAM_TYPE_AUDIO,
+ FILE_STREAM_TYPE_VIDEO,
+ FILE_STREAM_TYPE_MAX,
+}MpFileStreamType;
-void MpPlayerMgrSetMessageCallback(MMMessageCallback Callback, void* pUserData);
-bool MpPlayerMgrSetAudioCallback(mm_player_audio_stream_callback CallBack, void* pUserData);
+bool MpPlayerMgrIsActive(void);
+bool MpPlayerMgrRegistePlayerCallback(void *PlayerCompletedCbFunc, void *PlayerInterruptedCbFunc, void *PlayerErrorCbFunc, void *PlayerBufferingCbFunc, void *pUserData);
bool MpPlayerMgrCreate (const char* szPath);
bool MpPlayerMgrDestroy (void);
-
bool MpPlayerMgrRealize (void);
+bool MpPlayerMgrRealizeAsync(void *pPrepareCb, void *pUserData);
bool MpPlayerMgrUnrealize(void);
-
bool MpPlayerMgrPlay (void);
bool MpPlayerMgrStop (void);
bool MpPlayerMgrResume (void);
bool MpPlayerMgrPause (void);
-
int MpPlayerMgrGetPosition(void);
-void MpPlayerMgrSetPosition(unsigned int nPos);
-
-bool MpPlayerMgrGetVisible(void);
-void MpPlayerMgrSetVisible(bool bEnabled);
-
+void MpPlayerMgrSetPosition(unsigned int nPos, void *pSeekCb, void *pUserData);
void MpPlayerMgrSetMute(bool bMuteEnable);
bool MpPlayerMgrGetMute(void);
-bool MpPlayerMgrSetBtHeadset(bool bEnable, char* szAddress);
-
-int MpPlayerMgrGetStreamingType(void);
-void MpPlayerMgrSetProgressiveDownload(int nFileSize);
-void MpPlayerMgrSetDownloadComplete(void);
-void MpPlayerMgrSetProgressTimerInterval(int nInterval);
-int MpPlayerMgrGetPdduration(void);
-int MpPlayerMgrGetDuration(char* szFilePath);
-bool MpPlayerMgrSetRatioVideoScreenSize(MpPlayerMgrDisplayMethod ScreenSize);
+int MpPlayerMgrGetDuration(void);
bool MpPlayerMgrSetOverlayXid(void* pOverlayXid);
bool MpPlayerMgrSetSoundPriority(void);
+int MpPlayerMgrSetPlaySpeed(float nSpeedValue);
int MpPlayerMgrGetVideoWidthResolution(void);
int MpPlayerMgrGetVideoHeightResolution(void);
-bool MpPlayerMgrSetSubtitleSilent(bool bSilent);
-bool MpPlayerMgrSetSubtitle(const char* szSubtitlePath);
-int MpPlayerMgrSetBluetoothHeadset(char* szBlutoothAddress, int nMode);
-
int MpPlayerMgrSetDisplayArea(int nX, int nY, int nWidth, int nHeight);
-int MpPlayerMgrSetVerticalOverlayPos(int nY);
-
+bool MpPlayerMgrSetRotate(MpVideoRotation nRotation);
+bool MpPlayerMgrSetDisplayMode(MpPlayerMgrDisplayMethod nMethodMode);
bool MpPlayerMgrSetUseragentForStreaming(const char* szUserAgent);
-bool MpPlayerMgrSetProxAddressForStreaming(const char* szProxyAddress);
+bool MpPlayerMgrSetProxyAddressForStreaming(const char* szProxyAddress);
bool MpPlayerMgrSetCookieForStreaming(const char* szCookie);
-
-
int MpPlayerMgrGetBufferingPosition(void);
-
+bool MpPlayerMgrRegisteBufferingCallBack(void *pCallbackFunc, void *pUserData);
+int MpPlayerMgrGetFileStreamType(void);
+bool MpPlayerMgrSetScaling(bool bScale);
#endif
/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
* \r
- * http://www.tizenopensource.org/license\r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
* \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
*/\r
\r
\r
void MpVideoProgressbarCreateTimer(void* pUserData);\r
void MpVideoProgressbarDeleteTimer(void);\r
void MpVideoProgressbarUpdateDurationTime(char* szDurationTime);\r
-void MpVideoProgressbarBeginOfStream(void* pUserData);\r
-void MpVideoProgressbarReset(void *pUserData);\r
+void MpVideoProgressbarBeginOfStream(void *pUserData);\r
+void MpVideoProgressbarReset(void* pUserData);\r
void MpVideoProgressbarSetSkipEvent(bool bSkip);\r
\r
#endif /* _VIDEO_PROGRESS_BAR_CTRL_ */\r
--- /dev/null
+/*
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+ *
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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 _VIDEO_SERVICE_CTRL_
+#define _VIDEO_SERVICE_CTRL_
+
+
+typedef enum
+{
+ MP_ERROR_PLAYER_TYPE = 0,
+ MP_VIDEO_PLAYER,
+ MP_VIDEO_PLAYER_SIMPLE,
+ MP_VIDEO_PLAYER_EMAIL,
+ MP_VIDEO_PLAYER_MMS,
+ MP_VIDEO_PLAYER_GALLERY,
+ MP_STREAMING_PLAYER,
+ MP_MAX_PLAYER_TYPE,
+}MpPlayerViewType;
+
+
+void MpVideoServiceCtrlReset(void);
+int MpVideoServiceCtrlInitServiceParser(void* pAppServiceHandle, char* szMediaUri);
+int MpVideoServiceCtrlGetPlayerTypeWithoutLog(void);
+int MpVideoServiceCtrlGetPlayerType(void);
+void MpVideoServiceCtrlSetPlayerType(int nSetPlayerType);
+char* MpVideoServiceCtrlGetCookieForStreaming(void);
+
+#endif //_VIDEO_SERVICE_CTRL_
/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
* \r
- * http://www.tizenopensource.org/license\r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
* \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
*/\r
\r
\r
-\r
#ifndef _MP_VIDEO_SOUND_PATH_\r
#define _MP_VIDEO_SOUND_PATH_\r
\r
void MpVideoSoundpathHide(void);\r
\r
bool MpVideoSoundpathIsConnectOtherSoundpath(void);\r
-int MpVideoSoundpathGetCurrConnectedSoundpath(void);\r
\r
#endif // _MP_UTIL_\r
/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
* \r
- * http://www.tizenopensource.org/license\r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
* \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
*/\r
\r
\r
-\r
#ifndef _STREAMING_PLAYER_H_\r
#define _STREAMING_PLAYER_H_\r
\r
\r
+#ifdef USE_DNET\r
+int MpVideoStreamingCtrlConnection(void* pUserData);\r
+int MpVideoStreamingCtrlDisconnection(void* pUserData);\r
+int MpVideoStreamingCtrlIsConnected(void);\r
+#else\r
bool MpVideoStreamingCtrlGetIpAddress(char* szRetIpAddress);\r
bool MpVideoStreamingCtrlGetProxy(char* szRetProxy);\r
bool MpVideoStreamingCtrlIsNetworkOn(void);\r
-int MpVideoStreamingCtrlGetNetworkStatus(void);\r
-int MpVideoStreamingCtrlGetWifiState();\r
-int MpVideoStreamingCtrlGetCellularState();\r
+int MpVideoStreamingCtrlGetNetworkStatus(void);\r
+int MpVideoStreamingCtrlGetWifiState();\r
+int MpVideoStreamingCtrlGetCellularState();\r
bool MpVideoStreamingCtrlInit(void *pUserData);\r
void MpVideoStreamingCtrlDestroy(void *pUserData);\r
\r
+#endif\r
+\r
\r
#endif /* _STREAMING_PLAYER_H_ */\r
/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
* \r
- * http://www.tizenopensource.org/license\r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
* \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
*/\r
\r
\r
-\r
-\r
#ifndef _VIDEO_STREAMING_VIEW_\r
#define _VIDEO_STREAMING_VIEW_\r
\r
MP_STREAMING_VIEW_STATE_MAX,\r
}VideoStreamingViewState;\r
\r
+typedef void (*ChangeStreamingViewCbFunc)(int nChangePlayerView, void* pUserData);\r
+\r
+void MpVideoStreamingViewPush(void* pNaviFrame, int nPlayerType, void* pUserData, ChangeStreamingViewCbFunc pChangeViewCb);\r
+void MpVideoStreamingViewPop(void* pNaviFrame, void* pUserData);\r
+void MpVideoStreamingViewDestroy(void* pUserData);\r
+\r
+void MpVideoStreamingViewInitAfterBeginOfStream(void* pUserData);\r
+void MpVideoStreamingViewUpdatePauseKey(void);\r
+void MpVideoStreamingViewUpdateResumeKey(void);\r
+void MpVideoStreamingViewShowControlPanel(void* pUserData);\r
+void MpVideoStreamingViewHideControlPanel(void* pUserData);\r
+void MpVideoStreamingViewActivate(void);\r
+void MpVideoStreamingViewUnactivate(void);\r
+void MpVideoStreamingViewRotation(int nRotateMode);\r
+void MpVideoStreamingViewSetBufferingRate(int nSetBufferingRate);\r
+bool MpVideoStreamingViewGetBufferingState(void);\r
+bool MpVideoStreamingViewIsTopView(void);\r
+void MpVideoStreamingViewShowNocontentImage(void *pUserData);\r
+void MpVideoStreamingViewHideNocontentImage(void);\r
+void MpVideoStreamingViewLockScreen(void* pUserData);\r
+void MpVideoStreamingViewUnlockScreen(void* pUserData);\r
+bool MpVideoStreamingViewGetScreenLockState(void);\r
+void MpVideoStreamingViewPortrate(void);\r
+void MpVideoStreamingViewLandscape(void);\r
+void MpVideoStreamingViewUpdateProgressBar(void *pUserData);\r
\r
-void MpVideoStreamingViewPush(void* pNaviFrame,void* pShowInfoViewCb, void* pUserData);\r
-void MpVideoStreamingViewPop(void* pNaviFrame, void* pUserData);\r
-void MpVideoStreamingViewDestroy(void* pUserData);\r
-\r
-void MpVideoStreamingViewInitAfterBeginOfStream(void* pUserData);\r
-void MpVideoStreamingViewUpdatePauseKey(void);\r
-void MpVideoStreamingViewUpdateResumeKey(void);\r
-void MpVideoStreamingViewShowControlPanel(void* pUserData);\r
-void MpVideoStreamingViewHideControlPanel(void* pUserData);\r
-void MpVideoStreamingViewActivate(void);\r
-void MpVideoStreamingViewUnactivate(void);\r
-void MpVideoStreamingViewSetBufferingRate(int nSetBufferingRate);\r
-bool MpVideoStreamingViewGetBufferingState(void);\r
-bool MpVideoStreamingViewIsTopView(void);\r
#endif\r
/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
* \r
- * http://www.tizenopensource.org/license\r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
* \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
*/\r
\r
\r
#define _VIDEO_STRING_DEFINE_\r
\r
\r
-#define MP_STREAMING_PLAYER_STR "Streaming player"\r
#define MP_SYS_STRING "sys_string"\r
+#define MP_STREAMING_PLAYER_STR "Streaming player"\r
+\r
+#define MP_SHARE_MESSAGE (dgettext("sys_string", "IDS_COM_BODY_MESSAGE"))\r
+#define MP_SHARE_EMAIL (dgettext("sys_string", "IDS_COM_BODY_EMAIL"))\r
+#define MP_SHARE_BLUETOOTH (dgettext("sys_string", "IDS_COM_BODY_BLUETOOTH"))\r
+#define MP_SHARE_FTM (dgettext("sys_string", "IDS_COM_BODY_WI_FI"))\r
+#define MP_SHARE_FACEBOOK (dgettext("sys_string", "IDS_COM_BODY_FACEBOOK"))\r
+#define MP_SHARE_YOUTUBE (dgettext("sys_string", "IDS_COM_BODY_YOU_TUBE"))\r
+#define MP_SHARE_ALLSHARE (dgettext("sys_string", "IDS_COM_BODY_ALLSHARE"))\r
\r
-#define MP_VIDEO_PATH_KEY "path"\r
-#define MP_VIDEO_COOKIE_KEY "cookie"\r
-#define MP_VIDEO_SORT_TYPE_KEY "order_type"\r
-#define MP_VIDEO_LIST_TYPE_KEY "video_list_type"\r
-#define MP_VIDEO_TAG_NAME_KEY "tag_name"\r
-#define MP_VIDEO_SPLIT_VIEW_KEY "split_screen"\r
-#define MP_VIDEO_START_POS_TIME_KEY "start_pos_time"\r
-#define MP_VIDEO_LAUNCHING_BY_APP_KEY "launching_application"\r
-#define MP_VIDEO_EDIT_MODE_KEY "edit_mode"\r
\r
-#define MP_VPL_GPS_LATITUDE "Latitude"\r
-#define MP_VPL_GPS_LONGITUTD "Longitude"\r
+#define MP_POPUP_FAVOURITES "Favourites"\r
+#define MP_POPUP_NEW_TAG "New tag"\r
+#define MP_VIDEO_POPUP_TAG "Tag"\r
+\r
+#define MP_VIDEO_PATH_KEY "path"\r
+#define MP_VIDEO_COOKIE_KEY "cookie"\r
+#define MP_VIDEO_DLNA_SORT_KEY "MSS_Sort_type"\r
+#define MP_VIDEO_DLNA_MEDIA_ID "MSS_MediaID"\r
+#define MP_VIDEO_DLNA_SERVER_ID "MSS_ServerID"\r
+#define MP_VIDEO_SPLIT_VIEW_KEY "split_screen"\r
+#define MP_VIDEO_DMR_PLAYER "Player List"\r
\r
\r
// SMTP video player string\r
-#define MP_VPL_CONNECTION_FAIL (dgettext("sys_string", "IDS_COM_POP_CONNECTION_ERROR"))\r
-#define MP_VPL_UNABLE_TO_PLAY_VIDEO "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"\r
-#define MP_VPL_HEADER_SHARE_VIDEO_ABB "IDS_VPL_HEADER_SHARE_VIDEO_ABB"\r
-#define MP_VPL_OPT_SET_AS "IDS_VPL_OPT_SET_AS"\r
-#define MP_VPL_POP_INVALID_STREAMING_DATA "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"\r
-#define MP_VPL_POP_UNSUPPORTED_AUDIO_FORMAT "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"\r
-#define MP_VPL_POP_UNSUPPORTED_VIDEO_FORMAT "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"\r
-#define MP_VPL_POP_UNSUPPORTED_FILE_TYPE "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"\r
-#define MP_VIDEO_POPUP_SHARE "IDS_COM_SK4_SHARE"\r
-#define MP_VIDEO_SOUND_PATH "Sound Path"\r
+#define MP_VPL_CONNECTION_FAIL (dgettext("sys_string", "IDS_COM_POP_CONNECTION_ERROR"))\r
+#define MP_VPL_UNABLE_TO_PLAY_VIDEO "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"\r
+#define MP_VPL_HEADER_SHARE_VIDEO_ABB "IDS_VPL_HEADER_SHARE_VIDEO_ABB"\r
+#define MP_VPL_OPT_SET_AS "IDS_VPL_OPT_SET_AS"\r
+#define MP_VPL_POP_INVALID_STREAMING_DATA "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"\r
+#define MP_VPL_POP_UNSUPPORTED_AUDIO_FORMAT "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"\r
+#define MP_VPL_POP_UNSUPPORTED_VIDEO_FORMAT "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"\r
+#define MP_VPL_POP_UNSUPPORTED_FILE_TYPE "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"\r
+#define MP_VPL_SOUND_ALIVE_NORMAL "IDS_VPL_OPT_NORMAL"\r
+#define MP_VPL_SOUND_ALIVE_VOICE "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"\r
+#define MP_VPL_SOUND_ALIVE_MOVIE "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"\r
+#define MP_VPL_SOUND_ALIVE_51CH "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"\r
+#define MP_VPL_51CH_ONLY_EARPHONE "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"\r
+#define MP_VPL_GPS_LATITUDE "IDS_VPL_BODY_LATITUDE"\r
+#define MP_VPL_GPS_LONGITUTD "IDS_VPL_BODY_LONGITUDE"\r
+#define MP_VPL_TRIM "IDS_VPL_SK3_TRIM"\r
+#define MP_VPL_SOUND_ALIVE "Sound Alive"\r
+#define MP_VPL_SUBTITLES "IDS_VPL_OPT_SUBTITLES"\r
+#define MP_VPL_REPEAT_MODE "Repeat mode"\r
+#define MP_VPL_AUDIO_TRACK "Audio track"\r
+\r
+/* SMTP Repeat mode string */\r
+#define MP_VPL_REPEAT_OFF "Stop after current video"\r
+#define MP_VPL_REPEAT_ALL_OFF "Stop after playing all videos"\r
+#define MP_VPL_REPEAT_ONE "Repeat 1"\r
+#define MP_VPL_REPEAT_ALL "Repeat all videos"\r
+\r
+/* SMTP Subtitle option string */\r
+#define MP_VPL_SUBTITLE_SHOW "Show subtitle"\r
+#define MP_VPL_SUBTITLE_HIDE "Hide subtitle"\r
+#define MP_VPL_SUBTITLE_LANGUAGE "Language"\r
+#define MP_VPL_SUBTITLE_SIZE "Size"\r
+#define MP_VPL_SUBTITLE_SYNC "Sync"\r
+\r
+#define MP_VPL_SUBTITLE_SIZE_LARGE "Large"\r
+#define MP_VPL_SUBTITLE_SIZE_MEDIUM "Medium"\r
+#define MP_VPL_SUBTITLE_SIZE_SMALL "Small"\r
+\r
+\r
+// SMTP others module string\r
+#define MP_BT_POP_FILEBROWSINGFAIL "IDS_BT_POP_FILEBROWSINGFAIL"\r
+#define MP_BLUETOOTH_HEADSET_DISCONNECTED "IDS_DVBH_POP_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"\r
+#define MP_WGT_POP_ALLOW_TO_DELETE_FILE_Q "IDS_WGT_POP_ALLOW_TO_DELETE_FILE_Q"\r
+#define MP_EBOOK_BODY_LOADING_ING "IDS_EBOOK_BODY_LOADING_ING"\r
+#define MP_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"\r
+\r
\r
// Default system string\r
-#define MP_COM_POP_ERROR "IDS_COM_POP_ERROR"\r
-#define MP_COM_BODY_LOW_BATTERY "IDS_COM_BODY_LOW_BATTERY"\r
-#define MP_COM_BODY_DELETE "IDS_COM_BODY_DELETE"\r
-#define MP_COM_BODY_BACK "IDS_COM_BODY_BACK"\r
-#define MP_COM_SK_BACK "IDS_COM_SK_BACK"\r
-#define MP_COM_SK_YES "IDS_COM_SK_YES"\r
-#define MP_COM_SK_NO "IDS_COM_SK_NO"\r
-#define MP_COM_BODY_SIZE "IDS_COM_BODY_SIZE"\r
-#define MP_COM_BODY_DETAILS_TITLE "IDS_COM_BODY_DETAILS_TITLE"\r
-#define MP_COM_BODY_FORMAT "IDS_COM_BODY_FORMAT"\r
-#define MP_COM_POP_DATE "IDS_COM_POP_DATE"\r
-#define MP_IDLE_BODY_RESOLUTION "IDS_IDLE_BODY_RESOLUTION"\r
-#define MP_COM_BODY_DETAILS "IDS_COM_BODY_DETAILS"\r
-#define MP_COM_BUTTON_CANCEL "IDS_IDLE_BUTTON_CANCEL"\r
-#define MP_COM_BUTTON_SHARE "IDS_COM_BUTTON_SHARE"\r
-#define MP_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"\r
+#define MP_COM_POP_ERROR "IDS_COM_POP_ERROR"\r
+#define MP_COM_BODY_LOW_BATTERY "IDS_COM_BODY_LOW_BATTERY"\r
+#define MP_COM_BODY_DELETE (dgettext("sys_string", "IDS_COM_BODY_DELETE"))\r
+#define MP_COM_BODY_DELETE_Q (dgettext("sys_string", "IDS_COM_POP_DELETE_Q"))\r
+#define MP_COM_BODY_SELECT_ALL (dgettext("sys_string", "IDS_COM_BODY_SELECT_ALL"))\r
+#define MP_COM_POP_SELECTED (dgettext("sys_string", "IDS_COM_POP_SELECTED"))\r
+#define MP_COM_BODY_BACK "IDS_COM_BODY_BACK"\r
+#define MP_COM_SK_BACK "IDS_COM_SK_BACK"\r
+#define MP_COM_SK_YES "IDS_COM_SK_YES"\r
+#define MP_COM_SK_NO "IDS_COM_SK_NO"\r
+#define MP_COM_BUTTON_CANCEL (dgettext("sys_string", "IDS_IDLE_BUTTON_CANCEL"))\r
+#define MP_COM_BUTTON_SHARE "IDS_COM_BUTTON_SHARE"\r
+#define MP_COM_BODY_SIZE "IDS_COM_BODY_SIZE"\r
+#define MP_COM_BODY_DETAILS_TITLE "IDS_COM_BODY_DETAILS_TITLE"\r
+#define MP_COM_BODY_FORMAT "IDS_COM_BODY_FORMAT"\r
+#define MP_COM_POP_DATE "IDS_COM_POP_DATE"\r
+#define MP_COM_BODY_SOUNDS "IDS_COM_BODY_SOUNDS"\r
+#define MP_IDLE_BODY_RESOLUTION "IDS_IDLE_BODY_RESOLUTION"\r
+#define MP_COM_BODY_DETAILS (dgettext("sys_string", "IDS_COM_BODY_DETAILS"))\r
+#define MP_VIDEO_POPUP_SHARE "IDS_COM_SK4_SHARE"\r
+#define MP_COM_SEARCH dgettext("sys_string", "IDS_COM_BODY_SEARCH")\r
+\r
+#define MP_COM_SOUND_ALIVE (dgettext("sys_string", "IDS_COM_BODY_SOUNDS"))\r
+#define MP_COM_SETTINGS (dgettext("sys_string", "IDS_COM_BODY_SETTINGS"))\r
+#define MP_COM_POP_FILE_NOT_FOUND (dgettext("sys_string", "IDS_COM_POP_FILE_NOT_FOUND"))\r
+#define MP_COM_POP_INVALID_URL (dgettext("sys_string", "IDS_COM_POP_INVALID_URL"))\r
+#define MP_COM_POP_CONNECTION_FAILED (dgettext("sys_string", "IDS_COM_POP_CONNECTION_FAILED"))\r
+#define MP_COM_POP_FILE_NOT_EXIST (dgettext("sys_string", "IDS_COM_POP_FILE_NOT_EXIST"))\r
+\r
+#define MP_VIDEO_SOUND_PATH "Sound Path"\r
+\r
+\r
+/* DRM POPUP */\r
+#define MP_VPL_DRM_INTERVAL_BASED_DAYS _("You can use %s for %d days. Would you like to open it now?")\r
+#define MP_VPL_DRM_TIME_BASED_GET _("%s is about to be locked. Do you want to get more licenses?")\r
+#define MP_VPL_DRM_COUNT_BASED_OPEN_ONE _("You have one more use of %s. Do you want to open it now?")\r
+#define MP_VPL_DRM_COUNT_BASED_OPEN_MANY _("You have %d more uses of %s. Do you want to open it now?")\r
+#define MP_VPL_DRM_COUNT_BASED_ONE_MORE_GET _("You have one more use of %s. Do you want to get more licenses?")\r
+#define MP_VPL_DRM_COUNT_BASED_NO_MORE_GET _("You have no more use of %s. Do you want to get more licenses?")\r
+#define MP_VPL_DRM_UNLOCK _("%s is currently locked. Do you want to unlock it now?")\r
\r
\r
#endif //_VIDEO_STRING_DEFINE_\r
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
#define _VIDEO_TYPE_DEFINE_
-typedef enum
-{
- MP_LAUNCH_APP_DEFAULT = 0, // For launching by my-file.
- MP_LAUNCH_APP_GALLERY,
- MP_LAUNCH_APP_IMAGE_VIEWER,
- MP_LAUNCH_APP_SIMPLE_VIEW,
- MP_LAUNCH_APP_MAX,
-}MpLaunchingAppType;
-
-
-typedef enum
-{
- MP_MEDIA_SORT_BY_NONE = 0,
- MP_MEDIA_SORT_BY_NAME_DESC,
- MP_MEDIA_SORT_BY_NAME_ASC,
- MP_MEDIA_SORT_BY_DATE_DESC,
- MP_MEDIA_SORT_BY_DATE_ASC,
- MP_MEDIA_SORT_BY_MAX,
-}MpMediaSortType;
-
-
-typedef enum
-{
- MP_VIDEO_LIST_TYPE_FOLDER = 0,
- MP_VIDEO_LIST_TYPE_ALL_FOLDER_GALLERY,
- MP_VIDEO_LIST_TYPE_TAG_GALLERY,
- MP_VIDEO_LIST_TYPE_FAVORITE,
- MP_VIDEO_LIST_TYPE_MAX,
-}MpVideoListType;
-
typedef enum
{
- MP_STREAMING_PLAYER = 0,
- MP_VIDEO_PLAYER,
-}VideoPlayerType;
-
+ VIDEO_ROTATE_UNKNOWN = 0,
+ VIDEO_ROTATE_PORTRAIT_NORMAL,
+ VIDEO_ROTATE_PORTRAIT_REVERSE,
+ VIDEO_ROTATE_LANDSCAPE_NORMAL,
+ VIDEO_ROTATE_LANDSCAPE_REVERSE,
+}MpVideoRotateType;
typedef enum
{
MP_RTSP_STREAMING,
}MpProtocolType;
-
typedef enum
{
MP_DISPLAY_METHOD_LETTER_BOX = 0,
- MP_DISPLAY_METHOD_ORIGIN_SIZE,
- MP_DISPLAY_METHOD_FULL_SCREEN,
- MP_DISPLAY_METHOD_CROPPED_FULL,
- MP_DISPLAY_METHOD_CUSTOM_ROI,
}MpDisplayMethod;
-
-typedef enum
-{
- MP_ORDER_BY_NAME = 0,
- MP_ORDER_BY_DATE,
- MP_ORDER_BY_ASCENDING,
- MP_ORDER_BY_DESENDING,
- MP_ORDER_BY_MAX,
-}MpFileSortOrder;
-
-
typedef enum
{
MP_SOUND_PATH_SPEAKER = 0,
MP_SOUND_PATH_MAX,
}MpSoundPathType;
+typedef enum
+{
+ MP_PLAYER_ERROR_NONE = 0, // Successful
+ MP_PLAYER_ERROR_OUT_OF_MEMORY, // Out of memory
+ MP_PLAYER_ERROR_INVALID_PARAMETER, // Invalid parameter
+ MP_PLAYER_ERROR_NO_SUCH_FILE, // No such file or directory
+ MP_PLAYER_ERROR_INVALID_OPERATION, // Invalid operation
+ MP_PLAYER_ERROR_SEEK_FAILED, // Seek operation failure
+ MP_PLAYER_ERROR_INVALID_STATE, // Invalid state
+ MP_PLAYER_ERROR_NOT_SUPPORTED_FILE, // Not supported file format
+ MP_PLAYER_ERROR_INVALID_URI, // Invalid URI
+ MP_PLAYER_ERROR_SOUND_POLICY, // Sound policy error
+ MP_PLAYER_ERROR_CONNECTION_FAILED, // Streaming connection failed
+ MP_PLAYER_ERROR_UNKNOWN_ERROR, // unknown error.
+}MpPlayerErrorType;
-typedef struct
+typedef enum
{
- char szURL [STR_LEN_MAX];
- int id;
- int streaming_type;
-}MpXMLItemInfo;
+ MP_PLAYER_INTERRUPTED_COMPLETED = 0, // Interrupt completed
+ MP_PLAYER_INTERRUPTED_BY_OTHER_APP, // Interrupted by another application
+ MP_PLAYER_INTERRUPTED_BY_CALL, // Interrupted by incoming call
+ MP_PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG, // Interrupted by unplugging headphone
+ MP_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT, // Interrupted by resource conflict
+ MP_PLAYER_INTERRUPTED_BY_ALARM, // Interrupted by alarm
+}MpPlayerInterrupteType;
typedef enum
MP_PLAYER_STATE_MAX
}MpPlayerState;
+
typedef enum
{
- MP_PLAYING_SPEED_NORMAL = 0,
- MP_PLAYING_SPEED_2X,
- MP_PLAYING_SPEED_3X,
- MP_PLAYING_SPEED_4X,
- MP_PLAYING_SPEED_5X,
+ MP_PLAYING_SPEED_NORMAL = 1,
+ MP_PLAYING_SPEED_2X = 2,
+ MP_PLAYING_SPEED_3X = 3,
+ MP_PLAYING_SPEED_4X = 4,
+ MP_PLAYING_SPEED_5X = 5,
MP_PLAYING_SPEED_MAX = MP_PLAYING_SPEED_5X,
}MpVideoPlayingSpeedType;
-typedef enum
-{
- MP_SUBTITLE_TYPE_SUB = 0,
- MP_SUBTITLE_TYPE_SRT,
- MP_SUBTITLE_TYPE_SMI,
- MP_SUBTITLE_TYPE_MAX,
-}MpSubTitleType;
-
typedef enum
{
}MpNetworkCellularState;
+typedef enum
+{
+ MP_FILE_STREAM_TYPE_NOTHING = 0,
+ MP_FILE_STREAM_TYPE_VIDEO_AUDIO,
+ MP_FILE_STREAM_TYPE_AUDIO,
+ MP_FILE_STREAM_TYPE_VIDEO,
+ MP_FILE_STREAM_TYPE_MAX,
+}MpVideoFileStreamType;
+
+
+typedef enum
+{
+ MP_OPTION_TYPE_LOCAL = 0,
+ MP_OPTION_TYPE_MYFILE,
+ MP_OPTION_TYPE_EMAIL,
+ MP_OPTION_TYPE_WEB,
+ MP_OPTION_TYPE_MESSAGE,
+ MP_OPTION_TYPE_ALLSHARE,
+ MP_OPTION_TYPE_MAX,
+}MpOptionMenuType;
+
+
#endif //_VIDEO_TYPE_DEFINE_
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
#define EDJ_PATH "/opt/apps/org.tizen.video-player/res/edje"
#define LOCALEDIR "/opt/apps/org.tizen.video-player/res/locale"
-#define VIDEO_HEAD_ICON_ADD PREFIX"/res/images/01_header_icon_add.png"
-#define VIDEO_HEAD_ICON_DEL PREFIX"/res/images/01_header_icon_cancel.png"
-#define VIDEO_HEAD_ICON_OTHERS PREFIX"/res/images/01_header_icon_others.png"
+#define VIDEO_BOOKMARK_DIR PREFIX"/data"
+#define VIDEO_TRIM_DATA_DIR PREFIX"/data"
-#define VIDEO_HEAD_ICON_SOUNDPATH PREFIX"/res/images/T01_icon_soundPath_h.png"
+#define VIDEO_HEAD_ICON_SOUNDPATH PREFIX"/res/images/icon/T01-2_icon_title_soundpath.png"
#define VIDEO_PLAYER_MAIN_EDJ EDJ_PATH"/main.edj"
#define VIDEO_PLAYER_CONTROL_EDJ EDJ_PATH"/control.edj"
#define VIDEO_PLAYER_ADD_TAG EDJ_PATH"/add_tag.edj"
#define VIDEO_PLAYER_ANIMATION_EDJ EDJ_PATH"/animation.edj"
#define VIDEO_PLAYER_DETAIL_EDJ EDJ_PATH"/detail.edj"
-#define VIDEO_PLAYER_SUBTITLE_EDJ EDJ_PATH"/subtitle.edj"
+#define VIDEO_PLAYER_MULTI_WIN_EDJ EDJ_PATH"/multi_win.edj"
#define VIDEO_CUSTOM_THEME EDJ_PATH"/vp-custom-winset-style.edj"
#define VIDEO_PLAYER_HIDDEN_PANEL_EDJ EDJ_PATH"/hidden_button_panel.edj"
-#define VIDEO_PLAYER_OPTION_BUTTON_EDJ EDJ_PATH"/option_button.edj"
+#define VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ EDJ_PATH"/popup_progressbar.edj"
+
+
+
#define MAIN_EDJ_GROUP "main"
#define CONTROL_EDJ_GROUP "control"
#define PROGRESS_EDJ_GROUP "progress"
+#define MULTIWIN_EDJ_GROUP "mw"
+
#define PANEL_EDJ_GROUP "panel"
#define FAVORITE_EDJ_GROUP "favorite"
#define ANIMATION_EDJ_GROUP "animation"
#define DETAIL_EDJ_GROUP "detail"
-#define SUBTITLE_EDJ_GROUP "subtitle"
-#define HIDDEN_PANEL_EDJ_GROUP "hidden_panel"
-#define OPTION_EDJ_GROUP "option"
+#define PANEL_BUTTON_EDJ_GROUP "panel.button"
#define SWALLOW_MAIN_CONTROL "main.panel"
#define SWALLOW_MAIN_ANIMATION "main.animation"
-#define SWALLOW_MAIN_HIDDEN_BUTTON "main.hidden.button"
-#define SWALLOW_MAIN_OPTION_BUTTON "main.option.button"
-
+#define SWALLOW_MAIN_PANEL_BUTTON "main.panel.button"
#define SWALLOW_PANEL_CONTROL "panel.control"
#define SWALLOW_PANEL_PROGRESS_BAR "panel.progress"
#define SWALLOW_DETAIL_LIST "detail.list"
-#define SUBTITLE_TEXT "subtitle.txt"
#define PART_BUTTON_ICON "icon"
+#define MAIN_SPEED_TEXT "main.speedbox.txt"
+
#define SIGNAL_CONTROL_PART_PLAY_BUTTON "control.play.button"
#define SIGNAL_CONTROL_PART_BACK_BUTTON "control.back.button"
#define SIGNAL_CONTROL_PART_VOL_BUTTON "control.volume.button"
#define SIGNAL_CONTROL_PART_SOUNDPATH_BUTTON "control.soundpath.button"
-#define SIGNAL_CONTROL_PART_SCREENSIZE_BUTTON "control.screensize.button"
#define SIGNAL_CONTROL_PART_FF_BUTTON "control.normal.ff.button"
#define SIGNAL_CONTROL_PART_REW_BUTTON "control.normal.rew.button"
-#define SIGNAL_CONTROL_PART_HQ_BUTTON "control.streaming.hq.button"
+
#define SIGNAL_HIDDEN_BUTTON_PANEL_SOUNDPATH "hidden.button.panel.soundpath"
-#define SIGNAL_CONTROL_MODE_NORMAL "signal.control.mode.normal"
#define SIGNAL_CONTROL_MODE_STREAMING "signal.control.mode.streaming"
+#define SIGNAL_CONTROL_MODE_DLNA "signal.control.mode.dlna"
#define SIGNAL_CONTROL_MODE_VISIBLE_OFF "signal.control.mode.visible.off"
-#define SIGNAL_CONTROL_BACK_BUTTON_DOWN "signal.control.back.button.down"
-
-#define SIGNAL_CONTROL_FF_MODE_NORMAL "signal.control.ff.normal"
-#define SIGNAL_CONTROL_FF_MODE_EXTEND "signal.control.ff.extend"
-
-#define SIGNAL_CONTROL_REW_MODE_NORMAL "signal.control.rew.normal"
-#define SIGNAL_CONTROL_REW_MODE_EXTEND "signal.control.rew.extend"
+#define SIGNAL_CONTROL_MODE_NORMAL "signal.control.mode.normal"
+#define SIGNAL_CONTROL_BACK_BUTTON_DOWN "signal.control.back.button.up"
#define SIGNAL_CONTROL_VOL_BUTTON_DOWN "signal.control.volume.button.down"
#define SIGNAL_CONTROL_VOL_BUTTON_UP "signal.control.volume.button.up"
#define SIGNAL_CONTROL_SOUNDPATH_BUTTON_DOWN "signal.control.soundpath.button.down"
#define SIGNAL_CONTROL_SOUNDPATH_BUTTON_UP "signal.control.soundpath.button.up"
-#define SIGNAL_CONTROL_SCREENSIZE_NORMAL "signal.control.screensize.normal"
-#define SIGNAL_CONTROL_SCREENSIZE_EXPAND "signal.control.screensize.expand"
#define SIGNAL_CONTROL_NORMAL_FF_BUTTON_DOWN "signal.control.normal.ff.button.down"
#define SIGNAL_CONTROL_NORMAL_FF_BUTTON_UP "signal.control.normal.ff.button.up"
#define SIGNAL_CONTROL_NORMAL_REW_BUTTON_DOWN "signal.control.normal.rew.button.down"
#define SIGNAL_CONTROL_NORMAL_REW_BUTTON_UP "signal.control.normal.rew.button.up"
-#define SIGNAL_CONTROL_HQ_BUTTON_DOWN "signal.control.streaming.hq.button.down"
-#define SIGNAL_CONTROL_HQ_BUTTON_UP "signal.control.streaming.hq.button.up"
-#define SIGNAL_HIDDEN_PANEL_SOUNDPATH_DOWN "signal.hidden.button.panel.soundpath.down"
-#define SIGNAL_HIDDEN_PANEL_SOUNDPATH_UP "signal.hidden.button.panel.soundpath.up"
+#define SIGNAL_CONTROL_NORMAL_FF_STEP "signal.control.normal.ff.button.step"
+#define SIGNAL_CONTROL_NORMAL_REW_STEP "signal.control.normal.rew.button.step"
+#define SIGNAL_CONTROL_NORMAL_FF_LANDSCAPE_STEP "signal.control.normal.ff.button.landscape.step"
+#define SIGNAL_CONTROL_NORMAL_REW_LANDSCAPE_STEP "signal.control.normal.rew.button.landscape.step"
+
#define SIGNAL_CONTROL_VOL_BUTTON_MUTE "signal.control.volume.button.mute"
#define SIGNAL_CONTROL_VOL_BUTTON_UNMUTE "signal.control.volume.button.unmute"
#define SIGNAL_CONTROL_SOUNDPATH_BUTTON_ACTIVE "signal.control.soundpath.button.active"
#define SIGNAL_CONTROL_SOUNDPATH_BUTTON_UNACTIVE "signal.control.soundpath.button.unactive"
-#define SIGNAL_CONTROL_STREAMING_QUALITY_HIGH "signal.control.streaming.quality.high"
-#define SIGNAL_CONTROL_STREAMING_QUALITY_NORMAL "signal.control.streaming.quality.normal"
-#define SIGNAL_CONTROL_STREAMING_QUALITY_HIDE "signal.control.streaming.quality.hide"
-#define SIGNAL_OPTION_PART_SCREEN_SIZE "option.screensize"
-#define SIGNAL_OPTION_PART_DETAIL "option.detail"
+#define SIGNAL_MW_PIXMAP_SHOW "signal.mw.image.show"
+#define SIGNAL_MW_PIXMAP_HIDE "signal.mw.image.hide"
-#define SIGNAL_OPTION_SCREEN_SIZE_DOWN "signal.option.screensize.down"
-#define SIGNAL_OPTION_DETAIL_DOWN "signal.option.detail.down"
+#define SIGNAL_NAVIFRAME_PORTRATE_MODE "signal.naviframe.portrate.mode"
+#define SIGNAL_NAVIFRAME_LANDSCAPE_MODE "signal.naviframe.landscape.mode"
-#define SIGNAL_OPTION_SCREEN_SIZE_NORMAL "signal.option.screensize.normal"
-#define SIGNAL_OPTION_SCREEN_SIZE_EXPAND "signal.option.screensize.expand"
+#define SIGNAL_MAIN_PORTRATE_MODE "signal.main.portrate.mode"
+#define SIGNAL_MAIN_LANDSCAPE_MODE "signal.main.landscape.mode"
+
+#define SIGNAL_PANEL_PORTRATE_MODE "signal.panel.portrate.mode"
+#define SIGNAL_PANEL_LANDSCAPE_MODE "signal.panel.landscape.mode"
+
+#define SIGNAL_PROGRESS_PORTRATE_MODE "signal.progress.portrate.mode"
+#define SIGNAL_PROGRESS_LANDSCAPE_MODE "signal.progress.landscape.mode"
+
+#define SIGNAL_PROGRESS_ADJUSTMENT_SHOW "signal.progress.adjustment.show"
+#define SIGNAL_PROGRESS_ADJUSTMENT_HIDE "signal.progress.adjustment.hide"
+
+
+#define SIGNAL_CONTROL_PORTRATE_MODE "signal.control.portrate.mode"
+#define SIGNAL_CONTROL_LANDSCAPE_MODE "signal.control.landscape.mode"
+
+#define SIGNAL_CONTROL_STREAMING_PORTRATE_MODE "signal.control.streaming.portrate.mode"
+#define SIGNAL_CONTROL_STREAMING_LANDSCAPE_MODE "signal.control.streaming.landscape.mode"
// Callback signals.
#define SIGNAL_CONTROL_PLAY_BUTTON_DOWN "signal.control.play.button.down"
#define SIGNAL_CONTROL_PLAY_RESUME "signal.control.play.resume"
#define SIGNAL_CONTROL_PLAY_PAUSE "signal.control.play.pause"
-#define SIGNAL_CONTROL_SCREENSIZE_BUTTON_NORMAL "signal.control.screensize.button.normal"
-#define SIGNAL_CONTROL_SCREENSIZE_BUTTON_EXPAND "signal.control.screensize.button.expand"
-
-#define SIGNAL_OPTION_MODE_STREAMING "signal.option.mode.streaming"
-
-
#define SIGNAL_MAIN_MUTE_SHOW "signal.main.mute.show"
#define SIGNAL_MAIN_MUTE_HIDE "signal.main.mute.hide"
-#define SIGNAL_MAIN_NOCONTENTS_SHOW "signal.main.nocontents.show"
-#define SIGNAL_MAIN_NOCONTENTS_HIDE "signal.main.nocontents.hide"
+#define SIGNAL_MAIN_NOCONTENTS_SHOW "signal.main.nocontents.show"
+#define SIGNAL_MAIN_NOCONTENTS_HIDE "signal.main.nocontents.hide"
+
+#define SIGNAL_MAIN_SPEEDBOX_SHOW "signal.main.speedbox.show"
+#define SIGNAL_MAIN_SPEEDBOX_HIDE "signal.main.speedbox.hide"
-#define SIGNAL_MAIN_SCREEN_TOUCH_PRESS "signal.main.screen.touch.press"
#define SIGNAL_MAIN_SCREEN_TOUCH_TOGGLE "main.screen.touch.toggle"
#define SIGNAL_MAIN_ANIMATION_SHOW "signal.main.animation.show"
#define SIGNAL_MAIN_ANIMATION_HIDE "signal.main.animation.hide"
-#define SIGNAL_MAIN_OPTION_BUTTON_BG_HIDE "signal.main.option.button.bg.hide"
-
#define SIGNAL_ANIMATION_IMAGE_LOADING "signal.loading.image.step"
-#define SIGNAL_HIDDEN_BUTTON_PANEL_SOUNDPATH_SHOW "signal.hidden.button.panel.soundpath.show"
-#define SIGNAL_HIDDEN_BUTTON_PANEL_SOUNDPATH_HIDE "signal.hidden.button.panel.soundpath.hide"
#define TAG_FAVOURITES "Favourites"
#define PACKAGE "video-player"
#define KEY_GRAB_TOP_POSITION TOP_POSITION_GRAB
#define KEY_GRAB_OR_EXCLUSIVE OR_EXCLUSIVE_GRAB
#define STR_LEN_MAX 4096 * 3
+#define SVC_LEN_MAX 2048
#define XML_ITEM_NUM 6
#define _WIFI_MODE_ 1
#define _3G_MODE_ 2
#define USE_STREAMING_ANI 1
-#define LONG_PRESS_INTERVAL 0.5
+#define LONG_PRESS_INTERVAL 1.0
+#define DOUBLE_CLICK_TIME 0.2
#define SCREEN_TOUCH_TOGGLE_AREA_Y_START 0.065
#define SCREEN_TOUCH_TOGGLE_AREA_Y_END 0.78
#define CAPTION_TEXT_MAX_LEN 16
#define STR_UUID_LEN_MAX 37
+#define DEFAULT_SCALE_WIDTH 720
+#define DEFAULT_SCALE_HEIGHT 1280
+
+#define DEFAULT_MW_WIDTH 496
+#define DEFAULT_MW_HEIGHT 286
+
#endif //_VIDEO_VALUE_DEFINE_
+
--- /dev/null
+/*
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+ *
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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 _VIDEO_VIEW_MGR_
+#define _VIDEO_VIEW_MGR_
+
+
+
+bool MpVideoViewCtrlInit(VideoAppData* pAppData);
+void MpVideoViewCtrlDestroy(void* pUserData);
+
+
+void MpVideoViewCtrlSetRotation(int nRotateMode, void *pUserData);
+void MpVideoViewCtrlInitAfterBeginOfStream(void*);
+void MpVideoViewCtrlPause(void* pUserData);
+void MpVideoViewCtrlResume(void* pUserData);
+void MpVideoViewShowLayout(void* pUserData);
+void MpVideoViewHideLayout(void* pUserData);
+void MpVideoViewSetBufferingRateForStreamingView(int nSetBufferingRate, void* pUserData);
+void MpVideoViewHideSoundpath(void* pUserData);
+void MpVideoViewCtrlChangeTitle(void *pUserData);
+bool MpVideoViewCtrlIsTopView(void *pUserData);
+void MpVideoViewCtrlShowNocontentImage(void* pUserData);
+void MpVideoViewCtrlHideNocontentImage(void* pUserData);
+void MpVideoViewCtrlResetProgressBar(void *pUserData);
+void MpVideoViewCtrlUpdateProgressbar(void *pUserData);
+bool MpVideoViewCtrlIsPauseByUser(void);
+#endif //_VIDEO_VIEW_MGR_
\ No newline at end of file
/*\r
- * Copyright 2012 Samsung Electronics Co., Ltd\r
- *\r
- * Licensed under the Flora License, Version 1.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\r
* \r
- * http://www.tizenopensource.org/license\r
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
* \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.tizenopensource.org/license\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
*/\r
\r
\r
-\r
-\r
#ifndef _MP_XML_PARSER_H_\r
#define _MP_XML_PARSER_H_\r
\r
\r
#include <stdio.h>\r
#include <stdbool.h>\r
+#include <mp-util.h>\r
+\r
\r
+typedef struct
+{
+ char szURL [STR_LEN_MAX];
+ int id;
+ int streaming_type;
+}MpXMLItemInfo;\r
\r
\r
void mp_xml_init();\r
void mp_xml_destroy();\r
\r
unsigned int mp_read_xml_file(const char *file_name, char **data);\r
- bool mp_get_url_from_xml(const char *content, int length, char **streamer_url, int mode);\r
+\r
+\r
+\r
+\r
+// [in]content : xml data\r
+// [in]length : length of content\r
+// [out]streamer_url : url of content\r
+bool mp_get_url_from_xml(const char *content, int length, char **streamer_url, int mode);\r
char *mp_get_title_from_xml(const char *file_name);\r
int mp_get_xmlitem(const char *content, int length, MpXMLItemInfo *item,int *nHttpCount, int *nRtspCount);\r
\r
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
#include <utilX.h>
#include <Ecore_X.h>
#include <Elementary.h>
-#include <appcore-efl.h>
#include "mp-video-value-define.h"
#include "mp-video-type-define.h"
void (*VideoAppCtrlRewDown) (VideoAppData* pAppData);
void (*VideoAppCtrlFFUp) (VideoAppData* pAppData);
void (*VideoAppCtrlRewUp) (VideoAppData* pAppData);
+ void (*VideoAppCtrlSpeedReset) (VideoAppData* pAppData);
+ void (*VideoAppCtrlSpeedFF) (VideoAppData* pAppData);
+ void (*VideoAppCtrlSpeedRew) (VideoAppData* pAppData);
void (*VideoAppCtrlSetMute) (VideoAppData* pAppData);
- void (*VideoAppCtrlSetScreenType) (VideoAppData* pAppData);
- void (*VideoAppCtrlSetScreenSize) (VideoAppData* pAppData, int nScreenSize);
+ void (*VideoAppCtrlRotateScreen) (VideoAppData *pAppData, int nRotateState);
void (*VideoAppCtrlGetPosition) (VideoAppData* pAppData);
void (*VideoAppCtrlSetPosition) (VideoAppData* pAppData);
void (*VideoAppCtrlHideLayout) (VideoAppData* pAppData);
struct _VideoAppData
{
- bool bIsMute;
-
- int nDuration;
- int nSetPosition;
- int nCurPosition;
- int nSubtitleDuration;
- int nBufferingPosition;
+ Evas_Object* pMainWindow;
- int nVideoWidthResolution;
- int nVideoHeightResolution;
+ int nDuration;
+ int nSetPosition;
+ int nCurPosition;
+ int nSeekPosition;
+ int nSubtitleDuration;
+ int nBufferingPosition;
- char szSubtitle[STR_LEN_MAX];
- char szVideoTitle[STR_LEN_MAX];
+ int nVideoWidthResolution;
+ int nVideoHeightResolution;
- char szMediaUri[STR_LEN_MAX];
- char szPreMediaUri[STR_LEN_MAX];
- char szNextMediaUri[STR_LEN_MAX];
- char szTagNameForVideoList[STR_LEN_MAX];
+ char szVideoTitle[STR_LEN_MAX];
- Evas_Object* pMainWindow;
+ char szMediaUri[STR_LEN_MAX];
+ char szPreMediaUri[STR_LEN_MAX];
+ char szNextMediaUri[STR_LEN_MAX];
- MpPlayerState nPrePlayerState;
- MpPlayerState nCurPlayerState;
- MpLaunchingAppType nLaunchingAppType;
- MpMediaSortType nVideoSortType;
- MpVideoListType nVideoListType;
- VideoPlayerType nCurPlayerType;
- VideoAppCtrlFunc VideoAppCtrlCallbackFunc;
+ int nPlayingSpeed;
+ bool bStartSeek;
+ bool bSeekComplete;
- char szProxyAddress[STR_LEN_MAX];
- char szUserAgent[STR_LEN_MAX];
- char szCookie[STR_LEN_MAX];
+ char szProxyAddress[STR_LEN_MAX];
+ char szUserAgent[STR_LEN_MAX];
+ char szCookie[STR_LEN_MAX];
- int nDlnaMediaID;
- int nDlnaSortType;
+ MpPlayerState nPrePlayerState;
+ MpPlayerState nCurPlayerState;
+ VideoAppCtrlFunc VideoAppCtrlCallbackFunc;
+ MpPlayerState nSeekPlayerState;
};
#endif //__VIDEO_PLAYER__
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.video-player" version="0.5.93" install-location="internal-only">
+ <label>Video player</label>
+ <author email="jongdong.lee@samsung.com" href="www.samsung.com">JongDong Lee</author>
+ <description>Video player Application</description>
+ <ui-application appid="org.tizen.video-player" exec="/opt/apps/org.tizen.video-player/bin/video-player" nodisplay="true" multiple="false" type="capp" taskmanage="true">
+ <label>Video player</label>
+ <icon>org.tizen.video-player.png</icon>
+ <label xml:lang="en-us">Video player</label>
+ <label xml:lang="nl-nl">Video player</label>
+ <label xml:lang="de-de">Video player</label>
+ <label xml:lang="zh-hk">Video player</label>
+ <label xml:lang="zh-cn">Video player</label>
+ <label xml:lang="ru-ru">Video player</label>
+ <label xml:lang="zh-tw">Video player</label>
+ <label xml:lang="ja-jp">Video player</label>
+ <label xml:lang="es-es">Video player</label>
+ <label xml:lang="el-gr">Video player</label>
+ <label xml:lang="it-it">Video player</label>
+ <label xml:lang="tr-tr">Video player</label>
+ <label xml:lang="pt-pt">Video player</label>
+ <label xml:lang="fr-fr">Video player</label>
+ <label xml:lang="ko-kr">비디오 플레이어</label>
+ <application-service>
+ <operation name="http://tizen.org/appsvc/operation/view" />
+ <mime name="video/mp4" />
+ <mime name="video/3gp" />
+ <mime name="video/x-msvideo" />
+ <mime name="video/x-ms-wmv" />
+ <mime name="video/x-ms-asf" />
+ <mime name="video/3gpp" />
+ <mime name="video/x-matroska" />
+ <mime name="video/vnd.ms-playready.media.pyv" />
+ <mime name="application/vnd.apple.mpegurl" />
+ <mime name="application/x-mpegurl" />
+ <mime name="audio/x-mpegurl" />
+ <mime name="video/x-mpegurl" />
+ <mime name="video/x-flv" />
+ <mime name="video/ogg" />
+ <mime name="video/quicktime" />
+ </application-service>
+ </ui-application>
+</manifest>
Name: org.tizen.video-player
Summary: Video & streaming player
-Version: 0.1.5
+Version: 0.5.123
Release: 1
Group: TO_BE/FILLED_IN
-License: Flora Software License
+License: Flora
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(appcore-efl)
-BuildRequires: pkgconfig(ui-gadget)
+BuildRequires: pkgconfig(drm-client)
BuildRequires: pkgconfig(utilX)
-BuildRequires: pkgconfig(mm-common)
-BuildRequires: pkgconfig(mm-player)
-BuildRequires: pkgconfig(mm-sound)
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(pmapi)
-BuildRequires: pkgconfig(mm-session)
BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(mm-ta)
-BuildRequires: pkgconfig(mm-fileinfo)
-BuildRequires: pkgconfig(appcore-common)
-BuildRequires: pkgconfig(libmedia-service)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(syspopup-caller)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(eina)
BuildRequires: pkgconfig(evas)
BuildRequires: pkgconfig(edje)
-BuildRequires: pkgconfig(appsvc)
-BuildRequires: pkgconfig(ail)
-BuildRequires: pkgconfig(efreet-mime)
+BuildRequires: pkgconfig(efreet)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(capi-media-player)
+BuildRequires: pkgconfig(capi-media-sound-manager)
+BuildRequires: pkgconfig(capi-media-image-util)
+BuildRequires: pkgconfig(capi-system-power)
+BuildRequires: pkgconfig(capi-media-metadata-extractor)
+BuildRequires: pkgconfig(capi-content-media-content)
+BuildRequires: pkgconfig(capi-content-mime-type)
+BuildRequires: pkgconfig(capi-system-sensor)
+BuildRequires: pkgconfig(capi-system-haptic)
+BuildRequires: pkgconfig(ecore-evas)
+BuildRequires: pkgconfig(ecore-x)
+BuildRequires: pkgconfig(xext)
+BuildRequires: pkgconfig(ui-gadget-1)
+BuildRequires: boost-devel
+BuildRequires: boost-thread
+BuildRequires: boost-system
+BuildRequires: boost-filesystem
BuildRequires: cmake
%description
Video & streaming player
-
%prep
%setup -q
+%ifarch %{arm}
+%define ARCH arm
+%else
+%define ARCH i586
+%endif
%build
-cmake . -DCMAKE_INSTALL_PREFIX=/opt/apps/org.tizen.video-player
+cmake . -DCMAKE_INSTALL_PREFIX=/opt/apps/org.tizen.video-player -DARCH=%{ARCH}
make %{?jobs:-j%jobs}
+
%install
rm -rf %{buildroot}
-
%make_install
execstack -c %{buildroot}/opt/apps/org.tizen.video-player/bin/video-player
%post
-chown -R 5000:5000 %dir /opt/apps/org.tizen.video-player/data
+vconftool set -t bool db/private/org.tizen.video-player/backgroud_playing 0 -g 5000
+vconftool set -t int db/private/org.tizen.video-player/video_auto_off_type 0 -g 5000
+vconftool set -t bool db/private/org.tizen.video-player/auto_search_subtitle_file 1 -g 5000
+vconftool set -t bool db/private/org.tizen.video-player/show_subtitle 1 -g 5000
+vconftool set -t int db/private/org.tizen.video-player/subtitle_size 1 -g 5000
+vconftool set -t int db/private/org.tizen.video-player/display_color_tone_type 0 -g 5000
+vconftool set -t bool db/private/org.tizen.video-player/outdoor_visibility 0 -g 5000
+vconftool set -t string db/private/org.tizen.video-player/preview_url_videos "" -g 5000
+vconftool set -t string db/private/org.tizen.video-player/preview_url_records "" -g 5000
+vconftool set -t string db/private/org.tizen.video-player/show_indicator 1 -g 5000
+vconftool set -t string db/private/org.tizen.video-player/show_border 0 -g 5000
+
+chown -R 5000:5000 /opt/apps/org.tizen.video-player/data
%files -n org.tizen.video-player
+%dir /opt/apps/org.tizen.video-player/data
/opt/apps/org.tizen.video-player/bin/*
/opt/apps/org.tizen.video-player/res/locale/*
-/opt/apps/org.tizen.video-player/res/icons/default/small/*
+/opt/share/icons/default/small/*
/opt/apps/org.tizen.video-player/res/edje/*
/opt/apps/org.tizen.video-player/res/images/*
-/opt/share/applications/*
+/opt/share/packages/org.tizen.video-player.xml
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
-
collections {
group {
name: "favorite";
parts {
part {
name: "background";
- type, RECT;
+ type, RECT;
mouse_events: 0;
description {
- state: "default" 0.0;
+ state: "default" 0.0;
rel1 { relative: 0.0 0.0; offset: 0 0; }
rel2 { relative: 1.0 1.0; offset: -1 -1; }
color, 0 0 0 255 ;
}
}
-
+
part {
- name: "selectall_bg";
+ name: "selectall_bg";
type: RECT;
mouse_events: 0;
scale: 1;
visible: 1;
}
}
-
+
part {
name: "selectall_check_leftpadding";
type: RECT;
min: 15 0;
fixed: 1 0;
align: 0.0 0.0;
-
+
color: 0 0 0 255;
visible: 0;
rel1 { relative: 0.0 0.0; to: "selectall_bg"; }
rel1 { relative: 1.0 0.0; to: "selectall_check_leftpadding"; }
rel2 { relative: 1.0 1.0; to: "selectall_check_leftpadding"; }
visible : 0;
-
+
}
description {
state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
- }
+ }
}
part {
state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
- }
+ }
}
part {
inherit: "default" 0.0;
}
}
-
+
// tab style container
part {
}
}
- // tool style container.
+ // tool style container.
part {
name: "elm.swallow.toolbar_bg";
type: RECT;
}
}
-
- // tool style container.
+
+ // tool style container.
part {
name: "elm.swallow.toolbar";
type: SWALLOW;
state: "moveup" 0.0;
//min: 0 86;
min: 0 50;
- fixed: 1 1;
+ fixed: 1 1;
//align: 0.5 1.0;
- align: 0.5 0.0;
- rel1 { relative: 0.0 0.0; offset: 5 0;}
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 0.0; offset: 5 0;}
rel2 { relative: 1.0 0.0; offset: -5 50;}
}
description {
state: "moveup_progressbar" 0.0;
min: 0 62;
- fixed: 1 1;
+ fixed: 1 1;
align: 0.5 0.0;
rel1 { relative: 0.0 0.0;}
rel2 { relative: 1.0 0.0; offset: 0 62;}
}
}
-
+
// view container. This is used, when tool items is added.
part {
name: "elm.swallow.view";
type: SWALLOW;
- mouse_events: 1;
+ mouse_events: 1;
description {
- state: "default" 0.0;
+ state: "default" 0.0;
rel1 { relative: 0.0 0.0;}
rel2 { relative: 1.0 0.0; to: "elm.swallow.toolbar";}
part {
name: "view_bg";
- type: SWALLOW;
+ type: SWALLOW;
mouse_events: 1;
- repeat_events: 1;
+ repeat_events: 1;
description {
- state: "default" 0.0;
+ state: "default" 0.0;
rel1 { relative: 0.0 0.0; offset: 0 0; to: "elm.swallow.view";}
rel2 { relative: 1.0 1.0; offset: 0 0; to: "elm.swallow.view";}
}
- description {
+ description {
state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}//GROUP
-
+
programs {
program {
name: "swallow_view_default";
source: "elm";
script {
set_state(PART:"elm.swallow.toolbar", "moveup", 0.0); //move toolbar up
- set_state(PART:"elm.swallow.view", "moveup_toolbar", 0.0);
+ set_state(PART:"elm.swallow.view", "moveup_toolbar", 0.0);
}
}
program {
source: "elm";
script {
set_state(PART:"elm.swallow.toolbar", "moveup_progressbar", 0.0); //move toolbar+progressbar up
- set_state(PART:"elm.swallow.view", "moveup_toolbar_progressbar", 0.0);
+ set_state(PART:"elm.swallow.view", "moveup_toolbar_progressbar", 0.0);
}
- }
+ }
program {
name: "view_bg_default";
signal: "elm,view,bg,state,default";
target: "selectall_check";
target: "selectall_check_rightpadding";
target: "selectall_text";
- target: "selectall_inner";
+ target: "selectall_inner";
}
program {
name: "selectall_hide";
target: "selectall_check_rightpadding";
target: "selectall_text";
target: "selectall_inner";
- }
+ }
}//PROGRAMS
} /* collections */
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
-
-#include "image_res.edc"
-#include "vp_font.edc"
-
-#define CONTROL_BUTTON_STEP(_item_name_, _val_) \
-program { \
- signal: "signal."_item_name_".step."_val_; \
- source: "*"; \
- action: STATE_SET "step_"_val_ 0.0; \
- target: _item_name_; \
-} /* CONTROL_BUTTON_STEP */
-
-
-collections {
- group {
- name: "animation";
-
- parts {
-
- part {
- name: "loading.back";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 0;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- color: 255 0 0 255;
- }
- }
-
- part {
- name: "loading.txt";
- type: TEXT;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- min: 288 54;
- fixed: 0 1;
- align: 0.5 0.0;
- rel1 { relative: 0.0 1.0; }
- rel2 { relative: 1.0 1.0; }
- color: FONT_COLOR;
- text {
- font: FONT_NANE;
- size: 32;
- text: "";
- align: 0.5 0.5;
- }
- }
-
- }
- part {
- name: "loading.image";
- type: IMAGE;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 0;
- min: 138 138;
- fixed: 1 1;
- align: 0.5 0.5;
- rel1 { relative: 0.5 0.5;}
- rel2 { relative: 0.5 0.5;}
- image { normal: "gallery_loading_ani_01.png"; }
- color: 255 255 255 255;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_01.png"; }
- }
- description {
- state: "step_1" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_01.png"; }
- }
- description {
- state: "step_2" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_02.png"; }
- }
- description {
- state: "step_3" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_03.png"; }
- }
- description {
- state: "step_4" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_04.png"; }
- }
- description {
- state: "step_5" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_05.png"; }
- }
- description {
- state: "step_6" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_06.png"; }
- }
- description {
- state: "step_7" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_07.png"; }
- }
- description {
- state: "step_8" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_08.png"; }
- }
- description {
- state: "step_9" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_09.png"; }
- }
- description {
- state: "step_10" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_10.png"; }
- }
- description {
- state: "step_11" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_11.png"; }
- }
- description {
- state: "step_12" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_12.png"; }
- }
- description {
- state: "step_13" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_13.png"; }
- }
- description {
- state: "step_14" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_14.png"; }
- }description {
- state: "step_15" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_15.png"; }
- }
- description {
- state: "step_16" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_16.png"; }
- }
- description {
- state: "step_17" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_17.png"; }
- }
- description {
- state: "step_18" 0.0;
- inherit: "show" 0.0;
- image { normal: "gallery_loading_ani_18.png"; }
- }
- description {
- state: "step_19" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_19.png"; }
- }
- description {
- state: "step_20" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_20.png"; }
- }
- description {
- state: "step_21" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_21.png"; }
- }
- description {
- state: "step_22" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_22.png"; }
- }
- description {
- state: "step_23" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_23.png"; }
- }
- description {
- state: "step_24" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_24.png"; }
- }
- description {
- state: "step_25" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_25.png"; }
- }
- description {
- state: "step_26" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_26.png"; }
- }
- description {
- state: "step_27" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_27.png"; }
- }
- description {
- state: "step_28" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_28.png"; }
- }
- description {
- state: "step_29" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_29.png"; }
- }
- description {
- state: "step_30" 0.0;
- inherit: "show" 0.0;
- visible: 1;
- image { normal: "gallery_loading_ani_30.png"; }
- }
-
- description {
- state: "step_0" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- } /* parts */
- programs {
- CONTROL_BUTTON_STEP( "loading.image", 0);
- CONTROL_BUTTON_STEP( "loading.image", 1);
- CONTROL_BUTTON_STEP( "loading.image", 2);
- CONTROL_BUTTON_STEP( "loading.image", 3);
- CONTROL_BUTTON_STEP( "loading.image", 4);
- CONTROL_BUTTON_STEP( "loading.image", 5);
- CONTROL_BUTTON_STEP( "loading.image", 6);
- CONTROL_BUTTON_STEP( "loading.image", 7);
- CONTROL_BUTTON_STEP( "loading.image", 8);
- CONTROL_BUTTON_STEP( "loading.image", 9);
- CONTROL_BUTTON_STEP( "loading.image", 10);
- CONTROL_BUTTON_STEP( "loading.image", 11);
- CONTROL_BUTTON_STEP( "loading.image", 12);
- CONTROL_BUTTON_STEP( "loading.image", 13);
- CONTROL_BUTTON_STEP( "loading.image", 14);
- CONTROL_BUTTON_STEP( "loading.image", 15);
- CONTROL_BUTTON_STEP( "loading.image", 16);
- CONTROL_BUTTON_STEP( "loading.image", 17);
- CONTROL_BUTTON_STEP( "loading.image", 18);
- CONTROL_BUTTON_STEP( "loading.image", 19);
- CONTROL_BUTTON_STEP( "loading.image", 20);
- CONTROL_BUTTON_STEP( "loading.image", 21);
- CONTROL_BUTTON_STEP( "loading.image", 22);
- CONTROL_BUTTON_STEP( "loading.image", 23);
- CONTROL_BUTTON_STEP( "loading.image", 24);
- CONTROL_BUTTON_STEP( "loading.image", 25);
- CONTROL_BUTTON_STEP( "loading.image", 26);
- CONTROL_BUTTON_STEP( "loading.image", 27);
- CONTROL_BUTTON_STEP( "loading.image", 28);
- CONTROL_BUTTON_STEP( "loading.image", 29);
- CONTROL_BUTTON_STEP( "loading.image", 30);
-
- } /* programs */
- } /* group */
-} /* collections */
+#include "image_res.edc"\r
+#include "vp_font.edc"\r
+\r
+#define CONTROL_BUTTON_STEP(_item_name_, _val_) \\r
+program { \\r
+ signal: "signal."_item_name_".step."_val_; \\r
+ source: "*"; \\r
+ action: STATE_SET "step_"_val_ 0.0; \\r
+ target: _item_name_; \\r
+} // CONTROL_BUTTON_STEP\r
+\r
+\r
+collections {\r
+ group {\r
+ name: "animation";\r
+\r
+ parts {\r
+ part {\r
+ name: "loading.back";\r
+ type: RECT;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ rel1 { relative: 0.0 0.0;}\r
+ rel2 { relative: 1.0 1.0;}\r
+ color: 255 0 0 255;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "loading.txt";\r
+ type: TEXT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: 288 54;\r
+ fixed: 0 1;\r
+ align: 0.5 0.0;\r
+ rel1 { relative: 0.0 1.0; }\r
+ rel2 { relative: 1.0 1.0; }\r
+ color: FONT_COLOR;\r
+ text {\r
+ font: FONT_BOLD_TYPE;\r
+ text_class: "slp_bold";\r
+ size: 32;\r
+ text: "";\r
+ align: 0.5 0.5;\r
+ }\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "loading.image";\r
+ type: IMAGE;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ min: 138 138;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5;}\r
+ rel2 { relative: 0.5 0.5;}\r
+ image { normal: "gallery_loading_ani_01.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "show" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_01.png"; }\r
+ }\r
+ description {\r
+ state: "step_1" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_01.png"; }\r
+ }\r
+ description {\r
+ state: "step_2" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_02.png"; }\r
+ }\r
+ description {\r
+ state: "step_3" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_03.png"; }\r
+ }\r
+ description {\r
+ state: "step_4" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_04.png"; }\r
+ }\r
+ description {\r
+ state: "step_5" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_05.png"; }\r
+ }\r
+ description {\r
+ state: "step_6" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_06.png"; }\r
+ }\r
+ description {\r
+ state: "step_7" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_07.png"; }\r
+ }\r
+ description {\r
+ state: "step_8" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_08.png"; }\r
+ }\r
+ description {\r
+ state: "step_9" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_09.png"; }\r
+ }\r
+ description {\r
+ state: "step_10" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_10.png"; }\r
+ }\r
+ description {\r
+ state: "step_11" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_11.png"; }\r
+ }\r
+ description {\r
+ state: "step_12" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_12.png"; }\r
+ }\r
+ description {\r
+ state: "step_13" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_13.png"; }\r
+ }\r
+ description {\r
+ state: "step_14" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_14.png"; }\r
+ }description {\r
+ state: "step_15" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_15.png"; }\r
+ }\r
+ description {\r
+ state: "step_16" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_16.png"; }\r
+ }\r
+ description {\r
+ state: "step_17" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_17.png"; }\r
+ }\r
+ description {\r
+ state: "step_18" 0.0;\r
+ inherit: "show" 0.0;\r
+ image { normal: "gallery_loading_ani_18.png"; }\r
+ }\r
+ description {\r
+ state: "step_19" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_19.png"; }\r
+ }\r
+ description {\r
+ state: "step_20" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_20.png"; }\r
+ }\r
+ description {\r
+ state: "step_21" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_21.png"; }\r
+ }\r
+ description {\r
+ state: "step_22" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_22.png"; }\r
+ }\r
+ description {\r
+ state: "step_23" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_23.png"; }\r
+ }\r
+ description {\r
+ state: "step_24" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_24.png"; }\r
+ }\r
+ description {\r
+ state: "step_25" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_25.png"; }\r
+ }\r
+ description {\r
+ state: "step_26" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_26.png"; }\r
+ }\r
+ description {\r
+ state: "step_27" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_27.png"; }\r
+ }\r
+ description {\r
+ state: "step_28" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_28.png"; }\r
+ }\r
+ description {\r
+ state: "step_29" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_29.png"; }\r
+ }\r
+ description {\r
+ state: "step_30" 0.0;\r
+ inherit: "show" 0.0;\r
+ visible: 1;\r
+ image { normal: "gallery_loading_ani_30.png"; }\r
+ }\r
+ description {\r
+ state: "step_0" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ }\r
+ }\r
+ } // parts\r
+\r
+ programs {\r
+ CONTROL_BUTTON_STEP( "loading.image", 0);\r
+ CONTROL_BUTTON_STEP( "loading.image", 1);\r
+ CONTROL_BUTTON_STEP( "loading.image", 2);\r
+ CONTROL_BUTTON_STEP( "loading.image", 3);\r
+ CONTROL_BUTTON_STEP( "loading.image", 4);\r
+ CONTROL_BUTTON_STEP( "loading.image", 5);\r
+ CONTROL_BUTTON_STEP( "loading.image", 6);\r
+ CONTROL_BUTTON_STEP( "loading.image", 7);\r
+ CONTROL_BUTTON_STEP( "loading.image", 8);\r
+ CONTROL_BUTTON_STEP( "loading.image", 9);\r
+ CONTROL_BUTTON_STEP( "loading.image", 10);\r
+ CONTROL_BUTTON_STEP( "loading.image", 11);\r
+ CONTROL_BUTTON_STEP( "loading.image", 12);\r
+ CONTROL_BUTTON_STEP( "loading.image", 13);\r
+ CONTROL_BUTTON_STEP( "loading.image", 14);\r
+ CONTROL_BUTTON_STEP( "loading.image", 15);\r
+ CONTROL_BUTTON_STEP( "loading.image", 16);\r
+ CONTROL_BUTTON_STEP( "loading.image", 17);\r
+ CONTROL_BUTTON_STEP( "loading.image", 18);\r
+ CONTROL_BUTTON_STEP( "loading.image", 19);\r
+ CONTROL_BUTTON_STEP( "loading.image", 20);\r
+ CONTROL_BUTTON_STEP( "loading.image", 21);\r
+ CONTROL_BUTTON_STEP( "loading.image", 22);\r
+ CONTROL_BUTTON_STEP( "loading.image", 23);\r
+ CONTROL_BUTTON_STEP( "loading.image", 24);\r
+ CONTROL_BUTTON_STEP( "loading.image", 25);\r
+ CONTROL_BUTTON_STEP( "loading.image", 26);\r
+ CONTROL_BUTTON_STEP( "loading.image", 27);\r
+ CONTROL_BUTTON_STEP( "loading.image", 28);\r
+ CONTROL_BUTTON_STEP( "loading.image", 29);\r
+ CONTROL_BUTTON_STEP( "loading.image", 30);\r
+\r
+ } // programs\r
+ } // group\r
+} // collections\r
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
-
-#define BUTTON_PRESS_COLOR 240 123 20 255
-
-#include "image_res.edc"
-#include "vp_font.edc"
-
-/* part macro */
-
-#define CONTROL_BUTTON_PRESS_PART(_name_ , _w_ , _h_ , _align_x_ , _align_y_ , _rel_x1_ , _rel_x2_ , _rel_y1_, _rel_y2_ , _img_def_ , _img_press_ ) \
-part { \
- name: _name_; \
- type: IMAGE; \
- scale: 1; \
- mouse_events: 1; \
- description { \
- state: "default" 0.0; \
- min: _w_ _h_; \
- fixed: 1 1; \
- align: _align_x_ _align_y_; \
- rel1 { relative: _rel_x1_ _rel_y1_; } \
- rel2 { relative: _rel_x2_ _rel_y2_; } \
- image { normal: _img_def_; border: 4 4 0 0;} \
- color: 255 255 255 255; \
- } \
- description { \
- state: "pressed" 0.0; \
- min: _w_ _h_; \
- fixed: 1 1; \
- align: _align_x_ _align_y_; \
- rel1 { relative: _rel_x1_ _rel_y1_; } \
- rel2 { relative: _rel_x2_ _rel_y2_; } \
- image { normal: _img_press_; border: 4 4 0 0;} \
- color: 255 255 255 255; \
- } \
- description { \
- state: "hide" 0.0; \
- inherit: "default" 0.0; \
- visible: 0; \
- } \
-} /* CONTROL_BUTTON_PRESS_PART */
-
-
-
-/* program macro */
-
-#define CONTROL_BUTTON_PROG(_item_name_) \
-program { \
- name: _item_name_".pressed"; \
- source: _item_name_; \
- signal: "mouse,down,1"; \
- action: STATE_SET "pressed" 0.0; \
- target: _item_name_; \
- after: "send."_item_name_".down.signal"; \
-} \
-program { \
- name: _item_name_".clicked"; \
- source: _item_name_; \
- signal: "mouse,up,1"; \
- action: STATE_SET "default" 0.0; \
- target: _item_name_; \
- after: "send."_item_name_".up.signal"; \
-} \
-program { \
- name: "send."_item_name_".down.signal"; \
- action: SIGNAL_EMIT "signal."_item_name_".down" _item_name_; \
-} \
-program { \
- name: "send."_item_name_".up.signal"; \
- action: SIGNAL_EMIT "signal."_item_name_".up" _item_name_; \
-} /* CONTROL_BUTTON_PROG */
-
-
-
-
-
-collections {
- group {
- name: "control";
-
- script {
- public val_volume_check = 0; /* 0: unmute, 1: mute */
- public val_play_status = 0; /* 0: pause , 1: resume */
- public val_display_mode = 0; /* 0: normal, 1: streaming */
- public val_ff_mode = 0; /* 0: normal, 1: extend */
- public val_rew_mode = 0; /* 0: normal, 1: extend */
-
- public change_display_mode() {
-
- run_program(PROGRAM:"set.visible.off");
-
- if(get_int(val_display_mode ) == 0) { /* normal mode */
- run_program(PROGRAM:"set.mode.normal");
- }
- if(get_int(val_display_mode ) == 1) { /* streaming mode */
- run_program(PROGRAM:"set.mode.streaming");
- }
- } /* change_display_mode */
-
-
- public set_volume_check() {
- if(get_int(val_volume_check ) == 0) {
- run_program(PROGRAM:"set.volume.unmute");
- }
- else {
- run_program(PROGRAM:"set.volume.mute");
- }
- } /* set_volume_check */
-
- public send_play_value() {
- if(get_int(val_play_status ) == 0) {
- run_program(PROGRAM:"send.play.resume");
- }
- else {
- run_program(PROGRAM:"send.play.pause");
- }
- } /* send_play_value */
-
-
- public set_play_status() {
- if(get_int(val_play_status ) == 0) {
- run_program(PROGRAM:"set.play.default");
- }
- else {
- run_program(PROGRAM:"set.play.pause");
- }
- } /* set_play_status */
-
-
- public set_play_button_press() {
- if(get_int(val_play_status ) == 0) {
- run_program(PROGRAM:"press.resume.button");
- }
- else {
- run_program(PROGRAM:"press.pause.button");
- }
- } /* set_play_button_press */
-
- public change_ff_mode() {
- if(get_int(val_ff_mode ) == 0) {
- run_program(PROGRAM:"set.ff.normal.mode");
- }
- else {
- run_program(PROGRAM:"set.ff.extend.mode");
- }
-
- } /* change_ff_mode */
-
- public change_rew_mode() {
- if(get_int(val_rew_mode ) == 0) {
- run_program(PROGRAM:"set.rew.normal.mode");
- }
- else {
- run_program(PROGRAM:"set.rew.extend.mode");
- }
- } /* change_rew_mode */
-
- public check_ff_press() {
- if(get_int(val_ff_mode ) == 0) {
- run_program(PROGRAM:"set.ff.normal.press");
- }
- else {
- run_program(PROGRAM:"set.ff.extend.press");
- }
-
- } /* check_ff_press */
-
- public check_rew_press() {
- if(get_int(val_rew_mode ) == 0) {
- run_program(PROGRAM:"set.rew.normal.press");
- }
- else {
- run_program(PROGRAM:"set.rew.extend.press");
- }
- } /* check_rew_press */
- } /* script */
-
- parts {
- part {
- name: "control.rect";
- type: RECT;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- align: 0.0 0.5;
- visible : 0;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- color: 255 0 0 0;
- }
- }
-
- CONTROL_BUTTON_PRESS_PART("control.back.button.bg", 74 ,74, 1.0, 0.0, 1.0, 1.0, 0.15625, 0.15625, "T01_controller_btn.png" , "T01_controller_btn_press.png");
- part {
- name: "control.back.button";
- type: IMAGE;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- min: 74 74;
- fixed: 1 1;
- align: 0.5 0.5;
- rel1 { relative: 0.5 0.5; to: "control.back.button.bg"; }
- rel2 { relative: 0.5 0.5; to: "control.back.button.bg"; }
- image { normal: "T01_back.png"; }
- color: 255 255 255 255;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
-
- CONTROL_BUTTON_PRESS_PART("control.volume.button.bg", 74 ,74, 0.0, 0.0, 0.0, 0.0, 0.15625, 0.15625, "T01_controller_btn.png" , "T01_controller_btn_press.png");
- part {
- name: "control.volume.button";
- type: IMAGE;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- min: 74 74;
- fixed: 1 1;
- align: 0.5 0.5;
- rel1 { relative: 0.5 0.5; to: "control.volume.button.bg"; }
- rel2 { relative: 0.5 0.5; to: "control.volume.button.bg"; }
- image { normal: "gallery_video_icon_volume.png"; }
- color: 255 255 255 255;
- }
- description {
- state: "mute" 0.0;
- visible: 1;
- min: 74 74;
- fixed: 1 1;
- align: 0.5 0.5;
- rel1 { relative: 0.5 0.5; to: "control.volume.button.bg"; }
- rel2 { relative: 0.5 0.5; to: "control.volume.button.bg"; }
- image { normal: "gallery_video_icon_mute.png"; }
- color: 255 255 255 255;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
-
- part {
- name: "control.play.button";
- type: IMAGE;
- scale: 1;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- min: 80 80;
- fixed: 1 1;
- align: 0.5 0.0;
- rel1 { relative: 0.5 0.2205; }
- rel2 { relative: 0.5 0.2205; }
- image { normal: "gallery_video_control_play.png"; }
- color: 255 255 255 255;
- }
- description {
- state: "pause" 0.0;
- inherit: "default" 0.0;
- image { normal: "gallery_video_control_pause.png"; }
- color: 255 255 255 255;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- description {
- state: "press_resume" 0.0;
- inherit: "default" 0.0;
- image { normal: "gallery_video_control_play.png"; }
- color: BUTTON_PRESS_COLOR;
- }
- description {
- state: "press_pause" 0.0;
- inherit: "default" 0.0;
- image { normal: "gallery_video_control_pause.png"; }
- color: BUTTON_PRESS_COLOR;
- }
- }
-
-
- /* normal mode control part */
- part {
- name: "control.normal.rew.button";
- type: IMAGE;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- min: 80 80;
- fixed: 1 1;
- align: 0.5 0.0;
- rel1 { relative: 0.3 0.2205; }
- rel2 { relative: 0.3 0.2205; }
- image { normal: "gallery_video_control_rew.png"; }
- color: 255 255 255 255;
- }
- description {
- state: "extend" 0.0;
- inherit: "default" 0.0;
- image { normal: "gallery_video_control_prev.png"; }
- }
- description {
- state: "pressed" 0.0;
- inherit: "default" 0.0;
- color: BUTTON_PRESS_COLOR;
- }
- description {
- state: "pressed.extend" 0.0;
- inherit: "extend" 0.0;
- color: BUTTON_PRESS_COLOR;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
-
- part {
- name: "control.normal.ff.button";
- type: IMAGE;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- min: 80 80;
- fixed: 1 1;
- align: 0.5 0.0;
- rel1 { relative: 0.7 0.2205; }
- rel2 { relative: 0.7 0.2205; }
- image { normal: "gallery_video_control_ff.png"; }
- color: 255 255 255 255;
- }
- description {
- state: "extend" 0.0;
- inherit: "default" 0.0;
- image { normal: "gallery_video_control_next.png"; }
- }
- description {
- state: "pressed" 0.0;
- inherit: "default" 0.0;
- color: BUTTON_PRESS_COLOR;
- }
- description {
- state: "pressed.extend" 0.0;
- inherit: "extend" 0.0;
- color: BUTTON_PRESS_COLOR;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- /* <-- normal mode control part */
-
- } /* parts */
-
-
- programs {
- program {
- signal: "signal.control.mode.normal";
- source: "*";
- script {
- set_int(val_display_mode, 0);
- change_display_mode();
- set_play_status();
- }
- }
-
- program {
- signal: "signal.control.mode.streaming";
- source: "*";
- script {
- set_int(val_display_mode, 1);
- change_display_mode();
- set_play_status();
- }
- }
-
- program {
- signal: "signal.control.mode.visible.off";
- source: "*";
- after: "set.visible.off";
- }
-
- program {
- name: "set.visible.off";
- source: "*";
- action: STATE_SET "hide" 0.0;
-
- target: "control.play.button";
- target: "control.back.button";
- target: "control.back.button.bg";
- target: "control.volume.button";
- target: "control.volume.button.bg";
- target: "control.normal.rew.button";
- target: "control.normal.ff.button";
- }
-
- program {
- name: "set.mode.normal";
- source: "*";
- action: STATE_SET "default" 0.0;
-
- target: "control.play.button";
- target: "control.back.button";
- target: "control.back.button.bg";
- target: "control.volume.button";
- target: "control.volume.button.bg";
- target: "control.normal.rew.button";
- target: "control.normal.ff.button";
- }
-
- program {
- name: "set.mode.streaming";
- source: "*";
- action: STATE_SET "default" 0.0;
-
- target: "control.play.button";
- target: "control.back.button";
- target: "control.back.button.bg";
- target: "control.volume.button";
- target: "control.volume.button.bg";
- }
-
- program {
- signal: "signal.control.back.button.down";
- source: "control.back.button";
- script: { set_state(PART:"control.back.button.bg", "pressed", 0.0); }
- }
-
- program {
- signal: "signal.control.back.button.up";
- source: "control.back.button";
- script: { set_state(PART:"control.back.button.bg", "default", 0.0); }
- }
-
- program {
- name: "control.volume.button.bg.press";
- source: "control.volume.button";
- signal: "signal.control.volume.button.down";
- script: {
- set_state(PART:"control.volume.button.bg", "pressed", 0.0);
- set_volume_check();
- }
- }
-
- program {
- name: "control.volume.button.bg.up";
- source: "control.volume.button";
- signal: "signal.control.volume.button.up";
- script: {
- set_state(PART:"control.volume.button.bg", "default", 0.0);
- set_volume_check();
- }
- }
-
- program {
- name: "control.normal.rew.button.press";
- source: "control.normal.rew.button";
- signal: "signal.control.normal.rew.button.down";
- script: {
- check_rew_press();
- }
- }
-
- program {
- name: "control.normal.ff.button.press";
- source: "control.normal.ff.button";
- signal: "signal.control.normal.ff.button.down";
- script: {
- check_ff_press();
- }
- }
-
- program {
- name: "control.normal.rew.button.up";
- source: "control.normal.rew.button";
- signal: "signal.control.normal.rew.button.up";
- script: {
- change_rew_mode();
- }
- }
-
- program {
- name: "control.normal.ff.button.up";
- source: "control.normal.ff.button";
- signal: "signal.control.normal.ff.button.up";
- script: {
- change_ff_mode();
- }
- }
-
-
- /* --> mute/unmute check prog*/
- program {
- signal: "signal.control.volume.button.mute";
- source: "*";
- script {
- set_int(val_volume_check, 1);
- set_volume_check();
- }
- }
-
- program {
- signal: "signal.control.volume.button.unmute";
- source: "*";
- script {
- set_int(val_volume_check, 0);
- set_volume_check();
- }
- }
-
- program {
- name: "set.volume.unmute";
- action: STATE_SET "default" 0.0;
- target: "control.volume.button";
- }
- program {
- name: "set.volume.mute";
- action: STATE_SET "mute" 0.0;
- target: "control.volume.button";
- }
- /* --> mute/unmute check prog*/
-
- /* --> play status part */
- program {
- name: "press.resume.button";
- action: STATE_SET "press_resume" 0.0;
- target: "control.play.button";
- }
- program {
- name: "press.pause.button";
- action: STATE_SET "press_pause" 0.0;
- target: "control.play.button";
- }
-
- program {
- name: "control.play.button.down";
- source: "control.play.button";
- signal: "signal.control.play.button.down";
- script: {set_play_button_press(); }
- }
-
- program {
- name: "control.play.button.up";
- source: "control.play.button";
- signal: "signal.control.play.button.up";
- script: { send_play_value(); }
- }
-
-
- program {
- name: "set.ff.normal.mode";
- action: STATE_SET "default" 0.0;
- target: "control.normal.ff.button";
- }
-
- program {
- name: "set.rew.normal.mode";
- action: STATE_SET "default" 0.0;
- target: "control.normal.rew.button";
- }
-
- program {
- name: "set.ff.extend.mode";
- action: STATE_SET "extend" 0.0;
- target: "control.normal.ff.button";
- }
-
- program {
- name: "set.rew.extend.mode";
- action: STATE_SET "extend" 0.0;
- target: "control.normal.rew.button";
- }
-
- program {
- name: "set.ff.normal.press";
- action: STATE_SET "pressed" 0.0;
- target: "control.normal.ff.button";
- }
-
- program {
- name: "set.rew.normal.press";
- action: STATE_SET "pressed" 0.0;
- target: "control.normal.rew.button";
- }
-
- program {
- name: "set.ff.extend.press";
- action: STATE_SET "pressed.extend" 0.0;
- target: "control.normal.ff.button";
- }
-
- program {
- name: "set.rew.extend.press";
- action: STATE_SET "pressed.extend" 0.0;
- target: "control.normal.rew.button";
- }
-
- program {
- signal: "signal.control.play.resume";
- source: "*";
- script {
- set_int(val_play_status, 1);
- set_play_status();
- }
- }
-
- program {
- signal: "signal.control.play.pause";
- source: "*";
- script {
- set_int(val_play_status, 0);
- set_play_status();
- }
- }
-
- program {
- signal: "signal.control.ff.normal";
- source: "*";
- script {
- set_int(val_ff_mode, 0);
- change_ff_mode();
- }
- }
-
- program {
- signal: "signal.control.ff.extend";
- source: "*";
- script {
- set_int(val_ff_mode, 1);
- change_ff_mode();
- }
- }
-
- program {
- signal: "signal.control.rew.normal";
- source: "*";
- script {
- set_int(val_rew_mode, 0);
- change_rew_mode();
- }
- }
-
- program {
- signal: "signal.control.rew.extend";
- source: "*";
- script {
- set_int(val_rew_mode, 1);
- change_rew_mode();
- }
- }
-
- program {
- name: "set.play.default";
- source: "control.play.button";
- action: STATE_SET "default" 0.0;
- target: "control.play.button";
- }
- program {
- name: "set.play.pause";
- source: "control.play.button";
- action: STATE_SET "pause" 0.0;
- target: "control.play.button";
- }
-
- program {
- name: "send.play.pause";
- action: SIGNAL_EMIT "signal.control.play.pause.press" "control.play.button";
- }
-
- program {
- name: "send.play.resume";
- action: SIGNAL_EMIT "signal.control.play.resume.press" "control.play.button";
- }
- /* <-- play status part */
-
- /* -->common control prog */
- CONTROL_BUTTON_PROG("control.play.button");
- CONTROL_BUTTON_PROG("control.back.button");
- CONTROL_BUTTON_PROG("control.volume.button");
- /* <-- common control prog */
-
- /* -->normal mode prog */
- CONTROL_BUTTON_PROG("control.normal.ff.button");
- CONTROL_BUTTON_PROG("control.normal.rew.button");
-
- /* <-- normal mode prog */
- } /*programs */
- } /* group */
-} /* collections */
-
+\r
+#define BUTTON_PRESS_COLOR 56 149 205 255\r
+#define CONTROL_ICON_SIZE 56 56\r
+#include "image_res.edc"\r
+#include "vp_font.edc"\r
+\r
+// part macro\r
+\r
+#define CONTROL_BUTTON_PRESS_PART(_name_ , _w_ , _h_ , _align_x_ , _align_y_ , _rel_x1_ , _rel_x2_ , _rel_y1_, _rel_y2_ , _to_ , _img_def_ , _img_press_ ) \\r
+part { \\r
+ name: _name_; \\r
+ type: IMAGE; \\r
+ scale: 1; \\r
+ mouse_events: 1; \\r
+ description { \\r
+ state: "default" 0.0; \\r
+ min: _w_ _h_; \\r
+ fixed: 1 1; \\r
+ align: _align_x_ _align_y_; \\r
+ rel1 { relative: _rel_x1_ _rel_y1_; to : _to_;} \\r
+ rel2 { relative: _rel_x2_ _rel_y2_; to : _to_;} \\r
+ image { normal: _img_def_; border: 4 4 0 0;} \\r
+ color: 255 255 255 255; \\r
+ } \\r
+ description { \\r
+ state: "pressed" 0.0; \\r
+ min: _w_ _h_; \\r
+ fixed: 1 1; \\r
+ align: _align_x_ _align_y_; \\r
+ rel1 { relative: _rel_x1_ _rel_y1_; to : _to_;} \\r
+ rel2 { relative: _rel_x2_ _rel_y2_; to : _to_;} \\r
+ image { normal: _img_press_; border: 4 4 0 0;} \\r
+ color: 255 255 255 255; \\r
+ } \\r
+ description { \\r
+ state: "hide" 0.0; \\r
+ inherit: "default" 0.0; \\r
+ visible: 0; \\r
+ } \\r
+} // CONTROL_BUTTON_PRESS_PART\r
+\r
+\r
+\r
+// program macro\r
+\r
+#define CONTROL_BUTTON_PROG(_item_name_) \\r
+program { \\r
+ name: _item_name_".pressed"; \\r
+ source: _item_name_; \\r
+ signal: "mouse,down,1"; \\r
+ action: STATE_SET "pressed" 0.0; \\r
+ target: _item_name_; \\r
+ after: "send."_item_name_".down.signal"; \\r
+} \\r
+program { \\r
+ name: _item_name_".clicked"; \\r
+ source: _item_name_; \\r
+ signal: "mouse,up,1"; \\r
+ action: STATE_SET "default" 0.0; \\r
+ target: _item_name_; \\r
+ after: "send."_item_name_".up.signal"; \\r
+} \\r
+program { \\r
+ name: "send."_item_name_".down.signal"; \\r
+ action: SIGNAL_EMIT "signal."_item_name_".down" _item_name_; \\r
+} \\r
+program { \\r
+ name: "send."_item_name_".up.signal"; \\r
+ action: SIGNAL_EMIT "signal."_item_name_".up" _item_name_; \\r
+} // CONTROL_BUTTON_PROG\r
+\r
+\r
+#define CONTROL_BUTTON_STEP(_item_name_, _val_) \\r
+program { \\r
+ signal: "signal."_item_name_".step."_val_; \\r
+ source: "*"; \\r
+ action: STATE_SET "step_"_val_ 0.0; \\r
+ target: _item_name_; \\r
+} // CONTROL_BUTTON_STEP\r
+\r
+#define CONTROL_BUTTON_STEP_LANDSCAPE(_item_name_, _val_) \\r
+program { \\r
+ signal: "signal."_item_name_".landscape.step."_val_; \\r
+ source: "*"; \\r
+ action: STATE_SET "step_"_val_"_landscape" 0.0; \\r
+ target: _item_name_; \\r
+} // CONTROL_BUTTON_STEP\r
+\r
+collections {\r
+ group {\r
+ name: "control";\r
+\r
+ script {\r
+ public val_volume_check = 0; /* 0: unmute, 1: mute */\r
+ public val_play_status = 0; /* 0: pause , 1: resume */\r
+ public val_display_mode = 0; /* 0: normal, 1: trim, 2: streaming, 3: DLNA*/\r
+ public val_rotate_mode = 0; /* 0: portrate, 1: landscape */\r
+\r
+ public change_display_mode() {\r
+\r
+ run_program(PROGRAM:"set.visible.off");\r
+\r
+ if(get_int(val_display_mode ) == 0) { /* normal mode */\r
+ run_program(PROGRAM:"set.mode.normal");\r
+ }\r
+ if(get_int(val_display_mode ) == 1) { /* trim mode */\r
+ run_program(PROGRAM:"set.mode.trim");\r
+ }\r
+ if(get_int(val_display_mode ) == 2) { /* streaming mode */\r
+ run_program(PROGRAM:"set.mode.streaming");\r
+ }\r
+ if(get_int(val_display_mode ) == 3) { /* dlna mode */\r
+ run_program(PROGRAM:"set.mode.dlna");\r
+ }\r
+ } /* change_display_mode */\r
+\r
+\r
+ public set_volume_check() {\r
+ if(get_int(val_volume_check ) == 0) {\r
+ run_program(PROGRAM:"set.volume.unmute");\r
+ }\r
+ else {\r
+ run_program(PROGRAM:"set.volume.mute");\r
+ }\r
+ } /* set_volume_check */\r
+\r
+ public send_play_value() {\r
+ if(get_int(val_play_status ) == 0) {\r
+ run_program(PROGRAM:"send.play.resume");\r
+ }\r
+ else {\r
+ run_program(PROGRAM:"send.play.pause");\r
+ }\r
+ } /* send_play_value */\r
+\r
+\r
+ public set_play_status() {\r
+ if(get_int(val_play_status ) == 0) {\r
+ run_program(PROGRAM:"set.play.default");\r
+ }\r
+ else {\r
+ run_program(PROGRAM:"set.play.pause");\r
+ }\r
+ } /* set_play_status */\r
+\r
+\r
+ public set_play_button_press() {\r
+ if(get_int(val_play_status ) == 0) {\r
+ run_program(PROGRAM:"press.resume.button");\r
+ }\r
+ else {\r
+ run_program(PROGRAM:"press.pause.button");\r
+ }\r
+ } // set_play_button_press\r
+ } // script\r
+\r
+ parts {\r
+ part {\r
+ name: "control.rect";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ description {\r
+ state: "default" 0.0;\r
+ align: 0.0 0.5;\r
+ visible : 0;\r
+ rel1 { relative: 0.0 0.0; }\r
+ rel2 { relative: 1.0 1.0; }\r
+ color: 255 0 0 0;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.rect.1";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ align: 0.0 0.5;\r
+ min: 144 0;\r
+ fixed: 1 0;\r
+ visible : 1;\r
+ rel1 { relative: 0.0 0.0; }\r
+ rel2 { relative: 0.2 1.0; }\r
+ color: 255 0 0 0;\r
+ }\r
+ description {\r
+ state: "landscape" 0.0;\r
+ inherit: "default" 0.0;\r
+ min: 180 0;\r
+ rel1 { relative: 0.0 0.0; }\r
+ rel2 { relative: 0.1406 1.0; }\r
+\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.rect.2";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ align: 0.0 0.0;\r
+ min: 144 0;\r
+ fixed: 1 0;\r
+ visible : 1;\r
+ rel1 { relative: 0.2 0.0;}\r
+ rel2 { relative: 0.4 1.0;}\r
+ color: 0 255 0 0;\r
+ }\r
+ description {\r
+ state: "landscape" 0.0;\r
+ inherit: "default" 0.0;\r
+ min: 271 0;\r
+ rel1 { relative: 0.18125 0.0;}\r
+ rel2 { relative: 0.39296 1.0;}\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.rect.3";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ align: 0.0 0.0;\r
+ min: 144 0;\r
+ fixed: 1 0;\r
+ visible : 1;\r
+ rel1 { relative: 0.4 0.0; }\r
+ rel2 { relative: 0.6 1.0; }\r
+ color: 0 0 255 0;\r
+ }\r
+ description {\r
+ state: "landscape" 0.0;\r
+ inherit: "default" 0.0;\r
+ min: 271 0;\r
+ rel1 { relative: 0.39453 0.0; }\r
+ rel2 { relative: 0.60625 1.0; }\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.rect.4";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ align: 0.0 0.0;\r
+ min: 144 0;\r
+ fixed: 1 0;\r
+ visible : 1;\r
+ rel1 { relative: 0.6 0.0;}\r
+ rel2 { relative: 0.8 1.0;}\r
+ color: 255 255 0 0;\r
+ }\r
+ description {\r
+ state: "landscape" 0.0;\r
+ inherit: "default" 0.0;\r
+ min: 271 0;\r
+ rel1 { relative: 0.60781 0.0; }\r
+ rel2 { relative: 0.81953 1.0; }\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.rect.5";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible : 1;\r
+ min: 144 0;\r
+ fixed: 1 0;\r
+ align: 1.0 0.0;\r
+ rel1 { relative: 0.8 0.0;}\r
+ rel2 { relative: 1.0 1.0;}\r
+ color: 255 255 255 0;\r
+ }\r
+ description {\r
+ state: "landscape" 0.0;\r
+ inherit: "default" 0.0;\r
+ min: 180 0;\r
+ rel1 { relative: 0.85937 0.0;}\r
+ rel2 { relative: 1.0 1.0;}\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.rect.1.line";\r
+ type: RECT;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: 1 70;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 1.0 0.5; to: "control.rect.1"; }\r
+ rel2 { relative: 1.0 0.5; to: "control.rect.1"; }\r
+ color: 144 144 144 178;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.rect.2.line";\r
+ type: RECT;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: 1 70;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.0 0.5; to: "control.rect.5"; }\r
+ rel2 { relative: 0.0 0.5; to: "control.rect.5"; }\r
+ color: 144 144 144 178;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.volume.button";\r
+ type: IMAGE;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: CONTROL_ICON_SIZE;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5; to: "control.rect.1"; }\r
+ rel2 { relative: 0.5 0.5; to: "control.rect.1"; }\r
+ image { normal: "white/panel/T01-2_btn_toolbar_volume.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "pressed" 0.0;\r
+ inherit: "default" 0.0;\r
+ color: BUTTON_PRESS_COLOR;\r
+ }\r
+ description {\r
+ state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.back.button";\r
+ type: IMAGE;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: CONTROL_ICON_SIZE;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5; to: "control.rect.5"; }\r
+ rel2 { relative: 0.5 0.5; to: "control.rect.5"; }\r
+ image { normal: "white/panel/T01-2_btn_toolbar_back.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "pressed" 0.0;\r
+ inherit: "default" 0.0;\r
+ color: BUTTON_PRESS_COLOR;\r
+ }\r
+ description {\r
+ state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.trim.done.button";\r
+ type: IMAGE;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: 56 56;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5; to: "control.rect.1"; }\r
+ rel2 { relative: 0.5 0.5; to: "control.rect.1"; }\r
+ image { normal: "panel/T01-2_icon_toolbar_done.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ }\r
+ description {\r
+ state: "pressed" 0.0;\r
+ inherit: "default" 0.0;\r
+ color: BUTTON_PRESS_COLOR;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.trim.cancel.button";\r
+ type: IMAGE;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: 56 56;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5; to: "control.rect.5"; }\r
+ rel2 { relative: 0.5 0.5; to: "control.rect.5"; }\r
+ image { normal: "panel/T01-2_icon_toolbar_cancel.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ }\r
+ description {\r
+ state: "pressed" 0.0;\r
+ inherit: "default" 0.0;\r
+ color: BUTTON_PRESS_COLOR;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.play.button";\r
+ type: IMAGE;\r
+ scale: 1;\r
+ mouse_events: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: CONTROL_ICON_SIZE;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5; to: "control.rect.3"; }\r
+ rel2 { relative: 0.5 0.5; to: "control.rect.3"; }\r
+ image { normal: "white/control/T01-2_icon_toolbar_play.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "pause" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "white/control/T01-2_icon_toolbar_pause.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ }\r
+ description {\r
+ state: "press_resume" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "white/control/T01-2_icon_toolbar_play.png"; }\r
+ color: BUTTON_PRESS_COLOR;\r
+ }\r
+ description {\r
+ state: "press_pause" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "white/control/T01-2_icon_toolbar_pause.png"; }\r
+ color: BUTTON_PRESS_COLOR;\r
+ }\r
+ }\r
+\r
+\r
+ // normal mode control part\r
+ part {\r
+ name: "control.normal.rew.button";\r
+ type: IMAGE;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: CONTROL_ICON_SIZE;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5; to: "control.rect.2";}\r
+ rel2 { relative: 0.5 0.5; to: "control.rect.2";}\r
+ image { normal: "white/control/T01-2_icon_toolbar_previous.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "pressed" 0.0;\r
+ inherit: "default" 0.0;\r
+ color: BUTTON_PRESS_COLOR;\r
+ }\r
+ description {\r
+ state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ }\r
+ description {\r
+ state: "step_1" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_control_rew_2.png"; }\r
+ }\r
+ description {\r
+ state: "step_2" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_control_rew_3.png"; }\r
+ }\r
+ description {\r
+ state: "step_3" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_control_rew_4.png"; }\r
+ }\r
+ description {\r
+ state: "step_4" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_control_rew_5.png"; }\r
+ }\r
+ description {\r
+ state: "portrate" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.normal.ff.button";\r
+ type: IMAGE;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: CONTROL_ICON_SIZE;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5; to: "control.rect.4"; }\r
+ rel2 { relative: 0.5 0.5; to: "control.rect.4";}\r
+ image { normal: "white/control/T01-2_icon_toolbar_next.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "pressed" 0.0;\r
+ inherit: "default" 0.0;\r
+ color: BUTTON_PRESS_COLOR;\r
+ }\r
+ description {\r
+ state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ }\r
+ description {\r
+ state: "step_1" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_control_ff_2.png"; }\r
+ }\r
+ description {\r
+ state: "step_2" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_control_ff_3.png"; }\r
+ }\r
+ description {\r
+ state: "step_3" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_control_ff_4.png"; }\r
+ }\r
+ description {\r
+ state: "step_4" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_control_ff_5.png"; }\r
+ }\r
+ description {\r
+ state: "portrate" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+\r
+ }\r
+ // <-- normal mode control part\r
+\r
+\r
+\r
+ // --> trim mode control part\r
+ part {\r
+ name: "control.trim.rew.button";\r
+ type: IMAGE;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: 162 78;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5; to: "control.rect.2"; }\r
+ rel2 { relative: 0.5 0.5; to: "control.rect.2"; }\r
+ image { normal: "gallery_video_rewind_1x.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "pressed" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_rewind_1x.png"; }\r
+ color: BUTTON_PRESS_COLOR;\r
+ }\r
+ description {\r
+ state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ }\r
+ description {\r
+ state: "step_1" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_rewind_2x.png"; }\r
+ }\r
+ description {\r
+ state: "step_2" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_rewind_3x.png"; }\r
+ }\r
+ description {\r
+ state: "step_3" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_rewind_4x.png"; }\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "control.trim.ff.button";\r
+ type: IMAGE;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ min: 162 78;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5; to: "control.rect.4"; }\r
+ rel2 { relative: 0.5 0.5; to: "control.rect.4"; }\r
+ image { normal: "gallery_video_fastforward_1x.png"; }\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "pressed" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_fastforward_1x.png"; }\r
+ color: BUTTON_PRESS_COLOR;\r
+ }\r
+ description {\r
+ state: "hide" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 0;\r
+ }\r
+ description {\r
+ state: "step_1" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_fastforward_2x.png"; }\r
+ }\r
+ description {\r
+ state: "step_2" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_fastforward_3x.png"; }\r
+ }\r
+ description {\r
+ state: "step_3" 0.0;\r
+ inherit: "default" 0.0;\r
+ image { normal: "gallery_video_fastforward_4x.png"; }\r
+ }\r
+ } // <-- trim mode control part\r
+ } // parts\r
+\r
+\r
+ programs {\r
+ program {\r
+ signal: "signal.control.mode.normal";\r
+ source: "*";\r
+ script {\r
+ set_int(val_display_mode, 0);\r
+ change_display_mode();\r
+ set_play_status();\r
+ }\r
+ }\r
+\r
+ program {\r
+ signal: "signal.control.mode.trim";\r
+ source: "*";\r
+ script {\r
+ set_int(val_display_mode, 1);\r
+ change_display_mode();\r
+ set_play_status();\r
+ }\r
+ }\r
+\r
+ program {\r
+ signal: "signal.control.mode.streaming";\r
+ source: "*";\r
+ script {\r
+ set_int(val_display_mode, 2);\r
+ change_display_mode();\r
+ set_play_status();\r
+ }\r
+ }\r
+ program {\r
+ signal: "signal.control.mode.dlna";\r
+ source: "*";\r
+ script {\r
+ set_int(val_display_mode, 3);\r
+ change_display_mode();\r
+ set_play_status();\r
+ }\r
+ }\r
+\r
+ program {\r
+ signal: "signal.control.mode.visible.off";\r
+ source: "*";\r
+ after: "set.visible.off";\r
+ }\r
+\r
+ program {\r
+ name: "set.visible.off";\r
+ source: "*";\r
+ action: STATE_SET "hide" 0.0;\r
+\r
+ target: "control.play.button";\r
+ target: "control.back.button";\r
+ target: "control.volume.button";\r
+ target: "control.normal.rew.button";\r
+ target: "control.normal.ff.button";\r
+ target: "control.trim.rew.button";\r
+ target: "control.trim.ff.button";\r
+ target: "control.trim.done.button";\r
+ target: "control.trim.cancel.button";\r
+ }\r
+\r
+ program {\r
+ name: "set.mode.normal";\r
+ source: "*";\r
+ action: STATE_SET "default" 0.0;\r
+\r
+ target: "control.play.button";\r
+ target: "control.back.button";\r
+ target: "control.volume.button";\r
+ target: "control.normal.rew.button";\r
+ target: "control.normal.ff.button";\r
+ }\r
+\r
+ program {\r
+ name: "set.mode.trim";\r
+ source: "*";\r
+ action: STATE_SET "default" 0.0;\r
+\r
+ target: "control.play.button";\r
+ target: "control.trim.rew.button";\r
+ target: "control.trim.ff.button";\r
+ target: "control.trim.done.button";\r
+ target: "control.trim.cancel.button";\r
+ }\r
+\r
+ program {\r
+ name: "set.mode.streaming";\r
+ source: "*";\r
+ action: STATE_SET "default" 0.0;\r
+\r
+ target: "control.play.button";\r
+ target: "control.back.button";\r
+ target: "control.volume.button";\r
+ }\r
+\r
+ program {\r
+ name: "set.mode.dlna";\r
+ source: "*";\r
+ action: STATE_SET "default" 0.0;\r
+\r
+ target: "control.play.button";\r
+ target: "control.back.button";\r
+ target: "control.volume.button";\r
+ target: "control.normal.rew.button";\r
+ target: "control.normal.ff.button";\r
+\r
+ }\r
+\r
+ program {\r
+ name: "control.normal.rew.button.press";\r
+ source: "control.normal.rew.button";\r
+ signal: "signal.control.normal.rew.button.down";\r
+ script:\r
+ {\r
+ if(get_int(val_rotate_mode) == 0)\r
+ {\r
+ set_state(PART:"control.normal.rew.button", "pressed", 0.0);\r
+ }\r
+ else\r
+ {\r
+ set_state(PART:"control.normal.rew.button", "pressed_landscape", 0.0);\r
+ }\r
+ }\r
+ }\r
+\r
+ program {\r
+ name: "control.normal.rew.button.up";\r
+ source: "control.normal.rew.button";\r
+ signal: "signal.control.normal.rew.button.up";\r
+ script:\r
+ {\r
+ if(get_int(val_rotate_mode) == 0)\r
+ {\r
+ set_state(PART:"control.normal.rew.button", "portrate", 0.0);\r
+ }\r
+ else\r
+ {\r
+ set_state(PART:"control.normal.rew.button", "landscape", 0.0);\r
+ }\r
+ }\r
+ }\r
+\r
+ program {\r
+ name: "control.normal.ff.button.press";\r
+ source: "control.normal.ff.button";\r
+ signal: "signal.control.normal.ff.button.down";\r
+ script:\r
+ {\r
+ if(get_int(val_rotate_mode) == 0)\r
+ {\r
+ set_state(PART:"control.normal.ff.button", "pressed", 0.0);\r
+ }\r
+ else\r
+ {\r
+ set_state(PART:"control.normal.ff.button", "pressed_landscape", 0.0);\r
+ }\r
+ }\r
+ }\r
+\r
+ program {\r
+ name: "control.normal.ff.button.up";\r
+ source: "control.normal.ff.button";\r
+ signal: "signal.control.normal.ff.button.up";\r
+ script:\r
+ {\r
+ if(get_int(val_rotate_mode) == 0)\r
+ {\r
+ set_state(PART:"control.normal.ff.button", "portrate", 0.0);\r
+ }\r
+ else\r
+ {\r
+ set_state(PART:"control.normal.ff.button", "landscape", 0.0);\r
+ }\r
+ }\r
+ }\r
+\r
+\r
+ // --> mute/unmute check prog\r
+ program {\r
+ signal: "signal.control.volume.button.mute";\r
+ source: "*";\r
+ script {\r
+ set_int(val_volume_check, 1);\r
+ set_volume_check();\r
+ }\r
+ }\r
+\r
+ program {\r
+ signal: "signal.control.volume.button.unmute";\r
+ source: "*";\r
+ script {\r
+ set_int(val_volume_check, 0);\r
+ set_volume_check();\r
+ }\r
+ }\r
+\r
+ program {\r
+ name: "set.volume.unmute";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "control.volume.button";\r
+ }\r
+ program {\r
+ name: "set.volume.mute";\r
+ action: STATE_SET "mute" 0.0;\r
+ target: "control.volume.button";\r
+ }\r
+ // --> mute/unmute check prog\r
+\r
+ // --> play status part\r
+ program {\r
+ name: "press.resume.button";\r
+ action: STATE_SET "press_resume" 0.0;\r
+ target: "control.play.button";\r
+ }\r
+ program {\r
+ name: "press.pause.button";\r
+ action: STATE_SET "press_pause" 0.0;\r
+ target: "control.play.button";\r
+ }\r
+\r
+ program {\r
+ name: "control.play.button.down";\r
+ source: "control.play.button";\r
+ signal: "signal.control.play.button.down";\r
+ script: {set_play_button_press(); }\r
+ }\r
+\r
+ program {\r
+ name: "control.play.button.up";\r
+ source: "control.play.button";\r
+ signal: "signal.control.play.button.up";\r
+ script: { send_play_value(); }\r
+ }\r
+\r
+ program {\r
+ signal: "signal.control.play.resume";\r
+ source: "*";\r
+ script {\r
+ set_int(val_play_status, 1);\r
+ set_play_status();\r
+ }\r
+ }\r
+\r
+ program {\r
+ signal: "signal.control.play.pause";\r
+ source: "*";\r
+ script {\r
+ set_int(val_play_status, 0);\r
+ set_play_status();\r
+ }\r
+ }\r
+\r
+ program {\r
+ name: "set.play.default";\r
+ source: "control.play.button";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "control.play.button";\r
+ }\r
+ program {\r
+ name: "set.play.pause";\r
+ source: "control.play.button";\r
+ action: STATE_SET "pause" 0.0;\r
+ target: "control.play.button";\r
+ }\r
+\r
+ program {\r
+ name: "send.play.pause";\r
+ action: SIGNAL_EMIT "signal.control.play.pause.press" "control.play.button";\r
+ }\r
+\r
+ program {\r
+ name: "send.play.resume";\r
+ action: SIGNAL_EMIT "signal.control.play.resume.press" "control.play.button";\r
+ }\r
+\r
+ program {\r
+ signal: "signal.control.portrate.mode";\r
+ source: "*";\r
+ script {\r
+ set_int(val_rotate_mode, 0);\r
+ set_state(PART:"control.normal.rew.button", "portrate", 0.0);\r
+ set_state(PART:"control.normal.ff.button", "portrate", 0.0);\r
+ set_state(PART:"control.rect.1", "default", 0.0);\r
+ set_state(PART:"control.rect.2", "default", 0.0);\r
+ set_state(PART:"control.rect.3", "default", 0.0);\r
+ set_state(PART:"control.rect.4", "default", 0.0);\r
+ set_state(PART:"control.rect.5", "default", 0.0);\r
+ }\r
+ }\r
+\r
+ program {\r
+ signal: "signal.control.landscape.mode";\r
+ source: "*";\r
+ script {\r
+ set_int(val_rotate_mode, 1);\r
+ set_state(PART:"control.normal.rew.button", "landscape", 0.0);\r
+ set_state(PART:"control.normal.ff.button", "landscape", 0.0);\r
+ set_state(PART:"control.rect.1", "landscape", 0.0);\r
+ set_state(PART:"control.rect.2", "landscape", 0.0);\r
+ set_state(PART:"control.rect.3", "landscape", 0.0);\r
+ set_state(PART:"control.rect.4", "landscape", 0.0);\r
+ set_state(PART:"control.rect.5", "landscape", 0.0);\r
+ }\r
+ }\r
+\r
+ program {\r
+ signal: "signal.control.streaming.portrate.mode";\r
+ source: "*";\r
+ script {\r
+ set_int(val_rotate_mode, 0);\r
+\r
+ set_state(PART:"control.rect.1", "default", 0.0);\r
+ set_state(PART:"control.rect.2", "default", 0.0);\r
+ set_state(PART:"control.rect.3", "default", 0.0);\r
+ set_state(PART:"control.rect.4", "default", 0.0);\r
+ set_state(PART:"control.rect.5", "default", 0.0);\r
+ }\r
+ }\r
+\r
+ program {\r
+ signal: "signal.control.streaming.landscape.mode";\r
+ source: "*";\r
+ script {\r
+ set_int(val_rotate_mode, 1);\r
+ set_state(PART:"control.rect.1", "landscape", 0.0);\r
+ set_state(PART:"control.rect.2", "landscape", 0.0);\r
+ set_state(PART:"control.rect.3", "landscape", 0.0);\r
+ set_state(PART:"control.rect.4", "landscape", 0.0);\r
+ set_state(PART:"control.rect.5", "landscape", 0.0);\r
+ }\r
+ }\r
+ // <-- play status part\r
+\r
+ // -->common control prog\r
+ CONTROL_BUTTON_PROG("control.play.button");\r
+ CONTROL_BUTTON_PROG("control.back.button");\r
+ CONTROL_BUTTON_PROG("control.volume.button");\r
+ // <-- common control prog\r
+\r
+ // -->normal mode prog\r
+ CONTROL_BUTTON_PROG("control.normal.ff.button");\r
+ CONTROL_BUTTON_PROG("control.normal.rew.button");\r
+\r
+ CONTROL_BUTTON_STEP("control.normal.ff.button", 1);\r
+ CONTROL_BUTTON_STEP("control.normal.ff.button", 2);\r
+ CONTROL_BUTTON_STEP("control.normal.ff.button", 3);\r
+ CONTROL_BUTTON_STEP("control.normal.ff.button", 4);\r
+\r
+ CONTROL_BUTTON_STEP("control.normal.rew.button", 1);\r
+ CONTROL_BUTTON_STEP("control.normal.rew.button", 2);\r
+ CONTROL_BUTTON_STEP("control.normal.rew.button", 3);\r
+ CONTROL_BUTTON_STEP("control.normal.rew.button", 4);\r
+\r
+ CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.ff.button", 1);\r
+ CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.ff.button", 2);\r
+ CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.ff.button", 3);\r
+ CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.ff.button", 4);\r
+\r
+ CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.rew.button", 1);\r
+ CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.rew.button", 2);\r
+ CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.rew.button", 3);\r
+ CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.rew.button", 4);\r
+ // <-- normal mode prog\r
+\r
+ // --> trim mode prog\r
+ CONTROL_BUTTON_PROG("control.trim.ff.button");\r
+ CONTROL_BUTTON_PROG("control.trim.rew.button");\r
+\r
+ CONTROL_BUTTON_STEP("control.trim.ff.button", 1);\r
+ CONTROL_BUTTON_STEP("control.trim.ff.button", 2);\r
+ CONTROL_BUTTON_STEP("control.trim.ff.button", 3);\r
+\r
+ CONTROL_BUTTON_STEP("control.trim.rew.button", 1);\r
+ CONTROL_BUTTON_STEP("control.trim.rew.button", 2);\r
+ CONTROL_BUTTON_STEP("control.trim.rew.button", 3);\r
+\r
+ CONTROL_BUTTON_PROG("control.trim.done.button");\r
+ CONTROL_BUTTON_PROG("control.trim.cancel.button");\r
+ // <-- trim mode prog\r
+\r
+ } // programs\r
+ } // group\r
+} // collections\r
+\r
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
#include "image_res.edc"
#include "vp_font.edc"
}
} /* parts */
} /* group */
-} /* collections */
+} /* collections */
\ No newline at end of file
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
-
#include "image_res.edc"
#include "vp_font.edc"
/* program macro */
collections {
group {
- name: "hidden_panel";
-
+ name: "panel.button";
script {
- public val_quality_select = 1; /* 0: normal, 1: high */
- public set_quality_check() {
- if(get_int(val_quality_select ) == 0) {
- run_program(PROGRAM:"set.streaming.quality.normal");
+ public val_repeat_mode = 0; /* 0: repeat_off, 1: repeat_one, 2: repeate_all */
+ public change_repeat() {
+ if(get_int(val_repeat_mode) == 0) {
+ set_int(val_repeat_mode, 1);
+ run_program(PROGRAM:"send.panel.button.repeat.one");
}
- if(get_int(val_quality_select ) == 1) {
- run_program(PROGRAM:"set.streaming.quality.high");
+ else if(get_int(val_repeat_mode) == 1) {
+ set_int(val_repeat_mode, 2);
+ run_program(PROGRAM:"send.panel.button.repeat.all");
}
- if(get_int(val_quality_select ) == 2) {
- run_program(PROGRAM:"set.streaming.quality.hide");
+ else {
+ set_int(val_repeat_mode, 0);
+ run_program(PROGRAM:"send.panel.button.repeat.off");
}
}
- } /* scrpit */
+ }
parts {
part {
- name: "hidden.button.panel.soundpath";
+ name: "panel.button.sa";
type: IMAGE;
mouse_events: 1;
scale: 1;
description {
state: "default" 0.0;
visible: 1;
- min: 72 72;
+ min: 70 56;
fixed: 1 1;
- align: 0.0 0.5;
+ align: 0.0 0.0;
rel1 { relative: 0.0 0.0;}
- rel2 { relative: 0.0 0.0;}
+ rel2 { relative: 0.0 1.0;}
color: 255 255 255 255;
- image { normal: "T01_icon_soundPath.png"; }
+ image { normal: "panel/T01-2_icon_controller_sa.png"; }
}
description {
state: "pressed" 0.0;
inherit: "default" 0.0;
- image { normal: "T01_icon_soundPath_press.png"; }
+ image { normal: "panel/T01-2_icon_controller_sa.png"; }
}
description {
state: "hide" 0.0;
}
part {
- name: "control.streaming.hq.button.bg";
+ name: "panel.button.repeat";
type: IMAGE;
mouse_events: 1;
scale: 1;
description {
state: "default" 0.0;
visible: 1;
- min: 72 72;
- fixed: 1 1;
- align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; }
- rel2 { relative: 1.0 0.0; }
- image { normal: "T01_controller_btn_press.png"; border: 4 4 0 0;}
- color: 255 255 255 255;
- }
- description {
- state: "normal" 0.0;
- visible: 1;
- min: 72 72;
+ min: 70 56;
fixed: 1 1;
- align: 1.0 0.5;
+ align: 1.0 0.0;
rel1 { relative: 1.0 0.0; }
- rel2 { relative: 1.0 0.0; }
- image { normal: "T01_controller_btn.png"; border: 4 4 0 0;}
+ rel2 { relative: 1.0 1.0; }
color: 255 255 255 255;
+ image { normal: "panel/T01-2_icon_controller_repeat.png"; }
}
description {
- state: "hide" 0.0;
+ state: "repeat_one" 0.0;
inherit: "default" 0.0;
- visible: 0;
+ image { normal: "panel/T01-2_icon_controller_repeat_1.png"; }
}
- }
-
-
- part {
- name: "control.streaming.hq.txt";
- type: TEXT;
- scale: 1;
- mouse_events: 1;
- scale: 1;
description {
- state: "default" 0.0;
- color: 255 255 255 255;
- visible: 1;
- min: 72 72;
- fixed: 1 1;
- align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; }
- rel2 { relative: 1.0 0.0; }
- text {
- font: FONT_NANE;
- size: 26;
- text: "HQ";
- align: 0.5 0.5;
- }
- }
- description {
- state: "normal" 0.0;
+ state: "repeat_all" 0.0;
inherit: "default" 0.0;
- visible: 1;
+ image { normal: "panel/T01-2_icon_controller_repeat_all.png"; }
}
description {
state: "hide" 0.0;
}
}
- part {
- name: "control.streaming.hq.button";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- min: 48 48;
- fixed: 1 1;
- align: 1.0 0.5;
- rel1 { relative: 1.0 0.0;}
- rel2 { relative: 1.0 0.0;}
- color: 255 255 255 0;
- }
- description {
- state: "normal" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
} /* parts */
programs {
- program {
- name: "hidden.button.panel.soundpath.pressed";
- source: "hidden.button.panel.soundpath";
- signal: "mouse,down,1";
- action: STATE_SET "pressed" 0.0;
- target: "hidden.button.panel.soundpath";
- after: "send.hidden.button.panel.soundpath.down.signal";
- }
+ CONTROL_BUTTON_PROG("panel.button.sa");
+ CONTROL_BUTTON_PROG("panel.button.repeat");
program {
- name: "send.hidden.button.panel.soundpath.down.signal";
- action: SIGNAL_EMIT "signal.hidden.button.panel.soundpath.down" "hidden.button.panel.soundpath";
- }
-
- program {
- name: "hidden.button.panel.soundpath.clicked";
- source: "hidden.button.panel.soundpath";
- signal: "mouse,up,1";
- action: STATE_SET "default" 0.0;
- target: "hidden.button.panel.soundpath";
- after: "send.hidden.button.panel.soundpath.up.signal";
- }
-
- program {
- name: "send.hidden.button.panel.soundpath.up.signal";
- action: SIGNAL_EMIT "signal.hidden.button.panel.soundpath.up" "hidden.button.panel.soundpath";
+ signal: "signal.panel.button.streaming.mode";
+ source: "*";
+ action: STATE_SET "hide" 0.0;
+ target: "panel.button.repeat";
}
program {
- signal: "signal.hidden.button.panel.soundpath.show";
+ signal: "signal.panel.button.repeat.down";
source: "*";
- action: STATE_SET "default" 0.0;
- target: "hidden.button.panel.soundpath";
+ script: {
+ if(get_int(val_repeat_mode) == 0) {
+ set_state(PART:"panel.button.repeat", "default", 0.0);
+ }
+ else if(get_int(val_repeat_mode) == 1) {
+ set_state(PART:"panel.button.repeat", "repeat_one", 0.0);
+ }
+ else if(get_int(val_repeat_mode) == 2) {
+ set_state(PART:"panel.button.repeat", "repeat_all", 0.0);
+ }
+ }
}
program {
- signal: "signal.hidden.button.panel.soundpath.hide";
+ signal: "signal.panel.button.repeat.up";
source: "*";
- action: STATE_SET "hide" 0.0;
- target: "hidden.button.panel.soundpath";
+ script: {
+ change_repeat();
+ }
}
program {
- signal: "signal.control.streaming.quality.high";
- source: "*";
- script {
- set_int(val_quality_select, 1);
- set_quality_check();
- }
+ name: "send.panel.button.repeat.off";
+ action: SIGNAL_EMIT "signal.panel.button.repeat.off" "panel.button.repeat";
}
program {
- signal: "signal.control.streaming.quality.normal";
- source: "*";
- script {
- set_int(val_quality_select, 0);
- set_quality_check();
- }
+ name: "send.panel.button.repeat.one";
+ action: SIGNAL_EMIT "signal.panel.button.repeat.one" "panel.button.repeat";
}
program {
- signal: "signal.control.streaming.quality.hide";
- source: "*";
- script {
- set_int(val_quality_select, 2);
- set_quality_check();
- }
+ name: "send.panel.button.repeat.all";
+ action: SIGNAL_EMIT "signal.panel.button.repeat.all" "panel.button.repeat";
}
program {
- name: "set.streaming.quality.high";
+ signal: "signal.panel.button.repeat.off";
+ source: "*";
action: STATE_SET "default" 0.0;
- target: "control.streaming.hq.button.bg";
- target: "control.streaming.hq.txt";
- target: "control.streaming.hq.button";
+ target: "panel.button.repeat";
}
-
program {
- name: "set.streaming.quality.normal";
- action: STATE_SET "normal" 0.0;
- target: "control.streaming.hq.button.bg";
- target: "control.streaming.hq.txt";
- target: "control.streaming.hq.button";
+ signal: "signal.panel.button.repeat.one";
+ source: "*";
+ action: STATE_SET "repeat_one" 0.0;
+ target: "panel.button.repeat";
}
-
program {
- name: "set.streaming.quality.hide";
- action: STATE_SET "hide" 0.0;
- target: "control.streaming.hq.button.bg";
- target: "control.streaming.hq.txt";
- target: "control.streaming.hq.button";
+ signal: "signal.panel.button.repeat.all";
+ source: "*";
+ action: STATE_SET "repeat_all" 0.0;
+ target: "panel.button.repeat";
}
- CONTROL_BUTTON_PROG("control.streaming.hq.button");
} /* programs */
} /* group */
} /* collections */
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
-
-images {
- image: "gallery_video_player_bg.png" COMP;
- image: "gallery_video_popup_mute.png" COMP;
- image: "gallery_video_control_pause.png" COMP;
- image: "gallery_video_control_play.png" COMP;
- image: "gallery_video_control_next.png" COMP;
- image: "gallery_video_control_prev.png" COMP;
- image: "gallery_video_control_rew.png" COMP;
- image: "gallery_video_control_ff.png" COMP;
- image: "gallery_video_icon_volume.png" COMP;
- image: "gallery_video_icon_mute.png" COMP;
- image: "gallery_video_icon_btn.png" COMP;
- image: "gallery_video_icon_btn_press.png" COMP;
- image: "gallery_video_control_frame_back.png" COMP;
- image: "gallery_video_control_frame_forword.png" COMP;
- image: "gallery_video_add_btn.png" COMP;
- image: "gallery_video_add_btn_press.png" COMP;
- image: "gallery_video_delete_btn.png" COMP;
- image: "gallery_video_delete_btn_press.png" COMP;
- image: "T01_sound_path.png" COMP;
- image: "video_sound_path_dim.png" COMP;
- image: "T01_player_progress_point.png" COMP;
- image: "T01_player_progress_bar.png" COMP;
- image: "T01_player_progress_bg.png" COMP;
- image: "gallery_loading_ani_01.png" COMP;
- image: "gallery_loading_ani_02.png" COMP;
- image: "gallery_loading_ani_03.png" COMP;
- image: "gallery_loading_ani_04.png" COMP;
- image: "gallery_loading_ani_05.png" COMP;
- image: "gallery_loading_ani_06.png" COMP;
- image: "gallery_loading_ani_07.png" COMP;
- image: "gallery_loading_ani_08.png" COMP;
- image: "gallery_loading_ani_09.png" COMP;
- image: "gallery_loading_ani_10.png" COMP;
- image: "gallery_loading_ani_11.png" COMP;
- image: "gallery_loading_ani_12.png" COMP;
- image: "gallery_loading_ani_13.png" COMP;
- image: "gallery_loading_ani_14.png" COMP;
- image: "gallery_loading_ani_15.png" COMP;
- image: "gallery_loading_ani_16.png" COMP;
- image: "gallery_loading_ani_17.png" COMP;
- image: "gallery_loading_ani_18.png" COMP;
- image: "gallery_loading_ani_19.png" COMP;
- image: "gallery_loading_ani_20.png" COMP;
- image: "gallery_loading_ani_21.png" COMP;
- image: "gallery_loading_ani_22.png" COMP;
- image: "gallery_loading_ani_23.png" COMP;
- image: "gallery_loading_ani_24.png" COMP;
- image: "gallery_loading_ani_25.png" COMP;
- image: "gallery_loading_ani_26.png" COMP;
- image: "gallery_loading_ani_27.png" COMP;
- image: "gallery_loading_ani_28.png" COMP;
- image: "gallery_loading_ani_29.png" COMP;
- image: "gallery_loading_ani_30.png" COMP;
- image: "navibar_item_separator_shadow.png" COMP;
- image: "T01_control_top_arrow.png" COMP;
- image: "T01_control_top_bg.png" COMP;
- image: "T01_Option_header_bt_press.png" COMP;
- image: "T01_Option_header_bt.png" COMP;
- image: "T01_toolbar_bg.png" COMP;
- image: "T01_toolbar_press.png" COMP;
- image: "T01_icon_reduce.png" COMP;
- image: "T01_icon_expand.png" COMP;
- image: "T01_icon_soundPath.png" COMP;
- image: "T01_icon_soundPath_press.png" COMP;
- image: "T01_controller_btn.png" COMP;
- image: "T01_controller_btn_press.png" COMP;
- image: "00_winset_control_top_arrow.png" COMP;
- image: "naviframe_optionheader.png" COMP;
- image: "naviframe_optionheader_arrow.png" COMP;
- image: "T01_btn_prev.png" COMP;
- image: "00_button_01_normal.png" COMP;
- image: "00_button_01_normal_press.png" COMP;
- image: "00_button_01_normal_dim.png" COMP;
- image: "T01_control_icon_fullscreen.png" COMP;
- image: "T01_control_icon_detail.png" COMP;
- image: "T01_controlbar_icon_cancel.png" COMP;
- image: "T01_control_icon_reduce.png" COMP;
- image: "T01_Nocontents_multimedia.png" COMP;
- image: "T01_back.png" COMP;
-}
-
+\r
+images {\r
+ image: "gallery_video_player_bg.png" COMP;\r
+ image: "gallery_video_control_pause.png" COMP;\r
+ image: "gallery_video_control_play.png" COMP;\r
+ image: "gallery_video_control_rew.png" COMP;\r
+ image: "gallery_video_control_rew_2.png" COMP;\r
+ image: "gallery_video_control_rew_3.png" COMP;\r
+ image: "gallery_video_control_rew_4.png" COMP;\r
+ image: "gallery_video_control_rew_5.png" COMP;\r
+ image: "gallery_video_control_ff.png" COMP;\r
+ image: "gallery_video_control_ff_2.png" COMP;\r
+ image: "gallery_video_control_ff_3.png" COMP;\r
+ image: "gallery_video_control_ff_4.png" COMP;\r
+ image: "gallery_video_control_ff_5.png" COMP;\r
+ image: "gallery_video_control_frame_back.png" COMP;\r
+ image: "gallery_video_control_frame_forword.png" COMP;\r
+ image: "gallery_video_fastforward_1x.png" COMP;\r
+ image: "gallery_video_fastforward_2x.png" COMP;\r
+ image: "gallery_video_fastforward_3x.png" COMP;\r
+ image: "gallery_video_fastforward_4x.png" COMP;\r
+ image: "gallery_video_rewind_1x.png" COMP;\r
+ image: "gallery_video_rewind_2x.png" COMP;\r
+ image: "gallery_video_rewind_3x.png" COMP;\r
+ image: "gallery_video_rewind_4x.png" COMP;\r
+ image: "T01_Trim_handle_beginning.png" COMP;\r
+ image: "T01_Trim_handle_ending.png" COMP;\r
+ image: "gallery_loading_ani_01.png" COMP;\r
+ image: "gallery_loading_ani_02.png" COMP;\r
+ image: "gallery_loading_ani_03.png" COMP;\r
+ image: "gallery_loading_ani_04.png" COMP;\r
+ image: "gallery_loading_ani_05.png" COMP;\r
+ image: "gallery_loading_ani_06.png" COMP;\r
+ image: "gallery_loading_ani_07.png" COMP;\r
+ image: "gallery_loading_ani_08.png" COMP;\r
+ image: "gallery_loading_ani_09.png" COMP;\r
+ image: "gallery_loading_ani_10.png" COMP;\r
+ image: "gallery_loading_ani_11.png" COMP;\r
+ image: "gallery_loading_ani_12.png" COMP;\r
+ image: "gallery_loading_ani_13.png" COMP;\r
+ image: "gallery_loading_ani_14.png" COMP;\r
+ image: "gallery_loading_ani_15.png" COMP;\r
+ image: "gallery_loading_ani_16.png" COMP;\r
+ image: "gallery_loading_ani_17.png" COMP;\r
+ image: "gallery_loading_ani_18.png" COMP;\r
+ image: "gallery_loading_ani_19.png" COMP;\r
+ image: "gallery_loading_ani_20.png" COMP;\r
+ image: "gallery_loading_ani_21.png" COMP;\r
+ image: "gallery_loading_ani_22.png" COMP;\r
+ image: "gallery_loading_ani_23.png" COMP;\r
+ image: "gallery_loading_ani_24.png" COMP;\r
+ image: "gallery_loading_ani_25.png" COMP;\r
+ image: "gallery_loading_ani_26.png" COMP;\r
+ image: "gallery_loading_ani_27.png" COMP;\r
+ image: "gallery_loading_ani_28.png" COMP;\r
+ image: "gallery_loading_ani_29.png" COMP;\r
+ image: "gallery_loading_ani_30.png" COMP;\r
+ image: "navibar_item_separator_shadow.png" COMP;\r
+ image: "T01_control_top_arrow.png" COMP;\r
+ image: "T01_control_top_bg.png" COMP;\r
+ image: "T01_toolbar_bg.png" COMP;\r
+ image: "T01_toolbar_press.png" COMP;\r
+ image: "00_winset_control_top_arrow.png" COMP;\r
+ image: "naviframe_optionheader.png" COMP;\r
+ image: "naviframe_optionheader_arrow.png" COMP;\r
+ image: "T01_Nocontents_multimedia.png" COMP;\r
+ image: "T01_control_icon_SA.png" COMP;\r
+ image: "T01_title_bg.png" COMP;\r
+ image: "T01_title_bg_h.png" COMP;\r
+\r
+ image: "T01_Image_Look.png" COMP;\r
+\r
+ image: "icon/T01-2_icon_function_bg.png" COMP;\r
+\r
+ image: "panel/T01-2_icon_controller_repeat.png" COMP;\r
+ image: "panel/T01-2_icon_controller_repeat_1.png" COMP;\r
+ image: "panel/T01-2_icon_controller_repeat_all.png" COMP;\r
+ image: "panel/T01-2_icon_controller_sa.png" COMP;\r
+ image: "panel/T01-2_controller_progress_bar.png" COMP;\r
+ image: "panel/T01-2_controller_progress_bg.png" COMP;\r
+ image: "panel/T01-2_btn_toolbar_volum.png" COMP;\r
+ image: "panel/T01-2_btn_toolbar_volum_press.png" COMP;\r
+ image: "panel/T01-2_btn_toolbar_back.png" COMP;\r
+ image: "panel/T01-2_btn_toolbar_back_press.png" COMP;\r
+ image: "panel/T01-2_icon_toolbar_cancel.png" COMP;\r
+ image: "panel/T01-2_icon_toolbar_done.png" COMP;\r
+\r
+ image: "adjustment/T01-2_controller_progress_handle.png" COMP;\r
+ image: "adjustment/T01-2_controller_progress_handle_press.png" COMP;\r
+ image: "adjustment/T01-2_fine_adjustment_bg.png" COMP;\r
+ image: "adjustment/T01-2_fine_adjustment_bg_ef.png" COMP;\r
+ image: "adjustment/T01-2_fine_adjustment_progress_bar.png" COMP;\r
+ image: "adjustment/T01-2_fine_adjustment_progress_bg.png" COMP;\r
+ image: "adjustment/T01-2_fine_adjustment_progress_handle.png" COMP;\r
+\r
+ // FOR GENLIST SWEEP and check box\r
+ image: "00_sweep_list_bg.png" COMP;\r
+ image: "T01_checkbox.png" COMP;\r
+ image: "00_check_bg_dim.png" COMP;\r
+ image: "T01_check.png" COMP;\r
+ image: "T01_grid_select_check.png" COMP;\r
+ image: "00_grid_select_check.png" COMP;\r
+ image: "T01_video_list_progress_bar.png" COMP;\r
+ image: "00_winset_list_progress_bg.png" COMP;\r
+\r
+ image: "white/panel/T01-2_btn_toolbar_back.png" COMP;\r
+ image: "white/panel/T01-2_btn_toolbar_volume.png" COMP;\r
+ image: "white/control/T01-2_icon_toolbar_next.png" COMP;\r
+ image: "white/control/T01-2_icon_toolbar_play.png" COMP;\r
+ image: "white/control/T01-2_icon_toolbar_previous.png" COMP;\r
+ image: "white/control/T01-2_icon_toolbar_stop.png" COMP;\r
+ image: "white/control/T01-2_icon_toolbar_pause.png" COMP;\r
+}\r
+\r
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
-
#define GRAY_RECT_COLOR 128 128 128 128
+#define SPEEDBOX_OFFSET_Y 225
#include "image_res.edc"
}
}
part {
- name: "main.screen.touch";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 { relative: 0.0 0.065; }
- rel2 { relative: 1.0 0.78; }
- color: 255 255 255 0;
- }
- }
-
- part {
- name: "main.mute.bg";
+ name: "main.nocontents.bg";
type: IMAGE;
mouse_events: 0;
scale: 1;
}
part {
- name: "main.mute.image";
+ name: "main.nocontents.image";
type: IMAGE;
mouse_events: 0;
scale: 1;
align: 0.5 0.5;
rel1 { relative: 0.5 0.4;}
rel2 { relative: 0.5 0.4;}
- image { normal: "gallery_video_popup_mute.png"; }
+ image { normal: "T01_Nocontents_multimedia.png"; }
color: 255 255 255 255;
}
description {
}
part {
- name: "main.nocontents.bg";
- type: IMAGE;
+ name: "main.speedbox";
+ type: RECT;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
- min: 399 399;
- fixed: 1 1;
- align: 0.5 0.5;
- rel1 { relative: 0.5 0.4;}
- rel2 { relative: 0.5 0.4;}
- image { normal: "gallery_video_player_bg.png"; border: 7 7 0 0; }
+ min: 0 78;
+ fixed: 0 1;
+ align: 0.5 1.0;
+ rel1 { relative: 0.2 0.0; to_y: "main.option.button.bg"; }
+ rel2 { relative: 0.8 0.0; to_y: "main.option.button.bg"; }
color: GRAY_RECT_COLOR;
}
description {
}
part {
- name: "main.nocontents.image";
- type: IMAGE;
+ name: "main.speedbox.txt";
+ type: TEXT;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
- min: 144 144;
- fixed: 1 1;
- align: 0.5 0.5;
- rel1 { relative: 0.5 0.4;}
- rel2 { relative: 0.5 0.4;}
- image { normal: "T01_Nocontents_multimedia.png"; }
- color: 255 255 255 255;
+ min: 0 78;
+ fixed: 0 1;
+ align: 0.5 1.0;
+ rel1 { relative: 0.2 0.0; to_y: "main.option.button.bg"; }
+ rel2 { relative: 0.8 0.0; to_y: "main.option.button.bg"; }
+ text {
+ font: FONT_BOLD_TYPE;
+ text_class: "slp_bold";
+ size: 32;
+ text: "";
+ align: 0.5 0.5;
+ }
}
description {
state: "show" 0.0;
visible: 1;
}
}
+ part {
+ name: "main.option.start.rect";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: 0 3;
+ fixed: 0 1;
+ align: 0.0 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 0.0; }
+ color: 0 0 0 0;
+ }
+ }
part {
name: "main.option.button.bg";
- type: RECT;
+ type: IMAGE;
scale: 1;
description {
state: "default" 0.0;
visible: 1;
- min: 0 96;
+ min: 0 65;
fixed: 0 1;
- align: 0.5 0.0;
+ align: 0.0 0.0;
rel1 { relative: 0.0 0.0; }
rel2 { relative: 1.0 0.0; }
- color: 37 37 37 64;
+ image { normal: "icon/T01-2_icon_function_bg.png"; }
+ color: 255 255 255 255;
+
}
description {
state: "hide" 0.0;
inherit: "default" 0.0;
visible: 0;
}
+ description {
+ state: "portrate" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: 0 64;
+ }
+ description {
+ state: "trim" 0.0;
+ inherit: "default" 0.0;
+ visible : 0;
+ }
+
}
part {
description {
state: "default" 0.0;
visible: 1;
- min: 0 96;
+ min: 0 62;
fixed: 0 1;
align: 0.5 0.0;
- rel1 { relative: 0.0 0.0; }
+ rel1 { relative: 0.0 1.0; to_y: main.option.start.rect;}
rel2 { relative: 1.0 0.0; }
}
description {
inherit: "default" 0.0;
visible: 0;
}
+ description {
+ state: "portrate" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: 0 61;
+ }
+ description {
+ state: "trim" 0.0;
+ inherit: "default" 0.0;
+ visible : 0;
+ }
}
part {
- name: "main.hidden.button";
+ name: "main.bookmark";
type: SWALLOW;
scale: 1;
mouse_events: 1;
description {
state: "default" 0.0;
+ min: 0 206;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.0; to_y: "main.option.button";}
+ rel2 { relative: 1.0 0.0; }
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: 0 207;
+ }
+ description {
+ state: "trim" 0.0;
+ inherit: "default" 0.0;
+ visible : 0;
+ }
+ }
+
+ part {
+ name: "main.panel.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
visible: 1;
- min: 0 112;
+ min: 0 214;
fixed: 0 1;
align: 0.5 1.0;
- rel1 { relative: 0.0277 0.0; to_y: "main.panel";}
- rel2 { relative: 0.9723 0.0; to_y: "main.panel";}
+ rel1 { relative: 0.0 1.0; }
+ rel2 { relative: 1.0 1.0; }
+ color : 0 0 0 128;
}
description {
- state: "hide" 0.0;
+ state: "portrate" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: 0 204;
+ }
+ description {
+ state: "trim" 0.0;
+ inherit: "default" 0.0;
+ min: 0 228;
+ }
+ }
+
+ part {
+ name: "main.panel.line";
+ type: RECT;
+ scale: 1;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: 0 1;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 0.0; to_y: "main.panel.bg";}
+ rel2 { relative: 1.0 0.0; to_y: "main.panel.bg";}
+ color : 153 153 153 171;
+ }
+ description {
+ state: "portrate" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: 0 1;
+ }
+
+ description {
+ state: "trim" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "main.panel.top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: 0 12;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ rel1 { relative: 0.3 0.0; to_y: "main.panel.line";}
+ rel2 { relative: 0.7 1.0; to_y: "main.panel.line";}
+ color : 0 0 0 0;
+ }
+ description {
+ state: "portrate" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: 0 17;
+ }
+ description {
+ state: "trim" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "main.panel.button";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ min: 0 56;
+ fixed: 0 1;
+ align: 0.0 0.0;
+ rel1 { relative: 0.0486 1.0; to_y: "main.panel.top";}
+ rel2 { relative: 0.9514 1.0; to_y: "main.panel.top";}
+ }
+ description {
+ state: "portrate" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ rel1 { relative: 0.0273 1.0; to_y: "main.panel.top";}
+ rel2 { relative: 0.9727 1.0; to_y: "main.panel.top";}
+ }
+ description {
+ state: "trim" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
+
part {
name: "main.panel";
type: SWALLOW;
mouse_events: 1;
description {
state: "default" 0.0;
- min: 0 266;
+ min: 0 167;
fixed: 0 1;
align: 0.5 1.0;
rel1 { relative: 0.0 1.0; }
rel2 { relative: 1.0 1.0; }
}
+ description {
+ state: "portrate" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: 0 167;
+ }
+ description {
+ state: "trim" 0.0;
+ inherit: "default" 0.0;
+ min: 0 297;
+ }
}
-
-
part { name: "main.animation";
type: SWALLOW;
scale: 1;
inherit: "default" 0.0;
visible: 1;
}
+ description {
+ state: "trim" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
}
+
} /* parts */
programs {
program {
- name: "signal.main.screen.touch";
- source: "main.screen.touch";
- signal: "mouse,up,1";
- action: SIGNAL_EMIT "signal.main.screen.touch.press" "main.screen.touch.toggle";
- }
-
- program {
- signal: "signal.main.mute.show";
+ signal: "signal.main.nocontents.show";
source: "*";
action: STATE_SET "show" 0.0;
- target: "main.mute.image";
- target: "main.mute.bg";
+ target: "main.nocontents.image";
+ target: "main.nocontents.bg";
}
program {
- signal: "signal.main.mute.hide";
+ signal: "signal.main.nocontents.hide";
source: "*";
action: STATE_SET "default" 0.0;
- target: "main.mute.image";
- target: "main.mute.bg";
+ target: "main.nocontents.image";
+ target: "main.nocontents.bg";
}
- program {
- signal: "signal.main.nocontents.show";
+ program {
+ signal: "signal.main.speedbox.show";
source: "*";
action: STATE_SET "show" 0.0;
- target: "main.nocontents.image";
- target: "main.nocontents.bg";
+ target: "main.speedbox";
+ target: "main.speedbox.txt";
}
program {
- signal: "signal.main.nocontents.hide";
+ signal: "signal.main.speedbox.hide";
source: "*";
action: STATE_SET "default" 0.0;
- target: "main.nocontents.image";
- target: "main.nocontents.bg";
+ target: "main.speedbox";
+ target: "main.speedbox.txt";
}
program {
action: STATE_SET "show" 0.0;
target: "main.animation";
}
+
program {
signal: "signal.main.animation.hide";
source: "*";
action: STATE_SET "default" 0.0;
target: "main.animation";
}
+
program {
signal: "signal.main.option.button.bg.hide";
source: "*";
action: STATE_SET "hide" 0.0;
target: "main.option.button.bg";
}
+
+ program {
+ signal: "signal.main.portrate.mode";
+ source: "*";
+ action: STATE_SET "portrate" 0.0;
+ target: "main.option.button.bg";
+ target: "main.option.button";
+ target: "main.panel.bg";
+ target: "main.panel.top";
+ target: "main.panel.button";
+ target: "main.panel";
+ }
+
+ program {
+ signal: "signal.main.landscape.mode";
+ source: "*";
+ action: STATE_SET "landscape" 0.0;
+ target: "main.option.button.bg";
+ target: "main.option.button";
+ target: "main.panel.bg";
+ target: "main.panel.top";
+ target: "main.panel.button";
+ target: "main.panel";
+ }
+
+ program {
+ signal: "signal.main.trim.mode";
+ source: "*";
+ action: STATE_SET "trim" 0.0;
+ target: "main.option.button.bg";
+ target: "main.option.button";
+ target: "main.panel.bg";
+ target: "main.panel.top";
+ target: "main.panel.button";
+ target: "main.panel.line";
+ target: "main.panel";
+ }
} /* programs */
} /* group */
} /* collections */
--- /dev/null
+#include "image_res.edc"
+#include "vp_font.edc"
+
+collections {
+
+ group {
+ name: "mw";
+ parts {
+ part {
+ name: "mw.bg";
+ type: RECT;
+ mouse_events: 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ rel1 { relative: 0.0 0.0;}
+ rel2 { relative: 1.0 1.0;}
+ color: 0 0 0 255;
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+
+ }
+
+ part {
+ name: "mw.image";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ repeat_events : 1;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ rel1 { relative: 0.0 0.0;}
+ rel2 { relative: 1.0 1.0;}
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program {
+ signal: "signal.mw.image.show";
+ source: "*";
+ script {
+ set_state(PART:"mw.image", "show", 0.0);
+ }
+ }
+ program {
+ signal: "signal.mw.image.hide";
+ source: "*";
+ script {
+ set_state(PART:"mw.image", "default", 0.0);
+ }
+ }
+ }
+ }
+}
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
#include "image_res.edc"
#include "vp_font.edc"
-#define LINE_RECT_COLOR 73 73 73 255
+#define LINE_RECT_COLOR 130 130 130 255
collections {
group {
scale: 1;
description {
state: "default" 0.0;
- min: 0 129;
+ min: 0 28;
fixed: 0 1;
align: 0.5 0.0;
color: 255 0 0 255;
- rel1 { relative: 0.05 0.0;}
- rel2 { relative: 0.95 0.0;}
+ rel1 { relative: 0.0277 0.0;}
+ rel2 { relative: 0.9723 0.0;}
}
- }
- part {
- name: "panel.line";
- type: RECT;
- mouse_events: 1;
- scale: 1;
description {
- state: "default" 0.0;
- visible: 1;
- min: 0 3;
- fixed: 0 1;
- align: 0.5 1.0;
- rel1 { relative: 0.05 0.0; to_y: "panel.control";}
- rel2 { relative: 0.95 0.0; to_y: "panel.control";}
- color: LINE_RECT_COLOR;
+ state: "portrate" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: 0 28;
+ rel1 { relative: 0.01875 0.0;}
+ rel2 { relative: 0.98125 0.0;}
+ }
+ description {
+ state: "trim" 0.0;
+ inherit: "default" 0.0;
+ min: 0 183;
+ rel1 { relative: 0.0 0.0;}
+ rel2 { relative: 1.0 0.0;}
}
}
+
part {
name: "panel.control";
type: SWALLOW;
scale: 1;
description {
state: "default" 0.0;
- min: 0 136;
+ min: 0 114;
fixed: 0 1;
align: 0.5 1.0;
- rel1 { relative: 0.03 1.0;}
- rel2 { relative: 0.97 1.0;}
+ rel1 { relative: 0.0 1.0;}
+ rel2 { relative: 1.0 1.0;}
+ }
+ description {
+ state: "portrate" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: 0 114;
+ rel1 { relative: 0.0 1.0;}
+ rel2 { relative: 1.0 1.0;}
}
+ description {
+ state: "trim" 0.0;
+ inherit: "default" 0.0;
+ min: 0 114;
+ rel1 { relative: 0.0 1.0;}
+ rel2 { relative: 1.0 1.0;}
+ }
+ }
+ } // parts
+
+ programs {
+ program {
+ signal: "signal.panel.portrate.mode";
+ source: "*";
+ action: STATE_SET "portrate" 0.0;
+ target: "panel.progress";
+ target: "panel.control";
+ }
+
+ program {
+ signal: "signal.panel.landscape.mode";
+ source: "*";
+ action: STATE_SET "landscape" 0.0;
+ target: "panel.progress";
+ target: "panel.control";
+ }
+
+ program {
+ signal: "signal.panel.trim.mode";
+ source: "*";
+ action: STATE_SET "trim" 0.0;
+ target: "panel.progress";
+ target: "panel.control";
}
- } /* parts */
- } /* group */
-} /* collections */
+ }
+ } // group
+} // collections
--- /dev/null
+collections {\r
+group { name: "popup_center_progressview";\r
+ parts{\r
+ part { name: "elm.title";\r
+ type: TEXT;\r
+ scale : 1;\r
+ description { state: "default" 0.0;\r
+ max: 80 16;\r
+ text {\r
+ font: "SLP:style=Medium";\r
+ text_class: "slp_medium";\r
+ size: 16;\r
+ min: 0 0;\r
+ align: 0.5 0.0;\r
+ }\r
+ color: 108 108 108 255;\r
+ align: 0.5 0.0;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ to: "elm.swallow.content";\r
+ }\r
+ rel2 {\r
+ relative: 1.0 0.0;\r
+ to: "elm.swallow.content";\r
+ }\r
+ }\r
+ }\r
+ part{ name:"elm.swallow.content";\r
+ type: SWALLOW;\r
+ scale : 1;\r
+ description { state: "default" 0.0;\r
+ min: 0 70;\r
+ align: 0.5 0.5;\r
+ fixed: 1 0;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ }\r
+ }\r
+ }\r
+ part { name: "elm.text.left";\r
+ type: TEXT;\r
+ scale : 1;\r
+ description { state: "default" 0.0;\r
+ max: 150 16;\r
+ text {\r
+ font: "SLP:style=Medium";\r
+ text_class: "slp_medium";\r
+ size: 16;\r
+ min: 0 0;\r
+ align: 0.0 1.0;\r
+ }\r
+ color: 108 108 108 255;\r
+ align: 0.0 1.0;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ to: "elm.swallow.content";\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ to: "elm.swallow.content";\r
+ }\r
+ }\r
+ }\r
+ part { name: "elm.text.right";\r
+ type: TEXT;\r
+ scale : 1;\r
+ description { state: "default" 0.0;\r
+ max: 150 16;\r
+ text {\r
+ font: "SLP:style=Medium";\r
+ text_class: "slp_medium";\r
+ size: 16;\r
+ min: 0 0;\r
+ align: 1.0 1.0;\r
+ }\r
+ color: 108 108 108 255;\r
+ align: 1.0 1.0;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ to: "elm.swallow.content";\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ to: "elm.swallow.content";\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+\r
+group { name: "popup_center_text_progressview";\r
+ parts{\r
+ part { name: "pad_t";\r
+ scale : 1;\r
+ mouse_events: 0;\r
+ repeat_events: 1;\r
+ description { state: "default" 0.0;\r
+ align: 0.5 0.0;\r
+ min: 0 14;\r
+ fixed: 0 1;\r
+ rel1 {\r
+ relative: 1.0 0.0;\r
+ to_x: "pad_l";\r
+ }\r
+ rel2 {\r
+ relative: 0.0 0.0;\r
+ to_x: "pad_r";\r
+ }\r
+ }\r
+ }\r
+ part { name: "pad_l";\r
+ scale: 1;\r
+ description { state: "default" 0.0;\r
+ min : 10 0;\r
+ fixed: 1 0;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ }\r
+ rel2 {\r
+ relative: 0.0 1.0;\r
+ }\r
+ align: 0.0 0.0;\r
+ }\r
+ }\r
+ part { name: "pad_r";\r
+ scale: 1;\r
+ description { state: "default" 0.0;\r
+ min : 10 0;\r
+ fixed: 1 0;\r
+ rel1 {\r
+ relative: 1.0 0.0;\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ }\r
+ align: 1.0 0.0;\r
+ }\r
+ }\r
+ part{ name:"elm.swallow.content";\r
+ type: SWALLOW;\r
+ scale : 1;\r
+ description { state: "default" 0.0;\r
+ min: 300 0;\r
+ align: 0.5 0.5;\r
+ fixed: 1 0;\r
+ rel1 {\r
+ relative: 0.5 1.0;\r
+ to: "pad_t";\r
+ }\r
+ rel2 {\r
+ relative: 0.5 0.0;\r
+ to: "pad_b";\r
+ }\r
+ }\r
+ }\r
+ part { name: "pad_b";\r
+ scale : 1;\r
+ mouse_events: 0;\r
+ repeat_events: 1;\r
+ description { state: "default" 0.0;\r
+ align: 0.5 1.0;\r
+ min: 0 90;\r
+ fixed: 0 1;\r
+ rel1 {\r
+ relative: 1.0 1.0;\r
+ to_x: "pad_l";\r
+ }\r
+ rel2 {\r
+ relative: 0.0 1.0;\r
+ to_x: "pad_r";\r
+ }\r
+ }\r
+ }\r
+ part { name: "elm.swallow.end";\r
+ type: SWALLOW;\r
+ scale : 1;\r
+ mouse_events: 1;\r
+ repeat_events: 1;\r
+ description { state: "default" 0.0;\r
+ align: 0.0 0.0;\r
+ fixed: 1 1;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ to: "pad_b";\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ to: "pad_b";\r
+ }\r
+ }\r
+ }\r
+ part { name: "pad_bm";\r
+ scale : 1;\r
+ mouse_events: 0;\r
+ repeat_events: 1;\r
+ description { state: "default" 0.0;\r
+ align: 0.0 1.0;\r
+ min: 0 52;\r
+ fixed: 0 1;\r
+ rel1 {\r
+ relative: 0.0 1.0;\r
+ to: "pad_b";\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ to: "pad_b";\r
+ }\r
+ }\r
+ }\r
+ part { name: "elm.text.subtext1";\r
+ type: TEXT;\r
+ scale : 1;\r
+ description { state: "default" 0.0;\r
+ text {\r
+ font: "SLP:style=Medium";\r
+ text_class: "slp_medium";\r
+ size: 16;\r
+ min: 0 0;\r
+ align: 0.0 1.0;\r
+ }\r
+ color: 108 108 108 255;\r
+ align: 0.0 0.5;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ to: "pad_bm";\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ to: "pad_bm";\r
+ }\r
+ }\r
+ }\r
+ part { name: "elm.text.subtext2";\r
+ type: TEXT;\r
+ scale : 1;\r
+ description { state: "default" 0.0;\r
+ text {\r
+ font: "SLP:style=Medium";\r
+ text_class: "slp_medium";\r
+ size: 16;\r
+ min: 0 0;\r
+ align: 1.0 1.0;\r
+ }\r
+ color: 108 108 108 255;\r
+ align: 1.0 0.5;\r
+ rel1 {\r
+ relative: 0.0 0.0;\r
+ to: "pad_bm";\r
+ }\r
+ rel2 {\r
+ relative: 1.0 1.0;\r
+ to: "pad_bm";\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+}\r
+\r
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
-#include "image_res.edc"
-#include "vp_font.edc"
-
-collections {
- group {
- name: "progress";
- parts {
- part {
- name: "progress.rect";
- type: RECT;
- scale: 1;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- color: 0 0 0 0;
- }
- }
-
- part {
- name: "progress.bg";
- type: IMAGE;
- scale: 1;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- min: 0 16;
- fixed: 0 1;
- align: 0.0 0.0;
- rel1 { relative: 0.0 0.4174;}
- rel2 { relative: 1.0 0.4174;}
- color: 255 255 255 255;
- image { normal: "T01_player_progress_bg.png"; }
- }
- }
- part {
- name: "progress.buffer.bar";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 16;
- fixed: 0 1;
- align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; to_x: progress.playing ; to_y: progress.bg; }
- rel2 { relative: 1.0 1.0; to_x: progress.buffering; to_y: progress.bg; }
- color: 128 128 128 255;
- }
- }
-
- part {
- name: "progress.middle";
- type: IMAGE;
- scale: 1;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- min: 0 16;
- fixed: 0 1;
- align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; to: progress.bg; }
- rel2 { relative: 0.5 1.0; to_x: progress.circle; to_y: progress.bg; }
- color: 255 255 255 255;
- image { normal: "T01_player_progress_bar.png";}
- }
- }
- part { name: "progress.buffering";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 0;
- min: 18 16;
- fixed: 1 1;
- align: 0.0 0.5;
- rel1 { relative: 0.0 0.5; to: progress.bg; }
- rel2 { relative: 1.0 1.0; to: progress.bg; }
- color: 255 255 255 0;
- }
- dragable {
- confine: "progress.confine.rect";
- x: 1 1 1;
- }
- }
-
- part { name: "progress.confine.rect";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 { relative: 0.0 0.0; to: progress.bg; }
- rel2 { relative: 1.0 1.0; to: progress.bg; }
- color: 255 255 255 0;
- }
- }
-
- part {
- name: "progress.circle";
- type: IMAGE;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 18 16;
- fixed: 1 1;
- align: 0.5 0.0;
- rel1 { relative: 0.5 0.0; to_x: progress.playing; to_y: progress.bg; }
- rel2 { relative: 0.5 1.0; to_x: progress.playing; to_y: progress.bg; }
- color: 255 255 255 255;
- image { normal: "T01_player_progress_point.png";}
- }
- }
-
- part { name: "progress.playing";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- visible: 1;
- state: "default" 0.0;
- color: 255 255 255 0;
- min: 18 16;
- fixed: 1 1;
- align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; to_y: progress.rect; }
- rel2 { relative: 0.0 0.0; to_y: progress.rect; }
- }
- dragable {
- confine: "progress.confine.rect";
- x: 1 1 1;
- }
- }
-
- part { name: "progress.txt.played";
- type: TEXT;
- scale: 1;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- min: 180 65;
- fixed: 1 1;
- align: 0.0 1.0;
- rel1 { relative: 0.0 0.7985; }
- rel2 { relative: 1.0 0.7985; }
- color: FONT_START_COLOR;
- text { font: FONT_NANE;
- size: 25;
- text: "00:00:00";
- align: 0.0 1.0;
- }
- }
- }
-
- part { name: "progress.txt.total";
- type: TEXT;
- scale: 1;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- min: 180 65;
- fixed: 1 1;
- align: 1.0 1.0;
- rel1 { relative: 0.0 0.7985; }
- rel2 { relative: 1.0 0.7985; }
- color: FONT_END_COLOR;
- text { font: FONT_NANE;
- size: 25;
- text: "--:--:--";
- align: 1.0 1.0;
- }
- }
- }
- } /* parts */
- } /* group */
-} /* collections */
-
+#include "image_res.edc"\r
+#include "vp_font.edc"\r
+\r
+#define PROGRESS_LINE_RECT_COLOR 54 54 54 255\r
+\r
+collections {\r
+ group {\r
+ name: "progress";\r
+\r
+ parts {\r
+ part {\r
+ name: "progress.rect";\r
+ type: RECT;\r
+ scale: 1;\r
+ mouse_events: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ align: 0.0 0.0;\r
+ rel1 { relative: 0.0 0.0;}\r
+ rel2 { relative: 1.0 1.0;}\r
+ color: 0 0 0 0;\r
+ }\r
+ }\r
+ part { name: "progress.txt.played";\r
+ type: TEXT;\r
+ scale: 1;\r
+ mouse_events: 0;\r
+ description {\r
+ state: "default" 0.0;\r
+ min: 90 28;\r
+ fixed: 1 1;\r
+ align: 0.0 0.5;\r
+ rel1 { relative: 0.0 0.0; }\r
+ rel2 { relative: 1.0 1.0; }\r
+ color: FONT_START_COLOR;\r
+ text {\r
+ font: FONT_MEDIUM_TYPE;\r
+ text_class: "slp_medium";\r
+ size: 25;\r
+ text: "00:00:00";\r
+ align: 0.0 1.0;\r
+ }\r
+ }\r
+ description {\r
+ state: "portrate" 0.0;\r
+ inherit: "default" 0.0;\r
+ }\r
+ description {\r
+ state: "landscape" 0.0;\r
+ inherit: "default" 0.0;\r
+ }\r
+ }\r
+\r
+ part { name: "progress.txt.total";\r
+ type: TEXT;\r
+ scale: 1;\r
+ mouse_events: 0;\r
+ description {\r
+ state: "default" 0.0;\r
+ min: 90 28;\r
+ fixed: 1 1;\r
+ align: 1.0 0.5;\r
+ rel1 { relative: 0.0 0.0; }\r
+ rel2 { relative: 1.0 1.0; }\r
+ color: FONT_END_COLOR;\r
+ text {\r
+ font: FONT_MEDIUM_TYPE;\r
+ text_class: "slp_medium";\r
+ size: 25;\r
+ text: "--:--:--";\r
+ align: 1.0 1.0;\r
+ }\r
+ }\r
+ description {\r
+ state: "portrate" 0.0;\r
+ inherit: "default" 0.0;\r
+ }\r
+ description {\r
+ state: "landscape" 0.0;\r
+ inherit: "default" 0.0;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "progress.bg";\r
+ type: IMAGE;\r
+ scale: 1;\r
+ mouse_events: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ min: 0 7;\r
+ fixed: 0 1;\r
+ align: 0.0 0.5;\r
+ rel1 { relative: 0.1647 0.5; }\r
+ rel2 { relative: 0.8353 0.5; }\r
+ image { normal: "panel/T01-2_controller_progress_bg.png"; }\r
+ }\r
+ description {\r
+ state: "portrate" 0.0;\r
+ inherit: "default" 0.0;\r
+ }\r
+ description {\r
+ state: "landscape" 0.0;\r
+ inherit: "default" 0.0;\r
+ rel1 { relative: 0.0933 0.5; }\r
+ rel2 { relative: 0.9067 0.5; }\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "progress.buffer.bar";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ min: 0 5;\r
+ fixed: 0 1;\r
+ align: 0.0 0.0;\r
+ rel1 { relative: 0.0 0.0; to_x: progress.playing ; to_y: progress.bg; }\r
+ rel2 { relative: 1.0 1.0; to_x: progress.buffering; to_y: progress.bg; }\r
+ color: 128 128 128 255;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "progress.middle";\r
+ type: IMAGE;\r
+ scale: 1;\r
+ mouse_events: 0;\r
+ description {\r
+ state: "default" 0.0;\r
+ min: 0 5;\r
+ fixed: 0 1;\r
+ align: 0.0 0.0;\r
+ rel1 { relative: 0.0 0.0; to: progress.bg; }\r
+ rel2 { relative: 0.5 1.0; to_x: progress.circle; to_y: progress.bg; }\r
+ color: 255 255 255 255;\r
+ image { normal: "panel/T01-2_controller_progress_bar.png";}\r
+ }\r
+ }\r
+ part { name: "progress.buffering";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ min: 0 5;\r
+ fixed: 0 1;\r
+ align: 0.0 0.5;\r
+ rel1 { relative: 0.0 0.5; to: progress.bg; }\r
+ rel2 { relative: 1.0 1.0; to: progress.bg; }\r
+ color: 255 255 255 0;\r
+ }\r
+ dragable {\r
+ confine: "progress.confine.rect";\r
+ x: 1 1 1;\r
+ }\r
+ }\r
+\r
+ part { name: "progress.confine.rect";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 1;\r
+ rel1 { relative: 0.0 0.0; to: progress.bg; }\r
+ rel2 { relative: 1.0 1.0; to: progress.bg; }\r
+ color: 255 255 255 0;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "progress.circle";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ min: 0 5;\r
+ fixed: 0 1;\r
+ align: 0.5 0.0;\r
+ rel1 { relative: 0.5 0.0; to_x: progress.playing; to_y: progress.bg; }\r
+ rel2 { relative: 0.5 1.0; to_x: progress.playing; to_y: progress.bg; }\r
+ color: 255 255 255 255;\r
+ }\r
+ }\r
+\r
+ part { name: "progress.playing";\r
+ type: RECT;\r
+ mouse_events: 1;\r
+ scale: 1;\r
+ description {\r
+ visible: 1;\r
+ state: "default" 0.0;\r
+ color: 255 255 255 0;\r
+ min: 0 15;\r
+ fixed: 0 1;\r
+ align: 0.0 0.0;\r
+ rel1 { relative: 0.0 0.0; to_y: progress.rect; }\r
+ rel2 { relative: 0.0 0.0; to_y: progress.rect; }\r
+ }\r
+ dragable {\r
+ confine: "progress.confine.rect";\r
+ x: 1 1 1;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "progress.adjustment.handle";\r
+ type: IMAGE;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ min: 25 25;\r
+ fixed: 1 1;\r
+ align: 0.5 0.5;\r
+ rel1 { relative: 0.5 0.5; to_x: progress.circle; to_y: progress.bg; }\r
+ rel2 { relative: 0.5 0.5; to_x: progress.circle; to_y: progress.bg; }\r
+ image { normal: "adjustment/T01-2_controller_progress_handle.png";}\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "show" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ }\r
+ part {\r
+ name: "progress.adjustment.bg.rect";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ min: 174 153;\r
+ fixed: 1 1;\r
+ align: 0.5 1.0;\r
+ rel1 { relative: 0.5 0.0; to_x: progress.circle; to_y: progress.rect; }\r
+ rel2 { relative: 0.5 0.0; to_x: progress.circle; to_y: progress.rect; }\r
+ color: 0 0 0 0;\r
+ }\r
+ description {\r
+ state: "show" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "progress.adjustment.bg";\r
+ type: IMAGE;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ min: 174 153;\r
+ fixed: 1 1;\r
+ align: 0.0 0.0;\r
+ rel1 { relative: 0.0 0.0; to: progress.adjustment.bg.rect; }\r
+ rel2 { relative: 1.0 1.0; to: progress.adjustment.bg.rect; }\r
+ color: 255 255 255 255;\r
+ image { normal: "adjustment/T01-2_fine_adjustment_bg.png";}\r
+ }\r
+ description {\r
+ state: "show" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "progress.adjustment.progress.bg";\r
+ type: IMAGE;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ min: 1 20;\r
+ fixed: 1 1;\r
+ align: 0.0 0.0;\r
+ rel1 { relative: 0.08620 0.23529; to: progress.adjustment.bg.rect; }\r
+ rel2 { relative: 0.91379 0.23529; to: progress.adjustment.bg.rect; }\r
+ color: 255 255 255 255;\r
+ image { normal: "adjustment/T01-2_fine_adjustment_progress_bg.png";}\r
+ }\r
+ description {\r
+ state: "show" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "progress.adjustment.progress.bar";\r
+ type: IMAGE;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ min: 1 20;\r
+ fixed: 1 1;\r
+ align: 0.0 0.0;\r
+ rel1 { relative: 0.08620 0.23529; to: progress.adjustment.bg.rect; }\r
+ rel2 { relative: 0.5 0.23529; to: progress.adjustment.bg.rect; }\r
+ color: 255 255 255 255;\r
+ image { normal: "adjustment/T01-2_fine_adjustment_progress_bar.png";}\r
+ }\r
+ description {\r
+ state: "show" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ }\r
+\r
+ part {\r
+ name: "progress.adjustment.progress.handle";\r
+ type: IMAGE;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ min: 36 36;\r
+ fixed: 1 1;\r
+ align: 0.5 0.0;\r
+ rel1 { relative: 0.5 0.183006; to: progress.adjustment.bg.rect; }\r
+ rel2 { relative: 0.5 0.183006; to: progress.adjustment.bg.rect; }\r
+ color: 255 255 255 255;\r
+ image { normal: "adjustment/T01-2_fine_adjustment_progress_handle.png";}\r
+ }\r
+ description {\r
+ state: "show" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ }\r
+ part {\r
+ name: "progress.adjustment.bg.ef";\r
+ type: IMAGE;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ min: 174 153;\r
+ fixed: 1 1;\r
+ align: 0.0 0.0;\r
+ rel1 { relative: 0.0 0.0; to: progress.adjustment.bg.rect; }\r
+ rel2 { relative: 1.0 1.0; to: progress.adjustment.bg.rect; }\r
+ image { normal: "adjustment/T01-2_fine_adjustment_bg_ef.png";}\r
+ color: 255 255 255 255;\r
+ }\r
+ description {\r
+ state: "show" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ }\r
+ part { name: "progress.adjustment.txt";\r
+ type: TEXT;\r
+ scale: 1;\r
+ mouse_events: 0;\r
+ description {\r
+ state: "default" 0.0;\r
+ visible: 0;\r
+ min: 174 40;\r
+ fixed: 1 1;\r
+ align: 0.5 0.0;\r
+ rel1 { relative: 0.0 0.470588; to: progress.adjustment.bg.rect;}\r
+ rel2 { relative: 1.0 0.470588; to: progress.adjustment.bg.rect;}\r
+ color: 191 191 191 255;\r
+ text {\r
+ font: FONT_ROMAN_TYPE;\r
+ text_class: "slp_roman";\r
+ size: 40;\r
+ text: "00:00:00";\r
+ align: 0.5 0.5;\r
+ }\r
+ }\r
+ description {\r
+ state: "show" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ }\r
+ } /* parts */\r
+\r
+ programs {\r
+ program {\r
+ signal: "signal.progress.portrate.mode";\r
+ source: "*";\r
+ action: STATE_SET "portrate" 0.0;\r
+ target: "progress.bg";\r
+ target: "progress.txt.played";\r
+ target: "progress.txt.total";\r
+ }\r
+\r
+ program {\r
+ signal: "signal.progress.landscape.mode";\r
+ source: "*";\r
+ action: STATE_SET "landscape" 0.0;\r
+ target: "progress.bg";\r
+ target: "progress.txt.played";\r
+ target: "progress.txt.total";\r
+ }\r
+\r
+ program {\r
+ signal: "signal.progress.adjustment.show";\r
+ source: "*";\r
+ action: STATE_SET "show" 0.0;\r
+ target: "progress.adjustment.handle";\r
+ target: "progress.adjustment.bg.rect";\r
+ target: "progress.adjustment.bg.ef";\r
+ target: "progress.adjustment.bg";\r
+ target: "progress.adjustment.progress.bg";\r
+ target: "progress.adjustment.progress.bar";\r
+ target: "progress.adjustment.progress.handle";\r
+ target: "progress.adjustment.txt";\r
+ }\r
+\r
+ program {\r
+ signal: "signal.progress.adjustment.hide";\r
+ source: "*";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "progress.adjustment.handle";\r
+ target: "progress.adjustment.bg.rect";\r
+ target: "progress.adjustment.bg.ef";\r
+ target: "progress.adjustment.bg";\r
+ target: "progress.adjustment.progress.bg";\r
+ target: "progress.adjustment.progress.bar";\r
+ target: "progress.adjustment.progress.handle";\r
+ target: "progress.adjustment.txt";\r
+ }\r
+ }\r
+ } // group\r
+} // collections\r
--- /dev/null
+collections {
+ group {
+ name: "setting";
+ parts {
+ part {
+ name: "setting.bg";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0.0 0.0;}
+ rel2 { relative: 1.0 1.0;}
+ color: 255 255 255 255;
+ }
+ }
+ part {
+ name: "setting.list";
+ type: SWALLOW;
+ mouse_events: 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+#define BUTTON_STATE_ENABLED 0\r
+#define BUTTON_STATE_DISABLED 1\r
+\r
+#define BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC 106 74\r
+#define BUTTON_NAVIFRAME_BACK_BUTTON_BG_BORDER_INC 5 5 5 5\r
+#define BUTTON_NAVIFRAME_BACK_BUTTON_MIN_MAX_INC 56 56\r
+\r
+#define BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC 249 249 249 255\r
+#define BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC 249 249 249 255\r
+\r
+#define BUTTON_NAVIFRAME_CENTER_BG_NORMAL_MIN_INC 22 46\r
+#define BUTTON_NAVIFRAME_CENTER_BG_NORMAL_BORDER_INC 4 4 4 4\r
+#define BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC 16 2\r
+#define BUTTON_NAVIFRAME_CENTER_ICON_RECT_VISIBLE_MIN_SIZE 36 36\r
+#define BUTTON_NAVIFRAME_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC 6 0\r
+#define BUTTON_NAVIFRAME_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC 6 0\r
+#define BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC 36 36\r
+#define BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC 38 38\r
+#define BUTTON_NAVIFRAME_CENTER_TEXT_FONT_SIZE_INC 32\r
+#define BUTTON_NAVIFRAME_MULTILINE_TEXT_FONT_SIZE_INC 24\r
+\r
+#define BUTTON_NAVIFRAME_BG_MIN_INC 106 68\r
+#define BUTTON_NAVIFRAME_VISIBLE_BG_MIN_INC 106 68\r
+#define BUTTON_NAVIFRAME_ICONONLY_BG_MIN_INC 72 724\r
+#define BUTTON_NAVIFRAME_BG_BORDER_INC 5 5 5 5\r
+#define BUTTON_NAVIFRAME_PADDING_MIN_INC 16 3\r
+#define BUTTON_NAVIFRAME_VISIBLE_ICON_RECT_MIN_MAX_INC 38 38\r
+#define BUTTON_NAVIFRAME_VISIBLE_PADDING_ICON_TEXT_MIN_INC 10 0\r
+#define BUTTON_NAVIFRAME_VISIBLE_ICON_MIN_MAX_INC 38 38\r
+#define BUTTON_NAVIFRAME_ICONONLY_ICON_MIN_MAX_INC 38 38\r
+#define BUTTON_TEXT_NAVIFRAME_FONT_SIZE_INC 32\r
+#define BUTTON_NAVIFRAME_TITLE_BUTTON_MIN_INC 106 68\r
+\r
+#define BUTTON_NAVIFRAME_MORE_BG_MIN_MAX_INC 82 64\r
+#define BUTTON_NAVIFRAME_MORE_BG_BORDER_INC 5 5 5 5\r
+#define BUTTON_NAVIFRAME_MORE_DEFAULT_IMAGE_MIN_MAX_INC 50 50\r
+\r
+#define BUTTON_TEXT_NAVIFRAME_NORMAL_COLOR_INC 211 211 211 255\r
+#define BUTTON_TEXT_NAVIFRAME_PRESSED_COLOR_INC 249 249 249 255\r
+#define BUTTON_TEXT_NAVIFRAME_FOCUSED_COLOR_INC 249 249 249 255\r
+#define BUTTON_TEXT_NAVIFRAME_DISABLED_COLOR_INC 211 211 211 255\r
+\r
+//////////////////////////////////////////////////////////////\r
+ group { name: "elm/button/base/video/naviframe/title/default";\r
+ images {\r
+ image: "white/common/T01-2_title_btn_bg.png" COMP;\r
+ image: "white/common/T01-2_title_btn_bg_press_01.png" COMP;\r
+ image: "white/common/T01-2_title_btn_bg_press_02.png" COMP;\r
+ }\r
+ script {\r
+ public button_state = BUTTON_STATE_ENABLED;\r
+ }\r
+ parts {\r
+ part { name: "button_image";\r
+ scale: 1;\r
+ description { state: "default" 0.0;\r
+ min: BUTTON_NAVIFRAME_TITLE_BUTTON_MIN_INC;\r
+ max: BUTTON_NAVIFRAME_TITLE_BUTTON_MIN_INC;\r
+ image {\r
+ normal: "white/common/T01-2_title_btn_bg.png";\r
+ border: BUTTON_NAVIFRAME_BG_BORDER_INC;\r
+ border_scale: 1;\r
+ }\r
+ }\r
+ description { state: "clicked" 0.0;\r
+ inherit: "default" 0.0;\r
+ image.normal: "white/common/T01-2_title_btn_bg_press_01.png";\r
+ }\r
+ description { state: "disabled" 0.0;\r
+ inherit: "default" 0.0;\r
+ color: 0 0 0 128;\r
+ }\r
+ description { state: "focused" 0.0;\r
+ inherit: "default" 0.0;\r
+ image.normal: "white/common/T01-2_title_btn_bg_press_02.png";\r
+ }\r
+ }\r
+ part { name: "padding_left_top";\r
+ type: RECT;\r
+ scale: 1;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ align: 0.0 0.0;\r
+ rel2.relative: 0.0 0.0;\r
+ min: BUTTON_NAVIFRAME_PADDING_MIN_INC;\r
+ fixed: 1 1;\r
+ visible: 0;\r
+ }\r
+ }\r
+ part { name: "bg";\r
+ type: RECT;\r
+ scale: 1;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ min: BUTTON_NAVIFRAME_BG_MIN_INC;\r
+ visible: 0;\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ min: BUTTON_NAVIFRAME_VISIBLE_BG_MIN_INC;\r
+ }\r
+ description { state: "icononly" 0.0;\r
+ inherit: "default" 0.0;\r
+ min: BUTTON_NAVIFRAME_ICONONLY_BG_MIN_INC;\r
+ }\r
+ }\r
+ part { name: "padding_right_bottom";\r
+ type: RECT;\r
+ scale: 1;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ align: 1.0 1.0;\r
+ rel1.relative: 1.0 1.0;\r
+ min: BUTTON_NAVIFRAME_PADDING_MIN_INC;\r
+ fixed: 1 1;\r
+ visible: 0;\r
+ }\r
+ }\r
+ part { name: "icon_rect";\r
+ type: RECT;\r
+ scale: 1;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0;\r
+ visible: 0;\r
+ min: 0 0;\r
+ fixed: 1 0;\r
+ rel1 {\r
+ relative: 1.0 1.0;\r
+ to: "padding_left_top";\r
+ }\r
+ rel2 {\r
+ relative: 1.0 0.0;\r
+ to_x: "padding_left_top";\r
+ to_y: "padding_right_bottom";\r
+ }\r
+ align: 0.0 0.5;\r
+ }\r
+ description { state: "visible" 0.0;\r
+ visible: 0;\r
+ min: BUTTON_NAVIFRAME_VISIBLE_ICON_RECT_MIN_MAX_INC;\r
+ max: BUTTON_NAVIFRAME_VISIBLE_ICON_RECT_MIN_MAX_INC;\r
+ fixed: 1 0;\r
+ rel1 {\r
+ relative: 1.0 1.0;\r
+ to: "padding_left_top";\r
+ }\r
+ rel2 {\r
+ relative: 1.0 0.0;\r
+ to_x: "padding_left_top";\r
+ to_y: "padding_right_bottom";\r
+ }\r
+ align: 0.0 0.5;\r
+ }\r
+ description { state: "icononly" 0.0;\r
+ inherit: "default" 0.0;\r
+ }\r
+ }\r
+ part { name: "padding_after_icon";\r
+ type: RECT;\r
+ scale: 1;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0; //when only icon or no icon is there\r
+ align: 0.0 0.0;\r
+ rel1 {\r
+ relative: 1.0 0.0;\r
+ to: "icon_rect";\r
+ }\r
+ rel2.to: "icon_rect";\r
+ fixed: 1 0;\r
+ min: 0 0;\r
+ visible: 0;\r
+ }\r
+ description { state: "visible" 0.0;\r
+ visible: 0;\r
+ align: 0.0 0.0;\r
+ rel1 {\r
+ relative: 1.0 0.0;\r
+ to: "icon_rect";\r
+ }\r
+ rel2.to: "icon_rect";\r
+ fixed: 1 0;\r
+ min: BUTTON_NAVIFRAME_VISIBLE_PADDING_ICON_TEXT_MIN_INC;\r
+ }\r
+ description { state: "icononly" 0.0;\r
+ inherit: "default" 0.0;\r
+ }\r
+ }\r
+ part { name: "padding_before_text";\r
+ type: RECT;\r
+ scale: 1;\r
+ mouse_events: 0;\r
+ description { state: "default" 0.0; //when only icon or no icon is there\r
+ align: 1.0 0.5;\r
+ rel1 {\r
+ relative: 0.0 1.0;\r
+ to_x: "elm.text";\r
+ to_y: "padding_left_top";\r
+ }\r
+ rel2 {\r
+ relative: 0.0 0.0;\r
+ to_x: "elm.text";\r
+ to_y: "padding_right_bottom";\r
+ }\r
+ fixed: 1 0;\r
+ min: BUTTON_NAVIFRAME_VISIBLE_PADDING_ICON_TEXT_MIN_INC;\r
+ visible: 0;\r
+ }\r
+ }\r
+ part { name: "elm.swallow.content";\r
+ type: SWALLOW;\r
+ scale: 1;\r
+ clip_to: "clipper";\r
+ description { state: "default" 0.0;\r
+ visible: 0;\r
+ align: 0.0 0.5;\r
+ rel1 {\r
+ relative: 1.0 1.0;\r
+ to: "padding_left_top";\r
+ }\r
+ rel2 {\r
+ relative: 1.0 0.0;\r
+ to_x: "padding_left_top";\r
+ to_y: "padding_right_bottom";\r
+ }\r
+ fixed: 1 0;\r
+ }\r
+ description { state: "visible" 0.0;\r
+ fixed: 1 0;\r
+ min: BUTTON_NAVIFRAME_VISIBLE_ICON_MIN_MAX_INC;\r
+ max: BUTTON_NAVIFRAME_VISIBLE_ICON_MIN_MAX_INC;\r
+ align: 1.0 0.5;\r
+ rel1 {\r
+ relative: 0.0 1.0;\r
+ to_x: "padding_before_text";\r
+ to_y: "padding_left_top";\r
+ }\r
+ rel2 {\r
+ relative: 0.0 0.0;\r
+ to_x: "padding_before_text";\r
+ to_y: "padding_right_bottom";\r
+ }\r
+ }\r
+ description { state: "icononly" 0.0;\r
+ min: BUTTON_NAVIFRAME_ICONONLY_ICON_MIN_MAX_INC;\r
+ max: BUTTON_NAVIFRAME_ICONONLY_ICON_MIN_MAX_INC;\r
+ }\r
+ }\r
+ part { name: "elm.text";\r
+ type: TEXT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ clip_to: "clipper";\r
+ description { state: "default" 0.0;\r
+ visible: 0;\r
+ rel1 {\r
+ relative: 1.0 1.0;\r
+ to_x: "padding_after_icon";\r
+ to_y: "padding_left_top";\r
+ }\r
+ rel2 {\r
+ relative: 0.0 0.0;\r
+ to: "padding_right_bottom";\r
+ }\r
+ color: BUTTON_TEXT_NAVIFRAME_NORMAL_COLOR_INC;\r
+ text {\r
+ font: "SLP:style=Medium";\r
+ text_class: "slp_medium";\r
+ size: BUTTON_TEXT_NAVIFRAME_FONT_SIZE_INC;\r
+ min: 0 0;\r
+ max: 1 0;\r
+ }\r
+ }\r
+ description { state: "visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ description { state: "clicked" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ color: BUTTON_TEXT_NAVIFRAME_PRESSED_COLOR_INC;\r
+ }\r
+ description { state: "disabled" 0.0;\r
+ inherit: "default" 0.0;\r
+ color: 0 0 0 128;\r
+ }\r
+ description { state: "disabled_visible" 0.0;\r
+ inherit: "default" 0.0;\r
+ color: BUTTON_TEXT_NAVIFRAME_DISABLED_COLOR_INC;\r
+ visible: 1;\r
+ }\r
+ description { state: "focused" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ color: BUTTON_TEXT_NAVIFRAME_FOCUSED_COLOR_INC;\r
+ }\r
+ }\r
+ part { name: "over2";\r
+ type: RECT;\r
+ repeat_events: 1;\r
+ ignore_flags: ON_HOLD;\r
+ description { state: "default" 0.0;\r
+ color: 0 0 0 0;\r
+ }\r
+ }\r
+ part { name: "over3";\r
+ type: RECT;\r
+ repeat_events: 1;\r
+ description { state: "default" 0.0;\r
+ color: 0 0 0 0;\r
+ }\r
+ }\r
+ part { name: "clipper";\r
+ type: RECT;\r
+ description { state: "default" 0.0;\r
+ color: 255 255 255 255;\r
+ }\r
+ }\r
+ part { name: "disabler";\r
+ type: RECT;\r
+ description { state: "default" 0.0;\r
+ color: 0 0 0 0;\r
+ visible: 0;\r
+ }\r
+ description { state: "disabled" 0.0;\r
+ inherit: "default" 0.0;\r
+ visible: 1;\r
+ }\r
+ }\r
+ }\r
+ programs {\r
+ program { name: "button_click";\r
+ signal: "mouse,down,1";\r
+ source: "over2";\r
+ action: SIGNAL_EMIT "elm,action,press" "";\r
+ after: "button_click_anim";\r
+ }\r
+ program { name: "button_click_anim";\r
+ action: STATE_SET "clicked" 0.0;\r
+ target: "button_image";\r
+ after: "text_clicked";\r
+ }\r
+ program { name: "text_clicked";\r
+ script {\r
+ new st[31];\r
+ new Float:vl;\r
+ get_state(PART:"elm.text", st, 30, vl);\r
+ if (!strcmp(st, "visible"))\r
+ set_state(PART:"elm.text", "clicked", 0.0);\r
+ }\r
+ }\r
+ program { name: "button_unpress";\r
+ action: SIGNAL_EMIT "elm,action,unpress" "";\r
+ }\r
+ program { name: "button_mouseout_clicked";\r
+ signal: "mouse,up,1";\r
+ source: "over3";\r
+ script {\r
+ new st[31];\r
+ new Float:vl;\r
+ get_state(PART:"elm.swallow.content", st, 30, vl);\r
+ if (strcmp(st, "icononly"))\r
+ {\r
+ emit("elm,action,default,text,set", "");\r
+ set_state(PART:"elm.text", "visible", 0.0);\r
+ }\r
+ if (get_int(button_state) != BUTTON_STATE_DISABLED)\r
+ set_state(PART:"button_image", "default", 0.0);\r
+ }\r
+ after: button_unpress;\r
+ }\r
+ program { name: "button_unclick3";\r
+ signal: "mouse,clicked,1";\r
+ source: "over2";\r
+ action: SIGNAL_EMIT "elm,action,click" "";\r
+ }\r
+ program { name: "text_show";\r
+ signal: "elm,state,text,visible";\r
+ source: "elm";\r
+ script {\r
+ new st[31];\r
+ new Float:vl;\r
+ get_state(PART:"elm.swallow.content", st, 30, vl);\r
+ if (!strcmp(st, "icononly"))\r
+ {\r
+ set_state(PART:"elm.swallow.content", "visible", 0.0);\r
+ set_state(PART:"icon_rect", "visible", 0.0);\r
+ set_state(PART:"padding_after_icon", "visible", 0.0);\r
+ set_state(PART:"bg", "visible", 0.0);\r
+ }\r
+ if (get_int(button_state) != BUTTON_STATE_DISABLED)\r
+ set_state(PART:"elm.text", "visible", 0.0);\r
+ else\r
+ set_state(PART:"elm.text", "disabled_visible", 0.0);\r
+ }\r
+ }\r
+ program { name: "text_hide";\r
+ signal: "elm,state,text,hidden";\r
+ source: "elm";\r
+ script {\r
+ new st[31];\r
+ new Float:vl;\r
+ get_state(PART:"elm.swallow.content", st, 30, vl);\r
+ if (!strcmp(st, "visible"))\r
+ {\r
+ set_state(PART:"elm.swallow.content", "icononly", 0.0);\r
+ set_state(PART:"icon_rect", "icononly", 0.0);\r
+ set_state(PART:"padding_after_icon", "icononly", 0.0);\r
+ set_state(PART:"bg", "icononly", 0.0);\r
+ }\r
+ set_state(PART:"elm.text", "default", 0.0);\r
+ }\r
+ }\r
+ program { name: "icon_show";\r
+ signal: "elm,state,icon,visible";\r
+ source: "elm";\r
+ script {\r
+ new st[31];\r
+ new Float:vl;\r
+ get_state(PART:"elm.text", st, 30, vl);\r
+ if (!strcmp(st, "visible"))\r
+ {\r
+ set_state(PART:"elm.swallow.content", "visible", 0.0);\r
+ set_state(PART:"icon_rect", "visible", 0.0);\r
+ set_state(PART:"padding_after_icon", "visible", 0.0);\r
+ set_state(PART:"bg", "visible", 0.0);\r
+ }\r
+ else\r
+ {\r
+ set_state(PART:"elm.swallow.content", "icononly", 0.0);\r
+ set_state(PART:"icon_rect", "icononly", 0.0);\r
+ set_state(PART:"padding_after_icon", "icononly", 0.0);\r
+ set_state(PART:"bg", "icononly", 0.0);\r
+ }\r
+ }\r
+ }\r
+ program { name: "icon_hide";\r
+ signal: "elm,state,icon,hidden";\r
+ source: "elm";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "elm.swallow.content";\r
+ target: "padding_after_icon";\r
+ target: "icon_rect";\r
+ target: "bg";\r
+ }\r
+ program { name: "disable";\r
+ signal: "elm,state,disabled";\r
+ source: "elm";\r
+ action: STATE_SET "disabled" 0.0;\r
+ target: "button_image";\r
+ target: "disabler";\r
+ after: "disable_text";\r
+ }\r
+ program { name: "disable_text";\r
+ script {\r
+ new st[31];\r
+ new Float:vl;\r
+ get_state(PART:"elm.text", st, 30, vl);\r
+ if (!strcmp(st, "visible"))\r
+ set_state(PART:"elm.text", "disabled_visible", 0.0);\r
+ else\r
+ set_state(PART:"elm.text", "disabled", 0.0);\r
+ set_int(button_state, BUTTON_STATE_DISABLED);\r
+ }\r
+ }\r
+ program { name: "enable";\r
+ signal: "elm,state,enabled";\r
+ source: "elm";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "button_image";\r
+ target: "disabler";\r
+ after: "enable_text";\r
+ }\r
+ program { name: "enable_text";\r
+ script {\r
+ new st[31];\r
+ new Float:vl;\r
+ get_state(PART:"elm.text", st, 30, vl);\r
+ if (!strcmp(st, "disabled_visible"))\r
+ set_state(PART:"elm.text", "visible", 0.0);\r
+ else\r
+ set_state(PART:"elm.text", "default", 0.0);\r
+ set_int(button_state, BUTTON_STATE_ENABLED);\r
+ }\r
+ }\r
+ program { name: "focused";\r
+ //signal: "elm,action,focus";\r
+ //source: "elm";\r
+ action: STATE_SET "focused" 0.0;\r
+ target: "button_image";\r
+ target: "elm.text";\r
+ }\r
+ program { name: "unfocused";\r
+ //signal: "elm,action,unfocus";\r
+ //source: "elm";\r
+ action: STATE_SET "default" 0.0;\r
+ target: "button_image";\r
+ after: "unfocus_text";\r
+ }\r
+ program { name: "unfocus_text";\r
+ action: STATE_SET "visible" 0.0;\r
+ target: "elm.text";\r
+ }\r
+ }\r
+ }\r
--- /dev/null
+#define CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC 42 42
+
+#define CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC 255 255 255 255
+#define CHECK_DEFAULT_TEXT_PRESSED_COLOR_INC 255 255 255 255
+#define CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC 136 136 136 136
+
+//////////////////////////////////////////////////////////
+//
+#define GALLERY_EDC_IMAGE_CHECK_BG "T01_checkbox.png"
+#define GALLERY_EDC_IMAGE_CHECK_BG_DIM "00_check_bg_dim.png"
+#define GALLERY_EDC_IMAGE_CHECK_BG_CHECKING "T01_check.png"
+#define GALLERY_EDC_IMAGE_CHECK_ALBUM_BG "T01_checkbox.png"
+#define GALLERY_EDC_IMAGE_CHECK_GRID "T01_grid_select_check.png"
+#define GALLERY_EDC_IMAGE_CHECK_PINCH_GRID "00_grid_select_check.png"
+
+// Grid item background size W: 14+158+6; H: 24+158
+#define W 178
+#define H 182
+
+// Gap between bg and icon
+#define GAP_BG_L 14
+#define GAP_BG_R 6
+#define GAP_BG_T 24
+
+// Gap between icon and shadow
+#define GAP_ICON_L 3
+#define GAP_ICON_R 3
+#define GAP_ICON_T 0
+#define GAP_ICON_B 4
+
+// Shadow image size
+#define SHADOW_W (W-GAP_BG_L-GAP_BG_R+GAP_ICON_L+GAP_ICON_R)
+#define SHADOW_H (H-GAP_BG_T+GAP_ICON_B)
+
+// Gap between bg and shadow
+#define GAP_SHADOW_L (GAP_BG_L-GAP_ICON_L)
+#define GAP_SHADOW_R (GAP_BG_R-GAP_ICON_R)
+#define GAP_SHADOW_T (GAP_BG_T-GAP_ICON_T)
+#define GAP_SHADOW_B (0+GAP_ICON_B)
+
+
+
+#define ZOOMED_W 116 //6+104+6
+#define ZOOMED_H 110 //6+104
+
+#define ZOOMED_GAP_L 6
+#define ZOOMED_GAP_R 6
+#define ZOOMED_GAP_T 6
+#define ZOOMED_GAP_B 0
+//
+//////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////////////
+//
+// check default textblock style
+//
+///////////////////////////////////////////////////////////////////////////////////////
+ styles {
+ style { name: "check_label_textblock_style";
+ base: "font=HelveticaNeue:style=Roman font_size=32 color=#ffffff wrap=char";
+ tag: "br" "\n";
+ tag: "ps" "ps";
+ tag: "hilight" "+ font=HelveticaNeue:style=Bold";
+ tag: "b" "+ font=HelveticaNeue:style=Bold";
+ tag: "whitecolor" "+ color=#ffffff";
+ tag: "tab" "\t";
+ }
+ }
+
+#define CHECK_STATE_DEFAULT 0
+#define CHECK_STATE_VISIBLE 1
+#define CHECK_STATE_DISABLED_VISIBLE 2
+#define CHECK_STATE_DISABLED 3
+
+////////////////////////////////////////////////////////////////////////////////
+#define CHECK_STYLE_DEFAULT(style_name, image_bg, image_checking, min_width, min_height) \
+ group { name: "elm/check/base/"style_name; \
+ images { \
+ image: image_bg COMP; \
+ image: GALLERY_EDC_IMAGE_CHECK_BG_DIM COMP; \
+ image: image_checking COMP; \
+ } \
+ script { \
+ public check_state = CHECK_STATE_DEFAULT; \
+ } \
+ parts { \
+ part { name: "back_bg"; \
+ type: RECT; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ rel2.relative: 0.0 1.0; \
+ align: 0 0.5; \
+ min: min_width min_height; \
+ fixed: 1 0; \
+ color: 0 0 0 0; \
+ } \
+ } \
+ part { name: "bg"; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
+ max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
+ fixed: 1 1; \
+ rel1.to: "back_bg"; \
+ rel2.to: "back_bg"; \
+ image.normal: image_bg; \
+ fill.smooth : 0; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ image.normal: GALLERY_EDC_IMAGE_CHECK_BG_DIM; \
+ fill.smooth : 0; \
+ } \
+ } \
+ part { name: "check"; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ rel1.to: "bg"; \
+ rel2.to: "bg"; \
+ visible: 0; \
+ image.normal: image_checking; \
+ } \
+ description { state: "visible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ description { state: "disabled_visible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ } \
+ part { name: "elm.swallow.content"; \
+ type: SWALLOW; \
+ description { state: "default" 0.0; \
+ fixed: 1 0; \
+ visible: 0; \
+ color: 255 255 255 255; \
+ align: 0.0 0.5; \
+ rel1 { \
+ to_x: "bg"; \
+ relative: 1.0 0.0; \
+ offset: 1 1; \
+ } \
+ rel2 { \
+ to_x: "bg"; \
+ relative: 1.0 1.0; \
+ offset: 2 -2; \
+ } \
+ } \
+ description { state: "visible" 0.0; \
+ inherit: "default" 0.0; \
+ fixed: 1 1; \
+ visible: 1; \
+ aspect: 1.0 1.0; \
+ aspect_preference: VERTICAL; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ color: 128 128 128 128; \
+ } \
+ description { state: "disabled_visible" 0.0; \
+ inherit: "default" 0.0; \
+ color: 128 128 128 128; \
+ fixed: 1 1; \
+ visible: 1; \
+ aspect: 1.0 1.0; \
+ } \
+ } \
+ part { name: "elm.text"; \
+ type: TEXTBLOCK; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ visible: 0; \
+ fixed: 0 1; \
+ rel1 { \
+ relative: 1.0 0.5; \
+ offset: 1 1; \
+ to_x: "elm.swallow.content"; \
+ } \
+ rel2 { \
+ relative: 1.0 0.5; \
+ offset: -2 -2; \
+ } \
+ align: 0.0 0.5; \
+ text { \
+ style: "check_label_textblock_style"; \
+ min: 0 0; \
+ } \
+ color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
+ } \
+ description { state: "visible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ text.min: 1 1; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ description { state: "disabled_visible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ text.min: 1 1; \
+ color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
+ } \
+ } \
+ part { name: "events1"; \
+ type: RECT; \
+ ignore_flags: ON_HOLD; \
+ description { state: "default" 0.0; \
+ color: 0 0 0 0; \
+ } \
+ } \
+ part { name: "events2"; \
+ type: RECT; \
+ repeat_events: 1; \
+ description { state: "default" 0.0; \
+ color: 0 0 0 0; \
+ } \
+ } \
+ part { name: "disabler"; \
+ type: RECT; \
+ description { state: "default" 0.0; \
+ color: 0 0 0 0; \
+ visible: 0; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ } \
+ } \
+ programs { \
+ program { name: "click"; \
+ signal: "mouse,clicked,1"; \
+ source: "events1"; \
+ action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
+ } \
+ program { name: "check_on"; \
+ signal: "elm,state,check,on"; \
+ source: "elm"; \
+ script { \
+ set_int(check_state, CHECK_STATE_VISIBLE); \
+ set_state(PART:"check", "visible", 0.0); \
+ } \
+ } \
+ program { name: "check_off"; \
+ signal: "elm,state,check,off"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "check"; \
+ script { \
+ if (get_int(check_state) == CHECK_STATE_VISIBLE) \
+ { \
+ set_int(check_state, CHECK_STATE_DEFAULT); \
+ set_state(PART:"check", "default", 0.0); \
+ } \
+ } \
+ } \
+ program { name: "text_show"; \
+ signal: "elm,state,text,visible"; \
+ source: "elm"; \
+ action: STATE_SET "visible" 0.0; \
+ target: "elm.text"; \
+ } \
+ program { name: "text_hide"; \
+ signal: "elm,state,text,hidden"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "elm.text"; \
+ } \
+ program { name: "icon_show"; \
+ signal: "elm,state,icon,visible"; \
+ source: "elm"; \
+ action: STATE_SET "visible" 0.0; \
+ target: "elm.swallow.content"; \
+ } \
+ program { name: "icon_hide"; \
+ signal: "elm,state,icon,hidden"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "elm.swallow.content"; \
+ } \
+ program { name: "disable"; \
+ signal: "elm,state,disabled"; \
+ source: "elm"; \
+ action: STATE_SET "disabled" 0.0; \
+ target: "disabler"; \
+ target: "bg"; \
+ after: "disable_text"; \
+ } \
+ program { name: "disable_text"; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"elm.text", st, 30, vl); \
+ if (!strcmp(st, "visible")) \
+ set_state(PART:"elm.text", "disabled_visible", 0.0); \
+ else \
+ set_state(PART:"elm.text", "disabled", 0.0); \
+ get_state(PART:"elm.swallow.content", st, 30, vl); \
+ if (!strcmp(st, "visible")) \
+ set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
+ else \
+ set_state(PART:"elm.swallow.content", "disabled", 0.0); \
+ get_state(PART:"check", st, 30, vl); \
+ if (!strcmp(st, "visible")) \
+ { \
+ set_state(PART:"check", "disabled_visible", 0.0); \
+ set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
+ } \
+ } \
+ } \
+ program { name: "enable"; \
+ signal: "elm,state,enabled"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "disabler"; \
+ target: "bg"; \
+ after: "enable_text"; \
+ } \
+ program { name: "enable_text"; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"elm.text", st, 30, vl); \
+ if (!strcmp(st, "disabled_visible")) \
+ set_state(PART:"elm.text", "visible", 0.0); \
+ else \
+ set_state(PART:"elm.text", "default", 0.0); \
+ get_state(PART:"elm.swallow.content", st, 30, vl); \
+ if (!strcmp(st, "visible")) \
+ set_state(PART:"elm.swallow.content", "visible", 0.0); \
+ else \
+ set_state(PART:"elm.swallow.content", "default", 0.0); \
+ get_state(PART:"check", st, 30, vl); \
+ if (!strcmp(st, "disabled_visible")) \
+ { \
+ set_state(PART:"check", "visible", 0.0); \
+ set_int(check_state, CHECK_STATE_VISIBLE); \
+ } \
+ else \
+ set_int(check_state, CHECK_STATE_DEFAULT); \
+ } \
+ } \
+ } \
+ }
+
+////////////////////////////////////////////////////////////////////////////////
+ CHECK_STYLE_DEFAULT("gallery/default", GALLERY_EDC_IMAGE_CHECK_BG, GALLERY_EDC_IMAGE_CHECK_BG_CHECKING, 42, 42)
+
+////////////////////////////////////////////////////////////////////////////////
+ CHECK_STYLE_DEFAULT("gallery/album", GALLERY_EDC_IMAGE_CHECK_ALBUM_BG, GALLERY_EDC_IMAGE_CHECK_BG_CHECKING, 42, 42)
+
+////////////////////////////////////////////////////////////////////////////////
+#define CHECK_STYLE_GRID(style_name, image_grid, width, height) \
+ group { name: "elm/check/base/"style_name; \
+ images.image: image_grid COMP; \
+ parts { \
+ part { name: "bg"; \
+ type: RECT; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ color: 0 0 0 0; \
+ } \
+ description { state: "pressed" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 0; \
+ } \
+ } \
+ part { name: "icon_bg_img"; \
+ type: RECT; \
+ mouse_events: 0; \
+ scale : 1; \
+ description { \
+ color: 0 0 0 0; \
+ rel1 { relative: GAP_SHADOW_L/W GAP_SHADOW_T/H; to: "bg"; } \
+ rel2 { relative: (W-GAP_SHADOW_R-1)/W (H+GAP_SHADOW_B-1)/H; to: "bg"; } \
+ } \
+ } \
+ part { name: "icon_bg"; \
+ type: RECT; \
+ description { state: "default" 0.0; \
+ color: 0 0 0 0; \
+ rel1 { relative: GAP_ICON_L/SHADOW_W GAP_ICON_T/SHADOW_H; to: "icon_bg_img"; } \
+ rel2 { relative: (SHADOW_W-GAP_ICON_R+2)/SHADOW_W (SHADOW_H-GAP_ICON_B+1)/SHADOW_H; to: "icon_bg_img"; } \
+ } \
+ } \
+ part { name: "bg2"; \
+ type: RECT; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ rel1.to: "icon_bg"; \
+ rel2.to: "icon_bg"; \
+ align: 0.5 0.5; \
+ min: width height; \
+ max: width height; \
+ color: 0 0 0 0; \
+ } \
+ description { state: "pressed" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 0; \
+ } \
+ } \
+ part { name: "selected_bg"; \
+ type: RECT; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ rel1.to: "icon_bg"; \
+ rel2.to: "icon_bg"; \
+ color: 0 0 0 0; \
+ visible: 0; \
+ } \
+ description { state: "visible" 0.0; \
+ inherit: "default" 0.0; \
+ color: 0 0 0 153; \
+ visible: 1; \
+ } \
+ } \
+ part { name: "check"; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ rel1.to: "bg2"; \
+ rel2.to: "bg2"; \
+ visible: 0; \
+ image.normal: image_grid; \
+ } \
+ description { state: "visible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ description { state: "pressed" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ description { state: "disabled_visible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ } \
+ part { name: "elm.swallow.content"; \
+ type: SWALLOW; \
+ description { \
+ state: "default" 0.0; \
+ fixed: 1 0; \
+ visible: 0; \
+ color: 255 255 255 255; \
+ align: 0.0 0.5; \
+ rel1 { \
+ to_x: "bg2"; \
+ relative: 1.0 0.0; \
+ offset: 1 1; \
+ } \
+ rel2 { \
+ to_x: "bg2"; \
+ relative: 1.0 1.0; \
+ offset: 2 -2; \
+ } \
+ } \
+ description { state: "visible" 0.0; \
+ inherit: "default" 0.0; \
+ fixed: 1 1; \
+ visible: 1; \
+ aspect: 1.0 1.0; \
+ aspect_preference: VERTICAL; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ color: 128 128 128 128; \
+ } \
+ description { state: "disabled_visible" 0.0; \
+ inherit: "default" 0.0; \
+ color: 128 128 128 128; \
+ fixed: 1 1; \
+ visible: 1; \
+ aspect: 1.0 1.0; \
+ } \
+ } \
+ part { name: "elm.text"; \
+ type: TEXTBLOCK; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ visible: 0; \
+ fixed: 0 1; \
+ rel1 { \
+ relative: 1.0 0.5; \
+ offset: 1 1; \
+ to_x: "elm.swallow.content"; \
+ } \
+ rel2 { \
+ relative: 1.0 0.5; \
+ offset: -2 -2; \
+ } \
+ color: 255 255 255 255; \
+ align: 0.0 0.5; \
+ text { \
+ style: "check_label_textblock_style"; \
+ min: 0 0; \
+ } \
+ color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
+ } \
+ description { state: "visible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ text.min: 1 1; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ } \
+ description { state: "disabled_visible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ text.min: 1 1; \
+ color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
+ } \
+ } \
+ part { name: "events"; \
+ type: RECT; \
+ ignore_flags: ON_HOLD; \
+ description { state: "default" 0.0; \
+ color: 0 0 0 0; \
+ } \
+ } \
+ part { name: "disabler"; \
+ type: RECT; \
+ description { state: "default" 0.0; \
+ color: 0 0 0 0; \
+ visible: 0; \
+ } \
+ description { state: "disabled" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ } \
+ } \
+ programs { \
+ program { name: "click"; \
+ signal: "mouse,up,1"; \
+ source: "events"; \
+ action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
+ after: "bg_normal"; \
+ } \
+ program { name: "bg_normal"; \
+ script { \
+ set_state(PART:"bg", "default", 0.0); \
+ set_state(PART:"bg2", "default", 0.0); \
+ } \
+ } \
+ program { name: "mouseout"; \
+ signal: "mouse,out"; \
+ source: "events"; \
+ after: "bg_check_normal"; \
+ } \
+ program { name: "bg_check_normal"; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"check", st, 30, vl); \
+ if (!strcmp(st, "pressed")) \
+ set_state(PART:"check", "visible", 0.0); \
+ set_state(PART:"bg", "default", 0.0); \
+ set_state(PART:"bg2", "default", 0.0); \
+ } \
+ } \
+ program { name: "pressed"; \
+ signal: "mouse,down,1"; \
+ source: "events"; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"check", st, 30, vl); \
+ if (!strcmp(st, "visible")) \
+ set_state(PART:"check", "pressed", 0.0); \
+ set_state(PART:"bg", "pressed", 0.0); \
+ set_state(PART:"bg2", "pressed", 0.0); \
+ } \
+ } \
+ program { name: "check_on"; \
+ signal: "elm,state,check,on"; \
+ source: "elm"; \
+ action: STATE_SET "visible" 0.0; \
+ target: "check"; \
+ target: "selected_bg"; \
+ } \
+ program { name: "check_off"; \
+ signal: "elm,state,check,off"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "check"; \
+ target: "selected_bg"; \
+ } \
+ program { name: "text_show"; \
+ signal: "elm,state,text,visible"; \
+ source: "elm"; \
+ action: STATE_SET "visible" 0.0; \
+ target: "elm.text"; \
+ } \
+ program { name: "text_hide"; \
+ signal: "elm,state,text,hidden"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "elm.text"; \
+ } \
+ program { name: "icon_show"; \
+ signal: "elm,state,icon,visible"; \
+ source: "elm"; \
+ action: STATE_SET "visible" 0.0; \
+ target: "elm.swallow.content"; \
+ } \
+ program { name: "icon_hide"; \
+ signal: "elm,state,icon,hidden"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "elm.swallow.content"; \
+ } \
+ program { name: "disable"; \
+ signal: "elm,state,disabled"; \
+ source: "elm"; \
+ action: STATE_SET "disabled" 0.0; \
+ target: "disabler"; \
+ target: "bg"; \
+ target: "bg2"; \
+ after: "disable_text"; \
+ } \
+ program { name: "disable_text"; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"elm.text", st, 30, vl); \
+ if (!strcmp(st, "visible")) \
+ set_state(PART:"elm.text", "disabled_visible", 0.0); \
+ else \
+ set_state(PART:"elm.text", "disabled", 0.0); \
+ get_state(PART:"elm.swallow.content", st, 30, vl); \
+ if (!strcmp(st, "visible")) \
+ set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
+ else \
+ set_state(PART:"elm.swallow.content", "disabled", 0.0); \
+ get_state(PART:"check", st, 30, vl); \
+ if (!strcmp(st, "visible")) \
+ set_state(PART:"check", "disabled_visible", 0.0); \
+ } \
+ } \
+ program { name: "enable"; \
+ signal: "elm,state,enabled"; \
+ source: "elm"; \
+ action: STATE_SET "default" 0.0; \
+ target: "disabler"; \
+ target: "bg"; \
+ target: "bg2"; \
+ after: "enable_text"; \
+ } \
+ program { name: "enable_text"; \
+ script { \
+ new st[31]; \
+ new Float:vl; \
+ get_state(PART:"elm.text", st, 30, vl); \
+ if (!strcmp(st, "disabled_visible")) \
+ set_state(PART:"elm.text", "visible", 0.0); \
+ else \
+ set_state(PART:"elm.text", "default", 0.0); \
+ get_state(PART:"elm.swallow.content", st, 30, vl); \
+ if (!strcmp(st, "visible")) \
+ set_state(PART:"elm.swallow.content", "visible", 0.0); \
+ else \
+ set_state(PART:"elm.swallow.content", "default", 0.0); \
+ get_state(PART:"check", st, 30, vl); \
+ if (!strcmp(st, "disabled_visible")) \
+ set_state(PART:"check", "visible", 0.0); \
+ } \
+ } \
+ } \
+ }
+
+////////////////////////////////////////////////////////////////////////////////
+ CHECK_STYLE_GRID("gallery/grid", GALLERY_EDC_IMAGE_CHECK_GRID, 64, 64)
+
+////////////////////////////////////////////////////////////////////////////////
+ group { name: "elm/check/base/gallery/pinch/grid";
+ images.image: GALLERY_EDC_IMAGE_CHECK_PINCH_GRID COMP;
+ parts {
+ part { name: "bg";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "icon_bg";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ rel1 { relative: ZOOMED_GAP_L/ZOOMED_W ZOOMED_GAP_T/ZOOMED_H; to: "bg"; }
+ rel2 { relative: (ZOOMED_W-ZOOMED_GAP_R)/ZOOMED_W (ZOOMED_H-ZOOMED_GAP_B)/ZOOMED_H; to: "bg"; }
+ }
+ }
+ part { name: "bg2";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "icon_bg";
+ rel2.to: "icon_bg";
+ align: 0.5 0.5;
+ min: 40 40;
+ max: 40 40;
+ color: 0 0 0 0;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "selected_bg";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "icon_bg";
+ rel2.to: "icon_bg";
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 153;
+ visible: 1;
+ }
+ }
+ part { name: "check";
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "bg2";
+ rel2.to: "bg2";
+ visible: 0;
+ image.normal: GALLERY_EDC_IMAGE_CHECK_PINCH_GRID;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ fixed: 1 0;
+ visible: 0;
+ color: 255 255 255 255;
+ align: 0.0 0.5;
+ rel1 {
+ to_x: "bg2";
+ relative: 1.0 0.0;
+ offset: 1 1;
+ }
+ rel2 {
+ to_x: "bg2";
+ relative: 1.0 1.0;
+ offset: 2 -2;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ fixed: 1 1;
+ visible: 1;
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 128 128 128 128;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ color: 128 128 128 128;
+ fixed: 1 1;
+ visible: 1;
+ aspect: 1.0 1.0;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 0.5;
+ offset: 1 1;
+ to_x: "elm.swallow.content";
+ }
+ rel2 {
+ relative: 1.0 0.5;
+ offset: -2 -2;
+ }
+ color: 255 255 255 255;
+ align: 0.0 0.5;
+ text {
+ style: "check_label_textblock_style";
+ min: 0 0;
+ }
+ color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ text.min: 1 1;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ text.min: 1 1;
+ color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
+ }
+ }
+ part { name: "events";
+ type: RECT;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "disabler";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program { name: "click";
+ signal: "mouse,up,1";
+ source: "events";
+ action: SIGNAL_EMIT "elm,action,check,toggle" "";
+ after: "bg_normal";
+ }
+ program { name: "bg_normal";
+ script {
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"bg2", "default", 0.0);
+ }
+ }
+ program { name: "mouseout";
+ signal: "mouse,out";
+ source: "events";
+ after: "bg_check_normal";
+ }
+ program { name: "bg_check_normal";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"check", st, 30, vl);
+ if (!strcmp(st, "pressed"))
+ set_state(PART:"check", "visible", 0.0);
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"bg2", "default", 0.0);
+ }
+ }
+ program { name: "pressed";
+ signal: "mouse,down,1";
+ source: "events";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"check", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"check", "pressed", 0.0);
+ set_state(PART:"bg", "pressed", 0.0);
+ set_state(PART:"bg2", "pressed", 0.0);
+ }
+ }
+ program { name: "check_on";
+ signal: "elm,state,check,on";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "check";
+ target: "selected_bg";
+ }
+ program { name: "check_off";
+ signal: "elm,state,check,off";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "check";
+ target: "selected_bg";
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.text";
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.text";
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disabler";
+ target: "bg";
+ target: "bg2";
+ after: "disable_text";
+ }
+ program { name: "disable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ else
+ set_state(PART:"elm.text", "disabled", 0.0);
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
+ else
+ set_state(PART:"elm.swallow.content", "disabled", 0.0);
+ get_state(PART:"check", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"check", "disabled_visible", 0.0);
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disabler";
+ target: "bg";
+ target: "bg2";
+ after: "enable_text";
+ }
+ program { name: "enable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "disabled_visible"))
+ set_state(PART:"elm.text", "visible", 0.0);
+ else
+ set_state(PART:"elm.text", "default", 0.0);
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ else
+ set_state(PART:"elm.swallow.content", "default", 0.0);
+ get_state(PART:"check", st, 30, vl);
+ if (!strcmp(st, "disabled_visible"))
+ set_state(PART:"check", "visible", 0.0);
+ }
+ }
+ }
+ }
+
+////////////////////////////////////////////////////////////////////////////////
+ group { name: "elm/check/base/gallery/album/grid";
+ parts {
+ part { name: "bg";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "bg2";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "bg";
+ rel2.to: "bg";
+ align: 0.5 0.5;
+ min: 40 40;
+ max: 40 40;
+ color: 0 0 0 0;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "selected_bg";
+ type: RECT;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "bg";
+ rel2.to: "bg";
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 153;
+ visible: 1;
+ }
+ }
+ part { name: "check";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "bg2";
+ rel2.to: "bg2";
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ fixed: 1 0;
+ visible: 0;
+ color: 255 255 255 255;
+ align: 0.0 0.5;
+ rel1 {
+ to_x: "bg2";
+ relative: 1.0 0.0;
+ offset: 1 1;
+ }
+ rel2 {
+ to_x: "bg2";
+ relative: 1.0 1.0;
+ offset: 2 -2;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ fixed: 1 1;
+ visible: 1;
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 128 128 128 128;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ color: 128 128 128 128;
+ fixed: 1 1;
+ visible: 1;
+ aspect: 1.0 1.0;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 0.5;
+ offset: 1 1;
+ to_x: "elm.swallow.content";
+ }
+ rel2 {
+ relative: 1.0 0.5;
+ offset: -2 -2;
+ }
+ color: 255 255 255 255;
+ align: 0.0 0.5;
+ text {
+ style: "check_label_textblock_style";
+ min: 0 0;
+ }
+ color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ text.min: 1 1;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "disabled_visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ text.min: 1 1;
+ color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
+ }
+ }
+ part { name: "events";
+ type: RECT;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "disabler";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program { name: "click";
+ signal: "mouse,up,1";
+ source: "events";
+ action: SIGNAL_EMIT "elm,action,check,toggle" "";
+ after: "bg_normal";
+ }
+ program { name: "bg_normal";
+ script {
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"bg2", "default", 0.0);
+ }
+ }
+ program { name: "mouseout";
+ signal: "mouse,out";
+ source: "events";
+ after: "bg_check_normal";
+ }
+ program { name: "bg_check_normal";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"check", st, 30, vl);
+ if (!strcmp(st, "pressed"))
+ set_state(PART:"check", "visible", 0.0);
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"bg2", "default", 0.0);
+ }
+ }
+ program { name: "pressed";
+ signal: "mouse,down,1";
+ source: "events";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"check", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"check", "pressed", 0.0);
+ set_state(PART:"bg", "pressed", 0.0);
+ set_state(PART:"bg2", "pressed", 0.0);
+ }
+ }
+ program { name: "check_on";
+ signal: "elm,state,check,on";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "check";
+ target: "selected_bg";
+ }
+ program { name: "check_off";
+ signal: "elm,state,check,off";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "check";
+ target: "selected_bg";
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.text";
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.text";
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disabler";
+ target: "bg";
+ target: "bg2";
+ after: "disable_text";
+ }
+ program { name: "disable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.text", "disabled_visible", 0.0);
+ else
+ set_state(PART:"elm.text", "disabled", 0.0);
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
+ else
+ set_state(PART:"elm.swallow.content", "disabled", 0.0);
+ get_state(PART:"check", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"check", "disabled_visible", 0.0);
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disabler";
+ target: "bg";
+ target: "bg2";
+ after: "enable_text";
+ }
+ program { name: "enable_text";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "disabled_visible"))
+ set_state(PART:"elm.text", "visible", 0.0);
+ else
+ set_state(PART:"elm.text", "default", 0.0);
+ get_state(PART:"elm.swallow.content", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ set_state(PART:"elm.swallow.content", "visible", 0.0);
+ else
+ set_state(PART:"elm.swallow.content", "default", 0.0);
+ get_state(PART:"check", st, 30, vl);
+ if (!strcmp(st, "disabled_visible"))
+ set_state(PART:"check", "visible", 0.0);
+ }
+ }
+ }
+ }
+
+#undef CHECK_STATE_DEFAULT
+#undef CHECK_STATE_VISIBLE
+#undef CHECK_STATE_DISABLED_VISIBLE
+#undef CHECK_STATE_DISABLED
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
+* Refer to nbeat-theme\themes\groups\controlbar.edc
+*/
-#define CONTROLBAR_LARGE_H 78
+#define CONTROLBAR_LARGE_H 78 //Macros defined in file: nbeat.edc.
#define CONTROLBAR_LARGE_LANDSCAPE_H 62
#define CONTROLBAR_SMALL_H 65
#define CONTROLBAR_SMALL_LANDSCAPE_H 50
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////////////
+//
+// ctxpopup
+//
+///////////////////////////////////////////////////////////////////////////////////////
+
+#define CTXPOPUP_SHADOW_PADDING 10
+#define CTXPOPUP_FRAME_CORNER_SIZE 4 4
+#define CTXPOPUP_FONT_COLOR 0 0 0 255
+#define CTXPOPUP_CLICKED_FONT_COLOR 255 255 255 255
+#define CTXPOPUP_ITEM_DISABLED_COLOR 0 0 0 100
+#define CTXPOPUP_LIST_PADDING 10
+#define CTXPOPUP_LIST_SHADOW_PADDING 3
+
+#define CTXPOPUP_BUBBLE_BG_IMAGE "white/common/00_popup_bubble_bg.png"
+#define CTXPOPUP_BG_IMAGE "white/common/T01-2_popup_bg.png"
+#define CTXPOPUP_BUBBLE_BG_IMAGE_BORDER 13 13 13 13
+#define CTXPOPUP_BG_IMAGE_BORDER 3 3 3 3
+#define CTXPOPUP_BG_IMAGEEDITOR_BORDER 10 10 10 10
+#define CTXPOPUP_BG_COLOR_INC 0 0 0 165
+#define CTXPOPUP_BG_PRESS_COLOR_INC 0 140 210 255
+#define CTXPOPUP_MAIN_TEXT_UNREAD_COLOR_INC 249 249 249 255
+#define CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC 249 249 249 255
+#define CTXPOPUP_SEPARATOR_COLOR_INC 200 200 200 255
+#define CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC 200 200 200 255
+#define CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC 1 0
+#define CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC 1 999999
+#define CTXPOPUP_VERTICAL_SEPARATOR_MIN_SIZE_INC 0 1
+#define CTXPOPUP_VERTICAL_SEPARATOR_MAX_SIZE_INC 999999 1
+#define CTXPOPUP_TP_BG_COLOR_INC 0 140 210 255
+#define CTXPOPUP_ITEM_TEXT_SIZE_INC 44
+#define CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC 44
+#define CTXPOPUP_ITEM_HEIGHT_INC 110
+#define CTXPOPUP_ITEM_ICON_INC 160 110
+#define CTXPOPUP_ICON_WIDTH_INC 80
+#define CTXPOPUP_ICON_HEIGHT_INC 80
+#define CTXPOPUP_ARROW_SIZE_INC 48 48
+#define CTXPOPUP_CONTENT_WIDTH_MAX_INC 630
+#define CTXPOPUP_ITEM_PADDING_INC 25
+#define CTXPOPUP_IE_ARROW_SIZE_INC 52
+#define CTXPOPUP_IE_FONT_SIZE_INC 40
+#define CTXPOPUP_IE_ITEM_PADDING_INC 22
+#define CTXPOPUP_IE_ITEM_HEIGHT_INC 75
+#define CTXPOPUP_IE_CONTENT_WIDTH_MAX_INC 720
+#define CTXPOPUP_IE_ICON_WIDTH_INC 60
+#define CTXPOPUP_IE_ICON_HEIGHT_INC 60
+#define CTXPOPUP_TP_ARROW_SIZE_INC 30
+#define CTXPOPUP_TP_HEIGHT_INC 106
+
+///////////////////////////////////////////////////////////////////////////////
+ group {
+ name: "elm/scroller/base/video/ctxpopup";
+ script {
+ public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
+ public timer0(val) {
+ new v;
+ v = get_int(sbvis_v);
+ if (v) {
+ v = get_int(sbalways_v);
+ if(!v) {
+ emit("do-hide-vbar", "");
+ set_int(sbvis_v, 0);
+ }
+ }
+ v = get_int(sbvis_h);
+ if (v) {
+ v = get_int(sbalways_h);
+ if(!v) {
+ emit("do-hide-hbar", "");
+ set_int(sbvis_h, 0);
+ }
+ }
+ set_int(sbvis_timer, 0);
+ return 0;
+ }
+ }
+ images {
+ image: "white/common/01_scroller.png" COMP;
+ }
+ parts {
+ part {
+ name: "clipper";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ part {
+ name: "elm.swallow.content";
+ clip_to: "clipper";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.5 0.5;
+ }
+ }
+ part {
+ name: "sb_vbar_clip_master";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ }
+ description {
+ state: "hidden" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ }
+ }
+ part {
+ name: "sb_vbar_clip";
+ clip_to:"sb_vbar_clip_master";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ rel2{ to:"clipper"; relative: 1.0 1.0;}
+ }
+ description {
+ state: "hidden" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ }
+ }
+ part {
+ name: "sb_vbar";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ visible: 0;
+ align: 1.0 0.0;
+ rel1{ to:"clipper"; relative: 1.0 0.0; }
+ rel2{ to:"clipper"; relative: 1.0 1.0;}
+ }
+ }
+ part {
+ name: "elm.dragable.vbar";
+ clip_to: "sb_vbar_clip";
+ mouse_events: 0;
+ scale: 1;
+ dragable {
+ x: 0 0 0;
+ y: 1 1 0;
+ confine: "sb_vbar";
+ }
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ min: 14 32;
+ rel1 {
+ relative: 0.5 0.5;
+ to: "sb_vbar";
+ }
+ rel2 {
+ relative: 0.5 0.5;
+ to: "sb_vbar";
+ }
+ image {
+ normal: "white/common/01_scroller.png";
+ border: 0 0 6 6;
+ border_scale: 1;
+ }
+ }
+ }
+ part {
+ name: "sb_hbar_clip_master";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ }
+ description {
+ state: "hidden" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ }
+ }
+ part {
+ name: "sb_hbar_clip";
+ clip_to: "sb_hbar_clip_master";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ rel2{ to:"clipper"; relative: 1.0 1.0;}
+ }
+ description {
+ state: "hidden" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ }
+ }
+ part {
+ name: "sb_hbar";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ visible: 0;
+ align: 0.0 1.0;
+ rel1 {to:"clipper"; relative: 0.0 1.0;}
+ rel2 {to:"clipper"; relative: 1.0 1.0;}
+ }
+ }
+ part {
+ name: "elm.dragable.hbar";
+ clip_to: "sb_hbar_clip";
+ mouse_events: 0;
+ scale: 1;
+ dragable {
+ x: 1 1 0;
+ y: 0 0 0;
+ confine: "sb_hbar";
+ }
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ min: 32 12;
+ rel1 {relative: 0.5 0.5; to: "sb_hbar";}
+ rel2 {relative: 0.5 0.5; to: "sb_hbar";}
+ image {
+ normal: "white/common/01_scroller.png";
+ border: 6 6 0 0;
+ border_scale: 1;
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "load";
+ signal: "load";
+ source: "";
+ script {
+ set_state(PART:"sb_vbar_clip", "hidden", 0.0);
+ set_state(PART:"sb_hbar_clip", "hidden", 0.0);
+ set_int(sbvis_v, 0);
+ set_int(sbvis_h, 0);
+ set_int(sbalways_v, 0);
+ set_int(sbalways_h, 0);
+ set_int(sbvis_timer, 0);
+ }
+ }
+ program {
+ name: "vbar_show";
+ signal: "elm,action,show,vbar";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "sb_vbar_clip_master";
+ }
+ program {
+ name: "vbar_hide";
+ signal: "elm,action,hide,vbar";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "sb_vbar_clip_master";
+ }
+ program {
+ name: "vbar_show_always";
+ signal: "elm,action,show_always,vbar";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbvis_v);
+ v |= get_int(sbalways_v);
+ if (!v) {
+ set_int(sbalways_v, 1);
+ emit("do-show-vbar", "");
+ set_int(sbvis_v, 1);
+ }
+ }
+ }
+ program {
+ name: "vbar_show_notalways";
+ signal: "elm,action,show_notalways,vbar";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbalways_v);
+ if (v) {
+ set_int(sbalways_v, 0);
+ v = get_int(sbvis_v);
+ if (!v) {
+ emit("do-hide-vbar", "");
+ set_int(sbvis_v, 0);
+ }
+ }
+ }
+ }
+ program {
+ name: "sb_vbar_show";
+ signal: "do-show-vbar";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 1.0;
+ target: "sb_vbar_clip";
+ }
+ program {
+ name: "sb_vbar_hide";
+ signal: "do-hide-vbar";
+ source: "";
+ action: STATE_SET "hidden" 0.0;
+ transition: LINEAR 1.0;
+ target: "sb_vbar_clip";
+ }
+ program {
+ name: "hbar_show";
+ signal: "elm,action,show,hbar";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "sb_hbar_clip_master";
+ }
+ program {
+ name: "hbar_hide";
+ signal: "elm,action,hide,hbar";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "sb_hbar_clip_master";
+ }
+ program {
+ name: "hbar_show_always";
+ signal: "elm,action,show_always,hbar";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbvis_h);
+ v |= get_int(sbalways_h);
+ if (!v) {
+ set_int(sbalways_h, 1);
+ emit("do-show-hbar", "");
+ set_int(sbvis_h, 1);
+ }
+ }
+ }
+ program {
+ name: "hbar_show_notalways";
+ signal: "elm,action,show_notalways,hbar";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbalways_h);
+ if (v) {
+ set_int(sbalways_h, 0);
+ v = get_int(sbvis_h);
+ if (!v) {
+ emit("do-hide-hbar", "");
+ set_int(sbvis_h, 0);
+ }
+ }
+ }
+ }
+ program {
+ name: "sb_hbar_show";
+ signal: "do-show-hbar";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 1.0;
+ target: "sb_hbar_clip";
+ }
+ program {
+ name: "sb_hbar_hide";
+ signal: "do-hide-hbar";
+ source: "";
+ action: STATE_SET "hidden" 0.0;
+ transition: LINEAR 1.0;
+ target: "sb_hbar_clip";
+ }
+ program {
+ name: "scroll";
+ signal: "elm,action,scroll";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ script {
+ new v;
+ v = get_int(sbvis_v);
+ v |= get_int(sbalways_v);
+ if (!v) {
+ emit("do-show-vbar", "");
+ set_int(sbvis_v, 1);
+ }
+ v = get_int(sbvis_h);
+ v |= get_int(sbalways_h);
+ if(!v) {
+ emit("do-show-hbar", "");
+ set_int(sbvis_h, 1);
+ }
+ v = get_int(sbvis_timer);
+ if (v > 0) cancel_timer(v);
+ v = timer(2.0, "timer0", 0);
+ set_int(sbvis_timer, v);
+ }
+ }
+ }
+ }
+///////////////////////////////////////////////////////////////////////////////
+ group {
+ name: "elm/ctxpopup/bg/video/pass_event";
+ alias: "elm/ctxpopup/bg/video/extended/entry/pass_event";
+ alias: "elm/ctxpopup/bg/video/extended/entry";
+ alias: "elm/ctxpopup/bg/video/timepicker";
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ }
+ description {
+ state: "visible" 0.0;
+ visible: 0;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "show";
+ signal: "elm,state,show";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "bg";
+ }
+ program {
+ name: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ }
+ }
+ }
+///////////////////////////////////////////////////////////////////////////////
+ group {
+ name: "elm/ctxpopup/bg/video/default";
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ }
+ description {
+ state: "visible" 0.0;
+ color: 0 0 0 0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "clicked_event";
+ signal: "mouse,clicked,1";
+ source: "bg";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program {
+ name: "show";
+ signal: "elm,state,show";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "bg";
+ }
+ program {
+ name: "hide";
+ signal: "elm,state,hide";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ }
+ }
+ }
+
+ group {
+ name: "elm/ctxpopup/base/video/default";
+ images {
+ image: CTXPOPUP_BUBBLE_BG_IMAGE COMP;
+ image: CTXPOPUP_BG_IMAGE COMP;
+ }
+ parts {
+ part {
+ name:"frame_shadow_left_top_padding";
+ type:RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ min: CTXPOPUP_SHADOW_PADDING CTXPOPUP_SHADOW_PADDING;
+ max: CTXPOPUP_SHADOW_PADDING CTXPOPUP_SHADOW_PADDING;
+ rel2 { relative: 0 0; }
+ align: 1 1;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+ part {
+ name:"frame_shadow_right_bottom_padding";
+ type:RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ min: CTXPOPUP_SHADOW_PADDING CTXPOPUP_SHADOW_PADDING;
+ max: CTXPOPUP_SHADOW_PADDING CTXPOPUP_SHADOW_PADDING;
+ rel1{relative: 1 1;}
+ align: 0 0;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "frame_shadow";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "ctxpopup_clip";
+ description {
+ state: "default" 0.0;
+ rel1 {
+ relative: 0.2 0.2;
+ to:"frame_shadow_left_top_padding";
+ }
+ rel2 {
+ relative: 0.8 0.8;
+ to:"frame_shadow_right_bottom_padding";
+ }
+ image {
+ normal: CTXPOPUP_BUBBLE_BG_IMAGE;
+ border: CTXPOPUP_BUBBLE_BG_IMAGE_BORDER;
+ border_scale: 1;
+ }
+ }
+ }
+
+ part { name: "arrow_area_left";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "ctxpopup_clip";
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 40 0;
+ fixed: 1 1;
+ align: 1 0.5;
+ rel1 {
+ relative: 0 1;
+ to_y: "ctxpopup_frame_left_top";
+ }
+ rel2 {
+ relative:0 0;
+ to:"ctxpopup_frame_left_bottom";
+ }
+ }
+ }
+ part { name: "arrow_area_right";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "ctxpopup_clip";
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 40 0;
+ fixed: 1 1;
+ align: 0 0.5;
+ rel1 {
+ relative: 1 1;
+ to:"ctxpopup_frame_right_top";
+ }
+ rel2 {
+ relative: 1 0;
+ to_y: "ctxpopup_frame_right_bottom";
+ }
+ }
+ }
+ part { name: "arrow_area_up";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "ctxpopup_clip";
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 0 40;
+ fixed: 1 1;
+ align: 0.5 1;
+ rel1 {
+ relative: 1 0;
+ to_x: "ctxpopup_frame_left_top";
+ }
+ rel2 {
+ relative: 0 0;
+ to:"ctxpopup_frame_right_top";
+ }
+ }
+ }
+ part { name: "arrow_area_down";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "ctxpopup_clip";
+ description { state: "default" 0.0;
+ visible: 0;
+ min: 0 40;
+ fixed: 1 1;
+ align: 0.5 0;
+ rel1 {
+ relative: 1 1;
+ to:"ctxpopup_frame_left_bottom";
+ }
+ rel2 {
+ relative: 0 1;
+ to_x: "ctxpopup_frame_right_bottom";
+ }
+ }
+ }
+ part { name: "elm.swallow.arrow_up";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "ctxpopup_clip";
+ dragable {
+ x: 1 1 0;
+ y: 1 1 0;
+ confine: "arrow_area_up";
+ }
+ description {
+ state: "default" 0.0;
+ min: 40 40;
+ fixed: 1 1;
+ visible: 1;
+ }
+ }
+ part { name: "elm.swallow.arrow_down";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "ctxpopup_clip";
+ dragable {
+ x: 1 1 0;
+ y: 1 1 0;
+ confine: "arrow_area_down";
+ }
+ description {
+ state: "default" 0.0;
+ min: 40 40;
+ fixed: 1 1;
+ visible: 1;
+ }
+ }
+ part { name: "elm.swallow.arrow_left";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "ctxpopup_clip";
+ dragable {
+ x: 1 1 0;
+ y: 1 1 0;
+ confine: "arrow_area_left";
+ }
+ description {
+ state: "default" 0.0;
+ min: 40 40;
+ fixed: 1 1;
+ visible: 1;
+ }
+ }
+ part { name: "elm.swallow.arrow_right";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "ctxpopup_clip";
+ dragable {
+ x: 1 1 0;
+ y: 1 1 0;
+ confine: "arrow_area_right";
+ }
+ description {
+ state: "default" 0.0;
+ min: 40 40;
+ fixed: 1 1;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "ctxpopup_frame_left_top";
+ type: RECT;
+ scale: 1;
+ description {
+ visible: 0;
+ align: 0 0;
+ min: CTXPOPUP_FRAME_CORNER_SIZE;
+ max: CTXPOPUP_FRAME_CORNER_SIZE;
+ }
+ }
+
+ part {
+ name: "ctxpopup_frame_right_top";
+ type: RECT;
+ scale: 1;
+ description {
+ visible: 0;
+ align: 1 0;
+ min: CTXPOPUP_FRAME_CORNER_SIZE;
+ max: CTXPOPUP_FRAME_CORNER_SIZE;
+ }
+ }
+
+ part {
+ name: "ctxpopup_frame_left_bottom";
+ type: RECT;
+ scale: 1;
+ description {
+ visible: 0;
+ align: 0 1;
+ min: CTXPOPUP_FRAME_CORNER_SIZE;
+ max: CTXPOPUP_FRAME_CORNER_SIZE;
+ }
+ }
+
+ part {
+ name: "ctxpopup_frame_right_bottom";
+ type: RECT;
+ scale: 1;
+ description {
+ visible: 0;
+ align: 1 1;
+ min: CTXPOPUP_FRAME_CORNER_SIZE;
+ max: CTXPOPUP_FRAME_CORNER_SIZE;
+ }
+ }
+ part {
+ name:"list_shadow_right_bottom_padding";
+ type:RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ min: CTXPOPUP_LIST_SHADOW_PADDING CTXPOPUP_LIST_SHADOW_PADDING;
+ max: CTXPOPUP_LIST_SHADOW_PADDING CTXPOPUP_LIST_SHADOW_PADDING;
+ align: 0 0;
+ fixed: 1 1;
+ visible: 0;
+ rel1 {to:"elm.swallow.content"; relative: 1 1;}
+ }
+ }
+ part {
+ name:"content_left_top_padding";
+ type:RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: CTXPOPUP_LIST_PADDING CTXPOPUP_LIST_PADDING;
+ max: CTXPOPUP_LIST_PADDING CTXPOPUP_LIST_PADDING;
+ align: 0 0;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+ part {
+ name:"content_right_bottom_padding";
+ type:RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ min: CTXPOPUP_LIST_PADDING CTXPOPUP_LIST_PADDING;
+ max: CTXPOPUP_LIST_PADDING CTXPOPUP_LIST_PADDING;
+ rel1 { relative: 1 1;}
+ rel2 { relative: 1 1;}
+ align: 1 1;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+
+
+ part {
+ name: "frame_bg";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "ctxpopup_clip";
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ rel1 {to:"ctxpopup_frame_left_top";}
+ rel2 {to:"ctxpopup_frame_right_bottom";}
+ image {
+ normal: CTXPOPUP_BG_IMAGE;
+ border: CTXPOPUP_BG_IMAGE_BORDER;
+ border_scale: 1;
+ }
+ }
+ }
+ part {
+ name: "elm.swallow.content";
+ type: SWALLOW;
+ clip_to: "ctxpopup_clip";
+ description {
+ state: "default" 0.0;
+ align: 0 0;
+ rel1 {to:"ctxpopup_frame_left_top"; relative: 0.5 0.5;}
+ rel2 {to:"ctxpopup_frame_right_bottom"; relative: 0.5 0.5;}
+ }
+ }
+ part { name: "ctxpopup_clip";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ rel1 { to:"ctxpopup_frame_left_top"; relative: 0.5 0.5; }
+ rel2 { to:"ctxpopup_frame_right_bottom"; relative: 0.5 0.5; }
+ }
+ description { state: "show_up" 0.0;
+ color: 255 255 255 0;
+ rel1 { to:"arrow_area_down"; relative: 0 1; }
+ rel2 { to:"arrow_area_down"; relative: 1 1; }
+ }
+ description { state: "show_left" 0.0;
+ color: 255 255 255 0;
+ rel1 { to:"arrow_area_right"; relative: 1 0; }
+ rel2 { to:"arrow_area_right"; relative: 1 1; }
+ }
+ description { state: "show_right" 0.0;
+ color: 255 255 255 0;
+ rel1 { to:"arrow_area_left"; relative: 0 0; }
+ rel2 { to:"arrow_area_left"; relative: 0 1; }
+ }
+ description { state: "show_down" 0.0;
+ color: 255 255 255 0;
+ rel1 { to:"arrow_area_up"; relative: 0 0; }
+ rel2 { to:"arrow_area_up"; relative: 1 0; }
+ }
+ description { state: "hide_up" 0.0;
+ color: 255 255 255 255;
+ rel1 { to:"arrow_area_down"; relative: 0 1; }
+ rel2 { to:"arrow_area_down"; relative: 1 1; }
+ }
+ description { state: "hide_left" 0.0;
+ color: 255 255 255 255;
+ rel1 { to:"arrow_area_right"; relative: 1 0; }
+ rel2 { to:"arrow_area_right"; relative: 1 1; }
+ }
+ description { state: "hide_right" 0.0;
+ color: 255 255 255 255;
+ rel1 { to:"arrow_area_left"; relative: 0 0; }
+ rel2 { to:"arrow_area_left"; relative: 0 1; }
+ }
+ description { state: "hide_down" 0.0;
+ color: 255 255 255 255;
+ rel1 { to:"arrow_area_up"; relative: 0 0; }
+ rel2 { to:"arrow_area_up"; relative: 1 0; }
+ }
+ description { state: "visible" 0.0;
+ color: 255 255 255 255;
+ rel1 { to_x:"arrow_area_left"; to_y:"arrow_area_up"; }
+ rel2 { to_x:"arrow_area_right"; to_y:"arrow_area_down"; }
+ }
+ }
+ }
+ programs {
+ program { name: "show";
+ signal: "elm,state,show";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ }
+ program { name: "show_up";
+ signal: "elm,state,show,up";
+ source: "elm";
+ action: STATE_SET "show_up" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ }
+ program { name: "show_left";
+ signal: "elm,state,show,left";
+ source: "elm";
+ action: STATE_SET "show_left" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ }
+ program { name: "show_right";
+ signal: "elm,state,show,right";
+ source: "elm";
+ action: STATE_SET "show_right" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ }
+ program { name: "show_down";
+ signal: "elm,state,show,down";
+ source: "elm";
+ action: STATE_SET "show_down" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ }
+ program { name: "hide_up";
+ signal: "elm,state,hide,up";
+ source: "elm";
+ action: STATE_SET "hide_up" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ after: "hide_finished";
+ }
+ program { name: "hide_left";
+ signal: "elm,state,hide,left";
+ source: "elm";
+ action: STATE_SET "hide_left" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ after: "hide_finished";
+ }
+ program { name: "hide_right";
+ signal: "elm,state,hide,right";
+ source: "elm";
+ action: STATE_SET "hide_right" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ after: "hide_finished";
+ }
+ program { name: "hide_down";
+ signal: "elm,state,hide,down";
+ source: "elm";
+ action: STATE_SET "hide_down" 0.0;
+ transition: LINEAR 0.25;
+ target: "ctxpopup_clip";
+ after: "hide_finished";
+ }
+ program { name: "hide_finished";
+ action: SIGNAL_EMIT "elm,action,hide,finished" "";
+ }
+ }
+ }
+
+///////////////////////////////////////////////////////////////////////////////
+ group { name: "elm/ctxpopup/arrow/video/default";
+ images {
+ image: "white/common/00_popup_tail_left.png" COMP;
+ image: "white/common/00_popup_tail_right.png" COMP;
+ image: "white/common/00_popup_tail_top.png" COMP;
+ image: "white/common/00_popup_tail_bottom.png" COMP;
+ }
+ parts {
+ part {
+ name: "ctxpopup_arrow";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: CTXPOPUP_ARROW_SIZE_INC;
+ max: CTXPOPUP_ARROW_SIZE_INC;
+ fixed: 1 1;
+ visible: 0;
+ align: 0.5 0.5;
+ }
+ description {
+ state: "left" 0.0;
+ min: CTXPOPUP_ARROW_SIZE_INC;
+ max: CTXPOPUP_ARROW_SIZE_INC;
+ fixed: 1 1;
+ align: 1.0 0.5;
+ image {
+ normal: "white/common/00_popup_tail_left.png";
+ }
+ }
+ description {
+ state: "right" 0.0;
+ min: CTXPOPUP_ARROW_SIZE_INC;
+ max: CTXPOPUP_ARROW_SIZE_INC;
+ fixed: 1 1;
+ align: 0.0 0.5;
+ image {
+ normal: "white/common/00_popup_tail_right.png";
+ }
+ }
+ description {
+ state: "top" 0.0;
+ min: CTXPOPUP_ARROW_SIZE_INC;
+ max: CTXPOPUP_ARROW_SIZE_INC;
+ fixed: 1 1;
+ align: 0.5 1.0;
+ image {
+ normal: "white/common/00_popup_tail_top.png";
+ }
+ }
+ description {
+ state: "bottom" 0.0;
+ min: CTXPOPUP_ARROW_SIZE_INC;
+ max: CTXPOPUP_ARROW_SIZE_INC;
+ fixed: 1 1;
+ align: 0.5 0.0;
+ image {
+ normal: "white/common/00_popup_tail_bottom.png";
+ }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "enable_left_arrow";
+ signal: "elm,state,left";
+ source: "elm";
+ action: STATE_SET "left" 0.0;
+ target: "ctxpopup_arrow";
+ }
+ program {
+ name: "enable_right_arrow";
+ signal: "elm,state,right";
+ source: "elm";
+ action: STATE_SET "right" 0.0;
+ target: "ctxpopup_arrow";
+ }
+ program {
+ name: "enable_top_arrow";
+ signal: "elm,state,top";
+ source: "elm";
+ action: STATE_SET "top" 0.0;
+ target: "ctxpopup_arrow";
+ }
+ program {
+ name: "enable_bottom_arrow";
+ signal: "elm,state,bottom";
+ source: "elm";
+ action: STATE_SET "bottom" 0.0;
+ target: "ctxpopup_arrow";
+ }
+ }
+ }
+///////////////////////////////////////////////////////////////////////////////
+ group {
+ name: "elm/ctxpopup/text_style_item/video/default";
+ parts {
+ part {
+ name: "event_blocker";
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "bg";
+ mouse_events: 0;
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: CTXPOPUP_BG_COLOR_INC;
+ visible: 0;
+ }
+ description {
+ state: "clicked" 0.0;
+ color: CTXPOPUP_BG_PRESS_COLOR_INC;
+ visible: 1;
+ }
+ }
+ part {
+ name: "separator";
+ mouse_events: 0;
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: CTXPOPUP_SEPARATOR_COLOR_INC;
+ align: 0.5 0;
+ min: 1 0;
+ max: 1 999999;
+ visible: 0;
+ }
+ description {
+ state: "horizontal" 0.0;
+ color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
+ align: 0 0.5;
+ min: CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC;
+ max: CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC;
+ visible: 1;
+ }
+ description {
+ state: "vertical" 0.0;
+ color: CTXPOPUP_SEPARATOR_COLOR_INC;
+ align: 0.5 0;
+ min: 0 1;
+ max: 999999 1;
+ visible: 1;
+ }
+ }
+ part {
+ name: "left_padding";
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 30 CTXPOPUP_ITEM_HEIGHT_INC;
+ max: 30 CTXPOPUP_ITEM_HEIGHT_INC;
+ align: 0 0.5;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+ part {
+ name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 1 CTXPOPUP_ITEM_HEIGHT_INC;
+ max: (CTXPOPUP_CONTENT_WIDTH_MAX_INC-2*CTXPOPUP_ITEM_PADDING_INC) CTXPOPUP_ITEM_HEIGHT_INC;
+ fixed: 0 1;
+ align: 0.5 0.5;
+ rel1 {relative: 1.0 0.0; to: "left_padding";}
+ rel2 {relative: 0.0 1.0; to: "right_padding";}
+ color: CTXPOPUP_MAIN_TEXT_UNREAD_COLOR_INC;
+ text {
+ font: "SLP:style=Roman";
+ size: CTXPOPUP_ITEM_TEXT_SIZE_INC;
+ align: 0 0.5;
+ min: 1 1;
+ text_class: "list_item";
+ }
+ }
+ description {
+ state: "text_horizontal" 0.0;
+ inherit: "default" 0.0;
+ text {
+ size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC;
+ align: 0.5 0.5;
+ min: 1 1;
+ }
+ }
+ description {
+ state: "compress" 0.0;
+ inherit: "default" 0.0;
+ max: -1 -1;
+ text {
+ min: 0 1;
+ }
+ }
+ description {
+ state: "compress.text_horizontal" 0.0;
+ inherit: "default" 0.0;
+ max: -1 -1;
+ text {
+ size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC;
+ align: 0.5 0.5;
+ min: 0 1;
+ }
+ }
+ description {
+ state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ color: CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC;
+ }
+ description {
+ state: "clicked.text_horizontal" 0.0;
+ inherit: "default" 0.0;
+ color: CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC;
+ text {
+ size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC;
+ align: 0.5 0.5;
+ min: 0 1;
+ }
+ }
+ }
+ part {
+ name: "right_padding";
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: 30 CTXPOPUP_ITEM_HEIGHT_INC;
+ max: 30 CTXPOPUP_ITEM_HEIGHT_INC;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ }
+ }
+ part {
+ name: "over1";
+ mouse_events: 1;
+ repeat_events: 1;
+ ignore_flags: ON_HOLD;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ part {
+ name: "over2";
+ mouse_events: 1;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ part {
+ name: "disclip";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ }
+ description {
+ state: "disabled" 0.0;
+ visible: 1;
+ color: CTXPOPUP_ITEM_DISABLED_COLOR;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "item_unclick";
+ signal: "mouse,up,1";
+ source: "over1";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program {
+ name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disclip";
+ }
+ program {
+ name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disclip";
+ }
+ program {
+ name: "default";
+ signal: "elm,state,default";
+ source: "elm";
+ script {
+ set_state(PART:"separator", "default", 0.0);
+ }
+ }
+ program {
+ name: "compress";
+ signal: "elm,state,compress";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"separator", st, 30, vl);
+ if (!strcmp(st, "horizontal"))
+ set_state(PART:"elm.text", "compress.text_horizontal", 0.0);
+ else
+ set_state(PART:"elm.text", "compress", 0.0);
+ }
+ }
+ program {
+ name: "vertical";
+ signal: "elm,state,vertical";
+ source: "elm";
+ script {
+ set_state(PART:"separator", "vertical", 0.0);
+ set_state(PART:"elm.text", "vertical", 0.0);
+ }
+ }
+ program {
+ name: "horizontal";
+ signal: "elm,state,horizontal";
+ source: "elm";
+ script {
+ set_state(PART:"separator", "horizontal", 0.0);
+ set_state(PART:"elm.text", "text_horizontal", 0.0);
+ }
+ }
+ program {
+ name: "text_horizontal";
+ signal: "elm,state,text_horizontal";
+ source: "elm";
+ script {
+ set_state(PART:"separator", "default", 0.0);
+ set_state(PART:"elm.text", "text_horizontal", 0.0);
+ }
+ }
+ program {
+ name: "item_click2";
+ signal: "mouse,down,1";
+ source: "over2";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"separator", st, 30, vl);
+ if (!strcmp(st, "horizontal"))
+ set_state(PART:"elm.text", "clicked.text_horizontal", 0.0);
+ else
+ set_state(PART:"elm.text", "clicked", 0.0);
+ set_state(PART:"bg", "clicked", 0.0);
+ }
+ }
+ program {
+ name: "item_unclick2";
+ signal: "mouse,up,1";
+ source: "over2";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"separator", st, 30, vl);
+ if (!strcmp(st, "horizontal"))
+ set_state(PART:"elm.text", "compress.text_horizontal", 0.0);
+ else
+ set_state(PART:"elm.text", "compress", 0.0);
+ set_state(PART:"bg", "default", 0.0);
+ }
+ }
+ }
+ }
+///////////////////////////////////////////////////////////////////////////////
+ group {
+ name: "elm/ctxpopup/icon_style_item/video/default";
+ parts {
+ part {
+ name: "event_blocker";
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "bg";
+ scale: 1;
+ mouse_events: 0;
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: CTXPOPUP_BG_COLOR_INC;
+ visible: 0;
+ min: CTXPOPUP_ITEM_ICON_INC;
+ max: CTXPOPUP_ITEM_ICON_INC;
+ }
+ description {
+ state: "clicked" 0.0;
+ color: CTXPOPUP_BG_PRESS_COLOR_INC;
+ visible: 1;
+ }
+ }
+ part {
+ name: "left_top_padding";
+ scale: 1;
+ description {
+ min: (CTXPOPUP_ITEM_PADDING_INC * 2) CTXPOPUP_ITEM_PADDING_INC;
+ max: (CTXPOPUP_ITEM_PADDING_INC * 2) CTXPOPUP_ITEM_PADDING_INC;
+ visible: 0;
+ align: 0 0;
+ fixed: 1 1;
+ }
+ }
+ part {
+ name: "separator";
+ mouse_events: 0;
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: CTXPOPUP_SEPARATOR_COLOR_INC;
+ align: 0.5 0;
+ min: 1 0;
+ max: 1 999999;
+ visible: 0;
+ }
+ description {
+ state: "horizontal" 0.0;
+ color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
+ align: 0 0.5;
+ min: CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC;
+ max: CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC;
+ visible: 1;
+ }
+ description {
+ state: "vertical" 0.0;
+ color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
+ align: 0.5 0;
+ min: CTXPOPUP_VERTICAL_SEPARATOR_MIN_SIZE_INC;
+ max: CTXPOPUP_VERTICAL_SEPARATOR_MAX_SIZE_INC;
+ visible: 1;
+ }
+ }
+ part {
+ name: "elm.swallow.icon";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: (CTXPOPUP_ICON_WIDTH_INC - 10) (CTXPOPUP_ICON_HEIGHT_INC - 10);
+ max: (CTXPOPUP_ICON_WIDTH_INC - 10) (CTXPOPUP_ICON_HEIGHT_INC - 10);
+ align: 0.5 0.5;
+ aspect: 1.0 1.0;
+ rel1 { to: "left_top_padding"; relative: 1 1; }
+ rel2 { to: "right_bottom_padding"; relative: 0 0; }
+ }
+ }
+ part {
+ name: "right_bottom_padding";
+ scale: 1;
+ description {
+ min: (CTXPOPUP_ITEM_PADDING_INC * 2) CTXPOPUP_ITEM_PADDING_INC;
+ max: (CTXPOPUP_ITEM_PADDING_INC * 2) CTXPOPUP_ITEM_PADDING_INC;
+ visible: 0;
+ align: 1 1;
+ fixed: 1 1;
+ }
+ }
+ part {
+ name: "over1";
+ mouse_events: 1;
+ repeat_events: 1;
+ ignore_flags: ON_HOLD;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ part {
+ name: "over2";
+ mouse_events: 1;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ part {
+ name: "disclip";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ }
+ description {
+ state: "disabled" 0.0;
+ visible: 1;
+ color: CTXPOPUP_ITEM_DISABLED_COLOR;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "default";
+ signal: "elm,state,default";
+ source: "elm";
+ script {
+ set_state(PART:"separator", "default", 0.0);
+ }
+ }
+ program {
+ name: "vertical";
+ signal: "elm,state,vertical";
+ source: "elm";
+ script {
+ set_state(PART:"separator", "vertical", 0.0);
+ }
+ }
+ program {
+ name: "horizontal";
+ signal: "elm,state,horizontal";
+ source: "elm";
+ script {
+ set_state(PART:"separator", "horizontal", 0.0);
+ }
+ }
+ program {
+ name: "item_unclick";
+ signal: "mouse,up,1";
+ source: "over1";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program {
+ name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disclip";
+ }
+ program {
+ name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disclip";
+ }
+ program {
+ name: "item_click2";
+ signal: "mouse,down,1";
+ source: "over2";
+ script {
+ set_state(PART:"bg", "clicked", 0.0);
+ }
+ }
+ program {
+ name: "item_unclick2";
+ signal: "mouse,up,1";
+ source: "over2";
+ script {
+ set_state(PART:"bg", "default", 0.0);
+ }
+ }
+ }
+ }
+///////////////////////////////////////////////////////////////////////////////
+ group {
+ name: "elm/ctxpopup/icon_text_style_item/video/default";
+ parts {
+ part {
+ name: "event_blocker";
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ part {
+ name: "bg";
+ mouse_events: 0;
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: CTXPOPUP_BG_COLOR_INC;
+ visible: 0;
+ }
+ description {
+ state: "clicked" 0.0;
+ color: CTXPOPUP_BG_PRESS_COLOR_INC;
+ visible: 1;
+ }
+ }
+ part {
+ name: "icon_left_padding";
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+ max: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+ align: 0 0;
+ fixed: 1 1;
+ visible: 0;
+ }
+ }
+ part {
+ name: "separator";
+ mouse_events: 0;
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: CTXPOPUP_SEPARATOR_COLOR_INC;
+ align: 0.5 0;
+ min: 1 0;
+ max: 1 999999;
+ visible: 0;
+ }
+ description {
+ state: "horizontal" 0.0;
+ color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
+ align: 0 0.5;
+ min: CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC;
+ max: CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC;
+ visible: 1;
+ }
+ description {
+ state: "vertical" 0.0;
+ color: CTXPOPUP_SEPARATOR_COLOR_INC;
+ align: 0.5 0;
+ min: 0 1;
+ max: 999999 1;
+ visible: 1;
+ }
+ }
+ part {
+ name: "elm.swallow.icon";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: CTXPOPUP_ICON_WIDTH_INC CTXPOPUP_ICON_HEIGHT_INC;
+ max: CTXPOPUP_ICON_WIDTH_INC CTXPOPUP_ICON_HEIGHT_INC;
+ align: 0 0.5;
+ aspect: 1.0 1.0;
+ rel1 { to:"icon_left_padding"; relative: 1 0; }
+ }
+ }
+ part {
+ name: "icon_right_padding";
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+ max: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+ align: 0 0.5;
+ fixed: 1 1;
+ visible: 0;
+ rel1 { to:"elm.swallow.icon"; relative: 1 1; }
+ }
+ }
+ part {
+ name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 1 CTXPOPUP_ITEM_HEIGHT_INC;
+ max: (CTXPOPUP_CONTENT_WIDTH_MAX_INC-(3*CTXPOPUP_ITEM_PADDING_INC)-CTXPOPUP_ICON_WIDTH_INC) CTXPOPUP_ITEM_HEIGHT_INC;
+ fixed: 0 1;
+ align: 0.5 0.5;
+ rel1 {relative: 1.0 0.0; to_x: "icon_right_padding";}
+ rel2 {relative: 0.0 1.0; to_x: "text_right_padding";}
+ color: CTXPOPUP_MAIN_TEXT_UNREAD_COLOR_INC;
+ text {
+ font: "SLP:style=Roman";
+ size: CTXPOPUP_ITEM_TEXT_SIZE_INC;
+ align: 0.0 0.5;
+ min: 1 1;
+ text_class: "list_item";
+ }
+ }
+ description {
+ state: "compress" 0.0;
+ inherit: "default" 0.0;
+ max: -1 -1;
+ text {
+ min: 0 1;
+ }
+ }
+ description {
+ state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ color: CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC;
+ }
+ }
+ part {
+ name: "text_right_padding";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+ max: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ }
+ }
+ part {
+ name: "over1";
+ mouse_events: 1;
+ repeat_events: 1;
+ ignore_flags: ON_HOLD;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ part {
+ name: "over2";
+ mouse_events: 1;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ part {
+ name: "disclip";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ }
+ description {
+ state: "disabled" 0.0;
+ visible: 1;
+ color: CTXPOPUP_ITEM_DISABLED_COLOR;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "item_unclick";
+ signal: "mouse,up,1";
+ source: "over1";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program {
+ name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disclip";
+ }
+ program {
+ name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disclip";
+ }
+ program {
+ name: "default";
+ signal: "elm,state,default";
+ source: "elm";
+ script {
+ set_state(PART:"separator", "default", 0.0);
+ }
+ }
+ program {
+ name: "compress";
+ signal: "elm,state,compress";
+ source: "elm";
+ action: STATE_SET "compress" 0.0;
+ target: "elm.text";
+ }
+ program {
+ name: "vertical";
+ signal: "elm,state,vertical";
+ source: "elm";
+ script {
+ set_state(PART:"separator", "vertical", 0.0);
+ }
+ }
+ program {
+ name: "horizontal";
+ signal: "elm,state,horizontal";
+ source: "elm";
+ script {
+ set_state(PART:"separator", "horizontal", 0.0);
+ }
+ }
+ program {
+ name: "item_click2";
+ signal: "mouse,down,1";
+ source: "over2";
+ script {
+ set_state(PART:"elm.text", "clicked", 0.0);
+ set_state(PART:"bg", "clicked", 0.0);
+ }
+ }
+ program {
+ name: "item_unclick2";
+ signal: "mouse,up,1";
+ source: "over2";
+ script {
+ set_state(PART:"elm.text", "compress", 0.0);
+ set_state(PART:"bg", "default", 0.0);
+ }
+ }
+ }
+ }
+
+
+
+
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
-
#include "image_res.edc"
collections {
- #include "vp-button.edc"
+ #include "vp-button-white.edc"
#include "vp-controlbar.edc"
- #include "vp-naviframe.edc"
+ #include "vp-naviframe_white.edc"
+ #include "vp-layout.edc"
+ #include "vp-check.edc"
+ #include "vp-progressbar-list.edc"
+ #include "vp-ctxpopup.edc"
}
--- /dev/null
+ /*************************************************/
+ /* elm_layout -> video style */
+ /*************************************************/
+
+group {
+ name: "elm/layout/application/video";
+ parts {
+ part {
+ name: "elm.swallow.bg";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0;}
+ rel2 { relative: 1.0 1.0;}
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "indicator";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 50;
+ max: 999999 50;
+ fixed: 0 1;
+ align: 0.5 0;
+ color: 0 0 0 255;
+ }
+ }
+
+ part {
+ name: "elm.swallow.pixmap";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ part {
+ name: "elm.swallow.event";
+ type: SWALLOW;
+ mouse_events: 1;
+ repeat_events : 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ part {
+ name: "elm.swallow.subtitle";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ part {
+ name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ repeat_events : 1;
+ description {
+ state: "default" 0.0;
+ rel1.to_y: "indicator";
+ rel1.relative: 0.0 1.0;
+ }
+ }
+ part {
+ name: "elm.swallow.subtitle.sync";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ part {
+ name: "elm.swallow.controlbar";
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ }
+ }
+ } /* parts */
+} /* group */
+
+group {
+ name: "elm/layout/application/video_no_indicator";
+ parts {
+ part {
+ name: "elm.swallow.bg";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 255;
+ }
+ }
+ part {
+ name: "elm.swallow.pixmap";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+
+ part {
+ name: "elm.swallow.event";
+ type: SWALLOW;
+ mouse_events: 1;
+ repeat_events : 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ part {
+ name: "elm.swallow.subtitle";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ part {
+ name: "elm.swallow.content";
+ type: SWALLOW;
+ mouse_events: 1;
+ repeat_events : 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ part {
+ name: "elm.swallow.subtitle.sync";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ part {
+ name: "elm.swallow.controlbar";
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ }
+ }
+ } /* parts */
+} /* group */
+
+
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
+#include "image_res.edc"
+#define NAVIFRAME_TITLE_H_INC_PORTRATE 90
+#define NAVIFRAME_TITLE_H_INC_LANDSCAPE 72
#define NAVIFRAME_TITLE_H_INC 100
#define NAVIFRAME_SEGMENT_TITLE_H_INC 136
#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_TITLE_PREV_BTN_BG_SIZE_INC 144
+#define NAVIFRAME_TEXT_PADDING_INC 144
+#define NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 52
+#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 NAVIFRAME_CONTROLBAR_BG_COLOR_INC 31 31 31 255
-#define NAVIFRAME_TITLE_TEXT_COLOR_INC 235 236 237 255 //#define NAVIFRAME_TITLE_TEXT_COLOR_INC 255 255 255 255
-#define NAVIFRAME_TITLE_BG_COLOR_INC 92 92 92 255 //#define NAVIFRAME_TITLE_BG_COLOR_INC 0 0 0 255
+#define NAVIFRAME_CONTROLBAR_BG_COLOR_INC 37 48 54 255
+#define NAVIFRAME_TITLE_TEXT_COLOR_INC 235 236 237 255
+#define NAVIFRAME_TITLE_BG_COLOR_INC 50 65 74 255
+#define NAVIFRAME_OH_BORDER_INC 0 0 4 0
#define CONTROLBAR_LARGE_HEIGHT_INC 122
#define CONTROLBAR_SMALL_HEIGHT_INC 102
#define CONTROLBAR_WIDTH_INC 122
-#define NAVIFRAME_TEXT_PADDING_INC 144
-#define NAVIFRAME_TEXT_PADDING_MORE_BUTTON_INC 278
-#define NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 186
#define NAVIFRAME_VIEW_TRANS_TIME 0.3
-#define CONTROLBAR_SMALL_HEIGHT_INC 102
-
group { name:"elm/naviframe/base/video/default";
parts {
part { name: "base";
group { name:"elm/naviframe/item/video/basic/default";
alias:"elm/naviframe/item/video/1line/default";
images {
- image: "naviframe_optionheader.png" COMP;
- image: "naviframe_optionheader_arrow.png" COMP;
+ image: "naviframe_optionheader.png" COMP;
+ image: "naviframe_optionheader_arrow.png" COMP;
+ image: "T01_title_bg.png" COMP;
+ image: "T01_title_bg_h.png" COMP;
}
script {
public oh_show = 0; //optionheader show/hide
public oh_close = 0; //optionheader close/open
public cbar_bg = 0; //Controlbar BG Show call count
+ public left_btn_visible = 0; //whether left btn is shown
+ public icon_visible = 0; //whether icon is shown
+ public right_btn_visible = 0; //whether right btn is shown
+ public more_btn_visible = 0; //whether more btn is shown
+ public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
}
parts {
- part { name: "title_clip";
+ part { name: "base";
type: RECT;
- mouse_events: 0;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "left" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "right" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ }
+ part { name: "title_bg";
+ type: IMAGE; // ORIGINAL - type: RECT;
scale: 1;
description { state: "default" 0.0;
- min: 1 NAVIFRAME_TITLE_H_INC;
+ min: 1 NAVIFRAME_TITLE_H_INC_PORTRATE; // ORIGINAL - min: 1 NAVIFRAME_TITLE_H_INC
align: 0.0 0.0;
fixed: 0 1;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 0.0; }
+ rel1 { relative: 0.0 0.0; to: "base"; }
+ rel2 { relative: 1.0 0.0; to: "base"; }
+ image { normal: "T01_title_bg.png"; } // ORIGINAL - color: NAVIFRAME_TITLE_BG_COLOR_INC;
}
description { state: "hide" 0.0;
inherit: "default" 0.0;
max: 0 0;
fixed: 1 1;
}
+ description { state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: 1 NAVIFRAME_TITLE_H_INC_LANDSCAPE;
+ image { normal: "T01_title_bg_h.png"; }
+ }
}
- part { name: "optionheader_clip";
+ part { name: "title_clip";
type: RECT;
mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part { name: "optionheader_bg";
+ type: IMAGE;
scale: 1;
description { state: "default" 0.0;
min: 1 0;
align: 0.5 0;
fixed: 0 1;
- rel1.to_x: "elm.swallow.content";
- rel1.to_y: "title_clip";
+ rel1.to: "title_bg";
rel1.relative: 0 1;
- rel2.to_x: "elm.swallow.content";
- rel2.to_y: "title_clip";
+ rel2.to: "title_bg";
visible: 0;
+ image { normal: "naviframe_optionheader.png";
+ border: NAVIFRAME_OH_BORDER_INC;
+ }
}
description { state: "show" 0.0;
inherit: "default" 0.0;
fixed: 1 1;
}
}
- part { name: "optionheader_bg";
- type: IMAGE;
- scale: 1;
+ part { name: "optionheader_clip";
+ type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "optionheader_clip"; }
- rel2 { to: "optionheader_clip"; }
- image { normal: "naviframe_optionheader.png";
- border: 0 0 4 0;
- }
+ rel1 { to: "optionheader_bg"; }
+ rel2 { to: "optionheader_bg"; }
}
}
part { name: "optionheader_top_padding";
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_PADDING_INC;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
fixed: 0 1;
visible: 0;
}
}
- part { name: "elm.swallow.optionheader";
+ part { name: "optionheader";
type: SWALLOW;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_CONTENT_H_INC;
+ min: 0 NAVIFRAME_OH_CONTENT_H_INC;
rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
fixed: 0 1;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_PADDING_INC;
- rel1 { relative: 0.0 1.0; to: "elm.swallow.optionheader"; }
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader"; }
fixed: 0 1;
align: 0.0 0.0;
visible: 0;
}
}
- part { name: "content_clip";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1.to_y: "optionheader_bg";
- rel1.relative: 0 1;
- }
- }
part { name: "elm.swallow.content";
type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
align: 0.0 0.0;
rel1.relative: 0.0 1.0;
+ rel1.to_x: "base";
rel1.to_y: "optionheader_bg";
rel2.relative: 1.0 0.0;
- rel2.to_y: "controlbar_clip";
- }
- description { state: "left" 0.0;
- inherit: "default" 0.0;
- rel1.relative: -1.0 1.0;
- rel2.relative: 0.0 0.0;
- }
- description { state: "right" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 1.0 1.0;
- rel2.relative: 2.0 0.0;
+ rel2.to_x: "base";
+ rel2.to_y: "controlbar_bg";
}
}
- part { name: "title_base";
+ part { name: "content_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "title_clip"; }
- rel2 { to: "title_clip"; }
- color: NAVIFRAME_TITLE_BG_COLOR_INC;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
}
}
part { name: "padding_before_left_btn";
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.5;
- rel1 { relative: 0.0 0.0; to: "title_base"; }
- rel2 { relative: 0.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
visible: 0;
}
- }
+ }
part { name: "padding_after_left_btn";
type: RECT;
- mouse_events: 0;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
- align: 0.0 0.5;
- rel1 { relative: 1.0 0.0; to: "elm.swallow.left_btn"; }
- rel2 { relative: 1.0 1.0; to: "elm.swallow.left_btn"; }
+ align: 0 0.5;
+ rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
visible: 0;
+ }
}
- }
- part { name: "padding_after_right_btn";
+ part { name: "padding_before_more_btn";
type: RECT;
- mouse_events: 0;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; to: "title_base"; }
- rel2 { relative: 1.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_more_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_more_btn"; }
visible: 0;
}
}
- part { name: "padding_before_right_btn";
+ part { name: "padding_after_right_btn";
type: RECT;
mouse_events: 0;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: 0 0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.right_btn"; }
- rel2 { relative: 0.0 1.0; to: "elm.swallow.right_btn"; }
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
visible: 0;
}
- description { state: "more_button" 0.0;
- inherit: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
- }
}
- part { name: "padding_before_more_btn";
+ part { name: "padding_before_right_btn";
type: RECT;
mouse_events: 0;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ min: 0 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.more_btn"; }
- rel2 { relative: 0.0 1.0; to: "elm.swallow.more_btn"; }
+ rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
visible: 0;
}
+ description { state: "right_and_more_button" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ }
}
part { name: "padding_before_text";
type: RECT;
clip_to: "title_clip";
description { state: "default" 0.0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_base"; }
- rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_base"; }
+ rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
fixed: 1 0;
min: NAVIFRAME_ICON_PADDING_INC;
visible: 0;
mouse_events: 0;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_INC 0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; to: "title_base"; }
- rel2 { relative: 0.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
visible: 0;
}
- description { state: "icon_visible" 0.0;
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TEXT_PADDING_INC 0;
+ }
+ description { state: "icon" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
+ }
+ description { state: "icon_left_button" 0.0;
inherit: "default" 0.0;
min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
}
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_INC 0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; to: "title_base"; }
- rel2 { relative: 1.0 1.0; to: "title_base"; }
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
visible: 0;
}
- description { state: "more_button" 0.0;
+ description { state: "visible" 0.0;
inherit: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_MORE_BUTTON_INC 0;
+ min: NAVIFRAME_TEXT_PADDING_INC 0;
}
}
part { name: "elm.text.title";
clip_to: "title_clip";
description { state: "default" 0.0;
text { font: "SLP:style=Medium";
+ text_class: "slp_medium";
size: NAVIFRAME_TITLE_FONT_SIZE_INC;
min: 0 0;
max: 1 0;
}
color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
align: 0.5 0.5;
- rel1.to: "padding_center_text1";
- rel1.relative: 1 0;
- rel2.to: "padding_center_text2";
- rel2.relative: 0 1;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+ rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+ }
+ description { state: "right_and_more_button" 0.0;
+ inherit: "default" 0.0;
+ rel1 { relative: 1.0 0.0; to: "padding_after_left_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_more_btn"; }
}
}
part { name: "elm.swallow.icon";
clip_to: "title_clip";
description { state: "default" 0.0;
max: NAVIFRAME_ICON_SIZE_INC;
+ fixed: 1 1;
rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
aspect: 1.0 1.0;
}
part { name: "click_event_area";
ignore_flags: ON_HOLD;
+ repeat_events: 1;
description { state: "default" 0.0;
- rel1 { to: "title_base"; }
- rel2 { to: "title_base"; }
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
}
}
- part { name: "elm.swallow.left_btn";
+ part { name: "title_left_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "padding_before_left_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_before_left_btn";
- rel2.relative: 1 1;
+ align: 0 0.5;
+ rel1 { relative: 1.0 0.0; to: "padding_before_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "padding_before_left_btn"; }
}
}
- part { name: "elm.swallow.right_btn";
+ part { name: "title_right_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ align: 1 0.5;
fixed: 1 1;
- align: 1.0 0.5;
- rel1.to: "padding_after_right_btn";
- rel1.relative: 0 0;
- rel2.to: "padding_after_right_btn";
- rel2.relative: 0 1;
+ rel1 { relative: 0.0 0.0; to: "padding_after_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_after_right_btn"; }
}
}
- part { name: "elm.swallow.more_btn";
+ part { name: "title_more_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
fixed: 1 1;
- align: 1.0 0.5;
- rel1.to: "padding_before_right_btn";
- rel1.relative: 0 0;
- rel2.to: "padding_before_right_btn";
- rel2.relative: 0 1;
+ align: 1 0.5;
+ rel1 { relative: 0.0 0.0; to: "padding_before_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_right_btn"; }
}
}
part { name: "optionheader_arrow";
min: NAVIFRAME_OH_ARROW_SIZE_INC;
max: NAVIFRAME_OH_ARROW_SIZE_INC;
fixed: 1 1;
- align: 0.5 0;
- rel1.to: "elm.swallow.more_btn";
- rel1.relative: 0 1;
- rel2.to: "elm.swallow.more_btn";
- rel2.relative: 1 1;
- image {
- normal: "naviframe_optionheader_arrow.png";
- }
- visible: 0;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.025; to: "title_more_btn"; }
+ rel2 { relative: 1.0 1.025; to: "title_more_btn"; }
+ image.normal: "naviframe_optionheader_arrow.png";
+ color: 255 255 255 0;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
- visible: 1;
+ color: 255 255 255 255;
}
}
- part { name: "controlbar_clip";
+ part { name: "controlbar_bg";
type: RECT;
scale: 1;
description { state: "default" 0.0;
min: 0 0;
max: 999999 0;
fixed: 0 1;
- align: 0.5 1;
+ align: 0.0 1.0;
visible: 0;
- rel1.to_x: "elm.swallow.content";
- rel2.to_x: "elm.swallow.content";
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
- part { name: "controlbar_bg";
+ part { name: "controlbar_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "controlbar_clip"; }
- rel2 { to: "controlbar_clip"; }
- color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+ rel1.to: "controlbar_bg";
+ rel2.to: "controlbar_bg";
}
}
- part { name: "elm.swallow.prev_btn";
- type: SWALLOW;
+ part { name: "elm.prev_btn_bg";
+ type: RECT;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "controlbar_bg";
- rel1.relative: 0 0;
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
rel2.to: "controlbar_bg";
- rel2.relative: 0 1;
- }
+ visible: 0;
}
- part { name: "elm.swallow.controlbar";
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
type: SWALLOW;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- rel1.to: "elm.swallow.prev_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_after_controlbar";
- rel2.relative: 0 1;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
}
}
- part { name: "padding_after_controlbar";
- type: RECT;
+ part { name: "controlbar";
+ type: SWALLOW;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- max: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- align: 1 1;
+ fixed: 1 1;
rel1.to: "controlbar_bg";
- rel2.to: "controlbar_bg";
- visible: 0;
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
}
}
}
signal: "elm,state,new,pushed,internal";
source: "";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "show_finished";
}
signal: "elm,state,cur,pushed,internal";
source: "";
action: STATE_SET "left" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "pushed_finished";
}
signal: "elm,state,prev,popped,internal";
source: "";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "show_finished";
}
signal: "elm,state,cur,popped,internal";
source: "";
action: STATE_SET "right" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "popped_finished";
}
signal: "elm,state,cur,pushed";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
emit("elm,state,cur,pushed,internal", "");
}
}
signal: "elm,state,new,pushed";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "right", 0.0);
+ set_state(PART:"base", "right", 0.0);
emit("elm,state,new,pushed,internal", "");
}
}
signal: "elm,state,prev,popped";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "left", 0.0);
+ set_state(PART:"base", "left", 0.0);
emit("elm,state,prev,popped,internal", "");
}
}
signal: "elm,state,cur,popped";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
emit("elm,state,cur,popped,internal", "");
}
}
signal: "elm,state,visible";
source: "elm";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
}
program { name: "title_show";
signal: "elm,state,title,show";
source: "elm";
script {
- set_state(PART:"title_clip", "default", 0.0);
+ set_state(PART:"title_bg", "default", 0.0);
if (get_int(oh_show) == 1) {
if (get_int(oh_close) == 1) {
emit("elm,state,optionheader,instant_close", "");
}
}
else
- set_state(PART:"optionheader_clip", "default", 0.0);
+ set_state(PART:"optionheader_bg", "default", 0.0);
}
}
program { name: "title_hide";
signal: "elm,state,title,hide";
source: "elm";
action: STATE_SET "hide" 0.0;
- target: "title_clip";
- target: "optionheader_clip";
+ target: "title_bg";
+ target: "optionheader_bg";
}
program { name: "prev_btn_show";
signal: "elm,state,prev_btn,show";
source: "elm";
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
}
}
program { name: "prev_btn_hide";
signal: "elm,state,prev_btn,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+ }
+ }
+ program { name: "left_btn_show";
+ signal: "elm,state,title_left_btn,show";
+ source: "elm";
+ script {
+ set_int(left_btn_visible, 1);
+ if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ }
}
+ program { name: "left_btn_hide";
+ signal: "elm,state,title_left_btn,hide";
+ source: "elm";
+ script {
+ set_int(left_btn_visible, 0);
+ if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
+ }
+ program { name: "right_btn_show";
+ signal: "elm,state,title_right_btn,show";
+ source: "elm";
+ script {
+ set_int(right_btn_visible, 1);
+ if (get_int(more_btn_visible) == 1) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+ (get_int(large_padded_center_align) == 1)))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
+ }
+ program { name: "right_btn_hide";
+ signal: "elm,state,title_right_btn,hide";
+ source: "elm";
+ script {
+ set_int(right_btn_visible, 0);
+ set_state(PART:"padding_before_right_btn", "default", 0.0);
+ if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "more_btn_show";
- signal: "elm,state,elm.swallow.more_btn,show";
+ signal: "elm,state,title_more_btn,show";
source: "elm";
- action: STATE_SET "more_button" 0.0;
- target: "padding_center_text2";
- target: "padding_before_right_btn";
+ script {
+ set_int(more_btn_visible, 1);
+ if (get_int(right_btn_visible) == 1) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+ (get_int(large_padded_center_align) == 1)))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "more_btn_hide";
- signal: "elm,state,elm.swallow.more_btn,hide";
+ signal: "elm,state,title_more_btn,hide";
source: "elm";
- action: STATE_SET "default" 0.0;
- target: "padding_center_text2";
- target: "padding_before_right_btn";
+ script {
+ set_int(more_btn_visible, 0);
+ set_state(PART:"padding_before_right_btn", "default", 0.0);
+ if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "icon_show";
signal: "elm,state,elm.swallow.icon,show";
source: "elm";
- action: STATE_SET "icon_visible" 0.0;
- target: "padding_center_text1";
+ script {
+ set_int(icon_visible, 1);
+ if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ }
}
program { name: "icon_hide";
signal: "elm,state,elm.swallow.icon,hide";
source: "elm";
- action: STATE_SET "default" 0.0;
- target: "padding_center_text1";
+ script {
+ set_int(icon_visible, 0);
+ if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "controlbar_show";
- signal: "elm,state,elm.swallow.controlbar,show";
+ signal: "elm,state,controlbar,show";
source: "elm";
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
}
}
program { name: "controlbar_hide";
- signal: "elm,state,elm.swallow.controlbar,hide";
+ signal: "elm,state,controlbar,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
}
}
- program { name: "controlbar_clip_show";
- signal: "elm,state,controlbar_clip,show";
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
source: "elm";
script {
- set_state(PART:"controlbar_clip", "show", 0.0);
+ set_state(PART:"controlbar_bg", "show", 0.0);
set_int(cbar_bg, get_int(cbar_bg) + 1);
}
}
- program { name: "controlbar_clip_hide";
- signal: "elm,state,controlbar_clip,hide";
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
source: "elm";
script {
set_int(cbar_bg, get_int(cbar_bg) - 1);
if (get_int(cbar_bg) <= 0)
- set_state(PART:"controlbar_clip", "default", 0.0);
+ set_state(PART:"controlbar_bg", "default", 0.0);
}
}
program { name: "optionheader_show";
- signal: "elm,state,elm.swallow.optionheader,show";
+ signal: "elm,state,optionheader,show";
source: "elm";
script {
- set_state(PART:"optionheader_clip", "show", 0.0);
+ set_state(PART:"optionheader_bg", "show", 0.0);
set_state(PART:"optionheader_arrow", "show", 0.0);
set_int(oh_show, 1);
}
}
program { name: "optionheader_hide";
- signal: "elm,state,elm.swallow.optionheader,hide";
+ signal: "elm,state,optionheader,hide";
source: "elm";
script {
- set_state(PART:"optionheader_clip", "default", 0.0);
+ set_state(PART:"optionheader_bg", "default", 0.0);
set_state(PART:"optionheader_arrow", "default", 0.0);
set_int(oh_show, 0);
}
signal: "elm,state,optionheader,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
transition: LINEAR 0.2;
after: "optionheader_open_set";
signal: "elm,state,optionheader,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
transition: LINEAR 0.2;
after: "optionheader_close_set";
signal: "elm,state,optionheader,instant_open";
source: "";
action: STATE_SET "show" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
after: "optionheader_open_set";
}
signal: "elm,state,optionheader,instant_close";
source: "";
action: STATE_SET "default" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
after: "optionheader_close_set";
}
signal: "elm,state,controlbar,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_close";
signal: "elm,state,controlbar,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_instant_open";
source: "";
script {
emit("elm,state,prev_btn,show", "elm");
- emit("elm,state,elm.swallow.controlbar,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
}
}
program { name: "controlbar_instant_close";
source: "";
script {
emit("elm,state,prev_btn,hide", "elm");
- emit("elm,state,elm.swallow.controlbar,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
}
}
program { name: "show_finished";
source: "click_event_area";
action: SIGNAL_EMIT "elm,action,title,clicked" "";
}
+ program {
+ name: "title_portrate_mode";
+ signal: "signal.naviframe.portrate.mode";
+ source: "*";
+ action: STATE_SET "default" 0.0;
+ target: "title_bg";
+ }
+ program {
+ name: "title_landscape_mode";
+ signal: "signal.naviframe.landscape.mode";
+ source: "*";
+ action: STATE_SET "landscape" 0.0;
+ target: "title_bg";
+ }
}
}
- group { name:"elm/naviframe/item/video/basic2/default";
+
+
+
+
+ group { name:"elm/naviframe/item/basic2/default";
alias:"elm/naviframe/item/video/2line/default";
images {
image: "naviframe_optionheader.png" COMP;
public oh_show = 0; //optionheader show/hide
public oh_close = 0; //optionheader close/open
public cbar_bg = 0; //Controlbar BG Show call count
+ public left_btn_visible = 0; //whether left btn is shown
+ public icon_visible = 0; //whether icon is shown
+ public right_btn_visible = 0; //whether right btn is shown
+ public more_btn_visible = 0; //whether more btn is shown
+ public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
}
parts {
- part { name: "title_clip";
+ part { name: "base";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "left" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "right" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ }
+ part { name: "title_bg";
type: RECT;
- mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
min: 1 NAVIFRAME_TITLE_H_INC;
align: 0.0 0.0;
fixed: 0 1;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 0.0; }
+ rel1 { relative: 0.0 0.0; to: "base"; }
+ rel2 { relative: 1.0 0.0; to: "base"; }
+ color: NAVIFRAME_TITLE_BG_COLOR_INC;
}
description { state: "hide" 0.0;
inherit: "default" 0.0;
fixed: 1 1;
}
}
- part { name: "optionheader_clip";
+ part { name: "title_clip";
type: RECT;
mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part { name: "optionheader_bg";
+ type: IMAGE;
scale: 1;
description { state: "default" 0.0;
min: 1 0;
align: 0.5 0;
fixed: 0 1;
- rel1.to_x: "elm.swallow.content";
- rel1.to_y: "title_clip";
+ rel1.to: "title_bg";
rel1.relative: 0 1;
- rel2.to_x: "elm.swallow.content";
- rel2.to_y: "title_clip";
+ rel2.to: "title_bg";
visible: 0;
+ image { normal: "naviframe_optionheader.png";
+ border: NAVIFRAME_OH_BORDER_INC;
+ }
}
description { state: "show" 0.0;
inherit: "default" 0.0;
fixed: 1 1;
}
}
- part { name: "optionheader_bg";
- type: IMAGE;
- scale: 1;
+ part { name: "optionheader_clip";
+ type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "optionheader_clip"; }
- rel2 { to: "optionheader_clip"; }
- image { normal: "naviframe_optionheader.png";
- border: 0 0 4 0;
- }
+ rel1 { to: "optionheader_bg"; }
+ rel2 { to: "optionheader_bg"; }
}
}
part { name: "optionheader_top_padding";
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_PADDING_INC;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
fixed: 0 1;
visible: 0;
}
}
- part { name: "elm.swallow.optionheader";
+ part { name: "optionheader";
type: SWALLOW;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_CONTENT_H_INC;
+ min: 0 NAVIFRAME_OH_CONTENT_H_INC;
rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
fixed: 0 1;
align: 0.0 0.0;
}
}
- part { name: "elm.swallow.optionheader.mid.padding";
+ part { name: "optionheader.mid.padding";
type: RECT;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_PADDING_INC;
- rel1 { relative: 0.0 1.0; to: "elm.swallow.optionheader"; }
- rel2 { relative: 1.0 1.0; to: "elm.swallow.optionheader"; }
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader"; }
fixed: 0 1;
align: 0.0 0.0;
visible: 0;
}
}
- part { name: "elm.swallow.optionheader2";
+ part { name: "optionheader2";
type: SWALLOW;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_CONTENT_H_INC;
- rel1 { relative: 0.0 1.0; to: "elm.swallow.optionheader.mid.padding";}
- rel2 { relative: 1.0 1.0; to: "elm.swallow.optionheader.mid.padding";}
+ min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader.mid.padding";}
+ rel2 { relative: 1.0 1.0; to: "optionheader.mid.padding";}
fixed: 0 1;
align: 0.0 0.0;
}
}
- part { name: "elm.swallow.optionheader.bottom.padding";
+ part { name: "optionheader.bottom.padding";
type: RECT;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_PADDING_INC;
- rel1 { relative: 0.0 1.0; to: "elm.swallow.optionheader2"; }
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader2"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader2"; }
fixed: 0 1;
align: 0.0 0.0;
visible: 0;
}
}
- part { name: "content_clip";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1.to_y: "optionheader_bg";
- rel1.relative: 0 1;
- }
- }
part { name: "elm.swallow.content";
type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
align: 0.0 0.0;
rel1.relative: 0.0 1.0;
+ rel1.to_x: "base";
rel1.to_y: "optionheader_bg";
rel2.relative: 1.0 0.0;
- rel2.to_y: "controlbar_clip";
- }
- description { state: "left" 0.0;
- inherit: "default" 0.0;
- rel1.relative: -1.0 1.0;
- rel2.relative: 0.0 0.0;
- }
- description { state: "right" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 1.0 1.0;
- rel2.relative: 2.0 0.0;
+ rel2.to_x: "base";
+ rel2.to_y: "controlbar_bg";
}
}
- part { name: "title_base";
+ part { name: "content_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "title_clip"; }
- rel2 { to: "title_clip"; }
- color: NAVIFRAME_TITLE_BG_COLOR_INC;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
}
}
part { name: "padding_before_left_btn";
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.5;
- rel1 { relative: 0.0 0.0; to: "title_base"; }
- rel2 { relative: 0.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
visible: 0;
}
}
part { name: "padding_after_left_btn";
type: RECT;
- mouse_events: 0;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
- align: 0.0 0.5;
- rel1 { relative: 1.0 0.0; to: "elm.swallow.left_btn"; }
- rel2 { relative: 1.0 1.0; to: "elm.swallow.left_btn"; }
+ align: 0 0.5;
+ rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
+ visible: 0;
+ }
+ }
+ part { name: "padding_before_more_btn";
+ type: RECT;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_more_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_more_btn"; }
visible: 0;
}
}
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; to: "title_base"; }
- rel2 { relative: 1.0 1.0; to: "title_base"; }
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
visible: 0;
}
}
min: 0 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.right_btn"; }
- rel2 { relative: 0.0 1.0; to: "elm.swallow.right_btn"; }
+ rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
visible: 0;
}
- description { state: "more_btn" 0.0;
+ description { state: "right_and_more_button" 0.0;
inherit: "default" 0.0;
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
- }
- }
- part { name: "padding_before_more_btn";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- clip_to: "title_clip";
- description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
- fixed: 1 0;
- align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.more_btn"; }
- rel2 { relative: 0.0 1.0; to: "elm.swallow.more_btn"; }
- visible: 0;
}
}
part { name: "padding_before_text";
clip_to: "title_clip";
description { state: "default" 0.0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_base"; }
- rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_base"; }
+ rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
fixed: 1 0;
min: NAVIFRAME_ICON_PADDING_INC;
visible: 0;
mouse_events: 0;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_INC 0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; to: "title_base"; }
- rel2 { relative: 0.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
visible: 0;
}
- description { state: "icon_visible" 0.0;
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TEXT_PADDING_INC 0;
+ }
+ description { state: "icon" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
+ }
+ description { state: "icon_left_button" 0.0;
inherit: "default" 0.0;
min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
}
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_INC 0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; to: "title_base"; }
- rel2 { relative: 1.0 1.0; to: "title_base"; }
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
visible: 0;
}
- description { state: "more_button" 0.0;
+ description { state: "visible" 0.0;
inherit: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_MORE_BUTTON_INC 0;
+ min: NAVIFRAME_TEXT_PADDING_INC 0;
}
}
part { name: "elm.text.title";
clip_to: "title_clip";
description { state: "default" 0.0;
text { font: "SLP:style=Medium";
+ text_class: "slp_medium";
size: NAVIFRAME_TITLE_FONT_SIZE_INC;
min: 0 0;
max: 1 0;
}
color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
align: 0.5 0.5;
- rel1.to: "padding_center_text1";
- rel1.relative: 1 0;
- rel2.to: "padding_center_text2";
- rel2.relative: 0 1;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+ rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+ }
+ description { state: "right_and_more_button" 0.0;
+ inherit: "default" 0.0;
+ rel1 { relative: 1.0 0.0; to: "padding_after_left_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_more_btn"; }
}
}
part { name: "elm.swallow.icon";
clip_to: "title_clip";
description { state: "default" 0.0;
max: NAVIFRAME_ICON_SIZE_INC;
+ fixed: 1 1;
rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
aspect: 1.0 1.0;
}
part { name: "click_event_area";
ignore_flags: ON_HOLD;
+ repeat_events: 1;
description { state: "default" 0.0;
- rel1 { to: "title_base"; }
- rel2 { to: "title_base"; }
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
}
}
- part { name: "elm.swallow.left_btn";
+ part { name: "title_left_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "padding_before_left_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_before_left_btn";
- rel2.relative: 1 1;
+ align: 0 0.5;
+ rel1 { relative: 1.0 0.0; to: "padding_before_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "padding_before_left_btn"; }
}
}
- part { name: "elm.swallow.right_btn";
+ part { name: "title_right_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ align: 1 0.5;
fixed: 1 1;
- align: 1.0 0.5;
- rel1.to: "padding_after_right_btn";
- rel1.relative: 0 0;
- rel2.to: "padding_after_right_btn";
- rel2.relative: 0 1;
+ rel1 { relative: 0.0 0.0; to: "padding_after_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_after_right_btn"; }
}
}
- part { name: "elm.swallow.more_btn";
+ part { name: "title_more_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
- fixed: 1 1;
- align: 1.0 0.5;
- rel1.to: "padding_before_right_btn";
- rel1.relative: 0 0;
- rel2.to: "padding_before_right_btn";
- rel2.relative: 0 1;
+ fixed: 1 0;
+ align: 1 0.5;
+ rel1 { relative: 0.0 0.0; to: "padding_before_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_right_btn"; }
}
}
part { name: "optionheader_arrow";
min: NAVIFRAME_OH_ARROW_SIZE_INC;
max: NAVIFRAME_OH_ARROW_SIZE_INC;
fixed: 1 1;
- align: 0.5 0;
- rel1.to: "elm.swallow.more_btn";
- rel1.relative: 0 1;
- rel2.to: "elm.swallow.more_btn";
- rel2.relative: 1 1;
- image {
- normal: "naviframe_optionheader_arrow.png";
- }
- color: 255 255 255 0 ;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.025; to: "title_more_btn"; }
+ rel2 { relative: 1.0 1.025; to: "title_more_btn"; }
+ image.normal: "naviframe_optionheader_arrow.png";
+ color: 255 255 255 0;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
- color: 255 255 255 255;
+ color: 255 255 255 255;
}
}
- part { name: "controlbar_clip";
+ part { name: "controlbar_bg";
type: RECT;
scale: 1;
description { state: "default" 0.0;
min: 0 0;
max: 999999 0;
fixed: 0 1;
- align: 0.5 1;
+ align: 0.0 1.0;
visible: 0;
- rel1.to_x: "elm.swallow.content";
- rel2.to_x: "elm.swallow.content";
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
visible: 1;
- }
}
- part { name: "controlbar_bg";
+ }
+ part { name: "controlbar_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "controlbar_clip"; }
- rel2 { to: "controlbar_clip"; }
- color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+ rel1 { to: "controlbar_bg"; }
+ rel2 { to: "controlbar_bg"; }
}
}
- part { name: "elm.swallow.prev_btn";
- type: SWALLOW;
+ part { name: "elm.prev_btn_bg";
+ type: RECT;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "controlbar_bg";
- rel1.relative: 0 0;
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
rel2.to: "controlbar_bg";
- rel2.relative: 0 1;
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
}
}
- part { name: "elm.swallow.controlbar";
+ part { name: "elm.swallow.prev_btn";
type: SWALLOW;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- rel1.to: "elm.swallow.prev_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_after_controlbar";
- rel2.relative: 0 1;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
}
}
- part { name: "padding_after_controlbar";
- type: RECT;
+ part { name: "controlbar";
+ type: SWALLOW;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- max: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- align: 1 1;
rel1.to: "controlbar_bg";
- rel2.to: "controlbar_bg";
- visible: 0;
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
}
}
}
signal: "elm,state,new,pushed,internal";
source: "";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "show_finished";
}
signal: "elm,state,cur,pushed,internal";
source: "";
action: STATE_SET "left" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "pushed_finished";
}
signal: "elm,state,prev,popped,internal";
source: "";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "show_finished";
}
signal: "elm,state,cur,popped,internal";
source: "";
action: STATE_SET "right" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "popped_finished";
}
signal: "elm,state,cur,pushed";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
emit("elm,state,cur,pushed,internal", "");
}
}
signal: "elm,state,new,pushed";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "right", 0.0);
+ set_state(PART:"base", "right", 0.0);
emit("elm,state,new,pushed,internal", "");
}
}
signal: "elm,state,prev,popped";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "left", 0.0);
+ set_state(PART:"base", "left", 0.0);
emit("elm,state,prev,popped,internal", "");
}
}
signal: "elm,state,cur,popped";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
emit("elm,state,cur,popped,internal", "");
}
}
signal: "elm,state,visible";
source: "elm";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
}
program { name: "title_show";
signal: "elm,state,title,show";
source: "elm";
script {
- set_state(PART:"title_clip", "default", 0.0);
+ set_state(PART:"title_bg", "default", 0.0);
if (get_int(oh_show) == 1) {
if (get_int(oh_close) == 1) {
emit("elm,state,optionheader,instant_close", "");
}
}
else
- set_state(PART:"optionheader_clip", "default", 0.0);
+ set_state(PART:"optionheader_bg", "default", 0.0);
}
}
program { name: "title_hide";
signal: "elm,state,title,hide";
source: "elm";
action: STATE_SET "hide" 0.0;
- target: "title_clip";
- target: "optionheader_clip";
+ target: "title_bg";
+ target: "optionheader_bg";
}
program { name: "prev_btn_show";
signal: "elm,state,prev_btn,show";
source: "elm";
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
}
}
program { name: "prev_btn_hide";
signal: "elm,state,prev_btn,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+ }
+ }
+ program { name: "left_btn_show";
+ signal: "elm,state,title_left_btn,show";
+ source: "elm";
+ script {
+ set_int(left_btn_visible, 1);
+ if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ }
+ }
+ program { name: "left_btn_hide";
+ signal: "elm,state,title_left_btn,hide";
+ source: "elm";
+ script {
+ set_int(left_btn_visible, 0);
+ if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
+ }
+ program { name: "right_btn_show";
+ signal: "elm,state,title_right_btn,show";
+ source: "elm";
+ script {
+ set_int(right_btn_visible, 1);
+ if (get_int(more_btn_visible) == 1) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+ (get_int(large_padded_center_align) == 1)))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
+ program { name: "right_btn_hide";
+ signal: "elm,state,title_right_btn,hide";
+ source: "elm";
+ script {
+ set_int(right_btn_visible, 0);
+ set_state(PART:"padding_before_right_btn", "default", 0.0);
+ if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "more_btn_show";
- signal: "elm,state,elm.swallow.more_btn,show";
+ signal: "elm,state,title_more_btn,show";
source: "elm";
- action: STATE_SET "more_button" 0.0;
- target: "padding_center_text2";
- target: "padding_before_right_btn";
+ script {
+ set_int(more_btn_visible, 1);
+ if (get_int(right_btn_visible) == 1) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+ (get_int(large_padded_center_align) == 1)))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "more_btn_hide";
- signal: "elm,state,elm.swallow.more_btn,hide";
+ signal: "elm,state,title_more_btn,hide";
source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.swallow.more_btn";
- target: "padding_before_right_btn";
+ script {
+ set_int(more_btn_visible, 0);
+ set_state(PART:"padding_before_right_btn", "default", 0.0);
+ if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "icon_show";
signal: "elm,state,elm.swallow.icon,show";
source: "elm";
- action: STATE_SET "icon_visible" 0.0;
- target: "padding_center_text1";
+ script {
+ set_int(icon_visible, 1);
+ if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ }
}
program { name: "icon_hide";
signal: "elm,state,elm.swallow.icon,hide";
source: "elm";
- action: STATE_SET "default" 0.0;
- target: "padding_center_text1";
+ script {
+ set_int(icon_visible, 0);
+ if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "controlbar_show";
- signal: "elm,state,elm.swallow.controlbar,show";
+ signal: "elm,state,controlbar,show";
source: "elm";
- action: STATE_SET "show" 0.0;
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
}
}
program { name: "controlbar_hide";
- signal: "elm,state,elm.swallow.controlbar,hide";
+ signal: "elm,state,controlbar,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
}
}
- program { name: "controlbar_clip_show";
- signal: "elm,state,controlbar_clip,show";
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
source: "elm";
script {
- set_state(PART:"controlbar_clip", "show", 0.0);
+ set_state(PART:"controlbar_bg", "show", 0.0);
set_int(cbar_bg, get_int(cbar_bg) + 1);
}
}
- program { name: "controlbar_clip_hide";
- signal: "elm,state,controlbar_clip,hide";
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
source: "elm";
script {
set_int(cbar_bg, get_int(cbar_bg) - 1);
if (get_int(cbar_bg) <= 0)
- set_state(PART:"controlbar_clip", "default", 0.0);
+ set_state(PART:"controlbar_bg", "default", 0.0);
}
}
program { name: "optionheader_show";
- signal: "elm,state,elm.swallow.optionheader,show";
+ signal: "elm,state,optionheader,show";
source: "elm";
script {
- set_state(PART:"optionheader_clip", "show", 0.0);
+ set_state(PART:"optionheader_bg", "show", 0.0);
set_state(PART:"optionheader_arrow", "show", 0.0);
set_int(oh_show, 1);
}
}
program { name: "optionheader_hide";
- signal: "elm,state,elm.swallow.optionheader,hide";
+ signal: "elm,state,optionheader,hide";
source: "elm";
script {
- set_state(PART:"optionheader_clip", "default", 0.0);
+ set_state(PART:"optionheader_bg", "default", 0.0);
set_state(PART:"optionheader_arrow", "default", 0.0);
set_int(oh_show, 0);
}
signal: "elm,state,optionheader,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
transition: LINEAR 0.2;
after: "optionheader_open_set";
signal: "elm,state,optionheader,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
transition: LINEAR 0.2;
after: "optionheader_close_set";
signal: "elm,state,optionheader,instant_open";
source: "";
action: STATE_SET "show" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
after: "optionheader_open_set";
}
signal: "elm,state,optionheader,instant_close";
source: "";
action: STATE_SET "default" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
after: "optionheader_close_set";
}
signal: "elm,state,controlbar,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_close";
signal: "elm,state,controlbar,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_instant_open";
source: "";
script {
emit("elm,state,prev_btn,show", "elm");
- emit("elm,state,elm.swallow.controlbar,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
}
}
program { name: "controlbar_instant_close";
source: "";
script {
emit("elm,state,prev_btn,hide", "elm");
- emit("elm,state,elm.swallow.controlbar,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
}
}
program { name: "show_finished";
}
}
}
- group { name: "elm/naviframe/item/video/segment/default";
+ group { name: "elm/naviframe/item/segment/default";
script {
public cbar_bg = 0; //Controlbar BG Show call count
}
parts {
- part { name: "title_clip";
+ part { name: "base";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "left" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "right" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ }
+ part { name: "title_bg";
type: RECT;
- mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
min: 1 NAVIFRAME_SEGMENT_TITLE_H_INC;
align: 0.0 0.0;
fixed: 0 1;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 0.0; }
+ rel1 { relative: 0.0 0.0; to: "base"; }
+ rel2 { relative: 1.0 0.0; to: "base"; }
+ color: NAVIFRAME_TITLE_BG_COLOR_INC;
}
description { state: "hide" 0.0;
inherit: "default" 0.0;
fixed: 1 1;
}
}
- part { name: "content_clip";
+ part { name: "title_clip";
type: RECT;
mouse_events: 0;
description { state: "default" 0.0;
- rel1.to_y: "title_clip";
- rel1.relative: 0 1;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
}
}
part { name: "elm.swallow.content";
description { state: "default" 0.0;
align: 0.0 0.0;
rel1.relative: 0.0 1.0;
- rel1.to_y: "title_clip";
+ rel1.to_x: "base";
+ rel1.to_y: "title_bg";
rel2.relative: 1.0 0.0;
- rel2.to_y: "controlbar_clip";
- }
- description { state: "left" 0.0;
- inherit: "default" 0.0;
- rel1.relative: -1.0 1.0;
- rel2.relative: 0.0 0.0;
- }
- description { state: "right" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 1.0 1.0;
- rel2.relative: 2.0 0.0;
+ rel2.to_x: "base";
+ rel2.to_y: "controlbar_bg";
}
}
- part { name: "title_base";
+ part { name: "content_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "title_clip"; }
- rel2 { to: "title_clip"; }
- color: NAVIFRAME_TITLE_BG_COLOR_INC;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
}
}
part { name: "padding_before_left_btn";
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.5;
- rel1 { relative: 0.0 0.0; to: "title_base"; }
- rel2 { relative: 0.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
visible: 0;
}
}
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.5;
- rel1 { relative: 1.0 0.0; to: "elm.swallow.left_btn"; }
- rel2 { relative: 1.0 1.0; to: "elm.swallow.left_btn"; }
+ rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
visible: 0;
}
}
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; to: "title_base"; }
- rel2 { relative: 1.0 1.0; to: "title_base"; }
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
visible: 0;
}
}
min: 0 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.right_btn"; }
- rel2 { relative: 0.0 1.0; to: "elm.swallow.right_btn"; }
+ rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
visible: 0;
}
description { state: "show" 0.0;
clip_to: "title_clip";
description { state: "default" 0.0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_base"; }
- rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_base"; }
+ rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
fixed: 1 0;
min: NAVIFRAME_ICON_PADDING_INC;
visible: 0;
clip_to: "title_clip";
description { state: "default" 0.0;
text { font: "SLP:style=Medium";
+ text_class: "slp_medium";
size: NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC;
min: 0 0;
max: 1 0;
}
min: 0 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
max: 999999 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
- fixed: 0 1;
+ fixed: 1 1;
color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
align: 0.5 0;
rel1.to: "padding_before_left_btn";
}
part { name: "click_event_area";
ignore_flags: ON_HOLD;
+ repeat_events: 1;
description { state: "default" 0.0;
- rel1 { to: "title_base"; }
- rel2 { to: "title_base"; }
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
}
}
- part { name: "elm.swallow.left_btn";
+ part { name: "title_left_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: 0 0;
- fixed: 1 0;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ fixed: 1 1;
align: 0 0;
rel1.relative: 1.0 1.0;
rel1.to_x: "padding_before_left_btn";
rel2.to_x: "padding_before_left_btn";
rel2.to_y: "elm.text.title";
}
- description { state: "show" 0.0;
- inherit: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
- max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
- fixed: 1 1;
- }
}
- part { name: "elm.swallow.right_btn";
+ part { name: "title_right_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: 0 0;
- align: 1 0;
- fixed: 1 0;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ align: 1 0.0;
+ fixed: 1 1;
rel1.relative: 0.0 1.0;
rel1.to_x: "padding_after_right_btn";
rel1.to_y: "elm.text.title";
rel2.to_x: "padding_after_right_btn";
rel2.to_y: "elm.text.title";
}
- description { state: "show" 0.0;
- inherit: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
- max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
- fixed: 1 1;
- }
}
- part { name: "elm.swallow.segment2";
+ part { name: "segment2";
type: "SWALLOW";
scale: 1;
clip_to: "title_clip";
fixed: 0 1;
align: 0.5 0;
rel1.to_y: "elm.text.title";
+ rel1.to_x: "title_bg";
rel1.relative: 0.28 1;
rel2.to_y: "elm.text.title";
+ rel2.to_x: "title_bg";
rel2.relative: 0.72 1;
}
}
- part { name: "elm.swallow.segment3";
+ part { name: "segment3";
type: "SWALLOW";
scale: 1;
clip_to: "title_clip";
align: 0.5 0;
rel1.to_y: "elm.text.title";
rel1.relative: 0.2 1;
+ rel1.to_x: "title_bg";
rel2.to_y: "elm.text.title";
+ rel2.to_x: "title_bg";
rel2.relative: 0.8 1;
}
}
- part { name: "controlbar_clip";
+ part { name: "controlbar_bg";
type: RECT;
scale: 1;
description { state: "default" 0.0;
min: 0 0;
max: 999999 0;
fixed: 0 1;
- align: 0.5 1;
+ align: 0.0 1.0;
visible: 0;
- rel1.to_x: "elm.swallow.content";
- rel2.to_x: "elm.swallow.content";
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
- part { name: "controlbar_bg";
+ part { name: "controlbar_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "controlbar_clip"; }
- rel2 { to: "controlbar_clip"; }
- color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
- }
- }
- part { name: "elm.swallow.prev_btn";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "controlbar_bg";
- rel1.relative: 0 0;
- rel2.to: "controlbar_bg";
- rel2.relative: 0 1;
- }
- }
- part { name: "elm.swallow.controlbar";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- rel1.to: "elm.swallow.prev_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_after_controlbar";
- rel2.relative: 0 1;
+ rel1 { to: "controlbar_bg"; }
+ rel2 { to: "controlbar_bg"; }
}
}
- part { name: "padding_after_controlbar";
+ part { name: "elm.prev_btn_bg";
type: RECT;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- max: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- align: 1 1;
- rel1.to: "controlbar_bg";
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
rel2.to: "controlbar_bg";
visible: 0;
}
- }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
+ }
+ }
+ part { name: "controlbar";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ rel1.to: "controlbar_bg";
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+ }
+ }
}
programs {
program { name: "content_new_pushed";
signal: "elm,state,new,pushed,internal";
source: "";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "show_finished";
}
signal: "elm,state,cur,pushed,internal";
source: "";
action: STATE_SET "left" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "pushed_finished";
}
signal: "elm,state,prev,popped,internal";
source: "";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "show_finished";
}
signal: "elm,state,cur,popped,internal";
source: "";
action: STATE_SET "right" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "popped_finished";
}
signal: "elm,state,cur,pushed";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
emit("elm,state,cur,pushed,internal", "");
}
}
signal: "elm,state,new,pushed";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "right", 0.0);
+ set_state(PART:"base", "right", 0.0);
emit("elm,state,new,pushed,internal", "");
}
}
signal: "elm,state,prev,popped";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "left", 0.0);
+ set_state(PART:"base", "left", 0.0);
emit("elm,state,prev,popped,internal", "");
}
}
signal: "elm,state,cur,popped";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
emit("elm,state,cur,popped,internal", "");
}
}
signal: "elm,state,visible";
source: "elm";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
}
program { name: "title_show";
signal: "elm,state,title,show";
source: "elm";
action: STATE_SET "show" 0.0;
- target: "title_clip";
+ target: "title_bg";
}
program { name: "title_hide";
signal: "elm,state,title,hide";
source: "elm";
action: STATE_SET "hide" 0.0;
- target: "title_clip";
+ target: "title_bg";
}
program { name: "prev_btn_show";
signal: "elm,state,prev_btn,show";
source: "elm";
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
}
}
program { name: "prev_btn_hide";
signal: "elm,state,prev_btn,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
}
}
- program { name: "left_btn_show";
- signal: "elm,state,elm.swallow.left_btn,show";
- source: "elm";
- action: STATE_SET "show" 0.0;
- target: "elm.swallow.left_btn";
- }
- program { name: "left_btn_hide";
- signal: "elm,state,elm.swallow.left_btn,hide";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.swallow.left_btn";
- }
- program { name: "right_btn_show";
- signal: "elm,state,elm.swallow.right_btn,show";
- source: "elm";
- action: STATE_SET "show" 0.0;
- target: "elm.swallow.right_btn";
- }
- program { name: "right_btn_hide";
- signal: "elm,state,elm.swallow.right_btn,hide";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.swallow.right_btn";
- }
program { name: "controlbar_show";
- signal: "elm,state,elm.swallow.controlbar,show";
+ signal: "elm,state,controlbar,show";
source: "elm";
- action: STATE_SET "show" 0.0;
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
}
}
program { name: "controlbar_hide";
- signal: "elm,state,elm.swallow.controlbar,hide";
+ signal: "elm,state,controlbar,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
}
}
- program { name: "controlbar_clip_show";
- signal: "elm,state,controlbar_clip,show";
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
source: "elm";
script {
- set_state(PART:"controlbar_clip", "show", 0.0);
+ set_state(PART:"controlbar_bg", "show", 0.0);
set_int(cbar_bg, get_int(cbar_bg) + 1);
}
}
- program { name: "controlbar_clip_hide";
- signal: "elm,state,controlbar_clip,hide";
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
source: "elm";
script {
set_int(cbar_bg, get_int(cbar_bg) - 1);
if (get_int(cbar_bg) <= 0)
- set_state(PART:"controlbar_clip", "default", 0.0);
+ set_state(PART:"controlbar_bg", "default", 0.0);
}
}
program { name: "controlbar_open";
signal: "elm,state,controlbar,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_close";
signal: "elm,state,controlbar,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_instant_open";
source: "";
script {
emit("elm,state,prev_btn,show", "elm");
- emit("elm,state,elm.swallow.controlbar,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
}
}
program { name: "controlbar_instant_close";
source: "";
script {
emit("elm,state,prev_btn,hide", "elm");
- emit("elm,state,elm.swallow.controlbar,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
}
}
program { name: "show_finished";
public cbar_bg = 0; //Controlbar BG Show call count
}
parts {
+ part { name: "base";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "left" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "right" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ }
part { name: "elm.swallow.content";
type: SWALLOW;
scale: 1;
repeat_events: 0;
+ clip_to: "content_clip";
description { state: "default" 0.0;
align: 0.0 0.0;
+ rel1.relative: 0.0 0.0;
+ rel1.to: "base";
rel2.relative: 1.0 0.0;
- rel2.to_y: "controlbar_clip";
+ rel2.to_x: "base";
+ rel2.to_y: "controlbar_bg";
}
- description { state: "left" 0.0;
- inherit: "default" 0.0;
- rel1.relative: -1.0 0.0;
- rel2.relative: 0.0 0.0;
- }
- description { state: "right" 0.0;
- inherit: "default" 0.0;
- rel1.relative: 1.0 0.0;
- rel2.relative: 2.0 0.0;
+ }
+ part { name: "content_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
}
}
- part { name: "controlbar_clip";
+ part { name: "controlbar_bg";
type: RECT;
scale: 1;
description { state: "default" 0.0;
min: 0 0;
max: 999999 0;
fixed: 0 1;
- align: 0.5 1;
+ align: 0.0 1.0;
visible: 0;
- rel1.to_x: "elm.swallow.content";
- rel2.to_x: "elm.swallow.content";
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
- part { name: "controlbar_bg";
+ part { name: "controlbar_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "controlbar_clip"; }
- rel2 { to: "controlbar_clip"; }
- color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
- }
+ rel1 { to: "controlbar_bg"; }
+ rel2 { to: "controlbar_bg"; }
+ }
+ }
+ part { name: "elm.prev_btn_bg";
+ type: RECT;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+ rel2.to: "controlbar_bg";
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
}
part { name: "elm.swallow.prev_btn";
type: SWALLOW;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "controlbar_bg";
- rel1.relative: 0 0;
- rel2.to: "controlbar_bg";
- rel2.relative: 0 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
}
}
- part { name: "elm.swallow.controlbar";
+ part { name: "controlbar";
type: SWALLOW;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- rel1.to: "elm.swallow.prev_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_after_controlbar";
- rel2.relative: 0 1;
- }
- }
- part { name: "padding_after_controlbar";
- type: RECT;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- min: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- max: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- align: 1 1;
rel1.to: "controlbar_bg";
- rel2.to: "controlbar_bg";
- visible: 0;
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
}
}
}
signal: "elm,state,new,pushed,internal";
source: "";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "show_finished";
}
signal: "elm,state,cur,pushed,internal";
source: "";
action: STATE_SET "left" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "pushed_finished";
}
signal: "elm,state,prev,popped,internal";
source: "";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "show_finished";
}
signal: "elm,state,cur,popped,internal";
source: "";
action: STATE_SET "right" 0.0;
- target: "elm.swallow.content";
+ target: "base";
transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
after: "popped_finished";
}
signal: "elm,state,cur,pushed";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
emit("elm,state,cur,pushed,internal", "");
}
}
signal: "elm,state,new,pushed";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "right", 0.0);
+ set_state(PART:"base", "right", 0.0);
emit("elm,state,new,pushed,internal", "");
}
}
signal: "elm,state,prev,popped";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "left", 0.0);
+ set_state(PART:"base", "left", 0.0);
emit("elm,state,prev,popped,internal", "");
}
}
signal: "elm,state,cur,popped";
source: "elm";
script {
- set_state(PART:"elm.swallow.content", "default", 0.0);
+ set_state(PART:"base", "default", 0.0);
emit("elm,state,cur,popped,internal", "");
}
}
signal: "elm,state,visible";
source: "elm";
action: STATE_SET "default" 0.0;
- target: "elm.swallow.content";
+ target: "base";
}
program { name: "prev_btn_show";
signal: "elm,state,prev_btn,show";
source: "elm";
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
}
}
program { name: "prev_btn_hide";
signal: "elm,state,prev_btn,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
}
}
program { name: "controlbar_show";
- signal: "elm,state,elm.swallow.controlbar,show";
+ signal: "elm,state,controlbar,show";
source: "elm";
action: STATE_SET "show" 0.0;
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
}
}
program { name: "controlbar_hide";
- signal: "elm,state,elm.swallow.controlbar,hide";
+ signal: "elm,state,controlbar,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
}
}
- program { name: "controlbar_clip_show";
- signal: "elm,state,controlbar_clip,show";
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
source: "elm";
script {
- set_state(PART:"controlbar_clip", "show", 0.0);
+ set_state(PART:"controlbar_bg", "show", 0.0);
set_int(cbar_bg, get_int(cbar_bg) + 1);
}
}
- program { name: "controlbar_clip_hide";
- signal: "elm,state,controlbar_clip,hide";
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
source: "elm";
script {
set_int(cbar_bg, get_int(cbar_bg) - 1);
if (get_int(cbar_bg) <= 0)
- set_state(PART:"controlbar_clip", "default", 0.0);
+ set_state(PART:"controlbar_bg", "default", 0.0);
}
}
program { name: "controlbar_open";
signal: "elm,state,controlbar,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_close";
signal: "elm,state,controlbar,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_instant_open";
source: "";
script {
emit("elm,state,prev_btn,show", "elm");
- emit("elm,state,elm.swallow.controlbar,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
}
}
program { name: "controlbar_instant_close";
source: "";
script {
emit("elm,state,prev_btn,hide", "elm");
- emit("elm,state,elm.swallow.controlbar,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
}
}
program { name: "show_finished";
}
}
}
- group { name:"elm/naviframe/item/video/basic/instant/default";
+ group { name:"elm/naviframe/item/basic/instant/default";
alias:"elm/naviframe/item/video/1line/instant/default";
alias:"elm/naviframe/item/video/instant/default";
images {
public oh_show = 0; //optionheader show/hide
public oh_close = 0; //optionheader close/open
public cbar_bg = 0; //Controlbar BG Show call count
+ public left_btn_visible = 0; //whether left btn is shown
+ public icon_visible = 0; //whether icon is shown
+ public right_btn_visible = 0; //whether right btn is shown
+ public more_btn_visible = 0; //whether more btn is shown
+ public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
}
parts {
- part { name: "title_clip";
+ part { name: "title_bg";
type: RECT;
- mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
min: 1 NAVIFRAME_TITLE_H_INC;
fixed: 0 1;
rel1 { relative: 0.0 0.0; }
rel2 { relative: 1.0 0.0; }
- }
+ color: NAVIFRAME_TITLE_BG_COLOR_INC;
+ }
description { state: "hide" 0.0;
inherit: "default" 0.0;
min: 0 0;
fixed: 1 1;
}
}
- part { name: "optionheader_clip";
+ part { name: "title_clip";
type: RECT;
mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part { name: "optionheader_bg";
+ type: IMAGE;
scale: 1;
description { state: "default" 0.0;
min: 1 0;
align: 0.5 0;
fixed: 0 1;
- rel1.to_x: "elm.swallow.content";
- rel1.to_y: "title_clip";
+ rel1.to: "title_bg";
rel1.relative: 0 1;
- rel2.to_x: "elm.swallow.content";
- rel2.to_y: "title_clip";
+ rel2.to: "title_bg";
visible: 0;
+ image { normal: "naviframe_optionheader.png";
+ border: NAVIFRAME_OH_BORDER_INC;
+ }
}
description { state: "show" 0.0;
inherit: "default" 0.0;
fixed: 1 1;
}
}
- part { name: "optionheader_bg";
- type: IMAGE;
- scale: 1;
+ part { name: "optionheader_clip";
+ type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "optionheader_clip"; }
- rel2 { to: "optionheader_clip"; }
- image { normal: "naviframe_optionheader.png";
- border: 0 0 4 0;
- }
+ rel1 { to: "optionheader_bg"; }
+ rel2 { to: "optionheader_bg"; }
}
}
part { name: "optionheader_top_padding";
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_PADDING_INC;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
fixed: 0 1;
visible: 0;
}
}
- part { name: "elm.swallow.optionheader";
+ part { name: "optionheader";
type: SWALLOW;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_CONTENT_H_INC;
+ min: 0 NAVIFRAME_OH_CONTENT_H_INC;
rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
fixed: 0 1;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_PADDING_INC;
- rel1 { relative: 0.0 1.0; to: "elm.swallow.optionheader"; }
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader"; }
fixed: 0 1;
align: 0.0 0.0;
visible: 0;
}
}
- part { name: "content_clip";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1.to_y: "optionheader_bg";
- rel1.relative: 0 1;
- }
- }
part { name: "elm.swallow.content";
type: SWALLOW;
scale: 1;
rel1.relative: 0.0 1.0;
rel1.to_y: "optionheader_bg";
rel2.relative: 1.0 0.0;
- rel2.to_y: "controlbar_clip";
+ rel2.to_y: "controlbar_bg";
}
}
- part { name: "title_base";
+ part { name: "content_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "title_clip"; }
- rel2 { to: "title_clip"; }
- color: NAVIFRAME_TITLE_BG_COLOR_INC;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
}
}
part { name: "padding_before_left_btn";
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.5;
- rel1 { relative: 0.0 0.0; to: "title_base"; }
- rel2 { relative: 0.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
visible: 0;
}
- }
+ }
part { name: "padding_after_left_btn";
type: RECT;
- mouse_events: 0;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
- align: 0.0 0.5;
- rel1 { relative: 1.0 0.0; to: "elm.swallow.left_btn"; }
- rel2 { relative: 1.0 1.0; to: "elm.swallow.left_btn"; }
+ align: 0 0.5;
+ rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
visible: 0;
+ }
}
+ part { name: "padding_before_more_btn";
+ type: RECT;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_more_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_more_btn"; }
+ visible: 0;
+ }
}
part { name: "padding_after_right_btn";
type: RECT;
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; to: "title_base"; }
- rel2 { relative: 1.0 1.0; to: "title_base"; }
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
visible: 0;
}
}
min: 0 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.right_btn"; }
- rel2 { relative: 0.0 1.0; to: "elm.swallow.right_btn"; }
+ rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
visible: 0;
}
- description { state: "more_button" 0.0;
+ description { state: "right_and_more_button" 0.0;
inherit: "default" 0.0;
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
}
}
- part { name: "padding_before_more_btn";
+ part { name: "padding_before_text";
type: RECT;
- mouse_events: 0;
scale: 1;
+ mouse_events: 0;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
- fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.more_btn"; }
- rel2 { relative: 0.0 1.0; to: "elm.swallow.more_btn"; }
+ rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+ fixed: 1 0;
+ min: NAVIFRAME_ICON_PADDING_INC;
visible: 0;
}
}
mouse_events: 0;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_INC 0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; to: "title_base"; }
- rel2 { relative: 0.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
visible: 0;
}
- description { state: "icon_visible" 0.0;
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TEXT_PADDING_INC 0;
+ }
+ description { state: "icon" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
+ }
+ description { state: "icon_left_button" 0.0;
inherit: "default" 0.0;
min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
}
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_INC 0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; to: "title_base"; }
- rel2 { relative: 1.0 1.0; to: "title_base"; }
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
visible: 0;
}
- description { state: "more_button" 0.0;
+ description { state: "visible" 0.0;
inherit: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_MORE_BUTTON_INC 0;
- }
- }
- part { name: "padding_before_text";
- type: RECT;
- scale: 1;
- mouse_events: 0;
- clip_to: "title_clip";
- description { state: "default" 0.0;
- align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_base"; }
- rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_base"; }
- fixed: 1 0;
- min: NAVIFRAME_ICON_PADDING_INC;
- visible: 0;
+ min: NAVIFRAME_TEXT_PADDING_INC 0;
}
}
part { name: "elm.text.title";
clip_to: "title_clip";
description { state: "default" 0.0;
text { font: "SLP:style=Medium";
+ text_class: "slp_medium";
size: NAVIFRAME_TITLE_FONT_SIZE_INC;
min: 0 0;
max: 1 0;
}
color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
align: 0.5 0.5;
- rel1.to: "padding_center_text1";
- rel1.relative: 1 0;
- rel2.to: "padding_center_text2";
- rel2.relative: 0 1;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+ rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+ }
+ description { state: "right_and_more_button" 0.0;
+ inherit: "default" 0.0;
+ rel1 { relative: 1.0 0.0; to: "padding_after_left_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_more_btn"; }
}
}
part { name: "elm.swallow.icon";
clip_to: "title_clip";
description { state: "default" 0.0;
max: NAVIFRAME_ICON_SIZE_INC;
+ fixed: 1 1;
rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
aspect: 1.0 1.0;
}
part { name: "click_event_area";
ignore_flags: ON_HOLD;
+ repeat_events: 1;
description { state: "default" 0.0;
- rel1 { to: "title_base"; }
- rel2 { to: "title_base"; }
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
}
}
- part { name: "elm.swallow.left_btn";
+ part { name: "title_left_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "padding_before_left_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_before_left_btn";
- rel2.relative: 1 1;
+ align: 0 0.5;
+ rel1 { relative: 1.0 0.0; to: "padding_before_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "padding_before_left_btn"; }
}
}
- part { name: "elm.swallow.right_btn";
+ part { name: "title_right_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ align: 1 0.5;
fixed: 1 1;
- align: 1.0 0.5;
- rel1.to: "padding_after_right_btn";
- rel1.relative: 0 0;
- rel2.to: "padding_after_right_btn";
- rel2.relative: 0 1;
+ rel1 { relative: 0.0 0.0; to: "padding_after_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_after_right_btn"; }
}
}
- part { name: "elm.swallow.more_btn";
+ part { name: "title_more_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
fixed: 1 1;
- align: 1.0 0.5;
- rel1.to: "padding_before_right_btn";
- rel1.relative: 0 0;
- rel2.to: "padding_before_right_btn";
- rel2.relative: 0 1;
+ align: 1 0.5;
+ rel1 { relative: 0.0 0.0; to: "padding_before_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_right_btn"; }
}
}
part { name: "optionheader_arrow";
min: NAVIFRAME_OH_ARROW_SIZE_INC;
max: NAVIFRAME_OH_ARROW_SIZE_INC;
fixed: 1 1;
- align: 0.5 0;
- rel1.to: "elm.swallow.more_btn";
- rel1.relative: 0 1;
- rel2.to: "elm.swallow.more_btn";
- rel2.relative: 1 1;
- image {
- normal: "naviframe_optionheader_arrow.png";
- }
- color: 255 255 255 0 ;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.025; to: "title_more_btn"; }
+ rel2 { relative: 1.0 1.025; to: "title_more_btn"; }
+ image.normal: "naviframe_optionheader_arrow.png";
+ color: 255 255 255 0;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
- color: 255 255 255 255;
+ color: 255 255 255 255;
}
}
- part { name: "controlbar_clip";
+ part { name: "controlbar_bg";
type: RECT;
scale: 1;
description { state: "default" 0.0;
min: 0 0;
max: 999999 0;
fixed: 0 1;
- align: 0.5 1;
+ align: 0.0 1.0;
visible: 0;
- rel1.to_x: "elm.swallow.content";
- rel2.to_x: "elm.swallow.content";
- }
+ color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+ }
description { state: "show" 0.0;
inherit: "default" 0.0;
min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
visible: 1;
}
}
- part { name: "controlbar_bg";
+ part { name: "controlbar_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "controlbar_clip"; }
- rel2 { to: "controlbar_clip"; }
- color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
- }
- }
- part { name: "elm.swallow.prev_btn";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "controlbar_bg";
- rel1.relative: 0 0;
- rel2.to: "controlbar_bg";
- rel2.relative: 0 1;
- }
- }
- part { name: "elm.swallow.controlbar";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- rel1.to: "elm.swallow.prev_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_after_controlbar";
- rel2.relative: 0 1;
+ rel1 { to: "controlbar_bg"; }
+ rel2 { to: "controlbar_bg"; }
}
}
- part { name: "padding_after_controlbar";
+ part { name: "elm.prev_btn_bg";
type: RECT;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- max: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- align: 1 1;
- rel1.to: "controlbar_bg";
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
rel2.to: "controlbar_bg";
visible: 0;
}
- }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
+ }
+ }
+ part { name: "controlbar";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ rel1.to: "controlbar_bg";
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+ }
+ }
}
programs {
program { name: "cur_pushed";
signal: "elm,state,title,show";
source: "elm";
script {
- set_state(PART:"title_clip", "default", 0.0);
+ set_state(PART:"title_bg", "default", 0.0);
if (get_int(oh_show) == 1) {
if (get_int(oh_close) == 1) {
emit("elm,state,optionheader,instant_close", "");
}
}
else
- set_state(PART:"optionheader_clip", "default", 0.0);
+ set_state(PART:"optionheader_bg", "default", 0.0);
}
}
program { name: "title_hide";
signal: "elm,state,title,hide";
source: "elm";
action: STATE_SET "hide" 0.0;
- target: "title_clip";
- target: "optionheader_clip";
+ target: "title_bg";
+ target: "optionheader_bg";
}
program { name: "prev_btn_show";
signal: "elm,state,prev_btn,show";
source: "elm";
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
}
}
program { name: "prev_btn_hide";
signal: "elm,state,prev_btn,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+ }
+ }
+ program { name: "left_btn_show";
+ signal: "elm,state,title_left_btn,show";
+ source: "elm";
+ script {
+ set_int(left_btn_visible, 1);
+ if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ }
+ }
+ program { name: "left_btn_hide";
+ signal: "elm,state,title_left_btn,hide";
+ source: "elm";
+ script {
+ set_int(left_btn_visible, 0);
+ if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
+ }
+ program { name: "right_btn_show";
+ signal: "elm,state,tltle_right_btn,show";
+ source: "elm";
+ script {
+ set_int(right_btn_visible, 1);
+ if (get_int(more_btn_visible) == 1) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+ (get_int(large_padded_center_align) == 1)))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
+ program { name: "right_btn_hide";
+ signal: "elm,state,title_right_btn,hide";
+ source: "elm";
+ script {
+ set_int(right_btn_visible, 0);
+ set_state(PART:"padding_before_right_btn", "default", 0.0);
+ if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "more_btn_show";
- signal: "elm,state,elm.swallow.more_btn,show";
+ signal: "elm,state,title_more_btn,show";
source: "elm";
- action: STATE_SET "more_button" 0.0;
- target: "padding_center_text2";
- target: "padding_before_right_btn";
+ script {
+ set_int(more_btn_visible, 1);
+ if (get_int(right_btn_visible) == 1) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+ (get_int(large_padded_center_align) == 1)))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "more_btn_hide";
- signal: "elm,state,elm.swallow.more_btn,hide";
+ signal: "elm,state,title_more_btn,hide";
source: "elm";
- action: STATE_SET "default" 0.0;
- target: "padding_center_text2";
- target: "padding_before_right_btn";
+ script {
+ set_int(more_btn_visible, 0);
+ set_state(PART:"padding_before_right_btn", "default", 0.0);
+ if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "icon_show";
signal: "elm,state,elm.swallow.icon,show";
source: "elm";
- action: STATE_SET "icon_visible" 0.0;
- target: "padding_center_text1";
+ script {
+ set_int(icon_visible, 1);
+ if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ }
}
program { name: "icon_hide";
signal: "elm,state,elm.swallow.icon,hide";
source: "elm";
- action: STATE_SET "default" 0.0;
- target: "padding_center_text1";
+ script {
+ set_int(icon_visible, 0);
+ if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "controlbar_show";
- signal: "elm,state,elm.swallow.controlbar,show";
+ signal: "elm,state,controlbar,show";
source: "elm";
- action: STATE_SET "show" 0.0;
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
}
}
program { name: "controlbar_hide";
- signal: "elm,state,elm.swallow.controlbar,hide";
+ signal: "elm,state,controlbar,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
}
}
- program { name: "controlbar_clip_show";
- signal: "elm,state,controlbar_clip,show";
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
source: "elm";
script {
- set_state(PART:"controlbar_clip", "show", 0.0);
+ set_state(PART:"controlbar_bg", "show", 0.0);
set_int(cbar_bg, get_int(cbar_bg) + 1);
}
}
- program { name: "controlbar_clip_hide";
- signal: "elm,state,controlbar_clip,hide";
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
source: "elm";
script {
set_int(cbar_bg, get_int(cbar_bg) - 1);
if (get_int(cbar_bg) <= 0)
- set_state(PART:"controlbar_clip", "default", 0.0);
+ set_state(PART:"controlbar_bg", "default", 0.0);
}
}
program { name: "optionheader_show";
- signal: "elm,state,elm.swallow.optionheader,show";
+ signal: "elm,state,optionheader,show";
source: "elm";
script {
- set_state(PART:"optionheader_clip", "show", 0.0);
+ set_state(PART:"optionheader_bg", "show", 0.0);
set_state(PART:"optionheader_arrow", "show", 0.0);
set_int(oh_show, 1);
}
}
program { name: "optionheader_hide";
- signal: "elm,state,elm.swallow.optionheader,hide";
+ signal: "elm,state,optionheader,hide";
source: "elm";
script {
- set_state(PART:"optionheader_clip", "default", 0.0);
+ set_state(PART:"optionheader_bg", "default", 0.0);
set_state(PART:"optionheader_arrow", "default", 0.0);
set_int(oh_show, 0);
}
signal: "elm,state,optionheader,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
transition: LINEAR 0.2;
after: "optionheader_open_set";
signal: "elm,state,optionheader,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
transition: LINEAR 0.2;
after: "optionheader_close_set";
signal: "elm,state,optionheader,instant_open";
source: "";
action: STATE_SET "show" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
after: "optionheader_open_set";
}
signal: "elm,state,optionheader,instant_close";
source: "";
action: STATE_SET "default" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
after: "optionheader_close_set";
}
signal: "elm,state,controlbar,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_close";
signal: "elm,state,controlbar,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_instant_open";
source: "";
script {
emit("elm,state,prev_btn,show", "elm");
- emit("elm,state,elm.swallow.controlbar,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
}
}
program { name: "controlbar_instant_close";
source: "";
script {
emit("elm,state,prev_btn,hide", "elm");
- emit("elm,state,elm.swallow.controlbar,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
}
}
program { name: "show_finished";
}
}
}
- group { name:"elm/naviframe/item/video/basic2/instant/default";
+ group { name:"elm/naviframe/item/basic2/instant/default";
alias:"elm/naviframe/item/video/2line/instant/default";
alias:"elm/naviframe/item/video/instant2/default";
images {
public oh_show = 0; //optionheader show/hide
public oh_close = 0; //optionheader close/open
public cbar_bg = 0; //Controlbar BG Show call count
+ public left_btn_visible = 0; //whether left btn is shown
+ public icon_visible = 0; //whether icon is shown
+ public right_btn_visible = 0; //whether right btn is shown
+ public more_btn_visible = 0; //whether more btn is shown
+ public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
}
parts {
- part { name: "title_clip";
+ part { name: "title_bg";
type: RECT;
- mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
min: 1 NAVIFRAME_TITLE_H_INC;
fixed: 0 1;
rel1 { relative: 0.0 0.0; }
rel2 { relative: 1.0 0.0; }
+ color: NAVIFRAME_TITLE_BG_COLOR_INC;
}
description { state: "hide" 0.0;
inherit: "default" 0.0;
fixed: 1 1;
}
}
- part { name: "optionheader_clip";
+ part { name: "title_clip";
type: RECT;
mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part { name: "optionheader_bg";
+ type: IMAGE;
scale: 1;
description { state: "default" 0.0;
min: 1 0;
align: 0.5 0;
fixed: 0 1;
- rel1.to_x: "elm.swallow.content";
- rel1.to_y: "title_clip";
+ rel1.to: "title_bg";
rel1.relative: 0 1;
- rel2.to_x: "elm.swallow.content";
- rel2.to_y: "title_clip";
+ rel2.to: "title_bg";
visible: 0;
+ image { normal: "naviframe_optionheader.png";
+ border: NAVIFRAME_OH_BORDER_INC;
+ }
}
description { state: "show" 0.0;
inherit: "default" 0.0;
fixed: 1 1;
}
}
- part { name: "optionheader_bg";
- type: IMAGE;
- scale: 1;
+ part { name: "optionheader_clip";
+ type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "optionheader_clip"; }
- rel2 { to: "optionheader_clip"; }
- image { normal: "naviframe_optionheader.png";
- border: 0 0 4 0;
- }
+ rel1 { to: "optionheader_bg"; }
+ rel2 { to: "optionheader_bg"; }
}
}
part { name: "optionheader_top_padding";
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_PADDING_INC;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
fixed: 0 1;
visible: 0;
}
}
- part { name: "elm.swallow.optionheader";
+ part { name: "optionheader";
type: SWALLOW;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_CONTENT_H_INC;
+ min: 0 NAVIFRAME_OH_CONTENT_H_INC;
rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
fixed: 0 1;
align: 0.0 0.0;
}
}
- part { name: "elm.swallow.optionheader.mid.padding";
+ part { name: "optionheader.mid.padding";
type: RECT;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_PADDING_INC;
- rel1 { relative: 0.0 1.0; to: "elm.swallow.optionheader"; }
- rel2 { relative: 1.0 1.0; to: "elm.swallow.optionheader"; }
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader"; }
fixed: 0 1;
align: 0.0 0.0;
visible: 0;
}
}
- part { name: "elm.swallow.optionheader2";
+ part { name: "optionheader2";
type: SWALLOW;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_CONTENT_H_INC;
- rel1 { relative: 0.0 1.0; to: "elm.swallow.optionheader.mid.padding";}
- rel2 { relative: 1.0 1.0; to: "elm.swallow.optionheader.mid.padding";}
+ min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader.mid.padding";}
+ rel2 { relative: 1.0 1.0; to: "optionheader.mid.padding";}
fixed: 0 1;
align: 0.0 0.0;
}
}
- part { name: "elm.swallow.optionheader.bottom.padding";
+ part { name: "optionheader.bottom.padding";
type: RECT;
scale: 1;
clip_to: "optionheader_clip";
description { state: "default" 0.0;
- min: 1 NAVIFRAME_OH_PADDING_INC;
- rel1 { relative: 0.0 1.0; to: "elm.swallow.optionheader2"; }
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader2"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader2"; }
fixed: 0 1;
align: 0.0 0.0;
visible: 0;
}
}
- part { name: "content_clip";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1.to_y: "optionheader_bg";
- rel1.relative: 0 1;
- }
- }
part { name: "elm.swallow.content";
type: SWALLOW;
scale: 1;
rel1.relative: 0.0 1.0;
rel1.to_y: "optionheader_bg";
rel2.relative: 1.0 0.0;
- rel2.to_y: "controlbar_clip";
+ rel2.to_y: "controlbar_bg";
}
}
- part { name: "title_base";
+ part { name: "content_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "title_clip"; }
- rel2 { to: "title_clip"; }
- color: NAVIFRAME_TITLE_BG_COLOR_INC;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
}
}
part { name: "padding_before_left_btn";
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.5;
- rel1 { relative: 0.0 0.0; to: "title_base"; }
- rel2 { relative: 0.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
visible: 0;
}
}
part { name: "padding_after_left_btn";
type: RECT;
- mouse_events: 0;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
- align: 0.0 0.5;
- rel1 { relative: 1.0 0.0; to: "elm.swallow.left_btn"; }
- rel2 { relative: 1.0 1.0; to: "elm.swallow.left_btn"; }
+ align: 0 0.5;
+ rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
visible: 0;
}
}
- part { name: "padding_after_right_btn";
+ part { name: "padding_before_more_btn";
type: RECT;
- mouse_events: 0;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; to: "title_base"; }
- rel2 { relative: 1.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_more_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_more_btn"; }
visible: 0;
}
}
- part { name: "padding_before_right_btn";
+ part { name: "padding_after_right_btn";
type: RECT;
mouse_events: 0;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: 0 0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.right_btn"; }
- rel2 { relative: 0.0 1.0; to: "elm.swallow.right_btn"; }
- visible: 0;
- }
- description { state: "more_button" 0.0;
- inherit: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
+ visible: 0;
}
}
- part { name: "padding_before_more_btn";
+ part { name: "padding_before_right_btn";
type: RECT;
mouse_events: 0;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ min: 0 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.more_btn"; }
- rel2 { relative: 0.0 1.0; to: "elm.swallow.more_btn"; }
+ rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
visible: 0;
}
+ description { state: "right_and_more_button" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+ }
}
part { name: "padding_before_text";
type: RECT;
clip_to: "title_clip";
description { state: "default" 0.0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_base"; }
- rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_base"; }
+ rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
fixed: 1 0;
min: NAVIFRAME_ICON_PADDING_INC;
visible: 0;
}
}
- part { name: "padding_center_text1";
+ part { name: "padding_center_text1";
type: RECT;
scale: 1;
mouse_events: 0;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_INC 0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; to: "title_base"; }
- rel2 { relative: 0.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
visible: 0;
}
- description { state: "icon_visible" 0.0;
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TEXT_PADDING_INC 0;
+ }
+ description { state: "icon" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
+ }
+ description { state: "icon_left_button" 0.0;
inherit: "default" 0.0;
min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
}
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_INC 0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; to: "title_base"; }
- rel2 { relative: 1.0 1.0; to: "title_base"; }
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
visible: 0;
}
- description { state: "more_button" 0.0;
+ description { state: "visible" 0.0;
inherit: "default" 0.0;
- min: NAVIFRAME_TEXT_PADDING_MORE_BUTTON_INC 0;
+ min: NAVIFRAME_TEXT_PADDING_INC 0;
}
}
part { name: "elm.text.title";
clip_to: "title_clip";
description { state: "default" 0.0;
text { font: "SLP:style=Medium";
+ text_class: "slp_medium";
size: NAVIFRAME_TITLE_FONT_SIZE_INC;
min: 0 0;
max: 1 0;
}
color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
align: 0.5 0.5;
- rel1.to: "padding_center_text1";
- rel1.relative: 1 0;
- rel2.to: "padding_center_text2";
- rel2.relative: 0 1;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+ rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+ }
+ description { state: "right_and_more_button" 0.0;
+ inherit: "default" 0.0;
+ rel1 { relative: 1.0 0.0; to: "padding_after_left_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_more_btn"; }
}
}
part { name: "elm.swallow.icon";
clip_to: "title_clip";
description { state: "default" 0.0;
max: NAVIFRAME_ICON_SIZE_INC;
+ fixed: 1 1;
rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
aspect: 1.0 1.0;
}
part { name: "click_event_area";
ignore_flags: ON_HOLD;
+ repeat_events: 1;
description { state: "default" 0.0;
- rel1 { to: "title_base"; }
- rel2 { to: "title_base"; }
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
}
}
- part { name: "elm.swallow.left_btn";
+ part { name: "title_left_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "padding_before_left_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_before_left_btn";
- rel2.relative: 1 1;
+ align: 0 0.5;
+ rel1 { relative: 1.0 0.0; to: "padding_before_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "padding_before_left_btn"; }
}
}
- part { name: "elm.swallow.right_btn";
+ part { name: "title_right_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ align: 1 0.5;
fixed: 1 1;
- align: 1.0 0.5;
- rel1.to: "padding_after_right_btn";
- rel1.relative: 0 0;
- rel2.to: "padding_after_right_btn";
- rel2.relative: 0 1;
- }
+ rel1 { relative: 0.0 0.0; to: "padding_after_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_after_right_btn"; }
+ }
}
- part { name: "elm.swallow.more_btn";
+ part { name: "title_more_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
- fixed: 1 1;
- align: 1.0 0.5;
- rel1.to: "padding_before_right_btn";
- rel1.relative: 0 0;
- rel2.to: "padding_before_right_btn";
- rel2.relative: 0 1;
+ fixed: 1 0;
+ align: 1 0.5;
+ rel1 { relative: 0.0 0.0; to: "padding_before_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_right_btn"; }
}
}
part { name: "optionheader_arrow";
min: NAVIFRAME_OH_ARROW_SIZE_INC;
max: NAVIFRAME_OH_ARROW_SIZE_INC;
fixed: 1 1;
- align: 0.5 0;
- rel1.to: "elm.swallow.more_btn";
- rel1.relative: 0 1;
- rel2.to: "elm.swallow.more_btn";
- rel2.relative: 1 1;
- image {
- normal: "naviframe_optionheader_arrow.png";
- }
- color: 255 255 255 0 ;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.025; to: "title_more_btn"; }
+ rel2 { relative: 1.0 1.025; to: "title_more_btn"; }
+ image.normal: "naviframe_optionheader_arrow.png";
+ color: 255 255 255 0;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
- color: 255 255 255 255;
+ color: 255 255 255 255;
}
}
- part { name: "controlbar_clip";
+ part { name: "controlbar_bg";
type: RECT;
scale: 1;
description { state: "default" 0.0;
min: 0 0;
max: 999999 0;
fixed: 0 1;
- align: 0.5 1;
+ align: 0.0 1.0;
visible: 0;
- rel1.to_x: "elm.swallow.content";
- rel2.to_x: "elm.swallow.content";
+ color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
visible: 1;
}
- }
- part { name: "controlbar_bg";
- type: RECT;
- description { state: "default" 0.0;
- rel1 { to: "controlbar_clip"; }
- rel2 { to: "controlbar_clip"; }
- color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
- }
- }
- part { name: "elm.swallow.prev_btn";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "controlbar_bg";
- rel1.relative: 0 0;
- rel2.to: "controlbar_bg";
- rel2.relative: 0 1;
- }
}
- part { name: "elm.swallow.controlbar";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
+ part { name: "controlbar_clip";
+ type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1.to: "elm.swallow.prev_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_after_controlbar";
- rel2.relative: 0 1;
+ rel1 { to: "controlbar_bg"; }
+ rel2 { to: "controlbar_bg"; }
}
}
- part { name: "padding_after_controlbar";
+ part { name: "elm.prev_btn_bg";
type: RECT;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- max: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- align: 1 1;
- rel1.to: "controlbar_bg";
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
rel2.to: "controlbar_bg";
visible: 0;
}
- }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
+ }
+ }
+ part { name: "controlbar";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ rel1.to: "controlbar_bg";
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+ }
+ }
}
programs {
program { name: "cur_pushed";
signal: "elm,state,title,show";
source: "elm";
script {
- set_state(PART:"title_clip", "default", 0.0);
+ set_state(PART:"title_bg", "default", 0.0);
if (get_int(oh_show) == 1) {
if (get_int(oh_close) == 1) {
emit("elm,state,optionheader,instant_close", "");
}
}
else
- set_state(PART:"optionheader_clip", "default", 0.0);
+ set_state(PART:"optionheader_bg", "default", 0.0);
}
}
program { name: "title_hide";
signal: "elm,state,title,hide";
source: "elm";
action: STATE_SET "hide" 0.0;
- target: "title_clip";
- target: "optionheader_clip";
+ target: "title_bg";
+ target: "optionheader_bg";
}
program { name: "prev_btn_show";
signal: "elm,state,prev_btn,show";
source: "elm";
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
}
}
program { name: "prev_btn_hide";
signal: "elm,state,prev_btn,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+ }
+ }
+ program { name: "left_btn_show";
+ signal: "elm,state,title_left_btn,show";
+ source: "elm";
+ script {
+ set_int(left_btn_visible, 1);
+ if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ }
+ }
+ program { name: "left_btn_hide";
+ signal: "elm,state,title_left_btn,hide";
+ source: "elm";
+ script {
+ set_int(left_btn_visible, 0);
+ if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
+ }
+ program { name: "right_btn_show";
+ signal: "elm,state,title_right_btn,show";
+ source: "elm";
+ script {
+ set_int(right_btn_visible, 1);
+ if (get_int(more_btn_visible) == 1) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+ (get_int(large_padded_center_align) == 1)))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
+ program { name: "right_btn_hide";
+ signal: "elm,state,title_right_btn,hide";
+ source: "elm";
+ script {
+ set_int(right_btn_visible, 0);
+ set_state(PART:"padding_before_right_btn", "default", 0.0);
+ if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "more_btn_show";
- signal: "elm,state,elm.swallow.more_btn,show";
+ signal: "elm,state,title_more_btn,show";
source: "elm";
- action: STATE_SET "more_button" 0.0;
- target: "padding_center_text2";
- target: "padding_before_right_btn";
+ script {
+ set_int(more_btn_visible, 1);
+ if (get_int(right_btn_visible) == 1) {
+ set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+ set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+ (get_int(large_padded_center_align) == 1)))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "more_btn_hide";
- signal: "elm,state,elm.swallow.more_btn,hide";
+ signal: "elm,state,title_more_btn,hide";
source: "elm";
- action: STATE_SET "default" 0.0;
- target: "padding_center_text2";
- target: "padding_before_right_btn";
+ script {
+ set_int(more_btn_visible, 0);
+ set_state(PART:"padding_before_right_btn", "default", 0.0);
+ if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+ set_state(PART:"padding_center_text2", "default", 0.0);
+ set_int(large_padded_center_align, 0);
+ }
+ else {
+ set_state(PART:"padding_center_text2", "visible", 0.0);
+ set_int(large_padded_center_align, 1);
+ }
+ if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else if (get_int(large_padded_center_align) == 1)
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else if (get_int(icon_visible) == 1)
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "icon_show";
signal: "elm,state,elm.swallow.icon,show";
source: "elm";
- action: STATE_SET "icon_visible" 0.0;
- target: "padding_center_text1";
+ script {
+ set_int(icon_visible, 1);
+ if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+ set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "icon", 0.0);
+ }
}
program { name: "icon_hide";
signal: "elm,state,elm.swallow.icon,hide";
source: "elm";
- action: STATE_SET "default" 0.0;
- target: "padding_center_text1";
+ script {
+ set_int(icon_visible, 0);
+ if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+ set_state(PART:"padding_center_text1", "visible", 0.0);
+ else
+ set_state(PART:"padding_center_text1", "default", 0.0);
+ }
}
program { name: "controlbar_show";
- signal: "elm,state,elm.swallow.controlbar,show";
+ signal: "elm,state,controlbar,show";
source: "elm";
- action: STATE_SET "show" 0.0;
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
}
}
program { name: "controlbar_hide";
- signal: "elm,state,elm.swallow.controlbar,hide";
+ signal: "elm,state,controlbar,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
}
}
- program { name: "controlbar_clip_show";
- signal: "elm,state,controlbar_clip,show";
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
source: "elm";
script {
- set_state(PART:"controlbar_clip", "show", 0.0);
+ set_state(PART:"controlbar_bg", "show", 0.0);
set_int(cbar_bg, get_int(cbar_bg) + 1);
}
}
- program { name: "controlbar_clip_hide";
- signal: "elm,state,controlbar_clip,hide";
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
source: "elm";
script {
set_int(cbar_bg, get_int(cbar_bg) - 1);
if (get_int(cbar_bg) <= 0)
- set_state(PART:"controlbar_clip", "default", 0.0);
+ set_state(PART:"controlbar_bg", "default", 0.0);
}
}
program { name: "optionheader_show";
- signal: "elm,state,elm.swallow.optionheader,show";
+ signal: "elm,state,optionheader,show";
source: "elm";
script {
- set_state(PART:"optionheader_clip", "show", 0.0);
+ set_state(PART:"optionheader_bg", "show", 0.0);
set_state(PART:"optionheader_arrow", "show", 0.0);
set_int(oh_show, 1);
}
}
program { name: "optionheader_hide";
- signal: "elm,state,elm.swallow.optionheader,hide";
+ signal: "elm,state,optionheader,hide";
source: "elm";
script {
- set_state(PART:"optionheader_clip", "default", 0.0);
+ set_state(PART:"optionheader_bg", "default", 0.0);
set_state(PART:"optionheader_arrow", "default", 0.0);
set_int(oh_show, 0);
}
signal: "elm,state,optionheader,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
transition: LINEAR 0.2;
after: "optionheader_open_set";
signal: "elm,state,optionheader,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
transition: LINEAR 0.2;
after: "optionheader_close_set";
signal: "elm,state,optionheader,instant_open";
source: "";
action: STATE_SET "show" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
after: "optionheader_open_set";
}
signal: "elm,state,optionheader,instant_close";
source: "";
action: STATE_SET "default" 0.0;
- target: "optionheader_clip";
+ target: "optionheader_bg";
target: "optionheader_arrow";
after: "optionheader_close_set";
}
signal: "elm,state,controlbar,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_close";
signal: "elm,state,controlbar,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_instant_open";
source: "";
script {
emit("elm,state,prev_btn,show", "elm");
- emit("elm,state,elm.swallow.controlbar,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
}
}
program { name: "controlbar_instant_close";
source: "";
script {
emit("elm,state,prev_btn,hide", "elm");
- emit("elm,state,elm.swallow.controlbar,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
}
}
program { name: "show_finished";
}
}
}
- group { name: "elm/naviframe/item/video/segment/instant/default";
+ group { name: "elm/naviframe/item/segment/instant/default";
script {
public cbar_bg = 0; //Controlbar BG Show call count
}
parts {
- part { name: "title_clip";
+ part { name: "title_bg";
type: RECT;
- mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
min: 1 NAVIFRAME_SEGMENT_TITLE_H_INC;
fixed: 0 1;
rel1 { relative: 0.0 0.0; }
rel2 { relative: 1.0 0.0; }
+ color: NAVIFRAME_TITLE_BG_COLOR_INC;
}
description { state: "hide" 0.0;
inherit: "default" 0.0;
fixed: 1 1;
}
}
- part { name: "content_clip";
+ part { name: "title_clip";
type: RECT;
mouse_events: 0;
description { state: "default" 0.0;
- rel1.to_y: "title_clip";
- rel1.relative: 0 1;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
}
}
part { name: "elm.swallow.content";
description { state: "default" 0.0;
align: 0.0 0.0;
rel1.relative: 0.0 1.0;
- rel1.to_y: "title_clip";
+ rel1.to_y: "title_bg";
rel2.relative: 1.0 0.0;
- rel2.to_y: "controlbar_clip";
+ rel2.to_y: "controlbar_bg";
}
- }
- part { name: "title_base";
+ }
+ part { name: "content_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "title_clip"; }
- rel2 { to: "title_clip"; }
- color: NAVIFRAME_TITLE_BG_COLOR_INC;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
}
}
part { name: "padding_before_left_btn";
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.5;
- rel1 { relative: 0.0 0.0; to: "title_base"; }
- rel2 { relative: 0.0 1.0; to: "title_base"; }
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
visible: 0;
}
}
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 0.0 0.5;
- rel1 { relative: 1.0 0.0; to: "elm.swallow.left_btn"; }
- rel2 { relative: 1.0 1.0; to: "elm.swallow.left_btn"; }
+ rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
visible: 0;
}
}
min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 1.0 0.0; to: "title_base"; }
- rel2 { relative: 1.0 1.0; to: "title_base"; }
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
visible: 0;
}
}
min: 0 0;
fixed: 1 0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to: "elm.swallow.right_btn"; }
- rel2 { relative: 0.0 1.0; to: "elm.swallow.right_btn"; }
+ rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
visible: 0;
}
description { state: "show" 0.0;
clip_to: "title_clip";
description { state: "default" 0.0;
align: 1.0 0.5;
- rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_base"; }
- rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_base"; }
+ rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
fixed: 1 0;
min: NAVIFRAME_ICON_PADDING_INC;
visible: 0;
clip_to: "title_clip";
description { state: "default" 0.0;
text { font: "SLP:style=Medium";
+ text_class: "slp_medium";
size: NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC;
min: 0 0;
max: 1 0;
}
min: 0 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
max: 999999 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
- fixed: 0 1;
+ fixed: 1 1;
color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
align: 0.5 0;
rel1.to: "padding_before_left_btn";
}
part { name: "click_event_area";
ignore_flags: ON_HOLD;
+ repeat_events: 1;
description { state: "default" 0.0;
- rel1 { to: "title_base"; }
- rel2 { to: "title_base"; }
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
}
}
- part { name: "elm.swallow.left_btn";
+ part { name: "title_left_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: 0 0;
- fixed: 1 0;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ fixed: 1 1;
align: 0 0;
rel1.relative: 1.0 1.0;
rel1.to_x: "padding_before_left_btn";
rel2.to_x: "padding_before_left_btn";
rel2.to_y: "elm.text.title";
}
- description { state: "show" 0.0;
- inherit: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
- max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
- fixed: 1 1;
- }
}
- part { name: "elm.swallow.right_btn";
+ part { name: "title_right_btn";
type: SWALLOW;
scale: 1;
clip_to: "title_clip";
description { state: "default" 0.0;
- min: 0 0;
- align: 1 0;
- fixed: 1 0;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ align: 1 0.0;
+ fixed: 1 1;
rel1.relative: 0.0 1.0;
rel1.to_x: "padding_after_right_btn";
rel1.to_y: "elm.text.title";
rel2.to_x: "padding_after_right_btn";
rel2.to_y: "elm.text.title";
}
- description { state: "show" 0.0;
- inherit: "default" 0.0;
- min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
- max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
- fixed: 1 1;
- }
}
- part { name: "elm.swallow.segment2";
+ part { name: "segment2";
type: "SWALLOW";
scale: 1;
clip_to: "title_clip";
rel2.relative: 0.72 1;
}
}
- part { name: "elm.swallow.segment3";
+ part { name: "segment3";
type: "SWALLOW";
scale: 1;
clip_to: "title_clip";
rel2.relative: 0.8 1;
}
}
- part { name: "controlbar_clip";
+ part { name: "controlbar_bg";
type: RECT;
scale: 1;
description { state: "default" 0.0;
min: 0 0;
max: 999999 0;
fixed: 0 1;
- align: 0.5 1;
+ align: 0.0 1.0;
visible: 0;
- rel1.to_x: "elm.swallow.content";
- rel2.to_x: "elm.swallow.content";
+ color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
- part { name: "controlbar_bg";
+ part { name: "controlbar_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "controlbar_clip"; }
- rel2 { to: "controlbar_clip"; }
- color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
- }
- }
- part { name: "elm.swallow.prev_btn";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "controlbar_bg";
- rel1.relative: 0 0;
- rel2.to: "controlbar_bg";
- rel2.relative: 0 1;
- }
- }
- part { name: "elm.swallow.controlbar";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- rel1.to: "elm.swallow.prev_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_after_controlbar";
- rel2.relative: 0 1;
+ rel1 { to: "controlbar_bg"; }
+ rel2 { to: "controlbar_bg"; }
}
}
- part { name: "padding_after_controlbar";
+ part { name: "elm.prev_btn_bg";
type: RECT;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- max: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- align: 1 1;
- rel1.to: "controlbar_bg";
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
rel2.to: "controlbar_bg";
visible: 0;
}
- }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
+ }
+ }
+ part { name: "controlbar";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ rel1.to: "controlbar_bg";
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+ }
+ }
}
programs {
program { name: "cur_pushed";
signal: "elm,state,prev_btn,show";
source: "elm";
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
}
}
program { name: "prev_btn_hide";
signal: "elm,state,prev_btn,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
}
}
- program { name: "left_btn_show";
- signal: "elm,state,elm.swallow.left_btn,show";
- source: "elm";
- action: STATE_SET "show" 0.0;
- target: "elm.swallow.left_btn";
- }
- program { name: "left_btn_hide";
- signal: "elm,state,elm.swallow.left_btn,hide";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.swallow.left_btn";
- }
- program { name: "right_btn_show";
- signal: "elm,state,elm.swallow.right_btn,show";
- source: "elm";
- action: STATE_SET "show" 0.0;
- target: "elm.swallow.right_btn";
- }
- program { name: "right_btn_hide";
- signal: "elm,state,elm.swallow.right_btn,hide";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.swallow.right_btn";
- }
program { name: "controlbar_show";
- signal: "elm,state,elm.swallow.controlbar,show";
+ signal: "elm,state,controlbar,show";
source: "elm";
action: STATE_SET "show" 0.0;
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
}
}
program { name: "controlbar_hide";
- signal: "elm,state,elm.swallow.controlbar,hide";
+ signal: "elm,state,controlbar,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
}
}
- program { name: "controlbar_clip_show";
- signal: "elm,state,controlbar_clip,show";
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
source: "elm";
script {
- set_state(PART:"controlbar_clip", "show", 0.0);
+ set_state(PART:"controlbar_bg", "show", 0.0);
set_int(cbar_bg, get_int(cbar_bg) + 1);
}
}
- program { name: "controlbar_clip_hide";
- signal: "elm,state,controlbar_clip,hide";
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
source: "elm";
script {
set_int(cbar_bg, get_int(cbar_bg) - 1);
if (get_int(cbar_bg) <= 0)
- set_state(PART:"controlbar_clip", "default", 0.0);
+ set_state(PART:"controlbar_bg", "default", 0.0);
}
}
program { name: "controlbar_open";
signal: "elm,state,controlbar,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_close";
signal: "elm,state,controlbar,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_instant_open";
source: "";
script {
emit("elm,state,prev_btn,show", "elm");
- emit("elm,state,elm.swallow.controlbar,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
}
}
program { name: "controlbar_instant_close";
source: "";
script {
emit("elm,state,prev_btn,hide", "elm");
- emit("elm,state,elm.swallow.controlbar,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
}
}
program { name: "show_finished";
type: SWALLOW;
scale: 1;
repeat_events: 0;
+ clip_to: "content_clip";
description { state: "default" 0.0;
align: 0.0 0.0;
+ rel1.relative: 0.0 0.0;
rel2.relative: 1.0 0.0;
- rel2.to_y: "controlbar_clip";
+ rel2.to_y: "controlbar_bg";
}
}
- part { name: "controlbar_clip";
+ part { name: "content_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
+ }
+ }
+ part { name: "controlbar_bg";
type: RECT;
scale: 1;
description { state: "default" 0.0;
min: 0 0;
max: 999999 0;
fixed: 0 1;
- align: 0.5 1;
+ align: 0.0 1.0;
visible: 0;
- rel1.to_x: "elm.swallow.content";
- rel2.to_x: "elm.swallow.content";
+ color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
}
description { state: "show" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
- part { name: "controlbar_bg";
+ part { name: "controlbar_clip";
type: RECT;
+ mouse_events: 0;
description { state: "default" 0.0;
- rel1 { to: "controlbar_clip"; }
- rel2 { to: "controlbar_clip"; }
- color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
- }
- }
- part { name: "elm.swallow.prev_btn";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- fixed: 1 1;
- align: 0.0 0.5;
- rel1.to: "controlbar_bg";
- rel1.relative: 0 0;
- rel2.to: "controlbar_bg";
- rel2.relative: 0 1;
- }
- }
- part { name: "elm.swallow.controlbar";
- type: SWALLOW;
- scale: 1;
- clip_to: "controlbar_clip";
- description { state: "default" 0.0;
- rel1.to: "elm.swallow.prev_btn";
- rel1.relative: 1 0;
- rel2.to: "padding_after_controlbar";
- rel2.relative: 0 1;
+ rel1 { to: "controlbar_bg"; }
+ rel2 { to: "controlbar_bg"; }
}
}
- part { name: "padding_after_controlbar";
+ part { name: "elm.prev_btn_bg";
type: RECT;
scale: 1;
clip_to: "controlbar_clip";
description { state: "default" 0.0;
- min: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- max: NAVIFRAME_CONTROLBAR_PADDING_INC CONTROLBAR_SMALL_HEIGHT_INC;
- align: 1 1;
- rel1.to: "controlbar_bg";
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
rel2.to: "controlbar_bg";
visible: 0;
}
- }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
+ }
+ }
+ part { name: "controlbar";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ rel1.to: "controlbar_bg";
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+ }
+ }
}
programs {
program { name: "cur_pushed";
signal: "elm,state,prev_btn,show";
source: "elm";
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
}
}
program { name: "prev_btn_hide";
signal: "elm,state,prev_btn,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
}
}
program { name: "controlbar_show";
- signal: "elm,state,elm.swallow.controlbar,show";
+ signal: "elm,state,controlbar,show";
source: "elm";
action: STATE_SET "show" 0.0;
script {
- emit("elm,state,controlbar_clip,show", "elm");
+ emit("elm,state,controlbar_bg,show", "elm");
}
}
program { name: "controlbar_hide";
- signal: "elm,state,elm.swallow.controlbar,hide";
+ signal: "elm,state,controlbar,hide";
source: "elm";
script {
- emit("elm,state,controlbar_clip,hide", "elm");
+ emit("elm,state,controlbar_bg,hide", "elm");
}
}
- program { name: "controlbar_clip_show";
- signal: "elm,state,controlbar_clip,show";
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
source: "elm";
script {
- set_state(PART:"controlbar_clip", "show", 0.0);
+ set_state(PART:"controlbar_bg", "show", 0.0);
set_int(cbar_bg, get_int(cbar_bg) + 1);
}
}
- program { name: "controlbar_clip_hide";
- signal: "elm,state,controlbar_clip,hide";
+ program { name: "controlbar_bgp_hide";
+ signal: "elm,state,controlbar_bg,hide";
source: "elm";
script {
set_int(cbar_bg, get_int(cbar_bg) - 1);
if (get_int(cbar_bg) <= 0)
- set_state(PART:"controlbar_clip", "default", 0.0);
+ set_state(PART:"controlbar_bg", "default", 0.0);
}
}
program { name: "controlbar_open";
signal: "elm,state,controlbar,open";
source: "";
action: STATE_SET "show" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_close";
signal: "elm,state,controlbar,close";
source: "";
action: STATE_SET "default" 0.0;
- target: "controlbar_clip";
+ target: "controlbar_bg";
transition: LINEAR 0.2;
}
program { name: "controlbar_instant_open";
source: "";
script {
emit("elm,state,prev_btn,show", "elm");
- emit("elm,state,elm.swallow.controlbar,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
}
}
program { name: "controlbar_instant_close";
source: "";
script {
emit("elm,state,prev_btn,hide", "elm");
- emit("elm,state,elm.swallow.controlbar,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
}
}
program { name: "show_finished";
--- /dev/null
+#define NAVIFRAME_TITLE_H_INC 108
+#define NAVIFRAME_SEGMENT_TITLE_H_INC 126
+#define NAVIFRAME_OH_OPENED_H_INC 114
+#define NAVIFRAME_OH_CONTENT_H_INC 72
+#define NAVIFRAME_OH_PADDING_INC 16
+#define NAVIFRAME_OH_SHADOW_INC 10
+#define NAVIFRAME_OH_ARROW_SIZE_INC 28 24
+#define NAVIFRAME_OH_OPENED_DOUBLE_H_INC 202
+#define NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC 120 72
+#define NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 144
+#define NAVIFRAME_TITLE_SEGMENT_H_INC 62
+#define NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC 38
+#define NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC 54
+#define NAVIFRAME_TITLE_FONT_SIZE_INC 52
+#define NAVIFRAME_ICON_SIZE_INC 32 32
+#define NAVIFRAME_PADDING_INC 16 0
+#define NAVIFRAME_ICON_PADDING_INC 64 0
+#define NAVIFRAME_TITLE_TEXT_COLOR_INC 249 249 249 255
+#define NAVIFRAME_SUBTITLE_TEXT_COLOR_INC 249 249 249 255
+#define NAVIFRAME_OH_BORDER_INC 1 1 5 1
+#define NAVIFRAME_TITLE_BG_COLOR_INC 0 0 0 200
+
+#define NAVIFRAME_VIEW_TRANS_TIME 0.3
+
+#define CONTROLBAR_LARGE_HEIGHT_INC 122
+#define CONTROLBAR_SMALL_HEIGHT_INC 114
+#define CONTROLBAR_WIDTH_INC 122
+
+
+group {
+ name:"elm/naviframe/base/video/default";
+ parts {
+ part {
+ name: "base";
+ description {
+ state: "default" 0.0;
+ }
+ }
+ }
+}
+
+group {
+ name:"elm/naviframe/item/video/basic/default";
+ alias:"elm/naviframe/item/video/1line/default";
+ images {
+ image: "white/common/00_winset_control_top_bg.png" COMP;
+ image: "white/common/00_winset_control_top_arrow.png" COMP;
+ image: "white/common/00_winset_title_line.png" COMP;
+ image: "white/common/00_winset_control_toolbar_bg.png" COMP;
+ }
+ script {
+ public oh_show = 0; //optionheader show/hide
+ public oh_close = 0; //optionheader close/open
+ public cbar_bg = 0; //Controlbar BG Show call count
+ }
+ parts {
+ part {
+ name: "base";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ }
+ description {
+ state: "left" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description {
+ state: "right" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ }
+ part {
+ name: "title_bg";
+ scale: 1;
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ min: 1 NAVIFRAME_TITLE_H_INC;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ visible: 1;
+ rel1 { relative: 0.0 0.0; to: "base"; }
+ rel2 { relative: 1.0 0.0; to: "base"; }
+ color: NAVIFRAME_TITLE_BG_COLOR_INC;
+ }
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ min: 0 0;
+ max: 0 0;
+ fixed: 1 1;
+ }
+ }
+ part {
+ name: "title_clip";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part {
+ name: "optionheader_bg";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 1 0;
+ align: 0.5 0;
+ fixed: 0 1;
+ rel1.to: "title_bg";
+ rel1.relative: 0 1;
+ rel2.to: "title_bg";
+ visible: 0;
+ image {
+ normal: "white/common/00_winset_control_top_bg.png";
+ border: NAVIFRAME_OH_BORDER_INC;
+ }
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ min: 1 NAVIFRAME_OH_OPENED_H_INC;
+ visible: 1;
+ }
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ min: 0 0;
+ max: 0 0;
+ fixed: 1 1;
+ }
+ }
+ part {
+ name: "optionheader_clip";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1 { to: "optionheader_bg"; }
+ rel2 { to: "optionheader_bg"; }
+ }
+ }
+ part {
+ name: "optionheader_top_padding";
+ type: RECT;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description {
+ state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+ rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "optionheader";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description {
+ state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ }
+ }
+ part {
+ name: "optionheader_bottom_padding";
+ type: RECT;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description {
+ state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "optionheader_shadow";
+ type: RECT;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description {
+ state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_SHADOW_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader_bottom_padding"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader_bottom_padding"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ repeat_events: 0;
+ clip_to: "content_clip";
+ description {
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 1.0;
+ rel1.to_x: "base";
+ rel1.to_y: "optionheader_bg";
+ rel2.relative: 1.0 0.0;
+ rel2.to_x: "base";
+ rel2.to_y: "controlbar_bg";
+ }
+ }
+ part {
+ name: "content_clip";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
+ }
+ }
+ part {
+ name: "padding_center_text1";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "title_clip";
+ description {
+ state: "default" 0.0;
+ min: NAVIFRAME_PADDING_INC;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
+ visible: 0;
+ }
+ description {
+ state: "icon" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_ICON_PADDING_INC;
+ }
+ }
+ part {
+ name: "padding_center_text2";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "title_clip";
+ description {
+ state: "default" 0.0;
+ min: NAVIFRAME_PADDING_INC;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to_x: "title_more_btn"; to_y: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to_x: "title_more_btn"; to_y: "title_bg"; }
+ visible: 0;
+ }
+ }
+ part {
+ name: "elm.text.title";
+ type: TEXT;
+ scale: 1;
+ clip_to: "title_clip";
+ description {
+ state: "default" 0.0;
+ text {
+ font: "SLP:style=Medium";
+ size: NAVIFRAME_TITLE_FONT_SIZE_INC;
+ min: 0 0;
+ max: 1 0;
+ align: 0.5 0.5;
+ text_class: "slp_medium";
+ }
+ color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+ align: 0.0 0.5;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+ rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+ }
+ }
+ part {
+ name: "padding_before_text";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "title_clip";
+ description {
+ state: "default" 0.0;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "elm.text.title"; }
+ rel2 { relative: 0.0 1.0; to: "elm.text.title"; }
+ fixed: 1 0;
+ min: NAVIFRAME_PADDING_INC;
+ visible: 0;
+ }
+ }
+ part {
+ name: "elm.swallow.icon";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clip";
+ description {
+ state: "default" 0.0;
+ max: NAVIFRAME_ICON_SIZE_INC;
+ fixed: 1 1;
+ rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ align: 1.0 0.5;
+ }
+ }
+ part {
+ name: "click_event_area";
+ ignore_flags: ON_HOLD;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part {
+ name: "title_left_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clip";
+ description {
+ state: "default" 0.0;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ fixed: 1 1;
+ align: 1 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+ }
+ }
+ part {
+ name: "left_btn_separator";
+ type: IMAGE;
+ scale: 1;
+ clip_to: "title_clip";
+ description {
+ state: "default" 0.0;
+ min: 2 48;
+ max: 2 48;
+ fixed: 1 1;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
+ image.normal: "white/common/00_winset_title_line.png";
+ visible: 0;
+ }
+ description {
+ state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part {
+ name: "title_right_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clip";
+ description {
+ state: "default" 0.0;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ align: 1 0.5;
+ fixed: 1 1;
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
+ }
+ }
+ part {
+ name: "right_btn_separator";
+ type: IMAGE;
+ scale: 1;
+ clip_to: "title_clip";
+ description {
+ state: "default" 0.0;
+ min: 2 48;
+ max: 2 48;
+ fixed: 1 1;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+ image.normal: "white/common/00_winset_title_line.png";
+ visible: 0;
+ }
+ description {
+ state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "title_more_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clip";
+ description {
+ state: "default" 0.0;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ fixed: 1 1;
+ align: 1 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
+ }
+ }
+ part {
+ name: "optionheader_arrow";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: NAVIFRAME_OH_ARROW_SIZE_INC;
+ max: NAVIFRAME_OH_ARROW_SIZE_INC;
+ fixed: 1 1;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.1; to: "title_more_btn"; }
+ rel2 { relative: 1.0 1.2; to: "title_more_btn"; }
+ image.normal: "white/common/00_winset_control_top_arrow.png";
+ color: 255 255 255 0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ }
+ part {
+ name: "controlbar_bg";
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 0;
+ max: 999999 0;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ visible: 0;
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ image.normal: "white/common/00_winset_control_toolbar_bg.png";
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+ max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+ visible: 1;
+ }
+ }
+ part {
+ name: "controlbar_clip";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1.to: "controlbar_bg";
+ rel2.to: "controlbar_bg";
+ }
+ }
+ part {
+ name: "elm.prev_btn_bg";
+ type: RECT;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description {
+ state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+ rel2.to: "controlbar_bg";
+ visible: 0;
+ }
+ description {
+ state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part {
+ name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
+ }
+ }
+ part {
+ name: "controlbar";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "controlbar_bg";
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+ }
+ }
+ }
+ programs {
+ program {
+ name: "content_new_pushed";
+ signal: "elm,state,new,pushed,internal";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "show_finished";
+ }
+ program {
+ name: "content_cur_pushed";
+ signal: "elm,state,cur,pushed,internal";
+ source: "";
+ action: STATE_SET "left" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "pushed_finished";
+ }
+ program {
+ name: "content_prev_popped";
+ signal: "elm,state,prev,popped,internal";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "show_finished";
+ }
+ program {
+ name: "content_cur_popped";
+ signal: "elm,state,cur,popped,internal";
+ source: "";
+ action: STATE_SET "right" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "popped_finished";
+ }
+ program {
+ name: "cur_pushed";
+ signal: "elm,state,cur,pushed";
+ source: "elm";
+ script {
+ set_state(PART:"base", "default", 0.0);
+ emit("elm,state,cur,pushed,internal", "");
+ }
+ }
+ program {
+ name: "new_pushed";
+ signal: "elm,state,new,pushed";
+ source: "elm";
+ script {
+ set_state(PART:"base", "right", 0.0);
+ emit("elm,state,new,pushed,internal", "");
+ }
+ }
+ program {
+ name: "prev_popped";
+ signal: "elm,state,prev,popped";
+ source: "elm";
+ script {
+ set_state(PART:"base", "left", 0.0);
+ emit("elm,state,prev,popped,internal", "");
+ }
+ }
+ program {
+ name: "cur_popped";
+ signal: "elm,state,cur,popped";
+ source: "elm";
+ script {
+ set_state(PART:"base", "default", 0.0);
+ emit("elm,state,cur,popped,internal", "");
+ }
+ }
+ program {
+ name: "visible";
+ signal: "elm,state,visible";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ }
+ program {
+ name: "title_show";
+ signal: "elm,state,title,show";
+ source: "elm";
+ script {
+ set_state(PART:"title_bg", "default", 0.0);
+ if (get_int(oh_show) == 1) {
+ if (get_int(oh_close) == 1) {
+ emit("elm,state,optionheader,instant_close", "");
+ }else {
+ emit("elm,state,optionheader,instant_open", "");
+ }
+ }
+ else
+ set_state(PART:"optionheader_bg", "default", 0.0);
+ }
+ }
+ program {
+ name: "title_hide";
+ signal: "elm,state,title,hide";
+ source: "elm";
+ action: STATE_SET "hide" 0.0;
+ target: "title_bg";
+ target: "optionheader_bg";
+ }
+ program {
+ name: "prev_btn_show";
+ signal: "elm,state,prev_btn,show";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+ }
+ }
+ program {
+ name: "prev_btn_hide";
+ signal: "elm,state,prev_btn,hide";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+ }
+ }
+ program {
+ name: "icon_show";
+ signal: "elm,state,icon,show";
+ source: "elm";
+ action: STATE_SET "icon" 0.0;
+ target: "padding_center_text1";
+ }
+ program {
+ name: "icon_hide";
+ signal: "elm,state,icon,hide";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "padding_center_text1";
+ }
+ program {
+ name: "left_btn_show";
+ signal: "elm,state,title_left_btn,show";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "left_btn_separator";
+ }
+ program {
+ name: "left_btn_hide";
+ signal: "elm,state,title_left_btn,hide";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "left_btn_separator";
+ }
+ program {
+ name: "right_btn_show";
+ signal: "elm,state,title_right_btn,show";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "right_btn_separator";
+ }
+ program {
+ name: "right_btn_hide";
+ signal: "elm,state,title_right_btn,hide";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "right_btn_separator";
+ }
+ program {
+ name: "controlbar_show";
+ signal: "elm,state,controlbar,show";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,show", "elm");
+ }
+ }
+ program {
+ name: "controlbar_hide";
+ signal: "elm,state,controlbar,hide";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,hide", "elm");
+ }
+ }
+ program {
+ name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
+ source: "elm";
+ script {
+ set_state(PART:"controlbar_bg", "show", 0.0);
+ set_int(cbar_bg, get_int(cbar_bg) + 1);
+ }
+ }
+ program {
+ name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
+ source: "elm";
+ script {
+ set_int(cbar_bg, get_int(cbar_bg) - 1);
+ if (get_int(cbar_bg) <= 0)
+ set_state(PART:"controlbar_bg", "default", 0.0);
+ }
+ }
+ program {
+ name: "optionheader_show";
+ signal: "elm,state,optionheader,show";
+ source: "elm";
+ script {
+ set_state(PART:"optionheader_bg", "show", 0.0);
+ set_state(PART:"optionheader_arrow", "show", 0.0);
+ set_int(oh_show, 1);
+ }
+ }
+ program {
+ name: "optionheader_hide";
+ signal: "elm,state,optionheader,hide";
+ source: "elm";
+ script {
+ set_state(PART:"optionheader_bg", "default", 0.0);
+ set_state(PART:"optionheader_arrow", "default", 0.0);
+ set_int(oh_show, 0);
+ }
+ }
+ program {
+ name: "optionheader_open";
+ signal: "elm,state,optionheader,open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "optionheader_bg";
+ target: "optionheader_arrow";
+ transition: LINEAR 0.2;
+ after: "optionheader_open_set";
+ }
+ program {
+ name: "optionheader_close";
+ signal: "elm,state,optionheader,close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "optionheader_bg";
+ target: "optionheader_arrow";
+ transition: LINEAR 0.2;
+ after: "optionheader_close_set";
+ }
+ program {
+ name: "optionheader_instant_open";
+ signal: "elm,state,optionheader,instant_open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "optionheader_bg";
+ target: "optionheader_arrow";
+ after: "optionheader_open_set";
+ }
+ program {
+ name: "optionheader_instant_close";
+ signal: "elm,state,optionheader,instant_close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "optionheader_bg";
+ target: "optionheader_arrow";
+ after: "optionheader_close_set";
+ }
+ program {
+ name: "optionheader_close_set";
+ signal: "elm,state,optionheader,close_set";
+ source: "";
+ script {
+ set_int(oh_close, 1);
+ }
+ }
+ program {
+ name: "optionheader_open_set";
+ signal: "elm,state,optionheader,open_set";
+ source: "";
+ script {
+ set_int(oh_close, 0);
+ }
+ }
+ program {
+ name: "controlbar_open";
+ signal: "elm,state,controlbar,open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "controlbar_bg";
+ transition: LINEAR 0.2;
+ }
+ program {
+ name: "controlbar_close";
+ signal: "elm,state,controlbar,close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "controlbar_bg";
+ transition: LINEAR 0.2;
+ }
+ program {
+ name: "controlbar_instant_open";
+ signal: "elm,state,controlbar,instant_open";
+ source: "";
+ script {
+ emit("elm,state,prev_btn,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
+ }
+ }
+ program {
+ name: "controlbar_instant_close";
+ signal: "elm,state,controlbar,instant_close";
+ source: "";
+ script {
+ emit("elm,state,prev_btn,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
+ }
+ }
+ program {
+ name: "show_finished";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+ program {
+ name: "pushed_finished";
+ action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+ }
+ program {
+ name: "popped_finished";
+ action: SIGNAL_EMIT "elm,action,popped,finished" "";
+ }
+ program {
+ name: "title_clicked";
+ signal: "mouse,clicked,1";
+ source: "click_event_area";
+ action: SIGNAL_EMIT "elm,action,title,clicked" "";
+ }
+ } /* programs */
+} /* group */
+
+
+
+ group { name:"elm/naviframe/item/video/basic2/default";
+ alias:"elm/naviframe/item/video/2line/default";
+ images {
+ image: "white/common/00_winset_control_top_bg.png" COMP;
+ image: "white/common/00_winset_control_top_arrow.png" COMP;
+ image: "white/common/00_winset_title_line.png" COMP;
+ image: "white/common/00_winset_control_toolbar_bg.png" COMP;
+ }
+ script {
+ public oh_show = 0; //optionheader show/hide
+ public oh_close = 0; //optionheader close/open
+ public cbar_bg = 0; //Controlbar BG Show call count
+ }
+ parts {
+ part { name: "base";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "left" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "right" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ }
+ part { name: "title_bg";
+ scale: 1;
+ type: RECT;
+ description { state: "default" 0.0;
+ min: 1 NAVIFRAME_TITLE_H_INC;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "base"; }
+ rel2 { relative: 1.0 0.0; to: "base"; }
+ color: NAVIFRAME_TITLE_BG_COLOR_INC;
+ }
+ description { state: "hide" 0.0;
+ inherit: "default" 0.0;
+ min: 0 0;
+ max: 0 0;
+ fixed: 1 1;
+ }
+ }
+ part { name: "title_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part { name: "optionheader_bg";
+ type: IMAGE;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 1 0;
+ align: 0.5 0;
+ fixed: 0 1;
+ rel1.to: "title_bg";
+ rel1.relative: 0 1;
+ rel2.to: "title_bg";
+ visible: 0;
+ image { normal: "white/common/00_winset_control_top_bg.png";
+ border: NAVIFRAME_OH_BORDER_INC;
+ }
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ min: 1 NAVIFRAME_OH_OPENED_DOUBLE_H_INC;
+ visible: 1;
+ }
+ description { state: "hide" 0.0;
+ inherit: "default" 0.0;
+ min: 0 0;
+ max: 0 0;
+ fixed: 1 1;
+ }
+ }
+ part { name: "optionheader_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "optionheader_bg"; }
+ rel2 { to: "optionheader_bg"; }
+ }
+ }
+ part { name: "optionheader_top_padding";
+ type: RECT;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+ rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "optionheader";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ }
+ }
+ part { name: "optionheader_mid_padding";
+ type: RECT;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "optionheader2";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader_mid_padding";}
+ rel2 { relative: 1.0 1.0; to: "optionheader_mid_padding";}
+ fixed: 0 1;
+ align: 0.0 0.0;
+ }
+ }
+ part { name: "optionheader_bottom_padding";
+ type: RECT;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader2"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader2"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "optionheader_shadow";
+ type: RECT;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_SHADOW_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader_bottom_padding"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader_bottom_padding"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ repeat_events: 0;
+ clip_to: "content_clip";
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 1.0;
+ rel1.to_x: "base";
+ rel1.to_y: "optionheader_bg";
+ rel2.relative: 1.0 0.0;
+ rel2.to_x: "base";
+ rel2.to_y: "controlbar_bg";
+ }
+ }
+ part { name: "content_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
+ }
+ }
+ part { name: "padding_center_text1";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: NAVIFRAME_PADDING_INC;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ rel1 { relative: 0.0 0.0; to: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to: "title_bg"; }
+ visible: 0;
+ }
+ description { state: "icon" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_ICON_PADDING_INC;
+ }
+ }
+ part { name: "padding_center_text2";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: NAVIFRAME_PADDING_INC;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to_x: "title_more_btn"; to_y: "title_bg"; }
+ rel2 { relative: 0.0 1.0; to_x: "title_more_btn"; to_y: "title_bg"; }
+ visible: 0;
+ }
+ }
+ part { name: "elm.text.title";
+ type: TEXT;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ text { font: "SLP:style=Medium";
+ size: NAVIFRAME_TITLE_FONT_SIZE_INC;
+ min: 0 0;
+ max: 1 0;
+ align: 0.5 0.5;
+ text_class: "slp_medium";
+ }
+ color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+ align: 0.0 0.5;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+ rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+ }
+ }
+ part { name: "padding_before_text";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "elm.text.title"; }
+ rel2 { relative: 0.0 1.0; to: "elm.text.title"; }
+ fixed: 1 0;
+ min: NAVIFRAME_PADDING_INC;
+ visible: 0;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ max: NAVIFRAME_ICON_SIZE_INC;
+ fixed: 1 1;
+ rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
+ rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ align: 1.0 0.5;
+ }
+ }
+ part { name: "click_event_area";
+ ignore_flags: ON_HOLD;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part { name: "title_left_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ fixed: 1 1;
+ align: 1 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+ }
+ }
+ part { name: "left_btn_separator";
+ type: IMAGE;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: 2 48;
+ max: 2 48;
+ fixed: 1 1;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
+ image.normal: "white/common/00_winset_title_line.png";
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "title_right_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ align: 1 0.5;
+ fixed: 1 1;
+ rel1 { relative: 1.0 0.0; to: "title_bg"; }
+ rel2 { relative: 1.0 1.0; to: "title_bg"; }
+ }
+ }
+ part { name: "right_btn_separator";
+ type: IMAGE;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: 2 48;
+ max: 2 48;
+ fixed: 1 1;
+ align: 1.0 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+ image.normal: "white/common/00_winset_title_line.png";
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "title_more_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ fixed: 1 1;
+ align: 1 0.5;
+ rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
+ rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
+ }
+ }
+ part { name: "optionheader_arrow";
+ type: IMAGE;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: NAVIFRAME_OH_ARROW_SIZE_INC;
+ max: NAVIFRAME_OH_ARROW_SIZE_INC;
+ fixed: 1 1;
+ align: 0.5 0.0;
+ rel1 { relative: 0.0 1.1; to: "title_more_btn"; }
+ rel2 { relative: 1.0 1.2; to: "title_more_btn"; }
+ image.normal: "white/common/00_winset_control_top_arrow.png";
+ color: 255 255 255 0;
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ }
+ part { name: "controlbar_bg";
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 0;
+ max: 999999 0;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ visible: 0;
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ image.normal: "white/common/00_winset_control_toolbar_bg.png";
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+ max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+ visible: 1;
+ }
+ }
+ part { name: "controlbar_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "controlbar_bg";
+ rel2.to: "controlbar_bg";
+ }
+ }
+ part { name: "elm.prev_btn_bg";
+ type: RECT;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+ rel2.to: "controlbar_bg";
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
+ }
+ }
+ part { name: "controlbar";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "controlbar_bg";
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+ }
+ }
+ }
+ programs {
+ program { name: "content_new_pushed";
+ signal: "elm,state,new,pushed,internal";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "show_finished";
+ }
+ program { name: "content_cur_pushed";
+ signal: "elm,state,cur,pushed,internal";
+ source: "";
+ action: STATE_SET "left" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "pushed_finished";
+ }
+ program { name: "content_prev_popped";
+ signal: "elm,state,prev,popped,internal";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "show_finished";
+ }
+ program { name: "content_cur_popped";
+ signal: "elm,state,cur,popped,internal";
+ source: "";
+ action: STATE_SET "right" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "popped_finished";
+ }
+ program { name: "cur_pushed";
+ signal: "elm,state,cur,pushed";
+ source: "elm";
+ script {
+ set_state(PART:"base", "default", 0.0);
+ emit("elm,state,cur,pushed,internal", "");
+ }
+ }
+ program { name: "new_pushed";
+ signal: "elm,state,new,pushed";
+ source: "elm";
+ script {
+ set_state(PART:"base", "right", 0.0);
+ emit("elm,state,new,pushed,internal", "");
+ }
+ }
+ program { name: "prev_popped";
+ signal: "elm,state,prev,popped";
+ source: "elm";
+ script {
+ set_state(PART:"base", "left", 0.0);
+ emit("elm,state,prev,popped,internal", "");
+ }
+ }
+ program { name: "cur_popped";
+ signal: "elm,state,cur,popped";
+ source: "elm";
+ script {
+ set_state(PART:"base", "default", 0.0);
+ emit("elm,state,cur,popped,internal", "");
+ }
+ }
+ program { name: "visible";
+ signal: "elm,state,visible";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ }
+ program { name: "title_show";
+ signal: "elm,state,title,show";
+ source: "elm";
+ script {
+ set_state(PART:"title_bg", "default", 0.0);
+ if (get_int(oh_show) == 1) {
+ if (get_int(oh_close) == 1) {
+ emit("elm,state,optionheader,instant_close", "");
+ }else {
+ emit("elm,state,optionheader,instant_open", "");
+ }
+ }
+ else
+ set_state(PART:"optionheader_bg", "default", 0.0);
+ }
+ }
+ program { name: "title_hide";
+ signal: "elm,state,title,hide";
+ source: "elm";
+ action: STATE_SET "hide" 0.0;
+ target: "title_bg";
+ target: "optionheader_bg";
+ }
+ program { name: "prev_btn_show";
+ signal: "elm,state,prev_btn,show";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+ }
+ }
+ program { name: "prev_btn_hide";
+ signal: "elm,state,prev_btn,hide";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+ }
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,show";
+ source: "elm";
+ action: STATE_SET "icon" 0.0;
+ target: "padding_center_text1";
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hide";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "padding_center_text1";
+ }
+ program { name: "left_btn_show";
+ signal: "elm,state,title_left_btn,show";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "left_btn_separator";
+ }
+ program { name: "left_btn_hide";
+ signal: "elm,state,title_left_btn,hide";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "left_btn_separator";
+ }
+ program { name: "right_btn_show";
+ signal: "elm,state,title_right_btn,show";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "right_btn_separator";
+ }
+ program { name: "right_btn_hide";
+ signal: "elm,state,title_right_btn,hide";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "right_btn_separator";
+ }
+ program { name: "controlbar_show";
+ signal: "elm,state,controlbar,show";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,show", "elm");
+ }
+ }
+ program { name: "controlbar_hide";
+ signal: "elm,state,controlbar,hide";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,hide", "elm");
+ }
+ }
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
+ source: "elm";
+ script {
+ set_state(PART:"controlbar_bg", "show", 0.0);
+ set_int(cbar_bg, get_int(cbar_bg) + 1);
+ }
+ }
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
+ source: "elm";
+ script {
+ set_int(cbar_bg, get_int(cbar_bg) - 1);
+ if (get_int(cbar_bg) <= 0)
+ set_state(PART:"controlbar_bg", "default", 0.0);
+ }
+ }
+ program { name: "optionheader_show";
+ signal: "elm,state,optionheader,show";
+ source: "elm";
+ script {
+ set_state(PART:"optionheader_bg", "show", 0.0);
+ set_state(PART:"optionheader_arrow", "show", 0.0);
+ set_int(oh_show, 1);
+ }
+ }
+ program { name: "optionheader_hide";
+ signal: "elm,state,optionheader,hide";
+ source: "elm";
+ script {
+ set_state(PART:"optionheader_bg", "default", 0.0);
+ set_state(PART:"optionheader_arrow", "default", 0.0);
+ set_int(oh_show, 0);
+ }
+ }
+ program { name: "optionheader_open";
+ signal: "elm,state,optionheader,open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "optionheader_bg";
+ target: "optionheader_arrow";
+ transition: LINEAR 0.2;
+ after: "optionheader_open_set";
+ }
+ program { name: "optionheader_close";
+ signal: "elm,state,optionheader,close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "optionheader_bg";
+ target: "optionheader_arrow";
+ transition: LINEAR 0.2;
+ after: "optionheader_close_set";
+ }
+ program { name: "optionheader_instant_open";
+ signal: "elm,state,optionheader,instant_open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "optionheader_bg";
+ target: "optionheader_arrow";
+ after: "optionheader_open_set";
+ }
+ program { name: "optionheader_instant_close";
+ signal: "elm,state,optionheader,instant_close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "optionheader_bg";
+ target: "optionheader_arrow";
+ after: "optionheader_close_set";
+ }
+ program { name: "optionheader_close_set";
+ signal: "elm,state,optionheader,close_set";
+ source: "";
+ script {
+ set_int(oh_close, 1);
+ }
+ }
+ program { name: "optionheader_open_set";
+ signal: "elm,state,optionheader,open_set";
+ source: "";
+ script {
+ set_int(oh_close, 0);
+ }
+ }
+ program { name: "controlbar_open";
+ signal: "elm,state,controlbar,open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "controlbar_bg";
+ transition: LINEAR 0.2;
+ }
+ program { name: "controlbar_close";
+ signal: "elm,state,controlbar,close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "controlbar_bg";
+ transition: LINEAR 0.2;
+ }
+ program { name: "controlbar_instant_open";
+ signal: "elm,state,controlbar,instant_open";
+ source: "";
+ script {
+ emit("elm,state,prev_btn,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
+ }
+ }
+ program { name: "controlbar_instant_close";
+ signal: "elm,state,controlbar,instant_close";
+ source: "";
+ script {
+ emit("elm,state,prev_btn,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
+ }
+ }
+ program { name: "show_finished";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+ program { name: "pushed_finished";
+ action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+ }
+ program { name: "popped_finished";
+ action: SIGNAL_EMIT "elm,action,popped,finished" "";
+ }
+ program {
+ name: "title_clicked";
+ signal: "mouse,clicked,1";
+ source: "click_event_area";
+ action: SIGNAL_EMIT "elm,action,title,clicked" "";
+ }
+ }
+ }
+ group { name: "elm/naviframe/item/video/segment/default";
+ script {
+ public cbar_bg = 0; //Controlbar BG Show call count
+ }
+ images {
+ image: "white/common/00_winset_control_toolbar_bg.png" COMP;
+ }
+ parts {
+ part { name: "base";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "left" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "right" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ }
+ part { name: "title_bg";
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 1 NAVIFRAME_SEGMENT_TITLE_H_INC;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "base"; }
+ rel2 { relative: 1.0 0.0; to: "base"; }
+ }
+ description { state: "hide" 0.0;
+ inherit: "default" 0.0;
+ min: 0 0;
+ max: 0 0;
+ fixed: 1 1;
+ }
+ }
+ part { name: "title_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ repeat_events: 0;
+ clip_to: "content_clip";
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 1.0;
+ rel1.to_x: "base";
+ rel1.to_y: "title_bg";
+ rel2.relative: 1.0 0.0;
+ rel2.to_x: "base";
+ rel2.to_y: "controlbar_bg";
+ }
+ }
+ part { name: "content_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
+ }
+ }
+ part { name: "left_padding";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 0.0 1.0; }
+ fixed: 1 0;
+ min: NAVIFRAME_PADDING_INC;
+ visible: 0;
+ }
+ }
+ part { name: "right_padding";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 0.5;
+ rel1 { relative: 1.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ fixed: 1 0;
+ min: NAVIFRAME_PADDING_INC;
+ visible: 0;
+ }
+ }
+ part { name: "elm.text.title";
+ type: TEXT;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ text { font: "SLP:style=Medium";
+ size: NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC;
+ min: 0 0;
+ max: 1 0;
+ align: 0.5 0.5;
+ text_class: "slp_medium";
+ }
+ min: 0 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
+ max: 999999 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
+ fixed: 1 1;
+ color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+ align: 0 0;
+ rel1.to: "left_padding";
+ rel1.relative: 1.0 0.0;
+ rel2.to: "right_padding";
+ rel2.relative: 0.0 1.0;
+ }
+ }
+ part { name: "click_event_area";
+ ignore_flags: ON_HOLD;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part { name: "segment";
+ type: "SWALLOW";
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_TITLE_SEGMENT_H_INC;
+ max: 999999 NAVIFRAME_TITLE_SEGMENT_H_INC;
+ fixed: 0 1;
+ align: 0.5 0;
+ rel1.to_x: "left_padding";
+ rel1.to_y: "elm.text.title";
+ rel1.relative: 1 1;
+ rel2.to_x: "right_padding";
+ rel2.to_y: "elm.text.title";
+ rel2.relative: 0 1;
+ }
+ }
+ part { name: "controlbar_bg";
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 0;
+ max: 999999 0;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ visible: 0;
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ image.normal: "white/common/00_winset_control_toolbar_bg.png";
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+ max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+ visible: 1;
+ }
+ }
+ part { name: "controlbar_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "controlbar_bg"; }
+ rel2 { to: "controlbar_bg"; }
+ }
+ }
+ part { name: "elm.prev_btn_bg";
+ type: RECT;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+ rel2.to: "controlbar_bg";
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
+ }
+ }
+ part { name: "controlbar";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "controlbar_bg";
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+ }
+ }
+ }
+ programs {
+ program { name: "content_new_pushed";
+ signal: "elm,state,new,pushed,internal";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "show_finished";
+ }
+ program { name: "content_cur_pushed";
+ signal: "elm,state,cur,pushed,internal";
+ source: "";
+ action: STATE_SET "left" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "pushed_finished";
+ }
+ program { name: "content_prev_popped";
+ signal: "elm,state,prev,popped,internal";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "show_finished";
+ }
+ program { name: "content_cur_popped";
+ signal: "elm,state,cur,popped,internal";
+ source: "";
+ action: STATE_SET "right" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "popped_finished";
+ }
+ program { name: "cur_pushed";
+ signal: "elm,state,cur,pushed";
+ source: "elm";
+ script {
+ set_state(PART:"base", "default", 0.0);
+ emit("elm,state,cur,pushed,internal", "");
+ }
+ }
+ program { name: "new_pushed";
+ signal: "elm,state,new,pushed";
+ source: "elm";
+ script {
+ set_state(PART:"base", "right", 0.0);
+ emit("elm,state,new,pushed,internal", "");
+ }
+ }
+ program { name: "prev_popped";
+ signal: "elm,state,prev,popped";
+ source: "elm";
+ script {
+ set_state(PART:"base", "left", 0.0);
+ emit("elm,state,prev,popped,internal", "");
+ }
+ }
+ program { name: "cur_popped";
+ signal: "elm,state,cur,popped";
+ source: "elm";
+ script {
+ set_state(PART:"base", "default", 0.0);
+ emit("elm,state,cur,popped,internal", "");
+ }
+ }
+ program { name: "visible";
+ signal: "elm,state,visible";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ }
+ program { name: "title_show";
+ signal: "elm,state,title,show";
+ source: "elm";
+ action: STATE_SET "show" 0.0;
+ target: "title_bg";
+ }
+ program { name: "title_hide";
+ signal: "elm,state,title,hide";
+ source: "elm";
+ action: STATE_SET "hide" 0.0;
+ target: "title_bg";
+ }
+ program { name: "prev_btn_show";
+ signal: "elm,state,prev_btn,show";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+ }
+ }
+ program { name: "prev_btn_hide";
+ signal: "elm,state,prev_btn,hide";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+ }
+ }
+ program { name: "controlbar_show";
+ signal: "elm,state,controlbar,show";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,show", "elm");
+ }
+ }
+ program { name: "controlbar_hide";
+ signal: "elm,state,controlbar,hide";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,hide", "elm");
+ }
+ }
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
+ source: "elm";
+ script {
+ set_state(PART:"controlbar_bg", "show", 0.0);
+ set_int(cbar_bg, get_int(cbar_bg) + 1);
+ }
+ }
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
+ source: "elm";
+ script {
+ set_int(cbar_bg, get_int(cbar_bg) - 1);
+ if (get_int(cbar_bg) <= 0)
+ set_state(PART:"controlbar_bg", "default", 0.0);
+ }
+ }
+ program { name: "controlbar_open";
+ signal: "elm,state,controlbar,open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "controlbar_bg";
+ transition: LINEAR 0.2;
+ }
+ program { name: "controlbar_close";
+ signal: "elm,state,controlbar,close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "controlbar_bg";
+ transition: LINEAR 0.2;
+ }
+ program { name: "controlbar_instant_open";
+ signal: "elm,state,controlbar,instant_open";
+ source: "";
+ script {
+ emit("elm,state,prev_btn,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
+ }
+ }
+ program { name: "controlbar_instant_close";
+ signal: "elm,state,controlbar,instant_close";
+ source: "";
+ script {
+ emit("elm,state,prev_btn,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
+ }
+ }
+ program { name: "show_finished";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+ program { name: "pushed_finished";
+ action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+ }
+ program { name: "popped_finished";
+ action: SIGNAL_EMIT "elm,action,popped,finished" "";
+ }
+ program {
+ name: "title_clicked";
+ signal: "mouse,clicked,1";
+ source: "click_event_area";
+ action: SIGNAL_EMIT "elm,action,title,clicked" "";
+ }
+ }
+ }
+ group { name: "elm/naviframe/item/video/tabbar/default";
+ script {
+ public cbar_bg = 0; //Controlbar BG Show call count
+ }
+ images {
+ image: "white/common/00_winset_control_toolbar_bg.png" COMP;
+ }
+ parts {
+ part { name: "base";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "left" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "right" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ repeat_events: 0;
+ clip_to: "content_clip";
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 0.0;
+ rel1.to: "base";
+ rel2.relative: 1.0 0.0;
+ rel2.to_x: "base";
+ rel2.to_y: "controlbar_bg";
+ }
+ }
+ part { name: "content_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
+ }
+ }
+ part { name: "controlbar_bg";
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 0;
+ max: 999999 0;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ visible: 0;
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ image.normal: "white/common/00_winset_control_toolbar_bg.png";
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+ max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+ visible: 1;
+ }
+ }
+ part { name: "controlbar_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "controlbar_bg"; }
+ rel2 { to: "controlbar_bg"; }
+ }
+ }
+ part { name: "elm.prev_btn_bg";
+ type: RECT;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+ rel2.to: "controlbar_bg";
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
+ }
+ }
+ part { name: "controlbar";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "controlbar_bg";
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+ }
+ }
+ }
+ programs {
+ program { name: "content_new_pushed";
+ signal: "elm,state,new,pushed,internal";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "show_finished";
+ }
+ program { name: "content_cur_pushed";
+ signal: "elm,state,cur,pushed,internal";
+ source: "";
+ action: STATE_SET "left" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "pushed_finished";
+ }
+ program { name: "content_prev_popped";
+ signal: "elm,state,prev,popped,internal";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "show_finished";
+ }
+ program { name: "content_cur_popped";
+ signal: "elm,state,cur,popped,internal";
+ source: "";
+ action: STATE_SET "right" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "popped_finished";
+ }
+ program { name: "cur_pushed";
+ signal: "elm,state,cur,pushed";
+ source: "elm";
+ script {
+ set_state(PART:"base", "default", 0.0);
+ emit("elm,state,cur,pushed,internal", "");
+ }
+ }
+ program { name: "new_pushed";
+ signal: "elm,state,new,pushed";
+ source: "elm";
+ script {
+ set_state(PART:"base", "right", 0.0);
+ emit("elm,state,new,pushed,internal", "");
+ }
+ }
+ program { name: "prev_popped";
+ signal: "elm,state,prev,popped";
+ source: "elm";
+ script {
+ set_state(PART:"base", "left", 0.0);
+ emit("elm,state,prev,popped,internal", "");
+ }
+ }
+ program { name: "cur_popped";
+ signal: "elm,state,cur,popped";
+ source: "elm";
+ script {
+ set_state(PART:"base", "default", 0.0);
+ emit("elm,state,cur,popped,internal", "");
+ }
+ }
+ program { name: "visible";
+ signal: "elm,state,visible";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ }
+ program { name: "prev_btn_show";
+ signal: "elm,state,prev_btn,show";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+ }
+ }
+ program { name: "prev_btn_hide";
+ signal: "elm,state,prev_btn,hide";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+ }
+ }
+ program { name: "controlbar_show";
+ signal: "elm,state,controlbar,show";
+ source: "elm";
+ action: STATE_SET "show" 0.0;
+ script {
+ emit("elm,state,controlbar_bg,show", "elm");
+ }
+ }
+ program { name: "controlbar_hide";
+ signal: "elm,state,controlbar,hide";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,hide", "elm");
+ }
+ }
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
+ source: "elm";
+ script {
+ set_state(PART:"controlbar_bg", "show", 0.0);
+ set_int(cbar_bg, get_int(cbar_bg) + 1);
+ }
+ }
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
+ source: "elm";
+ script {
+ set_int(cbar_bg, get_int(cbar_bg) - 1);
+ if (get_int(cbar_bg) <= 0)
+ set_state(PART:"controlbar_bg", "default", 0.0);
+ }
+ }
+ program { name: "controlbar_open";
+ signal: "elm,state,controlbar,open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "controlbar_bg";
+ transition: LINEAR 0.2;
+ }
+ program { name: "controlbar_close";
+ signal: "elm,state,controlbar,close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "controlbar_bg";
+ transition: LINEAR 0.2;
+ }
+ program { name: "controlbar_instant_open";
+ signal: "elm,state,controlbar,instant_open";
+ source: "";
+ script {
+ emit("elm,state,prev_btn,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
+ }
+ }
+ program { name: "controlbar_instant_close";
+ signal: "elm,state,controlbar,instant_close";
+ source: "";
+ script {
+ emit("elm,state,prev_btn,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
+ }
+ }
+ program { name: "show_finished";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+ program { name: "pushed_finished";
+ action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+ }
+ program { name: "popped_finished";
+ action: SIGNAL_EMIT "elm,action,popped,finished" "";
+ }
+ program {
+ name: "title_clicked";
+ signal: "mouse,clicked,1";
+ source: "click_event_area";
+ action: SIGNAL_EMIT "elm,action,title,clicked" "";
+ }
+ }
+ }
+ group { name:"elm/naviframe/item/video/basic/instant/default";
+ inherit: "elm/naviframe/item/video/basic/default";
+ alias:"elm/naviframe/item/video/1line/instant/default";
+ alias:"elm/naviframe/item/video/instant/default";
+ script {
+ public oh_show = 0; //optionheader show/hide
+ public oh_close = 0; //optionheader close/open
+ public cbar_bg = 0; //Controlbar BG Show call count
+ }
+ programs {
+ program { name: "cur_pushed";
+ signal: "elm,state,cur,pushed";
+ source: "elm";
+ after: "pushed_finished";
+ }
+ program { name: "new_pushed";
+ signal: "elm,state,new,pushed";
+ source: "elm";
+ after: "show_finished";
+ }
+ program { name: "prev_popped";
+ signal: "elm,state,prev,popped";
+ source: "elm";
+ after: "show_finished";
+ }
+ program { name: "cur_popped";
+ signal: "elm,state,cur,popped";
+ source: "elm";
+ after: "popped_finished";
+ }
+ }
+ }
+ group { name:"elm/naviframe/item/video/basic2/instant/default";
+ inherit: "elm/naviframe/item/video/basic2/default";
+ alias:"elm/naviframe/item/video/2line/instant/default";
+ alias:"elm/naviframe/item/video/instant2/default";
+ script {
+ public oh_show = 0; //optionheader show/hide
+ public oh_close = 0; //optionheader close/open
+ public cbar_bg = 0; //Controlbar BG Show call count
+ }
+ programs {
+ program { name: "cur_pushed";
+ signal: "elm,state,cur,pushed";
+ source: "elm";
+ after: "pushed_finished";
+ }
+ program { name: "new_pushed";
+ signal: "elm,state,new,pushed";
+ source: "elm";
+ after: "show_finished";
+ }
+ program { name: "prev_popped";
+ signal: "elm,state,prev,popped";
+ source: "elm";
+ after: "show_finished";
+ }
+ program { name: "cur_popped";
+ signal: "elm,state,cur,popped";
+ source: "elm";
+ after: "popped_finished";
+ }
+ }
+ }
+ group { name: "elm/naviframe/item/video/segment/instant/default";
+ inherit: "elm/naviframe/item/video/segment/default";
+ script {
+ public cbar_bg = 0; //Controlbar BG Show call count
+ }
+ programs {
+ program { name: "cur_pushed";
+ signal: "elm,state,cur,pushed";
+ source: "elm";
+ after: "pushed_finished";
+ }
+ program { name: "new_pushed";
+ signal: "elm,state,new,pushed";
+ source: "elm";
+ after: "show_finished";
+ }
+ program { name: "prev_popped";
+ signal: "elm,state,prev,popped";
+ source: "elm";
+ after: "show_finished";
+ }
+ program { name: "cur_popped";
+ signal: "elm,state,cur,popped";
+ source: "elm";
+ after: "popped_finished";
+ }
+ program { name: "title_show";
+ signal: "elm,state,title,show";
+ source: "elm";
+ action: STATE_SET "show" 0.0;
+ target: "title_clip";
+ }
+ program { name: "title_hide";
+ signal: "elm,state,title,hide";
+ source: "elm";
+ action: STATE_SET "hide" 0.0;
+ target: "title_clip";
+ }
+ }
+ }
+
+ group { name: "elm/naviframe/item/video/tabbar/instant/default";
+ inherit: "elm/naviframe/item/video/tabbar/default";
+ script {
+ public cbar_bg = 0; //Controlbar BG Show call count
+ }
+ programs {
+ program { name: "cur_pushed";
+ signal: "elm,state,cur,pushed";
+ source: "elm";
+ after: "pushed_finished";
+ }
+ program { name: "new_pushed";
+ signal: "elm,state,new,pushed";
+ source: "elm";
+ after: "show_finished";
+ }
+ program { name: "prev_popped";
+ signal: "elm,state,prev,popped";
+ source: "elm";
+ after: "show_finished";
+ }
+ program { name: "cur_popped";
+ signal: "elm,state,cur,popped";
+ source: "elm";
+ after: "popped_finished";
+ }
+ program { name: "controlbar_bgp_hide";
+ signal: "elm,state,controlbar_bg,hide";
+ source: "elm";
+ script {
+ set_int(cbar_bg, get_int(cbar_bg) - 1);
+ if (get_int(cbar_bg) <= 0)
+ set_state(PART:"controlbar_bg", "default", 0.0);
+ }
+ }
+ }
+ }
+ group { name:"elm/naviframe/item/video/empty/default";
+ images {
+ image: "white/common/00_winset_control_top_bg.png" COMP;
+ image: "white/common/00_winset_control_top_arrow.png" COMP;
+ image: "white/common/00_winset_control_toolbar_bg.png" COMP;
+ }
+ script {
+ public oh_show = 0; //optionheader show/hide
+ public oh_close = 0; //optionheader close/open
+ public cbar_bg = 0; //Controlbar BG Show call count
+ }
+ parts {
+ part { name: "base";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ }
+ description { state: "left" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: -1.0 0.0;
+ rel2.relative: 0.0 1.0;
+ }
+ description { state: "right" 0.0;
+ inherit: "default" 0.0;
+ rel1.relative: 1.0 0.0;
+ rel2.relative: 2.0 1.0;
+ }
+ }
+ part { name: "title_bg";
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 1 NAVIFRAME_TITLE_H_INC;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "base"; }
+ rel2 { relative: 1.0 0.0; to: "base"; }
+ }
+ description { state: "hide" 0.0;
+ inherit: "default" 0.0;
+ min: 0 0;
+ max: 0 0;
+ fixed: 1 1;
+ }
+ }
+ part { name: "title_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "title_bg"; }
+ rel2 { to: "title_bg"; }
+ }
+ }
+ part { name: "optionheader_bg";
+ type: IMAGE;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 1 0;
+ align: 0.5 0;
+ fixed: 0 1;
+ rel1.to: "title_bg";
+ rel1.relative: 0 1;
+ rel2.to: "title_bg";
+ visible: 0;
+ image { normal: "white/common/00_winset_control_top_bg.png";
+ border: NAVIFRAME_OH_BORDER_INC;
+ }
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ min: 1 NAVIFRAME_OH_OPENED_H_INC;
+ visible: 1;
+ }
+ description { state: "hide" 0.0;
+ inherit: "default" 0.0;
+ min: 0 0;
+ max: 0 0;
+ fixed: 1 1;
+ }
+ }
+ part { name: "optionheader_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1 { to: "optionheader_bg"; }
+ rel2 { to: "optionheader_bg"; }
+ }
+ }
+ part { name: "optionheader_top_padding";
+ type: RECT;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+ rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "optionheader";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ }
+ }
+ part { name: "optionheader_bottom_padding";
+ type: RECT;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_PADDING_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "optionheader_shadow";
+ type: RECT;
+ scale: 1;
+ clip_to: "optionheader_clip";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_OH_SHADOW_INC;
+ rel1 { relative: 0.0 1.0; to: "optionheader_bottom_padding"; }
+ rel2 { relative: 1.0 1.0; to: "optionheader_bottom_padding"; }
+ fixed: 0 1;
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ repeat_events: 0;
+ clip_to: "content_clip";
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1.relative: 0.0 1.0;
+ rel1.to_x: "base";
+ rel1.to_y: "optionheader_bg";
+ rel2.relative: 1.0 0.0;
+ rel2.to_x: "base";
+ rel2.to_y: "controlbar_bg";
+ }
+ }
+ part { name: "content_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ rel2.to: "elm.swallow.content";
+ }
+ }
+ part { name: "title";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clip";
+ description { state: "default" 0.0;
+ min: 1 NAVIFRAME_TITLE_H_INC;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "base"; }
+ rel2 { relative: 1.0 0.0; to: "base"; }
+ }
+ }
+ part { name: "controlbar_bg";
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 0;
+ max: 999999 0;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ visible: 0;
+ rel1 { to: "base"; }
+ rel2 { to: "base"; }
+ image.normal: "white/common/00_winset_control_toolbar_bg.png";
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+ max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+ visible: 1;
+ }
+ }
+ part { name: "controlbar_clip";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "controlbar_bg";
+ rel2.to: "controlbar_bg";
+ }
+ }
+ part { name: "elm.prev_btn_bg";
+ type: RECT;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+ rel2.to: "controlbar_bg";
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ rel1.to: "elm.prev_btn_bg";
+ rel2.to: "elm.prev_btn_bg";
+ }
+ }
+ part { name: "controlbar";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "controlbar_clip";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "controlbar_bg";
+ rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+ }
+ }
+ }
+ programs {
+ program { name: "content_new_pushed";
+ signal: "elm,state,new,pushed,internal";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "show_finished";
+ }
+ program { name: "content_cur_pushed";
+ signal: "elm,state,cur,pushed,internal";
+ source: "";
+ action: STATE_SET "left" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "pushed_finished";
+ }
+ program { name: "content_prev_popped";
+ signal: "elm,state,prev,popped,internal";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "show_finished";
+ }
+ program { name: "content_cur_popped";
+ signal: "elm,state,cur,popped,internal";
+ source: "";
+ action: STATE_SET "right" 0.0;
+ target: "base";
+ transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+ after: "popped_finished";
+ }
+ program { name: "cur_pushed";
+ signal: "elm,state,cur,pushed";
+ source: "elm";
+ script {
+ set_state(PART:"base", "default", 0.0);
+ emit("elm,state,cur,pushed,internal", "");
+ }
+ }
+ program { name: "new_pushed";
+ signal: "elm,state,new,pushed";
+ source: "elm";
+ script {
+ set_state(PART:"base", "right", 0.0);
+ emit("elm,state,new,pushed,internal", "");
+ }
+ }
+ program { name: "prev_popped";
+ signal: "elm,state,prev,popped";
+ source: "elm";
+ script {
+ set_state(PART:"base", "left", 0.0);
+ emit("elm,state,prev,popped,internal", "");
+ }
+ }
+ program { name: "cur_popped";
+ signal: "elm,state,cur,popped";
+ source: "elm";
+ script {
+ set_state(PART:"base", "default", 0.0);
+ emit("elm,state,cur,popped,internal", "");
+ }
+ }
+ program { name: "visible";
+ signal: "elm,state,visible";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "base";
+ }
+ program { name: "title_show";
+ signal: "elm,state,title,show";
+ source: "elm";
+ script {
+ set_state(PART:"title_bg", "default", 0.0);
+ if (get_int(oh_show) == 1) {
+ if (get_int(oh_close) == 1) {
+ emit("elm,state,optionheader,instant_close", "");
+ }else {
+ emit("elm,state,optionheader,instant_open", "");
+ }
+ }
+ else
+ set_state(PART:"optionheader_bg", "default", 0.0);
+ }
+ }
+ program { name: "title_hide";
+ signal: "elm,state,title,hide";
+ source: "elm";
+ action: STATE_SET "hide" 0.0;
+ target: "title_bg";
+ target: "optionheader_bg";
+ }
+ program { name: "prev_btn_show";
+ signal: "elm,state,prev_btn,show";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,show", "elm");
+ set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+ }
+ }
+ program { name: "prev_btn_hide";
+ signal: "elm,state,prev_btn,hide";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,hide", "elm");
+ set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+ }
+ }
+ program { name: "controlbar_show";
+ signal: "elm,state,controlbar,show";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,show", "elm");
+ }
+ }
+ program { name: "controlbar_hide";
+ signal: "elm,state,controlbar,hide";
+ source: "elm";
+ script {
+ emit("elm,state,controlbar_bg,hide", "elm");
+ }
+ }
+ program { name: "controlbar_bg_show";
+ signal: "elm,state,controlbar_bg,show";
+ source: "elm";
+ script {
+ set_state(PART:"controlbar_bg", "show", 0.0);
+ set_int(cbar_bg, get_int(cbar_bg) + 1);
+ }
+ }
+ program { name: "controlbar_bg_hide";
+ signal: "elm,state,controlbar_bg,hide";
+ source: "elm";
+ script {
+ set_int(cbar_bg, get_int(cbar_bg) - 1);
+ if (get_int(cbar_bg) <= 0)
+ set_state(PART:"controlbar_bg", "default", 0.0);
+ }
+ }
+ program { name: "optionheader_show";
+ signal: "elm,state,optionheader,show";
+ source: "elm";
+ script {
+ set_state(PART:"optionheader_bg", "show", 0.0);
+ set_int(oh_show, 1);
+ }
+ }
+ program { name: "optionheader_hide";
+ signal: "elm,state,optionheader,hide";
+ source: "elm";
+ script {
+ set_state(PART:"optionheader_bg", "default", 0.0);
+ set_int(oh_show, 0);
+ }
+ }
+ program { name: "optionheader_open";
+ signal: "elm,state,optionheader,open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "optionheader_bg";
+ transition: LINEAR 0.2;
+ after: "optionheader_open_set";
+ }
+ program { name: "optionheader_close";
+ signal: "elm,state,optionheader,close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "optionheader_bg";
+ transition: LINEAR 0.2;
+ after: "optionheader_close_set";
+ }
+ program { name: "optionheader_instant_open";
+ signal: "elm,state,optionheader,instant_open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "optionheader_bg";
+ after: "optionheader_open_set";
+ }
+ program { name: "optionheader_instant_close";
+ signal: "elm,state,optionheader,instant_close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "optionheader_bg";
+ after: "optionheader_close_set";
+ }
+ program { name: "optionheader_close_set";
+ signal: "elm,state,optionheader,close_set";
+ source: "";
+ script {
+ set_int(oh_close, 1);
+ }
+ }
+ program { name: "optionheader_open_set";
+ signal: "elm,state,optionheader,open_set";
+ source: "";
+ script {
+ set_int(oh_close, 0);
+ }
+ }
+ program { name: "controlbar_open";
+ signal: "elm,state,controlbar,open";
+ source: "";
+ action: STATE_SET "show" 0.0;
+ target: "controlbar_bg";
+ transition: LINEAR 0.2;
+ }
+ program { name: "controlbar_close";
+ signal: "elm,state,controlbar,close";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ target: "controlbar_bg";
+ transition: LINEAR 0.2;
+ }
+ program { name: "controlbar_instant_open";
+ signal: "elm,state,controlbar,instant_open";
+ source: "";
+ script {
+ emit("elm,state,prev_btn,show", "elm");
+ emit("elm,state,controlbar,show", "elm");
+ }
+ }
+ program { name: "controlbar_instant_close";
+ signal: "elm,state,controlbar,instant_close";
+ source: "";
+ script {
+ emit("elm,state,prev_btn,hide", "elm");
+ emit("elm,state,controlbar,hide", "elm");
+ }
+ }
+ program { name: "show_finished";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
+ }
+ program { name: "pushed_finished";
+ action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+ }
+ program { name: "popped_finished";
+ action: SIGNAL_EMIT "elm,action,popped,finished" "";
+ }
+ }
+ }
--- /dev/null
+#define PROGRESSBAR_TITLE_FONT_SIZE_INC 28
+#define PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC 20
+
+#define PROGRESSBAR_LIST_PROGRESS_STYLE_TEXT_COLOR_INC 0 0 0 255
+#define PROGRESSBAR_LIST_PROGRESS_STYLE_STATUS_TEXT_COLOR_INC 224 224 224 255
+#define PROGRESSBAR_LIST_PROCESS_WIDTH_INC 66
+#define PROGRESSBAR_LIST_PROCESS_HEIGHT_INC 66
+#define PROGRESSBAR_LIST_PROCESS_SMALL_INC 35
+#define PROGRESSBAR_LIST_PROCESS_SMALL_IMAGE "32x32"
+#define PROGRESSBAR_LIST_PROGRESS_HEIGHT_INC 16
+
+#define GALLERY_EDC_IMAGE_LIST_PROGRESS_BG "00_winset_list_progress_bg.png"
+#define GALLERY_EDC_IMAGE_LIST_PROGRESS_BAR "T01_video_list_progress_bar.png"
+
+ group { name: "elm/progressbar/horizontal/video/list_progress";
+ images {
+ image: GALLERY_EDC_IMAGE_LIST_PROGRESS_BG COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROGRESS_BAR COMP;
+ }
+ parts {
+ part { name: "elm.padding.left";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 0.0 0.0;
+ offset: 0 0;
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ offset: 0 0;
+ }
+ color: 0 0 0 0;
+ align: 0.0 0.0;
+ }
+ }
+ part { name: "elm.padding.right";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: 0 0;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: 0 0;
+ }
+ color: 0 0 0 0;
+ align: 1.0 0.0;
+ }
+ }
+ part { name: "elm.background.progressbar";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ to_x: "elm.padding.left";
+ relative: 1.0 0.0;
+ offset: 0 0;
+ }
+ rel2 {
+ to_x: "elm.padding.right";
+ relative: 0.0 1.0;
+ offset: 0 0;
+ }
+ }
+ }
+ part { name: "elm.swallow.bar";
+ mouse_events: 0;
+ scale: 1;
+ type: SWALLOW;
+ description {
+ min: 1 PROGRESSBAR_LIST_PROGRESS_HEIGHT_INC;
+ max: 99999 PROGRESSBAR_LIST_PROGRESS_HEIGHT_INC;
+ state: "default" 0.0;
+ rel1 {
+ to: "elm.background.progressbar";
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ to: "elm.background.progressbar";
+ relative: 1.0 1.0;
+ }
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.0 0.5;
+ rel1 {
+ offset: 0 0;
+ to_y: "elm.background.progressbar";
+ }
+ rel2 {
+ offset: 0 -1;
+ relative: 0.0 1.0;
+ to_y: "elm.background.progressbar";
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ aspect: 1.0 1.0;
+ aspect_preference: VERTICAL;
+ rel2.offset: 4 -1;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ fixed: 1 1;
+ align: 0.0 0.5;
+ rel1.to_x: "elm.swallow.content";
+ rel1.relative: 1.0 0.0;
+ rel2.to_x: "elm.swallow.content";
+ rel2.relative: 1.0 1.0;
+ color: PROGRESSBAR_LIST_PROGRESS_STYLE_TEXT_COLOR_INC;
+ text {
+ font: "SLP:style=Medium";
+ text_class: "slp_medium";
+ size: PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC;
+ min: 0 0;
+ align: 0.0 0.5;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ text.min: 1 1;
+ }
+ }
+ part { name: "background";
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "elm.background.progressbar";
+ description {
+ state: "default" 0.0;
+ rel1 {
+ to: "elm.swallow.bar";
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ to: "elm.swallow.bar";
+ relative: 1.0 1.0;
+ }
+ image {
+ normal: GALLERY_EDC_IMAGE_LIST_PROGRESS_BG;
+ border: 0 0 1 1;
+ }
+ }
+ }
+ part { name: "elm.text.status";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ visible: 0;
+ rel1 {
+ to: "background";
+ relative: 0.5 0.5;
+ }
+ rel2 {
+ to: "background";
+ relative: 0.5 0.5;
+ }
+ text {
+ font: "SLP:style=Medium";
+ text_class: "slp_medium";
+ size: PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC;
+ min: 0 0;
+ align: 0.5 0.0;
+ }
+ color: PROGRESSBAR_LIST_PROGRESS_STYLE_TEXT_COLOR_INC;
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ text.min: 1 1;
+ }
+ }
+ part { name: "elm.progress.progressbar";
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "elm.background.progressbar";
+ description {
+ state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 1;
+ rel1 {
+ to: "elm.swallow.bar";
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ to_y: "elm.swallow.bar";
+ to_x: "elm.cur.progressbar";
+ offset: -1 -1;
+ }
+ image {
+ normal: GALLERY_EDC_IMAGE_LIST_PROGRESS_BAR;
+ border: 0 0 1 1;
+ }
+ }
+ description {
+ state: "invert" 0.0;
+ inherit: "default" 0.0;
+ rel1 {
+ to_y: "elm.swallow.bar";
+ to_x: "elm.cur.progressbar";
+ }
+ rel2 {
+ to: "elm.swallow.bar";
+ relative: 1.0 1.0;
+ }
+ }
+ description {
+ state: "state_begin" 0.0;
+ inherit: "default" 0.0;
+ rel1 {
+ to: "elm.swallow.bar";
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ to: "elm.swallow.bar";
+ relative: 0.1 1.0;
+ }
+ }
+ description {
+ state: "state_end" 0.0;
+ inherit: "default" 0.0;
+ rel1 {
+ to: "elm.swallow.bar";
+ relative: 0.9 0.0;
+ }
+ rel2 {
+ to: "elm.swallow.bar";
+ relative: 1.0 1.0;
+ }
+ }
+ }
+ part { name: "text-bar";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "progress-rect";
+ //effect: SOFT_SHADOW;
+ scale: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ fixed: 1 1;
+ visible: 0;
+ rel1.to: "elm.text.status";
+ rel1.offset: -1 -1;
+ rel2.to: "elm.text.status";
+ text {
+ text_source: "elm.text.status";
+ font: "SLP:style=Medium";
+ text_class: "slp_medium";
+ size: PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC;
+ min: 0 0;
+ align: 0.0 0.0;
+ }
+ color: PROGRESSBAR_LIST_PROGRESS_STYLE_STATUS_TEXT_COLOR_INC;
+ }
+ description { state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ text.min: 1 1;
+ }
+ }
+ part { name: "elm.cur.progressbar";
+ mouse_events: 0;
+ scale: 1;
+ dragable {
+ confine: "background";
+ x: 1 1 1;
+ y: 0 0 0;
+ }
+ description { state: "default" 0.0;
+ min: 0 28;
+ fixed: 1 1;
+ visible: 0;
+ rel1 {
+ to: "background";
+ relative: 0 0;
+ }
+ rel2.to: "background";
+ }
+ }
+ part { name: "progress-rect";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1.to: "elm.progress.progressbar";
+ rel2.to: "elm.progress.progressbar";
+ }
+ }
+ }
+ programs {
+ program { name: "label_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.text";
+ }
+ program { name: "label_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.text";
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "icon_hide";
+ signal: "elm,state,icon,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.swallow.content";
+ }
+ program { name: "units_show";
+ signal: "elm,state,units,visible";
+ source: "elm";
+ action: STATE_SET "show" 0.0;
+ target: "text-bar";
+ target: "elm.text.status";
+ }
+ program { name: "units_hide";
+ signal: "elm,state,units,hidden";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "text-bar";
+ target: "elm.text.status";
+ }
+ program { name: "slide_to_end";
+ action: STATE_SET "state_end" 0.0;
+ transition: LINEAR 0.5;
+ target: "elm.progress.progressbar";
+ after: "slide_to_begin";
+ }
+ program { name: "slide_to_begin";
+ signal: "elm,state,slide,begin";
+ action: STATE_SET "state_begin" 0.0;
+ target: "elm.progress.progressbar";
+ transition: LINEAR 0.5;
+ after: "slide_to_end";
+ }
+ program { name: "start_pulse";
+ signal: "elm,state,pulse,start";
+ source: "elm";
+ // after: "slide_to_end";
+ }
+ program { name: "stop_pulse";
+ signal: "elm,state,pulse,stop";
+ source: "elm";
+ action: ACTION_STOP;
+ target: "slide_to_begin";
+ target: "slide_to_end";
+ target: "start_pulse";
+ //after: "state_pulse";
+ }
+ program { name: "state_pulse";
+ signal: "elm,state,pulse";
+ source: "elm";
+ action: STATE_SET "state_begin" 0.0;
+ target: "elm.progress.progressbar";
+ after: "units_hide";
+ }
+ program { name: "state_fraction";
+ signal: "elm,state,fraction";
+ source: "elm";
+ action: ACTION_STOP;
+ target: "slide_to_begin";
+ target: "slide_to_end";
+ target: "start_pulse";
+ action: STATE_SET "default" 0.0;
+ target: "elm.progress.progressbar";
+ }
+ program { name: "set_invert_on";
+ signal: "elm,state,inverted,on";
+ source: "elm";
+ action: STATE_SET "invert" 0.0;
+ target: "elm.progress.progressbar";
+ }
+ program { name: "set_invert_off";
+ signal: "elm,state,inverted,off";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "elm.progress.progressbar";
+ }
+ }
+ }
+
+
+/*
+#define PROGRESS_BG_DESC( param_num ) \
+ description { state: "pulse" 0.#param_num; \
+ inherit: "default" 0.0; \
+ image { \
+ normal: GALLERY_EDC_IMAGE_LIST_PROCESS_##param_num; \
+ } \
+ }
+
+#define PROGRESSING_DELAY 0.03
+
+ group { name: "elm/progressbar/horizontal/gallery/list_process";
+ images {
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_01 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_02 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_03 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_04 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_05 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_06 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_07 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_08 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_09 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_10 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_11 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_12 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_13 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_14 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_15 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_16 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_17 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_18 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_19 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_20 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_21 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_22 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_23 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_24 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_25 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_26 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_27 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_28 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_29 COMP;
+ image: GALLERY_EDC_IMAGE_LIST_PROCESS_30 COMP;
+ }
+ parts {
+ part { name: "elm.background.progressbar";
+ mouse_events: 0;
+ scale: 1;
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ part { name: "elm.swallow.bar";
+ mouse_events: 0;
+ scale: 1;
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ min: 0 0;
+ max: 0 0;
+ visible: 0;
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 0;
+ max: 0 0;
+ visible: 0;
+ }
+ }
+ part { name: "background";
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "elm.background.progressbar";
+ description {
+ state: "default" 0.0;
+ min: PROGRESSBAR_LIST_PROCESS_WIDTH_INC PROGRESSBAR_LIST_PROCESS_HEIGHT_INC;
+ max: PROGRESSBAR_LIST_PROCESS_WIDTH_INC PROGRESSBAR_LIST_PROCESS_HEIGHT_INC;
+ visible: 1;
+ aspect: 1.0 1.0;
+ aspect_preference: BOTH;
+ image {
+ normal: GALLERY_EDC_IMAGE_LIST_PROCESS_01;
+ }
+ }
+ description { state: "pulse" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: GALLERY_EDC_IMAGE_LIST_PROCESS_01;
+ }
+ }
+ PROGRESS_BG_DESC( 01 )
+ PROGRESS_BG_DESC( 02 )
+ PROGRESS_BG_DESC( 03 )
+ PROGRESS_BG_DESC( 04 )
+ PROGRESS_BG_DESC( 05 )
+ PROGRESS_BG_DESC( 06 )
+ PROGRESS_BG_DESC( 07 )
+ PROGRESS_BG_DESC( 08 )
+ PROGRESS_BG_DESC( 09 )
+ PROGRESS_BG_DESC( 10 )
+ PROGRESS_BG_DESC( 11 )
+ PROGRESS_BG_DESC( 12 )
+ PROGRESS_BG_DESC( 13 )
+ PROGRESS_BG_DESC( 14 )
+ PROGRESS_BG_DESC( 15 )
+ PROGRESS_BG_DESC( 16 )
+ PROGRESS_BG_DESC( 17 )
+ PROGRESS_BG_DESC( 18 )
+ PROGRESS_BG_DESC( 19 )
+ PROGRESS_BG_DESC( 20 )
+ PROGRESS_BG_DESC( 21 )
+ PROGRESS_BG_DESC( 22 )
+ PROGRESS_BG_DESC( 23 )
+ PROGRESS_BG_DESC( 24 )
+ PROGRESS_BG_DESC( 25 )
+ PROGRESS_BG_DESC( 26 )
+ PROGRESS_BG_DESC( 27 )
+ PROGRESS_BG_DESC( 28 )
+ PROGRESS_BG_DESC( 29 )
+ PROGRESS_BG_DESC( 30 )
+ }
+ }
+ script {
+ public pulse_state;
+ }
+ programs {
+ program { name: "continue_pulse";
+ script {
+ new Float:state;
+ state = get_float(pulse_state);
+ set_state(PART:"background", "pulse", state);
+ state += 0.01;
+ if( state > 0.30 )
+ state = 0.01;
+ set_float(pulse_state, state);
+ }
+ after: "delay";
+ }
+ program { name: "delay";
+ action: STATE_SET "pulse" 0.10;
+ target: "background";
+ in: PROGRESSING_DELAY 0.0;
+ after: "continue_pulse";
+ }
+ program { name: "start_pulse";
+ signal: "elm,state,pulse,start";
+ source: "elm";
+ script {
+ set_float(pulse_state, 0.0);
+ }
+ after: "continue_pulse";
+ }
+ program { name: "stop_pulse";
+ signal: "elm,state,pulse,stop";
+ source: "elm";
+ action: ACTION_STOP;
+ target: "continue_pulse";
+ target: "delay";
+ target: "start_pulse";
+ after: "init_pulse";
+ }
+ program { name: "init_pulse";
+ action: STATE_SET "default" 0.0;
+ target: "background";
+ }
+ }
+ }
+*/
--- /dev/null
+#define ITEM_STATE_ENABLED 0
+#define ITEM_STATE_DISABLED 1
+
+group { name: "elm/toolbar/base/default";
+ images {
+ image: "00_winset_control_toolbar_bg.png" COMP;
+ }
+ parts {
+ part { name: "base";
+ mouse_events: 1;
+ description { state: "default" 0.0;
+ image.normal: "00_winset_control_toolbar_bg.png";
+ }
+ }
+ part { name: "clipper";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ to: "base";
+ offset: 2 2;
+ }
+ rel2 {
+ to: "base";
+ offset: -3 -3;
+ }
+ }
+ }
+ part { name: "elm.swallow.content";
+ clip_to: "clipper";
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ rel1.to: "clipper";
+ rel2.to: "clipper";
+ }
+ }
+ part { name: "event";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ }
+}
+
+group { name: "elm/toolbar/item/default";
+ images {
+ image: "00_winset_toolbar_press.png" COMP;
+ }
+ styles{
+ style { name: "toolbar_style";
+ base: "font=SLP:style=Medium font_size="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXT_SIZE_INC" align=center color="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXTBLOCK_COLOR_INC" wrap=mixed ellipsis=1 text_class=slp_medium";
+ tag: "br" "\n";
+ tag: "ps" "ps";
+ tag: "hilight" "+ font=SLP:style=Bold";
+ tag: "b" "+ font=SLP:style=Bold";
+ tag: "tab" "\t";
+ }
+ }
+
+ data.item: "transition_animation_on" "1";
+ script {
+ public item_state = ITEM_STATE_ENABLED;
+ }
+ parts {
+ part { name: "bg";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ rel1 {
+ relative: 0.0 0.0;
+ offset: 4 4;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: -5 -5;
+ }
+ image {
+ normal: "00_winset_toolbar_press.png";
+ border: 3 3 3 3;
+ }
+ image.middle: SOLID;
+ fill.smooth: 0;
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 255 255 255 255;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ }
+ }
+ part { name: "padding_left_top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel2.relative: 0.0 0.0;
+ min: 10 8;
+ fixed: 1 1;
+ visible: 1;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "padding_right_bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 1.0;
+ rel1.relative: 1.0 1.0;
+ min: 10 5;
+ fixed: 1 1;
+ visible: 1;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "icon_rect";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ align: 0.5 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "visible" 0.0;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ align: 0.5 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "padding_after_icon";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 0.0 0.0;
+ rel1 {
+ relative: 0.0 1.0;
+ to: "icon_rect";
+ }
+ rel2.to: "icon_rect";
+ fixed: 0 1;
+ min: 0 0;
+ color: 0 0 0 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "padding_before_text";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 0.5 1.0;
+ rel1 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "elm.text";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_right_bottom";
+ to_y: "elm.text";
+ }
+ fixed: 0 1;
+ min: 0 0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "elm.icon.clipper";
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.5 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ fixed: 0 1;
+ }
+ description { state: "visible" 0.0;
+ fixed: 0 1;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_before_text";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ description { state: "icononly" 0.0;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ }
+ part { name: "elm.swallow.icon_new";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "elm.icon_new.clipper";
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.5 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ fixed: 0 1;
+ }
+ description { state: "visible" 0.0;
+ fixed: 0 1;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_before_text";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ description { state: "icononly" 0.0;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "elm.text.clipper";
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_left_top";
+ to_y: "padding_after_icon";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
+ fixed: 1 1;
+ text {
+ style: "toolbar_style";
+ min: 0 1;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ part { name: "elm.text_new";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "elm.text_new.clipper";
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_left_top";
+ to_y: "padding_after_icon";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
+ fixed: 1 1;
+ text {
+ style: "toolbar_style";
+ min: 0 1;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ part { name: "elm.text.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 153;
+ }
+ }
+ part { name: "elm.text_new.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 153;
+ }
+ }
+ part { name: "elm.icon.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 153;
+ }
+ }
+ part { name: "elm.icon_new.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 153;
+ }
+ }
+ part { name: "event";
+ type: RECT;
+ mouse_events: 1;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "event2";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ }
+ programs {
+ program { name: "pressed";
+ signal: "mouse,down,1";
+ source: "event";
+ script {
+ if (get_int(item_state) != ITEM_STATE_DISABLED)
+ set_state(PART:"bg", "selected", 0.0);
+ }
+ transition: LINEAR 0.2;
+ }
+ program { name: "unpressed";
+ signal: "mouse,up,1";
+ source: "event2";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ transition: LINEAR 0.1;
+ }
+ program { name: "go";
+ signal: "mouse,up,1";
+ source: "event";
+ action: SIGNAL_EMIT "elm,action,click" "elm";
+ }
+ program { name: "mouse,in";
+ signal: "mouse,in";
+ source: "event";
+ action: SIGNAL_EMIT "elm,mouse,in" "elm";
+ }
+ program { name: "mouse,out";
+ signal: "mouse,out";
+ source: "event";
+ action: SIGNAL_EMIT "elm,mouse,out" "elm";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ script {
+ set_int(item_state, ITEM_STATE_DISABLED);
+ set_state(PART:"bg", "disabled", 0.0);
+ set_state(PART:"elm.text.clipper", "disabled", 0.0);
+ set_state(PART:"elm.icon.clipper", "disabled", 0.0);
+ run_program(PROGRAM:"label_set,animation,done");
+ run_program(PROGRAM:"icon_set,animation,done");
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ script {
+ set_int(item_state, ITEM_STATE_ENABLED);
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"elm.text.clipper", "default", 0.0);
+ set_state(PART:"elm.icon.clipper", "default", 0.0);
+ run_program(PROGRAM:"label_set,animation,done");
+ run_program(PROGRAM:"icon_set,animation,done");
+ }
+ }
+ program { name: "label_set,animation,forward";
+ signal: "elm,state,label_set,forward";
+ source: "elm";
+ after: "label_set,animation";
+ }
+ program { name: "label_set,animation,backward";
+ signal: "elm,state,label_set,backward";
+ source: "elm";
+ after: "label_set,animation";
+ }
+ program { name: "label_set,animation";
+ signal: "elm,state,label_set";
+ source: "elm";
+ action: STATE_SET "animation" 0.0;
+ target: "elm.text.clipper";
+ target: "elm.text_new.clipper";
+ transition: LINEAR 0.2;
+ after: "label_set,animation,done";
+ }
+ program { name: "label_set,animation,done";
+ action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
+ }
+ program { name: "label,reset";
+ signal: "elm,state,label,reset";
+ source: "elm";
+ script {
+ set_state(PART:"elm.text_new.clipper", "default", 0.0);
+ if (get_int(item_state) != ITEM_STATE_DISABLED)
+ set_state(PART:"elm.text.clipper", "default", 0.0);
+ else
+ set_state(PART:"elm.text.clipper", "disabled", 0.0);
+ }
+ }
+ program { name: "icon_set,animation,forward";
+ signal: "elm,state,icon_set,forward";
+ source: "elm";
+ after: "icon_set,animation";
+ }
+ program { name: "icon_set,animation,backward";
+ signal: "elm,state,icon_set,backward";
+ source: "elm";
+ after: "icon_set,animation";
+ }
+ program { name: "icon_set,animation";
+ signal: "elm,state,icon_set";
+ source: "elm";
+ action: STATE_SET "animation" 0.0;
+ target: "elm.icon.clipper";
+ target: "elm.icon_new.clipper";
+ transition: LINEAR 0.2;
+ after: "icon_set,animation,done";
+ }
+ program { name: "icon_set,animation,done";
+ action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
+ }
+ program { name: "icon,reset";
+ signal: "elm,state,icon,reset";
+ source: "elm";
+ script {
+ set_state(PART:"elm.icon_new.clipper", "default", 0.0);
+ if (get_int(item_state) != ITEM_STATE_DISABLED)
+ set_state(PART:"elm.icon.clipper", "default", 0.0);
+ else
+ set_state(PART:"elm.icon.clipper", "disabled", 0.0);
+ }
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.icon", st, 30, vl);
+ if (!strcmp(st, "icononly"))
+ {
+ set_state(PART:"elm.swallow.icon", "visible", 0.0);
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"padding_after_icon", "visible", 0.0);
+ }
+ set_state(PART:"elm.text", "visible", 0.0);
+ }
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.icon", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+ set_state(PART:"icon_rect", "icononly", 0.0);
+ set_state(PART:"padding_after_icon", "icononly", 0.0);
+ }
+ set_state(PART:"elm.text", "default", 0.0);
+ }
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.icon", "visible", 0.0);
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"padding_after_icon", "visible", 0.0);
+ }
+ else
+ {
+ set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+ set_state(PART:"icon_rect", "icononly", 0.0);
+ set_state(PART:"padding_after_icon", "icononly", 0.0);
+ }
+ }
+ }
+ }
+}
+
+group { name: "elm/toolbar/item/item_horizontal";
+ inherit: "elm/toolbar/item/default";
+ script {
+ public item_state = ITEM_STATE_ENABLED;
+ }
+ parts {
+ part { name: "icon_rect";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 0.0 0.5;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ align: 0.0 0.5;
+ }
+ }
+ part { name: "padding_after_icon";
+ description { state: "default" 0.0; //when only icon or no icon is there
+ rel1.relative: 1.0 0.0;
+ fixed: 1 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: 6 0;
+ }
+ }
+ part { name: "padding_before_text";
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "elm.text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ to_x: "elm.text";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ min: 6 0;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "padding_before_text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_before_text";
+ to_y: "padding_right_bottom";
+ }
+ aspect_preference: VERTICAL;
+ }
+ description { state: "icononly" 0.0;
+ aspect_preference: VERTICAL;
+ }
+ }
+ part { name: "elm.swallow.icon_new";
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "padding_before_text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_before_text";
+ to_y: "padding_right_bottom";
+ }
+ aspect_preference: VERTICAL;
+ }
+ description { state: "icononly" 0.0;
+ aspect_preference: VERTICAL;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_after_icon";
+ to_y: "padding_left_top";
+ }
+ text {
+ style: "toolbar_style";
+ min: 1 0;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ part { name: "elm.text_new";
+ type: TEXTBLOCK;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_after_icon";
+ to_y: "padding_left_top";
+ }
+ text {
+ style: "toolbar_style";
+ min: 1 0;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ }
+}
+
+group { name: "elm/toolbar/separator/default";
+ parts {
+ part { name: "base";
+ type: RECT;
+ description { state: "default" 0.0;
+ min: 3 1;
+ max: 3 9999;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "separator_left";
+ type: RECT;
+ description { state: "default" 0.0;
+ min: 1 1;
+ max: 1 9999;
+ fixed: 1 1;
+ rel1 {
+ relative: 0.0 0.1;
+ offset: 0 0;
+ }
+ rel2 {
+ relative: 0.0 0.9;
+ offset: 1 0;
+ }
+ color: TOOLBAR_ITEM_SEPARATOR_LEFT_COLOR_INC;
+ }
+ }
+ part { name: "separator_middle";
+ type: RECT;
+ description { state: "default" 0.0;
+ min: 1 1;
+ max: 1 9999;
+ fixed: 1 1;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: 0 0;
+ to: "separator_left";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: 1 -1;
+ to: "separator_left";
+ }
+ color: TOOLBAR_ITEM_SEPARATOR_MIDDLE_COLOR_INC;
+ }
+ }
+ part { name: "separator_right";
+ type: RECT;
+ description { state: "default" 0.0;
+ min: 1 1;
+ max: 1 9999;
+ fixed: 1 1;
+ rel1 {
+ relative: 1.0 0.0;
+ offset: 0 0;
+ to: "separator_middle";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: 1 -1;
+ to: "separator_middle";
+ }
+ color: TOOLBAR_ITEM_SEPARATOR_RIGHT_COLOR_INC;
+ }
+ }
+ }
+}
+
+group { name: "elm/toolbar/object/default";
+ parts {
+ part { name: "elm.swallow.object"; // object group
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ }
+ }
+ }
+}
+
+group { name: "elm/toolbar/base/tabbar";
+ alias: "elm/toolbar/base/tabbar/item_horizontal";
+ images {
+ image: "00_winset_control_tabbar_bg_top.png" COMP;
+ }
+
+ parts {
+ part { name: "base";
+ mouse_events: 1;
+ description { state: "default" 0.0;
+ image.normal: "00_winset_control_tabbar_bg_top.png";
+ }
+ }
+ part { name: "clipper";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ to: "base";
+ offset: 2 2;
+ }
+ rel2 {
+ to: "base";
+ offset: -3 -3;
+ }
+ }
+ }
+ part { name: "elm.swallow.content";
+ clip_to: "clipper";
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ rel1.to: "clipper";
+ rel2.to: "clipper";
+ }
+ }
+ part { name: "event";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ }
+}
+
+group { name: "elm/toolbar/item/tabbar";
+ images {
+ image: "00_winset_tabbar_focus.png" COMP;
+ }
+
+ data.item: "transition_animation_on" "1";
+ script {
+ public item_state = ITEM_STATE_ENABLED;
+ }
+ parts {
+ part { name: "bg";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ image {
+ normal: "00_winset_tabbar_focus.png";
+ }
+ image.middle: SOLID;
+ fill.smooth: 0;
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 255 255 255 255;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ }
+ }
+ part { name: "padding_left_top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel2.relative: 0.0 0.0;
+ min: 10 8;
+ fixed: 1 1;
+ visible: 1;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "padding_right_bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 1.0;
+ rel1.relative: 1.0 1.0;
+ min: 10 5;
+ fixed: 1 1;
+ visible: 1;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "icon_rect";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ align: 0.5 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "visible" 0.0;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ fixed: 0 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ align: 0.5 0.0;
+ color: 0 0 0 0;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "padding_after_icon";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 0.0 0.0;
+ rel1 {
+ relative: 0.0 1.0;
+ to: "icon_rect";
+ }
+ rel2.to: "icon_rect";
+ fixed: 0 1;
+ min: 0 0;
+ color: 0 0 0 0;
+ }
+ description { state: "visible" 0.0;
+ align: 0.0 0.0;
+ rel1 {
+ relative: 0.0 1.0;
+ to: "icon_rect";
+ }
+ rel2.to: "icon_rect";
+ fixed: 0 1;
+ min: 0 0;
+ color: 0 0 0 0;
+ }
+ description { state: "icononly" 0.0;
+ inherit: "default" 0.0;
+ }
+ }
+ part { name: "padding_before_text";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 0.5 1.0;
+ rel1 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "elm.text";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_right_bottom";
+ to_y: "elm.text";
+ }
+ fixed: 0 1;
+ min: 0 0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "elm.icon.clipper";
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.5 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ fixed: 0 1;
+ }
+ description { state: "visible" 0.0;
+ fixed: 0 1;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_before_text";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ description { state: "icononly" 0.0;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ }
+ part { name: "elm.swallow.icon_new";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "elm.icon_new.clipper";
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.5 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_left_top";
+ }
+ fixed: 0 1;
+ }
+ description { state: "visible" 0.0;
+ fixed: 0 1;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_right_bottom";
+ to_y: "padding_before_text";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ description { state: "icononly" 0.0;
+ min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+ rel1 {
+ relative: 1.0 1.0;
+ to: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ aspect: 1.0 1.0;
+ aspect_preference: HORIZONTAL;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "elm.text.clipper";
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_left_top";
+ to_y: "padding_after_icon";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
+ fixed: 1 1;
+ text {
+ style: "toolbar_style";
+ min: 0 1;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ part { name: "elm.text_new";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ clip_to: "elm.text_new.clipper";
+ description { state: "default" 0.0;
+ visible: 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_left_top";
+ to_y: "padding_after_icon";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to: "padding_right_bottom";
+ }
+ color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
+ fixed: 1 1;
+ text {
+ style: "toolbar_style";
+ min: 0 1;
+ }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ part { name: "elm.text.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 153;
+ }
+ }
+ part { name: "elm.text_new.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 153;
+ }
+ }
+ part { name: "elm.icon.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 153;
+ }
+ }
+ part { name: "elm.icon_new.clipper";
+ type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ }
+ description { state: "animation" 0.0;
+ color: 255 255 255 255;
+ }
+ description { state: "disabled" 0.0;
+ color: 255 255 255 153;
+ }
+ }
+ part { name: "event";
+ type: RECT;
+ mouse_events: 1;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ }
+ programs {
+ program { name: "go_active";
+ signal: "elm,state,selected";
+ source: "elm";
+ action: STATE_SET "selected" 0.0;
+ target: "bg";
+ transition: LINEAR 0.2;
+ }
+ program { name: "go_passive";
+ signal: "elm,state,unselected";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ transition: LINEAR 0.1;
+ }/*
+ program { name: "pressed";
+ signal: "mouse,down,1";
+ source: "event";
+ action: STATE_SET "selected" 0.0;
+ target: "bg";
+ target: "elm.text";
+ target: "elm.text_new";
+ transition: LINEAR 0.2;
+ }
+ program { name: "unpressed";
+ signal: "mouse,up,1";
+ source: "event";
+ action: STATE_SET "default" 0.0;
+ target: "bg";
+ target: "elm.text";
+ target: "elm.text_new";
+ transition: LINEAR 0.1;
+ }*/
+ program { name: "go";
+ signal: "mouse,up,1";
+ source: "event";
+ action: SIGNAL_EMIT "elm,action,click" "elm";
+ }
+ program { name: "mouse,in";
+ signal: "mouse,in";
+ source: "event";
+ action: SIGNAL_EMIT "elm,mouse,in" "elm";
+ }
+ program { name: "mouse,out";
+ signal: "mouse,out";
+ source: "event";
+ action: SIGNAL_EMIT "elm,mouse,out" "elm";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ script {
+ set_int(item_state, ITEM_STATE_DISABLED);
+ set_state(PART:"bg", "disabled", 0.0);
+ set_state(PART:"elm.text.clipper", "disabled", 0.0);
+ set_state(PART:"elm.icon.clipper", "disabled", 0.0);
+ run_program(PROGRAM:"label_set,animation,done");
+ run_program(PROGRAM:"icon_set,animation,done");
+ }
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ script {
+ set_int(item_state, ITEM_STATE_ENABLED);
+ set_state(PART:"bg", "default", 0.0);
+ set_state(PART:"elm.text.clipper", "default", 0.0);
+ set_state(PART:"elm.icon.clipper", "default", 0.0);
+ run_program(PROGRAM:"label_set,animation,done");
+ run_program(PROGRAM:"icon_set,animation,done");
+ }
+ }
+ program { name: "label_set,animation,forward";
+ signal: "elm,state,label_set,forward";
+ source: "elm";
+ after: "label_set,animation";
+ }
+ program { name: "label_set,animation,backward";
+ signal: "elm,state,label_set,backward";
+ source: "elm";
+ after: "label_set,animation";
+ }
+ program { name: "label_set,animation";
+ signal: "elm,state,label_set";
+ source: "elm";
+ action: STATE_SET "animation" 0.0;
+ target: "elm.text.clipper";
+ target: "elm.text_new.clipper";
+ transition: LINEAR 0.2;
+ after: "label_set,animation,done";
+ }
+ program { name: "label_set,animation,done";
+ action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
+ }
+ program { name: "label,reset";
+ signal: "elm,state,label,reset";
+ source: "elm";
+ script {
+ set_state(PART:"elm.text_new.clipper", "default", 0.0);
+ if (get_int(item_state) != ITEM_STATE_DISABLED)
+ set_state(PART:"elm.text.clipper", "default", 0.0);
+ else
+ set_state(PART:"elm.text.clipper", "disabled", 0.0);
+ }
+ }
+ program { name: "icon_set,animation,forward";
+ signal: "elm,state,icon_set,forward";
+ source: "elm";
+ after: "icon_set,animation";
+ }
+ program { name: "icon_set,animation,backward";
+ signal: "elm,state,icon_set,backward";
+ source: "elm";
+ after: "icon_set,animation";
+ }
+ program { name: "icon_set,animation";
+ signal: "elm,state,icon_set";
+ source: "elm";
+ action: STATE_SET "animation" 0.0;
+ target: "elm.icon.clipper";
+ target: "elm.icon_new.clipper";
+ transition: LINEAR 0.2;
+ after: "icon_set,animation,done";
+ }
+ program { name: "icon_set,animation,done";
+ action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
+ }
+ program { name: "icon,reset";
+ signal: "elm,state,icon,reset";
+ source: "elm";
+ script {
+ set_state(PART:"elm.icon_new.clipper", "default", 0.0);
+ if (get_int(item_state) != ITEM_STATE_DISABLED)
+ set_state(PART:"elm.icon.clipper", "default", 0.0);
+ else
+ set_state(PART:"elm.icon.clipper", "disabled", 0.0);
+ }
+ }
+ program { name: "text_show";
+ signal: "elm,state,text,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.icon", st, 30, vl);
+ if (!strcmp(st, "icononly"))
+ {
+ set_state(PART:"elm.swallow.icon", "visible", 0.0);
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"padding_after_icon", "visible", 0.0);
+ }
+ set_state(PART:"elm.text", "visible", 0.0);
+ }
+ }
+ program { name: "text_hide";
+ signal: "elm,state,text,hidden";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.swallow.icon", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+ set_state(PART:"icon_rect", "icononly", 0.0);
+ set_state(PART:"padding_after_icon", "icononly", 0.0);
+ }
+ set_state(PART:"elm.text", "default", 0.0);
+ }
+ }
+ program { name: "icon_show";
+ signal: "elm,state,icon,visible";
+ source: "elm";
+ script {
+ new st[31];
+ new Float:vl;
+ get_state(PART:"elm.text", st, 30, vl);
+ if (!strcmp(st, "visible"))
+ {
+ set_state(PART:"elm.swallow.icon", "visible", 0.0);
+ set_state(PART:"icon_rect", "visible", 0.0);
+ set_state(PART:"padding_after_icon", "visible", 0.0);
+ }
+ else
+ {
+ set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+ set_state(PART:"icon_rect", "icononly", 0.0);
+ set_state(PART:"padding_after_icon", "icononly", 0.0);
+ }
+ }
+ }
+ }
+}
+
+group { name: "elm/toolbar/item/tabbar/item_horizontal";
+ inherit: "elm/toolbar/item/tabbar";
+ script {
+ public item_state = ITEM_STATE_ENABLED;
+ }
+ parts {
+ part { name: "icon_rect";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 0.0 0.5;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ align: 0.0 0.5;
+ }
+ }
+ part { name: "padding_after_icon";
+ description { state: "default" 0.0; //when only icon or no icon is there
+ rel1.relative: 1.0 0.0;
+ fixed: 1 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: 6 0;
+ }
+ }
+ part { name: "padding_before_text";
+ description { state: "default" 0.0; //when only icon or no icon is there
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "elm.text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ to_x: "elm.text";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ min: 6 0;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "padding_before_text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_before_text";
+ to_y: "padding_right_bottom";
+ }
+ aspect_preference: VERTICAL;
+ }
+ description { state: "icononly" 0.0;
+ aspect_preference: VERTICAL;
+ }
+ }
+ part { name: "elm.swallow.icon_new";
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "padding_left_top";
+ to_y: "padding_right_bottom";
+ }
+ fixed: 1 0;
+ }
+ description { state: "visible" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "padding_before_text";
+ to_y: "padding_left_top";
+ }
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "padding_before_text";
+ to_y: "padding_right_bottom";
+ }
+ aspect_preference: VERTICAL;
+ }
+ description { state: "icononly" 0.0;
+ aspect_preference: VERTICAL;
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_after_icon";
+ to_y: "padding_left_top";
+ }
+ text {
+ style: "toolbar_style";
+ min: 1 0;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ part { name: "elm.text_new";
+ type: TEXTBLOCK;
+ description { state: "default" 0.0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "padding_after_icon";
+ to_y: "padding_left_top";
+ }
+ text {
+ style: "toolbar_style";
+ min: 1 0;
+ }
+ }
+ description { state: "selected" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "clicked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ description { state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+ }
+ }
+ }
+}
+
+group { name: "elm/toolbar/base/naviframe";
+ parts {
+ part { name: "base";
+ mouse_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "clipper";
+ type: RECT;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ to: "base";
+ offset: 2 2;
+ }
+ rel2 {
+ to: "base";
+ offset: -3 -3;
+ }
+ }
+ }
+ part { name: "elm.swallow.content";
+ clip_to: "clipper";
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ rel1.to: "clipper";
+ rel2.to: "clipper";
+ }
+ }
+ part { name: "event";
+ type: RECT;
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ }
+}
+
+group { name: "elm/toolbar/object/naviframe";
+ parts {
+ part { name: "elm.swallow.object"; // object group
+ type: SWALLOW;
+ description {
+ state: "default" 0.0;
+ rel1.offset: 5 0;
+ rel2.offset: -6 -1;
+ }
+ }
+ }
+}
+
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
+#define FONT_BOLD_TYPE "SLP:style=Bold"
+#define FONT_MEDIUM_TYPE "SLP:style=Medium"
+#define FONT_REGULAR_TYPE "SLP:style=Regular"
+#define FONT_ROMAN_TYPE "SLP:style=Roman"
+#define FONT_COLOR 255 255 255 255
-#define FONT_NANE "SLP:style=Bold"
-#define FONT_NORMAL_NANE "SLP:style=Medium"
-#define FONT_COLOR 255 255 255 255
+#define FONT_START_COLOR 255 255 255 255
+#define FONT_END_COLOR 142 142 142 255
+#define FONT_TRIM_START_COLOR 56 56 56 255
+#define FONT_TRIM_END_COLOR 255 255 255 255
+#define FONT_BOOKMARK_TITLE 249 249 249 255
-#define FONT_START_COLOR 149 149 149 255
-#define FONT_END_COLOR 149 149 149 255
-
#define TITLE_FONT_SIZE 28
+#define TEXT_TRIM_SIZE 25
\ No newline at end of file
# List of source files containing translatable strings.
-video-player.c
-mp-util.c
-mp-video-app-ctrl.c
-mp-video-view-ctrl.c
-mp-video-display-view.c
-mp-video-info-view.c
-mp-external-ug.c
-mp-util-media-service.c
-mp-video-sound-path-ctrl.c
-mp-video-streaming-view.c
-mp-video-streaming-ctrl.c
-mp-external-appsvc.c
\ No newline at end of file
+PlayViewCtrl.c
msgstr "Lizenz abgelaufen"
msgid "IDS_VPL_POP_LOADING_ING"
-msgstr "Ladevorgang läuft"
+msgstr "Ladevorgang läuft..."
msgid "IDS_VPL_POP_NO_FILES"
msgstr "Keine Dateien"
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "Ihr Gerät ist nicht autorisiert, dieses kopiergeschützte DivX® Video abzuspielen."
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "Bestät."
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "Zu-\nschneiden"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "Video kann während eines Anrufs nicht wiedergegeben werden"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Aufnahme"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Video"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1-Kanal"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1-Sound-Effekte nur im Kopfhörer-Modus möglich"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Breite"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Länge"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "Η συσκευή σας δεν έχει εξουσιοδότηση για αναπαραγωγή αυτού του προστατευμένου βίντεο DivX®"
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "Επιβεβαίωση"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "Ξάκρισμα"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "Δεν είναι δυνατή η αναπαραγωγή βίντεο κατά την κλήση"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Κανονικό"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Φωνή"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Ταινία"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1 καν."
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "Τo εφέ ήχων του καναλιού 7.1 εκτελείται μ στη λειτουργία ακουστικών"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Γεωγραφικό πλάτος"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Γεωγραφικό μήκος"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "Your device is not authorized to play this DivX® protected video."
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "Confirm"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "Trim"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "Unable to play video during call"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Voice"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Movie"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1 channel sound effect works in earphone mode only"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Longitude"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "Su aparato no esta autorizado para reproducir este video de DivX® protegido."
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "Confirmar"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "Recortar"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "No se puede reproducir vídeo durante la llamada"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Voz"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Película"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "Can. 7.1"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "El efecto de sonido del canal 7.1 sólo funciona en modo auricular"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Latitud"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Longitud"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "Votre appareil n’est pas autorisé à lire cette vidéo protégée DivX®."
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "Confirmer"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "Rogner"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "Impossible de lire la vidéo pendant un appel"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Voix"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Vidéo"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "L'effet sonore 7.1 ne fonctionne qu'en mode Ecouteur uniquement"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Longitude"
+
msgstr "Licenza scaduta"
msgid "IDS_VPL_POP_LOADING_ING"
-msgstr "Caricamento"
+msgstr "Caricamento..."
msgid "IDS_VPL_POP_NO_FILES"
msgstr "Nessun file"
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "Il dispositivo non è autorizzato a riprodurre un video DivX® protetto"
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "Conferma"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "Ritaglia"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "Impossibile riprodurre durante chiamata"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normale"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Voce"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Filmato"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1 ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "L'effetto sonoro a 7.1 canali funziona solo in modalità auricolare"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Latitudine"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Longitudine"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "このデバイスではDivX®保護ビデオを再生できません"
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "確認"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "整備"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "通話中はビデオ再生できません"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "標準"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "音声"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "映画"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1チャンネルは、イヤホンモードでのみ使用できます。"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "緯度"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "経度"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "귀하의 제품은 DivX® DRM이 적용된 동영상의 재생 권한이 없습니다."
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "확인"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "잘라내기"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "통화 중에는 동영상을 재생할 수 없습니다"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "보통"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "음성"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "영화"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1채널"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1채널 음향효과는 이어폰 연결 시에 적용됩니다"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "위도"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "경도"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "Uw apparaat heeft geen toestemming om video met DivX®-beveiliging af te spelen"
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "OK"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "Bijsnijd."
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "Kan video niet afspelen tijdens gesprek"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normaal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Spraak"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Film"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1-kanaals geluidseffect werkt alleen met oortelefoonstand"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Breedtegraad"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Lengtegraad"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "O seu dispositivo não está autorizado a reproduzir vídeos protegidos DivX®"
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "Confirmar"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "Cortar"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "Impossível reproduzir vídeo durante chamada"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Voz"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Filme"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1cn"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "O efeito de som do canal 7.1 funciona apenas no modo de auricular"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Longitude"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "Это устройство не авторизовано для воспроизведения защищенного видео DivX®"
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "Да"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "Обрезать"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "Воспроизведение видео во время вызова невозможно"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Обычный"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Голос"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Фильм"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1 кан."
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1-канальный звуковой эффект доступен только в режиме наушников"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Широта"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Долгота"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "Cihazınızın DivX korumalı videoyu oynatma izni yok"
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "Onayla"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "Kes"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "Görüşme sırasında video oynatılamıyor"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Ses"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Film"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1 kanal ses efekti sadece kulaklık modunda çalışır"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Enlem"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Boylam"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "您的设备没有被授权播放这个DivX®加密的视频."
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "确认"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "剪切"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "通话中无法播放视频"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "正常"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "语音"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "电影"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1 声道声音效果只适用于耳机模式"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "纬度"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "经度"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "裝置未獲授權,無法播放此DivX®保護的影片"
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "確認"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "修剪"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "通話期間無法播放影片"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "正常"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "語音"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "電影"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1 聲道"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1 聲道音效只適用於耳機模式"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "緯度"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "經度"
+
msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
msgstr "您的設備沒有被授權播放這個DivX®加密的視頻。"
-msgid "IDS_VPL_SK_CONFIRM"
-msgstr "確認"
-
msgid "IDS_VPL_SK3_TRIM"
msgstr "修剪"
msgstr "剪輯"
msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
-msgstr "å½±å\83\8få\88\86享"
+msgstr "å\88\86享影ç\89\87"
msgid "IDS_VPL_HEADER_VIDEO_LIST"
msgstr "影片清單"
msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
msgstr "無法在通話期間播放影片"
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "正常"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "語音"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "電影"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1 聲道"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1 聲道音效只適用於耳機模式"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "緯度"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "經度"
+
--- /dev/null
+/*
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+ *
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
+ */
+
+
+#include <drm_client.h>
+#include <drm_client_types.h>
+
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-drm-ctrl.h"
+
+static int nCheckConsumption = VIDEO_DRM_CONSUMPTION_STATE_DISABLE;
+
+static drm_file_type_e nDrmFileType = DRM_TYPE_UNDEFINED;
+
+#define ACCUMULATED_DATE 86400 /* 24*60*60 */
+#define RO_MESSAGE_LEN 1024
+
+#define MOUNTH_COUNT 12
+#define DAY_COUNT 30
+#define HOUR_COUNT 24
+
+static bool bForwordLock = FALSE;
+/*
+ * External function
+ */
+void MpVideoDrmInit()
+{
+ VideoLogInfo("");
+}
+
+bool MpVideoDrmGetForwardLookState()
+{
+ VideoLogInfo("");
+
+ return bForwordLock;
+}
+
+void MpVideoDrmSetConsumptionState(int nState)
+{
+ VideoLogInfo("");
+
+ nCheckConsumption = nState;
+}
+
+int MpVideoDrmGetConsumption()
+{
+ VideoLogInfo("");
+
+ return nCheckConsumption;
+}
+
+void MpVideoDrmStartConsumption(char *szPath)
+{
+ VideoLogInfo("");
+
+
+ if (MpVideoDrmGetConsumption()) {
+
+ } else {
+ VideoLogInfo("Disable consumption.");
+ }
+}
+
+void MpVideoDrmPauseConsumption()
+{
+ VideoLogInfo("");
+
+ if (MpVideoDrmGetConsumption()) {
+ } else {
+ VideoLogInfo("Disable consumption.");
+ }
+}
+
+void MpVideoDrmResumeConsumption()
+{
+ VideoLogInfo("");
+
+ if (MpVideoDrmGetConsumption()) {
+ } else {
+ VideoLogInfo("Disable consumption.");
+ }
+}
+
+void MpVideoDrmStopConsumption()
+{
+ VideoLogInfo("");
+
+ if (MpVideoDrmGetConsumption()) {
+ MpVideoDrmSetConsumptionState (VIDEO_DRM_CONSUMPTION_STATE_DISABLE);
+ } else {
+ VideoLogInfo("Disable consumption.");
+ }
+}
+
+bool MpVideoDrmIsDrmFile(char *szPath)
+{
+ VideoLogInfo("");
+
+ if (!szPath) {
+ VideoLogInfo("[ERR]");
+ return FALSE;
+ }
+ int nRet = DRM_RETURN_SUCCESS;
+ drm_bool_type_e is_drm = DRM_FALSE;
+
+ nRet = drm_is_drm_file(szPath, &is_drm);
+ if(nRet != DRM_RETURN_SUCCESS) {
+ VideoLogInfo("[ERR]drm_is_drm_file : %d", nRet);
+ return FALSE;
+ }
+
+ if(is_drm != DRM_TRUE) {
+ VideoLogInfo("It's not drm file.");
+ return FALSE;
+ }
+
+
+ drm_file_type_e drm_type = DRM_TYPE_UNDEFINED;
+
+ nRet = drm_get_file_type(szPath, &drm_type);
+ if(nRet != DRM_RETURN_SUCCESS) {
+ VideoLogInfo("[ERR]drm_get_file_type : %d", nRet);
+ return FALSE;
+ }
+
+ nDrmFileType = drm_type;
+
+ if(drm_type != DRM_TYPE_OMA_V1 && drm_type != DRM_TYPE_OMA_V2) {
+ VideoLogInfo("It's not OMA drm file : %d", drm_type);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+bool MpVideoDrmHasValidRo(char *szPath)
+{
+ VideoLogInfo("");
+
+ if (!szPath) {
+ VideoLogInfo("[ERR]");
+ return FALSE;
+ }
+
+ int nRet = DRM_RETURN_SUCCESS;
+ drm_license_status_e license_status = DRM_LICENSE_STATUS_UNDEFINED;
+ nRet = drm_get_license_status(szPath, DRM_PERMISSION_TYPE_PLAY, &license_status);
+ if(nRet != DRM_RETURN_SUCCESS) {
+ VideoLogInfo("[ERR]drm_get_license_status : %d", nRet);
+ return FALSE;
+ }
+
+ if(license_status != DRM_LICENSE_STATUS_VALID) {
+ VideoLogInfo("Invalid license status : %d", license_status);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+bool MpVideoDrmCheckForward(char *szPath)
+{
+ VideoLogInfo("");
+
+ if (!szPath) {
+ VideoLogInfo("[ERR]");
+ return FALSE;
+ }
+
+ int nRet = DRM_RETURN_SUCCESS;
+ drm_action_allowed_data_s action_data;
+ drm_bool_type_e is_allow = DRM_FALSE;
+ memset(&action_data, 0, sizeof(drm_action_allowed_data_s));
+ snprintf(action_data.file_path , DRM_MAX_LEN_FILEPATH, "%s", szPath);
+
+ nRet = drm_is_action_allowed(DRM_IS_FORWARDING_ALLOWED,&action_data, &is_allow);
+ if(nRet != DRM_RETURN_SUCCESS) {
+ VideoLogInfo("[ERR]drm_is_action_allowed : %d", nRet);
+ bForwordLock = FALSE;
+ return FALSE;
+ }
+
+ if(is_allow == DRM_TRUE) {
+ bForwordLock = TRUE;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+MpVideoDrmInfo *MpVideoDrmCheckLeftRo(char *szVideoTitle, char *szPath)
+{
+ VideoLogInfo("");
+ MpVideoDrmInfo *pResult = NULL;
+ pResult = calloc(1, sizeof(MpVideoDrmInfo));
+
+ if (!szVideoTitle) {
+ VideoLogInfo("[ERR] No has video title.");
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_INTERNAL;
+ return pResult;
+ }
+
+ if (!szPath) {
+ VideoLogInfo("[ERR] No has path.");
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_INTERNAL;
+ return pResult;
+ }
+
+
+
+ int nRet = DRM_RETURN_SUCCESS;
+ drm_constraint_info_s constraint_info;
+ memset(&constraint_info, 0, sizeof(drm_constraint_info_s));
+ nRet = drm_get_constraint_info(szPath, DRM_PERMISSION_TYPE_PLAY, &constraint_info);
+ if(nRet != DRM_RETURN_SUCCESS) {
+ VideoLogInfo("[ERR]drm_get_file_info : %d", nRet);
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_INTERNAL;
+ return pResult;
+ }
+
+ if(constraint_info.const_type.is_unlimited) {
+ VideoLogInfo("Unlimited DRM Contents");
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+ return pResult;
+ }
+ else if(constraint_info.const_type.is_count) {
+ if(constraint_info.remaining_count <= 0) {
+ VideoLogInfo("Count expired : %d / %d",
+ constraint_info.remaining_count,
+ constraint_info.original_count);
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_COUNT;
+ pResult->nData = constraint_info.remaining_count;
+ return pResult;
+ }
+ else if(constraint_info.remaining_count == 1 ||
+ constraint_info.remaining_count == 2) {
+ VideoLogInfo("Count Small : %d / %d",
+ constraint_info.remaining_count,
+ constraint_info.original_count);
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_COUNT_SMALL;
+ pResult->nData = constraint_info.remaining_count;
+ return pResult;
+ }
+ else {
+ VideoLogInfo("Count valid : %d / %d",
+ constraint_info.remaining_count,
+ constraint_info.original_count);
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+ pResult->nData = constraint_info.remaining_count;
+ return pResult;
+ }
+ }
+ else if(constraint_info.const_type.is_datetime) {
+ VideoLogInfo("Start time: Year=%d,Month=%d,Day=%d,"
+ "Hour=%d, minute=%d, Second=%d",
+ constraint_info.start_time.tm_year,
+ constraint_info.start_time.tm_mon,
+ constraint_info.start_time.tm_mday,
+ constraint_info.start_time.tm_hour,
+ constraint_info.start_time.tm_min,
+ constraint_info.start_time.tm_sec);
+
+
+ VideoLogInfo("End time: Year=%d,Month=%d,Day=%d,"
+ "Hour=%d, minute=%d, Second=%d",
+ constraint_info.end_time.tm_year,
+ constraint_info.end_time.tm_mon,
+ constraint_info.end_time.tm_mday,
+ constraint_info.end_time.tm_hour,
+ constraint_info.end_time.tm_min,
+ constraint_info.end_time.tm_sec);
+
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+ return pResult;
+ }
+ else if(constraint_info.const_type.is_interval) {
+ VideoLogInfo("Interval time: Year=%d,Month=%d,Day=%d,"
+ "Hour=%d, minute=%d, Second=%d",
+ constraint_info.interval_time.tm_year,
+ constraint_info.interval_time.tm_mon,
+ constraint_info.interval_time.tm_mday,
+ constraint_info.interval_time.tm_hour,
+ constraint_info.interval_time.tm_min,
+ constraint_info.interval_time.tm_sec);
+
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_INTERVAL_FIRST_USE;
+ pResult->nData = ((constraint_info.interval_time.tm_year * MOUNTH_COUNT + constraint_info.interval_time.tm_mon) * DAY_COUNT + constraint_info.interval_time.tm_mday);
+ return pResult;
+
+ }
+ else if(constraint_info.const_type.is_timedcount) {
+ VideoLogInfo("DRM TimeCount "
+ "(original : %d, remainnig : %d, count_timer: %d)",
+ constraint_info.timed_original_count,
+ constraint_info.timed_remaining_count,
+ constraint_info.timed_count_timer);
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+ return pResult;
+ }
+ else if(constraint_info.const_type.is_accumulated) {
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_ACCUMULATED;
+ return pResult;
+ }
+ else if(constraint_info.const_type.is_individual) {
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+ return pResult;
+ }
+ else if(constraint_info.const_type.is_system) {
+ pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+ return pResult;
+ }
+
+ return pResult;
+}
+
+bool MpVideoDrmIsDivX(char *szPath)
+{
+ VideoLogInfo("");
+
+ if (!szPath) {
+ VideoLogInfo("[ERR]");
+ return FALSE;
+ }
+
+
+ int nRet = DRM_RETURN_SUCCESS;
+ drm_bool_type_e is_drm = DRM_FALSE;
+
+ nRet = drm_is_drm_file(szPath, &is_drm);
+ if(nRet != DRM_RETURN_SUCCESS) {
+ VideoLogInfo("[ERR]drm_is_drm_file : %d", nRet);
+ return FALSE;
+ }
+
+ if(is_drm != DRM_TRUE) {
+ VideoLogInfo("It's not drm file.");
+ return FALSE;
+ }
+
+ drm_file_type_e drm_type = DRM_TYPE_UNDEFINED;
+
+ nRet = drm_get_file_type(szPath, &drm_type);
+ if(nRet != DRM_RETURN_SUCCESS) {
+ VideoLogInfo("[ERR]drm_get_file_type : %d", nRet);
+ return FALSE;
+ }
+
+ nDrmFileType = drm_type;
+
+ if(drm_type != DRM_TYPE_DIVX ) {
+ VideoLogInfo("It's not DivX drm file : %d", drm_type);
+ return FALSE;
+ }
+
+ return TRUE;
+
+}
+
+bool MpVideoDrmCheckDivX(char *szPath)
+{
+ VideoLogInfo("");
+
+ if (!szPath) {
+ VideoLogInfo("[ERR]");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+void MpVideoDrmGetFileExtension(char *szPath, char *szContentType, int nContentTypeStrSize)
+{
+ if (!szContentType) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ if (!szPath) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ memset(szContentType, 0, nContentTypeStrSize);
+
+ drm_content_info_s content_info;
+ int nRet = DRM_RETURN_SUCCESS;
+ memset(&content_info, 0, sizeof(drm_content_info_s));
+
+ nRet = drm_get_content_info(szPath,&content_info);
+
+
+ VideoLogInfo("contentType: %s", content_info.mime_type);
+
+ strncpy(szContentType, content_info.mime_type, nContentTypeStrSize - 1);
+}
--- /dev/null
+/*
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+ *
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
+ */
+
+
+#include <app.h>
+#include <Elementary.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-external-ug.h"
+#include "mp-video-value-define.h"
+#include "mp-video-string-define.h"
+#include "mp-video-service-ctrl.h"
+
+
+#define UG_LIST_ITEMS_SIZE_MAX 32
+#define UG_SHARE_MENU_ITEM_MAX 6
+
+
+static ui_gadget_h pUiGadgetHandle = NULL;
+static Ecore_Event_Handler *pHardKeyEventHandler = NULL;
+static MpExternalUGType nCurUGType = MP_EXTERNAL_UG_NONE;
+
+
+static Evas_Object *pUGPopupHandle = NULL;
+
+
+typedef struct _External_Ug {
+ MpExternalUGType nType;
+ char *szUgName;
+} MpExternalUG;
+
+MpExternalUG st_MpExternalUG[] = {
+ {MP_EXTERNAL_UG_MESSAGE, "msg-composer-efl" },
+ {MP_EXTERNAL_UG_EMAIL, "email-composer-efl" },
+ {MP_EXTERNAL_UG_MYFILE_DETAIL, "myfile-detail-efl" },
+ {MP_EXTERNAL_UG_YOUTUBE, "youtube-efl" },
+ {MP_EXTERNAL_UG_BLUETOOTH, "setting-bluetooth-efl" },
+ {MP_EXTERNAL_UG_FTM, "fileshare-efl" },
+ {MP_EXTERNAL_UG_FACEBOOK, "facebook-efl" },
+};
+
+/*
+ * CALLBACK FUNCTION
+ */
+static Eina_Bool MpExternalUgHardkeyDownCb(void *pUserData, int nType,
+ void *pEvent)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR]");
+ return EINA_FALSE;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ MpExternalUGType nExternalUgState = MpExternalUgGetCurUgState();
+
+ if (nExternalUgState <= MP_EXTERNAL_UG_NONE ||
+ nExternalUgState >= MP_EXTERNAL_UG_MAX) {
+ VideoLogInfo
+ ("Return hardkey callback function because of no UG mode.");
+ return EINA_FALSE;
+ }
+
+ Ecore_Event_Key *pKeyEvent = (Ecore_Event_Key *) pEvent;
+
+ if (!strcmp(pKeyEvent->keyname, KEY_END)) {
+ VideoLogInfo("Bakc(End) key");
+ MpExternalUgUnload();
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+ }
+ if (!strcmp(pKeyEvent->keyname, HOME_KEY)) {
+ VideoLogInfo("Home key");
+ MpExternalUgUnload();
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+ }
+
+ return EINA_FALSE;
+}
+
+void MpExternalUgLayoutCb(ui_gadget_h pUiGadget, enum ug_mode nMode, void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+ Evas_Object *pLayoutBase = NULL;
+
+ pLayoutBase = ug_get_layout(pUiGadget);
+ if (!pLayoutBase) {
+ return;
+ }
+
+ switch (nMode) {
+ case UG_MODE_FULLVIEW:
+ evas_object_size_hint_weight_set(pLayoutBase, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(pAppData->pMainWindow, pLayoutBase);
+ evas_object_show(pLayoutBase);
+ break;
+
+ default:
+ VideoLogInfo("[DEFAUT!!!!!!!!]");
+ break;
+ }
+}
+
+void MpExternalUgResultCb(ui_gadget_h pUiGadget, service_h pService, void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+}
+
+void MpExternalUgDestroyCb(ui_gadget_h pUiGadget, void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ MpExternalUgUnload();
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+}
+
+static void MpExternalUGDestroyPopupList(void)
+{
+ VideoLogInfo("");
+
+
+ if(pUGPopupHandle) {
+ evas_object_del(pUGPopupHandle);
+ pUGPopupHandle = NULL;
+ }
+
+ MpUtilSetAlphaOfMainWindow(TRUE);
+}
+
+
+static void MpExternalUGPopupCb(void *pUserData, Evas_Object *pObject,
+ void *pEventInfo)
+{
+ VideoLogInfo("");
+
+ if(pUserData == NULL)
+ {
+ VideoLogInfo("[ERR]No have pUserData");
+ return;
+ }
+
+ MpExternalUGDestroyPopupList();
+}
+
+static void MpExternalUgResFn(service_h pRequest, service_h pReply, service_result_e nResult, void *pUserData)
+{
+ if(!pUserData)
+{
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+}
+
+static void MpExternalUGAppSvcLoad(MpExternalUGType nExternalUGType, void *pUserData)
+{
+
+ VideoLogInfo("");
+
+ if (pUserData == NULL) {
+ VideoLogInfo("[ERR]No have pUserData");
+ return;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ service_h pServiceHandle = NULL;
+ int ret_val = 0;
+ char pkg_name[STR_LEN_MAX] = {0,};
+
+ if(service_create(&pServiceHandle) != SERVICE_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR]service_create(&pServiceHandle)");
+ return;
+ }
+
+ switch(nExternalUGType)
+ {
+ case MP_EXTERNAL_UG_YOUTUBE:
+ strncpy(pkg_name,"org.tizen.youtube",STR_LEN_MAX-1);
+ break;
+
+ case MP_EXTERNAL_UG_FACEBOOK:
+ strncpy(pkg_name,"org.tizen.facebook",STR_LEN_MAX-1);
+ break;
+ default:
+ break;
+ }
+
+ if(service_set_operation(pServiceHandle, SERVICE_OPERATION_SEND) != SERVICE_ERROR_NONE)
+ {
+ if(pServiceHandle)
+ {
+ service_destroy(pServiceHandle);
+ }
+
+ VideoLogInfo("[ERR]service_set_operation fail.");
+ return;
+ }
+
+ if(nExternalUGType == MP_EXTERNAL_UG_YOUTUBE)
+ {
+ char xwin_id_str[12] = { 0, };
+ Ecore_X_Window xwin_id = (Ecore_X_Window)MpUtilGetMainWindowXID();
+ eina_convert_itoa(xwin_id, xwin_id_str);
+ VideoLogInfo("For YoutTube XID : %s", xwin_id_str);
+ service_add_extra_data(pServiceHandle, "XWINDOW_ID", xwin_id_str);
+ }
+
+ if(service_set_mime(pServiceHandle, "video/*") != SERVICE_ERROR_NONE)
+ {
+ if(pServiceHandle)
+ {
+ service_destroy(pServiceHandle);
+ }
+
+ VideoLogInfo("[ERR]service_set_mime fail.");
+ return;
+ }
+
+ if(service_set_uri(pServiceHandle, pAppData->szMediaUri) != SERVICE_ERROR_NONE)
+ {
+ if(pServiceHandle)
+ {
+ service_destroy(pServiceHandle);
+ }
+
+ VideoLogInfo("[ERR]service_set_uri fail.");
+ return;
+ }
+
+
+ if(service_set_package(pServiceHandle, pkg_name) != SERVICE_ERROR_NONE)
+ {
+ if(pServiceHandle)
+ {
+ service_destroy(pServiceHandle);
+ }
+
+ VideoLogInfo("[ERR]service_set_package fail : %d", ret_val);
+ return;
+ }
+
+ if(service_send_launch_request(pServiceHandle, MpExternalUgResFn, pUserData) != SERVICE_ERROR_NONE)
+ {
+ if(pServiceHandle)
+ {
+ service_destroy(pServiceHandle);
+ }
+
+ VideoLogInfo("[ERR]service_send_launch_request fail : %d", ret_val);
+ return;
+ }
+
+ service_destroy(pServiceHandle);
+}
+
+static void MpExternalUGSelectListItem(void *pUserData,Evas_Object *pObject,void *pEventInfo)
+{
+ VideoLogInfo("");
+
+ if(pUserData == NULL)
+ {
+ VideoLogInfo("[ERR]No have pUserData");
+ return;
+ }
+
+// VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ char *pLabel = (char *)elm_object_item_text_get((Elm_Object_Item *) pEventInfo);
+
+ if(pLabel)
+ {
+ MpExternalUGDestroyPopupList();
+
+ VideoLogInfo("Select Controlbar item of popup : %s", pLabel);
+
+ if(!strcmp(pLabel, MP_SHARE_MESSAGE))
+ {
+ MpExternalUgLoad(MP_EXTERNAL_UG_MESSAGE, pUserData);
+ }
+ else if(!strcmp(pLabel, MP_SHARE_EMAIL))
+ {
+ MpExternalUgLoad(MP_EXTERNAL_UG_EMAIL, pUserData);
+ }
+ else if(!strcmp(pLabel, MP_SHARE_BLUETOOTH))
+ {
+ MpExternalUgLoad(MP_EXTERNAL_UG_BLUETOOTH, pUserData);
+ }
+ else if(!strcmp(pLabel, MP_SHARE_FTM))
+ {
+ MpExternalUgLoad(MP_EXTERNAL_UG_FTM, pUserData);
+ }
+ else if(!strcmp(pLabel, MP_SHARE_FACEBOOK))
+ {
+ MpExternalUGAppSvcLoad(MP_EXTERNAL_UG_FACEBOOK, pUserData);
+ }
+ else if(!strcmp(pLabel, MP_SHARE_YOUTUBE))
+ {
+ MpExternalUGAppSvcLoad(MP_EXTERNAL_UG_YOUTUBE, pUserData);
+ }
+ }
+}
+
+/*
+ * External Function
+ */
+bool MpExternalUgLoad(MpExternalUGType nExternalUGType, void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR]");
+ return FALSE;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ struct ug_cbs cbs = { 0, };
+ service_h pService; //bundle *pBundleHandle = NULL;
+
+
+ cbs.layout_cb = MpExternalUgLayoutCb;
+ cbs.result_cb = MpExternalUgResultCb;
+ cbs.destroy_cb = MpExternalUgDestroyCb;
+ cbs.priv = (void *)pAppData;
+
+ service_create(&pService); //pBundleHandle = bundle_create();
+
+ UG_INIT_EFL(pAppData->pMainWindow, UG_OPT_INDICATOR_ENABLE);
+
+ if(pUiGadgetHandle)
+ {
+ MpExternalUgUnload();
+ }
+
+ switch (nExternalUGType)
+ {
+ case MP_EXTERNAL_UG_MESSAGE:
+ VideoLogInfo("MP_EXTERNAL_UG_MESSAGE");
+ //bundle_add(pBundleHandle, "ATTACHFILE", pAppData->szMediaUri);
+ service_add_extra_data(pService, "ATTACHFILE", pAppData->szMediaUri);
+ break;
+
+ case MP_EXTERNAL_UG_EMAIL:
+ VideoLogInfo("MP_EXTERNAL_UG_EMAIL");
+ //bundle_add(pBundleHandle, "RUN_TYPE", "5");
+ service_add_extra_data(pService, "RUN_TYPE", "5");
+ //bundle_add(pBundleHandle, "ATTACHMENT", pAppData->szMediaUri);
+ service_add_extra_data(pService, "ATTACHMENT", pAppData->szMediaUri);
+ break;
+
+ case MP_EXTERNAL_UG_MYFILE_DETAIL:
+ VideoLogInfo("MP_EXTERNAL_UG_MYFILE_DETAIL");
+ //bundle_add(pBundleHandle, "Path", pAppData->szMediaUri);
+ service_add_extra_data(pService, "Path", pAppData->szMediaUri);
+ break;
+
+ case MP_EXTERNAL_UG_YOUTUBE:
+ VideoLogInfo("MP_EXTERNAL_UG_YOUTUBE");
+ //bundle_add(pBundleHandle, "feature", "video_upload");
+ service_add_extra_data(pService, "feature", "video_upload");
+ //bundle_add(pBundleHandle, "video", pAppData->szMediaUri);
+ service_add_extra_data(pService, "video", pAppData->szMediaUri);
+ break;
+
+ case MP_EXTERNAL_UG_FACEBOOK:
+ VideoLogInfo("MP_EXTERNAL_UG_FACEBOOK");
+ //bundle_add(pBundleHandle, "feature", "video_upload");
+ service_add_extra_data(pService, "feature", "video_upload");
+ //bundle_add(pBundleHandle, "video", pAppData->szMediaUri);
+ service_add_extra_data(pService, "video", pAppData->szMediaUri);
+ break;
+
+ case MP_EXTERNAL_UG_BLUETOOTH:
+ VideoLogInfo("MP_EXTERNAL_UG_BLUETOOTH");
+ //bundle_add(pBundleHandle, "launch-type", "send");
+ service_add_extra_data(pService, "launch-type", "send");
+ //bundle_add(pBundleHandle, "filecount", "1");
+ service_add_extra_data(pService, "filecount", "1");
+ //bundle_add(pBundleHandle, "files", pAppData->szMediaUri);
+ service_add_extra_data(pService, "files", pAppData->szMediaUri);
+ break;
+
+ case MP_EXTERNAL_UG_FTM:
+ VideoLogInfo("MP_EXTERNAL_UG_FTM");
+ //bundle_add(pBundleHandle, "filecount", "1");
+ service_add_extra_data(pService, "filecount", "1");
+ //bundle_add(pBundleHandle, "files", pAppData->szMediaUri);
+ service_add_extra_data(pService, "files", pAppData->szMediaUri);
+ break;
+
+ default:
+ service_destroy(pService); //bundle_free(pBundleHandle);
+ return FALSE;
+ }
+
+ pUiGadgetHandle = ug_create(NULL, st_MpExternalUG[nExternalUGType].szUgName, UG_MODE_FULLVIEW, pService, &cbs);
+
+ nCurUGType = nExternalUGType;
+
+ service_destroy(pService); //bundle_free(pBundleHandle);
+
+ pHardKeyEventHandler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, (void *)MpExternalUgHardkeyDownCb, pUserData);
+
+ /* !!!!!SET ROTATE STATE!!!!! */
+
+ return TRUE;
+}
+
+void MpExternalUgUnload(void)
+{
+ VideoLogInfo("");
+
+ MpExternalUGDestroyPopupList();
+
+ if (pHardKeyEventHandler) {
+ ecore_event_handler_del(pHardKeyEventHandler);
+ pHardKeyEventHandler = NULL;
+ }
+
+ if (pUiGadgetHandle) {
+ ug_destroy(pUiGadgetHandle);
+ pUiGadgetHandle = NULL;
+ }
+
+ nCurUGType = MP_EXTERNAL_UG_NONE;
+}
+
+void MpExternalUgDestroyAll(void)
+{
+ VideoLogInfo("");
+
+ MpExternalUGDestroyPopupList();
+
+ ug_destroy_all();
+}
+
+int MpExternalUgGetCurUgState()
+{
+ VideoLogInfo("");
+
+ return (int)nCurUGType;
+}
+
+void MpExternalUgSetUgState(MpExternalUGType nExternalUGType)
+{
+ VideoLogInfo("");
+
+ nCurUGType = nExternalUGType;
+}
+
+bool MpExternalUgShow(void *pUserData, void *pParent)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR]");
+ return FALSE;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+
+ MpExternalUGDestroyPopupList();
+
+ MpUtilSetAlphaOfMainWindow(FALSE);
+
+ pUGPopupHandle = elm_ctxpopup_add(pParent);
+ elm_ctxpopup_direction_priority_set(pUGPopupHandle, ELM_CTXPOPUP_DIRECTION_DOWN,
+ ELM_CTXPOPUP_DIRECTION_RIGHT,
+ ELM_CTXPOPUP_DIRECTION_LEFT,
+ ELM_CTXPOPUP_DIRECTION_UP);
+
+ elm_object_style_set(pUGPopupHandle, "video/default");
+
+ evas_object_smart_callback_add(pUGPopupHandle, "dismissed", MpExternalUGPopupCb, (void *)pAppData);
+
+ elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_MESSAGE, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+ elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_EMAIL, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+ elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_BLUETOOTH, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+ elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_FTM, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+ elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_YOUTUBE, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+ elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_FACEBOOK, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+
+
+ int nPosX = 0;
+ int nPosY = 0;
+ int nW = 0;
+ int nH = 0;
+
+ if(MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_NORMAL ||
+ MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_REVERSE)
+ {
+ ecore_x_window_size_get(ecore_x_window_root_first_get(),&nW, &nH);
+ }
+ else {
+ ecore_x_window_size_get(ecore_x_window_root_first_get(),&nH, &nW);
+ }
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY) {
+ nPosX = ((nW / 5)/2) * elm_config_scale_get();
+ }
+ else if(nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE) {
+ nPosX = ((nW / 4)/2) * elm_config_scale_get();
+ }
+ else if(nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL) {
+ nPosX = ((nW / 4)/2) * elm_config_scale_get();
+ }
+ else if(nTmpPlayerType == MP_VIDEO_PLAYER_MMS) {
+ nPosX = ((nW / 4)/2) * elm_config_scale_get();
+ }
+
+ nPosY = elm_config_scale_get() * 200;
+
+ evas_object_move(pUGPopupHandle, nPosX, nPosY);
+
+ evas_object_show(pUGPopupHandle);
+
+ return TRUE;
+}
+void MpExternalUgHide()
+{
+ MpExternalUGDestroyPopupList();
+}
+
+
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-#include <media-svc.h>
-#include <visual-svc.h>
-#include <media-svc-error.h>
-#include <media-svc-types.h>
+
+#include <media_content.h>
+
#include "mp-video-log.h"
#include "mp-video-value-define.h"
#include "mp-util-media-service.h"
#include "mp-video-string-define.h"
+
+typedef struct
+{
+ media_folder_h pFolderHandle;
+ char *szFolderUrl;
+}st_FolderItem;
+
+
+static Eina_List *VideoFolderList = NULL;
static Eina_List *VideoItemList = NULL;
-static Eina_List *pAllTagList = NULL;
+static int nWhatFileType = MP_MEDIA_VIDEO_FILE_TYPE;
-MediaSvcHandle *pMediaSvcHandle = NULL;
-/*
- * Callback function
- */
-static int MpUtilMediaSvcMitemIterateCb(Mitem * pItem, void *pUserData)
+bool MpUtilMediaSvcIs3gpFile(char* szFileUri)
+{
+ VideoLogInfo("");
+
+ int nRet = FALSE;
+ char* szTmpUriPath = szFileUri;
+
+ if(szTmpUriPath)
+ {
+ char *szExt = NULL;
+ szExt = strrchr(szTmpUriPath, '.');
+
+ if((szExt != NULL) && ((szExt+1) != NULL))
+ {
+ if(!strcmp(szExt+1, "3gp"))
+ {
+ nRet = TRUE;
+ }
+ else
+ {
+ nRet = FALSE;
+ }
+ }
+ else
+ {
+ VideoLogInfo("No exist extension.");
+ nRet = FALSE;
+ }
+ }
+ else
+ {
+ VideoLogInfo("No exist file uri.");
+ nRet = FALSE;
+ }
+
+ return nRet;
+}
+
+static bool MpUtilMediaSvcIterateForGetVideoItemCb(media_info_h pVideoItem, void *pUserData)
+{
+ VideoLogInfo("");
+
+ media_info_h *pAssignFolderItem = (media_info_h*)pUserData;
+
+ if(pVideoItem != NULL)
+ {
+ char *szTmpStr = NULL;
+ media_info_clone(pAssignFolderItem, pVideoItem);
+ media_info_get_display_name(*pAssignFolderItem, &szTmpStr);
+ VideoLogInfo("Display name : %s", szTmpStr);
+
+ if(szTmpStr)
+ {
+ free(szTmpStr);
+ }
+ }
+
+ return FALSE;
+}
+
+static bool MpUtilMediaSvcIterateForVideoItemListViewCb(media_info_h pMediaItem, void *pUserData)
{
- VideoLogInfo("Cluster ID: %s, File path:%s", pItem->cluster_uuid, pItem->file_url);
+ VideoLogInfo("");
+
+ media_info_h pAssignMediaItem = NULL;
+ media_content_type_e nMediaType = MEDIA_CONTENT_TYPE_OTHERS;
+
+ media_info_get_media_type(pMediaItem, &nMediaType);
+ VideoLogInfo("nMediaType : %d", nMediaType);
+
+ if(nMediaType == MEDIA_CONTENT_TYPE_VIDEO)
+ {
+ char *szTmpItemFilePath = NULL;
+ char szItemFilePath[STR_LEN_MAX] = {0};
+
+ media_info_get_file_path(pMediaItem, &szTmpItemFilePath);
+ if(szItemFilePath == NULL)
+ {
+ VideoLogInfo("Fail to get file path of media item.");
+ return TRUE;
+ }
+
+ strncpy(szItemFilePath, szTmpItemFilePath, STR_LEN_MAX - 1);
+ free(szTmpItemFilePath);
+
+ VideoLogInfo("szItemFilePath : %s", szItemFilePath);
+
+ switch(nWhatFileType)
+ {
+ case MP_MEDIA_VIDEO_FILE_TYPE:
+ if(MpUtilMediaSvcIs3gpFile(szItemFilePath) == TRUE)
+ {
+ return TRUE;
+ }
+ break;
- if (pItem->type == MINFO_ITEM_VIDEO) {
+ case MP_MEDIA_CAMERA_FILE_TYPE:
+ if(MpUtilMediaSvcIs3gpFile(szItemFilePath) == FALSE)
+ {
+ return TRUE;
+ }
+ break;
+
+ case MP_MEDIA_ALL_FILE_TYPE:
+ break;
+ }
+
+ media_info_clone(&pAssignMediaItem, pMediaItem);
Eina_List **pList = (Eina_List **)pUserData;
- *pList = eina_list_append(*pList, pItem);
+ *pList = eina_list_append(*pList, pAssignMediaItem);
}
- return 0;
+ return TRUE;
+}
+
+static bool MpUtilMediaSvcIterateCb(media_info_h pMediaItem, void *pUserData)
+{
+ VideoLogInfo("");
+
+ media_info_h pAssignMediaItem = NULL;
+ media_content_type_e nMediaType = MEDIA_CONTENT_TYPE_OTHERS;
+
+ media_info_get_media_type(pMediaItem, &nMediaType);
+ VideoLogInfo("nMediaType : %d", nMediaType);
+
+ if(nMediaType == MEDIA_CONTENT_TYPE_VIDEO)
+ {
+ media_info_clone(&pAssignMediaItem, pMediaItem);
+ Eina_List **pList = (Eina_List **)pUserData;
+ *pList = eina_list_append(*pList, pAssignMediaItem);
+ }
+
+ return TRUE;
+}
+
+static bool MpUtilMediaSvcIterateForGetFolderCb(media_folder_h pFolderItem, void *pUserData)
+{
+ VideoLogInfo("");
+
+ media_folder_h *pAssignFolderItem = (media_folder_h*)pUserData;
+
+ if(pFolderItem != NULL)
+ {
+ char *szTmpStr = NULL;
+ media_folder_clone(pAssignFolderItem, pFolderItem);
+ media_folder_get_name(*pAssignFolderItem, &szTmpStr);
+ VideoLogInfo("Folder name : %s", szTmpStr);
+
+ if(szTmpStr)
+ {
+ free(szTmpStr);
+ }
+ }
+
+ return FALSE;
}
-static int MpUtilMediaSvcMtagIterateGetTagListCb(Mtag * pItem, void *pUserData)
+static bool MpUtilMediaSvcIterateForFolderListCb(media_folder_h pFolderItem, void *pUserData)
{
VideoLogInfo("");
+ media_folder_h pAssignFolderItem = NULL;
+ media_folder_clone(&pAssignFolderItem, pFolderItem);
Eina_List **pList = (Eina_List **)pUserData;
- *pList = eina_list_append(*pList, pItem);
+ *pList = eina_list_append(*pList, pAssignFolderItem);
- return 0;
+ return TRUE;
}
-/*
- * Internal function
- */
-bool MpUtilMediaSvcGetFileDirectoryName(char *szFilePath, char *szFileName,
- char *szDirectoryName,
- char *szDirectoryPath)
+static bool MpUtilMediaSvcIterateGetTagCb(media_tag_h pTagItem, void *pUserData)
+{
+ VideoLogInfo("");
+
+ media_tag_h *pAssignTagItem = (media_tag_h*)pUserData;
+
+ if(!pTagItem)
+ {
+ char *szTmpStr = NULL;
+ media_tag_clone(pAssignTagItem, pTagItem);
+ media_tag_get_name(*pAssignTagItem, &szTmpStr);
+ VideoLogInfo("szTagName : %s", szTmpStr);
+
+ if(szTmpStr)
+ {
+ free(szTmpStr);
+ }
+ }
+
+ return FALSE;
+}
+
+static bool MpUtilMediaSvcIterateGetVideoItemOfTagCb(media_info_h media, void *pUserData)
+{
+ VideoLogInfo("");
+
+ return TRUE;
+}
+
+//
+// Internal function
+//
+bool MpUtilMediaSvcGetFileDirectoryName(char *szFilePath, char *szFileName, char *szDirectoryName, char *szDirectoryPath)
{
VideoLogInfo("");
- if (!szFilePath) {
+ if(!szFilePath)
+ {
VideoLogInfo("[ERR]");
return FALSE;
}
int nCount = 0;
int nLoopCount = 0;
- for (nLoopCount = strlen(szFilePath); nLoopCount >= 0; nLoopCount--) {
+ for(nLoopCount = strlen(szFilePath); nLoopCount >= 0; nLoopCount--)
+ {
if (szFilePath[nLoopCount] != '\0')
+ {
nCount++;
+ }
- if (szFilePath[nLoopCount] == '/') {
- if (szFileName) {
+ if(szFilePath[nLoopCount] == '/')
+ {
+ if(szFileName)
+ {
memcpy(szFileName, &szFilePath[nLoopCount + 1], --nCount);
*(szFileName + nCount) = '\0';
VideoLogInfo("File name = %s\n", szFileName);
}
- if (szDirectoryPath) {
+ if(szDirectoryPath)
+ {
memcpy(szDirectoryPath, &szFilePath[0], nLoopCount);
*(szDirectoryPath + nLoopCount + 1) = '\0';
VideoLogInfo("Directory path = %s", szDirectoryPath);
}
- if (szDirectoryName) {
+ if(szDirectoryName)
+ {
nCount = 0;
- for (--nLoopCount; nLoopCount >= 0; nLoopCount--) {
+ for(--nLoopCount; nLoopCount >= 0; nLoopCount--)
+ {
nCount++;
- if (szFilePath[nLoopCount] == '/') {
+ if(szFilePath[nLoopCount] == '/')
+ {
memcpy(szDirectoryName, &szFilePath[nLoopCount + 1], --nCount);
*(szDirectoryName + nCount) = '\0';
VideoLogInfo("Directory Name = %s", szDirectoryName);
return FALSE;
}
-bool MpUtilMediaSvcDestroyList(Eina_List *pList)
-{
- if (!pList) {
- VideoLogInfo("pList is empty already.");
- return FALSE;
- }
-
- Mitem *pMitem = NULL;
- EINA_LIST_FREE(pList, pMitem) {
- if (pMitem) {
- minfo_destroy_mtype_item(pMitem);
- pMitem = NULL;
- }
- }
-
- pList = NULL;
-
- return TRUE;
-}
-
-/*
- * External function
- */
+//
+// External function
+//
void MpUtilMediaSvcInitSession(void)
{
VideoLogInfo("");
- int nRet = 0;
-
- nRet = media_svc_connect(&pMediaSvcHandle);
-
- if(nRet < 0)
+ if(media_content_connect() != MEDIA_CONTENT_ERROR_NONE)
{
- VideoLogInfo("[ERR]");
+ VideoLogInfo("Fail to connect to media content db.");
+ }
+ else
+ {
+ VideoLogInfo("Success to connect to media content db.");
}
}
{
VideoLogInfo("");
- media_svc_disconnect(pMediaSvcHandle);
-}
+ if(media_content_disconnect() != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to disconnect from media content db.");
+ return;
+ }
-void MpUtilMediaSvcDestoryVideoList(void)
-{
- VideoLogInfo("");
- if (VideoItemList) {
- MpUtilMediaSvcDestroyList(VideoItemList);
- VideoItemList = NULL;
- }
+ VideoLogInfo("Success to disconnect from media content db.");
+ return;
}
-bool MpUtilMediaSvcDestroyItem(char *szFilePath)
+bool MpUtilMediaSvcDestoryVideoItemList(void)
{
- VideoLogInfo("");
-
- if (!szFilePath) {
- VideoLogInfo("[ERR]");
- return FALSE;
- }
-
- if (!VideoItemList) {
- VideoLogInfo("pList is empty already.");
+ if(!VideoItemList)
+ {
+ VideoLogInfo("VideoItemList is empty already.");
return FALSE;
}
- Mitem *pMitem = NULL;
- Eina_List *pIterateList = NULL;
- EINA_LIST_FOREACH(VideoItemList, pIterateList, pMitem) {
- if (pMitem) {
- if (!strcmp(pMitem->file_url, szFilePath)) {
- VideoItemList = eina_list_remove(VideoItemList, pMitem);
- }
+ media_info_h pTmpVideoItem = NULL;
+ EINA_LIST_FREE(VideoItemList, pTmpVideoItem)
+ {
+ if(pTmpVideoItem)
+ {
+ media_info_destroy(pTmpVideoItem);
}
}
+
+ VideoItemList = NULL;
+
return TRUE;
}
-bool MpUtilMediaSvcGetVideoFileListFromFolder(char *szFilePath, int nSortType)
+bool MpUtilMediaSvcExtractVideoListFromFolder(char *szFolderPath, int nSortType)
{
- VideoLogInfo("");
-
- if (!szFilePath) {
- VideoLogInfo("[ERR]");
+ if(VideoItemList)
+ {
+ VideoLogInfo("Already exist video list.");
return FALSE;
}
- if (VideoItemList) {
- VideoLogInfo("Already exist video list.");
+ if(!szFolderPath || strlen(szFolderPath) <= 0)
+ {
+ VideoLogInfo("[ERR]");
return FALSE;
}
- VideoLogInfo("szFilePath : %s", szFilePath);
-
- int nRet = 0;
- char szFolderID[STR_UUID_LEN_MAX] = { 0, };
- char szDirectoryPath[STR_LEN_MAX] = { 0, };
- minfo_item_filter m_Filter = { 0, };
+ VideoLogInfo("");
- // Get directory path from filepath.
- MpUtilMediaSvcGetFileDirectoryName(szFilePath, NULL, NULL, szDirectoryPath);
- VideoLogInfo("Directory Path : %s", szDirectoryPath);
+ filter_h m_FilterHandle = NULL;
+ media_folder_h m_FolderHandle = NULL;
+ media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
- // Get folder ID by directory path.
- nRet = minfo_get_cluster_id_by_url(pMediaSvcHandle, szDirectoryPath, szFolderID, STR_UUID_LEN_MAX);
- VideoLogInfo("Folder ID : %s", szFolderID);
+ char *szFolderID = NULL;
+ char szTmpStr[STR_LEN_MAX] = {0};
+ char szOrderObj[STR_LEN_MAX] = {0};
- // Set sorting type.
- switch (nSortType) {
+ switch(nSortType)
+ {
case MP_MEDIA_SORT_BY_NONE:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NONE;
+ case MP_MEDIA_SORT_BY_NAME_ASC:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
break;
case MP_MEDIA_SORT_BY_NAME_DESC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_DESC;
- break;
-
- case MP_MEDIA_SORT_BY_NAME_ASC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_ASC;
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
break;
- case MP_MEDIA_SORT_BY_DATE_DESC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_DATE_DESC;
+ case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
break;
- case MP_MEDIA_SORT_BY_DATE_ASC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_ASC;
+ case MP_MEDIA_SORT_BY_OLDEST:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
break;
default:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_ASC;
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+ }
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return FALSE;
+ }
+
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and FOLDER_PATH = \"%s\"", szFolderPath);
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_folder_foreach_folder_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetFolderCb, &m_FolderHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail media_folder_foreach_folder_from_db().");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(!m_FolderHandle)
+ {
+ VideoLogInfo("Fail to get folder handle.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1");
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set order.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_folder_get_folder_id(m_FolderHandle, &szFolderID) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get folder id.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_folder_foreach_media_from_db(szFolderID, m_FilterHandle, MpUtilMediaSvcIterateCb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set order.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
}
- // Set sorting type.
- m_Filter.favorite = MINFO_MEDIA_FAV_ALL;
- m_Filter.file_type = MINFO_ITEM_VIDEO;
- m_Filter.start_pos = -1;
- m_Filter.end_pos = -1;
- m_Filter.with_meta = TRUE;
+ if(szFolderID)
+ {
+ free(szFolderID);
+ szFolderID = NULL;
+ }
- // Get Item List.
- minfo_get_item_list(pMediaSvcHandle, szFolderID, m_Filter, MpUtilMediaSvcMitemIterateCb, &VideoItemList);
return TRUE;
}
-bool MpUtilMediaSvcGetVideoFileListFromAllFolderOfGallery(int nSortType)
+bool MpUtilMediaSvcExtractVideoListFromAllFolderOfGallery(int nSortType)
{
- VideoLogInfo("");
-
- if (VideoItemList) {
+ if(VideoItemList)
+ {
VideoLogInfo("Already exist video list.");
return FALSE;
}
- minfo_item_filter m_Filter = { 0 };
+ VideoLogInfo("");
+
+ filter_h m_FilterHandle = NULL;
+ media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ char szOrderObj[STR_LEN_MAX] = {0};
- /* Set sorting type. */
- switch (nSortType) {
+ switch(nSortType)
+ {
case MP_MEDIA_SORT_BY_NONE:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NONE;
+ case MP_MEDIA_SORT_BY_NAME_ASC:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
break;
case MP_MEDIA_SORT_BY_NAME_DESC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_DESC;
- break;
-
- case MP_MEDIA_SORT_BY_NAME_ASC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_ASC;
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
break;
- case MP_MEDIA_SORT_BY_DATE_DESC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_DATE_DESC;
+ case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
break;
- case MP_MEDIA_SORT_BY_DATE_ASC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_ASC;
+ case MP_MEDIA_SORT_BY_OLDEST:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
break;
default:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_ASC;
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
}
- VideoLogInfo("Sorting : %d", nSortType);
-
- /* Set sorting type. */
- m_Filter.favorite = MINFO_MEDIA_FAV_ALL;
- m_Filter.file_type = MINFO_ITEM_VIDEO;
- m_Filter.start_pos = -1;
- m_Filter.end_pos = -1;
- m_Filter.with_meta = TRUE;
-
- /* Get All Item. */
- minfo_get_all_item_list(pMediaSvcHandle, MINFO_CLUSTER_TYPE_LOCAL_ALL, m_Filter, MpUtilMediaSvcMitemIterateCb, &VideoItemList);
-
- return TRUE;
-}
-
-bool MpUtilMediaSvcGetVideoFileListByTagName(char *szTagName)
-{
- VideoLogInfo("");
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return FALSE;
+ }
- if (!szTagName) {
- VideoLogInfo("[ERR] No Exist tag name.");
+ if(media_filter_set_condition(m_FilterHandle, MEDIA_TYPE" = 1", MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
return FALSE;
}
- if (VideoItemList) {
- VideoLogInfo("Already exist video list.");
+ if(media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set order.");
+ media_filter_destroy(m_FilterHandle);
return FALSE;
}
- VideoLogInfo("szTagName : %s", szTagName);
+ if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateCb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get video item list with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
- int nRet = minfo_get_media_list_by_tagname(pMediaSvcHandle, szTagName, FALSE, MpUtilMediaSvcMitemIterateCb, &VideoItemList);
- if (nRet < 0) {
- VideoLogInfo("Failed to get a media items' list. error code->%d", nRet);
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
return FALSE;
}
return TRUE;
}
-bool MpUtilMediaSvcGetVideoFileListFromFavorite(int nSortType)
+bool MpUtilMediaSvcExtractVideoListForListView(int nSortType)
{
- VideoLogInfo("");
-
- if (VideoItemList) {
+ if(VideoItemList)
+ {
VideoLogInfo("Already exist video list.");
return FALSE;
}
- minfo_item_filter m_Filter = { 0 };
+ VideoLogInfo("");
+
+ filter_h m_FilterHandle = NULL;
+ media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ char szOrderObj[STR_LEN_MAX] = {0};
- /* Set sorting type. */
- switch (nSortType) {
+ switch(nSortType)
+ {
case MP_MEDIA_SORT_BY_NONE:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NONE;
+ case MP_MEDIA_SORT_BY_NAME_ASC:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
break;
case MP_MEDIA_SORT_BY_NAME_DESC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_DESC;
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
break;
- case MP_MEDIA_SORT_BY_NAME_ASC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_ASC;
- break;
-
- case MP_MEDIA_SORT_BY_DATE_DESC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_DATE_DESC;
+ case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_MODIFIED_TIME, STR_LEN_MAX - 1);
break;
- case MP_MEDIA_SORT_BY_DATE_ASC:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_NAME_ASC;
+ case MP_MEDIA_SORT_BY_OLDEST:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_MODIFIED_TIME, STR_LEN_MAX - 1);
break;
default:
- m_Filter.sort_type = MINFO_MEDIA_SORT_BY_DATE_DESC;
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
}
- m_Filter.favorite = MINFO_MEDIA_FAV_ONLY;
- m_Filter.file_type = MINFO_ITEM_VIDEO;
- m_Filter.start_pos = -1;
- m_Filter.end_pos = -1;
- m_Filter.with_meta = FALSE;
-
- int nRet = minfo_get_item_list(pMediaSvcHandle, NULL, m_Filter, MpUtilMediaSvcMitemIterateCb, &VideoItemList);
- if (nRet < 0) {
- VideoLogInfo("Failed to get a media items' list. error code->%d", nRet);
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
return FALSE;
}
- return TRUE;
-}
+ if(media_filter_set_condition(m_FilterHandle, MEDIA_TYPE" = 1", MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
-void MpUtilMediaSvcMtagIterateDestroyTagList(void)
-{
- VideoLogInfo("");
+ if(media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set order.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
- if (!pAllTagList) {
- VideoLogInfo("pAllTagList is empty already.");
- return;
+ if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForVideoItemListViewCb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get video item list with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
}
- Mtag *pMtag = NULL;
- EINA_LIST_FREE(pAllTagList, pMtag) {
- if (pMtag) {
- if (pMtag->tag_name) {
- free(pMtag->tag_name);
- pMtag->tag_name = NULL;
- }
- free(pMtag);
- pMtag = NULL;
- }
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ return FALSE;
}
- pAllTagList = NULL;
+ return TRUE;
}
-int MpUtilMediaSvcMtagGetAllTagList(char *pTagList[])
+bool MpUtilMediaSvcExtractVideoListVideoType(int nSortType)
{
VideoLogInfo("");
- int nErr = 0;
- int nCount = 0;
+ nWhatFileType = MP_MEDIA_VIDEO_FILE_TYPE;
- if (pAllTagList) {
- MpUtilMediaSvcMtagIterateDestroyTagList();
+ return MpUtilMediaSvcExtractVideoListForListView(nSortType);
+}
+
+bool MpUtilMediaSvcExtractVideoListRecordedType(int nSortType)
+{
+ VideoLogInfo("");
+
+ nWhatFileType = MP_MEDIA_CAMERA_FILE_TYPE;
+
+ return MpUtilMediaSvcExtractVideoListForListView(nSortType);
+}
+
+bool MpUtilMediaSvcExtractVideoListByTagName(char *szTagName)
+{
+ VideoLogInfo("");
+
+ if(!szTagName)
+ {
+ VideoLogInfo("[ERR] No Exist tag name.");
+ return FALSE;
+ }
+
+ if(VideoItemList)
+ {
+ VideoLogInfo("Already exist video list.");
+ return FALSE;
+ }
+
+ VideoLogInfo("szTagName : %s", szTagName);
+
+ int nTagID = 0;
+ char szTmpStr[STR_LEN_MAX] = {0};
+
+ media_tag_h pTagHandle = NULL;
+ filter_h m_FilterHandle = NULL;
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return FALSE;
+ }
+
+ //snprintf(szTmpStr, STR_LEN_MAX-1, "TAG_NAME like \"%s\"", szTagName);//snprintf(szTmpStr, STR_LEN_MAX-1, "TAG_NAME like \"\%%s\%\"", szTagName);
+ snprintf(szTmpStr, STR_LEN_MAX-1, "TAG_NAME like \"%%%s%%\"", szTagName);
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_set_order(m_FilterHandle, MEDIA_CONTENT_ORDER_ASC, TAG_NAME, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set order.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_tag_foreach_tag_from_db(m_FilterHandle, MpUtilMediaSvcIterateGetTagCb, &pTagHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail media_tag_foreach_tag_from_db().");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(!pTagHandle)
+ {
+ VideoLogInfo("Fail to get pTagHandle.");
+ return FALSE;
+ }
+
+ if(media_tag_get_tag_id(pTagHandle, &nTagID) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get tag ID.");
+ return FALSE;
+ }
+
+ VideoLogInfo("nTagID : %d", nTagID);
+
+ memset(szTmpStr, 0, STR_LEN_MAX);
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1");
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_set_order(m_FilterHandle, MEDIA_CONTENT_ORDER_ASC, MEDIA_TITLE, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set order.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_tag_foreach_media_from_db(nTagID, m_FilterHandle, MpUtilMediaSvcIterateGetVideoItemOfTagCb, VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail media_tag_foreach_media_from_db().");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+bool MpUtilMediaSvcExtractVideoListFromFavorite(int nSortType)
+{
+ if(VideoItemList)
+ {
+ VideoLogInfo("Already exist video list.");
+ return FALSE;
+ }
+
+ VideoLogInfo("");
+
+ filter_h m_FilterHandle = NULL;
+ media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ char szOrderObj[STR_LEN_MAX] = {0};
+ char szTmpStr[STR_LEN_MAX] = {0};
+
+ nWhatFileType = MP_MEDIA_ALL_FILE_TYPE;
+
+ switch(nSortType)
+ {
+ case MP_MEDIA_SORT_BY_NONE:
+ case MP_MEDIA_SORT_BY_NAME_ASC:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+ break;
+
+ case MP_MEDIA_SORT_BY_NAME_DESC:
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+ break;
+
+ case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+ break;
+
+ case MP_MEDIA_SORT_BY_OLDEST:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+ break;
+
+ default:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+ }
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return FALSE;
+ }
+
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and MEDIA_FAVOURITE = 1");
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set order.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForVideoItemListViewCb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get video item list with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+bool MpUtilMediaSvcExtractVideoListForSearchView(const char *keyword)
+{
+ if(VideoItemList)
+ {
+ VideoLogInfo("Already exist video list.");
+ return FALSE;
+ }
+
+ VideoLogInfo("");
+
+ int nSortType = MP_MEDIA_SORT_BY_NAME_ASC;
+ filter_h m_FilterHandle = NULL;
+ media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ char szOrderObj[STR_LEN_MAX] = {0};
+ char szTmpStr[STR_LEN_MAX] = {0};
+
+ nWhatFileType = MP_MEDIA_ALL_FILE_TYPE;
+
+ switch(nSortType)
+ {
+ case MP_MEDIA_SORT_BY_NONE:
+ case MP_MEDIA_SORT_BY_NAME_ASC:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+ break;
+
+ case MP_MEDIA_SORT_BY_NAME_DESC:
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+ break;
+
+ case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+ break;
+
+ case MP_MEDIA_SORT_BY_OLDEST:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+ break;
+
+ default:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+ }
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return FALSE;
+ }
+
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and MEDIA_TITLE like \"%%%s%%\"", keyword);
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set order.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForVideoItemListViewCb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get video item list with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+void MpUtilMediaSvcDestoryVideoList(void)
+{
+ VideoLogInfo("");
+
+ if(VideoFolderList)
+ {
+ MpUtilMediaSvcDestoryVideoFolderList();
+ VideoFolderList = NULL;
+ }
+
+ if(VideoItemList)
+ {
+ MpUtilMediaSvcDestoryVideoItemList();
+ VideoItemList = NULL;
+ }
+}
+
+bool MpUtilMediaSvcRemoveItemByUrlWithList(char *szFilePath)
+{
+ if(!szFilePath)
+ {
+ VideoLogInfo("[ERR]");
+ return FALSE;
+ }
+
+ if(!VideoItemList)
+ {
+ VideoLogInfo("pList is empty already.");
+ return FALSE;
+ }
+
+ VideoLogInfo("szFilePath : %s", szFilePath);
+
+ char *szGetFilePath = NULL;
+ media_info_h pItem = NULL;
+ Eina_List *pIterateList = NULL;
+ EINA_LIST_FOREACH(VideoItemList, pIterateList, pItem)
+ {
+ if(pItem)
+ {
+ if(media_info_get_file_path(pItem, &szGetFilePath) == MEDIA_CONTENT_ERROR_NONE)
+ {
+ if(szGetFilePath)
+ {
+ if(!strcmp(szGetFilePath, szFilePath))
+ {
+ VideoLogInfo("Find %s", szGetFilePath);
+ char *szMediaID = NULL;
+ media_info_get_media_id(pItem, &szMediaID);
+ media_info_delete_from_db(szMediaID);
+ VideoItemList = eina_list_remove(VideoItemList, pItem);
+ media_info_destroy(pItem);
+
+ if(szMediaID)
+ {
+ free(szMediaID);
+ }
+
+ if(szGetFilePath)
+ {
+ free(szGetFilePath);
+ }
+
+ return TRUE;
+ }
+ }
+ else
+ {
+ VideoLogInfo("No exist %s in media info Database module.", szFilePath);
+ return FALSE;
+ }
+ }
+ }
+ }
+ return FALSE;
+}
+
+bool MpUtilMediaSvcRemoveItemByListIndex(int nVideoItemIndex)
+{
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ if(!VideoItemList)
+ {
+ VideoLogInfo("pList is empty already.");
+ return FALSE;
+ }
+
+ media_info_h pItem = eina_list_nth(VideoItemList, nVideoItemIndex);
+
+ if(pItem)
+ {
+ char *szMediaID = NULL;
+ media_info_get_media_id(pItem, &szMediaID);
+ if(szMediaID)
+ {
+ media_info_delete_from_db(szMediaID);
+ VideoItemList = eina_list_remove(VideoItemList, pItem);
+ free(szMediaID);
+ media_info_destroy(pItem);
+ }
+ else
+ {
+ VideoLogInfo("No exist media ID in index %d of list.", nVideoItemIndex);
+ return FALSE;
+ }
+ }
+ else
+ {
+ VideoLogInfo("Fail to remove item in media svc and list.");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+bool MpUtilMediaSvcRemoveItemByListIndexWithoutListItem(int nVideoItemIndex)
+{
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ if(!VideoItemList)
+ {
+ VideoLogInfo("pList is empty already.");
+ return FALSE;
+ }
+
+ media_info_h pItem = eina_list_nth(VideoItemList, nVideoItemIndex);
+
+ if(pItem)
+ {
+ char *szMediaID = NULL;
+ media_info_get_media_id(pItem, &szMediaID);
+ if(szMediaID)
+ {
+ media_info_delete_from_db(szMediaID);
+ free(szMediaID);
+ }
+ else
+ {
+ VideoLogInfo("No exist media ID in index %d of list.", nVideoItemIndex);
+ return FALSE;
+ }
+ }
+ else
+ {
+ VideoLogInfo("Fail to remove item in media svc and list.");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+bool MpUtilMediaSvcGetVideoIDByVideoUri(const char *szPath, char *szVideoID)
+{
+ VideoLogInfo("");
+
+ media_info_h pVideoItem = NULL;
+ filter_h m_FilterHandle = NULL;
+ char szTmpStr[STR_LEN_MAX] = {0};
+ bool bRet = FALSE;
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ bRet = FALSE;
+ }
+
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ bRet = FALSE;
+ }
+
+ if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get video item list with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ bRet = FALSE;
+ }
+
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ bRet = FALSE;
+ }
+
+ if(pVideoItem)
+ {
+ char *szMediaID = NULL;
+ media_info_get_media_id(pVideoItem, &szMediaID);
+ if(szMediaID)
+ {
+ strncpy(szVideoID, szMediaID, STR_LEN_MAX-2);
+ free(szMediaID);
+ }
+ media_info_destroy(pVideoItem);
+ bRet = TRUE;
+ }
+ else
+ {
+ bRet = FALSE;
+ }
+
+ return bRet;
+}
+
+unsigned int MpUtilMediaSvcGetVideoLastPlayTimeByVideoUri(const char *szPath)
+{
+ if(!szPath)
+ {
+ VideoLogInfo("No exist video path.");
+ return 0;
+ }
+
+ VideoLogInfo("szPath : %s", szPath);
+
+ time_t LastPlayedTime = 0;
+ media_info_h pVideoItem = NULL;
+ filter_h m_FilterHandle = NULL;
+ char szTmpStr[STR_LEN_MAX] = {0};
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return FALSE;
+ }
+
+ //snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get video item list with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ return FALSE;
+ }
+
+ if(pVideoItem)
+ {
+ video_meta_h pVideoMetaHandle = NULL;
+ if(media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE)
+ {
+ char *szTmpStr = NULL;
+ video_meta_get_title(pVideoMetaHandle, &szTmpStr);
+ if(szTmpStr)
+ {
+ VideoLogInfo("Title : %s", szTmpStr);
+ free(szTmpStr);
+ }
+ else
+ {
+ VideoLogInfo("No exist title");
+ }
+
+ video_meta_get_played_time(pVideoMetaHandle, &LastPlayedTime);
+ VideoLogInfo("Last Played Time : %d", LastPlayedTime);
+ video_meta_destroy(pVideoMetaHandle);
+ }
+ media_info_destroy(pVideoItem);
+ }
+
+ return (unsigned int)LastPlayedTime;
+}
+
+unsigned int MpUtilMediaSvcGetVideoDurationByVideoUri(const char *szPath)
+{
+ if(!szPath)
+ {
+ VideoLogInfo("No exist video path.");
+ return 0;
+ }
+
+ VideoLogInfo("szPath : %s", szPath);
+
+ int nDurationTime = 0;
+ media_info_h pVideoItem = NULL;
+ filter_h m_FilterHandle = NULL;
+ char szTmpStr[STR_LEN_MAX] = {0};
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return FALSE;
+ }
+
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get video item list with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ return FALSE;
+ }
+
+ if(pVideoItem)
+ {
+ video_meta_h pVideoMetaHandle = NULL;
+ if(media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE)
+ {
+ video_meta_get_duration(pVideoMetaHandle, &nDurationTime);
+ VideoLogInfo("Duration time : %d", nDurationTime);
+ video_meta_destroy(pVideoMetaHandle);
+ }
+ media_info_destroy(pVideoItem);
+ }
+
+ return (unsigned int)nDurationTime;
+}
+
+int MpUtilMediaSvcGetVideoFilesizeByVideoUri(const char *szPath)
+{
+ if(!szPath)
+ {
+ VideoLogInfo("No exist video path.");
+ return 0;
+ }
+
+ VideoLogInfo("szPath : %s", szPath);
+
+ int nSize = 0;
+ media_info_h pVideoItem = NULL;
+ filter_h m_FilterHandle = NULL;
+ char szTmpStr[STR_LEN_MAX] = {0};
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return FALSE;
+ }
+
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get video item list with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ return FALSE;
+ }
+
+ if(pVideoItem)
+ {
+ media_info_get_size(pVideoItem, &nSize);
+ VideoLogInfo("Video file size time : %d", nSize);
+ media_info_destroy(pVideoItem);
+ }
+
+ return nSize;
+}
+
+char *MpUtilMediaSvcGetVideoThumbnailByVideoUri(const char *szMediaUri)
+{
+ if(!szMediaUri)
+ {
+ VideoLogInfo("No exist video path.");
+ return NULL;
+ }
+
+ VideoLogInfo("szPath : %s", szMediaUri);
+
+ media_info_h pVideoItem = NULL;
+ filter_h m_FilterHandle = NULL;
+ char *szThumbnailPath = NULL;
+ char szTmpStr[STR_LEN_MAX] = {0};
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return FALSE;
+ }
+
+ memset(szTmpStr, 0, STR_LEN_MAX);
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szMediaUri);
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get video item list with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
+
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ return FALSE;
+ }
+
+ if(pVideoItem)
+ {
+ media_info_get_thumbnail_path(pVideoItem, &szThumbnailPath);
+ VideoLogInfo("Video thumbnail file path : %s", szThumbnailPath);
+ media_info_destroy(pVideoItem);
+ }
+
+ return szThumbnailPath;
+}
+
+void MpUtilMediaSvcSetVideoLastPlayedTimeByUri(char* szMediaUri, unsigned int nLastPlayedTime)
+{
+ if(!szMediaUri)
+ {
+ VideoLogInfo("No exist media uri.");
+ return;
+ }
+
+ VideoLogInfo("szMediaUri : %s, nLastPlayedTime : %d", szMediaUri, nLastPlayedTime);
+
+ time_t LastPlayedTime = (time_t)nLastPlayedTime;
+ media_info_h pVideoItem = NULL;
+ filter_h m_FilterHandle = NULL;
+ char szTmpStr[STR_LEN_MAX] = {0};
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return;
+ }
+
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szMediaUri);
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return;
+ }
+
+ if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get video item list with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return;
+ }
+
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ return;
+ }
+
+ video_meta_h pVideoMetaHandle = NULL;
+
+ if(pVideoItem)
+ {
+ if(media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get pVideoMetaHandle.");
+ }
+ else
+ {
+ if(pVideoMetaHandle)
+ {
+ char *szTmpStr = NULL;
+ video_meta_get_title(pVideoMetaHandle, &szTmpStr);
+ if(szTmpStr)
+ {
+ VideoLogInfo("Title : %s", szTmpStr);
+ free(szTmpStr);
+ }
+ else
+ {
+ VideoLogInfo("No exist title");
+ }
+
+ video_meta_set_played_time(pVideoMetaHandle, LastPlayedTime);
+ video_meta_update_to_db(pVideoMetaHandle);
+ video_meta_destroy(pVideoMetaHandle);
+ VideoLogInfo("Last Played Time : %d", LastPlayedTime);
+ }
+ else
+ {
+ VideoLogInfo("No exist pVideoMetaHandle");
+ }
+ }
+ media_info_destroy(pVideoItem);
+ }
+}
+
+bool MpUtilMediaSvcGetVideoCurrentUrlPreNextItem(char *szCurrMediaUri, char *szPreMediaUri, char *szNextMediaUri, bool bLoop)
+{
+ VideoLogInfo("");
+
+ if(!szCurrMediaUri)
+ {
+ VideoLogInfo("[ERR] No exist current file path.");
+ return FALSE;
+ }
+
+ if(!VideoItemList)
+ {
+ VideoLogInfo("No exist VideoItemList.");
+ if(bLoop)
+ {
+ strncpy(szNextMediaUri, szCurrMediaUri, (sizeof(char) * STR_LEN_MAX) - 1);
+ }
+ return FALSE;
+ }
+
+ int nCount = 0;
+ int nListSize = 0;
+ media_info_h pVideoItem = NULL;
+ Eina_List *pIterateList = NULL;
+
+ memset(szPreMediaUri, 0, sizeof(char) * STR_LEN_MAX);
+ memset(szNextMediaUri, 0, sizeof(char) * STR_LEN_MAX);
+
+ nListSize = eina_list_count(VideoItemList);
+
+ if(nListSize <= 1)
+ {
+ VideoLogInfo("Video list size == 1.");
+ return FALSE;
+ }
+
+ EINA_LIST_FOREACH(VideoItemList, pIterateList, pVideoItem)
+ {
+ if(pVideoItem == NULL)
+ {
+ continue;
+ }
+
+ char *szVideoItemFilePath = NULL;
+ media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
+ if(szVideoItemFilePath)
+ {
+ VideoLogInfo("URL of the File item - %s (%d / %d)", szVideoItemFilePath, nCount, nListSize);
+ if(!strcmp(szVideoItemFilePath, szCurrMediaUri))
+ {
+ free(szVideoItemFilePath);
+ szVideoItemFilePath = NULL;
+
+ pVideoItem = NULL;
+ pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nCount - 1);
+ if(pVideoItem)
+ {
+ media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
+ strncpy(szPreMediaUri, szVideoItemFilePath, (sizeof(char) * STR_LEN_MAX) - 1);
+
+ free(szVideoItemFilePath);
+ szVideoItemFilePath = NULL;
+ }
+
+ pVideoItem = NULL;
+ pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nCount + 1);
+ if(pVideoItem)
+ {
+ media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
+ strncpy(szNextMediaUri, szVideoItemFilePath, (sizeof(char) * STR_LEN_MAX) - 1);
+
+ free(szVideoItemFilePath);
+ szVideoItemFilePath = NULL;
+ }
+ else if(bLoop)
+ {
+ media_info_h m_FirstItem = (media_info_h)eina_list_nth(VideoItemList, 0);
+ if(m_FirstItem)
+ {
+ media_info_get_file_path(m_FirstItem, &szVideoItemFilePath);
+ strncpy(szNextMediaUri, szVideoItemFilePath, (sizeof(char) * STR_LEN_MAX) - 1);
+
+ free(szVideoItemFilePath);
+ szVideoItemFilePath = NULL;
+ }
+ m_FirstItem = NULL;
+ }
+
+ VideoLogInfo("PreMediaUri:%s", szPreMediaUri);
+ VideoLogInfo("NextMediaUri:%s", szNextMediaUri);
+
+ return TRUE;
+ }
+ }
+
+ ++nCount;
+ }
+
+ return FALSE;
+}
+
+char* MpUtilMediaSvcGetVideoUrl(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
+
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ if(nVideoItemIndex < 0 || nVideoItemIndex >= MpUtilMediaSvcGetVideoListSize())
+ {
+ VideoLogInfo("Error number of list item.");
+ return NULL;
+ }
+
+ char *szVideoItemFilePath = NULL;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+
+ if(pVideoItem)
+ {
+ media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
+ VideoLogInfo("szVideoItemFilePath : %s", szVideoItemFilePath);
+ }
+
+ return szVideoItemFilePath;
+}
+
+char* MpUtilMediaSvcGetVideoThumbnail(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
+
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ if(nVideoItemIndex < 0 || nVideoItemIndex >= MpUtilMediaSvcGetVideoListSize())
+ {
+ VideoLogInfo("Error number of list item.");
+ return NULL;
+ }
+
+ char *szVideoItemThumbnailPath = NULL;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+
+ if(pVideoItem)
+ {
+ media_info_get_thumbnail_path(pVideoItem, &szVideoItemThumbnailPath);
+ VideoLogInfo("szVideoItemFilePath : %s", szVideoItemThumbnailPath);
+ }
+
+ return szVideoItemThumbnailPath;
+}
+
+char* MpUtilMediaSvcGetVideoTitle(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
+
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ if(nVideoItemIndex < 0 || nVideoItemIndex >= MpUtilMediaSvcGetVideoListSize())
+ {
+ VideoLogInfo("Error number of list item.");
+ return NULL;
+ }
+
+ char *szTitle = NULL;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+
+ if(pVideoItem)
+ {
+ media_info_get_display_name(pVideoItem, &szTitle);
+ VideoLogInfo("szTitle : %s", szTitle);
+ }
+
+ return szTitle;
+}
+
+int MpUtilMediaSvcGetVideoDurationTime(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
+
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ if(nVideoItemIndex < 0 || nVideoItemIndex >= MpUtilMediaSvcGetVideoListSize())
+ {
+ VideoLogInfo("Error number of list item.");
+ return 0;
+ }
+
+ int nDurationTime = 0;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+
+ if(pVideoItem)
+ {
+ video_meta_h pVideoMetaHandle = NULL;
+ if(media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE)
+ {
+ video_meta_get_duration(pVideoMetaHandle, &nDurationTime);
+ VideoLogInfo("Duratiob time : %d", nDurationTime);
+ video_meta_destroy(pVideoMetaHandle);
+ }
+ }
+
+ return nDurationTime;
+}
+
+int MpUtilMediaSvcGetVideoLastPlayedPos(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
+
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ time_t nLastPlayedTime = 0;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+
+ if(pVideoItem)
+ {
+ video_meta_h pVideoMetaHandle = NULL;
+ if(media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE)
+ {
+ video_meta_get_played_time(pVideoMetaHandle, &nLastPlayedTime);
+ VideoLogInfo("Last Play time : %d", nLastPlayedTime);
+ video_meta_destroy(pVideoMetaHandle);
+ }
+ }
+
+ return (int)nLastPlayedTime;
+}
+
+int MpUtilMediaSvcGetVideoItemSize(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
+
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ int nSize = 0;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ if(pVideoItem)
+ {
+ media_info_get_size(pVideoItem, &nSize);
+ VideoLogInfo("Video file size time : %d", nSize);
+ }
+
+ return nSize;
+}
+
+int MpUtilMediaSvcGetVideoItemWidth(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
+
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ int nWidth = 0;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ video_meta_h pVideoMetaHandle = NULL;
+
+ if(pVideoItem)
+ {
+ if(media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get pVideoMetaHandle.");
+ }
+ else
+ {
+ if(pVideoMetaHandle)
+ {
+ char *szTmpStr = NULL;
+ video_meta_get_title(pVideoMetaHandle, &szTmpStr);
+ if(szTmpStr)
+ {
+ VideoLogInfo("Title : %s", szTmpStr);
+ free(szTmpStr);
+ }
+ else
+ {
+ VideoLogInfo("No exist title");
+ }
+
+ video_meta_get_width(pVideoMetaHandle, &nWidth);
+ video_meta_destroy(pVideoMetaHandle);
+ VideoLogInfo("Video Width : %f", nWidth);
+ }
+ else
+ {
+ VideoLogInfo("No exist pVideoMetaHandle");
+ }
+ }
+ }
+
+ return nWidth;
+}
+
+int MpUtilMediaSvcGetVideoItemHeight(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
+
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ int nHeight = 0;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ video_meta_h pVideoMetaHandle = NULL;
+
+ if(pVideoItem)
+ {
+ if(media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get pVideoMetaHandle.");
+ }
+ else
+ {
+ if(pVideoMetaHandle)
+ {
+ char *szTmpStr = NULL;
+ video_meta_get_title(pVideoMetaHandle, &szTmpStr);
+ if(szTmpStr)
+ {
+ VideoLogInfo("Title : %s", szTmpStr);
+ free(szTmpStr);
+ }
+ else
+ {
+ VideoLogInfo("No exist title");
+ }
+
+ video_meta_get_height(pVideoMetaHandle, &nHeight);
+ video_meta_destroy(pVideoMetaHandle);
+ VideoLogInfo("Video Width : %f", nHeight);
+ }
+ else
+ {
+ VideoLogInfo("No exist pVideoMetaHandle");
+ }
+ }
+ }
+
+ return nHeight;
+}
+
+time_t MpUtilMediaSvcGetVideoItemDateTime(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
}
- minfo_get_tag_list_by_media_id(pMediaSvcHandle, NULL, MpUtilMediaSvcMtagIterateGetTagListCb, &pAllTagList);
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
- if (nErr == 0 && pAllTagList != NULL) {
- Mtag *pMtag = NULL;
- Eina_List *pTmpList = NULL;
+ time_t nDateTime = 0;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ if(pVideoItem)
+ {
+ media_info_get_modified_time(pVideoItem, &nDateTime);
+ VideoLogInfo("Video date time : %d", nDateTime);
+ }
- EINA_LIST_FOREACH(pAllTagList, pTmpList, pMtag) {
- if (pMtag && pMtag->tag_name) {
- VideoLogInfo("%s of the tag has %d item(s).", pMtag->tag_name, pMtag->count);
- pTagList[nCount++] = pMtag->tag_name;
- }
- }
+ return nDateTime;
+}
+
+char *MpUtilMediaSvcGetVideoItemExtension(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
}
- VideoLogInfo("Size of User tag list is %d.", nCount);
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
- return nCount;
+ return NULL;
}
-bool MpUtilMediaSvcMtagAddItemToTag(const char *szTagName, char *szMediaUri)
+double MpUtilMediaSvcGetVideoItemLongitude(const int nVideoItemIndex)
{
- VideoLogInfo("");
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
- if (!szTagName) {
- VideoLogInfo("[ERR] No exist string pointer szTagName.");
- return FALSE;
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ double nLongitude = 0;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ if(pVideoItem)
+ {
+ media_info_get_longitude(pVideoItem, &nLongitude);
+ VideoLogInfo("nLongitude : %f", nLongitude);
}
- Mitem *m_Item = NULL;
+ return nLongitude;
+}
- if (szMediaUri) {
- minfo_get_item(pMediaSvcHandle, szMediaUri, &m_Item);
+double MpUtilMediaSvcGetVideoItemLatitude(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
}
- if (m_Item) {
- minfo_add_tag(pMediaSvcHandle, m_Item->uuid, szTagName);
- minfo_destroy_mtype_item(m_Item);
- } else {
- minfo_add_tag(pMediaSvcHandle, NULL, szTagName);
+ VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+ double nLatitude = 0;
+ media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+ if(pVideoItem)
+ {
+ media_info_get_latitude(pVideoItem, &nLatitude);
+ VideoLogInfo("nLongitude : %f", nLatitude);
}
- return TRUE;
+ return nLatitude;
}
-bool MpUtilMediaSvcMtagGetItemToFavorite(char *szMediaUri)
+
+
+
+int MpUtilMediaSvcGetVideoListSize(void)
{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
+
VideoLogInfo("");
- if (!szMediaUri) {
- VideoLogInfo("[ERR] No exist string pointer szMediaUri.");
- return FALSE;
+ return (int)eina_list_count(VideoItemList);
+}
+
+void* MpUtilMediaSvcGetVideoitem(const int nVideoItemIndex)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return NULL;
}
- Mitem *m_Item = NULL;
+ if(nVideoItemIndex < 0 || nVideoItemIndex >= MpUtilMediaSvcGetVideoListSize())
+ {
+ VideoLogInfo("Error number of list item.");
+ return NULL;
+ }
- minfo_get_item(pMediaSvcHandle, szMediaUri, &m_Item);
+ VideoLogInfo("");
- if (m_Item) {
- VideoLogInfo("Favorate value : %d", m_Item->rate);
- if (m_Item->rate) {
- minfo_destroy_mtype_item(m_Item);
- return TRUE;
- } else {
- minfo_destroy_mtype_item(m_Item);
- return FALSE;
+ return (void*)eina_list_nth(VideoItemList, nVideoItemIndex);
+}
+
+void MpUtilMediaSvcPrintListInfo(void)
+{
+ if(!VideoItemList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return;
+ }
+
+ VideoLogInfo("List size : %d", MpUtilMediaSvcGetVideoListSize());
+
+ media_info_h pVideoItem = NULL;
+ Eina_List *pIterateList = NULL;
+ int nCounter = 0;
+ EINA_LIST_FOREACH(VideoItemList, pIterateList, pVideoItem)
+ {
+ if(pVideoItem)
+ {
+ char *szTitle = NULL;
+ media_info_get_display_name(pVideoItem, &szTitle);
+ if(szTitle)
+ {
+ VideoLogInfo("%d - Print title of all list items : %s", nCounter, szTitle);
+ free(szTitle);
+ }
+ else
+ {
+ VideoLogInfo("%d - Print title of all list items : NULL.", nCounter);
+ }
+ nCounter++;
}
+ }
+}
- } else {
- VideoLogInfo("[ERR] m_Item is NULL.");
- return FALSE;
+int MpUtilMediaSvcFindVideoItemIndexByUrl(const char *szPath)
+{
+ if(!VideoItemList || !szPath)
+ {
+ VideoLogInfo("[ERR] No exist VideoItemList or szPath.");
+ return 99999;
}
- return TRUE;
+ VideoLogInfo("");
+
+ unsigned int nCounter = 0;
+
+ Eina_List *pCurList = NULL;
+ media_info_h pVideoItem = NULL;
+
+ EINA_LIST_FOREACH(VideoItemList, pCurList, pVideoItem)
+ {
+ if(pVideoItem)
+ {
+ char *szTitle = NULL;
+ media_info_get_display_name(pVideoItem, &szTitle);
+ VideoLogInfo("szTitle : %s", szTitle);
+
+ if(!strcmp(szTitle , szPath))
+ {
+ VideoLogInfo("Find same file url. index : %d", nCounter);
+ free(szTitle);
+ return nCounter;
+ }
+ free(szTitle);
+ }
+
+ nCounter++;
+ }
+
+ return 99999;
}
-bool MpUtilMediaSvcMtagAddItemToFavorite(char *szMediaUri, bool bFavorite)
+bool MpUtilMediaSvcExtractVideoFolderList(int nSortType)
{
VideoLogInfo("");
- if (!szMediaUri) {
- VideoLogInfo("[ERR] No exist string pointer szMediaUri.");
+ filter_h m_FilterHandle = NULL;
+ media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+
+ char szTmpStr[STR_LEN_MAX] = {0};
+ char szOrderObj[STR_LEN_MAX] = {0};
+
+ switch(nSortType)
+ {
+ case MP_MEDIA_SORT_BY_NONE:
+ case MP_MEDIA_SORT_BY_NAME_ASC:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+ break;
+
+ case MP_MEDIA_SORT_BY_NAME_DESC:
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+ break;
+
+ case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+ nOrderType = MEDIA_CONTENT_ORDER_DESC;
+ strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+ break;
+
+ case MP_MEDIA_SORT_BY_OLDEST:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+ break;
+
+ default:
+ nOrderType = MEDIA_CONTENT_ORDER_ASC;
+ strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+ }
+
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
return FALSE;
}
- Mitem *m_Item = NULL;
+ snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1");
+ if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
- minfo_get_item(pMediaSvcHandle, szMediaUri, &m_Item);
+ if(media_folder_foreach_folder_from_db(m_FilterHandle, MpUtilMediaSvcIterateForFolderListCb, &VideoFolderList) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail media_folder_foreach_folder_from_db().");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
- if (m_Item) {
- int nRet = minfo_update_media_favorite(pMediaSvcHandle, m_Item->uuid, bFavorite);
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ }
- if (nRet == 0) {
- VideoLogInfo("success to add item to favourites folder.");
- } else {
- VideoLogInfo("fail - error code : %d ", nRet);
- }
+ return TRUE;
+}
- minfo_destroy_mtype_item(m_Item);
- } else {
- VideoLogInfo("[ERR] m_Item is NULL.");
+bool MpUtilMediaSvcDestoryVideoFolderList(void)
+{
+ if(!VideoFolderList)
+ {
+ VideoLogInfo("VideoFolderList is empty already.");
return FALSE;
}
+ media_folder_h pTmpFolderItem = NULL;
+ EINA_LIST_FREE(VideoFolderList, pTmpFolderItem)
+ {
+ if(pTmpFolderItem)
+ {
+ media_folder_destroy(pTmpFolderItem);
+ }
+ }
+
+ VideoFolderList = NULL;
+
return TRUE;
}
-char *MpUtilMediaSvcMitemGetThumbnailUrl(char *szMediaUri)
+int MpUtilMediaSvcGetVideoFolderListSize(void)
{
+ if(!VideoFolderList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
+ }
+
VideoLogInfo("");
- if (!szMediaUri) {
- VideoLogInfo("[ERR] No exist string pointer szMediaUri.");
- return FALSE;
+ if(VideoFolderList)
+ {
+ return (int)eina_list_count(VideoFolderList);
+ }
+
+ return 0;
+}
+
+char* MpUtilMediaSvcGetVideoFolderName(int nVideoFolderIndex)
+{
+ if(!VideoFolderList)
+ {
+ VideoLogInfo("Not exist video folder list handle.");
+ return 0;
+ }
+
+ VideoLogInfo("nVideoItemIndex : %d", nVideoFolderIndex);
+
+ if(nVideoFolderIndex < 0 || nVideoFolderIndex >= MpUtilMediaSvcGetVideoFolderListSize())
+ {
+ VideoLogInfo("Error number of list item.");
+ return NULL;
+ }
+
+ char *szFolderName = NULL;
+ media_folder_h pFolderItem = (media_folder_h)eina_list_nth(VideoFolderList, nVideoFolderIndex);
+ if(pFolderItem)
+ {
+ media_folder_get_name(pFolderItem, &szFolderName);
+
+ if(szFolderName)
+ {
+ VideoLogInfo("szFolderName : %s", szFolderName);
+ return szFolderName;
+ }
+ }
+
+ return NULL;
+}
+
+char* MpUtilMediaSvcGetVideoFolderUrl(int nVideoFolderIndex)
+{
+ if(!VideoFolderList)
+ {
+ VideoLogInfo("Not exist video item list handle.");
+ return 0;
}
- Mitem *m_Item = NULL;
- char *thumb_path = NULL;
+ VideoLogInfo("nVideoItemIndex : %d", nVideoFolderIndex);
+
+ if(nVideoFolderIndex < 0 || nVideoFolderIndex >= MpUtilMediaSvcGetVideoFolderListSize())
+ {
+ VideoLogInfo("Error number of list item.");
+ return NULL;
+ }
- minfo_get_item(pMediaSvcHandle, szMediaUri, &m_Item);
+ char *szFolderPath = NULL;
+ media_folder_h pFolderItem = (media_folder_h)eina_list_nth(VideoFolderList, nVideoFolderIndex);
+ if(pFolderItem)
+ {
+ media_folder_get_path(pFolderItem, &szFolderPath);
- if (m_Item) {
- /* prevent 2011/07/12 */
- thumb_path = strdup(m_Item->thumb_url);
- minfo_destroy_mtype_item(m_Item);
- return thumb_path;
+ if(szFolderPath)
+ {
+ VideoLogInfo("szFolderPath : %s", szFolderPath);
+ return szFolderPath;
+ }
}
return NULL;
}
-bool MpUtilMediaSvcGetPreNextVideoUrl(char *szCurrMediaUri, char *szPreMediaUri, char *szNextMediaUri)
+static bool MpUtilMediaSvcBookmarkItemCb(media_bookmark_h pBookmark, void *pUserData)
{
VideoLogInfo("");
- if (!szCurrMediaUri) {
- VideoLogInfo("[ERR] No exist current file path.");
+ media_bookmark_h pAssignBookmark = NULL;
+ media_bookmark_clone(&pAssignBookmark, pBookmark);
+
+ GList **pList = (GList**)pUserData;
+ *pList = g_list_append(*pList, pAssignBookmark);
+
+ return TRUE;
+}
+
+bool MpUtilMediaSvcBookmarkListGet(char *vid, GList **list)
+{
+ if(!vid)
+ {
+ VideoLogInfo("No exist vid.");
return FALSE;
}
- if (!VideoItemList) {
- VideoLogInfo("No exist VideoItemList.");
+ if(!list)
+ {
+ VideoLogInfo("No exist list.");
return FALSE;
}
- int nCount = 0;
- int nListSize = 0;
- Mitem *m_Item = NULL;
- Eina_List *pIterateList = NULL;
+ VideoLogInfo("vid : %s", vid);
- memset(szPreMediaUri, 0, sizeof(char) * STR_LEN_MAX);
- memset(szNextMediaUri, 0, sizeof(char) * STR_LEN_MAX);
+ filter_h m_FilterHandle = NULL;
- nListSize = eina_list_count(VideoItemList);
+ if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to create media filter handle.");
+ return FALSE;
+ }
- if (nListSize <= 1) {
- VideoLogInfo("Video list size == 1.");
+ if(media_filter_set_order(m_FilterHandle, MEDIA_CONTENT_ORDER_DESC, BOOKMARK_MARKED_TIME, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to set order.");
+ media_filter_destroy(m_FilterHandle);
return FALSE;
}
- EINA_LIST_FOREACH(VideoItemList, pIterateList, m_Item) {
- if (m_Item == NULL)
- continue;
+ if(media_info_foreach_bookmark_from_db(vid, m_FilterHandle, MpUtilMediaSvcBookmarkItemCb, list) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to get bookmark of video item with filter condition.");
+ media_filter_destroy(m_FilterHandle);
+ return FALSE;
+ }
- VideoLogInfo("URL of the File item - %s (%d / %d)", m_Item->file_url, nCount, nListSize);
+ if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("Fail to destroy media filter handle.");
+ return FALSE;
+ }
- if (!strcmp(m_Item->file_url, szCurrMediaUri)) {
- m_Item = NULL;
- m_Item = (Mitem *) eina_list_nth(VideoItemList, nCount - 1);
- if (m_Item) {
- strncpy(szPreMediaUri, m_Item->file_url, (sizeof(char) * STR_LEN_MAX) - 1);
- }
+ return TRUE;
+}
- m_Item = NULL;
- m_Item = (Mitem *) eina_list_nth(VideoItemList, nCount + 1);
- if (m_Item) {
- strncpy(szNextMediaUri, m_Item->file_url, (sizeof(char) * STR_LEN_MAX) - 1);
- }
+void MpUtilMediaSvcBookmarkListClear(GList *pList)
+{
+ VideoLogInfo("");
- VideoLogInfo("PreMediaUri:%s", szPreMediaUri);
- VideoLogInfo("NextMediaUri:%s", szNextMediaUri);
+ if(pList == NULL)
+ {
+ VideoLogInfo("list == NULL\n");
+ return;
+ }
- return TRUE;
- }
+ media_bookmark_h pBookmarkItem = NULL;
- ++nCount;
+ int nCount = 0;
+ int i = 0;
+
+ nCount = g_list_length(pList);
+ for(i = 0; i < nCount; i++)
+ {
+ pBookmarkItem = (void *)g_list_nth_data(pList, i);
+ if(pBookmarkItem)
+ {
+ media_bookmark_destroy(pBookmarkItem);
+ pBookmarkItem = NULL;
+ }
}
- return FALSE;
+ g_list_free(pList);
}
-void MpUtilMediaSvcGetVideoID(const char *szPath, char *szVideoID)
+int MpUtilMediaSvcBookmarkInsert(char *vid, int position, char *path)
{
-
VideoLogInfo("");
-
- Mitem *item = NULL;
int ret = 0;
- ret = minfo_get_item(pMediaSvcHandle, szPath, &item);
- if (ret < 0) {
- VideoLogInfo("minfo_get_item API error return:%s, %d", szPath, ret);
- return;
+ if(vid < 0 || path == NULL)
+ {
+ VideoLogInfo("Invalid Parameter : %d, %s", vid, path);
+ return -1;
}
- if (item) {
- memset((void*)szVideoID, 0, STR_LEN_MAX);
- strncpy(szVideoID, item->uuid, STR_LEN_MAX-1);
- minfo_destroy_mtype_item(item);
+ if(media_bookmark_insert_to_db(vid, position, path) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("minfo_add_bookmark ERR : %d", ret);
+ return -1;
}
-}
+ return 0;
+}
-void MpUtilMediaSvcSaveLastPlayedTime(char* szMediaUri, unsigned int nLastPlayedTime)
+int MpUtilMediaSvcBookmarkDelete(char *vid, int position)
{
- if (!szMediaUri) {
- VideoLogInfo("No exist media uri.");
- return;
+ VideoLogInfo("");
+ bool ret = 0;
+
+ int bookmarkid = 0;
+ char *path = NULL;
+
+ GList *list = NULL;
+ media_bookmark_h data = NULL;
+ Eina_List *l = NULL;
+
+ ret = MpUtilMediaSvcBookmarkListGet(vid, &list);
+ if(ret == FALSE)
+ {
+ return -1;
+ }
+
+ EINA_LIST_FOREACH((Eina_List *)list, l, data)
+ {
+ if(data)
+ {
+ time_t nMarkedTime;
+ media_bookmark_get_marked_time(data, &nMarkedTime);
+ if(position == nMarkedTime)
+ {
+ media_bookmark_get_bookmark_id(data, &bookmarkid);
+ media_bookmark_get_thumbnail_path(data, &path);
+ break;
+ }
+ }
+ }
+
+ MpUtilMediaSvcBookmarkListClear(list);
+
+ if(media_bookmark_delete_from_db(bookmarkid) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] media_bookmark_delete_from_db()");
+ if(path)
+ {
+ free(path);
+ }
+ return -1;
+ }
+
+ ecore_file_init();
+ if(ecore_file_exists(path))
+ {
+ if(ecore_file_remove(path))
+ {
+ VideoLogInfo("Remove success :%s\n", path);
+ }
+ else
+ {
+ VideoLogInfo("Remove Failed :%s \n", path);
+ }
+ }
+ else
+ {
+ VideoLogInfo("The file not eixst :%s\n", path);
+ }
+
+ ecore_file_shutdown();
+
+ if(path)
+ {
+ free(path);
}
+ return 0;
+}
+
+int MpUtilMediaSvcBookmarkDeleteAll(char *vid)
+{
VideoLogInfo("");
+ bool ret = 0;
+
+ int bookmarkid = 0;
- char szVid[STR_LEN_MAX] = {0};
+ GList *list = NULL;
+ media_bookmark_h data = NULL;
+ Eina_List *l = NULL;
+ char *szThumbnailPath = NULL;
- MpUtilMediaSvcGetVideoID(szMediaUri, szVid);
+ ret = MpUtilMediaSvcBookmarkListGet(vid, &list);
+ if(ret == FALSE)
+ {
+ return -1;
+ }
+
+ EINA_LIST_FOREACH((Eina_List *)list, l, data)
+ {
+ if(data)
+ {
+ media_bookmark_get_bookmark_id(data, &bookmarkid);
+ media_bookmark_get_thumbnail_path(data, &szThumbnailPath);
+
+ if(szThumbnailPath)
+ {
+ ecore_file_init();
+ if(ecore_file_exists(szThumbnailPath))
+ {
+ if(ecore_file_remove(szThumbnailPath))
+ {
+ VideoLogInfo("Remove success : %s", szThumbnailPath);
+ }
+ else
+ {
+ VideoLogInfo("Remove Failed : %s", szThumbnailPath);
+ }
+ }
+ else
+ {
+ VideoLogInfo("The file not eixst :%s", szThumbnailPath);
+ }
+ ecore_file_shutdown();
+ }
- if (strlen(szVid) > 0) {
- minfo_update_video_meta_info_int(pMediaSvcHandle, szVid, MINFO_VIDEO_META_BOOKMARK_LAST_PLAYED, nLastPlayedTime);
- } else {
- VideoLogInfo("Invalid video ID.");
+ if(media_bookmark_delete_from_db(bookmarkid) != MEDIA_CONTENT_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR]minfo_delete_bookmark");
+ return -1;
+ }
+ }
}
+
+ MpUtilMediaSvcBookmarkListClear(list);
+
+ return 0;
+}
+
+char* MpUtilMediaSvcBookmarkGetThumbnail(void* pBookmarkItemHandle)
+{
+ char *szThumbnailPath = NULL;
+
+ media_bookmark_get_thumbnail_path((media_bookmark_h)pBookmarkItemHandle, &szThumbnailPath);
+
+ return szThumbnailPath;
+}
+
+int MpUtilMediaSvcBookmarkGetPos(void* pBookmarkItemHandle)
+{
+ time_t nBookmarkTime;
+
+ media_bookmark_get_marked_time((media_bookmark_h)pBookmarkItemHandle, &nBookmarkTime);
+
+ return (int)nBookmarkTime;
}
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
+#include <app.h>
+#include <sound_manager.h>
#include <aul.h>
#include <glib.h>
#include <errno.h>
#include <vconf.h>
-#include <pmapi.h>
+#include <power.h>
#include <utilX.h>
#include <unistd.h>
+#include <E_DBus.h>
#include <signal.h>
-#include <sensor.h>
-#include <appsvc.h>
#include <Ecore_X.h>
#include <ui-gadget.h>
#include <Ecore_Evas.h>
#include <vconf-keys.h>
-#include <mm_session.h>
-#include <mm_sound.h>
-#include <appcore-efl.h>
-#include <appcore-common.h>
+
#include "mp-util.h"
#include "mp-video-log.h"
#include "mp-video-string-define.h"
#include "mp-video-info-ctrl.h"
-#define MP_LAUNCH_BLUETOOTH_PACKAGE_NAME "org.tizen.bluetooth"
-#define MP_UTIL_VIDEO_PATH "path"
-#define MP_UTIL_USER_AGENT_KEY "db/admin/uagent"
-#define MP_UTIL_COOKIE "cookie"
-#define MP_UTIL_MMC_PATH "/opt/storage/sdcard"
+#define MP_LAUNCH_BLUETOOTH_PACKAGE_NAME "org.tizen.bluetooth"
+#define MP_UTIL_USER_AGENT_KEY "db/admin/uagent"
+#define MP_UTIL_TEMP_USER_AGENT_VALUE "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S8500/1.0; U; Bada/1.0; en-us) AppleWebKit/533.1 (KHTML, like Gecko) Dolfin/2.0 Mobile WVGA SMM-MMS/1.2.0 OPN-B"
+#define MP_UTIL_MMC_PATH "/opt/storage/sdcard"
#define MP_UTIL_FILE_PREFIX "file://"
+static bool bAlphaSet = TRUE;
static Ecore_X_Window pMainXwindow = 0;
static Ecore_X_Display *pX11DisplayHandle = NULL;
+static Evas_Object *pMainRect = NULL;
+
static Evas_Object *pPopUpHandle = NULL;
static Evas_Object *pPopupWindow = NULL;
int nRtspCount = 0;
bool bXmlLoad = FALSE;
+static MpVideoRotateType nCurRotateValue = VIDEO_ROTATE_PORTRAIT_NORMAL;
+
/*
* Callback function
*/
-
static void MpUtilBatteryStatusChangeCb(keynode_t *pKeyNode, void *pUserData)
{
VideoLogInfo("");
if (!vconf_get_int
(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &nLowBatteryStatus)) {
if (nLowBatteryStatus <= VCONFKEY_SYSMAN_BAT_POWER_OFF) {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
return;
}
} else {
strncpy(szFilename, pAppData->szMediaUri, sizeof(szFilename) - 1);
VideoLogInfo("FILE NAME[%s]", szFilename);
if (!strcmp(MP_UTIL_MMC_PATH, szFilename)) {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+ /* MpUtilNotifyPopUp(pAppData, "MMC card is ejected", NULL); */
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
}
}
} else {
bXmlLoad = FALSE;
}
+void MpUtilSetAlphaOfMainWindow(bool bSetAlpha)
+{
+ VideoLogInfo("");
+
+ if(bSetAlpha)
+ {
+ evas_object_hide(pMainRect);
+ }
+ else
+ {
+ evas_object_show(pMainRect);
+ }
+ bAlphaSet = bSetAlpha;
+}
+
void *MpUtilCreateMainWindow(const char *pStrName)
{
VideoLogInfo("");
pMainXwindow = 0;
}
- int nWidth, nHeight;
Evas_Object *pEvasObject;
- ecore_evas_app_comp_sync_set(0);
pEvasObject = elm_win_add(NULL, pStrName, ELM_WIN_BASIC);
if (pEvasObject) {
elm_win_title_set(pEvasObject, pStrName);
- elm_win_borderless_set(pEvasObject, EINA_TRUE);
- ecore_x_window_size_get(ecore_x_window_root_first_get(),
- &nWidth, &nHeight);
-
- evas_object_resize(pEvasObject, nWidth, nHeight);
-
evas_object_smart_callback_add(pEvasObject, "delete,request",
MpUtilDestroyMainWindow, NULL);
}
pMainXwindow = elm_win_xwindow_get(pEvasObject);
-
- ////////////////////////////
- // TEMP
-
- Evas_Object *pRect = NULL;
+#if 0
+ unsigned int output = 1;
+ Ecore_X_Display *display = ecore_x_display_get ();
+ Ecore_X_Atom atom = ecore_x_atom_get ("XV_OUTPUT");
+ utilx_set_window_cardinal_property (display, pMainXwindow, atom, &output);
+#endif
Evas *pMainWindowEvas = evas_object_evas_get(pEvasObject);
-
- pRect = evas_object_rectangle_add(pMainWindowEvas);
- evas_object_color_set(pRect, 0, 0, 0, 0);
- evas_object_render_op_set(pRect, EVAS_RENDER_COPY);
- evas_object_resize(pRect, nWidth, nHeight);
- evas_object_show(pRect);
-
- return (void *)pEvasObject;
-}
-
-void *MpUtilCreateWindow(const char *pStrName)
-{
- VideoLogInfo("");
-
- if (!pStrName) {
- VideoLogInfo("[ERR] No exist pStrName.");
- return NULL;
- }
- if (!pMainXwindow) {
- VideoLogInfo("[ERR] No exist pMainXwindow.");
- return NULL;
+ pMainRect = evas_object_rectangle_add(pMainWindowEvas);
+ int nW, nH;
+ if(nCurRotateValue == VIDEO_ROTATE_PORTRAIT_NORMAL ||
+ nCurRotateValue == VIDEO_ROTATE_PORTRAIT_REVERSE)
+ {
+ ecore_x_window_size_get(ecore_x_window_root_first_get(),
+ &nW, &nH);
}
-
- int nWidth = 0, nHeight = 0;
- Evas_Object *pEvasObject = NULL;
-
- pEvasObject = elm_win_add(NULL, pStrName, ELM_WIN_BASIC);
- if (pEvasObject) {
- elm_win_title_set(pEvasObject, pStrName);
- elm_win_borderless_set(pEvasObject, EINA_TRUE);
- ecore_x_window_size_get(ecore_x_window_root_first_get(), &nWidth, &nHeight);
- evas_object_resize(pEvasObject, nWidth, nHeight);
+ else {
+ ecore_x_window_size_get(ecore_x_window_root_first_get(),
+ &nW, &nH);
}
- elm_win_alpha_set(pEvasObject, TRUE);
- ecore_x_icccm_transient_for_set(elm_win_xwindow_get(pEvasObject), pMainXwindow);
- utilx_set_window_effect_state(ecore_x_display_get(), elm_win_xwindow_get(pEvasObject), 0);
- evas_object_show(pEvasObject);
+ evas_object_move(pMainRect, 0, 0);
+ evas_object_resize(pMainRect, nW, nH);
+ evas_object_color_set(pMainRect, 0, 0, 0, 255);
+ evas_object_hide(pMainRect);
return (void *)pEvasObject;
}
int MpUtilSetKeyGrab(const char *szKeyName, int nGrabMode)
{
VideoLogInfo("");
-
if (!pX11DisplayHandle) {
pX11DisplayHandle = ecore_x_display_get();
}
}
utilx_grab_key(pX11DisplayHandle, pMainXwindow, szKeyName, nGrabMode);
-
return TRUE;
}
if (pMainXwindow && pX11DisplayHandle) {
utilx_ungrab_key(pX11DisplayHandle, pMainXwindow, szKeyName);
}
-
return TRUE;
}
+
bool MpUtilCheckRTSPType(char *szUriPath)
{
if(szUriPath == NULL) {
return FALSE;
}
+ //VideoLogInfo(" URI : %s", szUriPath);
+
if (strstr(szUriPath, "rtp"))
return TRUE;
else if (strstr(szUriPath, "rtsp"))
return 0;
}
-bool MpUtilGetURIFromBundle(bundle * pBundleData, VideoAppData *pAppData)
-{
- char *pStrVideoURI = NULL;
-
- if (!pBundleData || !bundle_get_count(pBundleData)) {
- VideoLogInfo
- ("[ERR] No exist pBundleData pointer or bundle count value.");
- return FALSE;
- }
-
- pStrVideoURI = (char *)bundle_get_val(pBundleData, MP_UTIL_VIDEO_PATH);
- if (pStrVideoURI) {
- strncpy(pAppData->szMediaUri, pStrVideoURI, STR_LEN_MAX - 1);
- } else {
- VideoLogInfo("[ERR] No exist video/streaming URI.");
- return FALSE;
- }
-
- VideoLogInfo("Video/Streaming URI path pStrVideoURI : %s",
- pStrVideoURI);
- VideoLogInfo("Video/Streaming URI path pAppData->szMediaUri : %s",
- pAppData->szMediaUri);
-
- return TRUE;
-}
-
-bool MpUtilGetURIFromAUL(bundle * pBundleData, VideoAppData *pAppData)
-{
- char *pStrVideoURI = NULL;
-
- if (!pBundleData || !bundle_get_count(pBundleData)) {
- VideoLogInfo
- ("[ERR] No exist pBundleData pointer or bundle count value.");
- return FALSE;
- }
-
-
- if(!strcmp(APPSVC_OPERATION_VIEW , appsvc_get_operation(pBundleData)))
- {
- pStrVideoURI = (char *)appsvc_get_uri(pBundleData);
- if (pStrVideoURI) {
- strncpy(pAppData->szMediaUri, pStrVideoURI, STR_LEN_MAX - 1);
- } else {
- VideoLogInfo("[ERR] No exist video/streaming URI.");
- return FALSE;
- }
- }
- else
- {
- VideoLogInfo("[ERR] No exist Operation.");
- return FALSE;
- }
-
- VideoLogInfo("Video/Streaming URI path pStrVideoURI : %s",
- pStrVideoURI);
- VideoLogInfo("Video/Streaming URI path pAppData->szMediaUri : %s",
- pAppData->szMediaUri);
-
- return TRUE;
-}
-
-
-bool MpUtilGetCookieFromBundle(bundle * pBundleData, VideoAppData *pAppData)
-{
- char *pStrVideoCookie = NULL;
-
- if (!pBundleData || !bundle_get_count(pBundleData)) {
- VideoLogInfo
- ("[ERR] No exist pBundleData pointer or bundle count value.");
- return FALSE;
- }
-
- pStrVideoCookie = (char *)bundle_get_val(pBundleData, MP_UTIL_COOKIE);
- if (pStrVideoCookie) {
- strncpy(pAppData->szCookie, pStrVideoCookie, STR_LEN_MAX - 1);
- } else {
- VideoLogInfo("[ERR] No exist video/streaming URI.");
- return FALSE;
- }
-
- VideoLogInfo("Video/Streaming URI path Cookie : %s", pStrVideoCookie);
-
- return TRUE;
-}
-
bool MpUtilCheckLocalFileExist(char *uri)
{
VideoLogInfo("");
- if (uri == NULL) {
+ if(uri == NULL)
+ {
VideoLogInfo("[ERR]");
return FALSE;
}
if(strstr(uri,MP_UTIL_FILE_PREFIX))
{
- if (!g_file_test(uri+strlen(MP_UTIL_FILE_PREFIX),
- G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
+ if (!g_file_test(uri+strlen(MP_UTIL_FILE_PREFIX), G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+ {
return FALSE;
}
return TRUE;
}
else
{
- if (!g_file_test(uri, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
- return FALSE;
- }
- return TRUE;
-}
-
-}
-
-bool MpUtilCheckVideoURI(VideoAppData *pAppData)
-{
- VideoLogInfo("");
-
- if (pAppData == NULL) {
- VideoLogInfo("[ERR]");
- return FALSE;
- }
-
- if (strlen(pAppData->szMediaUri) > 0) {
- if (MpUtilCheckPlayerType(pAppData->szMediaUri)) {
- VideoLogInfo("=== SETTING STREAMING TYPE ===");
- strncpy(pAppData->szVideoTitle, MP_STREAMING_PLAYER_STR,
- STR_LEN_MAX - 1);
- pAppData->nCurPlayerType = MP_STREAMING_PLAYER;
- } else {
- VideoLogInfo("=== SETTING VIDEO TYPE ===");
- pAppData->nCurPlayerType = MP_VIDEO_PLAYER;
+ if(!g_file_test(uri, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+ {
+ return FALSE;
}
- } else {
- VideoLogInfo("[ERR] No exist video/streaming URI.");
- return FALSE;
+ return TRUE;
}
-
- VideoLogInfo("pAppData->szMediaUri : %s", pAppData->szMediaUri);
-
- return TRUE;
}
bool MpUtilCheckBatteryStatus(void)
return TRUE;
}
-
int MpUtilBatteryStatusNoti(VideoAppData *pAppData)
{
VideoLogInfo("");
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("[ERR] No exist appdata.");
return FALSE;
}
- if (vconf_notify_key_changed
- (VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, MpUtilBatteryStatusChangeCb,
- pAppData)) {
+ if(vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, MpUtilBatteryStatusChangeCb, pAppData))
+ {
VideoLogInfo("[ERR] Fail to set Battery notification.");
+ /* return FALSE; */
}
return TRUE;
(VCONFKEY_FILEMANAGER_DB_STATUS, MpUtilMMCStatusChangeCb,
pAppData) < 0) {
VideoLogInfo("[ERR] Fail to set MMC notification.");
+ //return FALSE;
}
return TRUE;
}
-
-
int MpUtilMMCstatusNotiIgnore(void)
{
VideoLogInfo("");
if (vconf_ignore_key_changed
(VCONFKEY_FILEMANAGER_DB_STATUS, MpUtilMMCStatusChangeCb) < 0) {
VideoLogInfo("[ERR] Fail to ignore MMC status.");
- }
+ //return FALSE;
+ }
return TRUE;
}
+
void MpUtilLanguageInit(VideoAppData *pAppData)
{
VideoLogInfo("");
textdomain(PACKAGE);
}
-int MpUtilCheckStartPositionTime(void *pBundle, char *szBundleKey)
-{
- VideoLogInfo("");
-
- if (!pBundle) {
- VideoLogInfo("No exist bundle data.");
- return 0;
- }
-
- int nStartPositionTime = 0;
- char *szStartPosTime = (char *)bundle_get_val(pBundle, szBundleKey);
-
- if (!szStartPosTime) {
- VideoLogInfo("No exist start position time.");
- return 0;
- }
-
- nStartPositionTime = atoi(szStartPosTime);
-
- VideoLogInfo("Start position time : %d", nStartPositionTime);
-
- return nStartPositionTime;
-}
-
-bool MpUtilCheckLaunchingByMime(void *pBundle, char *szMediaUri)
+int MpUtilCheckDlnaSortType(void *pSvcHandle, char *szBundleKey)
{
VideoLogInfo("");
- if (!pBundle) {
- VideoLogInfo("[ERR] No Exist bundle.");
- return FALSE;
- }
-
- if (!szMediaUri) {
- VideoLogInfo("[ERR] No Exist media uri.");
- return FALSE;
+ if(!pSvcHandle)
+ {
+ VideoLogInfo("No exist service data.");
+ return (int)MP_MEDIA_SORT_BY_NONE;
}
- char *szMimeContent =
- (char *)bundle_get_val(pBundle, AUL_K_MIME_CONTENT);
-
- if (!szMimeContent) {
+// char szSortType[SVC_LEN_MAX] = {0};
+ char *szSortType = (char*)malloc(sizeof(char) * SVC_LEN_MAX);
+ if(service_get_extra_data(pSvcHandle, szBundleKey, &szSortType) != SERVICE_ERROR_NONE)
+ {
VideoLogInfo("No exist mime type.");
return FALSE;
}
- VideoLogInfo("Mime content : %s", szMimeContent);
- strncpy(szMediaUri, szMimeContent, STR_LEN_MAX - 1);
-
- return TRUE;
-}
-
-int MpUtilCheckLaunchingByOtherApp(void *pBundle, char *szBundleKey)
-{
- VideoLogInfo("");
-
- if (!pBundle) {
- VideoLogInfo("No exist bundle data.");
- return MP_LAUNCH_APP_DEFAULT;
- }
-
- char *szLaunchingByOtherApp =
- (char *)bundle_get_val(pBundle, szBundleKey);
- MpLaunchingAppType nTmpLaunchingAppType = MP_LAUNCH_APP_DEFAULT;
-
- if (!szLaunchingByOtherApp) {
- VideoLogInfo("No exist Launching application.");
- return nTmpLaunchingAppType;
- }
-
- if (!strcmp(szLaunchingByOtherApp, "gallery")) {
- nTmpLaunchingAppType = MP_LAUNCH_APP_GALLERY;
- } else if (!strcmp(szLaunchingByOtherApp, "image_viewer")) {
- nTmpLaunchingAppType = MP_LAUNCH_APP_IMAGE_VIEWER;
- } else if (!strcmp(szLaunchingByOtherApp, "email")) {
- nTmpLaunchingAppType = MP_LAUNCH_APP_SIMPLE_VIEW;
- } else if (!strcmp(szLaunchingByOtherApp, "message")) {
- nTmpLaunchingAppType = MP_LAUNCH_APP_SIMPLE_VIEW;
- } else if (!strcmp(szLaunchingByOtherApp, "light_play_view")) {
- nTmpLaunchingAppType = MP_LAUNCH_APP_SIMPLE_VIEW;
- } else {
- nTmpLaunchingAppType = MP_LAUNCH_APP_DEFAULT;
- }
-
- VideoLogInfo("Start position time : %d", nTmpLaunchingAppType);
-
- return (int)nTmpLaunchingAppType;
-}
-
-int MpUtilCheckSortType(void *pBundle, char *szBundleKey)
-{
- VideoLogInfo("");
-
- if (!pBundle) {
- VideoLogInfo("No exist bundle data.");
- return (int)MP_MEDIA_SORT_BY_NONE;
- }
-
- char *szSortType = (char *)bundle_get_val(pBundle, szBundleKey);
- MpMediaSortType nTmpSortType = MP_MEDIA_SORT_BY_NAME_DESC;
+ int nTmpSortType = atoi(szSortType);
- if (!szSortType) {
- VideoLogInfo("No exist sort type information.");
- return (int)nTmpSortType;
- }
+ VideoLogInfo("nTmpSortType : %d", nTmpSortType);
- if (!strcmp(szSortType, "name_asc")) {
- nTmpSortType = MP_MEDIA_SORT_BY_NAME_ASC;
- } else if (!strcmp(szSortType, "name_desc")) {
- nTmpSortType = MP_MEDIA_SORT_BY_NAME_DESC;
- } else if (!strcmp(szSortType, "date_asc")) {
- nTmpSortType = MP_MEDIA_SORT_BY_DATE_ASC;
- } else if (!strcmp(szSortType, "date_desc")) {
- nTmpSortType = MP_MEDIA_SORT_BY_DATE_DESC;
- } else if (!strcmp(szSortType, "none")) {
- nTmpSortType = MP_MEDIA_SORT_BY_NONE;
- } else {
- nTmpSortType = MP_MEDIA_SORT_BY_NAME_DESC;
- }
+ free(szSortType);
return (int)nTmpSortType;
}
-int MpUtilCheckListType(void *pBundle, char *szBundleKey)
-{
- VideoLogInfo("");
-
- if (!pBundle) {
- VideoLogInfo("No exist bundle data.");
- VideoLogInfo("Video list type : folder");
- return (int)MP_VIDEO_LIST_TYPE_FOLDER;
- }
-
- if (!szBundleKey) {
- VideoLogInfo("No exist bundle kay.");
- VideoLogInfo("Video list type : folder");
- return (int)MP_VIDEO_LIST_TYPE_FOLDER;
- }
-
- char *szVideoListType = (char *)bundle_get_val(pBundle, szBundleKey);
- MpVideoListType nTmpVideoListType = MP_VIDEO_LIST_TYPE_FOLDER;
-
- if (!szVideoListType) {
- VideoLogInfo("No exist video list type information.");
- VideoLogInfo("Video list type : folder");
- return (int)nTmpVideoListType;
- }
-
- if (!strcmp(szVideoListType, "folder")) {
- nTmpVideoListType = MP_VIDEO_LIST_TYPE_FOLDER;
- VideoLogInfo("Video list type : folder");
- } else if (!strcmp(szVideoListType, "all_folder_video")) {
- nTmpVideoListType = MP_VIDEO_LIST_TYPE_ALL_FOLDER_GALLERY;
- VideoLogInfo("Video list type : all_folder_video");
- } else if (!strcmp(szVideoListType, "tag_video")) {
- nTmpVideoListType = MP_VIDEO_LIST_TYPE_TAG_GALLERY;
- VideoLogInfo("Video list type : tag_video");
- } else if (!strcmp(szVideoListType, "favorite")) {
- nTmpVideoListType = MP_VIDEO_LIST_TYPE_FAVORITE;
- VideoLogInfo("Video list type : favorite");
- } else {
- nTmpVideoListType = MP_VIDEO_LIST_TYPE_FOLDER;
- VideoLogInfo("Video list type : folder");
- }
-
- return (int)nTmpVideoListType;
-}
-
-bool MpUtilGetTagNameOfGallery(void *pBundle, char *szBundleKey,
- char *szTagName)
-{
- VideoLogInfo("");
-
- if (!pBundle) {
- VideoLogInfo("No exist bundle.");
- return FALSE;
- }
-
- if (!szBundleKey) {
- VideoLogInfo("No exist bundle kay.");
- return FALSE;
- }
-
- if (!szTagName) {
- VideoLogInfo("No exist pAppData.");
- return FALSE;
- }
-
- char *szVideoTagName = (char *)bundle_get_val(pBundle, szBundleKey);
-
- if (!szVideoTagName) {
- VideoLogInfo("No exist video tag name.");
- return FALSE;
- }
-
- strncpy(szTagName, szVideoTagName, STR_LEN_MAX - 1);
-
- VideoLogInfo("szTagName : %s", szTagName);
-
- return TRUE;
-}
-
-int MpUtilCheckDlnaSortType(void *pBundle, char *szBundleKey)
+int MpUtilCheckDlnaMediaID(void *pSvcHandle, char *szBundleKey)
{
VideoLogInfo("");
- if (!pBundle) {
- VideoLogInfo("No exist bundle data.");
- return (int)MP_MEDIA_SORT_BY_NONE;
- }
-
- char *szSortType = (char *)bundle_get_val(pBundle, szBundleKey);
- if(szSortType == NULL) {
- VideoLogInfo("No exist bundle value.");
+ if(!pSvcHandle)
+ {
+ VideoLogInfo("No exist service data.");
return -1;
}
- int nTmpSortType = atoi(szSortType);
-
- return (int)nTmpSortType;
-}
-int MpUtilCheckDlnaMediaID(void *pBundle, char *szBundleKey)
-{
- VideoLogInfo("");
-
- if (!pBundle) {
- VideoLogInfo("No exist bundle data.");
- return -1;
+// char szMediID[SVC_LEN_MAX] = {0};
+ char *szMediID = (char*)malloc(sizeof(char) * SVC_LEN_MAX);
+ if(service_get_extra_data(pSvcHandle, szBundleKey, &szMediID) != SERVICE_ERROR_NONE)
+ {
+ VideoLogInfo("No exist mime type.");
+ return FALSE;
}
- char *szMediID = (char *)bundle_get_val(pBundle, szBundleKey);
+ int media_id = atoi(szMediID);
- if (szMediID == NULL) {
- VideoLogInfo("No exist bundle value.");
- return -1;
- }
+ VideoLogInfo("media_id : %d", media_id);
- int media_id = atoi(szMediID);
+ free(szMediID);
return (int)media_id;
}
return NULL;
}
-bool MpUtilParsingXML(char *szMediaUri, VideoAppData *pAppData)
+bool MpUtilParsingXML(char *szMediaUri)
{
VideoLogInfo("");
char *pXmlData = NULL;
}
MpUtilInitXML();
- szTmpUri = (char *)strdup(pAppData->szMediaUri);
+ szTmpUri = (char *)strdup(szMediaUri);
if (szTmpUri == NULL) {
VideoLogInfo("[ERR]");
if (!g_str_has_suffix(szTmpUri, ".xml")) {
VideoLogInfo("No have xml uri.");
- if (szTmpUri)
+ /* prevent 2011/07/12 */
+ if (szTmpUri)
free(szTmpUri);
return TRUE;
}
if (nHttpCount > 1) {
nHttpQuality = 0;
- memset((void *)pAppData->szMediaUri, 0,
- sizeof(pAppData->szMediaUri));
- strncpy(pAppData->szMediaUri, pXmlItem[nHttpQuality].szURL,
- STR_LEN_MAX - 1);
+ memset((void *)szMediaUri, 0, sizeof(szMediaUri));
+ strncpy(szMediaUri, pXmlItem[nHttpQuality].szURL, STR_LEN_MAX - 1);
nXmlItemCount = nHttpCount;
} else if (nRtspCount > 1) {
nHttpQuality = 0;
- memset((void *)pAppData->szMediaUri, 0,
- sizeof(pAppData->szMediaUri));
- strncpy(pAppData->szMediaUri, pXmlItem[nHttpQuality].szURL,
- STR_LEN_MAX - 1);
- VideoLogInfo("URL : %s", pAppData->szMediaUri);
+ memset((void *)szMediaUri, 0, sizeof(szMediaUri));
+ strncpy(szMediaUri, pXmlItem[nHttpQuality].szURL, STR_LEN_MAX - 1);
+ VideoLogInfo("URL : %s", szMediaUri);
nXmlItemCount = nRtspCount;
} else {
char *szParsedUrl = NULL;
if (bResult == FALSE || szParsedUrl == NULL) {
VideoLogInfo("[ERR] XML parsing failed!");
free(szTmpUri);
- return FALSE;
+ //MpVideoAppCtrlExit(pAppData);
+ return FALSE;
}
- memset((void *)pAppData->szMediaUri, 0, STR_LEN_MAX);
- strncpy(pAppData->szMediaUri, szParsedUrl, STR_LEN_MAX - 1);
+ memset((void *)szMediaUri, 0, STR_LEN_MAX);
+ strncpy(szMediaUri, szParsedUrl, STR_LEN_MAX - 1);
if (szParsedUrl) {
free(szParsedUrl);
}
}
- pAppData->nCurPlayerType = MP_STREAMING_PLAYER;
-
- strncpy(pAppData->szVideoTitle, mp_get_title_from_xml(szTmpUri),
- STR_LEN_MAX - 1);
+ //pAppData->nCurPlayerType = MP_STREAMING_PLAYER;
+ //strncpy(pAppData->szVideoTitle, mp_get_title_from_xml(szTmpUri), STR_LEN_MAX - 1);
bXmlLoad = TRUE;
}
-bool MpUtilGetTitleFromFilepath(char *szFilepath, char *szTitle)
+int MpUtilGetRotationStateFromAppcore(void)
+{
+ VideoLogInfo("");
+ int bLocked = -1;
+
+ if (vconf_get_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, &bLocked) != 0)
+ {
+ VideoLogInfo("Get vlalue fail");
+ return nCurRotateValue;
+ }
+
+ if(bLocked == false)
+ {
+ switch(app_get_device_orientation())
+ {
+ case APP_DEVICE_ORIENTATION_0:
+ VideoLogInfo("VIDEO_ROTATE_PORTRAIT_NORMAL");
+ nCurRotateValue = VIDEO_ROTATE_PORTRAIT_NORMAL;
+ break;
+
+ case APP_DEVICE_ORIENTATION_90:
+ VideoLogInfo("VIDEO_ROTATE_PORTRAIT_REVERSE");
+ nCurRotateValue = VIDEO_ROTATE_LANDSCAPE_REVERSE;
+ break;
+
+ case APP_DEVICE_ORIENTATION_180:
+ VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_NORMAL");
+ nCurRotateValue = VIDEO_ROTATE_PORTRAIT_REVERSE;
+ break;
+
+ case APP_DEVICE_ORIENTATION_270:
+ VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_REVERSE");
+ nCurRotateValue = VIDEO_ROTATE_LANDSCAPE_NORMAL;
+ break;
+ }
+ }
+ return nCurRotateValue;
+}
+
+int MpUtilGetRotationState(void)
+{
+ VideoLogInfo("");
+
+ return nCurRotateValue;
+}
+
+void MpUtilSetRotationState(int nCurRotation)
+{
+ VideoLogInfo("");
+
+ nCurRotateValue = nCurRotation;
+
+ if (pPopupWindow) {
+ MpUtilRotateWindow(nCurRotation, pPopupWindow);
+ }
+}
+
+bool MpUtilGetTitleFromFilepath(char *szFilepath, char *szTitle, int nLengthTitle)
{
VideoLogInfo("");
char *szTitleName;
char *szExt;
+ memset(szTitle, 0, nLengthTitle);
+
szTitleName = strrchr(szFilepath, '/');
if (szTitleName)
int nTmpStringSize = szExt - szTitleName;
strncpy(szTitle, szTitleName, nTmpStringSize);
} else {
- strncpy(szTitle, szTitleName, STR_LEN_MAX - 1);
+ strncpy(szTitle, szTitleName, STR_LEN_MAX - 1);
}
return TRUE;
{
VideoLogInfo("");
- mm_session_init(MM_SESSION_TYPE_EXCLUSIVE);
+ sound_manager_set_session_type(SOUND_SESSION_TYPE_EXCLUSIVE);
}
void MpUtilFinishSession(void)
{
VideoLogInfo("");
-
- mm_session_finish();
+// jdlee
+// sound_manager_set_session_type(SOUND_SESSION_TYPE_SHARE);
+// m_m_session_finish();
}
void MpUtilVolumeTypeSet(void)
{
VideoLogInfo("");
- mm_sound_volume_primary_type_set(VOLUME_TYPE_MEDIA);
+// jdlee
+// m_m_sound_volume_primary_type_set(VOLUME_TYPE_MEDIA);
}
void MpUtilVolumeTypeUnset(void)
{
VideoLogInfo("");
- mm_sound_volume_primary_type_clear();
+// jdlee
+// m_m_sound_volume_primary_type_clear();
}
void MpUtilDeletePopupHandle(void)
} else {
VideoLogInfo("No exist popup window.");
}
+
+ MpUtilSetAlphaOfMainWindow(TRUE);
}
bool MpUtilNotifyPopUp(VideoAppData *pAppData, char *szContents, void *PopupButtonCallbackFunc)
}
MpUtilDeletePopupHandle();
- pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+
+ MpUtilSetAlphaOfMainWindow(FALSE);
+
+ pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_text_set(pPopUpHandle, szContents);
elm_object_part_text_set(pPopUpHandle, "title,text", dgettext("sys_string", MP_COM_POP_ERROR));
elm_popup_timeout_set(pPopUpHandle, 3.0);
- if (PopupButtonCallbackFunc) {
+ if(PopupButtonCallbackFunc)
+ {
evas_object_smart_callback_add(pPopUpHandle, "timeout", PopupButtonCallbackFunc, (void *)pAppData);
}
+ if(pPopupWindow)
+ {
+ MpUtilRotateWindow(MpUtilGetRotationState(), pPopupWindow);
+ }
+
evas_object_show(pPopUpHandle);
return TRUE;
}
MpUtilDeletePopupHandle();
- pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
- evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ MpUtilSetAlphaOfMainWindow(FALSE);
+
+ pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+
+ evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_text_set(pPopUpHandle, szContents);
elm_object_part_text_set(pPopUpHandle, "title,text", dgettext("sys_string", MP_COM_POP_ERROR));
elm_popup_timeout_set(pPopUpHandle, 3.0);
}
-bool MpUtilYesNoPopUp(VideoAppData *pAppData, char *szTitle, char *szContents,
- void *PopupYesButtonCallbackFunc, void *PopupNoButtonCallbackFunc)
+bool MpUtilYesNoPopUp(VideoAppData *pAppData, char *szTitle, char *szContents, void *PopupYesButtonCallbackFunc, void *PopupNoButtonCallbackFunc)
{
VideoLogInfo("");
- if (szTitle == NULL || szContents == NULL || pAppData == NULL) {
+ if(szTitle == NULL || szContents == NULL || pAppData == NULL)
+ {
VideoLogInfo("No have popup message or pAppData is null.");
return FALSE;
}
MpUtilDeletePopupHandle();
- pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+ MpUtilSetAlphaOfMainWindow(FALSE);
+
+ pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_object_text_set(pPopUpHandle, szContents);
elm_object_part_text_set(pPopUpHandle, "title,text", szTitle);
pButton = elm_button_add(pPopUpHandle);
+ elm_object_style_set ( pButton, "popup_button/default");
elm_object_text_set(pButton, dgettext(MP_SYS_STRING, MP_COM_SK_YES));
elm_object_part_content_set(pPopUpHandle, "button1", pButton);
pButton = elm_button_add(pPopUpHandle);
elm_object_text_set(pButton, dgettext(MP_SYS_STRING, MP_COM_SK_NO));
+ elm_object_style_set ( pButton, "popup_button/default");
elm_object_part_content_set(pPopUpHandle, "button2", pButton);
if(PopupNoButtonCallbackFunc)
{
evas_object_smart_callback_add(pButton, "clicked", PopupNoButtonCallbackFunc, (void*)pAppData);
}
-
+
+ elm_popup_timeout_set(pPopUpHandle, 3.0);
+
+ evas_object_show(pPopUpHandle);
+
+ return TRUE;
+}
+
+bool MpUtilRemoveQuestionPopUp(VideoAppData *pAppData, void *PopupDeleteButtonCallbackFunc, void *PopupCancelButtonCallbackFunc, void *pUserData)
+{
+ VideoLogInfo("");
+
+ if(pAppData == NULL || pUserData == NULL)
+ {
+ VideoLogInfo("No have popup message or pAppData is null.");
+ return FALSE;
+ }
+
+ Evas_Object *pButton = NULL;
+
+ MpUtilDeletePopupHandle();
+
+ MpUtilSetAlphaOfMainWindow(FALSE);
+
+ pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+
+ evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_text_set(pPopUpHandle, "title,text", MP_COM_BODY_DELETE_Q);
+
+ pButton = elm_button_add(pPopUpHandle);
+ elm_object_text_set(pButton, MP_COM_BODY_DELETE);
+ elm_object_style_set(pButton, "sweep/delete");
+ elm_object_part_content_set(pPopUpHandle, "button1", pButton);
+
+ if(PopupDeleteButtonCallbackFunc)
+ {
+ evas_object_smart_callback_add(pButton, "clicked", PopupDeleteButtonCallbackFunc, pUserData);
+ }
+
+ pButton = elm_button_add(pPopUpHandle);
+ elm_object_text_set(pButton, MP_COM_BUTTON_CANCEL);
+ elm_object_part_content_set(pPopUpHandle, "button2", pButton);
+
+ if(PopupCancelButtonCallbackFunc)
+ {
+ evas_object_smart_callback_add(pButton, "clicked", PopupCancelButtonCallbackFunc, pUserData);
+ }
+
elm_popup_timeout_set(pPopUpHandle, 3.0);
evas_object_show(pPopUpHandle);
Evas_Object *pLabel = NULL;
pLabel = elm_label_add(pBox);
+ elm_object_style_set(pLabel, "popup/default");
elm_object_text_set(pLabel, szString);
elm_label_ellipsis_set(pLabel, EINA_TRUE);
elm_label_wrap_width_set(pLabel, 614 * elm_config_scale_get());
evas_object_show(pLabel);
}
-bool MpUtilDetailPopup(VideoAppData *pAppData, char *szTitle, void *PopupButtonCallbackFunc)
+bool MpUtilDetailPopup(VideoAppData *pAppData, int nVideoItemIndex, char *szTitle, void *PopupButtonCallbackFunc)
{
VideoLogInfo("");
VideoLogInfo("No have popup message or pAppData is null.");
return FALSE;
}
+ char *szFilePath = NULL;
+ char *szVideoTitle = NULL;
char szTmpStr[STR_LEN_MAX] = {0};
char szTmpFileDate[STR_LEN_MAX] = {0};
double nLongtitude = 0.0;
double nLatitude = 0.0;
+ int nWidth = 0;
+ int nHeight = 0;
+
Evas_Object *pBox = NULL;
Evas_Object *pButton = NULL;
MpUtilDeletePopupHandle();
+ MpUtilSetAlphaOfMainWindow(FALSE);
+
pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- MpVideoInfoCtrlGetFileInfo(pAppData->szMediaUri, szTmpFileDate, STR_LEN_MAX, szTmpFileExtension, STR_LEN_MAX, szTmpFileSize, STR_LEN_MAX);
- MpVideoInfoCtrlGetGPS(pAppData->szMediaUri, &nLongtitude, &nLatitude);
+ szFilePath = MpUtilMediaSvcGetVideoUrl(nVideoItemIndex);
+ szVideoTitle = MpUtilMediaSvcGetVideoTitle(nVideoItemIndex);
+ nWidth = MpUtilMediaSvcGetVideoItemWidth(nVideoItemIndex);
+ nHeight = MpUtilMediaSvcGetVideoItemHeight(nVideoItemIndex);
+
+ MpVideoInfoCtrlGetFileInfo(szFilePath, szTmpFileDate, STR_LEN_MAX, szTmpFileExtension, STR_LEN_MAX, szTmpFileSize, STR_LEN_MAX);
+ MpVideoInfoCtrlGetGPS(szFilePath, &nLongtitude, &nLatitude);
pBox = elm_box_add(pPopUpHandle);
- snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %s </align></font_size>", dgettext(MP_SYS_STRING, MP_COM_BODY_DETAILS_TITLE), pAppData->szVideoTitle);
+ snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %s </align></font_size>", dgettext(MP_SYS_STRING, MP_COM_BODY_DETAILS_TITLE), szVideoTitle);
MpUtilSetLabelForDetail(pBox, szTmpStr);
memset(szTmpStr, 0, STR_LEN_MAX);
MpUtilSetLabelForDetail(pBox, szTmpStr);
memset(szTmpStr, 0, STR_LEN_MAX);
- snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %d x %d</align></font_size>", dgettext(MP_SYS_STRING, MP_IDLE_BODY_RESOLUTION), pAppData->nVideoWidthResolution, pAppData->nVideoHeightResolution);
+ snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %d x %d</align></font_size>", dgettext(MP_SYS_STRING, MP_IDLE_BODY_RESOLUTION), nWidth, nHeight);
MpUtilSetLabelForDetail(pBox, szTmpStr);
memset(szTmpStr, 0, STR_LEN_MAX);
elm_object_part_text_set(pPopUpHandle, "title,text", szTitle);
pButton = elm_button_add(pPopUpHandle);
+ elm_object_style_set ( pButton, "popup_button/default");
elm_object_text_set(pButton, dgettext(MP_SYS_STRING, MP_COM_SK_BACK));
elm_object_part_content_set(pPopUpHandle, "button1", pButton);
+ if(szFilePath)
+ {
+ free(szFilePath);
+ szFilePath = NULL;
+ }
+
+ if(szVideoTitle)
+ {
+ free(szVideoTitle);
+ szVideoTitle = NULL;
+ }
+
if(PopupButtonCallbackFunc)
{
evas_object_smart_callback_add(pButton, "clicked", PopupButtonCallbackFunc, (void*)pAppData);
}
MpUtilDeletePopupHandle();
- pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
- evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ MpUtilSetAlphaOfMainWindow(FALSE);
+
+ pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+ evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
Evas_Object *progressbar, *box, *label;
label = elm_label_add(pPopUpHandle);
evas_object_show(box);
elm_object_content_set(pPopUpHandle, box);
+ if (pPopupWindow) {
+ MpUtilRotateWindow(MpUtilGetRotationState(), pPopupWindow);
+ }
+
evas_object_show(pPopUpHandle);
return TRUE;
}
-void *MpUtilCreateButtonIcon(void *pParent, const char *szIconPath, bool nX, bool nY, void *pUserData, char* szButtonStyle, void *func)
+void *MpUtilCreateButtonIcon(void *pParent, const char *szIconPath, bool bSizeUp, bool bSizeDown, int nAspectWidth, int nAspectHeight, void *pUserData, char* szButtonStyle, void *func)
{
VideoLogInfo("");
Evas_Object *pIcon = NULL;
pButton = elm_button_add(pParent);
- pIcon = elm_icon_add(pParent);
- elm_icon_file_set(pIcon, szIconPath, NULL);
- evas_object_size_hint_aspect_set(pIcon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
- elm_icon_resizable_set(pIcon, nX, nY);
- if(szButtonStyle) {
+ if(szIconPath)
+ {
+ pIcon = elm_icon_add(pParent);
+ elm_icon_file_set(pIcon, szIconPath, NULL);
+ //evas_object_size_hint_aspect_set(pIcon, EVAS_ASPECT_CONTROL_VERTICAL, nAspectWidth, nAspectHeight);
+ evas_object_size_hint_aspect_set(pIcon, EVAS_ASPECT_CONTROL_NEITHER, nAspectWidth, nAspectHeight);
+ elm_icon_resizable_set(pIcon, bSizeUp, bSizeDown);
+ }
+
+ if(szButtonStyle)
+ {
elm_object_style_set(pButton, szButtonStyle);
}
- elm_object_part_content_set(pButton,PART_BUTTON_ICON, pIcon);
- evas_object_smart_callback_add(pButton, "clicked", func, (void *)pUserData);
+ if(pIcon)
+ {
+ elm_object_part_content_set(pButton,PART_BUTTON_ICON, pIcon);
+ }
+
+ if(func)
+ {
+ evas_object_smart_callback_add(pButton, "clicked", func, (void *)pUserData);
+ }
+
+ elm_object_focus_allow_set(pButton, EINA_FALSE);
+ evas_object_size_hint_weight_set(pButton, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(pButton);
return (void *)pButton;
}
-int MpUtilSendFileViaBluetooth(char *szFilepath)
+void *MpUtilCreateStyleButton(void *pParent, const char* szButtonText, const void *pUserData, char* szButtonStyle, void *func)
{
VideoLogInfo("");
- if (!szFilepath) {
- VideoLogInfo("[ERR] filepath == NULL.");
- }
-
- int nRet = 0;
+ Evas_Object *pButton = NULL;
- bundle *pBundleHandle = NULL;
+ pButton = elm_button_add(pParent);
- pBundleHandle = bundle_create();
+ if(szButtonStyle)
+ {
+ elm_object_style_set(pButton, szButtonStyle);
+ }
- bundle_add(pBundleHandle, "launch-type", "send");
- bundle_add(pBundleHandle, "filecount", "1");
- bundle_add(pBundleHandle, "files", szFilepath);
+ if(szButtonText)
+ {
+ elm_object_text_set(pButton, szButtonText);
+ }
- nRet = aul_launch_app(MP_LAUNCH_BLUETOOTH_PACKAGE_NAME, pBundleHandle);
+ if(func)
+ {
+ evas_object_smart_callback_add(pButton, "clicked", func, pUserData);
+ }
- bundle_free(pBundleHandle);
+ elm_object_focus_allow_set(pButton, EINA_FALSE);
+ evas_object_size_hint_weight_set(pButton, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(pButton);
- return nRet;
+ return (void *)pButton;
}
void *MpUtilLoadEdjFile(Evas * pEvas, char *szEdjName, char *szGroupName)
return TRUE;
}
-int *MpUtilGetMainWindowXID(void)
+unsigned int MpUtilGetMainWindowXID(void)
{
VideoLogInfo("");
-
if (pMainXwindow) {
VideoLogInfo("pMainXwindow : %d", pMainXwindow);
- return (int *)&pMainXwindow;
+ return pMainXwindow;
} else {
VideoLogInfo("No exist main window XID.");
}
-
return 0;
}
+void MpUtilRotateWindow(int nRotateMode, void *pWindowHandle)
+{
+ VideoLogInfo("");
+
+ if (!pWindowHandle) {
+ return;
+ }
+
+ switch (nRotateMode) {
+ case VIDEO_ROTATE_UNKNOWN:
+ VideoLogInfo("VIDEO_ROTATE_UNKNOWN");
+ elm_win_rotation_with_resize_set(pWindowHandle, 0);
+ break;
+
+ case VIDEO_ROTATE_PORTRAIT_NORMAL:
+ VideoLogInfo("VIDEO_ROTATE_PORTRAIT_NORMAL");
+ elm_win_rotation_with_resize_set(pWindowHandle, 0);
+ break;
+
+ case VIDEO_ROTATE_LANDSCAPE_NORMAL:
+ VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_NORMAL");
+ elm_win_rotation_with_resize_set(pWindowHandle, 270);
+ break;
+
+ case VIDEO_ROTATE_PORTRAIT_REVERSE:
+ VideoLogInfo("VIDEO_ROTATE_PORTRAIT_REVERSE");
+ elm_win_rotation_with_resize_set(pWindowHandle, 180);
+ break;
+
+ case VIDEO_ROTATE_LANDSCAPE_REVERSE:
+ VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_REVERSE");
+ elm_win_rotation_with_resize_set(pWindowHandle, 90);
+ break;
+
+ default:
+ VideoLogInfo("DEFAULT - VIDEO_ROTATE_UNKNOWN");
+ elm_win_rotation_with_resize_set(pWindowHandle, 0);
+ break;
+ }
+}
+
void MpUtilGetUserAgent(VideoAppData *pAppData)
{
VideoLogInfo("");
char *szUserAgent = NULL;
szUserAgent = vconf_get_str(VCONFKEY_ADMIN_UAGENT);
- if (szUserAgent) {
+ if(szUserAgent)
+ {
memset(pAppData->szUserAgent, 0, STR_LEN_MAX);
strncpy(pAppData->szUserAgent, szUserAgent, STR_LEN_MAX - 1);
free(szUserAgent);
- } else {
+ }
+ else
+ {
VideoLogInfo("!!!!! NO EXIST USER AGENT !!!!!");
}
- if (!vconf_get_int(VCONFKEY_WIFI_STATE, &nWifiMode)) {
+#if 0
+ memset(pAppData->szUserAgent, 0, STR_LEN_MAX);
+ snprintf(pAppData->szUserAgent, STR_LEN_MAX, "%s", MP_UTIL_TEMP_USER_AGENT_VALUE);
+#endif
+
+ if(!vconf_get_int(VCONFKEY_WIFI_STATE, &nWifiMode))
+ {
VideoLogInfo("User Agent : %s, Wi-Fi : %d", pAppData->szUserAgent, nWifiMode);
}
}
-
double MpUtilGetSysTime(void)
{
struct timeval tv;
{
VideoLogInfo("");
- pm_lock_state(LCD_NORMAL, GOTO_STATE_NOW, 0);
+ power_lock_state(POWER_STATE_NORMAL, 0);
}
void MpUtilLcdNormalPowerUnlockForPause(void)
{
VideoLogInfo("");
- pm_unlock_state(LCD_NORMAL, PM_KEEP_TIMER);
+ power_unlock_state(POWER_STATE_NORMAL);
}
void MpUtilLcdOffForPowerButton(void)
{
VideoLogInfo("");
- pm_unlock_state(LCD_NORMAL, PM_KEEP_TIMER);
+ power_unlock_state(POWER_STATE_NORMAL);
}
void MpUtilMultimediaKeyGrab(void)
{
VideoLogInfo("");
-
- MpUtilSetKeyGrab(PLAY_KEY, KEY_GRAB_OR_EXCLUSIVE);
+ MpUtilSetKeyGrab(PLAY_KEY, KEY_GRAB_OR_EXCLUSIVE);
MpUtilSetKeyGrab(STOP_KEY, KEY_GRAB_OR_EXCLUSIVE);
MpUtilSetKeyGrab(PAUSE_KEY, KEY_GRAB_OR_EXCLUSIVE);
MpUtilSetKeyGrab(NEXT_KEY, KEY_GRAB_OR_EXCLUSIVE);
MpUtilSetKeyUngrab(PREV_KEY);
MpUtilSetKeyUngrab(FORWARD_KEY);
MpUtilSetKeyUngrab(REWIND_KEY);
-}
+}
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-
-#include <appcore-efl.h>
-
#include "mp-util.h"
#include "mp-video-log.h"
#include "video-player.h"
static Eina_Bool MpVideoAnimationCtrlTimerCb(void *data)
{
+/* VideoLogInfo(""); */
+
char sig_format[SIGNAL_TEXT_MAX_LEN] = { 0, };
snprintf(sig_format, SIGNAL_TEXT_MAX_LEN, "%s.%d",
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-
-
-#include <mm_error.h>
-#include <mm_message.h>
+#include <app.h>
+#include <player.h>
+#include <mm_util_imgp.h>
+#include <image_util.h>
#include "mp-util.h"
#include "mp-video-log.h"
#include "mp-video-app-ctrl.h"
-#include "mp-video-view-ctrl.h"
+#include "mp-video-view-mgr.h"
#include "mp-util-media-service.h"
#include "mp-video-value-define.h"
-#include "mp-video-subtitle-ctrl.h"
#include "mp-video-string-define.h"
#include "mp-video-streaming-ctrl.h"
+#include "mp-external-ug.h"
+#include "mp-drm-ctrl.h"
#include "mp-video-ctrl-mgr.h"
+#include "mp-video-service-ctrl.h"
+
+static int nPlayerErrorType = 0;
+static int nPlayerInterruptType = 0;
static int nBufferingRate = 0;
-static double nDurationTime = 0;
-static char szSubtitleString[STR_LEN_MAX] = {0};
-static int nErrorCode = 0;
+static bool bWindowForegroundState = FALSE;
static Ecore_Pipe *pEcorePipeHandleForErrorMsg = NULL;
static Ecore_Pipe *pEcorePipeHandleBOF = NULL;
static Ecore_Pipe *pEcorePipeHandleEOF = NULL;
static Ecore_Pipe *pEcorePipeHandleForBuffering = NULL;
-static Ecore_Pipe *pEcorePipeHandleForBluetooth = NULL;
-static Ecore_Pipe *pEcorePipeHandleForSubTitle = NULL;
static Ecore_Pipe *pEcorePipeHandleForResumed = NULL;
static Ecore_Pipe *pEcorePipeHandleForInterruped = NULL;
+static Ecore_Pipe *pEcorePipeHandlerForSeekComplete = NULL;
+
static void MpVideoAppCtrlStart(VideoAppData *pAppData);
static void MpVideoAppCtrlStop(VideoAppData *pAppData);
static void MpVideoAppCtrlRewDown(VideoAppData *pAppData);
static void MpVideoAppCtrlFFUp(VideoAppData *pAppData);
static void MpVideoAppCtrlRewUp(VideoAppData *pAppData);
-static void MpVideoAppCtrlSetMute(VideoAppData *pAppData);
-static void MpVideoAppCtrlSetScreenType(VideoAppData *pAppData);
-static void MpVideoAppCtrlSetScreenSize(VideoAppData *pAppData, int nScreenSize);
+static void MpVideoAppCtrlSpeedReset(VideoAppData *pAppData);
+static void MpVideoAppCtrlSpeedFF(VideoAppData *pAppData);
+static void MpVideoAppCtrlSpeedRew(VideoAppData *pAppData);
+static void MpVideoAppCtrlRotateScreen(VideoAppData *pAppData, int nRotateState);
static void MpVideoAppCtrlGetPosition(VideoAppData *pAppData);
static void MpVideoAppCtrlSetPosition(VideoAppData *pAppData);
static void MpVideoAppCtrlHideLayout(VideoAppData *pAppData);
static void MpVideoAppCtrlPlayPreMedia(VideoAppData *pAppData);
static void MpVideoAppCtrlPlayNextMedia(VideoAppData *pAppData);
static void MpVideoAppCtrlGetBufferingPosition(VideoAppData *pAppData);
-static void MpVideoAppCtrlErrorMsg(VideoAppData *pAppData, unsigned int nErrorCode);
static void MpVideoAppCtrlPipeInit(VideoAppData *pAppData);
+
/*
* Callback function
*/
-static void MpVideoAppCtrlWarningPopupCb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+static void MpVideoAppCtrlCheckDrmPopupCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
{
- if (!pUserData) {
- VideoLogInfo("No exist pUserData");
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR] No exist pUserData");
return;
}
MpUtilDeletePopupHandle();
}
-static void MpVideoAppCtrlExitCb(void *pUserData, Evas_Object *pObject,
- void *pEventInfo)
+static void MpVideoAppCtrlExitCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
{
- if (!pUserData) {
- VideoLogInfo("No exist pUserData");
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR] No exist pUserData");
return;
}
static int MpVideoAppCtrlPauseByInterrupteCb(void *pUserData)
{
- if (!pUserData) {
- VideoLogInfo("No exist pUserData");
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR] No exist pUserData");
return 0;
}
MpVideoViewHideSoundpath(pUserData);
MpVideoAppCtrlPause(pAppData);
+ switch(nPlayerInterruptType)
+ {
+ case MP_PLAYER_INTERRUPTED_COMPLETED:
+ VideoLogInfo("MP_PLAYER_INTERRUPTED_COMPLETED");
+ break;
+
+ case MP_PLAYER_INTERRUPTED_BY_OTHER_APP:
+ VideoLogInfo("MP_PLAYER_INTERRUPTED_BY_OTHER_APP");
+ break;
+
+ case MP_PLAYER_INTERRUPTED_BY_CALL:
+ VideoLogInfo("MP_PLAYER_INTERRUPTED_BY_CALL");
+ break;
+
+ case MP_PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG:
+ VideoLogInfo("MP_PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG");
+ break;
+
+ case MP_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT:
+ VideoLogInfo("MP_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT");
+ break;
+
+ case MP_PLAYER_INTERRUPTED_BY_ALARM:
+ VideoLogInfo("MP_PLAYER_INTERRUPTED_BY_ALARM");
+ break;
+
+ default:
+ VideoLogInfo("OTHER");
+ break;
+ }
+
return 0;
}
static int MpVideoAppCtrlBeginOfPlayCb(void *pUserData)
{
- if (!pUserData) {
- VideoLogInfo("No exist pUserData");
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR] No exist pUserData");
return 0;
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
- MpVideoAppCtrlSetMute(pAppData);
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerTypeWithoutLog();
+ if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ MpVideoCtrlMgrMediaPlay((void *)pAppData);
+
+ pAppData->bStartSeek = FALSE;
+
+ if(pAppData->nSetPosition > 0)
+ {
+ VideoLogInfo("Start position time : %dms", pAppData->nSetPosition);
+ MpVideoAppCtrlSetPosition(pAppData);
+ }
+ }
+
MpVideoAppCtrlBeginOfStream(pAppData);
+ MpUtilLcdNormalPowerLockForResume();
return 0;
}
static int MpVideoAppCtrlEndOfPlayCb(void *pUserData)
{
- if (!pUserData) {
- VideoLogInfo("No exist pUserData");
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR] No exist pUserData");
return 0;
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
MpVideoAppCtrlEndOfStream(pAppData);
+ MpUtilLcdNormalPowerUnlockForPause();
+
return 0;
}
static int MpVideoAppCtrlBufferingCb(void *pUserData)
{
- if (!pUserData) {
+ if(!pUserData)
+ {
VideoLogInfo("No exist pUserData");
return 0;
}
VideoLogInfo("");
+ if(nBufferingRate < 10)
+ {
+ MpVideoAppCtrlShowLayout((VideoAppData *)pUserData);
+ }
+
MpVideoViewSetBufferingRateForStreamingView(nBufferingRate, pUserData);
return 0;
}
-static int MpVideoAppCtrlBluetoothCb(void *pUserData)
+static int MpVideoAppCtrlSeekCompletePipeCb(void *pUserData)
{
- if (!pUserData) {
- VideoLogInfo("No exist pUserData");
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR] No exist pUserData");
return 0;
}
VideoLogInfo("");
- return 0;
-}
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
-static int MpVideoAppCtrlResumeByRewCb(void *pUserData)
-{
- if (!pUserData) {
- VideoLogInfo("No exist pUserData");
- return 0;
+ if(pAppData->bStartSeek)
+ {
+ MpVideoCtrlMgrMediaPlay((void *)pAppData);
+ MpVideoAppCtrlBeginOfStream(pAppData);
+ MpUtilLcdNormalPowerLockForResume();
+ pAppData->bStartSeek = FALSE;
}
- VideoLogInfo("");
+ pAppData->bSeekComplete = TRUE;
- VideoAppData *pAppData = (VideoAppData *)pUserData;
+ if(pAppData->nSeekPosition > 0) {
+ pAppData->nSetPosition = pAppData->nSeekPosition;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+ pAppData->nSeekPosition = 0;
+ MpVideoViewCtrlUpdateProgressbar((void *)pAppData);
+ return;
+ }
- MpVideoAppCtrlResume(pAppData);
+ if(pAppData->nSeekPlayerState == MP_PLAYER_STATE_PAUSE) {
+ VideoLogInfo("== CALL PAUSE =================================");
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+ pAppData->nSeekPlayerState = MP_PLAYER_STATE_WAIT_FOR_RESPONSE;
+ }
+ else if(pAppData->nSeekPlayerState == MP_PLAYER_STATE_RESUME) {
+ VideoLogInfo("== CALL RESUME =================================");
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+ pAppData->nSeekPlayerState = MP_PLAYER_STATE_WAIT_FOR_RESPONSE;
+ }
return 0;
}
-static Eina_Bool MpVideoAppCtrlUpdateSubtitleCb(void* pUserData)
+static void MpVideoAppCtrlSeekCompleteCb(void *pUserData)
{
- if (!pUserData) {
+ if(!pUserData)
+ {
VideoLogInfo("No exist pUserData");
- return EINA_FALSE;
+ return;
}
VideoLogInfo("");
-
- if (strlen(szSubtitleString) > 0 && nDurationTime > 0) {
- MpVideoViewCtrlUpdateSubtitle(nDurationTime, szSubtitleString);
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+ if(pEcorePipeHandlerForSeekComplete)
+ {
+ if(!ecore_pipe_write(pEcorePipeHandlerForSeekComplete, (void *)pAppData, sizeof(pAppData)))
+ {
+ VideoLogDebug("Fail to write MpVideoAppCtrlSeekCompleteCb.");
+ }
}
-
- return EINA_FALSE;
}
-static int MpVideoAppCtrlMmfErrormsgCb(void *pUserData)
+static int MpVideoAppCtrlResumeByRewCb(void *pUserData)
{
- if (!pUserData) {
+ if(!pUserData)
+ {
VideoLogInfo("No exist pUserData");
return 0;
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
- MpVideoAppCtrlErrorMsg(pAppData, nErrorCode);
+ MpVideoAppCtrlResume(pAppData);
return 0;
}
-static void MpVideoAppCtrlErrorMsg(VideoAppData *pAppData,
- unsigned int nErrorCode)
+static int MpVideoAppCtrlErrormsgCb(void *pUserData)
{
- VideoLogInfo("[MMF ERROR] CtrlErrorMsg.");
-
- switch (nErrorCode) {
- case 1:
- VideoLogInfo("Connection Fail.");
- break;
-
- case MM_ERROR_PLAYER_CODEC_NOT_FOUND:
- VideoLogInfo("CODEC NOT FOUND");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_POP_UNSUPPORTED_FILE_TYPE),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_AUDIO_CODEC_NOT_FOUND:
- VideoLogInfo("UNSUPPORTED_AUDIO_FORMAT");
- MpUtilNotifyPopUp(pAppData,
- _(MP_VPL_POP_UNSUPPORTED_AUDIO_FORMAT),
- MpVideoAppCtrlWarningPopupCb);
- break;
-
- case MM_ERROR_PLAYER_VIDEO_CODEC_NOT_FOUND:
- VideoLogInfo("UNSUPPORTED_VIDEO_FORMAT");
- MpVideoViewCtrlShowNocontentImage();
- MpUtilNotifyPopUp(pAppData,
- _(MP_VPL_POP_UNSUPPORTED_VIDEO_FORMAT),
- MpVideoAppCtrlWarningPopupCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_UNSUPPORTED_AUDIO:
- VideoLogInfo("UNSUPPORTED_AUDIO_FORMAT");
- MpUtilNotifyPopUp(pAppData,
- _(MP_VPL_POP_UNSUPPORTED_AUDIO_FORMAT),
- MpVideoAppCtrlWarningPopupCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_UNSUPPORTED_VIDEO:
- VideoLogInfo("UNSUPPORTED_VIDEO_FORMAT");
- MpVideoViewCtrlShowNocontentImage();
- MpUtilNotifyPopUp(pAppData,
- _(MP_VPL_POP_UNSUPPORTED_VIDEO_FORMAT),
- MpVideoAppCtrlWarningPopupCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_CONNECTION_FAIL:
- VideoLogInfo("CONNECTION_FAILED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_INVALID_STREAM:
- VideoLogInfo("MM_ERROR_PLAYER_INVALID_STREAM");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_FILE_NOT_FOUND:
- VideoLogInfo("MM_ERROR_PLAYER_FILE_NOT_FOUND");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_POP_INVALID_STREAMING_DATA),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_DNS_FAIL:
- VideoLogInfo("DNS_FAILED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_SERVER_DISCONNECTED:
- VideoLogInfo("DESCONNECTED_FROM_SERVER");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_BAD_SERVER:
- VideoLogInfo("UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_INVALID_PROTOCOL:
- VideoLogInfo("UNSUPPORTED_TRANSPORT_PROTOCOL");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_INVALID_URL:
- VideoLogInfo("INVALID_URL");
- MpUtilNotifyPopUp(pAppData,
- _(MP_VPL_POP_INVALID_STREAMING_DATA),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_UNEXPECTED_MSG:
- VideoLogInfo("UNEXPECTED_MESSAGE");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_OUT_OF_MEMORIES:
- VideoLogInfo("OUT_OF_MEMORIES");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_RTSP_TIMEOUT:
- VideoLogInfo("NO_RESPONSE_FROM_SERVER");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_BAD_REQUEST:
- VideoLogInfo("BAD_REQUEST");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_NOT_AUTHORIZED:
- VideoLogInfo("NOT_AUTHORIZED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_PAYMENT_REQUIRED:
- VideoLogInfo("PAYMENT_REQUIRED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_FORBIDDEN:
- VideoLogInfo("FORBIDDEN");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_CONTENT_NOT_FOUND:
- VideoLogInfo("CONTENT_NOT_FOUND");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_METHOD_NOT_ALLOWED:
- VideoLogInfo("METHOD_NOT_ALLOWED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_NOT_ACCEPTABLE:
- VideoLogInfo("NOT_ACCEPTABLE");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_PROXY_AUTHENTICATION_REQUIRED:
- VideoLogInfo("PROXY_AUTHENTICATION_REQUIRED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_SERVER_TIMEOUT:
- VideoLogInfo("SERVER_TIMEOUT");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_GONE:
- VideoLogInfo("GONE_MERROR");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_LENGTH_REQUIRED:
- VideoLogInfo("LENGTH_REQUIRED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_PRECONDITION_FAILED:
- VideoLogInfo("PRECONDITION_FAILED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_REQUEST_ENTITY_TOO_LARGE:
- VideoLogInfo("REQUEST_ENTITY_TOO_LARGE");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_REQUEST_URI_TOO_LARGE:
- VideoLogInfo("REQUEST_URI_TOO_LARGE");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_UNSUPPORTED_MEDIA_TYPE:
- VideoLogInfo("UNSUPPORTED_MEDIA_TYPE");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_PARAMETER_NOT_UNDERSTOOD:
- VideoLogInfo("PARAMETER_NOT_UNDERSTOOD");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_CONFERENCE_NOT_FOUND:
- VideoLogInfo("CONFERENCE_NOT_FOUND");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_NOT_ENOUGH_BANDWIDTH:
- VideoLogInfo("NOT_ENOUGH_BANDWIDTH");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_NO_SESSION_ID:
- VideoLogInfo("NO_SESSION_ID");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_METHOD_NOT_VALID_IN_THIS_STATE:
- VideoLogInfo("METHOD_NOT_VALID_IN_THIS_STATE");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_HEADER_FIELD_NOT_VALID_FOR_SOURCE:
- VideoLogInfo("HEADER_FIELD_NOT_VALID_FOR_SOURCE");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_INVALID_RANGE:
- VideoLogInfo("INVALID_RANGE");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
-
- case MM_ERROR_PLAYER_STREAMING_PARAMETER_IS_READONLY:
- VideoLogInfo("PARAMETER_IS_READONLY");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
+ if(!pUserData)
+ {
+ VideoLogInfo("No exist pUserData");
+ return 0;
+ }
- case MM_ERROR_PLAYER_STREAMING_AGGREGATE_OP_NOT_ALLOWED:
- VideoLogInfo("AGGREGATE_OP_NOT_ALLOWED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
- break;
+ VideoLogInfo("");
- case MM_ERROR_PLAYER_STREAMING_ONLY_AGGREGATE_OP_ALLOWED:
- VideoLogInfo("ONLY_AGGREGATE_OP_ALLOWED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
+ switch(MpVideoCtrlMgrGetErrorType(nPlayerErrorType))
+ {
+ case MP_PLAYER_ERROR_NONE:
+ VideoLogInfo("MP_PLAYER_ERROR_NONE");
break;
- case MM_ERROR_PLAYER_STREAMING_BAD_TRANSPORT:
- VideoLogInfo("BAD_TRANSPORT");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
+ case MP_PLAYER_ERROR_OUT_OF_MEMORY:
+ VideoLogInfo("MP_PLAYER_ERROR_OUT_OF_MEMORY");
+ MpUtilNotifyPopUp((VideoAppData*)pUserData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO), MpVideoAppCtrlExitCb);
break;
- case MM_ERROR_PLAYER_STREAMING_DESTINATION_UNREACHABLE:
- VideoLogInfo("DESTINATION_UNREACHABLE");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
+ case MP_PLAYER_ERROR_INVALID_PARAMETER:
+ VideoLogInfo("MP_PLAYER_ERROR_INVALID_PARAMETER");
+ MpUtilNotifyPopUp((VideoAppData*)pUserData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO), MpVideoAppCtrlExitCb);
break;
- case MM_ERROR_PLAYER_STREAMING_INTERNAL_SERVER_ERROR:
- VideoLogInfo("INTERNAL_SERVER_ERROR");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
+ case MP_PLAYER_ERROR_NO_SUCH_FILE:
+ VideoLogInfo("MP_PLAYER_ERROR_NO_SUCH_FILE");
+ MpUtilNotifyPopUp((VideoAppData*)pUserData, MP_COM_POP_FILE_NOT_FOUND, MpVideoAppCtrlExitCb);
break;
- case MM_ERROR_PLAYER_STREAMING_NOT_IMPLEMENTED:
- VideoLogInfo("NOT_IMPLEMENTED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
+ case MP_PLAYER_ERROR_INVALID_OPERATION:
+ VideoLogInfo("MP_PLAYER_ERROR_INVALID_OPERATION");
+ MpUtilNotifyPopUp((VideoAppData*)pUserData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO), MpVideoAppCtrlExitCb);
break;
- case MM_ERROR_PLAYER_STREAMING_BAD_GATEWAY:
- VideoLogInfo("BAD_GATEWAY");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
+ case MP_PLAYER_ERROR_SEEK_FAILED:
+ VideoLogInfo("MP_PLAYER_ERROR_SEEK_FAILED");
break;
- case MM_ERROR_PLAYER_STREAMING_SERVICE_UNAVAILABLE:
- VideoLogInfo("SERVICE_UNAVAILABLE");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
+ case MP_PLAYER_ERROR_INVALID_STATE:
+ VideoLogInfo("MP_PLAYER_ERROR_INVALID_STATE");
break;
- case MM_ERROR_PLAYER_STREAMING_GATEWAY_TIME_OUT:
- VideoLogInfo("GATEWAY_TIME_OUT");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
+ case MP_PLAYER_ERROR_NOT_SUPPORTED_FILE:
+ VideoLogInfo("MP_PLAYER_ERROR_NOT_SUPPORTED_FILE");
+ MpUtilNotifyPopUp((VideoAppData*)pUserData, _(MP_VPL_POP_UNSUPPORTED_FILE_TYPE), MpVideoAppCtrlEndOfStream);
break;
- case MM_ERROR_PLAYER_STREAMING_RTSP_VERSION_NOT_SUPPORTED:
- VideoLogInfo("RTSP_VERSION_NOT_SUPPORTED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
+ case MP_PLAYER_ERROR_INVALID_URI:
+ VideoLogInfo("MP_PLAYER_ERROR_INVALID_URI");
+ MpUtilNotifyPopUp((VideoAppData*)pUserData, MP_COM_POP_INVALID_URL, MpVideoAppCtrlExitCb);
break;
- case MM_ERROR_PLAYER_STREAMING_OPTION_NOT_SUPPORTED:
- VideoLogInfo("OPTION_NOT_SUPPORTED");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL),
- MpVideoAppCtrlExitCb);
+ case MP_PLAYER_ERROR_SOUND_POLICY:
+ VideoLogInfo("MP_PLAYER_ERROR_SOUND_POLICY");
break;
- case MM_ERROR_PLAYER_STREAMING_FAIL:
- VideoLogInfo("INTERNAL_ERROR");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO),
- MpVideoAppCtrlExitCb);
- break;
- case MM_MESSAGE_DRM_NOT_AUTHORIZED :
- VideoLogInfo("DRM_NOT_AUTHORIZED ERROR");
- MpUtilNotifyPopUp(pAppData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO),
- MpVideoAppCtrlExitCb);
+ case MP_PLAYER_ERROR_CONNECTION_FAILED:
+ VideoLogInfo("MP_PLAYER_ERROR_CONNECTION_FAILED");
+ MpUtilNotifyPopUp((VideoAppData*)pUserData, MP_COM_POP_CONNECTION_FAILED, MpVideoAppCtrlExitCb);
break;
default:
+ MpUtilNotifyPopUp((VideoAppData*)pUserData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO), MpVideoAppCtrlExitCb);
break;
}
- }
+ return 0;
+}
-static void MpVideoAppCtrlPlayerMsgCallback(int MessageType,
- void *MessageParam, void *pUserData)
+static void MpVideoAppCtrlPlayerPrepareCb(void *pUserData)
{
- if (!pUserData) {
- VideoLogInfo("[ERR]");
+ if(!pUserData)
+ {
+ VideoLogInfo("No exist appdata.");
return;
}
- VideoLogInfoWithTid("Callback func");
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
- MMMessageParamType *pParam = (MMMessageParamType *) MessageParam;
-
- switch (MessageType) {
- case MM_MESSAGE_UNKNOWN:
- VideoLogInfo("MM_MESSAGE_UNKNOWN", MessageType);
- if(pEcorePipeHandleForErrorMsg) {
- if(!ecore_pipe_write(pEcorePipeHandleForErrorMsg,
- (void *)pAppData, sizeof(pAppData))) {
- VideoLogDebug("FAIL PIPE WRITE");
- }
- }
-
- break;
+ VideoLogInfo("");
- case MM_MESSAGE_ERROR:
- VideoLogInfo("[ERR]MM_MESSAGE_ERROR : code-0x%x",
- (int)pParam->code);
- nErrorCode = (int)pParam->code;
- if(pEcorePipeHandleForErrorMsg) {
- if(!ecore_pipe_write(pEcorePipeHandleForErrorMsg,
- (void *)pAppData, sizeof(pAppData))) {
- VideoLogDebug("FAIL PIPE WRITE");
- }
+ if(pEcorePipeHandleBOF)
+ {
+ if(!ecore_pipe_write(pEcorePipeHandleBOF, pUserData, sizeof(pUserData)))
+ {
+ VideoLogDebug("FAIL PIPE WRITE");
}
- break;
+ }
+}
- case MM_MESSAGE_STATE_CHANGED:
- VideoLogInfo("MM_MESSAGE_STATE_CHANGED");
- break;
+static void MpVideoAppCtrlPlayerCompletedCb(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("No exist appdata.");
+ return;
+ }
- case MM_MESSAGE_BEGIN_OF_STREAM:
- VideoLogInfo("MM_MESSAGE_BEGIN_OF_STREAM");
- if(pEcorePipeHandleBOF) {
- if(!ecore_pipe_write(pEcorePipeHandleBOF,
- (void *)pAppData, sizeof(pAppData))) {
- VideoLogDebug("FAIL PIPE WRITE");
- }
- }
- break;
+ VideoLogInfo("");
- case MM_MESSAGE_END_OF_STREAM:
- VideoLogInfo("END OF STREAM.");
- if(pEcorePipeHandleEOF) {
- if(!ecore_pipe_write(pEcorePipeHandleEOF,
- (void *)pAppData, sizeof(pAppData))) {
- VideoLogDebug("FAIL PIPE WRITE");
- }
+ if(pEcorePipeHandleEOF)
+ {
+ if(!ecore_pipe_write(pEcorePipeHandleEOF, pUserData, sizeof(pUserData)))
+ {
+ VideoLogDebug("FAIL PIPE WRITE");
}
- break;
-
- case MM_MESSAGE_READY_TO_RESUME:
- VideoLogInfo("MM_MESSAGE_READY_TO_RESUME");
- break;
-
- case MM_MESSAGE_CONNECTING:
- VideoLogInfo("MM_MESSAGE_CONNECTING");
- break;
-
- case MM_MESSAGE_CONNECTED:
- VideoLogInfo("MM_MESSAGE_CONNECTED");
- break;
+ }
+}
- case MM_MESSAGE_CONNECTION_TIMEOUT:
- VideoLogInfo("MM_MESSAGE_CONNECTION_TIMEOUT");
- break;
+static void MpVideoAppCtrlPlayerInterruptedCbCb(player_interrupted_code_e nInterruptCode, void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("No exist appdata.");
+ return;
+ }
- case MM_MESSAGE_BUFFERING:
- VideoLogInfo("MM_MESSAGE_BUFFERING - Buffering : %d%% ",
- pParam->connection.buffering);
- nBufferingRate = pParam->connection.buffering;
-
- if (nBufferingRate < 10)
- MpVideoAppCtrlShowLayout(pAppData);
- if(pEcorePipeHandleForBuffering) {
- if(!ecore_pipe_write(pEcorePipeHandleForBuffering,
- (void *)pAppData, sizeof(pAppData))) {
- VideoLogDebug("FAIL PIPE WRITE");
- }
- }
- break;
+ VideoLogInfo("");
- case MM_MESSAGE_BLUETOOTH_ON:
- VideoLogInfo("MM_MESSAGE_BLUETOOTH_ON");
- break;
+ nPlayerInterruptType = nInterruptCode;
- case MM_MESSAGE_BLUETOOTH_OFF:
- VideoLogInfo("MM_MESSAGE_BLUETOOTH_OFF ");
- if(pEcorePipeHandleForBluetooth) {
- if(!ecore_pipe_write(pEcorePipeHandleForBluetooth,
- (void *)pAppData, sizeof(pAppData))) {
- VideoLogDebug("FAIL PIPE WRITE");
- }
+ if(pEcorePipeHandleForInterruped)
+ {
+ if(!ecore_pipe_write(pEcorePipeHandleForInterruped, pUserData, sizeof(pUserData)))
+ {
+ VideoLogDebug("FAIL PIPE WRITE");
}
- break;
-
- case MM_MESSAGE_UPDATE_SUBTITLE:
- VideoLogInfo("UPDATE_SUBTITLE ");
-
- nDurationTime = 0;
- memset(szSubtitleString, 0, sizeof(char) * STR_LEN_MAX);
+ }
+}
- if (pParam->subtitle.duration <= 0) {
- VideoLogInfo("[ERR] MMF Error : code-0x%x", (int)pParam->code);
- break;
- } else {
- nDurationTime = (double)pParam->subtitle.duration / 1000;
- }
+static void MpVideoAppCtrlPlayerErrorCb(int nPlayerErrorCode, void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("No exist appdata.");
+ return;
+ }
- if (pParam->data == NULL) {
- VideoLogInfo("[ERR] MMF Error : code-0x%x", (int)pParam->code);
- break;
- } else {
- strncpy(szSubtitleString, pParam->data, STR_LEN_MAX - 1);
- }
+ VideoLogInfo("");
- VideoLogInfo("Subtitle duration : %d sec", nDurationTime);
- VideoLogInfo("Subtitle contents : %s", szSubtitleString);
- if(pEcorePipeHandleForSubTitle) {
- if(!ecore_pipe_write(pEcorePipeHandleForSubTitle,
- (void *)pAppData, sizeof(pAppData))) {
- VideoLogDebug("FAIL PIPE WRITE");
- }
- }
- break;
+ nPlayerErrorType = nPlayerErrorCode;
- case MM_MESSAGE_RESUMED_BY_REW:
- VideoLogInfo("Change play state to play.");
- if(pEcorePipeHandleForResumed) {
- if(!ecore_pipe_write(pEcorePipeHandleForResumed,
- (void *)pAppData, sizeof(pAppData))) {
- VideoLogDebug("FAIL PIPE WRITE");
- }
+ if(pEcorePipeHandleForErrorMsg)
+ {
+ if(!ecore_pipe_write(pEcorePipeHandleForErrorMsg, pUserData, sizeof(pUserData)))
+ {
+ VideoLogDebug("FAIL PIPE WRITE");
}
- break;
-
- case MM_MESSAGE_RTP_SENDER_REPORT:
- VideoLogInfo("%08x", MessageType);
- break;
-
- case MM_MESSAGE_RTP_RECEIVER_REPORT:
- VideoLogInfo("%08x", MessageType);
- break;
-
- case MM_MESSAGE_RTP_SESSION_STATUS:
- VideoLogInfo("%08x", MessageType);
- break;
+ }
+}
- case MM_MESSAGE_SENDER_STATE:
- VideoLogInfo("%08x", MessageType);
- break;
+static void MpVideoAppCtrlPlayerBufferingCb(int nPercent, void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("No exist appdata.");
+ return;
+ }
- case MM_MESSAGE_RECEIVER_STATE:
- VideoLogInfo("%08x", MessageType);
- break;
+ VideoLogInfo("Buffering : %d%% ", nPercent);
- case MM_MESSAGE_FILE_NOT_SUPPORTED:
- VideoLogInfo("%08x", MessageType);
- break;
+ nBufferingRate = nPercent;
- case MM_MESSAGE_FILE_NOT_FOUND:
- VideoLogInfo("%08x", MessageType);
- break;
+ if(pEcorePipeHandleForBuffering)
+ {
+ if(!ecore_pipe_write(pEcorePipeHandleForBuffering, pUserData, sizeof(pUserData)))
+ {
+ VideoLogDebug("FAIL PIPE WRITE");
+ }
+ }
+}
- case MM_MESSAGE_DRM_NOT_AUTHORIZED:
- VideoLogInfo("%08x", MessageType);
- break;
+/*
+ * Internal function
+ */
+void MpVideoAppCtrlFuncInit(VideoAppData *pAppData)
+{
+ VideoLogInfo("");
- case MM_MESSAGE_STATE_INTERRUPTED:
- VideoLogDebug("%08x", MessageType);
+ if(!pAppData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
- switch ((int)pParam->code) {
- case MM_MSG_CODE_INTERRUPTED_BY_OTHER_APP:
- VideoLogInfo("MM_ERROR_PLAYER_BT_CONNECTION");
- break;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStart = (void *)MpVideoAppCtrlStart;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStop = (void *)MpVideoAppCtrlStop;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause = (void *)MpVideoAppCtrlPause;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume = (void *)MpVideoAppCtrlResume;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause = (void *)MpVideoAppCtrlStopByAppPause;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartByAppResume = (void *)MpVideoAppCtrlStartByAppResume;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlFFDown = (void *)MpVideoAppCtrlFFDown;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlRewDown = (void *)MpVideoAppCtrlRewDown;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlFFUp = (void *)MpVideoAppCtrlFFUp;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlRewUp = (void *)MpVideoAppCtrlRewUp;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedFF = (void *)MpVideoAppCtrlSpeedFF;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedRew = (void *)MpVideoAppCtrlSpeedRew;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedReset = (void *)MpVideoAppCtrlSpeedReset;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlRotateScreen = (void *)MpVideoAppCtrlRotateScreen;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition = (void *)MpVideoAppCtrlGetPosition;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition = (void *)MpVideoAppCtrlSetPosition;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout = (void *)MpVideoAppCtrlHideLayout;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout = (void *)MpVideoAppCtrlShowLayout;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetVideoResolution = (void *)MpVideoAppCtrlGetVideoResolution;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlReqDurationTime = (void *)MpVideoAppCtrlReqDurationTime;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlBeginOfStream = (void *)MpVideoAppCtrlBeginOfStream;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlEndOfStream = (void *)MpVideoAppCtrlEndOfStream;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit = (void *)MpVideoAppCtrlExit;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartStreaming = (void *)MpVideoAppCtrlStartStreaming;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlReLaunching = (void *)MpVideoAppCtrlReLaunching;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayPreMedia = (void *)MpVideoAppCtrlPlayPreMedia;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayNextMedia = (void *)MpVideoAppCtrlPlayNextMedia;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetBufferingPosition = (void *)MpVideoAppCtrlGetBufferingPosition;
+}
- case MM_MSG_CODE_INTERRUPTED_BY_CALL_START:
- VideoLogInfo("MM_MSG_CODE_INTERRUPTED_BY_CALL_START");
- break;
+bool MpVideoAppCtrlCheckDrm(VideoAppData *pAppData, char *szMediaPath)
+{
+ if(!pAppData)
+ {
+ VideoLogInfo("No exist appdata.");
+ return FALSE;
+ }
- case MM_MSG_CODE_INTERRUPTED_BY_CALL_END:
- VideoLogInfo("MM_MSG_CODE_INTERRUPTED_BY_CALL_END");
- break;
+ VideoLogInfo("");
- case MM_MSG_CODE_INTERRUPTED_BY_EARJACK_UNPLUG:
- VideoLogInfo("MM_MSG_CODE_INTERRUPTED_BY_EARJACK_UNPLUG");
- break;
+ MpVideoDrmInit();
- case MM_MSG_CODE_INTERRUPTED_BY_RESOURCE_CONFLICT:
- VideoLogInfo
- ("MM_MSG_CODE_INTERRUPTED_BY_RESOURCE_CONFLICT");
- break;
+ if(MpVideoDrmIsDrmFile(szMediaPath))
+ {
+ MpVideoDrmInfo *pResult = NULL;
+ pResult = MpVideoDrmCheckLeftRo(pAppData->szVideoTitle, szMediaPath);
+ if(pResult->nErrorCode != MP_VIDEO_DRM_ERROR_NONE)
+ {
+ char szErrMsg[STR_LEN_MAX] ={0,};
- case MM_MSG_CODE_INTERRUPTED_BY_ALARM_START:
- VideoLogInfo
- ("MM_MSG_CODE_INTERRUPTED_BY_ALARM_START");
- break;
+ if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_INTERNAL) {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK, ecore_file_file_get(szMediaPath));
+ }
+ else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_TIME_BASED) {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK, ecore_file_file_get(szMediaPath));
+ }
+ else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_INTERVAL) {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK, ecore_file_file_get(szMediaPath));
+ }
+ else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_INTERVAL_FIRST_USE) {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_INTERVAL_BASED_DAYS,ecore_file_file_get(szMediaPath) , pResult->nData);
+ MpUtilYesNoPopUp(pAppData, NULL, szErrMsg, MpVideoAppCtrlCheckDrmPopupCb, MpVideoAppCtrlExitCb);
+ }
+ else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_ACCUMULATED) {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK,ecore_file_file_get(szMediaPath));
+ }
+ else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_COUNT) {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK, ecore_file_file_get(szMediaPath));
+ }
+ else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_COUNT_SMALL) {
+ if(pResult->nData == 1) {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_COUNT_BASED_OPEN_ONE,ecore_file_file_get(szMediaPath) );
+ }
+ else {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_COUNT_BASED_OPEN_MANY,ecore_file_file_get(szMediaPath) , pResult->nData);
+ }
- case MM_MSG_CODE_INTERRUPTED_BY_ALARM_END:
- VideoLogInfo("MM_MSG_CODE_INTERRUPTED_BY_ALARM_END");
- break;
- }
- if(pEcorePipeHandleForInterruped) {
- if(!ecore_pipe_write(
- pEcorePipeHandleForInterruped,
- (void *)pAppData, sizeof(pAppData))) {
- VideoLogDebug("FAIL PIPE WRITE");
+ MpUtilYesNoPopUp(pAppData, NULL, szErrMsg, MpVideoAppCtrlCheckDrmPopupCb, MpVideoAppCtrlExitCb);
}
- }
- break;
- case MM_MESSAGE_SEEK_COMPLETED:
- {
- VideoLogInfo("MM_MESSAGE_SEEK_COMPLETED");
- if(MpUtilCheckRTSPType(pAppData->szMediaUri)) {
- VideoLogInfo("RTSP SEEK Start");
- nBufferingRate = 100;
- MpVideoAppCtrlShowLayout(pAppData);
- if(pEcorePipeHandleForBuffering) {
- if(!ecore_pipe_write(pEcorePipeHandleForBuffering,
- (void *)pAppData, sizeof(pAppData))) {
- VideoLogDebug("FAIL PIPE WRITE");
- }
+ else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_TIME_COUNT_BASED) {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK,szMediaPath );
+ }
+ else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_TIME_INDIVIDULAL) {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK,szMediaPath );
+ }
+ else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_TIME_SYSTEM) {
+ snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK,szMediaPath );
+ }
+
+ if(pResult->nErrorCode != MP_VIDEO_DRM_ERROR_COUNT_SMALL &&
+ pResult->nErrorCode != MP_VIDEO_DRM_ERROR_INTERVAL_FIRST_USE) {
+ MpUtilNotifyPopUp(pAppData,szErrMsg, MpVideoAppCtrlCheckDrmPopupCb);
+ MpVideoAppCtrlExit(pAppData);
+ if(pResult) {
+ free(pResult);
+ pResult = NULL;
}
+ return FALSE;
+ }
+ if(pResult) {
+ free(pResult);
+ pResult = NULL;
}
+ }
+ if(pResult) {
+ free(pResult);
+ pResult = NULL;
}
- break;
- default:
- VideoLogInfo("No message %08x", MessageType);
- break;
- }
-}
-/*
- * Internal function
- */
-void MpVideoAppCtrlFuncInit(VideoAppData *pAppData)
-{
- VideoLogInfo("");
+ if(!MpVideoDrmCheckForward(szMediaPath))
+ {
+ VideoLogInfo("[EXIT BY CHECKING DRM]");
+ MpUtilNotifyPopUp(pAppData, "Forward Lock DRM file.", MpVideoAppCtrlCheckDrmPopupCb);
+ MpVideoAppCtrlExit(pAppData);
+ return FALSE;
+ }
- if (!pAppData) {
- VideoLogInfo("[ERR]");
- return;
+ MpVideoDrmSetConsumptionState(VIDEO_DRM_CONSUMPTION_STATE_ENABLE);
}
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStart =
- (void *)MpVideoAppCtrlStart;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStop =
- (void *)MpVideoAppCtrlStop;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause =
- (void *)MpVideoAppCtrlPause;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume =
- (void *)MpVideoAppCtrlResume;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause =
- (void *)MpVideoAppCtrlStopByAppPause;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartByAppResume =
- (void *)MpVideoAppCtrlStartByAppResume;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlFFDown =
- (void *)MpVideoAppCtrlFFDown;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlRewDown =
- (void *)MpVideoAppCtrlRewDown;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlFFUp =
- (void *)MpVideoAppCtrlFFUp;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlRewUp =
- (void *)MpVideoAppCtrlRewUp;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetMute =
- (void *)MpVideoAppCtrlSetMute;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetScreenType =
- (void *)MpVideoAppCtrlSetScreenType;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetScreenSize =
- (void *)MpVideoAppCtrlSetScreenSize;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition =
- (void *)MpVideoAppCtrlGetPosition;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition =
- (void *)MpVideoAppCtrlSetPosition;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout =
- (void *)MpVideoAppCtrlHideLayout;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout =
- (void *)MpVideoAppCtrlShowLayout;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetVideoResolution =
- (void *)MpVideoAppCtrlGetVideoResolution;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlReqDurationTime =
- (void *)MpVideoAppCtrlReqDurationTime;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlBeginOfStream =
- (void *)MpVideoAppCtrlBeginOfStream;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlEndOfStream =
- (void *)MpVideoAppCtrlEndOfStream;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit =
- (void *)MpVideoAppCtrlExit;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartStreaming =
- (void *)MpVideoAppCtrlStartStreaming;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlReLaunching =
- (void *)MpVideoAppCtrlReLaunching;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayPreMedia =
- (void *)MpVideoAppCtrlPlayPreMedia;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayNextMedia =
- (void *)MpVideoAppCtrlPlayNextMedia;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetBufferingPosition =
- (void *)MpVideoAppCtrlGetBufferingPosition;
+ MpVideoDrmStartConsumption(pAppData->szMediaUri);
+
+ return TRUE;
}
static void MpVideoAppCtrlPlayPreMedia(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
- VideoLogInfo("");
-
- if (strlen(pAppData->szPreMediaUri) <= 0) {
+ if(strlen(pAppData->szPreMediaUri) <= 0)
+ {
VideoLogInfo("szPreMediaUri is NULL.");
return;
}
VideoLogInfo("Current media uri : %s", pAppData->szMediaUri);
VideoLogInfo("Previous media uri : %s", pAppData->szPreMediaUri);
- strncpy(pAppData->szMediaUri, pAppData->szPreMediaUri,
- sizeof(pAppData->szMediaUri) - 1);
+ strncpy(pAppData->szMediaUri, pAppData->szPreMediaUri, sizeof(pAppData->szMediaUri) - 1);
MpVideoAppCtrlShowLayout(pAppData);
- if (pAppData->nCurPlayerType == MP_VIDEO_PLAYER) {
- MpUtilMediaSvcGetPreNextVideoUrl(pAppData->szMediaUri,
- pAppData->szPreMediaUri,
- pAppData->szNextMediaUri);
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpUtilMediaSvcGetVideoCurrentUrlPreNextItem(pAppData->szMediaUri, pAppData->szPreMediaUri, pAppData->szNextMediaUri, false);
}
MpVideoAppCtrlReLaunching(pAppData);
static void MpVideoAppCtrlPlayNextMedia(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
- VideoLogInfo("");
-
- if (strlen(pAppData->szNextMediaUri) <= 0) {
+ if(strlen(pAppData->szNextMediaUri) <= 0)
+ {
VideoLogInfo("szNextMediaUri is NULL.");
return;
}
VideoLogInfo("Current media uri : %s", pAppData->szMediaUri);
VideoLogInfo("Next media uri : %s", pAppData->szNextMediaUri);
- strncpy(pAppData->szMediaUri, pAppData->szNextMediaUri,
- sizeof(pAppData->szMediaUri) - 1);
+ strncpy(pAppData->szMediaUri, pAppData->szNextMediaUri, sizeof(pAppData->szMediaUri) - 1);
MpVideoAppCtrlShowLayout(pAppData);
- if (pAppData->nCurPlayerType == MP_VIDEO_PLAYER) {
- MpUtilMediaSvcGetPreNextVideoUrl(pAppData->szMediaUri,
- pAppData->szPreMediaUri,
- pAppData->szNextMediaUri);
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpUtilMediaSvcGetVideoCurrentUrlPreNextItem(pAppData->szMediaUri, pAppData->szPreMediaUri, pAppData->szNextMediaUri, false);
}
MpVideoAppCtrlReLaunching(pAppData);
static void MpVideoAppCtrlGetBufferingPosition(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
- if (pAppData == NULL) {
- VideoLogInfo("ERR");
- return;
- }
-
- if (pAppData->nCurPlayerType == MP_VIDEO_PLAYER) {
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
VideoLogInfo("Skip Normal Play mode");
return;
}
- if(MpUtilCheckRTSPType(pAppData->szMediaUri)) {
+
+ if(MpUtilCheckRTSPType(pAppData->szMediaUri))
+ {
return;
}
+
pAppData->nBufferingPosition = MpVideoCtrlMgrGetBufferingPosition();
}
-
static void MpVideoAppCtrlStart(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- if (pAppData->nCurPlayerType == MP_VIDEO_PLAYER) {
- char szSubtitleUri[STR_LEN_MAX] = {0};
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ if(!MpUtilCheckLocalFileExist(pAppData->szMediaUri))
+ {
+ MpUtilNotifyPopUp(pAppData, MP_COM_POP_FILE_NOT_EXIST, MpVideoAppCtrlExitCb);
+ return;
+ }
+
+ MpUtilGetTitleFromFilepath(pAppData->szMediaUri, pAppData->szVideoTitle, STR_LEN_MAX);
+ MpVideoViewCtrlChangeTitle(pAppData);
+ MpVideoAppCtrlCheckDrm(pAppData, pAppData->szMediaUri);
+
+ MpVideoCtrlMgrMediaCreate(pAppData->szMediaUri, (void *)MpUtilGetMainWindowXID(), (void *)pAppData);
+
+ MpVideoCtrlMgrSetPlayerCallback(MpVideoAppCtrlPlayerCompletedCb, MpVideoAppCtrlPlayerInterruptedCbCb, MpVideoAppCtrlPlayerErrorCb, MpVideoAppCtrlPlayerBufferingCb, (void*)pAppData);
+
+ MpVideoCtrlMgrMediaRealize();
+
+ MpVideoAppCtrlRotateScreen(pAppData, MpUtilGetRotationState());
- if (!MpVideoSubtitleCtrlGetSubtitleUri(szSubtitleUri)) {
- memset(szSubtitleUri, 0, STR_LEN_MAX);
- } else {
- VideoLogInfo("szSubtitleUriPath : %s", szSubtitleUri);
+ pAppData->bStartSeek = FALSE;
+ if(pAppData->nSetPosition > 0)
+ {
+ VideoLogInfo("Pending seek position time : %dms", pAppData->nSetPosition);
+ MpVideoAppCtrlSetPosition(pAppData);
+ pAppData->bStartSeek = TRUE;
}
- if (!MpVideoCtrlMgrMediaCreate(pAppData->szMediaUri,
- MpVideoAppCtrlPlayerMsgCallback,
- (void *)MpUtilGetMainWindowXID(),
- szSubtitleUri,
- (void *)pAppData)) {
- MpUtilNotifyPopUp(pAppData,
- "It is unable to play video contents.",
- MpVideoAppCtrlExitCb);
+ if(MpVideoViewCtrlIsPauseByUser())
+ {
+ MpVideoCtrlMgrSetMute(TRUE);
}
- if (pAppData->nSetPosition > 0) {
- VideoLogInfo("Start position time : %dms",
- pAppData->nSetPosition);
- MpVideoAppCtrlSetPosition(pAppData);
+ if(!pAppData->bStartSeek)
+ {
+ MpVideoCtrlMgrMediaPlay((void *)pAppData);
+ MpVideoAppCtrlBeginOfStream(pAppData);
+ MpUtilLcdNormalPowerLockForResume();
}
MpVideoCtrlMgrMediaPlay((void *)pAppData);
- } else if (pAppData->nCurPlayerType == MP_STREAMING_PLAYER ) {
- if (MpVideoStreamingCtrlInit((void *)pAppData)) {
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ if(!MpVideoStreamingCtrlIsNetworkOn())
+ {
+ MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL), MpVideoAppCtrlExitCb);
+ return;
+ }
+
+ if(MpVideoStreamingCtrlInit((void *)pAppData))
+ {
VideoLogInfo("Connect to network.");
MpVideoAppCtrlStartStreaming((void *)pAppData);
- } else {
- VideoLogInfo("No connect to network.");
- MpUtilNotifyPopUp(pAppData,
- "It is impossible to connect to network.",
- MpVideoAppCtrlExitCb);
}
}
}
static void MpVideoAppCtrlStop(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
pAppData->nCurPlayerState = MP_PLAYER_STATE_STOP;
+ MpVideoDrmStopConsumption();
MpVideoCtrlMgrMediaStop((void *)pAppData);
}
static void MpVideoAppCtrlPause(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE) {
+ if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE)
+ {
VideoLogInfo("Allready Pause video player.");
return;
}
pAppData->nCurPlayerState = MP_PLAYER_STATE_PAUSE;
+ MpVideoDrmPauseConsumption();
MpVideoCtrlMgrMediaPause(pAppData);
MpVideoViewCtrlPause(pAppData);
MpVideoAppCtrlShowLayout(pAppData);
static void MpVideoAppCtrlResume(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- if (pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME ||
- pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY) {
+ if(pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME || pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY)
+ {
VideoLogInfo("Allready Resume video player.");
return;
}
pAppData->nCurPlayerState = MP_PLAYER_STATE_RESUME;
- MpUtilMultimediaKeyGrab();
+ MpUtilMultimediaKeyGrab();
+ MpVideoDrmResumeConsumption();
MpVideoAppCtrlGetPosition(pAppData);
MpVideoCtrlMgrMediaResume(pAppData);
MpVideoViewCtrlResume(pAppData);
static void MpVideoAppCtrlStopByAppPause(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
- if (!MpVideoCtrlMgrIsExistPlayerHandle()) {
+ if(!MpVideoCtrlMgrIsExistPlayerHandle())
+ {
VideoLogInfo("Not exist Player handle.");
return;
}
MpVideoAppCtrlStop(pAppData);
MpVideoCtrlMgrMediaDestroy(pAppData);
MpUtilLcdNormalPowerUnlockForPause();
-
MpVideoViewCtrlResetProgressBar((void *)pAppData);
MpUtilMultimediaKeyUngrab();
- if (pAppData->nCurPlayerType == MP_STREAMING_PLAYER) {
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
MpVideoViewSetBufferingRateForStreamingView(0, (void *)pAppData);
}
}
static void MpVideoAppCtrlStartByAppResume(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
+ if(bWindowForegroundState == FALSE)
+ {
+ VideoLogInfo("The Window of the video player is hided.");
+ }
+
MpVideoAppCtrlStart(pAppData);
MpVideoViewCtrlResume(pAppData);
MpVideoAppCtrlShowLayout(pAppData);
- MpUtilLcdNormalPowerLockForResume();
+
return;
}
VideoLogInfo("");
}
-static void MpVideoAppCtrlSetMute(VideoAppData *pAppData)
-{
- VideoLogInfo("");
-
- if (pAppData->bIsMute) {
- MpVideoCtrlMgrSetMute(TRUE);
- } else {
- MpVideoCtrlMgrSetMute(FALSE);
- }
-}
-
-static void MpVideoAppCtrlSetScreenType(VideoAppData *pAppData)
-{
- VideoLogInfo("");
-}
-
-static void MpVideoAppCtrlSetScreenSize(VideoAppData *pAppData, int nScreenSize)
+static void MpVideoAppCtrlRotateScreen(VideoAppData *pAppData, int nRotateState)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- switch(nScreenSize)
+ if(VIDEO_ROTATE_UNKNOWN > nRotateState || VIDEO_ROTATE_LANDSCAPE_REVERSE < nRotateState)
{
- case MP_DISPLAY_METHOD_LETTER_BOX: VideoLogInfo("LETTER_BOX"); break;
- case MP_DISPLAY_METHOD_ORIGIN_SIZE: VideoLogInfo("ORIGIN_SIZE"); break;
- case MP_DISPLAY_METHOD_FULL_SCREEN: VideoLogInfo("FULL_SCREEN"); break;
- case MP_DISPLAY_METHOD_CROPPED_FULL: VideoLogInfo("CROPPED_FULL"); break;
- case MP_DISPLAY_METHOD_CUSTOM_ROI: VideoLogInfo("CUSTOM_ROI"); break;
- default: VideoLogInfo("Nothing."); return;
+ VideoLogInfo("Wrong rotate state. - %d", nRotateState);
+ return;
}
- MpVideoCtrlMgrSetRatioVideoScreen((void*)pAppData, nScreenSize);
+ MpVideoCtrlMgrRotateVideoScreen(nRotateState);
}
static void MpVideoAppCtrlGetPosition(VideoAppData *pAppData)
static void MpVideoAppCtrlSetPosition(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- MpVideoCtrlMgrSetPosition(pAppData->nSetPosition);
+ MpVideoCtrlMgrSetPosition(pAppData->nSetPosition, (void *)MpVideoAppCtrlSeekCompleteCb, (void *)pAppData);
- if(MpUtilCheckRTSPType(pAppData->szMediaUri)) {
+ if(MpUtilCheckRTSPType(pAppData->szMediaUri))
+ {
VideoLogInfo("RTSP SEEK Start");
nBufferingRate = 0;
MpVideoAppCtrlBufferingCb((void *)pAppData);
-
}
}
+static void MpVideoAppCtrlSpeedReset(VideoAppData *pAppData)
+{
+ VideoLogInfo("");
+ MpVideoAppCtrlGetPosition(pAppData);
+ MpVideoCtrlMgrSetPosition( pAppData->nCurPosition, (void *)MpVideoAppCtrlSeekCompleteCb, (void *)pAppData);
+ MpVideoCtrlMgrResetPlaySpeed((void *)pAppData);
+}
+
+static void MpVideoAppCtrlSpeedFF(VideoAppData *pAppData)
+{
+ VideoLogInfo("");
+ MpVideoCtrlMgrSetPlaySpeedUp((void *)pAppData);
+}
+
+static void MpVideoAppCtrlSpeedRew(VideoAppData *pAppData)
+{
+ VideoLogInfo("");
+ MpVideoCtrlMgrSetPlaySpeedDown((void *)pAppData);
+}
+
static void MpVideoAppCtrlHideLayout(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
static void MpVideoAppCtrlShowLayout(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- MpVideoViewShowLayout((void *)pAppData);
+ MpVideoViewShowLayout((void *)pAppData);
}
static void MpVideoAppCtrlGetVideoResolution(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- pAppData->nVideoWidthResolution =
- MpVideoCtrlMgrGetVideoWidthResolution();
- pAppData->nVideoHeightResolution =
- MpVideoCtrlMgrGetVideoHeightResolution();
+ pAppData->nVideoWidthResolution = MpVideoCtrlMgrGetVideoWidthResolution();
+ pAppData->nVideoHeightResolution = MpVideoCtrlMgrGetVideoHeightResolution();
}
static void MpVideoAppCtrlReqDurationTime(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
static void MpVideoAppCtrlBeginOfStream(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
MpVideoAppCtrlGetVideoResolution(pAppData);
pAppData->nDuration = MpVideoCtrlMgrGetDuration();
- MpVideoViewCtrlInitAfterBeginOfStream((void *)pAppData);
+
+ MpVideoViewCtrlInitAfterBeginOfStream((void*)pAppData);
+
+ if(MpVideoViewCtrlIsPauseByUser())
+ {
+ MpVideoAppCtrlPause(pAppData);
+ MpVideoCtrlMgrSetMute(FALSE);
+ }
+
+ if(MpVideoCtrlMgrIsOnlyAudio())
+ {
+ MpVideoViewCtrlShowNocontentImage((void*)pAppData);
+ }
+ else
+ {
+ MpVideoViewCtrlHideNocontentImage((void*)pAppData);
+ }
}
static void MpVideoAppCtrlEndOfStream(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- if (pAppData->nLaunchingAppType == MP_LAUNCH_APP_GALLERY ) {
- if (pAppData->nCurPosition >= 0 ) {
- MpUtilMediaSvcSaveLastPlayedTime(pAppData->szMediaUri, 0);
- } else {
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY)
+ {
+ if(pAppData->nCurPosition >= 0)
+ {
+ MpUtilMediaSvcSetVideoLastPlayedTimeByUri(pAppData->szMediaUri, 0);
+ }
+ else
+ {
VideoLogInfo("Invalid Plaing time or duration time.");
}
}
- if (strlen(pAppData->szNextMediaUri) > 0) {
+ if(strlen(pAppData->szNextMediaUri) > 0)
+ {
MpVideoAppCtrlPlayNextMedia(pAppData);
}
- else {
- MpVideoAppCtrlExit(pAppData);
- }
+ else
+ {
+ MpVideoAppCtrlExit(pAppData);
+ }
+
+ MpVideoViewCtrlHideNocontentImage((void*)pAppData);
}
static void MpVideoAppCtrlExit(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- if(pEcorePipeHandleForErrorMsg) {
+
+ if(pEcorePipeHandleForErrorMsg)
+ {
ecore_pipe_del(pEcorePipeHandleForErrorMsg);
pEcorePipeHandleForErrorMsg = NULL;
}
- if(pEcorePipeHandleBOF) {
+ if(pEcorePipeHandleBOF)
+ {
ecore_pipe_del(pEcorePipeHandleBOF);
pEcorePipeHandleBOF = NULL;
}
- if (pEcorePipeHandleEOF) {
+
+ if(pEcorePipeHandleEOF)
+ {
ecore_pipe_del(pEcorePipeHandleEOF);
pEcorePipeHandleEOF = NULL;
}
- if (pEcorePipeHandleForBuffering) {
+ if(pEcorePipeHandleForBuffering)
+ {
ecore_pipe_del(pEcorePipeHandleForBuffering);
pEcorePipeHandleForBuffering = NULL;
}
- if (pEcorePipeHandleForBluetooth) {
- ecore_pipe_del(pEcorePipeHandleForBluetooth);
- pEcorePipeHandleForBluetooth = NULL;
- }
-
- if (pEcorePipeHandleForSubTitle) {
- ecore_pipe_del(pEcorePipeHandleForSubTitle);
- pEcorePipeHandleForSubTitle = NULL;
- }
- if (pEcorePipeHandleForResumed) {
+ if(pEcorePipeHandleForResumed)
+ {
ecore_pipe_del(pEcorePipeHandleForResumed);
pEcorePipeHandleForResumed = NULL;
}
- if (pEcorePipeHandleForInterruped) {
+
+ if(pEcorePipeHandleForInterruped)
+ {
ecore_pipe_del(pEcorePipeHandleForInterruped);
pEcorePipeHandleForInterruped = NULL;
}
+ if(pEcorePipeHandlerForSeekComplete)
+ {
+ ecore_pipe_del(pEcorePipeHandlerForSeekComplete);
+ pEcorePipeHandlerForSeekComplete = NULL;
+ }
+
MpVideoAppCtrlStop(pAppData);
MpVideoCtrlMgrMediaDestroy(pAppData);
-
MpUtilDeletePopupHandle();
-
MpVideoViewCtrlDestroy((void *)pAppData);
- if (pAppData->nCurPlayerType == MP_STREAMING_PLAYER) {
+ if(MpVideoServiceCtrlGetPlayerType() == MP_STREAMING_PLAYER)
+ {
MpVideoStreamingCtrlDestroy((void *)pAppData);
}
+ MpExternalUgDestroyAll();
+
elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
elm_exit();
static void MpVideoAppCtrlStartStreaming(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- MpVideoCtrlMgrMediaCreate(pAppData->szMediaUri,
- MpVideoAppCtrlPlayerMsgCallback,
- (void *)MpUtilGetMainWindowXID(),
- NULL,
- (void *)pAppData);
+ strncpy(pAppData->szCookie, MpVideoServiceCtrlGetCookieForStreaming(), STR_LEN_MAX - 1);
- MpVideoCtrlMgrMediaPlay((void *)pAppData);
+ MpVideoCtrlMgrMediaCreate(pAppData->szMediaUri, (void *)MpUtilGetMainWindowXID(), (void *)pAppData);
- if (pAppData->nSetPosition > 0) {
- VideoLogInfo("Start position time : %dms",
- pAppData->nSetPosition);
- MpVideoAppCtrlSetPosition(pAppData);
- }
-}
+ MpVideoCtrlMgrSetPlayerCallback(MpVideoAppCtrlPlayerCompletedCb, MpVideoAppCtrlPlayerInterruptedCbCb, MpVideoAppCtrlPlayerErrorCb, MpVideoAppCtrlPlayerBufferingCb, (void*)pAppData);
+ MpVideoCtrlMgrMediaRealizeAsync(MpVideoAppCtrlPlayerPrepareCb, (void *)pAppData);
+
+ MpVideoAppCtrlRotateScreen(pAppData, MpUtilGetRotationState());
+}
static void MpVideoAppCtrlReLaunching(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
MpVideoAppCtrlStop(pAppData);
MpVideoCtrlMgrMediaDestroy(pAppData);
- pAppData->nSetPosition = 0;
-
- if (pAppData->nCurPlayerType == MP_VIDEO_PLAYER) {
- memset(pAppData->szVideoTitle, 0, STR_LEN_MAX);
- MpUtilGetTitleFromFilepath(pAppData->szMediaUri, pAppData->szVideoTitle);
- MpVideoSubtitleCtrlInit(pAppData);
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ pAppData->nSetPosition = 0;
+ MpVideoViewCtrlChangeTitle(pAppData);
+ MpVideoAppCtrlStart(pAppData);
}
- MpVideoViewCtrlChangeTitle(pAppData);
-
- if (pAppData->nCurPlayerType == MP_VIDEO_PLAYER) {
- MpVideoAppCtrlStart(pAppData);
- } else if (pAppData->nCurPlayerType == MP_STREAMING_PLAYER) {
+ if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
MpVideoAppCtrlStartStreaming(pAppData);
+ pAppData->nSeekPosition = 0;;
}
-
- MpVideoAppCtrlSetMute(pAppData);
}
static void MpVideoAppCtrlPipeInit(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return;
}
VideoLogInfo("");
- if(pEcorePipeHandleForErrorMsg) {
+
+ if(pEcorePipeHandlerForSeekComplete)
+ {
+ ecore_pipe_del(pEcorePipeHandlerForSeekComplete);
+ pEcorePipeHandlerForSeekComplete = NULL;
+ }
+ pEcorePipeHandlerForSeekComplete = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlSeekCompletePipeCb, (void *)pAppData);
+
+ if(pEcorePipeHandleForErrorMsg)
+ {
ecore_pipe_del(pEcorePipeHandleForErrorMsg);
pEcorePipeHandleForErrorMsg = NULL;
}
- pEcorePipeHandleForErrorMsg = ecore_pipe_add(
- (Ecore_Pipe_Cb)MpVideoAppCtrlMmfErrormsgCb,
- (void *)pAppData);
- if(pEcorePipeHandleBOF) {
+ pEcorePipeHandleForErrorMsg = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlErrormsgCb, (void *)pAppData);
+
+ if(pEcorePipeHandleBOF)
+ {
ecore_pipe_del(pEcorePipeHandleBOF);
pEcorePipeHandleBOF = NULL;
}
- pEcorePipeHandleBOF = ecore_pipe_add(
- (Ecore_Pipe_Cb)MpVideoAppCtrlBeginOfPlayCb,
- (void *)pAppData);
- if(pEcorePipeHandleEOF) {
+ pEcorePipeHandleBOF = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlBeginOfPlayCb, (void *)pAppData);
+
+ if(pEcorePipeHandleEOF)
+ {
ecore_pipe_del(pEcorePipeHandleEOF);
pEcorePipeHandleEOF = NULL;
}
- pEcorePipeHandleEOF = ecore_pipe_add(
- (Ecore_Pipe_Cb)MpVideoAppCtrlEndOfPlayCb,
- (void *)pAppData);
- if (pEcorePipeHandleForBuffering) {
+ pEcorePipeHandleEOF = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlEndOfPlayCb, (void *)pAppData);
+
+ if(pEcorePipeHandleForBuffering)
+ {
ecore_pipe_del(pEcorePipeHandleForBuffering);
pEcorePipeHandleForBuffering = NULL;
}
- pEcorePipeHandleForBuffering = ecore_pipe_add(
- (Ecore_Pipe_Cb)MpVideoAppCtrlBufferingCb,
- (void *)pAppData);
-
- if (pEcorePipeHandleForBluetooth) {
- ecore_pipe_del(pEcorePipeHandleForBluetooth);
- pEcorePipeHandleForBluetooth = NULL;
- }
- pEcorePipeHandleForBluetooth = ecore_pipe_add(
- (Ecore_Pipe_Cb)MpVideoAppCtrlBluetoothCb,
- (void *)pAppData);
- if (pEcorePipeHandleForSubTitle) {
- ecore_pipe_del(pEcorePipeHandleForSubTitle);
- pEcorePipeHandleForSubTitle = NULL;
- }
- pEcorePipeHandleForSubTitle = ecore_pipe_add(
- (Ecore_Pipe_Cb)MpVideoAppCtrlUpdateSubtitleCb,
- (void *)pAppData);
+ pEcorePipeHandleForBuffering = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlBufferingCb, (void *)pAppData);
- if (pEcorePipeHandleForResumed) {
+ if(pEcorePipeHandleForResumed)
+ {
ecore_pipe_del(pEcorePipeHandleForResumed);
pEcorePipeHandleForResumed = NULL;
}
- pEcorePipeHandleForResumed = ecore_pipe_add(
- (Ecore_Pipe_Cb)MpVideoAppCtrlResumeByRewCb,
- (void *)pAppData);
- if (pEcorePipeHandleForInterruped) {
+ pEcorePipeHandleForResumed = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlResumeByRewCb, (void *)pAppData);
+
+ if(pEcorePipeHandleForInterruped)
+ {
ecore_pipe_del(pEcorePipeHandleForInterruped);
pEcorePipeHandleForInterruped = NULL;
}
- pEcorePipeHandleForInterruped = ecore_pipe_add(
- (Ecore_Pipe_Cb)MpVideoAppCtrlPauseByInterrupteCb,
- (void *)pAppData);
+ pEcorePipeHandleForInterruped = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlPauseByInterrupteCb, (void *)pAppData);
}
-
-
/*
* External function
*/
bool MpVideoAppCtrlInit(VideoAppData *pAppData)
{
- if (!pAppData) {
+ if(!pAppData)
+ {
VideoLogInfo("No exist appdata.");
return FALSE;
}
- VideoLogInfo("");
+ VideoLogInfo("Get rotation state from appcore. - %d", MpUtilGetRotationStateFromAppcore());
MpVideoAppCtrlFuncInit(pAppData);
- MpVideoSubtitleCtrlInit(pAppData);
+ MpVideoAppCtrlPipeInit(pAppData);
MpVideoViewCtrlInit(pAppData);
- if (!MpUtilCheckCallStatus()) {
+ evas_object_show(pAppData->pMainWindow);
+ elm_win_activate(pAppData->pMainWindow);
+
+ if(!MpUtilCheckCallStatus())
+ {
MpUtilNotifyPopUp(pAppData, _(MP_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL), MpVideoAppCtrlExitCb);
return FALSE;
}
- if (!MpUtilCheckBatteryStatus()) {
+ if(!MpUtilCheckBatteryStatus())
+ {
MpUtilNotifyPopUp(pAppData, dgettext("sys_string", MP_COM_BODY_LOW_BATTERY), MpVideoAppCtrlExitCb);
return FALSE;
}
- if (pAppData->nCurPlayerType == MP_VIDEO_PLAYER) {
- if (!MpUtilCheckLocalFileExist(pAppData->szMediaUri)) {
- MpUtilNotifyPopUp(pAppData, "File not Exist", MpVideoAppCtrlExitCb);
- return FALSE;
- }
-
- memset(pAppData->szVideoTitle, 0, STR_LEN_MAX);
- MpUtilGetTitleFromFilepath(pAppData->szMediaUri, pAppData->szVideoTitle);
- MpVideoViewCtrlChangeTitle(pAppData);
- }
-
- MpVideoAppCtrlPipeInit(pAppData);
-
- MpVideoAppCtrlStart(pAppData);
+ MpVideoAppCtrlStart(pAppData);
return TRUE;
}
MpVideoViewCtrlDestroy((void *)pAppData);
MpUtilMediaSvcDestoryVideoList();
MpUtilMediaSvcFinishSession();
- MpUtilMediaSvcMtagIterateDestroyTagList();
- MpUtilMMCstatusNotiIgnore();
MpUtilBatteryStatusNotiIgnore();
- MpVideoSubtitleCtrlDestroy();
nBufferingRate = 0;
- nErrorCode = 0;
+ nPlayerErrorType = 0;
+ nPlayerInterruptType = 0;
- pAppData->bIsMute = FALSE;
pAppData->nDuration = 0;
pAppData->nSetPosition = 0;
pAppData->nCurPosition = 0;
- pAppData->nSubtitleDuration = 0;
+ pAppData->nSeekPosition = 0;
pAppData->nBufferingPosition = 0;
pAppData->nVideoWidthResolution = 0;
pAppData->nVideoHeightResolution = 0;
- memset(pAppData->szSubtitle, 0, sizeof(char) * STR_LEN_MAX);
memset(pAppData->szVideoTitle, 0, sizeof(char) * STR_LEN_MAX);
memset(pAppData->szMediaUri, 0, sizeof(char) * STR_LEN_MAX);
memset(pAppData->szPreMediaUri, 0, sizeof(char) * STR_LEN_MAX);
memset(pAppData->szNextMediaUri, 0, sizeof(char) * STR_LEN_MAX);
- memset(pAppData->szTagNameForVideoList, 0, sizeof(char) * STR_LEN_MAX);
pAppData->nPrePlayerState = MP_PLAYER_STATE_CLEAR;
pAppData->nCurPlayerState = MP_PLAYER_STATE_CLEAR;
- pAppData->nLaunchingAppType = MP_LAUNCH_APP_DEFAULT;
- pAppData->nVideoSortType = MP_MEDIA_SORT_BY_NONE;
- pAppData->nVideoListType = MP_VIDEO_LIST_TYPE_FOLDER;
- pAppData->nCurPlayerType = MP_STREAMING_PLAYER;
+ pAppData->nPlayingSpeed = 0;
memset(pAppData->szProxyAddress, 0, sizeof(char) * STR_LEN_MAX);
memset(pAppData->szUserAgent, 0, sizeof(char) * STR_LEN_MAX);
bool MpVideoAppCtrlIsTopView(void* pUserData)
{
- if (!pUserData) {
+ if(!pUserData)
+ {
VideoLogInfo("No exist pUserData.");
return FALSE;
}
return MpVideoCtrlMgrIsExistPlayerHandle();
}
+
+void MpVideoAppCtrlSetForCheckingForegroundwindow(bool bForwgroundState)
+{
+ VideoLogInfo("");
+
+ bWindowForegroundState = bForwgroundState;
+}
+
+void MpVideoAppCtrlSetRotation(int nRotateMode, void *pUserData)
+{
+ VideoLogInfo("");
+
+ MpVideoViewCtrlSetRotation(nRotateMode, pUserData);
+}
+
+
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-
-
#include <stdio.h>
#include <string.h>
-#include <mm_sound_private.h>
+#include <image_util.h>
#include "mp-util.h"
#include "mp-video-log.h"
#include "mp-video-ctrl-mgr.h"
#include "mp-video-player-mgr.h"
#include "mp-video-type-define.h"
+#include "mp-video-service-ctrl.h"
-bool MpVideoCtrlMgrMediaCreate(char *szMediaURI, void *pMmfPlayerCallback,
- void *pOverlayXid, char* szSubtitleUri, void *pUserData)
+bool MpVideoCtrlMgrMediaCreate(char *szMediaURI, void *pOverlayXid, void *pUserData)
{
- if (!pUserData) {
+ if(!pUserData)
+ {
VideoLogInfo("[ERR] No exist pUserData.");
return FALSE;
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
VideoLogInfo("");
- VideoLogInfo("XID : %d", *(int *)pOverlayXid);
+ VideoLogInfo("XID : %p", pOverlayXid);
- if (!MpPlayerMgrCreate(szMediaURI)) {
+ if(!MpPlayerMgrCreate(szMediaURI))
+ {
VideoLogInfo("[ERR] Fail to create player handle.");
return FALSE;
}
- if (pAppData->nCurPlayerType == MP_STREAMING_PLAYER) {
-
- MpUtilGetUserAgent(pAppData);
-
- if (!MpPlayerMgrSetUseragentForStreaming(pAppData->szUserAgent)) {
- VideoLogInfo("[ERR] Fail to set useragent.");
- return FALSE;
- }
-
- if (!MpPlayerMgrSetProxAddressForStreaming
- (pAppData->szProxyAddress)) {
- VideoLogInfo("[ERR] Fail to set proxy address.");
- return FALSE;
- }
+ MpUtilGetUserAgent(pAppData);
- if (!MpPlayerMgrSetCookieForStreaming(pAppData->szCookie)) {
- VideoLogInfo("[ERR] Fail to set Cookie.");
- return FALSE;
- }
+ if(!MpPlayerMgrSetUseragentForStreaming(pAppData->szUserAgent))
+ {
+ VideoLogInfo("[ERR] Fail to set useragent.");
+ return FALSE;
}
- if (szSubtitleUri && strlen((char*)szSubtitleUri) > 0) {
- VideoLogInfo("Subtitle URI : %s", szSubtitleUri);
-
- if (!MpPlayerMgrSetSubtitle(szSubtitleUri)) {
- VideoLogInfo("Fail to set subtitle uri.");
- }
- } else {
- VideoLogInfo("No exist subtitle uri.");
+ if(!MpPlayerMgrSetProxyAddressForStreaming(pAppData->szProxyAddress))
+ {
+ VideoLogInfo("[ERR] Fail to set proxy address.");
+ return FALSE;
}
- if (!MpPlayerMgrRealize()) {
- VideoLogInfo("[ERR] Fail relization.");
+ if(!MpPlayerMgrSetCookieForStreaming(pAppData->szCookie))
+ {
+ VideoLogInfo("[ERR] Fail to set Cookie.");
return FALSE;
}
- if (!MpPlayerMgrSetSoundPriority()) {
- VideoLogInfo("[ERR] Fail to set sound priority.");
+ if(!MpPlayerMgrSetOverlayXid(pOverlayXid))
+ {
+ VideoLogInfo("[ERR] Fail to set overlay window.");
return FALSE;
}
- if (!MpPlayerMgrSetOverlayXid(pOverlayXid)) {
- VideoLogInfo("[ERR] Fail to set overlay window.");
+ if(!MpVideoCtrlMgrSetScaling(FALSE))
+ {
+ VideoLogInfo("[ERR] Fail to set scaling.");
return FALSE;
}
- MpPlayerMgrSetMessageCallback(pMmfPlayerCallback, pAppData);
+ if(!MpPlayerMgrSetSoundPriority())
+ {
+ VideoLogInfo("[ERR] Fail to set sound priority.");
+ return FALSE;
+ }
pAppData->nCurPlayerState = MP_PLAYER_STATE_CLEAR;
pAppData->nCurPlayerState = MP_PLAYER_STATE_RESUME;
}
+void MpVideoCtrlMgrSetPlayerCallback(void *PlayerCompletedCb, void *PlayerInterruptedCb, void *PlayerErrorCb, void *PlayerBufferingCb, void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR] No exist pUserData.");
+ return;
+ }
+
+ if(!PlayerCompletedCb || !PlayerInterruptedCb || !PlayerErrorCb || !PlayerBufferingCb)
+ {
+ VideoLogInfo("[ERR] No exist player callback function pointer.");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ MpPlayerMgrRegistePlayerCallback(PlayerCompletedCb, PlayerInterruptedCb, PlayerErrorCb, PlayerBufferingCb, pUserData);
+}
+
void MpVideoCtrlMgrSetOverlayXid(void *pXid)
{
VideoLogInfo(" XID:%d", *((int *)pXid));
}
}
-void MpVideoCtrlMgrSetPosition(int nSetPosition)
+void MpVideoCtrlMgrSetPosition(int nSetPosition, void *pSeekCb, void *pUserData)
{
VideoLogInfo("");
VideoLogInfo("Set position - %d", nSetPosition);
if (nSetPosition > -1) {
- MpPlayerMgrSetPosition(nSetPosition);
+ MpPlayerMgrSetPosition(nSetPosition, pSeekCb, pUserData);
}
}
int MpVideoCtrlMgrGetPosition(void)
{
- return MpPlayerMgrGetPosition();
+ /* VideoLogInfo(""); */
+
+ return MpPlayerMgrGetPosition();
}
int MpVideoCtrlMgrGetDuration(void)
int nDuration = 0;
- nDuration = MpPlayerMgrGetPdduration();
+ nDuration = MpPlayerMgrGetDuration();
VideoLogInfo(" content duration : %d ms", nDuration);
return nDuration;
}
-void MpVideoCtrlMgrSetROI(void *pUserData, int nOverlayX, int nOverlayY,
- int nOverlayWidth, int nOverlayHeight)
+void MpVideoCtrlMgrResetPlaySpeed(void *pUserData)
{
if (!pUserData) {
VideoLogInfo("[ERR] No exist pUserData.");
return;
}
- VideoLogInfo(" ROI - X:%d, Y:%d, W:%d, H:%d,", nOverlayX, nOverlayY,
- nOverlayWidth, nOverlayHeight);
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ VideoLogInfo("");
+
+ if (!MpPlayerMgrSetPlaySpeed(1.0)) {
+ VideoLogInfo("[ERR] Fail to reset play speed.");
+ return;
+ }
+
+ pAppData->nPlayingSpeed = MP_PLAYING_SPEED_NORMAL;
+}
+
+void MpVideoCtrlMgrSetPlaySpeedUp(void *pUserData)
+{
+ if (!pUserData) {
+ VideoLogInfo("[ERR] No exist pUserData.");
+ return;
+ }
- if (!MpPlayerMgrSetRatioVideoScreenSize(DISPLAY_METHOD_CUSTOM_ROI)) {
- VideoLogInfo("[ERR] Fail to set ROI screen.");
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ VideoLogInfo("");
+
+ if (pAppData->nPlayingSpeed > MP_PLAYING_SPEED_MAX) {
+ VideoLogInfo("Current speed is full.(5X)");
+ pAppData->nPlayingSpeed = MP_PLAYING_SPEED_5X;
+ }
+
+
+ float val = 0;
+ val = (float)pAppData->nPlayingSpeed;
+
+ MpPlayerMgrSetPlaySpeed(val);
+
+}
+
+void MpVideoCtrlMgrSetPlaySpeedDown(void *pUserData)
+{
+ if (!pUserData) {
+ VideoLogInfo("[ERR] No exist pUserData.");
return;
}
- if (!MpPlayerMgrSetDisplayArea
- (nOverlayX, nOverlayY, nOverlayWidth, nOverlayHeight)) {
- VideoLogInfo("[ERR] Fail to set overlay display area for ROI.");
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ VideoLogInfo("");
+
+ if (pAppData->nPlayingSpeed > MP_PLAYING_SPEED_MAX) {
+ VideoLogInfo("Current speed is full.(5X)");
return;
}
+
+ float val = 0;
+ val = -(float)pAppData->nPlayingSpeed;
+ MpPlayerMgrSetPlaySpeed(val);
+
}
int MpVideoCtrlMgrGetVideoWidthResolution(void)
VideoLogInfo("");
- MpPlayerMgrSetRatioVideoScreenSize(nRatioScreenSize);
+ MpPlayerMgrSetDisplayMode(nRatioScreenSize);
}
-void MpVideoCtrlMgrSetVerticalOverlayPos(int nOverlayY)
+void MpVideoCtrlMgrRotateVideoScreen(int nVideoRotateValue)
{
VideoLogInfo("");
- if (nOverlayY < 0) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- VideoLogInfo("Overlay Y position : %d", nOverlayY);
-
- if (!MpPlayerMgrSetVerticalOverlayPos(nOverlayY)) {
- VideoLogInfo("[ERR]");
+ switch (nVideoRotateValue) {
+ case VIDEO_ROTATE_PORTRAIT_NORMAL:
+ VideoLogInfo("Set Portrait.");
+ MpPlayerMgrSetRotate(VIDEO_SCREEN_PORTRAIT);
+ break;
+
+ case VIDEO_ROTATE_LANDSCAPE_NORMAL:
+ VideoLogInfo("Set Landscape.");
+ MpPlayerMgrSetRotate(VIDEO_SCREEN_LANDSCAPE);
+ break;
+
+ case VIDEO_ROTATE_PORTRAIT_REVERSE:
+ VideoLogInfo("Set Portrait reverse.");
+ MpPlayerMgrSetRotate(VIDEO_SCREEN_PORTRAIT_UPSIDEDOWN);
+ break;
+
+ case VIDEO_ROTATE_LANDSCAPE_REVERSE:
+ VideoLogInfo("Set Landscape reverse.");
+ MpPlayerMgrSetRotate(VIDEO_SCREEN_LANDSCAPE_UPSIDEDOWN);
+ break;
+
+ default:
+ VideoLogInfo("Set Portrait.");
+ MpPlayerMgrSetRotate(VIDEO_SCREEN_PORTRAIT);
+ break;
}
}
int MpVideoCtrlMgrGetBufferingPosition(void)
{
- return MpPlayerMgrGetBufferingPosition();
+ /* VideoLogInfo(""); */
+
+ return MpPlayerMgrGetBufferingPosition();
}
bool MpVideoCtrlMgrIsExistPlayerHandle(void)
return MpPlayerMgrIsActive();
}
+
+bool MpVideoCtrlMgrIsOnlyAudio(void)
+{
+ VideoLogInfo("");
+
+ int nStreamFileType = MpPlayerMgrGetFileStreamType();
+
+ if(nStreamFileType == MP_FILE_STREAM_TYPE_AUDIO)
+ {
+ VideoLogInfo("A file stream type is only audio.");
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+bool MpVideoCtrlMgrSetScaling(bool bScale)
+{
+ VideoLogInfo("");
+
+ return MpPlayerMgrSetScaling(bScale);
+
+}
+
+int MpVideoCtrlMgrGetErrorType(int nErrorVal)
+{
+ VideoLogInfo("");
+
+ switch(nErrorVal)
+ {
+ case PLAYER_ERROR_NONE:
+ return MP_PLAYER_ERROR_NONE;
+
+ case PLAYER_ERROR_OUT_OF_MEMORY:
+ return MP_PLAYER_ERROR_OUT_OF_MEMORY;
+
+ case PLAYER_ERROR_INVALID_PARAMETER:
+ return MP_PLAYER_ERROR_INVALID_PARAMETER;
+
+ case PLAYER_ERROR_NO_SUCH_FILE:
+ return MP_PLAYER_ERROR_NO_SUCH_FILE;
+
+ case PLAYER_ERROR_INVALID_OPERATION:
+ return MP_PLAYER_ERROR_INVALID_OPERATION;
+
+ case PLAYER_ERROR_SEEK_FAILED:
+ return MP_PLAYER_ERROR_SEEK_FAILED;
+
+ case PLAYER_ERROR_INVALID_STATE:
+ return MP_PLAYER_ERROR_INVALID_STATE;
+
+ case PLAYER_ERROR_NOT_SUPPORTED_FILE:
+ return MP_PLAYER_ERROR_NOT_SUPPORTED_FILE;
+
+ case PLAYER_ERROR_INVALID_URI:
+ return MP_PLAYER_ERROR_INVALID_URI;
+
+ case PLAYER_ERROR_SOUND_POLICY:
+ return MP_PLAYER_ERROR_SOUND_POLICY;
+
+ case PLAYER_ERROR_CONNECTION_FAILED:
+ return MP_PLAYER_ERROR_CONNECTION_FAILED;
+
+ default:
+ return MP_PLAYER_ERROR_UNKNOWN_ERROR;
+ }
+}
+
+bool MpVideoCtrlMgrMediaRealize(void)
+{
+ VideoLogInfo("");
+
+ if(!MpPlayerMgrRealize())
+ {
+ VideoLogInfo("[ERR] Fail relization.");
+ return FALSE;
+ }
+ return TRUE;
+}
+
+bool MpVideoCtrlMgrMediaRealizeAsync(void *pReailzeCb, void *pUserData)
+{
+ VideoLogInfo("");
+
+ if(!MpPlayerMgrRealizeAsync(pReailzeCb, pUserData))
+ {
+ VideoLogInfo("[ERR] Fail relization.");
+ return FALSE;
+ }
+ return TRUE;
+}
\ No newline at end of file
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-
#include <aul.h>
#include <ctype.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
-#include <appcore-efl.h>
#include <syspopup_caller.h>
#include "mp-util.h"
+#include "mp-drm-ctrl.h"
#include "mp-video-log.h"
#include "video-player.h"
#include "mp-video-display-view.h"
#include "mp-video-value-define.h"
#include "mp-util-media-service.h"
#include "mp-video-string-define.h"
-#include "mp-video-subtitle-ctrl.h"
#include "mp-video-sound-path-ctrl.h"
+#include "mp-external-ug.h"
+#include "mp-video-service-ctrl.h"
-#define MUTE_POPUP_INTERVAL_TIME 3.0
#define CTRL_PANEL_SHOW_TIME 5.0
-#define DOUBLE_CLICK_TIME 0.2
-#define MP_VIDEO_SUBTITLE_X_RATIO_LANDSCAPE 0.1
-#define MP_VIDEO_SUBTITLE_Y_RATIO_LANDSCAPE 0.15
-#define MP_VIDEO_SUBTITLE_W_RATIO_LANDSCAPE 0.8
-#define MP_VIDEO_SUBTITLE_H_RATIO_LANDSCAPE 0.2
-#define MP_VIDEO_SUBTITLE_Y_RATIO_LANDSCAPE_WITHOUT_UI 0.47
-#define MP_VIDEO_SUBTITLE_X_RATIO_PORTRAIT 0.1
-#define MP_VIDEO_SUBTITLE_Y_RATIO_PORTRAIT 0.5
-#define MP_VIDEO_SUBTITLE_W_RATIO_PORTRAIT 0.8
-#define MP_VIDEO_SUBTITLE_H_RATIO_PORTRAIT 0.2
-#define MP_VIDEO_SPEED_2X_SEEK_TIME 1000
-#define MP_VIDEO_SPEED_3X_SEEK_TIME 3000
-#define MP_VIDEO_SPEED_4X_SEEK_TIME 5000
-#define MP_VIDEO_SPEED_5X_SEEK_TIME 7000
-
-
-typedef enum
-{
- MP_PLAYING_SPEED_NOTHING = 0,
- MP_PLAYING_SPEED_FF,
- MP_PLAYING_SPEED_REW,
-}MpVideoDisplayViewSpeedModeType;
-
+#define MAX_SPEED_STEP 4
static Evas_Object *pNaviFrameHandle = NULL;
-static Evas_Object *pDisplayViewNaviControlBar = NULL;
static Evas_Object *pDisplayViewLayout = NULL;
static Evas_Object *pDisplayViewPanelEdj = NULL;
static Evas_Object *pDisplayViewCtrlEdj = NULL;
-static Evas_Object *pDisplayViewSubtitleEdj = NULL;
-static Evas_Object *pDisplayViewOptionEdj = NULL;
+static Evas_Object *pDisplayViewProgressbarEdj = NULL;
static Evas_Object *pDisplaySoundpathButton = NULL;
-//static Ecore_Timer *pVolLongPressTimer = NULL;
-//static Ecore_Timer *pMutePopupShowTimer = NULL;
static Ecore_Timer *pCtrlPanelHideTimer = NULL;
static Ecore_Timer *pSpeedPressTimer = NULL;
-static Ecore_Timer *pSubtitleTimer = NULL;
static Elm_Object_Item *pNaviFrameItemForDisplayerView = NULL;
-static Ecore_Event_Handler *pMouseEventHandler = NULL;
-
-//static bool bIsVolumeLongPress = FALSE;
-//static bool bIsVolumePopupShow = FALSE;
-static bool bSwitchDisplayViewUI = TRUE;
-static int nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
-static int nCountCalledSpeedPlaying = 0;
-static int nSpeedMode = MP_PLAYING_SPEED_NOTHING;
+static ChangeDisplayViewCbFunc pChangeViewUserCbFunc = NULL;
+static bool bIsVideoViewScreenLock = FALSE;
+static bool bSwitchDisplayViewUI = TRUE;
+static bool bIsSpeedLongPress = FALSE;
+static bool bIsDisplayViewOnlyAudio = FALSE;
+static int nSpeedMode = 0; /* (-1:REW, 1: FF) */
+static int nControlMouseDownPos = 0;
+static int nControlMouseMovePos = 0;
+static int nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
+static bool bIsPauseByUser = FALSE;
/*
* When the video display view is hieded by others view(favorite/info/etc),
static VideoDisplayViewState nDisplayViewState = MP_DISPLAY_VIEW_STATE_UNACTIVATE;
+
+/*
+ * Internal function.
+ */
+static void MpVideoDisplayViewUpdateFFStep(int nStep)
+{
+ VideoLogInfo("");
+
+ if (nStep < 0 || nStep > MAX_SPEED_STEP) {
+ VideoLogInfo("Invalid Step value:%d", nStep);
+ return;
+ }
+
+ char sig_format[SIGNAL_TEXT_MAX_LEN] = { 0, };
+
+ switch(nStep)
+ {
+ case MP_PLAYING_SPEED_2X: nStep = 1; break;
+ case MP_PLAYING_SPEED_3X: nStep = 2; break;
+ case MP_PLAYING_SPEED_4X: nStep = 3; break;
+ case MP_PLAYING_SPEED_5X: nStep = 4; break;
+ }
+
+ if(MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_NORMAL || MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_REVERSE)
+ {
+ snprintf(sig_format, SIGNAL_TEXT_MAX_LEN, "%s.%d", SIGNAL_CONTROL_NORMAL_FF_STEP, nStep);
+ }
+ else
+ {
+ snprintf(sig_format, SIGNAL_TEXT_MAX_LEN, "%s.%d", SIGNAL_CONTROL_NORMAL_FF_LANDSCAPE_STEP, nStep);
+ }
+
+ VideoLogInfo("%s", sig_format);
+ edje_object_signal_emit(pDisplayViewCtrlEdj, sig_format, "*");
+}
+
+static void MpVideoDisplayViewUpdateREWStep(int nStep)
+{
+ VideoLogInfo("");
+
+ if (nStep < 0 || nStep > MAX_SPEED_STEP) {
+ VideoLogInfo("Invalid Step value:%d", nStep);
+ return;
+ }
+
+ char sig_format[SIGNAL_TEXT_MAX_LEN] = { 0, };
+
+ switch(nStep)
+ {
+ case MP_PLAYING_SPEED_2X: nStep = 1; break;
+ case MP_PLAYING_SPEED_3X: nStep = 2; break;
+ case MP_PLAYING_SPEED_4X: nStep = 3; break;
+ case MP_PLAYING_SPEED_5X: nStep = 4; break;
+ }
+
+ if(MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_NORMAL || MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_REVERSE)
+ {
+ snprintf(sig_format, SIGNAL_TEXT_MAX_LEN, "%s.%d", SIGNAL_CONTROL_NORMAL_REW_STEP, nStep);
+ }
+ else
+ {
+ snprintf(sig_format, SIGNAL_TEXT_MAX_LEN, "%s.%d", SIGNAL_CONTROL_NORMAL_REW_LANDSCAPE_STEP, nStep);
+ }
+
+ VideoLogInfo("%s", sig_format);
+ edje_object_signal_emit(pDisplayViewCtrlEdj, sig_format, "*");
+}
+
/*
* Callback function.
*/
}
}
-static void MpVideoDisplayViewPressOptionScreenSizeCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
-{
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- VideoLogInfo("");
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (!strcmp(szEmission, SIGNAL_OPTION_SCREEN_SIZE_NORMAL)) {
- VideoLogInfo("Screen size : Normal");
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetScreenSize(pAppData, MP_DISPLAY_METHOD_LETTER_BOX);
- nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
- } else if (!strcmp(szEmission, SIGNAL_OPTION_SCREEN_SIZE_EXPAND)) {
- VideoLogInfo("Screen size : Expand");
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetScreenSize(pAppData, MP_DISPLAY_METHOD_CROPPED_FULL);
- nScreensizeStatus = MP_DISPLAY_METHOD_CROPPED_FULL;
- } else {
- VideoLogInfo("Screen size : Nothing");
- nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
- }
-}
-
static void MpVideoDisplayViewPressPauseButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
{
VideoLogInfo("");
if (pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME ||
pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY) {
pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+ bIsPauseByUser = TRUE;
}
}
}
VideoLogInfo("Press Resume/Play button.");
if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE) {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume
- (pAppData);
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+ bIsPauseByUser = FALSE;
}
}
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
- int nSeekPos = 0;
-
- ++nCountCalledSpeedPlaying;
- switch (nCountCalledSpeedPlaying) {
- case MP_PLAYING_SPEED_NORMAL: nSeekPos = 0; break;
- case MP_PLAYING_SPEED_2X: nSeekPos = MP_VIDEO_SPEED_2X_SEEK_TIME; break;
- case MP_PLAYING_SPEED_3X: nSeekPos = MP_VIDEO_SPEED_3X_SEEK_TIME; break;
- case MP_PLAYING_SPEED_4X: nSeekPos = MP_VIDEO_SPEED_4X_SEEK_TIME; break;
- case MP_PLAYING_SPEED_5X: nSeekPos = MP_VIDEO_SPEED_5X_SEEK_TIME; break;
- }
-
- if (nCountCalledSpeedPlaying > MP_PLAYING_SPEED_5X) {
- nSeekPos = MP_VIDEO_SPEED_5X_SEEK_TIME;
+ if (pSpeedPressTimer) {
+ ecore_timer_del(pSpeedPressTimer);
+ pSpeedPressTimer = NULL;
}
- VideoLogInfo("nSeekPos : %d", nSeekPos);
+ bIsSpeedLongPress = TRUE;
+ pAppData->nPlayingSpeed = MP_PLAYING_SPEED_2X;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition(pAppData);
+ char caption[CAPTION_TEXT_MAX_LEN] = { 0, };
- if (nSpeedMode == MP_PLAYING_SPEED_FF) {
- nSeekPos = pAppData->nCurPosition + nSeekPos;
- } else if (nSpeedMode == MP_PLAYING_SPEED_REW) {
- nSeekPos = pAppData->nCurPosition - nSeekPos;
+ if(nSpeedMode == 1)
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedFF(pAppData);
+ snprintf(caption, CAPTION_TEXT_MAX_LEN, "X%d fast forward", pAppData->nPlayingSpeed);
+ MpVideoDisplayViewUpdateFFStep(pAppData->nPlayingSpeed);
}
-
- VideoLogInfo("pAppData->nCurPosition : %d, nSeekPos : %d", pAppData->nCurPosition, nSeekPos);
-
- if (0 >= nSeekPos || pAppData->nDuration <= nSeekPos) {
- if (pSpeedPressTimer) {
- ecore_timer_del(pSpeedPressTimer);
- pSpeedPressTimer = NULL;
- }
- nCountCalledSpeedPlaying = 0;
- return EINA_FALSE;
+ else if(nSpeedMode == -1)
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedRew(pAppData);
+ snprintf(caption, CAPTION_TEXT_MAX_LEN, "X%d fast reverse", pAppData->nPlayingSpeed);
+ MpVideoDisplayViewUpdateREWStep(pAppData->nPlayingSpeed);
}
- pAppData->nSetPosition = nSeekPos;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+ edje_object_part_text_set(_EDJ(pDisplayViewLayout), MAIN_SPEED_TEXT, caption);
+ edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_SPEEDBOX_SHOW, "*");
- return EINA_TRUE;
+ return EINA_FALSE;
}
-static void MpVideoDisplayViewFFDownButtonCb(void *pUserData,
- Evas_Object *pObject,
- const char *szEmission,
- const char *szSource)
+
+static void MpVideoDisplayViewFFDownButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
{
VideoLogInfo("");
pSpeedPressTimer = NULL;
}
- nCountCalledSpeedPlaying = 0;
-
- nSpeedMode = MP_PLAYING_SPEED_FF;
+ nSpeedMode = 1;
pSpeedPressTimer = ecore_timer_add(LONG_PRESS_INTERVAL, MpVideoDisplayViewSpeedLongPressCb, (void *)pAppData);
}
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
if (!strcmp(szEmission, SIGNAL_CONTROL_NORMAL_FF_BUTTON_UP)) {
- if (nCountCalledSpeedPlaying == MP_PLAYING_SPEED_NORMAL) {
- VideoLogInfo("Press FF up button.");
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+ VideoLogInfo("Press FF up button.");
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+
+ if (pSpeedPressTimer) {
+ ecore_timer_del(pSpeedPressTimer);
+ pSpeedPressTimer = NULL;
+ bIsPauseByUser = FALSE;
pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayNextMedia(pAppData);
- }
- }
+ } else {
+ MpVideoDisplayViewUpdateFFStep(0);
- if(strlen(pAppData->szNextMediaUri) > 0) {
- VideoLogInfo("Next File : %s", pAppData->szNextMediaUri);
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_FF_MODE_EXTEND, "*");
- }
- else {
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_FF_MODE_NORMAL, "*");
- }
- if(strlen(pAppData->szPreMediaUri) > 0) {
- VideoLogInfo("Prev File : %s", pAppData->szPreMediaUri);
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_REW_MODE_EXTEND, "*");
- }
- else {
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_REW_MODE_NORMAL, "*");
- }
+ edje_object_part_text_set(_EDJ(pDisplayViewLayout), MAIN_SPEED_TEXT, "");
+ edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_SPEEDBOX_HIDE, "*");
- if (pSpeedPressTimer) {
- ecore_timer_del(pSpeedPressTimer);
- pSpeedPressTimer = NULL;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedReset(pAppData);
+ }
+ bIsSpeedLongPress = FALSE;
}
-
- nCountCalledSpeedPlaying = 0;
}
static void MpVideoDisplayViewRewDownButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
pSpeedPressTimer = NULL;
}
- nCountCalledSpeedPlaying = 0;
-
- nSpeedMode = MP_PLAYING_SPEED_REW;
+ nSpeedMode = -1;
pSpeedPressTimer = ecore_timer_add(LONG_PRESS_INTERVAL, MpVideoDisplayViewSpeedLongPressCb, (void *)pAppData);
}
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
if (!strcmp(szEmission, SIGNAL_CONTROL_NORMAL_REW_BUTTON_UP)) {
- if (nCountCalledSpeedPlaying == MP_PLAYING_SPEED_NORMAL) {
- VideoLogInfo("Press Rewind up button.");
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayPreMedia(pAppData);
- }
- }
- if(strlen(pAppData->szNextMediaUri) > 0) {
- VideoLogInfo("Next File : %s", pAppData->szNextMediaUri);
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_FF_MODE_EXTEND, "*");
- }
- else {
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_FF_MODE_NORMAL, "*");
- }
- if(strlen(pAppData->szPreMediaUri) > 0) {
- VideoLogInfo("Prev File : %s", pAppData->szPreMediaUri);
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_REW_MODE_EXTEND, "*");
- }
- else {
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_REW_MODE_NORMAL, "*");
- }
-
- if (pSpeedPressTimer) {
- ecore_timer_del(pSpeedPressTimer);
- pSpeedPressTimer = NULL;
- }
+ VideoLogInfo("Press Rewind up button.");
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
- nCountCalledSpeedPlaying = 0;
-}
+ if (pSpeedPressTimer) {
+ ecore_timer_del(pSpeedPressTimer);
+ pSpeedPressTimer = NULL;
+ bIsPauseByUser = FALSE;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayPreMedia(pAppData);
+ } else {
+ MpVideoDisplayViewUpdateREWStep(0);
-/*
-static Eina_Bool MpVideoDisplayViewVolPopupCb(void *pUserData)
-{
- VideoLogInfo("");
+ edje_object_part_text_set(_EDJ(pDisplayViewLayout), MAIN_SPEED_TEXT, "");
+ edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_SPEEDBOX_HIDE, "*");
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return EINA_FALSE;
- }
-
- if (pMutePopupShowTimer) {
- ecore_timer_del(pMutePopupShowTimer);
- pMutePopupShowTimer = NULL;
+ pAppData->VideoAppCtrlCallbackFunc. VideoAppCtrlSpeedReset(pAppData);
+ }
+ bIsSpeedLongPress = FALSE;
}
-
- bIsVolumePopupShow = FALSE;
- edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_MUTE_HIDE, "*");
-
- return EINA_FALSE;
}
-static Eina_Bool MpVideoDisplayViewVolLongPressCb(void *pUserData)
-{
- VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return EINA_FALSE;
- }
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (pVolLongPressTimer) {
- ecore_timer_del(pVolLongPressTimer);
- pVolLongPressTimer = NULL;
- }
-
- bIsVolumeLongPress = TRUE;
-
- if (pAppData->bIsMute == FALSE) {
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_VOL_BUTTON_MUTE, "*");
- edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_MUTE_SHOW, "*");
-
- pMutePopupShowTimer = ecore_timer_add(MUTE_POPUP_INTERVAL_TIME, MpVideoDisplayViewVolPopupCb, (void *)pAppData);
- bIsVolumePopupShow = TRUE;
- pAppData->bIsMute = TRUE;
- } else {
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_VOL_BUTTON_UNMUTE, "*");
- edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_MUTE_HIDE, "*");
- bIsVolumePopupShow = FALSE;
- pAppData->bIsMute = FALSE;
- }
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetMute(pAppData);
-
- return EINA_FALSE;
-}
-*/
static void MpVideoDisplayViewBackButtonDownCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
{
VideoAppData *pAppData = (VideoAppData *)pUserData;
- if (pAppData->nLaunchingAppType == MP_LAUNCH_APP_GALLERY ) {
- if (pAppData->nCurPosition >= 0 ) {
- MpUtilMediaSvcSaveLastPlayedTime(pAppData->szMediaUri, pAppData->nCurPosition);
- } else {
- VideoLogInfo("Invalid Plaing time or duration time.");
- }
+ if(pAppData->nCurPosition >= 0)
+ {
+ MpUtilMediaSvcSetVideoLastPlayedTimeByUri(pAppData->szMediaUri, pAppData->nCurPosition);
}
pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause(pAppData);
- MpVideoDisplayViewPop(pDisplayViewNaviControlBar, pUserData);
+ MpVideoDisplayViewPop(pNaviFrameHandle, pUserData);
edje_object_signal_callback_add(pDisplayViewCtrlEdj, SIGNAL_CONTROL_BACK_BUTTON_DOWN, SIGNAL_CONTROL_PART_BACK_BUTTON, (void *)MpVideoDisplayViewBackButtonDownCb, (void *)pAppData);
}
-
static void MpVideoDisplayViewVolumeButtonDownCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
{
VideoLogInfo("");
+}
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
- }
-/*
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (pVolLongPressTimer) {
- ecore_timer_del(pVolLongPressTimer);
- pVolLongPressTimer = NULL;
- }
+static void MpVideoDisplayViewVolumeButtonUpCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+ VideoLogInfo("");
- bIsVolumeLongPress = FALSE;
- pVolLongPressTimer = ecore_timer_add(LONG_PRESS_INTERVAL,
- MpVideoDisplayViewVolLongPressCb,
- (void *)pAppData);
-*/
+ syspopup_launch("volume", NULL);
}
-static void MpVideoDisplayViewVolumeButtonUpCb(void *pUserData,
- Evas_Object *pObject,
- const char *szEmission,
- const char *szSource)
+static Eina_Bool MpVideoDisplayViewCtrlPanelHideCb(void *pUserData)
{
VideoLogInfo("");
if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
+ VideoLogInfo("[ERR] No Exist pUserData.");
+ return EINA_FALSE;
}
- syspopup_launch("volume", NULL);
-
-/*
VideoAppData *pAppData = (VideoAppData *)pUserData;
- if (pVolLongPressTimer) {
- ecore_timer_del(pVolLongPressTimer);
- pVolLongPressTimer = NULL;
+ if (pCtrlPanelHideTimer) {
+ ecore_timer_del(pCtrlPanelHideTimer);
+ pCtrlPanelHideTimer = NULL;
}
- if (bIsVolumeLongPress) {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+
+ return EINA_FALSE;
+}
+
+
+static void MpVideoDisplayViewSpeedChange(void *pUserData)
+{
+ if (!pUserData) {
+ VideoLogInfo("[ERR] No Exist pUserData.");
return;
}
- if (pAppData->bIsMute == TRUE) {
- if (bIsVolumePopupShow) {
- ecore_timer_del(pMutePopupShowTimer);
- }
-
- pMutePopupShowTimer =
- ecore_timer_add(MUTE_POPUP_INTERVAL_TIME,
- MpVideoDisplayViewVolPopupCb,
- (void *)pAppData);
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
- edje_object_signal_emit(_EDJ(pDisplayViewLayout),
- SIGNAL_MAIN_MUTE_SHOW, "*");
+ int booster_step = 0;
- bIsVolumePopupShow = TRUE;
+ if (nSpeedMode == 1) {
+ booster_step = nControlMouseMovePos - nControlMouseDownPos;
+ booster_step = booster_step / BOOSTER_STEP_DISTANCE;
+ } else if (nSpeedMode == -1) {
+ booster_step = nControlMouseDownPos - nControlMouseMovePos;
+ booster_step = booster_step / BOOSTER_STEP_DISTANCE;
} else {
- syspopup_launch("volume", NULL);
- }
-*/
-}
-
-static void MpVideoDisplayViewMainScreenTouchCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
-{
- if (nDisplayViewState == MP_DISPLAY_VIEW_STATE_UNACTIVATE) {
- VideoLogInfo("MP_DISPLAY_VIEW_STATE_UNACTIVATE");
+ VideoLogInfo("[ERR] Invalid SpeedMode.");
return;
}
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
+ if(booster_step == 0)
+ {
+ pAppData->nPlayingSpeed = MP_PLAYING_SPEED_2X;
+ }
+ else if(booster_step == 1)
+ {
+ pAppData->nPlayingSpeed = MP_PLAYING_SPEED_3X;
+ }
+ else if(booster_step == 2)
+ {
+ pAppData->nPlayingSpeed = MP_PLAYING_SPEED_4X;
+ }
+ else if(booster_step > 3)
+ {
+ pAppData->nPlayingSpeed = MP_PLAYING_SPEED_4X;
}
- VideoLogInfo("");
+ VideoLogInfo("STEP:(%d, %d)", booster_step, pAppData->nPlayingSpeed);
- VideoAppData *pAppData = (VideoAppData *)pUserData;
+ char caption[CAPTION_TEXT_MAX_LEN] = { 0, };
- if (bSwitchDisplayViewUI) {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition(pAppData);
+
+ if(nSpeedMode == 1)
+ {
+ snprintf(caption, CAPTION_TEXT_MAX_LEN, "X%d fast forward", pAppData->nPlayingSpeed);
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedFF(pAppData);
+ MpVideoDisplayViewUpdateFFStep(pAppData->nPlayingSpeed);
}
+ else
+ {
+ snprintf(caption, CAPTION_TEXT_MAX_LEN, "X%d fast reverse", pAppData->nPlayingSpeed);
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedRew(pAppData);
+ MpVideoDisplayViewUpdateREWStep(pAppData->nPlayingSpeed);
+ }
+
+ edje_object_part_text_set(_EDJ(pDisplayViewLayout), MAIN_SPEED_TEXT, caption);
+
+ return;
}
-static Eina_Bool MpVideoDisplayViewCtrlPanelHideCb(void *pUserData)
+static void MpVideoDisplayViewControlMouseMoveCb(void *pUserData, Evas * e, Evas_Object *obj, void *event)
{
- VideoLogInfo("");
+ if (!event) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
if (!pUserData) {
VideoLogInfo("[ERR] No Exist pUserData.");
- return EINA_FALSE;
+ return;
}
- VideoAppData *pAppData = (VideoAppData *)pUserData;
+ Evas_Event_Mouse_Move *pBtnEvent = (Evas_Event_Mouse_Move *) event;
- if (pCtrlPanelHideTimer) {
- ecore_timer_del(pCtrlPanelHideTimer);
- pCtrlPanelHideTimer = NULL;
+ if (bIsSpeedLongPress) {
+ nControlMouseMovePos = pBtnEvent->cur.output.x;
+ MpVideoDisplayViewSpeedChange(pUserData);
}
-
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
-
- return EINA_FALSE;
}
-static Eina_Bool MpVideoDisplayViewMouseUpCb(void *pUserData, int nType, void *pEvent)
+static void MpVideoDisplayViewControlMouseDownCb(void *pUserData, Evas * e, Evas_Object *obj, void *event)
{
- if (nDisplayViewState == MP_DISPLAY_VIEW_STATE_UNACTIVATE) {
- VideoLogInfo("MP_DISPLAY_VIEW_STATE_UNACTIVATE");
- return ECORE_CALLBACK_PASS_ON;
- }
-
VideoLogInfo("");
- if (!pUserData) {
- VideoLogInfo("[ERR] No Exist pUserData.");
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (!pEvent) {
- VideoLogInfo("[ERR] No exist pEvent.");
- return ECORE_CALLBACK_PASS_ON;
+ if (!event) {
+ VideoLogInfo("[ERR]");
+ return;
}
- VideoAppData *pAppData = (VideoAppData *)pUserData;
+ Evas_Event_Mouse_Down *pBtnEvent = (Evas_Event_Mouse_Down *) event;
- if (!bSwitchDisplayViewUI) {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
- } else {
- if (pCtrlPanelHideTimer) {
- ecore_timer_del(pCtrlPanelHideTimer);
- pCtrlPanelHideTimer = ecore_timer_add(CTRL_PANEL_SHOW_TIME, MpVideoDisplayViewCtrlPanelHideCb, pUserData);
- }
- }
- return ECORE_CALLBACK_PASS_ON;
+ nControlMouseDownPos = pBtnEvent->output.x;
}
static void MpVideoDisplayViewChangedEarjackCb(void *pNode, void *pUserData)
if (MpUtilIsConnectEarjack()) {
VideoLogInfo("Connect earjack.");
if (pDisplaySoundpathButton) {
- elm_object_item_part_content_set(pNaviFrameItemForDisplayerView, "title_left_btn", pDisplaySoundpathButton);
+ elm_object_item_part_content_set(pNaviFrameItemForDisplayerView, "title_right_btn", pDisplaySoundpathButton);
} else {
- pDisplaySoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, pUserData, "video/naviframe/title/default", (void*)MpVideoDisplayViewSoundPathCb);
- elm_object_item_part_content_set(pNaviFrameItemForDisplayerView, "title_left_btn", pDisplaySoundpathButton);
+ pDisplaySoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, 1, 1, pUserData, "video/naviframe/title/default", (void*)MpVideoDisplayViewSoundPathCb);
+ elm_object_item_part_content_set(pNaviFrameItemForDisplayerView, "title_right_btn", pDisplaySoundpathButton);
}
} else {
VideoLogInfo("Disconnect earjack.");
pDisplaySoundpathButton = NULL;
}
- elm_object_item_part_content_unset(pNaviFrameItemForDisplayerView, "title_left_btn");
+ elm_object_item_part_content_unset(pNaviFrameItemForDisplayerView, "title_right_btn");
}
}
-static Eina_Bool MpVideoDisplayViewSubtitleDurationCb(void* pUserData)
-{
- VideoLogInfo("");
-
- edje_object_part_text_set(pDisplayViewSubtitleEdj, SUBTITLE_TEXT, "");
-
- if(pSubtitleTimer)
- {
- ecore_timer_del(pSubtitleTimer);
- pSubtitleTimer = NULL;
- }
-
- return EINA_FALSE;
-}
-
-/*
- * Internal function
- */
-
-void MpVideoDisplayViewInitKeyMouse(void *pUserData)
-{
- VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (pMouseEventHandler) {
- ecore_event_handler_del(pMouseEventHandler);
- pMouseEventHandler = NULL;
- }
-
- pMouseEventHandler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, MpVideoDisplayViewMouseUpCb, pAppData);
-}
-
-void MpVideoDisplayViewInitLayout(void *pUserData, int nLaunchingApp, void* pShowInfoViewCb)
+void MpVideoDisplayViewInitLayout(void *pUserData, int nPlayerType)
{
VideoLogInfo("");
pDisplayViewLayout = elm_layout_add(pNaviFrameHandle);
if (pDisplayViewLayout) {
- Evas_Object *pTmpProgressbarEdj = NULL;
Evas *pMainWindowEvas = evas_object_evas_get(pAppData->pMainWindow);
elm_layout_file_set(pDisplayViewLayout, VIDEO_PLAYER_MAIN_EDJ, MAIN_EDJ_GROUP);
- pDisplayViewOptionEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_OPTION_BUTTON_EDJ, OPTION_EDJ_GROUP);
- elm_object_part_content_set(pDisplayViewLayout, SWALLOW_MAIN_OPTION_BUTTON, pDisplayViewOptionEdj);
-
pDisplayViewCtrlEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_CONTROL_EDJ, CONTROL_EDJ_GROUP);
+
+ evas_object_event_callback_add(pDisplayViewCtrlEdj, EVAS_CALLBACK_MOUSE_DOWN, (void *)MpVideoDisplayViewControlMouseDownCb, pAppData);
+ evas_object_event_callback_add(pDisplayViewCtrlEdj, EVAS_CALLBACK_MOUSE_MOVE, (void *)MpVideoDisplayViewControlMouseMoveCb, pAppData);
+
pDisplayViewPanelEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_PANEL_EDJ, PANEL_EDJ_GROUP);
edje_object_part_swallow(pDisplayViewPanelEdj, SWALLOW_PANEL_CONTROL, pDisplayViewCtrlEdj);
- pTmpProgressbarEdj = (Evas_Object *)MpVideoProgressbarInit(pAppData);
- if (pTmpProgressbarEdj) {
- edje_object_part_swallow(pDisplayViewPanelEdj, SWALLOW_PANEL_PROGRESS_BAR, pTmpProgressbarEdj);
+ pDisplayViewProgressbarEdj = (Evas_Object *)MpVideoProgressbarInit(pAppData);
+ if (pDisplayViewProgressbarEdj) {
+ edje_object_part_swallow(pDisplayViewPanelEdj, SWALLOW_PANEL_PROGRESS_BAR, pDisplayViewProgressbarEdj);
} else {
VideoLogInfo("Progressbar edj handle is null.");
}
edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_MODE_NORMAL, "*");
- if(strlen(pAppData->szPreMediaUri) > 0) {
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_REW_MODE_EXTEND, "*");
- VideoLogInfo("Prev File : %s", pAppData->szPreMediaUri);
- }
- else {
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_REW_MODE_NORMAL, "*");
- }
-
- if(strlen(pAppData->szNextMediaUri) > 0) {
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_FF_MODE_EXTEND, "*");
- VideoLogInfo("Next File : %s", pAppData->szNextMediaUri);
- }
- else {
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_FF_MODE_NORMAL, "*");
- }
-
-
- if (nScreensizeStatus == MP_DISPLAY_METHOD_LETTER_BOX) {
- VideoLogInfo("nScreensizeStatus : MP_DISPLAY_METHOD_LETTER_BOX");
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_SCREENSIZE_BUTTON_NORMAL, "*");
- } else if (nScreensizeStatus == MP_DISPLAY_METHOD_CROPPED_FULL) {
- VideoLogInfo("nScreensizeStatus : MP_DISPLAY_METHOD_CROPPED_FULL");
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_SCREENSIZE_BUTTON_EXPAND, "*");
- } else {
- VideoLogInfo("nScreensizeStatus : MP_DISPLAY_METHOD_LETTER_BOX");
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_SCREENSIZE_BUTTON_NORMAL, "*");
- }
-
- edje_object_signal_callback_add(pDisplayViewOptionEdj,
- SIGNAL_OPTION_SCREEN_SIZE_NORMAL,
- SIGNAL_OPTION_PART_SCREEN_SIZE,
- (void *)MpVideoDisplayViewPressOptionScreenSizeCb, (void *)pAppData);
-
- edje_object_signal_callback_add(pDisplayViewOptionEdj,
- SIGNAL_OPTION_SCREEN_SIZE_EXPAND,
- SIGNAL_OPTION_PART_SCREEN_SIZE,
- (void *)MpVideoDisplayViewPressOptionScreenSizeCb, (void *)pAppData);
-
- edje_object_signal_callback_add(pDisplayViewOptionEdj,
- SIGNAL_OPTION_DETAIL_DOWN,
- SIGNAL_OPTION_PART_DETAIL,
- (void *)pShowInfoViewCb, (void *)pAppData);
edje_object_signal_callback_add(pDisplayViewCtrlEdj,
SIGNAL_CONTROL_PLAY_PAUSE_PRESS,
SIGNAL_CONTROL_PART_VOL_BUTTON,
(void *)MpVideoDisplayViewVolumeButtonUpCb, (void *)pAppData);
- edje_object_signal_callback_add(_EDJ(pDisplayViewLayout),
- SIGNAL_MAIN_SCREEN_TOUCH_PRESS,
- SIGNAL_MAIN_SCREEN_TOUCH_TOGGLE,
- (void *)MpVideoDisplayViewMainScreenTouchCb, (void *)pAppData);
-
MpUtilRegisteEarjackCbFunc((void *)MpVideoDisplayViewChangedEarjackCb, pUserData);
}
}
-void MpVideoDisplayViewInitSubTitle(void* pUserData)
-{
- if (!pUserData) {
- VideoLogInfo("[ERR] No exist pUserData");
- return;
- }
-
- VideoLogInfo("");
-
- if (!MpVideoSubtitleCtrlIsExistSubtitle()) {
- VideoLogInfo("No exist subtitle.");
- return;
- }
-
- VideoAppData* pAppData = (VideoAppData*)pUserData;
-
- Evas* pMainWindowEvas = evas_object_evas_get(pAppData->pMainWindow);
-
- pDisplayViewSubtitleEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_SUBTITLE_EDJ, SUBTITLE_EDJ_GROUP);
-
- edje_object_part_text_set(pDisplayViewSubtitleEdj, SUBTITLE_TEXT, "");
-}
-
-void MpVideoDisplayViewInit(void *pUserData, int nLaunchingApp, void* pShowInfoViewCb)
+void MpVideoDisplayViewInit(void *pUserData, int nPlayerType)
{
VideoLogInfo("");
return;
}
- MpVideoDisplayViewInitKeyMouse(pUserData);
- MpVideoDisplayViewInitLayout(pUserData, nLaunchingApp, pShowInfoViewCb);
- MpVideoDisplayViewInitSubTitle(pUserData);
+ MpVideoDisplayViewInitLayout(pUserData, nPlayerType);
}
/*
* External function
*/
-void MpVideoDisplayViewPush(void *pNaviFrame, void *pShowInfoViewCb, int nLaunchingApp, void *pUserData)
+void MpVideoDisplayViewPush(void *pNaviFrame, int nPlayerType, void *pUserData, ChangeDisplayViewCbFunc pChangeViewCb)
{
- if (!pNaviFrame || !pShowInfoViewCb || !pUserData) {
+ if (!pNaviFrame || !pUserData) {
VideoLogInfo("[ERR]");
return;
}
VideoLogInfo("");
pNaviFrameHandle = pNaviFrame;
+ pChangeViewUserCbFunc = pChangeViewCb;
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- MpVideoDisplayViewInit(pUserData, nLaunchingApp, pShowInfoViewCb);
+ MpVideoDisplayViewInit(pUserData, nPlayerType);
+ pNaviFrameItemForDisplayerView = elm_naviframe_item_push(pNaviFrameHandle, NULL, NULL, NULL, pDisplayViewLayout, "video/1line");
- pNaviFrameItemForDisplayerView = elm_naviframe_item_push(pNaviFrameHandle, pAppData->szVideoTitle, NULL, NULL, pDisplayViewLayout, "video/1line");
-
- if (MpVideoSoundpathIsConnectOtherSoundpath()) {
- pDisplaySoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, pUserData, "video/naviframe/title/default", (void*)MpVideoDisplayViewSoundPathCb);
- elm_object_item_part_content_set(pNaviFrameItemForDisplayerView, "title_left_btn", pDisplaySoundpathButton);
+ if(MpVideoSoundpathIsConnectOtherSoundpath())
+ {
+ pDisplaySoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, 1, 1, pUserData, "video/naviframe/title/default", (void*)MpVideoDisplayViewSoundPathCb);
+ elm_object_item_part_content_set(pNaviFrameItemForDisplayerView, "title_right_btn", pDisplaySoundpathButton);
}
MpVideoDisplayViewShowControlPanel(pUserData);
void MpVideoDisplayViewPop(void *pNaviFrame, void *pUserData)
{
- VideoLogInfo("");
-
- if (!pUserData) {
+ if(!pUserData)
+ {
VideoLogInfo("[ERR]");
return;
}
+ VideoLogInfo("");
+
VideoAppData *pAppData = (VideoAppData *)pUserData;
- elm_win_lower(pAppData->pMainWindow);
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ elm_win_lower(pAppData->pMainWindow);
+ }
}
void MpVideoDisplayViewDestroy(void *pUserData)
MpVideoProgressbarDestroy();
pNaviFrameHandle = NULL;
-
- if (pMouseEventHandler) {
- ecore_event_handler_del(pMouseEventHandler);
- pMouseEventHandler = NULL;
- }
+ pDisplayViewProgressbarEdj = NULL;
if (pDisplayViewPanelEdj) {
evas_object_del(pDisplayViewPanelEdj);
pDisplayViewCtrlEdj = NULL;
}
- if (pDisplayViewOptionEdj) {
- evas_object_del(pDisplayViewOptionEdj);
- pDisplayViewOptionEdj = NULL;
+ if (pSpeedPressTimer) {
+ ecore_timer_del(pSpeedPressTimer);
+ pSpeedPressTimer = NULL;
}
-// if (pVolLongPressTimer) {
-// ecore_timer_del(pVolLongPressTimer);
-// pVolLongPressTimer = NULL;
-// }
-
-// if (pMutePopupShowTimer) {
-// ecore_timer_del(pMutePopupShowTimer);
-// pMutePopupShowTimer = NULL;
-// }
-
if (pCtrlPanelHideTimer) {
ecore_timer_del(pCtrlPanelHideTimer);
pCtrlPanelHideTimer = NULL;
}
- if (pDisplayViewNaviControlBar) {
- evas_object_del(pDisplayViewNaviControlBar);
- pDisplayViewNaviControlBar = NULL;
- }
-
if (pDisplayViewLayout) {
evas_object_del(pDisplayViewLayout);
pDisplayViewLayout = NULL;
}
- if (pSubtitleTimer) {
- ecore_timer_del(pSubtitleTimer);
- pSubtitleTimer = NULL;
- }
-
- if (pDisplayViewSubtitleEdj) {
- evas_object_del(pDisplayViewSubtitleEdj);
- pDisplayViewSubtitleEdj = NULL;
- }
-
if (pDisplaySoundpathButton) {
evas_object_del(pDisplaySoundpathButton);
pDisplaySoundpathButton = NULL;
}
- if (pSpeedPressTimer) {
- ecore_timer_del(pSpeedPressTimer);
- pSpeedPressTimer = NULL;
- }
-
-
-// bIsVolumeLongPress = FALSE;
-// bIsVolumePopupShow = FALSE;
-
- nCountCalledSpeedPlaying = 0;
- nSpeedMode = MP_PLAYING_SPEED_NOTHING;
+ bIsVideoViewScreenLock = FALSE;
bSwitchDisplayViewUI = TRUE;
nDisplayViewState = MP_DISPLAY_VIEW_STATE_UNACTIVATE;
nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
+ bIsDisplayViewOnlyAudio = FALSE;
+ bIsPauseByUser = FALSE;
}
void MpVideoDisplayViewInitAfterBeginOfStream(void *pUserData)
VideoAppData *pAppData = (VideoAppData *)pUserData;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetScreenSize(pAppData, nScreensizeStatus);
-
MpVideoProgressbarBeginOfStream((void *)pAppData);
if (pAppData->nDuration > 1) {
MpVideoProgressbarUpdateDurationTime(szDurationTime);
}
- edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_PLAY_RESUME, "*");
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+
+ if(MpVideoDisplayViewIsPauseByUser() == FALSE)
+ {
+ edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_PLAY_RESUME, "*");
+ }
}
void MpVideoDisplayViewUpdatePauseKey(void)
return;
}
+ if (nDisplayViewState == MP_DISPLAY_VIEW_STATE_UNACTIVATE) {
+ VideoLogInfo("MP_DISPLAY_VIEW_STATE_UNACTIVATE");
+ return;
+ }
+
VideoAppData *pAppData = (VideoAppData *)pUserData;
+ MpVideoProgressbarCreateTimer((void *)pAppData);
bSwitchDisplayViewUI = TRUE;
-
- evas_object_show(pDisplayViewPanelEdj);
+ evas_object_show(pDisplayViewLayout);
if (pCtrlPanelHideTimer) {
ecore_timer_del(pCtrlPanelHideTimer);
pCtrlPanelHideTimer = NULL;
}
- if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE) {
+ VideoLogInfo("");
+
+ if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE || bIsDisplayViewOnlyAudio == TRUE) {
+ VideoLogInfo("");
} else {
+ VideoLogInfo("");
pCtrlPanelHideTimer = ecore_timer_add(CTRL_PANEL_SHOW_TIME, MpVideoDisplayViewCtrlPanelHideCb, pUserData);
}
MpVideoDisplayViewActivate();
+ MpVideoDisplayViewUnlockScreen(pUserData);
}
void MpVideoDisplayViewHideControlPanel(void *pUserData)
return;
}
+ if (nDisplayViewState == MP_DISPLAY_VIEW_STATE_UNACTIVATE) {
+ VideoLogInfo("MP_DISPLAY_VIEW_STATE_UNACTIVATE");
+ return;
+ }
+
if (!pDisplayViewPanelEdj) {
VideoLogInfo("No exist play control panel edc.");
return;
}
+ if(bIsDisplayViewOnlyAudio)
+ {
+ VideoLogInfo("Not hide control panel and UI because of audio only.");
+ return;
+ }
+
bSwitchDisplayViewUI = FALSE;
- evas_object_hide(pDisplayViewPanelEdj);
+ evas_object_hide(pDisplayViewLayout);
+ MpVideoProgressbarDeleteTimer();
+ MpExternalUgHide();
if (pCtrlPanelHideTimer) {
ecore_timer_del(pCtrlPanelHideTimer);
pCtrlPanelHideTimer = NULL;
nDisplayViewState = MP_DISPLAY_VIEW_STATE_UNACTIVATE;
}
+
void MpVideoDisplayViewHideSoundpath(void)
{
VideoLogInfo("");
}
}
-void MpVideoDisplayViewUpdateSubtitle(double nDuration, char* szSubtitleString)
-{
- VideoLogInfo("");
-
- if (!szSubtitleString) {
- VideoLogInfo("No Exist szSubtitleString pointer.");
- return;
- }
-
- if (nDuration <= 0) {
- VideoLogInfo("No Exist Duration time.");
- return;
- }
-
- VideoLogInfo("Subtitle Data: %s", szSubtitleString);
- VideoLogInfo("Subtitle Duration : %f", nDuration);
-
- edje_object_part_text_set(pDisplayViewSubtitleEdj, SUBTITLE_TEXT, szSubtitleString);
-
- if (pSubtitleTimer) {
- ecore_timer_del(pSubtitleTimer);
- pSubtitleTimer = NULL;
- }
-
- pSubtitleTimer = ecore_timer_add(nDuration, MpVideoDisplayViewSubtitleDurationCb, NULL);
-}
-
bool MpVideoDisplayViewIsTopView(void)
{
VideoLogInfo("");
Elm_Object_Item *pTmpItem = NULL;
if (!pNaviFrameHandle) {
- VideoLogInfo("[ERR] No exist naviframe handle.");
+ VideoLogInfo("[ERR] No exist navigationbar handle.");
return FALSE;
}
return FALSE;
}
} else {
- VideoLogInfo("[ERR] No exist naviframe top item.");
+ VideoLogInfo("[ERR] No exist navigationbar top item.");
return FALSE;
}
return FALSE;
}
-void MpVideoDisplayViewShowNocontentImage(void)
+void MpVideoDisplayViewShowNocontentImage(void *pUserData)
{
VideoLogInfo("");
if (pDisplayViewLayout) {
edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_NOCONTENTS_SHOW, "*");
}
+
+ bIsDisplayViewOnlyAudio = TRUE;
+
+ MpVideoDisplayViewShowControlPanel(pUserData);
}
void MpVideoDisplayViewHideNocontentImage(void)
if (pDisplayViewLayout) {
edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_NOCONTENTS_HIDE, "*");
}
+
+ bIsDisplayViewOnlyAudio = FALSE;
+}
+
+void MpVideoDisplayViewPortrate(void)
+{
+ VideoLogInfo("");
+
+ elm_object_item_signal_emit(pNaviFrameItemForDisplayerView, SIGNAL_NAVIFRAME_PORTRATE_MODE, "*");
+ edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_PORTRATE_MODE, "*");
+ edje_object_signal_emit(pDisplayViewPanelEdj, SIGNAL_PANEL_PORTRATE_MODE, "*");
+ edje_object_signal_emit(pDisplayViewProgressbarEdj, SIGNAL_PROGRESS_PORTRATE_MODE, "*");
+ edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_PORTRATE_MODE, "*");
+}
+
+void MpVideoDisplayViewLandscape(void)
+{
+ VideoLogInfo("");
+
+ elm_object_item_signal_emit(pNaviFrameItemForDisplayerView, SIGNAL_NAVIFRAME_LANDSCAPE_MODE, "*");
+ edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_LANDSCAPE_MODE, "*");
+ edje_object_signal_emit(pDisplayViewPanelEdj, SIGNAL_PANEL_LANDSCAPE_MODE, "*");
+ edje_object_signal_emit(pDisplayViewProgressbarEdj, SIGNAL_PROGRESS_LANDSCAPE_MODE, "*");
+ edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_LANDSCAPE_MODE, "*");
}
void MpVideoDisplayViewResetProgressBar(void *pUserData)
if (pDisplayViewLayout) {
MpVideoProgressbarReset(pUserData);
}
-}
\ No newline at end of file
+}
+
+void MpVideoDisplayViewLockScreen(void *pUserData)
+{
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+
+ bIsVideoViewScreenLock = TRUE;
+}
+
+void MpVideoDisplayViewUnlockScreen(void *pUserData)
+{
+ VideoLogInfo("");
+
+ bIsVideoViewScreenLock = FALSE;
+}
+
+bool MpVideoDisplayViewGetScreenLockState(void)
+{
+ VideoLogInfo("");
+
+ return bIsVideoViewScreenLock;
+}
+
+int MpVideoDisplayViewGetScreenSize(void)
+{
+ VideoLogInfo("");
+
+ return nScreensizeStatus;
+}
+
+bool MpVideoDisplayViewIsPauseByUser(void)
+{
+ VideoLogInfo("%d", bIsPauseByUser);
+
+ return bIsPauseByUser;
+}
+
+void MpVideoDisplayViewUpdateProgressBar(void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ MpVideoProgressbarCreateTimer(pUserData);
+}
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-
-
-
+
#include <aul.h>
#include <vconf.h>
-#include <mmf/mm.h>
-#include <mm_file.h>
-#include <mmf/mm_file.h>
#include <libexif/exif-data.h>
-
-#include <appcore-efl.h>
-#include <appcore-common.h>
+#include <metadata_extractor.h>
#include <unicode/udat.h>
#include <unicode/ustring.h>
#include <unicode/utmscale.h>
#include "mp-util.h"
+#include "mp-drm-ctrl.h"
#include "mp-video-log.h"
#include "video-player.h"
#include "mp-video-info-ctrl.h"
VideoLogInfo("");
- MMHandleType st_Tag = (MMHandleType) NULL;
+ if (MpVideoDrmIsDrmFile(szUriPath)) {
+ VideoLogInfo("It's drm file.");
+ return FALSE;
+ }
+
+ metadata_extractor_h pMetadata;
- int nRet = -1;
char *szTmp = NULL;
- double nGpsValue = 0.0;
*nLatitude = 0.0;
*nLongtitude = 0.0;
- nRet = mm_file_create_tag_attrs(&st_Tag, szUriPath);
- if (!st_Tag) {
- VideoLogInfo("[ERR] : %s", szUriPath);
+ if(metadata_extractor_create(&pMetadata) != METADATA_EXTRACTOR_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] - metadata_extractor_create()");
return FALSE;
}
- nRet = mm_file_get_attrs(st_Tag, &szTmp, MM_FILE_TAG_LATIDUE, &nGpsValue, NULL);
- if (nRet == 0) {
- VideoLogInfo("Latitude : %f", nGpsValue);
- if (nGpsValue != 0.0) {
- *nLatitude = nGpsValue;
+ if(metadata_extractor_set_path(pMetadata, szUriPath) != METADATA_EXTRACTOR_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] - metadata_extractor_set_path()");
+ return FALSE;
+ }
+
+ if(metadata_extractor_get_metadata(pMetadata, METADATA_LATITUDE, &szTmp) != METADATA_EXTRACTOR_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] - metadata_extractor_get_metadata() - METADATA_LATITUDE");
+ metadata_extractor_destroy(pMetadata);
+ return FALSE;
+ }
+ else
+ {
+ if(szTmp)
+ {
+ VideoLogInfo("METADATA_LATITUDE : %s", szTmp);
+ *nLatitude = atof(szTmp);
}
- } else if (szTmp) {
- VideoLogInfo("[ERR] - %s", szTmp);
+ else
+ {
+ *nLatitude = 0.0;
+ }
+
free(szTmp);
szTmp = NULL;
- mm_file_destroy_tag_attrs(st_Tag);
+ }
+ if(metadata_extractor_get_metadata(pMetadata, METADATA_LONGITUDE, &szTmp) != METADATA_EXTRACTOR_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] - metadata_extractor_get_metadata() - METADATA_LONGITUDE");
+ metadata_extractor_destroy(pMetadata);
return FALSE;
}
-
- nGpsValue = 0.0;
-
- nRet = mm_file_get_attrs(st_Tag, &szTmp, MM_FILE_TAG_LONGITUDE, &nGpsValue, NULL);
- if (nRet == 0) {
- VideoLogInfo("Longitude: %f", nGpsValue);
- if (nGpsValue != 0.0) {
- *nLongtitude = nGpsValue;
+ else
+ {
+ if(szTmp)
+ {
+ VideoLogInfo("METADATA_LONGITUDE : %s", szTmp);
+ *nLongtitude = atof(szTmp);
+ }
+ else
+ {
+ *nLongtitude = 0.0;
+ VideoLogInfo("METADATA_LONGITUDE : %s", szTmp);
}
- } else if (szTmp) {
- VideoLogInfo("[ERR] - %s", szTmp);
+
free(szTmp);
szTmp = NULL;
- mm_file_destroy_tag_attrs(st_Tag);
-
- return FALSE;
}
- mm_file_destroy_tag_attrs(st_Tag);
+ metadata_extractor_destroy(pMetadata);
- return TRUE;
+ return TRUE;
}
bool MpVideoInfoCtrlGetResolution(char *szWidthResolution, char *szHeightResolution, void *pUserData)
char* szSkeleton = NULL;
+//jdlee
+/*
enum appcore_time_format nTimeformat;
int nRet = appcore_get_timeformat(&nTimeformat);
- if (nRet == -1) {
+ if(nRet == -1)
+ {
VideoLogInfo("Cannot get timeformat.");
nTimeformat = APPCORE_TIME_FORMAT_12;
}
- if (nTimeformat == APPCORE_TIME_FORMAT_12) {
+ if(nTimeformat == APPCORE_TIME_FORMAT_12)
+ {
szSkeleton = UG_DATE_FORMAT_12;
- } else if(nTimeformat == APPCORE_TIME_FORMAT_24) {
+ }
+ else if(nTimeformat == APPCORE_TIME_FORMAT_24)
+ {
szSkeleton = UG_DATE_FORMAT_24;
- } else {
+ }
+ else
+ {
VideoLogInfo("Invalid time format : %d", nTimeformat);
szSkeleton = UG_DATE_FORMAT_12; // Default value.
}
+*/
+ szSkeleton = UG_DATE_FORMAT_12;
char *szLocale = vconf_get_str(VCONFKEY_REGIONFORMAT); // eg en_US.UTF-8
- if (szLocale == NULL) {
+ if(szLocale == NULL)
+ {
VideoLogInfo("Cannot get region format.");
szLocale = "en_US.UTF-8"; // Default value.
}
char *szTimezone = NULL;
szTimezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID); // eg Asia/Seoul
- if (szTimezone == NULL) {
+ if(szTimezone == NULL)
+ {
VideoLogInfo("Cannot get time zone.");
return strdup("N/A");
}
char* szDatestr = NULL;
szDatestr = MpVideoInfoCtrlConvertingString(szLocale, szSkeleton, szTimezone, (UDate)mtime * 1000);
- if(!szDatestr) {
+ if(!szDatestr)
+ {
VideoLogInfo("Cannot get time string.");
return strdup("N/A");
}
return szDatestr;
}
+static char* MpVideoInfoCtrlGetDrmFileExtension(char* szPath)
+{
+#define EXT_SIZE 128
+#define EXT_SPLITTER '.'
+
+ if (!szPath) {
+ VideoLogInfo("[ERR] No exist szPath.");
+ return NULL;
+ }
+
+ char szDrmContentType[STR_LEN_MAX] = {0};
+
+ MpVideoDrmGetFileExtension(szPath, szDrmContentType, STR_LEN_MAX);
+ VideoLogInfo("szDrmContentType : %s", szDrmContentType);
+
+ char szTmpExt[EXT_SIZE] = {0,};
+ char *szExt = NULL;
+ int nErr = -1;
+
+ nErr = aul_get_mime_extension(szDrmContentType, szTmpExt, sizeof(szTmpExt));
+
+ if (0 == nErr) {
+ szExt = strrchr(szTmpExt, EXT_SPLITTER);
+ if((szExt == NULL) || (szExt + 1 == NULL)) {
+ return NULL;
+ }
+ } else {
+ return NULL;
+ }
+
+ return strdup(szExt + 1);
+
+}
+
char* MpVideoInfoCtrlGetFileExtension(char *szPath)
{
if (!szPath) {
return strdup("Unknown");
}
- char *szExt = NULL;
- szExt = strrchr(szPath, '.');
+ if (MpVideoDrmIsDrmFile(szPath)) {
+ VideoLogInfo("It's drm file.");
+
+ char *szFileExtension = MpVideoInfoCtrlGetDrmFileExtension(szPath);
+ if (szFileExtension) {
+ VideoLogInfo("Drm file extension. - %s", szFileExtension);
+ return szFileExtension;
+ } else {
+ VideoLogInfo("No have file extension.");
+ return strdup("Unknown");
+ }
+ } else {
+ char *szExt = NULL;
+ szExt = strrchr(szPath, '.');
- if ((szExt != NULL) && ((szExt+1) != NULL)) {
- return strdup(szExt + 1);
+ if ((szExt != NULL) && ((szExt+1) != NULL)) {
+ return strdup(szExt + 1);
+ }
}
return strdup("Unknown");
nCount++;
}
- float remain = ((float)lsize/BASIC_SIZE) - size;
-
if (nCount == SIZE_BYTE) {
snprintf(pTmp, FILE_SIZE_LEN_MAX,"%zu B", size);
} else if (nCount == SIZE_KB) {
snprintf(pTmp, FILE_SIZE_LEN_MAX,"%zu KB", size);
} else if (nCount == SIZE_MB) {
- snprintf(pTmp, FILE_SIZE_LEN_MAX,"%.1f MB", size+remain);
+ snprintf(pTmp, FILE_SIZE_LEN_MAX,"%zu MB", size);
} else if(nCount == SIZE_GB) {
- snprintf(pTmp, FILE_SIZE_LEN_MAX,"%.1f GB", size+remain);
+ snprintf(pTmp, FILE_SIZE_LEN_MAX,"%zu GB", size);
}
VideoLogInfo("Size = %lu, OrigSize=%zu", lsize, size);
struct stat statbuf;
if (stat(szUriPath, &statbuf) == -1) {
+ VideoLogInfo("%s file is NULL", szUriPath);
return FALSE;
}
char *szTmpDateOfFile = MpVideoInfoCtrlGetDateOfFile(statbuf.st_mtime);
char *szTmpFileExtension = MpVideoInfoCtrlGetFileExtension(szUriPath);
- char *szTmpFileSize = MpVideoInfoCtrlGetFileSize(statbuf.st_size);
+ char *szTmpFileSize = MpVideoInfoCtrlGetFileSize(statbuf.st_size);
if (szTmpDateOfFile) {
VideoLogInfo("szTmpDateOfFile : %s", szTmpDateOfFile);
--- /dev/null
+/*
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+ *
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
+ */
+
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-info-view.h"
+#include "mp-video-string-define.h"
+
+
+static Evas_Object *pInfoViewLayout = NULL;
+static Evas_Object *pNaviFrameHandle = NULL;
+static Evas_Object *pBackBtn = NULL;
+
+static int nInfoResolutionWidth = 0;
+static int nInfoResolutionHeight = 0;
+
+static char szInfoTitle[STR_LEN_MAX] = {0,};
+static int nInfoDuration = 0;
+
+
+
+/*
+ * Callback function.
+ */
+static void MpVideoInfoViewNaviFrameBackCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ /* Will be used if wanted it. */
+ //VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ evas_object_smart_callback_del(pBackBtn, "clicked", MpVideoInfoViewNaviFrameBackCb);
+
+ MpUtilDeletePopupHandle();
+
+ MpVideoInfoViewPop(pNaviFrameHandle, pUserData);
+
+ evas_object_smart_callback_add(pBackBtn, "clicked", MpVideoInfoViewNaviFrameBackCb, pUserData);
+}
+
+/*
+ * Internal function
+ */
+static char *MpVideoInfoViewItemLabelGet(const void *data, Evas_Object *obj,
+ const char *part)
+{
+ VideoLogInfo("");
+
+ int index = (int) data;
+ char subTxt[STR_LEN_MAX] = { 0, };
+
+ if (index > 2)
+ return NULL;
+
+ switch (index) {
+ case 0: /* title */
+ if (!strcmp(part, "elm.text.1")) {
+ return strdup("Title");
+ } else if (!strcmp(part, "elm.text.2")) {
+ snprintf(subTxt, STR_LEN_MAX, "%s", szInfoTitle);
+ VideoLogInfo("%s", subTxt);
+ return strdup(subTxt);
+ } else {
+ return NULL;
+ }
+ break;
+ case 1: /* duration */
+ if (!strcmp(part, "elm.text.1")) {
+ return strdup("Duration");
+ } else if (!strcmp(part, "elm.text.2")) {
+ snprintf(subTxt, STR_LEN_MAX, "%" PLAY_TIME_FORMAT,
+ PLAY_TIME_ARGS(nInfoDuration / 1000));
+ VideoLogInfo("%s", subTxt);
+ return strdup(subTxt);
+ } else {
+ return NULL;
+ }
+ break;
+ case 2: /* resolution */
+ if (!strcmp(part, "elm.text.1")) {
+ return strdup("Resolution");
+ } else if (!strcmp(part, "elm.text.2")) {
+ snprintf(subTxt, STR_LEN_MAX, "%d X %d",
+ nInfoResolutionWidth,
+ nInfoResolutionHeight);
+ VideoLogInfo("%s", subTxt);
+ return strdup(subTxt);
+ }
+ break;
+ }
+
+ return NULL;
+}
+
+static void MpVideoInfoViewInitValue(void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData ) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ nInfoResolutionWidth = pAppData->nVideoWidthResolution;
+ nInfoResolutionHeight = pAppData->nVideoHeightResolution;
+
+ nInfoDuration = pAppData->nDuration;
+ if(pAppData->szVideoTitle) {
+ if(strcmp(pAppData->szVideoTitle, MP_STREAMING_PLAYER_STR) == 0) {
+ snprintf(szInfoTitle,STR_LEN_MAX,"Unknown");
+ } else {
+ snprintf(szInfoTitle,STR_LEN_MAX,"%s", pAppData->szVideoTitle);
+ }
+ } else {
+ snprintf(szInfoTitle,STR_LEN_MAX,"Unknown");
+ }
+}
+
+void MpVideoInfoViewInit(void *pParent, void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData || !pParent) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ pInfoViewLayout = elm_layout_add(pParent);
+
+ if (pInfoViewLayout) {
+ int i = 0;
+ Evas_Object *genlist = NULL;
+ Elm_Genlist_Item_Class *info_itc = NULL;
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetVideoResolution(pAppData);
+
+ MpVideoInfoViewInitValue((void *)pAppData);
+ elm_layout_file_set(pInfoViewLayout, VIDEO_PLAYER_DETAIL_EDJ, DETAIL_EDJ_GROUP);
+
+ info_itc = elm_genlist_item_class_new();
+
+ info_itc->item_style = "2text.7";
+ info_itc->func.text_get = (void *)MpVideoInfoViewItemLabelGet;
+ info_itc->func.content_get = NULL;
+ info_itc->func.state_get = NULL;
+ info_itc->func.del = NULL;
+
+ genlist = elm_genlist_add(pParent);
+ elm_genlist_multi_select_set(genlist, EINA_FALSE);
+ elm_genlist_select_mode_set(genlist, EINA_TRUE);
+
+ for (i = 0; i < 3; i++) {
+ elm_genlist_item_append(genlist, info_itc, (void *)i, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ }
+
+ elm_genlist_item_class_free(info_itc);
+
+ evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ evas_object_show(genlist);
+ elm_object_part_content_set(pInfoViewLayout, SWALLOW_DETAIL_LIST, genlist);
+ evas_object_show(pInfoViewLayout);
+ }
+}
+
+/*
+ * External function
+ */
+void MpVideoInfoViewPush(void *pNaviFrame, void *pUserData)
+{
+ VideoLogInfo("");
+
+ Evas_Object *pTmpButton = NULL;
+ Elm_Object_Item *pNaviFrameItemInfoView = NULL;
+
+ pNaviFrameHandle = pNaviFrame;
+
+ MpVideoInfoViewInit(pNaviFrameHandle, pUserData);
+
+ pNaviFrameItemInfoView = elm_naviframe_item_push(pNaviFrameHandle, dgettext("sys_string", "IDS_COM_BODY_DETAILS"), NULL, NULL, pInfoViewLayout, "video/1line");
+
+ pBackBtn = elm_button_add(pNaviFrameHandle);
+ elm_object_text_set(pBackBtn, "btn_label");
+ evas_object_smart_callback_add(pBackBtn, "clicked", MpVideoInfoViewNaviFrameBackCb, pUserData);
+ elm_object_item_part_content_set(pNaviFrameItemInfoView, "prev_btn", pBackBtn);
+
+ pTmpButton = elm_object_item_part_content_get(pNaviFrameItemInfoView, "prev_btn");
+ if (pTmpButton) {
+ elm_object_style_set(pTmpButton, "video/navigationbar_prev_btn/default");
+ }
+
+ elm_object_item_signal_emit(pNaviFrameItemInfoView, "elm,state,optionheader,instant_close", "");
+}
+
+void MpVideoInfoViewPop(void *pNaviFrame, void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ elm_naviframe_item_pop(pNaviFrame);
+
+ MpVideoInfoViewDestroy();
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+}
+
+void MpVideoInfoViewDestroy(void)
+{
+ VideoLogInfo("");
+
+ if (pInfoViewLayout) {
+ evas_object_del(pInfoViewLayout);
+ pInfoViewLayout = NULL;
+ }
+
+ if (pBackBtn) {
+ evas_object_del(pBackBtn);
+ pBackBtn = NULL;
+ }
+
+ pNaviFrameHandle = NULL;
+}
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-#include <mm.h>
-#include <mm_error.h>
-#include <mm_sound.h>
-
+#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/stat.h>
#define MAX_PATH_LEN 2048
-static int nAntiShock = 0;
-static MMHandleType playerHandle = 0;
+
+static player_h pPlayerHandle;
+
+
bool MpPlayerMgrIsActive(void)
{
- return playerHandle ? true : false;
+ return pPlayerHandle ? true : false;
}
-void MpPlayerMgrSetMessageCallback(MMMessageCallback Callback, void *pUserData)
+bool MpPlayerMgrRegistePlayerCallback(void *PlayerCompletedCbFunc, void *PlayerInterruptedCbFunc, void *PlayerErrorCbFunc, void *PlayerBufferingCbFunc, void *pUserData)
{
VideoLogInfo("");
- if (!pUserData) {
+ if(!pUserData)
+ {
VideoLogInfo("[ERR]");
- return;
+ return false;
}
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
- return;
+ return false;
}
- if (mm_player_set_message_callback(playerHandle, Callback, pUserData) !=
- MM_ERROR_NONE) {
+ if(player_set_completed_cb(pPlayerHandle, PlayerCompletedCbFunc, pUserData) != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR]");
- return;
+ return false;
}
-}
-
-bool MpPlayerMgrSetAudioCallback(mm_player_audio_stream_callback CallBack,
- void *pUserData)
-{
- VideoLogInfo("");
- if (!pUserData) {
+ if(player_set_interrupted_cb(pPlayerHandle, PlayerInterruptedCbFunc, pUserData) != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR]");
return false;
}
- if (!MpPlayerMgrIsActive()) {
+ if(player_set_error_cb(pPlayerHandle, PlayerErrorCbFunc, pUserData) != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR]");
return false;
}
- if (mm_player_set_audio_stream_callback
- (playerHandle, CallBack, pUserData) != MM_ERROR_NONE) {
+ if(player_set_buffering_cb(pPlayerHandle, PlayerBufferingCbFunc, pUserData) != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR]");
return false;
}
return true;
}
+
bool MpPlayerMgrCreate(const char *szPath)
{
VideoLogInfo("");
- if (!szPath) {
+ if(!szPath)
+ {
VideoLogInfo("[ERR] Not correct Meida URI.");
return false;
}
int nPathLength = strlen(szPath);
- int nErr = MM_ERROR_NONE;
- char *pErrName = NULL;
+ int nErr = PLAYER_ERROR_NONE;
VideoLogInfo(" Media path (%s)", szPath);
- if (nPathLength > 0 && nPathLength < MAX_PATH_LEN) {
- nErr = mm_player_create(&playerHandle);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo
- ("[ERR] Fail to create player handle. (MMF Error code : %x)",
- nErr);
+ if(nPathLength > 0 && nPathLength < MAX_PATH_LEN)
+ {
+ nErr = player_create(&pPlayerHandle);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Fail to create player handle. (MMF Error code : %x)", nErr);
return false;
}
- nErr =
- mm_player_set_attribute(playerHandle, &pErrName,
- "profile_uri", szPath,
- strlen(szPath), NULL);
-
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] (%x):: Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
+ nErr = player_set_uri(pPlayerHandle, szPath);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] (%x) Fail to set attribute ", nErr);
return false;
}
- } else {
+ }
+ else
+ {
VideoLogInfo("[ERR] File path is too long.");
return false;
}
- if (nAntiShock) {
- nErr = mm_player_set_attribute(playerHandle, &pErrName,
- "sound_fadeup", 1, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] (%x):: Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
- return false;
- }
- nAntiShock = 0;
- } else {
- nErr = mm_player_set_attribute(playerHandle, &pErrName,
- "sound_fadeup", 0, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] (%x):: Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
- return false;
- }
- nAntiShock = 1;
- }
-
- nErr = mm_player_set_attribute(playerHandle, &pErrName,
- "sound_volume_type",
- MM_SOUND_VOLUME_TYPE_MEDIA, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] (%x):: Fail to set attribute ", nErr,
- pErrName);
- free(pErrName);
+ nErr = player_set_sound_type(pPlayerHandle, SOUND_TYPE_MEDIA);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] (%x):: Fail to set attribute ", nErr);
return false;
}
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nErr = mm_player_destroy(playerHandle);
- if (nErr != MM_ERROR_NONE) {
+ int nErr = player_destroy(pPlayerHandle);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR] Error code : 0x%x", nErr);
return false;
}
- playerHandle = 0;
+ pPlayerHandle = NULL;
return true;
}
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nErr = mm_player_realize(playerHandle);
- if (nErr != MM_ERROR_NONE) {
+ int nErr = player_prepare(pPlayerHandle);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR] Error code : 0x%x", nErr);
return false;
}
return true;
}
-bool MpPlayerMgrUnrealize(void)
+bool MpPlayerMgrRealizeAsync(void *pPrepareCb, void *pUserData)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nErr = mm_player_unrealize(playerHandle);
- if (nErr != MM_ERROR_NONE) {
+ int nErr = player_prepare_async(pPlayerHandle, pPrepareCb, pUserData);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR] Error code : 0x%x", nErr);
return false;
}
return true;
}
-bool MpPlayerMgrPlay(void)
+bool MpPlayerMgrUnrealize(void)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nErr = mm_player_start(playerHandle);
- if (nErr != MM_ERROR_NONE) {
+ int nErr = player_unprepare (pPlayerHandle);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR] Error code : 0x%x", nErr);
return false;
}
return true;
}
-bool MpPlayerMgrStop(void)
+bool MpPlayerMgrPlay(void)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nErr = mm_player_stop(playerHandle);
- if (nErr != MM_ERROR_NONE) {
+ int nErr = player_start(pPlayerHandle);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR] Error code : 0x%x", nErr);
return false;
}
return true;
}
-bool MpPlayerMgrResume(void)
+bool MpPlayerMgrStop(void)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- char *pErrName = NULL;
- int nErr = MM_ERROR_NONE;
+ int nErr = player_stop (pPlayerHandle);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Error code : 0x%x", nErr);
+ return false;
+ }
- if (nAntiShock) {
- nErr = mm_player_set_attribute(playerHandle, &pErrName,
- "sound_fadeup", 1, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo
- ("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
- return false;
- }
+ return true;
+}
- nAntiShock = 0;
- } else {
- nErr = mm_player_set_attribute(playerHandle, &pErrName,
- "sound_fadeup", 0, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo
- ("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
- return false;
- }
+bool MpPlayerMgrResume(void)
+{
+ VideoLogInfo("");
- nAntiShock = 0;
+ if(!MpPlayerMgrIsActive())
+ {
+ VideoLogInfo("[ERR]");
+ return false;
}
- nErr = mm_player_resume(playerHandle);
- if (nErr != MM_ERROR_NONE) {
+ int nErr = player_start(pPlayerHandle);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR] Error code : 0x%x", nErr);
return false;
}
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nErr = mm_player_pause(playerHandle);
- if (nErr != MM_ERROR_NONE) {
+ int nErr = player_pause(pPlayerHandle);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR] Error code : 0x%x", nErr);
return false;
}
int MpPlayerMgrGetPosition(void)
{
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
return 0;
}
int nPos = 0;
int nErr = 0;
- nErr = mm_player_get_position(playerHandle, MM_PLAYER_POS_FORMAT_TIME,
- &nPos);
- if (nErr != MM_ERROR_NONE) {
+ nErr = player_get_position(pPlayerHandle, &nPos);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR] Error code : 0x%x ", nErr);
return 0;
}
return nPos;
}
-void MpPlayerMgrSetPosition(unsigned int nPos)
+void MpPlayerMgrSetPosition(unsigned int nPos, void *pSeekCb, void *pUserData)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return;
}
VideoLogInfo("Set position - %d", nPos);
- int nErr = 0;
-
- nErr = mm_player_set_position(playerHandle, MM_PLAYER_POS_FORMAT_TIME,
- (int)nPos);
- if (nErr != MM_ERROR_NONE) {
+ int nErr = player_set_position(pPlayerHandle, (int)nPos, pSeekCb, pUserData);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
VideoLogInfo("[ERR] Error code : 0x%x ", nErr);
}
}
-bool MpPlayerMgrGetVisible(void)
-{
- VideoLogInfo("");
-
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
- return false;
- }
-
- int nErr = MM_ERROR_NONE;
- int nVisible = 0;
- char *pErrName = NULL;
-
- nErr =
- mm_player_get_attribute(playerHandle, &pErrName, "display_visible",
- &nVisible, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to get attribute.",
- nErr, pErrName);
- free(pErrName);
- return false;
- }
-
- return (bool) nVisible;
-}
-
-void MpPlayerMgrSetVisible(bool bEnabled)
-{
- VideoLogInfo("");
-
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- if (MpPlayerMgrGetVisible() == bEnabled) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- int nErr = MM_ERROR_NONE;
- char *pErrName = NULL;
-
- nErr =
- mm_player_set_attribute(playerHandle, &pErrName, "display_visible",
- (int)bEnabled, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
- }
-}
-
void MpPlayerMgrSetMute(bool bMuteEnable)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return;
}
- if (mm_player_set_mute(playerHandle, (int)bMuteEnable) != MM_ERROR_NONE) {
- VideoLogInfo("[ERR]");
+ if(player_set_mute(pPlayerHandle, bMuteEnable) != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Fail to set mute.");
}
}
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
- return FALSE;
- }
-
- bool bIsMute = FALSE;
-
- if (mm_player_get_mute(playerHandle, (int *)&bIsMute) != MM_ERROR_NONE) {
- VideoLogInfo("[ERR]");
- return FALSE;
- }
-
- return bIsMute;
-}
-
-bool MpPlayerMgrSetBtHeadset(bool bEnable, char *szAddress)
-{
- VideoLogInfo("");
-
- VideoLogInfo("bt headset enable(%d)", bEnable);
- VideoLogInfo("============================================");
- VideoLogInfo("bluetooth headset enable(%d), addr(%s)", bEnable,
- szAddress);
- VideoLogInfo("============================================");
-
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
- return false;
- }
-
- MMBluetoothType BluetoothParam;
- memset(&BluetoothParam, 0, sizeof(MMBluetoothType));
-
- if (bEnable) {
- BluetoothParam.mode = 1;
-
- if (szAddress) {
- strncpy(BluetoothParam.addr, szAddress,
- BT_ADDR_LEN - 1);
- } else {
- VideoLogInfo("[ERR]");
- return false;
- }
-
- VideoLogInfo("address : %s", szAddress);
- }
-
- return true;
-}
-
-int MpPlayerMgrGetStreamingType(void)
-{
- VideoLogInfo("");
-
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nErr = MM_ERROR_NONE;
- char *pErrName = NULL;
- int streaming_type = STREAMING_SERVICE_NONE;
+ bool bIsMute = false;
- nErr =
- mm_player_get_attribute(playerHandle, &pErrName, "streaming_type",
- &streaming_type, NULL);
-
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to get attribute ",
- nErr, pErrName);
- free(pErrName);
+ if(player_is_muted(pPlayerHandle, &bIsMute) != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Fail to get mute state.");
return false;
}
- return (int)streaming_type;
-}
-
-void MpPlayerMgrSetProgressiveDownload(int nFileSize)
-{
- VideoLogInfo("");
-
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- int nErr = MM_ERROR_NONE;
- char *pErrName = NULL;
-
- nErr = mm_player_set_attribute(playerHandle, &pErrName, "pd_enable", 1,
- "pd_full_content_size", nFileSize, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
- }
-}
-
-void MpPlayerMgrSetDownloadComplete(void)
-{
- VideoLogInfo("");
-
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- int nErr = MM_ERROR_NONE;
- char *pErrName = NULL;
-
- nErr =
- mm_player_set_attribute(playerHandle, &pErrName, "pd_down_complete",
- 1, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
- }
-}
-
-void MpPlayerMgrSetProgressTimerInterval(int nInterval)
-{
- VideoLogInfo("");
-
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- char *pErrName = NULL;
- int nErr = MM_ERROR_NONE;
-
- nErr = mm_player_set_attribute(playerHandle, &pErrName,
- "profile_progress_interval", nInterval,
- NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
- }
+ return bIsMute;
}
-int MpPlayerMgrGetPdduration(void)
+int MpPlayerMgrGetDuration(void)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
- return false;
+ return 0;
}
int nDuration = -1;
- char *pErrName = NULL;
- int nErr = MM_ERROR_NONE;
- nErr =
- mm_player_get_attribute(playerHandle, &pErrName, "content_duration",
- &nDuration, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to get attribute ",
- nErr, pErrName);
- free(pErrName);
- return false;
+ int nErr = player_get_duration(pPlayerHandle, &nDuration);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Error code : %x - Fail to get attribute ", nErr);
+ return 0;
}
return nDuration;
}
-int MpPlayerMgrGetDuration(char *szFilePath)
+bool MpPlayerMgrSetOverlayXid(void *pOverlayXid)
{
- VideoLogInfo("%s", szFilePath);
-
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nDuration = -1;
- char *pErrName = NULL;
- int nErr = MM_ERROR_NONE;
-
- nErr =
- mm_player_get_attribute(playerHandle, &pErrName, "content_duration",
- &nDuration, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to get attribute ",
- nErr, pErrName);
- free(pErrName);
- return false;
- }
-
- return nDuration;
-}
-
-bool MpPlayerMgrSetRatioVideoScreenSize(MpPlayerMgrDisplayMethod ScreenSize)
-{
- VideoLogInfo("Screen size : %d", ScreenSize);
-
- if (!MpPlayerMgrIsActive()) {
+ if(!pOverlayXid)
+ {
VideoLogInfo("[ERR]");
return false;
}
- char *pErrName = NULL;
- int nErr = MM_ERROR_NONE;
-
- nErr =
- mm_player_set_attribute(playerHandle, &pErrName, "display_method",
- ScreenSize, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
+ /* prevent 2011/07/12 */
+ VideoLogInfo("XID : %p", pOverlayXid);
+ int nErr = player_set_display(pPlayerHandle, PLAYER_DISPLAY_TYPE_X11, (void*)pOverlayXid);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Error code : %x - Fail to set attribute ", nErr);
return false;
}
return true;
}
-bool MpPlayerMgrSetOverlayXid(void *pOverlayXid)
+bool MpPlayerMgrSetSoundPriority(void)
{
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
- return false;
- }
+ VideoLogInfo("");
- if (!pOverlayXid) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nErr = MM_ERROR_NONE;
- char *pErrName = NULL;
-
- VideoLogInfo("XID : %d", *((int *)pOverlayXid));
-
- nErr =
- mm_player_set_attribute(playerHandle, &pErrName, "display_overlay",
- pOverlayXid, sizeof(int),
- "display_rotation",
- MM_DISPLAY_ROTATION_NONE, NULL);
-
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
+ int nErr = player_set_sound_type(pPlayerHandle, SOUND_TYPE_MEDIA);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Error code : %x - Fail to set attribute ", nErr);
return false;
}
return true;
}
-bool MpPlayerMgrSetSoundPriority(void)
+int MpPlayerMgrSetPlaySpeed(float nSpeedValue)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
- return false;
+ return -1;
}
-
- char *pErrName = NULL;
- int nErr = MM_ERROR_NONE;
-
- nErr = mm_player_set_attribute(playerHandle, &pErrName,
- "sound_volume_type",
- MM_SOUND_VOLUME_TYPE_MEDIA, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo
- ("[ERR] Error code : 0x%x - Fail to set attribute ", nErr,
- pErrName);
- free(pErrName);
- return false;
+ int nErr = player_set_playback_rate(pPlayerHandle, nSpeedValue);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Error code : %x - Fail to get attribute ", nErr);
+ return -1;
}
- return true;
+ return 0;
}
int MpPlayerMgrGetVideoWidthResolution(void)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
- return false;
+ return 0;
}
- char *pErrName = NULL;
int nWidth = 0;
- int nErr = MM_ERROR_NONE;
-
- nErr = mm_player_get_attribute(playerHandle, &pErrName,
- "content_video_width", &nWidth, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to get attribute ",
- nErr, pErrName);
- free(pErrName);
- return false;
+ int nHeight = 0;
+ int nErr = player_get_video_size(pPlayerHandle, &nWidth, &nHeight);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Error code : %x - Fail to get attribute ", nErr);
+ return 0;
}
return nWidth;
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
- return false;
+ return 0;
}
- char *pErrName = NULL;
+ int nWidth = 0;
int nHeight = 0;
- int nErr = MM_ERROR_NONE;
-
- nErr = mm_player_get_attribute(playerHandle, &pErrName,
- "content_video_height", &nHeight, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to get attribute ",
- nErr, pErrName);
- free(pErrName);
- return false;
+ int nErr = player_get_video_size(pPlayerHandle, &nWidth, &nHeight);
+ if(nErr != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Error code : %x - Fail to get attribute ", nErr);
+ return 0;
}
return nHeight;
}
-bool MpPlayerMgrSetSubtitleSilent(bool bSilent)
+bool MpPlayerMgrSetDisplayMode(MpPlayerMgrDisplayMethod nMethodMode)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nErr = mm_player_set_subtitle_silent(playerHandle, (int)bSilent);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - ", nErr);
- return false;
- }
-
return true;
}
-bool MpPlayerMgrSetSubtitle(const char *szSubtitlePath)
+bool MpPlayerMgrSetRotate(MpVideoRotation nRotation)
{
- VideoLogInfo("%s", szSubtitlePath);
+ VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- if (!szSubtitlePath) {
- VideoLogInfo("[ERR] subtitle path is null.");
- return false;
- }
+ int nRotVal = PLAYER_DISPLAY_ROTATION_NONE;
- char *pErrName = NULL;
-
- int nErr = 0;
- nErr = mm_player_set_attribute(playerHandle, &pErrName, "subtitle_uri",
- (const char *)szSubtitlePath,
- strlen(szSubtitlePath), NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
+ if(nRotation == VIDEO_SCREEN_PORTRAIT) {
+ nRotVal = PLAYER_DISPLAY_ROTATION_NONE;
+ }
+ else if(nRotation == VIDEO_SCREEN_PORTRAIT_UPSIDEDOWN) {
+ nRotVal = PLAYER_DISPLAY_ROTATION_180;
+ }
+ else if(nRotation == VIDEO_SCREEN_LANDSCAPE) {
+ nRotVal = PLAYER_DISPLAY_ROTATION_270;
+ }
+ else if(nRotation == VIDEO_SCREEN_LANDSCAPE_UPSIDEDOWN) {
+ nRotVal = PLAYER_DISPLAY_ROTATION_90;
+ }
+ int nRet = player_set_x11_display_rotation (pPlayerHandle , nRotVal);
+ if(nRet != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] Error code : %x - Fail to set attribute ", nRet);
return false;
- } else {
- VideoLogInfo("Success to set subtitle.");
}
return true;
}
-int MpPlayerMgrSetBluetoothHeadset(char *szBlutoothAddress, int nMode)
+bool MpPlayerMgrSetUseragentForStreaming(const char *szUserAgent)
{
- VideoLogInfo("");
+ VideoLogInfo("!!!!!! NO EXIST FUNCTION FOR SETTING USER AGENT. !!!!!!");
- return 1;
+ return true;
}
-int MpPlayerMgrSetDisplayArea(int nX, int nY, int nWidth, int nHeight)
+bool MpPlayerMgrSetProxyAddressForStreaming(const char *szProxyAddress)
{
- VideoLogInfo("");
-
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
- return false;
- }
-
- char *pErrName = NULL;
-
- int nErr = 0;
- nErr = mm_player_set_attribute(playerHandle, &pErrName, "display_roi_x",
- nX, "display_roi_y", nY,
- "display_roi_width", nWidth,
- "display_roi_height", nHeight, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
- return false;
- }
-
+ VideoLogInfo("!!!!!! NO EXIST FUNCTION FOR SETTING PROXY ADDRESS. !!!!!!");
return true;
}
-int MpPlayerMgrSetVerticalOverlayPos(int nY)
+bool MpPlayerMgrSetCookieForStreaming(const char *szCookie)
{
- VideoLogInfo("");
-
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- char *pErrName = NULL;
-
- int nErr = 0;
- nErr = mm_player_set_attribute(playerHandle, &pErrName, "display_roi_y",
- nY, NULL);
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] Error code : 0x%x - Fail to set attribute ",
- nErr, pErrName);
- free(pErrName);
+ if(!szCookie)
+ {
+ VideoLogInfo("No exist cookie.");
return false;
}
- return true;
-}
-
-bool MpPlayerMgrSetUseragentForStreaming(const char *szUserAgent)
-{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
+ int nRet = player_set_streaming_cookie(pPlayerHandle , szCookie, strlen(szCookie));
+ if(nRet == PLAYER_ERROR_INVALID_PARAMETER)
+ {
+ VideoLogInfo("PLAYER_ERROR_INVALID_PARAMETER");
return false;
}
- if (!szUserAgent) {
- VideoLogInfo("[ERR]");
- return false;
- }
-
- int nErr = MM_ERROR_NONE;
- char *pErrName = NULL;
-
- if (strlen(szUserAgent) > 0) {
- VideoLogInfo("User agent (%s)", szUserAgent);
- nErr = mm_player_set_attribute(playerHandle, &pErrName,
- "streaming_user_agent",
- szUserAgent, strlen(szUserAgent),
- NULL);
-
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] (%x):: Fail to set attribute [%s]",
- nErr, pErrName);
- free(pErrName);
- return false;
- }
- } else {
- VideoLogInfo("No have useragnet value.");
- return true;
- }
-
return true;
}
-bool MpPlayerMgrSetProxAddressForStreaming(const char *szProxyAddress)
+int MpPlayerMgrGetBufferingPosition(void)
{
- VideoLogInfo("");
+ return 0;
+}
- if (!MpPlayerMgrIsActive()) {
+bool MpPlayerMgrRegisteBufferingCallBack(void *pCallbackFunc, void *pUserData)
+{
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- if (!szProxyAddress) {
- VideoLogInfo("[ERR]");
+ // !!! CHECK player_buffering_cb !!!
+ if(player_set_buffering_cb(pPlayerHandle, pCallbackFunc, pUserData) != PLAYER_ERROR_NONE)
+ {
+ VideoLogInfo("");
return false;
}
- int nErr = MM_ERROR_NONE;
- char *pErrName = NULL;
-
- if (strlen(szProxyAddress) > 0) {
- VideoLogInfo("Proxy Setting (%s)", szProxyAddress);
- nErr = mm_player_set_attribute(playerHandle, &pErrName,
- "streaming_proxy",
- szProxyAddress,
- strlen(szProxyAddress), NULL);
-
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] (%x):: Fail to set attribute [%s]",
- nErr, pErrName);
- free(pErrName);
- return false;
- }
- }
return true;
}
-bool MpPlayerMgrSetCookieForStreaming(const char *szCookie)
+int MpPlayerMgrGetFileStreamType(void)
{
VideoLogInfo("");
- if (!MpPlayerMgrIsActive()) {
- VideoLogInfo("[ERR]");
- return false;
- }
-
- if (!szCookie) {
- VideoLogInfo("[ERR]");
- return false;
- }
-
- int nErr = MM_ERROR_NONE;
- char *pErrName = NULL;
-
- if (strlen(szCookie) > 0) {
- VideoLogInfo("Cookie (%s)", szCookie);
- nErr = mm_player_set_attribute(playerHandle, &pErrName,
- "streaming_cookie", szCookie,
- strlen(szCookie), NULL);
-
- if (nErr != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] (%x):: Fail to set attribute [%s]",
- nErr, pErrName);
-
- if (pErrName)
- free(pErrName);
-
- return false;
- }
- } else {
- VideoLogInfo("No have useragnet value.");
- return true;
- }
-
- return true;
+// jdlee
+ return FILE_STREAM_TYPE_VIDEO;
}
-
-int MpPlayerMgrGetBufferingPosition(void)
+bool MpPlayerMgrSetScaling(bool bScale)
{
- if (!MpPlayerMgrIsActive()) {
+ if(!MpPlayerMgrIsActive())
+ {
VideoLogInfo("[ERR]");
return false;
}
- int nErr = MM_ERROR_NONE;
+ VideoLogInfo("");
- int startPos = 0, stopPos = 0;
- nErr = mm_player_get_buffer_position(playerHandle,
- MM_PLAYER_POS_FORMAT_PERCENT,
- &startPos, &stopPos);
- if (nErr != MM_ERROR_NONE) {
+ if(player_enable_evas_display_scaling(pPlayerHandle, bScale) != PLAYER_ERROR_NONE) {
VideoLogInfo("[ERR]");
- return -1;
+ return false;
}
-
- return stopPos;
+ return true;
}
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-
-
#include "mp-util.h"
#include "mp-video-log.h"
#include "video-player.h"
#include "mp-video-value-define.h"
+#include "mp-video-service-ctrl.h"
#include "mp-video-progressbar.h"
+#define PROGRESS_BAR_START_TERM 130
+#define PROGRESS_BAR_WIDTH_TERM 200
+
+#define PROGRESS_ADJUSTMENT_TIME_INTERVAL 2.0
+#define PROGRESS_ADJUSTMENT_RUN_INTERVAL 0.3
+
+#define PROGRESS_ADJUSTMENT_MOVE_LIMIT 10
+#define PROGRESS_ADJUSTMENT_MODE_LIMIT 10
+
+
static Evas_Object *pProgressbarEdj = NULL;
-Ecore_Timer *pProgressbarTimer = NULL;
+static Ecore_Timer *pProgressbarTimer = NULL;
+
+static Ecore_Timer *pProgressAdjustCheckTimer = NULL;
+static Ecore_Timer *pProgressAdjustRunTimer = NULL;
static bool bIsEventSkip = FALSE;
static bool bIsDrag = FALSE;
static int nDragPosition = 0;
-#define PROGRESS_BAR_TERM 40
+static bool bIsAdjustmentMode = FALSE;
+static int nDownPosX = 0;
+static int nOldPosX = 0;
+static bool bPrevAdjustment = FALSE;
+
+
+static void MpVideoProgressbarSetAdjustmentMode(bool bShow)
+{
+ VideoLogInfo("");
+
+ if(bShow) {
+ edje_object_signal_emit(pProgressbarEdj, SIGNAL_PROGRESS_ADJUSTMENT_SHOW, "*");
+ }
+ else {
+ edje_object_signal_emit(pProgressbarEdj, SIGNAL_PROGRESS_ADJUSTMENT_HIDE, "*");
+ }
+}
+
/*
* Internal function
*/
static Eina_Bool MpVideoProgressbarUpdateValue(void *pUserData)
{
- if (!pUserData) {
+ //VideoLogInfo("");
+
+ if (!pUserData) {
VideoLogInfo("[ERR] No exist userdata.");
return EINA_TRUE;
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
double nPlayedRatio = 0.0;
- char szPlayingTime[PLAY_TIME_LENGTH] = { 0 };
+ char szPlayingTime[PLAY_TIME_LENGTH] = { 0, };
nPlayedRatio = ((double)nDragPosition / (double)pAppData->nDuration);
edje_object_part_text_set(pProgressbarEdj, "progress.txt.played",
szPlayingTime);
+ if(bIsAdjustmentMode) {
+ edje_object_part_text_set(pProgressbarEdj, "progress.adjustment.txt",
+ szPlayingTime);
+ }
+
return EINA_TRUE;
}
static void MpVideoProgressbarUpdateBufferingValue(void *pUserData)
{
- if (!pUserData) {
+ //VideoLogInfo("");
+
+ if (!pUserData) {
VideoLogInfo("[ERR] No exist userdata.");
return;
}
buffering_ratio = ((double)pAppData->nBufferingPosition / (double)100);
+ //VideoLogInfo("%d:%lf", pAppData->nBufferingPosition, buffering_ratio);
+
edje_object_part_drag_value_set(pProgressbarEdj, "progress.buffering",
buffering_ratio, 0.0);
}
*/
static Eina_Bool MpVideoProgressbarTimerCb(void *pUserData)
{
+ /* VideoLogInfo(""); */
if (!pUserData) {
VideoLogInfo("[ERR] No exist userdata.");
return EINA_TRUE;
}
- if (bIsDrag || bIsEventSkip)
+ if (bIsEventSkip || bIsDrag)
return EINA_TRUE;
double nPlayedRatio = 0.0;
- char szPlayingTime[PLAY_TIME_LENGTH] = { 0 };
+ char szPlayingTime[PLAY_TIME_LENGTH] = { 0, };
pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition(pAppData);
edje_object_part_drag_value_set(pProgressbarEdj, "progress.playing", nPlayedRatio, 0.0);
edje_object_part_text_set(pProgressbarEdj, "progress.txt.played", szPlayingTime);
- if (pAppData->nCurPlayerType == MP_STREAMING_PLAYER )
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerTypeWithoutLog();
+ if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
MpVideoProgressbarUpdateBufferingValue(pUserData);
+ }
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool MpVideoProgressbarAdjustmentTimerCb(void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR] No exist userdata.");
+ return EINA_FALSE;
+ }
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ bIsAdjustmentMode = TRUE;
+
+ VideoLogInfo("%d, %d",pAppData->nCurPosition , nDragPosition);
+
+ pAppData->nSetPosition = nDragPosition;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+
+ MpVideoProgressbarSetAdjustmentMode(bIsAdjustmentMode);
+ MpVideoProgressbarUpdateValue(pUserData);
+ return EINA_FALSE;
+}
+
+static Eina_Bool MpVideoProgressbarAdjustmentRunTimerCb(void *pUserData)
+{
+// VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR] No exist userdata.");
+ return EINA_TRUE;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+
+ if(bPrevAdjustment) {
+ pAppData->nSetPosition = nDragPosition - 1000;
+ }
+ else {
+ pAppData->nSetPosition = nDragPosition + 1000;
+ }
+
+ if (pAppData->nSetPosition < 0) {
+ pAppData->nSetPosition = 0;
+ }
+
+ if (pAppData->nSetPosition > pAppData->nDuration) {
+ pAppData->nSetPosition = pAppData->nDuration;
+ }
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+
+ nDragPosition = pAppData->nSetPosition;
+
+ MpVideoProgressbarUpdateValue((void *)pAppData);
+
+
return EINA_TRUE;
}
+
+
static void MpVideoProgressbarDownCb(void *pUserData, Evas * e,
Evas_Object *obj, void *event_info)
{
if (bIsEventSkip)
return;
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType != MP_STREAMING_PLAYER)
+ {
+ if(pProgressAdjustCheckTimer) {
+ ecore_timer_del(pProgressAdjustCheckTimer);
+ pProgressAdjustCheckTimer = NULL;
+ }
+
+ if(pProgressAdjustRunTimer) {
+ ecore_timer_del(pProgressAdjustRunTimer);
+ pProgressAdjustRunTimer = NULL;
+ }
+
+ pProgressAdjustCheckTimer = ecore_timer_add(PROGRESS_ADJUSTMENT_TIME_INTERVAL,
+ MpVideoProgressbarAdjustmentTimerCb, (void *)pUserData);
+
+ }
+ bIsDrag = TRUE;
+ MpVideoProgressbarDeleteTimer();
+
VideoAppData *pAppData = (VideoAppData *)pUserData;
Evas_Event_Mouse_Up *ev = event_info;
Evas_Object *progressbar = obj;
int w = 0, current = 0;
double ratio = 0.0;
- bIsDrag = TRUE;
+ int term = 0;
+ int w_term = 0;
+ int width = 0;
+ int height = 0;
+ ecore_x_window_size_get(ecore_x_window_root_first_get(),&width, &height);
+ term = PROGRESS_BAR_START_TERM * width/DEFAULT_SCALE_WIDTH;
+ w_term = PROGRESS_BAR_WIDTH_TERM * width/DEFAULT_SCALE_WIDTH;
evas_object_geometry_get(progressbar, NULL, NULL, &w, NULL);
- current = ev->canvas.x - PROGRESS_BAR_TERM;
+ nDownPosX = ev->canvas.x;
+ nOldPosX = ev->canvas.x;;
+ current = ev->canvas.x - term;
+ w = w - w_term;
if (current < 0)
current = 0;
else if (current > w)
ratio = (double)current / w;
- if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY ||
- pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME) {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
- pAppData->nPrePlayerState = MP_PLAYER_STATE_RESUME;
- }
-
nDragPosition = ratio * pAppData->nDuration;
+ pAppData->nSetPosition = nDragPosition;
+
+ if(nTmpPlayerType != MP_STREAMING_PLAYER)
+ {
+ if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY ||
+ pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME) {
+ //pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+ pAppData->nPrePlayerState = MP_PLAYER_STATE_RESUME;
+ pAppData->nSeekPlayerState = MP_PLAYER_STATE_PAUSE;
+ }
+ pAppData->bSeekComplete = FALSE;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+ }
+ else {
+ if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY ||
+ pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME) {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+ pAppData->nPrePlayerState = MP_PLAYER_STATE_RESUME;
+ }
+ }
MpVideoProgressbarUpdateValue(pUserData);
if (bIsEventSkip)
return;
+ bIsDrag = FALSE;
+
VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ if(pProgressAdjustRunTimer) {
+ ecore_timer_del(pProgressAdjustRunTimer);
+ pProgressAdjustRunTimer = NULL;
+ }
+
+ if(pProgressAdjustCheckTimer) {
+ ecore_timer_del(pProgressAdjustCheckTimer);
+ pProgressAdjustCheckTimer = NULL;
+ }
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerTypeWithoutLog();
+ if(nTmpPlayerType != MP_STREAMING_PLAYER)
+ {
+ if(bIsAdjustmentMode) {
+ bIsAdjustmentMode = FALSE;
+ MpVideoProgressbarSetAdjustmentMode(bIsAdjustmentMode);
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+
+ if (pAppData->nPrePlayerState == MP_PLAYER_STATE_PLAY ||
+ pAppData->nPrePlayerState == MP_PLAYER_STATE_RESUME) {
+ //pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+ pAppData->nPrePlayerState = MP_PLAYER_STATE_PAUSE;
+ pAppData->nSeekPlayerState = MP_PLAYER_STATE_RESUME;
+ }
+ nOldPosX = 0;
+ return;
+ }
+ }
+
Evas_Event_Mouse_Up *ev = event_info;
Evas_Object *progressbar = obj;
int w = 0, current = 0;
double ratio = 0.0;
+ int term = 0;
+ int w_term = 0;
+ int width = 0;
+ int height = 0;
+
+ ecore_x_window_size_get(ecore_x_window_root_first_get(),&width, &height);
+ term = PROGRESS_BAR_START_TERM * width/DEFAULT_SCALE_WIDTH;
+ w_term = PROGRESS_BAR_WIDTH_TERM * width/DEFAULT_SCALE_WIDTH;
+
evas_object_geometry_get(progressbar, NULL, NULL, &w, NULL);
- current = ev->canvas.x - PROGRESS_BAR_TERM;
+ current = ev->canvas.x - term;
+ w = w - w_term;
+
if (current < 0)
current = 0;
else if (current > w)
if (pAppData->nSetPosition < 0)
pAppData->nSetPosition = 0;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
-
- if (pAppData->nPrePlayerState == MP_PLAYER_STATE_PLAY ||
- pAppData->nPrePlayerState == MP_PLAYER_STATE_RESUME) {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
- pAppData->nPrePlayerState = MP_PLAYER_STATE_PAUSE;
+ if(nTmpPlayerType != MP_STREAMING_PLAYER)
+ {
+ if(!pAppData->bSeekComplete)
+ {
+ pAppData->nSeekPosition = pAppData->nSetPosition;
+ }
+ else
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+ MpVideoProgressbarCreateTimer((void *)pAppData);
+ }
+
+ if (pAppData->nPrePlayerState == MP_PLAYER_STATE_PLAY ||
+ pAppData->nPrePlayerState == MP_PLAYER_STATE_RESUME) {
+ //pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+ pAppData->nPrePlayerState = MP_PLAYER_STATE_PAUSE;
+ pAppData->nSeekPlayerState = MP_PLAYER_STATE_RESUME;
+ }
}
+ else
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+ MpVideoProgressbarCreateTimer((void *)pAppData);
- bIsDrag = FALSE;
-}
+ if (pAppData->nPrePlayerState == MP_PLAYER_STATE_PLAY ||
+ pAppData->nPrePlayerState == MP_PLAYER_STATE_RESUME) {
+ pAppData->nSeekPlayerState = MP_PLAYER_STATE_RESUME;
+ pAppData->nPrePlayerState = MP_PLAYER_STATE_PAUSE;
+ }
+ }
+}
static void MpVideoProgressbarMoveCb(void *pUserData, Evas * e,
Evas_Object *obj, void *event_info)
{
- VideoLogInfo("");
+// VideoLogInfo("");
if (!pUserData) {
VideoLogInfo("[ERR]");
int w = 0, current = 0;
double ratio = 0.0;
- evas_object_geometry_get(progressbar, NULL, NULL, &w, NULL);
- current = ev->canvas.x - PROGRESS_BAR_TERM;
- if (current < 0)
- current = 0;
- else if (current > w)
- current = w;
+ int term = 0;
+ int w_term = 0;
+ int width = 0;
+ int height = 0;
- ratio = (double)current / w;
- nDragPosition = ratio * pAppData->nDuration;
+ ecore_x_window_size_get(ecore_x_window_root_first_get(),&width, &height);
+ term = PROGRESS_BAR_START_TERM * width/DEFAULT_SCALE_WIDTH;
+ w_term = PROGRESS_BAR_WIDTH_TERM * width/DEFAULT_SCALE_WIDTH;
- MpVideoProgressbarUpdateValue(pUserData);
+ evas_object_geometry_get(progressbar, NULL, NULL, &w, NULL);
+ if(bIsAdjustmentMode) {
+ if((nOldPosX + PROGRESS_ADJUSTMENT_MODE_LIMIT) < ev->canvas.x) {
+ if(bPrevAdjustment == TRUE) {
+ if(pProgressAdjustRunTimer) {
+ ecore_timer_del(pProgressAdjustRunTimer);
+ pProgressAdjustRunTimer = NULL;
+ }
+ }
+ bPrevAdjustment = FALSE;
+ nOldPosX = ev->canvas.x;
+ }
+ else if((nOldPosX - PROGRESS_ADJUSTMENT_MODE_LIMIT) > ev->canvas.x) {
+ if(bPrevAdjustment == FALSE) {
+ if(pProgressAdjustRunTimer) {
+ ecore_timer_del(pProgressAdjustRunTimer);
+ pProgressAdjustRunTimer = NULL;
+ }
+ }
+ bPrevAdjustment = TRUE;
+ nOldPosX = ev->canvas.x;
+ }
+
+ if(pProgressAdjustRunTimer == NULL) {
+ pProgressAdjustRunTimer = ecore_timer_add(PROGRESS_ADJUSTMENT_RUN_INTERVAL,
+ MpVideoProgressbarAdjustmentRunTimerCb, (void *)pAppData);
+
+ }
+ }
+ else {
+ if(((nDownPosX + PROGRESS_ADJUSTMENT_MOVE_LIMIT) < ev->canvas.x ) ||
+ ((nDownPosX - PROGRESS_ADJUSTMENT_MOVE_LIMIT) > ev->canvas.x)) {
+ VideoLogInfo("Adjustment Off");
+
+ if(pProgressAdjustCheckTimer) {
+ ecore_timer_del(pProgressAdjustCheckTimer);
+ pProgressAdjustCheckTimer = NULL;
+ }
+
+ if(pProgressAdjustRunTimer) {
+ ecore_timer_del(pProgressAdjustRunTimer);
+ pProgressAdjustRunTimer = NULL;
+ }
+ }
+ current = ev->canvas.x - term;
+ w = w - w_term;
+
+ if (current < 0)
+ current = 0;
+ else if (current > w)
+ current = w;
+
+ ratio = (double)current / w;
+ nDragPosition = ratio * pAppData->nDuration;
+ pAppData->nSetPosition = nDragPosition;
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerTypeWithoutLog();
+ if(nTmpPlayerType != MP_STREAMING_PLAYER)
+ {
+ if(pAppData->bSeekComplete) {
+ pAppData->bSeekComplete = FALSE;
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+ }
+ }
+ MpVideoProgressbarUpdateValue(pUserData);
+ }
}
/*
pProgressbarTimer = NULL;
}
+ if(pProgressAdjustCheckTimer) {
+ ecore_timer_del(pProgressAdjustCheckTimer);
+ pProgressAdjustCheckTimer = NULL;
+ }
+
+ if(pProgressAdjustRunTimer) {
+ ecore_timer_del(pProgressAdjustRunTimer);
+ pProgressAdjustRunTimer = NULL;
+ }
+
bIsEventSkip = FALSE;
- bIsDrag = FALSE;
nDragPosition = 0;
}
pProgressbarTimer = NULL;
}
+ if(pProgressAdjustCheckTimer) {
+ ecore_timer_del(pProgressAdjustCheckTimer);
+ pProgressAdjustCheckTimer = NULL;
+ }
+
+ if(pProgressAdjustRunTimer) {
+ ecore_timer_del(pProgressAdjustRunTimer);
+ pProgressAdjustRunTimer = NULL;
+ }
+
+ double nPlayedRatio = 0.0;
+ char szPlayingTime[PLAY_TIME_LENGTH] = { 0, };
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition(pAppData);
+
+ nPlayedRatio = ((double)pAppData->nCurPosition / (double)pAppData->nDuration);
+ snprintf(szPlayingTime, PLAY_TIME_LENGTH, "%" PLAY_TIME_FORMAT, PLAY_TIME_ARGS(pAppData->nCurPosition / 1000));
+
+ edje_object_part_drag_value_set(pProgressbarEdj, "progress.playing", nPlayedRatio, 0.0);
+ edje_object_part_text_set(pProgressbarEdj, "progress.txt.played", szPlayingTime);
+
pProgressbarTimer = ecore_timer_add(0.3, MpVideoProgressbarTimerCb, (void *)pAppData);
}
ecore_timer_del(pProgressbarTimer);
pProgressbarTimer = NULL;
}
+
+ if(pProgressAdjustCheckTimer) {
+ ecore_timer_del(pProgressAdjustCheckTimer);
+ pProgressAdjustCheckTimer = NULL;
+ }
+
+ if(pProgressAdjustRunTimer) {
+ ecore_timer_del(pProgressAdjustRunTimer);
+ pProgressAdjustRunTimer = NULL;
+ }
}
void MpVideoProgressbarUpdateDurationTime(char *szDurationTime)
--- /dev/null
+/*
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+ *
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
+ */
+
+
+#include <app.h>
+#include <aul.h>
+#include <glib.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "mp-video-service-ctrl.h"
+
+
+#define MP_VIDEO_LAUNCHED_BY_APP_KEY "launching_application"
+#define MP_VIDEO_SORT_TYPE_KEY "order_type"
+#define MP_VIDEO_LIST_TYPE_KEY "video_list_type"
+#define MP_VIDEO_TAG_NAME_KEY "tag_name"
+#define MP_VIDEO_EDIT_MODE_KEY "edit_mode"
+#define MP_VIDEO_START_POS_TIME_KEY "start_pos_time"
+#define MP_VIDEO_URI_PATH "path"
+#define MP_VIDEO_COOKIE "cookie"
+
+
+static service_h pAppSvcHandle = NULL;
+static int nPlayerType = MP_VIDEO_PLAYER_SIMPLE;
+static char szStreamingCookie[STR_LEN_MAX] = {0};
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Internal Function
+
+bool MpVideoServiceCtrlCheckMime(service_h pVideoServiceHandle, char *szMediaUri)
+{
+ VideoLogInfo("");
+
+ if(!pVideoServiceHandle)
+ {
+ VideoLogInfo("[ERR] No Exist Service handle.");
+ return FALSE;
+ }
+
+ if(!szMediaUri)
+ {
+ VideoLogInfo("[ERR] No Exist media uri.");
+ return FALSE;
+ }
+
+ bool bRet = TRUE;
+ char *szMimeContent = NULL;
+
+ if(service_get_extra_data(pVideoServiceHandle, AUL_K_MIME_CONTENT, &szMimeContent) != SERVICE_ERROR_NONE)
+ {
+ VideoLogInfo("No exist mime type.");
+ bRet = FALSE;
+ }
+
+ if(szMimeContent)
+ {
+ strncpy(szMediaUri, szMimeContent, STR_LEN_MAX - 1);
+ VideoLogInfo("Mime content : %s", szMediaUri);
+ free(szMimeContent);
+ bRet = TRUE;
+ }
+ else
+ {
+ VideoLogInfo("No exist MIME type.");
+ bRet = FALSE;
+ }
+
+ return bRet;
+}
+
+bool MpVideoServiceCtrlCheckBundle(service_h pVideoServiceHandle, char *szMediaUri)
+{
+ if(!pVideoServiceHandle)
+ {
+ VideoLogInfo("[ERR] No exist pBundleData pointer or Service handle count value.");
+ return FALSE;
+ }
+
+ bool bRet = TRUE;
+ char *pStrVideoURI = NULL;
+
+ if(service_get_extra_data(pVideoServiceHandle, MP_VIDEO_URI_PATH, &pStrVideoURI) != SERVICE_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] No exist KEY of video/streaming URI.");
+ bRet = FALSE;
+ }
+
+ if(pStrVideoURI)
+ {
+ strncpy(szMediaUri, pStrVideoURI, STR_LEN_MAX - 1);
+ VideoLogInfo("Video/Streaming URI path : %s", szMediaUri);
+ free(pStrVideoURI);
+ bRet = TRUE;
+ }
+ else
+ {
+ VideoLogInfo("[ERR] No exist video/streaming URI.");
+ bRet = FALSE;
+ }
+
+ return bRet;
+}
+
+bool MpVideoServiceCtrlCheckAUL(service_h pVideoServiceHandle, char *szMediaUri)
+{
+ if(!pVideoServiceHandle)
+ {
+ VideoLogInfo("[ERR] No exist pBundleData pointer or Service handle count value.");
+ return FALSE;
+ }
+
+ char *pStrVideoURI = (char*)malloc(sizeof(char) * STR_LEN_MAX);
+ char *pGetOperation = (char*)malloc(sizeof(char) * SVC_LEN_MAX);
+
+ service_get_operation(pVideoServiceHandle, &pGetOperation);
+ if(!strcmp(SERVICE_OPERATION_VIEW , pGetOperation))
+ {
+ service_get_uri(pVideoServiceHandle, &pStrVideoURI);
+ if(strlen(pStrVideoURI) > 1)
+ {
+ strncpy(szMediaUri, pStrVideoURI, STR_LEN_MAX - 1);
+ }
+ else
+ {
+ VideoLogInfo("[ERR] No exist video/streaming URI.");
+ return FALSE;
+ }
+ }
+ else
+ {
+ VideoLogInfo("[ERR] No exist Operation.");
+ return FALSE;
+ }
+
+ VideoLogInfo("Video/Streaming URI path pStrVideoURI : %s", pStrVideoURI);
+ VideoLogInfo("Video/Streaming URI path pAppData->szMediaUri : %s", szMediaUri);
+
+ free(pStrVideoURI);
+ free(pGetOperation);
+
+ return TRUE;
+}
+
+bool MpVideoServiceCtrlIsXMLUrl(char *szMediaUri)
+{
+ VideoLogInfo("URI : %s", szMediaUri);
+
+ if (!g_str_has_suffix(szMediaUri, ".xml")) {
+ VideoLogInfo("No have xml uri.");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+bool MpVideoServiceCtrlGetUri(service_h pVideoServiceHandle, char* szMediaUri)
+{
+ VideoLogInfo("");
+
+ if(!MpVideoServiceCtrlCheckMime(pVideoServiceHandle, szMediaUri))
+ {
+ if(!MpVideoServiceCtrlCheckBundle(pVideoServiceHandle, szMediaUri))
+ {
+ if(!MpVideoServiceCtrlCheckAUL(pVideoServiceHandle, szMediaUri))
+ {
+ VideoLogInfo("No exist URI path.");
+ return FALSE;
+ }
+ }
+ }
+
+ VideoLogInfo("szMediaUri", szMediaUri);
+
+ return TRUE;
+}
+
+int MpVideoServiceCtrlVideoUriType(char* szMediaUri)
+{
+ if(szMediaUri == NULL)
+ {
+ VideoLogInfo("[ERR]");
+ return MP_ERROR_PLAYER_TYPE;
+ }
+
+ VideoLogInfo("");
+
+ int nRet = 0;
+
+ if(strlen(szMediaUri) > 0)
+ {
+ if(MpUtilCheckPlayerType(szMediaUri))
+ {
+ VideoLogInfo("MP_STREAMING_PLAYER");
+ nRet = MP_STREAMING_PLAYER;
+ }
+ else
+ {
+ VideoLogInfo("MP_VIDEO_PLAYER");
+ nRet = MP_VIDEO_PLAYER;
+ }
+ }
+ else
+ {
+ VideoLogInfo("[ERR] No exist video/streaming URI. : MP_ERROR_PLAYER_TYPE");
+ return MP_ERROR_PLAYER_TYPE;
+ }
+
+ VideoLogInfo("pAppData->szMediaUri : %s", szMediaUri);
+
+ return nRet;
+}
+
+bool MpVideoServiceCtrlCheckCookieForStreaming(service_h pVideoServiceHandle, char* szCookie)
+{
+ if(!pVideoServiceHandle)
+ {
+ VideoLogInfo("[ERR] No exist pBundleData pointer or Service handle count value.");
+ return FALSE;
+ }
+
+ if(!szCookie)
+ {
+ VideoLogInfo("[ERR] No allocate szCookie.");
+ return FALSE;
+ }
+
+ bool bRet = TRUE;
+ char *pStrVideoCookie = NULL;
+
+ if(service_get_extra_data(pVideoServiceHandle, MP_VIDEO_COOKIE, &pStrVideoCookie) != SERVICE_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] No exist KEY of streaming COOKIE.");
+ bRet = FALSE;
+ }
+
+ if(pStrVideoCookie)
+ {
+ strncpy(szCookie, pStrVideoCookie, STR_LEN_MAX - 1);
+ VideoLogInfo("Video/Streaming URI path Cookie : %s", szCookie);
+ free(pStrVideoCookie);
+ bRet = TRUE;
+ }
+ else
+ {
+ VideoLogInfo("[ERR] No exist video/streaming URI.");
+ bRet = FALSE;
+ }
+
+ return TRUE;
+}
+
+bool MpVideoServiceCtrlGetTagNameOfGallery(service_h pVideoServiceHandle, char *szBundleKey, char *szTagName)
+{
+ VideoLogInfo("");
+
+ if(!pVideoServiceHandle)
+ {
+ VideoLogInfo("No exist Service handle.");
+ return FALSE;
+ }
+
+ if(!szBundleKey)
+ {
+ VideoLogInfo("No exist Service handle kay.");
+ return FALSE;
+ }
+
+ if(!szTagName)
+ {
+ VideoLogInfo("No exist pAppData.");
+ return FALSE;
+ }
+
+ bool nRet = TRUE;
+ char *szVideoTagName = NULL; //char *szVideoTagName = (char*)malloc(sizeof(char) * SVC_LEN_MAX);
+
+ if(service_get_extra_data(pVideoServiceHandle, szBundleKey, &szVideoTagName) != SERVICE_ERROR_NONE)
+ {
+ VideoLogInfo("No exist mime type.");
+ nRet = FALSE;
+ }
+
+ if(szVideoTagName)
+ {
+ strncpy(szTagName, szVideoTagName, STR_LEN_MAX - 1);
+ VideoLogInfo("szTagName : %s", szTagName);
+ free(szVideoTagName);
+ nRet = TRUE;
+ }
+ else
+ {
+ VideoLogInfo("No exist pointer of szVideoTagName.");
+ nRet = FALSE;
+ }
+
+ return nRet;
+}
+
+int MpVideoServiceCtrlCheckLauncher(service_h pVideoServiceHandle)
+{
+ VideoLogInfo("");
+
+ if(!pVideoServiceHandle)
+ {
+ VideoLogInfo("No exist Service handle data.");
+ return MP_VIDEO_PLAYER_SIMPLE;
+ }
+
+ char *szLaunchingByOtherApp = NULL; //char *szLaunchingByOtherApp = (char*)malloc(sizeof(char) * SVC_LEN_MAX);
+
+ if(service_get_extra_data(pVideoServiceHandle, MP_VIDEO_LAUNCHED_BY_APP_KEY, &szLaunchingByOtherApp) != SERVICE_ERROR_NONE)
+ {
+ VideoLogInfo("No exist Service handle key of MP_VIDEO_LAUNCHED_BY_APP_KEY");
+ return MP_VIDEO_PLAYER_SIMPLE;
+ }
+
+ if(!szLaunchingByOtherApp)
+ {
+ VideoLogInfo("No exist pointer of szLaunchingByOtherApp");
+ return MP_VIDEO_PLAYER_SIMPLE;
+ }
+
+ MpPlayerViewType nTmpLaunchingAppType = MP_VIDEO_PLAYER_SIMPLE;
+
+ if(!strcmp(szLaunchingByOtherApp, "gallery"))
+ {
+ nTmpLaunchingAppType = MP_VIDEO_PLAYER_GALLERY;
+ }
+ else if(!strcmp(szLaunchingByOtherApp, "image_viewer"))
+ {
+ nTmpLaunchingAppType = MP_VIDEO_PLAYER_GALLERY;
+ }
+ else if(!strcmp(szLaunchingByOtherApp, "email"))
+ {
+ nTmpLaunchingAppType = MP_VIDEO_PLAYER_EMAIL;
+ }
+ else if(!strcmp(szLaunchingByOtherApp, "message"))
+ {
+ nTmpLaunchingAppType = MP_VIDEO_PLAYER_MMS;
+ }
+ else if(!strcmp(szLaunchingByOtherApp, "light_play_view"))
+ {
+ nTmpLaunchingAppType = MP_VIDEO_PLAYER_SIMPLE;
+ }
+ else
+ {
+ nTmpLaunchingAppType = MP_VIDEO_PLAYER_SIMPLE;
+ }
+
+ VideoLogInfo("Start position time : %d", nTmpLaunchingAppType);
+
+ free(szLaunchingByOtherApp);
+
+ return (int)nTmpLaunchingAppType;
+}
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+// External Function
+
+void MpVideoServiceCtrlReset(void)
+{
+ VideoLogInfo("");
+
+ pAppSvcHandle = NULL;
+
+ memset(szStreamingCookie, 0, STR_LEN_MAX);
+}
+
+int MpVideoServiceCtrlInitServiceParser(void* pAppServiceHandle, char* szMediaUri)
+{
+ if(!pAppServiceHandle)
+ {
+ VideoLogInfo("");
+ return MP_ERROR_PLAYER_TYPE;
+ }
+
+ VideoLogInfo("");
+
+ MpVideoServiceCtrlReset();
+
+ pAppSvcHandle = (service_h)pAppServiceHandle;
+
+ if(!MpVideoServiceCtrlGetUri(pAppSvcHandle, szMediaUri))
+ {
+ VideoLogInfo("MP_ERROR_PLAYER_TYPE");
+ nPlayerType = MP_ERROR_PLAYER_TYPE;
+ return nPlayerType;
+ }
+
+ if(MpUtilIsXMLUrl(szMediaUri))
+ {
+ if(!MpUtilParsingXML(szMediaUri))
+ {
+ VideoLogInfo("[ERR] Fail to get streaming URI path from XML.");
+ nPlayerType = MP_ERROR_PLAYER_TYPE;
+ return nPlayerType;
+ }
+
+ VideoLogInfo("MP_STREAMING_PLAYER");
+ nPlayerType = MP_STREAMING_PLAYER;
+ return nPlayerType;
+ }
+
+ if(strlen(szMediaUri) > 0)
+ {
+ int nResultPlayerType = 0;
+
+ nResultPlayerType = MpVideoServiceCtrlVideoUriType(szMediaUri);
+
+ if(nResultPlayerType == MP_ERROR_PLAYER_TYPE)
+ {
+ VideoLogInfo("MP_ERROR_PLAYER_TYPE");
+ nPlayerType = MP_ERROR_PLAYER_TYPE;
+ }
+ else if(nResultPlayerType == MP_VIDEO_PLAYER)
+ {
+ nPlayerType = MpVideoServiceCtrlCheckLauncher(pAppSvcHandle);
+ }
+ else if(nResultPlayerType == MP_STREAMING_PLAYER)
+ {
+ nPlayerType = MP_STREAMING_PLAYER;
+ MpVideoServiceCtrlCheckCookieForStreaming(pAppSvcHandle, szStreamingCookie);
+ }
+ else
+ {
+ }
+ }
+
+ return nPlayerType;
+}
+
+int MpVideoServiceCtrlGetPlayerTypeWithoutLog(void)
+{
+ if(MP_ERROR_PLAYER_TYPE > nPlayerType || MP_MAX_PLAYER_TYPE < nPlayerType)
+ {
+ nPlayerType = MP_ERROR_PLAYER_TYPE;
+ }
+
+ return nPlayerType;
+}
+
+int MpVideoServiceCtrlGetPlayerType(void)
+{
+ VideoLogInfo("");
+
+ if(MP_ERROR_PLAYER_TYPE > nPlayerType || MP_MAX_PLAYER_TYPE < nPlayerType)
+ {
+ nPlayerType = MP_ERROR_PLAYER_TYPE;
+ }
+
+ VideoLogInfo("nPlayerType : %d", nPlayerType);
+
+ return nPlayerType;
+}
+
+void MpVideoServiceCtrlSetPlayerType(int nSetPlayerType)
+{
+ VideoLogInfo("nSetPlayerType : %d", nSetPlayerType);
+
+ if(MP_ERROR_PLAYER_TYPE < nSetPlayerType || MP_MAX_PLAYER_TYPE > nSetPlayerType)
+ {
+ nPlayerType = nSetPlayerType;
+ }
+}
+
+char* MpVideoServiceCtrlGetCookieForStreaming(void)
+{
+ VideoLogInfo("");
+
+ if(strlen(szStreamingCookie) < 1)
+ {
+ VideoLogInfo("No exist streaming cookie.");
+ }
+
+ return szStreamingCookie;
+}
\ No newline at end of file
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-
-#include <mm_sound.h>
+#include <app.h>
+#include <player.h>
+#include <sound_manager.h>
#include <Ecore_Evas.h>
#include <Elementary.h>
-#include <appcore-efl.h>
-#include <appcore-common.h>
#include "mp-util.h"
#include "mp-video-log.h"
#define MP_VIDEO_SOUND_PATH_EARJACK "Headphones"
static Evas_Object *pVideoSoundPathPopUpHandle = NULL;
+//static Evas_Object *pVideoSoundPathpPopupWindow = NULL;
static Evas_Object *pGroupRadio = NULL;
static Evas_Object *pGenList = NULL;
-static Elm_Genlist_Item_Class st_Itc;
static char szSoundPathItems[MP_VIDEO_SOUND_PATH_NUM][STR_LEN_MAX];
static bool bIsConnectBluetooth = FALSE;
static bool bIsConnectEarjack = FALSE;
MpVideoSoundpathDeleteRadioButton();
- memset(&st_Itc, 0, sizeof(Elm_Genlist_Item_Class));
-
if (pGenList) {
evas_object_del(pGenList);
pGenList = NULL;
pVideoSoundPathPopUpHandle = NULL;
}
- }
+ MpUtilSetAlphaOfMainWindow(TRUE);
+}
-static char *MpVideoSoundpathGetLabelOfGenlistItemCb(const void *pUserData,
- Evas_Object *pObject,
- const char *pPart)
+static char *MpVideoSoundpathGetLabelOfGenlistItemCb(const void *pUserData, Evas_Object *pObject, const char *pPart)
{
VideoLogInfo("");
return NULL;
}
-static Evas_Object *MpVideoSoundpathGetIconOfGenlistItemCb(const void
- *pUserData,
- Evas_Object *pObject,
- const char *pPart)
+static Evas_Object *MpVideoSoundpathGetIconOfGenlistItemCb(const void *pUserData, Evas_Object *pObject, const char *pPart)
{
VideoLogInfo("");
return pTmpRadio;
}
-static void MpVideoSoundpathSelectSoundPathItemCb(void *pUserData,
- Evas_Object *pObject,
- void *pEventInfo)
+static void MpVideoSoundpathSelectSoundPathItemCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
{
if (pUserData == NULL) {
VideoLogInfo("[ERR]No have pUserData");
nIndex = (int)elm_object_item_data_get(pItem);
VideoLogInfo("Select sound path : %s", szSoundPathItems[nIndex]);
- if (!strcmp(szSoundPathItems[nIndex], MP_VIDEO_SOUND_PATH_SPEAKER)) {
+ if(!strcmp(szSoundPathItems[nIndex], MP_VIDEO_SOUND_PATH_SPEAKER))
+ {
int nRet = 0;
- if (MpUtilIsConnectEarjack()) {
- nRet = mm_sound_route_set_system_policy(SYSTEM_AUDIO_ROUTE_POLICY_HANDSET_ONLY);
- } else {
- nRet = mm_sound_route_set_system_policy(SYSTEM_AUDIO_ROUTE_POLICY_IGNORE_A2DP);
- }
+ nRet = sound_manager_set_active_route(SOUND_ROUTE_OUT_SPEAKER);
elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_SPEAKER);
} else if (!strcmp(szSoundPathItems[nIndex], MP_VIDEO_SOUND_PATH_EARJACK)) {
- int nRet = mm_sound_route_set_system_policy(SYSTEM_AUDIO_ROUTE_POLICY_IGNORE_A2DP);
- if (nRet != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] mm_sound_route_set_system_policy(0x%x)", nRet);
+ int nRet = sound_manager_set_active_route(SOUND_ROUTE_OUT_WIRED_ACCESSORY);
+ if (nRet != SOUND_MANAGER_ERROR_NONE) {
+ VideoLogInfo("[ERR] set_system_policy(0x%x)", nRet);
} else {
elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_EARJACK);
}
} else {
- int nRet = mm_sound_route_set_system_policy(SYSTEM_AUDIO_ROUTE_POLICY_DEFAULT);
- if (nRet != MM_ERROR_NONE) {
- VideoLogInfo("[ERR] mm_sound_route_set_system_policy(0x%x)", nRet);
+ int nRet = sound_manager_set_active_route(SOUND_ROUTE_OUT_BLUETOOTH);
+ if (nRet != SOUND_MANAGER_ERROR_NONE) {
+ VideoLogInfo("[ERR] set_system_policy(0x%x)", nRet);
} else {
elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_BLUETOOTH);
}
MpVideoSoundpathDeletePopupHandle();
}
-void MpVideoSoundpathCurrentState(Evas_Object *pParent)
+static void MpVideoSoundpathCurrentState()
{
VideoLogInfo("");
- int nBluetoothConnect = 0;
+ bool bBluetoothConnect = 0;
char *szBluetoothName = NULL;
bIsConnectEarjack = FALSE;
bIsConnectBluetooth = FALSE;
- /* Speaker */
strncpy(&szSoundPathItems[MP_SOUND_PATH_SPEAKER][0], MP_VIDEO_SOUND_PATH_SPEAKER, STR_LEN_MAX - 1);
- /* Check and Add earjack sound path. */
if (MpUtilIsConnectEarjack()) {
VideoLogInfo("Connect earjack.");
bIsConnectEarjack = TRUE;
VideoLogInfo("No connect earjack.");
}
- /* Add bluetooth stereo sound path. */
- if (MM_ERROR_NONE != mm_sound_route_get_a2dp_status(&nBluetoothConnect, &szBluetoothName)) {
+ if (SOUND_MANAGER_ERROR_NONE != sound_manager_get_a2dp_status(&bBluetoothConnect, &szBluetoothName)) {
VideoLogInfo("[ERR] Fail to check bluetooth stereo sound path.");
} else {
- if (nBluetoothConnect) {
+ if (bBluetoothConnect) {
VideoLogInfo("Connect szBluetoothName : %s", szBluetoothName);
bIsConnectBluetooth = TRUE;
strncpy(&szSoundPathItems[MP_SOUND_PATH_BLUETOOTH][0], szBluetoothName, STR_LEN_MAX - 1);
+ if(szBluetoothName) {
+ free(szBluetoothName);
+ szBluetoothName = NULL;
+ }
} else {
+ szBluetoothName = NULL;
VideoLogInfo("Unactivate Bluetooth stereo A2DP.");
}
}
{
VideoLogInfo("");
- int nBluetoothConnect = 0;
- char *szBluetoothName = NULL;
- system_audio_route_t nPolicy = 0;
-
- mm_sound_route_get_system_policy(&nPolicy);
+ sound_device_in_e in;
+ sound_device_out_e out;
- if (nPolicy == SYSTEM_AUDIO_ROUTE_POLICY_DEFAULT) {
- VideoLogInfo("SYSTEM_AUDIO_ROUTE_POLICY_DEFAULT");
+ sound_manager_get_active_device(&in, &out);
- if (MM_ERROR_NONE != mm_sound_route_get_a2dp_status(&nBluetoothConnect, &szBluetoothName)) {
- VideoLogInfo("[ERR] Fail to check bluetooth stereo sound path.");
- }
+ switch(out) {
+ case SOUND_DEVICE_OUT_SPEAKER:
+ elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_SPEAKER);
+ break;
- if (nBluetoothConnect) {
- elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_BLUETOOTH);
- } else if (MpUtilIsConnectEarjack()) {
- elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_EARJACK);
- } else {
- elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_SPEAKER);
- }
- } else if (nPolicy == SYSTEM_AUDIO_ROUTE_POLICY_IGNORE_A2DP) {
- VideoLogInfo("SYSTEM_AUDIO_ROUTE_POLICY_IGNORE_A2DP");
+ case SOUND_DEVICE_OUT_WIRED_ACCESSORY:
+ elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_EARJACK);
+ break;
- if (MpUtilIsConnectEarjack()) {
- elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_EARJACK);
- } else {
- elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_SPEAKER);
- }
- } else {
- VideoLogInfo("SYSTEM_AUDIO_ROUTE_POLICY_HANDSET_ONLY");
+ case SOUND_DEVICE_OUT_BT_A2DP:
+ elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_BLUETOOTH);
+ break;
+ default:
elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_SPEAKER);
+ break;
}
}
MpVideoSoundpathDeletePopupHandle();
- pVideoSoundPathPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+ MpUtilSetAlphaOfMainWindow(FALSE);
- MpVideoSoundpathCurrentState(pVideoSoundPathPopUpHandle);
+ MpVideoSoundpathCurrentState();
+ pVideoSoundPathPopUpHandle = elm_popup_add(pAppData->pMainWindow);
elm_object_style_set(pVideoSoundPathPopUpHandle, "min_menustyle");
elm_object_part_text_set(pVideoSoundPathPopUpHandle, "title,text", MP_VIDEO_SOUND_PATH);
evas_object_size_hint_weight_set(pVideoSoundPathPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
pButton = elm_button_add(pVideoSoundPathPopUpHandle);
+ elm_object_style_set (pButton, "popup_button/default");
elm_object_text_set(pButton, dgettext(MP_SYS_STRING, MP_COM_BUTTON_CANCEL));
elm_object_part_content_set(pVideoSoundPathPopUpHandle, "button1", pButton);
evas_object_smart_callback_add(pButton, "clicked", MpVideoSoundpathPopupCb, (void*)pAppData);
/* Set item of Genlist. */
- st_Itc.item_style = "1text.1icon.3";
- st_Itc.func.text_get = (void *)MpVideoSoundpathGetLabelOfGenlistItemCb;
- st_Itc.func.content_get = (void *)MpVideoSoundpathGetIconOfGenlistItemCb;
- st_Itc.func.state_get = NULL;
- st_Itc.func.del = NULL;
+ Elm_Genlist_Item_Class *st_Itc = NULL;
+ st_Itc = elm_genlist_item_class_new();
+ st_Itc->item_style = "1text.1icon.3";
+ st_Itc->func.text_get = (void *)MpVideoSoundpathGetLabelOfGenlistItemCb;
+ st_Itc->func.content_get = (void *)MpVideoSoundpathGetIconOfGenlistItemCb;
+ st_Itc->func.state_get = NULL;
+ st_Itc->func.del = NULL;
/* Create genlist handle */
pGenList = elm_genlist_add(pVideoSoundPathPopUpHandle);
evas_object_size_hint_weight_set(pGenList, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(pGenList, EVAS_HINT_FILL, EVAS_HINT_FILL);
- pGroupRadio = elm_radio_add(pGenList);
+ pGroupRadio = elm_radio_add(pGenList);
if (bIsConnectBluetooth) {
- elm_genlist_item_append(pGenList, &st_Itc, (void *)MP_SOUND_PATH_BLUETOOTH, NULL,
+ elm_genlist_item_append(pGenList, st_Itc, (void *)MP_SOUND_PATH_BLUETOOTH, NULL,
ELM_GENLIST_ITEM_NONE,
MpVideoSoundpathSelectSoundPathItemCb,
pAppData);
}
if (bIsConnectEarjack) {
- elm_genlist_item_append(pGenList, &st_Itc, (void *)MP_SOUND_PATH_EARJACK, NULL,
+ elm_genlist_item_append(pGenList, st_Itc, (void *)MP_SOUND_PATH_EARJACK, NULL,
ELM_GENLIST_ITEM_NONE,
MpVideoSoundpathSelectSoundPathItemCb,
pAppData);
}
- elm_genlist_item_append(pGenList, &st_Itc, (void *)MP_SOUND_PATH_SPEAKER, NULL,
+ elm_genlist_item_append(pGenList, st_Itc, (void *)MP_SOUND_PATH_SPEAKER, NULL,
ELM_GENLIST_ITEM_NONE,
MpVideoSoundpathSelectSoundPathItemCb,
pAppData);
+ elm_genlist_item_class_free(st_Itc);
+
MpVideoSoundpathSetRadioButton();
pBox = elm_box_add(pVideoSoundPathPopUpHandle);
- if (bIsConnectBluetooth && bIsConnectEarjack) {
+ if(bIsConnectBluetooth && bIsConnectEarjack)
+ {
evas_object_size_hint_min_set(pBox, 614 * elm_config_scale_get(), 338 * elm_config_scale_get());
- } else if(bIsConnectBluetooth || bIsConnectEarjack) {
+ }
+ else if(bIsConnectBluetooth || bIsConnectEarjack)
+ {
evas_object_size_hint_min_set(pBox, 614 * elm_config_scale_get(), 225 * elm_config_scale_get());
- } else {
+ }
+ else
+ {
evas_object_size_hint_min_set(pBox, 614 * elm_config_scale_get(), 451 * elm_config_scale_get());
}
+
elm_box_pack_end(pBox, pGenList);
elm_object_content_set(pVideoSoundPathPopUpHandle, pBox);
{
VideoLogInfo("");
- int nBluetoothConnect = 0;
+ bool bBluetoothConnect = 0;
char *szBluetoothName = NULL;
bIsConnectEarjack = FALSE;
bIsConnectBluetooth = FALSE;
- if (MpUtilIsConnectEarjack()) {
+ if(MpUtilIsConnectEarjack())
+ {
VideoLogInfo("Connect earjack.");
bIsConnectEarjack= TRUE;
return TRUE;
}
+ sound_manager_get_a2dp_status(&bBluetoothConnect, &szBluetoothName);
+
+ if(bBluetoothConnect)
+ {
+ if(szBluetoothName) {
+ free(szBluetoothName);
+ szBluetoothName = NULL;
+ }
- mm_sound_route_get_a2dp_status(&nBluetoothConnect, &szBluetoothName);
- if (nBluetoothConnect) {
VideoLogInfo("Connect bluetooth.");
bIsConnectBluetooth = TRUE;
return TRUE;
}
+ if(szBluetoothName) {
+ free(szBluetoothName);
+ szBluetoothName = NULL;
+ }
+
VideoLogInfo("Only spaker.");
return FALSE;
}
-
-int MpVideoSoundpathGetCurrConnectedSoundpath(void)
-{
- VideoLogInfo("");
-
- int nBluetoothConnect = 0;
- char *szBluetoothName = NULL;
- system_audio_route_t nPolicy = 0;
-
- mm_sound_route_get_system_policy(&nPolicy);
-
- if (nPolicy == SYSTEM_AUDIO_ROUTE_POLICY_DEFAULT) {
- VideoLogInfo("SYSTEM_AUDIO_ROUTE_POLICY_DEFAULT");
-
- if (MM_ERROR_NONE != mm_sound_route_get_a2dp_status(&nBluetoothConnect, &szBluetoothName)) {
- VideoLogInfo("[ERR] Fail to check bluetooth stereo sound path.");
- }
-
- if (nBluetoothConnect) {
- return MP_SOUND_PATH_BLUETOOTH;
- } else if (MpUtilIsConnectEarjack()) {
- return MP_SOUND_PATH_EARJACK;
- } else {
- return MP_SOUND_PATH_SPEAKER;
- }
- } else if (nPolicy == SYSTEM_AUDIO_ROUTE_POLICY_IGNORE_A2DP) {
- VideoLogInfo("SYSTEM_AUDIO_ROUTE_POLICY_IGNORE_A2DP");
-
- if (MpUtilIsConnectEarjack()) {
- return MP_SOUND_PATH_EARJACK;
- } else {
- return MP_SOUND_PATH_SPEAKER;
- }
- } else {
- VideoLogInfo("SYSTEM_AUDIO_ROUTE_POLICY_HANDSET_ONLY");
-
- return MP_SOUND_PATH_SPEAKER;
- }
-}
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-
-#include <string.h>
+#include <app.h>
#include <vconf.h>
+#include <string.h>
#include <vconf-keys.h>
#include "mp-util.h"
#include "mp-video-streaming-ctrl.h"
+#define NETWORK_TIMEOUT 30.0
+
static char szNetworkProxy[STR_LEN_MAX] = {0};
static char szNetworkIpAddress[STR_LEN_MAX] = {0};
static MpNetworkType nNetworkStatus = MP_NETWORK_TYPE_OFF;
static MpNetworkWifiState nWifiState = MP_NETWORK_WIFI_OFF;
static MpNetworkCellularState nCellularState = MP_NETWORK_CELLULAR_NO_SERVICE;
+static Ecore_Pipe *pEcorePipeHandleForPause = NULL;
+static Ecore_Pipe *pEcorePipeHandleForResume = NULL;
+
static Eina_Bool bIsInitCallbackFunc = FALSE;
+static Ecore_Timer *pNetworkTimeoutTimer = NULL;
+
+
/*
* Callback function.
*/
+static void MpVideoStreamingCtrlExitCb(void *pUserData, Evas_Object *pObject,
+ void *pEventInfo)
+{
+ if (!pUserData) {
+ VideoLogInfo("No exist pUserData");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+}
+
+static int MpVideoStreamingCtrlResumeCb(void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("No exist pUserData");
+ return 0;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ if (pNetworkTimeoutTimer) {
+ ecore_timer_del(pNetworkTimeoutTimer);
+ pNetworkTimeoutTimer = NULL;
+ }
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause(pAppData);
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartByAppResume(pAppData);
+
+ return 0;
+}
+
+static Eina_Bool MpVideoStreamingCtrlPopupCb(void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("No exist pUserData");
+ return EINA_FALSE;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ if (pNetworkTimeoutTimer) {
+ ecore_timer_del(pNetworkTimeoutTimer);
+ pNetworkTimeoutTimer = NULL;
+ }
+
+ MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL), MpVideoStreamingCtrlExitCb);
+
+ return EINA_FALSE;
+}
+
+static int MpVideoStreamingCtrlPauseCb(void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("No exist pUserData");
+ return 0;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause(pAppData);
+
+ if (pNetworkTimeoutTimer) {
+ ecore_timer_del(pNetworkTimeoutTimer);
+ pNetworkTimeoutTimer = NULL;
+ }
+
+ pNetworkTimeoutTimer = ecore_timer_add(NETWORK_TIMEOUT,
+ MpVideoStreamingCtrlPopupCb,
+ pAppData);
+
+ return 0;
+}
static void MpVideoStreamingCtrlNetworkOnOffCb(keynode_t *pKeyNode,void *pUserData)
case VCONFKEY_NETWORK_OFF:
nNetworkStatus = MP_NETWORK_TYPE_OFF;
VideoLogInfo("MP_NETWORK_TYPE_OFF");
+ if(pEcorePipeHandleForPause) {
+ if(!ecore_pipe_write(pEcorePipeHandleForPause,
+ pUserData, sizeof(pUserData))) {
+ VideoLogDebug("FAIL PIPE WRITE");
+ }
+ }
break;
case VCONFKEY_NETWORK_CELLULAR:
VideoLogInfo("MP_NETWORK_TYPE_CELLULAR");
+ if(pEcorePipeHandleForResume) {
+ if(!ecore_pipe_write(pEcorePipeHandleForResume,
+ pUserData, sizeof(pUserData))) {
+ VideoLogDebug("FAIL PIPE WRITE");
+ }
+ }
nNetworkStatus = MP_NETWORK_TYPE_CELLULAR;
break;
case VCONFKEY_NETWORK_WIFI:
VideoLogInfo("MP_NETWORK_TYPE_WIFI");
+ if(pEcorePipeHandleForResume) {
+ if(!ecore_pipe_write(pEcorePipeHandleForResume,
+ pUserData, sizeof(pUserData))) {
+ VideoLogDebug("FAIL PIPE WRITE");
+ }
+ }
nNetworkStatus = MP_NETWORK_TYPE_WIFI;
break;
default:
nNetworkStatus = MP_NETWORK_TYPE_OFF;
VideoLogInfo("UNKNOWN NETWORK STATE");
+ if(pEcorePipeHandleForPause) {
+ if(!ecore_pipe_write(pEcorePipeHandleForPause,
+ pUserData, sizeof(pUserData))) {
+ VideoLogDebug("FAIL PIPE WRITE");
+ }
+ }
break;
}
}
+ else {
+ if(pEcorePipeHandleForPause) {
+ if(!ecore_pipe_write(pEcorePipeHandleForPause,
+ pUserData, sizeof(pUserData))) {
+ VideoLogDebug("FAIL PIPE WRITE");
+ }
+ }
+ }
}
static void MpVideoStreamingCtrlChangeIpCb(keynode_t *pKeyNode, void *pUserData)
case VCONFKEY_NETWORK_WIFI_CONNECTED:
nWifiState = MP_NETWORK_WIFI_CONNECTED;
VideoLogInfo("MP_NETWORK_WIFI_CONNECTED");
- nNetworkStatus = MP_NETWORK_TYPE_OFF;
break;
default:
}
}
+static void MpVideoStreamingCtrlPipeInit(void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("No exist pUserData");
+ return;
+ }
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ if(pEcorePipeHandleForPause) {
+ ecore_pipe_del(pEcorePipeHandleForPause);
+ pEcorePipeHandleForPause = NULL;
+ }
+
+ pEcorePipeHandleForPause = ecore_pipe_add(
+ (Ecore_Pipe_Cb)MpVideoStreamingCtrlPauseCb,
+ (void *)pAppData);
+
+ if(pEcorePipeHandleForResume) {
+ ecore_pipe_del(pEcorePipeHandleForResume);
+ pEcorePipeHandleForResume = NULL;
+ }
+
+ pEcorePipeHandleForResume = ecore_pipe_add(
+ (Ecore_Pipe_Cb)MpVideoStreamingCtrlResumeCb,
+ (void *)pAppData);
+
+}
/*
* Internal function.
{
VideoLogInfo("");
+ if (pNetworkTimeoutTimer) {
+ ecore_timer_del(pNetworkTimeoutTimer);
+ pNetworkTimeoutTimer = NULL;
+ }
+
+ if(pEcorePipeHandleForPause) {
+ ecore_pipe_del(pEcorePipeHandleForPause);
+ pEcorePipeHandleForPause = NULL;
+ }
+
+ if(pEcorePipeHandleForResume) {
+ ecore_pipe_del(pEcorePipeHandleForResume);
+ pEcorePipeHandleForResume = NULL;
+ }
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
char szTmp[STR_LEN_MAX] = {0};
bool bNetworkState = FALSE;
-
+
if(bIsInitCallbackFunc == EINA_FALSE) {
+ MpVideoStreamingCtrlPipeInit(pUserData);
+
MpVideoStreamingCtrlSetNotifyNetworkStatus(pUserData);
MpVideoStreamingCtrlSetNotifyChangingIp(pUserData);
MpVideoStreamingCtrlSetNotifyWiFiState(pUserData);
bIsInitCallbackFunc = EINA_TRUE;
}
+ if (pNetworkTimeoutTimer) {
+ ecore_timer_del(pNetworkTimeoutTimer);
+ pNetworkTimeoutTimer = NULL;
+ }
+
switch(MpVideoStreamingCtrlGetNetworkStatus())
{
case MP_NETWORK_TYPE_OFF:
VideoLogInfo("MP_NETWORK_TYPE_OFF");
+ pNetworkTimeoutTimer = ecore_timer_add(NETWORK_TIMEOUT,
+ MpVideoStreamingCtrlPopupCb,
+ pAppData);
bNetworkState = FALSE;
break;
memset(szTmp, 0, STR_LEN_MAX);
MpVideoStreamingCtrlGetProxy(szTmp);
VideoLogInfo("Current Proxy Address : %s", szTmp);
- VideoLogInfo("Current Proxy Address : %s", szTmp);
memset(pAppData->szProxyAddress, 0, STR_LEN_MAX);
strncpy(pAppData->szProxyAddress, szTmp, STR_LEN_MAX - 1);
return bNetworkState;
}
-
-
-
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
-#include <appcore-efl.h>
#include <syspopup_caller.h>
#include "mp-util.h"
#include "mp-video-animation-ctrl.h"
#include "mp-video-streaming-view.h"
#include "mp-video-sound-path-ctrl.h"
+#include "mp-video-service-ctrl.h"
-#define MUTE_POPUP_INTERVAL_TIME 3.0
#define CTRL_PANEL_SHOW_TIME 5.0
static Evas_Object *pNaviFrameHandle = NULL;
static Evas_Object *pStreamingViewLayout = NULL;
static Evas_Object *pStreamingViewPanelEdj = NULL;
static Evas_Object *pStreamingViewCtrlEdj = NULL;
-static Evas_Object *pStreamingViewHiddenPanelEdj = NULL;
-static Evas_Object *pStreamingViewOptionEdj = NULL;
+static Evas_Object *pStreamingViewProgressbarEdj = NULL;
+static Evas_Object *pStreamingSoundpathButton = NULL;
-//static Ecore_Timer *pStreamingViewVolLongPressTimer = NULL;
-//static Ecore_Timer *pStreamingViewMutePopupShowTimer = NULL;
static Ecore_Timer *pStreamingViewCtrlPanelHideTimer = NULL;
-
-static Evas_Object *pStreamingSoundpathButton = NULL;
static Elm_Object_Item *pNaviFrameItemStreamingView = NULL;
+static ChangeStreamingViewCbFunc pChangeViewUserCbFunc = NULL;
-static Ecore_Event_Handler *pMouseEventHandler = NULL;
-
-//static bool bIsVolumeLongPressOfStreamingView = FALSE;
-//static bool bIsVolumePopupShowOfStreamingView = FALSE;
+static bool bIsStreamingViewScreenLock = FALSE;
static bool bSwitchStreamingViewUI = TRUE;
-static bool bIsStreamingHightQuality = TRUE;
-static bool bIsChangeResolution = FALSE;
+static bool bIsStreamingViewOnlyAudio = FALSE;
static VideoStreamingViewState nStreamingViewState = MP_STREAMING_VIEW_STATE_UNACTIVATE;
static int nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
+
/*
* Callback function.
*/
}
}
-static void MpVideoStreamingViewPressResumeButtonCb(void *pUserData,
- Evas_Object *pObject,
- const char *szEmission,
- const char *szSource)
+static void MpVideoStreamingViewPressResumeButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
{
VideoLogInfo("");
}
}
-/*
-static Eina_Bool MpVideoStreamingViewVolPopupCb(void *pUserData)
-{
- VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return EINA_FALSE;
- }
-
- if (pStreamingViewMutePopupShowTimer) {
- ecore_timer_del(pStreamingViewMutePopupShowTimer);
- pStreamingViewMutePopupShowTimer = NULL;
- }
-
- bIsVolumePopupShowOfStreamingView = FALSE;
- edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_MUTE_HIDE, "*");
-
- return EINA_FALSE;
-}
-
-static Eina_Bool MpVideoStreamingViewVolLongPressCb(void *pUserData)
-{
- VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return EINA_FALSE;
- }
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (pStreamingViewVolLongPressTimer) {
- ecore_timer_del(pStreamingViewVolLongPressTimer);
- pStreamingViewVolLongPressTimer = NULL;
- }
-
- bIsVolumeLongPressOfStreamingView = TRUE;
-
- if (pAppData->bIsMute == FALSE) {
- edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_VOL_BUTTON_MUTE, "*");
- edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_MUTE_SHOW, "*");
-
- pStreamingViewMutePopupShowTimer = ecore_timer_add(MUTE_POPUP_INTERVAL_TIME, MpVideoStreamingViewVolPopupCb, (void *)pAppData);
- bIsVolumePopupShowOfStreamingView = TRUE;
- pAppData->bIsMute = TRUE;
- } else {
- edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_VOL_BUTTON_UNMUTE, "*");
- edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_MUTE_HIDE, "*");
-
- bIsVolumePopupShowOfStreamingView = FALSE;
- pAppData->bIsMute = FALSE;
- }
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetMute(pAppData);
-
- return EINA_FALSE;
-}
-*/
-
static void MpVideoStreamingViewBackButtonDownCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
{
VideoLogInfo("");
static void MpVideoStreamingViewVolumeButtonDownCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
{
VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
- }
-
-/*
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (pStreamingViewVolLongPressTimer) {
- ecore_timer_del(pStreamingViewVolLongPressTimer);
- pStreamingViewVolLongPressTimer = NULL;
- }
-
- bIsVolumeLongPressOfStreamingView = FALSE;
- pStreamingViewVolLongPressTimer = ecore_timer_add(LONG_PRESS_INTERVAL, MpVideoStreamingViewVolLongPressCb, (void *)pAppData);
-*/
}
static void MpVideoStreamingViewVolumeButtonUpCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
{
VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
- }
-
syspopup_launch("volume", NULL);
-
-/*
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (pStreamingViewVolLongPressTimer) {
- ecore_timer_del(pStreamingViewVolLongPressTimer);
- pStreamingViewVolLongPressTimer = NULL;
- }
-
- if (bIsVolumeLongPressOfStreamingView) {
- return;
- }
-
- if (pAppData->bIsMute == TRUE) {
- if (bIsVolumePopupShowOfStreamingView) {
- ecore_timer_del(pStreamingViewMutePopupShowTimer);
- }
-
- pStreamingViewMutePopupShowTimer = ecore_timer_add(MUTE_POPUP_INTERVAL_TIME, MpVideoStreamingViewVolPopupCb, (void *)pAppData);
- edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_MUTE_SHOW, "*");
- bIsVolumePopupShowOfStreamingView = TRUE;
- } else {
- syspopup_launch("volume", NULL);
- }
-*/
-}
-
-static void MpVideoStreamingViewHqButtonDownCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
-{
- VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
- }
-}
-
-static void MpVideoStreamingViewHqButtonUpCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
-{
- VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (bIsChangeResolution)
- return;
-
- char *szURL = NULL;
- szURL = MpUtilGetXMLQualityURL();
- if (szURL != NULL) {
- VideoLogInfo("%s", szURL);
- bIsChangeResolution = TRUE;
- memset((void *)pAppData->szMediaUri, 0, STR_LEN_MAX);
- strncpy(pAppData->szMediaUri, szURL, STR_LEN_MAX -1);
-
- if (szURL)
- free(szURL);
-
- MpVideoProgressbarDeleteTimer();
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition(pAppData);
- pAppData->nSetPosition = pAppData->nCurPosition;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlReLaunching(pAppData);
-
- if (bIsStreamingHightQuality) {
- bIsStreamingHightQuality = FALSE;
- edje_object_signal_emit(pStreamingViewHiddenPanelEdj, SIGNAL_CONTROL_STREAMING_QUALITY_NORMAL, "*");
- } else {
- bIsStreamingHightQuality = TRUE;
- edje_object_signal_emit(pStreamingViewHiddenPanelEdj, SIGNAL_CONTROL_STREAMING_QUALITY_HIGH, "*");
- }
- bIsChangeResolution = FALSE;
- }
-}
-
-static void MpVideoStreamingViewMainScreenTouchCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
-{
- VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (MpVideoStreamingViewGetBufferingState()) {
- VideoLogInfo("skip for Buffering");
- return;
- }
-
- if (bSwitchStreamingViewUI) {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
- }
}
static Eina_Bool MpVideoStreamingViewCtrlPanelHideCb(void *pUserData)
return EINA_FALSE;
}
+ if(bIsStreamingViewOnlyAudio)
+ {
+ VideoLogInfo("Not hide control panel and UI because of audio only.");
+ return EINA_FALSE;
+ }
+
if (MpVideoStreamingViewGetBufferingState()) {
VideoLogInfo("skip for Buffering");
return EINA_TRUE;
return EINA_FALSE;
}
-static Eina_Bool MpVideoStreamingViewMouseUpCb(void *pUserData, int nType,
- void *pEvent)
-{
- VideoLogInfo("");
-
- if (nStreamingViewState == MP_STREAMING_VIEW_STATE_UNACTIVATE) {
- VideoLogInfo("");
- return EINA_FALSE;
- }
-
- if (!pUserData) {
- VideoLogInfo("[ERR] No Exist pUserData.");
- return EINA_FALSE;
- }
-
- if (!pEvent) {
- VideoLogInfo("[ERR] No exist pEvent.");
- return EINA_FALSE;
- }
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (!bSwitchStreamingViewUI) {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
- } else {
- if (pStreamingViewCtrlPanelHideTimer) {
- ecore_timer_del(pStreamingViewCtrlPanelHideTimer);
- pStreamingViewCtrlPanelHideTimer = ecore_timer_add(CTRL_PANEL_SHOW_TIME, MpVideoStreamingViewCtrlPanelHideCb, pUserData);
- }
- }
-
- return EINA_FALSE;
-}
-
static void MpVideoStreamingViewChangedEarjackCb(void *pNode, void *pUserData)
{
if (!pUserData) {
if (MpUtilIsConnectEarjack()) {
VideoLogInfo("Connect earjack.");
if (pStreamingSoundpathButton) {
- elm_object_item_part_content_set(pNaviFrameItemStreamingView, "title_left_btn", pStreamingSoundpathButton);
+ elm_object_item_part_content_set(pNaviFrameItemStreamingView, "title_right_btn", pStreamingSoundpathButton);
} else {
- pStreamingSoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, pUserData, "video/naviframe/title/default", (void*)MpVideoStreamingViewSoundPathCb);
- elm_object_item_part_content_set(pNaviFrameItemStreamingView, "title_left_btn", pStreamingSoundpathButton);
+ pStreamingSoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, 1, 1, pUserData, "video/naviframe/title/default", (void*)MpVideoStreamingViewSoundPathCb);
+ elm_object_item_part_content_set(pNaviFrameItemStreamingView, "title_right_btn", pStreamingSoundpathButton);
}
} else {
VideoLogInfo("Disconnect earjack.");
+
if (pStreamingSoundpathButton) {
evas_object_del(pStreamingSoundpathButton);
pStreamingSoundpathButton = NULL;
}
- elm_object_item_part_content_unset(pNaviFrameItemStreamingView, "title_left_btn");
- }
-
-}
-
-static void MpVideoStreamingViewPressOptionScreenSizeCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
-{
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- VideoLogInfo("");
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (!strcmp(szEmission, SIGNAL_OPTION_SCREEN_SIZE_NORMAL)) {
- VideoLogInfo("Screen size : Normal");
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetScreenSize(pAppData, MP_DISPLAY_METHOD_LETTER_BOX);
- nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
- } else if (!strcmp(szEmission, SIGNAL_OPTION_SCREEN_SIZE_EXPAND)) {
- VideoLogInfo("Screen size : Expand");
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetScreenSize(pAppData, MP_DISPLAY_METHOD_CROPPED_FULL);
- nScreensizeStatus = MP_DISPLAY_METHOD_CROPPED_FULL;
- } else {
- VideoLogInfo("Screen size : Nothing");
- nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
+ elm_object_item_part_content_unset(pNaviFrameItemStreamingView, "title_right_btn");
}
}
/*
* Internal function
*/
-void MpVideoStreamingViewInitKeyMouse(void *pUserData)
-{
- VideoLogInfo("");
-
- if (!pUserData) {
- VideoLogInfo("[ERR]");
- return;
- }
-
- VideoAppData *pAppData = (VideoAppData *)pUserData;
-
- if (pMouseEventHandler) {
- ecore_event_handler_del(pMouseEventHandler);
- pMouseEventHandler = NULL;
- }
-
- pMouseEventHandler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, MpVideoStreamingViewMouseUpCb, pAppData);
-}
-void MpVideoStreamingViewInitLayout(void *pParent, void *pUserData, void *pShowInfoViewCb)
+void MpVideoStreamingViewInitLayout(void *pParent, void *pUserData)
{
VideoLogInfo("");
pStreamingViewLayout = elm_layout_add(pParent);
if (pStreamingViewLayout) {
- Evas_Object *pTmpProgressbarEdj = NULL;
Evas *pMainWindowEvas = evas_object_evas_get(pAppData->pMainWindow);
elm_layout_file_set(pStreamingViewLayout, VIDEO_PLAYER_MAIN_EDJ, MAIN_EDJ_GROUP);
- pStreamingViewOptionEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_OPTION_BUTTON_EDJ, OPTION_EDJ_GROUP);
- elm_object_part_content_set(pStreamingViewLayout, SWALLOW_MAIN_OPTION_BUTTON, pStreamingViewOptionEdj);
- edje_object_signal_emit(pStreamingViewOptionEdj, SIGNAL_OPTION_MODE_STREAMING, "*");
-
pStreamingViewCtrlEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_CONTROL_EDJ, CONTROL_EDJ_GROUP);
pStreamingViewPanelEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_PANEL_EDJ, PANEL_EDJ_GROUP);
pBufferingAnimationHandle = MpVideoAnimationCtrlInit(pMainWindowEvas);
MpVideoAnimationCtrlShow();
- pTmpProgressbarEdj = (Evas_Object *)MpVideoProgressbarInit(pAppData);
+ pStreamingViewProgressbarEdj = (Evas_Object *)MpVideoProgressbarInit(pAppData);
MpVideoProgressbarSetSkipEvent(TRUE);
- if (pTmpProgressbarEdj) {
- edje_object_part_swallow(pStreamingViewPanelEdj, SWALLOW_PANEL_PROGRESS_BAR, pTmpProgressbarEdj);
+ if (pStreamingViewProgressbarEdj) {
+ edje_object_part_swallow(pStreamingViewPanelEdj, SWALLOW_PANEL_PROGRESS_BAR, pStreamingViewProgressbarEdj);
} else {
VideoLogInfo("Progressbar edj handle is null.");
}
edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_MODE_STREAMING, "*");
- pStreamingViewHiddenPanelEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_HIDDEN_PANEL_EDJ, HIDDEN_PANEL_EDJ_GROUP);
- if (pStreamingViewHiddenPanelEdj) {
- elm_object_part_content_set(pStreamingViewLayout, SWALLOW_MAIN_HIDDEN_BUTTON, pStreamingViewHiddenPanelEdj);
- edje_object_signal_emit(pStreamingViewHiddenPanelEdj, SIGNAL_HIDDEN_BUTTON_PANEL_SOUNDPATH_HIDE, "*");
- edje_object_signal_emit(pStreamingViewHiddenPanelEdj,SIGNAL_CONTROL_STREAMING_QUALITY_HIDE,"*");
- }
-
-
- if (nScreensizeStatus == MP_DISPLAY_METHOD_LETTER_BOX) {
- VideoLogInfo("nScreensizeStatus : MP_DISPLAY_METHOD_LETTER_BOX");
- edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_SCREENSIZE_BUTTON_NORMAL, "*");
- } else if (nScreensizeStatus == MP_DISPLAY_METHOD_CROPPED_FULL) {
- VideoLogInfo("nScreensizeStatus : MP_DISPLAY_METHOD_CROPPED_FULL");
- edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_SCREENSIZE_BUTTON_EXPAND, "*");
- } else {
- VideoLogInfo("nScreensizeStatus : MP_DISPLAY_METHOD_LETTER_BOX");
- edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_SCREENSIZE_BUTTON_NORMAL, "*");
- }
-
- edje_object_signal_callback_add(pStreamingViewOptionEdj,
- SIGNAL_OPTION_SCREEN_SIZE_NORMAL,
- SIGNAL_OPTION_PART_SCREEN_SIZE,
- (void *)MpVideoStreamingViewPressOptionScreenSizeCb, (void *)pAppData);
-
- edje_object_signal_callback_add(pStreamingViewOptionEdj,
- SIGNAL_OPTION_SCREEN_SIZE_EXPAND,
- SIGNAL_OPTION_PART_SCREEN_SIZE,
- (void *)MpVideoStreamingViewPressOptionScreenSizeCb, (void *)pAppData);
-
- edje_object_signal_callback_add(pStreamingViewOptionEdj,
- SIGNAL_OPTION_DETAIL_DOWN,
- SIGNAL_OPTION_PART_DETAIL,
- (void *)pShowInfoViewCb, (void *)pAppData);
-
edje_object_signal_callback_add(pStreamingViewCtrlEdj,
SIGNAL_CONTROL_PLAY_PAUSE_PRESS,
SIGNAL_CONTROL_PART_PLAY_BUTTON,
SIGNAL_CONTROL_PART_VOL_BUTTON,
(void *)MpVideoStreamingViewVolumeButtonUpCb, (void *)pAppData);
- edje_object_signal_callback_add(_EDJ(pStreamingViewLayout),
- SIGNAL_MAIN_SCREEN_TOUCH_PRESS,
- SIGNAL_MAIN_SCREEN_TOUCH_TOGGLE,
- (void *)MpVideoStreamingViewMainScreenTouchCb, (void *)pAppData);
-
- edje_object_signal_callback_add(pStreamingViewHiddenPanelEdj,
- SIGNAL_CONTROL_HQ_BUTTON_DOWN,
- SIGNAL_CONTROL_PART_HQ_BUTTON,
- (void *)MpVideoStreamingViewHqButtonDownCb, (void *)pAppData);
-
- edje_object_signal_callback_add(pStreamingViewHiddenPanelEdj,
- SIGNAL_CONTROL_HQ_BUTTON_UP,
- SIGNAL_CONTROL_PART_HQ_BUTTON,
- (void *)MpVideoStreamingViewHqButtonUpCb, (void *)pAppData);
-
- if (MpUtilGetXMLItemCount() > 1) {
- edje_object_signal_emit(pStreamingViewHiddenPanelEdj, SIGNAL_CONTROL_STREAMING_QUALITY_HIGH, "*");
- }
-
MpUtilRegisteEarjackCbFunc((void *)MpVideoStreamingViewChangedEarjackCb, pUserData);
}
}
-void MpVideoStreamingViewInit(void *pUserData, void *pShowInfoViewCb)
+void MpVideoStreamingViewInit(void *pUserData)
{
VideoLogInfo("");
return;
}
- MpVideoStreamingViewInitKeyMouse(pUserData);
- MpVideoStreamingViewInitLayout(pNaviFrameHandle, pUserData, pShowInfoViewCb);
+ MpVideoStreamingViewInitLayout(pNaviFrameHandle, pUserData);
}
/*
* External function
*/
-void MpVideoStreamingViewPush(void *pNaviFrame, void *pShowInfoViewCb, void *pUserData)
+void MpVideoStreamingViewPush(void *pNaviFrame, int nPlayerType, void *pUserData, ChangeStreamingViewCbFunc pChangeViewCb)
{
VideoLogInfo("");
pNaviFrameHandle = pNaviFrame;
+ pChangeViewUserCbFunc = pChangeViewCb;
- MpVideoStreamingViewInit(pUserData, pShowInfoViewCb);
+ MpVideoStreamingViewInit(pUserData);
pNaviFrameItemStreamingView = elm_naviframe_item_push(pNaviFrameHandle,MP_STREAMING_PLAYER_STR, NULL, NULL, pStreamingViewLayout, "video/1line");
if (MpVideoSoundpathIsConnectOtherSoundpath()) {
- pStreamingSoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, pUserData, "video/naviframe/title/default", (void*)MpVideoStreamingViewSoundPathCb);
- elm_object_item_part_content_set(pNaviFrameItemStreamingView, "title_left_btn", pStreamingSoundpathButton);
+ pStreamingSoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, 1, 1, pUserData, "video/naviframe/title/default", (void*)MpVideoStreamingViewSoundPathCb);
+ elm_object_item_part_content_set(pNaviFrameItemStreamingView, "title_right_btn", pStreamingSoundpathButton);
}
MpVideoStreamingViewShowControlPanel(pUserData);
VideoAppData *pAppData = (VideoAppData *)pUserData;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
-}
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+ }
void MpVideoStreamingViewDestroy(void *pUserData)
{
pNaviFrameHandle = NULL;
pBufferingAnimationHandle = NULL;
-
- if (pMouseEventHandler) {
- ecore_event_handler_del(pMouseEventHandler);
- pMouseEventHandler = NULL;
- }
+ pNaviFrameItemStreamingView = NULL;
+ pStreamingViewProgressbarEdj = NULL;
if (pStreamingViewNaviControlBar) {
evas_object_del(pStreamingViewNaviControlBar);
pStreamingViewCtrlEdj = NULL;
}
-// if (pStreamingViewVolLongPressTimer) {
-// ecore_timer_del(pStreamingViewVolLongPressTimer);
-// pStreamingViewVolLongPressTimer = NULL;
-// }
-
-// if (pStreamingViewMutePopupShowTimer) {
-// ecore_timer_del(pStreamingViewMutePopupShowTimer);
-// pStreamingViewMutePopupShowTimer = NULL;
-// }
-
if (pStreamingViewCtrlPanelHideTimer) {
ecore_timer_del(pStreamingViewCtrlPanelHideTimer);
pStreamingViewCtrlPanelHideTimer = NULL;
}
- if (pStreamingViewHiddenPanelEdj) {
- evas_object_del(pStreamingViewHiddenPanelEdj);
- pStreamingViewHiddenPanelEdj = NULL;
+ if (pStreamingSoundpathButton) {
+ evas_object_del(pStreamingSoundpathButton);
+ pStreamingSoundpathButton = NULL;
}
-// bIsVolumeLongPressOfStreamingView = FALSE;
-// bIsVolumePopupShowOfStreamingView = FALSE;
+ bIsStreamingViewScreenLock = FALSE;
+ bIsStreamingViewOnlyAudio = FALSE;
bSwitchStreamingViewUI = TRUE;
nStreamingViewState = MP_STREAMING_VIEW_STATE_UNACTIVATE;
-
-
- bIsStreamingHightQuality = TRUE;
- bIsChangeResolution = FALSE;
+ nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
}
void MpVideoStreamingViewInitAfterBeginOfStream(void *pUserData)
if (pAppData->nDuration > 1) {
char szDurationTime[PLAY_TIME_LENGTH] = { 0 };
- snprintf(szDurationTime, PLAY_TIME_LENGTH, "%" PLAY_TIME_FORMAT,
- PLAY_TIME_ARGS(pAppData->nDuration / 1000));
+ snprintf(szDurationTime, PLAY_TIME_LENGTH, "%" PLAY_TIME_FORMAT, PLAY_TIME_ARGS(pAppData->nDuration / 1000));
MpVideoProgressbarUpdateDurationTime(szDurationTime);
}
MpVideoAnimationCtrlHide();
- edje_object_signal_emit(_EDJ(pStreamingViewLayout),
- SIGNAL_MAIN_ANIMATION_HIDE, "*");
-
+ edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_ANIMATION_HIDE, "*");
edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_PLAY_RESUME, "*");
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
}
void MpVideoStreamingViewUpdatePauseKey(void)
VideoAppData *pAppData = (VideoAppData *)pUserData;
- bSwitchStreamingViewUI = TRUE;
+ if (nStreamingViewState == MP_STREAMING_VIEW_STATE_UNACTIVATE) {
+ VideoLogInfo("");
+ return;
+ }
- evas_object_show(pStreamingViewPanelEdj);
+ bSwitchStreamingViewUI = TRUE;
+ MpVideoProgressbarCreateTimer((void *)pAppData);
- if (MpUtilGetXMLItemCount() < 2) {
- edje_object_signal_emit(pStreamingViewHiddenPanelEdj, SIGNAL_CONTROL_STREAMING_QUALITY_HIDE, "*");
- }
+ evas_object_show(pStreamingViewLayout);
if (pStreamingViewCtrlPanelHideTimer) {
ecore_timer_del(pStreamingViewCtrlPanelHideTimer);
pStreamingViewCtrlPanelHideTimer = NULL;
}
- if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE) {
+ if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE || bIsStreamingViewOnlyAudio == TRUE) {
} else {
pStreamingViewCtrlPanelHideTimer = ecore_timer_add(CTRL_PANEL_SHOW_TIME, MpVideoStreamingViewCtrlPanelHideCb, pUserData);
}
MpVideoStreamingViewActivate();
+ MpVideoStreamingViewUnlockScreen(pUserData);
}
void MpVideoStreamingViewHideControlPanel(void *pUserData)
return;
}
+ if (nStreamingViewState == MP_STREAMING_VIEW_STATE_UNACTIVATE) {
+ VideoLogInfo("");
+ return;
+ }
+
if (!pStreamingViewPanelEdj) {
VideoLogInfo("No exist play control panel edc.");
return;
}
+ if(bIsStreamingViewOnlyAudio)
+ {
+ VideoLogInfo("Not hide control panel and UI because of audio only.");
+ return;
+ }
+
bSwitchStreamingViewUI = FALSE;
+ MpVideoProgressbarDeleteTimer();
- evas_object_hide(pStreamingViewPanelEdj);
+ evas_object_hide(_EDJ(pStreamingViewLayout));
if (pStreamingViewCtrlPanelHideTimer) {
ecore_timer_del(pStreamingViewCtrlPanelHideTimer);
nStreamingViewState = MP_STREAMING_VIEW_STATE_UNACTIVATE;
}
+void MpVideoStreamingViewRotation(int nRotateMode)
+{
+ VideoLogInfo("");
+
+ if (MpVideoStreamingViewGetBufferingState())
+ edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_ANIMATION_SHOW, "*");
+ else
+ edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_ANIMATION_HIDE, "*");
+}
+
void MpVideoStreamingViewSetBufferingRate(int nSetBufferingRate)
{
VideoLogInfo("nSetBufferingRate : %d", nSetBufferingRate);
Elm_Object_Item *pTmpItem = NULL;
if (!pNaviFrameHandle) {
- VideoLogInfo("[ERR] No exist naviframe handle.");
+ VideoLogInfo("[ERR] No exist navigationbar handle.");
return FALSE;
}
return FALSE;
}
+void MpVideoStreamingViewShowNocontentImage(void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (pStreamingViewLayout) {
+ edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_NOCONTENTS_SHOW, "*");
+ }
+
+ bIsStreamingViewOnlyAudio = TRUE;
+
+ MpVideoStreamingViewShowControlPanel(pUserData);
+}
+
+void MpVideoStreamingViewHideNocontentImage(void)
+{
+ VideoLogInfo("");
+
+ if (pStreamingViewLayout) {
+ edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_NOCONTENTS_HIDE, "*");
+ }
+
+ bIsStreamingViewOnlyAudio = FALSE;
+}
+
+void MpVideoStreamingViewLockScreen(void* pUserData)
+{
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+
+ bIsStreamingViewScreenLock = TRUE;
+}
+
+void MpVideoStreamingViewUnlockScreen(void* pUserData)
+{
+ VideoLogInfo("");
+
+ bIsStreamingViewScreenLock = FALSE;
+}
+
+bool MpVideoStreamingViewGetScreenLockState(void)
+{
+ VideoLogInfo("");
+
+ return bIsStreamingViewScreenLock;
+}
+
+void MpVideoStreamingViewPortrate(void)
+{
+ VideoLogInfo("");
+
+ elm_object_item_signal_emit(pNaviFrameItemStreamingView, SIGNAL_NAVIFRAME_PORTRATE_MODE, "*");
+ edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_PORTRATE_MODE, "*");
+ edje_object_signal_emit(pStreamingViewPanelEdj, SIGNAL_PANEL_PORTRATE_MODE, "*");
+ edje_object_signal_emit(pStreamingViewProgressbarEdj, SIGNAL_PROGRESS_PORTRATE_MODE, "*");
+ edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_STREAMING_PORTRATE_MODE, "*");
+}
+
+void MpVideoStreamingViewLandscape(void)
+{
+ VideoLogInfo("");
+
+ elm_object_item_signal_emit(pNaviFrameItemStreamingView, SIGNAL_NAVIFRAME_LANDSCAPE_MODE, "*");
+ edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_LANDSCAPE_MODE, "*");
+ edje_object_signal_emit(pStreamingViewPanelEdj, SIGNAL_PANEL_LANDSCAPE_MODE, "*");
+ edje_object_signal_emit(pStreamingViewProgressbarEdj, SIGNAL_PROGRESS_LANDSCAPE_MODE, "*");
+ edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_STREAMING_LANDSCAPE_MODE, "*");
+}
+
+void MpVideoStreamingViewUpdateProgressBar(void *pUserData)
+{
+ VideoLogInfo("");
+
+ if (!pUserData) {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ MpVideoProgressbarCreateTimer(pUserData);
+
+}
--- /dev/null
+/*
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+ *
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
+ */
+
+
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#include <app.h>
+#include <syspopup_caller.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "mp-external-ug.h"
+#include "mp-video-view-mgr.h"
+#include "mp-video-info-view.h"
+#include "mp-video-type-define.h"
+#include "mp-util-media-service.h"
+#include "mp-video-display-view.h"
+#include "mp-video-string-define.h"
+#include "mp-video-streaming-view.h"
+#include "mp-video-service-ctrl.h"
+
+#define MULTIMEDIA_KEY_LONG_PRESS_INTERVAL 4.0
+#define DETAIL_POPUP_STR_LEN_MAX 20
+
+static Evas_Object *pMainLayout = NULL;
+static Evas_Object *pBackGround = NULL;
+static Evas_Object *pNaviFrame = NULL;
+
+static Evas_Object *pGesture = NULL;
+static Evas_Object *pEventRect = NULL;
+
+static MpVideoRotateType nVideoRotateType = VIDEO_ROTATE_PORTRAIT_NORMAL;
+
+static Ecore_Event_Handler *pHWKeyEventDownHandler = NULL;
+static Ecore_Event_Handler *pHWKeyEventUpHandler = NULL;
+
+static bool bIsLongPressForward = FALSE;
+static bool bIsKeyCancle = FALSE;
+static Ecore_Timer *pLongPressSpeedPlayingTimer = NULL;
+
+static bool bShowLayout = FALSE;
+
+static MpDisplayMethod nCurDisplayMethod = MP_DISPLAY_METHOD_LETTER_BOX;
+
+static int nLastSrcWidth = 0;
+static int nLastSrcHeight = 0;
+
+static int nLastPosX = 0;
+static int nLastPosY = 0;
+static int nLastPosW = 0;
+static int nLastPosH = 0;
+
+static bool bPixmapShowStatus = FALSE;
+
+static void MpVideoVideoViewCtrlLongpressSpeedKeyUp(void *pUserData);
+static void MpVideoVideoViewCtrlLongpressSpeedKeyDown(void *pUserData);
+static void MpVideoViewCtrlChangeViewCb(int nChangePlayerView, void *pUserData);
+
+/*
+ * Callback function.
+ */
+
+static Eina_Bool MpVideoViewCtrlHardkeyDownCb(void *pUserData, int nType, void *pEvent)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return EINA_FALSE;
+ }
+
+ VideoLogInfo("");
+
+ Ecore_Event_Key *pKeyEvent = (Ecore_Event_Key *) pEvent;
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ VideoLogInfo("Key down : %s", pKeyEvent->keyname);
+
+ if(!strcmp(pKeyEvent->keyname, END_KEY))
+ {
+ VideoLogInfo("Back(End) key");
+ }
+ else if(!strcmp(pKeyEvent->keyname, HOME_KEY))
+ {
+ VideoLogInfo("Home key");
+ }
+ else if(!strcmp(pKeyEvent->keyname, POWER_KEY))
+ {
+ VideoLogInfo("Power key");
+ if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY || pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME)
+ {
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ if(MpVideoDisplayViewGetScreenLockState() == FALSE)
+ {
+ MpVideoDisplayViewLockScreen(pUserData);
+ }
+ else
+ {
+ MpVideoDisplayViewUnlockScreen(pUserData);
+ }
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ if(MpVideoStreamingViewGetScreenLockState() == FALSE)
+ {
+ MpVideoStreamingViewLockScreen(pUserData);
+ }
+ else
+ {
+ MpVideoStreamingViewUnlockScreen(pUserData);
+ }
+ }
+ else
+ {
+ MpUtilLcdOffForPowerButton();
+ }
+ }
+ else
+ {
+ MpUtilLcdOffForPowerButton();
+ }
+ }
+ else if(!strcmp(pKeyEvent->keyname, PAUSE_KEY))
+ {
+ VideoLogInfo("Pause key down");
+ }
+ else if(!strcmp(pKeyEvent->keyname, PLAY_KEY))
+ {
+ VideoLogInfo("Play key down");
+ }
+ else if(!strcmp(pKeyEvent->keyname, STOP_KEY))
+ {
+ VideoLogInfo("Stop key down");
+ }
+ else if(!strcmp(pKeyEvent->keyname, NEXT_KEY))
+ {
+ VideoLogInfo("Next key down");
+ }
+ else if(!strcmp(pKeyEvent->keyname, PREV_KEY))
+ {
+ VideoLogInfo("Prev key down");
+ }
+ else if(!strcmp(pKeyEvent->keyname, FORWARD_KEY))
+ {
+ VideoLogInfo("Forward key down");
+ bIsLongPressForward = TRUE;
+ MpVideoVideoViewCtrlLongpressSpeedKeyDown(pUserData);
+ }
+ else if(!strcmp(pKeyEvent->keyname, REWIND_KEY))
+ {
+ VideoLogInfo("Rewind key down");
+ bIsLongPressForward = FALSE;
+ MpVideoVideoViewCtrlLongpressSpeedKeyDown(pUserData);
+ }
+ else if(!strcmp(pKeyEvent->keyname, KEY_CANCLE))
+ {
+ bIsKeyCancle = TRUE;
+ }
+
+ return EINA_FALSE;
+}
+
+static Eina_Bool MpVideoViewCtrlHardkeyUpCb(void *pUserData, int nType, void *pEvent)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return EINA_FALSE;
+ }
+
+ VideoLogInfo("");
+
+ Ecore_Event_Key *pKeyEvent = (Ecore_Event_Key *) pEvent;
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ VideoLogInfo("Key Up : %s", pKeyEvent->keyname);
+
+ if(bIsKeyCancle)
+ {
+ VideoLogInfo("KEY CANCLE.");
+ bIsKeyCancle = FALSE;
+ return EINA_FALSE;
+ }
+
+ if(!strcmp(pKeyEvent->keyname, END_KEY))
+ {
+ VideoLogInfo("End key up");
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+ }
+ else if(!strcmp(pKeyEvent->keyname, HOME_KEY))
+ {
+ VideoLogInfo("Home key up");
+ }
+ else if(!strcmp(pKeyEvent->keyname, POWER_KEY))
+ {
+ VideoLogInfo("Power key up");
+ }
+ else if(!strcmp(pKeyEvent->keyname, PAUSE_KEY))
+ {
+ VideoLogInfo("Pause key up");
+ if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY || pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME)
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+ }
+ else if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE)
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+ }
+ }
+ else if(!strcmp(pKeyEvent->keyname, PLAY_KEY))
+ {
+ VideoLogInfo("Play key up");
+ if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY || pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME)
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+ }
+ else if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE)
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+ }
+ }
+ else if(!strcmp(pKeyEvent->keyname, STOP_KEY))
+ {
+ VideoLogInfo("Stop key up");
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+ }
+ else if(!strcmp(pKeyEvent->keyname, NEXT_KEY))
+ {
+ VideoLogInfo("Next key up");
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayNextMedia(pAppData);
+ }
+ else if(!strcmp(pKeyEvent->keyname, PREV_KEY))
+ {
+ VideoLogInfo("Prev key up");
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayPreMedia(pAppData);
+ }
+ else if(!strcmp(pKeyEvent->keyname, FORWARD_KEY))
+ {
+ VideoLogInfo("Forward key up");
+ MpVideoVideoViewCtrlLongpressSpeedKeyUp(pUserData);
+ }
+ else if(!strcmp(pKeyEvent->keyname, REWIND_KEY))
+ {
+ VideoLogInfo("Rewind key up");
+ MpVideoVideoViewCtrlLongpressSpeedKeyUp(pUserData);
+ }
+ else
+ {
+ }
+
+ return EINA_FALSE;
+}
+
+static Evas_Event_Flags MpVideoViewCtrlGestureNTabStartCb(void *pUserData , void *pEventInfo)
+{
+ VideoLogInfo("");
+
+
+ return EVAS_EVENT_FLAG_NONE;
+}
+
+static Evas_Event_Flags MpVideoViewCtrlGestureNTabEndCb(void *pUserData , void *pEventInfo)
+{
+ VideoLogInfo("");
+
+ Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) pEventInfo;
+ if(p->n == 1) {
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ if(bShowLayout) {
+ int nWidth = 0;
+ int nHeight = 0;
+ int nMinY = 0;
+ int nMaxY = 0;
+
+ evas_object_geometry_get(pMainLayout, NULL, NULL, &nWidth, &nHeight);
+
+ if(MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_NORMAL ||
+ MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_REVERSE)
+ {
+ nMinY = (elm_config_scale_get() * 223);
+ nMaxY = nHeight - ( elm_config_scale_get() * 215);
+ }
+ else
+ {
+ nMinY = (elm_config_scale_get() * 223);
+ nMaxY = nHeight - ( elm_config_scale_get() * 204);
+ }
+
+ if(p->y > nMinY && p->y < nMaxY)
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+ }
+ } else {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+ }
+ }
+
+ return EVAS_EVENT_FLAG_NONE;
+}
+
+static Evas_Event_Flags MpVideoViewCtrlGestureNTabAbortCb(void *pUserData , void *pEventInfo)
+{
+ VideoLogInfo("");
+
+ return EVAS_EVENT_FLAG_NONE;
+}
+
+
+/*
+ * Internal function.
+ */
+static void MpVideoViewCtrlScreenRotationInit(int nRotateMode, void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR] No exist pUserData.");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ MpUtilRotateWindow(nRotateMode, pAppData->pMainWindow);
+ nVideoRotateType = nRotateMode;
+ MpVideoViewCtrlSetRotation(nVideoRotateType, pUserData);
+}
+
+static Evas_Object *MpVideoViewCtrlCreateBg(Evas_Object *pWindow)
+{
+ Evas_Object *pBg = elm_bg_add(pWindow);
+ evas_object_size_hint_weight_set(pBg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_bg_color_set(pBg, 0, 0, 0);
+ elm_win_resize_object_add(pWindow, pBg);
+
+ return pBg;
+}
+
+static Evas_Object *MpVideoViewCtrlCreateMainLayout(Evas_Object *pParent)
+{
+ if(!pParent)
+ {
+ VideoLogInfo("[ERR]");
+ return NULL;
+ }
+
+ VideoLogInfo("");
+
+ if(pMainLayout)
+ {
+ evas_object_del(pMainLayout);
+ pMainLayout = NULL;
+ }
+
+ pMainLayout = elm_layout_add(pParent);
+
+ elm_layout_theme_set(pMainLayout, "layout", "application", "video");
+
+ evas_object_size_hint_weight_set(pMainLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ elm_win_resize_object_add(pParent, pMainLayout);
+
+ pBackGround = MpVideoViewCtrlCreateBg(pParent);
+
+ evas_object_show(pParent);
+
+ evas_object_show(pMainLayout);
+
+ return pMainLayout;
+}
+
+static void MpVideoViewCtrlCreateEventRect(void *pUserData, Evas_Object *pParent)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ if(!pParent)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+}
+
+ VideoLogInfo("");
+
+ pEventRect = evas_object_rectangle_add(evas_object_evas_get(pParent));
+ evas_object_color_set(pEventRect, 0, 0, 0, 0);
+
+ elm_object_part_content_set(pParent, "elm.swallow.event", pEventRect);
+
+ pGesture = elm_gesture_layer_add(pEventRect);
+
+ elm_gesture_layer_cb_set(pGesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_START, MpVideoViewCtrlGestureNTabStartCb, pUserData);
+ elm_gesture_layer_cb_set(pGesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_END, MpVideoViewCtrlGestureNTabEndCb, pUserData);
+ elm_gesture_layer_cb_set(pGesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_ABORT, MpVideoViewCtrlGestureNTabAbortCb, pUserData);
+
+ evas_object_repeat_events_set(pEventRect, EINA_TRUE);
+
+ elm_gesture_layer_attach(pGesture, pEventRect);
+
+ evas_object_show(pEventRect);
+}
+
+static Evas_Object *MpVideoViewCtrlCreateNaviFrame(Evas_Object *pParent, void* pUserData)
+{
+ if(!pParent)
+ {
+ VideoLogInfo("[ERR]");
+ return NULL;
+ }
+
+ VideoLogInfo("");
+
+ if(pNaviFrame)
+ {
+ evas_object_del(pNaviFrame);
+ pNaviFrame = NULL;
+ }
+
+ pNaviFrame = elm_naviframe_add(pParent);
+
+ elm_object_part_content_set(pParent, "elm.swallow.content", pNaviFrame);
+
+ elm_naviframe_prev_btn_auto_pushed_set(pNaviFrame, EINA_FALSE);
+
+ evas_object_show(pNaviFrame);
+
+ return pNaviFrame;
+}
+
+static void MpVideoViewCtrlSetVideoViews(VideoAppData *pAppData, int nPlayerType)
+{
+ VideoLogInfo("%p",pAppData);
+
+ MpVideoServiceCtrlSetPlayerType(nPlayerType);
+
+ switch(nPlayerType)
+ {
+ case MP_VIDEO_PLAYER:
+ VideoLogInfo("MP_VIDEO_PLAYER");
+ MpVideoDisplayViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+ break;
+
+ case MP_VIDEO_PLAYER_SIMPLE:
+ VideoLogInfo("MP_VIDEO_PLAYER_SIMPLE");
+ MpVideoDisplayViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+ break;
+
+ case MP_VIDEO_PLAYER_EMAIL:
+ VideoLogInfo("MP_VIDEO_PLAYER_EMAIL");
+ MpVideoDisplayViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+ break;
+
+ case MP_VIDEO_PLAYER_MMS:
+ VideoLogInfo("MP_VIDEO_PLAYER_MMS");
+ MpVideoDisplayViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+ break;
+
+ case MP_VIDEO_PLAYER_GALLERY:
+ VideoLogInfo("MP_VIDEO_PLAYER_GALLERY");
+ MpVideoDisplayViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+ break;
+
+ case MP_STREAMING_PLAYER:
+ VideoLogInfo("MP_STREAMING_PLAYER");
+ MpVideoStreamingViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+ break;
+
+ default:
+ VideoLogInfo("[ERR] No exist player tpye.");
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+ }
+}
+
+static void MpVideoViewCtrlShowNaviFrame(void)
+{
+ VideoLogInfo("");
+
+ if(pNaviFrame)
+ {
+ elm_object_part_content_set(pMainLayout, "elm.swallow.content", pNaviFrame);
+ evas_object_show(pNaviFrame);
+ }
+}
+
+static void MpVideoViewCtrlHideNaviFrame(void)
+{
+ VideoLogInfo("");
+
+ if(pNaviFrame)
+ {
+ elm_object_part_content_unset(pMainLayout, "elm.swallow.content");
+ evas_object_hide(pNaviFrame);
+ }
+}
+
+static Eina_Bool MpVideoVideoViewCtrlSpeedKeyLongPressCb(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return EINA_FALSE;
+ }
+
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ if(pAppData->nPlayingSpeed > MP_PLAYING_SPEED_MAX)
+ {
+ if(pLongPressSpeedPlayingTimer)
+ {
+ ecore_timer_del(pLongPressSpeedPlayingTimer);
+ pLongPressSpeedPlayingTimer = NULL;
+ }
+
+ return EINA_FALSE;
+ }
+
+ ++pAppData->nPlayingSpeed;
+
+ if(bIsLongPressForward)
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedFF(pAppData);
+ }
+ else
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedRew(pAppData);
+ }
+
+ return EINA_TRUE;
+}
+
+static void MpVideoVideoViewCtrlLongpressSpeedKeyDown(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("No exist pUserData.");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ pAppData->nPlayingSpeed = MP_PLAYING_SPEED_2X;
+
+ if(bIsLongPressForward)
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedFF(pAppData);
+ }
+ else
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedRew(pAppData);
+ }
+
+ if(pLongPressSpeedPlayingTimer)
+ {
+ ecore_timer_del(pLongPressSpeedPlayingTimer);
+ pLongPressSpeedPlayingTimer = NULL;
+ }
+
+ pLongPressSpeedPlayingTimer = ecore_timer_add(MULTIMEDIA_KEY_LONG_PRESS_INTERVAL, MpVideoVideoViewCtrlSpeedKeyLongPressCb, (void *)pAppData);
+}
+
+static void MpVideoVideoViewCtrlLongpressSpeedKeyUp(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("No exist pUserData.");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ bIsLongPressForward = FALSE;
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedReset(pAppData);
+
+ if(pLongPressSpeedPlayingTimer)
+ {
+ ecore_timer_del(pLongPressSpeedPlayingTimer);
+ pLongPressSpeedPlayingTimer = NULL;
+ }
+}
+
+static void MpVideoViewCtrlChangeViewCb(int nChangePlayerView, void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ MpVideoViewCtrlSetVideoViews((VideoAppData*)pUserData, nChangePlayerView);
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlReLaunching(pAppData);
+ }
+
+/*
+ * External function.
+ */
+bool MpVideoViewCtrlInit(VideoAppData *pAppData)
+{
+ if(!pAppData)
+ {
+ VideoLogInfo("[ERR]");
+ return FALSE;
+ }
+
+ VideoLogInfo("");
+
+ if(pHWKeyEventDownHandler)
+ {
+ ecore_event_handler_del(pHWKeyEventDownHandler);
+ pHWKeyEventDownHandler = NULL;
+ }
+
+ if(pHWKeyEventUpHandler)
+ {
+ ecore_event_handler_del(pHWKeyEventUpHandler);
+ pHWKeyEventUpHandler = NULL;
+ }
+
+ pHWKeyEventDownHandler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, (void *)MpVideoViewCtrlHardkeyDownCb, (void *)pAppData);
+ pHWKeyEventUpHandler = ecore_event_handler_add(ECORE_EVENT_KEY_UP, (void *)MpVideoViewCtrlHardkeyUpCb, (void *)pAppData);
+ elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+
+ MpVideoViewCtrlCreateMainLayout(pAppData->pMainWindow);
+ MpVideoViewCtrlCreateEventRect((void *)pAppData, pMainLayout);
+ MpVideoViewCtrlCreateNaviFrame(pMainLayout, (void*)pAppData);
+
+ MpVideoViewCtrlSetVideoViews(pAppData, MpVideoServiceCtrlGetPlayerType());
+ MpVideoViewCtrlScreenRotationInit(MpUtilGetRotationState(), (void *)pAppData);
+
+ return TRUE;
+}
+
+void MpVideoViewCtrlDestroy(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ MpExternalUgUnload();
+
+ MpVideoInfoViewDestroy();
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpVideoDisplayViewDestroy(pUserData);
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ MpVideoStreamingViewDestroy(pUserData);
+ }
+
+
+ if(pGesture)
+ {
+ evas_object_del(pGesture);
+ pGesture = NULL;
+ }
+
+ if(pEventRect)
+ {
+ evas_object_del(pEventRect);
+ pEventRect = NULL;
+ }
+
+ if(pHWKeyEventDownHandler)
+ {
+ ecore_event_handler_del(pHWKeyEventDownHandler);
+ pHWKeyEventDownHandler = NULL;
+ }
+
+ if(pHWKeyEventUpHandler)
+ {
+ ecore_event_handler_del(pHWKeyEventUpHandler);
+ pHWKeyEventUpHandler = NULL;
+ }
+
+ if(pMainLayout)
+ {
+ evas_object_del(pMainLayout);
+ pMainLayout = NULL;
+ }
+
+ if(pNaviFrame)
+ {
+ evas_object_del(pNaviFrame);
+ pNaviFrame = NULL;
+ }
+
+ if(pLongPressSpeedPlayingTimer)
+ {
+ ecore_timer_del(pLongPressSpeedPlayingTimer);
+ pLongPressSpeedPlayingTimer = NULL;
+ }
+
+ if(pBackGround)
+ {
+ evas_object_del(pBackGround);
+ pBackGround = NULL;
+ }
+
+ bIsLongPressForward = FALSE;
+ bIsKeyCancle = FALSE;
+
+ nVideoRotateType = VIDEO_ROTATE_PORTRAIT_NORMAL;
+}
+
+void MpVideoViewCtrlSetRotation(int nRotateMode, void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR] No exist pUserData.");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ if(nRotateMode == VIDEO_ROTATE_UNKNOWN)
+ {
+ nRotateMode = MpUtilGetRotationState();
+ }
+
+ nVideoRotateType = nRotateMode;
+
+ MpUtilSetRotationState(nVideoRotateType);
+
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlRotateScreen(pAppData, nVideoRotateType);
+
+ MpUtilRotateWindow(nVideoRotateType, pAppData->pMainWindow);
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ if(nVideoRotateType == VIDEO_ROTATE_PORTRAIT_NORMAL || nVideoRotateType == VIDEO_ROTATE_PORTRAIT_REVERSE)
+ {
+ MpVideoDisplayViewPortrate();
+ }
+ else if(nVideoRotateType == VIDEO_ROTATE_LANDSCAPE_NORMAL || nVideoRotateType == VIDEO_ROTATE_LANDSCAPE_REVERSE)
+ {
+ MpVideoDisplayViewLandscape();
+ }
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ MpVideoStreamingViewRotation(nVideoRotateType);
+ }
+ else
+ {
+ }
+}
+
+void MpVideoViewCtrlInitAfterBeginOfStream(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpVideoDisplayViewInitAfterBeginOfStream(pUserData);
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ MpVideoStreamingViewInitAfterBeginOfStream(pUserData);
+ }
+ else
+ {
+ }
+}
+
+void MpVideoViewCtrlPause(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpVideoDisplayViewUpdatePauseKey();
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ MpVideoStreamingViewUpdatePauseKey();
+ }
+ else
+ {
+ }
+}
+
+void MpVideoViewCtrlResume(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpVideoDisplayViewUpdateResumeKey();
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ MpVideoStreamingViewUpdateResumeKey();
+ }
+ else
+ {
+ }
+}
+
+void MpVideoViewShowLayout(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ if(!MpVideoDisplayViewGetScreenLockState())
+ {
+ elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+ MpVideoViewCtrlShowNaviFrame();
+ bShowLayout = TRUE;
+
+ MpVideoDisplayViewActivate();
+ MpVideoDisplayViewShowControlPanel(pUserData);
+ }
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ if(!MpVideoStreamingViewGetScreenLockState())
+ {
+ elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+ MpVideoViewCtrlShowNaviFrame();
+ bShowLayout = TRUE;
+ }
+
+ MpVideoStreamingViewShowControlPanel(pUserData);
+ }
+}
+
+void MpVideoViewHideLayout(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+
+ bShowLayout = FALSE;
+
+ MpVideoViewCtrlHideNaviFrame();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpVideoDisplayViewHideControlPanel(pUserData);
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ MpVideoStreamingViewHideControlPanel(pUserData);
+ }
+}
+
+void MpVideoViewSetBufferingRateForStreamingView(int nSetBufferingRate, void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ if(MpUtilCheckRTSPType(pAppData->szMediaUri))
+ {
+ if(nSetBufferingRate == 0)
+ {
+ MpVideoStreamingViewSetBufferingRate(-1);
+ }
+ else
+ {
+ MpVideoStreamingViewSetBufferingRate(nSetBufferingRate);
+ }
+ }
+ else
+ {
+ if(nSetBufferingRate >= 0)
+ {
+ MpVideoStreamingViewSetBufferingRate(nSetBufferingRate);
+ }
+ }
+ }
+}
+
+void MpVideoViewHideSoundpath(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpVideoDisplayViewHideSoundpath();
+ }
+}
+
+void MpVideoViewCtrlChangeTitle(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpVideoDisplayViewChangeNaviFrameTitle(pUserData);
+ }
+ else
+ {
+ }
+}
+
+bool MpVideoViewCtrlIsTopView(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return FALSE;
+ }
+
+ VideoLogInfo("");
+
+ bool bIstopView = FALSE;
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ VideoLogInfo("VIDEO PLAYER");
+ bIstopView = MpVideoDisplayViewIsTopView();
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ VideoLogInfo("STREAMING PLAYER");
+ bIstopView = MpVideoStreamingViewIsTopView();
+ }
+
+ return bIstopView;
+}
+
+void MpVideoViewCtrlShowNocontentImage(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpVideoDisplayViewShowNocontentImage(pUserData);
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ MpVideoStreamingViewShowNocontentImage(pUserData);
+ }
+}
+
+void MpVideoViewCtrlHideNocontentImage(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("[ERR]");
+ return;
+ }
+
+ VideoLogInfo("");
+
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ MpVideoDisplayViewHideNocontentImage();
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ MpVideoStreamingViewHideNocontentImage();
+ }
+}
+
+void MpVideoViewCtrlResetProgressBar(void *pUserData)
+{
+ VideoLogInfo("");
+
+ MpVideoDisplayViewResetProgressBar(pUserData);
+}
+
+void MpVideoViewCtrlUpdateProgressbar(void *pUserData)
+{
+ if(!pUserData)
+ {
+ VideoLogInfo("No exist pUserData.");
+ return;
+ }
+ VideoLogInfo("");
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ VideoLogInfo("VIDEO PLAYER");
+ MpVideoDisplayViewUpdateProgressBar(pUserData);
+ }
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ VideoLogInfo("STREAMING PLAYER");
+ MpVideoStreamingViewUpdateProgressBar(pUserData);
+ }
+}
+
+
+bool MpVideoViewCtrlIsPauseByUser(void)
+{
+ VideoLogInfo("");
+
+ return MpVideoDisplayViewIsPauseByUser();
+}
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+ *
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * http://www.tizenopensource.org/license
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * 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.
+ * http://www.tizenopensource.org/license
+ *
+ * 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.
*/
-
#include <glib.h>
#include <string.h>
#include <libxml/parser.h>
#define MAX_YT_FORMAT 10
/*
+ * format of Youtube content
*
* 1 : rtsp | video/3gpp | H.263 / AMR audio |
* 176 * 144
return 0;
}
- fread(*data, file_size, 1, fp);
+ unsigned int nReadCounter = fread(*data, file_size, 1, fp);
+ VideoLogInfo("nReadCounter : %d", nReadCounter);
fclose(fp);
return file_size;
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
*
- * http://www.tizenopensource.org/license
+ * Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
*
- * 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.
+ * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
+ *
+ * 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.
*/
-
-
-#include <appcore-efl.h>
-
+#include <app.h>
#include <glib.h>
-#include <pmapi.h>
+#include <power.h>
#include "mp-util.h"
#include "mp-video-log.h"
#include "mp-video-app-ctrl.h"
#include "mp-util-media-service.h"
#include "mp-video-string-define.h"
+#include "mp-external-ug.h"
+#include "mp-video-service-ctrl.h"
+
static bool bIsForeground = FALSE;
-static int app_init(void *pUserData);
-static int app_exit(void *pUserData);
-static int app_reset(bundle *pBundle, void *pUserData);
-static int app_pause(void *pUserData);
-static int app_resume(void *pUserData);
-static int app_init(void *pUserData)
+static bool appCreate(void *pUserData)
{
VideoLogInfo("");
if (!pUserData) {
VideoLogInfo("[ERR] No exist pUserData.");
- return 0;
+ return FALSE;
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
- appcore_set_i18n(PACKAGE, LOCALEDIR);
+#ifdef TARGET
+ elm_config_preferred_engine_set("opengl_x11");
+#else
+ elm_config_preferred_engine_set("software_x11");
+#endif
+
elm_theme_extension_add(NULL, VIDEO_CUSTOM_THEME);
MpUtilInitSession();
MpUtilVolumeTypeSet();
-
MpUtilLanguageInit(pAppData);
- return 0;
+
+ bIsForeground = FALSE;
+ MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+ return TRUE;
}
-static int app_reset(bundle *pBundle, void *pUserData)
+static void appService(service_h pAppSvcHandle, void *pUserData)
{
VideoLogInfo("");
-
- if (bIsForeground) {
- VideoLogInfo("Defence overlap launching.");
- return 0;
- } else {
- bIsForeground = TRUE;
- }
-
- if (!pBundle) {
- VideoLogInfo("[ERR] No exist pBundle.");
- return 0;
- }
-
- if (!pUserData) {
+ if(!pUserData)
+ {
VideoLogInfo("[ERR] No exist pUserData.");
- return 0;
+ bIsForeground = FALSE;
+ MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+ return;
}
VideoAppData *pAppData = (VideoAppData *)pUserData;
- if (strlen(pAppData->szMediaUri) > 0) {
+ if(!pAppSvcHandle)
+ {
+ VideoLogInfo("[ERR] No exist pBundle.");
+ bIsForeground = FALSE;
+ MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+ return;
+ }
+
+ if(strlen(pAppData->szMediaUri) > 0)
+ {
MpVideoAppCtrlResetForRelaunching(pAppData);
}
- if (pAppData->pMainWindow == NULL) {
+ if(pAppData->pMainWindow == NULL)
+ {
VideoLogInfo("Create main window.");
pAppData->pMainWindow = (Evas_Object *)MpUtilCreateMainWindow(PACKAGE);
+ evas_object_show(pAppData->pMainWindow);
}
MpUtilSetKeyGrab(HOME_KEY, KEY_GRAB_SHARED);
MpUtilMediaSvcInitSession();
- if (bundle_get_count(pBundle) < 1) {
- VideoLogInfo("UI gadget bundle value should > 0");
- return 0;
- }
-
- if (MpUtilCheckLaunchingByMime(pBundle, pAppData->szMediaUri)) {
- VideoLogInfo("=== SETTING VIDEO TYPE ===");
- VideoLogInfo("Launching by mime. Path : %s",
- pAppData->szMediaUri);
- pAppData->nCurPlayerType = MP_VIDEO_PLAYER;
- } else {
- if(!MpUtilGetURIFromBundle(pBundle, pAppData))
- {
- if(!MpUtilGetURIFromAUL(pBundle, pAppData))
- {
- VideoLogInfo("[ERR] Fail to get URI path from AUL.");
- return 0;
- }
- }
-
- if (MpUtilIsXMLUrl(pAppData->szMediaUri)) {
- if (!MpUtilParsingXML(pAppData->szMediaUri, pAppData)) {
- VideoLogInfo("[ERR] Fail to get streaming URI path from XML.");
- return 0;
- }
- } else {
- if (!MpUtilCheckVideoURI(pAppData)) {
- VideoLogInfo("[ERR] Fail to get video/streaming URI path.");
- return 0;
- }
- if (pAppData->nCurPlayerType == MP_STREAMING_PLAYER) {
- MpUtilGetCookieFromBundle(pBundle, pAppData);
- }
- }
+ if(MpVideoServiceCtrlInitServiceParser((void*)pAppSvcHandle, pAppData->szMediaUri) == MP_ERROR_PLAYER_TYPE)
+ {
+ VideoLogInfo("[ERR] Fail to init service parser.");
+ bIsForeground = FALSE;
+ MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+ return;
}
- if (!MpUtilMMCstatusNoti(pAppData)) {
+ if(!MpUtilMMCstatusNoti(pAppData))
+ {
VideoLogInfo("[ERR] Fail to set MMC notification.");
- return 0;
- }
-
- if (!MpUtilBatteryStatusNoti(pAppData)) {
- VideoLogInfo("[ERR] Fail to set Battery notification.");
- return 0;
+ bIsForeground = FALSE;
+ MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+ return;
}
- pAppData->nLaunchingAppType = (MpLaunchingAppType) MpUtilCheckLaunchingByOtherApp(pBundle, MP_VIDEO_LAUNCHING_BY_APP_KEY);
- pAppData->nVideoSortType = (MpMediaSortType) MpUtilCheckSortType(pBundle, MP_VIDEO_SORT_TYPE_KEY);
- pAppData->nVideoListType = (MpVideoListType) MpUtilCheckListType(pBundle, MP_VIDEO_LIST_TYPE_KEY);
- pAppData->nSetPosition = MpUtilCheckStartPositionTime(pBundle, MP_VIDEO_START_POS_TIME_KEY);
- if (pAppData->nVideoListType == MP_VIDEO_LIST_TYPE_TAG_GALLERY) {
- MpUtilGetTagNameOfGallery(pBundle, MP_VIDEO_TAG_NAME_KEY, pAppData->szTagNameForVideoList);
- VideoLogInfo("Gallery tag name : %s", pAppData->szTagNameForVideoList);
+ if(!MpUtilBatteryStatusNoti(pAppData))
+ {
+ VideoLogInfo("[ERR] Fail to set Battery notification.");
+ bIsForeground = FALSE;
+ MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+ return;
}
MpUtilVolumeTypeSet();
- pm_lock_state(LCD_NORMAL, GOTO_STATE_NOW, 0);
MpVideoAppCtrlInit(pAppData);
-
- evas_object_show(pAppData->pMainWindow);
- elm_win_activate(pAppData->pMainWindow);
-
- return 0;
}
-static int app_exit(void *pUserData)
+static void appExit(void *pUserData)
{
VideoLogInfo("");
if (!pUserData) {
VideoLogInfo("[ERR] No exist pUserData.");
- return 0;
+ return;
}
- pm_unlock_state(LCD_NORMAL, GOTO_STATE_NOW);
+ power_unlock_state(POWER_STATE_NORMAL);
MpUtilSetKeyUngrab(HOME_KEY);
MpUtilMultimediaKeyUngrab();
MpUtilVolumeTypeUnset();
MpUtilFinishSession();
MpUtilDeletePopupHandle();
- MpUtilMediaSvcMtagIterateDestroyTagList();
MpUtilMediaSvcDestoryVideoList();
MpUtilMediaSvcFinishSession();
MpUtilDestroyXML();
bIsForeground = FALSE;
-
- return 0;
+ MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
}
-static int app_pause(void *pUserData)
+static void appPause(void *pUserData)
{
if(!pUserData)
{
- VideoLogInfo("Not exist pUserData.");
- return 0;
+ VideoLogInfo("No exist pUserdata handle.");
+ return;
}
VideoLogInfo("");
VideoAppData *pAppData = (VideoAppData *)pUserData;
-/*
- if (!MpVideoAppCtrlIsTopView(pUserData)) {
- VideoLogInfo("Overlay is not staied in top.");
- } else {
- if (MpVideoAppCtrlIsExistPlayerHandle()) {
- pAppData->nPrePlayerState = pAppData->nCurPlayerState;
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+ int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+ if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+ nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+ {
+ VideoLogInfo("Pause application at video player.");
}
- }
-*/
- if (pAppData->nCurPlayerType == MP_STREAMING_PLAYER) {
- VideoLogInfo("Push Home key at Streaming player Player.");
+ else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+ {
+ VideoLogInfo("Pause application at streaming player.");
pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
- } else if (pAppData->nCurPlayerType == MP_VIDEO_PLAYER) {
- VideoLogInfo("Push Home key at video player.");
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause(pAppData);
- }
- MpUtilDeletePopupHandle();
+ }
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+
+ MpUtilDeletePopupHandle();
MpUtilVolumeTypeUnset();
elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
bIsForeground = FALSE;
-
- return 0;
+ MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
}
-static int app_resume(void *pUserData)
+static void appResume(void *pUserData)
{
if(!pUserData)
{
- VideoLogInfo("Not exist pUserData.");
- return 0;
+ VideoLogInfo("No exist pUserdata handle.");
+ return;
}
VideoLogInfo("");
- if (bIsForeground) {
+ VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+ if(bIsForeground)
+ {
VideoLogInfo("Defence overlap launching.");
- return 0;
+ return;
}
- if (!MpVideoAppCtrlIsTopView(pUserData)) {
- VideoLogInfo("Overlay is not staied in top.");
- return 0;
- }
+ if(!MpVideoAppCtrlIsTopView(pUserData))
+ {
+ VideoLogInfo("Overlay is not staied in top.");
+ return;
+ }
- VideoAppData *pAppData = (VideoAppData *)pUserData;
+ VideoLogInfo("Resume application.");
+
+ if(MpVideoAppCtrlIsExistPlayerHandle())
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+ }
+ else
+ {
+ pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartByAppResume(pAppData);
+ }
MpUtilVolumeTypeSet();
elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
- if (MpVideoAppCtrlIsExistPlayerHandle()) {
- if (pAppData->nPrePlayerState == MP_PLAYER_STATE_RESUME || pAppData->nPrePlayerState == MP_PLAYER_STATE_PLAY) {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
- }
- } else {
- pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartByAppResume(pAppData);
- }
-
bIsForeground = TRUE;
+ MpVideoAppCtrlSetForCheckingForegroundwindow(TRUE);
+}
- return 0;
+static void appRotate(app_device_orientation_e rotateState, void *pUserData)
+{
+ VideoLogInfo("");
+
+ int nCurRotate = 0;
+
+ switch(rotateState)
+ {
+ case APP_DEVICE_ORIENTATION_0:
+ VideoLogInfo("VIDEO_ROTATE_PORTRAIT_NORMAL");
+ nCurRotate = VIDEO_ROTATE_PORTRAIT_NORMAL;
+ break;
+
+ case APP_DEVICE_ORIENTATION_90:
+ VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_REVERSE");
+ nCurRotate = VIDEO_ROTATE_LANDSCAPE_REVERSE;
+ break;
+
+ case APP_DEVICE_ORIENTATION_180:
+ VideoLogInfo("VIDEO_ROTATE_PORTRAIT_REVERSE");
+ nCurRotate = VIDEO_ROTATE_PORTRAIT_REVERSE;
+ break;
+
+ case APP_DEVICE_ORIENTATION_270:
+ VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_NORMAL");
+ nCurRotate = VIDEO_ROTATE_LANDSCAPE_NORMAL;
+ break;
+ }
+
+ MpVideoAppCtrlSetRotation(nCurRotate, pUserData);
}
int main(int argc, char *argv[])
gettimeofday(&TimeVal, NULL);
VideoLogInfo("======================================================");
- VideoLogInfo(" Measuring exec() launching time - %ld:%ldus",
- TimeVal.tv_sec, TimeVal.tv_usec);
+ VideoLogInfo(" Measuring exec() launching time - %ld:%ldus", TimeVal.tv_sec, TimeVal.tv_usec);
VideoLogInfo("======================================================");
VideoAppData pAppData;
memset(&pAppData, 0, sizeof(VideoAppData));
- struct appcore_ops ops = {
- .create = app_init,
- .terminate = app_exit,
- .pause = app_pause,
- .resume = app_resume,
- .reset = app_reset,
- .data = (void *)&pAppData,
- };
+ app_event_callback_s st_appEventService;
+
+ st_appEventService.create = appCreate;
+ st_appEventService.terminate = appExit;
+ st_appEventService.pause = appPause;
+ st_appEventService.resume = appResume;
+ st_appEventService.service = appService;
+ st_appEventService.low_memory = NULL;
+ st_appEventService.low_battery = NULL;
+ st_appEventService.device_orientation = appRotate;
+ st_appEventService.language_changed = NULL;
+ st_appEventService.region_format_changed = NULL;
- if (appcore_efl_main(PACKAGE, &argc, &argv, &ops) == -1)
+ if(app_efl_main(&argc, &argv, &st_appEventService, &pAppData) != APP_ERROR_NONE)
+ {
+ VideoLogInfo("[ERR] app_efl_main().");
return -1;
+ }
+
+ VideoLogInfo("escape app_efl_main() loop.");
return 0;
}