Code adjusted to the Tizen 3.0 platform. 36/49136/2
authorMichal Szczecinski <m.szczecinsk@samsung.com>
Tue, 6 Oct 2015 14:17:29 +0000 (16:17 +0200)
committerMichal Szczecinski <m.szczecinsk@samsung.com>
Wed, 7 Oct 2015 06:37:25 +0000 (08:37 +0200)
Note:
Due to issue with the dynamic index this feature is disabled.

Change-Id: Ic87c867867602b7c901e39547caec1c8951675b4

CMakeLists.txt
inc/conf.h
org.tizen.homescreen-efl.manifest
org.tizen.homescreen-efl.xml
packaging/org.tizen.homescreen-efl.spec
src/all_apps.c
src/homescreen-efl.c
src/livebox/livebox_panel.c
tizen-manifest.xml

index f3ed15b..3e15e0e 100644 (file)
@@ -3,7 +3,7 @@ PROJECT(homescreen-efl C)
 
 SET(MANIFESTDIR "/usr/share/packages")
 SET(PACKAGE_NAME "org.tizen.${PROJECT_NAME}")
-SET(PREFIX "/opt/usr/apps/${PACKAGE_NAME}")
+SET(PREFIX "/usr/apps/${PACKAGE_NAME}")
 SET(EXEC_PREFIX "${PREFIX}/bin")
 SET(DATADIR "${PREFIX}/data")
 SET(RESDIR "${PREFIX}/res")
@@ -45,7 +45,7 @@ FOREACH (flag ${MENU_PKGS_CFLAGS})
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline -g -fno-builtin-malloc -fpie")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Winline -g -fno-builtin-malloc -fpie")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
index 36d2161..f813b0c 100644 (file)
 #define QHD_HEIGHT 960
 #define WVGA_WIDTH 480
 #define WVGA_HEIGHT 800
+#define UHD_WIDTH 1440
+#define UHD_HEIGHT 2560
 
 #define HD_SCALE_FACTOR 1.2
 #define QHD_SCALE_FACTOR 0.85
 #define WVGA_SCALE_FACTOR 0.70
+#define UHD_SCALE_FACTOR 1.3
 
 /*=================================DATA KEYS CONF=============================*/
 #define KEY_ICON_DATA "item_data"
 
 /*=================================DATABASE===================================*/
 #define DATABASE_FILE \
-       "/opt/usr/apps/org.tizen.homescreen-efl/data/homescreen-efl.db"
+       "/usr/apps/org.tizen.homescreen-efl/data/homescreen-efl.db"
 
 /*=================================RESOURCES==================================*/
 #define DEFAULT_BG \
-       "opt/usr/apps/com.samsung.home-lite/res/images/default_bg.png"
-#define EDJE_DIR "/opt/usr/apps/org.tizen.homescreen-efl/res/edje"
-#define IMAGE_DIR "/opt/usr/apps/org.tizen.homescreen-efl/res/images"
+       "/usr/apps/com.samsung.home-lite/res/images/default_bg.png"
+#define EDJE_DIR "/usr/apps/org.tizen.homescreen-efl/res/edje"
+#define IMAGE_DIR "/usr/apps/org.tizen.homescreen-efl/res/images"
 
 /*******************************************************************************
 *
@@ -84,7 +87,7 @@
 
 /*================================ APP_ICON.C=================================*/
 #define DEFAULT_APP_ICON  \
-       "/opt/usr/apps/org.tizen.homescreen-efl/res/images/default.png"
+       "/usr/apps/org.tizen.homescreen-efl/res/images/default.png"
 
 #define BADGE_REL_X 0.85
 #define BADGE_REL_Y 0.00
 #define LIVEBOX_ON_CREATE_SIZE 4
 #define LIVEBOX_MIN_MOUSE_MOVE 100
 
-#define TEST_PKG "/opt/usr/apps/org.tizen.homescreen-efl/res/images/livebox/"
+#define TEST_PKG "/usr/apps/org.tizen.homescreen-efl/res/images/livebox/"
 #define TEST_PKG_ALARM        TEST_PKG"preview_alarm.png"
 #define TEST_PKG_DUAL_CLOCK   TEST_PKG"preview_dual_clock.png"
 #define TEST_PKG_MUSIC        TEST_PKG"preview_music.png"
index 81eb500..45de7db 100644 (file)
@@ -1,11 +1,12 @@
 <manifest>
-       <define>
-               <domain name="org.tizen.homescreen-efl" />
-       </define>
-       <assign>
-               <filesystem path="/usr/share/packages/org.tizen.homescreen-efl.xml" label="_" />
-               <filesystem path="/usr/share/icons/default/small/org.tizen.menu-screen.png" label="_" />
-               <filesystem path="/opt/usr/apps/org.tizen.homescreen-efl/bin" label="org.tizen.homescreen-efl" />
-               <filesystem path="/opt/usr/apps/org.tizen.homescreen-efl/res" label="org.tizen.homescreen-efl" />
-       </assign>
-</manifest>
+       <define>
+               <domain name="org.tizen.homescreen-efl" />
+       </define>
+       <request>
+               <domain name="org.tizen.homescreen-efl" />
+       </request>
+       <assign>
+               <filesystem path="/usr/share/packages/org.tizen.homescreen-efl.xml" label="_" />
+               <filesystem path="/usr/share/icons/default/small/org.tizen.homescreen-efl.png" label="_" />
+       </assign>
+</manifest>
\ No newline at end of file
index f0e9e37..9788be4 100644 (file)
@@ -3,7 +3,7 @@
     <author email="m.szczecinsk@samsung.com" href="www.samsung.com">Michal Szczecinski</author>
     <label>homescreen-efl</label>
     <description>Homescreen Application</description>
-    <ui-application appid="org.tizen.homescreen-efl" exec="/opt/usr/apps/org.tizen.homescreen-efl/bin/homescreen-efl" nodisplay="true" multiple="false" type="capp" taskmanage="false" hw-acceleration="use-GL">
+    <ui-application appid="org.tizen.homescreen-efl" exec="/usr/apps/org.tizen.homescreen-efl/bin/homescreen-efl" nodisplay="true" multiple="false" type="capp" taskmanage="false" hw-acceleration="use-GL">
         <label>homescreen-efl</label>
                <category name="http://tizen.org/category/homeapp"/>
         <icon>/usr/share/icons/default/small/org.tizen.menu-screen.png</icon>
index 064d807..f16e712 100644 (file)
@@ -81,13 +81,13 @@ dlogutil -c
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
 
-%{_optdir}/usr/apps/%{name}/bin/homescreen-efl
-%{_optdir}/usr/apps/%{name}/res/edje/*.edj
-%{_optdir}/usr/apps/%{name}/res/images/*.png
-%{_optdir}/usr/apps/%{name}/res/images/livebox/*.png
-%{_optdir}/usr/apps/%{name}/res/locale/*/*/*.mo
+/usr/apps/%{name}/bin/homescreen-efl
+/usr/apps/%{name}/res/edje/*.edj
+/usr/apps/%{name}/res/images/*.png
+/usr/apps/%{name}/res/images/livebox/*.png
+/usr/apps/%{name}/res/locale/*/*/*.mo
 %{_datadir}/packages/%{name}.xml
 %{_sysconfdir}/smack/accesses.d/*.efl
-%dir %{_optdir}/usr/apps/%{name}/data
-%attr(777, root, root) %{_optdir}/usr/apps/%{name}/data
+%dir /usr/apps/%{name}/data
+%attr(777, root, root) /usr/apps/%{name}/data
 /usr/share/license/homescreen-efl
\ No newline at end of file
index 353082a..6f4d522 100644 (file)
@@ -110,13 +110,13 @@ HAPI Evas_Object *all_apps_create(Evas_Object *parent, void *data)
                return NULL;
        }
 
-       s_info.index = dynamic_index_new(s_info.all_apps);
-       if (!s_info.index) {
-               LOGE("[FAILED][dynamic_index_new]");
-               page_scroller_destroy(s_info.all_apps);
-               s_info.all_apps = NULL;
-               return NULL;
-       }
+       // s_info.index = dynamic_index_new(s_info.all_apps);
+       // if (!s_info.index) {
+       //      LOGE("[FAILED][dynamic_index_new]");
+       //      page_scroller_destroy(s_info.all_apps);
+       //      s_info.all_apps = NULL;
+       //      return NULL;
+       // }
 
        evas_object_size_hint_min_set(s_info.all_apps, home_screen_get_root_width(), home_screen_get_root_height());
        evas_object_resize(s_info.all_apps, home_screen_get_root_width(), home_screen_get_root_height());
@@ -127,18 +127,17 @@ HAPI Evas_Object *all_apps_create(Evas_Object *parent, void *data)
 
 HAPI void all_apps_show(void)
 {
-       if (s_info.index) {
-               elm_object_part_content_set(s_info.parent, PART_INDEX, s_info.index->box);
-               evas_object_show(s_info.index->box);
-       }
+       // if (s_info.index) {
+       //      elm_object_part_content_set(s_info.parent, PART_INDEX, s_info.index->box);
+       //      evas_object_show(s_info.index->box);
+       // }
 }
 
 HAPI void all_apps_hide(void)
 {
-       elm_object_part_content_unset(s_info.parent, PART_INDEX);
-       if (s_info.index)
-               evas_object_hide(s_info.index->box);
-
+       // elm_object_part_content_unset(s_info.parent, PART_INDEX);
+       // if (s_info.index)
+       //      evas_object_hide(s_info.index->box);
 }
 
 HAPI void all_apps_del(void)
index 4a983fe..b922887 100644 (file)
@@ -268,8 +268,9 @@ HAPI void home_screen_mvc_set_ly_scale(Evas_Object *layout)
        } else if(width == WVGA_WIDTH && height == WVGA_HEIGHT) {
                LOGD("WVGA_RES");
                edje_object_scale_set(edje, WVGA_SCALE_FACTOR);
+       } else if(width == UHD_WIDTH && height == UHD_HEIGHT) {
+               edje_object_scale_set(edje, UHD_SCALE_FACTOR);
        }
-
 }
 
 /*====================END OF PUBLIC FUNCTIONS IMPLEMENTATION=========================*/
@@ -317,6 +318,7 @@ static void __homescreen_efl_create_base_gui(void)
 
        /* Window */
        s_info.win = elm_win_util_standard_add(PACKAGE, PACKAGE);
+       // evas_object_resize(s_info.win, 1440, 2560);
        elm_win_autodel_set(s_info.win, EINA_TRUE);
 
        evas_object_smart_callback_add(s_info.win, "delete,request", __homescreen_efl_win_delete_request_cb, NULL);
@@ -338,19 +340,21 @@ static void __homescreen_efl_create_base_gui(void)
        evas_object_show(s_info.bg);
 
        __homescreen_efl_get_window_size(s_info.win);
-       __homescreen_efl_make_gradient_bg();
 
        /* Conformant */
-       s_info.conformant = _create_conformant();
+       // s_info.conformant = _create_conformant();
 
-       /* Base Layout */
+       // /* Base Layout */
        snprintf(edj_path, sizeof(edj_path), EDJE_DIR"/home.edj");
        s_info.layout = elm_layout_add(s_info.win);
        elm_layout_file_set(s_info.layout, edj_path, GROUP_HOME_LY);
        evas_object_size_hint_weight_set(s_info.layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       // evas_object_size_hint_min_set(s_info.layout, 1440, 2560);
+       // evas_object_size_hint_max_set(s_info.layout, 1440, 2560);
        elm_win_resize_object_add(s_info.win, s_info.layout);
        evas_object_show(s_info.layout);
 
+
        home_screen_mvc_set_ly_scale(s_info.layout);
 
        s_info.home = livebox_panel_create(s_info.layout);
@@ -367,6 +371,7 @@ static void __homescreen_efl_create_base_gui(void)
        elm_object_part_content_set(s_info.layout, PART_CONTENT, s_info.home);
 
        /* Show window after base gui is set up */
+       dlog_print(DLOG_INFO, LOG_TAG ,"WINDOW SIZE IS : %d %d", s_info.root_width, s_info.root_height);
        evas_object_show(s_info.win);
        elm_object_signal_callback_add(s_info.layout, SIGNAL_HOME_BTN_CLICKED, SIGNAL_SOURCE, __homescreen_efl_home_btn_clicked, NULL);
        elm_object_signal_callback_add(s_info.layout, SIGNAL_MENU_BTN_CLICKED, SIGNAL_SOURCE, __homescreen_efl_menu_btn_clicked, NULL);
index cb59dc9..c569596 100644 (file)
@@ -190,7 +190,7 @@ void livebox_panel_fill(void)
 
        data_model_iterate_pages(home, __livebox_panel_iterate_page_fill_cb,
                __livebox_panel_iterate_node_fill_cb, &widget_pos_h);
-       livebox_panel_create_dynamic_index();
+       // livebox_panel_create_dynamic_index();
 }
 
 Evas_Object *livebox_panel_create(Evas_Object *parent)
@@ -215,8 +215,8 @@ Evas_Object *livebox_panel_create(Evas_Object *parent)
 
 void livebox_panel_set_content(Evas_Object *layout)
 {
-       if(s_info.dynamic_index->box)
-               elm_layout_content_set(layout, PART_INDEX, s_info.dynamic_index->box);
+       // if(s_info.dynamic_index->box)
+       //      elm_layout_content_set(layout, PART_INDEX, s_info.dynamic_index->box);
 }
 
 void livebox_panel_unset_content(Evas_Object *layout)
index b81ca3f..80da2f2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <manifest xmlns="http://tizen.org/ns/packages" api-version="2.3" package="org.tizen.homescreen-efl" version="1.0.0">
     <profile name="mobile"/>
-    <ui-application appid="org.tizen.homescreen-efl" exec="homescreen-efl" multiple="false" nodisplay="true" taskmanage="false" type="capp">
+    <ui-application appid="org.tizen.homescreen-efl" exec="homescreen-efl" multiple="false" nodisplay="false" taskmanage="false" type="capp">
         <label>homescreen-efl</label>
         <icon>homescreen-efl.png</icon>
     </ui-application>