Merge "Add video view control" into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-native-image-source.cpp
1 /*
2  * Copyright (c) 2015 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
18 // CLASS HEADER
19 #include <dali/public-api/adaptor-framework/native-image-source.h>
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/any.h>
23
24 namespace Dali
25 {
26
27 NativeImageSourcePtr NativeImageSource::New( unsigned int width, unsigned int height, ColorDepth depth )
28 {
29   Any empty;
30   NativeImageSourcePtr image = new NativeImageSource( width, height, depth, empty );
31   return image;
32 }
33
34 Any NativeImageSource::GetNativeImageSource()
35 {
36   Any source;
37   return source;
38 }
39
40 NativeImageSourcePtr NativeImageSource::New( Any nativeImageSource )
41 {
42   NativeImageSourcePtr image = new NativeImageSource(0, 0, COLOR_DEPTH_DEFAULT, nativeImageSource);
43   return image;
44 }
45
46 bool NativeImageSource::GetPixels( std::vector<unsigned char> &pixbuf, unsigned int &width, unsigned int &height, Pixel::Format& pixelFormat ) const
47 {
48   return false;
49 }
50
51 bool NativeImageSource::EncodeToFile(const std::string& filename) const
52 {
53   return false;
54 }
55
56 void NativeImageSource::SetSource( Any source )
57 {
58 }
59
60 bool NativeImageSource::IsColorDepthSupported( ColorDepth colorDepth )
61 {
62   return false;
63 }
64
65 bool NativeImageSource::GlExtensionCreate()
66 {
67   return false;
68 }
69
70 void NativeImageSource::GlExtensionDestroy()
71 {
72 }
73
74 unsigned int NativeImageSource::TargetTexture()
75 {
76   return 0;
77 }
78
79 void NativeImageSource::PrepareTexture()
80 {
81 }
82
83 unsigned int NativeImageSource::GetWidth() const
84 {
85   return 0;
86 }
87
88 unsigned int NativeImageSource::GetHeight() const
89 {
90   return 0;
91 }
92
93 bool NativeImageSource::RequiresBlending() const
94 {
95   return false;
96 }
97
98 NativeImageInterface::Extension* NativeImageSource::GetExtension()
99 {
100   return NULL;
101 }
102
103 NativeImageSource::NativeImageSource( unsigned int width, unsigned int height, ColorDepth depth, Any nativeImageSource )
104 {
105 }
106
107 NativeImageSource::~NativeImageSource()
108 {
109 }
110
111 } // namespace Dali