1 #ifndef DALI_WIN_CALLBACK_MANAGER_H
2 #define DALI_WIN_CALLBACK_MANAGER_H
5 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include <dali/internal/system/common/callback-manager.h>
37 * @brief LibUV callback manager used to install call backs in the applications main loop.
38 * The manager keeps track of all callbacks, so that if Stop() is called it can remove them.
40 class WinCallbackManager : public CallbackManager
53 ~WinCallbackManager(){}
56 * @copydoc CallbackManager::AddIdleCallback()
58 virtual bool AddIdleCallback( CallbackBase* callback, bool hasReturnValue );
61 * @copydoc CallbackManager::RemoveIdleCallback()
63 virtual void RemoveIdleCallback( CallbackBase* callback );
66 * @brief Adds a @p callback to be run when entering an idle state.
67 * @note Must be called from the main thread only.
69 * A callback of the following type should be used:
73 * This callback will be called repeatedly as long as it returns true. A return of 0 deletes this callback.
75 * @param[in] callback custom callback function.
77 * @return true on success
79 virtual bool AddIdleEntererCallback( CallbackBase* callback );
82 * @brief Removes a previously added the idle enterer callback.
83 * @note Must be called from main thread only.
85 * Does nothing if the @p callback doesn't exist.
87 * @param[in] callback The callback to be removed.
89 virtual void RemoveIdleEntererCallback( CallbackBase* callback );
92 * @copydoc CallbackManager::Start()
97 * @copydoc CallbackManager::Stop()
102 bool mRunning; ///< flag is set to true if when running
105 } // namespace Adaptor
107 } // namespace Internal
111 #endif // __DALI_UV_CALLBACK_MANAGER_H__