Implement the 'Create' connection function
[apps/core/preloaded/settings.git] / setting-common / include / setting-common-draw-widget.h
old mode 100644 (file)
new mode 100755 (executable)
index 9609bb5..1c85331
@@ -1,22 +1,25 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.0 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-  *
-  *     http://www.tizenopensource.org/license
-  *
-  * Unless required by applicable law or agreed to in writing, software
-  * distributed under the License is distributed on an "AS IS" BASIS,
-  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  * See the License for the specific language governing permissions and
-  * limitations under the License.
-  */
-
-
-/**
- *defgroup setting-common-draw-widget
+ * setting
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Contact: MyoungJune Park <mj2004.park@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+/**
+ *default group setting-common-draw-widget
  *common UI code for reuse
  */
 #ifndef __SETTING_COMMON_DRAW_WIDGET_H__
 #define SETTING_COMMON_DRAW_WIDGET_CONTROLBAR_ITEM_LEN 3
 #define POPUP_INTERVAL 2.0
 
+extern const Elm_Genlist_Item_Class itc_seperator;
+extern const Elm_Genlist_Item_Class itc_bottom_seperator;
+extern const Elm_Genlist_Item_Class itc_sep_line;
+
+extern const Elm_Genlist_Item_Class itc_1text;
+extern const Elm_Genlist_Item_Class itc_1text_1icon_2;
+
+extern const Elm_Genlist_Item_Class itc_1icon;
+extern const Elm_Genlist_Item_Class itc_1icon_1text_sub;
+extern const Elm_Genlist_Item_Class itc_1text_1icon;
+extern const Elm_Genlist_Item_Class itc_1text_2icon;
+extern const Elm_Genlist_Item_Class itc_1text_2icon_2;
+
+extern const Elm_Genlist_Item_Class itc_2text_2;
+extern const Elm_Genlist_Item_Class itc_2text;
+extern const Elm_Genlist_Item_Class itc_multiline_2text_1icon;
+extern const Elm_Genlist_Item_Class itc_2text_1icon_3;
+extern const Elm_Genlist_Item_Class itc_2text_1icon_6;
+extern const Elm_Genlist_Item_Class itc_2text_1icon_7;
+
+extern const Elm_Genlist_Item_Class itc_2text_3_parent;
+extern const Elm_Genlist_Item_Class itc_2text_3;
+extern const Elm_Genlist_Item_Class itc_2text_2icon_3;
+
+extern const Elm_Genlist_Item_Class itc_multiline_text;
+extern const Elm_Genlist_Item_Class itc_cm_1text_1icon_2;
+extern const Elm_Genlist_Item_Class itc_sel_all;
+extern const Elm_Genlist_Item_Class itc_bg_1icon;
+extern const Elm_Genlist_Item_Class itc_group_item;
+
+
 /**
  * Do process when clicking radio in subitem of expandable item
  */
@@ -92,6 +126,20 @@ extern Setting_GenGroupItem_Data *setting_create_Gendial_field_1radio(
                                        Evas_Object *rgd, int chk_status,
                                        const char *keyStr,
                                        setting_call_back_func chk_change_cb);
+/**
+ * Create 2radion style item
+ * @return a pointer to Setting_GenGroupItem_Data
+ */
+extern Setting_GenGroupItem_Data *setting_create_Gendial_field_2radio(
+                                       Evas_Object *genlist,
+                                       const Elm_Genlist_Item_Class *itc,
+                                       setting_call_back_func gl_sel,
+                                       void *sel_data,
+                                       SWALLOW_Type swallow_type,
+                                       Evas_Object *rgd, int chk_status,
+                                       const char *keyStr,
+                                       const char *sub_desc,
+                                       setting_call_back_func chk_change_cb);
 
 /**
  * Create common style item with menu icon
@@ -189,8 +237,16 @@ extern void setting_enable_expandable_genlist(Evas_Object *genlist, void *data,
                                              setting_call_back_func
                                              gl_smart_cb);
 
+/**
+* The API to let an item which with processbar go into "processing"
+* @return
+*/
 extern void setting_begin_progress_genlist_item(Setting_GenGroupItem_Data *
                                                data_item);
+/**
+* The API to let an item which with processbar go into "processed"
+* @return
+*/
 extern void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data *
                                                 data_item);
 
@@ -201,7 +257,9 @@ extern void setting_finish_progress_genlist_item(Setting_GenGroupItem_Data *
 extern Evas_Object *setting_create_slider(Evas_Object *win_main, Evas *evas,
                                          const char *l_swallow_path,
                                          const char *r_swallow_path,
-                                         double value, double slider_min,
+                                         double value,
+                                         bool indicator,
+                                         double slider_min,
                                          double slider_max,
                                          setting_call_back_func
                                          slider_change_cb,
@@ -250,7 +308,22 @@ extern Evas_Object *create_bgimage_box_add(void *data, Evas_Object *win_main,
 */
 extern Evas_Object *setting_create_client_bx(Evas_Object *win_main);
 
+/**
+* The API to Create a lable
+* @return a lable
+*/
+extern Evas_Object *setting_create_lable(Evas_Object *parent, const char *lable,const char *style);
+
+/**
+* The API to Create an object to show an image
+* @return an object to show an image
+*/
 extern Evas_Object *setting_create_image(Evas_Object *parent, const char *img_path);
+
+/**
+* The API to Create an object to show anamition image
+* @return an object to show anamition image
+*/
 extern Evas_Object *setting_create_gif(Evas_Object *parent, const char **png_list);
 
 /**
@@ -258,55 +331,98 @@ extern Evas_Object *setting_create_gif(Evas_Object *parent, const char **png_lis
 * @return a popup window which contents a progressbar
 */
 extern Evas_Object *setting_create_popup_with_progressbar(void *data,
-                                                Evas_Object *parent,
-                                                char *progressbar_style,
-                                                char *progressbar_title,
-                                                char *progressbar_lable,
-                                                setting_call_back_func
-                                                response_cb, int timeout);
-extern Evas_Object *setting_create_popup_with_btn(void *data, Evas_Object *parent,
-                                 char *content_str, char *title_str,
-                                 setting_call_back_func response_cb,
-                                 int timeout, int btn_num, ...);
-
+                                                 Evas_Object *parent,
+                                                 char *progressbar_style,
+                                                 char *title,
+                                                 char *text,
+                                                 setting_call_back_func response_cb,
+                                                 int timeout,
+                                                 bool blocked_flag,
+                                                 bool keygrab_flag);
+/**
+* The general API to create a certain popup window with more than one button.
+* @return a certain popup window
+*/
+extern Evas_Object *setting_create_popup_with_btn(void *data,
+                                                 Evas_Object *parent,
+                                                 char *title,
+                                                 char *text,
+                                                 setting_call_back_func response_cb,
+                                                 int timeout,
+                                                 int btn_num, ...);
 /**
 * The general API to create a certain popup window
 * @return a certain popup window
 */
-extern Evas_Object *setting_create_popup_without_btn(void *data, Evas_Object *parent,
-                                        char *content_str, char *title_str,
-                                        setting_call_back_func response_cb,
-                                        int timeout);
-
+extern Evas_Object *setting_create_popup_without_btn(void *data,
+                                               Evas_Object *parent,
+                                               char *title,
+                                               char *text,
+                                               setting_call_back_func response_cb,
+                                               int timeout,
+                                               bool blocked_flag,
+                                               bool keygrab_flag);
 /**
-* The API to create a certain popup window without title
-* @return a certain popup window without title
+* The API to create a certain popup window with title
+* @return a certain popup window with title
 */
-extern int setting_create_popup_without_title(void *data, Evas_Object *win_main,
-                                            char *str_text);
-
+extern int setting_create_simple_popup(void *data,
+                                      Evas_Object *parent,
+                                      char *title,
+                                      char *text);
 /**
-* The API to create a certain popup window with title
+* The API to create a certain popup window with a gif and some buttons
 * @return a certain popup window with title
 */
-extern int setting_create_popup_with_title(void *data, Evas_Object *win_main,
-                                          char *str_title, char *str_text);
+extern Evas_Object *setting_create_popup_with_gif(void *data,
+                                                 Evas_Object *parent,
+                                                 char *title,
+                                                 char *text,
+                                                 const char **png_list,//array end with 'NULL'.
+                                                 setting_call_back_func response_cb,
+                                                 int timeout,
+                                                 int btn_num, ...);
 
-extern Evas_Object *setting_create_popup_with_gif(void *data, Evas_Object *parent, char *content_str, char *title_str, const char **png_list,  //array end with 'NULL'.
-                                                 setting_call_back_func
-                                                 response_cb, int timeout, int btn_num, ...);
-extern Evas_Object *setting_create_popup_with_content(void *data, Evas_Object *parent, char *content_str, char *title_str, Evas_Object *content,       //content obj below text
-                                                     int timeout);
+/**
+* The API to create a certain popup window with a check
+* @return a certain popup window with title
+*/
+extern Evas_Object *setting_create_popup_with_checkview(Evas_Object *parent,
+                                                char *title,
+                                                char *check_str,
+                                                Evas_Object *checkview_content,
+                                                Evas_Object **check,
+                                                int timeout);
+/**
+* The API to create a certain popup window with a check and some buttons
+* @return a certain popup window with title
+*/
 extern Evas_Object *setting_create_popup_with_check(void *data,
-                                                   Evas_Object *parent,
-                                                   char *content_str,
-                                                   char *title_str,
-                                                   char *check_str,
-                                                   setting_call_back_func
-                                                   response_cb, int timeout,
-                                                   Evas_Object **check, int btn_num, ...);
+                                                    Evas_Object *parent,
+                                                    char *title,
+                                                    char *text,
+                                                    char *check_str,
+                                                    Evas_Object **check,
+                                                    setting_call_back_func response_cb,
+                                                    int timeout,
+                                                    int btn_num, ...);
 
 /**
+* The API to create a certain popup window with a image, a check and some buttons
+* @return a certain popup window with title
+*/
+extern Evas_Object *setting_create_popup_with_image_check(void *data,
+                                            Evas_Object *parent,
+                                            char *title,
+                                            char *text1,
+                                            char *text2,
+                                            char *icon_path,
+                                            char *check_str,
+                                            Evas_Object **check,
+                                            setting_call_back_func response_cb,
+                                            int timeout,
+                                            int btn_num, ...);
+/**
 * Alternate the check object status and its binded vcof value via original vcofn value
 */
 extern int setting_draw_onoff_status(Evas_Object *obj,
@@ -353,17 +469,31 @@ extern Evas_Object *setting_create_blank_rect(Evas_Object *layout);
 */
 extern Evas_Object *setting_create_editfiled(Evas_Object *win_main,
                                             char *title, char *def_str);
-
+/**
+* The API to Create a standard layout
+* @return a standard layout
+*/
 extern Evas_Object *setting_create_win_layout(Evas_Object *win_layout,
                                       Evas_Object *win_obj);
-
+/**
+* The API to Create a naviframe
+* @return a naviframe
+*/
 extern Evas_Object *setting_create_navi_bar(Evas_Object *layout);
 
+/**
+* The API to Create a button
+* @return a button
+*/
 extern Evas_Object *setting_create_button(Evas_Object *parent, const char *btn_str,
                                   const char *btn_style,
                                   setting_call_back_func btn_click_cb,
                                   void *cb_data);
 
+/**
+* The API to Create top buttons onto naviframe
+* @return a naviframe item
+*/
 extern Elm_Object_Item * setting_create_navi_bar_top_buttons(char *title_str,
                                         char *lbutton_str,
                                         char *rbutton_str,
@@ -454,7 +584,7 @@ extern Evas_Object *setting_create_layout_navi_bar_genlist(Evas_Object * win_lay
 * The general API to push any evas object(@param[in][eo_view]) to the specialized navi_bar,
 *   which contents at most 3 buttons
 */
-extern void setting_push_layout_navi_bar(char *title_str,
+extern Elm_Object_Item *setting_push_layout_navi_bar(char *title_str,
                                         char *lbutton_str, char *rbutton_str,
                                         char *mbutton_str,
                                         setting_call_back_func lbutton_click_cb,
@@ -505,18 +635,6 @@ extern Evas_Object *setting_create_textbox(Evas_Object *parent,
 /****done_list****/
 
 /**
-* hide selectinfo popup
-*/
-extern void sel_info_popup_hide_cb(void *data, Evas *e, Evas_Object *obj,
-                                  void *event_info);
-
-/**
-* show selectinfo popup
-*/
-extern void sel_info_popup_show_cb(void *data, Evas *e, Evas_Object *obj,
-                                  void *event_info);
-
-/**
 * Create selectinfo popup
 */
 extern void setting_create_sel_info_popup(Evas_Object *parent,
@@ -573,6 +691,18 @@ extern Evas_Object *setting_create_searchbar(void *data, Evas_Object *parent,
                                         Evas_Smart_Cb change_cb,
                                         Evas_Smart_Cb cancel_cb);
 
+#if APPLIED_BACK_KEY_UG
+
+/**
+* Get the toppest popup in current evas, cross through all the APP and UGs.
+*
+* @param[in] evas
+*
+* @return the toppest popup in current evas
+*/
+extern Evas_Object *get_toppest_popup_window(Evas *evas);
+#endif
+
 /**
 * Make it no effect when clicking on a evas object, such as, layout, genlist
 *
@@ -650,6 +780,12 @@ extern Evas_Object *setting_create_icon(Evas_Object *parent, const char *img_pat
                                 Evas_Object_Event_Cb down_cb,
                                 Evas_Object_Event_Cb move_cb,
                                 void *data);
+/**
+* to make sbu-obj the same size as parent-obj.Notice: subobj is the only sub-obj @parent wants to display
+*
+* @param[in] parent
+* @param[in] subobj
+*/
 
 /**
 * To create a button which only has a image and looks clickable
@@ -675,4 +811,10 @@ extern Evas_Object *setting_create_image_button(Evas_Object *parent,
 extern char *setting_customize_text(const char *input_str, const int font_size,
                             const char *color, const char *align);
 
+/*
+* To go to top of list in top view of navibar.
+* @param[in] navibar
+*/
+extern void setting_go_to_navibar_list_top(Evas_Object *navibar);
+
 #endif                         /* __SETTING_COMMON_DRAW_WIDGET_H__ */