Release version 1.3.0
[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 #ifdef X11
19         int wid = appcore_get_main_window();
20 #else
21         int wid = appcore_get_main_surface();
22 #endif
23         if (wid == 0) {
24                 _ERR("window wasn't ready");
25                 return;
26         }
27
28         aul_app_group_set_window(wid);
29         attached = true;
30 }
31
32 void appcore_group_lower()
33 {
34         _DBG("appcore_group_lower");
35         int exit = 0;
36
37         aul_app_group_lower(&exit);
38         if (exit) {
39                 _DBG("appcore_group_lower : sub-app!");
40                 elm_exit();
41         }
42 }