From 20a5c5434a8365ae41250cec47a7f10c58ddc144 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Mon, 6 Nov 2017 16:31:13 +0900 Subject: [PATCH] [NUI] Added LoadingStatus property in ImageView. The purpose was to check whether Image loading was successful or not. (https://review.tizen.org/gerrit/#/c/158730/2) Change-Id: I5d6aedd9de0d99dd2b5d45f545dda944101ee3a4 Signed-off-by: dongsug.song --- src/Tizen.NUI/src/internal/ManualPINVOKE.cs | 3 ++ .../src/public/BaseComponents/ImageView.cs | 35 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs index d98da17..13a3bc2 100755 --- a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs @@ -181,6 +181,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_ViewWrapperImpl_CreateTransition")] public static extern global::System.IntPtr ViewWrapperImpl_CreateTransition(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_View_GetVisualResourceStatus")] + public static extern int View_GetVisualResourceStatus(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_View_CreateTransition")] public static extern global::System.IntPtr View_CreateTransition(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); diff --git a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs index 4d0c1f3..90d8321 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs @@ -435,6 +435,41 @@ namespace Tizen.NUI.BaseComponents } + /// + /// Get the loading state of the visual resource. + /// + /// 5 + public ImageView.LoadingStatusType LoadingStatus + { + get + { + return (ImageView.LoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(swigCPtr, (int)Property.IMAGE); + } + } + + /// + /// Enumeration for LoadingStatus of image. + /// + /// 5 + public enum LoadingStatusType + { + /// + /// Loading preparing status. + /// + /// 5 + Preparing, + /// + /// Loading ready status. + /// + /// 5 + Ready, + /// + /// Loading failed status. + /// + /// 5 + Failed + } + private void UpdateImage() { -- 2.7.4