Release version 1.13.4
[platform/core/appfw/app-core.git] / include / appcore-internal.h
old mode 100755 (executable)
new mode 100644 (file)
index 038e2dc..87063ee
@@ -27,6 +27,7 @@
 #define LOG_TAG "APP_CORE"
 
 #include <stdio.h>
+#include <stdbool.h>
 #include <dlog.h>
 #include "appcore-common.h"
 
 #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 { \
@@ -108,11 +101,15 @@ enum app_event {
        AE_UNKNOWN,
        AE_CREATE,
        AE_TERMINATE,
+       AE_TERMINATE_BGAPP,
        AE_PAUSE,
        AE_RESUME,
+       AE_RAISE,
+       AE_LOWER,
        AE_RESET,
        AE_LOWMEM_POST,
        AE_MEM_FLUSH,
+       AE_UPDATE_REQUESTED,
        AE_MAX
 };
 
@@ -125,6 +122,8 @@ enum sys_event {
        SE_LOWBAT,
        SE_LANGCHG,
        SE_REGIONCHG,
+       SE_SUSPENDED_STATE,
+       SE_UPDATE_REQUESTED,
        SE_MAX
 };
 
@@ -132,7 +131,7 @@ enum sys_event {
  * Appcore system event operation
  */
 struct sys_op {
-       int (*func) (void *);
+       int (*func) (void *, void *);
        void *data;
 };
 
@@ -141,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];
@@ -154,32 +156,18 @@ struct ui_ops {
        void (*cb_app) (enum app_event evnt, void *data, bundle *b);
 };
 
-/* appcore-i18n.c */
-extern void update_lang(void);
-extern int set_i18n(const char *domainname, const char *dirname);
-void update_region(void);
-
-
-/* appcore-X.c */
-extern int x_raise_win(pid_t pid);
-
-/* appcore-util.c */
-/* extern void stack_trim(void);*/
-
-int appcore_pause_rotation_cb(void);
-int appcore_resume_rotation_cb(void);
-
 struct ui_wm_rotate {
-   int (*set_rotation_cb) (int (*cb) (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);
+unsigned int appcore_get_main_surface(void);
 
 #define ENV_START "APP_START_TIME"
 
-#define MEMORY_FLUSH_ACTIVATE
-
 #endif                         /* __APPCORE_INTERNAL_H__ */