#ifndef __DALI_RENDER_SURFACE_H__
#define __DALI_RENDER_SURFACE_H__
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
/**
- * @addtogroup CAPI_DALI_FRAMEWORK
+ * @addtogroup CAPI_DALI_ADAPTOR_MODULE
* @{
*/
// 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
{
+/**
+ * @brief The position and size of the render surface.
+ */
typedef Dali::Rect<int> PositionSize;
/**
+ * @brief Interface for a render surface onto which Dali draws.
+ *
* Dali::Adaptor requires a render surface to draw on to. This is
* usually a window in the native windowing system, or some other
* mapped pixel buffer.
{
public:
/**
- * enumeration of surface types
+ * @brief enumeration of surface types
*/
enum SurfaceType
{
};
/**
- * When application uses pixmap surface, it can select rendering mode
+ * @brief When application uses pixmap surface, it can select rendering mode.
+ *
* RENDER_SYNC : application should call RenderSync() after posting the offscreen to onscreen
* RENDER_#FPS : the maximum performance will be limited designated number of frame
*/
};
/**
- * Constructor
+ * @brief Constructor
+ *
* Application or Adaptor needs to create the appropriate concrete RenderSurface type.
* @see CreateDefaultSurface
*/
RenderSurface();
/**
- * Virtual Destructor
+ * @brief Virtual Destructor.
*/
virtual ~RenderSurface();
/**
- * @returns the surface type
+ * @brief returns the surface type.
+ * @return the surface type
*/
virtual SurfaceType GetType() = 0;
/**
- * Returns the window or pixmap surface
+ * @brief Returns the window or pixmap surface.
* @return surface
*/
- virtual boost::any GetSurface() = 0;
+ virtual Any GetSurface() = 0;
/**
- * Returns the display
+ * @brief Returns the display.
* @return display
*/
- virtual boost::any GetDisplay() = 0;
+ virtual Any GetDisplay() = 0;
/**
- * Return the size and position of the surface
+ * @brief Return the size and position of the surface.
+ * @return The position and size
*/
virtual PositionSize GetPositionSize() const = 0;
/**
- * Set frame update rate for pixmap surface type
+ * @brief Set frame update rate for pixmap surface type
*/
virtual void SetRenderMode(RenderMode mode) = 0;
/**
- * Get current fps for pixmap surface type
+ * @brief Get current fps for pixmap surface type
+ * @return The render mode
*/
virtual RenderMode GetRenderMode() const = 0;
private:
/**
- * Undefined copy constructor and assignment operator. RenderSurface cannot be copied
+ * @brief Undefined copy constructor. RenderSurface cannot be copied
*/
RenderSurface( const RenderSurface& rhs );
+
+ /**
+ * @brief Undefined assignment operator. RenderSurface cannot be copied
+ */
RenderSurface& operator=( const RenderSurface& rhs );
};
/**
- * Default surface factory function.
+ * @brief Default surface factory function.
+ *
* A surface is created with the given type.
*
* @param [in] type the type of surface to create
* @param [in] positionSize the position and size of the surface to create
* @param [in] name optional name of surface passed in
+ * @return The render surface
*/
RenderSurface* CreateDefaultSurface( RenderSurface::SurfaceType type, PositionSize positionSize, const std::string& name = "" );