4ac1e6ff7b982b3637943b36b9696ef67ce7e6cd
[platform/core/appfw/app-core.git] / src / appcore-group.c
1 #include <Elementary.h>
2 #include <stdio.h>
3 #include <glib.h>
4 #include <aul.h>
5 #include <pkgmgr-info.h>
6 #include <bundle_internal.h>
7
8 #include "appcore-internal.h"
9
10 void appcore_group_attach()
11 {
12         _DBG("appcore_group_attach");
13         static bool attached = false;
14
15         if (attached)
16                 return;
17
18         int wid = appcore_get_main_surface();
19         if (wid == 0) {
20                 _ERR("window wasn't ready");
21                 return;
22         }
23
24         aul_app_group_set_window(wid);
25         attached = true;
26 }
27
28 void appcore_group_lower()
29 {
30         _DBG("appcore_group_lower");
31         int exit = 0;
32
33         aul_app_group_lower(&exit);
34         if (exit) {
35                 _DBG("appcore_group_lower : sub-app!");
36                 elm_exit();
37         }
38 }