Manual binding for C# Actor APIs e.g. RaiseToTop, LowerBelow, etc.
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / SWIG / dali.i
index 4a612e9..1cd7ef8 100755 (executable)
@@ -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.
 #include <dali/dali.h>
 #include <dali-toolkit/dali-toolkit.h>
 
+#include <dali/devel-api/actors/actor-devel.h>
+
 #include <dali/public-api/math/matrix.h>
 #include <dali/public-api/math/matrix3.h>
 #include <dali/public-api/math/viewport.h>
 #include <dali/public-api/object/property-key.h>
+#include <dali/devel-api/object/csharp-type-info.h>
+#include <dali/devel-api/object/csharp-type-registry.h>
 
 #include <dali/public-api/adaptor-framework/timer.h>
 #include <dali/public-api/adaptor-framework/window.h>
@@ -73,6 +77,7 @@
 #include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
 #include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h>
 #include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h>
+#include <dali-toolkit/devel-api/controls/buttons/toggle-button.h>
 
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
@@ -80,6 +85,8 @@
 
 #include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 
+#include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
+
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-view-declarations.h>
 
 // add here SWIG version check
   return $null;
 %}
 
+
+
+
+// Type registry type maps
+%typemap(cstype) Dali::TypeInfo::CreateFunction "System.Delegate"
+%typemap(csin, pre ="System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate($csinput); ")
+  Dali::TypeInfo::CreateFunction "new System.Runtime.InteropServices.HandleRef(null, ip)" // null was this
+
+%typemap(cstype) Dali::CSharpTypeInfo::CreateFunction "System.Delegate"
+%typemap(csin, pre ="System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate($csinput); ")
+   Dali::CSharpTypeInfo::CreateFunction "new System.Runtime.InteropServices.HandleRef(null, ip)" // null was this
+
+
+
+%typemap(cstype) Dali::CSharpTypeInfo::SetPropertyFunction "System.Delegate"
+%typemap(csin, pre ="System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate($csinput); ")
+   Dali::CSharpTypeInfo::SetPropertyFunction "new System.Runtime.InteropServices.HandleRef(null, ip)" // null was this
+
+
+
+%typemap(cstype) Dali::CSharpTypeInfo::GetPropertyFunction "System.Delegate"
+%typemap(csin, pre ="System.IntPtr ip2 = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate($csinput); ")
+   Dali::CSharpTypeInfo::GetPropertyFunction "new System.Runtime.InteropServices.HandleRef(null, ip2)" // null was this
+
+
+
+
+
+
+
 #endif
 
+
+
+/**
+ * Extend the type registry to allow for registering of C# controls and custom properties
+ */
+%extend Dali::TypeRegistration {
+
+
+   static void RegisterControl( const std::string& controlName, Dali::CSharpTypeInfo::CreateFunction createFunc )
+   {
+     Dali::CSharpTypeRegistry::RegisterType( controlName, typeid( Dali::Toolkit::Control), createFunc );
+   };
+
+
+   static void RegisterProperty( const std::string& controlName,
+                    const std::string& propertyName,
+                    int index,
+                    Property::Type type,
+                    Dali::CSharpTypeInfo::SetPropertyFunction setFunc,
+                    Dali::CSharpTypeInfo::GetPropertyFunction getFunc )
+   {
+     Dali::CSharpTypeRegistry::RegisterProperty( controlName, propertyName, index, type, setFunc, getFunc );
+   };
+
+};
+
+
 %ignore operator<<;
 %ignore *::GetImplementation();
 %ignore *::GetImplementation(Dali::BaseHandle&);
@@ -186,6 +250,8 @@ using namespace Dali::Toolkit;
 %include signal-parameters.i
 %include signals.i
 
+%include doxygen.i
+
 %include events/actor-event.i
 %include events/accessibilitymanager-event.i
 %include events/application-event.i
@@ -196,15 +262,16 @@ using namespace Dali::Toolkit;
 %include events/gaussian-blur-view-event.i
 %include events/image-event.i
 %include events/itemview-event.i
-%include events/keyboardFocusManager-event.i
 %include events/objectregistry-event.i
 %include events/popup-event.i
 %include events/pinchgesture-event.i
 %include events/pageturnview-event.i
 %include events/pangesture-event.i
+%include events/progress-bar-event.i
 %include events/propertynotification-event.i
 %include events/longpressgesture-event.i
-%include events/rectinteger.i
+%include events/rectangle.i
+%include events/padding.i
 %include events/resourceimage-event.i
 %include events/scrollable-event.i
 %include events/scrollbar-event.i
@@ -219,8 +286,22 @@ using namespace Dali::Toolkit;
 %include events/videoview-event.i
 
 %include alphafunction.i
-
+%include rotation.i
+%include name-changed.i
+%include property-value.i
 %include dali-operator.i
+%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
 %include dali-toolkit.i