1 /** Copyright (c) 2016 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 //------------------------------------------------------------------------------
30 using System.Runtime.InteropServices;
33 public class GaussianBlurView : View {
34 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
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);
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;
48 public override void Dispose() {
50 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
53 NDalicPINVOKE.delete_GaussianBlurView(swigCPtr);
55 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
57 global::System.GC.SuppressFinalize(this);
64 public class FinishedEventArgs : EventArgs
66 private GaussianBlurView _gaussianBlurView;
68 public GaussianBlurView GaussianBlurView
72 return _gaussianBlurView;
76 _gaussianBlurView = value;
81 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
82 private delegate void FinishedEventCallbackDelegate(IntPtr application);
83 private DaliEventHandler<object,FinishedEventArgs> _gaussianFinishedEventHandler;
84 private FinishedEventCallbackDelegate _gaussianFinishedEventCallbackDelegate;
86 public event DaliEventHandler<object,FinishedEventArgs> Finished
92 // Restricted to only one listener
93 if (_gaussianFinishedEventHandler == null)
95 _gaussianFinishedEventHandler += value;
97 _gaussianFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished);
98 this.FinishedSignal().Connect(_gaussianFinishedEventCallbackDelegate);
107 if (_gaussianFinishedEventHandler != null)
109 this.FinishedSignal().Disconnect(_gaussianFinishedEventCallbackDelegate);
112 _gaussianFinishedEventHandler -= value;
117 // Callback for GaussianBlurView FinishedSignal
118 private void OnFinished(IntPtr data)
120 FinishedEventArgs e = new FinishedEventArgs();
122 // Populate all members of "e" (FinishedEventArgs) with real data
123 e.GaussianBlurView = GaussianBlurView.GetGaussianBlurViewFromPtr(data);
125 if (_gaussianFinishedEventHandler != null)
127 //here we send all data to user event handlers
128 _gaussianFinishedEventHandler(this, e);
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();
139 public GaussianBlurView () : this (NDalicPINVOKE.GaussianBlurView_New__SWIG_0(), true) {
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
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();
151 public GaussianBlurView(GaussianBlurView handle) : this(NDalicPINVOKE.new_GaussianBlurView__SWIG_1(GaussianBlurView.getCPtr(handle)), true) {
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
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();
167 public new void Add(Actor child) {
168 NDalicPINVOKE.GaussianBlurView_Add(swigCPtr, Actor.getCPtr(child));
169 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 public new void Remove(Actor child) {
173 NDalicPINVOKE.GaussianBlurView_Remove(swigCPtr, Actor.getCPtr(child));
174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177 public void Activate() {
178 NDalicPINVOKE.GaussianBlurView_Activate(swigCPtr);
179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 public void ActivateOnce() {
183 NDalicPINVOKE.GaussianBlurView_ActivateOnce(swigCPtr);
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 public void Deactivate() {
188 NDalicPINVOKE.GaussianBlurView_Deactivate(swigCPtr);
189 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
197 public int GetBlurStrengthPropertyIndex() {
198 int ret = NDalicPINVOKE.GaussianBlurView_GetBlurStrengthPropertyIndex(swigCPtr);
199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203 public FrameBufferImage GetBlurredRenderTarget() {
204 FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.GaussianBlurView_GetBlurredRenderTarget(swigCPtr), true);
205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
209 public new void SetBackgroundColor(Vector4 color) {
210 NDalicPINVOKE.GaussianBlurView_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
211 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
214 public new Vector4 GetBackgroundColor() {
215 Vector4 ret = new Vector4(NDalicPINVOKE.GaussianBlurView_GetBackgroundColor(swigCPtr), true);
216 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
220 public GaussianBlurViewSignal FinishedSignal() {
221 GaussianBlurViewSignal ret = new GaussianBlurViewSignal(NDalicPINVOKE.GaussianBlurView_FinishedSignal(swigCPtr), false);
222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();