tizen 2.3.1 release
[apps/home/b2-clocksetting.git] / include / setting-homescreen.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_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         int index;
56         Elm_Object_Item *item;
57 } Homescreen_Item_Data;
58
59 typedef struct _page_data page_data;
60 struct _page_data {
61         Evas_Object *mapbuf[BG_COLOR_COUNT / 2];
62 };
63
64 struct _color {
65         int r;
66         int g;
67         int b;
68         char *hex;
69 };
70
71 typedef struct _wallpaper_page_data wallpaper_page_data;
72 struct _wallpaper_page_data {
73         Evas_Object *mapbuf[DEFAULT_WALLPAPER_COUNT / NUM_MAX_THUMB_IN_PAGES];
74 };
75
76 char *_get_homeview_type_subtitle();
77 char *_gl_homescreen_title_get(void *data, Evas_Object *obj, const char *part);
78 Evas_Object *_gl_homescreen_check_get(void *data, Evas_Object *obj, const char *part);
79 Evas_Object *_create_homescreen_list(void *data);
80 void _homescreen_gl_viewtype_cb(void *data, Evas_Object *obj, void *event_info);
81 void _homescreen_gl_homebg_cb(void *data, Evas_Object *obj, void *event_info);
82 void _homescreen_gl_edit_home_cb(void *data, Evas_Object *obj, void *event_info);
83 void _homescreen_gl_edit_apps_cb(void *data, Evas_Object *obj, void *event_info);
84 void _show_bg_slide_cb(void *data, Evas_Object *obj, void *event_info);
85 void _wallpaper_gl_cb(void *data, Evas_Object *obj, void *event_info);
86 void _gallery_gl_cb(void *data, Evas_Object *obj, void *event_info);
87 void _clear_homescreen_cb(void *data , Evas *e, Evas_Object *obj, void *event_info);
88
89 Evas_Object *create_wallpaper_list(void *data);
90
91 #endif /* SETTING_HOMESCREEN_H_ */