diff options
author | Jin Yoon <jinny.yoon@samsung.com> | 2015-08-14 02:21:48 +0900 |
---|---|---|
committer | Jin Yoon <jinny.yoon@samsung.com> | 2015-08-14 02:21:48 +0900 |
commit | 60aea19aa064055d6b5aec96e7e4980e509a1340 (patch) | |
tree | e6662637f6a2a20ff175926b0369159ecdda4b63 | |
parent | fc3c77853088c20529172d99664a89dd1c66d89f (diff) | |
download | adventure-60aea19aa064055d6b5aec96e7e4980e509a1340.tar.gz adventure-60aea19aa064055d6b5aec96e7e4980e509a1340.tar.bz2 adventure-60aea19aa064055d6b5aec96e7e4980e509a1340.zip |
Version 1.0
96 files changed, 165 insertions, 3519 deletions
diff --git a/inc/main_view.h b/inc/main_view.h index 8c4782e..15af5b6 100644 --- a/inc/main_view.h +++ b/inc/main_view.h @@ -25,4 +25,6 @@ extern void main_view_destroy(Evas_Object *main_view); extern void main_view_click_add_btn_cb(void *data, Evas_Object *obj, void *event_info); extern void main_view_click_next_btn_cb(void *data, Evas_Object *obj, void *event_info); +extern void main_view_go_result(void *data); + #endif /* __MAIN_VIEW_H__ */ diff --git a/new/inc/adventure.h b/new/inc/adventure.h deleted file mode 100755 index 06797bd..0000000 --- a/new/inc/adventure.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Samsung API - * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/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 __ADVENTURE_H__ -#define __ADVENTURE_H__ - -#include <app.h> -#include <Elementary.h> -#include <system_settings.h> -#include <efl_extension.h> -#include <dlog.h> - -#ifdef LOG_TAG -#undef LOG_TAG -#endif -#define LOG_TAG "adventure" - -#if !defined(PACKAGE) -#define PACKAGE "org.tizen.adventure" -#endif - -#define EDJ_FILE "edje/adventure.edj" -#define GRP_MAIN "main" - -struct _adventure_info_s { - Evas_Object *win; - Evas_Object *conform; - Evas_Object *adventure; - Evas_Object *initial; - Evas_Object *loading; - Evas_Object *ui_manager; - - Ecore_Timer *initial_timer; - - Eina_List *view; - - int width; - int height; -}; -typedef struct _adventure_info_s adventure_info_s; - -struct _path_info_s { - int path_id; - int created_time; - int duration; - int rate; - - char *title; - char *title_image; - char *content; - char *author; -}; -typedef struct _path_info_s path_info_s; - -struct _point_info_s { - int point_id; - int path_id; - - char *title; - char *nation; - char *district; - char *title_image; - char *content; - char *map_image; - char *duration; -}; -typedef struct _point_info_s point_info_s; - -struct _user_info_s { - char *user_id; - char *password; -}; -typedef struct _user_info_s user_info_s; - -#endif /* __ADVENTURE_H__ */ diff --git a/new/inc/ctxpopup.h b/new/inc/ctxpopup.h deleted file mode 100755 index e69de29..0000000 --- a/new/inc/ctxpopup.h +++ /dev/null diff --git a/new/inc/db.h b/new/inc/db.h deleted file mode 100755 index 30eb9ce..0000000 --- a/new/inc/db.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Samsung API - * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/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 __ADVENTURE_DB_H__ -#define __ADVENTURE_DB_H__ - -#include <sqlite3.h> -#include "util.h" - -extern sqlite3 *db_open(void); -extern void db_close(sqlite3 *db); - -extern sqlite3_stmt *db_prepare(sqlite3 *db, const char *query); -extern int db_next(sqlite3 *db, sqlite3_stmt *stmt); -extern int db_reset(sqlite3 *db, sqlite3_stmt *stmt); - -extern int db_bind_bool(sqlite3 *db, sqlite3_stmt *stmt, int idx, bool value); -extern int db_bind_int(sqlite3 *db, sqlite3_stmt *stmt, int idx, int value); -extern int db_bind_double(sqlite3 *db, sqlite3_stmt *stmt, int idx, double value); -extern int db_bind_str(sqlite3 *db, sqlite3_stmt *stmt, int idx, const char *str); - -extern bool db_get_bool(sqlite3_stmt *stmt, int index); -extern int db_get_int(sqlite3_stmt *stmt, int index); -extern int db_get_double(sqlite3_stmt *stmt, int index); -extern const char *db_get_str(sqlite3_stmt *stmt, int index); - -extern int db_finalize(sqlite3 *db, sqlite3_stmt *stmt); -extern int db_exec(sqlite3 *db, const char *query); - -extern int db_begin_transaction(sqlite3 *db); -extern int db_end_transaction(sqlite3 *db); - -extern int db_drop_table(sqlite3 *db); -extern int db_create_table(sqlite3 *db); - -extern int db_insert_version(sqlite3 *db, int version); -extern int db_remove_version(sqlite3 *db, int version); -extern int db_update_version(sqlite3 *db, int version); -extern int db_count_version(sqlite3 *db); - -extern int db_insert_login(sqlite3 *db, const char *id, const char *passwd); -extern int db_update_login(sqlite3 *db, const char *id, const char *passwd); -extern int db_remove_login(sqlite3 *db, const char *id, const char *passwd); -extern int db_count_login(sqlite3 *db, const char *id, const char *passwd); - -#endif // __ADVENTURE_DB_H__ diff --git a/new/inc/initial.h b/new/inc/initial.h deleted file mode 100755 index 3dddf37..0000000 --- a/new/inc/initial.h +++ /dev/null @@ -1,4 +0,0 @@ -#include <Elementary.h> - -extern Evas_Object *initial_create(Evas_Object *parent, int width, int height); -extern void initial_destroy(Evas_Object *initial); diff --git a/new/inc/list.h b/new/inc/list.h deleted file mode 100755 index e69de29..0000000 --- a/new/inc/list.h +++ /dev/null diff --git a/new/inc/loading.h b/new/inc/loading.h deleted file mode 100755 index b5c8dd4..0000000 --- a/new/inc/loading.h +++ /dev/null @@ -1,4 +0,0 @@ -#include <Elementary.h> - -extern Evas_Object *loading_create(Evas_Object *parent, int width, int height); -extern void loading_destroy(Evas_Object *loading); diff --git a/new/inc/log.h b/new/inc/log.h deleted file mode 100755 index dc621a7..0000000 --- a/new/inc/log.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef __MOMENT_LOG_H__ -#define __MOMENT_LOG_H__ - -#include <dlog.h> - -#undef LOG_TAG -#define LOG_TAG "ADVENTURE" - -#define COLOR_RED "\033[0;40;31m" -#define COLOR_LIGHTBLUE "\033[1;40;34m" -#define COLOR_YELLOW "\033[1;40;33m" -#define COLOR_END "\033[0;m" -#define COLOR_GRAY "\033[1;40;30m" -#define COLOR_MAGENTA "\033[1;35m" - -#if !defined(_D) -#define _D(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, COLOR_YELLOW "[%s:%d]" fmt COLOR_END"\n", __func__, __LINE__, ##arg) -#endif - -#if !defined(_W) -#define _W(fmt, arg...) dlog_print(DLOG_WARN, LOG_TAG, COLOR_GRAY "[%s:%d]" fmt COLOR_END"\n", __func__, __LINE__, ##arg) -#endif - -#if !defined(_E) -#define _E(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, COLOR_RED "[%s:%d]" fmt COLOR_END"\n", __func__, __LINE__, ##arg) -#endif - -#define retv_if(expr, val) do { \ - if(expr) { \ - _E("(%s) -> %s() return", #expr, __FUNCTION__); \ - return (val); \ - } \ -} while (0) - -#define ret_if(expr) do { \ - if(expr) { \ - _E("(%s) -> %s() return", #expr, __FUNCTION__); \ - return; \ - } \ -} while (0) - -#define goto_if(expr, val) do { \ - if(expr) { \ - _E("(%s) -> goto", #expr); \ - goto val; \ - } \ -} while (0) - -#define break_if(expr) { \ - if(expr) { \ - _E("(%s) -> break", #expr); \ - break; \ - } \ -} - -#define continue_if(expr) { \ - if(expr) { \ - _E("(%s) -> continue", #expr); \ - continue; \ - } \ -} - -#endif /* __MOMENT_LOG_H__ */ diff --git a/new/inc/login.h b/new/inc/login.h deleted file mode 100755 index 097341b..0000000 --- a/new/inc/login.h +++ /dev/null @@ -1,7 +0,0 @@ -#include <Elementary.h> - -extern Evas_Object *login_create(Evas_Object *parent); -extern void login_destroy(Evas_Object *login); - -extern void login_add_result_cb(Evas_Object *login, int (*result_cb)(void *data), void *data); -extern void login_remove_result_cb(Evas_Object *login); diff --git a/new/inc/main.h b/new/inc/main.h deleted file mode 100755 index ad9d92c..0000000 --- a/new/inc/main.h +++ /dev/null @@ -1,53 +0,0 @@ -/*
- * Samsung API
- * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/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 __MOMENT_H__
-#define __MOMENT_H__
-
-#include <app.h>
-#include <Elementary.h>
-#include <system_settings.h>
-#include <efl_extension.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "MOMENT"
-
-#if !defined(PACKAGE)
-#define PACKAGE "org.tizen.moment"
-#endif
-
-#define PATH_LEN 1024
-
-struct _moment_info_s {
- Evas_Object *win;
- Evas_Object *conform;
- Evas_Object *ui_manager;
- Evas_Object *main_view;
- Evas_Object *result_view;
- Evas_Object *scroller;
-
- Evas *e;
-
- int width;
- int height;
-};
-typedef struct _moment_info_s moment_info_s;
-
-#endif /* __MOMENT_H__ */
diff --git a/new/inc/main_view.h b/new/inc/main_view.h deleted file mode 100755 index 073352e..0000000 --- a/new/inc/main_view.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __MAIN_VIEW_H__
-#define __MAIN_VIEW_H__
-
-#include <Elementary.h>
-#include "main.h"
-
-extern Evas_Object *main_view_create(Evas_Object *parent, moment_info_s *moment_info);
-extern void *main_view_destroy(Evas_Object *main_view);
-
-#endif /* __MAIN_VIEW_H__ */
diff --git a/new/inc/map.h b/new/inc/map.h deleted file mode 100644 index 06461f2..0000000 --- a/new/inc/map.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef __MAP_H__ -#define __MAP_H__ - -enum { - CITY_HONOLULU = 0, - CITY_LOS_ANGELES, - CITY_SAN_FRANCISCO, - CITY_VANCOUVER, - CITY_CHICAGO, - CITY_MEICO_CITY, - CITY_SAN_JOSE, - CITY_NEW_YORK_CITY, - CITY_TORONTO, - CITY_WASHINGTON_DC, - CITY_BRASILIA, - CITY_BUENOS_AIRES, - CITY_SAO_PAULO, - CITY_DUBLIN, - CITY_LISBON, - CITY_LONDON, - CITY_AMSTERDAM, - CITY_BARCELONA, - CITY_BERLIN, - CITY_BRUSSELS, - CITY_CAPE_TOWN, - CITY_GENEVA, - CITY_MADRID, - CITY_PARIS, - CITY_ROME, - CITY_STOCKHOLM, - CITY_WARSAW, - CITY_ANKARA, - CITY_ATHENS, - CITY_HELSINKI, - CITY_ISTANBUL, - CITY_JERUSALEM, - CITY_KAHIRA, - CITY_BAGHDAD, - CITY_DUBAI, - CITY_MOSCOW, - CITY_ISLAMABAD, - CITY_DELHI, - CITY_MUMBAI, - CITY_DAKA, - CITY_CALCUTTA, - CITY_BANGKOK, - CITY_JAKARTA, - CITY_BEIJING, - CITY_HONG_KONG, - CITY_SINGAPORE, - CITY_TAIPEI, - CITY_SEOUL, - CITY_TOKYO, - CITY_SYDNEY, -} - -struct _city_info_s { - int id; - float timezone; - char *name; - char *nation; -}; -typedef struct _city_info_s city_info_s; - -extern Evas_Object *map_create(Evas_Object *parent); -extern void *map_destroy(Evas_Object *map); - -#endif /* __MAP_H__ */ diff --git a/new/inc/path.h b/new/inc/path.h deleted file mode 100755 index 200920a..0000000 --- a/new/inc/path.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __PATH_H__ -#define __PATH_H__ - -#include <Elementary.h> -#include "adventure.h" - -extern Evas_Object *path_create(Evas_Object *parent, path_info_s *path_info); -extern void *path_destroy(Evas_Object *path); - -#endif /* __PATH_H__ */ diff --git a/new/inc/path_group.h b/new/inc/path_group.h deleted file mode 100755 index c7da0d8..0000000 --- a/new/inc/path_group.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef __PATH_GROUP_H__ -#define __PATH_GROUP_H__ - -#include <Elementary.h> - -enum { - PATH_GROUP_TYPE_PLACE = 0, - PATH_GROUP_TYPE_BUY_LIST, - PATH_GROUP_TYEP_MY_LIST, - PATH_GROUP_TYPE_ALL, -}; - -extern Evas_Object *path_group_create(Evas_Object *parent, int type, void *data); -extern void *path_group_destroy(Evas_Object *path_group); - -#endif /* __PATH_GROUP_H__ */ diff --git a/new/inc/point.h b/new/inc/point.h deleted file mode 100755 index 0cd61d6..0000000 --- a/new/inc/point.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __POINT_H__ -#define __POINT_H__ - -#include <Elementary.h> -#include "adventure.h" - -extern Evas_Object *point_create(Evas_Object *parent, point_info_s *point_info); -extern void *point_destroy(Evas_Object *point); - -#endif /* __POINT_H__ */ diff --git a/new/inc/result_view.h b/new/inc/result_view.h deleted file mode 100755 index 073352e..0000000 --- a/new/inc/result_view.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __MAIN_VIEW_H__
-#define __MAIN_VIEW_H__
-
-#include <Elementary.h>
-#include "main.h"
-
-extern Evas_Object *main_view_create(Evas_Object *parent, moment_info_s *moment_info);
-extern void *main_view_destroy(Evas_Object *main_view);
-
-#endif /* __MAIN_VIEW_H__ */
diff --git a/new/inc/scroller.h b/new/inc/scroller.h deleted file mode 100755 index 7fa2368..0000000 --- a/new/inc/scroller.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __SCROLLER_H__ -#define __SCROLLER_H__ - -#include <Elementary.h> - -typedef enum { - SCROLLER_EVENT_TYPE_INVALID = 0, - SCROLLER_EVENT_TYPE_SCROLL, - SCROLLER_EVENT_TYPE_MAX, -} scroller_event_type_e; - -extern int scroller_is_scrolling(Evas_Object *scroller); - -extern Evas_Object *scroller_create(Evas_Object *parent); -extern void scroller_destroy(Evas_Object *scroller); - -extern void scroller_append_item(Evas_Object *scroller, Evas_Object *item); -extern void scroller_remove_item(Evas_Object *scroller, Evas_Object *item); - -extern void scroller_bring_in_item(Evas_Object *scroller, Evas_Object *item); - -extern int scroller_register_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *user_data), void *user_data); -extern int scroller_unregister_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *user_data)); - -#endif /* __SCROLLER_H__ */ diff --git a/new/inc/search_path.h b/new/inc/search_path.h deleted file mode 100755 index e69de29..0000000 --- a/new/inc/search_path.h +++ /dev/null diff --git a/new/inc/ui_manager.h b/new/inc/ui_manager.h deleted file mode 100755 index a314fb6..0000000 --- a/new/inc/ui_manager.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __UI_MANAGER_H__ -#define __UI_MANAGER_H__ - -#include <Elementary.h> -#include "main.h" - -extern Evas_Object *ui_manager_create(Evas_Object *parent, moment_info_s *moment_info); -extern void ui_manager_destroy(Evas_Object *ui_manager); - -#endif /* __UI_MANAGER_H__ */ diff --git a/new/inc/util.h b/new/inc/util.h deleted file mode 100755 index fc57685..0000000 --- a/new/inc/util.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - - - - - - - - - * Samsung API - * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/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 __ADVENTURE_INTERNAL_H__ -#define __ADVENTURE_INTERNAL_H__ - -/* Multi-language */ -#if !defined(_) -#define _(str) gettext(str) -#endif -#define gettext_noop(str) (str) -#define N_(str) gettext_noop(str) -#define D_(str) dgettext("sys_string", str) - -/* SIZE */ -#define FILE_LEN 256 -#define BUFSZE 1024 -#define PATH_LEN 1024 - -/* Build */ -#define HAPI __attribute__((visibility("hidden"))) - -/* Return values */ -typedef enum { - APPL_ERROR_NONE = 0, - APPL_ERROR_FAIL = -1, - APPL_ERROR_DB_FAILED = -2, - APPL_ERROR_OUT_OF_MEMORY = -3, - APPL_ERROR_INVALID_PARAMETER = -4, - APPL_ERROR_NO_DATA = -5, -} appl_error_e; - -#endif /* __ADVENTURE_INTERNAL_H__ */ diff --git a/new/inc/webview.h b/new/inc/webview.h deleted file mode 100755 index a700896..0000000 --- a/new/inc/webview.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Samsung API - * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/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 __ADVENTURE_WEBVIEW_H__ -#define __ADVENTURE_WEBVIEW_H__ - -#include <Evas.h> - -extern Evas_Object *webview_create(Evas_Object *parent); -extern void webview_destroy(Evas_Object *webview); - -extern void webview_set_url(Evas_Object *webview, const char *url); - -#endif // __ADVENTURE_WEBVIEW_H__ diff --git a/new/inc/write_path.h b/new/inc/write_path.h deleted file mode 100755 index 84bbddb..0000000 --- a/new/inc/write_path.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __WRITE_PATH_H__ -#define __WRITE_PATH_H__ - -#include <Elementary.h> -#include "adventure.h" - -extern Evas_Object *write_path_create(Evas_Object *parent); -extern void *write_path_destroy(Evas_Object *write_path); - -#endif /* __WRITE_PATH_H__ */ diff --git a/new/res/edje/adventure.edc b/new/res/edje/adventure.edc deleted file mode 100755 index b11d677..0000000 --- a/new/res/edje/adventure.edc +++ /dev/null @@ -1,39 +0,0 @@ -collections { - group { name: "main"; - parts { - part { name: "bg"; - type: RECT; - mouse_events: 0; - description { state: "default" 0.0; - align: 0.0 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - color: 255 255 255 255; - } - part { - name: "loading"; - type: SWALLOW; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "bg"; } - rel2 { relative: 0.5 0.5; to: "bg"; } - align: 0.5 0.5; - visible: 1; - } - } - part { - name: "initial"; - type: SWALLOW; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "bg"; } - rel2 { relative: 0.5 0.5; to: "bg"; } - align: 0.5 0.5; - visible: 1; - } - } - } - } -} diff --git a/new/res/edje/btn.png b/new/res/edje/btn.png Binary files differdeleted file mode 100755 index 1cb7440..0000000 --- a/new/res/edje/btn.png +++ /dev/null diff --git a/new/res/edje/images/1.png b/new/res/edje/images/1.png Binary files differdeleted file mode 100755 index 2a26113..0000000 --- a/new/res/edje/images/1.png +++ /dev/null diff --git a/new/res/edje/images/10.png b/new/res/edje/images/10.png Binary files differdeleted file mode 100755 index 317f135..0000000 --- a/new/res/edje/images/10.png +++ /dev/null diff --git a/new/res/edje/images/11.png b/new/res/edje/images/11.png Binary files differdeleted file mode 100755 index 350f8dd..0000000 --- a/new/res/edje/images/11.png +++ /dev/null diff --git a/new/res/edje/images/12.png b/new/res/edje/images/12.png Binary files differdeleted file mode 100755 index ef39993..0000000 --- a/new/res/edje/images/12.png +++ /dev/null diff --git a/new/res/edje/images/13.png b/new/res/edje/images/13.png Binary files differdeleted file mode 100755 index ccfb5b0..0000000 --- a/new/res/edje/images/13.png +++ /dev/null diff --git a/new/res/edje/images/14.png b/new/res/edje/images/14.png Binary files differdeleted file mode 100755 index ef0320a..0000000 --- a/new/res/edje/images/14.png +++ /dev/null diff --git a/new/res/edje/images/15.png b/new/res/edje/images/15.png Binary files differdeleted file mode 100755 index df9b0f4..0000000 --- a/new/res/edje/images/15.png +++ /dev/null diff --git a/new/res/edje/images/16.png b/new/res/edje/images/16.png Binary files differdeleted file mode 100755 index 14cb22d..0000000 --- a/new/res/edje/images/16.png +++ /dev/null diff --git a/new/res/edje/images/17.png b/new/res/edje/images/17.png Binary files differdeleted file mode 100755 index 205eae7..0000000 --- a/new/res/edje/images/17.png +++ /dev/null diff --git a/new/res/edje/images/18.png b/new/res/edje/images/18.png Binary files differdeleted file mode 100755 index 46be1b0..0000000 --- a/new/res/edje/images/18.png +++ /dev/null diff --git a/new/res/edje/images/19.png b/new/res/edje/images/19.png Binary files differdeleted file mode 100755 index ce7738b..0000000 --- a/new/res/edje/images/19.png +++ /dev/null diff --git a/new/res/edje/images/2.png b/new/res/edje/images/2.png Binary files differdeleted file mode 100755 index a480bbd..0000000 --- a/new/res/edje/images/2.png +++ /dev/null diff --git a/new/res/edje/images/20.png b/new/res/edje/images/20.png Binary files differdeleted file mode 100755 index cef266d..0000000 --- a/new/res/edje/images/20.png +++ /dev/null diff --git a/new/res/edje/images/21.png b/new/res/edje/images/21.png Binary files differdeleted file mode 100755 index 8fc79a8..0000000 --- a/new/res/edje/images/21.png +++ /dev/null diff --git a/new/res/edje/images/22.png b/new/res/edje/images/22.png Binary files differdeleted file mode 100755 index 99b0de5..0000000 --- a/new/res/edje/images/22.png +++ /dev/null diff --git a/new/res/edje/images/23.png b/new/res/edje/images/23.png Binary files differdeleted file mode 100755 index e0a35ce..0000000 --- a/new/res/edje/images/23.png +++ /dev/null diff --git a/new/res/edje/images/24.png b/new/res/edje/images/24.png Binary files differdeleted file mode 100755 index 8a33372..0000000 --- a/new/res/edje/images/24.png +++ /dev/null diff --git a/new/res/edje/images/25.png b/new/res/edje/images/25.png Binary files differdeleted file mode 100755 index 8531df6..0000000 --- a/new/res/edje/images/25.png +++ /dev/null diff --git a/new/res/edje/images/26.png b/new/res/edje/images/26.png Binary files differdeleted file mode 100755 index 8cad05f..0000000 --- a/new/res/edje/images/26.png +++ /dev/null diff --git a/new/res/edje/images/27.png b/new/res/edje/images/27.png Binary files differdeleted file mode 100755 index 856a217..0000000 --- a/new/res/edje/images/27.png +++ /dev/null diff --git a/new/res/edje/images/3.png b/new/res/edje/images/3.png Binary files differdeleted file mode 100755 index a946f85..0000000 --- a/new/res/edje/images/3.png +++ /dev/null diff --git a/new/res/edje/images/4.png b/new/res/edje/images/4.png Binary files differdeleted file mode 100755 index 73d7785..0000000 --- a/new/res/edje/images/4.png +++ /dev/null diff --git a/new/res/edje/images/5.png b/new/res/edje/images/5.png Binary files differdeleted file mode 100755 index a99ad7c..0000000 --- a/new/res/edje/images/5.png +++ /dev/null diff --git a/new/res/edje/images/6.png b/new/res/edje/images/6.png Binary files differdeleted file mode 100755 index 8dbcba5..0000000 --- a/new/res/edje/images/6.png +++ /dev/null diff --git a/new/res/edje/images/7.png b/new/res/edje/images/7.png Binary files differdeleted file mode 100755 index 1f2645a..0000000 --- a/new/res/edje/images/7.png +++ /dev/null diff --git a/new/res/edje/images/8.png b/new/res/edje/images/8.png Binary files differdeleted file mode 100755 index 332b24d..0000000 --- a/new/res/edje/images/8.png +++ /dev/null diff --git a/new/res/edje/images/9.png b/new/res/edje/images/9.png Binary files differdeleted file mode 100755 index 3d6c25c..0000000 --- a/new/res/edje/images/9.png +++ /dev/null diff --git a/new/res/edje/images/Aventure01.1.png b/new/res/edje/images/Aventure01.1.png Binary files differdeleted file mode 100755 index e1b4687..0000000 --- a/new/res/edje/images/Aventure01.1.png +++ /dev/null diff --git a/new/res/edje/images/Aventure01.png b/new/res/edje/images/Aventure01.png Binary files differdeleted file mode 100755 index 7324f9f..0000000 --- a/new/res/edje/images/Aventure01.png +++ /dev/null diff --git a/new/res/edje/images/Aventure01_background.png b/new/res/edje/images/Aventure01_background.png Binary files differdeleted file mode 100755 index 4543125..0000000 --- a/new/res/edje/images/Aventure01_background.png +++ /dev/null diff --git a/new/res/edje/images/Location.gif b/new/res/edje/images/Location.gif Binary files differdeleted file mode 100755 index 19df4ca..0000000 --- a/new/res/edje/images/Location.gif +++ /dev/null diff --git a/new/res/edje/images/bg.jpg b/new/res/edje/images/bg.jpg Binary files differdeleted file mode 100755 index a5d0169..0000000 --- a/new/res/edje/images/bg.jpg +++ /dev/null diff --git a/new/res/edje/images/btn.png b/new/res/edje/images/btn.png Binary files differdeleted file mode 100755 index 1cb7440..0000000 --- a/new/res/edje/images/btn.png +++ /dev/null diff --git a/new/res/edje/initial.edc b/new/res/edje/initial.edc deleted file mode 100755 index 56e8b59..0000000 --- a/new/res/edje/initial.edc +++ /dev/null @@ -1,79 +0,0 @@ -images { - image: "Aventure01.1.png" COMP; - image: "Location.gif" COMP; -} - - -collections { - group { name: "main"; - parts { - part { name: "bg"; - type: SWALLOW; - description { state: "default" 0.0; - align: 0.0 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - visible: 0; - } - } - part { name: "bg_img"; - type: IMAGE; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to: "bg"; } - rel2 { relative: 1.0 1.0; to: "bg"; } - image { - normal: "Aventure01.1.png"; - } - visible: 1; - } - } - part { name: "point_bg"; - type: SPACER; - description { state: "default" 0.0; - align: 0.5 0.5; - rel1 { relative: 0.35 0.5; } - rel2 { relative: 0.35 0.5; } - } - description { state: "down" 0.0; - inherit: "default" 0.0; - rel1 { relative: 0.35 0.535; } - rel2 { relative: 0.35 0.535; } - } - } - part { name: "point"; - type: IMAGE; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0.5 0.5; to: "point_bg"; } - rel2 { relative: 0.5 0.5; to: "point_bg"; } - image { - normal: "Location.gif"; - } - min: 82 113; - visible: 1; - } - } - } - programs { - program { - name: "go_down"; - signal: "load"; - action: STATE_SET "down" 0.0; - target: "point_bg"; - transition: ACCELERATE 1.0; - after: "go_up"; - } - program { - name: "go_up"; - signal: "load"; - action: STATE_SET "default" 0.0; - target: "point_bg"; - transition: DECELERATE 1.0; - after: "go_down"; - } - - } - } -} diff --git a/new/res/edje/item.edc b/new/res/edje/item.edc deleted file mode 100755 index a437371..0000000 --- a/new/res/edje/item.edc +++ /dev/null @@ -1,83 +0,0 @@ - -styles { - style { - /* Font size is changed from 24 to 20 because of resolution issues. */ - name: "text_style"; - base: "font=Tizen:style=Regular font_size=20 color=#ffffff align=center style=shadow shadow_color=#000000bf wrap=mixed ellipsis=-1"; - tag: "br" "\n"; - tag: "hilight" "+ font_weight=Bold"; - tag: "b" "+ font_weight=Bold"; - tag: "tab" "\t"; - } -} - -collections { - group { - name: "main"; - parts { - part { - name: "bg"; - type: SWALLOW; - mouse_events: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - } - } - part { - name: "name"; - type: TEXT; - mouse_events: 0; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 0.1; to: "bg"; } - rel2 { relative: 1.0 0.5; to: "bg"; } - color: 0 0 0 255; - text { - text: ""; - font: "Tizen:style=Bold"; - text_class: "tizen"; - min: 0 0; - size: 24; - align: 0.0 0.5; - } - visible: 1; - } - } - part { - name: "gmt"; - type: TEXT; - mouse_events: 0; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 0.5; to: "bg"; } - rel2 { relative: 1.0 0.9; to: "bg"; } - color: 0 0 0 255; - text { - text: ""; - font: "Tizen:style=Bold"; - text_class: "tizen"; - min: 0 0; - size: 20; - align: 0.0 0.5; - } - visible: 1; - } - } - part { - name: "button"; - type: SWALLOW; - mouse_events: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 0.0; to: "bg"; } - rel2 { relative: 1.0 1.0; to: "bg"; } - visible: 1; - } - } - } //parts - } -} //collections diff --git a/new/res/edje/lecture.edc b/new/res/edje/lecture.edc deleted file mode 100755 index eda3cfe..0000000 --- a/new/res/edje/lecture.edc +++ /dev/null @@ -1,62 +0,0 @@ -collections { - group { - name: "main"; - parts { - part { - name: "bg"; - type: RECT; - description { - state: "default" 0.0; - color: 255 255 255 255; - visible: 1; - } - } - - part { - name: "lighten"; - type: RECT; - description { - state: "default" 0.0; - perspective { - zplane: 100; - } - color: 0 0 255 255; - //color2: 0 0 255 255; - visible: 0; - } - } -/* - part { - name: "pers"; - type: RECT; - description { - state: "default" 0.0; - perspective { - zplane: -100; - } - visible: 0; - } - }*/ - - part { - name: "rect_1"; - type: RECT; - description { - state: "default" 0.0; - rel1 { relative: 0.4 0.4; to: "bg"; } - rel2 { relative: 0.6 0.6; to: "bg"; } - color: 255 0 0 255; - visible: 1; - - map { - //perspective: "pers"; - light: "lighten"; - on: 1; - } - } - } - - - } - } -}
\ No newline at end of file diff --git a/new/res/edje/loading.edc b/new/res/edje/loading.edc deleted file mode 100755 index 33c9503..0000000 --- a/new/res/edje/loading.edc +++ /dev/null @@ -1,104 +0,0 @@ -images { - image: "1.png" COMP; - image: "2.png" COMP; - image: "3.png" COMP; - image: "4.png" COMP; - image: "5.png" COMP; - image: "6.png" COMP; - image: "7.png" COMP; - image: "8.png" COMP; - image: "9.png" COMP; - image: "10.png" COMP; - image: "11.png" COMP; - image: "12.png" COMP; - image: "13.png" COMP; - image: "14.png" COMP; - image: "15.png" COMP; - image: "16.png" COMP; - image: "17.png" COMP; - image: "18.png" COMP; - image: "19.png" COMP; - image: "20.png" COMP; - image: "21.png" COMP; - image: "22.png" COMP; - image: "23.png" COMP; - image: "24.png" COMP; - image: "25.png" COMP; - image: "26.png" COMP; - image: "27.png" COMP; -} - -collections { - group { - name: "loading"; - - parts { - part { - name: "bg"; - type: SPACER; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - } - } - part { - name: "loading"; - type: IMAGE; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.5 0.5; } - rel2 { relative: 0.5 0.5; } - align: 0.5 0.5; - min: 80 80; - visible: 1; - image { - normal: "27.png"; - tween: "1.png"; - tween: "2.png"; - tween: "3.png"; - tween: "4.png"; - tween: "5.png"; - tween: "6.png"; - tween: "7.png"; - tween: "8.png"; - tween: "9.png"; - tween: "10.png"; - tween: "11.png"; - tween: "12.png"; - tween: "13.png"; - tween: "14.png"; - tween: "15.png"; - tween: "16.png"; - tween: "17.png"; - tween: "18.png"; - tween: "19.png"; - tween: "20.png"; - tween: "21.png"; - tween: "22.png"; - tween: "23.png"; - tween: "24.png"; - tween: "25.png"; - tween: "26.png"; - tween: "27.png"; - } - } - } - } - - programs { - program { - name: "on"; - signal: "load"; - action: STATE_SET "default" 0.0; - target: "loading"; - transition: ACCELERATE 1.0; - in: 1.0 0.0; - after: "on"; - } - } - } -} diff --git a/new/res/edje/main_view.edc b/new/res/edje/main_view.edc deleted file mode 100755 index 98a2913..0000000 --- a/new/res/edje/main_view.edc +++ /dev/null @@ -1,232 +0,0 @@ -collections { - group { - name: "main"; - - styles { - style { - name: "description_style"; - base: "font=Tizen:style=Bold font_size=26 color=#ffffff align=center text_class=tizen"; - tag: "br" "\n"; - tag: "hilight" "+ font_weight=Bold"; - tag: "b" "+ font_weight=Bold"; - tag: "tab" "\t"; - } - } - - parts { - part { - name: "bg"; - type: SPACER; - description { - state: "default" 0.0; - align: 0.0 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - } - } - part { - name: "search"; - type: SWALLOW; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.5 0.0; to: "bg"; } - rel2 { relative: 0.5 0.0; to: "bg"; } - align: 0.5 0.0; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - rel1 { relative: 0.5 -0.1; to: "bg"; } - rel2 { relative: 0.5 -0.1; to: "bg"; } - } - } - part { - name: "map"; - type: SWALLOW; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.5 1.0; to: "search"; } - rel2 { relative: 0.5 1.0; to: "search"; } - align: 0.5 0.0; - visible: 1; - } - } - part { - name: "title"; - type: TEXT; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 1.0; to: "map"; } - rel2 { relative: 1.0 1.0; to: "map"; } - color: 0 0 0 255; - align: 0.5 0.0; - min: 0 50; - visible: 1; - text { - text: ""; - font: "Tizen:style=Bold"; - text_class: "tizen"; - min: 0 0; - size: 32; - align: 0.5 0.5; - } - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - part { - name: "description"; - type: TEXTBLOCK; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 1.0; to: "title"; } - rel2 { relative: 1.0 1.0; to: "title"; } - align: 0.5 0.0; - min: 0 100; - visible: 1; - text { - text: ""; - style: "description_style"; - } - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - part { - name: "button"; - type: SWALLOW; - description { - state: "default" 0.0; - rel1 { relative: 0.5 1.0; to: "bg"; } - rel2 { relative: 0.5 1.0; to: "bg"; } - align: 0.5 1.0; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - part { - name: "content"; - type: SWALLOW; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.5 1.0; to: "map"; } - rel2 { relative: 0.5 1.0; to: "map"; } - align: 0.5 0.0; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - part { - name: "search_result"; - type: SWALLOW; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.0 1.0; to: "search"; } - rel2 { relative: 1.0 1.0; to: "bg"; } - align: 0.5 0.0; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - } - programs { - program { - signal: "hide"; - source: "search"; - action: STATE_SET "hide" 0.0; - target: "search"; - } - program { - signal: "show"; - source: "search"; - action: STATE_SET "default" 0.0; - target: "search"; - } - - program { - signal: "hide"; - source: "search_result"; - action: STATE_SET "hide" 0.0; - target: "search_result"; - } - program { - signal: "show"; - source: "search_result"; - action: STATE_SET "default" 0.0; - target: "search_result"; - } - - program { - signal: "hide"; - source: "text"; - action: STATE_SET "hide" 0.0; - target: "title"; - target: "description"; - } - program { - signal: "show"; - source: "text"; - action: STATE_SET "default" 0.0; - target: "title"; - target: "description"; - } - - program { - signal: "hide"; - source: "content"; - action: STATE_SET "hide" 0.0; - target: "search"; - target: "content"; - } - program { - signal: "show"; - source: "content"; - action: STATE_SET "default" 0.0; - target: "search"; - target: "content"; - } - - program { - signal: "hide"; - source: "button"; - action: STATE_SET "hide" 0.0; - target: "button"; - } - program { - signal: "show"; - source: "button"; - action: STATE_SET "default" 0.0; - target: "button"; - } - } - } -} diff --git a/new/res/edje/map.edc b/new/res/edje/map.edc deleted file mode 100755 index 696a00b..0000000 --- a/new/res/edje/map.edc +++ /dev/null @@ -1,38 +0,0 @@ -images {
- image: "" COMP;
-}
-
-collections {
- group {
- name: "main";
- parts {
- part {
- name: "bg";
- type: SPACER;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- }
- }
- part {
- name: "map_img";
- type: IMAGE;
- scale: 1;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1 { relative: 0.5 0.5; to: "bg"; }
- rel2 { relative: 0.5 0.5; to: "bg"; }
- align: 0.5 0.5;
- visible: 1;
- image {
- normal: "";
- }
- }
- }
- }
- programs {
- }
- }
-}
diff --git a/new/res/edje/result_view.edc b/new/res/edje/result_view.edc deleted file mode 100755 index 62c6a4f..0000000 --- a/new/res/edje/result_view.edc +++ /dev/null @@ -1,206 +0,0 @@ -collections { - group { - name: "main"; - - styles { - style { - name: "description_style"; - base: "font=Tizen:style=Bold font_size=26 color=#ffffff align=center text_class=tizen"; - tag: "br" "\n"; - tag: "hilight" "+ font_weight=Bold"; - tag: "b" "+ font_weight=Bold"; - tag: "tab" "\t"; - } - } - - parts { - part { - name: "bg"; - type: SPACER; - description { - state: "default" 0.0; - align: 0.0 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - } - } - part { - name: "title"; - type: TEXT; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 1.0; to: "map"; } - rel2 { relative: 1.0 1.0; to: "map"; } - color: 0 0 0 255; - align: 0.5 0.0; - min: 0 50; - visible: 1; - text { - text: ""; - font: "Tizen:style=Bold"; - text_class: "tizen"; - min: 0 0; - size: 32; - align: 0.5 0.5; - } - } - } - part { - name: "time_current"; - type: TEXT; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 1.0; to: "map"; } - rel2 { relative: 1.0 1.0; to: "map"; } - color: 0 0 0 255; - align: 0.5 0.0; - min: 0 50; - visible: 1; - text { - text: ""; - font: "Tizen:style=Bold"; - text_class: "tizen"; - min: 0 0; - size: 24; - align: 0.5 0.5; - } - } - } - part { - name: "time_best_name"; - type: TEXT; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 1.0; to: "map"; } - rel2 { relative: 1.0 1.0; to: "map"; } - color: 0 0 0 255; - align: 0.5 0.0; - min: 0 50; - visible: 1; - text { - text: ""; - font: "Tizen:style=Bold"; - text_class: "tizen"; - min: 0 0; - size: 24; - align: 0.5 0.5; - } - } - } - part { - name: "time_recomment_name"; - type: TEXT; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 1.0; to: "map"; } - rel2 { relative: 1.0 1.0; to: "map"; } - color: 0 0 0 255; - align: 0.5 0.0; - min: 0 50; - visible: 1; - text { - text: ""; - font: "Tizen:style=Bold"; - text_class: "tizen"; - min: 0 0; - size: 24; - align: 0.5 0.5; - } - } - } - part { - name: "time_best_value"; - type: TEXT; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 1.0; to: "map"; } - rel2 { relative: 1.0 1.0; to: "map"; } - color: 0 0 0 255; - align: 0.5 0.0; - min: 0 50; - visible: 1; - text { - text: ""; - font: "Tizen:style=Bold"; - text_class: "tizen"; - min: 0 0; - size: 24; - align: 0.5 0.5; - } - } - } - part { - name: "time_recomment_value"; - type: TEXT; - scale: 1; - description { - state: "default" 0.0; - rel1 { relative: 0.0 1.0; to: "map"; } - rel2 { relative: 1.0 1.0; to: "map"; } - color: 0 0 0 255; - align: 0.5 0.0; - min: 0 50; - visible: 1; - text { - text: ""; - font: "Tizen:style=Bold"; - text_class: "tizen"; - min: 0 0; - size: 24; - align: 0.5 0.5; - } - } - } - part { - name: "result_circle"; - type: SWALLOW; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.5 0.0; to: "bg"; } - rel2 { relative: 0.5 0.0; to: "bg"; } - align: 0.5 0.0; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - rel1 { relative: 0.5 -0.1; to: "bg"; } - rel2 { relative: 0.5 -0.1; to: "bg"; } - } - } - part { - name: "button_save"; - type: SWALLOW; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.5 1.0; to: "search"; } - rel2 { relative: 0.5 1.0; to: "search"; } - align: 0.5 0.0; - visible: 1; - } - } - part { - name: "button_alarm"; - type: SWALLOW; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.5 1.0; to: "search"; } - rel2 { relative: 0.5 1.0; to: "search"; } - align: 0.5 0.0; - visible: 1; - } - } - } - } -} diff --git a/new/res/edje/search.edc b/new/res/edje/search.edc deleted file mode 100755 index 6f50efe..0000000 --- a/new/res/edje/search.edc +++ /dev/null @@ -1,78 +0,0 @@ -collections { - group { - name: "main"; - - parts { - part { - name: "bg"; - type: SPACER; - description { - state: "default" 0.0; - align: 0.0 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - } - } - part { - name: "entry"; - type: SWALLOW; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.0 0.0; to: "bg"; } - rel2 { relative: 0.8 1.0; to: "bg"; } - align: 0.5 0.0; - visible: 1; - } - } - part { - name: "button"; - type: SWALLOW; - description { - state: "default" 0.0; - rel1 { relative: 1.0 0.0; to: "entry"; } - rel2 { relative: 0.0 1.0; to: "button_search"; } - align: 0.5 1.0; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } - part { - name: "button_result"; - type: SWALLOW; - description { - state: "default" 0.0; - rel1 { relative: 0.9 1.0; to: "bg"; } - rel2 { relative: 1.0 1.0; to: "bg"; } - align: 0.5 1.0; - visible: 1; - } - description { - state: "hide" 0.0; - inherit: "default" 0.0; - rel1 { relative: 1.0 1.0; to: "bg"; } - rel2 { relative: 1.1 1.0; to: "bg"; } - } - } - } - programs { - program { - signal: "hide"; - source: "button_result"; - action: STATE_SET "hide" 0.0; - target: "button_result"; - } - program { - signal: "show"; - source: "button_result"; - action: STATE_SET "default" 0.0; - target: "button_result"; - } - } - } -} diff --git a/new/res/edje/search_result.edc b/new/res/edje/search_result.edc deleted file mode 100755 index 5dbf4e0..0000000 --- a/new/res/edje/search_result.edc +++ /dev/null @@ -1,32 +0,0 @@ -collections { - group { - name: "main"; - - parts { - part { - name: "bg"; - type: RECT; - description { - state: "default" 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - color: 0 0 0 0; - visible: 1; - } - } - part { - name: "content"; - type: SWALLOW; - scale: 1; - mouse_events: 0; - description { - state: "default" 0.0; - rel1 { relative: 0.0 0.0; to: "bg"; } - rel2 { relative: 1.0 1.0; to: "bg"; } - align: 0.5 0.0; - visible: 1; - } - } - } - } -} diff --git a/new/res/edje/ui_manager.edc b/new/res/edje/ui_manager.edc deleted file mode 100755 index 3c9d525..0000000 --- a/new/res/edje/ui_manager.edc +++ /dev/null @@ -1,54 +0,0 @@ -images { - image: "Aventure01_background.png" COMP; -} - -collections { - group { - name: "main"; - parts { - part { - name: "bg"; - type: SWALLOW; - description { - state: "default" 0.0; - align: 0.0 0.0; - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - visible: 0; - } - } - part { - name: "bg_img"; - type: IMAGE; - scale: 1; - mouse_events: 0; - description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to: "bg"; } - rel2 { relative: 1.0 1.0; to: "bg"; } - image { - normal: "Aventure01_background.png"; - } - visible: 1; - } - } - part { - name: "content"; - type: SWALLOW; - description { - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - visible: 1; - } - } - part { - name: "popup"; - type: SWALLOW; - description { - rel1 { relative: 0.0 0.0; } - rel2 { relative: 1.0 1.0; } - visible: 1; - } - } - } - } -} diff --git a/new/src/adventure.c b/new/src/adventure.c deleted file mode 100755 index fecc567..0000000 --- a/new/src/adventure.c +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Samsung API - * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/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 <tizen.h> -#include <Elementary.h> -#include "adventure.h" -#include "log.h" -#include "initial.h" -#include "loading.h" -#include "util.h" - -static void -win_delete_request_cb(void *data, Evas_Object *obj, void *event_info) -{ - ui_app_exit(); -} - -static Evas_Object *_create_adventure(Evas_Object *parent) -{ - Evas_Object *adventure = NULL; - char *path = NULL; - char full_path[PATH_LEN] = {0, }; - - adventure = elm_layout_add(parent); - retv_if(!adventure, NULL); - - path = app_get_resource_path(); - retv_if(!path, NULL); - - snprintf(full_path, sizeof(full_path), "%s/edje/adventure.edj", path); - - elm_layout_file_set(adventure, full_path, "main"); - evas_object_size_hint_weight_set(adventure, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(adventure, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(adventure); - - return adventure; -} - -static void _destroy_adventure(Evas_Object *adventure) -{ - ret_if(!adventure); - evas_object_del(adventure); -} - -Eina_Bool _destroy_initial_cb(void *data) -{ - adventure_info_s *adventure_info = data; - - retv_if(!adventure_info, ECORE_CALLBACK_CANCEL); - - elm_object_part_content_unset(adventure_info->adventure, "initial"); - initial_destroy(adventure_info->initial); - adventure_info->initial_timer = NULL; - - adventure_info->ui_manager = ui_manager_create(adventure_info->conformant, adventure_info); - retv_if(!adventure_info->ui_manager, ECORE_CALLBACK_CANCEL); - -#if 0 - adventure_info->loading = loading_create(adventure_info->adventure, adventure_info->width, adventure_info->height); - retv_if(!adventure_info->loading, ECORE_CALLBACK_CANCEL); - elm_object_part_content_set(adventure_info->adventure, "loading", adventure_info->loading); -#endif - - return ECORE_CALLBACK_CANCEL; -} - -static bool -app_create(void *data) -{ - adventure_info_s *adventure_info = data; - adventure_info->win = elm_win_util_standard_add(PACKAGE, PACKAGE); - elm_win_conformant_set(adventure_info->win, EINA_TRUE); - elm_win_autodel_set(adventure_info->win, EINA_TRUE); - if (elm_win_wm_rotation_supported_get(adventure_info->win)) { - int rots[1] = {0}; - elm_win_wm_rotation_available_rotations_set(adventure_info->win, (const int *)(&rots), 1); - } - evas_object_smart_callback_add(adventure_info->win, "delete,request", win_delete_request_cb, NULL); - elm_win_screen_size_get(adventure_info->win, NULL, NULL, &adventure_info->width, &adventure_info->height); - evas_object_show(adventure_info->win); - - adventure_info->conform = elm_conformant_add(adventure_info->win); - elm_win_indicator_mode_set(adventure_info->win, ELM_WIN_INDICATOR_HIDE); - evas_object_size_hint_weight_set(adventure_info->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_win_resize_object_add(adventure_info->win, adventure_info->conform); - evas_object_show(adventure_info->conform); - - _D("Window size (%d:%d)", adventure_info->width, adventure_info->height); - - adventure_info->adventure = _create_adventure(adventure_info->conform); - if (adventure_info->adventure) - elm_object_content_set(adventure_info->conform, adventure_info->adventure); - else - _E("cannot create the adventure ui"); - - adventure_info->initial = initial_create(adventure_info->conform, adventure_info->width, adventure_info->height); - if (adventure_info->initial) - elm_object_part_content_set(adventure_info->adventure, "initial", adventure_info->initial); - else - _E("cannot create the initial ui"); - - adventure_info->initial_timer = ecore_timer_add(3.0f, _destroy_initial_cb, adventure_info); - retv_if(!adventure_info->initial_timer, false); - - return true; -} - -static void -app_control(app_control_h app_control, void *data) -{ - adventure_info_s *adventure_info = data; - ret_if(!adventure_info); -} - -static void -app_pause(void *data) -{ - /* Take necessary actions when application becomes invisible. */ -} - -static void -app_resume(void *data) -{ - /* Take necessary actions when application becomes visible. */ -} - -static void -app_terminate(void *data) -{ - adventure_info_s *adventure_info = data; - - if (adventure_info->ui_manager) - ui_manager_destroy(adventure_info->ui_manager); - - if (adventure_info->adventure) - _destroy_adventure(adventure_info->adventure); - - if (adventure_info->initial_timer) { - ecore_timer_del(adventure_info->initial_timer); - initial_destroy(adventure_info->initial); - } - - if (adventure_info->conform) - evas_object_del(adventure_info->conform); - - if (adventure_info->win) - evas_object_del(adventure_info->win); -} - -static void -ui_app_lang_changed(app_event_info_h event_info, void *user_data) -{ - /*APP_EVENT_LANGUAGE_CHANGED*/ - char *locale = NULL; - system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale); - elm_language_set(locale); - free(locale); - return; -} - -static void -ui_app_orient_changed(app_event_info_h event_info, void *user_data) -{ - /*APP_EVENT_DEVICE_ORIENTATION_CHANGED*/ - return; -} - -static void -ui_app_region_changed(app_event_info_h event_info, void *user_data) -{ - /*APP_EVENT_REGION_FORMAT_CHANGED*/ -} - -static void -ui_app_low_battery(app_event_info_h event_info, void *user_data) -{ - /*APP_EVENT_LOW_BATTERY*/ -} - -static void -ui_app_low_memory(app_event_info_h event_info, void *user_data) -{ - /*APP_EVENT_LOW_MEMORY*/ -} - -int -main(int argc, char *argv[]) -{ - adventure_info_s adventure_info = {0,}; - int ret = 0; - - ui_app_lifecycle_callback_s event_callback = {0,}; - app_event_handler_h handlers[5] = {NULL, }; - - event_callback.create = app_create; - event_callback.terminate = app_terminate; - event_callback.pause = app_pause; - event_callback.resume = app_resume; - event_callback.app_control = app_control; - - ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, ui_app_low_battery, &adventure_info); - ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, ui_app_low_memory, &adventure_info); - ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, ui_app_orient_changed, &adventure_info); - ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &adventure_info); - ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, ui_app_region_changed, &adventure_info); - ui_app_remove_event_handler(handlers[APP_EVENT_LOW_MEMORY]); - - ret = ui_app_main(argc, argv, &event_callback, &adventure_info); - if (ret != APP_ERROR_NONE) { - dlog_print(DLOG_ERROR, LOG_TAG, "ui_app_main() is failed. err = %d", ret); - } - - return ret; -} diff --git a/new/src/ctx_popup.c b/new/src/ctx_popup.c deleted file mode 100755 index e69de29..0000000 --- a/new/src/ctx_popup.c +++ /dev/null diff --git a/new/src/db.c b/new/src/db.c deleted file mode 100755 index 504421c..0000000 --- a/new/src/db.c +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Samsung API - * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/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 <Evas.h> -#include <sqlite3.h> -#include <stdbool.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <app_common.h> - -#include "db.h" -#include "log.h" -#include "util.h" - -#define APP_DB_FILE ".app.db" - - - - -HAPI sqlite3 *db_open(void) -{ - sqlite3 *db = NULL; - char *path = NULL; - char db_file[FILE_LEN] = {0, }; - int ret = SQLITE_OK; - - path = app_get_data_path(); - retv_if(!path, NULL); - - snprintf(db_file, sizeof(db_file), "%s/%s", path, APP_DB_FILE); - free(path); - - ret = sqlite3_open(db_file, &db); - if (SQLITE_OK != ret) { - _E("%s", sqlite3_errmsg(db)); - return NULL; - } - - return db; -} - - - -HAPI void db_close(sqlite3 *db) -{ - ret_if(!db); - sqlite3_close(db); -} - - - -HAPI sqlite3_stmt *db_prepare(sqlite3 *db, const char *query) -{ - sqlite3_stmt *stmt = NULL; - int ret = SQLITE_OK; - - retv_if(!query, NULL); - - ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL); - if (SQLITE_OK != ret) { - _E("%s, %s", query, sqlite3_errmsg(db)); - return NULL; - } - - return stmt; -} - - - -HAPI int db_next(sqlite3 *db, sqlite3_stmt *stmt) -{ - int ret = SQLITE_OK; - - retv_if(!stmt, APPL_ERROR_FAIL); - - ret = sqlite3_step(stmt); - switch (ret) { - case SQLITE_ROW: /* SQLITE_ROW : 100 */ - return APPL_ERROR_NONE; - case SQLITE_DONE: /* SQLITE_ROW : 101 */ - return APPL_ERROR_NO_DATA; - default: - _E("%s", sqlite3_errmsg(db)); - return APPL_ERROR_FAIL; - } - - return APPL_ERROR_NONE; -} - - - -HAPI int db_reset(sqlite3 *db, sqlite3_stmt *stmt) -{ - int ret = SQLITE_OK; - - retv_if(!stmt, APPL_ERROR_INVALID_PARAMETER); - - ret = sqlite3_reset(stmt); - if (SQLITE_OK != ret) { - _E("%s", sqlite3_errmsg(db)); - return APPL_ERROR_FAIL; - } - - sqlite3_clear_bindings(stmt); - - return APPL_ERROR_NONE; -} - - - -HAPI int db_bind_bool(sqlite3 *db, sqlite3_stmt *stmt, int idx, bool value) -{ - int ret = SQLITE_OK; - - retv_if(!stmt, APPL_ERROR_FAIL); - - ret = sqlite3_bind_int(stmt, idx, (int) value); - if (SQLITE_OK != ret) { - _E("%s", sqlite3_errmsg(db)); - return APPL_ERROR_FAIL; - } - - return APPL_ERROR_NONE; -} - - - -HAPI int db_bind_int(sqlite3 *db, sqlite3_stmt *stmt, int idx, int value) -{ - int ret = SQLITE_OK; - - retv_if(!stmt, APPL_ERROR_FAIL); - - ret = sqlite3_bind_int(stmt, idx, value); - if (SQLITE_OK != ret) { - _E("%s", sqlite3_errmsg(db)); - return APPL_ERROR_FAIL; - } - - return APPL_ERROR_NONE; -} - - - -HAPI int db_bind_double(sqlite3 *db, sqlite3_stmt *stmt, int idx, double value) -{ - int ret = SQLITE_OK; - - retv_if(!stmt, APPL_ERROR_FAIL); - - ret = sqlite3_bind_double(stmt, idx, value); - if (SQLITE_OK != ret) { - _E("%s", sqlite3_errmsg(db)); - return APPL_ERROR_FAIL; - } - - return APPL_ERROR_NONE; -} - - - -HAPI int db_bind_str(sqlite3 *db, sqlite3_stmt *stmt, int idx, const char *str) -{ - int ret = SQLITE_OK; - - retv_if(!stmt, APPL_ERROR_FAIL); - - if (str) { - ret = sqlite3_bind_text(stmt, idx, str, -1, SQLITE_TRANSIENT); - } else { - ret = sqlite3_bind_null(stmt, idx); - } - - if (SQLITE_OK != ret) { - _E("%s", sqlite3_errmsg(db)); - return APPL_ERROR_FAIL; - } - - return APPL_ERROR_NONE; -} - - - -HAPI bool db_get_bool(sqlite3_stmt *stmt, int index) -{ - retv_if(!stmt, false); - return (bool) (!!sqlite3_column_int(stmt, index)); -} - - - -HAPI int db_get_int(sqlite3_stmt *stmt, int index) -{ - retv_if(!stmt, 0); - return sqlite3_column_int(stmt, index); -} - - - -HAPI int db_get_double(sqlite3_stmt *stmt, int index) -{ - retv_if(!stmt, 0); - return sqlite3_column_double(stmt, index); -} - - - -HAPI const char *db_get_str(sqlite3_stmt *stmt, int index) -{ - retv_if(!stmt, NULL); - return (const char *) sqlite3_column_text(stmt, index); -} - - - -HAPI int db_finalize(sqlite3 *db, sqlite3_stmt *stmt) -{ - int ret = SQLITE_OK; - - retv_if(!stmt, APPL_ERROR_INVALID_PARAMETER); - - ret = sqlite3_finalize(stmt); - if (SQLITE_OK != ret) { - _E("%s", sqlite3_errmsg(db)); - return APPL_ERROR_FAIL; - } - - return APPL_ERROR_NONE; -} - - - -HAPI int db_exec(sqlite3 *db, const char *query) -{ - sqlite3_stmt *stmt = NULL; - - retv_if(!query, APPL_ERROR_INVALID_PARAMETER); - - stmt = db_prepare(db, query); - retv_if(!stmt, APPL_ERROR_FAIL); - - goto_if(APPL_ERROR_FAIL == db_next(db, stmt), ERROR); - goto_if(APPL_ERROR_FAIL == db_finalize(db, stmt), ERROR); - - return APPL_ERROR_NONE; - -ERROR: - if (stmt) db_finalize(db, stmt); - return APPL_ERROR_FAIL; -} - - - -HAPI int db_create_table(sqlite3 *db) -{ - const char *TABLES[] = { - "CREATE TABLE IF NOT EXIST db_checksum (version INT);", - "CREATE TABLE IF NOT EXIST path_information (" - "path_id INTEGER PRIMARY KEY" - ", user_id INTEGER NOT NULL" - ", latitude DOUBLE NOT NULL" - ", longitude DOUBLE NOT NULL" - ", title TEXT" - ", score INT" - ", price INT" - ", visible BOOL" - ", FOREIGH KEY(user_id) REFERENCES user(user_id)" - ");", - "CREATE TABLE IF NOT EXIST path (" - "path_id INTEGER NOT NULL" - ", order INTEGER NOT NULL" - ", content_id INTENGER NOT NULL" - ", PRIMARY KEY(path_id, order)" - ", FOREIGN KEY(path_id) REFERENCES path(path_id)" - ", FOREIGH KEY(content_id) REFERENCES content(contend_id)", - ");", - "CREATE TABLE IF NOT EXIST content (" - "content_id INTEGER PRIMARY KEY" - ", user_id INTEGER NOT NULL" - ", latitude DOUBLE NOT NULL" - ", longitude DOUBLE NOT NULL" - ", title TEXT" - ", content TEXT" - ", tag TEXT" - ", location TEXT" - ", icon TEXT" - ", attach_id INTEGER" - ", FOREIGN KEY(user_id) REFERENCES user(user_id)" - ", FOREIGN KEY(attach_id) REFERENCES attach(attach_id)" - ");", - "CREATE TABLE IF NOT EXIST attach (" - "attach_id INTEGER PRIMARY KEY" - ", path TEXT NOT NULL" - ", ref_count INT NOT NULL" - ");", - "CREATE TABLE IF NOT EXIST purchase (" - "user_id INTEGER NOT NULL" - ", content_id INTEGER NOT NULL" - ", PRIMARY KEY(user_id, content_id)" - ", FOREIGN KEY(user_id) REFERENCES user(user_id)" - ", FOREIGN KEY(content_id) REFERENCES content(content_id)" - ");", - "CREATE TABLE IF NOT EXIST user (" - "user_id INTEGER PRIMARY KEY" - ", name TEXT" - ");", - }; - int count = 0; - int i = 0; - - count = sizeof(TABLES) / sizeof(char *); - for (; i < count; i++) { - _D("Create a table[%s]", TABLES[i]); - break_if(db_exec(db, TABLES[i]) != APPL_ERROR_NONE); - } - - return APPL_ERROR_FAIL; -} - - - -HAPI int db_drop_table(sqlite3 *db) -{ - const char *TABLES[] = { - "DROP TABLE IF EXIST db_checksum;", - "DROP TABLE IF EXIST path_information;", - "DROP TABLE IF EXIST path;", - "DROP TABLE IF EXIST content;", - "DROP TABLE IF EXIST attach;", - "DROP TABLE IF EXIST purchase;", - "DROP TABLE IF EXIST user;", - }; - int count = 0; - int i = 0; - - count = sizeof(TABLES) / sizeof(char *); - for (; i < count; i++) { - _D("Drop a table[%s]", TABLES[i]); - break_if(db_exec(db, TABLES[i]) != APPL_ERROR_NONE); - } - - return APPL_ERROR_FAIL; -} - - - -HAPI int db_insert_version(sqlite3 *db, int version) -{ - const char *QUERY_SYNTAX = "INSERT INTO db_checksum (version) values (%d);"; - char *query = NULL; - - query = sqlite3_mprintf(QUERY_SYNTAX, version); - retv_if(!query, APPL_ERROR_FAIL); - - if (db_exec(db, query) != APPL_ERROR_NONE) { - _E("Cannot execute query.[%s]", query); - sqlite3_free(query); - return APPL_ERROR_FAIL; - } - - sqlite3_free(query); - - /* keep the home DB opened */ - - return APPL_ERROR_NONE; -} - - - -HAPI int db_remove_version(sqlite3 *db, int version) -{ - const char *QUERY_SYNTAX = "DELETE FROM db_checksum WHERE version=%d;"; - char *query = NULL; - - query = sqlite3_mprintf(QUERY_SYNTAX, version); - retv_if(!query, APPL_ERROR_FAIL); - - if (db_exec(db, query) != APPL_ERROR_NONE) { - _E("Cannot execute query.[%s]", query); - sqlite3_free(query); - return APPL_ERROR_FAIL; - } - - sqlite3_free(query); - - /* keep the home DB opened */ - - return APPL_ERROR_NONE; -} - - - -HAPI int db_update_version(sqlite3 *db, int version) -{ - const char *QUERY_SYNTAX = "UPDATE db_checksum SET version=%d;"; - char *query = NULL; - - query = sqlite3_mprintf(QUERY_SYNTAX, version); - retv_if(!query, APPL_ERROR_FAIL); - - if (db_exec(db, query) != APPL_ERROR_NONE) { - _E("Cannot execute query.[%s]", query); - sqlite3_free(query); - return APPL_ERROR_FAIL; - } - - sqlite3_free(query); - - /* keep the home DB opened */ - - return APPL_ERROR_NONE; -} - - - -HAPI int db_count_version(sqlite3 *db) -{ - const char *QUERY_SYNTAX = "SELECT COUNT(*) FROM db_checksum;"; - sqlite3_stmt *st = NULL; - int count = 0; - - st = db_prepare(db, QUERY_SYNTAX); - retv_if(!st, APPL_ERROR_FAIL); - - if (db_next(db, st) == APPL_ERROR_FAIL) { - _E("db_next error"); - db_finalize(db, st); - return -1; - } - - count = db_get_int(st, 0); - db_reset(db, st); - db_finalize(db, st); - - /* keep the home DB opened */ - - return count; -} - - - -// End of file. diff --git a/new/src/initial.c b/new/src/initial.c deleted file mode 100755 index 08acf8a..0000000 --- a/new/src/initial.c +++ /dev/null @@ -1,45 +0,0 @@ -#include <Elementary.h> -#include <app.h> -#include "log.h" -#include "util.h" - -const char *const INITIAL_EDJE = "initial.edj"; - - - -Evas_Object *initial_create(Evas_Object *parent, int width, int height) -{ - Evas_Object *initial = NULL; - Evas_Object *rect = NULL; - char *path = NULL; - char full_path[PATH_LEN] = {0, }; - - retv_if(!parent, NULL); - - path = app_get_resource_path(); - retv_if(!path, NULL); - - snprintf(full_path, sizeof(full_path), "%s/edje/%s", path, INITIAL_EDJE); - free(path); - - initial = elm_layout_add(parent); - retv_if(!initial, NULL); - elm_layout_file_set(initial, full_path, "main"); - evas_object_size_hint_weight_set(initial, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_show(initial); - - rect = evas_object_rectangle_add(evas_object_evas_get(parent)); - if (rect) { - evas_object_size_hint_min_set(rect, width, height); - evas_object_show(rect); - elm_object_part_content_set(initial, "bg", rect); - } - - return initial; -} - -void initial_destroy(Evas_Object *initial) -{ - ret_if(!initial); - evas_object_del(initial); -} diff --git a/new/src/list.c b/new/src/list.c deleted file mode 100755 index e69de29..0000000 --- a/new/src/list.c +++ /dev/null diff --git a/new/src/loading.c b/new/src/loading.c deleted file mode 100755 index bbfc711..0000000 --- a/new/src/loading.c +++ /dev/null @@ -1,44 +0,0 @@ -#include <Elementary.h> -#include <app.h> -#include "log.h" -#include "adventure.h" -#include "util.h" - - - -Evas_Object *loading_create(Evas_Object *parent, int width, int height) -{ - Evas_Object *loading = NULL; - char *path = NULL; - char full_path[PATH_LEN] = {0, }; - - retv_if(!parent, NULL); - - path = app_get_resource_path(); - retv_if(!path, NULL); - - snprintf(full_path, sizeof(full_path), "%s/edje/loading.edj", path); - free(path); - - loading = elm_layout_add(parent); - goto_if(!loading, error); - - elm_layout_file_set(loading, full_path, "loading"); - evas_object_size_hint_weight_set(loading, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(loading, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_size_hint_min_set(loading, width, height); - evas_object_show(loading); - - return loading; - -error: - return NULL; -} - - - -void loading_destroy(Evas_Object *loading) -{ - ret_if(!loading); - evas_object_del(loading); -} diff --git a/new/src/login.c b/new/src/login.c deleted file mode 100755 index e69de29..0000000 --- a/new/src/login.c +++ /dev/null diff --git a/new/src/main.c b/new/src/main.c deleted file mode 100755 index 4335eb5..0000000 --- a/new/src/main.c +++ /dev/null @@ -1,162 +0,0 @@ -/*
- * Samsung API
- * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/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 <tizen.h>
-#include <Elementary.h>
-#include "log.h"
-#include "util.h"
-#include "main.h"
-#include "ui_manager.h"
-
-static void
-_win_delete_request_cb(void *data, Evas_Object *obj, void *event_info)
-{
- ui_app_exit();
-}
-
-static bool
-app_create(void *data)
-{
- moment_info_s *moment_info = data;
-
- moment_info->win = elm_win_util_standard_add(PACKAGE, PACKAGE);
- elm_win_conformant_set(moment_info->win, EINA_TRUE);
- elm_win_autodel_set(moment_info->win, EINA_TRUE);
- if (elm_win_wm_rotation_supported_get(moment_info->win)) {
- int rots[1] = {0};
- elm_win_wm_rotation_available_rotations_set(moment_info->win, (const int *)(&rots), 1);
- }
- evas_object_smart_callback_add(moment_info->win, "delete,request", _win_delete_request_cb, NULL);
- elm_win_screen_size_get(moment_info->win, NULL, NULL, &moment_info->width, &moment_info->height);
- evas_object_show(moment_info->win);
-
- moment_info->conform = elm_conformant_add(moment_info->win);
- elm_win_indicator_mode_set(moment_info->win, ELM_WIN_INDICATOR_HIDE);
- evas_object_size_hint_weight_set(moment_info->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(moment_info->win, moment_info->conform);
- evas_object_show(moment_info->conform);
-
- _D("Window size (%d:%d)", moment_info->width, moment_info->height);
-
- moment_info->e = evas_object_evas_get(moment_info->win);
-
- return true;
-}
-
-static void
-app_control(app_control_h app_control, void *data)
-{
- moment_info_s *moment_info = data;
- ret_if(!moment_info);
- ret_if(!mement_info->conformant);
-
- moment_info->ui_manager = ui_manager_create(moment_info->conformant, moment_info);
- ret_if(!moment_info->ui_manager);
-}
-
-static void
-app_pause(void *data)
-{
- /* Take necessary actions when application becomes invisible. */
-}
-
-static void
-app_resume(void *data)
-{
- /* Take necessary actions when application becomes visible. */
-}
-
-static void
-app_terminate(void *data)
-{
- moment_info_s *moment_info = data;
-
- if (moment_info->ui_manager)
- ui_manager_destroy(moment_info->ui_manager);
-
- if (moment_info->conform)
- evas_object_del(moment_info->conform);
-
- if (moment_info->win)
- evas_object_del(moment_info->win);
-}
-
-static void
-ui_app_lang_changed(app_event_info_h event_info, void *user_data)
-{
- /*APP_EVENT_LANGUAGE_CHANGED*/
- char *locale = NULL;
- system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale);
- elm_language_set(locale);
- free(locale);
- return;
-}
-
-static void
-ui_app_orient_changed(app_event_info_h event_info, void *user_data)
-{
- /*APP_EVENT_DEVICE_ORIENTATION_CHANGED*/
- return;
-}
-
-static void
-ui_app_region_changed(app_event_info_h event_info, void *user_data)
-{
- /*APP_EVENT_REGION_FORMAT_CHANGED*/
-}
-
-static void
-ui_app_low_battery(app_event_info_h event_info, void *user_data)
-{
- /*APP_EVENT_LOW_BATTERY*/
-}
-
-static void
-ui_app_low_memory(app_event_info_h event_info, void *user_data)
-{
- /*APP_EVENT_LOW_MEMORY*/
-}
-
-int
-main(int argc, char *argv[])
-{
- moment_info_s moment_info = {0,};
- int ret = 0;
-
- ui_app_lifecycle_callback_s event_callback = {0,};
- app_event_handler_h handlers[5] = {NULL, };
-
- event_callback.create = app_create;
- event_callback.terminate = app_terminate;
- event_callback.pause = app_pause;
- event_callback.resume = app_resume;
- event_callback.app_control = app_control;
-
- ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, ui_app_low_battery, &moment_info);
- ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, ui_app_low_memory, &moment_info);
- ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, ui_app_orient_changed, &moment_info);
- ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &moment_info);
- ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, ui_app_region_changed, &moment_info);
- ui_app_remove_event_handler(handlers[APP_EVENT_LOW_MEMORY]);
-
- ret = ui_app_main(argc, argv, &event_callback, &moment_info);
- if (ret != APP_ERROR_NONE) {
- dlog_print(DLOG_ERROR, LOG_TAG, "ui_app_main() is failed. err = %d", ret);
- }
-
- return ret;
-}
diff --git a/new/src/main_view.c b/new/src/main_view.c deleted file mode 100755 index ae62b50..0000000 --- a/new/src/main_view.c +++ /dev/null @@ -1,110 +0,0 @@ -#include <Elementary.h>
-#include "main.h"
-#include "log.h"
-#include "scroller"
-
-const char *const MAIN_VIEW_EDJE = "main_view.edj";
-
-static void _change_entry_cb(void *data, Evas_Object *obj, void *event_info)
-{
- moment_info_s *moment_info = data;
-
- ret_if(!moment_info);
-}
-
-static Evas_Object *_create_search_entry(Evas_Object *parent, moment_info_s *moment_info)
-{
- Evas_Object *entry = NULL;
-
- retv_if(!parent, NULL);
-
- entry = elm_entry_add(parent);
- retv_if(!entry, NULL);
-
- elm_entry_single_line_set(entry, EINA_TRUE);
- elm_entry_scrollable_set(entry, EINA_TRUE);
- elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_PLAINTEXT);
- elm_object_part_text_set(entry, "elm.guide", "City");
-
- evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- evas_object_smart_callback_add(entry, "changed", _change_entry_cb, moment_info);
- evas_object_smart_callback_add(entry, "focused", _focus_entry_cb, moment_info);
- evas_object_smart_callback_add(entry, "unfocused", _focus_entry_cb, moment_info);
-
- evas_object_show(entry);
-
- return entry;
-}
-
-void _destroy_search_entry(Evas_Object *entry)
-{
- ret_if(!entry);
- evas_object_del(entry);
-}
-
-static _clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- moment_info_s *moment_info = data;
-
- _D("Add button is clicked");
-
- ret_if(!moment_info);
-
- elm_object_signal_emit(moment_info->main_view
-
- moment_info->scroller = scroller_create(moment_info->ui_manager);
- ret_if(!moment_info->scroller);
-}
-
-Evas_Object *main_view_create(Evas_Object *parent, moment_info_s *moment_info)
-{
- Evas_Object *main_view = NULL;
- Evas_Object *button = NULL;
- char *path = NULL;
- char full_path[] = {0, };
-
- retv_if(!parent, NULL);
-
- path = app_get_resource_path();
- retv_if(!path, NULL);
-
- snprintf(full_path, sizeof(full_path), "%s/edje/%s", path, MAIN_VIEW_EDJE);
- free(path);
-
- main_view = elm_layout_add(parent);
- retv_if(!main_view, NULL);
- elm_layout_file_set(main_view, full_path, "main");
- evas_object_size_hint_weight_set(main_view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(main_view, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(main_view);
-
- elm_object_part_text_set(main_view, "title", "No cities");
- elm_object_part_text_set(main_view, "description", "After you add cities, they will be shown here.");
-
- button = elm_button_add(parent);
- if (button) {
- elm_object_text_set(button, "+ Add");
- elm_object_part_content_set(main_view, "button", button);
- evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_smart_callback_add(button, "clicked", _clicked_cb, moment_info);
- }
-
- return main_view;
-}
-
-void main_view_destroy(Evas_Object *main_view)
-{
- Evas_Object *button = NULL;
-
- ret_if(!main_view);
-
- button = elm_object_part_content_unset(main_view, "button");
- if (button) {
- evas_object_del(button);
- }
-
- evas_object_del(main_view);
-}
diff --git a/new/src/map.c b/new/src/map.c deleted file mode 100644 index a2aa2de..0000000 --- a/new/src/map.c +++ /dev/null @@ -1,341 +0,0 @@ -#include <Elementary.h> -#include "main.h" -#include "log.h" - -const char *const MAP_EDJE = "map.edj"; - - -static city_info_s cities[] = { - { - .id = CITY_HONOLULU, - .timezone = -10.0, - .name = "Honolulu", - .nation = "USA", - }, - { - .id = CITY_LOS_ANGELES, - .timezone = -8.0, - .name = "Los Angeles", - .nation = "USA", - }, - { - .id = CITY_SAN_FRANCISCO, - .timezone = -8.0, - .name = "San Francisco", - .nation = "USA", - }, - { - .id = CITY_VANCOUVER, - .timezone = -8.0, - .name = "Vancouver", - .nation = "Canada", - }, - { - .id = CITY_CHICAGO, - .timezone = -6.0, - .name = "Chicago", - .nation = "USA", - }, - { - .id = CITY_MEICO_CITY, - .timezone = -6.0, - .name = "Mexico City", - .nation = "Mexico", - }, - { - .id = CITY_SAN_JOSE, - .timezone = -6.0, - .name = "San Jose", - .nation = "Costa Rica", - }, - { - .id = CITY_NEW_YORK_CITY, - .timezone = -5.0, - .name = "New York City", - .nation = "USA", - }, - { - .id = CITY_TORONTO, - .timezone = -5.0, - .name = "Toronto", - .nation = "Canada", - }, - { - .id = CITY_WASHINGTON_DC, - .timezone = -5.0, - .name = "Washington DC", - .nation = "USA", - }, - { - .id = CITY_BRASILIA, - .timezone = -3.0, - .name = "Brasilia", - .nation = "Brazil", - }, - { - .id = CITY_BUENOS_AIRES, - .timezone = -3.0, - .name = "Buenos Aires", - .nation = "Argentina", - }, - { - .id = CITY_SAO_PAULO, - .timezone = -3.0, - .name = "Sao Paulo", - .nation = "Brazil", - }, - { - .id = CITY_DUBLIN, - .timezone = 0.0, - .name = "Dublin", - .nation = "Ireland", - }, - { - .id = CITY_LISBON, - .timezone = 0.0, - .name = "Lisbon", - .nation = "Portugal", - }, - { - .id = CITY_LONDON, - .timezone = 0.0, - .name = "London", - .nation = "England", - }, - { - .id = CITY_AMSTERDAM, - .timezone = 1.0, - .name = "Amsterdam", - .nation = "Netherlands", - }, - { - .id = CITY_BARCELONA, - .timezone = 1.0, - .name = "Barcelona", - .nation = "Spain", - }, - { - .id = CITY_BERLIN, - .timezone = 1.0, - .name = "Berlin", - .nation = "Germany", - }, - { - .id = CITY_BRUSSELS, - .timezone = 1.0, - .name = "Brussels", - .nation = "Belgium", - }, - { - .id = CITY_CAPE_TOWN, - .timezone = 1.0, - .name = "Cape Town", - .nation = "South Africa", - }, - { - .id = CITY_GENEVA, - .timezone = 1.0, - .name = "Geneva", - .nation = "Switzerland", - }, - { - .id = CITY_MADRID, - .timezone = 1.0, - .name = "Madrid", - .nation = "Spain", - }, - { - .id = CITY_PARIS, - .timezone = 1.0, - .name = "Paris", - .nation = "France", - }, - { - .id = CITY_ROME, - .timezone = 1.0, - .name = "Rome", - .nation = "Italy", - }, - { - .id = CITY_STOCKHOLM, - .timezone = 1.0, - .name = "Stockholm", - .nation = "Sweden", - }, - { - .id = CITY_WARSAW, - .timezone = 1.0, - .name = "Warsaw", - .nation = "Poland", - }, - { - .id = CITY_ANKARA, - .timezone = 2.0, - .name = "Ankara", - .nation = "Turkey", - }, - { - .id = CITY_ATHENS, - .timezone = 2.0, - .name = "Athens", - .nation = "Greece", - }, - { - .id = CITY_HELSINKI, - .timezone = 2.0, - .name = "Helsinki", - .nation = "Finland", - }, - { - .id = CITY_ISTANBUL, - .timezone = 2.0, - .name = "Istanbul", - .nation = "Turkey", - }, - { - .id = CITY_JERUSALEM, - .timezone = 2.0, - .name = "Jerusalem", - .nation = "Israel", - }, - { - .id = CITY_KAHIRA, - .timezone = 2.0, - .name = "Jerusalem", - .nation = "Egypt", - }, - { - .id = CITY_BAGHDAD, - .timezone = 3.0, - .name = "Baghdad", - .nation = "Iraq", - }, - { - .id = CITY_DUBAI, - .timezone = 3.0, - .name = "Dubai", - .nation = "United Arab Emirates", - }, - { - .id = CITY_MOSCOW, - .timezone = 3.0, - .name = "Moscow", - .nation = "Russia", - }, - { - .id = CITY_ISLAMABAD, - .timezone = 5.0, - .name = "Islamabad", - .nation = "Pakistan", - }, - { - .id = CITY_DELHI, - .timezone = 5.5, - .name = "Delhi", - .nation = "India", - }, - { - .id = CITY_MUMBAI, - .timezone = 5.5, - .name = "Mumbai", - .nation = "India", - }, - { - .id = CITY_DAKA, - .timezone = 6.0, - .name = "Bombay", - .nation = "India", - }, - { - .id = CITY_CALCUTTA, - .timezone = 6.0, - .name = "Calcutta", - .nation = "India", - }, - { - .id = CITY_BANGKOK, - .timezone = 7.0, - .name = "Bangkok", - .nation = "Thailand", - }, - { - .id = CITY_JAKARTA, - .timezone = 7.0, - .name = "Jakarta", - .nation = "Indonesia", - }, - { - .id = CITY_BEIJING, - .timezone = 8.0, - .name = "Beijing", - .nation = "China", - }, - { - .id = CITY_HONG_KONG, - .timezone = 8.0, - .name = "Hong Kong", - .nation = "China", - }, - { - .id = CITY_SINGAPORE, - .timezone = 8.0, - .name = "Singapore", - .nation = "Singapore", - }, - { - .id = CITY_TAIPEI, - .timezone = 8.0, - .name = "Taipei", - .nation = "Thaiwan", - }, - { - .id = CITY_SEOUL, - .timezone = 9.0, - .name = "Seoul", - .nation = "Korea", - }, - { - .id = CITY_TOKYO, - .timezone = 9.0, - .name = "Tokyo", - .nation = "Japan", - }, - { - .id = CITY_SYDNEY, - .timezone = 10.0, - .name = "Sydney", - .nation = "Australia", - }, -}; - -Evas_Object *map_create(Evas_Object *parent) -{ - Evas_Object *map = NULL; - Evas_Object *button = NULL; - char *path = NULL; - char full_path[] = {0, }; - - retv_if(!parent, NULL); - - path = app_get_resource_path(); - retv_if(!path, NULL); - - snprintf(full_path, sizeof(full_path), "%s/edje/%s", path, MAP_EDJE); - free(path); - - map = elm_layout_add(parent); - retv_if(!map, NULL); - elm_layout_file_set(map, full_path, "main"); - evas_object_show(map); - - return map; -} - -void map_destroy(Evas_Object *map) -{ - Evas_Object *button = NULL; - - ret_if(!map); - - evas_object_del(map); -} diff --git a/new/src/path.c b/new/src/path.c deleted file mode 100755 index e69de29..0000000 --- a/new/src/path.c +++ /dev/null diff --git a/new/src/path_group.c b/new/src/path_group.c deleted file mode 100755 index e69de29..0000000 --- a/new/src/path_group.c +++ /dev/null diff --git a/new/src/point.c b/new/src/point.c deleted file mode 100755 index e69de29..0000000 --- a/new/src/point.c +++ /dev/null diff --git a/new/src/result_view.c b/new/src/result_view.c deleted file mode 100755 index a702fd2..0000000 --- a/new/src/result_view.c +++ /dev/null @@ -1,71 +0,0 @@ -#include <Elementary.h>
-#include "main.h"
-#include "log.h"
-#include "scroller"
-
-const char *const MAIN_VIEW_EDJE = "result_view.edj";
-
-static _clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- moment_info_s *moment_info = data;
-
- _D("Add button is clicked");
-
- ret_if(!moment_info);
-
- elm_object_signal_emit(moment_info->result_view
-
- moment_info->scroller = scroller_create(moment_info->ui_manager);
- ret_if(!moment_info->scroller);
-}
-
-Evas_Object *result_view_create(Evas_Object *parent, moment_info_s *moment_info)
-{
- Evas_Object *result_view = NULL;
- Evas_Object *button = NULL;
- char *path = NULL;
- char full_path[] = {0, };
-
- retv_if(!parent, NULL);
-
- path = app_get_resource_path();
- retv_if(!path, NULL);
-
- snprintf(full_path, sizeof(full_path), "%s/edje/%s", path, MAIN_VIEW_EDJE);
- free(path);
-
- result_view = elm_layout_add(parent);
- retv_if(!result_view, NULL);
- elm_layout_file_set(result_view, full_path, "main");
- evas_object_size_hint_weight_set(result_view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(result_view, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(result_view);
-
- elm_object_part_text_set(result_view, "title", "No cities");
- elm_object_part_text_set(result_view, "description", "After you add cities, they will be shown here.");
-
- button = elm_button_add(parent);
- if (button) {
- elm_object_text_set(button, "+ Add");
- elm_object_part_content_set(result_view, "button", button);
- evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_smart_callback_add(button, "clicked", _clicked_cb, moment_info);
- }
-
- return result_view;
-}
-
-void result_view_destroy(Evas_Object *result_view)
-{
- Evas_Object *button = NULL;
-
- ret_if(!result_view);
-
- button = elm_object_part_content_unset(result_view, "button");
- if (button) {
- evas_object_del(button);
- }
-
- evas_object_del(result_view);
-}
diff --git a/new/src/scroller.c b/new/src/scroller.c deleted file mode 100755 index 9f4a0c6..0000000 --- a/new/src/scroller.c +++ /dev/null @@ -1,268 +0,0 @@ -#include <Elementary.h> - -#include "util.h" -#include "log.h" -#include "scroller.h" - -#define PRIVATE_DATA_KEY_SCROLLER_IS_SCROLLING "p_is_sc" -#define PRIVATE_DATA_KEY_SCROLLER_DRAG_START "p_dg_st" -#define PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST "pdkec" - - - -struct _event_cb { - int event_type; - void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *user_data); - void *user_data; -}; -typedef struct _event_cb event_cb_s; - - - -int scroller_is_scrolling(Evas_Object *scroller) -{ - retv_if(!scroller, 0); - return (int) evas_object_data_get(scroller, PRIVATE_DATA_KEY_SCROLLER_IS_SCROLLING); -} - - - -static void __anim_start_cb(void *data, Evas_Object *scroller, void *event_info) -{ - _D("start the scroller(%p) animation", scroller); - evas_object_data_set(scroller, PRIVATE_DATA_KEY_SCROLLER_IS_SCROLLING, (void *) 1); -} - - - -static void __anim_stop_cb(void *data, Evas_Object *scroller, void *event_info) -{ - _D("stop the scroller(%p) animation", scroller); - evas_object_data_del(scroller, PRIVATE_DATA_KEY_SCROLLER_IS_SCROLLING); - evas_object_data_del(scroller, PRIVATE_DATA_KEY_SCROLLER_DRAG_START); -} - - - -static void __drag_start_cb(void *data, Evas_Object *scroller, void *event_info) -{ - _D("start to drag the scroller(%p)", scroller); - evas_object_data_set(scroller, PRIVATE_DATA_KEY_SCROLLER_DRAG_START, (void *) 1); -} - - - -static void __drag_stop_cb(void *data, Evas_Object *scroller, void *event_info) -{ - _D("stop to drag the scroller(%p)", scroller); -} - - - -static void __scroll_cb(void *data, Evas_Object *scroller, void *event_info) -{ - int y = 0; - - ret_if(!scroller); - - if (!evas_object_data_get(scroller, PRIVATE_DATA_KEY_SCROLLER_DRAG_START)) - return; - - elm_scroller_region_get(scroller, NULL, &y, NULL, NULL); -} - - - -Evas_Object *scroller_create(Evas_Object *parent) -{ - Evas_Object *box = NULL; - Evas_Object *scroller = NULL; - - retv_if(!parent, NULL); - - scroller = elm_scroller_add(parent); - retv_if(!scroller, NULL); - - elm_scroller_bounce_set(scroller, EINA_TRUE, EINA_FALSE); - elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); - elm_scroller_page_scroll_limit_set(scroller, 0, 0); - elm_scroller_content_min_limit(scroller, EINA_FALSE, EINA_TRUE); - elm_scroller_single_direction_set(scroller, ELM_SCROLLER_SINGLE_DIRECTION_HARD); - - evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_min_set(scroller, 0, 0); - - elm_object_style_set(scroller, "effect"); - evas_object_show(scroller); - elm_object_scroll_lock_y_set(scroller, EINA_FALSE); - - evas_object_smart_callback_add(scroller, "scroll,anim,start", __anim_start_cb, NULL); - evas_object_smart_callback_add(scroller, "scroll,anim,stop", __anim_stop_cb, NULL); - evas_object_smart_callback_add(scroller, "scroll,drag,start", __drag_start_cb, NULL); - evas_object_smart_callback_add(scroller, "scroll,drag,stop", __drag_stop_cb, NULL); - evas_object_smart_callback_add(scroller, "scroll", __scroll_cb, NULL); - - box = elm_box_add(scroller); - goto_if(!box, ERROR); - - elm_box_horizontal_set(box, EINA_FALSE); - elm_box_align_set(box, 0.0, 0.5); - evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_show(box); - - elm_object_content_set(scroller, box); - - return scroller; - -ERROR: - if (scroller) { - evas_object_del(scroller); - } - - return NULL; -} - - - -void scroller_destroy(Evas_Object *scroller) -{ - Evas_Object *box = NULL; - - ret_if(!scroller); - - box = elm_object_content_unset(scroller); - if (box) { - evas_object_del(box); - } - - evas_object_del(scroller); -} - - - -void scroller_append_item(Evas_Object *scroller, Evas_Object *item) -{ - Evas_Object *box = NULL; - - box = elm_object_content_get(scroller); - ret_if(!box); - - elm_box_pack_end(box, item); -} - - - -void scroller_remove_item(Evas_Object *scroller, Evas_Object *item) -{ - Evas_Object *box = NULL; - Evas_Object *tmp = NULL; - Eina_List *list = NULL; - - int is_item_exist = 0; - - box = elm_object_content_get(scroller); - ret_if(!box); - - list = elm_box_children_get(box); - EINA_LIST_FREE(list, tmp) { - continue_if(!tmp); - if (item == tmp) { - is_item_exist = 1; - } - } - - if (!is_item_exist) { - _D("No item to remove"); - return; - } - - elm_box_unpack(box, item); -} - - - -void scroller_bring_in_item(Evas_Object *scroller, Evas_Object *item) -{ - Evas_Object *box = NULL; - Evas_Object *tmp = NULL; - Eina_List *list = NULL; - int y = 0; - int exist = 0; - - ret_if(!scroller); - ret_if(!item); - - box = elm_object_content_get(scroller); - ret_if(!box); - - list = elm_box_children_get(box); - ret_if(!list); - - EINA_LIST_FREE(list, tmp) { - continue_if(!tmp); - if (item == tmp) { - evas_object_geometry_get(item, NULL, &y, NULL, NULL); - exist = 1; - } - } - - if (exist) { - elm_scroller_region_bring_in(scroller, 0, y, 0, 0); - } -} - - - -int scroller_register_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *user_data), void *user_data) -{ - Eina_List *event_cb_list = NULL; - event_cb_s *event_cb_info = NULL; - - retv_if(!scroller, APPL_ERROR_INVALID_PARAMETER); - retv_if(event_type <= SCROLLER_EVENT_TYPE_INVALID, APPL_ERROR_INVALID_PARAMETER); - retv_if(event_type >= SCROLLER_EVENT_TYPE_MAX, APPL_ERROR_INVALID_PARAMETER); - retv_if(!event_cb, APPL_ERROR_INVALID_PARAMETER); - - event_cb_info = calloc(1, sizeof(event_cb_s)); - retv_if(!event_cb_info, APPL_ERROR_OUT_OF_MEMORY); - - event_cb_info->event_type = event_type; - event_cb_info->event_cb = event_cb; - event_cb_info->user_data = user_data; - - event_cb_list = evas_object_data_get(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST); - event_cb_list = eina_list_append(event_cb_list, event_cb_info); - evas_object_data_set(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST, event_cb_list); - - return APPL_ERROR_NONE; -} - - - -int scroller_unregister_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *user_data)) -{ - Eina_List *event_cb_list = NULL; - const Eina_List *l = NULL; - const Eina_List *ln = NULL; - event_cb_s *event_cb_info = NULL; - - retv_if(!scroller, APPL_ERROR_INVALID_PARAMETER); - retv_if(event_type <= SCROLLER_EVENT_TYPE_INVALID, APPL_ERROR_INVALID_PARAMETER); - retv_if(event_type >= SCROLLER_EVENT_TYPE_MAX, APPL_ERROR_INVALID_PARAMETER); - retv_if(!event_cb, APPL_ERROR_INVALID_PARAMETER); - - event_cb_list = evas_object_data_get(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST); - retv_if(!event_cb_list, APPL_ERROR_FAIL); - - EINA_LIST_FOREACH_SAFE(event_cb_list, l, ln, event_cb_info) { - if (event_cb_info->event_type == event_type - && event_cb_info->event_cb == event_cb) { - event_cb_list = eina_list_remove(event_cb_list, event_cb_info); - break; - } - } - - evas_object_data_set(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST, event_cb_list); - - return APPL_ERROR_NONE; -} diff --git a/new/src/search.c b/new/src/search.c deleted file mode 100755 index 4dabf7e..0000000 --- a/new/src/search.c +++ /dev/null @@ -1,71 +0,0 @@ -#include <Elementary.h> -#include "main.h" -#include "log.h" -#include "scroller" - -const char *const MAIN_VIEW_EDJE = "search.edj"; - -static _clicked_cb(void *data, Evas_Object *obj, void *event_info) -{ - moment_info_s *moment_info = data; - - _D("Add button is clicked"); - - ret_if(!moment_info); - - elm_object_signal_emit(moment_info->search - - moment_info->scroller = scroller_create(moment_info->ui_manager); - ret_if(!moment_info->scroller); -} - -Evas_Object *search_create(Evas_Object *parent, moment_info_s *moment_info) -{ - Evas_Object *search = NULL; - Evas_Object *button = NULL; - char *path = NULL; - char full_path[] = {0, }; - - retv_if(!parent, NULL); - - path = app_get_resource_path(); - retv_if(!path, NULL); - - snprintf(full_path, sizeof(full_path), "%s/edje/%s", path, MAIN_VIEW_EDJE); - free(path); - - search = elm_layout_add(parent); - retv_if(!search, NULL); - elm_layout_file_set(search, full_path, "main"); - evas_object_size_hint_weight_set(search, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(search, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(search); - - elm_object_part_text_set(search, "title", "No cities"); - elm_object_part_text_set(search, "description", "After you add cities, they will be shown here."); - - button = elm_button_add(parent); - if (button) { - elm_object_text_set(button, "+ Add"); - elm_object_part_content_set(search, "button", button); - evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_smart_callback_add(button, "clicked", _clicked_cb, moment_info); - } - - return search; -} - -void search_destroy(Evas_Object *search) -{ - Evas_Object *button = NULL; - - ret_if(!search); - - button = elm_object_part_content_unset(search, "button"); - if (button) { - evas_object_del(button); - } - - evas_object_del(search); -} diff --git a/new/src/search_path.c b/new/src/search_path.c deleted file mode 100755 index e69de29..0000000 --- a/new/src/search_path.c +++ /dev/null diff --git a/new/src/ui_manager.c b/new/src/ui_manager.c deleted file mode 100755 index ccf295d..0000000 --- a/new/src/ui_manager.c +++ /dev/null @@ -1,71 +0,0 @@ -#include <Elementary.h> -#include "main.h" -#include "log.h" - -const char *const UI_MANAGER_EDJE = "ui_manager.edj"; - -Evas_Object *ui_manager_create(Evas_Object *parent, moment_info_s *moment_info) -{ - Evas_Object *ui_manager = NULL; - Evas_Object *rect = NULL; - char *path = NULL; - char full_path[] = {0, }; - - retv_if(!parent, NULL); - retv_if(!moment_info, NULL); - - path = app_get_resource_path(); - retv_if(!path, NULL); - - snprintf(full_path, sizeof(full_path), "%s/edje/%s", path, MAIN_VIEW_EDJE); - free(path); - - ui_manager = elm_layout_add(parent); - retv_if(!ui_manager, NULL); - - elm_layout_file_set(ui_manager, full_path, "main"); - evas_object_size_hint_weight_set(ui_manager, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(ui_manager, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(ui_manager); - - rect = evas_object_rectangle_add(moment_info->e); - if (rect) { - evas_object_size_hint_min_set(rect, width, height); - evas_object_color_set(rect, 200, 200, 200, 200); - evas_object_show(rect); - elm_object_part_content_set(ui_manager, "bg", rect); - } else - _E("cannot add a rectangle"); - - moment_info->main_view = main_view_create(ui_manager, moment_info); - if (moment_info->main_view) - elm_object_part_content_set(ui_manager, "content", moment_info->main_view); - else - _E("cannot add the main view"); - - return ui_manager; -} - - - -extern void ui_manager_destroy(Evas_Object *ui_manager) -{ - Evas_Object *rect = NULL; - Evas_Object *content = NULL; - void (*destroy_function)(void *data); - - ret_if(!ui_manager); - - rect = elm_object_part_content_unset(ui_manager, "bg"); - if (rect) - evas_object_del(rect); - - content = elm_object_part_content_unset(ui_manager, "content"); - if (content) { - destroy_function = evas_object_data_del(ui_manager, DATA_KEY_DESTROY_FUNCTION); - if (destroy_function) - destroy_function(content); - } - - evas_object_del(ui_manager); -} diff --git a/new/src/webview.c b/new/src/webview.c deleted file mode 100755 index 2ab7b81..0000000 --- a/new/src/webview.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Samsung API - * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/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 <tizen.h> -#include <EWebKit.h> -#include "adventure.h" -#include "log.h" - - -Evas_Object *webview_create(Evas_Object *parent) -{ - Evas *e = NULL; - Evas_Object *webview = NULL; - int ret = -1; - - retv_if(!parent, NULL); - - ret = ewk_init(); - retv_if(ret <= 0, NULL); - - e = evas_object_evas_get(parent); - goto_if(!e, error); - - webview = ewk_view_add(e); - goto_if(!webview, error); - - return webview; - -error: - ewk_shutdown(); - return NULL; -} - -void webview_destroy(Evas_Object *webview) -{ - ret_if(!webview); - evas_object_del(webview); - ewk_shutdown(); -} - -void webview_set_url(Evas_Object *webview, const char *url) -{ - ret_if(!webview); - ret_if(!url); - - ewk_view_url_set(webview, url); -} diff --git a/new/src/write_path.c b/new/src/write_path.c deleted file mode 100755 index e69de29..0000000 --- a/new/src/write_path.c +++ /dev/null diff --git a/res/edje/item2.edc b/res/edje/item2.edc index d8ac1f6..f424f5b 100644 --- a/res/edje/item2.edc +++ b/res/edje/item2.edc @@ -259,6 +259,18 @@ collections { target: "graph"; transition: DECELERATE 0.5; } + program { name: "go_result2"; + signal: "momentic,item,state,result,instant"; + action: STATE_SET "result" 0.0; + target: "delete_event"; + target: "delete"; + target: "bottom_line"; + target: "gmt"; + target: "time"; + // target: "city"; + // target: "mark"; + target: "graph"; + } program { name: "go_default"; signal: "momentic,item,state,default"; action: STATE_SET "default" 0.0; diff --git a/res/edje/momentic.edc b/res/edje/momentic.edc index b73f282..4f8816d 100644 --- a/res/edje/momentic.edc +++ b/res/edje/momentic.edc @@ -465,7 +465,7 @@ collections { align: 0.5 0.5; min: 350 175; fixed: 1 1; - } + } } part { name: "new_event_btn"; type: SWALLOW; @@ -609,15 +609,6 @@ collections { //page 0 back end -//description1 begin - program { //name: "go_page1a"; - signal: "momentic,state,go_result_page"; - after: "go_page1a"; - } - - - - //page 1 begin program { name: "go_page1a"; action: STATE_SET "next" 0.0; @@ -697,6 +688,30 @@ collections { target: "add_description2"; transition: DECELERATE 0.25; } + program { name: "jump_to_result"; + signal: "momentic,state,result,show"; + action: STATE_SET "next" 0.0; + target: "add_description"; + target: "add_btn"; + target: "add_btn_clipper"; + transition: DECELERATE 0.25; + after: "jump_to_result2"; + } + program { name: "jump_to_result2"; + action: STATE_SET "next" 0.0; + target: "map_base"; + target: "map"; + transition: DECELERATE 0.75; + after: "go_page2c"; + } + program { name: "jump_to_first"; + signal: "momentic,state,first,show"; + action: STATE_SET "visible" 0.0; + target: "add_description"; + target: "add_btn"; + target: "add_btn_clipper"; + transition: DECELERATE 0.25; + } //description2 end @@ -761,6 +776,12 @@ collections { target: "drawer_bg"; transition: DECELERATE 0.5; } + program { name: "drawer_btn_hide"; + signal: "momentic,state,drawer_btn,hide"; + action: STATE_SET "default" 0.0; + target: "drawer_btn"; + transition: DECELERATE 0.5; + } program { name: "drawer_clicked"; signal: "mouse,clicked,1"; source: "drawer_btn_event"; @@ -799,16 +820,16 @@ collections { //save group begin program { name: "save_group_activate"; signal: "momentic,state,save_group,activate"; - action: STATE_SET "activated" 0.0; + action: STATE_SET "next" 0.0; target: "save_group_btn"; - target: "save_group_bg"; + target: "bottom_part"; transition: DECELERATE 0.5; } program { name: "save_group_deactivate"; signal: "momentic,state,save_group,deactivate"; - action: STATE_SET "next" 0.0; + action: STATE_SET "default" 0.0; target: "save_group_btn"; - target: "save_group_bg"; + target: "bottom_part"; transition: DECELERATE 0.5; } //save group end diff --git a/res/images/Group list delete.png b/res/images/Group list delete.png Binary files differdeleted file mode 100755 index 7e5eb75..0000000 --- a/res/images/Group list delete.png +++ /dev/null @@ -2,6 +2,14 @@ static city_s cities[] = { { + .id = 0, + .timezone = -10.0, + .name = "Centinel", + .nation = "Centinel", + .x = 17, + .y = 161, + }, + { .id = CITY_HONOLULU, .timezone = -10.0, .name = "Honolulu", @@ -499,6 +499,7 @@ HAPI int db_insert_group(sqlite3 *db, const char *title, int city1, int city2, i const char *const QUERY_INSERT = "INSERT INTO gr (id, title, city1, city2, city3, city4, city5) VALUES (?, ?, ?, ?, ?, ?, ?);"; sqlite3_stmt *st = NULL; int max = 0; + _D("HELLO, %s %d:%d:%d", title, city1, city2, city3); db_max_group(db, &max); max++; @@ -27,7 +27,7 @@ const char *const DATA_KEY_MAIN_VIEW_INFO = "mvi"; const char *const ITEM_EDJE = "item.edj"; const char *const BEST_TIME_EDJE = "best_time.edj"; const char *const ITEM2_EDJE = "item2.edj"; -static int color_index[MAXIMUM_SELECTED_CITY] = { 0, 0, 0, 0, 0 }; +static int color_index[MAXIMUM_SELECTED_CITY] = { 0, 0, 0 }; void item_reset_color_index(void) { @@ -284,7 +284,6 @@ Evas_Object *item_create_selecting(Evas_Object *parent, int city, struct tm *loc char full_path[PATH_LEN] = {0, }; char city_str[PATH_LEN] = {0, }; char gmt_str[PATH_LEN] = {0, }; - char color_str[16] = {0, }; retv_if(!parent, NULL); @@ -370,6 +369,7 @@ void item_destroy_selecting(Evas_Object *item) evas_object_data_del(item, DATA_KEY_MAIN_VIEW_INFO); selecting_info = evas_object_data_del(item, DATA_KEY_SELECTING); if (selecting_info) { + _D("HELLO, REMOVE!!"); if (EINA_FALSE == remove_city_from_map(selecting_info->color)) _E("cannot remove the city"); @@ -419,27 +419,24 @@ static void _item_group_down_cb(void *data, Evas_Object *obj, const char *emissi _D("An item is down"); } -static void _item_group_up_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +static Eina_Bool _item_group_up_timer_cb(void *data) { - Evas_Object *item = obj; + Evas_Object *item = data; Evas_Object *selecting_item = NULL; - main_view_s *main_view_info = data; + main_view_s *main_view_info = NULL; group_info_s *group_info = NULL; struct tm *local_time = NULL; - int city = 0; time_t t = 0; int i = 0; - ret_if(!item); - ret_if(!main_view_info); - ret_if(!main_view_info->city_list); - - _D("An item is selected"); + retv_if(!item, ECORE_CALLBACK_CANCEL); - scroller_clear_item(main_view_info->city_list); + main_view_info = evas_object_data_get(item, DATA_KEY_MAIN_VIEW_INFO); + retv_if(!main_view_info, ECORE_CALLBACK_CANCEL); + retv_if(!main_view_info->city_list, ECORE_CALLBACK_CANCEL); group_info = evas_object_data_get(item, GROUP_INFO); - ret_if(!group_info); + retv_if(!group_info, ECORE_CALLBACK_CANCEL); time(&t); local_time = localtime(&t); @@ -454,14 +451,26 @@ static void _item_group_up_cb(void *data, Evas_Object *obj, const char *emission scroller_append_item(main_view_info->city_list, selecting_item); } - /* Hide texts */ - //elm_object_signal_emit(main_view_info->main_view, "momentic,state,go_result_page", ""); - //elm_object_signal_emit(main_view_info->main_view, "momentic,state,add_description,hide", ""); - //elm_object_signal_emit(main_view_info->main_view, "momentic,state,drawer,hide", ""); - //elm_object_signal_emit(main_view_info->main_view, "momentic,state,page2", ""); + main_view_go_result(main_view_info); + + elm_object_signal_emit(main_view_info->main_view, "momentic,state,drawer,hide", ""); + //elm_object_signal_emit(main_view_info->main_view, "momentic,state,drawer_btn,hide", ""); + elm_object_signal_emit(main_view_info->main_view, "momentic,state,result,show", ""); + elm_object_signal_emit(main_view_info->main_view, "momentic,state,add_description,hide", ""); - //main_view_click_add_btn_cb(main_view_info, NULL, NULL); - //main_view_click_next_btn_cb(main_view_info, NULL, NULL); + + return ECORE_CALLBACK_CANCEL; +} + +static void _item_group_up_cb(void *data, Evas_Object *obj, const char *emission, const char *source) +{ + main_view_s *main_view_info = data; + ret_if(!main_view_info); + ret_if(!main_view_info->city_list); + + scroller_clear_item(main_view_info->city_list); + + ecore_timer_add(0.4, _item_group_up_timer_cb, obj); } static void _delete_group_item_cb(void *data, Evas_Object *obj, void *event_info) @@ -560,11 +569,9 @@ static void _item_padding_del_cb(void *data, Evas *e, Evas_Object *obj, void *ev Evas_Object *item_create_padding(Evas_Object *parent) { Evas_Object *item = NULL; - city_s *city_info = NULL; char *path = NULL; char full_path[PATH_LEN] = {0, }; - char city_str[PATH_LEN] = {0, }; retv_if(!parent, NULL); @@ -603,13 +610,11 @@ static void _item_best_time_del_cb(void *data, Evas *e, Evas_Object *obj, void * Evas_Object *item_create_best_time(Evas_Object *parent, double start, double end) { Evas_Object *item = NULL; - city_s *city_info = NULL; char *path = NULL; char full_path[PATH_LEN] = {0, }; char time_str[PATH_LEN] = {0, }; - double start1, start2, end1, end2; double half; int tmp = 0; @@ -78,6 +78,7 @@ app_create(void *data) moment_info->e = evas_object_evas_get(moment_info->win);
moment_info->db = db_open();
+ //db_drop_table(moment_info->db);
db_create_table(moment_info->db);
return true;
diff --git a/src/main_view.c b/src/main_view.c index 574012d..e1344da 100644 --- a/src/main_view.c +++ b/src/main_view.c @@ -369,7 +369,7 @@ void main_view_click_next_btn_cb(void *data, Evas_Object *obj, void *event_info) continue_if(!selecting_info); elm_object_signal_emit(item, "momentic,item,state,result", ""); - elm_object_part_content_set(item, "time", ""); + elm_object_part_text_set(item, "time", ""); if (!base_city) { base_city = selecting_info->city; @@ -391,6 +391,66 @@ void main_view_click_next_btn_cb(void *data, Evas_Object *obj, void *event_info) cur_page = 2; } +void main_view_go_result(void *data) +{ + main_view_s *main_view_info = data; + Evas_Object *box = NULL; + Evas_Object *item = NULL; + Eina_List *list = NULL; + struct tm *global_time = NULL; + struct tm *local_time = NULL; + time_t t; + city_s *city_info = NULL; + int cur_timezone = 0; + int base_city = 0; + + double matched_start = 0.0f; + double matched_end = 100.0f; /* We have to initialize this variable as 100.0f */ + + ret_if(!main_view_info); + ret_if(!main_view_info->city_list); + + city_info = city_get(); + ret_if(!city_info); + + time(&t); + global_time = gmtime(&t); + local_time = localtime(&t); + + cur_timezone = (int) local_time->tm_gmtoff / 3600l; + + box = elm_object_content_get(main_view_info->city_list); + ret_if(!box); + + list = elm_box_children_get(box); + ret_if(!list); + + EINA_LIST_FREE(list, item) { + selecting_info_s *selecting_info = evas_object_data_get(item, DATA_KEY_SELECTING); + continue_if(!selecting_info); + + elm_object_signal_emit(item, "momentic,item,state,result", ""); + elm_object_part_text_set(item, "time", ""); + + if (!base_city) { + base_city = selecting_info->city; + _set_time_range(item, selecting_info->color, base_city, base_city, &matched_start, &matched_end); + continue; + } else + _set_time_range(item, selecting_info->color, base_city, selecting_info->city, &matched_start, &matched_end); + } + + _D("HELLO, match!! %f, %f", matched_start, matched_end); + item = item_create_best_time(main_view_info->city_list, matched_start, matched_end); + if (item) { + elm_object_signal_emit(item, "momentic,item,state,show", ""); + scroller_append_item(main_view_info->city_list, item); + } else + _E("cannot append an item"); + + cur_page = 4; +} + static Evas_Object *_create_next_btn(Evas_Object *parent, main_view_s *main_view_info) { Evas_Object *next_btn = NULL; @@ -470,7 +530,7 @@ static Evas_Object *_create_city_list(Evas_Object *parent, main_view_s *main_vie city_list = scroller_create(parent); retv_if(!city_list, NULL); - ecore_animator_add(_append_here_city_anim_cb, main_view_info); + ecore_timer_add(1, _append_here_city_anim_cb, main_view_info); return city_list; } @@ -507,7 +567,6 @@ void main_view_click_add_btn_cb(void *data, Evas_Object *obj, void *event_info) ret_if(!main_view_info->main_view); elm_object_signal_emit(main_view_info->main_view, "momentic,state,page1", ""); - cur_page = 1; } static void _page1_done_cb(void *data, Evas_Object *obj, const char *signal, const char *source) @@ -584,13 +643,13 @@ static void _click_save_button_cb(void *data, Evas_Object *obj, void *event_info selecting_info_s *selecting_info = NULL; selecting_info = evas_object_data_get(item, DATA_KEY_SELECTING); - if (!selecting_info) - break; + break_if(!selecting_info); if (i != 0) strcat(group_title, ", "); city[i] = selecting_info->city; + _D("HELLO, city[%d] - %d", i, selecting_info->city); strcat(group_title, city_info[city[i]].name); i++; } @@ -853,6 +912,11 @@ static void _main_view_back_cb(void *data, Evas_Object *obj, void *event_info) cur_page = 1; } else if (0 == cur_page) { elm_win_lower(main_view_info->moment_info->win); + } else if (4 == cur_page) { + scroller_clear_item(main_view_info->city_list); + _append_here_to_city_list(main_view_info->city_list, main_view_info); + elm_object_signal_emit(main_view_info->main_view, "load", ""); + elm_object_signal_emit(main_view_info->main_view, "momentic,state,add_description,show", ""); } } @@ -75,14 +75,14 @@ add_city_to_map(int idx, city_s *ci) char *path = NULL; char full_path[PATH_LEN] = {0, }; - if (idx >= MAXIMUM_SELECTED_CITY) return EINA_FALSE; - if (0 > idx) return EINA_FALSE; - if (city[idx].obj) return EINA_FALSE; + retv_if(idx >= MAXIMUM_SELECTED_CITY, EINA_FALSE); + retv_if(0 > idx, EINA_FALSE); int i; for (i = 0; i < MAXIMUM_SELECTED_CITY; i++) { - if (city[i].ci.id == ci->id) return EINA_FALSE; + _D("HELLO, %d, %d", city[i].ci.id, ci->id); + retv_if(city[i].ci.id == ci->id, EINA_FALSE); } path = app_get_resource_path(); @@ -152,6 +152,7 @@ trans_del_cb(void *data, Elm_Transit *trans) Eina_Bool remove_city_from_map(int idx) { + _D("HELLO, idx:%d", idx); if (idx >= MAXIMUM_SELECTED_CITY) return EINA_FALSE; if (0 > idx) return EINA_FALSE; if (!city[idx].obj) return EINA_FALSE; @@ -201,7 +202,7 @@ item_geom_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) part_info_s *pi; evas_object_geometry_get(obj, &x, &y, &w, &h); - edje_object_part_geometry_get(elm_layout_edje_get(obj), "graph", &x2, &y2, &w2, &h2); + edje_object_part_geometry_get(elm_layout_edje_get(obj), "result_bar", &x2, &y2, &w2, &h2); pi = evas_object_data_get(rect1, "part_info"); if (!pi) return; @@ -294,7 +295,7 @@ set_time_range(Evas_Object *item, int idx, double p1, double p2, double p3, doub break; } evas_object_geometry_get(item, &x, &y, &w, &h); - edje_object_part_geometry_get(elm_layout_edje_get(item), "graph", &x2, &y2, &w2, &h2); + edje_object_part_geometry_get(elm_layout_edje_get(item), "result_bar", &x2, &y2, &w2, &h2); xx = x + x2 + (w2 * p1); evas_object_show(rect); @@ -337,7 +338,7 @@ set_time_range(Evas_Object *item, int idx, double p1, double p2, double p3, doub break; } evas_object_geometry_get(item, &x, &y, &w, &h); - edje_object_part_geometry_get(elm_layout_edje_get(item), "graph", &x2, &y2, &w2, &h2); + edje_object_part_geometry_get(elm_layout_edje_get(item), "result_bar", &x2, &y2, &w2, &h2); xx = x + x2 + (w2 * p1); evas_object_show(rect); |