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_dialogue_editfield_title;
55 extern const Elm_Genlist_Item_Class itc_1icon;
56 extern const Elm_Genlist_Item_Class itc_1icon_1text_sub;
57 extern const Elm_Genlist_Item_Class itc_1text_1icon;
58 extern const Elm_Genlist_Item_Class itc_1text_1icon_3;
59 extern const Elm_Genlist_Item_Class itc_1text_2icon;
60 extern const Elm_Genlist_Item_Class itc_1text_2icon_2;
61 extern const Elm_Genlist_Item_Class itc_1text_2icon_10;
62 extern const Elm_Genlist_Item_Class itc_1text_parent;
64 extern const Elm_Genlist_Item_Class itc_2text_2;
65 extern const Elm_Genlist_Item_Class itc_2text;
66 extern const Elm_Genlist_Item_Class itc_multiline_2text_1icon;
67 extern const Elm_Genlist_Item_Class itc_2text_1icon_3;
68 extern const Elm_Genlist_Item_Class itc_2text_1icon_2;
69 extern const Elm_Genlist_Item_Class itc_2text_1icon_6;
70 extern const Elm_Genlist_Item_Class itc_2text_1icon_7;
71 extern const Elm_Genlist_Item_Class itc_2text_1icon_10;
73 extern const Elm_Genlist_Item_Class itc_2text_3_parent;
74 extern const Elm_Genlist_Item_Class itc_2text_3;
75 extern const Elm_Genlist_Item_Class itc_2text_2icon_3;
77 extern const Elm_Genlist_Item_Class itc_multiline_text;
78 extern const Elm_Genlist_Item_Class itc_1text_1icon_3_tb;
79 extern const Elm_Genlist_Item_Class itc_cm_1text_1icon_2;
80 extern const Elm_Genlist_Item_Class itc_sel_all;
81 extern const Elm_Genlist_Item_Class itc_bg_1icon;
82 extern const Elm_Genlist_Item_Class itc_1icon_with_no_line;
83 extern const Elm_Genlist_Item_Class itc_1icon_with_no_padding;
84 extern const Elm_Genlist_Item_Class itc_group_item;
85 extern const Elm_Genlist_Item_Class itc_multiline_1text_1icon;
86 extern const Elm_Genlist_Item_Class itc_1text_2icon_divider;
87 extern const Elm_Genlist_Item_Class itc_no_group_1text_1icon_2;
89 extern const Elm_Genlist_Item_Class itc_editfield;
90 extern const Elm_Genlist_Item_Class itc_multiline_2text;
91 extern const Elm_Genlist_Item_Class itc_1text_1icon_divider;
92 extern const Elm_Genlist_Item_Class itc_normal_1text;
93 extern const Elm_Genlist_Item_Class itc_bottom_line;
96 #define ADD_GL_SEPARATOR(scroller) \
98 Elm_Object_Item *item = elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,\
99 ELM_GENLIST_ITEM_NONE, NULL, NULL);\
100 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
103 #define ADD_GL_SEPARATOR_2(scroller) \
105 Elm_Object_Item *item = elm_genlist_item_append(scroller, &(itc_sep_line), NULL, NULL,\
106 ELM_GENLIST_ITEM_NONE, NULL, NULL);\
107 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
110 #define ADD_GL_LABLE(scroller, str) \
113 Elm_Object_Item *item = elm_genlist_item_append(scroller, &(itc_bottom_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL);\
114 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
115 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &itc_multiline_text,\
118 SWALLOW_Type_LAYOUT_SPECIALIZTION,\
119 NULL, NULL, 0, str, NULL, NULL);\
120 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
124 #define ADD_GL_HELP(scroller, str) \
127 Elm_Object_Item *item = elm_genlist_item_append(scroller, &(itc_sep_line), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL);\
128 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
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 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
138 #define ADD_GL_HELP_RET(scroller, str, item_data) \
141 Elm_Object_Item *item = elm_genlist_item_append(scroller, &(itc_sep_line), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL);\
142 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
143 item_data = setting_create_Gendial_field_def(scroller, &itc_multiline_text,\
146 SWALLOW_Type_LAYOUT_SPECIALIZTION_X,\
147 NULL, NULL, 0, str, NULL, NULL);\
148 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
152 #define ADD_GL_HELP_NO_SEP(scroller, str) \
155 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &itc_multiline_text,\
158 SWALLOW_Type_LAYOUT_SPECIALIZTION_X,\
159 NULL, NULL, 0, str, NULL, NULL);\
160 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
164 #define ADD_GL_BUTTON(scroller, btn_str, btn_cb, cb_data) \
167 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &(itc_1icon_with_no_line),\
168 NULL,cb_data, SWALLOW_Type_1BUTTON,\
169 NULL, NULL, 0, btn_str, NULL,\
172 item_data->userdata = cb_data;\
176 #define ADD_GL_GIF(scroller, png_list) \
178 if (png_list && *png_list) {\
179 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &(itc_1icon_with_no_line),\
180 NULL,NULL, SWALLOW_Type_1GIF,\
181 NULL, NULL, 0, NULL, NULL,\
183 item_data->belongs_to = (int)png_list;\
184 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
187 #define ADD_GL_GIF_2(scroller, png_array) \
189 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &(itc_1icon_with_no_line),\
190 NULL,NULL, SWALLOW_Type_1GIF,\
191 NULL, NULL, 0, NULL, NULL,\
193 item_data->belongs_to = (int)png_array;\
194 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);\
197 #define ADD_GL_RADIO(scroller, rdg, radio_idx, keyStr, sel_cb, cb_data) \
201 rdg = elm_radio_add(scroller);\
202 elm_radio_state_value_set(rdg, -1);\
206 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_1radio(scroller, &(itc_1text_1icon_2),\
209 SWALLOW_Type_1RADIO,\
214 item_data->userdata = cb_data;\
219 #define ADD_GL_RADIO_GROUP_STYLE(scroller, rdg, radio_idx, keyStr, sel_cb, cb_data, style) \
223 rdg = elm_radio_add(scroller);\
224 elm_radio_state_value_set(rdg, -1);\
228 Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_1radio(scroller, &(itc_1text_1icon_2),\
231 SWALLOW_Type_1RADIO,\
236 item_data->userdata = cb_data;\
237 item_data->group_style = style;\
242 void __toogle_gl_sel(void *data, Evas_Object *obj, void *event_info);
243 void __toogle_chk_changed(void *data, Evas_Object *obj, void *event_info);
245 #define ADD_GL_TOOGLE(scroller, use_vconf, keyStr, isel_cb, cb_data, ichk_cb, item_data) \
250 vconf_get_bool(use_vconf, &value);\
251 setting_call_back_func sel_cb = isel_cb;\
252 setting_call_back_func chk_cb = ichk_cb;\
253 if (!sel_cb) sel_cb = __toogle_gl_sel;\
254 if (!chk_cb) chk_cb = __toogle_chk_changed;\
256 item_data = setting_create_Gendial_field_def(scroller,\
260 SWALLOW_Type_1ICON_1RADIO,\
267 item_data->userdata = cb_data;\
268 item_data->int_slp_setting_binded = (int)use_vconf;\
274 * Do process when clicking radio in subitem of expandable item
276 extern void setting_sub_list_rd_change(void *data, Evas_Object *obj,
280 * Hide the input pannel
282 extern void setting_hide_input_pannel_cb(Evas_Object *entry);
285 * Do process when clicking on subitem of expandable item
287 extern void setting_sub_list_sel_cb(void *data, Evas_Object *obj,
291 * Do process when clicking on a common genlist item
293 extern void setting_mouse_up_Gendial_list_radio_cb(void *data,
298 * To intialize an Elm_Genlist_Item_Class, according to item style
300 extern bool setting_create_Gendial_itc(const char *item_style,
301 Elm_Genlist_Item_Class *itc);
304 * Create group style item
305 * @return a pointer to Setting_GenGroupItem_Data
307 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_group_titleItem(Evas_Object *genlist,
308 const Elm_Genlist_Item_Class *itc,
309 Elm_Object_Item *parent,
310 Elm_Genlist_Item_Type flag, /* ELM_GENLIST_ITEM_GROUP or ELM_GENLIST_ITEM_NONE */
312 setting_call_back_func gl_sel);
315 * Create separator style item with title
316 * @return a pointer to Setting_GenGroupItem_Data
318 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_titleItem(
319 Evas_Object *genlist,
320 const Elm_Genlist_Item_Class *itc,
322 setting_call_back_func gl_sel);
325 * Create 1radion-1text style item
326 * @return a pointer to Setting_GenGroupItem_Data
328 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio(
329 Evas_Object *genlist,
330 const Elm_Genlist_Item_Class *itc,
331 setting_call_back_func gl_sel,
333 SWALLOW_Type swallow_type,
334 Evas_Object *rgd, int chk_status,
336 setting_call_back_func chk_change_cb);
339 * Create 1radio-1button style item
340 * @return a pointer to Setting_GenGroupItem_Data
342 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio_1button(
343 Evas_Object *genlist,
344 const Elm_Genlist_Item_Class *itc,
345 setting_call_back_func gl_sel,
347 SWALLOW_Type swallow_type,
349 Evas_Object *rgd, int chk_status,
351 setting_call_back_func chk_change_cb,
352 setting_call_back_func btn_clicked_cb);
354 * Create 2radion style item
355 * @return a pointer to Setting_GenGroupItem_Data
357 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_2radio(
358 Evas_Object *genlist,
359 const Elm_Genlist_Item_Class *itc,
360 setting_call_back_func gl_sel,
362 SWALLOW_Type swallow_type,
363 Evas_Object *rgd, int chk_status,
365 const char *sub_desc,
366 setting_call_back_func chk_change_cb);
368 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio_2text(
369 Evas_Object *genlist,
370 const Elm_Genlist_Item_Class *itc,
371 setting_call_back_func gl_sel,
373 SWALLOW_Type swallow_type,
374 Evas_Object *rgd, int chk_status,
377 setting_call_back_func chk_change_cb);
380 * Create common style item with menu icon
381 * @return a pointer to Setting_GenGroupItem_Data
383 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_groupitem(
384 Evas_Object *genlist,
385 const Elm_Genlist_Item_Class *itc,
386 Elm_Object_Item *parent,
387 setting_call_back_func gl_sel,
389 SWALLOW_Type swallow_type,
391 char *r_icon_path, int chk_status,
392 const char *keyStr, char *sub_desc,
393 setting_call_back_func
396 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_helpitem_without_bottom_separator(
397 Evas_Object *genlist,
398 const Elm_Genlist_Item_Class *itc,
399 SWALLOW_Type swallow_type,
402 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_insert_help_without_bottom_separator(
403 Evas_Object *genlist,
404 const Elm_Genlist_Item_Class *itc,
405 Elm_Object_Item *after_it,
406 SWALLOW_Type swallow_type,
410 * Common function to create a genlist item
411 * @return a pointer to Setting_GenGroupItem_Data
413 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_def(Evas_Object *
415 const Elm_Genlist_Item_Class *itc,
416 setting_call_back_func gl_sel,
418 SWALLOW_Type swallow_type,
424 setting_call_back_func chk_change_cb);
427 * Create 1entry style item - for focusing out
428 * @return a pointer to Setting_GenGroupItem_Data
430 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_entry_fo(
431 Evas_Object * genlist,
432 const Elm_Genlist_Item_Class *itc,
433 setting_call_back_func gl_sel,
435 SWALLOW_Type swallow_type,
441 setting_call_back_func chk_change_cb,
442 setting_call_back_func chk_focus_out_cb,
443 Elm_Input_Panel_Layout input_type,
453 * Create 1entry style item
454 * @return a pointer to Setting_GenGroupItem_Data
455 * @todo duplicated with setting_create_Gendial_field_entry_fo
458 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_entry(Evas_Object *genlist,
459 const Elm_Genlist_Item_Class *itc,
460 setting_call_back_func gl_sel,
462 SWALLOW_Type swallow_type,
468 setting_call_back_func chk_change_cb,
469 Elm_Input_Panel_Layout input_type,
477 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_entry_with_return_key(Evas_Object *
479 const Elm_Genlist_Item_Class *itc,
480 setting_call_back_func gl_sel,
489 setting_call_back_func chk_change_cb,
490 setting_call_back_func max_reach_cb,
491 Elm_Input_Panel_Layout input_type,
498 Elm_Input_Panel_Return_Key_Type return_key_type,
499 setting_call_back_func activated_cb,
500 setting_call_back_func x_callback_cb);
502 extern Setting_GenGroupItem_Data *setting_create_Gendial_field_editfield(Evas_Object *
504 const Elm_Genlist_Item_Class *itc,
505 setting_call_back_func gl_sel,
511 setting_call_back_func
513 setting_call_back_func
515 setting_call_back_func
517 setting_call_back_func
519 setting_call_back_func
521 Elm_Input_Panel_Layout
531 * General function to create a subitem of expandable item
533 * @return a pointer to Setting_GenGroupItem_Data
535 extern Setting_GenGroupItem_Data *setting_create_Gendial_exp_sub_field(
536 Evas_Object *genlist,
537 const Elm_Genlist_Item_Class *itc,
538 setting_call_back_func gl_sel,
540 Elm_Object_Item *parent,
541 SWALLOW_Type swallow_type,
542 Evas_Object *rgd, int chk_status,
544 setting_call_back_func
548 * General function to create a subitem of expandable item with group style
550 * @return a pointer to Setting_GenGroupItem_Data
552 extern Setting_GenGroupItem_Data *setting_create_Gendial_exp_sub_field_with_group_style(
553 Evas_Object *genlist,
554 const Elm_Genlist_Item_Class *itc,
555 setting_call_back_func gl_sel,
557 Elm_Object_Item *parent,
558 SWALLOW_Type swallow_type,
559 Evas_Object *rgd, int chk_status,
561 setting_call_back_func
563 setting_group_style group_style);
566 * General function to create a parent item of expandable item
568 * @return a pointer to Setting_GenGroupItem_Data
570 extern Setting_GenGroupItem_Data *setting_create_Gendial_exp_parent_field(
571 Evas_Object *genlist,
572 const Elm_Genlist_Item_Class *itc,
573 setting_call_back_func gl_sel,
575 SWALLOW_Type swallow_type,
578 setting_group_style exp_style,
579 setting_group_style con_style);
582 * To make genlist support expandable style item
584 extern void setting_enable_expandable_genlist(Evas_Object *genlist, void *data,
585 setting_call_back_func gl_exp_cb,
586 setting_call_back_func
590 * The API to let an item which with processbar go into "processing"
593 extern void setting_begin_progress_genlist_item(Setting_GenGroupItem_Data *
596 * The API to let an item which with processbar go into "processed"
599 extern void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data *
603 * To create slider object of a genlist item
604 * @return a slider container object
606 extern Evas_Object *setting_create_slider(Evas_Object *win_main, Evas *evas,
607 const char *l_swallow_path,
608 const char *r_swallow_path,
613 setting_call_back_func
615 setting_call_back_func
616 slider_start_change_cb,
617 setting_call_back_func
618 slider_stop_change_cb, void *cb_data);
621 * The main implement body of create a certain size icon
623 extern void create_image_box_add_ex(void *data, Evas_Object *win_main,
624 Evas *evas, char *img_path, int img_w,
626 Evas_Object_Event_Cb mouse_down_cb,
627 Evas_Object_Event_Cb mouse_up_cb,
628 Evas_Object **image_box,
632 * To create a size fixed icon
633 * @return a image container object
635 extern Evas_Object *create_image_box_add(void *data, Evas_Object *win_main,
636 Evas *evas, char *img_path, int img_w,
638 Evas_Object_Event_Cb mouse_down_cb,
639 Evas_Object_Event_Cb mouse_up_cb);
642 * @ To create a size specialized icon
643 * @return a image container object
645 extern Evas_Object *create_bgimage_box_add(void *data, Evas_Object *win_main,
646 Evas *evas, char *img_path,
647 int img_w, int img_h,
648 Evas_Object_Event_Cb mouse_down_cb,
649 Evas_Object_Event_Cb mouse_up_cb);
652 * @ create a box container
654 * @param[in] win_main
656 * @return a box container
658 extern Evas_Object *setting_create_client_bx(Evas_Object *win_main);
661 * The API to Create a lable
664 extern Evas_Object *setting_create_lable(Evas_Object *parent, const char *text,const char *style, const char *align);
667 * The API to Create an object to show an image
668 * @return an object to show an image
670 extern Evas_Object *setting_create_image(Evas_Object *parent, const char *img_path);
673 * The API to Create an object to show an image with round corner
674 * @return an object to show an image
676 extern Evas_Object *setting_create_image_with_round_corner(Evas *evas, const char *img_path, int w, int h);
679 * The API to Create an object to show anamition image
680 * @return an object to show anamition image
682 extern Evas_Object *setting_create_gif(Evas_Object *parent, const char **png_list);
684 extern void setting_add_hardkey_features(Evas_Object *popup, void *data);
685 extern void ea_popup_back_cb_2(void *data, Evas_Object *obj, void *event_info);
687 * @ create a popup window which contents a progressbar
688 * @return a popup window which contents a progressbar
690 extern Evas_Object *setting_create_popup_with_progressbar(void *data,
692 char *progressbar_style,
695 setting_call_back_func response_cb,
699 extern void setting_popup_lang_update(Evas_Object *popup);
700 extern void popup_handle_hardkey(void *data, Evas_Object *popup);
702 * @ create a popup window which contents a progressbar and button
703 * @return a popup window which contents a progressbar and button
705 extern Evas_Object *setting_create_popup_with_progressbar_btn(void *data,
707 char *progressbar_style,
710 setting_call_back_func response_cb,
715 * The general API to create a certain popup window with more than one button.
716 * @return a certain popup window
718 extern Evas_Object *setting_create_popup_with_btn(void *data,
722 setting_call_back_func response_cb,
726 * The general API to create a certain popup window
727 * @return a certain popup window
729 extern Evas_Object *setting_create_popup_without_btn(void *data,
733 setting_call_back_func response_cb,
738 extern Evas_Object *setting_create_popup_with_progressbar_withobject(void *data,
741 char *progressbar_style,
744 setting_call_back_func response_cb,
750 * The API to create a certain popup window with title
751 * @return a certain popup window with title
753 extern int setting_create_simple_popup(void *data,
758 * The API to create a certain popup window with a gif and some buttons
759 * @return a certain popup window with title
761 extern Evas_Object *setting_create_popup_with_gif(void *data,
765 const char **png_list,//array end with 'NULL'.
766 setting_call_back_func response_cb,
771 * The API to create a certain popup window with a check
772 * @return a certain popup window with title
774 extern Evas_Object *setting_create_popup_with_checkview(Evas_Object *parent,
777 Evas_Object *checkview_content,
778 const char *checkview_style,
781 extern Evas_Object * setting_create_popup_with_label_and_reverse_btn(void *data,
785 setting_call_back_func response_cb,
789 extern Evas_Object *setting_create_popup_with_label_check(void *data,
795 setting_call_back_func response_cb,
800 * The API to create a certain popup window with a image, a check and some buttons
801 * @return a certain popup window with title
803 extern Evas_Object *setting_create_popup_with_image_check(void *data,
808 const char **png_list,
811 setting_call_back_func response_cb,
815 * Alternate the check object status and its binded vcof value via original vcofn value
817 extern int setting_draw_onoff_status(Evas_Object *obj,
818 setting_bool_slp_list key);
821 * Set the vconf value via its binded check object.
822 * @return 0: sucess, other: failed
824 extern int setting_reset_slp_key_by_status(Evas_Object *obj,
825 setting_bool_slp_list key);
828 * Set the status of check object via its binded vconf value.
829 * @return 0: sucess, other: failed
831 extern int setting_check_onoff_status(Evas_Object *obj,
832 setting_bool_slp_list key);
835 * Set the status of radio group object via its binded vconf value.
836 * @return 0: sucess, other: failed
838 extern int setting_update_chk_status(Evas_Object *chk,
839 setting_int_slp_list type);
842 * Create a size specilized rectangle object
843 * @return a size specilized rectangle object
845 extern Evas_Object *setting_create_blank_rect_customize(Evas_Object *layout,
849 * Create a size fixed rectangle object
851 * @return a size fixed rectangle object
853 extern Evas_Object *setting_create_blank_rect(Evas_Object *layout);
856 * The API to Create an editfiled object
857 * @return an editfiled object
859 extern Evas_Object *setting_create_editfiled(Evas_Object *win_main,
860 char *title, char *def_str, char *guide_text);
862 * The API to Create a standard layout
863 * @return a standard layout
865 extern Evas_Object *setting_create_win_layout(Evas_Object *win_layout,
866 Evas_Object *win_obj);
867 extern void setting_create_more_btn_click_cb(void *data, Evas_Object *obj, void *event_info);
868 extern void setting_create_more_btn_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
870 * The API to Create a naviframe
871 * @return a naviframe
873 extern Evas_Object *setting_create_navi_bar(Evas_Object *layout);
875 extern Elm_Object_Item *setting_create_guild_layout(Evas_Object *navi_bar,
880 setting_call_back_func lbutton_click_cb,
881 setting_call_back_func rbutton_click_cb,
882 setting_call_back_func mbutton_click_cb,
886 char *content_button_str,
887 setting_call_back_func content_button_click_cb,
889 extern void setting_navi_items_update(Evas_Object *navigate_bar);
891 extern Elm_Object_Item *setting_create_guild_layout2(Evas_Object *navi_bar,
896 setting_call_back_func lbutton_click_cb,
897 setting_call_back_func rbutton_click_cb,
898 setting_call_back_func mbutton_click_cb,
900 Evas_Object **ug_layout,
902 char *content_button_str,
903 setting_call_back_func content_button_click_cb,
906 * The API to Create a button
909 extern Evas_Object *setting_create_button(Evas_Object *parent, const char *btn_str,
910 const char *btn_style,
911 setting_call_back_func btn_click_cb,
914 extern void setting_nf_check_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
915 extern void setting_nf_check_change_cb(void *data, Evas_Object *obj, void *event_info);
916 extern void setting_nf_check_vconf_cb(keynode_t *key, void *data);
917 #define ADD_NAVIFRAME_CHECK(parent, navi_it, vconf) \
919 Evas_Object *check = elm_check_add(parent);\
921 vconf_get_bool(vconf, &value);\
922 elm_check_state_set(check, value);\
923 elm_object_style_set(check, "on&off");\
924 elm_object_item_part_content_set(navi_it, "title_right_btn", check);\
925 (void)vconf_notify_key_changed(vconf, setting_nf_check_vconf_cb, check);\
926 evas_object_smart_callback_add(check, "changed", setting_nf_check_change_cb, vconf);\
927 evas_object_event_callback_add(check, EVAS_CALLBACK_DEL, setting_nf_check_del_cb, vconf);\
931 * The API to Create title buttons of naviframe
932 * if sip is shown,the buttons created by this API will be shown,it sip is hidden,they will be hiden too
935 extern void setting_append_naviframe_title_buttons(Elm_Object_Item *navi_it,
936 Evas_Object *navigate_bar,
937 char *more_button_str,
938 char *left_button_str,
939 char *right_button_str,
940 char *back_button_str,
941 setting_call_back_func more_button_click_cb,
942 setting_call_back_func left_button_click_cb,
943 setting_call_back_func right_button_click_cb,
944 setting_call_back_func back_button_click_cb,
947 * The API to Create top buttons onto naviframe
948 * @return a naviframe item
950 extern Elm_Object_Item * setting_create_navi_bar_top_buttons(char *title_str,
954 setting_call_back_func lbutton_click_cb,
955 setting_call_back_func rbutton_click_cb,
956 setting_call_back_func mbutton_click_cb,
957 void *cb_data, Evas_Object *eo_view,/*any container obj */
958 Evas_Object *navigate_bar );
961 * Create buttons on the specialized navigation bar
962 * @param[in] eo_view navigation bar's content
963 * @param[in] controlbar title obj of navigation bar
966 setting_create_navi_bar_buttons(char *title_str,
967 char *lbutton_str, char *rbutton_str,
969 setting_call_back_func lbutton_click_cb,
970 setting_call_back_func rbutton_click_cb,
971 setting_call_back_func mbutton_click_cb,
972 void *cb_data, Evas_Object *eo_view,
973 Evas_Object *navigate_bar,
974 Evas_Object *titleobj);
977 * The general API to create a layout with navigation bar,
978 * which contents any evas container object(@param[eo_view]) as its content
980 * @param[in] eo_view navigation bar's content
981 * @param[out] titleobj title obj of navigation bar
983 * return main layout of UG or App..
986 Evas_Object *setting_create_layout_navi_bar(Evas_Object *win_layout,
987 Evas_Object *win_obj,
992 setting_call_back_func lbutton_click_cb,
993 setting_call_back_func rbutton_click_cb,
994 setting_call_back_func mbutton_click_cb,
996 Evas_Object *eo_view,
997 Evas_Object **navi_bar,
998 Evas_Object **titleobj);
1001 * The API to create a layout with navigation bar,
1002 * which contents a scroller object as its content
1004 * @param[out] scroller navigation bar's content
1006 * @return a layout with a special navigation bar and at most 2 buttons
1008 extern Evas_Object *setting_create_layout_navi_bar_scroller(Evas_Object * win_layout,
1009 Evas_Object * win_obj,
1013 setting_call_back_func lbutton_click_cb,
1014 setting_call_back_func rbutton_click_cb,
1016 Evas_Object ** scroller,
1017 Evas_Object ** navi_bar);
1020 * The API to create a layout with navigation bar,
1021 * which contents a genlist object as its content
1023 * @return a layout with a special navigation bar and at most 2 buttons
1025 extern Evas_Object *setting_create_layout_navi_bar_genlist(Evas_Object * win_layout,
1026 Evas_Object * win_obj,
1030 setting_call_back_func lbutton_click_cb,
1031 setting_call_back_func rbutton_click_cb,
1033 Evas_Object ** genlist,
1034 Evas_Object ** navi_bar);
1037 * The general API to push any evas object(@param[in][eo_view]) to the specialized navi_bar,
1038 * which contents at most 3 buttons
1040 extern Elm_Object_Item *setting_push_layout_navi_bar(char *title_str,
1041 char *lbutton_str, char *rbutton_str,
1043 setting_call_back_func lbutton_click_cb,
1044 setting_call_back_func rbutton_click_cb,
1045 setting_call_back_func mbutton_click_cb,
1047 Evas_Object *eo_view,
1048 Evas_Object *navi_bar,
1049 Evas_Object **titleobj);
1052 * The API to push a scroller object(@param[in][scroller]) to the specialized navi_bar,
1053 * which contents at most 2 buttons
1055 extern Elm_Object_Item *setting_push_layout_navi_bar_scroller(Evas_Object *win_main,
1059 setting_call_back_func lbutton_click_cb,
1060 setting_call_back_func rbutton_click_cb,
1062 Evas_Object **scroller,
1063 Evas_Object *navi_bar);
1066 * The API to push a genlist object(@param[in][genlist]) to the specialized navi_bar,
1067 * which contents at most 2 buttons
1069 extern Elm_Object_Item *
1070 setting_push_layout_navi_bar_genlist(Evas_Object *win_layout,
1071 Evas_Object *win_obj,
1075 setting_call_back_func lbutton_click_cb,
1076 setting_call_back_func rbutton_click_cb,
1078 Evas_Object **genlist,
1079 Evas_Object *navi_bar);
1082 * Create a text box, which cannot be edited
1083 * @return a text box, which cannot be edited
1085 extern Evas_Object *setting_create_textbox(Evas_Object *parent,
1086 const char *content);
1091 * Create selectinfo popup
1093 extern void setting_create_sel_info_popup(Evas_Object *parent,
1094 Evas_Object **selInfoPop_layout,
1095 Evas_Object **selInfoPop);
1097 extern void setting_create_select_info_popup(Evas_Object **popup, Evas_Object *parent, double timeout, char *content_text, char *style);
1099 * The API going to insert a record into noti_list in /opt/dbspace/.notification.db
1100 * @ you can check the result via "sqlite3 /opt/dbspace/.notification.db" "select * from noti_list;"
1101 * @ App (quickpanel) use notification_register_detailed_changed_cb to listen all notification/DB events,
1102 * @ in the function _quickpanel_noti_detailed_changed_cb(), it will check the event type(INSERT,UPDATE..)
1104 extern void setting_create_quickpannel_notification(const char *pkgname, int noti_type,
1105 int ly_type, const char *title,
1106 const char *content, const char *image, int *noti_id);
1108 extern void setting_remove_quickpannel_notification(const char *pkgname, int noti_type, int *noti_id);
1111 /*The API is going to register a message to NOTIFICATION_STATUS_MESSAGE_KEY, and the message will be shown in indicator
1112 * @ Quickpannel App save the value of var message, and it supply notification_status_monitor_message_cb_set,
1113 * @ in which, Indicator can set process of vconf(NOTIFICATION_STATUS_MESSAGE_KEY) change event,in the call __message_callback,
1114 * @ it will invoke indicator_part_text_emit_by_win(win,"message.text.compare", text); to show message you registered
1116 extern void setting_create_indicator_notification(const char *message);
1118 * Check if some item is selected in done-list
1120 * @param[in] list_data
1123 extern bool setting_done_list_is_some_item_selected(Setting_Done_List_Data *
1127 * Do process when clicking the check object in the done-list item
1129 extern void setting_done_list_Gendial_chk_btn_cb(void *data, Evas_Object *obj,
1133 * The API to create done-list.
1134 * @param[in] list_data
1135 * @return a done-list
1137 extern Evas_Object *setting_create_done_list(Setting_Done_List_Data *list_data, const char *title);
1139 extern Evas_Object *setting_create_done_list_with_image(Setting_Done_List_Data *list_data, const char *title);
1142 * Get searchbar text and register redraw_cb by idler.
1145 * @param[in] search_bar
1146 * @param[in] search_text
1147 * @param[in] search_idler
1148 * @param[in] redraw_cb
1150 extern int setting_searchbar_redraw(void *data,
1151 Evas_Object *search_bar,
1153 Ecore_Idler **search_idler,
1154 Ecore_Task_Cb redraw_cb);
1157 * Create searchar, register change cb and cancel cb.
1161 * @param[in] change_cb
1162 * @param[in] cancel_cb
1164 extern Evas_Object *setting_create_searchbar(void *data, Evas_Object *parent,
1165 Evas_Smart_Cb change_cb,
1166 Evas_Smart_Cb cancel_cb);
1169 * Make it no effect when clicking on a evas object, such as, layout, genlist
1172 extern void setting_disable_evas_object(Evas_Object *obj);
1175 * Make it normal acting when clicking on a evas object, such as, layout, genlist
1178 extern void setting_enable_evas_object(Evas_Object *obj);
1181 * To disable a specialized genlist item
1184 extern void setting_disable_genlist_item(Elm_Object_Item *item);
1187 * To enable a specialized genlist item
1190 extern void setting_enable_genlist_item(Elm_Object_Item *item);
1192 extern void setting_genlist_item_disabled_set(Setting_GenGroupItem_Data *item_data, int disable);
1194 extern void __add_gl_tts_feature(Elm_Object_Item *item);
1195 extern void setting_genlist_item_groupstyle_set(Setting_GenGroupItem_Data *list_item, setting_group_style group_style);
1199 * To resize a evas object, such as, icon, button..
1202 extern void setting_resize_object(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
1205 * To create a bg object
1208 extern Evas_Object *setting_create_bg(Evas_Object *parent,Evas_Object *win, const char *bg_style);
1211 * To make an object which is operated by setting_dim_evas_object normal color
1214 * @param[in] b_transparenct:
1215 * 1:the appearence of obj is made up of transparent backgroud color.
1216 * 0:the appearence of obj is made up of non transparent color.
1218 extern void setting_undo_dim_evas_object(Evas_Object *obj, bool b_transparenct);
1221 * To make an object dim color
1224 * @param[in] b_transparenct:
1225 * 1:the appearence of obj is made up of transparent backgroud color.
1226 * 0:the appearence of obj is made up of non transparent color.
1228 extern void setting_dim_evas_object(Evas_Object *obj, bool b_transparenct);
1231 * To make an object looks clickable: if pressed, it is dim color;if unpressed, it is normal color;
1235 extern void setting_make_evas_object_clickable(Evas_Object *obj);
1237 * To create an icon which looks clickable(if pressed, it is dim color;if unpressed, it is normal color)
1240 * @param[in] img_path
1242 * @param[in] down_cb
1243 * @param[in] move_cb
1246 extern Evas_Object *setting_create_icon(Evas_Object *parent, const char *img_path,
1247 Evas_Object_Event_Cb up_cb,
1248 Evas_Object_Event_Cb down_cb,
1249 Evas_Object_Event_Cb move_cb,
1252 * to make sbu-obj the same size as parent-obj.Notice: subobj is the only sub-obj @parent wants to display
1259 * To create a button which only has a image and looks clickable
1260 * (if pressed, it is dim color;if unpressed, it is normal color)
1262 * @param[in] img_path
1264 * @param[in] down_cb
1265 * @param[in] move_cb
1268 extern Evas_Object *setting_create_image_button(Evas_Object *parent,
1269 const char *btn_img,
1270 setting_call_back_func clicked_cb,
1271 setting_call_back_func unpressed_cb,
1275 * set font_size, color or align(right, left, middle),if need, you
1276 * can add </font_siz>, </color> or </align> to controll a segment words; or else
1277 * the text will take the same effect until the end of text.
1279 extern char *setting_customize_text(const char *input_str, const int font_size,
1280 const char *color, const char *align);
1282 extern void setting_set_tts_info(Evas_Object* obj, const char* label,
1283 const char* traits, const char *state,
1285 extern void setting_go_to_top(Evas_Object *content);
1288 * To go to top of list in top view of navibar.
1289 * @param[in] navibar
1291 extern void setting_go_to_navibar_list_top(Evas_Object *navibar);
1293 extern void setting_check_genlist_item_bottom_line(Elm_Object_Item *item);
1294 extern void __gl_realized_cb(void *data, Evas_Object *obj, void *event_info);
1295 extern void setting_set_tts_info(Evas_Object* obj, const char* label,
1296 const char* traits, const char *state,
1298 extern void setting_entry_entry_set(Evas_Object *entry, const char *text, const int font_size);
1299 extern void setting_genlist_item_groupstyle_set(Setting_GenGroupItem_Data *list_item, setting_group_style group_style);
1300 extern void setting_update_gl_item_chk_status(Setting_GenGroupItem_Data *item_data, int status);
1301 extern void setting_force_update_gl_item_chk_status(Setting_GenGroupItem_Data *item_data, int status);
1303 extern void setting_conformant_keypad_state(Evas_Object *conform, bool enable);
1305 extern void __popup_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
1306 extern void __popup_event_set(Evas_Object *popup, void *data,
1307 setting_call_back_func response_cb,
1308 int timeout,//to control the timeout time
1309 bool blocked_flag,//to control whether to block the screen
1310 bool keygrab_flag//to control whether to block the 'Home key'
1314 extern Evas_Object *setting_create_navibar_title_text_btn(Evas_Object *parent, const char *text, Evas_Smart_Cb func, void *data);
1317 extern void setting_help_popup_circle_block_create(Evas_Object *win, Evas_Object * parent, Evas_Object ** circle,
1318 Evas_Object ** popup, char *string_id, int x, int y, Evas_Coord_Rectangle * rect);
1319 extern void setting_help_popup_circle_block_delete(Evas_Object *win, Evas_Object ** circle, Evas_Object ** popup);
1320 extern void setting_help_popup_circle_block_move(Evas_Object *win, Evas_Object * circle, Evas_Object * popup, int x,
1321 int y, Evas_Coord_Rectangle * rect);
1322 extern void setting_help_popup_circle_unblock_create(Evas_Object * parent, Evas_Object ** circle,
1323 Evas_Object ** popup, char *string_id, int x, int y);
1324 extern void setting_help_popup_block_create(Evas_Object *win, Evas_Object * parent,
1325 Evas_Object ** popup, char *string_id, int x, int y, Evas_Coord_Rectangle * rect);
1326 extern void setting_help_popup_unblock_create(Evas_Object * parent,
1327 Evas_Object ** popup, char *string_id, int x, int y);
1328 extern void setting_help_popup_block_move(Evas_Object *win, Evas_Object * popup, int x, int y,
1329 Evas_Coord_Rectangle * rect);
1332 #define SWIP_EFFECT_ENABLE(ly_main, tabbar) setting_tabbar_enable_swip_effect(ly_main, tabbar)
1333 #define SWIP_EFFECT_DISABLE(ly_main, tabbar) setting_tabbar_disable_swip_effect(ly_main, tabbar)
1335 extern void setting_tabbar_enable_swip_effect(Evas_Object *ly_main, Evas_Object *tabbar);
1336 extern void setting_tabbar_disable_swip_effect(Evas_Object *ly_main, Evas_Object *tabbar);
1337 extern void setting_obj_listen_on(Evas_Object *obj, const char *vconf, vconf_callback_fn cb, void *data);
1338 extern void setting_genlist_unregister_tts_access_highlight(Evas_Object *obj, const char *itc);
1339 extern void setting_decorate_image(Evas_Object *obj, const char *code_style);
1342 extern char *__setting_phone_lang_get_by_pattern(const char *locale, const char *skeleton);
1344 #endif /* __SETTING_COMMON_DRAW_WIDGET_H__ */