2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
19 * @file FUiIFocusEventListener.h
20 * @brief This is the header file for the %IFocusEventListener interface.
22 * This header file contains the declarations of the %IFocusEventListener interface.
25 #ifndef _FUI_IFOCUS_EVENT_LISTENER_H_
26 #define _FUI_IFOCUS_EVENT_LISTENER_H_
28 #include <FBaseRtIEventListener.h>
30 namespace Tizen { namespace Ui
38 * Defines constants used to identify focus status.
46 FOCUS_GAINED = 0, // The Control has gained focus
47 FOCUS_LOST = 1 // The Control has lost focus
51 * @interface IFocusEventListener
52 * @brief This interface is used as the argument to focus the event listener.
56 * The %IFocusEventListener interface is the listener interface for receiving focus events.
57 * The class that processes a focus event implements this interface, and the instance created with that class is registered with a
58 * UI control, using the control's AddFocusEventListener() method. When the focus event occurs, a method of that instance is
61 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/event_listener.htm">Event Listeners</a>.
63 class _OSP_EXPORT_ IFocusEventListener
64 : public Tizen::Base::Runtime::IEventListener
68 * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
73 virtual ~IFocusEventListener(void) {}
76 * Called when Control gains the input focus.
80 * @param[in] source The source of the event
82 virtual void OnFocusGained(const Tizen::Ui::Control& source) = 0;
85 * Called when Control loses the input focus.
89 * @param[in] source The source of the event
91 virtual void OnFocusLost(const Tizen::Ui::Control& source) = 0;
95 // This method is for internal use only. Using this method can cause behavioral, security-related,
96 // and consistency-related issues in the application.
98 // This method is reserved and may change its name at any time without
101 virtual void IFocusEventListener_Reserved1(void) {}
104 // This method is for internal use only. Using this method can cause behavioral, security-related,
105 // and consistency-related issues in the application.
107 // This method is reserved and may change its name at any time without
110 virtual void IIFocusEventListener_Reserved2(void) {}
113 // This method is for internal use only. Using this method can cause behavioral, security-related,
114 // and consistency-related issues in the application.
116 // This method is reserved and may change its name at any time without
119 virtual void IIFocusEventListener_Reserved3(void) {}
120 }; // IFocusEventListener
124 #endif // _FUI_IFOCUS_EVENT_LISTENER_H_