2 * Copyright (c) 2018 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
19 #include <dali/internal/system/windows/callback-manager-win.h>
\r
21 // EXTERNAL INCLUDES
\r
23 #include <dali/integration-api/debug.h>
\r
24 #include <Win32WindowSystem.h>
\r
26 // INTERNAL INCLUDES
\r
27 #include <Windows.h>
\r
38 WinCallbackManager::WinCallbackManager()
\r
43 void WinCallbackManager::Start()
\r
45 DALI_ASSERT_DEBUG( mRunning == false );
\r
49 void WinCallbackManager::Stop()
\r
51 // make sure we're not called twice
\r
52 DALI_ASSERT_DEBUG( mRunning == true );
\r
57 #define WIN_CALLBACK_EVENT 9999
\r
59 bool WinCallbackManager::AddIdleCallback( CallbackBase* callback )
\r
66 Win32WindowSystem::AddListener( WIN_CALLBACK_EVENT, callback );
\r
67 Win32WindowSystem::PostWinMessage( WIN_CALLBACK_EVENT, (long)callback, 0 );
\r
71 void WinCallbackManager::RemoveIdleCallback( CallbackBase* callback )
\r
76 // Creates a concrete interface for CallbackManager
\r
77 CallbackManager* CallbackManager::New()
\r
79 return new WinCallbackManager;
\r
82 } // namespace Adaptor
\r
84 } // namespace Internal
\r