Tizen 2.0 Release
[apps/home/settings.git] / setting-font / include / setting-font.h
1 /*
2  * setting
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Flora License, Version 1.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://floralicense.org/license/
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef __SETTING_FONT_H__
18 #define __SETTING_FONT_H__
19
20 #include <stdio.h>
21 #include <Elementary.h>
22
23 #include <glib-object.h>
24
25 #include <setting-common-draw-widget.h>
26 #include <setting-common-view.h>
27
28 typedef struct _SettingFontUG SettingFontUG;
29
30 typedef enum
31 {
32         FONT_SIZE_AND_FONT_SEL_UG,
33         FONT_SEL_VIEW_APPCONTROL,
34         FONT_SIZE_VIEW_APPCONTROL,
35 }FontUGViewMode;
36
37
38 /**
39  * Setting Font UG context
40  * all UG function has void* as an agument. this is casted back to SettingFontUG
41  * and the functions access app context.
42  */
43 struct _SettingFontUG {
44         ui_gadget_h ug;
45
46         /* add more variables here (move your appdata to here) */
47         Evas *evas;
48         Evas_Object *win_main_layout;
49         Evas_Object *win_get;
50
51         Evas_Object *ly_main;
52
53         Evas_Object *genlist;
54         Evas_Object *navibar;
55
56         /* font setting */
57         Evas_Object *popup;
58         Elm_Genlist_Item_Class itc_2text_3_parent;
59         Elm_Genlist_Item_Class itc_1icon_1text_sub;
60         Elm_Genlist_Item_Class itc_1text_1icon_2;
61         Elm_Genlist_Item_Class itc_2text_2;
62         Elm_Genlist_Item_Class itc_group_item;
63         Elm_Genlist_Item_Class itc_bg_1icon;
64         Elm_Genlist_Item_Class itc_seperator;
65
66         Setting_GenGroupItem_Data *subitem;
67         Setting_GenGroupItem_Data *font_type;
68         Setting_GenGroupItem_Data *font_size;
69
70         // font type
71         int prev_font;
72         char *font_name;
73
74         int ret_font_size;
75
76         FontUGViewMode viewmode;
77
78         // Font Size & Sel
79         Evas_Object *size_rdg;
80         setting_view *view_to_load;
81 };
82
83 extern setting_view setting_view_font_main;
84 extern setting_view setting_view_font_font_size;
85
86 int setting_font_update_vconf_key(void *data, setting_vconf_type type,
87                                   int slp_key);
88
89 #endif                          /* __SETTING_FONT_H__ */