4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
6 * Contact: MyoungJune Park <mj2004.park@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 *default group setting-common-draw-widget
23 *common UI code for reuse
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 */
31 #include <unicode/ucal.h>
32 #include <unicode/uloc.h>
33 #include <unicode/udat.h>
34 #include <unicode/ustring.h>
35 #include <unicode/udatpg.h>
36 #include <unicode/utmscale.h>
37 #include <unicode/ucol.h>
41 #define EXPORT_PUBLIC __attribute__ ((visibility ("default")))
43 #define SETTING_COMMON_DRAW_WIDGET_CONTROLBAR_ITEM_LEN 3
44 #define POPUP_INTERVAL 2.0
46 extern const Elm_Genlist_Item_Class itc_seperator;
47 extern const Elm_Genlist_Item_Class itc_bottom_seperator;
48 extern const Elm_Genlist_Item_Class itc_sep_line;
50 extern const Elm_Genlist_Item_Class itc_1text;
51 extern const Elm_Genlist_Item_Class itc_1text_1icon_2;
52 extern const Elm_Genlist_Item_Class itc_1text_1icon_2_tb;
54 extern const Elm_Genlist_Item_Class itc_1icon;
55 extern const Elm_Genlist_Item_Class itc_1icon_1text_sub;
56 extern const Elm_Genlist_Item_Class itc_1text_1icon;
57 extern const Elm_Genlist_Item_Class itc_1text_1icon_3;
58 extern const Elm_Genlist_Item_Class itc_1text_2icon;
59 extern const Elm_Genlist_Item_Class itc_1text_2icon_2;
60 extern const Elm_Genlist_Item_Class itc_1text_2icon_10;
61 extern const Elm_Genlist_Item_Class itc_1text_parent;
63 extern const Elm_Genlist_Item_Class itc_2text_2;
64 extern const Elm_Genlist_Item_Class itc_2text;
65 extern const Elm_Genlist_Item_Class itc_2text_1icon_3;
66 extern const Elm_Genlist_Item_Class itc_2text_1icon_2;
68 extern const Elm_Genlist_Item_Class itc_2text_3_parent;
69 extern const Elm_Genlist_Item_Class itc_2text_3;
70 extern const Elm_Genlist_Item_Class itc_2text_2icon_3;
72 extern const Elm_Genlist_Item_Class itc_multiline_text;
73 extern const Elm_Genlist_Item_Class itc_1text_1icon_3_tb;
74 extern const Elm_Genlist_Item_Class itc_cm_1text_1icon_2;
75 extern const Elm_Genlist_Item_Class itc_bg_1icon;
76 extern const Elm_Genlist_Item_Class itc_1icon_with_no_line;
77 extern const Elm_Genlist_Item_Class itc_1icon_with_no_padding;
78 extern const Elm_Genlist_Item_Class itc_group_item;
79 extern const Elm_Genlist_Item_Class itc_multiline_1text_1icon;
80 extern const Elm_Genlist_Item_Class itc_1text_2icon_divider;
81 extern const Elm_Genlist_Item_Class itc_no_group_1text_1icon_2;
83 extern const Elm_Genlist_Item_Class itc_editfield;
84 extern const Elm_Genlist_Item_Class itc_multiline_2text;
85 extern const Elm_Genlist_Item_Class itc_1text_1icon_divider;
86 extern const Elm_Genlist_Item_Class itc_normal_1text;
87 extern const Elm_Genlist_Item_Class itc_bottom_line;
90 #define ADD_GL_SEPARATOR(scroller) \
92 Elm_Object_Item *item = elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,\
93 ELM_GENLIST_ITEM_NONE, NULL, NULL);\
94 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
97 #define ADD_GL_LABLE(scroller, str) \
100 Elm_Object_Item *item = elm_genlist_item_append(scroller, &(itc_bottom_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL);\
101 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
102 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &itc_multiline_text,\
105 SWALLOW_Type_LAYOUT_SPECIALIZTION,\
106 NULL, NULL, 0, str, NULL, NULL);\
107 setting_retvm_if(NULL == item_data, NULL, "item_data is NULL");\
108 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
112 #define ADD_GL_HELP(scroller, str) \
115 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &itc_multiline_text,\
118 SWALLOW_Type_LAYOUT_SPECIALIZTION_X,\
119 NULL, NULL, 0, str, NULL, NULL);\
120 setting_retvm_if(NULL == item_data, NULL, "item_data is NULL");\
121 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
125 #ifdef OLD_GENLIST_STYLE
126 #define ADD_GL_HELP_NO_SEP(scroller, str) \
129 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &itc_multiline_text,\
132 SWALLOW_Type_LAYOUT_SPECIALIZTION_X,\
133 NULL, NULL, 0, str, NULL, NULL);\
134 setting_retvm_if(NULL == item_data, NULL, "item_data is NULL");\
135 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
139 #define ADD_GL_HELP_NO_SEP(scroller, str) \
142 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &itc_multiline_text,\
145 SWALLOW_Type_LAYOUT_SPECIALIZTION_X,\
146 NULL, NULL, 0, str, NULL, NULL);\
147 setting_retvm_if(NULL == item_data, NULL, "item_data is NULL");\
148 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
154 #define ADD_GL_BUTTON(scroller, btn_str, btn_cb, cb_data) \
157 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &(itc_1icon_with_no_line),\
158 NULL,cb_data, SWALLOW_Type_1BUTTON,\
159 NULL, NULL, 0, btn_str, NULL,\
161 setting_retvm_if(NULL == item_data, NULL, "item_data is NULL");\
162 item_data->userdata = cb_data;\
166 #define ADD_GL_GIF(scroller, png_list) \
168 if (png_list && *png_list) {\
169 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &(itc_1icon_with_no_line),\
170 NULL,NULL, SWALLOW_Type_1GIF,\
171 NULL, NULL, 0, NULL, NULL,\
173 setting_retvm_if(NULL == item_data, NULL, "item_data is NULL");\
174 item_data->belongs_to = (int)png_list;\
176 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
179 #define ADD_GL_GIF_2(scroller, png_array) \
181 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &(itc_1icon_with_no_line),\
182 NULL,NULL, SWALLOW_Type_1GIF,\
183 NULL, NULL, 0, NULL, NULL,\
185 item_data->belongs_to = (int)png_array;\
186 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
189 #define ADD_GL_RADIO(scroller, rdg, radio_idx, keyStr, sel_cb, cb_data) \
193 rdg = elm_radio_add(scroller);\
194 elm_radio_state_value_set(rdg, -1);\
198 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_1radio(scroller, &(itc_1text_1icon_2),\
201 SWALLOW_Type_1RADIO,\
206 item_data->userdata = cb_data;\
211 void __toogle_gl_sel(void *data, Evas_Object *obj, void *event_info);
212 void __toogle_chk_changed(void *data, Evas_Object *obj, void *event_info);
214 #define ADD_GL_TOOGLE(scroller, use_vconf, keyStr, isel_cb, cb_data, ichk_cb, item_data) \
219 vconf_get_bool(use_vconf, &value);\
220 setting_call_back_func sel_cb = isel_cb;\
221 setting_call_back_func chk_cb = ichk_cb;\
222 if (!sel_cb) sel_cb = __toogle_gl_sel;\
223 if (!chk_cb) chk_cb = __toogle_chk_changed;\
225 item_data = setting_create_Gendial_field_def(scroller,\
229 SWALLOW_Type_1ICON_1RADIO,\
236 item_data->userdata = cb_data;\
237 item_data->int_slp_setting_binded = (int)use_vconf;\
242 #define _P(pEvasObj) do { \
243 evas_object_event_callback_add(pEvasObj, EVAS_CALLBACK_DEL, setting_protect_cb, &(pEvasObj));\
247 * Do process when clicking radio in subitem of expandable item
249 extern void setting_sub_list_rd_change(void *data, Evas_Object *obj,
253 * Hide the input pannel
255 extern void setting_hide_input_pannel_cb(Evas_Object *entry);
258 * Do process when clicking on subitem of expandable item
260 extern void setting_sub_list_sel_cb(void *data, Evas_Object *obj,
264 * Do process when clicking on a common genlist item
266 extern void setting_mouse_up_Gendial_list_radio_cb(void *data,
271 * To intialize an Elm_Genlist_Item_Class, according to item style
273 extern bool setting_create_Gendial_itc(const char *item_style,
274 Elm_Genlist_Item_Class *itc);
278 * Create separator style item with title
279 * @return a pointer to Setting_GenGroupItem_Data
281 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_titleItem(
282 Evas_Object *genlist,
283 const Elm_Genlist_Item_Class *itc,
285 setting_call_back_func gl_sel);
288 * Create 1radion-1text style item
289 * @return a pointer to Setting_GenGroupItem_Data
291 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio(
292 Evas_Object *genlist,
293 const Elm_Genlist_Item_Class *itc,
294 setting_call_back_func gl_sel,
296 SWALLOW_Type swallow_type,
297 Evas_Object *rgd, int chk_status,
299 setting_call_back_func chk_change_cb);
302 * Create 1radio-1button style item
303 * @return a pointer to Setting_GenGroupItem_Data
305 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio_1button(
306 Evas_Object *genlist,
307 const Elm_Genlist_Item_Class *itc,
308 setting_call_back_func gl_sel,
310 SWALLOW_Type swallow_type,
312 Evas_Object *rgd, int chk_status,
314 setting_call_back_func chk_change_cb,
315 setting_call_back_func btn_clicked_cb);
320 * Create common style item with menu icon
321 * @return a pointer to Setting_GenGroupItem_Data
323 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_groupitem(
324 Evas_Object *genlist,
325 const Elm_Genlist_Item_Class *itc,
326 Elm_Object_Item *parent,
327 setting_call_back_func gl_sel,
329 SWALLOW_Type swallow_type,
331 char *r_icon_path, int chk_status,
332 const char *keyStr, char *sub_desc,
333 setting_call_back_func
337 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_helpitem_without_bottom_separator(
338 Evas_Object *genlist,
339 const Elm_Genlist_Item_Class *itc,
340 SWALLOW_Type swallow_type,
343 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_insert_help_without_bottom_separator(
344 Evas_Object *genlist,
345 const Elm_Genlist_Item_Class *itc,
346 Elm_Object_Item *after_it,
347 SWALLOW_Type swallow_type,
351 * Common function to create a genlist item
352 * @return a pointer to Setting_GenGroupItem_Data
354 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_def(Evas_Object *
356 const Elm_Genlist_Item_Class *itc,
357 setting_call_back_func gl_sel,
359 SWALLOW_Type swallow_type,
365 setting_call_back_func chk_change_cb);
367 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_entry_with_return_key(Evas_Object *
369 const Elm_Genlist_Item_Class *itc,
370 setting_call_back_func gl_sel,
379 setting_call_back_func chk_change_cb,
380 setting_call_back_func max_reach_cb,
381 Elm_Input_Panel_Layout input_type,
388 Elm_Input_Panel_Return_Key_Type return_key_type,
389 setting_call_back_func activated_cb,
390 setting_call_back_func x_callback_cb);
392 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_editfield(Evas_Object *
394 const Elm_Genlist_Item_Class *itc,
395 setting_call_back_func gl_sel,
401 setting_call_back_func
403 setting_call_back_func
405 setting_call_back_func
407 setting_call_back_func
409 setting_call_back_func
411 Elm_Input_Panel_Layout
421 * General function to create a subitem of expandable item
423 * @return a pointer to Setting_GenGroupItem_Data
425 extern Setting_GenGroupItem_Data *setting_create_Gendial_exp_sub_field(
426 Evas_Object *genlist,
427 const Elm_Genlist_Item_Class *itc,
428 setting_call_back_func gl_sel,
430 Elm_Object_Item *parent,
431 SWALLOW_Type swallow_type,
435 setting_call_back_func chk_change_cb);
438 * General function to create a parent item of expandable item
440 * @return a pointer to Setting_GenGroupItem_Data
442 extern Setting_GenGroupItem_Data *setting_create_Gendial_exp_parent_field(
443 Evas_Object *genlist,
444 const Elm_Genlist_Item_Class *itc,
445 setting_call_back_func gl_sel,
447 SWALLOW_Type swallow_type,
452 * To make genlist support expandable style item
454 extern void setting_enable_expandable_genlist(Evas_Object *genlist, void *data,
455 setting_call_back_func gl_exp_cb,
456 setting_call_back_func
461 * To create slider object of a genlist item
462 * @return a slider container object
464 extern Evas_Object *setting_create_slider(Evas_Object *win_main, Evas *evas,
465 const char *l_swallow_path,
466 const char *r_swallow_path,
471 setting_call_back_func
473 setting_call_back_func
474 slider_start_change_cb,
475 setting_call_back_func
476 slider_stop_change_cb, void *cb_data);
479 * To create slider object of a genlist item
480 * @return a slider container object
482 extern Evas_Object *setting_create_5step_slider(Evas_Object *win_main, Evas *evas,
483 const char *l_swallow_path,
484 const char *r_swallow_path,
489 setting_call_back_func
491 setting_call_back_func
492 slider_start_change_cb,
493 setting_call_back_func
494 slider_stop_change_cb, void *cb_data);
497 * The main implement body of create a certain size icon
499 extern void create_image_box_add_ex(void *data, Evas_Object *win_main,
500 Evas *evas, char *img_path, int img_w,
502 Evas_Object_Event_Cb mouse_down_cb,
503 Evas_Object_Event_Cb mouse_up_cb,
504 Evas_Object **image_box,
508 * To create a size fixed icon
509 * @return a image container object
511 extern Evas_Object *create_image_box_add(void *data, Evas_Object *win_main,
512 Evas *evas, char *img_path, int img_w,
514 Evas_Object_Event_Cb mouse_down_cb,
515 Evas_Object_Event_Cb mouse_up_cb);
518 * @ To create a size specialized icon
519 * @return a image container object
521 extern Evas_Object *create_bgimage_box_add(void *data, Evas_Object *win_main,
522 Evas *evas, char *img_path,
523 int img_w, int img_h,
524 Evas_Object_Event_Cb mouse_down_cb,
525 Evas_Object_Event_Cb mouse_up_cb);
528 * @ create a box container
530 * @param[in] win_main
532 * @return a box container
534 extern Evas_Object *setting_create_client_bx(Evas_Object *win_main);
537 * The API to Create a lable
540 extern Evas_Object *setting_create_lable(Evas_Object *parent, const char *text, const char *style, const char *align);
543 * The API to Create an object to show an image
544 * @return an object to show an image
546 extern Evas_Object *setting_create_image(Evas_Object *parent, const char *img_path);
549 * The API to Create an object to show an image with round corner
550 * @return an object to show an image
552 extern Evas_Object *setting_create_image_with_round_corner(Evas *evas, const char *img_path, int w, int h);
555 * The API to Create an object to show anamition image
556 * @return an object to show anamition image
558 extern Evas_Object *setting_create_gif(Evas_Object *parent, const char **png_list);
561 * Alternate the check object status and its binded vcof value via original vcofn value
563 extern int setting_draw_onoff_status(Evas_Object *obj,
564 setting_bool_slp_list key);
567 * Set the vconf value via its binded check object.
568 * @return 0: sucess, other: failed
570 extern int setting_reset_slp_key_by_status(Evas_Object *obj,
571 setting_bool_slp_list key);
574 * Set the status of check object via its binded vconf value.
575 * @return 0: sucess, other: failed
577 extern int setting_check_onoff_status(Evas_Object *obj,
578 setting_bool_slp_list key);
581 * Set the status of radio group object via its binded vconf value.
582 * @return 0: sucess, other: failed
584 extern int setting_update_chk_status(Evas_Object *chk,
585 setting_int_slp_list type);
588 * Create a size specilized rectangle object
589 * @return a size specilized rectangle object
591 extern Evas_Object *setting_create_blank_rect_customize(Evas_Object *layout,
595 * Create a size fixed rectangle object
597 * @return a size fixed rectangle object
599 extern Evas_Object *setting_create_blank_rect(Evas_Object *layout);
602 * The API to Create an editfiled object
603 * @return an editfiled object
605 extern Evas_Object *setting_create_editfiled(Evas_Object *win_main,
606 char *title, char *def_str, char *guide_text);
608 * The API to Create a standard layout
609 * @return a standard layout
611 extern Evas_Object *setting_create_win_layout(Evas_Object *win_obj);
613 * The API to Create a naviframe
614 * @return a naviframe
616 extern Evas_Object *setting_create_navi_bar(Evas_Object *layout);
618 extern Elm_Object_Item *setting_create_guild_layout(Evas_Object *navi_bar,
623 setting_call_back_func lbutton_click_cb,
624 setting_call_back_func rbutton_click_cb,
625 setting_call_back_func mbutton_click_cb,
629 char *content_button_str,
630 setting_call_back_func content_button_click_cb,
632 extern void setting_navi_items_update(Evas_Object *navigate_bar);
634 extern Elm_Object_Item *setting_create_guild_layout2(Evas_Object *navi_bar,
639 setting_call_back_func lbutton_click_cb,
640 setting_call_back_func rbutton_click_cb,
641 setting_call_back_func mbutton_click_cb,
643 Evas_Object **ug_layout,
645 char *content_button_str,
646 setting_call_back_func content_button_click_cb,
649 * The API to Create a button
652 extern Evas_Object *setting_create_button(Evas_Object *parent, const char *btn_str,
653 const char *btn_style,
654 setting_call_back_func btn_click_cb,
657 extern void setting_nf_check_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
658 extern void setting_nf_check_change_cb(void *data, Evas_Object *obj, void *event_info);
659 extern void setting_nf_check_vconf_cb(keynode_t *key, void *data);
660 #define ADD_NAVIFRAME_CHECK(parent, navi_it, vconf) \
662 Evas_Object *check = elm_check_add(parent);\
664 vconf_get_bool(vconf, &value);\
665 elm_check_state_set(check, value);\
666 elm_object_style_set(check, "on&off");\
667 elm_object_item_part_content_set(navi_it, "title_right_btn", check);\
668 (void)vconf_notify_key_changed(vconf, setting_nf_check_vconf_cb, check);\
669 evas_object_smart_callback_add(check, "changed", setting_nf_check_change_cb, vconf);\
670 evas_object_event_callback_add(check, EVAS_CALLBACK_DEL, setting_nf_check_del_cb, vconf);\
674 * The API to Create title buttons of naviframe
675 * if sip is shown,the buttons created by this API will be shown,it sip is hidden,they will be hiden too
678 extern void setting_append_naviframe_title_buttons(Elm_Object_Item *navi_it,
679 Evas_Object *navigate_bar,
680 char *more_button_str,
681 char *left_button_str,
682 char *right_button_str,
683 char *back_button_str,
684 setting_call_back_func more_button_click_cb,
685 setting_call_back_func left_button_click_cb,
686 setting_call_back_func right_button_click_cb,
687 setting_call_back_func back_button_click_cb,
690 * The API to Create top buttons onto naviframe
691 * @return a naviframe item
693 extern Elm_Object_Item *setting_create_navi_bar_top_buttons(char *title_str,
697 setting_call_back_func lbutton_click_cb,
698 setting_call_back_func rbutton_click_cb,
699 setting_call_back_func mbutton_click_cb,
700 void *cb_data, Evas_Object *eo_view,/*any container obj */
701 Evas_Object *navigate_bar);
704 * Create buttons on the specialized navigation bar
705 * @param[in] eo_view navigation bar's content
706 * @param[in] controlbar title obj of navigation bar
709 setting_create_navi_bar_buttons(char *title_str,
711 setting_call_back_func lbutton_click_cb,
712 void *cb_data, Evas_Object *eo_view,
713 Evas_Object *navigate_bar,
714 Evas_Object *titleobj);
717 * The general API to create a layout with navigation bar,
718 * which contents any evas container object(@param[eo_view]) as its content
720 * @param[in] eo_view navigation bar's content
721 * @param[out] titleobj title obj of navigation bar
723 * return main layout of UG or App..
726 Evas_Object *setting_create_layout_navi_bar(Evas_Object *win_layout,
727 Evas_Object *win_obj,
730 setting_call_back_func lbutton_click_cb,
732 Evas_Object *eo_view,
733 Evas_Object **navi_bar,
734 Evas_Object **titleobj);
737 * The API to create a layout with navigation bar,
738 * which contents a scroller object as its content
740 * @param[out] scroller navigation bar's content
742 * @return a layout with a special navigation bar and at most 2 buttons
744 extern Evas_Object *setting_create_layout_navi_bar_scroller(Evas_Object *win_layout,
745 Evas_Object *win_obj,
749 setting_call_back_func lbutton_click_cb,
750 setting_call_back_func rbutton_click_cb,
752 Evas_Object **scroller,
753 Evas_Object **navi_bar);
756 * The API to create a layout with navigation bar,
757 * which contents a genlist object as its content
759 * @return a layout with a special navigation bar and at most 2 buttons
761 extern Evas_Object *setting_create_layout_navi_bar_genlist(Evas_Object *win_layout,
762 Evas_Object *win_obj,
766 setting_call_back_func lbutton_click_cb,
767 setting_call_back_func rbutton_click_cb,
769 Evas_Object **genlist,
770 Evas_Object **navi_bar);
773 * The general API to push any evas object(@param[in][eo_view]) to the specialized navi_bar,
774 * which contents at most 3 buttons
776 extern Elm_Object_Item *setting_push_layout_navi_bar(char *title_str,
777 char *lbutton_str, char *rbutton_str,
779 setting_call_back_func lbutton_click_cb,
780 setting_call_back_func rbutton_click_cb,
781 setting_call_back_func mbutton_click_cb,
783 Evas_Object *eo_view,
784 Evas_Object *navi_bar,
785 Evas_Object **titleobj);
788 * The API to push a scroller object(@param[in][scroller]) to the specialized navi_bar,
789 * which contents at most 2 buttons
791 extern Elm_Object_Item *setting_push_layout_navi_bar_scroller(Evas_Object *win_main,
795 setting_call_back_func lbutton_click_cb,
796 setting_call_back_func rbutton_click_cb,
798 Evas_Object **scroller,
799 Evas_Object *navi_bar);
802 * The API to push a genlist object(@param[in][genlist]) to the specialized navi_bar,
803 * which contents at most 2 buttons
805 extern Elm_Object_Item *
806 setting_push_layout_navi_bar_genlist(Evas_Object *win_layout,
807 Evas_Object *win_obj,
811 setting_call_back_func lbutton_click_cb,
812 setting_call_back_func rbutton_click_cb,
814 Evas_Object **genlist,
815 Evas_Object *navi_bar);
818 * Create a text box, which cannot be edited
819 * @return a text box, which cannot be edited
821 extern Evas_Object *setting_create_textbox(Evas_Object *parent,
822 const char *content);
826 /*The API is going to register a message to NOTIFICATION_STATUS_MESSAGE_KEY, and the message will be shown in indicator
827 * @ Quickpannel App save the value of var message, and it supply notification_status_monitor_message_cb_set,
828 * @ in which, Indicator can set process of vconf(NOTIFICATION_STATUS_MESSAGE_KEY) change event,in the call __message_callback,
829 * @ it will invoke indicator_part_text_emit_by_win(win,"message.text.compare", text); to show message you registered
831 extern void setting_create_indicator_notification(const char *message);
833 extern Evas_Object *setting_create_done_list_with_image(Setting_Done_List_Data *list_data, const char *title);
836 * Get searchbar text and register redraw_cb by idler.
839 * @param[in] search_bar
840 * @param[in] search_text
841 * @param[in] search_idler
842 * @param[in] redraw_cb
844 extern int setting_searchbar_redraw(void *data,
845 Evas_Object *search_bar,
847 Ecore_Idler **search_idler,
848 Ecore_Task_Cb redraw_cb);
851 * Create searchar, register change cb and cancel cb.
855 * @param[in] change_cb
856 * @param[in] cancel_cb
858 extern Evas_Object *setting_create_searchbar(void *data, Evas_Object *parent,
859 Evas_Smart_Cb change_cb,
860 Evas_Smart_Cb cancel_cb);
863 * Make it no effect when clicking on a evas object, such as, layout, genlist
866 extern void setting_disable_evas_object(Evas_Object *obj);
869 * Make it normal acting when clicking on a evas object, such as, layout, genlist
872 extern void setting_enable_evas_object(Evas_Object *obj);
875 * To disable a specialized genlist item
878 extern void setting_disable_genlist_item(Elm_Object_Item *item);
881 * To enable a specialized genlist item
884 extern void setting_enable_genlist_item(Elm_Object_Item *item);
886 extern void setting_genlist_item_disabled_set(Setting_GenGroupItem_Data *item_data, int disable);
890 * To resize a evas object, such as, icon, button..
893 extern void setting_resize_object(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
896 * To create a bg object
899 extern Evas_Object *setting_create_bg(Evas_Object *parent, Evas_Object *win, const char *bg_style);
902 * To make an object which is operated by setting_dim_evas_object normal color
905 * @param[in] b_transparenct:
906 * 1:the appearence of obj is made up of transparent backgroud color.
907 * 0:the appearence of obj is made up of non transparent color.
909 extern void setting_undo_dim_evas_object(Evas_Object *obj, bool b_transparenct);
912 * To make an object dim color
915 * @param[in] b_transparenct:
916 * 1:the appearence of obj is made up of transparent backgroud color.
917 * 0:the appearence of obj is made up of non transparent color.
919 extern void setting_dim_evas_object(Evas_Object *obj, bool b_transparenct);
922 * To make an object looks clickable: if pressed, it is dim color;if unpressed, it is normal color;
926 extern void setting_make_evas_object_clickable(Evas_Object *obj);
928 * To create an icon which looks clickable(if pressed, it is dim color;if unpressed, it is normal color)
931 * @param[in] img_path
937 extern Evas_Object *setting_create_icon(Evas_Object *parent, const char *img_path,
938 Evas_Object_Event_Cb up_cb,
939 Evas_Object_Event_Cb down_cb,
940 Evas_Object_Event_Cb move_cb,
943 * to make sbu-obj the same size as parent-obj.Notice: subobj is the only sub-obj @parent wants to display
950 * To create a button which only has a image and looks clickable
951 * (if pressed, it is dim color;if unpressed, it is normal color)
953 * @param[in] img_path
959 extern Evas_Object *setting_create_image_button(Evas_Object *parent,
961 setting_call_back_func clicked_cb,
962 setting_call_back_func unpressed_cb,
966 * set font_size, color or align(right, left, middle),if need, you
967 * can add </font_siz>, </color> or </align> to controll a segment words; or else
968 * the text will take the same effect until the end of text.
970 extern char *setting_customize_text(const char *input_str, const int font_size,
971 const char *color, const char *align);
973 extern void setting_go_to_top(Evas_Object *content);
976 * To go to top of list in top view of navibar.
979 extern void setting_go_to_navibar_list_top(Evas_Object *navibar);
981 extern void setting_check_genlist_item_bottom_line(Elm_Object_Item *item);
982 extern void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info);
983 extern void setting_entry_entry_set(Evas_Object *entry, const char *text, const int font_size);
984 extern void setting_update_gl_item_chk_status(Setting_GenGroupItem_Data *item_data, int status);
985 extern void setting_force_update_gl_item_chk_status(Setting_GenGroupItem_Data *item_data, int status);
987 extern void setting_conformant_keypad_state(Evas_Object *conform, bool enable);
990 extern Evas_Object *setting_create_navibar_title_text_btn(Evas_Object *parent, const char *text, Evas_Smart_Cb func, void *data);
992 extern void setting_tabbar_enable_swip_effect(Evas_Object *ly_main, Evas_Object *tabbar);
993 extern void setting_tabbar_disable_swip_effect(Evas_Object *ly_main, Evas_Object *tabbar);
994 extern void setting_decorate_image_RGBA(Evas_Object *obj, int r, int g, int b, int a);
995 extern void setting_protect_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
997 extern char *__setting_phone_lang_get_by_pattern(const char *locale, const char *skeleton);
999 ///////////////////////////////////////////////////////
1000 extern void setting_popup_del_cb(void *data, Evas_Object *obj, void *event_info);
1001 extern void setting_popup_event_set(Evas_Object *popup, void *data,
1002 setting_call_back_func response_cb,
1003 int timeout,/*to control the timeout time */
1004 bool blocked_flag,/*to control whether to block the screen */
1005 bool keygrab_flag/*to control whether to block the 'Home key' */
1008 /*********************************************************
1009 * @brief The general API to create a default popup window
1011 * @param data application context
1012 * @param parent parent window
1013 * @param title popup title
1014 * @param text popup text
1015 * @param response_cb called When btn was clicked
1016 * @param timeout timeout sec
1017 * @param blocked_flag to control whether to block the screen
1018 * @param keygrab_flag to control whether to block key
1019 * @param btn_num btn number
1020 * @param ... btn text
1022 * @return a certain popup window
1023 **********************************************************/
1024 EXPORT_PUBLIC Evas_Object *setting_create_popup(void *data,
1025 Evas_Object *parent,
1028 setting_call_back_func response_cb,
1035 /*********************************************************
1036 * @brief The general API to create a default popup window
1038 * @param data application context
1039 * @param parent parent window
1040 * @param title popup title
1041 * @param text popup text
1042 * @param response_cb called When btn was clicked
1043 * @param back_cb called When popup is closed without button touching
1044 * @param timeout timeout sec
1045 * @param blocked_flag to control whether to block the screen
1046 * @param keygrab_flag to control whether to block key
1047 * @param btn_num btn number
1048 * @param ... btn text
1050 * @return a certain popup window
1051 **********************************************************/
1052 EXPORT_PUBLIC Evas_Object *setting_create_popup2(void *data,
1053 Evas_Object *parent,
1056 setting_call_back_func response_cb,
1057 setting_call_back_func back_cb,
1065 /******************************************************************
1066 * @brief The general API to create a popup window which contents a progressbar
1068 * @param data application context
1069 * @param parent parent window
1070 * @param progressbar_style progressbar style(process_small/process_medium/process_large)
1071 * @param title popup title
1072 * @param text popup text
1073 * @param response_cb called When btn was clicked
1074 * @param timeout timeout sec
1075 * @param blocked_flag to control whether to block the screen
1076 * @param keygrab_flag to control whether to block key
1078 * @return a popup window which contents a progressbar
1079 *******************************************************************/
1080 EXPORT_PUBLIC Evas_Object *setting_create_popup_with_progressbar(void *data,
1081 Evas_Object *parent,
1082 char *progressbar_style,
1085 setting_call_back_func response_cb,
1091 /******************************************************************
1092 * @brief The general API to create a popup window which contents a genlist
1094 * @param genlist genlist
1095 * @param data application context
1096 * @param parent parent window
1097 * @param title popup title
1098 * @param response_cb called When btn was clicked
1099 * @param timeout timeout sec
1100 * @param blocked_flag to control whether to block the screen
1101 * @param keygrab_flag to control whether to block key
1103 * @return a popup window which contents a genlist
1104 *******************************************************************/
1105 EXPORT_PUBLIC Evas_Object *setting_create_popup_with_list(Evas_Object **genlist,
1107 Evas_Object *parent,
1109 setting_call_back_func response_cb,
1115 #endif /* __SETTING_COMMON_DRAW_WIDGET_H__ */