コード例 #1
0
ファイル: WidgetView.cs プロジェクト: wonrst/TizenFX
        /// <summary>
        /// To make the Button instance be disposed.
        /// </summary>
        /// <since_tizen> 3 </since_tizen>
        protected override void Dispose(DisposeTypes type)
        {
            if (disposed)
            {
                return;
            }

            //Remove Widget from WidgetViewManager
            WidgetViewManager.Instance.RemoveWidget(this);

            //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 (widgetAddedEventCallback != null)
            {
                WidgetViewSignal widgetAdded = this.WidgetAddedSignal();
                widgetAdded?.Disconnect(widgetAddedEventCallback);
                widgetAdded?.Dispose();
            }

            if (widgetContentUpdatedEventCallback != null)
            {
                WidgetViewSignal widgetContentUpdated = this.WidgetContentUpdatedSignal();
                widgetContentUpdated?.Disconnect(widgetContentUpdatedEventCallback);
                widgetContentUpdated?.Dispose();
            }

            if (widgetCreationAbortedEventCallback != null)
            {
                WidgetViewSignal widgetCreationAborted = this.WidgetCreationAbortedSignal();
                widgetCreationAborted?.Disconnect(widgetCreationAbortedEventCallback);
                widgetCreationAborted?.Dispose();
            }

            if (widgetDeletedEventCallback != null)
            {
                WidgetViewSignal widgetDeleted = this.WidgetDeletedSignal();
                widgetDeleted?.Disconnect(widgetDeletedEventCallback);
                widgetDeleted?.Dispose();
            }

            if (widgetFaultedEventCallback != null)
            {
                WidgetViewSignal widgetFaulted = this.WidgetFaultedSignal();
                widgetFaulted?.Disconnect(widgetFaultedEventCallback);
                widgetFaulted?.Dispose();
            }

            if (widgetUpdatePeriodChangedEventCallback != null)
            {
                WidgetViewSignal widgetUpdatePeriodChanged = this.WidgetUpdatePeriodChangedSignal();
                widgetUpdatePeriodChanged?.Disconnect(widgetUpdatePeriodChangedEventCallback);
                widgetUpdatePeriodChanged?.Dispose();
            }

            base.Dispose(type);
        }
コード例 #2
0
ファイル: WidgetView.cs プロジェクト: dmichaluk/TizenFX
        internal WidgetViewSignal WidgetFaultedSignal()
        {
            WidgetViewSignal ret = new WidgetViewSignal(Interop.WidgetView.WidgetFaultedSignal(SwigCPtr), false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #3
0
        internal WidgetViewSignal WidgetUpdatePeriodChangedSignal()
        {
            WidgetViewSignal ret = new WidgetViewSignal(NDalicManualPINVOKE.WidgetView_WidgetUpdatePeriodChangedSignal(swigCPtr), false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #4
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetViewSignal obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }