2 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
18 #include <dali/internal/adaptor/windows/framework-win.h>
\r
20 // EXTERNAL INCLUDES
\r
21 #include <dali/integration-api/debug.h>
\r
22 #include <windows.h>
\r
24 // INTERNAL INCLUDES
\r
25 #include <dali/internal/system/common/callback-manager.h>
\r
26 #include <dali/internal/window-system/windows/platform-implement-win.h>
\r
35 * Impl to hide WindowsSystem data members
\r
37 struct FrameworkWin::Impl
\r
52 while(GetMessage(&nMsg, 0, NULL, NULL))
\r
54 if(WIN_CALLBACK_EVENT == nMsg.message)
\r
56 Dali::CallbackBase* callback = (Dali::CallbackBase*)nMsg.wParam;
\r
57 Dali::CallbackBase::Execute(*callback);
\r
60 TranslateMessage(&nMsg);
\r
61 DispatchMessage(&nMsg);
\r
63 if(WM_CLOSE == nMsg.message)
\r
72 Impl(const Impl& impl) = delete;
\r
75 Impl& operator=(const Impl& impl) = delete;
\r
78 FrameworkWin::FrameworkWin(Framework::Observer& observer, Framework::TaskObserver& taskObserver, int* argc, char*** argv, Type type, bool useUiThread)
\r
79 : Framework(observer, taskObserver, argc, argv, type, useUiThread),
\r
82 mImpl = new Impl(this);
\r
85 FrameworkWin::~FrameworkWin()
\r
95 void FrameworkWin::Run()
\r
104 void FrameworkWin::Quit()
\r
106 mObserver.OnTerminate();
\r
110 * Impl for Pre-Initailized using UI Thread.
\r
112 struct UIThreadLoader::Impl
\r
124 * Runs the main loop of framework
\r
126 void Run(Runner runner)
\r
132 Impl(const Impl& impl);
\r
133 Impl& operator=(const Impl& impl);
\r
137 * UI Thread loader to support Pre-Initailized using UI Thread.
\r
139 UIThreadLoader::UIThreadLoader(int* argc, char*** argv)
\r
146 UIThreadLoader::~UIThreadLoader()
\r
150 void UIThreadLoader::Run(Runner runner)
\r
154 } // namespace Adaptor
\r
156 } // namespace Internal
\r
158 } // namespace Dali
\r