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