Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / animations / FUiAnim_EflVisualElementSurfaceImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17
18 /**
19  * @file        FUiAnim_EflVisualElementSurfaceImpl.h
20  * @brief       This is the header file for the %_EflVisualElementSurfaceImpl class.
21  *
22  * This file contains declarations _EflVisualElementSurfaceImpl class.
23  */
24
25 #ifndef _FUI_ANIM_INTERNAL_EFL_VISUAL_ELEMENT_SURFACE_IMPL_H_
26 #define _FUI_ANIM_INTERNAL_EFL_VISUAL_ELEMENT_SURFACE_IMPL_H_
27
28 #include <Evas.h>
29 #include <FGrpDimension.h>
30
31 #include "FUiAnim_VisualElementSurfaceImpl.h"
32
33 namespace Tizen { namespace Graphics
34 {
35         enum PixelFormat;
36 }}
37
38 namespace Tizen { namespace Ui { namespace Animations
39 {
40
41 class _EflVisualElementSurfaceImpl
42         : public _VisualElementSurfaceImpl
43 {
44 public:
45         _EflVisualElementSurfaceImpl(const Handle layer, const Tizen::Graphics::Dimension& size);
46         _EflVisualElementSurfaceImpl(const Handle layer, const Handle object, const Tizen::Graphics::Dimension& size);
47         virtual ~_EflVisualElementSurfaceImpl(void);
48
49 public:
50         virtual Handle GetNativeHandle(void) const;
51         virtual Tizen::Graphics::Dimension GetPhysicalSize(void) const;
52         virtual result SetImage(const Tizen::Base::String& fileName);
53         virtual result GetBufferInfo(Tizen::Graphics::BufferInfo& bufferInfo) const;
54
55 private:
56         _EflVisualElementSurfaceImpl(void);     // no implementation
57         _EflVisualElementSurfaceImpl(const _EflVisualElementSurfaceImpl& rhs);
58         _EflVisualElementSurfaceImpl& operator =(const _EflVisualElementSurfaceImpl& rhs);
59
60         Tizen::Graphics::PixelFormat GetPixelFormat(Evas_Colorspace colorspace) const;
61         int GetBytePerPixel(Evas_Colorspace colorspace) const;
62
63 private:
64         Evas_Object* __pEvasImage;
65         unsigned char* __pBuffer;
66
67         friend class _VisualElementSurfaceImpl;
68         friend class _VisualElementImpl;
69         friend class _EflNode;
70 };              // _EflVisualElementSurfaceImpl
71
72 }}}             // Tizen::Ui::Animations
73
74 #endif //_FUI_ANIM_INTERNAL_EFL_VISUAL_ELEMENT_SURFACE_IMPL_H_