From 6091bab0b9f67259090cfc2948e4bec5849eb53e Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Mon, 15 May 2017 16:15:27 +0900 Subject: [PATCH] Add routine to support TV profile Change-Id: I40041d649932103b9c582482bf898014a20efa73 Signed-off-by: sungwook79.park --- CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++-- inc/w-input-selector.h | 3 +++ src/MoreOption.cpp | 2 ++ src/w-input-selector.cpp | 11 ++++++++++- src/w-input-stt-voice.cpp | 6 ++++++ 5 files changed, 56 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef55ae5..85287b4 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,6 +105,35 @@ ADD_DEPENDENCIES(${PROJECT_NAME} w-input-stt-button.edj) INSTALL(FILES ${CMAKE_BINARY_DIR}/res/wearable/edje/w-input-stt-button.edj DESTINATION ${INPUTDELEGATOR_RESDIR}/edje/wearable) +elseif(${TARGET} STREQUAL "tv") +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/res/tv/edje) +ADD_CUSTOM_TARGET(w-input-selector.edj COMMAND edje_cc + -id ${CMAKE_CURRENT_SOURCE_DIR}/edje/tv/images + ${CMAKE_CURRENT_SOURCE_DIR}/res/tv/edje/w-input-selector.edc + ${CMAKE_BINARY_DIR}/res/tv/edje/w-input-selector.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/tv/edje/w-input-selector.edc) +ADD_DEPENDENCIES(${PROJECT_NAME} w-input-selector.edj) +INSTALL(FILES ${CMAKE_BINARY_DIR}/res/tv/edje/w-input-selector.edj DESTINATION +${INPUTDELEGATOR_RESDIR}/edje/tv) + +ADD_CUSTOM_TARGET(w-input-stt.edj COMMAND edje_cc + -id ${CMAKE_CURRENT_SOURCE_DIR}/edje/tv/images + ${CMAKE_CURRENT_SOURCE_DIR}/res/tv/edje/w-input-stt.edc + ${CMAKE_BINARY_DIR}/res/tv/edje/w-input-stt.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/tv/edje/w-input-stt.edc) +ADD_DEPENDENCIES(${PROJECT_NAME} w-input-stt.edj) +INSTALL(FILES ${CMAKE_BINARY_DIR}/res/tv/edje/w-input-stt.edj DESTINATION +${INPUTDELEGATOR_RESDIR}/edje/tv) + +ADD_CUSTOM_TARGET(w-input-stt-button.edj COMMAND edje_cc + -id ${CMAKE_CURRENT_SOURCE_DIR}/edje/tv/images + ${CMAKE_CURRENT_SOURCE_DIR}/res/tv/edje/w-input-stt-button.edc + ${CMAKE_BINARY_DIR}/res/tv/edje/w-input-stt-button.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/res/tv/edje/w-input-stt-button.edc) +ADD_DEPENDENCIES(${PROJECT_NAME} w-input-stt-button.edj) +INSTALL(FILES ${CMAKE_BINARY_DIR}/res/tv/edje/w-input-stt-button.edj DESTINATION +${INPUTDELEGATOR_RESDIR}/edje/tv) + else() file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/res/mobile/edje) ADD_CUSTOM_TARGET(w-input-selector.edj COMMAND edje_cc @@ -133,7 +162,6 @@ ADD_CUSTOM_TARGET(w-input-stt-button.edj COMMAND edje_cc ADD_DEPENDENCIES(${PROJECT_NAME} w-input-stt-button.edj) INSTALL(FILES ${CMAKE_BINARY_DIR}/res/mobile/edje/w-input-stt-button.edj DESTINATION ${INPUTDELEGATOR_RESDIR}/edje/mobile) - endif() @@ -150,6 +178,11 @@ FILE(GLOB_RECURSE INPUTDELEGATOR_DEFAULT_IMAGES "${CMAKE_CURRENT_SOURCE_DIR}/res INSTALL(FILES ${INPUTDELEGATOR_DEFAULT_IMAGES} DESTINATION ${INPUTDELEGATOR_RESDIR}/wearable/images) FILE(GLOB_RECURSE INPUTDELEGATOR_DEFAULT_IMAGES "${CMAKE_CURRENT_SOURCE_DIR}/res/wearable/images/emoticons/*.png") INSTALL(FILES ${INPUTDELEGATOR_DEFAULT_IMAGES} DESTINATION ${INPUTDELEGATOR_RESDIR}/wearable/images/emoticons) +elseif(${TARGET} STREQUAL "tv") +FILE(GLOB_RECURSE INPUTDELEGATOR_DEFAULT_IMAGES "${CMAKE_CURRENT_SOURCE_DIR}/res/tv/images/*.png") +INSTALL(FILES ${INPUTDELEGATOR_DEFAULT_IMAGES} DESTINATION ${INPUTDELEGATOR_RESDIR}/tv/images) +FILE(GLOB_RECURSE INPUTDELEGATOR_DEFAULT_IMAGES "${CMAKE_CURRENT_SOURCE_DIR}/res/tv/images/emoticons/*.png") +INSTALL(FILES ${INPUTDELEGATOR_DEFAULT_IMAGES} DESTINATION ${INPUTDELEGATOR_RESDIR}/tv/images/emoticons) else() FILE(GLOB_RECURSE INPUTDELEGATOR_DEFAULT_IMAGES "${CMAKE_CURRENT_SOURCE_DIR}/res/mobile/images/*.png") INSTALL(FILES ${INPUTDELEGATOR_DEFAULT_IMAGES} DESTINATION ${INPUTDELEGATOR_RESDIR}/mobile/images) @@ -157,4 +190,4 @@ FILE(GLOB_RECURSE INPUTDELEGATOR_DEFAULT_IMAGES "${CMAKE_CURRENT_SOURCE_DIR}/res INSTALL(FILES ${INPUTDELEGATOR_DEFAULT_IMAGES} DESTINATION ${INPUTDELEGATOR_RESDIR}/mobile/images/emoticons) endif() -ADD_SUBDIRECTORY(po) \ No newline at end of file +ADD_SUBDIRECTORY(po) diff --git a/inc/w-input-selector.h b/inc/w-input-selector.h index 2e86d7b..985ee98 100755 --- a/inc/w-input-selector.h +++ b/inc/w-input-selector.h @@ -33,6 +33,9 @@ #define APP_EDJ_FILE_MOBILE "edje/mobile/w-input-selector.edj" #define STT_EDJ_FILE_MOBILE "edje/mobile/w-input-stt.edj" +#define APP_EDJ_FILE_TV "edje/tv/w-input-selector.edj" +#define STT_EDJ_FILE_TV "edje/tv/w-input-stt.edj" + #define LOCALEDIR "/usr/apps/org.tizen.inputdelegator/res/locale" #define RESOURCEDIR "/usr/apps/org.tizen.inputdelegator/res/" diff --git a/src/MoreOption.cpp b/src/MoreOption.cpp index 6b12f6e..d0a4b36 100755 --- a/src/MoreOption.cpp +++ b/src/MoreOption.cpp @@ -227,6 +227,8 @@ Evas_Object* MoreOption::AddLanguageIcon(Evas_Object *parent) { string res_path = get_resource_path(); if (_WEARABLE) res_path = res_path + "wearable/"; + else if (_TV) + res_path = res_path + "tv/"; else res_path = res_path + "mobile/"; diff --git a/src/w-input-selector.cpp b/src/w-input-selector.cpp index 9536088..4c39358 100755 --- a/src/w-input-selector.cpp +++ b/src/w-input-selector.cpp @@ -136,7 +136,10 @@ void init_customizing_theme(void) if (_WEARABLE) { stt_edj_path = stt_edj_path + STT_EDJ_FILE_WEARABLE; app_edj_path = app_edj_path + APP_EDJ_FILE_WEARABLE; - } else if (_MOBILE) { + } else if (_TV) { + stt_edj_path = stt_edj_path + STT_EDJ_FILE_TV; + app_edj_path = app_edj_path + APP_EDJ_FILE_TV; + } else { stt_edj_path = stt_edj_path + STT_EDJ_FILE_MOBILE; app_edj_path = app_edj_path + APP_EDJ_FILE_MOBILE; } @@ -261,6 +264,8 @@ static Evas_Object * __ise_gl_2button_content_get(void *data, Evas_Object *obj, string path = get_resource_path(); if (_WEARABLE) path = path + "wearable/"; + else if (_TV) + path = path + "tv/"; else path = path + "mobile/"; @@ -345,6 +350,8 @@ static Evas_Object * __ise_gl_3button_content_get(void *data, Evas_Object *obj, string path = get_resource_path(); if (_WEARABLE) path = path + "wearable/"; + else if (_TV) + path = path + "tv/"; else path = path + "mobile/"; @@ -520,6 +527,8 @@ void show_popup_toast(const char *text, bool check_img) string path = get_resource_path(); if (_WEARABLE) path = path + "wearable/"; + else if (_TV) + path = path + "tv/"; else path = path + "mobile/"; string path_ic = path + "/images/toast_check_icon.png"; diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index 4595593..10a5ec5 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -1391,6 +1391,8 @@ static Evas_Object *create_text_detiled_view(Evas_Object *parent) string edj_path = get_resource_path(); if(_WEARABLE) edj_path = edj_path + STT_EDJ_FILE_WEARABLE; + else if (_TV) + edj_path = edj_path + STT_EDJ_FILE_TV; else edj_path = edj_path + STT_EDJ_FILE_MOBILE; //layout @@ -1539,6 +1541,8 @@ static Evas_Object *create_textblock(void* data) string edj_path = get_resource_path(); if(_WEARABLE) edj_path = edj_path + STT_EDJ_FILE_WEARABLE; + else if (_TV) + edj_path = edj_path + STT_EDJ_FILE_TV; else edj_path = edj_path + STT_EDJ_FILE_MOBILE; @@ -1646,6 +1650,8 @@ static Evas_Object *create_fullview(Evas_Object *parent, VoiceData *r_voicedata) string edj_path = get_resource_path(); if(_WEARABLE) edj_path = edj_path + STT_EDJ_FILE_WEARABLE; + else if (_TV) + edj_path = edj_path + STT_EDJ_FILE_TV; else edj_path = edj_path + STT_EDJ_FILE_MOBILE; -- 2.7.4