Initialize Tizen 2.3
[apps/home/b2-clocksetting.git] / include / setting-display.h
1 /*
2  * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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 SETTING_FONT_PRELOAD_FONT_PATH "/usr/share/fonts"
36 #define SETTING_FONT_DOWNLOADED_FONT_PATH "/opt/share/fonts"
37
38 struct _display_menu_item {
39         char *name;
40         int type;
41         void (*func)(void *data, Evas_Object *obj, void *event_info);
42 };
43
44 struct _font_menu_item {
45         char *name;
46         void (*func)(void *data, Evas_Object *obj, void *event_info);
47 };
48
49 typedef struct _Display_Item_Data
50 {
51         int index;
52         Elm_Object_Item *item;
53 } Display_Item_Data;
54
55 typedef struct _Font_Style_Item_Data
56 {
57         int index;
58         char *font_name;
59         Elm_Object_Item *item;
60 } Font_Style_Item_Data;
61
62 enum {
63         SETTING_DISPLAY_BRIGTHNESS,
64         SETTING_DISPLAY_SCREEN_TIME,
65         SETTING_DISPLAY_FONT,
66         SETTING_DISPLAY_LANG,
67         SETTING_DISPLAY_GESTURE,
68         SETTING_DISPLAY_ICON_SIZE,
69         SETTING_DISPLAY_EDIT_HOME,
70         SETTING_DISPLAY_EDIT_APPS
71 };
72
73
74 char * _gl_display_title_get(void *data, Evas_Object *obj, const char *part);
75 Evas_Object * _gl_display_check_get(void *data, Evas_Object *obj, const char *part);
76 Evas_Object* _create_display_list(void* data);
77 void _display_gl_Battery_percent_cb(void *data, Evas_Object *obj, void *event_info);
78 void _display_gl_screen_timeout_cb(void *data, Evas_Object *obj, void *event_info);
79 void _show_screen_timeout_list(void* data);
80 void _display_gl_language_cb(void *data, Evas_Object *obj, void *event_info);
81 void _display_gl_font_cb(void *data, Evas_Object *obj, void *event_info);
82 void _display_gl_font_style_cb(void *data, Evas_Object *obj, void *event_info);
83 void _display_gl_font_size_cb(void *data, Evas_Object *obj, void *event_info);
84 void _show_font_list(void* data);
85 void _show_font_style_list(void* data);
86 void _show_font_size_list(void* data);
87 void _display_gl_rotate_screen_cb(void *data, Evas_Object *obj, void *event_info);
88 void _show_rotate_screen_list(void* data);
89 static void _display_brightness_cb(void *data, Evas_Object *obj, void *event_info);
90 Evas_Object * _show_brightness_popup(void *data, Evas_Object *obj, void *event_info);
91 void _back_brightness_naviframe_cb(void *data, Elm_Object_Item *it);
92
93 void _init_display();
94 void _init_screen_rotate();
95 Eina_Bool _clear_display_cb(void *data, Elm_Object_Item *it);
96 static void _set_rotate_screen(const int rotation);
97 static int _get_rotate_screen();
98
99 #endif /* SETTING_DISPLAY_H_ */