Initialize Tizen 2.3
[apps/home/b2-clocksetting.git] / include / setting-homescreen.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_HOMESCREEN_H_
25 #define SETTING_HOMESCREEN_H_
26
27 #include <Elementary.h>
28 #include <libintl.h>
29 #include <string.h>
30
31 #define HOME_MENU_COUNT         3
32 #define VIEWTYPE_COUNT  2
33 #define BG_COLOR_COUNT  12
34 #define HOME_BG_LIST_COUNT 3
35 #define NUM_MAX_THUMB_IN_PAGES 2
36 #define NUM_DEFAULT_THUMB_BUTTON 2
37 #define DEFAULT_WALLPAPER_COUNT 6
38 #define WALLPAPER_CNT_PER_PAGE 4
39 #define SETTING_DEFAULT_WALLPAPER_PATH  "/opt/share/settings/Wallpapers"
40 #define CROPPED_GALLERY_DEFAULT_WALLPAPER_PATH          "/opt/usr/media/.bgwallpaper.jpg"
41
42 struct _homescreen_menu_item {
43         char *name;
44         int is_check_type;
45         int state;
46         void (*func)(void *data, Evas_Object *obj, void *event_info);
47 };
48
49 struct _homebg_menu_item {
50         char *name;
51         void (*func)(void *data, Evas_Object *obj, void *event_info);
52 };
53
54 typedef struct _Homescreen_Item_Data
55 {
56         int index;
57         Elm_Object_Item *item;
58 } Homescreen_Item_Data;
59
60 typedef struct _page_data page_data;
61 struct _page_data
62 {
63         Evas_Object *mapbuf[BG_COLOR_COUNT/2];
64 };
65
66 struct _color
67 {
68         int r;
69         int g;
70         int b;
71         char* hex;
72 };
73
74 typedef struct _wallpaper_page_data wallpaper_page_data;
75 struct _wallpaper_page_data
76 {
77         Evas_Object *mapbuf[DEFAULT_WALLPAPER_COUNT/NUM_MAX_THUMB_IN_PAGES];
78 };
79
80 char * _get_homeview_type_subtitle();
81 char * _gl_homescreen_title_get(void *data, Evas_Object *obj, const char *part);
82 Evas_Object * _gl_homescreen_check_get(void *data, Evas_Object *obj, const char *part);
83 Evas_Object* _create_homescreen_list(void* data);
84 void _homescreen_gl_viewtype_cb(void *data, Evas_Object *obj, void *event_info);
85 void _homescreen_gl_homebg_cb(void *data, Evas_Object *obj, void *event_info);
86 void _homescreen_gl_edit_home_cb(void *data, Evas_Object *obj, void *event_info);
87 void _homescreen_gl_edit_apps_cb(void *data, Evas_Object *obj, void *event_info);
88 void _show_bg_slide_cb(void *data, Evas_Object *obj, void *event_info);
89 void _wallpaper_gl_cb(void *data, Evas_Object *obj, void *event_info);
90 void _gallery_gl_cb(void *data, Evas_Object *obj, void *event_info);
91 void _clear_homescreen_cb(void *data , Evas *e, Evas_Object *obj, void *event_info);
92
93 Evas_Object *create_wallpaper_list(void *data);
94
95 #endif /* SETTING_HOMESCREEN_H_ */