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 bool AddIdleCallback( CallbackBase* callback, bool hasReturnValue ) override;
63 * @copydoc CallbackManager::RemoveIdleCallback()
65 void RemoveIdleCallback( CallbackBase* callback ) override;
68 * @copydoc CallbackManager::ProcessIdle()
70 bool ProcessIdle() override;
73 * @copydoc CallbackManager::ProcessIdle()
75 void ClearIdleCallbacks() override;
78 * @copydoc CallbackManager::AddIdleEntererCallback()
80 bool AddIdleEntererCallback( CallbackBase* callback ) override;
83 * @copydoc CallbackManager::RemoveIdleEntererCallback()
85 void RemoveIdleEntererCallback( CallbackBase* callback ) override;
88 * @copydoc CallbackManager::Start()
90 void Start() override;
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__