[Tizen] Support Device orientation and window orientation event.
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / framework.h
index bef6b77..cf8760f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_FRAMEWORK_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -28,6 +28,7 @@
 // INTERNAL INCLUDES
 #include <dali/internal/system/common/abort-handler.h>
 #include <dali/public-api/adaptor-framework/device-status.h>
+
 #ifdef COMPONENT_APPLICATION_SUPPORT
 #include <dali/devel-api/adaptor-framework/component-application.h>
 #endif
@@ -160,6 +161,13 @@ public:
     }
 
     /**
+     * Invoked when the device orientation is changed.
+     */
+    virtual void OnDeviceOrientationChanged(Dali::DeviceStatus::Orientation::Status status)
+    {
+    }
+
+    /**
      * Invoked when the platform surface is created.
      */
     virtual void OnSurfaceCreated(Any newSurface)
@@ -240,6 +248,17 @@ public:
     virtual void OnTaskMemoryLow(Dali::DeviceStatus::Memory::Status status)
     {
     }
+
+    /**
+     * Invoked when the device orientation is changed.
+     *
+     * Device orientation changed event is from Application Framework(Sensor Framework), it means it is system event.
+     * If UIThreading is enable, DALI application has the main thread and UI thread.
+     * This event is emitted in main thread, then it is posted to the UI thread in this callback function.
+     */
+    virtual void OnTaskDeviceOrientationChanged(Dali::DeviceStatus::Orientation::Status status)
+    {
+    }
   };
 
 public: