initial upload for tizen 2.0 beta
[apps/home/gallery.git] / ug / ug-gallery-efl / include / ge-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 _GE_UI_UTIL_H_
18 #define _GE_UI_UTIL_H_
19
20 #include "gallery-efl.h"
21
22 #ifdef _cplusplus
23 extern "C" {
24 #endif
25
26 #define _EDJ(o)         elm_layout_edje_get(o)
27
28 #define _GETICON(_path) \
29                 ((1 == ecore_file_exists(_path) && (ecore_file_size(_path) > 0)) ? _path : GE_DEFAULT_THUMB_ICON)
30
31 typedef enum {
32         AlbumsView_Title,
33         ThumbnailView_Title,
34 }NaviTitleMode;
35
36 typedef enum {
37         GE_Popup_NoButton,
38         GE_Popup_OneButton,
39         GE_Popup_TwoButton,
40         GE_Popup_UgExit,
41 }GE_PopupMode;
42
43 int ge_ui_cancel_album_lock(ge_ugdata *ugd);
44 int ge_ui_set_album_lock(ge_cluster* album);
45 Evas_Object* ge_ui_create_navibar(ge_ugdata* ugd, Evas_Object* parent);
46 Evas_Object* ge_ui_create_main_ly(ge_ugdata* ugd, Evas_Object* parent);
47 int ge_ui_create_title_and_push(ge_ugdata *ugd, Evas_Object* parent,
48                                 Evas_Object* obj, NaviTitleMode mode,
49                                 char* title);
50 void ge_ui_set_rotate_angle(int rotate_mode);
51 Evas_Object* ge_ui_load_edj(Evas_Object *parent, const char *file, const char *group);
52 Evas_Object* ge_ui_create_nocontents(ge_ugdata* ugd);
53 int ge_ui_lock_albums(ge_cluster* album_item);
54 Evas_Object* ge_ui_create_popup(ge_ugdata* ugd, GE_PopupMode mode, char* desc);
55 int ge_ui_create_selinfo(ge_ugdata* ugd, Evas_Object* parent);
56 int ge_ui_destroy_selinfo(ge_ugdata* ugd);
57 int ge_ui_rotate_selinfo(ge_ugdata* ugd);
58
59
60 #ifdef _cplusplus
61 }
62 #endif
63
64 #endif // end of _GE_UI_UTIL_H_