4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
24 #ifndef __APPCORE_INTERNAL_H__
25 #define __APPCORE_INTERNAL_H__
27 #define LOG_TAG "APP_CORE"
31 #include "appcore-common.h"
35 # define EXPORT_API __attribute__ ((visibility("default")))
39 # define _ERR(fmt, arg...) \
40 do { fprintf(stderr, "appcore: "fmt"\n", ##arg); } while (0)
42 # define _INFO(fmt, arg...) \
43 do { fprintf(stdout, fmt"\n", ##arg); } while (0)
45 # define _DBG(fmt, arg...) \
47 if (getenv("APPCORE_DEBUG")) { \
48 fprintf(stdout, fmt"\n", ##arg); \
52 # define _ERR(fmt, arg...) \
54 fprintf(stderr, "appcore: "fmt"\n", ##arg); \
57 # define _INFO(...) LOGI(__VA_ARGS__)
58 # define _DBG(...) LOGD(__VA_ARGS__)
61 #define _warn_if(expr, fmt, arg...) do { \
67 #define _ret_if(expr) do { \
73 #define _retv_if(expr, val) do { \
79 #define _retm_if(expr, fmt, arg...) do { \
86 #define _retvm_if(expr, val, fmt, arg...) do { \
94 * Appcore internal state
105 * Appcore internal event
120 * Appcore internal system event
132 * Appcore system event operation
135 int (*func) (void *);
140 * Appcore internal structure
145 const struct ui_ops *ops;
146 struct sys_op sops[SE_MAX];
150 * Appcore UI operation
154 void (*cb_app) (enum app_event evnt, void *data, bundle *b);
158 extern void update_lang(void);
159 extern int set_i18n(const char *domainname, const char *dirname);
160 void update_region(void);
164 extern int x_raise_win(pid_t pid);
167 /* extern void stack_trim(void);*/
169 int appcore_pause_rotation_cb(void);
170 int appcore_resume_rotation_cb(void);
173 #define ENV_START "APP_START_TIME"
175 #define MEMORY_FLUSH_ACTIVATE
177 #endif /* __APPCORE_INTERNAL_H__ */