2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 #ifndef __DEF_SMARTSEARCH_H__
23 #define __DEF_SMARTSEARCH_H__
27 #include <Elementary.h>
29 #include <appcore-efl.h>
30 #include <Ecore_IMF.h>
33 #include <ui-gadget.h>
36 #include <msg_types.h>
38 #include "smartsearch_define.h"
39 #include "ps_debug_util.h"
40 #include "search_bar.h"
41 #include "ps_makeupviews.h"
42 #include "ps_app_interface.h"
43 #include "common_util.h"
44 #include "util-func.h"
46 #define _EDJ(x) elm_layout_edje_get(x)
48 struct search_more_result{
56 struct search_content_object {
65 Elm_Object_Item *gl_result_grp;
66 struct search_more_result mr_info;
69 struct search_category_info {
71 char *btn_icon_press_path;
72 char *popup_icon_path;
73 char *popup_press_icon_path;
76 struct search_genlist_item_info {
78 struct search_content_object *obj;
79 Elm_Genlist_Item_Class *itc_style;
81 Elm_Object_Item *parent;
84 struct search_genlist_info {
85 struct search_genlist_item_info *group;
87 struct search_genlist_item_info *more;
90 struct search_pipe_data {
92 struct search_genlist_info *result_list;
94 struct search_content_object *obj;
97 struct search_item_sel {
99 char path[MAX_LENGTH_PER_PATH];
100 char main_buf[MAX_LENGTH_PER_LINE];
101 char sub_buf[MAX_LENGTH_PER_LINE];
102 char main_id[MAX_LENGTH_PER_ID];
103 char icon1_path[MAX_LENGTH_PER_PATH];
104 char icon2_path[MAX_LENGTH_PER_PATH];
107 struct search_item_more_sel {
108 struct search_content_object *obj;
112 Evas_Object *win_main;
113 Evas_Object *layout_main;
114 Evas_Object *navi_bar;
115 Elm_Object_Item *navi_it;
119 Evas_Object *search_entry;
120 Evas_Object *search_bar;
121 Evas_Object *search_cancel_btn;
122 Evas_Object *search_gl;
123 Evas_Object *noresult_view;
124 Evas_Object *sb_layout;
125 Evas_Object *back_btn;
127 Evas_Object *ctxpopup;
128 Evas_Object *cate_ctxpopup;
130 Evas_Object *cate_btn;
131 Ecore_Idler *idler_search;
132 Ecore_Idler *idler_create_ui;
133 Ecore_Timer *search_timer;
138 Elm_Genlist_Item_Class *itc_pslist_1line;
139 Elm_Genlist_Item_Class *itc_pslist_1line_1icon;
140 Elm_Genlist_Item_Class *itc_pslist_1line_2icon;
141 Elm_Genlist_Item_Class *itc_pslist_2line_1icon;
142 Elm_Genlist_Item_Class *itc_pslist_2line_2icon;
143 Elm_Genlist_Item_Class *itc_grouptitle;
144 Elm_Genlist_Item_Class *itc_label;
145 Elm_Genlist_Item_Class *itc_listmore;
148 Ecore_Thread *search_thread;
149 Eina_Condition condition;
153 char *not_markup_search_word;
158 Evas_Object *effect_layout;
159 ui_gadget_h detail_ug;
161 sqlite3 *search_db_hd;
162 sqlite3_stmt *search_db_sql[SEARCH_STMT_MAX];
163 struct search_content_object result_obj[SEARCH_CONT_MAX];
164 struct search_category_info category_info[SEARCH_CATE_MAX];
167 msg_handle_t msg_handle;