[dali_2.0.49] Merge branch 'devel/master' 89/265589/1
authorAdam Bialogonski <adam.b@samsung.com>
Fri, 22 Oct 2021 10:26:12 +0000 (11:26 +0100)
committerAdam Bialogonski <adam.b@samsung.com>
Fri, 22 Oct 2021 10:26:12 +0000 (11:26 +0100)
Change-Id: I3f93a425666e6374ae568e2868ffebcce42d875d

dali-csharp-binder/file.list
dali-csharp-binder/src/devel-property-wrap.cpp
dali-csharp-binder/src/gl-view-wrap.cpp [new file with mode: 0644]
dali-csharp-binder/src/visual-actions-wrap.cpp [new file with mode: 0644]
packaging/dali-csharp-binder.spec

index 1063b4b..ff958b5 100755 (executable)
@@ -18,6 +18,7 @@ dali_csharp_binder_common_src_files = \
   ${dali_csharp_binder_dir}/src/flex-layout-wrap.cpp \
   ${dali_csharp_binder_dir}/src/gestures-wrap.cpp \
   ${dali_csharp_binder_dir}/src/view-wrapper-impl-wrap.cpp \
+  ${dali_csharp_binder_dir}/src/visual-actions-wrap.cpp \
   ${dali_csharp_binder_dir}/src/event-thread-callback-wrap.cpp \
   ${dali_csharp_binder_dir}/src/application-wrap.cpp \
   ${dali_csharp_binder_dir}/src/text-editor-wrap.cpp \
@@ -40,6 +41,7 @@ dali_csharp_binder_common_src_files = \
   ${dali_csharp_binder_dir}/src/capabilities-wrap.cpp \
   ${dali_csharp_binder_dir}/src/capture-wrap.cpp \
   ${dali_csharp_binder_dir}/src/gl-window-wrap.cpp \
+  ${dali_csharp_binder_dir}/src/gl-view-wrap.cpp \
   ${dali_csharp_binder_dir}/src/web-view-wrap.cpp \
   ${dali_csharp_binder_dir}/src/control-devel-wrap.cpp \
   ${dali_csharp_binder_dir}/src/signal-wrap.cpp \
index c921e66..43af94c 100755 (executable)
@@ -23,8 +23,6 @@
 #include <dali-toolkit/devel-api/controls/text-controls/text-field-devel.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
-#include <dali-toolkit/devel-api/visuals/animated-image-visual-actions-devel.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-actions-devel.h>
 #include <dali-toolkit/public-api/controls/text-controls/hidden-input-properties.h>
 #include <dali-toolkit/public-api/visuals/visual-properties.h>
 #include <dali/devel-api/actors/actor-devel.h>
@@ -563,22 +561,6 @@ SWIGEXPORT int SWIGSTDCALL CSharp_TextField_Property_ELLIPSIS_POSITION_get() {
   return jresult;
 }
 
-SWIGEXPORT int SWIGSTDCALL CSharp_ImageView_IMAGE_VISUAL_ACTION_RELOAD_get() {
-  return (int)Dali::Toolkit::DevelImageVisual::Action::RELOAD;
-}
-
-SWIGEXPORT int SWIGSTDCALL CSharp_ImageView_IMAGE_VISUAL_ACTION_PLAY_get() {
-  return (int)Dali::Toolkit::DevelAnimatedImageVisual::Action::PLAY;
-}
-
-SWIGEXPORT int SWIGSTDCALL CSharp_ImageView_IMAGE_VISUAL_ACTION_PAUSE_get() {
-  return (int)Dali::Toolkit::DevelAnimatedImageVisual::Action::PAUSE;
-}
-
-SWIGEXPORT int SWIGSTDCALL CSharp_ImageView_IMAGE_VISUAL_ACTION_STOP_get() {
-  return (int)Dali::Toolkit::DevelAnimatedImageVisual::Action::STOP;
-}
-
 SWIGEXPORT unsigned int SWIGSTDCALL
 CSharp_Dali_VisualEventSignal_Empty(void *jarg1) {
   unsigned int jresult;
diff --git a/dali-csharp-binder/src/gl-view-wrap.cpp b/dali-csharp-binder/src/gl-view-wrap.cpp
new file mode 100644 (file)
index 0000000..c1ddc32
--- /dev/null
@@ -0,0 +1,245 @@
+/** Copyright (c) 2021 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.
+* 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.
+*
+*/
+
+#include "common.h"
+#include <dali-toolkit/public-api/controls/gl-view/gl-view.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+  /*GlView binding*/
+  SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_GlView_New_SWIG(int nuiColorFormat)
+  {
+    void *jresult;
+    Dali::Toolkit::GlView result;
+
+    Dali::Toolkit::GlView::ColorFormat colorFormat;
+
+    colorFormat = static_cast<Dali::Toolkit::GlView::ColorFormat>(nuiColorFormat);
+    {
+      try
+      {
+
+        result = Dali::Toolkit::GlView::New(colorFormat);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    jresult = new Dali::Toolkit::GlView((const Dali::Toolkit::GlView &)result);
+    return jresult;
+  }
+
+  SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_GlView_SWIG_0()
+  {
+    void *jresult;
+    Dali::Toolkit::GlView *result = nullptr;
+
+    {
+      try
+      {
+        result = (Dali::Toolkit::GlView *)new Dali::Toolkit::GlView();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    jresult = (void *)result;
+    return jresult;
+  }
+
+  SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_GlView_SWIG_1(void *nuiGlView)
+  {
+    void *jresult;
+    Dali::Toolkit::GlView *glView = nullptr;
+    Dali::Toolkit::GlView *result = nullptr;
+
+    glView = (Dali::Toolkit::GlView *)nuiGlView;
+    if (!glView)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::GlView const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = (Dali::Toolkit::GlView *)new Dali::Toolkit::GlView((Dali::Toolkit::GlView const &)*glView);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    jresult = (void *)result;
+    return jresult;
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_GlView(void *nuiGlView)
+  {
+    Dali::Toolkit::GlView *glView = nullptr;
+
+    glView = (Dali::Toolkit::GlView *)nuiGlView;
+    {
+      try
+      {
+        delete glView;
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_GlView_Assign(void *nuiGlView1, void *nuiGlView2)
+  {
+    void *jresult;
+    Dali::Toolkit::GlView *glView1 = nullptr;
+    Dali::Toolkit::GlView *glView2 = nullptr;
+    Dali::Toolkit::GlView *result = nullptr;
+
+    glView1 = (Dali::Toolkit::GlView *)nuiGlView1;
+    glView2 = (Dali::Toolkit::GlView *)nuiGlView2;
+    if (!glView2)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::GlView const & type is null", 0);
+      return 0;
+    }
+    {
+      try
+      {
+        result = (Dali::Toolkit::GlView *)&(glView1)->operator=((Dali::Toolkit::GlView const &)*glView2);
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    jresult = (void *)result;
+    return jresult;
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_GlView_SetGraphicsConfig(void *nuiGlView, bool nuiDepth, bool nuiStencil, int nuiMsaa, int nuiVersion)
+  {
+    Dali::Toolkit::GlView *glView = nullptr;
+    Dali::Toolkit::GlView::GraphicsApiVersion version;
+
+    glView = (Dali::Toolkit::GlView *)nuiGlView;
+    version = static_cast<Dali::Toolkit::GlView::GraphicsApiVersion>(nuiVersion);
+    {
+      try
+      {
+        (glView)->SetGraphicsConfig(nuiDepth, nuiStencil, nuiMsaa, version);
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_GlView_RegisterGlCallbacks(void *nuiGlView, void *nuiInitCB, int *nuiRenderFrameCB, void *nuiTerminateCB)
+  {
+    Dali::Toolkit::GlView *glView = (Dali::Toolkit::GlView *)nuiGlView;
+    void (*initCB)() = (void (*)())nuiInitCB;
+    int (*renderFrameCB)() = (int (*)())nuiRenderFrameCB;
+    void (*terminateCB)() = (void (*)())nuiTerminateCB;
+
+    if (!glView || !initCB || !renderFrameCB || !terminateCB)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null", 0);
+      return;
+    }
+    try
+    {
+      glView->RegisterGlCallbacks(Dali::MakeCallback(initCB), Dali::MakeCallback(renderFrameCB), Dali::MakeCallback(terminateCB));
+    }
+    CALL_CATCH_EXCEPTION();
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_GlView_SetResizeCallback(void *nuiGlView, void *nuiResizeCB)
+  {
+    Dali::Toolkit::GlView *glView = (Dali::Toolkit::GlView *)nuiGlView;
+    void (*resizeCB)(int, int) = (void (*)(int, int))nuiResizeCB;
+
+    if (!glView || !resizeCB)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null", 0);
+      return;
+    }
+    try
+    {
+      glView->SetResizeCallback(Dali::MakeCallback(resizeCB));
+    }
+    CALL_CATCH_EXCEPTION();
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_GlView_RenderOnce(void *nuiGlView)
+  {
+    Dali::Toolkit::GlView *glView = (Dali::Toolkit::GlView *)nuiGlView;
+    if (!glView)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::GlView", 0);
+      return;
+    }
+    {
+      try
+      {
+        glView->RenderOnce();
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+  SWIGEXPORT int SWIGSTDCALL CSharp_Dali_GlView_GetRenderingMode(void *nuiGlView)
+  {
+    int jresult;
+    Dali::Toolkit::GlView *glView = nullptr;
+    Dali::Toolkit::GlView::RenderingMode result;
+
+    glView = (Dali::Toolkit::GlView *)nuiGlView;
+    if (!glView)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::GlView", 0);
+      return 0;
+    }
+
+    {
+      try
+      {
+        result = (Dali::Toolkit::GlView::RenderingMode)(glView)->GetRenderingMode();
+      }
+      CALL_CATCH_EXCEPTION(0);
+    }
+
+    jresult = (int)result;
+    return jresult;
+  }
+
+  SWIGEXPORT void SWIGSTDCALL CSharp_Dali_GlView_SetRenderingMode(void *nuiGlView, int nuiRenderingMode)
+  {
+    Dali::Toolkit::GlView *glView = nullptr;
+    Dali::Toolkit::GlView::RenderingMode renderingMode;
+
+    glView = (Dali::Toolkit::GlView *)nuiGlView;
+    if (!glView)
+    {
+      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::GlView", 0);
+      return;
+    }
+    renderingMode = (Dali::Toolkit::GlView::RenderingMode)nuiRenderingMode;
+    {
+      try
+      {
+        (glView)->SetRenderingMode(renderingMode);
+      }
+      CALL_CATCH_EXCEPTION();
+    }
+  }
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/dali-csharp-binder/src/visual-actions-wrap.cpp b/dali-csharp-binder/src/visual-actions-wrap.cpp
new file mode 100644 (file)
index 0000000..fbefbae
--- /dev/null
@@ -0,0 +1,84 @@
+/** Copyright (c) 2021 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.
+* 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.
+*
+*/
+#include <string.h>
+#include "common.h"
+
+#include <dali-toolkit/devel-api/visuals/visual-actions-devel.h>
+#include <dali-toolkit/devel-api/visuals/image-visual-actions-devel.h>
+#include <dali-toolkit/devel-api/visuals/animated-image-visual-actions-devel.h>
+#include <dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+  // Visual common action
+  SWIGEXPORT int SWIGSTDCALL CSharp_Visual_Actions_UPDATE_PROPERTY_get()
+  {
+    return (int)Dali::Toolkit::DevelVisual::Action::UPDATE_PROPERTY;
+  }
+
+  // Image Visual action
+  SWIGEXPORT int SWIGSTDCALL CSharp_ImageVisual_Actions_RELOAD_get()
+  {
+    return (int)Dali::Toolkit::DevelImageVisual::Action::RELOAD;
+  }
+
+  // Animated Image Visual action
+  SWIGEXPORT int SWIGSTDCALL CSharp_AnimatedImageVisual_Actions_PLAY_get()
+  {
+    return (int)Dali::Toolkit::DevelAnimatedImageVisual::Action::PLAY;
+  }
+
+  SWIGEXPORT int SWIGSTDCALL CSharp_AnimatedImageVisual_Actions_PAUSE_get()
+  {
+    return (int)Dali::Toolkit::DevelAnimatedImageVisual::Action::PAUSE;
+  }
+
+  SWIGEXPORT int SWIGSTDCALL CSharp_AnimatedImageVisual_Actions_STOP_get()
+  {
+    return (int)Dali::Toolkit::DevelAnimatedImageVisual::Action::STOP;
+  }
+
+  SWIGEXPORT int SWIGSTDCALL CSharp_AnimatedImageVisual_Actions_JUMP_TO_get()
+  {
+    return (int)Dali::Toolkit::DevelAnimatedImageVisual::Action::JUMP_TO;
+  }
+
+  // Animated Vector Image Visual action
+  SWIGEXPORT int SWIGSTDCALL CSharp_AnimatedVectorImageVisual_Actions_PLAY_get()
+  {
+    return (int)Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY;
+  }
+
+  SWIGEXPORT int SWIGSTDCALL CSharp_AnimatedVectorImageVisual_Actions_PAUSE_get()
+  {
+    return (int)Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PAUSE;
+  }
+
+  SWIGEXPORT int SWIGSTDCALL CSharp_AnimatedVectorImageVisual_Actions_STOP_get()
+  {
+    return (int)Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::STOP;
+  }
+
+  SWIGEXPORT int SWIGSTDCALL CSharp_AnimatedVectorImageVisual_Actions_JUMP_TO_get()
+  {
+    return (int)Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::JUMP_TO;
+  }
+#ifdef __cplusplus
+}
+#endif
index 501a9b5..2aedafe 100644 (file)
@@ -21,7 +21,7 @@
 
 Name: dali2-csharp-binder
 Summary: The DALI Csharp Binder
-Version: 2.0.48
+Version: 2.0.49
 Release: 1
 Group: uifw/graphic
 License: Apache-2.0 and BSD-3-Clause and MIT