Merge branch 'master' into tizen_2.1
[apps/core/preloaded/settings.git] / setting-common / include / setting-common-data-type.h
old mode 100644 (file)
new mode 100755 (executable)
index 22d9c16..7cc3dc9
@@ -1,20 +1,19 @@
 /*
-  * 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.
-  */
-
-
+ * setting
+ * Copyright (c) 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://floralicense.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 common-data-type
 #define bool Eina_Bool
 #endif
 #define PWD_FILE "/opt/data/setting/set_info"
+//#define PLUGIN_CFG_DIR "/opt/data/setting/plugin-cfg"
+#define PLUGIN_CFG_DIR "/opt/data/setting/plugin-xml"
 
 #define SETTING_POSTINST_FILE "/var/lib/dpkg/info/org.tizen.setting.postinst"
 #define SETTING_PACKAGE                        "setting"
 #define SYSTEM_PACKAGE                 "sys_string"
-#define SETTING_LOCALEDIR              "/opt/apps/org.tizen.setting/res/locale"
+#define SETTING_LOCALEDIR              "/usr/apps/org.tizen.setting/res/locale"
+
+#define SYSTEM_ICON_PATH               "/usr/apps/org.tizen.setting/res/icons"
+#define SETTING_ICON_PATH              "/usr/apps/org.tizen.setting/res/icons"
+#define SETTING_UG_ICON_PATH   "/usr/ug/res/icon/org.tizen.setting"
+#define SETTING_UG_PATH                        "/usr/ug/lib"
+#define SETTING_UG_PATH_USR            "/usr/ug/lib"
 
-#define SYSTEM_ICON_PATH               "/opt/apps/org.tizen.setting/res/icons"
-#define SETTING_ICON_PATH              "/opt/apps/org.tizen.setting/res/icons"
-#define SETTING_UG_ICON_PATH   "/opt/ug/res/icon/org.tizen.setting"
-#define SETTING_UG_PATH                        "/opt/ug/lib"
+#define SETTING_UG_PATH_OPT                    "/opt/ug/lib"
+#define SETTING_UG_PATH_USR_OPT                "/opt/ug/lib"
 
 #define SETTING_EDJ_PATH               EDJDIR
 #define SETTING_MEMORY_EDJ_NAME                SETTING_EDJ_PATH"/setting-memory.edj"
 #define SETTING_FONT_BLACK "\033[0m"
 #define SETTING_FONT_BGREEN "\033[36m"
 
+#define THEME_STYLE "beat"
+
 #define IMG_EC_ARROW_OPEN  SETTING_ICON_PATH"/00_button_expand_opened.png"
 #define IMG_EC_ARROW_CLOSE SETTING_ICON_PATH"/00_button_expand_closed.png"
 
 #define SETTING_IDLE_IMAGE_PATH "/etc/idle_image/"
 
-#ifdef SUPPORT_NAVIGATIONBAR
-#define NAVI_CONTROLBAR_STYLE "navigationbar"
-#define NAVI_DEF_BUTTON_STYLE "navigationbar_control/center"
-#define NAVI_BACK_BUTTON_STYLE "navigationbar_backbutton/default"
-#else
-#define NAVI_CONTROLBAR_STYLE "naviframe"
-#define NAVI_DEF_BUTTON_STYLE  "naviframe_control/default"
+#define NAVI_DEF_BUTTON_STYLE  "naviframe/toolbar/default"//"naviframe_control/default"
 #define NAVI_BACK_BUTTON_STYLE "naviframe/back_btn/default"
-#endif
 
-#if SUPPORT_BOTTOM_BTNS
 #define NAVI_CONTROLBAR_PART "controlbar"
-#else
-#define NAVI_CONTROLBAR_PART "optionheader"
-#endif
+
+#define BTN_STYLE_DEF "naviframe/title/default"
+#define NAVI_BTN_STYLE_LEFT "title_left_btn"
+#define NAVI_BTN_STYLE_RIGHT "title_right_btn"
+#define NAVI_BTN_STYLE_MORE "title_more_btn"
+#define NAVI_BTN_STYLE_PREV "prev_btn"
+
+#define SETTING_FONT_CONF_FILE "/opt/etc/fonts/conf.avail/99-slp.conf"
+
+
+//#define GENLIST_LIST_SUB_TEXT_SETTINGS_COLOR_STYLE          "#3B73B6FF"
+#define BLUE_COLOR          "#3B73B6"  //3B73B6FF <== 59 115 182 255
+#define GRAY_COLOR "#7B7B7B"
+#define RED_COLOR "#FF0000"
 
 /**
 * @brief slider, button, and etc.
@@ -119,31 +129,39 @@ typedef void (*setting_call_back_func) (void *data, Evas_Object *obj, void *even
 #define MAX_DATETIME_FORMAT_LEN                        64
 #define MAX_DATE_FORMAT_LEN                            10
 
-#define SMALL_FONT_DPI                                                 48
-#define MIDDLE_FONT_DPI                                        72
-#define LARGE_FONT_DPI                                         96
-#define HUGE_FONT_DPI                                          100
-#define GIANT_FONT_DPI                                         111
+#define SMALL_FONT_DPI                                                 (-80)
+#define MIDDLE_FONT_DPI                                        (-100)
+#define LARGE_FONT_DPI                                         (-144)
+#define HUGE_FONT_DPI                                          (-184)
+#define GIANT_FONT_DPI                                         (-240)
+
+#define LABEL_FONT_SIZE_SMALL                                  24
+#define LABEL_FONT_SIZE_NORMAL                                         35
+#define LABEL_FONT_SIZE_LARGE                                  55
+#define LABEL_FONT_SIZE_HUGE                                   75
+#define LABEL_FONT_SIZE_GIANT                                  92
 
 #define __STR_EMUL                                                     "emul"
 #define __LEN_STR_EMUL                                         4
-#define BIN_INFO_FILE_PATH                                     "/etc/info.ini"
+
+#define MAX_SYSTEM_SERVICE_NUM                         30
+#define SYSTEM_SERVICE_LIST_PATH "/opt/osp/system/configuration/system-services.list"
+#define MAX_PKG_NAME_LEN                       128
 
 typedef struct
 {
-       int index;                                      // auto - russia
        char* locale;                           // ex) "en_US.UTF"
        char* title;                            // "United Kingdom"
+       int number;                             // no -  UI
 } setting_lang_entry;
 
 
 
 typedef enum _Theme_Type {
        Theme_Invalid = -1,
-       Theme_Tizen = 1,
-       Theme_Tizen_Black = 2,
+       Theme_Tizen = 0,
+       Theme_Tizen_Black = 1,
        Theme_Tizen_Blue,
-       Theme_Tizen_Grey,
        Theme_ERROR
 } Theme_Type;
 
@@ -153,10 +171,12 @@ typedef enum _GENDIAL_Type {
        GENDIAL_Type_1icon_2text = 2,
        GENDIAL_Type_2text_2icon_4 = 3,
        GENDIAL_Type_1text_2icon_2 = 4,
+       GENDIAL_Type_2text_2icon_3 = 5,
        GENDIAL_Type_sel_all,
 
        GENDIAL_Type_1line_icontext,
        GENDIAL_Type_group_item,
+       GENDIAL_Type_2text_3,
        GENDIAL_Type_MAX
 } GENDIAL_Type;
 
@@ -169,6 +189,8 @@ typedef enum _SWALLOW_Type {
        SWALLOW_Type_1CHECKICON = 4,
        SWALLOW_Type_1RADIO = 5,
        SWALLOW_Type_1TOGGLE = 6,
+       SWALLOW_Type_1ICON_1PROCESS,
+       SWALLOW_Type_MULTILINE_1TOGGLE,
 
        SWALLOW_Type_1ICON_1IMAGE,
        SWALLOW_Type_1BUTTON,
@@ -178,7 +200,7 @@ typedef enum _SWALLOW_Type {
        SWALLOW_Type_1RADIO_1PROCESS,
        SWALLOW_Type_1RADIO_1SEARCH,
        SWALLOW_Type_1RADIO_1LABLE,
-       SWALLOW_Type_0RADIO_1SEARCH,
+       SWALLOW_Type_1SEARCH,
 
        SWALLOW_Type_1LINE_LAYOUT = 20,
        SWALLOW_Type_1LINE_LAYOUT_1RADIO,
@@ -190,7 +212,6 @@ typedef enum _SWALLOW_Type {
        SWALLOW_Type_LAYOUT_SLIDER,
        SWALLOW_Type_LAYOUT_SPECIALIZTION,
        SWALLOW_Type_LAYOUT_SPECIALIZTION_X,//extension
-       SWALLOW_Type_LAYOUT_SLIDER_WITH_TITLE,
 
        SWALLOW_Type_MAX
 } SWALLOW_Type;
@@ -206,62 +227,86 @@ typedef enum _POPUP_BTN_RESPONSE_TYPE{
        POPUP_RESPONSE_OK = 0,
        POPUP_RESPONSE_CANCEL = 1,
 } POPUP_BTN_RESPONSE_TYPE;
+
+typedef enum {
+       SETTING_GROUP_STYLE_NONE = 0,
+       SETTING_GROUP_STYLE_TOP,
+       SETTING_GROUP_STYLE_CENTER,
+       SETTING_GROUP_STYLE_BOTTOM
+} setting_group_style;
+
 /**
  *an item node in genlist
+ * @todo begings_to is requried?
+ * @todo isItemDisableFlag is required?
+ * @todo isSinglelineFlag is requred?
  */
 typedef struct _Setting_GenGroupItem_Data {
+
        void **pBack;
 
        Elm_Object_Item *item;
        SWALLOW_Type swallow_type;
        const char *l_swallow_path;
        const char *r_swallow_path;
+       /* for shortcut item */
+       const char *exec_path;
+
+       Evas_Object *win_main;
+       Evas *evas;
 
-       int chk_status;                  /**< represent check value, slider value, datefield value etc.. */
-       char *keyStr;
-       char *title;
-       char *sub_desc;
-       Evas_Object *rgd;
+       /* radio button */
+       Evas_Object *rgd;                                               /**< radio button */
+       int usb_index;                                                          /**< usb_index number of radio buttons, ex) USB setting */
 
        /* output */
-       Evas_Object *eo_check;
+       Evas_Object *eo_check;                                  /**< slider, button, check, editfield, datefield */
        setting_call_back_func chk_change_cb;
 
-       /* to swallow a whole layout (genlist item is 1line-layout or 2line-layout) */
+       int chk_status;                                                 /**< represent check value, slider value, datefield value etc.. */
+       char *keyStr;                                                   /**< title */
+       char *sub_desc;                                                 /**< sub text */
 
+       /* to swallow a whole layout (genlist item is 1line-layout or 2line-layout) */
        char *item_style;                                               /**< itc style name */
-       Evas_Object *win_main;
-       Evas *evas;
 
        /*  for slider control */
-
-       double slider_min;                              /**< to swallow a slider */
-
-       double slider_max;                              /**< to swallow a slider */
+       bool isIndicatorVisible;                                /**< indicator option (displaying number) */
+       double slider_min;                                              /**< to swallow a slider */
+       double slider_max;                                              /**< to swallow a slider */
        setting_call_back_func start_change_cb;
        setting_call_back_func stop_change_cb;
-       int belongs_to; /**< 1: slider belongs to sound group. 0: slider belongs to vibration group */
+       setting_call_back_func maxlength_reached_cb;
+       void *x_callback_cb;
 
-       /*  input panel  */
+       /* sound/vibration */
+       int belongs_to;                                                 /**< 1: slider belongs to sound group. 0: slider belongs to vibration group */
 
+       /*  input panel  */
        Elm_Input_Panel_Layout input_type;              /**< input panel type */
-       bool input_panel_disable_flag;      /** do not show the input panel automatically when the widget is clicked or has focus*/
+       bool input_panel_disable_flag;          /** do not show the input panel automatically when the widget is clicked or has focus*/
+
+       void *userdata;                                                 /**< just a reference, do not need release. */
 
-       void *userdata;                                         /**< just a reference, do not need release. */
        bool isPasswordFlag;
        bool isFocusFlag;
-       bool isItemDisableFlag;
+       bool isItemDisableFlag;                                 /**< date/time UG only */
        bool isSinglelineFlag;
+       bool maxLengthReachFlag;
+       bool enterKeyPressFlag;
 
-       int int_slp_setting_binded; /**< its relative vconf value must increase from 0, and step is 1. eg, 0, 1, 2, 3.. */
-       int index;
+       int int_slp_setting_binded;                     /**< its relative vconf value must increase from 0, and step is 1. eg, 0, 1, 2, 3.. */
 
 
-       Evas_Object *notify;//act as any popup to show user any message
+       /* popup */
+       Evas_Object *notify;                                    /**< act as any popup to show user any message */
 
        Elm_Entry_Filter_Accept_Set *digits_filter_data;
        Elm_Entry_Filter_Limit_Size *limit_filter_data;
 
+       Eina_List* childs;              /**< child nodes if this has child nodes for handling radio buttons */
+
+       setting_group_style group_style;
 } Setting_GenGroupItem_Data;
 
 typedef enum {
@@ -278,12 +323,16 @@ typedef struct _item_table {
        Setting_GenGroupItem_Data *data_GenItem;
 } Item_Table;
 
+/**
+ * @todo is 50 sufficient value?
+ */
 typedef struct _Setting_Done_List_Data {
        /* external input arguements */
        Evas_Object *win_main;
        void *UG_data;
        Evas_Object *ly_parent;
        Evas_Object *controllbar;
+       Elm_Object_Item *navi_it;
 
        /* internal output%input arguements */
        Item_Table chk_items[MAX_RESET_MENU_NUM];
@@ -293,6 +342,9 @@ typedef struct _Setting_Done_List_Data {
        Elm_Genlist_Item_Class itc_1text_1icon;
        Elm_Genlist_Item_Class itc_seperator;
        Elm_Genlist_Item_Class itc_sel_all;
+       Evas_Object *select_all_checkbox;
+       Eina_Bool select_all_checked;
+       Eina_List *list;
 } Setting_Done_List_Data;
 
 #endif                         /* __SETTING_COMMON_DATA_TYPE_H__ */