X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Fsuper-blur-view%2Fsuper-blur-view.h;h=c7b29bee1fdc7fcbe0ee98218eb0bef88b02f72d;hb=HEAD;hp=ab9ec4449ba47e27a70fb9261a5437a45fb3f32f;hpb=1c5674a11a51310ee689d6daf4e6b7d94dec607e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h b/dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h index ab9ec44..c7b29be 100644 --- a/dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h +++ b/dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_SUPER_BLUR_VIEW_H__ -#define __DALI_TOOLKIT_SUPER_BLUR_VIEW_H__ +#ifndef DALI_TOOLKIT_SUPER_BLUR_VIEW_H +#define DALI_TOOLKIT_SUPER_BLUR_VIEW_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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,16 +19,15 @@ */ // EXTERNAL INCLUDES +#include // INTERNAL INCLUDES #include namespace Dali { - namespace Toolkit { - namespace Internal DALI_INTERNAL { class SuperBlurView; @@ -40,29 +39,27 @@ class SuperBlurView; * * // initialise\n * SuperBlurView blurView = SuperBlurView::New( blurLevels );\n - * blurView.SetSize(); // it is important to set the display size before set the input image!! + * blurView.SetProperty( Actor::Property::SIZE, size ); // it is important to set the display size before set the input image!! * Stage::GetCurrent().Add(blurView);\n * * // Set the input image - * Image image = Image::New(...);\n - * blurView.SetImage(image);\n + * blurView.SetProperty( SuperBlurView::Property::IMAGE_URL, url );\n * * // animate the strength of the blur - this can fade between no blur and full blur. .\n * Animation blurAnimation = Animation::New( ... );\n * blurAnimation.AnimateTo( Property( blurView, blurView.GetBlurStrengthPropertyIndex() ), ... );\n * blurAnimation.Play();\n */ -class DALI_IMPORT_API SuperBlurView : public Control +class DALI_TOOLKIT_API SuperBlurView : public Control { public: - /** * @brief The start and end property ranges for this control. */ enum PropertyRange { PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices }; /** @@ -72,14 +69,14 @@ public: { enum { - IMAGE = PROPERTY_START_INDEX, ///< name "image", @see SetImage, type Map + IMAGE_URL = PROPERTY_START_INDEX, ///< name "imageUrl", @see SetTexture, type String }; }; /** * @brief Signal type for notifications. */ - typedef Signal< void (SuperBlurView source) > SuperBlurViewSignal; + typedef Signal SuperBlurViewSignal; /** * @brief Creates an empty SuperBlurView handle. @@ -89,10 +86,10 @@ public: /** * @brief Create an initialized SuperBlurView. * - * @param[in] blurLevels The final blur strength level. It decides how many filtering passes are used to create the group of blurred images. + * @param[in] blurLevels The final blur strength level. It decides how many filtering passes are used to create the group of blurred textures. * @return A handle to a newly allocated Dali resource */ - static SuperBlurView New( unsigned int blurLevels ); + static SuperBlurView New(unsigned int blurLevels); /** * @brief Copy constructor. @@ -100,7 +97,7 @@ public: * Creates another handle that points to the same real object. * @param[in] handle the handle to copy from */ - SuperBlurView( const SuperBlurView& handle ); + SuperBlurView(const SuperBlurView& handle); /** * @brief Assignment operator. @@ -109,7 +106,24 @@ public: * @param[in] rhs the handle to copy from * @return a reference to this */ - SuperBlurView& operator=( const SuperBlurView& rhs ); + SuperBlurView& operator=(const SuperBlurView& rhs); + + /** + * @brief Move constructor. + * + * Creates another handle that points to the same real object. + * @param[in] handle the handle to move from + */ + SuperBlurView(SuperBlurView&& handle); + + /** + * @brief Move assignment operator. + * + * Changes this handle to point to another real object. + * @param[in] rhs the handle to move from + * @return a reference to this + */ + SuperBlurView& operator=(SuperBlurView&& rhs); /** * @brief Destructor @@ -126,14 +140,14 @@ public: * @param[in] handle Handle to an object * @return handle to a SuperBlurView or an uninitialized handle */ - static SuperBlurView DownCast( BaseHandle handle ); + static SuperBlurView DownCast(BaseHandle handle); /** - * @brief Sets a custom image to be blurred. + * @brief Sets a custom texture to be blurred. * - * @param[in] inputImage The image that the user wishes to blur + * @param[in] texture The texture that the user wishes to blur */ - void SetImage(Image inputImage); + void SetTexture(Texture texture); /** * @brief Get the index of the property that can be used to fade the blur in / out. @@ -145,11 +159,11 @@ public: Dali::Property::Index GetBlurStrengthPropertyIndex() const; /** - * @brief Set the blur strength to display the image. + * @brief Set the blur strength to display the texture. * - * @param[in] blurStrength The blur strength used to display the image. + * @param[in] blurStrength The blur strength used to display the texture. */ - void SetBlurStrength( float blurStrength ); + void SetBlurStrength(float blurStrength); /** * @brief Get the current blur strength. @@ -166,16 +180,15 @@ public: SuperBlurViewSignal& BlurFinishedSignal(); /** - * @brief Get the blurred image. + * @brief Get the blurred texture. * * Should wait for the BlurFinishedSignal before calling this method. - * @param[in] level Indicate which blurred image to get, must be a value between 1 and blurLevels - * @return The level-th blurred image + * @param[in] level Indicate which blurred texture to get, must be a value between 1 and blurLevels + * @return The level-th blurred texture */ - Image GetBlurredImage( unsigned int level ); + Texture GetBlurredTexture(unsigned int level); public: // Not intended for application developers - /** * @brief Creates a handle using the Toolkit::Internal implementation. * @@ -195,4 +208,4 @@ public: // Not intended for application developers } // namespace Dali -#endif /* __DALI_TOOLKIT_SUPER_BLUR_VIEW_H__ */ +#endif /* DALI_TOOLKIT_SUPER_BLUR_VIEW_H */