2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #ifndef WRTPLUGINS_DISPLAY_EVENTCHANGEORIENTATION_H_
17 #define WRTPLUGINS_DISPLAY_EVENTCHANGEORIENTATION_H_
19 #include <dpl/shared_ptr.h>
20 #include <platform/commons/ListenerEvent.h>
21 #include <platform/commons/ListenerEventEmitter.h>
24 namespace WrtPlugins {
28 * Event emitted when screen orientation changes.
30 class EventChangeOrientation : public Platform::ListenerEvent<
31 EventChangeOrientation>
34 EventChangeOrientation();
35 virtual ~EventChangeOrientation();
38 * Gets screen's orientation.
39 * @return Orientation.
41 Orientation getOrientation() const;
44 * Sets screen's orientation.
45 * @param orientation Orientation.
47 void setOrientation(Orientation orientation);
50 Orientation m_orientation;
53 typedef DPL::SharedPtr<EventChangeOrientation> EventChangeOrientationPtr;
54 typedef Platform::ListenerEventEmitter<EventChangeOrientation>
55 EventChangeOrientationEmitter;
56 typedef DPL::SharedPtr<EventChangeOrientationEmitter>
57 EventChangeOrientationEmitterPtr;
62 #endif // WRTPLUGINS_DISPLAY_EVENTCHANGEORIENTATION_H_