Merge "Changing the return value description of IsBitSet(), IsProbablePrimeNumber...
[platform/framework/native/appfw.git] / src / app / FApp_ActiveWindowManager.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        FApp_ActiveWindowManager.h
19  * @brief       This is the header file of the %_ActiveWindowManager class.
20  *
21  * This header file contains the declarations of the %_ActiveWindowManager class.
22  */
23
24 #ifndef _FAPP_INTERNAL_ACTIVE_WINDOW_MANAGER_H_
25 #define _FAPP_INTERNAL_ACTIVE_WINDOW_MANAGER_H_
26
27 #include <FOspConfig.h>
28 #include <FBaseColLinkedListT.h>
29
30 #include <Ecore.h>
31
32
33 namespace Tizen { namespace Base
34 {
35         class String;
36         namespace Runtime
37         {
38                 class _LibraryImpl;
39         }
40 }}
41
42 namespace Tizen { namespace App
43 {
44
45 class _IActiveAppEventListener;
46
47 /**
48  * @class        _ActiveWindowManager
49  * @brief
50  */
51 class _OSP_LOCAL_ _ActiveWindowManager
52 {
53 public:
54         _ActiveWindowManager(void);
55
56         ~_ActiveWindowManager(void);
57
58         result AddActiveAppEventListener(IActiveAppEventListener& listener);
59
60         result RemoveActiveAppEventListener(IActiveAppEventListener& listener);
61
62         result GetActiveApp(AppId& appId);
63
64 private:
65         Tizen::Base::Runtime::_LibraryImpl& GetEcoreXLibraryImpl(void);
66
67         Tizen::Base::Runtime::_LibraryImpl& GetEcoreLibraryImpl(void);
68
69         Tizen::Base::Runtime::_LibraryImpl& GetX11LibraryImpl(void);
70
71         static Eina_Bool OnPropertyChanged(void* pData, int type, void* pEvent);
72
73         void FireActiveAppEvent(unsigned int xid, int pid, const char* pAppName);
74
75         unsigned int GetActiveWindow(void);
76
77         int GetProcessId(unsigned int window);
78
79         /**
80          * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
81          */
82         _ActiveWindowManager(const _ActiveWindowManager& rhs);
83
84         /**
85          * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
86          */
87         _ActiveWindowManager& operator=(const _ActiveWindowManager& rhs);
88
89 private:
90         Tizen::Base::Runtime::_LibraryImpl* __pX11Library;
91         Tizen::Base::Runtime::_LibraryImpl* __pEcoreXLibrary;
92         Tizen::Base::Runtime::_LibraryImpl* __pEcoreLibrary;
93
94         Tizen::Base::Collection::LinkedListT<IActiveAppEventListener*> __activeAppEventListenerList;
95 };
96
97 }} // Tizen::App
98
99 #endif //_FAPP_INTERNAL_ACTIVE_WINDOW_MANAGER_H_
100