-#ifndef __DALI_INTERNAL_ORIENTATION_H__
-#define __DALI_INTERNAL_ORIENTATION_H__
+#ifndef DALI_INTERNAL_ORIENTATION_H
+#define DALI_INTERNAL_ORIENTATION_H
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/orientation.h>
-#include <dali/internal/window-system/common/rotation-observer.h>
+#include <dali/internal/window-system/common/rotation-event.h>
namespace Dali
{
-class Adaptor;
namespace Internal
{
namespace Adaptor
{
-class Adaptor;
class Window;
class Orientation;
typedef IntrusivePtr<Orientation> OrientationPtr;
-class Orientation : public BaseObject, public RotationObserver
+class Orientation : public BaseObject
{
public:
/**
* Destructor
*/
- virtual ~Orientation();
+ ~Orientation() override;
public:
- /**
- * Set the adaptor for basic setup
- * @param[in] adaptor The adaptor
- */
- void SetAdaptor(Dali::Adaptor& adaptor);
-
- /**
- * Set the adaptor for basic setup
- * @param[in] adaptor The adaptor
- */
- void SetAdaptor(Adaptor& adaptor);
/**
* Returns the actual orientation in degrees
*/
float GetRadians() const;
+ /**
+ * Called by the Window when orientation is changed
+ * @param[in] rotation The rotation event
+ */
+ void OnOrientationChange( const RotationEvent& rotation );
+
public: // Signals
/**
OrientationSignalType& ChangedSignal();
private:
- /**
- * @copydoc Dali::Internal::Adaptor::RotationObserver::OnRotationPrepare()
- */
- virtual void OnRotationPrepare( const RotationEvent& rotation );
-
- /**
- * @copydoc Dali::Internal::Adaptor::RotationObserver::OnRotationRequest()
- */
- virtual void OnRotationRequest( );
// Undefined
Orientation(const Orientation&);
Orientation& operator=(Orientation&);
private:
- /**
- * Signals and sends event of orientation change.
- */
- void EmitOrientationChange();
-
-private:
Window* mWindow;
} // namespace Dali
-#endif // __DALI_INTERNAL_ORIENTATION_H__
+#endif // DALI_INTERNAL_ORIENTATION_H