Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_PublicLanguageEvent.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                FUiCtrl_PublicLanguageEvent.h
19  * @brief               This is the header file for _LanguageEvent class.
20  * @version             1.0
21  *
22  * This header file contains declaration of _LanguageEvent class.
23  */
24
25 #ifndef _FUI_CTRL_INTERNAL_PUBLIC_LANGUAGE_EVENT_H_
26 #define _FUI_CTRL_INTERNAL_PUBLIC_LANGUAGE_EVENT_H_
27
28 #include <FBaseResult.h>
29 #include <FBaseRt_Event.h>
30 #include <FOspConfig.h>
31 #include <FUiILanguageEventListener.h>
32
33 namespace Tizen { namespace Ui
34 {
35 class Control;
36 }} // Tizen::Ui
37
38 namespace Tizen { namespace Ui { namespace Controls
39 {
40 /**
41  * @class       _PublicLanguageEvent
42  * @brief       This class handles a _PublicLanguageEvent event. It is inherited from LowLevelEvent class.
43  *
44  * _LanguageEvent notifies the listeners when a Keypad language is changed.
45  *
46  * @since       1.0
47  */
48 class _PublicLanguageEvent
49         : public Tizen::Base::Runtime::_Event
50 {
51 // Lifecycle
52 public:
53         /**
54          * This is the class destructor.
55          */
56         virtual ~_PublicLanguageEvent();
57
58         static _PublicLanguageEvent* CreateInstanceN(const Tizen::Ui::Control& source);
59
60 // Accessors
61         /**
62          * This method returns the owner of this event.
63          *
64          * @return              See the comment above.
65          */
66         const Tizen::Ui::Control* GetSource(void) const;
67
68         static Tizen::Base::Runtime::IEventArg* CreateLanguageEventArgN(const Tizen::Ui::Control& source, Tizen::Locales::LanguageCode prevLanguageCode, Tizen::Locales::LanguageCode currentLanguageCode);
69
70 protected:
71         /**
72          * This is the default class constructor. After creating an instance of this
73          * class, you must explicitly call one of construction methods to initialize
74          * the instance.
75          */
76         _PublicLanguageEvent(const Tizen::Ui::Control& source);
77
78         /**
79          * This method calls appropriate IKeyEventListener method.
80          *
81          * @param[in]   listener                The IKeyEventListener instance.
82          * @param[in]   arg                             The _FocusEventArg.
83          * @exception   E_SUCCESS               - The method is successful.
84          * @exception   E_INVALID_ARG   - The argument passed to a method contains an invalid value.
85          * @exception   E_INVALID_ARG   - @c pListener is @c null.
86          */
87         virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg);
88
89 private:
90         const Tizen::Ui::Control* __pSource;
91
92 }; // _PublicLanguageEvent
93
94 }}} // Tizen::Ui::Controls
95
96 #endif //_FUI_CTRL_INTERNAL_PUBLIC_LANGUAGE_EVENT_H_