Merge branch 'tizen_2.1' of ssh://tizendev.org:29418/apps/home/settings into tizen_2.1
[apps/core/preloaded/settings.git] / setting-common / include / setting-common-data-type.h
index c5c6400..fe3d903 100755 (executable)
@@ -1,22 +1,18 @@
 /*
  * setting
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  *
- * 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");
+ * Licensed under the Flora License, Version 1.1 (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
+ *     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,
+ * 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.
- *
  */
 
 /**
 #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               "/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 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 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_THEME_EDJ_NAME         SETTING_EDJ_PATH"/setting-theme.edj"
 
 #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 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.
 *
@@ -148,13 +143,11 @@ typedef void (*setting_call_back_func) (void *data, Evas_Object *obj, void *even
 
 #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
 {
        char* locale;                           // ex) "en_US.UTF"
@@ -178,6 +171,7 @@ 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,
@@ -195,6 +189,7 @@ 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,
@@ -232,6 +227,14 @@ 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?
@@ -246,6 +249,8 @@ typedef struct _Setting_GenGroupItem_Data {
        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;
@@ -271,6 +276,8 @@ typedef struct _Setting_GenGroupItem_Data {
        double slider_max;                                              /**< to swallow a slider */
        setting_call_back_func start_change_cb;
        setting_call_back_func stop_change_cb;
+       setting_call_back_func maxlength_reached_cb;
+       void *x_callback_cb;
 
        /* sound/vibration */
        int belongs_to;                                                 /**< 1: slider belongs to sound group. 0: slider belongs to vibration group */
@@ -285,6 +292,8 @@ typedef struct _Setting_GenGroupItem_Data {
        bool isFocusFlag;
        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.. */
 
@@ -295,6 +304,9 @@ typedef struct _Setting_GenGroupItem_Data {
        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 {
@@ -320,6 +332,7 @@ typedef struct _Setting_Done_List_Data {
        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];
@@ -331,6 +344,7 @@ typedef struct _Setting_Done_List_Data {
        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__ */