Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUi_FocusManagerImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18  * @file                FUi_FocusManagerImpl.h
19  * @brief               This is the header file for the _FocusManagerImpl class.
20  *
21  * This header file contains the declarations of the _FocusManagerImpl class. @n.
22  */
23 #ifndef _FUI_INTERNAL_FOCUS_MANAGER_IMPL_H_
24 #define _FUI_INTERNAL_FOCUS_MANAGER_IMPL_H_
25
26 // Includes
27 #include <FBaseObject.h>
28
29 namespace Tizen { namespace Ui
30 {
31
32 class _ControlImpl;
33 class _WindowImpl;
34
35
36 /**
37  * @class       FocusManager
38  * @brief       This class manages the application's current focus owned by the UI control
39  *        and its ancestor Window.
40  * @since       2.0
41  *
42  * Use this class to query the application's current focus owner.
43  */
44 class  _FocusManagerImpl
45         : public Tizen::Base::Object
46 {
47 public:
48         /**
49          * Returns the pointer to the current focus manager.
50          *
51          * @since        2.0
52          * @return The current focus manager instance
53          */
54         static _FocusManagerImpl* GetInstance(void);
55
56
57         /**
58          * Gets the current focus owner.
59          *
60          * @since               2.0
61          * @return  The current focus owner
62          * @remarks The method returns the current focus owner of this application.
63          */
64         _ControlImpl* GetCurrentFocusOwner(void) const;
65
66
67         /**
68          * Gets the current focused Window.
69          *
70          * @since               2.0
71          * @return  The current focused Window
72          * @remarks The method returns the application's current focus owner's ancestor
73          *          Window or Window that is currently focused.
74          */
75         _WindowImpl* GetCurrentFocusedWindow(void) const;
76
77         static void Initialize(void);
78
79         static void ReleaseInstance(void);
80
81 private:
82         /**
83          * This is the default constructor for this class.
84          *
85          * @since       2.0
86          */
87         _FocusManagerImpl(void);
88
89
90         /**
91          * This is the destructor for this class.
92          *
93          * @since       2.0
94          */
95         virtual ~_FocusManagerImpl(void);
96
97         _FocusManagerImpl(_FocusManagerImpl& rhs);
98         _FocusManagerImpl& operator=(_FocusManagerImpl& rhs);
99
100         static void InitializeInstance(void);
101
102 private:
103         static _FocusManagerImpl* __pInstance;
104 }; // _FocusManagerImpl
105
106 }}//Tizen::Ui
107
108 #endif // _FUI_INTERNAL_FOCUS_MANAGER_IMPL_H_