*
*/
+using System.Runtime.InteropServices;
+
namespace Tizen.NUI
{
internal static partial class Interop
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
public static extern bool LoadContents(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, uint jarg3, string jarg4, string jarg5, string jarg6);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "CSharp_Dali_WebView_LoadContents")]
+ [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+ public static extern bool LoadContents(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPArray)] byte[] jarg2, uint jarg3, string jarg4, string jarg5, string jarg6);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_Reload")]
public static extern void Reload(global::System.Runtime.InteropServices.HandleRef jarg1);
[EditorBrowsable(EditorBrowsableState.Never)]
public IList<WebBackForwardListItem> GetForwardItems(int limit)
{
- System.IntPtr itemPtr = Interop.WebBackForwardList.GetBackwardItems(SwigCPtr, limit);
+ System.IntPtr itemPtr = Interop.WebBackForwardList.GetForwardItems(SwigCPtr, limit);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
if (forwardItemList != null)
/// This function can be used inside or outside WebContext.HttpRequestIntercepted.
/// After this call, any further call on WebHttpRequestInterceptor results in undefined behavior.
/// </summary>
- /// <param name="body">Contents of response</param>
+ /// <param name="body">Contents of response. For UTF-8 encoding, body would be got like System.Text.Encoding.UTF8.GetString(...)</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool SetResponseBody(string body)
{
/// After this call, any further call on WebHttpRequestInterceptor results in undefined behavior.
/// </summary>
/// <param name="headers">Headers of response</param>
- /// <param name="body">Contents of response</param>
+ /// <param name="body">Contents of response. For UTF-8 encoding, body would be got like System.Text.Encoding.UTF8.GetString(...)</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool SetResponse(string headers, string body)
{
/// After writing full response body in chunks using this function,
/// call it again with null as chunk, to signal that response body is finished.
/// </summary>
- /// <param name="chunk">Chunk of response</param>
+ /// <param name="chunk">Chunk of response. For UTF-8 encoding, chunk would be got like System.Text.Encoding.UTF8.GetString(...)</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool WriteResponseChunk(string chunk)
{
/// <summary>
/// Background color of web page.
+ /// Please note that it only works after LoadUrl, etc.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Color ContentBackgroundColor
/// <summary>
/// Requests to load the given contents by MIME type.
/// </summary>
- /// <param name="contents">The contents to be loaded</param>
+ /// <param name="contents">The contents to be loaded in bytes</param>
+ /// <param name="mimeType">The type of contents, "text/html" is assumed if null</param>
+ /// <param name="encoding">The encoding for contents, "UTF-8" is assumed if null</param>
+ /// <param name="baseUri">The base URI to use for relative resources</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool LoadContents(byte[] contents, string mimeType, string encoding, string baseUri)
+ {
+ int length = contents != null ? contents.Length : 0;
+ bool result = Interop.WebView.LoadContents(SwigCPtr, contents, (uint)length, mimeType, encoding, baseUri);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
+ }
+
+ /// <summary>
+ /// Requests to load the given contents by MIME type.
+ /// </summary>
+ /// <param name="contents">The contents to be loaded. For UTF-8 encoding, contents would be got like System.Text.Encoding.UTF8.GetString(...)</param>
/// <param name="contentSize">The size of contents (in bytes)</param>
/// <param name="mimeType">The type of contents, "text/html" is assumed if null</param>
/// <param name="encoding">The encoding for contents, "UTF-8" is assumed if null</param>