--- /dev/null
+/** 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
--- /dev/null
+/** 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