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 FUiCtrl_OverlayRegionImpl.h
20 * @brief This is the header file for the _OverlayRegionImpl class.
22 * This header file contains the declarations of the _OverlayRegionImpl class.
26 #ifndef _FUI_CTRL_INTERNAL_OVERLAY_REGION_IMPL_H_
27 #define _FUI_CTRL_INTERNAL_OVERLAY_REGION_IMPL_H_
29 #include <Ecore_Evas.h>
31 #include <FOspConfig.h>
33 namespace Tizen { namespace Graphics
40 namespace Tizen { namespace Ui { namespace Controls
47 namespace Tizen { namespace Ui
52 namespace Tizen { namespace Ui { namespace Controls
55 enum OverlayRegionRotate
57 OVERLAYREGION_ROTATE_0 = 0,
58 OVERLAYREGION_ROTATE_90,
59 OVERLAYREGION_ROTATE_180,
60 OVERLAYREGION_ROTATE_270,
61 OVERLAYREGION_ROTATE_NONE
64 class _OverlayRegionImpl
65 : public Tizen::Base::Object
68 virtual ~_OverlayRegionImpl(void);
70 Tizen::Graphics::Rectangle GetBounds(void) const;
71 void GetBounds(int& x, int& y, int& width, int& height) const;
72 result SetInputBuffer(const Tizen::Base::ByteBuffer& srcBuffer, const Tizen::Graphics::Dimension& srcDim, OverlayRegionBufferPixelFormat srcFormat, bool isUserInput);
73 result GetBackgroundBufferInfo(Tizen::Graphics::BufferInfo& info) const;
74 result Show(void) const;
76 result Construct(_Form* pParentForm, OverlayRegionType overlayRegionType, const Tizen::Graphics::Point& leftTopPos, const Tizen::Graphics::Rectangle& userDestRect, const Tizen::Graphics::Rectangle& finalPhyRect);
78 OverlayRegion* CreateOverlayRegionN(void);
79 void SetFormArrayIndex(int index);
80 Tizen::Ui::Controls::OverlayRegion* GetOverlayRegion(void) const;
82 void GoForeground(void);
83 void GoBackground(void);
85 static result IsValidOverlayRect(Tizen::Graphics::Rectangle& userRect, Tizen::Graphics::Rectangle& overlayPhysicalRect, const Tizen::Graphics::Rectangle& basePhysicalRect, bool& modified);
86 static result SetPixelFormatList(void);
87 static int GetWidthUnit(void);
88 static int GetHeightUnit(void);
89 static int GetMaxCount(void);
91 static _OverlayRegionImpl* GetInstance(OverlayRegion& overlayRegion);
92 static const _OverlayRegionImpl* GetInstance(const OverlayRegion& overlayRegion);
95 static int overlayRegionWidthUnit;
96 static int overlayRegionHeightUnit;
97 static int overlayRegionMaxCount;
98 static bool overlayRegionPixelFomatList[OVERLAY_REGION_BUFFER_PIXEL_FORMAT_MAX];
101 _OverlayRegionImpl(void);
102 _OverlayRegionImpl(const _OverlayRegionImpl& rhs);
104 _OverlayRegionImpl& operator =(const _OverlayRegionImpl& rhs);
107 Tizen::Ui::Controls::_Form* __pParentForm;
108 Tizen::Ui::Controls::OverlayRegion* __pOverlayRegion;
109 Tizen::Graphics::Rectangle __destRect;
110 Tizen::Ui::Controls::OverlayRegionType __overlayRegionType;
114 int __cameraDirection;
115 int __cameraRotation;
118 _OverlayAgent* __pOverlayAgent;
122 }; // OverlayRegionImpl
124 } } } //Tizen::Ui::Controls
126 #endif // _FUI_CTRL_INTERNAL_OVERLAY_REGION_IMPL_H_