2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef TIZEN_CPP_APP_CORE_UI_CPP_APP_CORE_UI_BASE_HH_
18 #define TIZEN_CPP_APP_CORE_UI_CPP_APP_CORE_UI_BASE_HH_
22 #include <app_core_base.hh>
23 #include <interface_app_core_ui.hh>
24 #include <interface_window.hh>
27 #define EXPORT_API __attribute__((visibility("default")))
31 class EXPORT_API AppCoreUiBase : public AppCoreBase,
35 constexpr static int HINT_WINDOW_GROUP_CONTROL = 0x1;
36 constexpr static int HINT_WINDOW_STACK_CONTROL = 0x2;
37 constexpr static int HINT_BG_LAUNCH_CONTROL = 0x4;
38 constexpr static int HINT_HW_ACC_CONTROL = 0x8;
39 constexpr static int HINT_WINDOW_AUTO_CONTROL = 0x10;
40 constexpr static int HINT_LEGACY_CONTROL = 0x20;
41 constexpr static int HINT_WINDOW_ID_CONTROL = 0x40;
43 AppCoreUiBase(unsigned int hint);
44 virtual ~AppCoreUiBase();
46 int OnPause() override;
47 int OnResume() override;
48 int OnReceive(aul_type type, tizen_base::Bundle b) override;
49 int OnCreate() override;
50 int OnTerminate() override;
51 int OnTrimMemory() override;
52 void OnShow(int type, void* event) override;
53 void OnHide(int type, void* event) override;
54 void OnLower(int type, void* event) override;
55 void OnVisibility(int type, void* event) override;
56 void OnPreVisibility(int type, void* event) override;
57 void OnAuxMessage(int type, void* event) override;
63 unsigned int GetMainWindow();
64 unsigned int GetMainSurface();
67 void SetBgState(bool bg_state);
68 void SetSystemResourceReclaiming(bool enable);
69 void Run(int argc, char** argv) override;
70 void Dispose() override;
73 void SetCoreUiDelegator(IAppCoreUi* delegator);
74 void SetWindowDelegator(IWindow* delegator);
78 std::unique_ptr<Impl> impl_;
81 } // namespace tizen_cpp
83 #endif // TIZEN_CPP_APP_CORE_UI_CPP_APP_CORE_UI_BASE_HH_