Updates for NativeImageInterface
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / native-image-source.h
index 26d79ef..3f52899 100755 (executable)
@@ -1,8 +1,8 @@
-#ifndef __DALI_NATIVE_IMAGE_SOURCE_H__
-#define __DALI_NATIVE_IMAGE_SOURCE_H__
+#ifndef DALI_NATIVE_IMAGE_SOURCE_H
+#define DALI_NATIVE_IMAGE_SOURCE_H
 
 /*
- * Copyright (c) 2015 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.
@@ -26,6 +26,9 @@
 #include <dali/public-api/images/pixel.h>
 #include <dali/public-api/object/any.h>
 
+// INTERNAL INCLUDES
+#include <dali/public-api/dali-adaptor-common.h>
+
 namespace Dali
 {
 /**
@@ -59,7 +62,7 @@ typedef Dali::IntrusivePtr<Dali::NativeImageSource> NativeImageSourcePtr;
  * @SINCE_1_1.4
  * @see NativeImage
  */
-class DALI_IMPORT_API NativeImageSource : public NativeImageInterface
+class DALI_ADAPTOR_API NativeImageSource : public NativeImageInterface
 {
 public:
 
@@ -149,42 +152,67 @@ public:
    */
   bool IsColorDepthSupported( ColorDepth colorDepth );
 
+  /**
+   * @copydoc Dali::NativeImageInterface::GetTextureTarget()
+   */
+  int GetTextureTarget() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
+   */
+  const char* GetCustomFragmentPrefix() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
+   */
+  const char* GetCustomSamplerTypename() const override;
+
 private:   // native image
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionCreate()
+   * @copydoc Dali::NativeImageInterface::CreateResource()
    */
-  virtual bool GlExtensionCreate();
+  bool CreateResource() override;
 
   /**
-   * @copydoc Dali::NativeImageInterface::GlExtensionDestroy()
+   * @copydoc Dali::NativeImageInterface::DestroyResource()
    */
-  virtual void GlExtensionDestroy();
+  void DestroyResource() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::TargetTexture()
    */
-  virtual unsigned int TargetTexture();
+  unsigned int TargetTexture() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::PrepareTexture()
    */
-  virtual void PrepareTexture();
+  void PrepareTexture() override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetWidth()
    */
-  virtual unsigned int GetWidth() const;
+  unsigned int GetWidth() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetHeight()
    */
-  virtual unsigned int GetHeight() const;
+  unsigned int GetHeight() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::RequiresBlending()
    */
-  virtual bool RequiresBlending() const;
+  bool RequiresBlending() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
+   */
+  Any GetNativeImageHandle() const override;
+
+  /**
+   * @copydoc Dali::NativeImageInterface::SourceChanged()
+   */
+  bool SourceChanged() const override;
 
   /**
    * @copydoc Dali::NativeImageInterface::GetExtension()
@@ -235,6 +263,8 @@ private:
 
   /// @cond internal
   Internal::Adaptor::NativeImageSource* mImpl; ///< Implementation pointer
+  friend class Internal::Adaptor::NativeImageSource;
+
   /// @endcond
 };
 
@@ -243,4 +273,4 @@ private:
  */
 } // namespace Dali
 
-#endif // __DALI_NATIVE_IMAGE_SOURCE_H__
+#endif // DALI_NATIVE_IMAGE_SOURCE_H