From 5163bc1f301bb8dc0e242b920b30b6430ad9244e Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Wed, 22 Mar 2017 14:21:26 +0000 Subject: [PATCH 1/1] Added C# bindings for Window Show/Hide Change-Id: I9cc844591a0ab7316b96b4abe9ea5d443d7947aa --- plugins/dali-swig/SWIG/adaptor/window.i | 36 +++++++++++++++++++++++++++++++++ plugins/dali-swig/SWIG/dali-adaptor.i | 3 ++- plugins/dali-swig/SWIG/dali.i | 4 +++- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100755 plugins/dali-swig/SWIG/adaptor/window.i diff --git a/plugins/dali-swig/SWIG/adaptor/window.i b/plugins/dali-swig/SWIG/adaptor/window.i new file mode 100755 index 0000000..5870e36 --- /dev/null +++ b/plugins/dali-swig/SWIG/adaptor/window.i @@ -0,0 +1,36 @@ +/* + * 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. + * 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. + * + */ + +%typemap(cscode) Dali::Window %{ + public void Show() + { + NDalicPINVOKE.Show(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void Hide() + { + NDalicPINVOKE.Hide(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public void IsVisible() + { + NDalicPINVOKE.IsVisible(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } +%} diff --git a/plugins/dali-swig/SWIG/dali-adaptor.i b/plugins/dali-swig/SWIG/dali-adaptor.i index 3ce308e..5834e10 100755 --- a/plugins/dali-swig/SWIG/dali-adaptor.i +++ b/plugins/dali-swig/SWIG/dali-adaptor.i @@ -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. @@ -27,6 +27,7 @@ %include %include %include +%include #if defined(SWIGCSHARP) diff --git a/plugins/dali-swig/SWIG/dali.i b/plugins/dali-swig/SWIG/dali.i index 1cd7ef8..861bc43 100755 --- a/plugins/dali-swig/SWIG/dali.i +++ b/plugins/dali-swig/SWIG/dali.i @@ -63,6 +63,7 @@ #include #include #include +#include #include @@ -302,7 +303,8 @@ using namespace Dali::Toolkit; %include gestures/touch.i %include gestures/key.i +%include adaptor/window.i + %include dali-core.i %include dali-adaptor.i %include dali-toolkit.i - -- 2.7.4