1 #ifndef __DALI_ANDROID_CALLBACK_MANAGER_H__
2 #define __DALI_ANDROID_CALLBACK_MANAGER_H__
5 * Copyright (c) 2019 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>
40 * Ecore interface to install call backs in the applications main loop.
42 class AndroidCallbackManager : public CallbackManager
50 AndroidCallbackManager();
55 ~AndroidCallbackManager() = default;
58 * @copydoc CallbackManager::AddIdleCallback()
60 virtual bool AddIdleCallback( CallbackBase* callback, bool hasReturnValue );
63 * @copydoc CallbackManager::RemoveIdleCallback()
65 virtual void RemoveIdleCallback( CallbackBase* callback );
68 * @copydoc CallbackManager::ProcessIdle()
70 virtual bool ProcessIdle();
73 * @copydoc CallbackManager::ProcessIdle()
75 virtual void ClearIdleCallbacks();
78 * @copydoc CallbackManager::AddIdleEntererCallback()
80 virtual bool AddIdleEntererCallback( CallbackBase* callback );
83 * @copydoc CallbackManager::RemoveIdleEntererCallback()
85 virtual void RemoveIdleEntererCallback( CallbackBase* callback );
88 * @copydoc CallbackManager::Start()
93 * @copydoc CallbackManager::Stop()
100 * @brief Remove all idle call backs that are pending
102 * Always called from the main thread
104 void RemoveAllCallbacks();
107 * @brief Removes a single call back from the container
108 * Always called from main thread
109 * @param callbackData callback data
111 void RemoveCallbackFromContainer(CallbackData *callbackData);
114 * @brief Remove a standard call back from ecore
115 * Always called from main thread
116 * @param callbackData callback data
118 void RemoveStandardCallback(CallbackData *callbackData);
121 typedef std::list<CallbackData *> CallbackList;
123 bool mRunning; ///< flag is set to true if when running
124 CallbackList mCallbackContainer; ///< container of live idle callbacks
127 } // namespace Adaptor
129 } // namespace Internal
133 #endif // __DALI_ANDROID_CALLBACK_MANAGER_H__