Boost::any replacement in Dali Adaptor 57/18257/3
authorRichard Underhill <r.underhill@partner.samsung.com>
Wed, 19 Mar 2014 12:46:48 +0000 (12:46 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Thu, 3 Apr 2014 16:25:41 +0000 (17:25 +0100)
[Issue#] N/A

[Problem]

[Cause]

[Solution]

Change-Id: Icb1fad43cea08bed1af43168adecc23167c1d508
Signed-off-by: Richard Underhill <r.underhill@partner.samsung.com>
Signed-off-by: Andrew Cox <andrew.cox@partner.samsung.com>
24 files changed:
adaptors/tizen/internal/common/clipboard-impl.cpp
adaptors/tizen/internal/common/ecore-x/ecore-x-render-surface-factory.cpp
adaptors/tizen/internal/common/ecore-x/ecore-x-render-surface-factory.h
adaptors/tizen/internal/common/ecore-x/ecore-x-render-surface.cpp
adaptors/tizen/internal/common/ecore-x/ecore-x-render-surface.h
adaptors/tizen/internal/common/ecore-x/native-buffer-render-surface.cpp
adaptors/tizen/internal/common/ecore-x/native-buffer-render-surface.h
adaptors/tizen/internal/common/ecore-x/pixmap-render-surface.cpp
adaptors/tizen/internal/common/ecore-x/pixmap-render-surface.h
adaptors/tizen/internal/common/ecore-x/window-render-surface.cpp
adaptors/tizen/internal/common/ecore-x/window-render-surface.h
adaptors/tizen/internal/common/imf-manager-impl.cpp
adaptors/tizen/internal/common/pixmap-image-impl.cpp
adaptors/tizen/internal/common/pixmap-image-impl.h
adaptors/tizen/internal/common/window-impl.cpp
adaptors/tizen/internal/evas-plugin-impl.cpp
adaptors/tizen/internal/livebox-plugin-impl.cpp
adaptors/tizen/internal/native-buffer-plugin-impl.cpp
adaptors/tizen/public-api/adaptor-framework/common/pixmap-image.cpp
adaptors/tizen/public-api/adaptor-framework/common/render-surface.cpp
build/tizen/dali-native-buffer/linker-test.cpp
capi/dali/public-api/adaptor-framework/common/pixmap-image.h
capi/dali/public-api/adaptor-framework/common/render-surface.h
capi/dali/public-api/adaptor-framework/evas-plugin.h

index a336bb2..9326095 100644 (file)
@@ -24,6 +24,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/adaptor-framework/common/adaptor.h>
+#include <dali/public-api/object/any.h>
 #include <internal/common/adaptor-impl.h>
 #include <internal/common/ecore-x/ecore-x-window-interface.h>
 
@@ -68,7 +69,7 @@ BaseHandle Create()
     Dali::RenderSurface& surface( adaptorImpl.GetSurface() );
     if( surface.GetType() == Dali::RenderSurface::WINDOW )
     {
-      ecoreXwin = boost::any_cast< Ecore_X_Window >( adaptorImpl.GetSurface().GetSurface() );
+      ecoreXwin = AnyCast< Ecore_X_Window >( adaptorImpl.GetSurface().GetSurface() );
     }
 
     // If we fail to get Ecore_X_Window, we can't use the Clipboard correctly.
index daa898b..ed0e17f 100644 (file)
@@ -29,8 +29,8 @@ namespace ECoreX
 
 DALI_EXPORT_API RenderSurface* CreatePixmapSurface(
   PositionSize       positionSize,
-  boost::any         surface,
-  boost::any         display,
+  Any                surface,
+  Any                display,
   const std::string& name,
   bool               isTransparent )
 {
@@ -42,8 +42,8 @@ DALI_EXPORT_API RenderSurface* CreateNativeBufferSurface(
   native_buffer_pool*     pool,
   unsigned int            maxBufferCount,
   PositionSize            positionSize,
-  boost::any              surface,
-  boost::any              display,
+  Any                     surface,
+  Any                     display,
   const std::string&      name,
   bool                    isTransparent )
 {
index 93fbd6f..e885341 100644 (file)
@@ -49,8 +49,8 @@ class RenderSurface;
  */
 DALI_IMPORT_API RenderSurface* CreatePixmapSurface(
   PositionSize       positionSize,
-  boost::any         surface,
-  boost::any         display,
+  Any         surface,
+  Any         display,
   const std::string& name,
   bool               isTransparent );
 
@@ -72,8 +72,8 @@ DALI_IMPORT_API RenderSurface* CreateNativeBufferSurface(
   native_buffer_pool*     pool,
   unsigned int            maxBufferCount,
   PositionSize            positionSize,
-  boost::any              surface,
-  boost::any              display,
+  Any              surface,
+  Any              display,
   const std::string&      name,
   bool                    isTransparent );
 
index c78e1d0..cbc587e 100644 (file)
@@ -60,8 +60,8 @@ const unsigned int MILLISECONDS_PER_SECOND = 1000;
 
 RenderSurface::RenderSurface( SurfaceType type,
                               Dali::PositionSize positionSize,
-                              boost::any surface,
-                              boost::any display,
+                              Any surface,
+                              Any display,
                               const std::string& name,
                               bool isTransparent)
 : mMainDisplay(NULL),
@@ -76,13 +76,13 @@ RenderSurface::RenderSurface( SurfaceType type,
   mOwnDisplay(false),
   mIsStopped( false )
 {
-  // see if there is a display in boost::any display
+  // see if there is a display in Any display
   SetDisplay( display );
 }
 
-void RenderSurface::Init( boost::any surface )
+void RenderSurface::Init( Any surface )
 {
-  // see if there is a surface in boost::any surface
+  // see if there is a surface in Any surface
   unsigned int surfaceId  = GetSurfaceId( surface );
 
   // if the surface is empty, create a new one.
@@ -151,10 +151,10 @@ Ecore_X_Drawable RenderSurface::GetDrawable()
   return 0;
 }
 
-boost::any RenderSurface::GetDisplay()
+Any RenderSurface::GetDisplay()
 {
   // this getter is used by main thread so we need to return the main thread version of the display
-  return boost::any( ecore_x_display_get() );
+  return Any( ecore_x_display_get() );
 }
 
 PositionSize RenderSurface::GetPositionSize() const
@@ -250,29 +250,29 @@ void RenderSurface::StopRender()
   mIsStopped = true;
 }
 
-void RenderSurface::SetDisplay( boost::any display )
+void RenderSurface::SetDisplay( Any display )
 {
   // the render surface can be passed either EFL e-core types, or x11 types
   // we use boost any to determine at run time which type
 
-  if ( display.empty() == false )
+  if ( display.Empty() == false )
   {
     // check we have a valid type
-    DALI_ASSERT_ALWAYS( ( ( display.type() == typeid (Ecore_X_Display *)) ||
-                          ( display.type() == typeid (XDisplay *) ) )
+    DALI_ASSERT_ALWAYS( ( ( display.GetType() == typeid (Ecore_X_Display *)) ||
+                          ( display.GetType() == typeid (XDisplay *) ) )
                         &&
                         "Display type is invalid" );
 
     mOwnDisplay = false;
 
     // display may point to EcoreXDisplay so may need to cast
-    if( display.type() == typeid (Ecore_X_Display*) )
+    if( display.GetType() == typeid (Ecore_X_Display*) )
     {
-      mMainDisplay = static_cast< XDisplay* >( boost::any_cast< Ecore_X_Display* >( display ) );
+      mMainDisplay = static_cast< XDisplay* >( AnyCast< Ecore_X_Display* >( display ) );
     }
     else
     {
-      mMainDisplay = boost::any_cast< XDisplay* >( display );
+      mMainDisplay = AnyCast< XDisplay* >( display );
     }
   }
   else
@@ -284,24 +284,24 @@ void RenderSurface::SetDisplay( boost::any display )
   }
 }
 
-unsigned int RenderSurface::GetSurfaceId( boost::any surface ) const
+unsigned int RenderSurface::GetSurfaceId( Any surface ) const
 {
   unsigned int surfaceId = 0;
 
-  if ( surface.empty() == false )
+  if ( surface.Empty() == false )
   {
     // check we have a valid type
-    DALI_ASSERT_ALWAYS( ( (surface.type() == typeid (XWindow) ) ||
-                          (surface.type() == typeid (Ecore_X_Window) ) )
+    DALI_ASSERT_ALWAYS( ( (surface.GetType() == typeid (XWindow) ) ||
+                          (surface.GetType() == typeid (Ecore_X_Window) ) )
                         && "Surface type is invalid" );
 
-    if ( surface.type() == typeid (Ecore_X_Window) )
+    if ( surface.GetType() == typeid (Ecore_X_Window) )
     {
-      surfaceId = boost::any_cast<Ecore_X_Window>( surface );
+      surfaceId = AnyCast<Ecore_X_Window>( surface );
     }
     else
     {
-      surfaceId = boost::any_cast<XWindow>( surface );
+      surfaceId = AnyCast<XWindow>( surface );
     }
   }
   return surfaceId;
index 49fd189..9abe556 100644 (file)
@@ -60,8 +60,8 @@ public:
     */
   RenderSurface( SurfaceType type,
                  Dali::PositionSize positionSize,
-                 boost::any surface,
-                 boost::any display,
+                 Any surface,
+                 Any display,
                  const std::string& name,
                  bool isTransparent = false);
 
@@ -77,7 +77,7 @@ protected:
    * Second stage construction
    * Creates the surface (window, pixmap or native buffer)
    */
-  void Init( boost::any surface );
+  void Init( Any surface );
 
 public: // API
 
@@ -112,12 +112,12 @@ public: // from Dali::RenderSurface
   /**
    * @copydoc Dali::RenderSurface::GetSurface()
    */
-  virtual boost::any GetSurface() = 0;
+  virtual Any GetSurface() = 0;
 
   /**
    * @copydoc Dali::RenderSurface::GetDisplay()
    */
-  virtual boost::any GetDisplay();
+  virtual Any GetDisplay();
 
   /**
    * @copydoc Dali::RenderSurface::GetPositionSize()
@@ -207,14 +207,14 @@ private:
    * Sets the display, if display parameter is empty it opens a new display
    * @param display
    */
-  void SetDisplay( boost::any display );
+  void SetDisplay( Any display );
 
   /**
    * Get the surface id if the surface parameter is not empty
-   * @param surface boost::any containing a surface id, or can be empty
+   * @param surface Any containing a surface id, or can be empty
    * @return surface id, or zero if surface is empty
    */
-  unsigned int GetSurfaceId( boost::any surface ) const;
+  unsigned int GetSurfaceId( Any surface ) const;
 
 protected:
 
index 5e8c9cb..9e67e06 100644 (file)
@@ -46,8 +46,8 @@ NativeBufferRenderSurface::NativeBufferRenderSurface( native_buffer_provider* pr
                                                       native_buffer_pool* pool,
                                                       unsigned int maxBufferCount,
                                                       Dali::PositionSize positionSize,
-                                                      boost::any surface,
-                                                      boost::any display,
+                                                      Any surface,
+                                                      Any display,
                                                       const std::string& name,
                                                       bool isTransparent )
 : RenderSurface( Dali::RenderSurface::NATIVE_BUFFER, positionSize, surface, display, "native_buffer", isTransparent ),
@@ -84,10 +84,10 @@ Dali::RenderSurface::SurfaceType NativeBufferRenderSurface::GetType()
   return Dali::RenderSurface::NATIVE_BUFFER;
 }
 
-boost::any NativeBufferRenderSurface::GetSurface()
+Any NativeBufferRenderSurface::GetSurface()
 {
   DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
-  return boost::any();
+  return Any();
 }
 
 void NativeBufferRenderSurface::InitializeEgl( EglInterface& egl )
index b12387b..2851737 100644 (file)
@@ -52,8 +52,8 @@ public:
                              native_buffer_pool* pool,
                              unsigned int maxBufferCount,
                              Dali::PositionSize positionSize,
-                             boost::any surface,
-                             boost::any display,
+                             Any surface,
+                             Any display,
                              const std::string& name,
                              bool isTransparent );
 
@@ -79,7 +79,7 @@ public: // from Dali::RenderSurface
   /**
    * @copydoc Dali::RenderSurface::GetSurface()
    */
-  virtual boost::any GetSurface();
+  virtual Any GetSurface();
 
 public: // from Internal::Adaptor::RenderSurface
 
index a51365e..d0a5767 100644 (file)
@@ -49,8 +49,8 @@ namespace ECoreX
 {
 
 PixmapRenderSurface::PixmapRenderSurface( Dali::PositionSize positionSize,
-                              boost::any surface,
-                              boost::any display,
+                              Any surface,
+                              Any display,
                               const std::string& name,
                               bool isTransparent)
 : RenderSurface( Dali::RenderSurface::PIXMAP, positionSize, surface, display, name, isTransparent )
@@ -79,9 +79,9 @@ Dali::RenderSurface::SurfaceType PixmapRenderSurface::GetType()
   return Dali::RenderSurface::PIXMAP;
 }
 
-boost::any PixmapRenderSurface::GetSurface()
+Any PixmapRenderSurface::GetSurface()
 {
-  return boost::any( mX11Pixmap );
+  return Any( mX11Pixmap );
 }
 
 void PixmapRenderSurface::InitializeEgl( EglInterface& eglIf )
index c3742cb..545151d 100644 (file)
@@ -49,8 +49,8 @@ public:
     * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
     */
   PixmapRenderSurface( Dali::PositionSize positionSize,
-                       boost::any surface,
-                       boost::any display,
+                       Any surface,
+                       Any display,
                        const std::string& name,
                        bool isTransparent = false);
 
@@ -76,7 +76,7 @@ public: // from Dali::RenderSurface
   /**
    * @copydoc Dali::RenderSurface::GetSurface()
    */
-  virtual boost::any GetSurface();
+  virtual Any GetSurface();
 
 public: // from Internal::Adaptor::RenderSurface
 
index cadb610..6b28931 100644 (file)
@@ -56,8 +56,8 @@ const int MINIMUM_DIMENSION_CHANGE( 1 ); ///< Minimum change for window to be co
 } // unnamed namespace
 
 WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize,
-                                          boost::any surface,
-                                          boost::any display,
+                                          Any surface,
+                                          Any display,
                                           const std::string& name,
                                           bool isTransparent)
 : RenderSurface( Dali::RenderSurface::WINDOW, positionSize, surface, display, name, isTransparent ),
@@ -86,10 +86,10 @@ Dali::RenderSurface::SurfaceType WindowRenderSurface::GetType()
   return Dali::RenderSurface::WINDOW;
 }
 
-boost::any WindowRenderSurface::GetSurface()
+Any WindowRenderSurface::GetSurface()
 {
   // already an e-core type
-  return boost::any( mX11Window );
+  return Any( mX11Window );
 }
 
 Ecore_X_Window WindowRenderSurface::GetXWindow()
index 373bf2a..b544987 100644 (file)
@@ -49,8 +49,8 @@ public:
     * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
     */
   WindowRenderSurface( Dali::PositionSize positionSize,
-                       boost::any surface,
-                       boost::any display,
+                       Any surface,
+                       Any display,
                        const std::string& name,
                        bool isTransparent = false );
 
@@ -82,7 +82,7 @@ public: // from Dali::RenderSurface
   /**
    * @copydoc Dali::RenderSurface::GetSurface()
    */
-  virtual boost::any GetSurface();
+  virtual Any GetSurface();
 
   /**
    * @copydoc Dali::RenderSurface::GetDrawable()
index 7f338c8..6677209 100644 (file)
@@ -129,7 +129,7 @@ BaseHandle Create()
     Dali::RenderSurface& surface( adaptorImpl.GetSurface() );
     if( surface.GetType() == Dali::RenderSurface::WINDOW )
     {
-      ecoreXwin = boost::any_cast< Ecore_X_Window >( adaptorImpl.GetSurface().GetSurface() );
+      ecoreXwin = AnyCast< Ecore_X_Window >( adaptorImpl.GetSurface().GetSurface() );
     }
 
     // If we fail to get Ecore_X_Window, we can't use the ImfManager correctly.
index 381418e..4fbdb39 100644 (file)
@@ -162,7 +162,7 @@ namespace
   }
 }
 
-PixmapImage* PixmapImage::New(unsigned int width, unsigned int height, Dali::PixmapImage::ColorDepth depth, Dali::Adaptor& adaptor,  boost::any pixmap )
+PixmapImage* PixmapImage::New(unsigned int width, unsigned int height, Dali::PixmapImage::ColorDepth depth, Dali::Adaptor& adaptor,  Any pixmap )
 {
   PixmapImage* image = new PixmapImage( width, height, depth, adaptor, pixmap );
   DALI_ASSERT_DEBUG( image && "PixmapImage allocation failed." );
@@ -176,7 +176,7 @@ PixmapImage* PixmapImage::New(unsigned int width, unsigned int height, Dali::Pix
   return image;
 }
 
-PixmapImage::PixmapImage(unsigned int width, unsigned int height, Dali::PixmapImage::ColorDepth depth, Dali::Adaptor& adaptor, boost::any pixmap)
+PixmapImage::PixmapImage(unsigned int width, unsigned int height, Dali::PixmapImage::ColorDepth depth, Dali::Adaptor& adaptor, Any pixmap)
 : mWidth(width),
   mHeight(height),
   mOwnPixmap(true),
@@ -188,7 +188,7 @@ PixmapImage::PixmapImage(unsigned int width, unsigned int height, Dali::PixmapIm
   mEglImageKHR(NULL)
 {
   // assign the pixmap
-  mPixmap = GetPixmapFromBoostAny(pixmap);
+  mPixmap = GetPixmapFromAny(pixmap);
 }
 
 void PixmapImage::Initialize()
@@ -199,10 +199,10 @@ void PixmapImage::Initialize()
   // get the X11 display pointer and store it
   // it is used by eglCreateImageKHR, and XFreePixmap
   // Any other display (x-connection) will fail in eglCreateImageKHR
-  boost::any display = surface.GetDisplay();
+  Any display = surface.GetDisplay();
 
   // the dali display pointer is needed
-  mDisplay = boost::any_cast<Ecore_X_Display*>(display);
+  mDisplay = AnyCast<Ecore_X_Display*>(display);
 
   // if pixmap has been created outside of X11 Image we can return
   if (mPixmap)
@@ -222,11 +222,11 @@ void PixmapImage::Initialize()
   SetPixelFormat(depth);
 
   // Get the X-Renderable for which the pixmap is created on
-  boost::any renderableSurface =  surface.GetSurface();
+  Any renderableSurface =  surface.GetSurface();
 
   // if Dali is using a Pixmap or Window to render to it doesn't matter because they have the same
   // underlying type of unsigned long
-  Ecore_X_Window daliWindow = boost::any_cast< Ecore_X_Window >(renderableSurface);
+  Ecore_X_Window daliWindow = AnyCast< Ecore_X_Window >(renderableSurface);
 
   mPixmap = ecore_x_pixmap_new(daliWindow, mWidth, mHeight, depth);
   ecore_x_sync();
@@ -249,26 +249,26 @@ PixmapImage::~PixmapImage()
   }
 }
 
-boost::any PixmapImage::GetPixmap(Dali::PixmapImage::PixmapAPI api) const
+Any PixmapImage::GetPixmap(Dali::PixmapImage::PixmapAPI api) const
 {
 
   if (api == Dali::PixmapImage::ECORE_X11)
   {
     // return ecore x11 type
-    return boost::any(mPixmap);
+    return Any(mPixmap);
   }
   else
   {
     // return x11 type after casting it
     Pixmap pixmap=  static_cast<Pixmap>(mPixmap);
-    return boost::any(pixmap);
+    return Any(pixmap);
   }
 }
 
-boost::any PixmapImage::GetDisplay() const
+Any PixmapImage::GetDisplay() const
 {
   // return ecore x11 type
-  return boost::any(mDisplay);
+  return Any(mDisplay);
 }
 
 bool PixmapImage::GetPixels(std::vector<unsigned char>& pixbuf, unsigned& width, unsigned& height, Pixel::Format& pixelFormat) const
@@ -490,25 +490,25 @@ void PixmapImage::SetPixelFormat(int depth)
   }
 }
 
-Ecore_X_Pixmap PixmapImage::GetPixmapFromBoostAny(boost::any pixmap) const
+Ecore_X_Pixmap PixmapImage::GetPixmapFromAny(Any pixmap) const
 {
-  if (pixmap.empty())
+  if (pixmap.Empty())
   {
     return 0;
   }
 
   // see if it is of type x11 pixmap
-  if (pixmap.type() == typeid (Pixmap))
+  if (pixmap.GetType() == typeid (Pixmap))
   {
     // get the x pixmap type
-    Pixmap xpixmap = boost::any_cast<Pixmap>(pixmap);
+    Pixmap xpixmap = AnyCast<Pixmap>(pixmap);
 
     // cast it to a ecore pixmap type
     return static_cast<Ecore_X_Pixmap>(xpixmap);
   }
   else
   {
-    return boost::any_cast<Ecore_X_Pixmap>(pixmap);
+    return AnyCast<Ecore_X_Pixmap>(pixmap);
   }
 }
 
index f546ec6..682399c 100644 (file)
@@ -55,17 +55,17 @@ public:
                           unsigned int height,
                           Dali::PixmapImage::ColorDepth depth,
                           Dali::Adaptor& adaptor,
-                          boost::any pixmap);
+                          Any pixmap);
 
    /**
     * @copydoc Dali::PixmapImage::GetPixmap()
     */
-  boost::any GetPixmap(Dali::PixmapImage::PixmapAPI api) const;
+  Any GetPixmap(Dali::PixmapImage::PixmapAPI api) const;
 
   /**
    * @copydoc Dali::PixmapImage::GetDisplay()
    */
-  boost::any GetDisplay() const;
+  Any GetDisplay() const;
 
   /**
    * @copydoc Dali::PixmapImage::GetPixels()
@@ -135,7 +135,7 @@ private:
               unsigned  int height,
               Dali::PixmapImage::ColorDepth depth,
               Dali::Adaptor &adaptor,
-              boost::any pixmap);
+              Any pixmap);
 
   /**
    * 2nd phase construction.
@@ -156,11 +156,11 @@ private:
   void SetPixelFormat(int depth);
 
   /**
-   * Gets the pixmap from the boost::any parameter
+   * Gets the pixmap from the Any parameter
    * @param pixmap contains either: pixmap of type X11 Pixmap , a Ecore_X_Pixmap or is empty
    * @return pixmap x11 pixmap
    */
-  Ecore_X_Pixmap GetPixmapFromBoostAny(boost::any pixmap) const;
+  Ecore_X_Pixmap GetPixmapFromAny(Any pixmap) const;
 
   /**
    * Given an existing pixmap, the function uses X to find out
index 637564d..f2c7607 100644 (file)
@@ -322,8 +322,8 @@ Window::~Window()
 void Window::Initialize(const PositionSize& windowPosition, const std::string& name)
 {
   // create an X11 window by default
-  boost::any surface;
-  boost::any display;
+  Any surface;
+  Any display;
   mSurface = new ECoreX::WindowRenderSurface( windowPosition, surface, display, name, mIsTransparent );
   mOrientation = Orientation::New(this);
 
index 1363b38..ca5378e 100644 (file)
@@ -765,7 +765,7 @@ EvasPlugin::EvasPlugin(Dali::EvasPlugin& evasPlugin, Evas_Object* parent, bool i
   mEvasDirtyIdler(NULL)
 {
   DALI_ASSERT_ALWAYS( parent && "No parent object for plugin" );
-  mEvas = boost::any_cast<Evas*>(evas_object_evas_get(parent));
+  mEvas = AnyCast<Evas*>(evas_object_evas_get(parent));
 
   /* create evas object image */
   CreateEvasImageObject(mEvas, initialWidth, initialHeight, isTransparent);
@@ -985,9 +985,9 @@ void EvasPlugin::CreateAdaptor(unsigned int initialWidth, unsigned int initialHe
 
   mAdaptor = Internal::Adaptor::Adaptor::New( mSurface, DeviceLayout::DEFAULT_BASE_LAYOUT );
 
-  boost::any surface = mSurface->GetSurface();
+  Any surface = mSurface->GetSurface();
 
-  Ecore_X_Pixmap pixmap = boost::any_cast<Ecore_X_Pixmap>(surface);
+  Ecore_X_Pixmap pixmap = AnyCast<Ecore_X_Pixmap>(surface);
 
   /* set native pixmap surface */
   Evas_Native_Surface ns;
@@ -1002,8 +1002,8 @@ void EvasPlugin::CreateAdaptor(unsigned int initialWidth, unsigned int initialHe
 ECoreX::RenderSurface* EvasPlugin::CreateSurface( int width, int height )
 {
   PositionSize pixmapSize( 0, 0, width, height );
-  boost::any surface;
-  boost::any display;
+  Any surface;
+  Any display;
   // if we already have surface, reuse its display
   if( mSurface )
   {
@@ -1029,8 +1029,8 @@ void EvasPlugin::ResizeSurface()
 
   // update the pixmap for evas
   {
-    boost::any surface = mSurface->GetSurface();
-    Ecore_X_Pixmap pixmap = boost::any_cast<Ecore_X_Pixmap>( surface );
+    Any surface = mSurface->GetSurface();
+    Ecore_X_Pixmap pixmap = AnyCast<Ecore_X_Pixmap>( surface );
 
     Evas_Native_Surface ns;
     ns.type = EVAS_NATIVE_SURFACE_X11;
index 5096bbb..4acbe83 100644 (file)
@@ -247,9 +247,9 @@ static Eina_Bool LiveboxDamageCallback(void *data, int type, void *event)
   Ecore_X_Event_Damage *ev = (Ecore_X_Event_Damage *)event;
 
   // get the EFL type for the surface
-  boost::any surface = liveboxPlugin->mSurface->GetSurface();
+  Any surface = liveboxPlugin->mSurface->GetSurface();
 
-  Ecore_X_Pixmap pixmap = boost::any_cast<Ecore_X_Pixmap>(surface);
+  Ecore_X_Pixmap pixmap = AnyCast<Ecore_X_Pixmap>(surface);
 
   if (!ev || !liveboxPlugin->mDamage)
   {
@@ -356,7 +356,7 @@ void LiveboxPlugin::OnInit()
 
 void LiveboxPlugin::CreateSurface(Ecore_X_Pixmap pixmap)
 {
-  boost::any display;
+  Any display;
 
   if(mSurface)
   {
index 080d912..38fc28c 100644 (file)
@@ -120,8 +120,8 @@ ECoreX::RenderSurface* NativeBufferPlugin::CreateSurface( int width, int height,
   DALI_LOG_TRACE_METHOD( gLogFilter );
 
   PositionSize positionSize( 0, 0, width, height );
-  boost::any surface;
-  boost::any display;
+  Any surface;
+  Any display;
 
   // if we already have surface, reuse its display
   if( mSurface )
index f80f2de..5dfc689 100644 (file)
 // INTERNAL INCLUDES
 #include <internal/common/pixmap-image-impl.h>
 
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/any.h>
+
 namespace Dali
 {
 
 PixmapImagePtr PixmapImage::New(unsigned int width, unsigned int height, ColorDepth depth, Adaptor& adaptor)
 {
-  boost::any empty;
+  Any empty;
   PixmapImagePtr image = new PixmapImage(width, height, depth, adaptor, empty);
   return image;
 }
 
-PixmapImagePtr PixmapImage::New(boost::any pixmap, Adaptor& adaptor)
+PixmapImagePtr PixmapImage::New(Any pixmap, Adaptor& adaptor)
 {
   PixmapImagePtr image = new PixmapImage(0, 0, COLOR_DEPTH_DEFAULT, adaptor, pixmap);
   return image;
 }
 
-boost::any PixmapImage::GetPixmap(PixmapAPI api)
+Any PixmapImage::GetPixmap(PixmapAPI api)
 {
   return mImpl->GetPixmap(api);
 }
 
-boost::any PixmapImage::GetDisplay()
+Any PixmapImage::GetDisplay()
 {
   return mImpl->GetDisplay();
 }
@@ -91,7 +94,7 @@ Pixel::Format PixmapImage::GetPixelFormat() const
   return mImpl->GetPixelFormat();
 }
 
-PixmapImage::PixmapImage(unsigned int width, unsigned int height, ColorDepth depth, Adaptor& adaptor, boost::any pixmap)
+PixmapImage::PixmapImage(unsigned int width, unsigned int height, ColorDepth depth, Adaptor& adaptor, Any pixmap)
 {
    mImpl = Internal::Adaptor::PixmapImage::New( width, height, depth, adaptor, pixmap);
 }
index 58c0412..7594b94 100644 (file)
@@ -36,8 +36,8 @@ RenderSurface::~RenderSurface()
 RenderSurface* CreateDefaultSurface( RenderSurface::SurfaceType type, PositionSize positionSize, const std::string& name )
 {
   // create a Ecore X11 window by default
-  boost::any surface;
-  boost::any display;
+  Any surface;
+  Any display;
 
   Internal::Adaptor::ECoreX::RenderSurface* renderSurface(NULL);
   if( RenderSurface::WINDOW == type )
index 3fe06d7..aab42c3 100644 (file)
@@ -48,7 +48,7 @@ public:
 int
 main(int argc, char **argv)
 {
-  boost::any nullPtr;
+  Any nullPtr;
 
   NativeBufferPlugin* plugin = new NativeBufferPlugin(400, 400, false, 2, RenderSurface::RENDER_30FPS);
 
index fa8830a..73a23ef 100644 (file)
@@ -24,8 +24,8 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/vector-wrapper.h>
-#include <boost/any.hpp>
 #include <dali/public-api/images/native-image.h>
+#include <dali/public-api/object/any.h>
 
 namespace Dali DALI_IMPORT_API
 {
@@ -96,24 +96,24 @@ public:
    * @param[in] adaptor reference to dali adaptor
    * @return A smart-pointer to a newly allocated image.
    */
-  static PixmapImagePtr New( boost::any pixmap, Adaptor& adaptor );
+  static PixmapImagePtr New( Any pixmap, Adaptor& adaptor );
 
   /**
    * @brief Retrieve the internal pixmap
    *
    * @param api whether to return a pixmap that can be used with X11 or EFL
-   * @return pixmap boost any object containing a pixmap of the type specified PixmapAPI
+   * @return pixmap any object containing a pixmap of the type specified PixmapAPI
    */
-  boost::any GetPixmap( PixmapAPI api );
+  Any GetPixmap( PixmapAPI api );
 
   /**
    * @brief Retrieve the display used to create the pixmap.
    *
    * If the pixmap was created outside of Dali, then this display
    * is the one Dali uses internally.
-   * @return boost any object containing the display
+   * @return Any object containing the display
    */
-  boost::any GetDisplay();
+  Any GetDisplay();
 
   /**
    * @brief Get a copy of the pixels used by PixmapImage.
@@ -186,7 +186,7 @@ private:
    * @param[in] adaptor a reference to Dali adaptor
    * @param[in] pixmap contains either: pixmap of type X11 Pixmap , a Ecore_X_Pixmap or is empty
    */
-  PixmapImage(unsigned int width, unsigned int height, ColorDepth depth, Adaptor& adaptor, boost::any pixmap);
+  PixmapImage(unsigned int width, unsigned int height, ColorDepth depth, Adaptor& adaptor, Any pixmap);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -199,6 +199,7 @@ private:
    * @brief Undefined assignment operator.
    *
    * This avoids accidental calls to a default assignment operator.
+   * @param[in] rhs A reference to the object to copy.
    */
   PixmapImage& operator=(const PixmapImage& rhs);
 
index 04d90ab..6f9144e 100644 (file)
@@ -23,9 +23,9 @@
  */
 
 // EXTERNAL INCLUDES
-#include <boost/any.hpp>
 #include <string>
 #include <dali/public-api/math/rect.h>
+#include <dali/public-api/object/any.h>
 
 namespace Dali DALI_IMPORT_API
 {
@@ -42,6 +42,8 @@ typedef Dali::Rect<int> PositionSize;
  * usually a window in the native windowing system, or some other
  * mapped pixel buffer.
  *
+ * Dali::Application will automatically create a render surface using a window.
+ *
  * The implementation of the factory method below should choose an appropriate
  * implementation of RenderSurface for the given platform
  */
@@ -97,13 +99,13 @@ public:
    * @brief Returns the window or pixmap surface.
    * @return surface
    */
-  virtual boost::any GetSurface() = 0;
+  virtual Any GetSurface() = 0;
 
   /**
    * @brief Returns the display.
    * @return display
    */
-  virtual boost::any GetDisplay() = 0;
+  virtual Any GetDisplay() = 0;
 
   /**
    * @brief Return the size and position of the surface.
index 4bbef8a..d15e244 100644 (file)
@@ -23,7 +23,6 @@
  */
 
 // EXTERNAL INCLUDES
-#include <boost/any.hpp>
 #include <boost/function.hpp>
 
 #include <dali/public-api/signals/dali-signal-v2.h>