Tizen 2.1 base
[platform/framework/native/uifw.git] / inc / FUiIColorChangeEventListener.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                FUiIColorChangeEventListener.h
19  * @brief               This is the header file for the %IColorChangeEventListener interface.
20  *
21  * This header file contains the declarations of the %IColorChangeEventListener interface.
22  * If a change event is generated, a method of this interface is called.
23  * So, for tasks related to change events, use the methods of this interface.
24  *
25  */
26 #ifndef _FUI_ICOLOR_CHANGE_EVENT_LISTENER_H_
27 #define _FUI_ICOLOR_CHANGE_EVENT_LISTENER_H_
28
29 #include <FBaseRtIEventListener.h>
30 #include <FBaseObject.h>
31
32 namespace Tizen { namespace Graphics
33 {
34 class Color;
35 }} // Tizen::Graphics;
36
37 namespace Tizen { namespace Ui
38 {
39
40 class Control;
41
42 /**
43  * @interface   IColorChangeEventListener
44  * @brief               This interface implements the listener for the color change events.
45  *
46  * @since               2.0
47  *
48  * The %IColorChangeEventListener interface is the listener interface for receiving color change events.
49  * The class that processes a color change event implements this interface, and the instance created with that class is
50  * registered with a UI control, using the control's AddColorChangeEventListener() method. When the color change event occurs,
51  * the OnColorChanged() method of that instance is invoked.
52  * @n
53  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_colorpicker.htm">ColorPicker</a>.
54  */
55 class IColorChangeEventListener
56         : public Tizen::Base::Runtime::IEventListener
57 {
58 public:
59         /**
60          * This is the destructor for this class.
61          *
62          * @since       2.0
63          */
64         virtual ~IColorChangeEventListener(void) {}
65
66         /**
67          * Called when there is a change in Color. @n
68          * The %Color instance is passed as an input parameter.
69          *
70          * @since               2.0
71          *
72          * @param[in]   source          The source of the event
73          * @param[in]   color           The color
74          */
75         virtual void OnColorChanged(const Tizen::Ui::Control& source, const Tizen::Graphics::Color& color) = 0;
76
77 protected:
78         //
79         // This method is for internal use only.
80         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
81         //
82         // This method is reserved and may change its name at any time without
83         // prior notice.
84         //
85         // @since      2.0
86         //
87         virtual void IColorChangeEventListener_Reserved1(void) {}
88
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         // This method is reserved and may change its name at any time without
94         // prior notice.
95         //
96         // @since      2.0
97         //
98         virtual void IColorChangeEventListener_Reserved2(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         // This method is reserved and may change its name at any time without
105         // prior notice.
106         //
107         // @since      2.0
108         //
109         virtual void IColorChangeEventListener_Reserved3(void) {}
110 };      // IColorChangeEventListener
111
112 }}      // Tizen::Ui
113
114 #endif // _FUI_ICOLOR_CHANGE_EVENT_LISTENER_H_