2 * Copyright 2012 Samsung Electronics Co., Ltd
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
8 * http://floralicense.org/license/
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.
17 #ifndef __QP_COMMON_H_
18 #define __QP_COMMON_H_
23 #include <Elementary.h>
24 #include "quickpanel_debug_util.h"
30 #define LOG_TAG "QUICKPANEL"
33 #define HAPI __attribute__((visibility("hidden")))
35 #define DBG(fmt , args...) \
37 LOGD("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
40 #define INFO(fmt , args...) \
42 LOGI("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
45 #define WARN(fmt , args...) \
47 LOGI("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
50 #define ERR(fmt , args...) \
52 LOGE("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
55 #elif FILE_DEBUG /*_DLOG_USED*/
56 #define DBG(fmt , args...) \
58 debug_printf("[D]%s : %d] "fmt"\n", \
59 __func__, __LINE__, ##args); \
62 #define INFO(fmt , args...) \
64 debug_printf("[I][%s : %d] "fmt"\n",\
65 __func__, __LINE__, ##args); \
68 #define WARN(fmt , args...) \
70 debug_printf("[W][%s : %d] "fmt"\n", \
71 __func__, __LINE__, ##args); \
74 #define ERR(fmt , args...) \
76 debug_printf("[E][%s : %d] "fmt"\n", \
77 __func__, __LINE__, ##args); \
81 #define DBG(fmt , args...) \
83 fprintf("[D][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
86 #define INFO(fmt , args...) \
88 fprintf("[I][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
91 #define WARN(fmt , args...) \
93 fprintf("[W][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
96 #define ERR(fmt , args...) \
98 fprintf("[E][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
100 #endif /*_DLOG_USED*/
102 #define msgif(cond, str, args...) do { \
108 #define retif(cond, ret, str, args...) do { \
115 #define gotoif(cond, target, str, args...) do { \
123 void quickpanel_util_char_replace(char *text, char s, char t);
124 void quickpanel_ui_set_current_popup(Evas_Object *popup);
125 void quickpanel_ui_del_current_popup(void);
127 #endif /* __QP_COMMON_H_ */