initial upload for tizen 2.0 beta
[apps/home/gallery.git] / include / util / gl-ui-util.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_UI_UTIL_H_
18 #define _GL_UI_UTIL_H_
19
20 #include "gallery.h"
21
22 #ifdef _cplusplus
23 extern "C"
24 {
25 #endif
26
27 #define _EDJ(o)         elm_layout_edje_get(o)
28 #define _GETICON(_path) \
29                 ((1 == ecore_file_exists(_path) && (ecore_file_size(_path) > 0)) ? _path : GL_DEFAULT_THUMB_ICON)
30
31
32 typedef enum
33 {
34         GL_NAVI_ALBUMS,
35         GL_NAVI_ALBUMS_EDIT,
36         GL_NAVI_ALBUMS_RENAME,
37         GL_NAVI_ALBUMS_NEW,
38         GL_NAVI_THUMBS,
39         GL_NAVI_THUMBS_EDIT,
40 } gl_navi_mode;
41
42 typedef enum
43 {
44         GL_POPUP_SHARE_MESSAGE,
45         GL_POPUP_SHARE_EMAIL,
46         GL_POPUP_SHARE_BT,
47 #ifdef _USE_WIFI
48         GL_POPUP_SHARE_WIFI,
49 #endif
50         GL_POPUP_SHARE_NUM,
51 } gl_popup_share_item;
52
53 #ifdef _USE_ROTATE_BG
54 typedef enum _gl_ui_more_state_t gl_ui_more_state_e;
55
56 enum _gl_ui_more_state_t {
57         GL_UI_MORE_STATE_OPEN,
58         GL_UI_MORE_STATE_CLOSE,
59 };
60 #endif
61
62 typedef struct _ctx_share_table
63 {
64         gl_popup_share_item item;
65         const char *label;
66 } gl_popup_share_tbl;
67
68 Evas_Object *gl_ui_create_navi_ly(Evas_Object * parent);
69 Evas_Object *_gl_ui_create_view_ly(Evas_Object *parent);
70 Evas_Object *gl_ui_create_main_ly(Evas_Object * parent);
71 int gl_ui_create_title_and_push(void *data, Evas_Object *parent,
72                                 Evas_Object *obj, gl_navi_mode mode, char *title);
73 Evas_Object *gl_ui_load_edj(Evas_Object * parent, const char *file, const char *group);
74 int _gl_ui_update_selall(void *data, int all_cnt, int selected_cnt);
75 int gl_ui_update_select_widgets(void *data);
76 int gl_ui_show_selall(void *data);
77 int gl_ui_rename_album(gl_cluster * album_item);
78 int _gl_ui_pop_to_thumb(void *data);
79 int gl_ui_move_to_newalbum(void *data);
80 int _gl_ui_disable_slideshow_btn(void *data, bool b_disable);
81 #ifdef _USE_ROTATE_BG
82 int _gl_ui_open_optionheader(void *data, int open);
83 int _gl_ui_disable_more_btn(void *data, bool b_disable);
84 #endif
85 Elm_Object_Item *_gl_ui_append_edit(void *data, Evas_Object *bot_bar);
86 int _gl_ui_hide_back_button(Elm_Object_Item *nf_it);
87 int gl_ui_edit_cancel(void *data);
88 int gl_ui_cancel_rename_album(void *data);
89 int gl_ui_cancel_new_album(void *data);
90 int _gl_ui_newalbum_done(void *data, bool b_enter);
91 int _gl_ui_rename_album_done(void *data, bool b_enter);
92
93 #ifdef _cplusplus
94 }
95 #endif
96
97 #endif // end of _GL_UI_UTIL_H_