Register Transform uniforms in SVG Visual & only register shader properties upon...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / image-loader / async-image-loader.cpp
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 // CLASS HEADER
18 #include "async-image-loader.h"
19
20 // INTERNAL INCLUDES
21 #include <dali-toolkit/internal/image-loader/async-image-loader-impl.h>
22
23 namespace Dali
24 {
25
26 namespace Toolkit
27 {
28
29 AsyncImageLoader::AsyncImageLoader()
30 {
31 }
32
33 AsyncImageLoader::~AsyncImageLoader()
34 {
35 }
36
37 AsyncImageLoader::AsyncImageLoader( Internal::AsyncImageLoader* impl )
38 : BaseHandle( impl )
39 {}
40
41 AsyncImageLoader::AsyncImageLoader( const AsyncImageLoader& handle )
42 : BaseHandle( handle )
43 {
44 }
45
46 AsyncImageLoader& AsyncImageLoader::operator=( const AsyncImageLoader& handle )
47 {
48   BaseHandle::operator=(handle);
49   return *this;
50 }
51
52 AsyncImageLoader AsyncImageLoader::New()
53 {
54   IntrusivePtr<Internal::AsyncImageLoader> internal = Internal::AsyncImageLoader::New();
55    return AsyncImageLoader( internal.Get() );
56 }
57
58 uint32_t AsyncImageLoader::Load( const std::string& url )
59 {
60   return GetImplementation(*this).Load( url, ImageDimensions(), FittingMode::DEFAULT, SamplingMode::BOX_THEN_LINEAR, true );
61 }
62
63 uint32_t AsyncImageLoader::Load( const std::string& url, ImageDimensions size )
64 {
65   return GetImplementation(*this).Load( url, size, FittingMode::DEFAULT, SamplingMode::BOX_THEN_LINEAR, true );
66 }
67
68 uint32_t AsyncImageLoader::Load( const std::string& url,
69                                  ImageDimensions size,
70                                  FittingMode::Type fittingMode,
71                                  SamplingMode::Type samplingMode,
72                                  bool orientationCorrection )
73 {
74   return GetImplementation(*this).Load( url, size, fittingMode, samplingMode, orientationCorrection );
75 }
76
77 bool AsyncImageLoader::Cancel( uint32_t loadingTaskId)
78 {
79   return GetImplementation(*this).Cancel( loadingTaskId );
80 }
81
82 void AsyncImageLoader::CancelAll()
83 {
84   GetImplementation(*this).CancelAll();
85 }
86
87 AsyncImageLoader::ImageLoadedSignalType& AsyncImageLoader::ImageLoadedSignal()
88 {
89   return GetImplementation(*this).ImageLoadedSignal();
90 }
91 } // namespace Toolkit
92
93 } // namespace Dali