Dali 3D User Interface Engine
handle.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 // CLASS HEADER
20 
21 // INTERNAL INCLUDES
29 
30 namespace Dali
31 {
32 
34 : BaseHandle(handle)
35 {
36 }
37 
38 
40 {
41 }
42 
44 {
46 }
47 
49 {
50 }
51 
52 Handle::Handle( const Handle& handle )
53 : BaseHandle( handle )
54 {
55 }
56 
58 {
59  if( this != &rhs )
60  {
62  }
63 
64  return *this;
65 }
66 
68 {
69  return Handle( dynamic_cast<Dali::Internal::Object*>(handle.GetObjectPtr()) );
70 }
71 
72 
73 bool Handle::Supports( Capability capability ) const
74 {
75  return GetImplementation(*this).Supports( capability );
76 }
77 
78 unsigned int Handle::GetPropertyCount() const
79 {
80  return GetImplementation(*this).GetPropertyCount();
81 }
82 
83 std::string Handle::GetPropertyName( Property::Index index ) const
84 {
85  return GetImplementation(*this).GetPropertyName( index );
86 }
87 
88 Property::Index Handle::GetPropertyIndex( const std::string& name ) const
89 {
90  return GetImplementation(*this).GetPropertyIndex( name );
91 }
92 
94 {
95  return GetImplementation(*this).IsPropertyWritable( index );
96 }
97 
99 {
100  return GetImplementation(*this).IsPropertyAnimatable( index );
101 }
102 
104 {
105  return GetImplementation(*this).IsPropertyAConstraintInput( index );
106 }
107 
109 {
110  return GetImplementation(*this).GetPropertyType( index );
111 }
112 
113 void Handle::SetProperty( Property::Index index, const Property::Value& propertyValue )
114 {
115  GetImplementation(*this).SetProperty( index, propertyValue );
116 }
117 
118 Property::Index Handle::RegisterProperty( const std::string& name, const Property::Value& propertyValue )
119 {
120  return GetImplementation(*this).RegisterProperty( name, propertyValue );
121 }
122 
123 Property::Index Handle::RegisterProperty( const std::string& name, const Property::Value& propertyValue, Property::AccessMode accessMode )
124 {
125  return GetImplementation(*this).RegisterProperty( name, propertyValue, accessMode );
126 }
127 
129 {
130  return GetImplementation(*this).GetProperty( index );
131 }
132 
134 {
135  GetImplementation(*this).GetPropertyIndices( indices );
136 }
137 
139  const PropertyCondition& condition )
140 {
141  return GetImplementation(*this).AddPropertyNotification( index, -1, condition );
142 }
143 
145  int componentIndex,
146  const PropertyCondition& condition )
147 {
148  return GetImplementation(*this).AddPropertyNotification( index, componentIndex, condition );
149 }
150 
152 {
153  GetImplementation(*this).RemovePropertyNotification( propertyNotification );
154 }
155 
157 {
159 }
160 
162 {
164 }
165 
166 void Handle::RemoveConstraints( unsigned int tag )
167 {
168  GetImplementation(*this).RemoveConstraints( tag );
169 }
170 
171 namespace WeightObject
172 {
173 
175 
177 {
178  Handle handle = Handle::New();
179 
180  handle.RegisterProperty( "weight", 0.0f );
181 
182  return handle;
183 }
184 
185 } // namespace WeightObject
186 
187 } // namespace Dali
Dali Docs Home
Read more about Dali