57c738b7661abec1da54a021e63c3feb7ffcdac4
[platform/core/uifw/dali-adaptor.git] / dali / internal / system / windows / callback-manager-win.h
1 #ifndef DALI_WIN_CALLBACK_MANAGER_H
2 #define DALI_WIN_CALLBACK_MANAGER_H
3
4 /*
5  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <list>
23
24 // INTERNAL INCLUDES
25 #include <dali/internal/system/common/callback-manager.h>
26
27
28 namespace Dali
29 {
30
31 namespace Internal
32 {
33
34 namespace Adaptor
35 {
36 /**
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.
39  */
40 class WinCallbackManager : public CallbackManager
41 {
42
43 public:
44
45      /**
46      * @brief constructor
47      */
48     WinCallbackManager();
49
50     /**
51      * @brief destructor
52      */
53     ~WinCallbackManager(){}
54
55     /**
56      * @copydoc CallbackManager::AddIdleCallback()
57      */
58     virtual bool AddIdleCallback( CallbackBase* callback, bool hasReturnValue );
59
60     /**
61      * @copydoc CallbackManager::RemoveIdleCallback()
62      */
63     virtual void RemoveIdleCallback( CallbackBase* callback );
64
65     /**
66      * @copydoc CallbackManager::AddIdleEntererCallback()
67      */
68     virtual bool AddIdleEntererCallback(CallbackBase* callback);
69
70     /**
71      * @copydoc CallbackManager::RemoveIdleEntererCallback()
72      */
73     virtual void RemoveIdleEntererCallback(CallbackBase* callback);
74
75     /**
76      * @copydoc CallbackManager::Start()
77      */
78     virtual void Start();
79
80     /**
81      * @copydoc CallbackManager::Stop()
82      */
83     virtual void Stop();
84
85 private:
86     bool                           mRunning;            ///< flag is set to true if when running
87 };
88
89 } // namespace Adaptor
90
91 } // namespace Internal
92
93 } // namespace Dali
94
95 #endif // __DALI_UV_CALLBACK_MANAGER_H__