Remove StereoMode
[platform/core/uifw/dali-adaptor.git] / dali / integration-api / adaptor.h
old mode 100644 (file)
new mode 100755 (executable)
index 3a9e690..3b996b8
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTEGRATION_ADAPTOR_H__
-#define __DALI_INTEGRATION_ADAPTOR_H__
+#ifndef DALI_INTEGRATION_ADAPTOR_H
+#define DALI_INTEGRATION_ADAPTOR_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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/public-api/adaptor-framework/window.h>
 #include <dali/public-api/adaptor-framework/application-configuration.h>
+#include <dali/public-api/dali-adaptor-common.h>
 
 #ifdef DALI_ADAPTOR_COMPILATION
 #include <dali/integration-api/log-factory-interface.h>
@@ -45,6 +46,7 @@ namespace Internal
 {
 namespace Adaptor
 {
+class GraphicsFactory;
 class Adaptor;
 }
 }
@@ -107,7 +109,7 @@ class Adaptor;
  *
  * @see RenderSurface
  */
-class DALI_IMPORT_API Adaptor
+class DALI_ADAPTOR_API Adaptor
 {
 public:
 
@@ -183,17 +185,24 @@ public:
    * @brief Ensures that the function passed in is called from the main loop when it is idle.
    * @note Function must be called from the main event thread only.
    *
-   * A callback of the following type may be used:
+   * Callbacks of the following types may be used:
    * @code
    *   void MyFunction();
    * @endcode
+   * This callback will be deleted once it is called.
+   *
+   * @code
+   *   bool MyFunction();
+   * @endcode
+   * This callback will be called repeatedly as long as it returns true. A return of 0 deletes this callback.
    *
    * @param[in] callback The function to call.
+   * @param[in] hasReturnValue Sould be set to true if the callback function has a return value.
    * @return true if added successfully, false otherwise
    *
    * @note Ownership of the callback is passed onto this class.
    */
-  bool AddIdle( CallbackBase* callback );
+  bool AddIdle( CallbackBase* callback, bool hasReturnValue );
 
   /**
    * @brief Removes a previously added @p callback.
@@ -228,6 +237,13 @@ public:
   Any GetNativeWindowHandle();
 
   /**
+   * @brief Get the native display associated with the graphics backend
+   *
+   * @return A handle to the native display
+   */
+  Any GetGraphicsDisplay();
+
+  /**
    * @brief Release any locks the surface may hold.
    *
    * For example, after compositing an offscreen surface, use this method to allow
@@ -249,6 +265,23 @@ public:
   void SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender );
 
   /**
+   * @brief The callback is called from the Update/Render thread prior to rendering.
+   *
+   * @param[in] callback The function to call
+   *
+   * @note The function is called from the Update thread, so should do as little processing as possible.
+   * It is not possible to call any DALi event side APIs from within the callback; doing so will cause
+   * instability. Only 1 callback is supported. Setting the callback to NULL will remove the current callback.
+   *
+   * A callback of the following type should be used:
+   * @code
+   *   bool MyFunction();
+   * @endcode
+   * This callback will be called repeatedly as long as it returns true. A return of 0 deletes this callback.
+   */
+  void SetPreRenderCallback( CallbackBase* callback );
+
+  /**
    * @brief Set whether the frame count per render is managed using the hardware VSync or
    * manually timed.
    *
@@ -326,16 +359,6 @@ public:
   void SceneCreated();
 
   /**
-   * @copydoc Dali::Application::SetViewMode();
-   */
-  void SetViewMode( ViewMode viewMode );
-
-  /**
-   * @copydoc Dali::Application::SetStereoBase();
-   */
-  void SetStereoBase( float stereoBase );
-
-  /**
    * @brief Renders once more even if we're paused
    * @note Will not work if the window is hidden.
    */
@@ -383,4 +406,4 @@ private:
 
 } // namespace Dali
 
-#endif // __DALI_INTEGRATION_ADAPTOR_H__
+#endif // DALI_INTEGRATION_ADAPTOR_H