X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Finternal%2FPageTurnView.cs;h=c644380fb58d2c6a2794f090d602b3cce240f15f;hb=3ba7d16f8a9a032cbaab592204a019fed2062d6b;hp=2526115f59d7133e60c7c7cdd1ff02b8a661a399;hpb=9e09330fa6bf7ac8d7154392738bc868fbea72bd;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/Tizen.NUI/src/internal/PageTurnView.cs b/src/Tizen.NUI/src/internal/PageTurnView.cs index 2526115..c644380 100755 --- a/src/Tizen.NUI/src/internal/PageTurnView.cs +++ b/src/Tizen.NUI/src/internal/PageTurnView.cs @@ -1,29 +1,32 @@ -//------------------------------------------------------------------------------ -// -// -// 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. -//------------------------------------------------------------------------------ +/* + * 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. + * + */ +using System; +using System.Runtime.InteropServices; +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - - using System; - using System.Runtime.InteropServices; - using Tizen.NUI.BaseComponents; - internal class PageTurnView : View { private global::System.Runtime.InteropServices.HandleRef swigCPtr; - internal PageTurnView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PageTurnView_SWIGUpcast(cPtr), cMemoryOwn) + internal PageTurnView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.PageTurnView.PageTurnView_SWIGUpcast(cPtr), cMemoryOwn) { swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - // By default, we do not want the position to use the anchor point - PositionUsesAnchorPoint = false; } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PageTurnView obj) @@ -38,27 +41,16 @@ namespace Tizen.NUI 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. - //Unreference this from if a static instance refer to this. - ViewRegistry.UnregisterView(this); - if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; - NDalicPINVOKE.delete_PageTurnView(swigCPtr); + Interop.PageTurnView.delete_PageTurnView(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } @@ -66,13 +58,12 @@ namespace Tizen.NUI base.Dispose(type); } - - - + /// 3 public class PagePanStartedEventArgs : EventArgs { private PageTurnView _pageTurnView; + /// 3 public PageTurnView PageTurnView { get @@ -86,10 +77,12 @@ namespace Tizen.NUI } } + /// 3 public class PagePanFinishedEventArgs : EventArgs { private PageTurnView _pageTurnView; + /// 3 public PageTurnView PageTurnView { get @@ -103,12 +96,14 @@ namespace Tizen.NUI } } + /// 3 public class PageTurnStartedEventArgs : EventArgs { private PageTurnView _pageTurnView; private uint _pageIndex; private bool _isTurningForward; + /// 3 public PageTurnView PageTurnView { get @@ -121,6 +116,7 @@ namespace Tizen.NUI } } + /// 3 public uint PageIndex { get @@ -133,6 +129,7 @@ namespace Tizen.NUI } } + /// 3 public bool IsTurningForward { get @@ -147,12 +144,14 @@ namespace Tizen.NUI } + /// 3 public class PageTurnFinishedEventArgs : EventArgs { private PageTurnView _pageTurnView; private uint _pageIndex; private bool _isTurningForward; + /// 3 public PageTurnView PageTurnView { get @@ -165,6 +164,7 @@ namespace Tizen.NUI } } + /// 3 public uint PageIndex { get @@ -177,6 +177,7 @@ namespace Tizen.NUI } } + /// 3 public bool IsTurningForward { get @@ -410,169 +411,77 @@ namespace Tizen.NUI return ret; } - - public class Property : global::System.IDisposable + internal new class Property { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - protected bool swigCMemOwn; - - internal Property(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(Property 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; - - - ~Property() - { - 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_PageTurnView_Property(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - disposed = true; - } - - public Property() : this(NDalicPINVOKE.new_PageTurnView_Property(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - public static readonly int PAGE_SIZE = NDalicPINVOKE.PageTurnView_Property_PAGE_SIZE_get(); - public static readonly int CURRENT_PAGE_ID = NDalicPINVOKE.PageTurnView_Property_CURRENT_PAGE_ID_get(); - public static readonly int SPINE_SHADOW = NDalicPINVOKE.PageTurnView_Property_SPINE_SHADOW_get(); - + internal static readonly int VIEW_PAGE_SIZE = Interop.PageTurnView.PageTurnView_Property_VIEW_PAGE_SIZE_get(); + internal static readonly int CURRENT_PAGE_ID = Interop.PageTurnView.PageTurnView_Property_CURRENT_PAGE_ID_get(); + internal static readonly int SPINE_SHADOW = Interop.PageTurnView.PageTurnView_Property_SPINE_SHADOW_get(); } - public PageTurnView() : this(NDalicPINVOKE.new_PageTurnView__SWIG_0(), true) + public PageTurnView() : this(Interop.PageTurnView.new_PageTurnView__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public PageTurnView(PageTurnView handle) : this(NDalicPINVOKE.new_PageTurnView__SWIG_1(PageTurnView.getCPtr(handle)), true) + public PageTurnView(PageTurnView handle) : this(Interop.PageTurnView.new_PageTurnView__SWIG_1(PageTurnView.getCPtr(handle)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public PageTurnView Assign(PageTurnView handle) { - PageTurnView ret = new PageTurnView(NDalicPINVOKE.PageTurnView_Assign(swigCPtr, PageTurnView.getCPtr(handle)), false); + PageTurnView ret = new PageTurnView(Interop.PageTurnView.PageTurnView_Assign(swigCPtr, PageTurnView.getCPtr(handle)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - public new static PageTurnView DownCast(BaseHandle handle) + public static PageTurnView DownCast(BaseHandle handle) { - PageTurnView ret = new PageTurnView(NDalicPINVOKE.PageTurnView_DownCast(BaseHandle.getCPtr(handle)), true); + PageTurnView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PageTurnView; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public PageTurnSignal PageTurnStartedSignal() { - PageTurnSignal ret = new PageTurnSignal(NDalicPINVOKE.PageTurnView_PageTurnStartedSignal(swigCPtr), false); + PageTurnSignal ret = new PageTurnSignal(Interop.PageTurnView.PageTurnView_PageTurnStartedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public PageTurnSignal PageTurnFinishedSignal() { - PageTurnSignal ret = new PageTurnSignal(NDalicPINVOKE.PageTurnView_PageTurnFinishedSignal(swigCPtr), false); + PageTurnSignal ret = new PageTurnSignal(Interop.PageTurnView.PageTurnView_PageTurnFinishedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public PagePanSignal PagePanStartedSignal() { - PagePanSignal ret = new PagePanSignal(NDalicPINVOKE.PageTurnView_PagePanStartedSignal(swigCPtr), false); + PagePanSignal ret = new PagePanSignal(Interop.PageTurnView.PageTurnView_PagePanStartedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public PagePanSignal PagePanFinishedSignal() { - PagePanSignal ret = new PagePanSignal(NDalicPINVOKE.PageTurnView_PagePanFinishedSignal(swigCPtr), false); + PagePanSignal ret = new PagePanSignal(Interop.PageTurnView.PageTurnView_PagePanFinishedSignal(swigCPtr), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } - public enum PropertyRange - { - PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, - PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000 - } public Vector2 PageSize { get { Vector2 temp = new Vector2(0.0f, 0.0f); - GetProperty(PageTurnView.Property.PAGE_SIZE).Get(temp); + GetProperty(PageTurnView.Property.VIEW_PAGE_SIZE).Get(temp); return temp; } set { - SetProperty(PageTurnView.Property.PAGE_SIZE, new Tizen.NUI.PropertyValue(value)); + SetProperty(PageTurnView.Property.VIEW_PAGE_SIZE, new Tizen.NUI.PropertyValue(value)); } } public int CurrentPageId @@ -580,7 +489,7 @@ namespace Tizen.NUI get { int temp = 0; - GetProperty(PageTurnView.Property.CURRENT_PAGE_ID).Get(ref temp); + GetProperty(PageTurnView.Property.CURRENT_PAGE_ID).Get(out temp); return temp; } set @@ -601,7 +510,5 @@ namespace Tizen.NUI SetProperty(PageTurnView.Property.SPINE_SHADOW, new Tizen.NUI.PropertyValue(value)); } } - } - }