Tizen 2.1 base
[framework/osp/uifw.git] / inc / FUiITimeChangeEventListener.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                FUiITimeChangeEventListener.h
19  * @brief               This is the header file for the %ITimeChangeEventListener interface.
20  *
21  * This header file contains the declarations of the %ITimeChangeEventListener interface. @n
22  * If a change event is generated, a method of this class is called. @n
23  * So, for tasks related to change events, use the methods of this class.
24  *
25  */
26 #ifndef _FUI_ITIME_CHANGE_EVENT_LISTENER_H_
27 #define _FUI_ITIME_CHANGE_EVENT_LISTENER_H_
28
29 // Includes
30 #include <FBaseRtIEventListener.h>
31 #include <FBaseObject.h>
32
33 namespace Tizen { namespace Ui
34 {
35 class Control;
36 } }
37
38 namespace Tizen {namespace Ui
39 {
40
41 /**
42  * @interface   ITimeChangeEventListener
43  * @brief               This interface implements the listener for the time change events.
44  *
45  * @since               2.0
46  *
47  * The %ITimeChangeEventListener interface is the listener interface for receiving time change events.
48  * The class that processes a time change event implements this interface, and the instance created with that class is registered
49  * with a UI control, using the control's AddTimeChangeEventListener() method. When the time change event occurs, the
50  *  OnTimeChanged() method of that instance is invoked.
51  *
52  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_edittime_editdate.htm">EditDate and EditTime</a> and <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_datepicker.htm">DatePicker, TimePicker, and DateTimePicker</a>.
53
54  */
55 class _OSP_EXPORT_ ITimeChangeEventListener
56         : public Tizen::Base::Runtime::IEventListener
57 {
58 // Operation
59 public:
60         /**
61          * This is the destructor for this class.
62          *
63          * @since                       2.0
64          */
65         virtual ~ITimeChangeEventListener(void) {}
66
67         /**
68          * Called when there is a change in time. @n
69          * The changed hour and minute values are passed as input parameters.
70          *
71          * @since               2.0
72          *
73          * @param[in]   source          The source of the event
74          * @param[in]   hour            The hour
75          * @param[in]   minute          The minute
76          */
77         virtual void OnTimeChanged(const Tizen::Ui::Control& source, int hour, int minute) = 0;
78
79         /**
80         * Called when a time change is canceled.
81         *
82         * @since                2.0
83         *
84         * @param[in]    source          The source of the event
85         */
86         virtual void OnTimeChangeCanceled(const Tizen::Ui::Control& source) = 0;
87
88 protected:
89         //
90         // This method is for internal use only.
91         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
92         //
93         // The following method is reserved, and their names can be changed
94         // at any time without prior notice.
95         //
96         // @since      2.0
97         //
98         virtual void ITimeChangeEventListener_Reserved1(void) {}
99
100         //
101         // This method is for internal use only.
102         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
103         //
104         // The following method is reserved, and their names can be changed
105         // at any time without prior notice.
106         //
107         // @since      2.0
108         //
109         virtual void ITimeChangeEventListener_Reserved2(void) {}
110
111         //
112         // This method is for internal use only.
113         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
114         //
115         // The following method is reserved, and their names can be changed
116         // at any time without prior notice.
117         //
118         // @since      2.0
119         //
120         virtual void ITimeChangeEventListener_Reserved3(void) {}
121 }; // ITimeChangeEventListener
122
123 }} // Tizen::Ui
124
125 #endif // _FUI_ITIME_CHANGE_EVENT_LISTENER_H_