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;
32 using System.Runtime.InteropServices;
35 internal class GaussianBlurView : View {
36 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
38 internal GaussianBlurView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.GaussianBlurView_SWIGUpcast(cPtr), cMemoryOwn) {
39 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
42 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GaussianBlurView obj) {
43 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46 public override void Dispose() {
47 if (!Window.IsInstalled()) {
48 DisposeQueue.Instance.Add(this);
53 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
56 NDalicPINVOKE.delete_GaussianBlurView(swigCPtr);
58 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
60 global::System.GC.SuppressFinalize(this);
68 public class FinishedEventArgs : EventArgs
70 private GaussianBlurView _gaussianBlurView;
72 public GaussianBlurView GaussianBlurView
76 return _gaussianBlurView;
80 _gaussianBlurView = value;
85 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
86 private delegate void FinishedEventCallbackDelegate(IntPtr application);
87 private DaliEventHandler<object,FinishedEventArgs> _gaussianFinishedEventHandler;
88 private FinishedEventCallbackDelegate _gaussianFinishedEventCallbackDelegate;
90 public event DaliEventHandler<object,FinishedEventArgs> Finished
96 // Restricted to only one listener
97 if (_gaussianFinishedEventHandler == null)
99 _gaussianFinishedEventHandler += value;
101 _gaussianFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished);
102 this.FinishedSignal().Connect(_gaussianFinishedEventCallbackDelegate);
111 if (_gaussianFinishedEventHandler != null)
113 this.FinishedSignal().Disconnect(_gaussianFinishedEventCallbackDelegate);
116 _gaussianFinishedEventHandler -= value;
121 // Callback for GaussianBlurView FinishedSignal
122 private void OnFinished(IntPtr data)
124 FinishedEventArgs e = new FinishedEventArgs();
126 // Populate all members of "e" (FinishedEventArgs) with real data
127 e.GaussianBlurView = GaussianBlurView.GetGaussianBlurViewFromPtr(data);
129 if (_gaussianFinishedEventHandler != null)
131 //here we send all data to user event handlers
132 _gaussianFinishedEventHandler(this, e);
136 public static GaussianBlurView GetGaussianBlurViewFromPtr(global::System.IntPtr cPtr) {
137 GaussianBlurView ret = new GaussianBlurView(cPtr, false);
138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143 public GaussianBlurView () : this (NDalicPINVOKE.GaussianBlurView_New__SWIG_0(), true) {
144 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
147 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) {
148 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151 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) {
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 public GaussianBlurView(GaussianBlurView handle) : this(NDalicPINVOKE.new_GaussianBlurView__SWIG_1(GaussianBlurView.getCPtr(handle)), true) {
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159 public GaussianBlurView Assign(GaussianBlurView ZoomView) {
160 GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_Assign(swigCPtr, GaussianBlurView.getCPtr(ZoomView)), false);
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165 public new static GaussianBlurView DownCast(BaseHandle handle) {
166 GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_DownCast(BaseHandle.getCPtr(handle)), true);
167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171 public new void Add(View child) {
172 NDalicPINVOKE.GaussianBlurView_Add(swigCPtr, View.getCPtr(child));
173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176 public new void Remove(View child) {
177 NDalicPINVOKE.GaussianBlurView_Remove(swigCPtr, View.getCPtr(child));
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 public void Activate() {
182 NDalicPINVOKE.GaussianBlurView_Activate(swigCPtr);
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186 public void ActivateOnce() {
187 NDalicPINVOKE.GaussianBlurView_ActivateOnce(swigCPtr);
188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191 public void Deactivate() {
192 NDalicPINVOKE.GaussianBlurView_Deactivate(swigCPtr);
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
196 public void SetUserImageAndOutputRenderTarget(Image inputImage, FrameBufferImage outputRenderTarget) {
197 NDalicPINVOKE.GaussianBlurView_SetUserImageAndOutputRenderTarget(swigCPtr, Image.getCPtr(inputImage), FrameBufferImage.getCPtr(outputRenderTarget));
198 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
201 public int GetBlurStrengthPropertyIndex() {
202 int ret = NDalicPINVOKE.GaussianBlurView_GetBlurStrengthPropertyIndex(swigCPtr);
203 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207 public FrameBufferImage GetBlurredRenderTarget() {
208 FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.GaussianBlurView_GetBlurredRenderTarget(swigCPtr), true);
209 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213 public new void SetBackgroundColor(Vector4 color) {
214 NDalicPINVOKE.GaussianBlurView_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
215 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218 public new Vector4 GetBackgroundColor() {
219 Vector4 ret = new Vector4(NDalicPINVOKE.GaussianBlurView_GetBackgroundColor(swigCPtr), true);
220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224 public GaussianBlurViewSignal FinishedSignal() {
225 GaussianBlurViewSignal ret = new GaussianBlurViewSignal(NDalicPINVOKE.GaussianBlurView_FinishedSignal(swigCPtr), false);
226 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();