be754e9b44339ec0a3e5d73856c3deeb16fab3a8
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / ubuntu / framework-factory-ubuntu.cpp
1 /*
2  * Copyright (c) 2023 Samsung Electronics Co., Ltd.
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 // CLASS HEADER
19 #include <dali/internal/adaptor/ubuntu/framework-factory-ubuntu.h>
20
21 // INTERNAL HEADERS
22 #include <dali/internal/adaptor/ubuntu/framework-ubuntu.h>
23 #include <dali/internal/window-system/common/display-utils.h>
24
25 namespace Dali
26 {
27 namespace Internal
28 {
29 namespace Adaptor
30 {
31 FrameworkFactory* gFrameworkFactory = nullptr;
32
33 FrameworkFactoryUbuntu::FrameworkFactoryUbuntu()
34 {
35   gFrameworkFactory = this;
36 }
37
38 FrameworkFactoryUbuntu::~FrameworkFactoryUbuntu()
39 {
40   gFrameworkFactory = nullptr;
41 }
42
43 std::unique_ptr<Framework> FrameworkFactoryUbuntu::CreateFramework(FrameworkBackend backend, Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Framework::Type type, bool useUiThread)
44 {
45   return Utils::MakeUnique<FrameworkUbuntu>(observer, taskObserver, argc, argv, type, useUiThread);
46 }
47
48 FrameworkFactory* CreateFrameworkFactory()
49 {
50   return (new FrameworkFactoryUbuntu());
51 }
52
53 FrameworkFactory* GetFrameworkFactory()
54 {
55   return gFrameworkFactory;
56 }
57
58 } // namespace Adaptor
59 } // namespace Internal
60 } // namespace Dali