Change return value type of the appcore_ui_base_group_add function
[platform/core/appfw/app-core.git] / include / appcore_ui_base.h
1 /*
2  * Copyright (c) 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 #pragma once
18
19 #include <libintl.h>
20 #include <bundle.h>
21 #include <aul.h>
22 #include <appcore_base.h>
23
24 typedef struct _appcore_ui_base_window_ops {
25         void (*show)(int type, void *event, void *data);
26         void (*hide)(int type, void *event, void *data);
27         void (*lower)(int type, void *event, void *data);
28         void (*visibility)(int type, void *event, void *data);
29         void (*pre_visibility)(int type, void *event, void *data);
30         void (*aux_message)(int type, void *event, void *data);
31 } appcore_ui_base_window_ops;
32
33 typedef struct _appcore_ui_base_ops {
34         int (*pause) (void *data);
35         int (*resume) (void *data);
36         appcore_base_ops base;
37         appcore_ui_base_window_ops window;
38 } appcore_ui_base_ops;
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 enum appcore_ui_base_hint {
45         APPCORE_UI_BASE_HINT_WINDOW_GROUP_CONTROL = 0x1,
46         APPCORE_UI_BASE_HINT_WINDOW_STACK_CONTROL = 0x2,
47         APPCORE_UI_BASE_HINT_BG_LAUNCH_CONTROL = 0x4,
48         APPCORE_UI_BASE_HINT_HW_ACC_CONTROL = 0x8,
49         APPCORE_UI_BASE_HINT_WINDOW_AUTO_CONTROL = 0x10,
50         APPCORE_UI_BASE_HINT_LEGACY_CONTROL = 0x20,
51 };
52
53 int appcore_ui_base_on_receive(aul_type type, bundle *b);
54 int appcore_ui_base_on_create(void);
55 int appcore_ui_base_on_terminate(void);
56 int appcore_ui_base_on_pause(void);
57 int appcore_ui_base_on_resume(void);
58 int appcore_ui_base_on_control(bundle *b);
59 int appcore_ui_base_on_trim_memory(void);
60 void appcore_ui_base_window_on_show(int type, void *event);
61 void appcore_ui_base_window_on_hide(int type, void *event);
62 void appcore_ui_base_window_on_lower(int type, void *event);
63 void appcore_ui_base_window_on_visibility(int type, void *event);
64 void appcore_ui_base_window_on_pre_visibility(int type, void *event);
65 void appcore_ui_base_window_on_aux_message(int type, void *event);
66 int appcore_ui_base_init(appcore_ui_base_ops ops, int argc, char **argv,
67                 void *data, unsigned int hint);
68 void appcore_ui_base_fini(void);
69 appcore_ui_base_ops appcore_ui_base_get_default_ops(void);
70 void appcore_ui_base_pause(void);
71 void appcore_ui_base_resume(void);
72 bool appcore_ui_base_is_resumed(void);
73 void appcore_ui_base_exit(void);
74 int appcore_ui_base_group_add();
75 void appcore_ui_base_group_remove();
76 unsigned int appcore_ui_base_get_main_window(void);
77 unsigned int appcore_ui_base_get_main_surface(void);
78 int appcore_ui_base_get_hint(void);
79 bool appcore_ui_base_get_bg_state(void);
80 void appcore_ui_base_set_bg_state(bool bg_state);
81 void appcore_ui_base_set_system_resource_reclaiming(bool enable);
82
83 #ifdef __cplusplus
84 }
85 #endif
86
87