1 #ifndef DALI_ECORE_CALLBACK_MANAGER_H
2 #define DALI_ECORE_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 EcoreCallbackManager : public CallbackManager
50 EcoreCallbackManager();
55 ~EcoreCallbackManager()
60 * @copydoc CallbackManager::AddIdleCallback()
62 bool AddIdleCallback( CallbackBase* callback, bool hasReturnValue ) override;
65 * @copydoc CallbackManager::RemoveIdleCallback()
67 void RemoveIdleCallback( CallbackBase* callback ) override;
70 * @copydoc CallbackManager::ProcessIdle()
72 bool ProcessIdle() override;
75 * @copydoc CallbackManager::ProcessIdle()
77 void ClearIdleCallbacks() override;
80 * @copydoc CallbackManager::AddIdleEntererCallback()
82 bool AddIdleEntererCallback( CallbackBase* callback ) override;
85 * @copydoc CallbackManager::RemoveIdleEntererCallback()
87 void RemoveIdleEntererCallback( CallbackBase* callback ) override;
90 * @copydoc CallbackManager::Start()
92 void Start() override;
95 * @copydoc CallbackManager::Stop()
102 * @brief Remove all idle call backs that are pending
104 * Always called from the main thread
106 void RemoveAllCallbacks();
109 * @brief Removes a single call back from the container
110 * Always called from main thread
111 * @param callbackData callback data
113 void RemoveCallbackFromContainer(CallbackData *callbackData);
116 * @brief Remove a standard call back from ecore
117 * Always called from main thread
118 * @param callbackData callback data
120 void RemoveStandardCallback(CallbackData *callbackData);
123 typedef std::list<CallbackData *> CallbackList;
125 bool mRunning; ///< flag is set to true if when running
126 CallbackList mCallbackContainer; ///< container of live idle callbacks
129 } // namespace Adaptor
131 } // namespace Internal
135 #endif // DALI_ECORE_CALLBACK_MANAGER_H