X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fimages%2Fimage-impl.cpp;h=49d7f54350cca2c24bba6a78d1006d33339820f0;hb=79b35a933c58857c4d6d67284b8ae4e53d171a87;hp=29a34af140d9d4493bb1387e5ad20f4e69f4610d;hpb=c5dfcc2597aa53eef1bcb0efec67955b0436fe8f;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/images/image-impl.cpp b/dali/internal/event/images/image-impl.cpp index 29a34af..49d7f54 100644 --- a/dali/internal/event/images/image-impl.cpp +++ b/dali/internal/event/images/image-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -26,7 +26,6 @@ #include #include -#include #include #include @@ -38,60 +37,6 @@ namespace Dali namespace Internal { -namespace -{ - -// Signals - -const char* const SIGNAL_IMAGE_UPLOADED = "uploaded"; - -TypeRegistration mType( typeid( Dali::Image ), typeid( Dali::BaseHandle ), NULL ); - -Dali::SignalConnectorType signalConnector1( mType, SIGNAL_IMAGE_UPLOADED, &Image::DoConnectSignal ); - -} - -bool Image::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ) -{ - bool connected( true ); - DALI_ASSERT_DEBUG( dynamic_cast( object ) && "Resource ticket not ImageTicket subclass for image resource.\n" ); - Image* image = static_cast(object); - - if( 0 == strcmp( signalName.c_str(), SIGNAL_IMAGE_UPLOADED ) ) - { - image->UploadedSignal().Connect( tracker, functor ); - } - else - { - // signalName does not match any signal - connected = false; - } - - return connected; -} - -ResourceId Image::GetResourceId() const -{ - ResourceId ret = mTicket ? mTicket->GetId() : 0; - - return ret; -} - -void Image::ResourceLoadingFailed(const ResourceTicket& ticket) -{ - // do nothing -} - -void Image::ResourceLoadingSucceeded(const ResourceTicket& ticket) -{ - // do nothing -} - -void Image::ResourceUploaded(const ResourceTicket& ticket) -{ - mUploaded.Emit( Dali::Image( this ) ); -} - unsigned int Image::GetWidth() const { return mWidth; @@ -104,7 +49,7 @@ unsigned int Image::GetHeight() const Vector2 Image::GetNaturalSize() const { - return Vector2( mWidth, mHeight ); + return Vector2( static_cast( mWidth ), static_cast( mHeight ) ); } Image::Image() @@ -117,12 +62,6 @@ Image::Image() Image::~Image() { - if( mTicket ) - { - mTicket->RemoveObserver( *this ); - mTicket.Reset(); - } - if( Stage::IsInstalled() ) { UnregisterObject();