Fix bug about the update requested event
[platform/core/api/application.git] / src / app_resource.c
1 /*
2  * Copyright (c) 2011 - 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 #include <appcore-common.h>
19 #include <appcore-efl.h>
20 #include <aul.h>
21 #include <Elementary.h>
22
23 #include "app_extension.h"
24
25 #ifdef LOG_TAG
26 #undef LOG_TAG
27 #endif
28
29 #define LOG_TAG "CAPI_APPFW_APPLICATION"
30
31 void *app_get_preinitialized_window(const char *win_name)
32 {
33         void *win;
34
35         win = elm_win_precreated_object_get();
36         if (win == NULL)
37                 return NULL;
38
39         appcore_set_preinit_window_name(win_name);
40         elm_win_precreated_object_set(NULL);
41
42         return win;
43 }
44
45 void *app_get_preinitialized_background(void)
46 {
47         void *background;
48
49         background = elm_bg_precreated_object_get();
50         if (background == NULL)
51                 return NULL;
52
53         elm_bg_precreated_object_set(NULL);
54
55         return background;
56 }
57
58 void *app_get_preinitialized_conformant(void)
59 {
60         void *conformant;
61
62         conformant = elm_conformant_precreated_object_get();
63         if (conformant == NULL)
64                 return NULL;
65
66         elm_conformant_precreated_object_set(NULL);
67
68         return conformant;
69 }
70