diff options
author | Junghyun Kim <jh1114.kim@samsung.com> | 2012-12-10 10:53:36 +0900 |
---|---|---|
committer | Junghyun Kim <jh1114.kim@samsung.com> | 2012-12-10 10:53:36 +0900 |
commit | 2ffc9a846c44e75c201db9b5e00e98cf8d204a9f (patch) | |
tree | e41910cf955dd358baec492217e7c42d2092e5b5 /include | |
parent | 06b58aaa67ea25760ee47c60120453c2b15f3d7d (diff) | |
download | smartsearch-2ffc9a846c44e75c201db9b5e00e98cf8d204a9f.tar.gz smartsearch-2ffc9a846c44e75c201db9b5e00e98cf8d204a9f.tar.bz2 smartsearch-2ffc9a846c44e75c201db9b5e00e98cf8d204a9f.zip |
Update for RSA sync
Diffstat (limited to 'include')
-rwxr-xr-x | include/common_util.h | 7 | ||||
-rwxr-xr-x | include/ps_debug_util.h | 17 | ||||
-rwxr-xr-x | include/search_bar.h | 11 | ||||
-rwxr-xr-x | include/smartsearch.h | 5 | ||||
-rwxr-xr-x | include/smartsearch_define.h | 29 |
5 files changed, 59 insertions, 10 deletions
diff --git a/include/common_util.h b/include/common_util.h index 3573adb..6c4a02f 100755 --- a/include/common_util.h +++ b/include/common_util.h @@ -19,10 +19,11 @@ #define CHECK_VALIDATE_UTF8 0 -void search_util_date_time_format_init(void *data); +void search_util_date_time_format_init(); void search_util_date_time_format_deinit(); -void search_util_date_time_format_get_val(const struct tm *tm, - char *format_val); +void search_region_format_cb(void *data); +void search_util_date_time_format_get_val(time_t time, + char *format_val, int type); void search_sql_make_keyword_bind_value(char *src, char *dest, int type); void search_get_date_string(char *date_string); const char *search_markup_keyword(const char *string, char *searchword, diff --git a/include/ps_debug_util.h b/include/ps_debug_util.h index bfdd5e3..4b064c4 100755 --- a/include/ps_debug_util.h +++ b/include/ps_debug_util.h @@ -81,6 +81,14 @@ }\ }while(0) +#define SEARCH_RETV_IF_WITH_ERRORV(cond,ret,errorv) \ + do {\ + if(cond) {\ + LOGW("\x1b[33m[%s() \t%s:%d][RET_IF]\x1b[0m error value = %d",__FUNCTION__, strrchr(__FILE__, '/')+1, __LINE__, errorv);\ + return ret;\ + }\ + }while(0) + #define SEARCH_RET_IF(cond) \ do {\ if(cond) {\ @@ -147,6 +155,14 @@ }\ }while(0) +#define SEARCH_RETV_IF_WITH_ERRORV(cond,ret,errorv) \ + do {\ + if(cond) {\ + fprintf(stderr, "[%s() \t%s:%d][RET_IF] error_value = %d",__FUNCTION__, strrchr(__FILE__, '/')+1, __LINE__, errorv);\ + return ret;\ + }\ + }while(0) + #define SEARCH_RET_IF(cond) \ do {\ if(cond) {\ @@ -175,6 +191,7 @@ #define SEARCH_DEBUG_ERROR(fmt, arg...) #define SEARCH_ASSERT_IF(cond) #define SEARCH_RETV_IF(cond,ret) +#define SEARCH_RETV_IF_WITH_ERRORV(cond,ret,errorv) #define SEARCH_RET_IF(cond) #define SEARCH_RET_IF_STR_INVALID(str,ret) diff --git a/include/search_bar.h b/include/search_bar.h index f5922e0..c2b2521 100755 --- a/include/search_bar.h +++ b/include/search_bar.h @@ -28,7 +28,14 @@ void search_searchbar_cb(void *data, Evas_Object * obj, void *event_info); void search_searchbar_entry_changed_cb(void *data, Evas_Object * obj, void *event_info); - +Evas_Object *search_category_custom_layout_add(Evas_Object *parent); +Evas_Object *search_category_image_add(char* imgpath, Evas_Object *parent, int width, int height, bool resize); Evas_Object *search_searchbar_category_icon_add(char *img, Evas_Object *parent, int width, int height, bool resize); - +void search_create_searchbar_layout(Evas_Object *parent, void *data); +void search_delete_searchbar_layout(void *data); +Evas_Object *search_create_layout(Evas_Object *parent, const char *file, const char *group); +Evas_Object *search_create_category_button(Evas_Object *parent, void *data); +Evas_Object *search_create_search_bar(Evas_Object *parent); +Evas_Object *search_create_search_cancel_btn(Evas_Object *parent); +Evas_Object *search_create_search_entry(Evas_Object *parent, void *data); #endif /* __DEF_SEARCH_BAR_H__ */ diff --git a/include/smartsearch.h b/include/smartsearch.h index 5c80cbf..15982cf 100755 --- a/include/smartsearch.h +++ b/include/smartsearch.h @@ -110,6 +110,8 @@ struct search_item_more_sel { struct appdata { Evas_Object *win_main; + Evas_Object *bg; + Evas_Object *conformant; Evas_Object *layout_main; Evas_Object *navi_bar; Elm_Object_Item *navi_it; @@ -128,7 +130,6 @@ struct appdata { Evas_Object *cate_ctxpopup; Evas_Object *cate_btn; - Ecore_Idler *idler_search; Ecore_Idler *idler_create_ui; Ecore_Timer *search_timer; @@ -149,13 +150,13 @@ struct appdata { Eina_Condition condition; Eina_Lock mutex; + bool first_search; char *search_word; char *not_markup_search_word; int back_btn_type; int search_category; - Evas_Object *effect_layout; ui_gadget_h detail_ug; sqlite3 *search_db_hd; diff --git a/include/smartsearch_define.h b/include/smartsearch_define.h index fbf6eb6..d58d7b7 100755 --- a/include/smartsearch_define.h +++ b/include/smartsearch_define.h @@ -98,11 +98,17 @@ enum { SEARCH_STR_TYPE_SYSTEM_STRING, }; +enum { + SEARCH_DATE_TYPE_YYMMDD = 0, + SEARCH_DATE_TYPE_YYMM, +}; + //============================================================================================================================== #define SEARCH_PACKAGE "smartsearch" #define SEARCH_ICON_PATH RESDIR"/icons/" #define SEARCH_EDJ EDJDIR"/smartsearch.edj" +#define SEARCH_SEARCHBAR_GROUP_NORMAL "smartsearch/search_result" #define SEARCH_DB_PATH DBDIR"/.search.db" #define SEARCH_FAVORITE_ICON SEARCH_ICON_PATH"B10_icon_list_favorite.png" @@ -111,8 +117,8 @@ enum { #define SEARCH_THUMBNAIL_SIZE 72 #define SEARCH_ICON_SIZE 64 -#define SEARCH_CATEGORY_BTN_ICON_SIZE_WIDTH 38 -#define SEARCH_CATEGORY_BTN_ICON_SIZE_HEIGHT 38 +#define SEARCH_CATEGORY_BTN_ICON_SIZE_WIDTH 44 +#define SEARCH_CATEGORY_BTN_ICON_SIZE_HEIGHT 44 #define SEARCH_CATEGORY_POPUPBTN_ICON_SIZE_WIDTH 48 #define SEARCH_CATEGORY_POPUPBTN_ICON_SIZE_HEIGHT 48 @@ -122,11 +128,15 @@ enum { #define MAX_LENGTH_PER_PATH (512) #define MAX_LENGTH_PER_ID (10) #define MAX_SEARCH_WORD_SIZE (128) +#define DB_QUERY_LEN (512) + +#define SEARCH_MAX_UCHAR_SIZE 64 +#define SEARCH_MAX_CHAR_SIZE 128 #define SMARTSEARCH_KEY_KEYWORD "file/private/org.tizen.smartsearch/keyword" #define PHONE_CATEGORY_LIST_CNT (SEARCH_CONT_PHONE_MAX) -#define DB_QUERY_LEN (512) + #define NO_RESULT_BODY_LEN 7 @@ -147,7 +157,11 @@ enum { //============================================================================================================================== +#define PART_IMAGE "image" +#define SIGNAL_SEARCH_CUSTOM_IMAGE_CLICKED "signal.search.image.clicked" +#define SIGNAL_SEARCH_CUSTOM_IMAGE_UNCLICKED "signal.search.image.unclicked" +//============================================================================================================================== #define SEARCH_FREE(ptr) \ do { \ if(ptr != NULL) \ @@ -168,6 +182,15 @@ enum { } \ } while(0); +#define SEARCH_EVAS_OBJECT_FREE(ptr) \ + do { \ + if(ptr != NULL) \ + { \ + evas_object_del(ptr); \ + ptr = NULL; \ + } \ + }while(0); + /* Gives comparison result of two strings and returns -1 if any of two is NULL */ #define SEARCH_STRCMP(str1, str2) ((str1 && str2) ? strcmp(str1, str2) : -1) |