Tizen 2.1 base
[framework/osp/uifw.git] / src / graphics / FGrp_CoordinateSystemImpl.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        FGrp_CoordinateSystemImpl.h
20  * @brief       This is the header file for _CoordinateSystemImpl class.
21  *
22  */
23
24 #ifndef _FGRP_INTERNAL_COORDINATE_SYSTEMIMPL_H_
25 #define _FGRP_INTERNAL_COORDINATE_SYSTEMIMPL_H_
26
27 #include "FGrp_CoordinateSystem.h"
28 #include "FGrp_CoordinateSystemImpl.h"
29
30
31 namespace Tizen { namespace Graphics
32 {
33
34 class _CoordinateSystem::_CoordinateSystemImpl
35 {
36 public:
37         _CoordinateSystemImpl(void);
38         ~_CoordinateSystemImpl(void);
39
40         _LogicalResolution GetNativeLogicalResolution(void) const;
41         _BaseScreenSize GetNativeLogicalBaseScreenSize(void) const;
42
43         _LogicalResolution GetLogicalResolution(void) const;
44         int GetLogicalResolutionInt(void) const;
45
46         _PhysicalResolution GetPhysicalResolution(void) const;
47         Dimension GetPhysicalResolutionDim(void) const;
48
49         _BaseScreenSize GetLogicalBaseScreenSize(void) const;
50         _BaseScreenSize GetPhysicalBaseScreenSize(void) const;
51
52         result Initialize(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize);
53         result Initialize(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize);
54
55         _ICoordinateSystemTransformer* GetTransformer(void);
56         _ICoordinateSystemTransformer* GetInverseTransformer(void);
57
58         static _ICoordinateSystemTransformer* GetTransformerN(const Dimension& srcDim, const Dimension& trgDim);
59         static _ICoordinateSystemTransformer* GetTransformerN(_LogicalResolution logicalResolution, _BaseScreenSize logicalBaseScreenSize, _PhysicalResolution physicalResolution, _BaseScreenSize physicalBaseScreenSize);
60         static _ICoordinateSystemTransformer* GetTransformerN(int srcResolution, _BaseScreenSize srcBaseScreenSize, Dimension destResolution, _BaseScreenSize destBaseScreenSize);
61
62         void SetTransformEnabled(bool enabled);
63         bool IsTransformEnabled(void) const;
64
65 private:
66         _CoordinateSystemImpl(const _CoordinateSystemImpl&);
67         _CoordinateSystemImpl& operator =(const _CoordinateSystemImpl&);
68
69 private:
70         class __CoordinateTransformer;
71         __CoordinateTransformer* __pTransformer;
72         __CoordinateTransformer* __pInverseTransformer;
73
74         _LogicalResolution __nativeLogicalResolution;
75         _BaseScreenSize __nativeLogicalBaseScreenSize;
76
77         _LogicalResolution __logicalResolution;
78         _BaseScreenSize __logicalBaseScreenSize;
79
80         _PhysicalResolution __physicalResolution;
81         _BaseScreenSize __physicalBaseScreenSize;
82
83         int __logicalResolutionInt;
84         Dimension __physicalResolutionDim;
85
86 }; // _CoordinateSystemImpl
87
88 }} // Tizen::Graphics
89
90 #endif // _FGRP_INTERNAL_COORDINATE_SYSTEMIMPL_H_