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