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