X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-base-impl.cpp;h=7add0247e08f04212ae94b3094d9d567bd539686;hb=ab5c560f8956e7b795b7cc2072d06a61aef103b7;hp=8a6f24b6a2ddadbab31ae6bda54d3096e98bb0d3;hpb=ffef1f9f5d7d0f6beff38e628d0f4b91c61b62d4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/visual-base-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp index 8a6f24b..7add024 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -221,7 +221,7 @@ void Visual::Base::GetNaturalSize( Vector2& naturalSize ) naturalSize = Vector2::ZERO; } -void Visual::Base::SetDepthIndex( float index ) +void Visual::Base::SetDepthIndex( int index ) { mImpl->mDepthIndex = index; if( mImpl->mRenderer ) @@ -230,7 +230,7 @@ void Visual::Base::SetDepthIndex( float index ) } } -float Visual::Base::GetDepthIndex() const +int Visual::Base::GetDepthIndex() const { return mImpl->mDepthIndex; } @@ -401,6 +401,37 @@ const Vector4& Visual::Base::GetMixColor() const return mImpl->mMixColor; } +void Visual::Base::AddResourceObserver( Visual::ResourceObserver& observer) +{ + mImpl->mResourceObserver = &observer; +} + +void Visual::Base::RemoveResourceObserver( Visual::ResourceObserver& observer ) +{ + mImpl->mResourceObserver = NULL; +} + +void Visual::Base::ResourceReady() +{ + if( mImpl->mResourceReady ) + { + // only inform the observer the first time the resource is ready + return; + } + mImpl->mResourceReady = true; + + if( mImpl->mResourceObserver ) + { + // observer is currently a control impl + mImpl->mResourceObserver->ResourceReady( *this ); + } +} + +bool Visual::Base::IsResourceReady() const +{ + return mImpl->mResourceReady; +} + Renderer Visual::Base::GetRenderer() { return mImpl->mRenderer;