2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 %define GAUSSIAN_BLURR_VIEW_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
19 %typemap(csimports) NameSpace::ClassName %{
21 using System.Runtime.InteropServices;
27 %define GAUSSIAN_BLURR_VIEW_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
28 %typemap(cscode) NameSpace::ClassName %{
31 public class FinishedEventArgs : EventArgs
33 private GaussianBlurView _gaussianBlurView;
35 public GaussianBlurView GaussianBlurView
39 return _gaussianBlurView;
43 _gaussianBlurView = value;
48 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
49 private delegate void FinishedEventCallbackDelegate(IntPtr application);
50 private DaliEventHandler<object,FinishedEventArgs> _gaussianFinishedEventHandler;
51 private FinishedEventCallbackDelegate _gaussianFinishedEventCallbackDelegate;
53 public event DaliEventHandler<object,FinishedEventArgs> Finished
59 // Restricted to only one listener
60 if (_gaussianFinishedEventHandler == null)
62 _gaussianFinishedEventHandler += value;
64 _gaussianFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished);
65 this.FinishedSignal().Connect(_gaussianFinishedEventCallbackDelegate);
74 if (_gaussianFinishedEventHandler != null)
76 this.FinishedSignal().Disconnect(_gaussianFinishedEventCallbackDelegate);
79 _gaussianFinishedEventHandler -= value;
84 // Callback for GaussianBlurView FinishedSignal
85 private void OnFinished(IntPtr data)
87 FinishedEventArgs e = new FinishedEventArgs();
89 // Populate all members of "e" (FinishedEventArgs) with real data
90 e.GaussianBlurView = GaussianBlurView.GetGaussianBlurViewFromPtr(data);
92 if (_gaussianFinishedEventHandler != null)
94 //here we send all data to user event handlers
95 _gaussianFinishedEventHandler(this, e);
99 public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
100 ClassName ret = new ClassName(cPtr, false);
101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 %define DALI_GAUSSIAN_BLURR_VIEW_EVENTHANDLER_PARAM( NameSpace, ClassName)
109 GAUSSIAN_BLURR_VIEW_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
110 GAUSSIAN_BLURR_VIEW_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
115 DALI_GAUSSIAN_BLURR_VIEW_EVENTHANDLER_PARAM( Dali::Toolkit, GaussianBlurView);