Revert "[Tizen] Fix build errors in adaptor-uv by ecore wayland"
[platform/core/uifw/dali-adaptor.git] / adaptors / emscripten / wrappers / emscripten-utils.h
1 #ifndef __DALI_EMSCRIPTEN_UTILS_H__
2 #define __DALI_EMSCRIPTEN_UTILS_H__
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <string>
23 #include <dali/public-api/dali-core.h>
24 #include "emscripten/val.h"
25
26 // INTERNAL INCLUDES
27
28 namespace Dali
29 {
30 namespace Internal
31 {
32 namespace Emscripten
33 {
34
35 /**
36  * Creates a Dali RGBA Image from raw bytes
37  *
38  * @param[in] width The image width
39  * @param[in] height The image height
40  * @param[in] data The byte data
41  * @returns The Dali Image
42  *
43  */
44 Dali::Image CreateImageRGBA(unsigned int width, unsigned int height, const std::string& data);
45
46 /**
47  * Creates a Dali RGB Image from raw bytes
48  *
49  * @param[in] width The image width
50  * @param[in] height The image height
51  * @param[in] data The byte data
52  * @returns The Dali Image
53  *
54  */
55 Dali::Image CreateImageRGB(unsigned int width, unsigned int height, const std::string& data);
56
57 /**
58  * Creates a dali Image from encoded bytes (ie jpg/png etc)
59  *
60  * @param[in] data The byte data
61  *
62  * @returns The Dali Image
63  *
64  */
65 Dali::Image GetImage(const std::string& data);
66
67 }; // namespace Emscripten
68 }; // namespace Internal
69 }; // namespace Dali
70
71 #endif // header