Merge "Remove batching." into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 14 Feb 2017 15:51:36 +0000 (07:51 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 14 Feb 2017 15:51:36 +0000 (07:51 -0800)
68 files changed:
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-harness.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-native-image.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-native-image.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp
dali-toolkit/devel-api/controls/control-depth-index-ranges.h
dali-toolkit/devel-api/controls/control-wrapper-impl.cpp
dali-toolkit/devel-api/controls/control-wrapper-impl.h
dali-toolkit/devel-api/controls/control-wrapper.cpp
dali-toolkit/devel-api/controls/control-wrapper.h
dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp
dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.h
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/visuals/npatch/npatch-visual.cpp
dali-toolkit/internal/visuals/text/text-visual.cpp
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/styles/1920x1080/dali-toolkit-default-theme.json
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json
dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json
packaging/dali-addon.spec
packaging/dali-toolkit.spec
plugins/dali-swig/SWIG/dali-core.i
plugins/dali-swig/SWIG/dali-gc.i
plugins/dali-swig/SWIG/dali-toolkit.i
plugins/dali-swig/SWIG/dali.i
plugins/dali-swig/SWIG/events/accessibilitymanager-event.i
plugins/dali-swig/SWIG/events/control-event.i
plugins/dali-swig/SWIG/events/stage-event.i
plugins/dali-swig/SWIG/gestures/gesture.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/hover.i
plugins/dali-swig/SWIG/gestures/key.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/long-press-gesture.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/pan-gesture.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/pinch-gesture.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/tap-gesture.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/touch.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/wheel.i [new file with mode: 0644]
plugins/dali-swig/SWIG/signal-parameters.i
plugins/dali-swig/examples/control-dashboard.cs
plugins/dali-swig/examples/custom-control.cs
plugins/dali-swig/examples/dali-test.cs
plugins/dali-swig/examples/hello-world.cs
plugins/dali-swig/examples/image-view.cs
plugins/dali-swig/examples/json/control-dashboard.json [new file with mode: 0644]
plugins/dali-swig/examples/scroll-view.cs
plugins/dali-swig/examples/user-alphafunction.cs
plugins/dali-swig/manual/cpp/view-wrapper-impl-wrap.cpp
plugins/dali-swig/manual/csharp/CustomView.cs
plugins/dali-swig/manual/csharp/ManualPINVOKE.cs
plugins/dali-swig/manual/csharp/ViewRegistry.cs
plugins/dali-swig/manual/csharp/ViewWrapper.cs
plugins/dali-swig/manual/csharp/ViewWrapperImpl.cs
plugins/dali-swig/views/spin.cs

index b50f506..8877a50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -338,6 +338,21 @@ BufferImage CreateBufferImage()
   return CreateBufferImage(4, 4, Color::WHITE);
 }
 
+void PrepareResourceImage( TestApplication& application, unsigned int imageWidth, unsigned int imageHeight, Pixel::Format pixelFormat )
+{
+  TestPlatformAbstraction& platform = application.GetPlatform();
+  platform.SetClosestImageSize(Vector2( imageWidth, imageHeight));
+
+  Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_RETAIN );
+  Integration::PixelBuffer* pixbuffer = bitmap->GetPackedPixelsProfile()->ReserveBuffer( pixelFormat, imageWidth, imageHeight, imageWidth, imageHeight );
+  unsigned int bytesPerPixel = GetBytesPerPixel(  pixelFormat );
+  unsigned int initialColor = 0xFF;
+  memset( pixbuffer, initialColor, imageHeight*imageWidth*bytesPerPixel);
+
+  Integration::ResourcePointer resourcePtr(bitmap);
+  platform.SetSynchronouslyLoadedResource( resourcePtr );
+}
+
 namespace Test
 {
 
index a3149f4..79d422b 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TEST_SUITE_UTILS_H__
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -162,6 +162,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
     return false;
   }
 
+  bool result = false;
   switch(type)
   {
     case Property::BOOLEAN:
@@ -169,7 +170,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       bool a, b;
       q1.Get(a);
       q2.Get(b);
-      return a == b;
+      result =  a == b;
       break;
     }
     case Property::INTEGER:
@@ -177,7 +178,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       int a, b;
       q1.Get(a);
       q2.Get(b);
-      return a == b;
+      result =  a == b;
       break;
     }
     case Property::FLOAT:
@@ -185,7 +186,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       float a, b;
       q1.Get(a);
       q2.Get(b);
-      return CompareType<float>(a, b, epsilon);
+      result =  CompareType<float>(a, b, epsilon);
       break;
     }
     case Property::VECTOR2:
@@ -193,7 +194,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       Vector2 a, b;
       q1.Get(a);
       q2.Get(b);
-      return CompareType<Vector2>(a, b, epsilon);
+      result = CompareType<Vector2>(a, b, epsilon);
       break;
     }
     case Property::VECTOR3:
@@ -201,7 +202,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       Vector3 a, b;
       q1.Get(a);
       q2.Get(b);
-      return CompareType<Vector3>(a, b, epsilon);
+      result = CompareType<Vector3>(a, b, epsilon);
       break;
     }
     case Property::RECTANGLE:
@@ -210,7 +211,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       Vector4 a, b;
       q1.Get(a);
       q2.Get(b);
-      return CompareType<Vector4>(a, b, epsilon);
+      result = CompareType<Vector4>(a, b, epsilon);
       break;
     }
     case Property::ROTATION:
@@ -218,14 +219,28 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       Quaternion a, b;
       q1.Get(a);
       q2.Get(b);
-      return CompareType<Quaternion>(a, b, epsilon);
+      result = CompareType<Quaternion>(a, b, epsilon);
+      break;
+    }
+    case Property::MATRIX:
+    case Property::MATRIX3:
+    case Property::STRING:
+    case Property::ARRAY:
+    case Property::MAP:
+    {
+      //TODO: Implement this?
+      DALI_ASSERT_ALWAYS( 0 && "Not implemented");
+      result = false;
+      break;
+    }
+    case Property::NONE:
+    {
+      result = false;
       break;
     }
-    default:
-      return false;
   }
 
-  return false;
+  return result;
 }
 
 
@@ -499,6 +514,9 @@ struct DefaultFunctionCoverage
 BufferImage CreateBufferImage();
 BufferImage CreateBufferImage(int width, int height, const Vector4& color);
 
+// Prepare a resource image to be loaded. Should be called before creating the ResourceImage
+void PrepareResourceImage( TestApplication& application, unsigned int imageWidth, unsigned int imageHeight, Pixel::Format pixelFormat );
+
 // Test namespace to prevent pollution of Dali namespace, add Test helper functions here
 namespace Test
 {
index d89d4d2..6636676 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index c5ecc4f..5c94252 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TEST_APPLICATION_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 76b391b..840ef0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 135476e..da4e7e8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -38,4 +38,19 @@ TestNativeImage::~TestNativeImage()
 {
 }
 
+
+TestNativeImageNoExtPointer TestNativeImageNoExt::New(int width, int height)
+{
+  return new TestNativeImageNoExt(width, height);
+}
+
+TestNativeImageNoExt::TestNativeImageNoExt(int width, int height)
+: mWidth(width), mHeight(height), mExtensionCreateCalls(0), mExtensionDestroyCalls(0), mTargetTextureCalls(0),createResult(true)
+{
+}
+
+TestNativeImageNoExt::~TestNativeImageNoExt()
+{
+}
+
 } // namespace dali
index f1938c3..896ce52 100644 (file)
@@ -2,7 +2,7 @@
 #define __TEST_NATIVE_IMAGE_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,8 +19,6 @@
  */
 
 // INTERNAL INCLUDES
-
-// EXTERNAL INCLUDES
 #include <dali/public-api/images/native-image-interface.h>
 #include <dali/devel-api/images/native-image-interface-extension.h>
 #include <dali/integration-api/gl-defines.h>
@@ -28,7 +26,9 @@
 namespace Dali
 {
 class TestNativeImage;
+class TestNativeImageNoExt;
 typedef IntrusivePtr<TestNativeImage> TestNativeImagePointer;
+typedef IntrusivePtr<TestNativeImageNoExt> TestNativeImageNoExtPointer;
 
 class DALI_IMPORT_API TestNativeImageExtension: public Dali::NativeImageInterface::Extension
 {
@@ -36,7 +36,7 @@ public:
   inline const char* GetCustomFragmentPreFix(){return "#extension GL_OES_EGL_image_external:require\n";}
   inline const char* GetCustomSamplerTypename(){return "samplerExternalOES";}
 
-  inline int GetEglImageTextureTarget(){return GL_TEXTURE_2D;}
+  inline int GetEglImageTextureTarget(){return GL_TEXTURE_EXTERNAL_OES;}
 
 };
 
@@ -48,7 +48,7 @@ public:
   inline void SetGlExtensionCreateResult(bool result){ createResult = result;}
   inline virtual bool GlExtensionCreate() { ++mExtensionCreateCalls; return createResult;};
   inline virtual void GlExtensionDestroy() { ++mExtensionDestroyCalls; };
-  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 1;};
+  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 0;};
   inline virtual void PrepareTexture() {};
   inline virtual unsigned int GetWidth() const {return mWidth;};
   inline virtual unsigned int GetHeight() const {return mHeight;};
@@ -70,6 +70,34 @@ public:
   TestNativeImageExtension* mExtension;
 };
 
+
+class DALI_IMPORT_API TestNativeImageNoExt : public Dali::NativeImageInterface
+{
+public:
+  static TestNativeImageNoExtPointer New(int width, int height);
+
+  inline void SetGlExtensionCreateResult(bool result){ createResult = result;}
+  inline virtual bool GlExtensionCreate() { ++mExtensionCreateCalls; return createResult;};
+  inline virtual void GlExtensionDestroy() { ++mExtensionDestroyCalls; };
+  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 1;};
+  inline virtual void PrepareTexture() {};
+  inline virtual unsigned int GetWidth() const {return mWidth;};
+  inline virtual unsigned int GetHeight() const {return mHeight;};
+  inline virtual bool RequiresBlending() const {return true;};
+
+private:
+  TestNativeImageNoExt(int width, int height);
+  virtual ~TestNativeImageNoExt();
+
+  int mWidth;
+  int mHeight;
+public:
+  int mExtensionCreateCalls;
+  int mExtensionDestroyCalls;
+  int mTargetTextureCalls;
+  bool createResult;
+};
+
 } // Dali
 
 #endif
index db22b86..86b5430 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -40,6 +40,7 @@ TestPlatformAbstraction::TestPlatformAbstraction()
 
 TestPlatformAbstraction::~TestPlatformAbstraction()
 {
+  DiscardRequest();
 }
 
 void TestPlatformAbstraction::Suspend()
@@ -93,7 +94,7 @@ Integration::ResourcePointer TestPlatformAbstraction::LoadResourceSynchronously(
 Integration::BitmapPtr TestPlatformAbstraction::DecodeBuffer( const Integration::ResourceType& resourceType, uint8_t * buffer, size_t size )
 {
   mTrace.PushCall("DecodeBuffer", "");
-  return Integration::BitmapPtr();
+  return mDecodedBitmap;
 }
 
 void TestPlatformAbstraction::CancelLoad(Integration::ResourceId id, Integration::ResourceTypeId typeId)
@@ -181,6 +182,7 @@ void TestPlatformAbstraction::Initialize()
   mResourceRequests.Clear();
   mIsLoadingResult=false;
   mSynchronouslyLoadedResource.Reset();
+  mDecodedBitmap.Reset();
 }
 
 bool TestPlatformAbstraction::WasCalled(TestFuncEnum func)
@@ -214,6 +216,7 @@ void TestPlatformAbstraction::ClearReadyResources()
   mLoadedResourcesQueue.clear();
   mFailedLoadQueue.clear();
   mSynchronouslyLoadedResource.Reset();
+  mDecodedBitmap.Reset();
 }
 
 void TestPlatformAbstraction::SetResourceLoaded(Integration::ResourceId  loadedId,
@@ -264,6 +267,7 @@ void TestPlatformAbstraction::SetAllResourceRequestsAsLoaded()
     Integration::ResourcePointer resource(bitmap);
     bitmap->GetPackedPixelsProfile()->ReserveBuffer(Pixel::RGBA8888, 80, 80, 80, 80);
     SetResourceLoaded( request->GetId(), request->GetType()->id, resource );
+    delete request;
   }
   mResourceRequests.Clear();
 }
@@ -273,13 +277,21 @@ void TestPlatformAbstraction::SetAllResourceRequestsAsFailed( Integration::Resou
   for( ResourceRequestContainer::Iterator iter = mResourceRequests.Begin(), endIter = mResourceRequests.End();
        iter != endIter; ++iter )
   {
+    Integration::ResourceRequest* request = *iter;
     SetResourceLoadFailed( (*iter)->GetId(), failure);
+    delete request;
   }
   mResourceRequests.Clear();
 }
 
 void TestPlatformAbstraction::DiscardRequest()
 {
+  for( ResourceRequestContainer::Iterator iter = mResourceRequests.Begin(), endIter = mResourceRequests.End();
+       iter != endIter; ++iter )
+  {
+    Integration::ResourceRequest* request = *iter;
+    delete request;
+  }
   mResourceRequests.Clear();
 }
 
@@ -307,4 +319,9 @@ void TestPlatformAbstraction::SetSynchronouslyLoadedResource( Integration::Resou
   mSynchronouslyLoadedResource = resource;
 }
 
+void TestPlatformAbstraction::SetDecodedBitmap( Integration::BitmapPtr bitmap )
+{
+  mDecodedBitmap = bitmap;
+}
+
 } // namespace Dali
index d9d3247..42e2d98 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TEST_PLATFORM_ABSTRACTION_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -264,6 +264,17 @@ public: // TEST FUNCTIONS
    */
   void SetSynchronouslyLoadedResource( Integration::ResourcePointer resource );
 
+  /**
+   * @brief Sets the bitmap returned by DecodeBuffer()
+   * @param[in] bitmap The decoded bitmap
+   */
+  void SetDecodedBitmap( Integration::BitmapPtr bitmap );
+
+private:
+
+  TestPlatformAbstraction( const TestPlatformAbstraction& ); ///< Undefined
+  TestPlatformAbstraction& operator=( const TestPlatformAbstraction& ); ///< Undefined
+
 private:
 
   struct LoadedResource
@@ -307,6 +318,7 @@ private:
   bool                          mSaveFileResult;
 
   Integration::ResourcePointer  mSynchronouslyLoadedResource;
+  Integration::BitmapPtr        mDecodedBitmap;
 };
 
 } // Dali
index 76ccff7..f57dc50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 32076f1..8caf518 100644 (file)
@@ -23,6 +23,7 @@
 #include <dali-toolkit-test-suite-utils.h>
 
 #include <dali.h>
+#include <dali/public-api/dali-core.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/control-wrapper.h>
 #include <dali-toolkit/devel-api/controls/control-wrapper-impl.h>
@@ -216,8 +217,12 @@ struct TestCustomControl : public Toolkit::Internal::ControlWrapper
   bool mNego;
   unsigned int mDepth;
 };
+
 }
 
+static std::string customControlTypeName = "TestCustomControl";
+static TypeRegistration customControl( customControlTypeName, typeid(Dali::Toolkit::Control), NULL );
+
 int UtcDaliControlWrapperConstructor(void)
 {
   ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
@@ -227,9 +232,10 @@ int UtcDaliControlWrapperConstructor(void)
 
   DALI_TEST_CHECK( !ControlWrapper::DownCast( controlWrapper ) );
 
-  controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   DALI_TEST_CHECK( ControlWrapper::DownCast( controlWrapper ) );
+
   END_TEST;
 }
 
@@ -237,7 +243,7 @@ int UtcDaliControlWrapperDestructor(void)
 {
   TestApplication application;
 
-  ControlWrapper control = ControlWrapper::New( *( new Toolkit::Internal::ControlWrapper( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT ) ) );
+  ControlWrapper control = ControlWrapper::New( customControlTypeName, *( new Toolkit::Internal::ControlWrapper( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT ) ) );
 
   ControlWrapper control2( control );
 
@@ -259,7 +265,7 @@ int UtcDaliControlWrapperRelayoutRequest(void)
   DALI_TEST_EQUALS( gOnRelayout, false, TEST_LOCATION );
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   Stage::GetCurrent().Add( controlWrapper );
 
@@ -283,7 +289,7 @@ int UtcDaliControlWrapperImplGetHeightForWidthBase(void)
   TestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   float width = 300.0f;
   float v = 0.0f;
@@ -303,7 +309,7 @@ int UtcDaliControlWrapperGetWidthForHeightBase(void)
   TestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   float height = 300.0f;
   float v = 0.0f;
@@ -323,7 +329,7 @@ int UtcDaliControlWrapperCalculateChildSizeBase(void)
   TestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   Actor child = Actor::New();
   child.SetResizePolicy( Dali::ResizePolicy::FIXED, Dali::Dimension::ALL_DIMENSIONS );
@@ -344,7 +350,7 @@ int UtcDaliControlWrapperRelayoutDependentOnChildrenBase(void)
   TestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   bool v = false;
 
@@ -371,7 +377,7 @@ int UtcDaliControlWrapperRegisterVisualToSelf(void)
 
   {
     Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-    ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+    ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
     objectDestructionTracker.Start( controlWrapper );
 
@@ -404,7 +410,7 @@ int UtcDaliControlWrapperRegisterDisabledVisual(void)
   ToolkitTestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   Property::Index TEST_PROPERTY = 1;
 
@@ -446,7 +452,7 @@ int UtcDaliControlWrapperRegisterUnregisterVisual(void)
   ToolkitTestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   Property::Index index = 1;
 
@@ -491,7 +497,7 @@ int UtcDaliControlWrapperTransitionDataMap1N(void)
   Dali::Toolkit::TransitionData transition = TransitionData::New( map );
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   //DummyControl actor = DummyControl::New();
   controlWrapper.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
@@ -544,10 +550,56 @@ int UtcDaliControlWrapperApplyThemeStyle(void)
   ToolkitTestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   controlWrapperImpl->ApplyThemeStyle();
 
   DALI_TEST_CHECK( true );
   END_TEST;
 }
+
+int UtcDaliControlWrapperTestControlProperties(void)
+{
+  ToolkitTestApplication application;
+
+  Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
+
+  Stage::GetCurrent().Add( controlWrapper );
+
+  // "background" property
+  Property::Map rendererMap;
+  rendererMap[Visual::Property::TYPE] = Visual::COLOR;
+  rendererMap[ColorVisual::Property::MIX_COLOR] = Color::RED;
+  controlWrapper.SetProperty( Control::Property::BACKGROUND, rendererMap );
+  Property::Value propertyValue = controlWrapper.GetProperty( Control::Property::BACKGROUND );
+  Property::Map* resultMap = propertyValue.GetMap();
+  DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) );
+  DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get<int>(), (int)Visual::COLOR, TEST_LOCATION );
+  DALI_TEST_CHECK( resultMap->Find( ColorVisual::Property::MIX_COLOR ) );
+  DALI_TEST_EQUALS( resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get<Vector4>(), Color::RED, TEST_LOCATION );
+
+  // "keyInputFocus" property
+  controlWrapper.SetProperty( Control::Property::KEY_INPUT_FOCUS, true );
+  DALI_TEST_EQUALS( true, controlWrapper.GetProperty( Control::Property::KEY_INPUT_FOCUS ).Get< bool >(), TEST_LOCATION );
+
+  // "styleName" property
+  controlWrapper.SetProperty( Control::Property::STYLE_NAME, "MyCustomStyle" );
+  DALI_TEST_EQUALS( "MyCustomStyle", controlWrapper.GetProperty( Control::Property::STYLE_NAME ).Get< std::string >(), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliControlWrapperTypeRegistryCreation(void)
+{
+  ToolkitTestApplication application;
+
+  TypeInfo typeInfo = TypeRegistry::Get().GetTypeInfo( "ControlWrapper" );
+  DALI_TEST_CHECK( typeInfo )
+
+  // Check that we can't create a ControlWrapper instance
+  BaseHandle baseHandle = typeInfo.CreateInstance();
+  DALI_TEST_CHECK( !baseHandle )
+
+  END_TEST;
+}
index 3921404..721bfec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -1000,7 +1000,7 @@ int UtcDaliImageViewSetImageNativeImage(void)
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
 
   std::stringstream params;
-  params << GL_TEXTURE_2D << ", " << 23;
+  params << GL_TEXTURE_EXTERNAL_OES << ", " << 23;
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
 
   END_TEST;
@@ -1050,7 +1050,7 @@ int UtcDaliImageViewSetImageBufferImageToNativeImage(void)
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
 
   std::stringstream nextTextureParams;
-  nextTextureParams << GL_TEXTURE_2D << ", " << 24;
+  nextTextureParams << GL_TEXTURE_EXTERNAL_OES << ", " << 24;
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", nextTextureParams.str()) );
 
   END_TEST;
@@ -1082,7 +1082,7 @@ int UtcDaliImageViewSetImageNativeImageToBufferImage(void)
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
 
   std::stringstream params;
-  params << GL_TEXTURE_2D << ", " << 23;
+  params << GL_TEXTURE_EXTERNAL_OES << ", " << 23;
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
 
   width = 200;
@@ -1149,7 +1149,7 @@ int UtcDaliImageViewSetImageNativeImageWithCustomShader(void)
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
 
   std::stringstream params;
-  params << GL_TEXTURE_2D << ", " << 23;
+  params << GL_TEXTURE_EXTERNAL_OES << ", " << 23;
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
 
   END_TEST;
@@ -1214,7 +1214,7 @@ int UtcDaliImageViewSetImageBufferImageWithCustomShaderToNativeImage(void)
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
 
   std::stringstream nativeImageParams;
-  nativeImageParams << GL_TEXTURE_2D << ", " << 24;
+  nativeImageParams << GL_TEXTURE_EXTERNAL_OES << ", " << 24;
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", nativeImageParams.str()) );
 
 
index d010c11..088fb7a 100644 (file)
@@ -19,7 +19,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/layer.h>
+#include <dali/public-api/common/compile-time-assert.h>
+#include <dali/devel-api/actors/layer-devel.h>
 
 namespace Dali
 {
@@ -30,14 +31,29 @@ namespace Toolkit
 namespace DepthIndex
 {
 
+// The negative value for background effect and background has been
+// chosen so that newer controls can have content without setting
+// depth index, and go in front of native controls with a background.
+// This backround negative value means that the highest possible value
+// is SIBLING_ORDER_MULTIPLIER-BACKGROUND_EFFECT-1.  The divisor of
+// 100 ensures the range fits within the sibling order range, and has
+// enough gaps to allow Control Authors to use other intermediate depths.
+
 enum Ranges
 {
-    BACKGROUND    = -Dali::Layer::TREE_DEPTH_MULTIPLIER / 10,
-    CONTENT       = 0,
-    TEXT          = Dali::Layer::TREE_DEPTH_MULTIPLIER / 100,
-    DECORATION    = Dali::Layer::TREE_DEPTH_MULTIPLIER / 10
+  BACKGROUND_EFFECT = -2 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100,
+  BACKGROUND    =     -1 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100,
+  CONTENT       =      0,
+  DECORATION    =      1 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100,
+  FOREGROUND_EFFECT =  2 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100
 };
 
+DALI_COMPILE_TIME_ASSERT( (unsigned int)DevelLayer::ACTOR_DEPTH_MULTIPLIER > (unsigned int)DevelLayer::SIBLING_ORDER_MULTIPLIER );
+DALI_COMPILE_TIME_ASSERT( BACKGROUND_EFFECT < BACKGROUND );
+DALI_COMPILE_TIME_ASSERT( BACKGROUND < CONTENT );
+DALI_COMPILE_TIME_ASSERT( CONTENT < DECORATION );
+DALI_COMPILE_TIME_ASSERT( DECORATION < FOREGROUND_EFFECT );
+
 } // namespace DepthIndex
 
 } // namespace Toolkit
index 48019fe..d3fcc56 100755 (executable)
 // CLASS HEADER
 #include <dali-toolkit/devel-api/controls/control-wrapper-impl.h>
 
-// INTERNAL INCLUDES
+// EXTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
+#include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
+#include <dali/devel-api/object/handle-devel.h>
+
+// INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 #include <dali-toolkit/public-api/styling/style-manager.h>
@@ -34,11 +39,26 @@ namespace Toolkit
 namespace Internal
 {
 
+namespace
+{
+
+BaseHandle Create()
+{
+  // empty handle as we cannot create control wrapper
+  return BaseHandle();
+}
+
+// Setup type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ControlWrapper, Toolkit::Control, Create )
+DALI_TYPE_REGISTRATION_END()
+
+}
+
 /*
  * Implementation.
  */
 
-Dali::Toolkit::ControlWrapper ControlWrapper::New( ControlWrapper* controlWrapper )
+Dali::Toolkit::ControlWrapper ControlWrapper::New( const std::string& typeName, ControlWrapper* controlWrapper )
 {
   ControlWrapperPtr wrapper( controlWrapper );
 
@@ -49,6 +69,19 @@ Dali::Toolkit::ControlWrapper ControlWrapper::New( ControlWrapper* controlWrappe
   // This can only be done after the CustomActor connection has been made.
   wrapper->Initialize();
 
+  // Different types of C# custom view registered themselves using type registry,
+  // but their type names are registered per type not per instance, so they still
+  // have the same wrong type name in native side when type registry queries the
+  // unique type name of each instance using typeid() because of the binding.
+  // Therefore, we have to link each instance with its correct type info if already
+  // pre-registered.
+
+  TypeInfo typeInfo = TypeRegistry::Get().GetTypeInfo( typeName );
+  if(typeInfo)
+  {
+    Dali::DevelHandle::SetTypeInfo( handle, typeInfo );
+  }
+
   return handle;
 }
 
index fa9173f..33905a5 100755 (executable)
@@ -64,9 +64,13 @@ public:
 
   /**
    * Create a new ControlWrapper.
+   *
+   * @param[in] typeName The name of the type that is registered with this control
+   * @param[in] controlWrapper The implementation of this control
+   *
    * @return A public handle to the newly allocated ControlWrapper.
    */
-  static Dali::Toolkit::ControlWrapper New( ControlWrapper* controlWrapper );
+  static Dali::Toolkit::ControlWrapper New( const std::string& typeName, ControlWrapper* controlWrapper );
 
 public: // From CustomActorImpl
 
index 7f8db27..0c6be01 100644 (file)
@@ -31,9 +31,9 @@ namespace Toolkit
 // ControlWrapper
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-ControlWrapper ControlWrapper::New( Internal::ControlWrapper& implementation )
+ControlWrapper ControlWrapper::New( const std::string& typeName, Internal::ControlWrapper& implementation )
 {
-  return Internal::ControlWrapper::New( &implementation );
+  return Internal::ControlWrapper::New( typeName, &implementation );
 }
 
 ControlWrapper::ControlWrapper()
index a45c4b5..b50852b 100644 (file)
@@ -45,9 +45,12 @@ public:
   /**
    * @brief Create a new instance of a ControlWrapper.
    *
+   * @param[in] typeName The name of the type that is registered with this control
+   * @param[in] implementation The implementation of this control
+   *
    * @return A handle to a new ControlWrapper.
    */
-  static ControlWrapper New( Internal::ControlWrapper& implementation );
+  static ControlWrapper New( const std::string& typeName, Internal::ControlWrapper& implementation );
 
   /**
    * @brief Creates an empty ControlWrapper handle.
index 0a3b941..26d81a4 100644 (file)
@@ -64,6 +64,8 @@ public:
     {
       MAX_SIZE =  PROPERTY_START_INDEX, ///< name "maxSize",                 The maximum size the Popup can be,              type VECTOR2
       ENABLE_OVERSHOOT,                 ///< name "enableOvershoot",         Whether the overshoot image is enabled,         type BOOLEAN
+      ENABLE_SCROLL_BAR,                ///< name "enableScrollBar",         Whether the scroll-bar is enabled,              type BOOLEAN
+      SCROLL_BAR_PADDING,               ///< name "scrollBarPadding",        The padding used to position the scroll bar,    type VECTOR2
       SCROLL_VIEW,                      ///< name "scrollView",              Properties to set on scroll view                type Property::Map
     };
   };
index ddf5738..e3564df 100755 (executable)
@@ -235,6 +235,7 @@ void ScrollBar::CreateDefaultIndicatorActor()
   indicator.SetParentOrigin( ParentOrigin::TOP_LEFT );
   indicator.SetAnchorPoint( AnchorPoint::TOP_LEFT );
   indicator.SetStyleName( "ScrollBarIndicator" );
+  indicator.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
   SetScrollIndicator(indicator);
 }
 
index 3330f13..069d5b6 100644 (file)
@@ -658,7 +658,8 @@ ScrollView::ScrollView()
   mAlterChild(false),
   mDefaultMaxOvershoot(true),
   mCanScrollHorizontal(true),
-  mCanScrollVertical(true)
+  mCanScrollVertical(true),
+  mTransientScrollBar(true)
 {
 }
 
@@ -1960,24 +1961,33 @@ void ScrollView::OnChildAdd(Actor& child)
   ScrollBase::OnChildAdd( child );
 
   Dali::Toolkit::ScrollBar scrollBar = Dali::Toolkit::ScrollBar::DownCast(child);
-  if(scrollBar)
+  if( scrollBar )
   {
-    mInternalActor.Add(scrollBar);
-    if(scrollBar.GetScrollDirection() == Toolkit::ScrollBar::Horizontal)
+    mScrollBar = scrollBar;
+    scrollBar.SetName("ScrollBar");
+
+    mInternalActor.Add( scrollBar );
+    if( scrollBar.GetScrollDirection() == Toolkit::ScrollBar::Horizontal )
     {
-      scrollBar.SetScrollPropertySource(Self(),
-                                        Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_X,
-                                        Toolkit::Scrollable::Property::SCROLL_POSITION_MIN_X,
-                                        Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_MAX_X,
-                                        Toolkit::ScrollView::Property::SCROLL_DOMAIN_SIZE_X);
+      scrollBar.SetScrollPropertySource( Self(),
+                                         Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_X,
+                                         Toolkit::Scrollable::Property::SCROLL_POSITION_MIN_X,
+                                         Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_MAX_X,
+                                         Toolkit::ScrollView::Property::SCROLL_DOMAIN_SIZE_X );
     }
     else
     {
-      scrollBar.SetScrollPropertySource(Self(),
-                                        Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_Y,
-                                        Toolkit::Scrollable::Property::SCROLL_POSITION_MIN_Y,
-                                        Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_MAX_Y,
-                                        Toolkit::ScrollView::Property::SCROLL_DOMAIN_SIZE_Y);
+      scrollBar.SetScrollPropertySource( Self(),
+                                         Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_Y,
+                                         Toolkit::Scrollable::Property::SCROLL_POSITION_MIN_Y,
+                                         Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_MAX_Y,
+                                         Toolkit::ScrollView::Property::SCROLL_DOMAIN_SIZE_Y );
+    }
+
+    if( mTransientScrollBar )
+    {
+      scrollBar.SetVisible( false );
+      scrollBar.HideIndicator();
     }
   }
   else if(mAlterChild)
@@ -2476,6 +2486,19 @@ void ScrollView::OnPan( const PanGesture& gesture )
       self.SetProperty( Toolkit::ScrollView::Property::START_PAGE_POSITION, Vector3(gesture.position.x, gesture.position.y, 0.0f) );
 
       UpdateMainInternalConstraint();
+      Toolkit::ScrollBar scrollBar = mScrollBar.GetHandle();
+      if( scrollBar && mTransientScrollBar )
+      {
+        Vector3 size = Self().GetCurrentSize();
+        const Toolkit::RulerDomain& rulerDomainX = mRulerX->GetDomain();
+        const Toolkit::RulerDomain& rulerDomainY = mRulerY->GetDomain();
+
+        if( ( rulerDomainX.max > size.width ) || ( rulerDomainY.max > size.height ) )
+        {
+          scrollBar.SetVisible( true );
+          scrollBar.ShowIndicator();
+        }
+      }
       break;
     }
 
@@ -2510,6 +2533,12 @@ void ScrollView::OnPan( const PanGesture& gesture )
         {
           mScrollMainInternalPrePositionConstraint.Remove();
         }
+
+        Toolkit::ScrollBar scrollBar = mScrollBar.GetHandle();
+        if( scrollBar && mTransientScrollBar )
+        {
+          scrollBar.HideIndicator();
+        }
       }
       else
       {
index 9a16624..485d508 100644 (file)
 #include <dali/public-api/adaptor-framework/timer.h>
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/object/property-notification.h>
+#include <dali/devel-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
@@ -937,6 +939,7 @@ private:
   Constraint mScrollMainInternalPrePositionMaxConstraint;
 
   ScrollOvershootIndicatorPtr mOvershootIndicator;
+  WeakHandle<Toolkit::ScrollBar> mScrollBar;
 
   Toolkit::ScrollView::SnapStartedSignalType mSnapStartedSignal;
 
@@ -954,6 +957,7 @@ private:
   bool mDefaultMaxOvershoot:1;            ///< Whether to use default max overshoot or application defined one
   bool mCanScrollHorizontal:1;            ///< Local value of our property to check against
   bool mCanScrollVertical:1;              ///< Local value of our property to check against
+  bool mTransientScrollBar:1;             ///< True if scroll-bar should be automatically show/hidden during/after panning
 };
 
 } // namespace Internal
index fb6588b..b6d9900 100644 (file)
@@ -1128,7 +1128,7 @@ void TextEditor::RenderText( Text::Controller::UpdateTextType updateTextType )
     {
       renderableActor = mRenderer->Render( mController->GetView(),
                                            mAlignmentOffset,
-                                           DepthIndex::TEXT );
+                                           DepthIndex::CONTENT );
     }
 
     if( renderableActor != mRenderableActor )
index 63568e6..6a846e4 100644 (file)
@@ -1272,7 +1272,7 @@ void TextField::RenderText( Text::Controller::UpdateTextType updateTextType )
     {
       renderableActor = mRenderer->Render( mController->GetView(),
                                            mAlignmentOffset,
-                                           DepthIndex::TEXT );
+                                           DepthIndex::CONTENT );
     }
 
     if( renderableActor != mRenderableActor )
index 9f7863f..b6b5db0 100644 (file)
@@ -731,7 +731,7 @@ void TextLabel::RenderText()
   {
     renderableActor = mRenderer->Render( mController->GetView(),
                                          alignmentOffset,
-                                         DepthIndex::TEXT );
+                                         DepthIndex::CONTENT );
   }
 
   if( renderableActor != mRenderableActor )
index cdd2226..317dbf9 100644 (file)
@@ -42,6 +42,8 @@ namespace Internal
 namespace
 {
 
+const Dali::Vector2 DEFAULT_SCROLL_BAR_PADDING( 8.0f, 6.0f );
+
 BaseHandle Create()
 {
   return Toolkit::TextSelectionToolbar::New();
@@ -53,6 +55,8 @@ DALI_TYPE_REGISTRATION_BEGIN( Toolkit::TextSelectionToolbar, Toolkit::Control, C
 
 DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "maxSize",  VECTOR2, MAX_SIZE )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "enableOvershoot",  BOOLEAN, ENABLE_OVERSHOOT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "enableScrollBar", BOOLEAN, ENABLE_SCROLL_BAR )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "scrollBarPadding", VECTOR2, SCROLL_BAR_PADDING )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "scrollView",  MAP, SCROLL_VIEW )
 
 DALI_TYPE_REGISTRATION_END()
@@ -98,6 +102,16 @@ void TextSelectionToolbar::SetProperty( BaseObject* object, Property::Index inde
         impl.mScrollView.SetOvershootEnabled( value.Get< bool >() );
         break;
       }
+      case Toolkit::TextSelectionToolbar::Property::ENABLE_SCROLL_BAR:
+      {
+        impl.SetUpScrollBar( value.Get< bool >() );
+        break;
+      }
+      case Toolkit::TextSelectionToolbar::Property::SCROLL_BAR_PADDING:
+      {
+        impl.SetScrollBarPadding( value.Get< Vector2 >() );
+        break;
+      }
       case Toolkit::TextSelectionToolbar::Property::SCROLL_VIEW:
       {
         // Get a Property::Map from the property if possible.
@@ -134,6 +148,16 @@ Property::Value TextSelectionToolbar::GetProperty( BaseObject* object, Property:
         value = impl.mScrollView.IsOvershootEnabled();
         break;
       }
+      case Toolkit::TextSelectionToolbar::Property::ENABLE_SCROLL_BAR:
+      {
+        value = impl.mScrollBar ? true : false;
+        break;
+      }
+      case Toolkit::TextSelectionToolbar::Property::SCROLL_BAR_PADDING:
+      {
+        value = impl.GetScrollBarPadding();
+        break;
+      }
     } // switch
   }
   return value;
@@ -149,6 +173,12 @@ void TextSelectionToolbar::OnRelayout( const Vector2& size, RelayoutContainer& c
   float width = std::max ( mTableOfButtons.GetNaturalSize().width, size.width );
   mRulerX->SetDomain( RulerDomain( 0.0, width, true ) );
   mScrollView.SetRulerX( mRulerX );
+
+  if( mScrollBar )
+  {
+    float barWidth = std::min( mTableOfButtons.GetNaturalSize().width, size.width ) - 2.f * mScrollBarPadding.x;
+    mScrollBar.SetSize( Vector2( 0.0f, barWidth ) );
+  }
 }
 
 void TextSelectionToolbar::SetPopupMaxSize( const Size& maxSize )
@@ -216,6 +246,29 @@ void TextSelectionToolbar::SetUp()
   self.Add( mToolbarLayer );
 }
 
+void TextSelectionToolbar::SetUpScrollBar( bool enable )
+{
+  if( enable )
+  {
+    if( ! mScrollBar )
+    {
+      mScrollBar = Toolkit::ScrollBar::New( Toolkit::ScrollBar::Horizontal );
+      mScrollBar.SetName( "Text popup scroll bar" );
+      mScrollBar.SetParentOrigin( ParentOrigin::BOTTOM_LEFT );
+      mScrollBar.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+      mScrollBar.SetPosition( mScrollBarPadding.x, -mScrollBarPadding.y );
+      mScrollBar.SetResizePolicy( Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH );
+      mScrollBar.SetOrientation( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) );
+      mScrollBar.GetPanGestureDetector().DetachAll();
+      mScrollView.Add( mScrollBar );
+    }
+  }
+  else
+  {
+    UnparentAndReset( mScrollBar );
+  }
+}
+
 void TextSelectionToolbar::OnScrollStarted( const Vector2& position )
 {
   mTableOfButtons.SetSensitive( false );
@@ -254,6 +307,17 @@ void TextSelectionToolbar::RaiseAbove( Layer target )
   mToolbarLayer.RaiseAbove( target );
 }
 
+void TextSelectionToolbar::SetScrollBarPadding( const Vector2& padding )
+{
+  mScrollBarPadding = padding;
+  if( mScrollBar )
+  {
+    mScrollBar.SetPosition( mScrollBarPadding.x, -mScrollBarPadding.y );
+  }
+
+  RelayoutRequest();
+}
+
 void TextSelectionToolbar::ConfigureScrollview( const Property::Map& properties )
 {
   // Set any properties specified for the label by iterating through all property key-value pairs.
@@ -274,10 +338,15 @@ void TextSelectionToolbar::ConfigureScrollview( const Property::Map& properties
   RelayoutRequest();
 }
 
+const Vector2& TextSelectionToolbar::GetScrollBarPadding() const
+{
+  return mScrollBarPadding;
+}
 
 TextSelectionToolbar::TextSelectionToolbar()
 : Control( ControlBehaviour( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ) ),
   mMaxSize (),
+  mScrollBarPadding( DEFAULT_SCROLL_BAR_PADDING ),
   mIndexInTable( 0 ),
   mDividerIndexes()
 {
index d44daf0..f5908bb 100644 (file)
@@ -21,6 +21,7 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
+#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
 
@@ -84,6 +85,18 @@ public:
    */
   void RaiseAbove( Layer target );
 
+  /**
+   * Sets the scroll bar padding.
+   *
+   * @param[in] padding The padding value.
+   */
+  void SetScrollBarPadding( const Vector2& padding );
+
+  /**
+   * @return The padding value.
+   */
+  const Vector2& GetScrollBarPadding() const;
+
 private: // From Control
 
   /**
@@ -126,6 +139,13 @@ private: // Implementation
   void SetUp();
 
   /**
+   * @brief Enable or disable the scroll-bar
+   *
+   * @param[in] enable True if the scroll-bar is required
+   */
+  void SetUpScrollBar( bool enable );
+
+  /**
    * Toolbar has started to scroll
    * @param[in] position current scroll view position
    */
@@ -158,11 +178,12 @@ private: // Data
   Layer mToolbarLayer;                                ///< The layer used to house the toolbar.
   Toolkit::TableView mTableOfButtons;                 ///< Actor which holds all the buttons, sensitivity can be set on buttons via this actor
   Toolkit::ScrollView mScrollView;                    ///< Provides scrolling of Toolbar when content does not fit.
+  Toolkit::ScrollBar mScrollBar;                      ///< An horizontal scroll bar for the text's popup options.
   RulerPtr mRulerX;                                   ///< Ruler to clamp horizontal scrolling. Updates on Relayout
   Size mMaxSize;                                      ///< Max size of the Toolbar
+  Vector2 mScrollBarPadding;                          ///< The padding used to position the scroll indicator.
   unsigned int mIndexInTable;                         ///< Index in table to add option
   Dali::Vector< unsigned int > mDividerIndexes;       ///< Vector of indexes in the Toolbar that contain dividers.
-
 };
 
 } // namespace Internal
index de437fb..2332c7a 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/rendering/renderer.h>
+#include <dali/public-api/images/frame-buffer-image.h>
 #include <dali/devel-api/text-abstraction/font-client.h>
 #include <dali/integration-api/debug.h>
 
index f10d93e..1bb0fed 100644 (file)
@@ -1344,16 +1344,17 @@ Vector3 Controller::GetNaturalSize()
                                                                            BIDI_INFO         |
                                                                            SHAPE_TEXT        |
                                                                            GET_GLYPH_METRICS );
+
+    // Set the update info to relayout the whole text.
+    mImpl->mTextUpdateInfo.mParagraphCharacterIndex = 0u;
+    mImpl->mTextUpdateInfo.mRequestedNumberOfCharacters = mImpl->mModel->mLogicalModel->mText.Count();
+
     // Make sure the model is up-to-date before layouting
     mImpl->UpdateModel( onlyOnceOperations );
 
     // Layout the text for the new width.
     mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending | LAYOUT );
 
-    // Set the update info to relayout the whole text.
-    mImpl->mTextUpdateInfo.mParagraphCharacterIndex = 0u;
-    mImpl->mTextUpdateInfo.mRequestedNumberOfCharacters = mImpl->mModel->mLogicalModel->mText.Count();
-
     // Store the actual control's size to restore later.
     const Size actualControlSize = mImpl->mModel->mVisualModel->mControlSize;
 
@@ -1416,6 +1417,11 @@ float Controller::GetHeightForWidth( float width )
                                                                            BIDI_INFO         |
                                                                            SHAPE_TEXT        |
                                                                            GET_GLYPH_METRICS );
+
+    // Set the update info to relayout the whole text.
+    mImpl->mTextUpdateInfo.mParagraphCharacterIndex = 0u;
+    mImpl->mTextUpdateInfo.mRequestedNumberOfCharacters = mImpl->mModel->mLogicalModel->mText.Count();
+
     // Make sure the model is up-to-date before layouting
     mImpl->UpdateModel( onlyOnceOperations );
 
@@ -1423,10 +1429,6 @@ float Controller::GetHeightForWidth( float width )
     // Layout the text for the new width.
     mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending | LAYOUT );
 
-    // Set the update info to relayout the whole text.
-    mImpl->mTextUpdateInfo.mParagraphCharacterIndex = 0u;
-    mImpl->mTextUpdateInfo.mRequestedNumberOfCharacters = mImpl->mModel->mLogicalModel->mText.Count();
-
     // Store the actual control's width.
     const float actualControlWidth = mImpl->mModel->mVisualModel->mControlSize.width;
 
@@ -1709,17 +1711,14 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent )
     {
       textChanged = BackspaceKeyEvent();
     }
-    else if( IsKey( keyEvent,  Dali::DALI_KEY_POWER ) )
-    {
-      mImpl->ChangeState( EventData::INTERRUPTED ); // State is not INACTIVE as expect to return to edit mode.
-      // Avoids calling the InsertText() method which can delete selected text
-    }
-    else if( IsKey( keyEvent, Dali::DALI_KEY_MENU ) ||
+    else if( IsKey( keyEvent, Dali::DALI_KEY_POWER ) ||
+             IsKey( keyEvent, Dali::DALI_KEY_MENU ) ||
              IsKey( keyEvent, Dali::DALI_KEY_HOME ) )
     {
+      // Power key/Menu/Home key behaviour does not allow edit mode to resume.
       mImpl->ChangeState( EventData::INACTIVE );
-      // Menu/Home key behaviour does not allow edit mode to resume like Power key
-      // Avoids calling the InsertText() method which can delete selected text
+
+      // This branch avoids calling the InsertText() method of the 'else' branch which can delete selected text.
     }
     else if( Dali::DALI_KEY_SHIFT_LEFT == keyCode )
     {
@@ -2459,7 +2458,8 @@ bool Controller::RemoveText( int cursorOffset,
       numberOfCharacters = currentText.Count() - cursorIndex;
     }
 
-    if( ( cursorIndex + numberOfCharacters ) <= mImpl->mTextUpdateInfo.mPreviousNumberOfCharacters )
+    if( mImpl->mEventData->mPreEditFlag || // If the preedit flag is enabled, it means two (or more) of them came together i.e. when two keys have been pressed at the same time.
+        ( ( cursorIndex + numberOfCharacters ) <= mImpl->mTextUpdateInfo.mPreviousNumberOfCharacters ) )
     {
       // Mark the paragraphs to be updated.
       mImpl->mTextUpdateInfo.mCharacterIndex = std::min( cursorIndex, mImpl->mTextUpdateInfo.mCharacterIndex );
index 57c1a48..b2f0cbb 100644 (file)
@@ -110,7 +110,7 @@ const char* VERTEX_SHADER_3X3 = DALI_COMPOSE_SHADER(
       vec2 visualOffset = mix( offset, offset/uSize.xy, offsetSizeMode.xy);\n
 
       mediump vec2 scale        = vec2( length( uModelMatrix[ 0 ].xyz ), length( uModelMatrix[ 1 ].xyz ) );\n
-      mediump vec2 size         = visualSize.xy * scale;\n
+      mediump vec2 size         = visualSize.xy;\n
       \n
       mediump vec2 fixedFactor  = vec2( uFixed[ int( ( aPosition.x + 1.0 ) * 0.5 ) ].x, uFixed[ int( ( aPosition.y  + 1.0 ) * 0.5 ) ].y );\n
       mediump vec2 stretch      = floor( aPosition * 0.5 );\n
@@ -118,7 +118,7 @@ const char* VERTEX_SHADER_3X3 = DALI_COMPOSE_SHADER(
       \n
       mediump vec4 vertexPosition = vec4( fixedFactor + ( size - fixedTotal ) * stretch, 0.0, 1.0 );
       vertexPosition.xy -= size * vec2( 0.5, 0.5 );\n
-      vertexPosition.xy =  vertexPosition.xy / scale + anchorPoint*size + (visualOffset + origin)*uSize.xy;\
+      vertexPosition.xy =  vertexPosition.xy + anchorPoint*size + (visualOffset + origin)*uSize.xy;\
       \n
       vertexPosition = uMvpMatrix * vertexPosition;\n
       \n
index f3b895b..280fac2 100644 (file)
@@ -313,7 +313,7 @@ void TextVisual::DoSetOnStage( Actor& actor )
   }
 
   mImpl->mRenderer = Renderer::New( geometry, shader );
-  mImpl->mRenderer.SetProperty( Dali::Renderer::Property::DEPTH_INDEX, Toolkit::DepthIndex::TEXT );
+  mImpl->mRenderer.SetProperty( Dali::Renderer::Property::DEPTH_INDEX, Toolkit::DepthIndex::CONTENT );
 
   UpdateRenderer( true ); // Renderer needs textures and to be added to control
 }
index 91895c0..6ff9c12 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 2;
-const unsigned int TOOLKIT_MICRO_VERSION = 25;
+const unsigned int TOOLKIT_MICRO_VERSION = 26;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 88c1483..6aeaded 100644 (file)
     "TextSelectionToolbar":
     {
       "enableOvershoot":true,
+      "enableScrollBar":true,
       "scrollView":
       {
         "overshootAnimationSpeed":360.0,
       "overshootAnimationSpeed":960.0,
       "overshootSize":[1920.0,130.0]
     },
+    "ScrollBar":
+    {
+      "indicatorShowDuration":0.25,
+      "indicatorHideDuration":0.25,
+      "color":[0.0,0.72,0.9,0.7]
+    },
     "TextEditor":
     {
       "pointSize":120,
index 9c5f800..6e1c7f1 100644 (file)
     "TextSelectionToolbar":
     {
       "enableOvershoot":true,
+      "enableScrollBar":true,
       "scrollView":
       {
         "overshootAnimationSpeed":120.0,
       "overshootAnimationSpeed":120.0,
       "overshootSize":[480.0,42.0]
     },
+    "ScrollBar":
+    {
+      "indicatorShowDuration":0.25,
+      "indicatorHideDuration":0.25,
+      "color":[0.0,0.72,0.9,0.7]
+    },
     "TextEditor":
     {
       "pointSize":18,
index 6b3a131..d846c0f 100644 (file)
     "TextSelectionToolbar":
     {
       "enableOvershoot":true,
+      "enableScrollBar":true,
       "scrollView":
       {
         "overshootAnimationSpeed":360.0,
       "overshootAnimationSpeed":360.0,
       "overshootSize":[720.0,130.0]
     },
+    "ScrollBar":
+    {
+      "indicatorShowDuration":0.25,
+      "indicatorHideDuration":0.25,
+      "color":[0.0,0.72,0.9,0.7]
+    },
     "TextEditor":
     {
       "pointSize":18,
index 94e7756..d8137c7 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-addon
 Summary:    DALi module for Node.JS
-Version:    1.2.25
+Version:    1.2.26
 Release:    1
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
index 4183bd4..f301af8 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    The OpenGLES Canvas Core Library Toolkit
-Version:    1.2.25
+Version:    1.2.26
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-2-Clause and MIT
index 48d8ff6..3034cf4 100755 (executable)
@@ -85,6 +85,7 @@
 %ignore *::SetPositionInheritanceMode(PositionInheritanceMode);
 %ignore *::GetKeyValue(SizeType) const;
 %ignore *::TypeInfo::GetCreator() const;
+%ignore Dali::Stage::TouchedSignal;
 
 %rename(ParentOriginTop) Dali::ParentOrigin::TOP;
 %rename(ParentOriginBottom) Dali::ParentOrigin::BOTTOM;
@@ -260,7 +261,6 @@ typedef std::pair< Dali::Radian, Dali::Radian > AngleThresholdPair;
 %include <dali/public-api/events/pinch-gesture.h>
 %include <dali/public-api/events/tap-gesture-detector.h>
 %include <dali/public-api/events/tap-gesture.h>
-%include <dali/public-api/events/touch-event.h>
 
 %include <dali/public-api/animation/alpha-function.h>
 %include <dali/public-api/animation/key-frames.h>
@@ -304,12 +304,12 @@ typedef std::pair< Dali::Radian, Dali::Radian > AngleThresholdPair;
 //%template(ActorTouchEventSignal) Dali::Signal<bool (Dali::Actor, const Dali::TouchEvent&)>;
 %template(ActorTouchDataSignal) Dali::Signal<bool (Dali::Actor, const Dali::TouchData&)>;
 %template(ActorHoverSignal) Dali::Signal<bool (Dali::Actor, const Dali::HoverEvent&)>;
-%template(ActorWheelEventSignal) Dali::Signal<bool (Dali::Actor, const Dali::WheelEvent&)>;
+%template(ActorWheelSignal) Dali::Signal<bool (Dali::Actor, const Dali::WheelEvent&)>;
 %template(ActorSignal) Dali::Signal<void (Dali::Actor)>;
 %template(KeyEventSignal) Dali::Signal<void (const Dali::KeyEvent&)>;
 //%template(TouchEventSignal) Dali::Signal<void (const Dali::TouchEvent&)>;
 %template(TouchSignal) Dali::Signal<void (const Dali::TouchData&)>;
-%template(StageWheelEventSignal) Dali::Signal<void (const Dali::WheelEvent&)>;
+%template(StageWheelSignal) Dali::Signal<void (const Dali::WheelEvent&)>;
 %template(AngleThresholdPair) std::pair<Dali::Radian, Dali::Radian>;
 %template(PanGestureDetectedSignal) Dali::Signal<void (Dali::Actor, const Dali::PanGesture&)>;
 %template(PinchGestureDetectedSignal) Dali::Signal<void (Dali::Actor, const Dali::PinchGesture&)>;
index 2e86045..cf7bdab 100644 (file)
 %}
 %enddef
 
+%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( NameSpace, ClassName, NewClassName )
+%typemap(csfinalize) NameSpace::ClassName %{
+  ~NewClassName() {
+    DisposeQueue.Instance.Add(this);
+  }
+%}
+%enddef
+
+%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( NameSpace, ClassName, NewClassName )
+%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
+    if (!Stage.IsInstalled()) {
+      DisposeQueue.Instance.Add(this);
+      return;
+    }
+
+    lock(this) {
+      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
+        if (swigCMemOwn) {
+          swigCMemOwn = false;
+          NDalicPINVOKE.delete_##NewClassName(swigCPtr);
+        }
+        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+      }
+      global::System.GC.SuppressFinalize(this);
+    }
+  }
+%}
+%enddef
+
+%define DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION_RENAME( NameSpace, ClassName, NewClassName )
+%typemap(csdestruct_derived, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
+    if (!Stage.IsInstalled()) {
+      DisposeQueue.Instance.Add(this);
+      return;
+    }
+
+    lock(this) {
+      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
+        if (swigCMemOwn) {
+          swigCMemOwn = false;
+          NDalicPINVOKE.delete_##NewClassName(swigCPtr);
+        }
+        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+      }
+      global::System.GC.SuppressFinalize(this);
+      base.Dispose();
+    }
+  }
+%}
+%enddef
+
 %define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VIDEOVIEWSIGNAL( NameSpace, ClassName )
 %typemap(csfinalize) NameSpace::ClassName %{
   ~VideoViewSignal() {
 
 %define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STAGESIGNAL( NameSpace, ClassName )
 %typemap(csfinalize) NameSpace::ClassName %{
-  ~StageWheelEventSignal() {
+  ~StageWheelSignal() {
     DisposeQueue.Instance.Add(this);
   }
 %}
       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
         if (swigCMemOwn) {
           swigCMemOwn = false;
-          NDalicPINVOKE.delete_StageWheelEventSignal(swigCPtr);
+          NDalicPINVOKE.delete_StageWheelSignal(swigCPtr);
         }
         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
       }
@@ -1205,12 +1256,14 @@ DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, LongPressGesture );
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, LongPressGestureDetector );
 DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, LongPressGestureDetector );
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, KeyEvent );
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, KeyEvent );
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, KeyEvent, Key );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, KeyEvent, Key );
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, HoverEvent, Hover );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, HoverEvent, Hover );
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TouchEvent );
 DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, TouchEvent );
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, WheelEvent );
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, WheelEvent );
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, WheelEvent, Wheel );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, WheelEvent, Wheel );
 
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Renderer );
 DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Renderer );
@@ -1295,8 +1348,8 @@ DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PathConstrainer );
 
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TouchPoint );
 DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, TouchPoint );
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TouchData );
-DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, TouchData );
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, TouchData, Touch );
+DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION_RENAME( Dali, TouchData, Touch );
 
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Application );
 DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Application );
index 3e7a512..946a250 100755 (executable)
@@ -98,6 +98,7 @@
 %ignore *::Button::SetUnselectedImage(const std::string &);
 %ignore Dali::Toolkit::DevelVisual::Type;
 %ignore Dali::Toolkit::DevelVisual::Property::Type;
+%ignore Dali::Toolkit::AccessibilityManager::AccessibilityActionScrollSignalType;
 
 %rename(View) Dali::Toolkit::Control;
 %rename(ViewImpl) Dali::Toolkit::Internal::Control;
@@ -296,7 +297,6 @@ typedef Dali::IntrusivePtr<Dali::Toolkit::Ruler> RulerPtr;
 %template(ItemContainer) std::vector<std::pair<unsigned int, Dali::Actor>>;
 %template(ActorContainer) std::vector<Dali::Actor>;
 %template(AccessibilityActionSignal) Dali::Signal<bool(Dali::Toolkit::AccessibilityManager&)>;
-%template(AccessibilityActionScrollSignal) Dali::Signal<bool(Dali::Toolkit::AccessibilityManager&, const Dali::TouchEvent&)>;
 %template(AccessibilityFocusOvershotSignal) Dali::Signal<void(Dali::Actor, Dali::Toolkit::AccessibilityManager::FocusOvershotDirection)>;
 %template(FocusChangedSignal) Dali::Signal<void(Dali::Actor, Dali::Actor)>;
 %template(FocusGroupChangedSignal) Dali::Signal<void(Dali::Actor, bool)>;
@@ -309,7 +309,7 @@ typedef Dali::IntrusivePtr<Dali::Toolkit::Ruler> RulerPtr;
 %template(ScrollableSignal) Dali::Signal< void(const Dali::Vector2&)>;
 %template(TextEditorSignal) Dali::Signal<void(Dali::Toolkit::TextEditor)>;
 %template(TextFieldSignal) Dali::Signal<void(Dali::Toolkit::TextField)>;
-%template(ControlKeyEventSignal) Dali::Signal<bool(Dali::Toolkit::Control, const Dali::KeyEvent&)>;
+%template(ControlKeySignal) Dali::Signal<bool(Dali::Toolkit::Control, const Dali::KeyEvent&)>;
 %template(KeyInputFocusSignal) Dali::Signal<void(Dali::Toolkit::Control)>;
 %template(VideoViewSignal) Dali::Signal<void(Dali::Toolkit::VideoView&)>;
 %template(SliderValueChangedSignal) Dali::Signal<bool(Dali::Toolkit::Slider, float)>;
index 20558f4..d2d4e28 100755 (executable)
@@ -288,7 +288,14 @@ using namespace Dali::Toolkit;
 %include devel-properties.i
 
 %include gestures/hover.i
-
+%include gestures/gesture.i
+%include gestures/long-press-gesture.i
+%include gestures/pan-gesture.i
+%include gestures/tap-gesture.i
+%include gestures/pinch-gesture.i
+%include gestures/wheel.i
+%include gestures/touch.i
+%include gestures/key.i
 
 %include dali-core.i
 %include dali-adaptor.i
index 64e070d..34a6a51 100644 (file)
       * @brief Event arguments that passed via ActionScroll signal
       *
       */
+/*
+    // To be replaced by a new event that takes Touch
     public class ActionScrollEventArgs : EventArgs
     {
       private AccessibilityManager _accessibilityManager;
         }
       }
     }
+*/
 
     /**
       * @brief Event arguments that passed via ActionPageUp signal
     private DaliEventHandlerWithReturnType<object,ActionStartStopEventArgs,bool> _accessibilityManagerActionStartStopEventHandler;
     private ActionStartStopEventCallbackDelegate _accessibilityManagerActionStartStopEventCallbackDelegate;
 
+/*
+    // To be replaced by a new event that takes Touch
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
     private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent);
     private DaliEventHandlerWithReturnType<object,ActionScrollEventArgs,bool> _accessibilityManagerActionScrollEventHandler;
     private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate;
+*/
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
     private delegate void FocusChangedEventCallbackDelegate(IntPtr actor1, IntPtr actor2);
       return false;
     }
 
+/*
+    // To be replaced by a new event that takes Touch
     public event DaliEventHandlerWithReturnType<object,ActionScrollEventArgs,bool> ActionScroll
     {
       add
       }
       return false;
     }
+*/
 
     public event DaliEventHandler<object,FocusChangedEventArgs> FocusChanged
     {
index 36704ca..8e13349 100755 (executable)
     }
 
     /**
-     * @brief Event arguments that passed via KeyEvent signal
+     * @brief Event arguments that passed via Key signal
      *
      */
     public class KeyEventArgs : EventArgs
     {
       private View _view;
-      private KeyEvent _keyEvent;
+      private Key _key;
 
       /**
-       * @brief View - is the view that recieves the keyevent.
+       * @brief View - is the view that recieves the key.
        *
        */
       public View View
       }
 
       /**
-       * @brief KeyEvent - is the keyevent sent to the View.
+       * @brief Key - is the key sent to the View.
        *
        */
-      public KeyEvent KeyEvent
+      public Key Key
       {
         get
         {
-          return _keyEvent;
+          return _key;
         }
         set
         {
-          _keyEvent = value;
+          _key = value;
         }
       }
     }
     public class TouchEventArgs : EventArgs
     {
        private View _view;
-       private TouchData _touchData;
+       private Touch _touch;
 
       /**
         * @brief View - is the view that is being touched
       }
 
       /**
-        * @brief TouchData - contains the information of touch points
+        * @brief Touch - contains the information of touch points
         *
         */
-      public TouchData TouchData
+      public Touch Touch
       {
         get
         {
-          return _touchData;
+          return _touch;
         }
         set
         {
-          _touchData = value;
+          _touch = value;
         }
       }
     }
       * @brief Event arguments that passed via Hover signal
       *
       */
-    public class HoverArgs : EventArgs
+    public class HoverEventArgs : EventArgs
     {
-    private View _view;
-    private Hover _hover;
+       private View _view;
+       private Hover _hover;
 
       /**
         * @brief View - is the view that is being hovered
       */
     public class WheelEventArgs : EventArgs
     {
-    private View _view;
-    private WheelEvent _wheelEvent;
+      private View _view;
+      private Wheel _wheel;
 
       /**
         * @brief View - is the view that is being wheeled
       }
 
       /**
-        * @brief WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
+        * @brief Wheel - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
         *
         */
-      public WheelEvent WheelEvent
+      public Wheel Wheel
       {
         get
         {
-          return _wheelEvent;
+          return _wheel;
         }
         set
         {
-          _wheelEvent = value;
+          _wheel = value;
         }
       }
     }
     private KeyInputFocusLostCallbackDelegate _KeyInputFocusLostCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr keyEvent);
-    private DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> _KeyEventHandler;
+    private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr key);
+    private DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> _KeyHandler;
     private KeyCallbackDelegate _KeyCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
     private OnRelayoutEventCallbackDelegate _viewOnRelayoutEventCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    private delegate bool TouchCallbackDelegate(IntPtr view, IntPtr touchData);
-    private DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> _viewTouchDataEventHandler;
-    private TouchCallbackDelegate _viewTouchDataCallbackDelegate;
+    private delegate bool TouchCallbackDelegate(IntPtr view, IntPtr touch);
+    private DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> _viewTouchHandler;
+    private TouchCallbackDelegate _viewTouchCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
     private delegate bool HoverCallbackDelegate(IntPtr view, IntPtr hover);
-    private DaliEventHandlerWithReturnType<object,HoverArgs,bool> _viewHoverHandler;
+    private DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> _viewHoverHandler;
     private HoverCallbackDelegate _viewHoverCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    private delegate bool WheelEventCallbackDelegate(IntPtr view, IntPtr wheelEvent);
-    private DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> _viewWheelEventHandler;
-    private WheelEventCallbackDelegate _viewWheelEventCallbackDelegate;
+    private delegate bool WheelCallbackDelegate(IntPtr view, IntPtr wheel);
+    private DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> _viewWheelHandler;
+    private WheelCallbackDelegate _viewWheelCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
     private delegate void OnStageEventCallbackDelegate(IntPtr control);
           if (_KeyInputFocusGainedEventHandler == null)
           {
             _KeyInputFocusGainedEventHandler += value;
-            Console.WriteLine("View Keyevent EVENT Locked....");
+            Console.WriteLine("View Key EVENT Locked....");
             _KeyInputFocusGainedCallbackDelegate = new KeyInputFocusGainedCallbackDelegate(OnKeyInputFocusGained);
             this.KeyInputFocusGainedSignal().Connect(_KeyInputFocusGainedCallbackDelegate);
           }
     private void OnKeyInputFocusGained(IntPtr view)
     {
       KeyInputFocusGainedEventArgs e = new KeyInputFocusGainedEventArgs();
-      Console.WriteLine("View Keyevent ....");
+      Console.WriteLine("View Key ....");
       // Populate all members of "e" (KeyInputFocusGainedEventArgs) with real data
       e.View = Dali.View.GetViewFromPtr(view);
 
 
     /**
      * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler
-     * (in the type of KeyEventEventHandler-DaliEventHandlerWithReturnType<object,KeyEventArgs,bool>) 
+     * (in the type of KeyHandler-DaliEventHandlerWithReturnType<object,KeyEventArgs,bool>)
      * provided by the user. KeyPressed signal is emitted when key event is received.
      */
     public event DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> KeyPressed
         lock(this)
         {
           // Restricted to only one listener
-          if (_KeyEventHandler == null)
+          if (_KeyHandler == null)
           {
-            _KeyEventHandler += value;
+            _KeyHandler += value;
 
-            _KeyCallbackDelegate = new KeyCallbackDelegate(OnKeyEvent);
+            _KeyCallbackDelegate = new KeyCallbackDelegate(OnKey);
             this.KeyEventSignal().Connect(_KeyCallbackDelegate);
           }
         }
       {
         lock(this)
         {
-          if (_KeyEventHandler != null)
+          if (_KeyHandler != null)
           {
             this.KeyEventSignal().Disconnect(_KeyCallbackDelegate);
           }
 
-          _KeyEventHandler -= value;
+          _KeyHandler -= value;
         }
       }
     }
 
-    private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
+    private bool OnKey(IntPtr view, IntPtr key)
     {
       KeyEventArgs e = new KeyEventArgs();
 
       // Populate all members of "e" (KeyEventArgs) with real data
       e.View = Dali.View.GetViewFromPtr(view);
-      e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr(keyEvent);
+      e.Key = Dali.Key.GetKeyFromPtr(key);
 
-      if (_KeyEventHandler != null)
+      if (_KeyHandler != null)
       {
         //here we send all data to user event handlers
-        return _KeyEventHandler(this, e);
+        return _KeyHandler(this, e);
       }
       return false;
 
 
     /**
       * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler
-      * (in the type of TouchEventHandler-DaliEventHandlerWithReturnType<object,TouchEventArgs,bool>)
+      * (in the type of TouchHandler-DaliEventHandlerWithReturnType<object,TouchEventArgs,bool>)
       * provided by the user. Touched signal is emitted when touch input is received.
       */
     public event DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> Touched
         lock(this)
         {
           // Restricted to only one listener
-          if (_viewTouchDataEventHandler == null)
+          if (_viewTouchHandler == null)
           {
-            _viewTouchDataEventHandler += value;
+            _viewTouchHandler += value;
             Console.WriteLine("View Touch EVENT LOCKED....");
-            _viewTouchDataCallbackDelegate = new TouchCallbackDelegate(OnTouch);
-            this.TouchSignal().Connect(_viewTouchDataCallbackDelegate);
+            _viewTouchCallbackDelegate = new TouchCallbackDelegate(OnTouch);
+            this.TouchSignal().Connect(_viewTouchCallbackDelegate);
           }
         }
       }
       {
         lock(this)
         {
-          if (_viewTouchDataEventHandler != null)
+          if (_viewTouchHandler != null)
           {
-            this.TouchSignal().Disconnect(_viewTouchDataCallbackDelegate);
+            this.TouchSignal().Disconnect(_viewTouchCallbackDelegate);
           }
 
-          _viewTouchDataEventHandler -= value;
+          _viewTouchHandler -= value;
         }
       }
     }
 
     // Callback for View TouchSignal
-    private bool OnTouch(IntPtr view, IntPtr touchData)
+    private bool OnTouch(IntPtr view, IntPtr touch)
     {
       TouchEventArgs e = new TouchEventArgs();
       Console.WriteLine("View Touch EVENT....");
       // Populate all members of "e" (TouchEventArgs) with real data
       e.View = View.GetViewFromPtr(view);
-      e.TouchData = Dali.TouchData.GetTouchDataFromPtr(touchData);
+      e.Touch = Dali.Touch.GetTouchFromPtr(touch);
 
-      if (_viewTouchDataEventHandler != null)
+      if (_viewTouchHandler != null)
       {
         //here we send all data to user event handlers
-        return _viewTouchDataEventHandler(this, e);
+        return _viewTouchHandler(this, e);
       }
 
       return false;
 
     /**
       * @brief Event for Hovered signal which can be used to subscribe/unsubscribe the event handler
-      * (in the type of HoverHandler-DaliEventHandlerWithReturnType<object,HoverArgs,bool>)
+      * (in the type of HoverHandler-DaliEventHandlerWithReturnType<object,HoverEventArgs,bool>)
       * provided by the user. Hovered signal is emitted when hover input is received.
       */
-    public event DaliEventHandlerWithReturnType<object,HoverArgs,bool> Hovered
+    public event DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> Hovered
     {
       add
       {
     // Callback for View Hover signal
     private bool OnHover(IntPtr view, IntPtr hover)
     {
-      HoverArgs e = new HoverArgs();
+      HoverEventArgs e = new HoverEventArgs();
 
-      // Populate all members of "e" (HoverArgs) with real data
+      // Populate all members of "e" (HoverEventArgs) with real data
       e.View = View.GetViewFromPtr(view);
       e.Hover = Dali.Hover.GetHoverFromPtr(hover);
 
 
     /**
       * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler
-      * (in the type of WheelEventHandler-DaliEventHandlerWithReturnType<object,WheelEventArgs,bool>)
+      * (in the type of WheelHandler-DaliEventHandlerWithReturnType<object,WheelEventArgs,bool>)
       * provided by the user. WheelMoved signal is emitted when wheel event is received.
       */
     public event DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> WheelMoved
         lock(this)
         {
           // Restricted to only one listener
-          if (_viewWheelEventHandler == null)
+          if (_viewWheelHandler == null)
           {
-            _viewWheelEventHandler += value;
+            _viewWheelHandler += value;
             Console.WriteLine("View Wheel EVENT LOCKED....");
-            _viewWheelEventCallbackDelegate = new WheelEventCallbackDelegate(OnWheelEvent);
-            this.WheelEventSignal().Connect(_viewWheelEventCallbackDelegate);
+            _viewWheelCallbackDelegate = new WheelCallbackDelegate(OnWheel);
+            this.WheelEventSignal().Connect(_viewWheelCallbackDelegate);
           }
         }
       }
       {
         lock(this)
         {
-          if (_viewWheelEventHandler != null)
+          if (_viewWheelHandler != null)
           {
-            this.WheelEventSignal().Disconnect(_viewWheelEventCallbackDelegate);
+            this.WheelEventSignal().Disconnect(_viewWheelCallbackDelegate);
           }
 
-          _viewWheelEventHandler -= value;
+          _viewWheelHandler -= value;
         }
       }
     }
 
     // Callback for View Wheel signal
-    private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
+    private bool OnWheel(IntPtr view, IntPtr wheel)
     {
       WheelEventArgs e = new WheelEventArgs();
       Console.WriteLine("View Wheel EVENT ....");
       // Populate all members of "e" (WheelEventArgs) with real data
       e.View = View.GetViewFromPtr(view);
-      e.WheelEvent = Dali.WheelEvent.GetWheelEventFromPtr(wheelEvent);
+      e.Wheel = Dali.Wheel.GetWheelFromPtr(wheel);
 
-      if (_viewWheelEventHandler != null)
+      if (_viewWheelHandler != null)
       {
         //here we send all data to user event handlers
-        return _viewWheelEventHandler(this, e);
+        return _viewWheelHandler(this, e);
       }
 
       return false;
index 6b2329b..5067594 100755 (executable)
@@ -33,26 +33,26 @@ using System.Runtime.InteropServices;
     */
   public class TouchEventArgs : EventArgs
   {
-     private TouchData _touchData;
+     private Touch _touch;
 
      /**
-       * @brief TouchData - contains the information of touch points
+       * @brief Touch - contains the information of touch points
        *
        */
-     public TouchData TouchData
+     public Touch Touch
      {
         get
         {
-           return _touchData;
+           return _touch;
         }
         set
         {
-           _touchData = value;
+           _touch = value;
         }
      }
   }
 
-  private event EventHandler<TouchEventArgs> _stageTouchEventHandler;
+  private event EventHandler<TouchEventArgs> _stageTouchHandler;
   private EventCallbackDelegateType1<IntPtr> _stageTouchCallbackDelegate;
 
   /**
@@ -61,13 +61,13 @@ using System.Runtime.InteropServices;
     * (i.e. the down & up touch events only).
     *
     */
-  public event EventHandler<TouchEventArgs> TouchEvent
+  public event EventHandler<TouchEventArgs> Touch
   {
      add
      {
         lock(this)
         {
-          _stageTouchEventHandler += value;
+          _stageTouchHandler += value;
           _stageTouchCallbackDelegate = OnStageTouch;
           this.TouchSignal().Connect(_stageTouchCallbackDelegate);
         }
@@ -76,11 +76,11 @@ using System.Runtime.InteropServices;
      {
         lock(this)
         {
-           if (_stageTouchEventHandler != null)
+           if (_stageTouchHandler != null)
            {
               this.TouchSignal().Disconnect(_stageTouchCallbackDelegate);
            }
-           _stageTouchEventHandler -= value;
+           _stageTouchHandler -= value;
         }
      }
   }
@@ -91,56 +91,55 @@ using System.Runtime.InteropServices;
 
     if( data != null )
     {
-      e.TouchData = TouchData.GetTouchDataFromPtr( data );
+      e.Touch = Dali.Touch.GetTouchFromPtr( data );
     }
 
-    if (_stageTouchEventHandler != null)
+    if (_stageTouchHandler != null)
     {
-      _stageTouchEventHandler(this, e);
+      _stageTouchHandler(this, e);
     }
   }
 
-
   /**
-    * @brief WheelEvent arguments that passed via Wheel signal
+    * @brief Wheel arguments that passed via Wheel signal
     *
     */
   public class WheelEventArgs : EventArgs
   {
-     private WheelEvent _wheelEvent;
+     private Wheel _wheel;
 
      /**
-       * @brief WheelEvent - store a wheel rolling type MOUSE_WHEEL or CUSTOM_WHEEL
+       * @brief Wheel - store a wheel rolling type MOUSE_WHEEL or CUSTOM_WHEEL
        *
        */
-     public WheelEvent WheelEvent
+     public Wheel Wheel
      {
         get
         {
-           return _wheelEvent;
+           return _wheel;
         }
         set
         {
-           _wheelEvent = value;
+           _wheel = value;
         }
      }
   }
 
-  private event EventHandler<WheelEventArgs> _stageWheelEventHandler;
+  private event EventHandler<WheelEventArgs> _stageWheelHandler;
   private EventCallbackDelegateType1<IntPtr> _stageWheelCallbackDelegate;
 
   /**
-    * @brief Event for WheelEvent signal which can be used to subscribe/unsubscribe the event handler
-    * WheelEvent signal is emitted is emitted when wheel event is received.
+    * @brief Event for Wheel signal which can be used to subscribe/unsubscribe the event handler
+    * Wheel signal is emitted is emitted when wheel event is received.
     *
     */
-  public event EventHandler<WheelEventArgs> WheelEvent
+  public event EventHandler<WheelEventArgs> Wheel
   {
      add
      {
         lock(this)
         {
-          _stageWheelEventHandler += value;
+          _stageWheelHandler += value;
           _stageWheelCallbackDelegate = OnStageWheel;
           this.WheelEventSignal().Connect(_stageWheelCallbackDelegate);
         }
@@ -149,11 +148,11 @@ using System.Runtime.InteropServices;
      {
         lock(this)
         {
-           if (_stageWheelEventHandler != null)
+           if (_stageWheelHandler != null)
            {
               this.WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
            }
-           _stageWheelEventHandler -= value;
+           _stageWheelHandler -= value;
         }
      }
   }
@@ -164,55 +163,55 @@ using System.Runtime.InteropServices;
 
     if( data != null )
     {
-      e.WheelEvent = Dali.WheelEvent.GetWheelEventFromPtr( data );
+      e.Wheel = Dali.Wheel.GetWheelFromPtr( data );
     }
 
-    if (_stageWheelEventHandler != null)
+    if (_stageWheelHandler != null)
     {
-      _stageWheelEventHandler(this, e);
+      _stageWheelHandler(this, e);
     }
   }
 
   /**
-    * @brief Event arguments that passed via KeyEvent signal
+    * @brief Event arguments that passed via Key signal
     *
     */
   public class KeyEventArgs : EventArgs
   {
-     private KeyEvent _keyEvent;
+     private Key _key;
 
      /**
-       * @brief KeyEvent - is the keyevent sent to Stage.
+       * @brief Key - is the keyevent sent to Stage.
        *
        */
-     public KeyEvent KeyEvent
+     public Key Key
      {
         get
         {
-           return _keyEvent;
+           return _key;
         }
         set
         {
-           _keyEvent = value;
+           _key = value;
         }
      }
   }
 
-  private event EventHandler<KeyEventArgs> _stageKeyEventHandler;
+  private event EventHandler<KeyEventArgs> _stageKeyHandler;
   private EventCallbackDelegateType1<IntPtr> _stageKeyCallbackDelegate;
 
   /**
-    * @brief Event for KeyEvent signal which can be used to subscribe/unsubscribe the event handler
-    * KeyEvent signal is emitted is emitted when key event is received.
+    * @brief Event for Key signal which can be used to subscribe/unsubscribe the event handler
+    * Key signal is emitted is emitted when key event is received.
     *
     */
-  public event EventHandler<KeyEventArgs> KeyEvent
+  public event EventHandler<KeyEventArgs> Key
   {
      add
      {
         lock(this)
         {
-            _stageKeyEventHandler += value;
+            _stageKeyHandler += value;
             _stageKeyCallbackDelegate = OnStageKey;
             this.KeyEventSignal().Connect(_stageKeyCallbackDelegate);
         }
@@ -221,11 +220,11 @@ using System.Runtime.InteropServices;
      {
         lock(this)
         {
-           if (_stageKeyEventHandler != null)
+           if (_stageKeyHandler != null)
            {
               this.KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
            }
-           _stageKeyEventHandler -= value;
+           _stageKeyHandler -= value;
         }
      }
   }
@@ -237,13 +236,13 @@ using System.Runtime.InteropServices;
 
     if( data != null )
     {
-      e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr( data );
+      e.Key = Dali.Key.GetKeyFromPtr( data );
     }
 
-    if (_stageKeyEventHandler != null)
+    if (_stageKeyHandler != null)
     {
       //here we send all data to user event handlers
-      _stageKeyEventHandler(this, e);
+      _stageKeyHandler(this, e);
     }
   }
 
diff --git a/plugins/dali-swig/SWIG/gestures/gesture.i b/plugins/dali-swig/SWIG/gestures/gesture.i
new file mode 100644 (file)
index 0000000..cfb7510
--- /dev/null
@@ -0,0 +1,32 @@
+%rename(GestureType) Dali::Gesture::Type;
+%rename(StateType) Dali::Gesture::State;
+
+%csmethodmodifiers Dali::Gesture::type "private";
+%csmethodmodifiers Dali::Gesture::state "private";
+%csmethodmodifiers Dali::Gesture::time "private";
+
+%typemap(cscode) Dali::Gesture %{
+  public Gesture.GestureType Type
+  {
+    get
+    {
+      return type;
+    }
+  }
+
+  public Gesture.StateType State
+  {
+    get
+    {
+      return state;
+    }
+  }
+
+  public uint Time
+  {
+    get
+    {
+      return time;
+    }
+  }
+%}
\ No newline at end of file
index 6116efc..da7c275 100644 (file)
     return ret;
   }
 
-  public uint GetTime() {
-    return time;
+  public uint Time
+  {
+    get
+    {
+      return time;
+    }
   }
 
   public int GetDeviceId(uint point) {
diff --git a/plugins/dali-swig/SWIG/gestures/key.i b/plugins/dali-swig/SWIG/gestures/key.i
new file mode 100644 (file)
index 0000000..9ba9232
--- /dev/null
@@ -0,0 +1,65 @@
+%rename(Key) Dali::KeyEvent;
+%rename(StateType) Dali::KeyEvent::State;
+
+%csmethodmodifiers Dali::KeyEvent::keyPressedName "private";
+%csmethodmodifiers Dali::KeyEvent::keyPressed "private";
+%csmethodmodifiers Dali::KeyEvent::keyCode "private";
+%csmethodmodifiers Dali::KeyEvent::keyModifier "private";
+%csmethodmodifiers Dali::KeyEvent::time "private";
+%csmethodmodifiers Dali::KeyEvent::state "private";
+
+%typemap(cscode) Dali::KeyEvent %{
+  public static Key GetKeyFromPtr(global::System.IntPtr cPtr) {
+    Key ret = new Key(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public string KeyPressedName
+  {
+    get
+    {
+      return keyPressedName;
+    }
+  }
+
+  public string KeyPressed
+  {
+    get
+    {
+      return keyPressed;
+    }
+  }
+
+  public int KeyCode
+  {
+    get
+    {
+      return keyCode;
+    }
+  }
+
+  public int KeyModifier
+  {
+    get
+    {
+      return keyModifier;
+    }
+  }
+
+  public uint Time
+  {
+    get
+    {
+      return time;
+    }
+  }
+
+  public Key.StateType State
+  {
+    get
+    {
+      return state;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/long-press-gesture.i b/plugins/dali-swig/SWIG/gestures/long-press-gesture.i
new file mode 100644 (file)
index 0000000..c89e897
--- /dev/null
@@ -0,0 +1,35 @@
+%csmethodmodifiers Dali::LongPressGesture::numberOfTouches "private";
+%csmethodmodifiers Dali::LongPressGesture::screenPoint "private";
+%csmethodmodifiers Dali::LongPressGesture::localPoint "private";
+
+%typemap(cscode) Dali::LongPressGesture %{
+  public static LongPressGesture GetLongPressGestureFromPtr(global::System.IntPtr cPtr) {
+    LongPressGesture ret = new LongPressGesture(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public uint NumberOfTouches
+  {
+    get
+    {
+      return numberOfTouches;
+    }
+  }
+
+  public Vector2 ScreenPoint
+  {
+    get
+    {
+      return screenPoint;
+    }
+  }
+
+  public Vector2 LocalPoint
+  {
+    get
+    {
+      return localPoint;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/pan-gesture.i b/plugins/dali-swig/SWIG/gestures/pan-gesture.i
new file mode 100644 (file)
index 0000000..efcfc16
--- /dev/null
@@ -0,0 +1,71 @@
+%csmethodmodifiers Dali::PanGesture::velocity "private";
+%csmethodmodifiers Dali::PanGesture::displacement "private";
+%csmethodmodifiers Dali::PanGesture::position "private";
+%csmethodmodifiers Dali::PanGesture::screenVelocity "private";
+%csmethodmodifiers Dali::PanGesture::screenDisplacement "private";
+%csmethodmodifiers Dali::PanGesture::screenPosition "private";
+%csmethodmodifiers Dali::PanGesture::numberOfTouches "private";
+
+%typemap(cscode) Dali::PanGesture %{
+  public static PanGesture GetPanGestureFromPtr(global::System.IntPtr cPtr) {
+    PanGesture ret = new PanGesture(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public Vector2 Velocity
+  {
+    get
+    {
+      return velocity;
+    }
+  }
+
+  public Vector2 Displacement
+  {
+    get
+    {
+      return displacement;
+    }
+  }
+
+  public Vector2 Position
+  {
+    get
+    {
+      return position;
+    }
+  }
+
+  public Vector2 ScreenVelocity
+  {
+    get
+    {
+      return screenVelocity;
+    }
+  }
+
+  public Vector2 ScreenDisplacement
+  {
+    get
+    {
+      return screenDisplacement;
+    }
+  }
+
+  public Vector2 ScreenPosition
+  {
+    get
+    {
+      return screenPosition;
+    }
+  }
+
+  public uint NumberOfTouches
+  {
+    get
+    {
+      return numberOfTouches;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/pinch-gesture.i b/plugins/dali-swig/SWIG/gestures/pinch-gesture.i
new file mode 100644 (file)
index 0000000..41af12e
--- /dev/null
@@ -0,0 +1,44 @@
+%csmethodmodifiers Dali::PinchGesture::scale "private";
+%csmethodmodifiers Dali::PinchGesture::speed "private";
+%csmethodmodifiers Dali::PinchGesture::screenCenterPoint "private";
+%csmethodmodifiers Dali::PinchGesture::localCenterPoint "private";
+
+%typemap(cscode) Dali::PinchGesture %{
+  public static PinchGesture GetPinchGestureFromPtr(global::System.IntPtr cPtr) {
+    PinchGesture ret = new PinchGesture(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public float Scale
+  {
+    get
+    {
+      return scale;
+    }
+  }
+
+  public float Speed
+  {
+    get
+    {
+      return speed;
+    }
+  }
+
+  public Vector2 ScreenCenterPoint
+  {
+    get
+    {
+      return screenCenterPoint;
+    }
+  }
+
+  public Vector2 LocalCenterPoint
+  {
+    get
+    {
+      return localCenterPoint;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/tap-gesture.i b/plugins/dali-swig/SWIG/gestures/tap-gesture.i
new file mode 100644 (file)
index 0000000..72b29cc
--- /dev/null
@@ -0,0 +1,44 @@
+%csmethodmodifiers Dali::TapGesture::numberOfTaps "private";
+%csmethodmodifiers Dali::TapGesture::numberOfTouches "private";
+%csmethodmodifiers Dali::TapGesture::screenPoint "private";
+%csmethodmodifiers Dali::TapGesture::localPoint "private";
+
+%typemap(cscode) Dali::TapGesture %{
+  public static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr) {
+    TapGesture ret = new TapGesture(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public uint NumberOfTaps
+  {
+    get
+    {
+      return numberOfTaps;
+    }
+  }
+
+  public uint NumberOfTouches
+  {
+    get
+    {
+      return numberOfTouches;
+    }
+  }
+
+  public Vector2 ScreenPoint
+  {
+    get
+    {
+      return screenPoint;
+    }
+  }
+
+  public Vector2 LocalPoint
+  {
+    get
+    {
+      return localPoint;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/touch.i b/plugins/dali-swig/SWIG/gestures/touch.i
new file mode 100644 (file)
index 0000000..ec63732
--- /dev/null
@@ -0,0 +1,9 @@
+%rename(Touch) Dali::TouchData;
+
+%typemap(cscode) Dali::TouchData %{
+  public static Touch GetTouchFromPtr(global::System.IntPtr cPtr) {
+    Touch ret = new Touch(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/wheel.i b/plugins/dali-swig/SWIG/gestures/wheel.i
new file mode 100644 (file)
index 0000000..4da34a4
--- /dev/null
@@ -0,0 +1,65 @@
+%rename(Wheel) Dali::WheelEvent;
+%rename(WheelType) Dali::WheelEvent::Type;
+
+%csmethodmodifiers Dali::WheelEvent::type "private";
+%csmethodmodifiers Dali::WheelEvent::direction "private";
+%csmethodmodifiers Dali::WheelEvent::modifiers "private";
+%csmethodmodifiers Dali::WheelEvent::point "private";
+%csmethodmodifiers Dali::WheelEvent::z "private";
+%csmethodmodifiers Dali::WheelEvent::timeStamp "private";
+
+%typemap(cscode) Dali::WheelEvent %{
+  public static Wheel GetWheelFromPtr(global::System.IntPtr cPtr) {
+    Wheel ret = new Wheel(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public Wheel.WheelType Type
+  {
+    get
+    {
+      return type;
+    }
+  }
+
+  public int Direction
+  {
+    get
+    {
+      return direction;
+    }
+  }
+
+  public uint Modifiers
+  {
+    get
+    {
+      return modifiers;
+    }
+  }
+
+  public Vector2 Point
+  {
+    get
+    {
+      return point;
+    }
+  }
+
+  public int Z
+  {
+    get
+    {
+      return z;
+    }
+  }
+
+  public uint TimeStamp
+  {
+    get
+    {
+      return timeStamp;
+    }
+  }
+%}
\ No newline at end of file
index ffb8ec7..e339809 100644 (file)
   * Required to get access to any data passed as a parameter in a Signal ( in C# they are delegate parameters).
   * E.g.
   *
-  * CREATE_CSHARP_WRAPPER_FROM_C_PTR_FUNCTION( TouchData );
-  * Creates a function called GetTouchDataFromPtr which allows you to:
+  * CREATE_CSHARP_WRAPPER_FROM_C_PTR_FUNCTION( Touch );
+  * Creates a function called GetTouchFromPtr which allows you to:
   *
   * static void OnStageTouched(IntPtr data)
   * {
-  *    TouchData touchData = TouchData.GetTouchDataFromPtr( data );
+  *    Touch touch = Touch.GetTouchFromPtr( data );
   * }
   *
   * ## means concat in a SWIG macro
@@ -54,14 +54,6 @@ DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Actor );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Image );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, ResourceImage );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Animation );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, TouchEvent );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, TouchData );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, WheelEvent );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, KeyEvent );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, LongPressGesture );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, PanGesture );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, PinchGesture );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, TapGesture );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, PropertyNotification );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, BaseHandle );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, RefObject );
index 6c9fc64..ff1e87e 100755 (executable)
@@ -21,415 +21,415 @@ using Dali;
 
 namespace MyCSharpExample
 {
-    class Example
+  class Example
+  {
+    // This is simple structure to contain Control name and implement state at once
+    // name : control name
+    // isImplemented : the state which the control is implemented in public or not
+    private struct Item
     {
-        // This is simple structure to contain Control name and implement state at once
-        // name : control name
-        // isImplemented : the state which the control is implemented in public or not
-        private struct Item
-        {
-            public String name;
-            public bool isImplemented;
+      public String name;
+      public bool isImplemented;
+
+      public Item(String name, bool isImplemented)
+      {
+        this.name = name;
+        this.isImplemented = isImplemented;
+      }
+    }
 
-            public Item(String name, bool isImplemented)
-            {
-                this.name = name;
-                this.isImplemented = isImplemented;
-            }
-        }
+    private Dali.Application _application;
+    private TableView _contentContainer;
+    private Stage _stage;
+    private Popup _popup;
+
+    // List of items
+    private Item[] mViewList = {
+      new Item("PushButton", true),  new Item("DropDown", false),    new Item("Toggle", true),
+      new Item("InputField", false),  new Item("AnimateGif", false),  new Item("Loading", false),
+      new Item("ProgressBar", false), new Item("CheckBox", false),    new Item("RadioButton", true),
+      new Item("Tooltip", true),     new Item("Popup", true),       new Item("Toast", true),
+      new Item("ItemView", false),    new Item("CheckBox", true)
+    };
+
+    public Example(Dali.Application application)
+    {
+      _application = application;
+      _application.Initialized += OnInitialize;
+    }
+
+    public void OnInitialize(object source, NUIApplicationInitEventArgs e)
+    {
+      Console.WriteLine("Customized Application Initialize event handler");
+      _stage = Stage.GetCurrent();
+      _stage.BackgroundColor = Color.White;
+
+      // Top label
+      TextLabel topLabel = new TextLabel();
+      topLabel.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+      topLabel.SetResizePolicy(ResizePolicyType.SIZE_RELATIVE_TO_PARENT, DimensionType.HEIGHT);
+      topLabel.AnchorPoint = NDalic.AnchorPointTopCenter;
+      topLabel.ParentOrigin = NDalic.ParentOriginTopCenter;
+      topLabel.SetSizeModeFactor(new Vector3( 0.0f, 0.1f, 0.0f ) );
+      topLabel.BackgroundColor = new Color(43.0f / 255.0f, 145.0f / 255.0f, 175.0f / 255.0f, 1.0f);
+      topLabel.TextColor = NDalic.WHITE;
+      topLabel.Text = " DALi Views";
+      topLabel.HorizontalAlignment = "BEGIN";
+      topLabel.VerticalAlignment = "CENTER";
+      topLabel.PointSize = 42.0f;
+      _stage.Add(topLabel);
+
+      // Grid container to contain items. Use tableView because FlexContainer support focus navigation just two direction ( up/down or left/right )
+      _contentContainer = new TableView(6, 5);
+      _contentContainer.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+      _contentContainer.SetResizePolicy(ResizePolicyType.SIZE_RELATIVE_TO_PARENT, DimensionType.HEIGHT);
+      _contentContainer.SetSizeModeFactor(new Vector3( 0.0f, 0.9f, 0.0f ) );
+      _contentContainer.AnchorPoint = NDalic.AnchorPointBottomCenter;
+      _contentContainer.ParentOrigin = NDalic.ParentOriginBottomCenter;
+      _contentContainer.SetRelativeHeight(0, 0.07f);
+      _contentContainer.SetRelativeHeight(1, 0.26f);
+      _contentContainer.SetRelativeHeight(2, 0.07f);
+      _contentContainer.SetRelativeHeight(3, 0.26f);
+      _contentContainer.SetRelativeHeight(4, 0.07f);
+      _contentContainer.SetRelativeHeight(5, 0.26f);
+      _contentContainer.SetKeyboardFocusable(true);
+      _stage.Add(_contentContainer);
+
+      CreateContent();
+
+      FocusManager.Instance.PreFocusChange += OnPreFocusChange;
+    }
+
+    // Callback for KeyboardFocusManager
+    private Actor OnPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
+    {
+      if (!e.Proposed && !e.Current)
+      {
+        e.Proposed = _contentContainer.GetChildAt(1);
+      }
+      return e.Proposed;
+    }
+
+    private void CreateContent()
+    {
+      for (int i = 0; i < mViewList.Length; i++)
+      {
+        CreateItem(mViewList[i], i);
+      }
+    }
 
-        private Dali.Application _application;
-        private TableView _contentContainer;
-        private Stage _stage;
-        private Popup _popup;
-
-        // List of items
-        private Item[] mViewList = {
-            new Item("PushButton", true),  new Item("DropDown", false),    new Item("Toggle", true),
-            new Item("InputField", false),  new Item("AnimateGif", false),  new Item("Loading", false),
-            new Item("ProgressBar", false), new Item("CheckBox", false),    new Item("RadioButton", true),
-            new Item("Tooltip", true),     new Item("Popup", true),       new Item("Toast", true),
-            new Item("ItemView", false),    new Item("CheckBox", true)
-        };
-
-        public Example(Dali.Application application)
+    private void CreateItem(Item item, int idx)
+    {
+      // Make label for item
+      TextLabel itemLabel = new TextLabel("    " + item.name);
+      itemLabel.Size = new Vector3(_stage.GetSize().Width * 0.2f, _stage.GetSize().Height * 0.05f, 0.0f);
+      itemLabel.HorizontalAlignment = "BEGIN";
+      itemLabel.VerticalAlignment = "BOTTOM";
+      itemLabel.PointSize = 18.0f;
+      _contentContainer.AddChild(itemLabel, new TableView.CellPosition(((uint)idx / 5) * 2, (uint)idx % 5));
+
+      // If item is implemented in public, attach it on stage
+      if (item.isImplemented)
+      {
+        if (item.name.CompareTo("PushButton") == 0)
         {
-            _application = application;
-            _application.Initialized += OnInitialize;
+          PushButton pushButton = new PushButton();
+          pushButton.LabelText = "Push Button";
+          pushButton.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+          pushButton.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
+          pushButton.UnselectedColor = new Vector4(1.0f,0.0f,0.0f,1.0f);
+          pushButton.SelectedColor = new Vector4(0.0f,1.0f,0.0f,1.0f);
+          pushButton.Clicked += (obj, e) =>
+          {
+            e.Button.LabelText = "Click Me";
+            e.Button.UnselectedColor = new Vector4(0.0f,0.0f,1.0f,1.0f);
+            return true;
+          };
+
+          _contentContainer.AddChild(pushButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
+        if (item.name.CompareTo("DropDown") == 0)
+        {
 
-        public void OnInitialize(object source, NUIApplicationInitEventArgs e)
+        }
+        if (item.name.CompareTo("Toggle") == 0)
         {
-            Console.WriteLine("Customized Application Initialize event handler");
-            _stage = Stage.GetCurrent();
-            _stage.BackgroundColor = Color.White;
-
-            // Top label
-            TextLabel topLabel = new TextLabel();
-            topLabel.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-            topLabel.SetResizePolicy(ResizePolicyType.SIZE_RELATIVE_TO_PARENT, DimensionType.HEIGHT);
-            topLabel.AnchorPoint = NDalic.AnchorPointTopCenter;
-            topLabel.ParentOrigin = NDalic.ParentOriginTopCenter;
-            topLabel.SetSizeModeFactor(new Vector3( 0.0f, 0.1f, 0.0f ) );
-            topLabel.BackgroundColor = new Color(43.0f / 255.0f, 145.0f / 255.0f, 175.0f / 255.0f, 1.0f);
-            topLabel.TextColor = NDalic.WHITE;
-            topLabel.Text = " DALi Views";
-            topLabel.HorizontalAlignment = "BEGIN";
-            topLabel.VerticalAlignment = "CENTER";
-            topLabel.PointSize = 42.0f;
-            _stage.Add(topLabel);
-
-            // Grid container to contain items. Use tableView because FlexContainer support focus navigation just two direction ( up/down or left/right )
-            _contentContainer = new TableView(6, 5);
-            _contentContainer.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-            _contentContainer.SetResizePolicy(ResizePolicyType.SIZE_RELATIVE_TO_PARENT, DimensionType.HEIGHT);
-            _contentContainer.SetSizeModeFactor(new Vector3( 0.0f, 0.9f, 0.0f ) );
-            _contentContainer.AnchorPoint = NDalic.AnchorPointBottomCenter;
-            _contentContainer.ParentOrigin = NDalic.ParentOriginBottomCenter;
-            _contentContainer.SetRelativeHeight(0, 0.07f);
-            _contentContainer.SetRelativeHeight(1, 0.26f);
-            _contentContainer.SetRelativeHeight(2, 0.07f);
-            _contentContainer.SetRelativeHeight(3, 0.26f);
-            _contentContainer.SetRelativeHeight(4, 0.07f);
-            _contentContainer.SetRelativeHeight(5, 0.26f);
-            _contentContainer.SetKeyboardFocusable(true);
-            _stage.Add(_contentContainer);
-
-            CreateContent();
-
-            FocusManager.Instance.PreFocusChange += OnPreFocusChange;
+          ToggleButton toggleButton = new ToggleButton();
+          Dali.Property.Array array = new Dali.Property.Array();
+          array.Add( new Dali.Property.Value("./images/star-highlight.png") );
+          array.Add( new Dali.Property.Value("./images/star-mod.png") );
+          array.Add( new Dali.Property.Value("./images/star-dim.png") );
+          toggleButton.StateVisuals = array;
+
+          Dali.Property.Array tooltips = new Dali.Property.Array();
+          tooltips.Add( new Dali.Property.Value("State A") );
+          tooltips.Add( new Dali.Property.Value("State B") );
+          tooltips.Add( new Dali.Property.Value("State C") );
+          toggleButton.Tooltips = tooltips;
+
+          toggleButton.WidthResizePolicy  = "FILL_TO_PARENT";
+          toggleButton.HeightResizePolicy = "FILL_TO_PARENT";
+          toggleButton.Clicked += (obj, e) =>
+          {
+            Console.WriteLine("Toggle button state changed.");
+            return true;
+          };
+
+          _contentContainer.AddChild(toggleButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
+        if (item.name.CompareTo("InputField") == 0)
+        {
 
-        // Callback for KeyboardFocusManager
-        private Actor OnPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
+        }
+        if (item.name.CompareTo("AnimateGif") == 0)
         {
-            if (!e.Proposed && !e.Current)
-            {
-                e.Proposed = _contentContainer.GetChildAt(1);
-            }
-            return e.Proposed;
+
         }
+        if (item.name.CompareTo("Loading") == 0)
+        {
 
-        private void CreateContent()
+        }
+        if (item.name.CompareTo("ProgressBar") == 0)
         {
-            for (int i = 0; i < mViewList.Length; i++)
-            {
-                CreateItem(mViewList[i], i);
-            }
+
         }
+        if (item.name.CompareTo("ScrollBar") == 0)
+        {
 
-        private void CreateItem(Item item, int idx)
+        }
+        if (item.name.CompareTo("CheckBox") == 0)
         {
-            // Make label for item
-            TextLabel itemLabel = new TextLabel("    " + item.name);
-            itemLabel.Size = new Vector3(_stage.GetSize().Width * 0.2f, _stage.GetSize().Height * 0.05f, 0.0f);
-            itemLabel.HorizontalAlignment = "BEGIN";
-            itemLabel.VerticalAlignment = "BOTTOM";
-            itemLabel.PointSize = 18.0f;
-            _contentContainer.AddChild(itemLabel, new TableView.CellPosition(((uint)idx / 5) * 2, (uint)idx % 5));
-
-            // If item is implemented in public, attach it on stage
-            if (item.isImplemented)
-            {
-                if (item.name.CompareTo("PushButton") == 0)
-                {
-                    PushButton pushButton = new PushButton();
-                    pushButton.LabelText = "Push Button";
-                    pushButton.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-                    pushButton.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
-                    pushButton.UnselectedColor = new Vector4(1.0f,0.0f,0.0f,1.0f);
-                    pushButton.SelectedColor = new Vector4(0.0f,1.0f,0.0f,1.0f);
-                    pushButton.Clicked += (obj, e) =>
-                    {
-                        e.Button.LabelText = "Click Me";
-                        e.Button.UnselectedColor = new Vector4(0.0f,0.0f,1.0f,1.0f);
-                        return true;
-                    };
-
-                    _contentContainer.AddChild(pushButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("DropDown") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("Toggle") == 0)
-                {
-                    ToggleButton toggleButton = new ToggleButton();
-                    Dali.Property.Array array = new Dali.Property.Array();
-                    array.Add( new Dali.Property.Value("./images/star-highlight.png") );
-                    array.Add( new Dali.Property.Value("./images/star-mod.png") );
-                    array.Add( new Dali.Property.Value("./images/star-dim.png") );
-                    toggleButton.StateVisuals = array;
-
-                    Dali.Property.Array tooltips = new Dali.Property.Array();
-                    tooltips.Add( new Dali.Property.Value("State A") );
-                    tooltips.Add( new Dali.Property.Value("State B") );
-                    tooltips.Add( new Dali.Property.Value("State C") );
-                    toggleButton.Tooltips = tooltips;
-
-                    toggleButton.WidthResizePolicy  = "FILL_TO_PARENT";
-                    toggleButton.HeightResizePolicy = "FILL_TO_PARENT";
-                    toggleButton.Clicked += (obj, e) =>
-                    {
-                        Console.WriteLine("Toggle button state changed.");
-                        return true;
-                    };
-
-                    _contentContainer.AddChild(toggleButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("InputField") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("AnimateGif") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("Loading") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("ProgressBar") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("ScrollBar") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("CheckBox") == 0)
-                {
-                    CheckBoxButton checkBoxButton = new CheckBoxButton();
-                    checkBoxButton.LabelText = "Yes";
-
-                    _contentContainer.AddChild(checkBoxButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("RadioButton") == 0)
-                {
-                    TableView tableView = new TableView(2, 1);
-                    tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-                    tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
-
-                    RadioButton rButton = new RadioButton();
-                    rButton.LabelText = "Yes";
-                    rButton.Selected = true;
-                    tableView.AddChild(rButton, new TableView.CellPosition(0, 0));
-
-                    rButton = new RadioButton();
-                    rButton.LabelText = "No";
-
-                    tableView.AddChild(rButton, new TableView.CellPosition(1, 0));
-
-                    _contentContainer.AddChild(tableView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("Tooltip") == 0)
-                {
-                    TableView tableView = new TableView(2, 1);
-                    tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-                    tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
-
-                    // Create two push buttons and add them to a table view
-                    PushButton buttonWithSimpleTooltip = new PushButton();
-                    buttonWithSimpleTooltip.LabelText = "Tooltip with text only";
-                    buttonWithSimpleTooltip.UnselectedColor = new Vector4(0.5f,0.5f,0.7f,1.0f);
-                    buttonWithSimpleTooltip.SelectedColor = new Vector4(0.7f,0.5f,0.7f,1.0f);
-                    buttonWithSimpleTooltip.WidthResizePolicy = "FILL_TO_PARENT";
-                    tableView.AddChild(buttonWithSimpleTooltip, new TableView.CellPosition(0, 0));
-
-                    PushButton buttonWithIconTooltip = new PushButton();
-                    buttonWithIconTooltip.LabelText = "Tooltip with Text and Icon";
-                    buttonWithIconTooltip.WidthResizePolicy = "FILL_TO_PARENT";
-                    buttonWithIconTooltip.UnselectedColor = new Vector4(0.5f,0.5f,0.7f,1.0f);
-                    buttonWithIconTooltip.SelectedColor = new Vector4(0.7f,0.5f,0.7f,1.0f);
-                    tableView.AddChild(buttonWithIconTooltip, new TableView.CellPosition(1, 0));
-
-                    // Add a simple text only tooltip to the first push button
-                    buttonWithSimpleTooltip.TooltipText = "Simple Tooltip";
-
-                    // Create a property map for a tooltip with one icon and one text
-                    Property.Array iconTooltipContent = new Property.Array();
-
-                    Property.Map iconVisual = new Property.Map();
-                    iconVisual.Add( Dali.Constants.Visual.Property.Type, new Property.Value((int)Dali.Constants.Visual.Type.Image) )
-                              .Add( Dali.Constants.ImageVisualProperty.URL, new Property.Value("./images/star-highlight.png") );
-                    iconTooltipContent.Add(new Property.Value(iconVisual));
-
-                    Property.Map textVisual = new Property.Map();
-                    textVisual.Add( Dali.Constants.Visual.Property.Type, new Property.Value((int)Dali.Constants.Visual.Type.Text) )
-                              .Add( Dali.Constants.TextVisualProperty.Text, new Property.Value("Tooltip with Icon") );
-                    iconTooltipContent.Add(new Property.Value(textVisual));
-
-                    Property.Map iconTooltip = new Property.Map();
-                    iconTooltip.Add( Dali.Constants.Tooltip.Property.Content, new Property.Value(iconTooltipContent) )
-                               .Add( Dali.Constants.Tooltip.Property.Tail, new Property.Value(true) );
-
-                    // Add the tooltip with icon and text to the second push button
-                    buttonWithIconTooltip.Tooltip = iconTooltip;
-
-                    _contentContainer.AddChild(tableView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("Popup") == 0)
-                {
-                    PushButton button = new PushButton();
-                    button.LabelText = "Popup";
-                    button.ParentOrigin = NDalic.ParentOriginCenter;
-                    button.AnchorPoint = NDalic.AnchorPointCenter;
-                    button.MaximumSize = new Vector2(90.0f,50.0f);
-                    _popup = CreatePopup();
-                    _popup.SetTitle(CreateTitle("Popup"));
-
-                    TextLabel text = new TextLabel("This will erase the file permanently. Are you sure?");
-                    text.BackgroundColor = Color.White;
-                    text.MultiLine = true;
-                    text.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-                    text.SetResizePolicy(ResizePolicyType.DIMENSION_DEPENDENCY, DimensionType.HEIGHT);
-                    text.SetPadding(new RectFloat(10.0f, 10.0f, 20.0f, 0.0f));
-                    _popup.SetContent(text);
-                    _popup.SetKeyboardFocusable(true);
-                    _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
-
-                    button.Clicked += (obj, ee) =>
-                    {
-                        _stage.Add(_popup);
-                        _popup.SetDisplayState(Popup.DisplayStateType.SHOWN);
-                        FocusManager.Instance.SetCurrentFocusActor((_popup.FindChildByName( "Footer" )).FindChildByName("OKButton"));
-                        return true;
-                    };
-                    _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("Toast") == 0)
-                {
-                    PushButton button = new PushButton();
-                    button.LabelText = "Toast";
-                    button.ParentOrigin = NDalic.ParentOriginCenter;
-                    button.AnchorPoint = NDalic.AnchorPointCenter;
-                    button.Clicked += (obj, ee) =>
-                    {
-                        TypeInfo typeInfo = new TypeInfo(TypeRegistry.Get().GetTypeInfo( "PopupToast" ));
-                        if( typeInfo )
-                        {
-                            BaseHandle baseHandle = typeInfo.CreateInstance();
-                            if( baseHandle )
-                            {
-                                Popup toast = Popup.DownCast( baseHandle );
-                                TextLabel text = new TextLabel("This is a Toast.\nIt will auto-hide itself");
-                                text.TextColor = Color.White;
-                                text.MultiLine = true;
-                                text.HorizontalAlignment = "center";
-                                toast.SetTitle( text);
-                                _stage.Add(toast);
-                                toast.SetDisplayState( Popup.DisplayStateType.SHOWN);
-                            }
-                        }
-                        return true;
-                    };
-                    _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("ItemView") == 0)
-                {
-
-                }
-            }
-            else
-            {
-                ImageView notSupportView = new ImageView("images/not_yet_sign.png");
-                notSupportView.Size = new Vector3(_stage.GetSize().Width * 0.2f, _stage.GetSize().Height * 0.25f, 0.0f);
-                notSupportView.SetKeyboardFocusable(true);
-                _contentContainer.AddChild(notSupportView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-            }
+          CheckBoxButton checkBoxButton = new CheckBoxButton();
+          checkBoxButton.LabelText = "Yes";
+
+          _contentContainer.AddChild(checkBoxButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
-        Popup CreatePopup()
+        if (item.name.CompareTo("RadioButton") == 0)
         {
-            Popup confirmationPopup = new Popup();
-
-            Actor footer = new Actor();
-            footer.SetName("Footer");
-            footer.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-            footer.SetResizePolicy(ResizePolicyType.FIXED, DimensionType.HEIGHT);
-            footer.SetSize(0.0f, 80.0f);
-            footer.ParentOrigin = NDalic.ParentOriginCenter;
-            footer.AnchorPoint = NDalic.AnchorPointCenter;
-
-            PushButton okButton = CreateOKButton();
-            okButton.ParentOrigin = NDalic.ParentOriginCenter;
-            okButton.AnchorPoint = NDalic.AnchorPointCenter;
-            okButton.SetResizePolicy(ResizePolicyType.SIZE_FIXED_OFFSET_FROM_PARENT, DimensionType.ALL_DIMENSIONS);
-            okButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
-
-            PushButton cancelButton = CreateCancelButton();
-            cancelButton.ParentOrigin = NDalic.ParentOriginCenter;
-            cancelButton.AnchorPoint = NDalic.AnchorPointCenter;
-            cancelButton.SetResizePolicy(ResizePolicyType.SIZE_FIXED_OFFSET_FROM_PARENT, DimensionType.ALL_DIMENSIONS);
-            cancelButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
-
-            TableView controlLayout = new TableView(1, 2);
-            controlLayout.ParentOrigin = NDalic.ParentOriginCenter;
-            controlLayout.AnchorPoint = NDalic.AnchorPointCenter;
-            controlLayout.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.ALL_DIMENSIONS);
-            controlLayout.SetCellPadding(new Size(10.0f, 10.0f));
-            controlLayout.SetRelativeWidth(0, 0.5f);
-            controlLayout.SetRelativeWidth(1, 0.5f);
-            controlLayout.SetCellAlignment(new TableView.CellPosition(0, 0), HorizontalAlignmentType.CENTER, VerticalAlignmentType.CENTER);
-            controlLayout.SetCellAlignment(new TableView.CellPosition(0, 1), HorizontalAlignmentType.CENTER, VerticalAlignmentType.CENTER);
-            controlLayout.AddChild(okButton, new TableView.CellPosition(0, 0));
-            controlLayout.AddChild(cancelButton, new TableView.CellPosition(0, 1));
-
-            footer.Add(controlLayout);
-
-            confirmationPopup.SetFooter(footer);
-            return confirmationPopup;
+          TableView tableView = new TableView(2, 1);
+          tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+          tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
+
+          RadioButton rButton = new RadioButton();
+          rButton.LabelText = "Yes";
+          rButton.Selected = true;
+          tableView.AddChild(rButton, new TableView.CellPosition(0, 0));
+
+          rButton = new RadioButton();
+          rButton.LabelText = "No";
+
+          tableView.AddChild(rButton, new TableView.CellPosition(1, 0));
+
+          _contentContainer.AddChild(tableView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
-        Actor CreateTitle(string title)
+        if (item.name.CompareTo("Tooltip") == 0)
         {
-            TextLabel titleActor = new TextLabel(title);
-            titleActor.TextColor = Color.White;
-            titleActor.MultiLine = true;
-            titleActor.HorizontalAlignment = "center";
-            return titleActor;
+          TableView tableView = new TableView(2, 1);
+          tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+          tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
+
+          // Create two push buttons and add them to a table view
+          PushButton buttonWithSimpleTooltip = new PushButton();
+          buttonWithSimpleTooltip.LabelText = "Tooltip with text only";
+          buttonWithSimpleTooltip.UnselectedColor = new Vector4(0.5f,0.5f,0.7f,1.0f);
+          buttonWithSimpleTooltip.SelectedColor = new Vector4(0.7f,0.5f,0.7f,1.0f);
+          buttonWithSimpleTooltip.WidthResizePolicy = "FILL_TO_PARENT";
+          tableView.AddChild(buttonWithSimpleTooltip, new TableView.CellPosition(0, 0));
+
+          PushButton buttonWithIconTooltip = new PushButton();
+          buttonWithIconTooltip.LabelText = "Tooltip with Text and Icon";
+          buttonWithIconTooltip.WidthResizePolicy = "FILL_TO_PARENT";
+          buttonWithIconTooltip.UnselectedColor = new Vector4(0.5f,0.5f,0.7f,1.0f);
+          buttonWithIconTooltip.SelectedColor = new Vector4(0.7f,0.5f,0.7f,1.0f);
+          tableView.AddChild(buttonWithIconTooltip, new TableView.CellPosition(1, 0));
+
+          // Add a simple text only tooltip to the first push button
+          buttonWithSimpleTooltip.TooltipText = "Simple Tooltip";
+
+          // Create a property map for a tooltip with one icon and one text
+          Property.Array iconTooltipContent = new Property.Array();
+
+          Property.Map iconVisual = new Property.Map();
+          iconVisual.Add( Dali.Constants.Visual.Property.Type, new Property.Value((int)Dali.Constants.Visual.Type.Image) )
+            .Add( Dali.Constants.ImageVisualProperty.URL, new Property.Value("./images/star-highlight.png") );
+          iconTooltipContent.Add(new Property.Value(iconVisual));
+
+          Property.Map textVisual = new Property.Map();
+          textVisual.Add( Dali.Constants.Visual.Property.Type, new Property.Value((int)Dali.Constants.Visual.Type.Text) )
+            .Add( Dali.Constants.TextVisualProperty.Text, new Property.Value("Tooltip with Icon") );
+          iconTooltipContent.Add(new Property.Value(textVisual));
+
+          Property.Map iconTooltip = new Property.Map();
+          iconTooltip.Add( Dali.Constants.Tooltip.Property.Content, new Property.Value(iconTooltipContent) )
+            .Add( Dali.Constants.Tooltip.Property.Tail, new Property.Value(true) );
+
+          // Add the tooltip with icon and text to the second push button
+          buttonWithIconTooltip.Tooltip = iconTooltip;
+
+          _contentContainer.AddChild(tableView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
-
-        PushButton CreateOKButton()
+        if (item.name.CompareTo("Popup") == 0)
         {
-            PushButton okayButton = new PushButton();
-            okayButton.SetName("OKButton");
-            okayButton.LabelText = "OK";
-            okayButton.SetKeyboardFocusable(true);
-            okayButton.Clicked += (obj, ee) =>
-            {
-                _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
-                return true;
-            };
-            return okayButton;
+          PushButton button = new PushButton();
+          button.LabelText = "Popup";
+          button.ParentOrigin = NDalic.ParentOriginCenter;
+          button.AnchorPoint = NDalic.AnchorPointCenter;
+          button.MaximumSize = new Vector2(90.0f,50.0f);
+          _popup = CreatePopup();
+          _popup.SetTitle(CreateTitle("Popup"));
+
+          TextLabel text = new TextLabel("This will erase the file permanently. Are you sure?");
+          text.BackgroundColor = Color.White;
+          text.MultiLine = true;
+          text.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+          text.SetResizePolicy(ResizePolicyType.DIMENSION_DEPENDENCY, DimensionType.HEIGHT);
+          text.SetPadding(new RectFloat(10.0f, 10.0f, 20.0f, 0.0f));
+          _popup.SetContent(text);
+          _popup.SetKeyboardFocusable(true);
+          _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
+
+          button.Clicked += (obj, ee) =>
+          {
+            _stage.Add(_popup);
+            _popup.SetDisplayState(Popup.DisplayStateType.SHOWN);
+            FocusManager.Instance.SetCurrentFocusActor((_popup.FindChildByName( "Footer" )).FindChildByName("OKButton"));
+            return true;
+          };
+          _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
-        PushButton CreateCancelButton()
+        if (item.name.CompareTo("Toast") == 0)
         {
-            PushButton cancelButton = new PushButton();
-            cancelButton.LabelText = "Cancel";
-            cancelButton.SetKeyboardFocusable(true);
-            cancelButton.Clicked += (obj, ee) =>
+          PushButton button = new PushButton();
+          button.LabelText = "Toast";
+          button.ParentOrigin = NDalic.ParentOriginCenter;
+          button.AnchorPoint = NDalic.AnchorPointCenter;
+          button.Clicked += (obj, ee) =>
+          {
+            TypeInfo typeInfo = new TypeInfo(TypeRegistry.Get().GetTypeInfo( "PopupToast" ));
+            if( typeInfo )
             {
-                _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
-                return true;
-            };
-            return cancelButton;
+              BaseHandle baseHandle = typeInfo.CreateInstance();
+              if( baseHandle )
+              {
+                Popup toast = Popup.DownCast( baseHandle );
+                TextLabel text = new TextLabel("This is a Toast.\nIt will auto-hide itself");
+                text.TextColor = Color.White;
+                text.MultiLine = true;
+                text.HorizontalAlignment = "center";
+                toast.SetTitle( text);
+                _stage.Add(toast);
+                toast.SetDisplayState( Popup.DisplayStateType.SHOWN);
+              }
+            }
+            return true;
+          };
+          _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
-
-        public void MainLoop()
+        if (item.name.CompareTo("ItemView") == 0)
         {
-            _application.MainLoop();
-        }
 
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
+        }
+      }
+      else
+      {
+        ImageView notSupportView = new ImageView("images/not_yet_sign.png");
+        notSupportView.Size = new Vector3(_stage.GetSize().Width * 0.2f, _stage.GetSize().Height * 0.25f, 0.0f);
+        notSupportView.SetKeyboardFocusable(true);
+        _contentContainer.AddChild(notSupportView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
+      }
+    }
+    Popup CreatePopup()
+    {
+      Popup confirmationPopup = new Popup();
+
+      Actor footer = new Actor();
+      footer.SetName("Footer");
+      footer.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+      footer.SetResizePolicy(ResizePolicyType.FIXED, DimensionType.HEIGHT);
+      footer.SetSize(0.0f, 80.0f);
+      footer.ParentOrigin = NDalic.ParentOriginCenter;
+      footer.AnchorPoint = NDalic.AnchorPointCenter;
+
+      PushButton okButton = CreateOKButton();
+      okButton.ParentOrigin = NDalic.ParentOriginCenter;
+      okButton.AnchorPoint = NDalic.AnchorPointCenter;
+      okButton.SetResizePolicy(ResizePolicyType.SIZE_FIXED_OFFSET_FROM_PARENT, DimensionType.ALL_DIMENSIONS);
+      okButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
+
+      PushButton cancelButton = CreateCancelButton();
+      cancelButton.ParentOrigin = NDalic.ParentOriginCenter;
+      cancelButton.AnchorPoint = NDalic.AnchorPointCenter;
+      cancelButton.SetResizePolicy(ResizePolicyType.SIZE_FIXED_OFFSET_FROM_PARENT, DimensionType.ALL_DIMENSIONS);
+      cancelButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
+
+      TableView controlLayout = new TableView(1, 2);
+      controlLayout.ParentOrigin = NDalic.ParentOriginCenter;
+      controlLayout.AnchorPoint = NDalic.AnchorPointCenter;
+      controlLayout.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.ALL_DIMENSIONS);
+      controlLayout.SetCellPadding(new Size(10.0f, 10.0f));
+      controlLayout.SetRelativeWidth(0, 0.5f);
+      controlLayout.SetRelativeWidth(1, 0.5f);
+      controlLayout.SetCellAlignment(new TableView.CellPosition(0, 0), HorizontalAlignmentType.CENTER, VerticalAlignmentType.CENTER);
+      controlLayout.SetCellAlignment(new TableView.CellPosition(0, 1), HorizontalAlignmentType.CENTER, VerticalAlignmentType.CENTER);
+      controlLayout.AddChild(okButton, new TableView.CellPosition(0, 0));
+      controlLayout.AddChild(cancelButton, new TableView.CellPosition(0, 1));
+
+      footer.Add(controlLayout);
+
+      confirmationPopup.SetFooter(footer);
+      return confirmationPopup;
+    }
+    Actor CreateTitle(string title)
+    {
+      TextLabel titleActor = new TextLabel(title);
+      titleActor.TextColor = Color.White;
+      titleActor.MultiLine = true;
+      titleActor.HorizontalAlignment = "center";
+      return titleActor;
+    }
 
-        [STAThread]
-        static void Main(string[] args)
-        {
-            Console.WriteLine("Hello Mono World");
+    PushButton CreateOKButton()
+    {
+      PushButton okayButton = new PushButton();
+      okayButton.SetName("OKButton");
+      okayButton.LabelText = "OK";
+      okayButton.SetKeyboardFocusable(true);
+      okayButton.Clicked += (obj, ee) =>
+      {
+        _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
+        return true;
+      };
+      return okayButton;
+    }
+    PushButton CreateCancelButton()
+    {
+      PushButton cancelButton = new PushButton();
+      cancelButton.LabelText = "Cancel";
+      cancelButton.SetKeyboardFocusable(true);
+      cancelButton.Clicked += (obj, ee) =>
+      {
+        _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
+        return true;
+      };
+      return cancelButton;
+    }
 
-            Example example = new Example(Application.NewApplication());
-            example.MainLoop();
-        }
+    public void MainLoop()
+    {
+      _application.MainLoop();
     }
+
+    /// <summary>
+    /// The main entry point for the application.
+    /// </summary>
+
+    [STAThread]
+      static void Main(string[] args)
+      {
+        Console.WriteLine("Hello Mono World");
+
+        Example example = new Example(Application.NewApplication("json/control-dashboard.json"));
+        example.MainLoop();
+      }
+  }
 }
index adf3a42..2da7ea4 100644 (file)
@@ -31,7 +31,21 @@ namespace MyCSharpExample
         private int _myRating;
         private bool _myDragEnabled;
 
-        public StarRating() : base(ViewWrapperImpl.CustomViewBehaviour.VIEW_BEHAVIOUR_DEFAULT)
+        // Called by DALi Builder if it finds a StarRating control in a JSON file
+        static CustomView CreateInstance()
+        {
+          return new StarRating();
+        }
+
+        // static constructor registers the control type (only runs once)
+        static StarRating()
+        {
+          // ViewRegistry registers control type with DALi type registery
+          // also uses introspection to find any properties that need to be registered with type registry
+          ViewRegistry.Instance.Register(CreateInstance, typeof(StarRating) );
+        }
+
+        public StarRating() : base(typeof(StarRating).Name, ViewWrapperImpl.CustomViewBehaviour.VIEW_BEHAVIOUR_DEFAULT)
         {
         }
 
@@ -62,7 +76,7 @@ namespace MyCSharpExample
             UpdateStartImages(_myRating);
 
             // Enable pan gesture detection
-            EnableGestureDetection(Gesture.Type.Pan);
+            EnableGestureDetection(Gesture.GestureType.Pan);
             _myDragEnabled = true; // Allow dragging by default (can be disabled)
         }
 
@@ -72,18 +86,18 @@ namespace MyCSharpExample
             // Only handle pan gesture if dragging is allowed
             if(_myDragEnabled)
             {
-                switch (gesture.state)
+                switch (gesture.State)
                 {
-                    case Gesture.State.Started:
+                    case Gesture.StateType.Started:
                     {
                         _gestureDisplacement = new Vector3(0.0f, 0.0f, 0.0f);
                         _currentValue = 0;
                         break;
                     }
-                    case Gesture.State.Continuing:
+                    case Gesture.StateType.Continuing:
                     {
                         // Calculate the rating according to pan desture displacement
-                        _gestureDisplacement.X += gesture.displacement.X;
+                        _gestureDisplacement.X += gesture.Displacement.X;
                         int delta = (int)Math.Ceiling(_gestureDisplacement.X / 40.0f);
                         _currentValue = _myRating + delta;
 
@@ -229,6 +243,8 @@ namespace MyCSharpExample
         [STAThread]
         static void Main(string[] args)
         {
+            System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (typeof(MyCSharpExample.StarRating).TypeHandle);
+
             Example example = new Example(Application.NewApplication());
             example.MainLoop ();
         }
index 9c02eee..274b97a 100644 (file)
@@ -39,9 +39,10 @@ namespace MyCSharpExample
 
     public void Initialize(object source, NUIApplicationInitEventArgs e)
     {
-
       OperatorTests();
 
+      CustomViewPropertyTest();
+
       Handle handle = new Handle();
       int myPropertyIndex = handle.RegisterProperty("myProperty", new Property.Value(10.0f), Property.AccessMode.READ_WRITE);
       float myProperty = 0.0f;
@@ -338,6 +339,52 @@ namespace MyCSharpExample
 
   }
 
+    public void CustomViewPropertyTest()
+    {
+        // Create a Spin control
+        Spin spin = new Spin();
+
+        // Background property
+        Property.Map background = new Property.Map();
+        background.Add( Dali.Constants.Visual.Property.Type, new Property.Value((int)Dali.Constants.Visual.Type.Color) )
+                  .Add( Dali.Constants.ColorVisualProperty.MixColor, new Property.Value(Color.Red) );
+        spin.Background = background;
+
+        background = spin.Background;
+        Vector4 backgroundColor = new Vector4();
+        background.Find(Dali.Constants.ColorVisualProperty.MixColor).Get(backgroundColor);
+        if( backgroundColor == Color.Red )
+        {
+            Console.WriteLine ("Custom View Background property : test passed");
+        }
+        else
+        {
+            Console.WriteLine ("Custom View Background property : test failed");
+        }
+
+        // BackgroundColor property
+        spin.BackgroundColor = Color.Yellow;
+        if(spin.BackgroundColor == Color.Yellow)
+        {
+            Console.WriteLine ("Custom View BackgroundColor property : test passed");
+        }
+        else
+        {
+            Console.WriteLine ("Custom View BackgroundColor property : test failed");
+        }
+
+        // StyleName property
+        spin.StyleName = "MyCustomStyle";
+        if(spin.StyleName == "MyCustomStyle")
+        {
+            Console.WriteLine ("Custom View StyleName property : test passed");
+        }
+        else
+        {
+            Console.WriteLine ("Custom View StyleName property : test failed");
+        }
+    }
+
     public void MainLoop()
     {
       _application.MainLoop ();
index 324d5dd..314c9a8 100755 (executable)
@@ -39,7 +39,7 @@ namespace MyCSharpExample
       Console.WriteLine("Customized Application Initialize event handler");
       Stage stage = Stage.Instance;
       stage.BackgroundColor = Color.White;
-      stage.TouchEvent += OnStageTouched;
+      stage.Touch += OnStageTouched;
 
       // Add a _text label to the stage
       _text = new TextLabel("Hello Mono World");
@@ -66,7 +66,7 @@ namespace MyCSharpExample
     public void OnStageTouched(object sender, Stage.TouchEventArgs e)
     {
       // Only animate the _text label when touch down happens
-      if( e.TouchData.GetState(0) == PointStateType.DOWN )
+      if( e.Touch.GetState(0) == PointStateType.DOWN )
       {
         Console.WriteLine("Customized Stage Touch event handler");
         // Create a new _animation
index 43656a2..7cd5359 100755 (executable)
@@ -49,9 +49,9 @@ namespace ImageViewExample
       Log("Customized Application Initialize event handler");
       stage = Stage.Instance;
       stage.BackgroundColor = Color.Cyan;
-      stage.TouchEvent += OnStageTouched;
-      stage.WheelEvent += OnStageWheelMoved;
-      stage.KeyEvent += OnStageKeyPressed;
+      stage.Touch += OnStageTouched;
+      stage.Wheel += OnStageWheelMoved;
+      stage.Key += OnStageKeyPressed;
       //stage.EventProcessingFinished += OnStageEventProcessingFinished;
 
       layer = stage.GetDefaultLayer();
@@ -202,21 +202,21 @@ namespace ImageViewExample
     public void OnStageKeyPressed(object sender, Stage.KeyEventArgs e)
     {
       Log("OnStageKeyEventOccured()!");
-      Log("keyPressedName=" + e.KeyEvent.keyPressedName);
-      Log("state=" + e.KeyEvent.state);
+      Log("keyPressedName=" + e.Key.KeyPressedName);
+      Log("state=" + e.Key.State);
     }
 
     public void OnStageWheelMoved(object sender, Stage.WheelEventArgs e)
     {
       Log("OnStageWheelEventOccured()!");
-      Log("direction=" + e.WheelEvent.direction);
-      Log("type=" + e.WheelEvent.type);
+      Log("direction=" + e.Wheel.Direction);
+      Log("type=" + e.Wheel.Type);
     }
 
     // Callback for stage touched signal handling
     public void OnStageTouched(object sender, Stage.TouchEventArgs e)
     {
-      Log("OnStageTouched()! e.TouchData.GetState(0)=" + e.TouchData.GetState(0) );
+      Log("OnStageTouched()! e.TouchData.GetState(0)=" + e.Touch.GetState(0));
     }
 
     public void MainLoop()
diff --git a/plugins/dali-swig/examples/json/control-dashboard.json b/plugins/dali-swig/examples/json/control-dashboard.json
new file mode 100644 (file)
index 0000000..c2609c4
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * This file is part of Dali Toolkit
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+  "styles":
+  {
+    "ProgressBar":
+    {
+    }
+  }
+}
index 71e7ff0..834c4bd 100755 (executable)
@@ -154,7 +154,7 @@ namespace MyCSharpExample
       Console.WriteLine("View TOUCH EVENT callback....");
 
       // Only animate the _text label when touch down happens
-      if( e.TouchData.GetState(0) == PointStateType.DOWN )
+      if( e.Touch.GetState(0) == PointStateType.DOWN )
       {
         Console.WriteLine("Customized Stage Touch event handler");
         // Create a new _animation
index cd11e87..5b521b0 100755 (executable)
@@ -51,10 +51,10 @@ namespace MyCSharpExample
       Log("Initialize() is called!");
       Stage stage = Stage.GetCurrent();
       stage.BackgroundColor = Color.White;
-      stage.TouchEvent += OnStageTouched;
-      stage.TouchEvent += OnStageTouched2;
+      stage.Touch += OnStageTouched;
+      stage.Touch += OnStageTouched2;
       //stage.EventProcessingFinished += OnEventProcessingFinished;
-      stage.WheelEvent += OnStageWheelEvent;
+      stage.Wheel += OnStageWheelEvent;
 
       // Add a _text label to the stage
       _text = new TextLabel("Hello Mono World");
@@ -142,7 +142,7 @@ namespace MyCSharpExample
     public void OnStageTouched(object source, Stage.TouchEventArgs e)
     {
       // Only animate the _text label when touch down happens
-      if( e.TouchData.GetState(0) == PointStateType.DOWN )
+      if( e.Touch.GetState(0) == PointStateType.DOWN )
       {
         Log("OnStageTouched() is called! PointStateType.DOWN came!");
         myCount++;
@@ -157,7 +157,7 @@ namespace MyCSharpExample
     // Callback for stage touched signal handling
     public void OnStageTouched2(object source, Stage.TouchEventArgs e)
     {
-      Log("OnStageTouched2() is called!state="+ e.TouchData.GetState(0) );
+      Log("OnStageTouched2() is called!state="+ e.Touch.GetState(0) );
     }
 
     public void OnEventProcessingFinished(object source)
index 3354408..9bf6950 100644 (file)
@@ -649,15 +649,21 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_ViewWrapperImpl(int jarg1) {
 }
 
 
-SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_ViewWrapperImpl_New(void * jarg1) {
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_ViewWrapperImpl_New(char * jarg1, void * jarg2) {
   void * jresult ;
-  Dali::Toolkit::Internal::ControlWrapper *arg1 = (Dali::Toolkit::Internal::ControlWrapper *) 0 ;
+  std::string arg1 ;
+  Dali::Toolkit::Internal::ControlWrapper *arg2 = (Dali::Toolkit::Internal::ControlWrapper *) 0 ;
   Dali::Toolkit::ControlWrapper result;
 
-  arg1 = (Dali::Toolkit::Internal::ControlWrapper *)jarg1;
+  if (!jarg1) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
+    return 0;
+  }
+  (&arg1)->assign(jarg1);
+  arg2 = (Dali::Toolkit::Internal::ControlWrapper *)jarg2;
   {
     try {
-      result = Dali::Toolkit::Internal::ControlWrapper::New(arg1);
+      result = Dali::Toolkit::Internal::ControlWrapper::New(arg1,arg2);
     } catch (std::out_of_range& e) {
       {
         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
@@ -745,19 +751,25 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_GetControlWrapperImpl__SWIG_0(void * j
 }
 
 
-SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_ViewWrapper_New(void * jarg1) {
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_ViewWrapper_New(char * jarg1, void * jarg2) {
   void * jresult ;
-  Dali::Toolkit::Internal::ControlWrapper *arg1 = 0 ;
+  std::string arg1 ;
+  Dali::Toolkit::Internal::ControlWrapper *arg2 = 0 ;
   Dali::Toolkit::ControlWrapper result;
 
-  arg1 = (Dali::Toolkit::Internal::ControlWrapper *)jarg1;
-  if (!arg1) {
+  if (!jarg1) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
+    return 0;
+  }
+  (&arg1)->assign(jarg1);
+  arg2 = (Dali::Toolkit::Internal::ControlWrapper *)jarg2;
+  if (!arg2) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::Internal::ControlWrapper & type is null", 0);
     return 0;
   }
   {
     try {
-      result = Dali::Toolkit::ControlWrapper::New(*arg1);
+      result = Dali::Toolkit::ControlWrapper::New(arg1,*arg2);
     } catch (std::out_of_range& e) {
       {
         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
index 020fad0..9c54cdd 100644 (file)
@@ -19,7 +19,7 @@ namespace Dali
 {
     public class CustomView : ViewWrapper
     {
-        public CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour) : base(new ViewWrapperImpl(behaviour))
+        public CustomView(string typeName, ViewWrapperImpl.CustomViewBehaviour behaviour) : base(typeName, new ViewWrapperImpl(behaviour))
         {
             // Registering CustomView virtual functions to viewWrapperImpl delegates.
             viewWrapperImpl.OnStageConnection = new ViewWrapperImpl.OnStageConnectionDelegate(OnStageConnection);
@@ -29,10 +29,10 @@ namespace Dali
             viewWrapperImpl.OnPropertySet = new ViewWrapperImpl.OnPropertySetDelegate(OnPropertySet);
             viewWrapperImpl.OnSizeSet = new ViewWrapperImpl.OnSizeSetDelegate(OnSizeSet);
             viewWrapperImpl.OnSizeAnimation = new ViewWrapperImpl.OnSizeAnimationDelegate(OnSizeAnimation);
-            viewWrapperImpl.OnTouchEvent = new ViewWrapperImpl.OnTouchEventDelegate(OnTouchEvent);
+            viewWrapperImpl.OnTouch = new ViewWrapperImpl.OnTouchDelegate(OnTouch);
             viewWrapperImpl.OnHover = new ViewWrapperImpl.OnHoverDelegate(OnHover);
-            viewWrapperImpl.OnKeyEvent = new ViewWrapperImpl.OnKeyEventDelegate(OnKeyEvent);
-            viewWrapperImpl.OnWheelEvent = new ViewWrapperImpl.OnWheelEventDelegate(OnWheelEvent);
+            viewWrapperImpl.OnKey = new ViewWrapperImpl.OnKeyDelegate(OnKey);
+            viewWrapperImpl.OnWheel = new ViewWrapperImpl.OnWheelDelegate(OnWheel);
             viewWrapperImpl.OnRelayout = new ViewWrapperImpl.OnRelayoutDelegate(OnRelayout);
             viewWrapperImpl.OnSetResizePolicy = new ViewWrapperImpl.OnSetResizePolicyDelegate(OnSetResizePolicy);
             viewWrapperImpl.GetNaturalSize = new ViewWrapperImpl.GetNaturalSizeDelegate(GetNaturalSize);
@@ -89,7 +89,7 @@ namespace Dali
          * @endcode
          * @param[in]  type  The gesture type(s) to enable.
          */
-        public void EnableGestureDetection(Gesture.Type type)
+        public void EnableGestureDetection(Gesture.GestureType type)
         {
             viewWrapperImpl.EnableGestureDetection(type);
         }
@@ -101,7 +101,7 @@ namespace Dali
          * @param[in]  type  The gesture type(s) to disable.
          * @see EnableGetureDetection
          */
-        public void DisableGestureDetection(Gesture.Type type)
+        public void DisableGestureDetection(Gesture.GestureType type)
         {
             viewWrapperImpl.DisableGestureDetection(type);
         }
@@ -171,12 +171,12 @@ namespace Dali
         /**
          * @brief Called by the KeyInputFocusManager to emit key event signals.
          *
-         * @param[in] keyEvent The key event.
+         * @param[in] key The key event.
          * @return True if the event was consumed.
          */
-        public bool EmitKeyEventSignal(KeyEvent keyEvent)
+        public bool EmitKeyEventSignal(Key key)
         {
-            return viewWrapperImpl.EmitKeyEventSignal(keyEvent);
+            return viewWrapperImpl.EmitKeyEventSignal(key);
         }
 
         /**
@@ -457,11 +457,11 @@ namespace Dali
          *
          * @brief Called after a touch-event is received by the owning actor.
          *
-         * @param[in] event The touch event
+         * @param[in] touch The touch event
          * @return True if the event should be consumed.
          * @note CustomViewBehaviour.REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
          */
-        public virtual bool OnTouchEvent(TouchEvent touchEvent)
+        public virtual bool OnTouch(Touch touch)
         {
             return false; // Do not consume
         }
@@ -481,10 +481,10 @@ namespace Dali
         /**
          * @brief Called after a key-event is received by the actor that has had its focus set.
          *
-         * @param[in] event the Key Event
+         * @param[in] key the Key Event
          * @return True if the event should be consumed.
          */
-        public virtual bool OnKeyEvent(KeyEvent keyEvent)
+        public virtual bool OnKey(Key key)
         {
             return false; // Do not consume
         }
@@ -492,11 +492,11 @@ namespace Dali
         /**
          * @brief Called after a wheel-event is received by the owning actor.
          *
-         * @param[in] event The wheel event
+         * @param[in] wheel The wheel event
          * @return True if the event should be consumed.
          * @note CustomViewBehaviour.REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
          */
-        public virtual bool OnWheelEvent(WheelEvent wheelEvent)
+        public virtual bool OnWheel(Wheel wheel)
         {
             return false; // Do not consume
         }
@@ -657,10 +657,10 @@ namespace Dali
          * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
          * touch event.
          *
-         * @param[in] touchEvent The touch event.
+         * @param[in] touch The touch event.
          * @return true if the touch event has been consumed by this control
          */
-        public virtual bool OnAccessibilityTouch(TouchEvent touchEvent)
+        public virtual bool OnAccessibilityTouch(Touch touch)
         {
             return false;
         }
index 3433213..6d7f471 100755 (executable)
@@ -104,7 +104,7 @@ namespace Dali
         public static extern global::System.IntPtr new_ViewWrapperImpl(int jarg1);
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_ViewWrapperImpl_New")]
-        public static extern global::System.IntPtr ViewWrapperImpl_New(global::System.Runtime.InteropServices.HandleRef jarg1);
+        public static extern global::System.IntPtr ViewWrapperImpl_New(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_delete_ViewWrapperImpl")]
         public static extern void delete_ViewWrapperImpl(global::System.Runtime.InteropServices.HandleRef jarg1);
@@ -116,7 +116,7 @@ namespace Dali
         public static extern global::System.IntPtr GetControlWrapperImpl__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1);
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_ViewWrapper_New")]
-        public static extern global::System.IntPtr ViewWrapper_New(global::System.Runtime.InteropServices.HandleRef jarg1);
+        public static extern global::System.IntPtr ViewWrapper_New(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_new_ViewWrapper__SWIG_0")]
         public static extern global::System.IntPtr new_ViewWrapper__SWIG_0();
index 29ece3a..c2be678 100644 (file)
@@ -98,7 +98,7 @@ namespace Dali
   ///
   ///  static Spin()
   ///  {
-  ///     ViewRegistry.Instance.RegisterControl("Spin", CreateInstance, typeof(Spin) );
+  ///     ViewRegistry.Instance.Register(CreateInstance, typeof(Spin) );
   ///  }
   ///
   ///  The control should also provide a CreateInstance function, which gets passed to the ViewRegistry
@@ -293,17 +293,17 @@ namespace Dali
     /// {
     ///   ViewRegistry registers control type with DALi type registery
     ///   also uses introspection to find any properties that need to be registered with type registry
-    ///   ViewRegistry.Instance.Register("Spin", CreateInstance, typeof(Spin) );
+    ///   ViewRegistry.Instance.Register(CreateInstance, typeof(Spin) );
     /// }
     ///
     /// </summary>
-    public void Register(string viewName, Func< CustomView > createFunction, System.Type viewType )
+    public void Register(Func< CustomView > createFunction, System.Type viewType )
     {
       // add the mapping between the view name and it's create function
-      _constructorMap.Add (viewName, createFunction);
+      _constructorMap.Add (viewType.Name, createFunction);
 
       // Call into DALi C++ to register the control with the type registry
-      TypeRegistration.RegisterControl( viewName, _createCallback );
+      TypeRegistration.RegisterControl( viewType.Name, _createCallback );
 
       // Cycle through each property in the class
       foreach (System.Reflection.PropertyInfo propertyInfo in viewType.GetProperties())
@@ -324,14 +324,14 @@ namespace Dali
               ScriptableProperty scriptableProp = attr as ScriptableProperty;
 
               // we get the start property index, based on the type and it's heirachy, e.g. DateView (70,000)-> Spin (60,000) -> View (50,000)
-              int propertyIndex =  _propertyRangeManager.GetPropertyIndex( viewName, viewType, scriptableProp.type );
+              int propertyIndex =  _propertyRangeManager.GetPropertyIndex( viewType.Name, viewType, scriptableProp.type );
 
               // get the enum for the property type... E.g. registering a string property returns Dali.PropertyType.String
               Dali.Property.Type propertyType = GetDaliPropertyType( propertyInfo.PropertyType.Name );
 
               // Example   RegisterProperty("spin","maxValue", 50001, FLOAT, set, get );
               // Native call to register the property
-              TypeRegistration.RegisterProperty (viewName, propertyInfo.Name , propertyIndex, propertyType, _setPropertyCallback, _getPropertyCallback);
+              TypeRegistration.RegisterProperty (viewType.Name, propertyInfo.Name , propertyIndex, propertyType, _setPropertyCallback, _getPropertyCallback);
             }
           }
           // Console.WriteLine ("property name = " + propertyInfo.Name);
index 76281fa..f0660b1 100644 (file)
@@ -55,7 +55,7 @@ namespace Dali
             }
         }
 
-        public ViewWrapper (ViewWrapperImpl implementation) : this (NDalicManualPINVOKE.ViewWrapper_New(ViewWrapperImpl.getCPtr(implementation)), true)
+        public ViewWrapper (string typeName, ViewWrapperImpl implementation) : this (NDalicManualPINVOKE.ViewWrapper_New(typeName, ViewWrapperImpl.getCPtr(implementation)), true)
         {
             viewWrapperImpl = implementation;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
index 97e9cd3..0f42e4e 100644 (file)
@@ -27,10 +27,10 @@ namespace Dali
         public delegate void OnPropertySetDelegate(int index, Property.Value propertyValue);
         public delegate void OnSizeSetDelegate(Vector3 targetSize);
         public delegate void OnSizeAnimationDelegate(Animation animation, Vector3 targetSize);
-        public delegate bool OnTouchEventDelegate(TouchEvent touchEvent);
+        public delegate bool OnTouchDelegate(Touch touch);
         public delegate bool OnHoverDelegate(Hover hover);
-        public delegate bool OnKeyEventDelegate(KeyEvent keyEvent);
-        public delegate bool OnWheelEventDelegate(WheelEvent wheelEvent);
+        public delegate bool OnKeyDelegate(Key key);
+        public delegate bool OnWheelDelegate(Wheel wheel);
         public delegate void OnRelayoutDelegate(Vector2 size, RelayoutContainer container);
         public delegate void OnSetResizePolicyDelegate(ResizePolicyType policy, DimensionType dimension);
         public delegate Vector3 GetNaturalSizeDelegate();
@@ -46,7 +46,7 @@ namespace Dali
         public delegate void OnStyleChangeDelegate(StyleManager styleManager, StyleChangeType change);
         public delegate bool OnAccessibilityActivatedDelegate();
         public delegate bool OnAccessibilityPanDelegate(PanGesture gestures);
-        public delegate bool OnAccessibilityTouchDelegate(TouchEvent touchEvent);
+        public delegate bool OnAccessibilityTouchDelegate(Touch touch);
         public delegate bool OnAccessibilityValueChangeDelegate(bool isIncrease);
         public delegate bool OnAccessibilityZoomDelegate();
         public delegate void OnKeyInputFocusGainedDelegate();
@@ -68,10 +68,10 @@ namespace Dali
         public OnPropertySetDelegate OnPropertySet;
         public OnSizeSetDelegate OnSizeSet;
         public OnSizeAnimationDelegate OnSizeAnimation;
-        public OnTouchEventDelegate OnTouchEvent;
+        public OnTouchDelegate OnTouch;
         public OnHoverDelegate OnHover;
-        public OnKeyEventDelegate OnKeyEvent;
-        public OnWheelEventDelegate OnWheelEvent;
+        public OnKeyDelegate OnKey;
+        public OnWheelDelegate OnWheel;
         public OnRelayoutDelegate OnRelayout;
         public OnSetResizePolicyDelegate OnSetResizePolicy;
         public GetNaturalSizeDelegate GetNaturalSize;
@@ -141,9 +141,9 @@ namespace Dali
             DirectorConnect();
         }
 
-        public static ViewWrapper New(ViewWrapperImpl viewWrapper)
+        public static ViewWrapper New(string typeName, ViewWrapperImpl viewWrapper)
         {
-            ViewWrapper ret = new ViewWrapper(NDalicManualPINVOKE.ViewWrapperImpl_New(ViewWrapperImpl.getCPtr(viewWrapper)), true);
+            ViewWrapper ret = new ViewWrapper(NDalicManualPINVOKE.ViewWrapperImpl_New(typeName, ViewWrapperImpl.getCPtr(viewWrapper)), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -255,10 +255,10 @@ namespace Dali
             Delegate4 = new DelegateViewWrapperImpl_4(DirectorOnPropertySet);
             Delegate5 = new DelegateViewWrapperImpl_5(DirectorOnSizeSet);
             Delegate6 = new DelegateViewWrapperImpl_6(DirectorOnSizeAnimation);
-            Delegate7 = new DelegateViewWrapperImpl_7(DirectorOnTouchEvent);
+            Delegate7 = new DelegateViewWrapperImpl_7(DirectorOnTouch);
             Delegate8 = new DelegateViewWrapperImpl_8(DirectorOnHover);
-            Delegate9 = new DelegateViewWrapperImpl_9(DirectorOnKeyEvent);
-            Delegate10 = new DelegateViewWrapperImpl_10(DirectorOnWheelEvent);
+            Delegate9 = new DelegateViewWrapperImpl_9(DirectorOnKey);
+            Delegate10 = new DelegateViewWrapperImpl_10(DirectorOnWheel);
             Delegate11 = new DelegateViewWrapperImpl_11(DirectorOnRelayout);
             Delegate12 = new DelegateViewWrapperImpl_12(DirectorOnSetResizePolicy);
             Delegate13 = new DelegateViewWrapperImpl_13(DirectorGetNaturalSize);
@@ -325,9 +325,9 @@ namespace Dali
             OnSizeAnimation(new Animation(animation, false), new Vector3(targetSize, false));
         }
 
-        private bool DirectorOnTouchEvent(global::System.IntPtr arg0)
+        private bool DirectorOnTouch(global::System.IntPtr arg0)
         {
-            return OnTouchEvent(new TouchEvent(arg0, false));
+            return OnTouch(new Touch(arg0, false));
         }
 
         private bool DirectorOnHover(global::System.IntPtr arg0)
@@ -335,14 +335,14 @@ namespace Dali
             return OnHover(new Hover(arg0, false));
         }
 
-        private bool DirectorOnKeyEvent(global::System.IntPtr arg0)
+        private bool DirectorOnKey(global::System.IntPtr arg0)
         {
-            return OnKeyEvent(new KeyEvent(arg0, false));
+            return OnKey(new Key(arg0, false));
         }
 
-        private bool DirectorOnWheelEvent(global::System.IntPtr arg0)
+        private bool DirectorOnWheel(global::System.IntPtr arg0)
         {
-            return OnWheelEvent(new WheelEvent(arg0, false));
+            return OnWheel(new Wheel(arg0, false));
         }
 
         private void DirectorOnRelayout(global::System.IntPtr size, global::System.IntPtr container)
@@ -424,9 +424,9 @@ namespace Dali
             return OnAccessibilityPan(new PanGesture(gesture, false));
         }
 
-        private bool DirectorOnAccessibilityTouch(global::System.IntPtr touchEvent)
+        private bool DirectorOnAccessibilityTouch(global::System.IntPtr touch)
         {
-            return OnAccessibilityTouch(new TouchEvent(touchEvent, false));
+            return OnAccessibilityTouch(new Touch(touch, false));
         }
 
         private bool DirectorOnAccessibilityValueChange(bool isIncrease)
@@ -521,7 +521,7 @@ namespace Dali
         public delegate void DelegateViewWrapperImpl_24(global::System.IntPtr styleManager, int change);
         public delegate bool DelegateViewWrapperImpl_25();
         public delegate bool DelegateViewWrapperImpl_26(global::System.IntPtr gesture);
-        public delegate bool DelegateViewWrapperImpl_27(global::System.IntPtr touchEvent);
+        public delegate bool DelegateViewWrapperImpl_27(global::System.IntPtr touch);
         public delegate bool DelegateViewWrapperImpl_28(bool isIncrease);
         public delegate bool DelegateViewWrapperImpl_29();
         public delegate void DelegateViewWrapperImpl_30();
index 06a0210..f31a49d 100644 (file)
@@ -52,9 +52,10 @@ public class Spin : CustomView
     {
       // ViewRegistry registers control type with DALi type registery
       // also uses introspection to find any properties that need to be registered with type registry
-      ViewRegistry.Instance.Register("Spin", CreateInstance, typeof(Spin) );
+      ViewRegistry.Instance.Register(CreateInstance, typeof(Spin) );
     }
-    public Spin() : base(ViewWrapperImpl.CustomViewBehaviour.REQUIRES_KEYBOARD_NAVIGATION_SUPPORT | ViewWrapperImpl.CustomViewBehaviour.DISABLE_STYLE_CHANGE_SIGNALS)
+
+    public Spin() : base(typeof(Spin).Name, ViewWrapperImpl.CustomViewBehaviour.REQUIRES_KEYBOARD_NAVIGATION_SUPPORT | ViewWrapperImpl.CustomViewBehaviour.DISABLE_STYLE_CHANGE_SIGNALS)
     {
 
     }