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.
19 * @brief This is the header file for the _UiEvent class.
21 * This header file contains the declarations of the %_UiEvent class.
24 #ifndef _FUI_INTERNAL_UI_EVENT_H_
25 #define _FUI_INTERNAL_UI_EVENT_H_
27 #include <FBaseTypes.h>
28 #include <FBaseObject.h>
29 #include <FBase_HandleT.h>
30 #include "FUi_UiEventTypes.h"
31 #include "FUi_IUiEventListener.h"
32 #include "FUi_IUiEventPreviewer.h"
34 namespace Tizen { namespace Base { namespace Collection
39 namespace Tizen {namespace Ui
43 typedef Tizen::Base::_HandleT <Tizen::Ui::_Control> _UiObjectHandle;
46 * This is internal. If used in an application, the application can get rejected during the certification process.
48 * @brief This class impliments _UiEvent and
49 * fire the Window Event object of a Ui Control.
51 class _OSP_EXPORT_ _UiEvent
52 : public Tizen::Base::Object
57 * This is the default class constructor.
60 _UiEvent(const _UiObjectHandle& destination, const _UiObjectHandle& source, _UiEventRouteType routeType);
61 _UiEvent(const _UiEvent& rhs);
64 * This is the default class destructor.
67 virtual ~_UiEvent(void);
70 _UiEvent& operator =(const _UiEvent& rhs);
73 _UiObjectHandle GetDestination(void) const;
74 _UiObjectHandle GetSource(void) const;
75 void SetRouteType(_UiEventRouteType routeType);
76 _UiEventRouteType GetRouteType(void) const;
77 void SetOriginalDestination(const _Control& control);
78 _UiObjectHandle GetOriginalDestination(void) const;
79 result ProcessPreviewEvent(const _Control& control, bool& isFiltered);
80 result ProcessEvent(const _Control& control, bool& isFiltered);
81 result ProcessListener(const _IUiEventListener& listener, bool& isFiltered);
84 virtual _UiEvent* CloneN(void) const = 0;
85 virtual _UiEventType GetEventType(void) const = 0;
86 const _Control* GetControl(const _UiObjectHandle& handle) const;
87 void SetAccessibilityEvent(bool set);
88 bool GetAccessibilityEvent(void) const;
91 virtual bool IsEventReceivable(const _Control& control) const;
92 virtual result OnPreviewEventProcessing(const _Control& control, bool& isFiltered) = 0;
93 virtual result OnEventProcessing(const _Control& control, bool& isFiltered) = 0;
94 virtual result OnListenerProcessing(const _IUiEventListener& listener, bool& isFiltered) = 0;
95 virtual result OnEventHandled(const _Control& control);
98 _UiObjectHandle __destination;
99 _UiObjectHandle __source;
100 _UiObjectHandle __originalDestination;
102 _UiEventRouteType __routeType;
103 bool __accessibilityEvent;
108 #endif //_FUI_INTERNAL_UI_EVENT_H_