CAPI removal
[platform/core/uifw/dali-core.git] / dali / public-api / animation / constraint.h
1 #ifndef __DALI_CONSTRAINT_H__
2 #define __DALI_CONSTRAINT_H__
3
4 /*
5  * Copyright (c) 2014 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 // EXTERNAL INCLUDES
22 #include <boost/function.hpp>
23
24 // INTERNAL INCLUDES
25 #include <dali/public-api/animation/alpha-functions.h>
26 #include <dali/public-api/animation/constraint-source.h>
27 #include <dali/public-api/animation/interpolator-functions.h>
28 #include <dali/public-api/object/any.h>
29 #include <dali/public-api/object/handle.h>
30 #include <dali/public-api/object/property.h>
31 #include <dali/public-api/object/property-input.h>
32
33 namespace Dali DALI_IMPORT_API
34 {
35 struct TimePeriod;
36
37 namespace Internal DALI_INTERNAL
38 {
39 class Constraint;
40 }
41
42 /**
43  * @brief An abstract base class for Constraints.
44  * This can be used to constrain a property of an actor, after animations have been applied.
45  * Constraints are applied in the following order:
46  *   - Constraints are applied to on-stage actors in a depth-first traversal.
47  *   - For each actor, the constraints are applied in the same order as the calls to Actor::ApplyConstraint().
48  *   - Constraints are not applied to off-stage actors.
49  */
50 class DALI_IMPORT_API Constraint : public BaseHandle
51 {
52 public:
53
54   typedef Any AnyFunction; ///< Generic function pointer for constraint and interpolator functions
55
56   /**
57    * @brief The action that will happen when the constraint is removed.
58    *
59    * Constraints can be applied gradually; see SetApplyTime() for more details.
60    * When a constraint is fully-applied the final value may be "baked" i.e. saved permanently.
61    * Alternatively the constrained value may be discarded when the constraint is removed.
62    */
63   enum RemoveAction
64   {
65     Bake,   ///< When the constraint is fully-applied, the constrained value is saved.
66     Discard ///< When the constraint is removed, the constrained value is discarded.
67   };
68
69   static const AlphaFunction DEFAULT_ALPHA_FUNCTION; ///< AlphaFunctions::Linear
70   static const RemoveAction  DEFAULT_REMOVE_ACTION;  ///< Bake
71
72   /**
73    * @brief Create an uninitialized Constraint; this can be initialized with Constraint::New().
74    *
75    * Calling member functions with an uninitialized Dali::Object is not allowed.
76    */
77   Constraint();
78
79   /**
80    * @brief Create a constraint which targets a property.
81    *
82    * The templated parameter P, is the type of the property to constrain.
83    * Animation will be performed using the default interpolator.
84    * @param [in] target The index of the property to constrain.
85    * @param [in] func A function which returns the constrained property value.
86    * @return The new constraint.
87    */
88   template <class P>
89   static Constraint New( Property::Index target,
90                          boost::function<P (const P& current)> func )
91   {
92     return New( target,
93                 PropertyTypes::Get<P>(),
94                 func,
95                 GetDefaultInterpolator( PropertyTypes::Get<P>() ) );
96   }
97
98   /**
99    * @brief Create a constraint which targets a property.
100    *
101    * The templated parameter P, is the type of the property to constrain.
102    * @param [in] target The index of the property to constrain.
103    * @param [in] func A function which returns the constrained property value.
104    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
105    * @return The new constraint.
106    */
107   template <class P>
108   static Constraint NewWithInterpolator( Property::Index target,
109                                          boost::function<P (const P& current)> func,
110                                          boost::function<P (const P&, const P&, float)> interpolator )
111   {
112     return New( target,
113                 PropertyTypes::Get<P>(),
114                 func,
115                 interpolator );
116   }
117
118   /**
119    * @brief Create a constraint which targets a property.
120    *
121    * The templated parameter P, is the type of the property to constrain.
122    * Animation will be performed using the default interpolator.
123    * @param [in] target The index of the property to constrain.
124    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
125    * @param [in] func A function which returns the constrained property value.
126    * @return The new constraint.
127    */
128   template <class P>
129   static Constraint New( Property::Index target,
130                          ConstraintSource source1,
131                          boost::function<P (const P& current, const PropertyInput& input1)> func )
132   {
133     return New( target,
134                 PropertyTypes::Get<P>(),
135                 source1,
136                 func,
137                 GetDefaultInterpolator( PropertyTypes::Get<P>() ) );
138   }
139
140   /**
141    * @brief Create a constraint which targets a property.
142    *
143    * The templated parameter P, is the type of the property to constrain.
144    * @param [in] target The index of the property to constrain.
145    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
146    * @param [in] func A function which returns the constrained property value.
147    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
148    * @return The new constraint.
149    */
150   template <class P>
151   static Constraint NewWithInterpolator( Property::Index target,
152                                          ConstraintSource source1,
153                                          boost::function<P (const P& current, const PropertyInput& input1)> func,
154                                          boost::function<P (const P&, const P&, float)> interpolator )
155   {
156     return New( target,
157                 PropertyTypes::Get<P>(),
158                 source1,
159                 func,
160                 interpolator );
161   }
162
163   /**
164    * @brief Create a constraint which targets a property.
165    *
166    * The templated parameter P, is the type of the property to constrain.
167    * Animation will be performed using the default interpolator.
168    * @param [in] target The index of the property to constrain.
169    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
170    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
171    * @param [in] func A function which returns the constrained property value.
172    * @return The new constraint.
173    */
174   template <class P>
175   static Constraint New( Property::Index target,
176                          ConstraintSource source1,
177                          ConstraintSource source2,
178                          boost::function<P (const P& current, const PropertyInput& input1, const PropertyInput& input2)> func )
179   {
180     return New( target,
181                 PropertyTypes::Get<P>(),
182                 source1,
183                 source2,
184                 func,
185                 GetDefaultInterpolator(PropertyTypes::Get<P>()) );
186   }
187
188   /**
189    * @brief Create a constraint which targets a property.
190    *
191    * The templated parameter P, is the type of the property to constrain.
192    * @param [in] target The index of the property to constrain.
193    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
194    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
195    * @param [in] func A function which returns the constrained property value.
196    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
197    * @return The new constraint.
198    */
199   template <class P>
200   static Constraint NewWithInterpolator( Property::Index target,
201                                          ConstraintSource source1,
202                                          ConstraintSource source2,
203                                          boost::function<P (const P& current, const PropertyInput& input1, const PropertyInput& input2)> func,
204                                          boost::function<P (const P&, const P&, float)> interpolator )
205   {
206     return New( target,
207                 PropertyTypes::Get<P>(),
208                 source1,
209                 source2,
210                 func,
211                 interpolator );
212   }
213
214   /**
215    * @brief Create a constraint which targets a property.
216    *
217    * The templated parameter P, is the type of the property to constrain.
218    * Animation will be performed using the default interpolator.
219    * @param [in] target The index of the property to constrain.
220    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
221    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
222    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
223    * @param [in] func A function which returns the constrained property value.
224    * @return The new constraint.
225    */
226   template <class P>
227   static Constraint New( Property::Index target,
228                          ConstraintSource source1,
229                          ConstraintSource source2,
230                          ConstraintSource source3,
231                          boost::function<P (const P& current, const PropertyInput& input1, const PropertyInput& input2, const PropertyInput& input3)> func )
232   {
233     return New( target,
234                 PropertyTypes::Get<P>(),
235                 source1,
236                 source2,
237                 source3,
238                 func,
239                 GetDefaultInterpolator(PropertyTypes::Get<P>()) );
240   }
241
242   /**
243    * @brief Create a constraint which targets a property.
244    *
245    * The templated parameter P, is the type of the property to constrain.
246    * @param [in] target The index of the property to constrain.
247    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
248    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
249    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
250    * @param [in] func A function which returns the constrained property value.
251    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
252    * @return The new constraint.
253    */
254   template <class P>
255   static Constraint NewWithInterpolator( Property::Index target,
256                                          ConstraintSource source1,
257                                          ConstraintSource source2,
258                                          ConstraintSource source3,
259                                          boost::function<P (const P& current, const PropertyInput& input1, const PropertyInput& input2, const PropertyInput& input3)> func,
260                                          boost::function<P (const P&, const P&, float)> interpolator )
261   {
262     return New( target,
263                 PropertyTypes::Get<P>(),
264                 source1,
265                 source2,
266                 source3,
267                 func,
268                 interpolator );
269   }
270
271   /**
272    * @brief Create a constraint which targets a property.
273    *
274    * The templated parameter P, is the type of the property to constrain.
275    * Animation will be performed using the default interpolator.
276    * @param [in] target The index of the property to constrain.
277    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
278    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
279    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
280    * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
281    * @param [in] func A function which returns the constrained property value.
282    * @return The new constraint.
283    */
284   template <class P>
285   static Constraint New( Property::Index target,
286                          ConstraintSource source1,
287                          ConstraintSource source2,
288                          ConstraintSource source3,
289                          ConstraintSource source4,
290                          boost::function<P (const P& current,
291                                             const PropertyInput& input1,
292                                             const PropertyInput& input2,
293                                             const PropertyInput& input3,
294                                             const PropertyInput& input4)> func )
295   {
296     return New( target,
297                 PropertyTypes::Get<P>(),
298                 source1,
299                 source2,
300                 source3,
301                 source4,
302                 func,
303                 GetDefaultInterpolator(PropertyTypes::Get<P>()) );
304   }
305
306   /**
307    * @brief Create a constraint which targets a property.
308    *
309    * The templated parameter P, is the type of the property to constrain.
310    * @param [in] target The index of the property to constrain.
311    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
312    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
313    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
314    * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
315    * @param [in] func A function which returns the constrained property value.
316    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
317    * @return The new constraint.
318    */
319   template <class P>
320   static Constraint NewWithInterpolator( Property::Index target,
321                                          ConstraintSource source1,
322                                          ConstraintSource source2,
323                                          ConstraintSource source3,
324                                          ConstraintSource source4,
325                                          boost::function<P (const P& current,
326                                                             const PropertyInput& input1,
327                                                             const PropertyInput& input2,
328                                                             const PropertyInput& input3,
329                                                             const PropertyInput& input4)> func,
330                                          boost::function<P (const P&, const P&, float)> interpolator )
331   {
332     return New( target,
333                 PropertyTypes::Get<P>(),
334                 source1,
335                 source2,
336                 source3,
337                 source4,
338                 func,
339                 interpolator );
340   }
341
342   /**
343    * @brief Create a constraint which targets a property.
344    *
345    * The templated parameter P, is the type of the property to constrain.
346    * Animation will be performed using the default interpolator.
347    * @param [in] target The index of the property to constrain.
348    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
349    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
350    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
351    * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
352    * @param [in] source5 The source of a property; the current value will be passed as the 6th parameter of func.
353    * @param [in] func A function which returns the constrained property value.
354    * @return The new constraint.
355    */
356   template <class P>
357   static Constraint New( Property::Index target,
358                          ConstraintSource source1,
359                          ConstraintSource source2,
360                          ConstraintSource source3,
361                          ConstraintSource source4,
362                          ConstraintSource source5,
363                          boost::function<P (const P& current,
364                                             const PropertyInput& input1,
365                                             const PropertyInput& input2,
366                                             const PropertyInput& input3,
367                                             const PropertyInput& input4,
368                                             const PropertyInput& input5)> func )
369   {
370     return New( target,
371                 PropertyTypes::Get<P>(),
372                 source1,
373                 source2,
374                 source3,
375                 source4,
376                 source5,
377                 func,
378                 GetDefaultInterpolator(PropertyTypes::Get<P>()) );
379   }
380
381   /**
382    * @brief Create a constraint which targets a property.
383    *
384    * The templated parameter P, is the type of the property to constrain.
385    * @param [in] target The index of the property to constrain.
386    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
387    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
388    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
389    * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
390    * @param [in] source5 The source of a property; the current value will be passed as the 6th parameter of func.
391    * @param [in] func A function which returns the constrained property value.
392    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
393    * @return The new constraint.
394    */
395   template <class P>
396   static Constraint NewWithInterpolator( Property::Index target,
397                                          ConstraintSource source1,
398                                          ConstraintSource source2,
399                                          ConstraintSource source3,
400                                          ConstraintSource source4,
401                                          ConstraintSource source5,
402                                          boost::function<P (const P& current,
403                                                             const PropertyInput& input1,
404                                                             const PropertyInput& input2,
405                                                             const PropertyInput& input3,
406                                                             const PropertyInput& input4,
407                                                             const PropertyInput& input5)> func,
408                                          boost::function<P (const P&, const P&, float)> interpolator )
409   {
410     return New( target,
411                 PropertyTypes::Get<P>(),
412                 source1,
413                 source2,
414                 source3,
415                 source4,
416                 source5,
417                 func,
418                 interpolator );
419   }
420
421   /**
422    * @brief Create a constraint which targets a property.
423    *
424    * The templated parameter P, is the type of the property to constrain.
425    * Animation will be performed using the default interpolator.
426    * @param [in] target The index of the property to constrain.
427    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
428    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
429    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
430    * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
431    * @param [in] source5 The source of a property; the current value will be passed as the 6th parameter of func.
432    * @param [in] source6 The source of a property; the current value will be passed as the 7th parameter of func.
433    * @param [in] func A function which returns the constrained property value.
434    * @return The new constraint.
435    */
436   template <class P>
437   static Constraint New( Property::Index target,
438                          ConstraintSource source1,
439                          ConstraintSource source2,
440                          ConstraintSource source3,
441                          ConstraintSource source4,
442                          ConstraintSource source5,
443                          ConstraintSource source6,
444                          boost::function<P (const P& current,
445                                             const PropertyInput& input1,
446                                             const PropertyInput& input2,
447                                             const PropertyInput& input3,
448                                             const PropertyInput& input4,
449                                             const PropertyInput& input5,
450                                             const PropertyInput& input6)> func )
451   {
452     return New( target,
453                 PropertyTypes::Get<P>(),
454                 source1,
455                 source2,
456                 source3,
457                 source4,
458                 source5,
459                 source6,
460                 func,
461                 GetDefaultInterpolator(PropertyTypes::Get<P>()) );
462   }
463
464   /**
465    * @brief Create a constraint which targets a property.
466    *
467    * The templated parameter P, is the type of the property to constrain.
468    * @param [in] target The index of the property to constrain.
469    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
470    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
471    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
472    * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
473    * @param [in] source5 The source of a property; the current value will be passed as the 6th parameter of func.
474    * @param [in] source6 The source of a property; the current value will be passed as the 7th parameter of func.
475    * @param [in] func A function which returns the constrained property value.
476    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
477    * @return The new constraint.
478    */
479   template <class P>
480   static Constraint NewWithInterpolator( Property::Index target,
481                                          ConstraintSource source1,
482                                          ConstraintSource source2,
483                                          ConstraintSource source3,
484                                          ConstraintSource source4,
485                                          ConstraintSource source5,
486                                          ConstraintSource source6,
487                                          boost::function<P (const P& current,
488                                                             const PropertyInput& input1,
489                                                             const PropertyInput& input2,
490                                                             const PropertyInput& input3,
491                                                             const PropertyInput& input4,
492                                                             const PropertyInput& input5,
493                                                             const PropertyInput& input6)> func,
494                                          boost::function<P (const P&, const P&, float)> interpolator )
495   {
496     return New( target,
497                 PropertyTypes::Get<P>(),
498                 source1,
499                 source2,
500                 source3,
501                 source4,
502                 source5,
503                 source6,
504                 func,
505                 interpolator );
506   }
507
508   /**
509    * @brief Downcast an Object handle to Constraint handle.
510    *
511    * If handle points to a Constraint object the
512    * downcast produces valid handle. If not the returned handle is left uninitialized.
513    * @param[in] handle to An object
514    * @return handle to a Constraint object or an uninitialized handle
515    */
516   static Constraint DownCast( BaseHandle handle );
517
518   /**
519    * @brief Destructor
520    *
521    * This is non-virtual since derived Handle types must not contain data or virtual methods.
522    */
523   ~Constraint();
524
525   /**
526    * @copydoc Dali::BaseHandle::operator=
527    */
528   using BaseHandle::operator=;
529
530   /**
531    * @brief Set the time taken for the constraint to be fully applied.
532    *
533    * The default is zero, meaning that the constraint is applied immediately.
534    * @param [in] timePeriod The constraint will be applied during this time period.
535    */
536   void SetApplyTime( TimePeriod timePeriod );
537
538   /**
539    * @brief Retrieve the time taken for the constraint to be fully applied.
540    *
541    * @return The apply time.
542    */
543   TimePeriod GetApplyTime() const;
544
545   /**
546    * @brief Set the time taken for the constraint to be fully removed.
547    *
548    * The default is zero, meaning that the constraint is removed immediately.
549    * @param [in] timePeriod The constraint will be removed during this time period.
550    */
551   void SetRemoveTime( TimePeriod timePeriod );
552
553   /**
554    * @brief Retrieve the time taken for the constraint to be fully removed.
555    *
556    * @return The remove time.
557    */
558   TimePeriod GetRemoveTime() const;
559
560   /**
561    * @brief Set the alpha function for a constraint; the default is AlphaFunctions::Linear.
562    *
563    * @param [in] func The alpha function to use when applying/removing the constraint.
564    */
565   void SetAlphaFunction( AlphaFunction func );
566
567   /**
568    * @brief Retrieve the alpha function of a constraint.
569    *
570    * @return The function.
571    */
572   AlphaFunction GetAlphaFunction();
573
574   /**
575    * @brief Set whether the constraint will "bake" a value when fully-applied.
576    *
577    * Otherwise the constrained value will be discarded, when the constraint is removed.
578    * The default value is Constraint::Bake.
579    * @param[in] action The remove-action.
580    */
581   void SetRemoveAction( RemoveAction action );
582
583   /**
584    * @brief Query whether the constraint will "bake" a value when fully-applied.
585    *
586    * Otherwise the constrained value will be discarded, when the constraint is removed.
587    * @return The apply-action.
588    */
589   RemoveAction GetRemoveAction() const;
590
591   /**
592    * @brief Set a tag for the constraint so it can be identified later
593    *
594    * @param[in] tag An integer to identify the constraint
595    */
596   void SetTag( const unsigned int tag );
597
598   /**
599    * @brief Get the tag
600    *
601    * @return The tag
602    */
603   unsigned int GetTag() const;
604
605 public: // Not intended for use by Application developers
606
607   /**
608    * @brief This constructor is used by Dali New() methods
609    * @param [in] constraint A pointer to a newly allocated Dali resource
610    */
611   explicit DALI_INTERNAL Constraint( Internal::Constraint* constraint );
612
613 private: // Not intended for use by Application developers
614
615   /**
616    * @brief Construct a new constraint which targets a property.
617    *
618    * @param [in] target The index of the property to constrain.
619    * @param [in] targetType The type of the constrained property.
620    * @param [in] func The constraint function.
621    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
622    * @return The new constraint.
623    */
624   static Constraint New( Property::Index target,
625                          Property::Type targetType,
626                          AnyFunction func,
627                          AnyFunction interpolator );
628
629   /**
630    * @brief Construct a new constraint which targets a property.
631    *
632    * @param [in] target The index of the property to constrain.
633    * @param [in] targetType The type of the constrained property.
634    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
635    * @param [in] func The constraint function.
636    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
637    * @return The new constraint.
638    */
639   static Constraint New( Property::Index target,
640                          Property::Type targetType,
641                          ConstraintSource source1,
642                          AnyFunction func,
643                          AnyFunction interpolator );
644
645   /**
646    * @brief Construct a new constraint which targets a property.
647    *
648    * @param [in] target The index of the property to constrain.
649    * @param [in] targetType The type of the constrained property.
650    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
651    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
652    * @param [in] func The constraint function.
653    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
654    * @return The new constraint.
655    */
656   static Constraint New( Property::Index target,
657                          Property::Type targetType,
658                          ConstraintSource source1,
659                          ConstraintSource source2,
660                          AnyFunction func,
661                          AnyFunction interpolator );
662
663   /**
664    * @brief Construct a new constraint which targets a property.
665    *
666    * @param [in] target The index of the property to constrain.
667    * @param [in] targetType The type of the constrained property.
668    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
669    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
670    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
671    * @param [in] func The constraint function.
672    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
673    * @return The new constraint.
674    */
675   static Constraint New( Property::Index target,
676                          Property::Type targetType,
677                          ConstraintSource source1,
678                          ConstraintSource source2,
679                          ConstraintSource source3,
680                          AnyFunction func,
681                          AnyFunction interpolator );
682
683   /**
684    * @brief Construct a new constraint which targets a property.
685    *
686    * @param [in] target The index of the property to constrain.
687    * @param [in] targetType The type of the constrained property.
688    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
689    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
690    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
691    * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
692    * @param [in] func The constraint function.
693    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
694    * @return The new constraint.
695    */
696   static Constraint New( Property::Index target,
697                          Property::Type targetType,
698                          ConstraintSource source1,
699                          ConstraintSource source2,
700                          ConstraintSource source3,
701                          ConstraintSource source4,
702                          AnyFunction func,
703                          AnyFunction interpolator );
704
705   /**
706    * @brief Construct a new constraint which targets a property.
707    *
708    * @param [in] target The index of the property to constrain.
709    * @param [in] targetType The type of the constrained property.
710    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
711    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
712    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
713    * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
714    * @param [in] source5 The source of a property; the current value will be passed as the 6th parameter of func.
715    * @param [in] func The constraint function.
716    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
717    * @return The new constraint.
718    */
719   static Constraint New( Property::Index target,
720                          Property::Type targetType,
721                          ConstraintSource source1,
722                          ConstraintSource source2,
723                          ConstraintSource source3,
724                          ConstraintSource source4,
725                          ConstraintSource source5,
726                          AnyFunction func,
727                          AnyFunction interpolator );
728
729   /**
730    * @brief Construct a new constraint which targets a property.
731    *
732    * @param [in] target The index of the property to constrain.
733    * @param [in] targetType The type of the constrained property.
734    * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
735    * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
736    * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
737    * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
738    * @param [in] source5 The source of a property; the current value will be passed as the 6th parameter of func.
739    * @param [in] source6 The source of a property; the current value will be passed as the 7th parameter of func.
740    * @param [in] func The constraint function.
741    * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
742    * @return The new constraint.
743    */
744   static Constraint New( Property::Index target,
745                          Property::Type targetType,
746                          ConstraintSource source1,
747                          ConstraintSource source2,
748                          ConstraintSource source3,
749                          ConstraintSource source4,
750                          ConstraintSource source5,
751                          ConstraintSource source6,
752                          AnyFunction func,
753                          AnyFunction interpolator );
754 };
755
756 } // namespace Dali
757
758 #endif // __DALI_CONSTRAINT_H__