Merge "Set proper locale to harfbuzz" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / rotation-observer.h
1 #ifndef __DALI_INTERNAL_ROTATION_OBSERVER_H__
2 #define __DALI_INTERNAL_ROTATION_OBSERVER_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22
23 namespace Dali
24 {
25
26 namespace Internal
27 {
28
29 namespace Adaptor
30 {
31
32 struct RotationEvent
33 {
34   int angle;     ///< one of 0, 90, 180, 270
35   int winResize; ///< true if the window should be resized
36   int width;     ///< new window width
37   int height;    ///< new window height
38 };
39
40
41 /**
42  * The RotationObserver can be overridden in order to listen to rotation events.
43  */
44 class RotationObserver
45 {
46 public:
47
48   /**
49    * Deriving classes should override this to be notified when we receive a RotationPrepare event.
50    * @param[in]  area  The area that has been rotationd.
51    */
52   virtual void OnRotationPrepare( const RotationEvent& rotation ) = 0;
53
54   /**
55    * Deriving classes should override this to be notifed when a RotationRequest event is received
56    */
57   virtual void OnRotationRequest( ) = 0;
58
59 protected:
60
61   /**
62    * Protected Constructor.
63    */
64   RotationObserver()
65   {
66   }
67
68   /**
69    * Protected virtual destructor.
70    */
71   virtual ~RotationObserver()
72   {
73   }
74 };
75
76 } // namespace Adaptor
77
78 } // namespace Internal
79
80 } // namespace Dali
81
82 #endif // __DALI_INTERNAL_ROTATION_OBSERVER_H__