1 #ifndef __DALI_HANDLE_WRAPPER_H__
2 #define __DALI_HANDLE_WRAPPER_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/dali-core.h>
24 #include "emscripten/emscripten.h"
25 #include "emscripten/bind.h"
28 #include "type-info-wrapper.h"
39 * Checks if a handle is pointing somewhere
41 * @param[in] self The basehandle
42 * @returns true if the handle is not empty
45 bool BaseHandleOk(Dali::BaseHandle& self);
48 * Sets a handle to point to another object
50 * @param[in] self The handle to change
51 * @param[in] self The handle to point to
54 void SetSelf(Dali::Handle& self, Dali::Handle& other);
57 * Sets a property by name
59 * @param[in] self The handle
60 * @param[in] javascriptName The property by name
61 * @param[in] value The property value
64 void SetProperty(Dali::Handle& self, const std::string& javascriptName, const Dali::Property::Value& value);
67 * Gets a property by name
69 * @param[in] self The handle
70 * @param[in] javascriptName The property by name
71 * @returns The property value
74 Dali::Property::Value GetProperty(Dali::Handle& self, const std::string& javascriptName);
77 * Gets a property index
79 * @param[in] self The handle
80 * @param[in] javascriptName The property by name
81 * @returns The property index
84 int GetPropertyIndex(Dali::Handle& self, const std::string& javascriptName);
87 * Gets a list of property names
89 * @param[in] self The handle
90 * @returns The list of property names
93 std::vector<std::string> GetProperties(Dali::Handle& self);
96 * Gets a property type by name
98 * @param[in] self The handle
99 * @param[in] name The property type name
100 * @returns The property type
103 Dali::Property::Type GetPropertyTypeFromName(Dali::Handle& self, const std::string& name);
106 * Gets a property type name
108 * @param[in] self The handle
109 * @param[in] name The property by name
110 * @returns The property type name
113 std::string GetPropertyTypeName(Dali::Handle& self, const std::string& name);
116 * Registers a property by name
118 * @param[in] self The handle
119 * @param[in] name The property by name
120 * @returns The property index of the newly registered property
123 Dali::Property::Index RegisterProperty(Dali::Handle& self, const std::string& name, const Dali::Property::Value& propertyValue);
126 * Registers an animated property
128 * @param[in] self The handle
129 * @param[in] name The property by name
130 * @returns The property index of the newly registered property
133 Dali::Property::Index RegisterAnimatedProperty(Dali::Handle& self, const std::string& name, const Dali::Property::Value& propertyValue);
136 * Gets Dali type info
138 * @param[in] self The handle
139 * @returns The type info
142 Dali::TypeInfo GetTypeInfo(Dali::Handle& self);
144 }; // namespace Emscripten
145 }; // namespace Internal