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_PublicFrameEvent.h
19 * @brief This is the header file for _PublicFrameEvent class.
22 * This header file contains declaration of _PublicFrameEvent class.
23 * The _PublicFrameEvent class can call listener's method. So, when event occurred,
24 * application can handle it appropriately.
27 #ifndef _FUI_CTRL_INTERNAL_PUBLIC_FRAME_EVENT_H_
28 #define _FUI_CTRL_INTERNAL_PUBLIC_FRAME_EVENT_H_
30 #include <FBaseResult.h>
31 #include <FOspConfig.h>
32 #include "FBaseRt_Event.h"
34 namespace Tizen { namespace Ui { namespace Controls
37 * A constant that indicates that Frame is about to be destroyed.
39 static const int FRAME_STATE_TERMINATING = 0x08;
40 static const int FRAME_STATE_ACTIVATED = 0x10;
41 static const int FRAME_STATE_DEACTIVATED = 0x20;
46 * @class _PublicFrameEvent
47 * @brief This class handles a frame event. It is inherited from Event class.
49 * The Frame class has an instance of the _PublicFrameEvent class as a member variable.
50 * Applications can register frame event listeners through it. When a frame lifecycle event occurs,
51 * the _PublicFrameEvent class finds listener and calls the appropriate listener's method.
53 class _PublicFrameEvent
54 : public Tizen::Base::Runtime::_Event
58 static _PublicFrameEvent* CreateInstanceN(const Frame& source);
59 static Tizen::Base::Runtime::IEventArg* CreateFrameEventArgN(const Frame& source, int frameState);
62 * This is the class destructor.
65 virtual ~_PublicFrameEvent(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 _PublicFrameEvent(const Frame& source);
105 const Frame* __pSource;
106 }; // _PublicFrameEvent
108 }}} // Tizen::Ui::Controls
110 #endif // _FUI_CTRL_INTERNAL_PUBLIC_FRAME_EVENT_H_