Merge "This patch is for refining dali application to support tizen c# application...
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / automatic / csharp / GaussianBlurView.cs
1 /** Copyright (c) 2016 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.9
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali {
28
29 using System;
30 using System.Runtime.InteropServices;
31
32
33 public class GaussianBlurView : View {
34   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
35
36   internal GaussianBlurView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.GaussianBlurView_SWIGUpcast(cPtr), cMemoryOwn) {
37     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
38   }
39
40   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GaussianBlurView obj) {
41     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42   }
43
44   ~GaussianBlurView() {
45     Dispose();
46   }
47
48   public override void Dispose() {
49     lock(this) {
50       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
51         if (swigCMemOwn) {
52           swigCMemOwn = false;
53           NDalicPINVOKE.delete_GaussianBlurView(swigCPtr);
54         }
55         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56       }
57       global::System.GC.SuppressFinalize(this);
58       base.Dispose();
59     }
60   }
61
62
63
64 public class FinishedEventArgs : EventArgs
65 {
66    private GaussianBlurView _gaussianBlurView;
67
68    public GaussianBlurView GaussianBlurView
69    {
70       get
71       {
72          return _gaussianBlurView;
73       }
74       set
75       {
76          _gaussianBlurView = value;
77       }
78    }
79 }
80
81   [UnmanagedFunctionPointer(CallingConvention.StdCall)]
82   private delegate void FinishedEventCallbackDelegate(IntPtr application);
83   private DaliEventHandler<object,FinishedEventArgs> _gaussianFinishedEventHandler;
84   private FinishedEventCallbackDelegate _gaussianFinishedEventCallbackDelegate;
85
86   public event DaliEventHandler<object,FinishedEventArgs> Finished
87   {
88      add
89      {
90         lock(this)
91         {
92            // Restricted to only one listener
93            if (_gaussianFinishedEventHandler == null)
94            {
95               _gaussianFinishedEventHandler += value;
96
97               _gaussianFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished);
98               this.FinishedSignal().Connect(_gaussianFinishedEventCallbackDelegate);
99            }
100         }
101      }
102
103      remove
104      {
105         lock(this)
106         {
107            if (_gaussianFinishedEventHandler != null)
108            {
109               this.FinishedSignal().Disconnect(_gaussianFinishedEventCallbackDelegate);
110            }
111
112            _gaussianFinishedEventHandler -= value;
113         }
114      }
115   }
116
117   // Callback for GaussianBlurView FinishedSignal
118   private void OnFinished(IntPtr data)
119   {
120      FinishedEventArgs e = new FinishedEventArgs();
121
122      // Populate all members of "e" (FinishedEventArgs) with real data
123      e.GaussianBlurView = GaussianBlurView.GetGaussianBlurViewFromPtr(data);
124
125      if (_gaussianFinishedEventHandler != null)
126      {
127         //here we send all data to user event handlers
128         _gaussianFinishedEventHandler(this, e);
129      }
130   }
131
132  public static GaussianBlurView GetGaussianBlurViewFromPtr(global::System.IntPtr cPtr) {
133     GaussianBlurView ret = new GaussianBlurView(cPtr, false);
134    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135     return ret;
136   }
137
138
139   public GaussianBlurView () : this (NDalicPINVOKE.GaussianBlurView_New__SWIG_0(), true) {
140       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141
142   }
143   public GaussianBlurView (uint numSamples, float blurBellCurveWidth, PixelFormat renderTargetPixelFormat, float downsampleWidthScale, float downsampleHeightScale, bool blurUserImage) : this (NDalicPINVOKE.GaussianBlurView_New__SWIG_1(numSamples, blurBellCurveWidth, (int)renderTargetPixelFormat, downsampleWidthScale, downsampleHeightScale, blurUserImage), true) {
144       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145
146   }
147   public GaussianBlurView (uint numSamples, float blurBellCurveWidth, PixelFormat renderTargetPixelFormat, float downsampleWidthScale, float downsampleHeightScale) : this (NDalicPINVOKE.GaussianBlurView_New__SWIG_2(numSamples, blurBellCurveWidth, (int)renderTargetPixelFormat, downsampleWidthScale, downsampleHeightScale), true) {
148       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149
150   }
151   public GaussianBlurView(GaussianBlurView handle) : this(NDalicPINVOKE.new_GaussianBlurView__SWIG_1(GaussianBlurView.getCPtr(handle)), true) {
152     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153   }
154
155   public GaussianBlurView Assign(GaussianBlurView ZoomView) {
156     GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_Assign(swigCPtr, GaussianBlurView.getCPtr(ZoomView)), false);
157     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158     return ret;
159   }
160
161   public new static GaussianBlurView DownCast(BaseHandle handle) {
162     GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_DownCast(BaseHandle.getCPtr(handle)), true);
163     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
164     return ret;
165   }
166
167   public new void Add(Actor child) {
168     NDalicPINVOKE.GaussianBlurView_Add(swigCPtr, Actor.getCPtr(child));
169     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
170   }
171
172   public new void Remove(Actor child) {
173     NDalicPINVOKE.GaussianBlurView_Remove(swigCPtr, Actor.getCPtr(child));
174     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175   }
176
177   public void Activate() {
178     NDalicPINVOKE.GaussianBlurView_Activate(swigCPtr);
179     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180   }
181
182   public void ActivateOnce() {
183     NDalicPINVOKE.GaussianBlurView_ActivateOnce(swigCPtr);
184     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185   }
186
187   public void Deactivate() {
188     NDalicPINVOKE.GaussianBlurView_Deactivate(swigCPtr);
189     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190   }
191
192   public void SetUserImageAndOutputRenderTarget(Image inputImage, FrameBufferImage outputRenderTarget) {
193     NDalicPINVOKE.GaussianBlurView_SetUserImageAndOutputRenderTarget(swigCPtr, Image.getCPtr(inputImage), FrameBufferImage.getCPtr(outputRenderTarget));
194     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195   }
196
197   public int GetBlurStrengthPropertyIndex() {
198     int ret = NDalicPINVOKE.GaussianBlurView_GetBlurStrengthPropertyIndex(swigCPtr);
199     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200     return ret;
201   }
202
203   public FrameBufferImage GetBlurredRenderTarget() {
204     FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.GaussianBlurView_GetBlurredRenderTarget(swigCPtr), true);
205     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206     return ret;
207   }
208
209   public new void SetBackgroundColor(Vector4 color) {
210     NDalicPINVOKE.GaussianBlurView_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
211     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212   }
213
214   public new Vector4 GetBackgroundColor() {
215     Vector4 ret = new Vector4(NDalicPINVOKE.GaussianBlurView_GetBackgroundColor(swigCPtr), true);
216     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217     return ret;
218   }
219
220   public GaussianBlurViewSignal FinishedSignal() {
221     GaussianBlurViewSignal ret = new GaussianBlurViewSignal(NDalicPINVOKE.GaussianBlurView_FinishedSignal(swigCPtr), false);
222     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
223     return ret;
224   }
225
226 }
227
228 }