+ 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);
+ }
+
+