tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / Display / EventChangeOrientation.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 #ifndef WRTPLUGINS_DISPLAY_EVENTCHANGEORIENTATION_H_
17 #define WRTPLUGINS_DISPLAY_EVENTCHANGEORIENTATION_H_
18
19 #include <dpl/shared_ptr.h>
20 #include <platform/commons/ListenerEvent.h>
21 #include <platform/commons/ListenerEventEmitter.h>
22 #include "Enums.h"
23
24 namespace WrtPlugins {
25 namespace Api {
26 namespace Display {
27 /**
28  * Event emitted when screen orientation changes.
29  */
30 class EventChangeOrientation : public Platform::ListenerEvent<
31         EventChangeOrientation>
32 {
33   public:
34     EventChangeOrientation();
35     virtual ~EventChangeOrientation();
36
37     /**
38      * Gets screen's orientation.
39      * @return Orientation.
40      */
41     Orientation getOrientation() const;
42
43     /**
44      * Sets screen's orientation.
45      * @param orientation Orientation.
46      */
47     void setOrientation(Orientation orientation);
48
49   protected:
50     Orientation m_orientation;
51 };
52
53 typedef DPL::SharedPtr<EventChangeOrientation> EventChangeOrientationPtr;
54 typedef Platform::ListenerEventEmitter<EventChangeOrientation>
55 EventChangeOrientationEmitter;
56 typedef DPL::SharedPtr<EventChangeOrientationEmitter>
57 EventChangeOrientationEmitterPtr;
58 } // Display
59 } // Api
60 } // WrtPlugins
61
62 #endif // WRTPLUGINS_DISPLAY_EVENTCHANGEORIENTATION_H_