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.
18 * @file FUiCtrl_FrameEvent.h
19 * @brief This is the header file for _FrameEvent class.
22 * This header file contains declaration of _FrameEvent class.
23 * The _FrameEvent class can call listener's method. So, when event occurred,
24 * application can handle it appropriately.
27 #ifndef _FUI_CTRL_INTERNAL_FRAME_EVENT_H_
28 #define _FUI_CTRL_INTERNAL_FRAME_EVENT_H_
30 #include <FOspConfig.h>
31 #include <FBaseResult.h>
32 #include "FBaseRt_Event.h"
34 namespace Tizen { namespace Ui { namespace Controls
39 _FRAME_STATUS_ACTIVATED = 0,
40 _FRAME_STATUS_DEACTIVATED
47 * @brief This class handles a frame event. It is inherited from Event class.
49 * The _Frame class has an instance of the _FrameEvent class as a member variable.
50 * Applications can register frame event listeners through it. When a frame lifecycle event occurs,
51 * the _FrameEvent class finds listener and calls the appropriate listener's method.
54 : public Tizen::Base::Runtime::_Event
58 static _FrameEvent* CreateInstanceN(const _Frame& source);
59 static Tizen::Base::Runtime::IEventArg* CreateFrameEventArgN(const _Frame& source, int frameState);
62 * This is the class destructor.
65 virtual ~_FrameEvent(void);
69 * This method returns the owner of this event.
71 * @return See the comment above.
73 const _Frame* GetSource(void) const;
78 * This method is Implemented to call the corresponding event listener's method.
80 * @return The method returns the error code
81 * @param[in] pListener The eventListener instance which is currently processing
82 * @param[in] arg The event argument that is fired
83 * @return The method returns error code.
84 * @exception E_SUCCESS - This method is successful.
85 * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.
86 * @exception E_ARG_NULL - The pointer passed to a method contains a @c null reference.
87 * @exception E_UNKNOWN - An undetermined error has occurred during operation.
90 virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg);
95 * This is the default class constructor.
97 * @remarks After creating an instance of this class, you must explicitly call one of
98 * construction methods to initialize the instance.
101 _FrameEvent(const _Frame& source);
105 const _Frame* __pSource;
108 }}} // Tizen::Ui::Controls
110 #endif // _FUI_CTRL_INTERNAL_FRAME_EVENT_H_