1 #ifndef DALI_CSHARP_TYPE_REGISTRY_H
2 #define DALI_CSHARP_TYPE_REGISTRY_H
5 * Copyright (c) 2020 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.
25 #include <dali/devel-api/object/csharp-type-info.h>
26 #include <dali/public-api/object/type-registry.h>
31 * Custom static functions for registering C# custom controls and properties
34 namespace CSharpTypeRegistry
37 * @brief Constructor registers the type creation function for a named class or type.
39 * This allows types to be created dynamically from script. The name must be
40 * unique for successful registration.
41 * @param [in] name the name of the type to be registered
42 * @param [in] baseType the base type info of registerType
43 * @param [in] f registerType instance creation function
44 * @return true if the name could be registered.
46 DALI_CORE_API bool RegisterType(const std::string& name,
47 const std::type_info& baseType,
48 CSharpTypeInfo::CreateFunction f);
51 * Register an event-thread only property with a type (used by C# Custom controls)
52 * @param [in] objectName name of the object used to register the type
53 * @param [in] name Property name
54 * @param [in] index Property index
55 * @param [in] type Property type
56 * @param [in] setFunc The function to set the property (Can be NULL).
57 * @param [in] getFunc The function to get the value of a property.
58 * @return true if the property could be registered.
60 DALI_CORE_API bool RegisterProperty(const std::string& objectName,
61 const std::string& name,
62 Property::Index index,
64 CSharpTypeInfo::SetPropertyFunction setFunc,
65 CSharpTypeInfo::GetPropertyFunction getFunc);
66 } // namespace CSharpTypeRegistry
70 #endif // DALI_CSHARP_TYPE_REGISTRY_H