Commit a406f1b25745f1604e3f651b527167aec0f0ad22
1 parent
9bc07078
Updates after the use of const refs in gesture callbacks
Change-Id: I231053cbaf99764247615dad6ba9677458181a13
Showing
7 changed files
with
15 additions
and
15 deletions
examples/builder/examples.cpp
examples/item-view/item-view-example.cpp
| ... | ... | @@ -534,7 +534,7 @@ public: |
| 534 | 534 | mTapDetector.Reset(); |
| 535 | 535 | } |
| 536 | 536 | |
| 537 | - void RemoveOnTap( Actor actor, TapGesture tap ) | |
| 537 | + void RemoveOnTap( Actor actor, const TapGesture& tap ) | |
| 538 | 538 | { |
| 539 | 539 | mItemView.RemoveItem( mItemView.GetItemId(actor), 0.5f ); |
| 540 | 540 | } |
| ... | ... | @@ -586,7 +586,7 @@ public: |
| 586 | 586 | mDeleteButton.SetVisible( false ); |
| 587 | 587 | } |
| 588 | 588 | |
| 589 | - void SelectOnTap( Actor actor, TapGesture tap ) | |
| 589 | + void SelectOnTap( Actor actor, const TapGesture& tap ) | |
| 590 | 590 | { |
| 591 | 591 | Actor tick = actor.FindChildByName( "Tick" ); |
| 592 | 592 | if( tick ) |
| ... | ... | @@ -637,7 +637,7 @@ public: |
| 637 | 637 | mTapDetector.Reset(); |
| 638 | 638 | } |
| 639 | 639 | |
| 640 | - void InsertOnTap( Actor actor, TapGesture tap ) | |
| 640 | + void InsertOnTap( Actor actor, const TapGesture& tap ) | |
| 641 | 641 | { |
| 642 | 642 | ItemId id = mItemView.GetItemId( actor ); |
| 643 | 643 | |
| ... | ... | @@ -730,7 +730,7 @@ public: |
| 730 | 730 | mTapDetector.DetectedSignal().Connect( this, &ItemViewExample::ReplaceOnTap ); |
| 731 | 731 | } |
| 732 | 732 | |
| 733 | - void ReplaceOnTap( Actor actor, TapGesture tap ) | |
| 733 | + void ReplaceOnTap( Actor actor, const TapGesture& tap ) | |
| 734 | 734 | { |
| 735 | 735 | mItemView.ReplaceItem( Item( mItemView.GetItemId(actor), NewItem(rand()) ), 0.5f ); |
| 736 | 736 | } |
| ... | ... | @@ -1037,7 +1037,7 @@ private: |
| 1037 | 1037 | return true; |
| 1038 | 1038 | } |
| 1039 | 1039 | |
| 1040 | - void ChangeAlphaFunctionOnTap( Actor actor, TapGesture tap ) | |
| 1040 | + void ChangeAlphaFunctionOnTap( Actor actor, const TapGesture& tap ) | |
| 1041 | 1041 | { |
| 1042 | 1042 | if( NUM_ALPHA_FUNCTIONS <= ++mAlphaFuncIndex ) |
| 1043 | 1043 | { | ... | ... |
examples/motion/motion-blur-example.cpp
| ... | ... | @@ -331,7 +331,7 @@ public: |
| 331 | 331 | // |
| 332 | 332 | |
| 333 | 333 | // move to point on screen that was tapped |
| 334 | - void OnTap( Actor actor, TapGesture tapGesture ) | |
| 334 | + void OnTap( Actor actor, const TapGesture& tapGesture ) | |
| 335 | 335 | { |
| 336 | 336 | Vector3 destPos; |
| 337 | 337 | float originOffsetX, originOffsetY; | ... | ... |
examples/motion/motion-stretch-example.cpp
| ... | ... | @@ -243,7 +243,7 @@ public: |
| 243 | 243 | // |
| 244 | 244 | |
| 245 | 245 | // move to point on screen that was tapped |
| 246 | - void OnTap( Actor actor, TapGesture tapGesture ) | |
| 246 | + void OnTap( Actor actor, const TapGesture& tapGesture ) | |
| 247 | 247 | { |
| 248 | 248 | Vector3 destPos; |
| 249 | 249 | float originOffsetX, originOffsetY; | ... | ... |
examples/shader-effect/dissolve-effect-example.cpp
| ... | ... | @@ -96,7 +96,7 @@ private: |
| 96 | 96 | * @param[in] actor The actor receiving the pan gesture. |
| 97 | 97 | * @param[in] gesture The detected pan gesture. |
| 98 | 98 | */ |
| 99 | - void OnPanGesture( Actor actor, PanGesture gesture ); | |
| 99 | + void OnPanGesture( Actor actor, const PanGesture& gesture ); | |
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * Set up the animations for transition |
| ... | ... | @@ -237,7 +237,7 @@ void DissolveEffectApp::OnInit( Application& application ) |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | // signal handler, called when the pan gesture is detected |
| 240 | -void DissolveEffectApp::OnPanGesture( Actor actor, PanGesture gesture ) | |
| 240 | +void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture ) | |
| 241 | 241 | { |
| 242 | 242 | // does not response when the animation has not finished |
| 243 | 243 | if( mIsTransiting || mSlideshow ) | ... | ... |
examples/shadows/shadow-bone-lighting-example.cpp
| ... | ... | @@ -326,7 +326,7 @@ public: |
| 326 | 326 | return p*q; |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | - void OnTap(Dali::Actor actor, TapGesture gesture) | |
| 329 | + void OnTap(Dali::Actor actor, const TapGesture& gesture) | |
| 330 | 330 | { |
| 331 | 331 | if( ! mPaused ) |
| 332 | 332 | { |
| ... | ... | @@ -342,7 +342,7 @@ public: |
| 342 | 342 | } |
| 343 | 343 | } |
| 344 | 344 | |
| 345 | - void OnPan(Actor actor, PanGesture gesture) | |
| 345 | + void OnPan(Actor actor, const PanGesture& gesture) | |
| 346 | 346 | { |
| 347 | 347 | switch (gesture.state) |
| 348 | 348 | { |
| ... | ... | @@ -396,7 +396,7 @@ public: |
| 396 | 396 | } |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | - void OnPinch(Actor actor, PinchGesture gesture) | |
| 399 | + void OnPinch(Actor actor, const PinchGesture& gesture) | |
| 400 | 400 | { |
| 401 | 401 | if (gesture.state == Gesture::Started) |
| 402 | 402 | { | ... | ... |
examples/transition/cube-transition-effect-example.cpp
| ... | ... | @@ -110,7 +110,7 @@ private: |
| 110 | 110 | * @param[in] actor The actor receiving the pan gesture. |
| 111 | 111 | * @param[in] gesture The detected pan gesture. |
| 112 | 112 | */ |
| 113 | - void OnPanGesture( Actor actor, PanGesture gesture ); | |
| 113 | + void OnPanGesture( Actor actor, const PanGesture& gesture ); | |
| 114 | 114 | /** |
| 115 | 115 | * Load the next image and start the transition; |
| 116 | 116 | */ |
| ... | ... | @@ -281,7 +281,7 @@ void CubeTransitionApp::OnInit( Application& application ) |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | // signal handler, called when the pan gesture is detected |
| 284 | -void CubeTransitionApp::OnPanGesture( Actor actor, PanGesture gesture ) | |
| 284 | +void CubeTransitionApp::OnPanGesture( Actor actor, const PanGesture& gesture ) | |
| 285 | 285 | { |
| 286 | 286 | // does not response when the transition has not finished |
| 287 | 287 | if( mIsImageLoading || mCubeWaveEffect.IsTransiting() || mCubeCrossEffect.IsTransiting() || mCubeFoldEffect.IsTransiting() || mSlideshow ) | ... | ... |