Clean up files.
[apps/core/preloaded/image-viewer.git] / include / image-viewer.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (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 #include <Elementary.h>
18 #include <dlog.h>
19
20 #undef LOG_TAG
21 #define LOG_TAG "IV-APP"
22
23 #define IV_MSG_FATAL(fmt, arg...)       \
24         do { \
25                 LOGE("[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg); \
26         } while(0)
27
28 #define IV_MSG_ERROR(fmt, arg...)       LOGE("[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
29 #define IV_MSG_HIGH(fmt, arg...)        LOGE("[%s : %05d]" fmt "\n", __func__, __LINE__, ##arg)
30
31 #define IV_ASSERT(expr) \
32         do { \
33                 if( !(expr) )                                   \
34                 {                                                       \
35                         IV_MSG_FATAL("[%s] ASSERT : " #expr , __func__ );       \
36                 } \
37         } while(0)
38
39
40
41 #define iv_ret_if(expr) do { \
42                 if(expr) { \
43                         fprintf(stderr, "(%s) -> %s:%d() return\n", #expr, __func__, __LINE__); \
44                         return; \
45                 } \
46         } while (0)
47
48 #define iv_retv_if(expr, val) do { \
49                 if(expr) { \
50                         fprintf(stderr, "(%s) -> %s():%d return\n", #expr, __func__, __LINE__); \
51                         return (val); \
52                 } \
53         } while (0)
54
55 /*
56
57         win_main : elm_win
58             |--> conformant : elm_conformant
59                 |--> lyBase
60                 |--> lyClient : evas object which is created by ug client.
61 */
62 typedef struct {
63         int win_w;
64         int win_h;
65
66         Evas *evas;
67
68         Evas_Object *win_main;
69
70         Evas_Object *conformant;
71
72         Evas_Object *black_obj;
73
74         Evas_Object *lyBase;
75
76         Evas_Object *lyClient;
77
78         ui_gadget_h iv_ug;
79
80         const char* iv_param_path;
81
82         service_h service_handle;
83
84 } appdata_iv;
85