(Gestures) Pass const refs in callbacks 28/30128/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 11 Nov 2014 15:50:22 +0000 (15:50 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 11 Nov 2014 16:04:04 +0000 (16:04 +0000)
Change-Id: I783837af2e3021649c64d78ad63294902029fea7

automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp
automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp
automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp
automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp
dali/public-api/events/long-press-gesture-detector.h
dali/public-api/events/pan-gesture-detector.h
dali/public-api/events/pinch-gesture-detector.h
dali/public-api/events/tap-gesture-detector.h

index 3fbf425..12740f8 100644 (file)
@@ -74,7 +74,7 @@ struct GestureReceivedFunctor
 {
   GestureReceivedFunctor(SignalData& data) : signalData(data) { }
 
-  void operator()(Actor actor, LongPressGesture longPress)
+  void operator()(Actor actor, const LongPressGesture& longPress)
   {
     signalData.functorCalled = true;
     signalData.receivedGesture = longPress;
@@ -98,7 +98,7 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
   {
   }
 
-  void operator()( Actor actor, LongPressGesture longPress )
+  void operator()( Actor actor, const LongPressGesture& longPress )
   {
     GestureReceivedFunctor::operator()( actor, longPress );
 
index f4d7afc..a850887 100644 (file)
@@ -83,7 +83,7 @@ struct GestureReceivedFunctor
 {
   GestureReceivedFunctor(SignalData& data) : signalData(data) { }
 
-  void operator()(Actor actor, PanGesture pan)
+  void operator()(Actor actor, const PanGesture& pan)
   {
     signalData.functorCalled = true;
     signalData.receivedGesture = pan;
@@ -107,7 +107,7 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
   {
   }
 
-  void operator()( Actor actor, PanGesture pan )
+  void operator()( Actor actor, const PanGesture& pan )
   {
     GestureReceivedFunctor::operator()( actor, pan );
 
index 6a137b2..3432e14 100644 (file)
@@ -75,7 +75,7 @@ struct GestureReceivedFunctor
 {
   GestureReceivedFunctor(SignalData& data) : signalData(data) { }
 
-  void operator()(Actor actor, PinchGesture pinch)
+  void operator()(Actor actor, const PinchGesture& pinch)
   {
     signalData.functorCalled = true;
     signalData.receivedGesture = pinch;
@@ -99,7 +99,7 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
   {
   }
 
-  void operator()( Actor actor, PinchGesture pinch )
+  void operator()( Actor actor, const PinchGesture& pinch )
   {
     GestureReceivedFunctor::operator()( actor, pinch );
 
index d81fb58..d19bc08 100644 (file)
@@ -73,7 +73,7 @@ struct GestureReceivedFunctor
 {
   GestureReceivedFunctor(SignalData& data) : signalData(data) { }
 
-  void operator()(Actor actor, TapGesture tap)
+  void operator()(Actor actor, const TapGesture& tap)
   {
     signalData.functorCalled = true;
     signalData.receivedGesture = tap;
@@ -93,7 +93,7 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
 {
   UnstageActorFunctor( SignalData& data ) : GestureReceivedFunctor( data ) { }
 
-  void operator()(Actor actor, TapGesture tap)
+  void operator()(Actor actor, const TapGesture& tap)
   {
     GestureReceivedFunctor::operator()( actor, tap );
     Stage::GetCurrent().Remove( actor );
index bca062d..cb8dab8 100644 (file)
@@ -53,7 +53,7 @@ class DALI_IMPORT_API LongPressGestureDetector : public GestureDetector
 {
 public: // Typedefs
 
-  typedef SignalV2< void (Actor, LongPressGesture) > DetectedSignalV2; ///< Gesture detected signal type
+  typedef SignalV2< void ( Actor, const LongPressGesture& ) > DetectedSignalV2; ///< Gesture detected signal type
 
   //Signal Names
   static const char* const SIGNAL_LONG_PRESS_DETECTED; ///< name "long-press-detected"
@@ -181,7 +181,7 @@ public: // Signals
    *
    * A callback of the following type may be connected:
    * @code
-   *   void YourCallbackName(Actor actor, LongPressGesture gesture);
+   *   void YourCallbackName( Actor actor, const LongPressGesture& gesture );
    * @endcode
    * @pre The gesture detector has been initialized.
    * @return The signal to connect to.
index c99444c..04015b8 100644 (file)
@@ -56,7 +56,7 @@ class DALI_IMPORT_API PanGestureDetector : public GestureDetector
 public:
 
   // Typedefs
-  typedef SignalV2< void (Actor, PanGesture) > DetectedSignalV2; ///< Pan gesture detected signal type
+  typedef SignalV2< void ( Actor, const PanGesture& ) > DetectedSignalV2; ///< Pan gesture detected signal type
 
   // Directional Pan
   typedef std::pair< Radian, Radian > AngleThresholdPair; ///< Range of angles for a direction
@@ -275,7 +275,7 @@ public: // Signals
    *
    * A callback of the following type may be connected:
    * @code
-   *   void YourCallbackName(Actor actor, PanGesture gesture);
+   *   void YourCallbackName( Actor actor, const PanGesture& gesture );
    * @endcode
    * @pre The gesture detector has been initialized.
    * @return The signal to connect to.
index e9974e1..040e249 100644 (file)
@@ -55,7 +55,7 @@ public: // Typedefs
   /**
    * @brief Signal type.
    */
-  typedef SignalV2< void (Actor, PinchGesture) > DetectedSignalV2;
+  typedef SignalV2< void ( Actor, const PinchGesture& ) > DetectedSignalV2;
 
   //Signal Names
   static const char* const SIGNAL_PINCH_DETECTED; ///< name "pinch-detected"
@@ -115,7 +115,7 @@ public: // Signals
    *
    * A callback of the following type may be connected:
    * @code
-   *   void YourCallbackName(Actor actor, PinchGesture gesture);
+   *   void YourCallbackName( Actor actor, const PinchGesture& gesture );
    * @endcode
    * @pre The gesture detector has been initialized.
    * @return The signal to connect to.
index da01f40..cb9af81 100644 (file)
@@ -57,7 +57,7 @@ public: // Typedefs
   /**
    * @brief Signal type for detected signal.
    */
-  typedef SignalV2< void (Actor, TapGesture) > DetectedSignalV2;
+  typedef SignalV2< void ( Actor, const TapGesture& ) > DetectedSignalV2;
 
   //Signal Names
   static const char* const SIGNAL_TAP_DETECTED; ///< name "tap-detected"
@@ -167,7 +167,7 @@ public: // Signals
    *
    * A callback of the following type may be connected:
    * @code
-   *   void YourCallbackName(Actor actor, TapGesture gesture);
+   *   void YourCallbackName( Actor actor, const TapGesture& gesture );
    * @endcode
    * @pre The gesture detector has been initialized.
    * @return The signal to connect to.