X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fappcore-internal.h;h=c1f9bb304173ca7a23e6371270404811841e707f;hb=2da4a9722e69f7bc3319a70c4f0f175100bfb79b;hp=c898e56748d646b64f17228bbd77eb6af39d4212;hpb=52f74fd0748b8ea6f913fa5399d4fea0461b6c85;p=platform%2Fcore%2Fappfw%2Fapp-core.git diff --git a/include/appcore-internal.h b/include/appcore-internal.h old mode 100755 new mode 100644 index c898e56..c1f9bb3 --- a/include/appcore-internal.h +++ b/include/appcore-internal.h @@ -27,6 +27,7 @@ #define LOG_TAG "APP_CORE" #include +#include #include #include "appcore-common.h" @@ -36,26 +37,18 @@ #endif #ifndef _DLOG_H_ -# define _ERR(fmt, arg...) \ - do { fprintf(stderr, "appcore: "fmt"\n", ##arg); } while (0) - -# define _INFO(fmt, arg...) \ - do { fprintf(stdout, fmt"\n", ##arg); } while (0) - -# define _DBG(fmt, arg...) \ +#define _ERR(fmt, arg...) fprintf(stderr, "appcore: "fmt"\n", ##arg) +#define _INFO(fmt, arg...) fprintf(stdout, fmt"\n", ##arg) +#define _DBG(fmt, arg...) \ do { \ if (getenv("APPCORE_DEBUG")) { \ fprintf(stdout, fmt"\n", ##arg); \ } \ } while (0) #else -# define _ERR(fmt, arg...) \ - do { \ - fprintf(stderr, "appcore: "fmt"\n", ##arg); \ - LOGE(fmt, ##arg); \ - } while (0) -# define _INFO(...) LOGI(__VA_ARGS__) -# define _DBG(...) LOGD(__VA_ARGS__) +#define _ERR(fmt, arg...) LOGE(fmt, ##arg) +#define _INFO(...) LOGI(__VA_ARGS__) +#define _DBG(...) LOGD(__VA_ARGS__) #endif #define _warn_if(expr, fmt, arg...) do { \ @@ -116,6 +109,7 @@ enum app_event { AE_RESET, AE_LOWMEM_POST, AE_MEM_FLUSH, + AE_UPDATE_REQUESTED, AE_MAX }; @@ -128,6 +122,8 @@ enum sys_event { SE_LOWBAT, SE_LANGCHG, SE_REGIONCHG, + SE_SUSPENDED_STATE, + SE_UPDATE_REQUESTED, SE_MAX }; @@ -144,6 +140,9 @@ struct sys_op { */ struct appcore { int state; + unsigned int tid; + bool suspended_state; + bool allowed_bg; const struct ui_ops *ops; struct sys_op sops[SE_MAX]; @@ -174,16 +173,36 @@ int appcore_pause_rotation_cb(void); int appcore_resume_rotation_cb(void); struct ui_wm_rotate { - int (*set_rotation_cb) (int (*cb) (void *event_info, enum appcore_rm, void *), void *data); - int (*unset_rotation_cb) (void); - int (*get_rotation_state) (enum appcore_rm *curr); - int (*pause_rotation_cb) (void); - int (*resume_rotation_cb) (void); + int (*set_rotation_cb) (int (*cb)(void *event_info, enum appcore_rm, void *), void *data); + int (*unset_rotation_cb) (void); + int (*get_rotation_state) (enum appcore_rm *curr); + int (*pause_rotation_cb) (void); + int (*resume_rotation_cb) (void); }; int appcore_set_wm_rotation(struct ui_wm_rotate* wm_rotate); +void appcore_group_attach(); +void appcore_group_lower(); +unsigned int appcore_get_main_window(void); +#if defined(WAYLAND) +unsigned int appcore_get_main_surface(void); +#endif +void appcore_get_app_core(struct appcore **ac); + #define ENV_START "APP_START_TIME" #define MEMORY_FLUSH_ACTIVATE +typedef enum { + TIZEN_PROFILE_UNKNOWN = 0, + TIZEN_PROFILE_MOBILE = 0x1, + TIZEN_PROFILE_WEARABLE = 0x2, + TIZEN_PROFILE_TV = 0x4, + TIZEN_PROFILE_IVI = 0x8, + TIZEN_PROFILE_COMMON = 0x10, +} tizen_profile_t; +extern tizen_profile_t _get_tizen_profile(); + +#define _APPFW_FEATURE_BACKGROUND_MANAGEMENT (_get_tizen_profile() & (TIZEN_PROFILE_WEARABLE | TIZEN_PROFILE_MOBILE)) + #endif /* __APPCORE_INTERNAL_H__ */