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 * @file FUiAnim_VisualElementSharedData.h
20 * @brief This is the header file for the _VisualElementSharedData class.
22 * This header file contains the declarations of the _VisualElementSharedData class.
25 #ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_SHAREDDATA_H_
26 #define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_SHAREDDATA_H_
28 #include <FGrpDimension.h>
30 #include "FUiAnim_INativeNode.h"
33 namespace Tizen { namespace Ui { namespace Animations
36 class IVisualElementAnimationProvider;
37 class IVisualElementContentProvider;
38 class IVisualElementEventListener;
40 class _OSP_EXPORT_ _VisualElementSharedData
43 _VisualElementSharedData(void);
44 virtual ~_VisualElementSharedData(void);
46 result Construct(void);
48 virtual void AddRef(void);
49 virtual void Release(void);
50 int GetReferenceCount(void) const;
52 void LockInvalidate(bool lock);
53 result NodeReconfigure(_VisualElementImpl& presentation, bool surfaceOnly)
56 SysTryReturn(NID_UI, pNativeNode, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] The Native Node is not valid.");
58 return pNativeNode->Reconfigure(pSurface, presentation, surfaceOnly);
61 result CreateSurface(const Tizen::Graphics::Dimension& size, _NativeLayer& layer);
62 void RemoveSurface(_VisualElementImpl& presentation);
63 result SetImage(const Tizen::Base::String& fileName);
65 bool NeedNativeReconfigure(void) const
67 return (invalidatedNativeProps != 0) || surfaceChanged;
72 int invalidatedNativeProps;
74 _INativeNode* pNativeNode;
75 VisualElementSurface* pSurface;
76 Tizen::Graphics::FloatRectangle invalidatedRegion;
77 bool drawOnPresentation;
81 bool fixedSurfaceSize;
82 int invalidationLockCount;
83 Tizen::Graphics::FloatRectangle updateRegion;
85 IVisualElementAnimationProvider* pAnimationProvider;
86 IVisualElementContentProvider* pContentProvider;
87 IVisualElementEventListener* pEventListener;
89 Tizen::Base::String name;
94 _VisualElementSharedData(const _VisualElementSharedData& rhs);
95 _VisualElementSharedData& operator =(const _VisualElementSharedData& rhs);
99 }; // _VisualElementSharedData
102 }}} // Tizen::Ui::Animations
104 #endif //_FUI_ANIM_INTERNAL_VISUAL_ELEMENT_SHAREDDATA_H_