Update keyboard focus direction enum for Control
[platform/core/uifw/dali-toolkit.git] / plugins / dali-script-v8 / src / signals / signal-manager.cpp
index 55d4a0e..e5cfb67 100644 (file)
 // CLASS HEADER
 #include "signal-manager.h"
 
+// EXTERNAL INCLUDES
+#include <cstring> // for strcmp
+#include <dali/public-api/images/resource-image.h>
+#include <dali/public-api/object/any.h>
+#include <dali/public-api/events/pan-gesture-detector.h>
+#include <dali/public-api/object/any.h>
+#include <dali/public-api/images/image.h>
+#include <dali/public-api/events/touch-event.h>
+#include <dali/public-api/events/hover-event.h>
+#include <dali/public-api/events/wheel-event.h>
+#include <dali/public-api/events/key-event.h>
+#include <dali/public-api/events/pan-gesture.h>
+
 // INTERNAL INCLUDES
 #include <v8-utils.h>
 #include <object/handle-wrapper.h>
 #include <events/pan-gesture-detector-wrapper.h>
 #include <toolkit/focus-manager/keyboard-focus-manager-wrapper.h>
 #include <signals/dali-any-javascript-converter.h>
-#include <dali/public-api/images/resource-image.h>
-#include <dali/public-api/object/any.h>
-#include <dali/public-api/events/pan-gesture-detector.h>
-#include <dali/public-api/object/any.h>
-#include <dali/public-api/images/image.h>
-#include <dali/public-api/events/touch-event.h>
-#include <dali/public-api/events/hover-event.h>
-#include <dali/public-api/events/mouse-wheel-event.h>
-#include <dali/public-api/events/key-event.h>
-#include <dali/public-api/events/pan-gesture.h>
 
 
 
@@ -52,7 +55,7 @@ namespace // un-named namespace
 {
 const char* const SIGNAL_TOUCHED = "touched";
 const char* const SIGNAL_HOVERED = "hovered";
-const char* const SIGNAL_MOUSE_WHEEL_EVENT = "mouse-wheel-event";
+const char* const SIGNAL_WHEEL_EVENT = "wheel-event";
 const char* const SIGNAL_ON_STAGE = "on-stage";
 const char* const SIGNAL_OFF_STAGE = "off-stage";
 const char* const ANIMATION_SIGNAL_FINISHED = "finished";
@@ -202,7 +205,7 @@ public:
     returnValue.Get(ret);
     return ret;
   }
-  bool OnMouseWheel( Actor actor, const MouseWheelEvent& event)
+  bool OnWheel( Actor actor, const WheelEvent& event)
   {
     std::vector< Dali::Any > arguments;
     Dali::Any returnValue(false);
@@ -309,7 +312,7 @@ public:
 
   Actor PreFocusChangeSignal(Actor currentFocusedActor,
                              Actor proposedActorToFocus,
-                             Toolkit::Control::KeyboardFocusNavigationDirection direction  )
+                             Toolkit::Control::KeyboardFocus::Direction direction  )
   {
     std::vector< Dali::Any > arguments;
     Dali::Any returnValue = Actor();  // we want an actor as a return value
@@ -387,9 +390,9 @@ void ActorConnection( v8::Isolate* isolate,
   {
     actor.HoveredSignal().Connect( callback, &ActorCallback::OnHover );
   }
-  else if ( strcmp( signalName.c_str(), SIGNAL_MOUSE_WHEEL_EVENT ) == 0 )
+  else if ( strcmp( signalName.c_str(), SIGNAL_WHEEL_EVENT ) == 0 )
   {
-    actor.MouseWheelEventSignal().Connect( callback, &ActorCallback::OnMouseWheel );
+    actor.WheelEventSignal().Connect( callback, &ActorCallback::OnWheel );
   }
   else if ( strcmp( signalName.c_str(), SIGNAL_ON_STAGE ) == 0 )
   {