Merge "Added PixelBuffer for image loading and operations." into devel/master
[platform/core/uifw/dali-adaptor.git] / adaptors / emscripten / wrappers / property-value-wrapper.h
1 #ifndef __DALI_PROPERTY_VALUE_WRAPPER_H__
2 #define __DALI_PROPERTY_VALUE_WRAPPER_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  * Sets a property value From an Emscripten value. Recursively for Maps and Arrays
37  *
38  * @param[in] propertyValue The property value to set
39  * @param[in] fromVal The emscripten value to set from
40  *
41  */
42 void RecursiveSetProperty(Dali::Property::Value& propertyValue, const emscripten::val& fromVal);
43
44 /**
45  * Set an Emscripten value from a Dali property Value
46  *
47  * @param[in] value The Dali Property value
48  *
49  * @returns The Emscripten value
50  *
51  */
52 emscripten::val JavascriptValue( const Dali::Property::Value& value );
53
54 /**
55  * Gets a Dali value from a Dali Property Map
56  *
57  * @param[in] self The property map
58  * @param[in] key The key of the value to fetch
59  *
60  * @returns The property value
61  *
62  */
63 Dali::Property::Value PropertyMapGet( Dali::Property::Map& self, const std::string& key );
64
65 }; // namespace Emscripten
66 }; // namespace Internal
67 }; // namespace Dali
68
69 #endif // header