Add routine to support TV profile 47/129147/2
authorsungwook79.park <sungwook79.park@samsung.com>
Mon, 15 May 2017 07:15:27 +0000 (16:15 +0900)
committersungwook79.park <sungwook79.park@samsung.com>
Mon, 15 May 2017 08:09:00 +0000 (17:09 +0900)
Change-Id: I40041d649932103b9c582482bf898014a20efa73
Signed-off-by: sungwook79.park <sungwook79.park@samsung.com>
CMakeLists.txt
inc/w-input-selector.h
src/MoreOption.cpp
src/w-input-selector.cpp
src/w-input-stt-voice.cpp

index ef55ae5..85287b4 100755 (executable)
@@ -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)
index 2e86d7b..985ee98 100755 (executable)
@@ -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/"
 
index 6b12f6e..d0a4b36 100755 (executable)
@@ -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/";
 
index 9536088..4c39358 100755 (executable)
@@ -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";
index 4595593..10a5ec5 100755 (executable)
@@ -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;