X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fimage-view%2Fimage-view.h;h=01cb7b29ce76020fa3bd513bdd914ac8a1b6772e;hp=69bcbc3938ba7b4b94119a35e4f8fb10c8862e9a;hb=b694e7e2ae624e206e1548b1a863c554eb9cd4d7;hpb=867aa572372bf901975516db0fa77630754a8c27 diff --git a/dali-toolkit/public-api/controls/image-view/image-view.h b/dali-toolkit/public-api/controls/image-view/image-view.h index 69bcbc3..01cb7b2 100644 --- a/dali-toolkit/public-api/controls/image-view/image-view.h +++ b/dali-toolkit/public-api/controls/image-view/image-view.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_IMAGE_VIEW_H__ -#define __DALI_TOOLKIT_IMAGE_VIEW_H__ +#ifndef DALI_TOOLKIT_IMAGE_VIEW_H +#define DALI_TOOLKIT_IMAGE_VIEW_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. @@ -44,10 +44,36 @@ class ImageView; * * An instance of ImageView can be created using a URL or an Image instance. * + * Some resources can be loaded before the ImageView is staged ( already cached ), in these cases if the connection to + * ResouceReadySignal is done after the resource is set then signal will be missed. + * + * To protect against this, IsResourceReady() can be checked before connecting to ResourceReadySignal, + * or the signal connection can be done before setting the resource. + * + * @code + * auto myImageView = ImageView::New( resourceUrl ); + * if ( myImageView.IsResourceReady() ) + * { + * // do something + * } + * else + * { + * myImageView.ResourceReadySignal.Connect( .... ) + * } + * @endcode + * + * OR Connect to signal before setting resource + * + * @code + * auto myImageView = ImageView::New(); + * myImageView.ResourceReadySignal.Connect( .... ) + * myImageView.SetProperty( ImageView::Property::IMAGE, resourceUrl ); + * @endcode + * * @SINCE_1_0.0 * */ -class DALI_IMPORT_API ImageView : public Control +class DALI_TOOLKIT_API ImageView : public Control { public: @@ -284,4 +310,4 @@ public: // Not intended for application developers } // namespace Dali -#endif // __DALI_TOOLKIT_IMAGE_VIEW_H__ +#endif // DALI_TOOLKIT_IMAGE_VIEW_H