[Tizen] Add GetLogicalKey API in DevelKeyEvent
[platform/core/uifw/dali-core.git] / dali / devel-api / object / csharp-type-registry.h
1 #ifndef __DALI_CSHARP_TYPE_REGISTRY_H__
2 #define __DALI_CSHARP_TYPE_REGISTRY_H__
3
4 /*
5  * Copyright (c) 2018 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
22 // EXTERNAL INCLUDES
23 #include <typeinfo>
24
25
26 // INTERNAL INCLUDES
27 #include <dali/public-api/object/type-registry.h>
28 #include <dali/devel-api/object/csharp-type-info.h>
29
30 namespace Dali
31 {
32
33
34 /**
35  * Custom static functions for registering C# custom controls and properties
36  *
37  */
38 namespace CSharpTypeRegistry
39 {
40
41 /**
42  * @brief Constructor registers the type creation function for a named class or type.
43  *
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.
50  */
51   DALI_CORE_API bool RegisterType( const std::string& name,
52                                      const std::type_info& baseType,
53                                      CSharpTypeInfo::CreateFunction f );
54
55   /**
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.
64   */
65   DALI_CORE_API bool RegisterProperty( const std::string& objectName,
66                                          const std::string& name,
67                                          Property::Index index,
68                                          Property::Type type,
69                                          CSharpTypeInfo::SetPropertyFunction setFunc,
70                                          CSharpTypeInfo::GetPropertyFunction getFunc );
71 }
72
73 } // namespace Dali
74
75 #endif // header