Remove the wearable definition in Makefile.am
[platform/core/uifw/dali-adaptor.git] / adaptors / emscripten / wrappers / handle-wrapper.h
1 #ifndef __DALI_HANDLE_WRAPPER_H__
2 #define __DALI_HANDLE_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 <dali/public-api/dali-core.h>
23
24 #include "emscripten/emscripten.h"
25 #include "emscripten/bind.h"
26
27 // INTERNAL INCLUDES
28 #include "type-info-wrapper.h"
29
30
31 namespace Dali
32 {
33 namespace Internal
34 {
35 namespace Emscripten
36 {
37
38 /**
39  * Checks if a handle is pointing somewhere
40  *
41  * @param[in] self The basehandle
42  * @returns true if the handle is not empty
43  *
44  */
45 bool BaseHandleOk(Dali::BaseHandle& self);
46
47 /**
48  * Sets a handle to point to another object
49  *
50  * @param[in] self The handle to change
51  * @param[in] self The handle to point to
52  *
53  */
54 void SetSelf(Dali::Handle& self, Dali::Handle& other);
55
56 /**
57  * Sets a property by name
58  *
59  * @param[in] self The handle
60  * @param[in] javascriptName The property by name
61  * @param[in] value The property value
62  *
63  */
64 void SetProperty(Dali::Handle& self, const std::string& javascriptName, const Dali::Property::Value& value);
65
66 /**
67  * Gets a property by name
68  *
69  * @param[in] self The handle
70  * @param[in] javascriptName The property by name
71  * @returns The property value
72  *
73  */
74 Dali::Property::Value GetProperty(Dali::Handle& self, const std::string& javascriptName);
75
76 /**
77  * Gets a property index
78  *
79  * @param[in] self The handle
80  * @param[in] javascriptName The property by name
81  * @returns The property index
82  *
83  */
84 int GetPropertyIndex(Dali::Handle& self, const std::string& javascriptName);
85
86 /**
87  * Gets a list of property names
88  *
89  * @param[in] self The handle
90  * @returns The list of property names
91  *
92  */
93 std::vector<std::string> GetProperties(Dali::Handle& self);
94
95 /**
96  * Gets a property type by name
97  *
98  * @param[in] self The handle
99  * @param[in] name The property type name
100  * @returns The property type
101  *
102  */
103 Dali::Property::Type GetPropertyTypeFromName(Dali::Handle& self, const std::string& name);
104
105 /**
106  * Gets a property type name
107  *
108  * @param[in] self The handle
109  * @param[in] name The property by name
110  * @returns The property type name
111  *
112  */
113 std::string GetPropertyTypeName(Dali::Handle& self, const std::string& name);
114
115 /**
116  * Registers a property by name
117  *
118  * @param[in] self The handle
119  * @param[in] name The property by name
120  * @returns The property index of the newly registered property
121  *
122  */
123 Dali::Property::Index RegisterProperty(Dali::Handle& self, const std::string& name, const Dali::Property::Value& propertyValue);
124
125 /**
126  * Registers an animated property
127  *
128  * @param[in] self The handle
129  * @param[in] name The property by name
130  * @returns The property index of the newly registered property
131  *
132  */
133 Dali::Property::Index RegisterAnimatedProperty(Dali::Handle& self, const std::string& name, const Dali::Property::Value& propertyValue);
134
135 /**
136  * Gets Dali type info
137  *
138  * @param[in] self The handle
139  * @returns The type info
140  *
141  */
142 Dali::TypeInfo GetTypeInfo(Dali::Handle& self);
143
144 }; // namespace Emscripten
145 }; // namespace Internal
146 }; // namespace Dali
147
148 #endif // header