[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_StyleManager_SWIGUpcast")]
public static extern global::System.IntPtr Upcast(global::System.IntPtr jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_StyleManager_SetBrokenImageUrl")]
+ public static extern void SetBrokenImageUrl(global::System.Runtime.InteropServices.HandleRef jarg1,uint jarg2, string jarg3);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_StyleManager_GetBrokenImageUrl")]
+ public static extern string GetBrokenImageUrl(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2);
}
}
}
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ /// <summary>
+ /// The Type of BrokenImage
+ /// </summary>
+ internal enum BrokenImageType
+ {
+ Small = 0,
+ Normal = 1,
+ Large = 2
+ }
+
+ /// <summary>
+ /// Sets the broken image url.
+ /// The broken image is the image to show when image loading is failed.
+ /// When the broken image and type are set in the Application,
+ /// the proper brokenImage is set automatically considering the size of view and the size of the brokenImage.
+ /// This Api is used from theme manager.
+ /// </summary>
+ /// <param name="type"> The type for brokenImage </param>
+ /// <param name="url"> The url for brokenImage </param>
+ internal void SetBrokenImageUrl(BrokenImageType type, string url)
+ {
+ Interop.StyleManager.SetBrokenImageUrl(SwigCPtr, (uint)type, url);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Gets the broken image url
+ /// </summary>
+ /// <param name="type"> The type for brokenImage</param>
+ /// <returns> the url for brokenImage </returns>
+ internal string GetBrokenImageUrl(BrokenImageType type)
+ {
+ string ret = Interop.StyleManager.GetBrokenImageUrl(SwigCPtr, (uint)type);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
internal StyleManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
}
public string Version { get; set; } = null;
/// <summary>
+ /// The url of small broken image
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string SmallBrokenImageUrl { get; set; } = null;
+
+ /// <summary>
+ /// The url of broken image
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string BrokenImageUrl { get; set; } = null;
+
+ /// <summary>
+ /// The url of large broken image
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string LargeBrokenImageUrl { get; set; } = null;
+
+ /// <summary>
/// For Xaml use only.
/// The bulit-in theme id that will be used as base of this.
/// View styles with same key are merged.
var result = new Theme()
{
Id = this.Id,
- Resources = Resources
+ Resources = Resources,
+ SmallBrokenImageUrl = this.SmallBrokenImageUrl,
+ BrokenImageUrl = this.BrokenImageUrl,
+ LargeBrokenImageUrl = this.LargeBrokenImageUrl
};
foreach (var item in this)
if (Version == null) Version = theme.Version;
+ SmallBrokenImageUrl = theme.SmallBrokenImageUrl;
+
+ BrokenImageUrl = theme.BrokenImageUrl;
+
+ LargeBrokenImageUrl = theme.LargeBrokenImageUrl;
+
foreach (var item in theme)
{
if (item.Value == null)
Version = theme.Version;
}
+ SmallBrokenImageUrl = theme.SmallBrokenImageUrl;
+
+ BrokenImageUrl = theme.BrokenImageUrl;
+
+ LargeBrokenImageUrl = theme.LargeBrokenImageUrl;
+
+
foreach (var item in theme)
{
if (item.Value == null)
newTheme.Id = "NONAME";
}
+ StyleManager.Instance.SetBrokenImageUrl(StyleManager.BrokenImageType.Small, newTheme.SmallBrokenImageUrl ?? "");
+ StyleManager.Instance.SetBrokenImageUrl(StyleManager.BrokenImageType.Normal, newTheme.BrokenImageUrl ?? "");
+ StyleManager.Instance.SetBrokenImageUrl(StyleManager.BrokenImageType.Large, newTheme.LargeBrokenImageUrl ?? "");
+
userTheme = newTheme;
UpdateThemeForInitialize();
UpdateThemeForUpdate();