2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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.
18 * @file FUiCtrlIGalleryEventListener.h
19 * @brief This is the header file for the %IGalleryEventListener interface.
21 * This header file contains the declarations of the %IGalleryEventListener interface. @n
22 * If an event is generated, a method of this interface is called. @n
23 * Therefore, when an application performs jobs related to the event, the methods of this interface are executed.
26 #ifndef _FUI_CTRL_IGALLERY_EVENT_LISTENER_H_
27 #define _FUI_CTRL_IGALLERY_EVENT_LISTENER_H_
29 #include <FBaseRtIEventListener.h>
31 namespace Tizen { namespace Ui { namespace Controls
36 namespace Tizen { namespace Ui { namespace Controls
40 * @interface IGalleryEventListener
41 * @brief This interface defines the listener for the events generated by the %Gallery control.
45 * The %IGalleryEventListener interface is the listener interface for receiving Gallery events.
46 * The class that processes a gallery event implements this interface, and the instance created using the Gallery's
47 * AddGalleryEventListener() method. When the gallery event occurs, a method of that instance is invoked.
49 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_gallery.htm">Gallery</a>.
51 class _OSP_EXPORT_ IGalleryEventListener
52 : virtual public Tizen::Base::Runtime::IEventListener
56 * This polymorphic destructor should be overridden if required.@n
57 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
61 virtual ~IGalleryEventListener(void) {}
64 * Called when the current item changes.
68 * @param[in] gallery The source of the event
69 * @param[in] currentItemIndex The current item index
71 virtual void OnGalleryCurrentItemChanged(Tizen::Ui::Controls::Gallery& gallery, int currentItemIndex) = 0;
74 * Called when the item is clicked.
78 * @param[in] gallery The source of the event
79 * @param[in] itemIndex The index of the item
81 virtual void OnGalleryItemClicked(Tizen::Ui::Controls::Gallery& gallery, int itemIndex) = 0;
84 * Called when the slide-show starts.
88 * @param[in] gallery The source of the event
90 virtual void OnGallerySlideShowStarted(Tizen::Ui::Controls::Gallery& gallery) = 0;
93 * Called when the slide-show stops.
97 * @param[in] gallery The source of the event
99 virtual void OnGallerySlideShowStopped(Tizen::Ui::Controls::Gallery& gallery) = 0;
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 virtual void GalleryEventListener_Reserved1(void) {}
110 //This method is for internal use only. Using this method can cause behavioral, security-related,
111 //and consistency-related issues in the application.
113 virtual void GalleryEventListener_Reserved2(void) {}
116 //This method is for internal use only. Using this method can cause behavioral, security-related,
117 //and consistency-related issues in the application.
119 virtual void GalleryEventListener_Reserved3(void) {}
120 }; // IGalleryEventListener
122 }}} // Tizen::Ui::Controls
124 #endif // _FUI_CTRL_IGALLERY_EVENT_LISTENER_H_