[Feature] add Tethering menu in case of RSA Target environment
[apps/core/preloaded/settings.git] / setting-common / include / setting-common-draw-widget.h
1 /*
2  * setting
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
5  *
6  * Contact: MyoungJune Park <mj2004.park@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 /**
22  *default group setting-common-draw-widget
23  *common UI code for reuse
24  */
25 #ifndef __SETTING_COMMON_DRAW_WIDGET_H__
26 #define __SETTING_COMMON_DRAW_WIDGET_H__
27 #include <setting-common-data-type.h>   /* including all the data structure */
28 #include <setting-common-general-func.h>        /* including one class of common functions */
29 #include <setting-common-data-slp-setting.h>    /* including another class of common functions */
30
31 #define SETTING_COMMON_DRAW_WIDGET_CONTROLBAR_ITEM_LEN 3
32 #define POPUP_INTERVAL 2.0
33
34 extern const Elm_Genlist_Item_Class itc_seperator;
35 extern const Elm_Genlist_Item_Class itc_bottom_seperator;
36 extern const Elm_Genlist_Item_Class itc_sep_line;
37
38 extern const Elm_Genlist_Item_Class itc_1text;
39 extern const Elm_Genlist_Item_Class itc_1text_1icon_2;
40
41 extern const Elm_Genlist_Item_Class itc_1icon;
42 extern const Elm_Genlist_Item_Class itc_1icon_1text_sub;
43 extern const Elm_Genlist_Item_Class itc_1text_1icon;
44 extern const Elm_Genlist_Item_Class itc_1text_2icon;
45 extern const Elm_Genlist_Item_Class itc_1text_2icon_2;
46
47 extern const Elm_Genlist_Item_Class itc_2text_2;
48 extern const Elm_Genlist_Item_Class itc_2text;
49 extern const Elm_Genlist_Item_Class itc_multiline_2text_1icon;
50 extern const Elm_Genlist_Item_Class itc_2text_1icon_3;
51 extern const Elm_Genlist_Item_Class itc_2text_1icon_6;
52 extern const Elm_Genlist_Item_Class itc_2text_1icon_7;
53
54 extern const Elm_Genlist_Item_Class itc_2text_3_parent;
55 extern const Elm_Genlist_Item_Class itc_2text_3;
56 extern const Elm_Genlist_Item_Class itc_2text_2icon_3;
57
58 extern const Elm_Genlist_Item_Class itc_multiline_text;
59 extern const Elm_Genlist_Item_Class itc_cm_1text_1icon_2;
60 extern const Elm_Genlist_Item_Class itc_sel_all;
61 extern const Elm_Genlist_Item_Class itc_bg_1icon;
62 extern const Elm_Genlist_Item_Class itc_group_item;
63
64
65 /**
66  * Do process when clicking radio in subitem of expandable item
67  */
68 extern void setting_sub_list_rd_change(void *data, Evas_Object *obj,
69                                        void *event_info);
70
71 /**
72  * Hide the input pannel
73  */
74 extern void setting_hide_input_pannel_cb(Evas_Object *entry);
75
76 /**
77  * Do process when clicking on subitem of expandable item
78  */
79 extern void setting_sub_list_sel_cb(void *data, Evas_Object *obj,
80                                     void *event_info);
81
82 /**
83  * Do process when clicking on a common genlist item
84  */
85 extern void setting_mouse_up_Gendial_list_radio_cb(void *data,
86                                                    Evas_Object *obj,
87                                                    void *event_info);
88
89 /**
90  * To intialize an Elm_Genlist_Item_Class, according to item style
91  */
92 extern bool setting_create_Gendial_itc(const char *item_style,
93                                        Elm_Genlist_Item_Class *itc);
94
95 /**
96  * Create group style item
97  * @return a pointer to Setting_GenGroupItem_Data
98  */
99 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_group_titleItem(Evas_Object *genlist,
100                                                 const Elm_Genlist_Item_Class *itc,
101                                                 Elm_Object_Item *parent,
102                                                 Elm_Genlist_Item_Type flag,     /* ELM_GENLIST_ITEM_GROUP or ELM_GENLIST_ITEM_NONE */
103                                                 const char *keyStr,
104                                                 setting_call_back_func gl_sel);
105
106 /**
107  * Create separator style item with title
108  * @return a pointer to Setting_GenGroupItem_Data
109  */
110 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_titleItem(
111                                                 Evas_Object *genlist,
112                                                 const Elm_Genlist_Item_Class *itc,
113                                                 const char *keyStr,
114                                                 setting_call_back_func gl_sel);
115
116 /**
117  * Create 1radion-1text style item
118  * @return a pointer to Setting_GenGroupItem_Data
119  */
120 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio(
121                                         Evas_Object *genlist,
122                                         const Elm_Genlist_Item_Class *itc,
123                                         setting_call_back_func gl_sel,
124                                         void *sel_data,
125                                         SWALLOW_Type swallow_type,
126                                         Evas_Object *rgd, int chk_status,
127                                         const char *keyStr,
128                                         setting_call_back_func chk_change_cb);
129 /**
130  * Create 2radion style item
131  * @return a pointer to Setting_GenGroupItem_Data
132  */
133 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_2radio(
134                                         Evas_Object *genlist,
135                                         const Elm_Genlist_Item_Class *itc,
136                                         setting_call_back_func gl_sel,
137                                         void *sel_data,
138                                         SWALLOW_Type swallow_type,
139                                         Evas_Object *rgd, int chk_status,
140                                         const char *keyStr,
141                                         const char *sub_desc,
142                                         setting_call_back_func chk_change_cb);
143
144 /**
145  * Create common style item with menu icon
146  * @return a pointer to Setting_GenGroupItem_Data
147  */
148 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_groupitem(
149                                         Evas_Object *genlist,
150                                         const Elm_Genlist_Item_Class *itc,
151                                         Elm_Object_Item *parent,
152                                         setting_call_back_func gl_sel,
153                                         void *sel_data,
154                                         SWALLOW_Type swallow_type,
155                                         char *l_icon_path,
156                                         char *r_icon_path, int chk_status,
157                                         const char *keyStr, char *sub_desc,
158                                         setting_call_back_func
159                                         chk_change_cb);
160
161 /**
162  * Common function to create a genlist item
163  * @return a pointer to Setting_GenGroupItem_Data
164  */
165 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_def(Evas_Object *
166                                                                    genlist,
167                                                                    const Elm_Genlist_Item_Class *itc,
168                                                                    setting_call_back_func gl_sel,
169                                                                    void *sel_data,
170                                                                    SWALLOW_Type swallow_type,
171                                                                    char *l_icon_path,
172                                                                    char *r_icon_path,
173                                                                    int chk_status,
174                                                                    const char *keyStr,
175                                                                    char *sub_desc,
176                                                                    setting_call_back_func chk_change_cb);
177
178 /**
179  * Create 1entry style item
180  * @return a pointer to Setting_GenGroupItem_Data
181  */
182 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_entry(Evas_Object *genlist,
183                                                                      const Elm_Genlist_Item_Class *itc,
184                                                                      setting_call_back_func gl_sel,
185                                                                      void *sel_data,
186                                                                      SWALLOW_Type swallow_type,
187                                                                      char *l_icon_path,
188                                                                          char *r_icon_path,
189                                                                      int chk_status,
190                                                                      const char *keyStr,
191                                                                          char *sub_desc,
192                                                                      setting_call_back_func chk_change_cb,
193                                                                      Elm_Input_Panel_Layout input_type,
194                                                                      bool isPasswordFlag,
195                                                                      bool isFocusFlag,
196                                                                      int max_char_count,
197                                                                      int max_byte_count,
198                                                                      char *accepted,
199                                                                          char *rejected);
200
201 /**
202  * General function to create a subitem of expandable item
203  *
204  * @return a pointer to Setting_GenGroupItem_Data
205  */
206 extern Setting_GenGroupItem_Data *setting_create_Gendial_exp_sub_field(
207                                         Evas_Object *genlist,
208                                         const Elm_Genlist_Item_Class *itc,
209                                         setting_call_back_func gl_sel,
210                                         void *sel_data,
211                                         Elm_Object_Item *parent,
212                                         SWALLOW_Type swallow_type,
213                                         Evas_Object *rgd, int chk_status,
214                                         const char *keyStr,
215                                         setting_call_back_func
216                                         chk_change_cb);
217
218 /**
219  * General function to create a parent item of expandable item
220  *
221  * @return a pointer to Setting_GenGroupItem_Data
222  */
223 extern Setting_GenGroupItem_Data *setting_create_Gendial_exp_parent_field(
224                                                 Evas_Object *genlist,
225                                                 const Elm_Genlist_Item_Class *itc,
226                                                 setting_call_back_func gl_sel,
227                                                 void *sel_data,
228                                                 SWALLOW_Type swallow_type,
229                                                 const char *keyStr,
230                                                 char *sub_desc);
231
232 /**
233  * To make genlist support expandable style item
234  */
235 extern void setting_enable_expandable_genlist(Evas_Object *genlist, void *data,
236                                               setting_call_back_func gl_exp_cb,
237                                               setting_call_back_func
238                                               gl_smart_cb);
239
240 /**
241 * The API to let an item which with processbar go into "processing"
242 * @return
243 */
244 extern void setting_begin_progress_genlist_item(Setting_GenGroupItem_Data *
245                                                 data_item);
246 /**
247 * The API to let an item which with processbar go into "processed"
248 * @return
249 */
250 extern void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data *
251                                                  data_item);
252
253 /**
254  * To create slider object of a genlist item
255  * @return a slider container object
256  */
257 extern Evas_Object *setting_create_slider(Evas_Object *win_main, Evas *evas,
258                                           const char *l_swallow_path,
259                                           const char *r_swallow_path,
260                                           double value,
261                                           bool indicator,
262                                           double slider_min,
263                                           double slider_max,
264                                           setting_call_back_func
265                                           slider_change_cb,
266                                           setting_call_back_func
267                                           slider_start_change_cb,
268                                           setting_call_back_func
269                                           slider_stop_change_cb, void *cb_data);
270
271 /**
272  * The main implement body of create a certain size icon
273  */
274 extern void create_image_box_add_ex(void *data, Evas_Object *win_main,
275                                     Evas *evas, char *img_path, int img_w,
276                                     int img_h,
277                                     Evas_Object_Event_Cb mouse_down_cb,
278                                     Evas_Object_Event_Cb mouse_up_cb,
279                                     Evas_Object **image_box,
280                                     Evas_Object **img);
281
282 /**
283  * To create a size fixed icon
284  * @return a image container object
285  */
286 extern Evas_Object *create_image_box_add(void *data, Evas_Object *win_main,
287                                          Evas *evas, char *img_path, int img_w,
288                                          int img_h,
289                                          Evas_Object_Event_Cb mouse_down_cb,
290                                          Evas_Object_Event_Cb mouse_up_cb);
291
292 /**
293 * @ To create a size specialized icon
294 * @return a image container object
295 */
296 extern Evas_Object *create_bgimage_box_add(void *data, Evas_Object *win_main,
297                                            Evas *evas, char *img_path,
298                                            int img_w, int img_h,
299                                            Evas_Object_Event_Cb mouse_down_cb,
300                                            Evas_Object_Event_Cb mouse_up_cb);
301
302 /**
303 * @ create a box container
304 *
305 * @param[in] win_main
306 *
307 * @return a box container
308 */
309 extern Evas_Object *setting_create_client_bx(Evas_Object *win_main);
310
311 /**
312 * The API to Create a lable
313 * @return a lable
314 */
315 extern Evas_Object *setting_create_lable(Evas_Object *parent, const char *lable,const char *style);
316
317 /**
318 * The API to Create an object to show an image
319 * @return an object to show an image
320 */
321 extern Evas_Object *setting_create_image(Evas_Object *parent, const char *img_path);
322
323 /**
324 * The API to Create an object to show anamition image
325 * @return an object to show anamition image
326 */
327 extern Evas_Object *setting_create_gif(Evas_Object *parent, const char **png_list);
328
329 /**
330 * @ create a popup window which contents a progressbar
331 * @return a popup window which contents a progressbar
332 */
333 extern Evas_Object *setting_create_popup_with_progressbar(void *data,
334                                                   Evas_Object *parent,
335                                                   char *progressbar_style,
336                                                   char *title,
337                                                   char *text,
338                                                   setting_call_back_func response_cb,
339                                                   int timeout,
340                                                   bool blocked_flag,
341                                                   bool keygrab_flag);
342 /**
343 * The general API to create a certain popup window with more than one button.
344 * @return a certain popup window
345 */
346 extern Evas_Object *setting_create_popup_with_btn(void *data,
347                                                   Evas_Object *parent,
348                                                   char *title,
349                                                   char *text,
350                                                   setting_call_back_func response_cb,
351                                                   int timeout,
352                                                   int btn_num, ...);
353 /**
354 * The general API to create a certain popup window
355 * @return a certain popup window
356 */
357 extern Evas_Object *setting_create_popup_without_btn(void *data,
358                                                 Evas_Object *parent,
359                                                 char *title,
360                                                 char *text,
361                                                 setting_call_back_func response_cb,
362                                                 int timeout,
363                                                 bool blocked_flag,
364                                                 bool keygrab_flag);
365 /**
366 * The API to create a certain popup window with title
367 * @return a certain popup window with title
368 */
369 extern int setting_create_simple_popup(void *data,
370                                        Evas_Object *parent,
371                                        char *title,
372                                        char *text);
373 /**
374 * The API to create a certain popup window with a gif and some buttons
375 * @return a certain popup window with title
376 */
377 extern Evas_Object *setting_create_popup_with_gif(void *data,
378                                                   Evas_Object *parent,
379                                                   char *title,
380                                                   char *text,
381                                                   const char **png_list,//array end with 'NULL'.
382                                                   setting_call_back_func response_cb,
383                                                   int timeout,
384                                                   int btn_num, ...);
385
386 /**
387 * The API to create a certain popup window with a check
388 * @return a certain popup window with title
389 */
390 extern Evas_Object *setting_create_popup_with_checkview(Evas_Object *parent,
391                                                  char *title,
392                                                  char *check_str,
393                                                  Evas_Object *checkview_content,
394                                                  Evas_Object **check,
395                                                  int timeout);
396 /**
397 * The API to create a certain popup window with a check and some buttons
398 * @return a certain popup window with title
399 */
400 extern Evas_Object *setting_create_popup_with_check(void *data,
401                                                      Evas_Object *parent,
402                                                      char *title,
403                                                      char *text,
404                                                      char *check_str,
405                                                      Evas_Object **check,
406                                                      setting_call_back_func response_cb,
407                                                      int timeout,
408                                                      int btn_num, ...);
409
410 /**
411 * The API to create a certain popup window with a image, a check and some buttons
412 * @return a certain popup window with title
413 */
414 extern Evas_Object *setting_create_popup_with_image_check(void *data,
415                                              Evas_Object *parent,
416                                              char *title,
417                                              char *text1,
418                                              char *text2,
419                                              char *icon_path,
420                                              char *check_str,
421                                              Evas_Object **check,
422                                              setting_call_back_func response_cb,
423                                              int timeout,
424                                              int btn_num, ...);
425 /**
426 * Alternate the check object status and its binded vcof value via original vcofn value
427 */
428 extern int setting_draw_onoff_status(Evas_Object *obj,
429                                      setting_bool_slp_list key);
430
431 /**
432 * Set the vconf value via its binded check object.
433 * @return 0: sucess, other: failed
434 */
435 extern int setting_reset_slp_key_by_status(Evas_Object *obj,
436                                            setting_bool_slp_list key);
437
438 /**
439 * Set the status of check object via its binded vconf value.
440 * @return  0: sucess, other: failed
441 */
442 extern int setting_check_onoff_status(Evas_Object *obj,
443                                       setting_bool_slp_list key);
444
445 /**
446 * Set the status of radio group object via its binded vconf value.
447 * @return  0: sucess, other: failed
448 */
449 extern int setting_update_chk_status(Evas_Object *chk,
450                                      setting_int_slp_list type);
451
452 /**
453 * Create a size specilized rectangle object
454 * @return a size specilized rectangle object
455 */
456 extern Evas_Object *setting_create_blank_rect_customize(Evas_Object *layout,
457                                                         int w, int h);
458
459 /**
460 * Create a size fixed rectangle object
461 * @param[in] layout
462 * @return a size fixed rectangle object
463 */
464 extern Evas_Object *setting_create_blank_rect(Evas_Object *layout);
465
466 /**
467 * The API to Create an editfiled object
468 * @return an editfiled object
469 */
470 extern Evas_Object *setting_create_editfiled(Evas_Object *win_main,
471                                              char *title, char *def_str);
472 /**
473 * The API to Create a standard layout
474 * @return a standard layout
475 */
476 extern Evas_Object *setting_create_win_layout(Evas_Object *win_layout,
477                                        Evas_Object *win_obj);
478 /**
479 * The API to Create a naviframe
480 * @return a naviframe
481 */
482 extern Evas_Object *setting_create_navi_bar(Evas_Object *layout);
483
484 /**
485 * The API to Create a button
486 * @return a button
487 */
488 extern Evas_Object *setting_create_button(Evas_Object *parent, const char *btn_str,
489                                    const char *btn_style,
490                                    setting_call_back_func btn_click_cb,
491                                    void *cb_data);
492
493 /**
494 * The API to Create top buttons onto naviframe
495 * @return a naviframe item
496 */
497 extern Elm_Object_Item * setting_create_navi_bar_top_buttons(char *title_str,
498                                          char *lbutton_str,
499                                          char *rbutton_str,
500                                          char *mbutton_str,
501                                          setting_call_back_func lbutton_click_cb,
502                                          setting_call_back_func rbutton_click_cb,
503                                          setting_call_back_func mbutton_click_cb,
504                                          void *cb_data, Evas_Object *eo_view,/*any container obj */
505                                          Evas_Object *navigate_bar );
506
507 /**
508 * Create buttons on the specialized navigation bar
509 * @param[in] eo_view    navigation bar's content
510 * @param[in] controlbar   title obj of navigation bar
511 */
512 extern void
513 setting_create_navi_bar_buttons(char *title_str,
514                                 char *lbutton_str, char *rbutton_str,
515                                 char *mbutton_str,
516                                 setting_call_back_func lbutton_click_cb,
517                                 setting_call_back_func rbutton_click_cb,
518                                 setting_call_back_func mbutton_click_cb,
519                                 void *cb_data, Evas_Object *eo_view,
520                                 Evas_Object *navigate_bar,
521                                 Evas_Object *controlbar);
522
523 /**
524 * The general API to create a layout with navigation bar,
525 *   which contents any evas container object(@param[eo_view]) as its content
526 *
527 * @param[in] eo_view    navigation bar's content
528 * @param[out] titleobj   title obj of navigation bar
529 *
530 * return main layout of UG or App..
531 */
532
533 Evas_Object *setting_create_layout_navi_bar(Evas_Object *win_layout,
534                                             Evas_Object *win_obj,
535                                             char *title_str,
536                                                 char *lbutton_str,
537                                             char *rbutton_str,
538                                             char *mbutton_str,
539                                             setting_call_back_func lbutton_click_cb,
540                                             setting_call_back_func rbutton_click_cb,
541                                             setting_call_back_func mbutton_click_cb,
542                                                 void *cb_data,
543                                             Evas_Object *eo_view,
544                                             Evas_Object **navi_bar,
545                                             Evas_Object **titleobj);
546
547 /**
548 * The API to create a layout with navigation bar,
549 *   which contents a scroller object as its content
550 *
551 * @param[out] scroller   navigation bar's content
552 *
553 * @return a layout with a special navigation bar and at most 2 buttons
554 */
555 extern Evas_Object *setting_create_layout_navi_bar_scroller(Evas_Object * win_layout,
556                                                             Evas_Object * win_obj,
557                                                             char *title_str,
558                                                             char *lbutton_str,
559                                                             char *rbutton_str,
560                                                             setting_call_back_func lbutton_click_cb,
561                                                             setting_call_back_func rbutton_click_cb,
562                                                             void *cb_data,
563                                                             Evas_Object ** scroller,
564                                                             Evas_Object ** navi_bar);
565
566 /**
567 * The API to create a layout with navigation bar,
568 *       which contents a genlist object as its content
569 *
570 * @return a layout with a special navigation bar and at most 2 buttons
571 */
572 extern Evas_Object *setting_create_layout_navi_bar_genlist(Evas_Object * win_layout,
573                                                            Evas_Object * win_obj,
574                                                            char *title_str,
575                                                            char *lbutton_str,
576                                                            char *rbutton_str,
577                                                            setting_call_back_func lbutton_click_cb,
578                                                            setting_call_back_func rbutton_click_cb,
579                                                            void *cb_data,
580                                                            Evas_Object ** genlist,
581                                                            Evas_Object ** navi_bar);
582
583 /**
584 * The general API to push any evas object(@param[in][eo_view]) to the specialized navi_bar,
585 *   which contents at most 3 buttons
586 */
587 extern Elm_Object_Item *setting_push_layout_navi_bar(char *title_str,
588                                          char *lbutton_str, char *rbutton_str,
589                                          char *mbutton_str,
590                                          setting_call_back_func lbutton_click_cb,
591                                          setting_call_back_func rbutton_click_cb,
592                                          setting_call_back_func mbutton_click_cb,
593                                          void *cb_data,
594                                          Evas_Object *eo_view,
595                                          Evas_Object *navi_bar,
596                                          Evas_Object **titleobj);
597
598 /**
599 * The API to push a scroller object(@param[in][scroller]) to the specialized navi_bar,
600 *   which contents at most 2 buttons
601 */
602 extern void setting_push_layout_navi_bar_scroller(Evas_Object *win_main,
603                                                   char *title_str,
604                                                   char *lbutton_str,
605                                                   char *rbutton_str,
606                                                   setting_call_back_func lbutton_click_cb,
607                                                   setting_call_back_func rbutton_click_cb,
608                                                   void *cb_data,
609                                                   Evas_Object **scroller,
610                                                   Evas_Object *navi_bar);
611
612 /**
613 * The API to push a genlist object(@param[in][genlist]) to the specialized navi_bar,
614 *   which contents at most 2 buttons
615 */
616 extern void
617 setting_push_layout_navi_bar_genlist(Evas_Object *win_layout,
618                                      Evas_Object *win_obj,
619                                          char *title_str,
620                                      char *lbutton_str,
621                                          char *rbutton_str,
622                                      setting_call_back_func lbutton_click_cb,
623                                      setting_call_back_func rbutton_click_cb,
624                                      void *cb_data,
625                                          Evas_Object **genlist,
626                                      Evas_Object *navi_bar);
627
628 /**
629 * Create a text box, which cannot be edited
630 * @return a text box, which cannot be edited
631 */
632 extern Evas_Object *setting_create_textbox(Evas_Object *parent,
633                                            const char *content);
634
635 /****done_list****/
636
637 /**
638 * Create selectinfo popup
639 */
640 extern void setting_create_sel_info_popup(Evas_Object *parent,
641                                           Evas_Object **selInfoPop_layout,
642                                           Evas_Object **selInfoPop);
643
644 /**
645 * Check if some item is selected in done-list
646 *
647 * @param[in] list_data
648 * @return
649 */
650 extern bool setting_done_list_is_some_item_selected(Setting_Done_List_Data *
651                                                     list_data);
652
653 /**
654 * Do process when clicking the check object in the done-list item
655 */
656 extern void setting_done_list_Gendial_chk_btn_cb(void *data, Evas_Object *obj,
657                                                  void *event_info);
658
659 /**
660 * The API to create done-list.
661 * @param[in] list_data
662 * @return a done-list
663 */
664 extern Evas_Object *setting_create_done_list(Setting_Done_List_Data *
665                                              list_data);
666
667 /**
668 * Get searchbar text and register redraw_cb by idler.
669 *
670 * @param[in] data
671 * @param[in] search_bar
672 * @param[in] search_text
673 * @param[in] search_idler
674 * @param[in] redraw_cb
675 */
676 extern int setting_searchbar_redraw(void *data,
677                            Evas_Object *search_bar,
678                            char *search_text,
679                            Ecore_Idler **search_idler,
680                            Ecore_Task_Cb redraw_cb);
681
682 /**
683 * Create searchar, register change cb and cancel cb.
684 *
685 * @param[in] data
686 * @param[in] parent
687 * @param[in] change_cb
688 * @param[in] cancel_cb
689 */
690 extern Evas_Object *setting_create_searchbar(void *data, Evas_Object *parent,
691                                          Evas_Smart_Cb change_cb,
692                                          Evas_Smart_Cb cancel_cb);
693
694 #if APPLIED_BACK_KEY_UG
695
696 /**
697 * Get the toppest popup in current evas, cross through all the APP and UGs.
698 *
699 * @param[in] evas
700 *
701 * @return the toppest popup in current evas
702 */
703 extern Evas_Object *get_toppest_popup_window(Evas *evas);
704 #endif
705
706 /**
707 * Make it no effect when clicking on a evas object, such as, layout, genlist
708 *
709 */
710 extern void setting_disable_evas_object(Evas_Object *obj);
711
712 /**
713 * Make it normal acting when clicking on a evas object, such as, layout, genlist
714 *
715 */
716 extern void setting_enable_evas_object(Evas_Object *obj);
717
718 /**
719 * To disable a specialized genlist item
720 *
721 */
722 extern void setting_disable_genlist_item(Elm_Object_Item *item);
723
724 /**
725 * To enable a specialized genlist item
726 *
727 */
728 extern void setting_enable_genlist_item(Elm_Object_Item *item);
729
730 /**
731 * To resize a evas object, such as, icon, button..
732 *
733 */
734 extern void setting_resize_object(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
735
736 /**
737 * To create a bg object
738 *
739 */
740 extern Evas_Object *setting_create_bg(Evas_Object *parent,Evas_Object *win, const char *bg_style);
741
742 /**
743 * To make an object which is operated by setting_dim_evas_object normal color
744 *
745 * @param[in] obj
746 * @param[in] b_transparenct:
747 *       1:the appearence of obj is made up of transparent backgroud color.
748 *       0:the appearence of obj is made up of non transparent color.
749 */
750 extern void setting_undo_dim_evas_object(Evas_Object *obj, bool b_transparenct);
751
752 /**
753 * To make an object dim color
754 *
755 * @param[in] obj
756 * @param[in] b_transparenct:
757 *       1:the appearence of obj is made up of transparent backgroud color.
758 *       0:the appearence of obj is made up of non transparent color.
759 */
760 extern void setting_dim_evas_object(Evas_Object *obj, bool b_transparenct);
761
762 /**
763 * To make an object looks clickable: if pressed, it is dim color;if unpressed, it is normal color;
764 *
765 * @param[in] obj
766 */
767 extern void setting_make_evas_object_clickable(Evas_Object *obj);
768 /**
769 * To create an icon which looks clickable(if pressed, it is dim color;if unpressed, it is normal color)
770 *
771 * @param[in] parent
772 * @param[in] img_path
773 * @param[in] up_cb
774 * @param[in] down_cb
775 * @param[in] move_cb
776 * @param[in] data
777 */
778 extern Evas_Object *setting_create_icon(Evas_Object *parent, const char *img_path,
779                                  Evas_Object_Event_Cb up_cb,
780                                  Evas_Object_Event_Cb down_cb,
781                                  Evas_Object_Event_Cb move_cb,
782                                  void *data);
783 /**
784 * to make sbu-obj the same size as parent-obj.Notice: subobj is the only sub-obj @parent wants to display
785 *
786 * @param[in] parent
787 * @param[in] subobj
788 */
789
790 /**
791 * To create a button which only has a image and looks clickable
792 * (if pressed, it is dim color;if unpressed, it is normal color)
793 * @param[in] parent
794 * @param[in] img_path
795 * @param[in] up_cb
796 * @param[in] down_cb
797 * @param[in] move_cb
798 * @param[in] data
799 */
800 extern Evas_Object *setting_create_image_button(Evas_Object *parent,
801                                         const char *btn_img,
802                                         setting_call_back_func clicked_cb,
803                                         setting_call_back_func unpressed_cb,
804                                         void *data);
805
806 /*
807 * set font_size, color or align(right, left, middle),if need, you
808 * can add </font_siz>, </color> or </align> to controll a segment words; or else
809 * the text will take the same effect until the end of text.
810 */
811 extern char *setting_customize_text(const char *input_str, const int font_size,
812                              const char *color, const char *align);
813
814 /*
815 * To go to top of list in top view of navibar.
816 * @param[in] navibar
817 */
818 extern void setting_go_to_navibar_list_top(Evas_Object *navibar);
819
820 #endif                          /* __SETTING_COMMON_DRAW_WIDGET_H__ */