[Tizen] Restore Uploaded signal for BufferImage and ResourceImage
[platform/core/uifw/dali-core.git] / dali / internal / event / images / nine-patch-image-impl.h
index 4669060..b7c1e65 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_NINE_PATCH_IMAGE_H__
-#define __DALI_INTERNAL_NINE_PATCH_IMAGE_H__
+#ifndef DALI_INTERNAL_NINE_PATCH_IMAGE_H
+#define DALI_INTERNAL_NINE_PATCH_IMAGE_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.
@@ -19,7 +19,7 @@
  */
 
 // INTERNAL INCLUDES
-#include <dali/public-api/images/nine-patch-image.h>
+#include <dali/devel-api/images/nine-patch-image.h>
 #include <dali/internal/event/images/resource-image-impl.h>
 #include <dali/internal/event/images/buffer-image-impl.h>
 
@@ -32,9 +32,6 @@ namespace Internal
 class NinePatchImage;
 typedef IntrusivePtr<NinePatchImage> NinePatchImagePtr;
 
-class ResourceClient;
-class ResourceManager;
-
 namespace SceneGraph
 {
 class UpdateManager;
@@ -57,20 +54,16 @@ public:
    * Also a pixel buffer for image data is allocated.
    * Dali has ownership of the buffer.
    * @param [in] filename    File to load synchronously into buffer
-   * @param [in] releasePol  optionally relase memory when image is not visible on screen (default: keep image data until Image object is alive).
    */
-  static NinePatchImagePtr New( const std::string& filename,
-                                ReleasePolicy releasePol = IMAGE_RELEASE_POLICY_DEFAULT );
+  static NinePatchImagePtr New( const std::string& filename );
 
   /**
    * Create a new NinePatchImage
    * For better performance and portability use power of two dimensions.
    * The maximum size of the image is limited by GL_MAX_TEXTURE_SIZE.
    * @param [in] filename    File to load synchronously into buffer
-   * @param [in] releasePol  optionally relase memory when image is not visible on screen (default: keep image data until Image object is alive).
    */
-  NinePatchImage( const std::string& filename,
-                  ReleasePolicy releasePol = IMAGE_RELEASE_POLICY_DEFAULT );
+  NinePatchImage( const std::string& filename );
 
   /**
    * Convert Image object to a 9 patch image object if possible.
@@ -118,20 +111,14 @@ public:
    */
   static bool IsNinePatchUrl( const std::string& url );
 
+private: // from ResourceImage
 
-protected: // From Resource
   /**
-   * @copydoc Dali::Internal::Image::Connect
+   * @copydoc ResourceImage::GetUrl()
    */
-  virtual void Connect();
+  virtual const std::string& GetUrl() const;
 
   /**
-   * @copydoc Dali::Internal::Image::Disconnect
-   */
-  virtual void Disconnect();
-
-private:
-  /**
    * Read the borders of the bitmap and determine the child area
    * and stretch borders
    */
@@ -140,8 +127,8 @@ private:
   Uint16Pair ParseRange( unsigned int& index, unsigned int width, const PixelBuffer* & pixel, unsigned int pixelStride, int testByte, int testBits, int testValue );
 
 private:
-  ResourceClient*               mResourceClient;
   Integration::BitmapPtr        mBitmap;
+  std::string                   mUrl;
   StretchRanges                 mStretchPixelsX;  //< The horizontal stretchable pixels in the cropped image space
   StretchRanges                 mStretchPixelsY;  //< The vertical stretchable pixels in the cropped image space
   Rect<int>                     mChildRectangle;
@@ -173,4 +160,4 @@ inline const Internal::NinePatchImage& GetImplementation(const Dali::NinePatchIm
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_NINE_PATCH_IMAGE_H__
+#endif // DALI_INTERNAL_NINE_PATCH_IMAGE_H