From: Umar Date: Tue, 13 Jun 2017 13:30:52 +0000 (+0100) Subject: Rename all C# Events to Past tense X-Git-Tag: submit/trunk/20170823.075128~91^2~35^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c06f70cc60b55ce4b1899fc8ea7b356bf1131949;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Rename all C# Events to Past tense Change-Id: I5b33b4346c68d03a85c5a74da211963ff2125aa8 --- diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index 422857d..a1ab80a 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -55,7 +55,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationTerminate signal * */ - internal class NUIApplicationTerminateEventArgs : EventArgs + internal class NUIApplicationTerminatingEventArgs : EventArgs { private Application _application; /** @@ -79,7 +79,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationPause signal * */ - internal class NUIApplicationPauseEventArgs : EventArgs + internal class NUIApplicationPausedEventArgs : EventArgs { private Application _application; /** @@ -103,7 +103,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationResume signal * */ - internal class NUIApplicationResumeEventArgs : EventArgs + internal class NUIApplicationResumedEventArgs : EventArgs { private Application _application; /** @@ -151,7 +151,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationResize signal * */ - internal class NUIApplicationResizeEventArgs : EventArgs + internal class NUIApplicationResizedEventArgs : EventArgs { private Application _application; /** @@ -368,18 +368,18 @@ namespace Tizen.NUI [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void NUIApplicationTerminateEventCallbackDelegate(IntPtr application); - private DaliEventHandler _applicationTerminateEventHandler; + private DaliEventHandler _applicationTerminateEventHandler; private NUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void NUIApplicationPauseEventCallbackDelegate(IntPtr application); - private DaliEventHandler _applicationPauseEventHandler; + private DaliEventHandler _applicationPauseEventHandler; private NUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void NUIApplicationResumeEventCallbackDelegate(IntPtr application); - private DaliEventHandler _applicationResumeEventHandler; + private DaliEventHandler _applicationResumeEventHandler; private NUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] @@ -389,7 +389,7 @@ namespace Tizen.NUI [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void NUIApplicationResizeEventCallbackDelegate(IntPtr application); - private DaliEventHandler _applicationResizeEventHandler; + private DaliEventHandler _applicationResizeEventHandler; private NUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] @@ -474,9 +474,9 @@ namespace Tizen.NUI /** * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler) - * provided by the user. Terminated signal is emitted when application is terminated + * provided by the user. Terminated signal is emitted when application is terminating */ - public event DaliEventHandler Terminated + public event DaliEventHandler Terminating { add { @@ -510,7 +510,7 @@ namespace Tizen.NUI // Callback for Application TerminateSignal private void OnNUIApplicationTerminate(IntPtr data) { - NUIApplicationTerminateEventArgs e = new NUIApplicationTerminateEventArgs(); + NUIApplicationTerminatingEventArgs e = new NUIApplicationTerminatingEventArgs(); // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data e.Application = Application.GetApplicationFromPtr(data); @@ -527,7 +527,7 @@ namespace Tizen.NUI * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler) * provided by the user. Paused signal is emitted when application is paused */ - public event DaliEventHandler Paused + public event DaliEventHandler Paused { add { @@ -561,7 +561,7 @@ namespace Tizen.NUI // Callback for Application PauseSignal private void OnNUIApplicationPause(IntPtr data) { - NUIApplicationPauseEventArgs e = new NUIApplicationPauseEventArgs(); + NUIApplicationPausedEventArgs e = new NUIApplicationPausedEventArgs(); // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data e.Application = Application.GetApplicationFromPtr(data); @@ -578,7 +578,7 @@ namespace Tizen.NUI * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler) * provided by the user. Resumed signal is emitted when application is resumed */ - public event DaliEventHandler Resumed + public event DaliEventHandler Resumed { add { @@ -612,7 +612,7 @@ namespace Tizen.NUI // Callback for Application ResumeSignal private void OnNUIApplicationResume(IntPtr data) { - NUIApplicationResumeEventArgs e = new NUIApplicationResumeEventArgs(); + NUIApplicationResumedEventArgs e = new NUIApplicationResumedEventArgs(); // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data e.Application = Application.GetApplicationFromPtr(data); @@ -680,7 +680,7 @@ namespace Tizen.NUI * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler) * provided by the user. Resized signal is emitted when application is resized */ - public event DaliEventHandler Resized + public event DaliEventHandler Resized { add { @@ -714,7 +714,7 @@ namespace Tizen.NUI // Callback for Application ResizeSignal private void OnNUIApplicationResize(IntPtr data) { - NUIApplicationResizeEventArgs e = new NUIApplicationResizeEventArgs(); + NUIApplicationResizedEventArgs e = new NUIApplicationResizedEventArgs(); // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data e.Application = Application.GetApplicationFromPtr(data); @@ -830,7 +830,7 @@ namespace Tizen.NUI /** * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler - * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler) + * (in the type of NUIApplicationBatteryLowEventHandler-DaliEventHandler) * provided by the user. BatteryLow signal is emitted when the battery level of the device is low. */ public event DaliEventHandler BatteryLow @@ -1034,7 +1034,7 @@ namespace Tizen.NUI [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)] internal delegate void MemoryLowDelegateInternal(); - static void Initialize() + static void Initialization() { // instance.InitDelegate(); } @@ -1056,7 +1056,7 @@ namespace Tizen.NUI internal void SetupDelegates() { - InitDelegateInternal initializeCallback = new InitDelegateInternal(Initialize); + InitDelegateInternal initializeCallback = new InitDelegateInternal(Initialization); #if DEBUG_ON Tizen.Log.Debug("NUI", "InitSignal connection count"); #endif diff --git a/src/Tizen.NUI/src/internal/Image.cs b/src/Tizen.NUI/src/internal/Image.cs index b133b54..b0e7b77 100755 --- a/src/Tizen.NUI/src/internal/Image.cs +++ b/src/Tizen.NUI/src/internal/Image.cs @@ -94,7 +94,7 @@ namespace Tizen.NUI /** * @brief Event for Uploaded signal which can be used to subscribe/unsubscribe the event handler - * (in the type of UploadedEventHandler-DaliEventHandler) + * (in the type of UploadedEventHandler-DaliEventHandler) * provided by the user. Uploaded signal is emitted when the image data gets uploaded to GL. */ public event DaliEventHandler Uploaded diff --git a/src/Tizen.NUI/src/internal/NinePatchImage.cs b/src/Tizen.NUI/src/internal/NinePatchImage.cs deleted file mode 100755 index 23d4b7a..0000000 --- a/src/Tizen.NUI/src/internal/NinePatchImage.cs +++ /dev/null @@ -1,146 +0,0 @@ -/** Copyright (c) 2017 Samsung Electronics Co., Ltd. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ -// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.9 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - internal class NinePatchImage : ResourceImage - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal NinePatchImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.NinePatchImage_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NinePatchImage obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_NinePatchImage(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - - public NinePatchImage(string filename) : this(NDalicPINVOKE.NinePatchImage_New(filename), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public new static NinePatchImage DownCast(BaseHandle handle) - { - NinePatchImage ret = new NinePatchImage(NDalicPINVOKE.NinePatchImage_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public NinePatchImage(NinePatchImage handle) : this(NDalicPINVOKE.new_NinePatchImage__SWIG_1(NinePatchImage.getCPtr(handle)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public NinePatchImage Assign(NinePatchImage rhs) - { - NinePatchImage ret = new NinePatchImage(NDalicPINVOKE.NinePatchImage_Assign(swigCPtr, NinePatchImage.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Vector4 GetStretchBorders() - { - Vector4 ret = new Vector4(NDalicPINVOKE.NinePatchImage_GetStretchBorders(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public VectorUint16Pair GetStretchPixelsX() - { - VectorUint16Pair ret = new VectorUint16Pair(NDalicPINVOKE.NinePatchImage_GetStretchPixelsX(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public VectorUint16Pair GetStretchPixelsY() - { - VectorUint16Pair ret = new VectorUint16Pair(NDalicPINVOKE.NinePatchImage_GetStretchPixelsY(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public Rectangle GetChildRectangle() - { - Rectangle ret = new Rectangle(NDalicPINVOKE.NinePatchImage_GetChildRectangle(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public BufferImage CreateCroppedBufferImage() - { - BufferImage ret = new BufferImage(NDalicPINVOKE.NinePatchImage_CreateCroppedBufferImage(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public static bool IsNinePatchUrl(string url) - { - bool ret = NDalicPINVOKE.NinePatchImage_IsNinePatchUrl(url); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/ResourceImage.cs b/src/Tizen.NUI/src/internal/ResourceImage.cs deleted file mode 100755 index 1ae3c26..0000000 --- a/src/Tizen.NUI/src/internal/ResourceImage.cs +++ /dev/null @@ -1,244 +0,0 @@ -/** Copyright (c) 2017 Samsung Electronics Co., Ltd. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ -// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.9 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - using System; - using System.Runtime.InteropServices; - - - internal class ResourceImage : Image - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal ResourceImage(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ResourceImage_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ResourceImage obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ResourceImage(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - - public class LoadingFinishedEventArgs : EventArgs - { - private ResourceImage _resourceImage; - - public ResourceImage ResourceImage - { - get - { - return _resourceImage; - } - set - { - _resourceImage = value; - } - } - } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void LoadingFinishedEventCallbackDelegate(IntPtr ResourceImage); - private DaliEventHandler _resourceImageLoadingFinishedEventHandler; - private LoadingFinishedEventCallbackDelegate _resourceImageLoadingFinishedEventCallbackDelegate; - - public event DaliEventHandler LoadingFinished - { - add - { - lock (this) - { - // Restricted to only one listener - if (_resourceImageLoadingFinishedEventHandler == null) - { - _resourceImageLoadingFinishedEventHandler += value; - - _resourceImageLoadingFinishedEventCallbackDelegate = new LoadingFinishedEventCallbackDelegate(OnLoadingFinished); - this.LoadingFinishedSignal().Connect(_resourceImageLoadingFinishedEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_resourceImageLoadingFinishedEventHandler != null) - { - this.LoadingFinishedSignal().Disconnect(_resourceImageLoadingFinishedEventCallbackDelegate); - } - - _resourceImageLoadingFinishedEventHandler -= value; - } - } - } - - // Callback for ResourceImage LoadingFinishedSignal - private void OnLoadingFinished(IntPtr data) - { - LoadingFinishedEventArgs e = new LoadingFinishedEventArgs(); - - // Populate all members of "e" (LoadingFinishedEventArgs) with real data - e.ResourceImage = ResourceImage.GetResourceImageFromPtr(data); - - if (_resourceImageLoadingFinishedEventHandler != null) - { - //here we send all data to user event handlers - _resourceImageLoadingFinishedEventHandler(this, e); - } - } - - - public static ResourceImage GetResourceImageFromPtr(global::System.IntPtr cPtr) - { - ResourceImage ret = new ResourceImage(cPtr, false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - - public static Uint16Pair GetImageSize(string url) - { - Uint16Pair ret = new Uint16Pair(NDalicPINVOKE.ResourceImage_GetImageSize(url), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public ResourceImage(string url, bool orientationCorrection) : this(NDalicPINVOKE.ResourceImage_New__SWIG_0(url, orientationCorrection), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage(string url) : this(NDalicPINVOKE.ResourceImage_New__SWIG_1(url), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage(string url, Uint16Pair size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection) : this(NDalicPINVOKE.ResourceImage_New__SWIG_2(url, Uint16Pair.getCPtr(size), (int)fittingMode, (int)samplingMode, orientationCorrection), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage(string url, Uint16Pair size, FittingModeType fittingMode, SamplingModeType samplingMode) : this(NDalicPINVOKE.ResourceImage_New__SWIG_3(url, Uint16Pair.getCPtr(size), (int)fittingMode, (int)samplingMode), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage(string url, Uint16Pair size, FittingModeType fittingMode) : this(NDalicPINVOKE.ResourceImage_New__SWIG_4(url, Uint16Pair.getCPtr(size), (int)fittingMode), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage(string url, Uint16Pair size) : this(NDalicPINVOKE.ResourceImage_New__SWIG_5(url, Uint16Pair.getCPtr(size)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - public ResourceImage(ResourceImage handle) : this(NDalicPINVOKE.new_ResourceImage__SWIG_1(ResourceImage.getCPtr(handle)), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ResourceImage Assign(ResourceImage rhs) - { - ResourceImage ret = new ResourceImage(NDalicPINVOKE.ResourceImage_Assign(swigCPtr, ResourceImage.getCPtr(rhs)), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public new static ResourceImage DownCast(BaseHandle handle) - { - ResourceImage ret = new ResourceImage(NDalicPINVOKE.ResourceImage_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public LoadingState GetLoadingState() - { - LoadingState ret = (LoadingState)NDalicPINVOKE.ResourceImage_GetLoadingState(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public string GetUrl() - { - string ret = NDalicPINVOKE.ResourceImage_GetUrl(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Reload() - { - NDalicPINVOKE.ResourceImage_Reload(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ResourceImageSignal LoadingFinishedSignal() - { - ResourceImageSignal ret = new ResourceImageSignal(NDalicPINVOKE.ResourceImage_LoadingFinishedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - } - -} diff --git a/src/Tizen.NUI/src/internal/ResourceImageSignal.cs b/src/Tizen.NUI/src/internal/ResourceImageSignal.cs deleted file mode 100755 index f5c55fc..0000000 --- a/src/Tizen.NUI/src/internal/ResourceImageSignal.cs +++ /dev/null @@ -1,142 +0,0 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.9 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -namespace Tizen.NUI -{ - - internal class ResourceImageSignal : global::System.IDisposable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal ResourceImageSignal(global::System.IntPtr cPtr, bool cMemoryOwn) - { - swigCMemOwn = cMemoryOwn; - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ResourceImageSignal obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - //A Flag to check who called Dispose(). (By User or DisposeQueue) - private bool isDisposeQueued = false; - //A Flat to check if it is already disposed. - protected bool disposed = false; - - - ~ResourceImageSignal() - { - if (!isDisposeQueued) - { - isDisposeQueued = true; - DisposeQueue.Instance.Add(this); - } - } - - public void Dispose() - { - //Throw excpetion if Dispose() is called in separate thread. - if (!Window.IsInstalled()) - { - throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); - } - - if (isDisposeQueued) - { - Dispose(DisposeTypes.Implicit); - } - else - { - Dispose(DisposeTypes.Explicit); - System.GC.SuppressFinalize(this); - } - } - - protected virtual void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_ResourceImageSignal(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - - public bool Empty() - { - bool ret = NDalicPINVOKE.ResourceImageSignal_Empty(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public uint GetConnectionCount() - { - uint ret = NDalicPINVOKE.ResourceImageSignal_GetConnectionCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - public void Connect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ResourceImageSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - public void Disconnect(System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.ResourceImageSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - public void Emit(ResourceImage arg) - { - NDalicPINVOKE.ResourceImageSignal_Emit(swigCPtr, ResourceImage.getCPtr(arg)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public ResourceImageSignal() : this(NDalicPINVOKE.new_ResourceImageSignal(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - } - -} diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 1d9ef46..3e85455 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -274,7 +274,7 @@ namespace Tizen.NUI.BaseComponents /// /// Event arguments that passed via Touch signal. /// - public class TouchEventArgs : EventArgs + public class TouchedEventArgs : EventArgs { private Touch _touch; @@ -294,7 +294,7 @@ namespace Tizen.NUI.BaseComponents } } - private EventHandlerWithReturnType _touchDataEventHandler; + private EventHandlerWithReturnType _touchDataEventHandler; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData); private TouchDataCallbackType _touchDataCallback; @@ -303,7 +303,7 @@ namespace Tizen.NUI.BaseComponents /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.
/// Touched signal is emitted when touch input is received.
/// - public event EventHandlerWithReturnType Touch + public event EventHandlerWithReturnType Touched { add { @@ -331,7 +331,7 @@ namespace Tizen.NUI.BaseComponents // Callback for View TouchSignal private bool OnTouch(IntPtr view, IntPtr touchData) { - TouchEventArgs e = new TouchEventArgs(); + TouchedEventArgs e = new TouchedEventArgs(); e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData); @@ -346,7 +346,7 @@ namespace Tizen.NUI.BaseComponents /// /// Event arguments that passed via Hover signal. /// - public class HoverEventArgs : EventArgs + public class HoveredEventArgs : EventArgs { private Hover _hover; @@ -366,7 +366,7 @@ namespace Tizen.NUI.BaseComponents } } - private EventHandlerWithReturnType _hoverEventHandler; + private EventHandlerWithReturnType _hoverEventHandler; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent); private HoverEventCallbackType _hoverEventCallback; @@ -375,7 +375,7 @@ namespace Tizen.NUI.BaseComponents /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.
/// Hovered signal is emitted when hover input is received.
/// - public event EventHandlerWithReturnType Hover + public event EventHandlerWithReturnType Hovered { add { @@ -403,7 +403,7 @@ namespace Tizen.NUI.BaseComponents // Callback for View Hover signal private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent) { - HoverEventArgs e = new HoverEventArgs(); + HoveredEventArgs e = new HoveredEventArgs(); e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent); @@ -418,7 +418,7 @@ namespace Tizen.NUI.BaseComponents /// /// Event arguments that passed via Wheel signal. /// - public class WheelEventArgs : EventArgs + public class WheelRolledEventArgs : EventArgs { private Wheel _wheel; @@ -438,7 +438,7 @@ namespace Tizen.NUI.BaseComponents } } - private EventHandlerWithReturnType _wheelEventHandler; + private EventHandlerWithReturnType _wheelEventHandler; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent); private WheelEventCallbackType _wheelEventCallback; @@ -447,7 +447,7 @@ namespace Tizen.NUI.BaseComponents /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.
/// WheelMoved signal is emitted when wheel event is received.
/// - public event EventHandlerWithReturnType WheelRoll + public event EventHandlerWithReturnType WheelRolled { add { @@ -475,7 +475,7 @@ namespace Tizen.NUI.BaseComponents // Callback for View Wheel signal private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent) { - WheelEventArgs e = new WheelEventArgs(); + WheelRolledEventArgs e = new WheelRolledEventArgs(); e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent); diff --git a/src/Tizen.NUI/src/public/FocusManager.cs b/src/Tizen.NUI/src/public/FocusManager.cs index 5f035ed..b1cfcbc 100755 --- a/src/Tizen.NUI/src/public/FocusManager.cs +++ b/src/Tizen.NUI/src/public/FocusManager.cs @@ -363,7 +363,7 @@ namespace Tizen.NUI /// ///Event arguments that passed via FocusedViewEnterKey signal /// - public class FocusedViewEnterKeyEventArgs : EventArgs + public class FocusedViewActivatedEventArgs : EventArgs { private View _view; @@ -380,7 +380,7 @@ namespace Tizen.NUI } } - private EventHandler _focusedViewEnterKeyEventHandler; + private EventHandler _focusedViewEnterKeyEventHandler; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusedViewEnterKeyEventCallback(IntPtr view); private FocusedViewEnterKeyEventCallback _focusedViewEnterKeyEventCallback; @@ -388,7 +388,7 @@ namespace Tizen.NUI /// /// FocusedViewActivated will be triggered when the current focused view has the enter key pressed on it. /// - public event EventHandler FocusedViewActivated + public event EventHandler FocusedViewActivated { add { @@ -412,7 +412,7 @@ namespace Tizen.NUI private void OnFocusedViewEnterKey(IntPtr view) { - FocusedViewEnterKeyEventArgs e = new FocusedViewEnterKeyEventArgs(); + FocusedViewActivatedEventArgs e = new FocusedViewActivatedEventArgs(); e.View = View.GetViewFromPtr(view); @@ -582,7 +582,7 @@ namespace Tizen.NUI View ret = new View(NDalicManualPINVOKE.FocusManager_GetFocusIndicatorActor(swigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); if (ret.HasBody() == false) - { + { return null; } return ret; diff --git a/src/Tizen.NUI/src/public/UIComponents/Popup.cs b/src/Tizen.NUI/src/public/UIComponents/Popup.cs index 98b69be..e3c8072 100755 --- a/src/Tizen.NUI/src/public/UIComponents/Popup.cs +++ b/src/Tizen.NUI/src/public/UIComponents/Popup.cs @@ -92,7 +92,7 @@ namespace Tizen.NUI.UIComponents /// /// Event arguments that passed via OutsideTouchedEvent /// - public class OutsideTouchedEventArgs : EventArgs + public class TouchedOutsideEventArgs : EventArgs { } @@ -126,7 +126,7 @@ namespace Tizen.NUI.UIComponents [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void OutsideTouchedEventCallbackDelegate(); - private EventHandler _popUpOutsideTouchedEventHandler; + private EventHandler _popUpOutsideTouchedEventHandler; private OutsideTouchedEventCallbackDelegate _popUpOutsideTouchedEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] @@ -152,7 +152,7 @@ namespace Tizen.NUI.UIComponents /// /// Event is sent when user has touched outside of the Dialog. /// - public event EventHandler OutsideTouched + public event EventHandler TouchedOutside { add { @@ -176,7 +176,7 @@ namespace Tizen.NUI.UIComponents // Callback for Popup OutsideTouchedSignal private void OnOutsideTouched() { - OutsideTouchedEventArgs e = new OutsideTouchedEventArgs(); + TouchedOutsideEventArgs e = new TouchedOutsideEventArgs(); if (_popUpOutsideTouchedEventHandler != null) { diff --git a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs index 3d2e887..44a2fe0 100755 --- a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs @@ -95,7 +95,7 @@ namespace Tizen.NUI.UIComponents /// /// Event arguments that passed via ScrollPositionIntervalReached event /// - public class ScrollPositionIntervalReachedEventArgs : EventArgs + public class ScrollIntervalEventArgs : EventArgs { private float _currentScrollPosition; @@ -122,7 +122,7 @@ namespace Tizen.NUI.UIComponents [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void ScrollPositionIntervalReachedEventCallbackDelegate(); - private EventHandler _scrollBarScrollPositionIntervalReachedEventHandler; + private EventHandler _scrollBarScrollPositionIntervalReachedEventHandler; private ScrollPositionIntervalReachedEventCallbackDelegate _scrollBarScrollPositionIntervalReachedEventCallbackDelegate; /// @@ -165,7 +165,7 @@ namespace Tizen.NUI.UIComponents /// /// Event emitted when the current scroll position of the scrollable content /// - public event EventHandler ScrollPositionIntervalReached + public event EventHandler ScrollInterval { add { @@ -189,7 +189,7 @@ namespace Tizen.NUI.UIComponents // Callback for ScrollBar ScrollPositionIntervalReachedSignal private void OnScrollBarScrollPositionIntervalReached() { - ScrollPositionIntervalReachedEventArgs e = new ScrollPositionIntervalReachedEventArgs(); + ScrollIntervalEventArgs e = new ScrollIntervalEventArgs(); if (_scrollBarScrollPositionIntervalReachedEventHandler != null) { diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index d663877..68585f2 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -337,7 +337,7 @@ namespace Tizen.NUI return ret; } - public class WindowFocusChangedEventArgs : EventArgs + public class FocusChangedEventArgs : EventArgs { public bool FocusGained { @@ -349,9 +349,9 @@ namespace Tizen.NUI private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void WindowFocusChangedEventCallbackType(bool focusGained); - private event EventHandler _windowFocusChangedEventHandler; + private event EventHandler _windowFocusChangedEventHandler; - public event EventHandler WindowFocusChanged + public event EventHandler FocusChanged { add { @@ -376,7 +376,7 @@ namespace Tizen.NUI private void OnWindowFocusedChanged(bool focusGained) { - WindowFocusChangedEventArgs e = new WindowFocusChangedEventArgs(); + FocusChangedEventArgs e = new FocusChangedEventArgs(); e.FocusGained = focusGained; @@ -834,7 +834,7 @@ namespace Tizen.NUI /// /// Touch event argument. /// - public class TouchEventArgs : EventArgs + public class TouchedEventArgs : EventArgs { private Touch _touch; @@ -854,7 +854,7 @@ namespace Tizen.NUI } } - private event EventHandler _stageTouchHandler; + private event EventHandler _stageTouchHandler; private EventCallbackDelegateType1 _stageTouchCallbackDelegate; /// @@ -863,7 +863,7 @@ namespace Tizen.NUI /// then when the last finger is lifted.
/// An interrupted event will also be emitted (if it occurs).
///
- public event EventHandler Touch + public event EventHandler Touched { add { @@ -889,7 +889,7 @@ namespace Tizen.NUI private void OnStageTouch(IntPtr data) { - TouchEventArgs e = new TouchEventArgs(); + TouchedEventArgs e = new TouchedEventArgs(); if (data != null) { @@ -905,7 +905,7 @@ namespace Tizen.NUI /// /// Wheel event arguments. /// - public class WheelEventArgs : EventArgs + public class WheelRolledEventArgs : EventArgs { private Wheel _wheel; @@ -925,13 +925,13 @@ namespace Tizen.NUI } } - private event EventHandler _stageWheelHandler; + private event EventHandler _stageWheelHandler; private EventCallbackDelegateType1 _stageWheelCallbackDelegate; /// /// Event emitted when wheel event is received. /// - public event EventHandler WheelRoll + public event EventHandler WheelRolled { add { @@ -954,7 +954,7 @@ namespace Tizen.NUI private void OnStageWheel(IntPtr data) { - WheelEventArgs e = new WheelEventArgs(); + WheelRolledEventArgs e = new WheelRolledEventArgs(); if (data != null) { @@ -996,7 +996,7 @@ namespace Tizen.NUI /// /// Event emitted when key event is received. /// - public event EventHandler Key + public event EventHandler KeyPressed { add {