private bool? _borderOnly = null;
private string _url = null;
private bool? _orientationCorrection = null;
+
+
+ internal class ResourceLoadedEventArgs : EventArgs
+ {
+ private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
+ public ResourceLoadingStatusType Status
+ {
+ get
+ {
+ return status;
+ }
+ set
+ {
+ status = value;
+ }
+ }
+ }
+
+ private EventHandler<ResourceLoadedEventArgs> _resourceLoadedEventHandler;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void _resourceLoadedCallbackType(IntPtr view);
+ private _resourceLoadedCallbackType _resourceLoadedCallback;
+
+ internal event EventHandler<ResourceLoadedEventArgs> ResourceLoaded
+ {
+ add
+ {
+ if (_resourceLoadedEventHandler == null)
+ {
+ _resourceLoadedCallback = OnResourceLoaded;
+ this.ResourceReadySignal(this).Connect(_resourceLoadedCallback);
+ }
+
+ _resourceLoadedEventHandler += value;
+ }
+ remove
+ {
+ _resourceLoadedEventHandler -= value;
+
+ if (_resourceLoadedEventHandler == null && this.ResourceReadySignal(this).Empty() == false)
+ {
+ this.ResourceReadySignal(this).Disconnect(_resourceLoadedCallback);
+ }
+ }
+ }
+
+ private void OnResourceLoaded(IntPtr view)
+ {
+ ResourceLoadedEventArgs e = new ResourceLoadedEventArgs();
+ e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.IMAGE);
+
+ if (_resourceLoadedEventHandler != null)
+ {
+ _resourceLoadedEventHandler(this, e);
+ }
+ }
+
+ internal ResourceLoadingStatusType GetResourceStatus()
+ {
+ return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.IMAGE);
+ }
+
+
}
}
this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
}
+ if (_backgroundResourceLoadedCallback != null)
+ {
+ this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
+ }
+
// BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
// Restore current CPtr.
swigCPtr = currentCPtr;
}
}
+ internal class BackgroundResourceLoadedEventArgs : EventArgs
+ {
+ private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
+ public ResourceLoadingStatusType Status
+ {
+ get
+ {
+ return status;
+ }
+ set
+ {
+ status = value;
+ }
+ }
+ }
+
+ private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
+ private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
+
+ internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
+ {
+ add
+ {
+ if (_backgroundResourceLoadedEventHandler == null)
+ {
+ _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
+ this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
+ }
+
+ _backgroundResourceLoadedEventHandler += value;
+ }
+ remove
+ {
+ _backgroundResourceLoadedEventHandler -= value;
+
+ if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
+ {
+ this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
+ }
+ }
+ }
+
+ private void OnBackgroundResourceLoaded(IntPtr view)
+ {
+ BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
+ e.Status = (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
+
+ if (_backgroundResourceLoadedEventHandler != null)
+ {
+ _backgroundResourceLoadedEventHandler(this, e);
+ }
+ }
+
+ internal ResourceLoadingStatusType GetBackgroundResourceStatus()
+ {
+ return (ResourceLoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
+ }
+
+
}
/// <summary>
WrapContent = -2,
}
+ internal enum ResourceLoadingStatusType
+ {
+ Invalid = -1,
+ Preparing = 0,
+ Ready,
+ Failed,
+ }
+
}