Merge "Cleaning up RendererFactory API" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 6 Jul 2016 11:07:42 +0000 (04:07 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 6 Jul 2016 11:07:42 +0000 (04:07 -0700)
20 files changed:
automated-tests/src/dali-toolkit-internal/utc-Dali-PushButton.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h
automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp
dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp
dali-toolkit/internal/controls/model3d-view/obj-loader.cpp
dali-toolkit/internal/controls/model3d-view/obj-loader.h
dali-toolkit/internal/controls/renderers/mesh/mesh-renderer.cpp
dali-toolkit/internal/controls/renderers/mesh/mesh-renderer.h
dali-toolkit/internal/controls/renderers/renderer-string-constants.cpp
dali-toolkit/internal/controls/renderers/renderer-string-constants.h
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h
dali-toolkit/internal/text/text-controller.cpp
docs/content/example-code/properties.cpp
docs/content/programming-guide/event-system.h
docs/content/programming-guide/hello-world.h
docs/content/shared-javascript-and-cpp-documentation/creating-custom-controls.md
docs/content/shared-javascript-and-cpp-documentation/multi-touch-guide.md
docs/content/shared-javascript-and-cpp-documentation/performance-profiling.md
docs/content/shared-javascript-and-cpp-documentation/programming-languages.md

index 69698fa..edaf7fd 100644 (file)
@@ -329,7 +329,7 @@ public:
   Test mTest;
 };
 
-static bool TestCallback(Actor actor, const TouchEvent& event)
+static bool TestCallback(Actor actor, const TouchData& event)
 {
   return true;
 }
@@ -384,7 +384,7 @@ int UtcDaliPushButtonInterruptEventWhenInsensitive(void)
 
   // * Actor's touch event is connected to a callback function
   //   and this callback function consumes the event.
-  actor.TouchedSignal().Connect( &TestCallback );
+  actor.TouchSignal().Connect( &TestCallback );
 
   // * Button's pressed signal is connected to a callback function
   //   which also consumes the event.
@@ -527,7 +527,7 @@ int UtcDaliPushButtonInterruptEventWhenNonVisible(void)
 
   // * Actor's touch event is connected to a callback function
   //   and this callback function consumes the event.
-  actor.TouchedSignal().Connect( &TestCallback );
+  actor.TouchSignal().Connect( &TestCallback );
 
   // * Button's pressed signal is connected to a callback function
   //   which also consumes the event.
index e445084..da94586 100644 (file)
@@ -662,6 +662,11 @@ public:
         *type = GL_SAMPLER_2D;
         *size = 1;
         break;
+      case 2:
+        *length = snprintf(name, bufsize, "sGloss");
+        *type = GL_SAMPLER_2D;
+        *size = 1;
+        break;
       default:
         break;
     }
@@ -878,9 +883,10 @@ public:
     namedParams["program"] = ToString(program);
     mShaderTrace.PushCall("LinkProgram", out.str(), namedParams);
 
-    mNumberOfActiveUniforms=2;
+    mNumberOfActiveUniforms=3;
     GetUniformLocation(program, "sTexture");
     GetUniformLocation(program, "sEffect");
+    GetUniformLocation(program, "sGloss");
   }
 
   inline void PixelStorei(GLenum pname, GLint param)
index 0ae0611..fc015f1 100644 (file)
@@ -954,7 +954,7 @@ int UtcDaliAlignmentSizeSetP(void)
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-static bool TouchEventCallback(Actor actor, const TouchEvent& event)
+static bool TouchCallback(Actor actor, const TouchData& event)
 {
   return false;
 }
@@ -970,7 +970,7 @@ int UtcDaliAlignmentOnTouchEvent(void)
   alignment.SetAnchorPoint(AnchorPoint::TOP_LEFT);
   Stage::GetCurrent().Add(alignment);
 
-  alignment.TouchedSignal().Connect(&TouchEventCallback);
+  alignment.TouchSignal().Connect(&TouchCallback);
 
   application.Render();
   application.SendNotification();
index eac2d89..fc75b7a 100644 (file)
@@ -639,7 +639,7 @@ int Model3dView::GetShaderProperties( Toolkit::Model3dView::IlluminationType ill
 
   if( illuminationType == Toolkit::Model3dView::DIFFUSE_WITH_NORMAL_MAP )
   {
-    objectProperties |= ObjLoader::TANGENTS | ObjLoader::BINOMIALS;
+    objectProperties |= ObjLoader::TANGENTS | ObjLoader::BINORMALS;
   }
 
   return objectProperties;
index aaf7c60..2a34f59 100644 (file)
@@ -592,7 +592,7 @@ Geometry ObjLoader::CreateGeometry( int objectProperties )
   }
 
   //Some need tangent and bitangent
-  if( ( objectProperties & TANGENTS ) && ( objectProperties & BINOMIALS ) && mHasTexturePoints )
+  if( ( objectProperties & TANGENTS ) && ( objectProperties & BINORMALS ) && mHasTexturePoints )
   {
     Property::Map vertexExtFormat;
     vertexExtFormat["aTangent"] = Property::VECTOR3;
index 0336323..a877bb9 100644 (file)
@@ -97,7 +97,7 @@ public:
   {
     TEXTURE_COORDINATES = 1 << 0,
     TANGENTS = 1 << 1,
-    BINOMIALS = 1 << 2
+    BINORMALS = 1 << 2
   };
 
   ObjLoader();
index 8b3256d..2ac1dd6 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/common/stage.h>
+#include <dali/devel-api/adaptor-framework/bitmap-loader.h>
 #include <dali/devel-api/adaptor-framework/file-loader.h>
 #include <fstream>
 
 namespace Dali
 {
 
+namespace
+{
+  /**
+   * @brief Loads a texture from a file
+   * @param[in] imageUrl The url of the file
+   * @param[in] generateMipmaps Indicates whether to generate mipmaps for the texture
+   * @return A texture if loading succeeds, an empty handle otherwise
+   */
+  Texture LoadTexture( const char* imageUrl, bool generateMipmaps )
+  {
+    Texture texture;
+    Dali::BitmapLoader loader = Dali::BitmapLoader::New( imageUrl );
+    loader.Load();
+    PixelData pixelData = loader.GetPixelData();
+    if( pixelData )
+    {
+      texture = Texture::New( TextureType::TEXTURE_2D, pixelData.GetPixelFormat(), pixelData.GetWidth(), pixelData.GetHeight() );
+      texture.Upload( pixelData );
+
+      if( generateMipmaps )
+      {
+        texture.GenerateMipmaps();
+      }
+    }
+
+    return texture;
+  }
+}// unnamed namespace
+
 namespace Toolkit
 {
 
@@ -244,7 +274,8 @@ const char* NORMAL_MAP_FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
 MeshRenderer::MeshRenderer( RendererFactoryCache& factoryCache )
 : ControlRenderer( factoryCache ),
   mShaderType( ALL_TEXTURES ),
-  mUseTexture( true )
+  mUseTexture( true ),
+  mUseMipmapping( true )
 {
 }
 
@@ -275,6 +306,12 @@ void MeshRenderer::DoInitialize( Actor& actor, const Property::Map& propertyMap
     mTexturesPath.clear();
   }
 
+  Property::Value* useMipmapping = propertyMap.Find( USE_MIPMAPPING );
+  if( useMipmapping )
+  {
+    useMipmapping->Get( mUseMipmapping );
+  }
+
   Property::Value* shaderType = propertyMap.Find( SHADER_TYPE );
   if( shaderType && shaderType->Get( mShaderTypeString ) )
   {
@@ -413,16 +450,14 @@ void MeshRenderer::CreateShader()
 bool MeshRenderer::CreateGeometry()
 {
   //Determine if we need to use a simpler shader to handle the provided data
-  if( mShaderType == ALL_TEXTURES )
+  if( !mUseTexture || !mObjLoader.IsDiffuseMapPresent() )
   {
-    if( !mObjLoader.IsNormalMapPresent() || !mObjLoader.IsSpecularMapPresent() )
-    {
-      mShaderType = DIFFUSE_TEXTURE;
-    }
+    mUseTexture = false;
+    mShaderType = TEXTURELESS;
   }
-  if( !mObjLoader.IsTexturePresent() || !mObjLoader.IsDiffuseMapPresent() || !mUseTexture )
+  else if( mShaderType == ALL_TEXTURES && (!mObjLoader.IsNormalMapPresent() || !mObjLoader.IsSpecularMapPresent()) )
   {
-    mShaderType = TEXTURELESS;
+    mShaderType = DIFFUSE_TEXTURE;
   }
 
   int objectProperties = 0;
@@ -435,7 +470,7 @@ bool MeshRenderer::CreateGeometry()
 
   if( mShaderType == ALL_TEXTURES )
   {
-    objectProperties |= ObjLoader::TANGENTS | ObjLoader::BINOMIALS;
+    objectProperties |= ObjLoader::TANGENTS | ObjLoader::BINORMALS;
   }
 
   //Create geometry with attributes required by shader.
@@ -492,57 +527,68 @@ bool MeshRenderer::LoadTextures()
 {
   mTextureSet = TextureSet::New();
 
-  if( !mDiffuseTextureUrl.empty() )
+  if( mUseTexture )
   {
-    std::string imageUrl = mTexturesPath + mDiffuseTextureUrl;
-
-    //Load textures
-    Image diffuseTexture = ResourceImage::New( imageUrl );
-    if( diffuseTexture )
-    {
-      mTextureSet.SetImage( DIFFUSE_INDEX, diffuseTexture );
-    }
-    else
+    Sampler sampler = Sampler::New();
+    if( mUseMipmapping )
     {
-      DALI_LOG_ERROR( "Failed to load diffuse map texture in mesh renderer.\n");
-      return false;
+      sampler.SetFilterMode( FilterMode::LINEAR_MIPMAP_LINEAR, FilterMode::LINEAR_MIPMAP_LINEAR );
     }
-  }
-
-  if( !mNormalTextureUrl.empty() && ( mShaderType == ALL_TEXTURES ) )
-  {
-    std::string imageUrl = mTexturesPath + mNormalTextureUrl;
 
-    //Load textures
-    Image normalTexture = ResourceImage::New( imageUrl );
-    if( normalTexture )
+    if( !mDiffuseTextureUrl.empty() )
     {
-      mTextureSet.SetImage( NORMAL_INDEX, normalTexture );
+      std::string imageUrl = mTexturesPath + mDiffuseTextureUrl;
+
+      //Load textures
+      Texture diffuseTexture = LoadTexture( imageUrl.c_str(), mUseMipmapping );
+      if( diffuseTexture )
+      {
+        mTextureSet.SetTexture( DIFFUSE_INDEX, diffuseTexture );
+        mTextureSet.SetSampler( DIFFUSE_INDEX, sampler );
+      }
+      else
+      {
+        DALI_LOG_ERROR( "Failed to load diffuse map texture in mesh renderer.\n");
+        return false;
+      }
     }
-    else
-    {
-      DALI_LOG_ERROR( "Failed to load normal map texture in mesh renderer.\n");
-      return false;
-    }
-  }
-
-  if( !mGlossTextureUrl.empty() && ( mShaderType == ALL_TEXTURES ) )
-  {
-    std::string imageUrl = mTexturesPath + mGlossTextureUrl;
 
-    //Load textures
-    Image glossTexture = ResourceImage::New( imageUrl );
-    if( glossTexture )
+    if( !mNormalTextureUrl.empty() && ( mShaderType == ALL_TEXTURES ) )
     {
-      mTextureSet.SetImage( GLOSS_INDEX, glossTexture );
+      std::string imageUrl = mTexturesPath + mNormalTextureUrl;
+
+      //Load textures
+      Texture normalTexture = LoadTexture( imageUrl.c_str(), mUseMipmapping );
+      if( normalTexture )
+      {
+        mTextureSet.SetTexture( NORMAL_INDEX, normalTexture );
+        mTextureSet.SetSampler( NORMAL_INDEX, sampler );
+      }
+      else
+      {
+        DALI_LOG_ERROR( "Failed to load normal map texture in mesh renderer.\n");
+        return false;
+      }
     }
-    else
+
+    if( !mGlossTextureUrl.empty() && ( mShaderType == ALL_TEXTURES ) )
     {
-      DALI_LOG_ERROR( "Failed to load gloss map texture in mesh renderer.\n");
-      return false;
+      std::string imageUrl = mTexturesPath + mGlossTextureUrl;
+
+      //Load textures
+      Texture glossTexture = LoadTexture( imageUrl.c_str(), mUseMipmapping );
+      if( glossTexture )
+      {
+        mTextureSet.SetTexture( GLOSS_INDEX, glossTexture );
+        mTextureSet.SetSampler( GLOSS_INDEX, sampler );
+      }
+      else
+      {
+        DALI_LOG_ERROR( "Failed to load gloss map texture in mesh renderer.\n");
+        return false;
+      }
     }
   }
-
   return true;
 }
 
index ede12fb..e5aaee5 100644 (file)
@@ -196,6 +196,7 @@ private:
   ShaderType mShaderType;
 
   bool mUseTexture;
+  bool mUseMipmapping;
 };
 
 } // namespace Internal
index a5eb87a..41fd6a7 100644 (file)
@@ -43,6 +43,7 @@ const char * const OBJECT_URL( "objectUrl" );
 const char * const MATERIAL_URL( "materialUrl" );
 const char * const TEXTURES_PATH( "texturesPath" );
 const char * const SHADER_TYPE( "shaderType" );
+const char * const USE_MIPMAPPING( "useMipmapping" );
 
 } // namespace Internal
 
index 51e13f0..0bb7d45 100644 (file)
@@ -43,6 +43,7 @@ extern const char * const OBJECT_URL;
 extern const char * const MATERIAL_URL;
 extern const char * const TEXTURES_PATH;
 extern const char * const SHADER_TYPE;
+extern const char * const USE_MIPMAPPING;
 
 } // namespace Internal
 
index 2a52cff..d503638 100644 (file)
@@ -26,6 +26,7 @@
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/events/key-event.h>
+#include <dali/public-api/events/touch-data.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/images/resource-image.h>
@@ -120,7 +121,7 @@ KeyboardFocusManager::KeyboardFocusManager()
   OnPhysicalKeyboardStatusChanged(PhysicalKeyboard::Get());
 
   Toolkit::KeyInputFocusManager::Get().UnhandledKeyEventSignal().Connect(mSlotDelegate, &KeyboardFocusManager::OnKeyEvent);
-  Stage::GetCurrent().TouchedSignal().Connect(mSlotDelegate, &KeyboardFocusManager::OnTouched);
+  Stage::GetCurrent().TouchSignal().Connect( mSlotDelegate, &KeyboardFocusManager::OnTouch );
   PhysicalKeyboard::Get().StatusChangedSignal().Connect(mSlotDelegate, &KeyboardFocusManager::OnPhysicalKeyboardStatusChanged);
 }
 
@@ -681,11 +682,11 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
   }
 }
 
-void KeyboardFocusManager::OnTouched(const TouchEvent& touchEvent)
+void KeyboardFocusManager::OnTouch(const TouchData& touch)
 {
   // Clear the focus when user touch the screen.
   // We only do this on a Down event, otherwise the clear action may override a manually focused actor.
-  if( ( touchEvent.GetPointCount() < 1 ) || ( touchEvent.GetPoint( 0 ).state == TouchPoint::Down ) )
+  if( ( touch.GetPointCount() < 1 ) || ( touch.GetState( 0 ) == PointState::DOWN ) )
   {
     ClearFocus();
   }
index de3770f..f615731 100644 (file)
@@ -221,9 +221,9 @@ private:
   /**
    * Callback for the touch event when the screen is touched and when the touch ends
    * (i.e. the down & up touch events only).
-   * @param[in] touchEvent The touch event
+   * @param[in] touch The touch information
    */
-  void OnTouched(const TouchEvent& touchEvent);
+  void OnTouch( const TouchData& touch );
 
   /**
    * Change the keyboard focus status when keyboard focus feature turned on or off.
index 8175be4..47de1a2 100644 (file)
@@ -2647,7 +2647,6 @@ ImfManager::ImfCallbackData Controller::OnImfEvent( ImfManager& imfManager, cons
         mImpl->mEventData->mScrollAfterDelete = true;
 
         requestRelayout = true;
-        retrieveCursor = true;
       }
       break;
     }
index d0f8923..300d276 100644 (file)
@@ -79,7 +79,7 @@ public:
     mTagPropertyIndex = mImageView.RegisterProperty( TAG_PROPERTY_NAME, 0, Property::READ_WRITE /* Event-side only, i.e. not animatable */ );
 
     // Connect to the touch-event
-    mImageView.TouchedSignal().Connect( this, &PropertyController::OnTouched );
+    mImageView.TouchSignal().Connect( this, &PropertyController::OnTouched );
 
     // Create text label
     mTagText = Toolkit::TextLabel::New( "0" );
@@ -95,7 +95,7 @@ public:
    * param[in] touch The touch-event
    * return Set to true if the signal was consumed correctly
    */
-  bool OnTouched( Actor actor, const TouchEvent& touch )
+  bool OnTouched( Actor actor, const TouchData& touch )
   {
     int touchedCount = 0;
 
index f360947..98c650d 100644 (file)
@@ -2,25 +2,27 @@
 
 DALi emits several signals to an application to inform it of user actions.
 
-<h2 class="pg">Touch Events</h2>
+<h2 class="pg">Touch</h2>
 
-An application can be notified when a user interacts with the touch screen on the device by connecting to the touch signal provided by Dali::Actor.  This signal will be emitted by DALi whenever the touch occurs within the connected actor's bounds.
+An application can be notified when a user interacts with the touch screen on the device by connecting to the touch signal provided by Dali::Actor.
+This signal will be emitted by DALi whenever the touch occurs within the connected actor's bounds.
 
-Each point on the screen that is currently being touched or where touch has stopped is represented by a Dali::TouchPoint.  This object stores information about the state of the touch point (down, up, motion etc.) and the co-ordinates of the touch.
+Each point on the screen that is currently being touched or where touch has stopped is represented by a point.
+Dali::TouchData stores information about the state of each point (down, up, motion etc.) and the co-ordinates of the touch.
 
-A collection of touch points at a specific moment in time is collated into a Dali::TouchEvent.  When a multi-touch event occurs, each touch point represents the points that are currently being touched or the points where touch has stopped.
+When a multi-touch event occurs, each point represents the points that are currently being touched or the points where touch has stopped.
 
 The following example shows how a connection to a touch event signal can be established:
 
 @code
-bool OnTouch(Actor actor, const TouchEvent& touch)
+bool OnTouch( Dali::Actor actor, const Dali::TouchData& touch )
 {
   bool handled = false;
 
-  switch(touch.GetPointCount())
+  switch( touch.GetPointCount() )
   {
     case 1: // Single touch
-      if (touch.GetPoint(0).GetState == TouchPoint::Down)
+      if ( touch.GetState( 0 ) == Dali::PointState::DOWN )
       {
         // Do action when first touches the touch screen.
         ...
@@ -39,41 +41,45 @@ bool OnTouch(Actor actor, const TouchEvent& touch)
 }
 
 // Elsewhere
-Actor actor = Actor::New();
-actor.SignalTouch().Connect(&OnTouch);
+Dali::Actor actor = Actor::New();
+actor.TouchSignal().Connect( &OnTouch );
 @endcode
 
 The primary touch point is the first point that the user touches.
 
-The touch event is first emitted to the actor which is hit by the primary touch point.  If this hit actor does not handle the event, then the event is offered to the hit actor's parent.  Again, if the parent does not handle this event, it is then offered to its parent and so on until the stage is reached or the event is consumed.
+The touch signal is first emitted to the actor which is hit by the primary touch point.
+If this hit actor does not handle (consume) the event, then the event is offered to the hit actor's parent.
+Again, if the parent does not handle this event, it is then offered to its parent and so on until the stage is reached or the event is consumed.
 
-If a parent and child both connect to the Touch signal, then the touch event is first offered to the child.  If it is consumed by the child, then the parent will not be informed.
+If the TouchSignal of both a parent and child are connected to, then the touch event is first offered to the child's listener.
+If it is consumed by the child's listener, then the parent will not be informed.
 
 <h2 class="pg">Gestures</h2>
 
-A Dali::GestureDetector analyses a stream of touch events and attempts to determine the intention of the user.  An actor is attached to a gesture detector and if the detector recognises a pattern, it will emit a detected signal to the application.
+A Dali::GestureDetector analyses a stream of touch input and attempts to determine the intention of the user.
+An actor is attached to a gesture detector and if the detector recognises a pattern, it will emit a detected signal to the application.
 
-The following gesture detectors are currently supported in Dali:
+The following gesture detectors are currently supported in DALi:
 
+- Dali::LongPressGestureDetector - When the user presses and holds a particular point on the screen for a specified length of time.
 - Dali::PinchGestureDetector - When the user moves two fingers towards or away from each other.
 - Dali::PanGestureDetector - When the user moves one or more fingers in the same direction.
+- Dali::TapGestureDetector - When the user taps the screen.
 
 The example below shows how an application can be notified of a pinch gesture:
 
 @code
-void OnPinch(Actor actor, PinchGesture pinch)
+void OnPinch( Dali::Actor actor, const Dali::PinchGesture& pinch )
 {
   // Scale your actor according to the pinch scale
-  Vector3 newSize = actor.GetCurrentSize() * pinch.GetScale();
+  Vector3 newSize = actor.GetCurrentSize() * pinch.scale;
   actor.SetSize(newSize);
 }
 
 // Elsewhere
-PinchDetector detector = PinchDetector::New();
-detector.Attach(myActor);
-detector.SignalDetected().Connect(&OnPinch);
+Dali::PinchGestureDetector detector = Dali::PinchDetector::New();
+detector.Attach( myActor );
+detector.DetectedSignal().Connect( &OnPinch );
 @endcode
 
- */
-
-// @TODO: Add "Key Events" section
+*/
index 9c4383f..c7b5ddd 100644 (file)
@@ -48,10 +48,10 @@ public:
     stage.Add( mTextLabel );
 
     // Respond to a click anywhere on the stage
-    stage.GetRootLayer().TouchedSignal().Connect( this, &HelloWorldController::OnTouch );
+    stage.GetRootLayer().TouchSignal().Connect( this, &HelloWorldController::OnTouch );
   }
 
-  bool OnTouch( Actor actor, const TouchEvent& touch )
+  bool OnTouch( Actor actor, const TouchData& touch )
   {
     // quit the application
     mApplication.Quit();
index 7410978..946b4f0 100644 (file)
@@ -137,7 +137,6 @@ Dali::Toolkit::Internal::Control provides several behaviours which are specified
 | Behaviour                            | Description                                                             |
 |--------------------------------------|-------------------------------------------------------------------------|
 | ACTOR_BEHAVIOUR_NONE                 | No behaviour required.                                                  |
-| REQUIRES_TOUCH_EVENTS                | If our control requires [touch events](@ref creating-controls-events).  |
 | REQUIRES_HOVER_EVENTS                | If our control requires [hover events](@ref creating-controls-events).  |
 | REQUIRES_WHEEL_EVENTS                | If our control requires [wheel events](@ref creating-controls-events).  |
 | REQUIRES_STYLE_CHANGE_SIGNALS        | True if need to monitor style change signals such as Theme/Font change. |
@@ -146,25 +145,11 @@ ________________________________________________________________________________
 
 ### Touch, Hover & Wheel Events {#creating-controls-events}
 
-+ A **touch event** is when any touch occurs within the bounds of the custom actor.
++ A **touch** is when any touch occurs within the bounds of the custom actor. Connect to Dali::Actor::TouchSignal().
 + A **hover event** is when a pointer moves within the bounds of a custom actor (e.g. mouse pointer or hover pointer).
 + A **wheel event** is when the mouse wheel (or similar) is moved while hovering over an actor (via a mouse pointer or hover pointer).
  
-If the control should needs to utilise these events, then the correct behaviour flag should be used when constructing the control.
-Then the appropriate method should be overridden.
-~~~{.cpp}
-// C++
-bool MyUIControlImpl::OnTouchEvent( const TouchEvent& event )
-{
-  bool consumed = false;
-
-  // Handle touch event
-
-  // Return true if handled/consumed, false otherwise
-  return consumed;
-}
-~~~
+If the control needs to utilise hover and wheel events, then the correct behaviour flag should be used when constructing the control and then the appropriate method should be overridden.
 ~~~{.cpp}
 // C++
 bool MyUIControlImpl::OnHoverEvent( const HoverEvent& event )
index f3a1df2..d58019f 100644 (file)
@@ -6,9 +6,9 @@ Multi-Touch Events
 
 Touch events are received via signals.
 
-For C++ API see Dali::Actor::TouchedSignal() and Dali::Actor::HoveredSignal() for more details.
+For C++ API see Dali::Actor::TouchSignal() and Dali::Actor::HoveredSignal() for more details.
 
-For JavaScript use actor.connect( "touched", myCallback ) and actor.connect("hovered", myCallback );
+For JavaScript use actor.connect( "touch", myCallback ) and actor.connect("hovered", myCallback );
 
 ### Hit Testing Rules Summary:
 
@@ -115,7 +115,7 @@ Hit Priority of above Actor tree (all overlays): 1 - Lowest. 6 - Highest.
     IF ( TOUCH-SIGNAL-NOT-EMPTY )
     {
       // Only do the emission if touch signal of actor has connections.
-        CONSUMED = TOUCHED-SIGNAL( TOUCH-EVENT )
+        CONSUMED = TOUCH-SIGNAL( TOUCH-DATA )
     }
 
     IF ( NOT-CONSUMED )
index 60a4435..c53bee7 100644 (file)
@@ -174,7 +174,7 @@ $ INFO: DALI:  Event, min 0.04 ms, max 5.27 ms, total (0.1 secs), avg 0.28 ms, s
 ~~~
 
 Inside the event processing, the application may be listening for certain events.
-For example when an actor is touched, some application code may be run in an OnTouchEvent callback.
+For example when an actor is touched, some application code may be run in an OnTouch callback.
 By checking the max times you can check for any spikes that occur when interacting with the application.
 
 Example:
index e2c4de2..5938e53 100644 (file)
@@ -13,15 +13,15 @@ actor.SetParentOrigin( Dali::ParentOrigin::CENTER );
 actor.SetAnchorPoint( Dali::AnchorPoint::CENTER );
 Dali::Stage::GetCurrent().Add( actor );
 ...
-bool OnPressed( Dali::Actor, const TouchEvent& event )
+bool OnPressed( Dali::Actor, const TouchData& touch )
 {
   Dali::Animation anim = Dali::Animation::New( 1.5f );
-  anim.AnimateTo( Property( actor, Actor::Property::POSITION ), Vector3( 200,-100,0), AlphaFunctions::Bounce );
+  anim.AnimateTo( Property( actor, Actor::Property::POSITION ), Vector3( 200, -100, 0 ), AlphaFunctions::Bounce );
   anim.play();
   return true; // consume the touch event
 }
 ...
-actor.TouchedSignal().Connect( &OnPressed );
+actor.TouchSignal().Connect( &OnPressed );
 ~~~
 
 */
@@ -34,16 +34,16 @@ actor.parentOrigin = dali.CENTER;
 actor.anchorPoint = dali.CENTER;
 dali.stage.add( actor );
 ...
-function onPressed( actor, touchEvent )
+function onPressed( actor, touch )
 {
   var animOptions = { alpha: "bounce", delay: 0, duration: 15 };
   var anim = new dali.Animation();
-  anim.animateTo( actor, "position", [ 200,-100,0], animOptions );
+  anim.animateTo( actor, "position", [ 200, -100, 0 ], animOptions );
   anim.play();
   return true; // consume the touch event
 }
 ...
-actor.connect( "touched", onPressed );
+actor.connect( "touch", onPressed );
 
 ~~~
 
@@ -76,7 +76,7 @@ actor.connect( "touched", onPressed );
       "parentOrigin": "CENTER",
       "signals" :
       [
-        { "name" : "touched", "action": "play", "animation": "move" }
+        { "name" : "touch", "action": "play", "animation": "move" }
       ]
     }
   ]