1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
27 using Tizen.NUI.BaseComponents;
33 using System.Runtime.InteropServices;
36 internal class GaussianBlurView : View
38 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
40 internal GaussianBlurView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.GaussianBlurView_SWIGUpcast(cPtr), cMemoryOwn)
42 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
43 // By default, we do not want the position to use the anchor point
44 PositionUsesAnchorPoint = false;
47 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GaussianBlurView obj)
49 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
52 protected override void Dispose(DisposeTypes type)
59 if (type == DisposeTypes.Explicit)
62 //Release your own managed resources here.
63 //You should release all of your own disposable objects here.
67 //Release your own unmanaged resources here.
68 //You should not access any managed member here except static instance.
69 //because the execution order of Finalizes is non-deterministic.
71 if (swigCPtr.Handle != global::System.IntPtr.Zero)
76 NDalicPINVOKE.delete_GaussianBlurView(swigCPtr);
78 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
86 public class FinishedEventArgs : EventArgs
88 private GaussianBlurView _gaussianBlurView;
90 public GaussianBlurView GaussianBlurView
94 return _gaussianBlurView;
98 _gaussianBlurView = value;
103 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
104 private delegate void FinishedEventCallbackDelegate(IntPtr application);
105 private DaliEventHandler<object, FinishedEventArgs> _gaussianFinishedEventHandler;
106 private FinishedEventCallbackDelegate _gaussianFinishedEventCallbackDelegate;
108 public event DaliEventHandler<object, FinishedEventArgs> Finished
114 // Restricted to only one listener
115 if (_gaussianFinishedEventHandler == null)
117 _gaussianFinishedEventHandler += value;
119 _gaussianFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished);
120 this.FinishedSignal().Connect(_gaussianFinishedEventCallbackDelegate);
129 if (_gaussianFinishedEventHandler != null)
131 this.FinishedSignal().Disconnect(_gaussianFinishedEventCallbackDelegate);
134 _gaussianFinishedEventHandler -= value;
139 // Callback for GaussianBlurView FinishedSignal
140 private void OnFinished(IntPtr data)
142 FinishedEventArgs e = new FinishedEventArgs();
144 // Populate all members of "e" (FinishedEventArgs) with real data
145 e.GaussianBlurView = Registry.GetManagedBaseHandleFromNativePtr(data) as GaussianBlurView;
147 if (_gaussianFinishedEventHandler != null)
149 //here we send all data to user event handlers
150 _gaussianFinishedEventHandler(this, e);
154 public GaussianBlurView() : this(NDalicPINVOKE.GaussianBlurView_New__SWIG_0(), true)
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159 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)
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
164 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)
166 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169 public GaussianBlurView(GaussianBlurView handle) : this(NDalicPINVOKE.new_GaussianBlurView__SWIG_1(GaussianBlurView.getCPtr(handle)), true)
171 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 public GaussianBlurView Assign(GaussianBlurView ZoomView)
176 GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_Assign(swigCPtr, GaussianBlurView.getCPtr(ZoomView)), false);
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 public new static GaussianBlurView DownCast(BaseHandle handle)
183 GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_DownCast(BaseHandle.getCPtr(handle)), true);
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188 public new void Add(View child)
190 NDalicPINVOKE.GaussianBlurView_Add(swigCPtr, View.getCPtr(child));
191 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 public new void Remove(View child)
196 NDalicPINVOKE.GaussianBlurView_Remove(swigCPtr, View.getCPtr(child));
197 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200 public void Activate()
202 NDalicPINVOKE.GaussianBlurView_Activate(swigCPtr);
203 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206 public void ActivateOnce()
208 NDalicPINVOKE.GaussianBlurView_ActivateOnce(swigCPtr);
209 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212 public void Deactivate()
214 NDalicPINVOKE.GaussianBlurView_Deactivate(swigCPtr);
215 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218 public void SetUserImageAndOutputRenderTarget(Image inputImage, FrameBufferImage outputRenderTarget)
220 NDalicPINVOKE.GaussianBlurView_SetUserImageAndOutputRenderTarget(swigCPtr, Image.getCPtr(inputImage), FrameBufferImage.getCPtr(outputRenderTarget));
221 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224 public int GetBlurStrengthPropertyIndex()
226 int ret = NDalicPINVOKE.GaussianBlurView_GetBlurStrengthPropertyIndex(swigCPtr);
227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231 public FrameBufferImage GetBlurredRenderTarget()
233 FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.GaussianBlurView_GetBlurredRenderTarget(swigCPtr), true);
234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238 public new void SetBackgroundColor(Vector4 color)
240 NDalicPINVOKE.GaussianBlurView_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
241 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
244 public new Vector4 GetBackgroundColor()
246 Vector4 ret = new Vector4(NDalicPINVOKE.GaussianBlurView_GetBackgroundColor(swigCPtr), true);
247 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251 public GaussianBlurViewSignal FinishedSignal()
253 GaussianBlurViewSignal ret = new GaussianBlurViewSignal(NDalicPINVOKE.GaussianBlurView_FinishedSignal(swigCPtr), false);
254 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();