[NUI] Replace PropertyMap with Dictionary in HitTest.
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / WebView / WebView.cs
index 3662aed..ff91df6 100755 (executable)
@@ -27,7 +27,7 @@ namespace Tizen.NUI.BaseComponents
     /// WebView allows presenting content with embedded web browser, both local files and remote websites.
     /// </summary>
     /// <since_tizen> 9 </since_tizen>
-    public class WebView : View
+    public partial class WebView : View
     {
         private Color contentBackgroundColor;
         private bool tilesClearedWhenHidden;
@@ -762,6 +762,19 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
+                return (CacheModel)GetValue(CacheModelProperty);
+            }
+            set
+            {
+                SetValue(CacheModelProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
+
+        private CacheModel InternalCacheModel
+        {
+            get
+            {
                 return (CacheModel)Context.CacheModel;
             }
             set
@@ -778,6 +791,19 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
+                return (CookieAcceptPolicy)GetValue(CookieAcceptPolicyProperty);
+            }
+            set
+            {
+                SetValue(CookieAcceptPolicyProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
+
+        private CookieAcceptPolicy InternalCookieAcceptPolicy
+        {
+            get
+            {
                 return (CookieAcceptPolicy)CookieManager.CookieAcceptPolicy;
             }
             set
@@ -811,6 +837,19 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
+                return (bool)GetValue(EnableJavaScriptProperty);
+            }
+            set
+            {
+                SetValue(EnableJavaScriptProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
+
+        private bool InternalEnableJavaScript
+        {
+            get
+            {
                 return Settings.JavaScriptEnabled;
             }
             set
@@ -827,6 +866,19 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
+                return (bool)GetValue(LoadImagesAutomaticallyProperty);
+            }
+            set
+            {
+                SetValue(LoadImagesAutomaticallyProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
+
+        private bool InternalLoadImagesAutomatically
+        {
+            get
+            {
                 return Settings.AutomaticImageLoadingAllowed;
             }
             set
@@ -844,6 +896,19 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
+                return GetValue(DefaultTextEncodingNameProperty) as string;
+            }
+            set
+            {
+                SetValue(DefaultTextEncodingNameProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
+
+        private string InternalDefaultTextEncodingName
+        {
+            get
+            {
                 return Settings.DefaultTextEncodingName;
             }
             set
@@ -860,6 +925,19 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
+                return (int)GetValue(DefaultFontSizeProperty);
+            }
+            set
+            {
+                SetValue(DefaultFontSizeProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
+
+        private int InternalDefaultFontSize
+        {
+            get
+            {
                 return Settings.DefaultFontSize;
             }
             set
@@ -876,6 +954,18 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
+                return GetValue(ScrollPositionProperty) as Position;
+            }
+            set
+            {
+                SetValue(ScrollPositionProperty, value);
+            }
+        }
+
+        private Position InternalScrollPosition
+        {
+            get
+            {
                 Vector2 pv = (Vector2)GetValue(ScrollPositionProperty);
                 return new Position(pv.X, pv.Y);
             }
@@ -1392,8 +1482,8 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Deprecated. Loads a html by string.
-        /// <param name="data">The data of Web</param>
         /// </summary>
+        /// <param name="data">The data of Web</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void LoadHTMLString(string data)
         {
@@ -1414,10 +1504,10 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Loads the specified html as the content of the view to override current history entry.
+        /// </summary>
         /// <param name="html">The html to be loaded</param>
         /// <param name="baseUri">Base URL used for relative paths to external objects</param>
         /// <param name="unreachableUri">URL that could not be reached</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool LoadHtmlStringOverrideCurrentEntry(string html, string baseUri, string unreachableUri)
         {
@@ -1428,12 +1518,12 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Requests to load the given contents by MIME type.
+        /// </summary>
         /// <param name="contents">The contents to be loaded</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>
         /// <param name="baseUri">The base URI to use for relative resources</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool LoadContents(string contents, uint contentSize, string mimeType, string encoding, string baseUri)
         {
@@ -1515,9 +1605,9 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Adds custom header.
+        /// </summary>
         /// <param name="name">The name of custom header</param>
         /// <param name="value">The value of custom header</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool AddCustomHeader(string name, string value)
         {
@@ -1528,8 +1618,8 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Removes custom header.
-        /// <param name="name">The name of custom header</param>
         /// </summary>
+        /// <param name="name">The name of custom header</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool RemoveCustomHeader(string name)
         {
@@ -1540,8 +1630,8 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Starts the inspector server.
-        /// <param name="port">The port number</param>
         /// </summary>
+        /// <param name="port">The port number</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public uint StartInspectorServer(uint port)
         {
@@ -1563,9 +1653,9 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Scrolls page of web view by deltaX and detlaY.
+        /// </summary>
         /// <param name="deltaX">The deltaX of scroll</param>
         /// <param name="deltaY">The deltaY of scroll</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void ScrollBy(int deltaX, int deltaY)
         {
@@ -1575,9 +1665,9 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Scrolls edge of web view by deltaX and deltaY.
+        /// </summary>
         /// <param name="deltaX">The deltaX of scroll</param>
         /// <param name="deltaY">The deltaY of scroll</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool ScrollEdgeBy(int deltaX, int deltaY)
         {
@@ -1608,8 +1698,8 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Returns whether backward is possible.
-        /// <returns>True if backward is possible, false otherwise</returns>
         /// </summary>
+        /// <returns>True if backward is possible, false otherwise</returns>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool CanGoBack()
         {
@@ -1620,8 +1710,8 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Returns whether forward is possible.
-        /// <returns>True if forward is possible, false otherwise</returns>
         /// </summary>
+        /// <returns>True if forward is possible, false otherwise</returns>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool CanGoForward()
         {
@@ -1632,8 +1722,8 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Evaluates JavaScript code represented as a string.
-        /// <param name="script">The JavaScript code</param>
         /// </summary>
+        /// <param name="script">The JavaScript code</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void EvaluateJavaScript(string script)
         {
@@ -1643,9 +1733,9 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Add a message handler into the WebView.
+        /// </summary>
         /// <param name="objectName">The name of exposed object</param>
         /// <param name="handler">The callback function</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void AddJavaScriptMessageHandler(string objectName, JavaScriptMessageHandler handler)
         {
@@ -1663,9 +1753,9 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Add a message handler into the WebView.
-        /// <param name="callback">The callback function</param>
+        /// Registers a callback for JS alert.
         /// </summary>
+        /// <param name="callback">The callback function</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void RegisterJavaScriptAlertCallback(JavaScriptAlertCallback callback)
         {
@@ -1686,9 +1776,9 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Add a message handler into the WebView.
-        /// <param name="callback">The callback function</param>
+        /// Registers a callback for JS confirm.
         /// </summary>
+        /// <param name="callback">The callback function</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void RegisterJavaScriptConfirmCallback(JavaScriptConfirmCallback callback)
         {
@@ -1700,8 +1790,8 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Reply for confirm popup.
-        /// <param name="confirmed">confirmed or not</param>
         /// </summary>
+        /// <param name="confirmed">Confirmed or not</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void JavaScriptConfirmReply(bool confirmed)
         {
@@ -1710,9 +1800,9 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Add a message handler into the WebView.
-        /// <param name="callback">The callback function</param>
+        /// Registers a callback for JS promt.
         /// </summary>
+        /// <param name="callback">The callback function</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void RegisterJavaScriptPromptCallback(JavaScriptPromptCallback callback)
         {
@@ -1724,8 +1814,8 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Reply for prompt popup.
-        /// <param name="result">text in prompt input field.</param>
         /// </summary>
+        /// <param name="result">Text in prompt input field.</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void JavaScriptPromptReply(string result)
         {
@@ -1755,9 +1845,9 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Scales the current page, centered at the given point.
+        /// </summary>
         /// <param name="scaleFactor">The new factor to be scaled</param>
         /// <param name="point">The center coordinate</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void SetScaleFactor(float scaleFactor, Vector2 point)
         {
@@ -1778,8 +1868,8 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Requests to activate/deactivate the accessibility usage set by web app.
-        /// <param name="activated">The new factor to be scaled</param>
         /// </summary>
+        /// <param name="activated">The new factor to be scaled</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void ActivateAccessibility(bool activated)
         {
@@ -1789,10 +1879,10 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Searches and highlights the given string in the document.
+        /// </summary>
         /// <param name="text">The text to be searched</param>
         /// <param name="options">The options to search</param>
         /// <param name="maxMatchCount">The maximum match count to search</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool HighlightText(string text, FindOption options, uint maxMatchCount)
         {
@@ -1803,9 +1893,9 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Adds dynamic certificate path.
+        /// </summary>
         /// <param name="host">Host that required client authentication</param>
         /// <param name="certPath">The file path stored certificate</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void AddDynamicCertificatePath(string host, string certPath)
         {
@@ -1815,9 +1905,9 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Get snapshot of the specified viewArea of page.
+        /// </summary>
         /// <param name="viewArea">Host that required client authentication</param>
         /// <param name="scaleFactor">The file path stored certificate</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public ImageView GetScreenshot(Rectangle viewArea, float scaleFactor)
         {
@@ -1829,10 +1919,10 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Get snapshot of the specified viewArea of page.
+        /// </summary>
         /// <param name="viewArea">Host that required client authentication</param>
         /// <param name="scaleFactor">The file path stored certificate</param>
         /// <param name="callback">The callback for getting screen shot</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool GetScreenshotAsynchronously(Rectangle viewArea, float scaleFactor, ScreenshotAcquiredCallback callback)
         {
@@ -1844,9 +1934,9 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Asynchronous requests to check if there is a video playing in the given view.
-        /// <param name="callback">The callback called after checking if video is playing or not</param>
+        /// Asynchronously requests to check if there is a video playing in the given view.
         /// </summary>
+        /// <param name="callback">The callback called after checking if video is playing or not</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool CheckVideoPlayingAsynchronously(VideoPlayingCallback callback)
         {
@@ -1858,8 +1948,8 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Registers callback which will be called upon geolocation permission request.
-        /// <param name="callback">The callback for requesting geolocation permission</param>
         /// </summary>
+        /// <param name="callback">The callback for requesting geolocation permission</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void RegisterGeolocationPermissionCallback(GeolocationPermissionCallback callback)
         {
@@ -1870,10 +1960,10 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Does hit test synchronously.
+        /// </summary>
         /// <param name="x">the horizontal position to query</param>
         /// <param name="y">the vertical position to query</param>
         /// <param name="mode">the mode of hit test</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public WebHitTestResult HitTest(int x, int y, HitTestMode mode)
         {
@@ -1884,11 +1974,11 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Does hit test asynchronously.
+        /// </summary>
         /// <param name="x">the horizontal position to query</param>
         /// <param name="y">the vertical position to query</param>
         /// <param name="mode">the mode of hit test</param>
         /// <param name="callback">the callback that is called after hit test is finished.</param>
-        /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public bool HitTestAsynchronously(int x, int y, HitTestMode mode, HitTestFinishedCallback callback)
         {
@@ -1922,6 +2012,7 @@ namespace Tizen.NUI.BaseComponents
         /// Please note that it only works when the webview does not have keyinput focus.
         /// If the webview has a keyinput focus, it also has tts focus so calling SetTtsFocus(false) is ignored.
         /// </summary>
+        /// <param name="focused">Focused or not</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void SetTtsFocus(bool focused)
         {
@@ -1932,8 +2023,8 @@ namespace Tizen.NUI.BaseComponents
         /// <summary>
         /// Get a plain text of current web page asynchronously.
         /// Please note that it gets plain text of currently loaded page so please call this method after page load finished.
-        /// <param name="callback">The callback for getting plain text</param>
         /// </summary>
+        /// <param name="callback">The callback for getting plain text</param>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void GetPlainTextAsynchronously(PlainTextReceivedCallback callback)
         {
@@ -1950,11 +2041,6 @@ namespace Tizen.NUI.BaseComponents
             return ret;
         }
 
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebView obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
-        }
-
         internal WebView Assign(WebView webView)
         {
             WebView ret = new WebView(Interop.WebView.Assign(SwigCPtr, WebView.getCPtr(webView)), false);