tizen 2.3.1 release
[apps/home/b2-clocksetting.git] / include / setting-display.h
1 /*
2  *  Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  *  Licensed under the Flora License, Version 1.0 (the License);
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *      http://floralicense.org/license/
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an AS IS BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License.
15  *
16  */
17 /*
18  * setting-display.h
19  *
20  *  Created on: Oct 9, 2013
21  *      Author: min-hoyun
22  */
23
24 #ifndef SETTING_DISPLAY_H_
25 #define SETTING_DISPLAY_H_
26
27 #include <Elementary.h>
28 #include <libintl.h>
29 #include <string.h>
30
31 #define MENU_COUNT              7
32 #define FONT_SIZE_COUNT         3
33 #define SCREEN_TIME_COUNT       5
34 #define ROTATE_SCREEN_COUNT             4
35 #define AMBIENT_MODE_ENABLE             1
36 #define SETTING_FONT_PRELOAD_FONT_PATH "/usr/share/fonts"
37 #define SETTING_FONT_DOWNLOADED_FONT_PATH "/opt/share/fonts"
38
39 struct _display_menu_item {
40         char *name;
41         int type;
42         void (*func)(void *data, Evas_Object *obj, void *event_info);
43         int is_enable_ambient_mode;
44 };
45
46 struct _font_menu_item {
47         char *name;
48         void (*func)(void *data, Evas_Object *obj, void *event_info);
49 };
50
51 typedef struct _Display_Item_Data {
52         int index;
53         Elm_Object_Item *item;
54         Evas_Object *check;
55 } Display_Item_Data;
56
57 typedef struct _Font_Style_Item_Data {
58         int index;
59         char *font_name;
60         Elm_Object_Item *item;
61 } Font_Style_Item_Data;
62
63 enum {
64         SETTING_DISPLAY_BRIGTHNESS,
65         SETTING_DISPLAY_SCREEN_TIME,
66         SETTING_DISPLAY_FONT,
67         SETTING_DISPLAY_LANG,
68         SETTING_DISPLAY_GESTURE,
69         SETTING_DISPLAY_ICON_SIZE,
70         SETTING_DISPLAY_EDIT_HOME,
71         SETTING_DISPLAY_EDIT_APPS,
72         SETTING_DISPLAY_AMBIENT_MODE
73 };
74
75 enum {
76         SETTING_DISPLAY_FONT_STYLE,
77         SETTING_DISPLAY_FONT_SIZE
78 };
79
80
81 char *_gl_display_title_get(void *data, Evas_Object *obj, const char *part);
82 Evas_Object *_gl_display_check_get(void *data, Evas_Object *obj, const char *part);
83 Evas_Object *_create_display_list(void *data);
84 void _display_gl_Battery_percent_cb(void *data, Evas_Object *obj, void *event_info);
85 void _display_gl_screen_timeout_cb(void *data, Evas_Object *obj, void *event_info);
86 void _show_screen_timeout_list(void *data);
87 void _display_gl_language_cb(void *data, Evas_Object *obj, void *event_info);
88 void _display_gl_font_cb(void *data, Evas_Object *obj, void *event_info);
89 void _display_gl_font_style_cb(void *data, Evas_Object *obj, void *event_info);
90 void _display_gl_font_size_cb(void *data, Evas_Object *obj, void *event_info);
91 void _show_font_list(void *data);
92 int _show_font_style_list(void *data);
93 void _show_font_size_list(void *data);
94 void _display_gl_rotate_screen_cb(void *data, Evas_Object *obj, void *event_info);
95 void _show_rotate_screen_list(void *data);
96 static void _display_brightness_cb(void *data, Evas_Object *obj, void *event_info);
97 Evas_Object *_show_brightness_popup(void *data, Evas_Object *obj, void *event_info);
98 void _back_brightness_naviframe_cb(void *data, Elm_Object_Item *it);
99
100 void _init_display();
101 void _init_screen_rotate();
102 Eina_Bool _clear_display_cb(void *data, Elm_Object_Item *it);
103 static void _set_rotate_screen(const int rotation);
104 static int _get_rotate_screen();
105
106 void _display_ambient_mode_cb(void *data, Evas_Object *obj, void *event_info);
107
108 #endif /* SETTING_DISPLAY_H_ */