initial upload for tizen 2.0 beta
[apps/home/gallery.git] / include / widget / gl-tile.h
1 /*
2   * Copyright 2012  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://www.tizenopensource.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 #ifndef _GL_TILE_H_
18 #define _GL_TILE_H_
19
20 #include "gl-data.h"
21
22 #define GL_TILE_THUMB_1 1
23 #define GL_TILE_THUMB_2 2
24 #define GL_TILE_THUMB_3 3
25 #define GL_TILE_THUMB_5 5
26 #define GL_TILE_THUMB_6 6
27
28 #define GT_TILE_ONLYICON "elm.swallow.onlyicon"
29 #define GT_TILE_FIRSTICON "elm.swallow.firsticon"
30 #define GT_TILE_ICON "elm.swallow.icon"
31 #define GT_TILE_3ICON1 "elm.swallow.3icon1"
32 #define GT_TILE_3ICON2 "elm.swallow.3icon2"
33 #define GT_TILE_4ICON1 GT_TILE_3ICON1
34 #define GT_TILE_4ICON3 "elm.swallow.4icon3"
35 #define GT_TILE_4ICON4 "elm.swallow.4icon4"
36 #define GT_TILE_5ICON1 "elm.swallow.5icon1"
37 #define GT_TILE_5ICON2 "elm.swallow.5icon2"
38 #define GT_TILE_5ICON4 GT_TILE_4ICON3
39 #define GT_TILE_5ICON5 GT_TILE_4ICON4
40 #define GT_TILE_6ICON1 GT_TILE_5ICON1
41 #define GT_TILE_6ICON3 GT_TILE_4ICON3
42 #define GT_TILE_6ICON4 "elm.swallow.6icon4"
43 #define GT_TILE_6ICON5 "elm.swallow.6icon5"
44 #define GT_TILE_6ICON6 GT_TILE_4ICON4
45 #define GT_TILE_LABEL "label_bg"
46 #define GL_TILE_CHECKBOX "elm.swallow.end"
47 #define GL_TILE_CHECKBOX_GRID "elm.swallow.check_grid"
48 #define GL_TILE_RENAME "elm.swallow.rename"
49
50 #define GL_GENGRID_STYLE_ALBUM_VIEW  "gallery/albums_view"
51 #define GL_GENGRID_STYLE_ALBUM_VIEW_BLUE  "gallery/albums_view_blue"
52
53 /* Size of album icon */
54 #define GL_TILE_SIZE 318
55 /* Size of table padding */
56 #define GL_TILE_PAD 3
57 #define GL_TILE_PAD_2 2
58 /* Pure size of album icon; value: 196 */
59 #define GL_TILER_ICON_S (GL_TILE_SIZE - 2 * GL_TILE_PAD)
60 /**
61 * Album icon is set by elm_table,
62 * it's divided into 3x3, 9 grids, each grid size is 64
63 */
64 #define GL_TILE_GRID_S 102
65 /* value: 130 */
66 #define GL_TILE_2X_GRID_S (GL_TILER_ICON_S - GL_TILE_GRID_S - GL_TILE_PAD)
67
68 typedef gl_icon_type (*bg_file_set_cb) (Evas_Object *bg, void *data);
69
70 Evas_Object *_gl_tile_show_part_icon(Evas_Object *obj, const char *part,
71                                      int length, double scale,
72                                      bg_file_set_cb func, void **data);
73 Evas_Object *_gl_tile_show_part_label(Evas_Object *obj, int index,
74                                       bool b_default);
75 Evas_Object *_gl_tile_show_part_checkbox_grid(Evas_Object *obj, bool checked,
76                                               Evas_Smart_Cb func,
77                                               const void *data);
78 Evas_Object *_gl_tile_show_part_checkbox(Evas_Object *obj, bool checked,
79                                          Evas_Smart_Cb func, const void *data);
80 Evas_Object *_gl_tile_show_part_rename(Evas_Object *obj, Evas_Smart_Cb func,
81                                        const void *data);
82 int _gl_tile_get_mtime(time_t *mtime1, time_t *mtime2, char *buf, int max_len);
83 Evas_Object *_gl_tile_add_gengrid(void *data, Evas_Object *parent);
84
85
86 #endif