This patch is to implement context menu APIs of webview.
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class WebContextMenu
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebContextMenu")]
+ public static extern void DeleteWebContextMenu(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_GetItemCount")]
+ public static extern uint GetItemCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_GetItemAt")]
+ public static extern System.IntPtr GetItemAt(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_GetItemList")]
+ public static extern System.IntPtr GetItemList(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_GetPosition")]
+ public static extern System.IntPtr GetPosition(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_RemoveItem")]
+ public static extern bool RemoveItem(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_AppendItemAsAction")]
+ public static extern bool AppendItemAsAction(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, string jarg3, bool jarg4);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_AppendItem")]
+ public static extern bool AppendItem(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, string jarg3, string jarg4, bool jarg5);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_SelectItem")]
+ public static extern bool SelectItem(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_Hide")]
+ public static extern bool Hide(global::System.Runtime.InteropServices.HandleRef jarg1);
+ }
+ }
+}
+
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class WebContextMenuItem
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebContextMenuItem")]
+ public static extern void DeleteWebContextMenuItem(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenuItem_GetTag")]
+ public static extern int GetTag(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenuItem_GetType")]
+ public static extern int GetType(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenuItem_IsEnabled")]
+ public static extern bool IsEnabled(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenuItem_GetLinkUrl")]
+ public static extern string GetLinkUrl(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenuItem_GetImageUrl")]
+ public static extern string GetImageUrl(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenuItem_GetTitle")]
+ public static extern string GetTitle(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenuItem_GetParentMenu")]
+ public static extern System.IntPtr GetParentMenu(global::System.Runtime.InteropServices.HandleRef jarg1);
+ }
+ }
+}
+
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class WebContextMenuItemList
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebContextMenu_ItemList")]
+ public static extern void DeleteWebContextMenuItemList(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_ItemList_GetItemCount")]
+ public static extern uint GetItemCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContextMenu_ItemList_ValueOfIndex")]
+ public static extern System.IntPtr ValueOfIndex(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2);
+ }
+ }
+}
+
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class WebPasswordData
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebPasswordData_GetUrl")]
+ public static extern string GetUrl(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebPasswordData_GetUseFingerprint")]
+ public static extern bool GetUseFingerprint(global::System.Runtime.InteropServices.HandleRef jarg1);
+ }
+ }
+}
+
{
internal static partial class Interop
{
- internal static partial class WebPasswordData
- {
- [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebPasswordData_GetUrl")]
- public static extern string GetUrl(global::System.Runtime.InteropServices.HandleRef jarg1);
-
- [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebPasswordData_GetUseFingerprint")]
- public static extern bool GetUseFingerprint(global::System.Runtime.InteropServices.HandleRef jarg1);
- }
-
internal static partial class WebPasswordDataList
{
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebPasswordDataList")]
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class WebSecurityOrigin
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebSecurityOrigin_GetHost")]
+ public static extern string GetHost(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebSecurityOrigin_GetProtocol")]
+ public static extern string GetProtocol(global::System.Runtime.InteropServices.HandleRef jarg1);
+ }
+ }
+}
+
{
internal static partial class Interop
{
- internal static partial class WebSecurityOrigin
- {
- [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebSecurityOrigin_GetHost")]
- public static extern string GetHost(global::System.Runtime.InteropServices.HandleRef jarg1);
-
- [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebSecurityOrigin_GetProtocol")]
- public static extern string GetProtocol(global::System.Runtime.InteropServices.HandleRef jarg1);
- }
-
internal static partial class WebSecurityOriginList
{
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebSecurityOriginList")]
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewConsoleMessageSignal_Disconnect")]
public static extern void WebViewConsoleMessageSignalDisconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_WebViewContextMenuCustomizedSignal_ContextMenuCustomized")]
+ public static extern global::System.IntPtr NewWebViewContextMenuCustomizedSignalContextMenuCustomized(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebViewContextMenuCustomizedSignal")]
+ public static extern void DeleteWebViewContextMenuCustomizedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewContextMenuCustomizedSignal_Connect")]
+ public static extern void WebViewContextMenuCustomizedSignalConnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewContextMenuCustomizedSignal_Disconnect")]
+ public static extern void WebViewContextMenuCustomizedSignalDisconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_WebViewContextMenuItemSelectedSignal_ContextMenuItemSelected")]
+ public static extern global::System.IntPtr NewWebViewContextMenuItemSelectedSignalContextMenuItemSelected(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebViewContextMenuItemSelectedSignal")]
+ public static extern void DeleteWebViewContextMenuItemSelectedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewContextMenuItemSelectedSignal_Connect")]
+ public static extern void WebViewContextMenuItemSelectedSignalConnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebViewContextMenuItemSelectedSignal_Disconnect")]
+ public static extern void WebViewContextMenuItemSelectedSignalDisconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
}
}
}
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// It is a class for context menu of web view.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebContextMenu : Disposable
+ {
+ internal WebContextMenu(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// This will not be public opened.
+ /// <param name="swigCPtr"></param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.WebContextMenu.DeleteWebContextMenu(swigCPtr);
+ }
+
+ /// <summary>
+ /// Counts items of the context menu.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint ItemCount
+ {
+ get
+ {
+ return Interop.WebContextMenu.GetItemCount(SwigCPtr);
+ }
+ }
+
+ /// <summary>
+ /// Gets the list of items.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public WebContextMenuItemList ItemList
+ {
+ get
+ {
+ IntPtr result = Interop.WebContextMenu.GetItemList(SwigCPtr);
+ return new WebContextMenuItemList(result, true);
+ }
+ }
+
+ /// <summary>
+ /// Gets position of the context menu.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Vector2 Position
+ {
+ get
+ {
+ IntPtr result = Interop.WebContextMenu.GetPosition(SwigCPtr);
+ return new Vector2(result, true);
+ }
+ }
+
+ /// <summary>
+ /// Returns the nth item in a context menu.
+ /// <param name="index">The position of the item</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public WebContextMenuItem GetItemAtIndex(uint index)
+ {
+ IntPtr result = Interop.WebContextMenu.GetItemAt(SwigCPtr, index);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return new WebContextMenuItem(result, true);
+ }
+
+ /// <summary>
+ /// Removes the item from the context menu.
+ /// <param name="item">The item to be removed</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool RemoveItem(WebContextMenuItem item)
+ {
+ bool result = Interop.WebContextMenu.RemoveItem(SwigCPtr, WebContextMenuItem.getCPtr(item));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
+ }
+
+ /// <summary>
+ /// Adds the item with a title to the context menu.
+ /// <param name="tag">The tag of context menu item</param>
+ /// <param name="title">The title of context menu item</param>
+ /// <param name="enabled">Whether context menu item is enabled or not</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool AppendItem(WebContextMenuItem.ItemTag tag, string title, bool enabled)
+ {
+ bool result = Interop.WebContextMenu.AppendItemAsAction(SwigCPtr, (int)tag, title, enabled);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
+ }
+
+ /// <summary>
+ /// Adds the item with a title and an icon to the context menu.
+ /// <param name="tag">The tag of context menu item</param>
+ /// <param name="title">The title of context menu item</param>
+ /// <param name="iconFile">The path of icon to be set on context menu item</param>
+ /// <param name="enabled">Whether context menu item is enabled or not</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool AppendItem(WebContextMenuItem.ItemTag tag, string title, string iconFile, bool enabled)
+ {
+ bool result = Interop.WebContextMenu.AppendItem(SwigCPtr, (int)tag, title, iconFile, enabled);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
+ }
+
+ /// <summary>
+ /// Selects the item from the context menu.
+ /// <param name="item">The item to be selected</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool SelectItem(WebContextMenuItem item)
+ {
+ bool result = Interop.WebContextMenu.SelectItem(SwigCPtr, WebContextMenuItem.getCPtr(item));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
+ }
+
+ /// <summary>
+ /// Hides the context menu.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool Hide()
+ {
+ bool result = Interop.WebContextMenu.Hide(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// It is a class for context menu item of web view.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebContextMenuItem : Disposable
+ {
+ internal WebContextMenuItem(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// This will not be public opened.
+ /// <param name="swigCPtr"></param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.WebContextMenuItem.DeleteWebContextMenuItem(swigCPtr);
+ }
+
+ /// <summary>
+ /// Enum that provides the tags of items for the context menu.
+ /// </summary>
+ public enum ItemTag
+ {
+ NoAction = 0,
+ OpenLinkInNewWindow,
+ DownloadLinkToDisk,
+ CopyLinkToClipboard,
+ OpenImageInNewWindow,
+ OpenImageInCurrentWindow,
+ DownloadImageToDisk,
+ CopyImageToClipboard,
+ OpenFrameInNewWindow,
+ Copy,
+ GoBack,
+ GoForward,
+ Stop,
+ Share,
+ Reload,
+ Cut,
+ Paste,
+ SpellingGuess,
+ NoGuessesFound,
+ IgnoreSpelling,
+ LearnSpelling,
+ Other,
+ SearchInSpotlight,
+ SearchWeb,
+ LookUpInDictionary,
+ OpenWithDefaultApplication,
+ PdfActualSize,
+ PdfZoomIn,
+ PdfZoomOut,
+ PdfAutoSize,
+ PdfSinglePage,
+ PdfPaging,
+ PdfContinuous,
+ PdfNextPage,
+ PdfPreviousPage,
+ OpenLink,
+ IgnoreGrammar,
+ SpellingMenu,
+ ShowSpellingPanel,
+ CheckSpelling,
+ CheckSpellingWhiteTyping,
+ CheckGrammarWithSpelling,
+ FontMenu,
+ ShowFonts,
+ Bold,
+ Italic,
+ Underline,
+ Outline,
+ Styles,
+ ShowColors,
+ SpeechMenu,
+ StartSpeaking,
+ StopSpeaking,
+ WritingDirectionMenu,
+ DefaultDirection,
+ LeftToRight,
+ RightToLeft,
+ PdfSinglePageScrolling,
+ PdfFacingPageScrolling,
+ InspectElement,
+ TextDirectionMenu,
+ TextDirectionDefault,
+ TextDirectionLeftToRight,
+ TextDirectionRightToLeft,
+ CorrectSpellingAutomatically,
+ SubstitutionMenu,
+ ShowSubstitutions,
+ SmartCopyPaste,
+ SmartQuotes,
+ SmartDashes,
+ SmartLinks,
+ TextReplacement,
+ TransformationMenu,
+ MakeUpperCase,
+ MakeLowerCase,
+ Capitalize,
+ ChangeBack,
+ OpenMediaInNewWindow,
+ CopyMediaLinkToClipboard,
+ ToggleMediaControls,
+ ToggleMediaLoop,
+ EnterVideoFullscreen,
+ MediaPlayPause,
+ MediaMute,
+ DictationAlternative,
+ SelectAll,
+ SelectWord,
+ TextSelectionMode,
+ Clipboard,
+ Drag,
+ Translate,
+ CopyLinkData,
+ }
+
+ /// <summary>
+ /// Enum that defines the types of the items for the context menu.
+ /// </summary>
+ public enum ItemType
+ {
+ Action,
+ CheckableAction,
+ Separator,
+ Submenu,
+ };
+
+ /// <summary>
+ /// Gets the tag of context menu item.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public ItemTag Tag
+ {
+ get
+ {
+ return (ItemTag)Interop.WebContextMenuItem.GetTag(SwigCPtr);
+ }
+ }
+
+ /// <summary>
+ /// Gets the type of context menu item.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public ItemType Type
+ {
+ get
+ {
+ return (ItemType)Interop.WebContextMenuItem.GetType(SwigCPtr);
+ }
+ }
+
+ /// <summary>
+ /// Checks if the item is enabled or not.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsEnabled
+ {
+ get
+ {
+ return Interop.WebContextMenuItem.IsEnabled(SwigCPtr);
+ }
+ }
+
+ /// <summary>
+ /// Gets the link url of context menu item.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string LinkUrl
+ {
+ get
+ {
+ return Interop.WebContextMenuItem.GetLinkUrl(SwigCPtr);
+ }
+ }
+
+ /// <summary>
+ /// Gets the image url of context menu item.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string ImageUrl
+ {
+ get
+ {
+ return Interop.WebContextMenuItem.GetImageUrl(SwigCPtr);
+ }
+ }
+
+ /// <summary>
+ /// Gets the title of the item.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string Title
+ {
+ get
+ {
+ return Interop.WebContextMenuItem.GetTitle(SwigCPtr);
+ }
+ }
+
+ /// <summary>
+ /// Gets the parent menu for the item.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public WebContextMenu ParentMenu
+ {
+ get
+ {
+ IntPtr result = Interop.WebContextMenuItem.GetParentMenu(SwigCPtr);
+ return new WebContextMenu(result, true);
+ }
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebContextMenuItem obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// It is a class for form repost policy decision maker of web view.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebContextMenuItemList : Disposable
+ {
+ internal WebContextMenuItemList(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// This will not be public opened.
+ /// <param name="swigCPtr"></param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.WebContextMenuItemList.DeleteWebContextMenuItemList(swigCPtr);
+ }
+
+ /// <summary>
+ /// Gets item count
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint ItemCount
+ {
+ get
+ {
+ return Interop.WebContextMenuItemList.GetItemCount(SwigCPtr);
+ }
+ }
+
+ /// <summary>
+ /// Gets item at the index.
+ /// <param name="index">The index of item</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public WebContextMenuItem GetItemAtIndex(uint index)
+ {
+ IntPtr result = Interop.WebContextMenuItemList.ValueOfIndex(SwigCPtr, index);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return new WebContextMenuItem(result, false);
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// It is a class for password data of web view.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebPasswordData : Disposable
+ {
+ internal WebPasswordData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// <summary>
+ /// Url which password is related to.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string Url
+ {
+ get
+ {
+ return Interop.WebPasswordData.GetUrl(SwigCPtr);
+ }
+ }
+
+ /// <summary>
+ /// Whether fingerprint is used or not.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool FingerprintUsed
+ {
+ get
+ {
+ return Interop.WebPasswordData.GetUseFingerprint(SwigCPtr);
+ }
+ }
+ }
+}
namespace Tizen.NUI
{
/// <summary>
- /// It is a class for password data of web view.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class WebPasswordData : Disposable
- {
- internal WebPasswordData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
- {
- }
-
- /// <summary>
- /// Url which password is related to.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public string Url
- {
- get
- {
- string result = Interop.WebPasswordData.GetUrl(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) return null;
- return result;
- }
- }
-
- /// <summary>
- /// Whether fingerprint is used or not.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public bool UseFingerprint
- {
- get
- {
- bool result = Interop.WebPasswordData.GetUseFingerprint(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) return false;
- return result;
- }
- }
- }
-
- /// <summary>
/// It is a class for password data list of web view.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
{
get
{
- uint result = Interop.WebPasswordDataList.GetItemCount(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) return 0;
- return result;
+ return Interop.WebPasswordDataList.GetItemCount(SwigCPtr);
}
}
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// It is a class for security origin of web view.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebSecurityOrigin : Disposable
+ {
+ internal WebSecurityOrigin(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// <summary>
+ /// Host of security origin.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string Host
+ {
+ get
+ {
+ return Interop.WebSecurityOrigin.GetHost(SwigCPtr);
+ }
+ }
+
+ /// <summary>
+ /// Protocol of security origin.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string Protocol
+ {
+ get
+ {
+ return Interop.WebSecurityOrigin.GetProtocol(SwigCPtr);
+ }
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebSecurityOrigin obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
+ }
+ }
+}
namespace Tizen.NUI
{
/// <summary>
- /// It is a class for security origin of web view.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public class WebSecurityOrigin : Disposable
- {
- internal WebSecurityOrigin(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
- {
- }
-
- /// <summary>
- /// Host of security origin.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public string Host
- {
- get
- {
- string result = Interop.WebSecurityOrigin.GetHost(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) return null;
- return result;
- }
- }
-
- /// <summary>
- /// Protocol of security origin.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public string Protocol
- {
- get
- {
- string result = Interop.WebSecurityOrigin.GetProtocol(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) return null;
- return result;
- }
- }
-
- internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebSecurityOrigin obj)
- {
- return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
- }
- }
-
- /// <summary>
/// It is a class for security origin list of web view.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
{
get
{
- uint result = Interop.WebSecurityOriginList.GetItemCount(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) return 0;
- return result;
+ return Interop.WebSecurityOriginList.GetItemCount(SwigCPtr);
}
}
private EventHandler<WebViewConsoleMessageReceivedEventArgs> consoleMessageReceivedEventHandler;
private WebViewConsoleMessageReceivedCallbackDelegate consoleMessageReceivedCallback;
+ private readonly WebViewContextMenuCustomizedSignal contextMenuCustomizedSignal;
+ private EventHandler<WebViewContextMenuCustomizedEventArgs> contextMenuCustomizedEventHandler;
+ private WebViewContextMenuCustomizedCallbackDelegate contextMenuCustomizedCallback;
+
+ private readonly WebViewContextMenuItemSelectedSignal contextMenuItemSelectedSignal;
+ private EventHandler<WebViewContextMenuItemSelectedEventArgs> contextMenuItemSelectedEventHandler;
+ private WebViewContextMenuItemSelectedCallbackDelegate contextMenuItemSelectedCallback;
+
/// <summary>
/// Creates a WebView.
/// </summary>
httpAuthRequestedSignal = new WebViewHttpAuthRequestedSignal(Interop.WebView.NewWebViewHttpAuthHandlerSignalHttpAuthHandler(SwigCPtr));
httpRequestInterceptedSignal = new WebViewHttpRequestInterceptedSignal(Interop.WebView.NewWebViewRequestInterceptorSignalRequestInterceptor(SwigCPtr));
consoleMessageReceivedSignal = new WebViewConsoleMessageReceivedSignal(Interop.WebView.NewWebViewConsoleMessageSignalConsoleMessage(SwigCPtr));
+ contextMenuCustomizedSignal = new WebViewContextMenuCustomizedSignal(Interop.WebView.NewWebViewContextMenuCustomizedSignalContextMenuCustomized(SwigCPtr));
+ contextMenuItemSelectedSignal = new WebViewContextMenuItemSelectedSignal(Interop.WebView.NewWebViewContextMenuItemSelectedSignalContextMenuItemSelected(SwigCPtr));
screenshotAcquiredProxyCallback = OnScreenshotAcquired;
httpAuthRequestedSignal.Dispose();
httpRequestInterceptedSignal.Dispose();
consoleMessageReceivedSignal.Dispose();
+ contextMenuCustomizedSignal.Dispose();
+ contextMenuItemSelectedSignal.Dispose();
BackForwardList.Dispose();
Context.Dispose();
base.Dispose(type);
}
+ /// This will not be public opened.
+ /// <param name="swigCPtr"></param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.WebView.DeleteWebView(swigCPtr);
+ }
+
/// <summary>
/// The callback function that is invoked when the message is received from the script.
/// </summary>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate void WebViewConsoleMessageReceivedCallbackDelegate(IntPtr data, IntPtr message);
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void WebViewContextMenuCustomizedCallbackDelegate(IntPtr data, IntPtr menu);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void WebViewContextMenuItemSelectedCallbackDelegate(IntPtr data, IntPtr item);
+
/// <summary>
/// Event for the PageLoadStarted signal which can be used to subscribe or unsubscribe the event handler.<br />
/// This signal is emitted when page loading has started.<br />
}
/// <summary>
+ /// Event for the ContextMenuCustomized signal which can be used to subscribe or unsubscribe the event handler.<br />
+ /// This signal is emitted when context menu is customized.<br />
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<WebViewContextMenuCustomizedEventArgs> ContextMenuCustomized
+ {
+ add
+ {
+ if (contextMenuCustomizedEventHandler == null)
+ {
+ contextMenuCustomizedCallback = OnContextMenuCustomized;
+ contextMenuCustomizedSignal.Connect(contextMenuCustomizedCallback);
+ }
+ contextMenuCustomizedEventHandler += value;
+ }
+ remove
+ {
+ contextMenuCustomizedEventHandler -= value;
+ if (contextMenuCustomizedEventHandler == null && contextMenuCustomizedCallback != null)
+ {
+ contextMenuCustomizedSignal.Disconnect(contextMenuCustomizedCallback);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Event for the ContextMenuItemSelected signal which can be used to subscribe or unsubscribe the event handler.<br />
+ /// This signal is emitted when context menu item is selected.<br />
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<WebViewContextMenuItemSelectedEventArgs> ContextMenuItemSelected
+ {
+ add
+ {
+ if (contextMenuItemSelectedEventHandler == null)
+ {
+ contextMenuItemSelectedCallback = OnContextMenuItemSelected;
+ contextMenuItemSelectedSignal.Connect(contextMenuItemSelectedCallback);
+ }
+ contextMenuItemSelectedEventHandler += value;
+ }
+ remove
+ {
+ contextMenuItemSelectedEventHandler -= value;
+ if (contextMenuItemSelectedEventHandler == null && contextMenuItemSelectedCallback != null)
+ {
+ contextMenuItemSelectedSignal.Disconnect(contextMenuItemSelectedCallback);
+ }
+ }
+ }
+
+ /// <summary>
/// Options for searching texts.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
get
{
global::System.IntPtr imageView = Interop.WebView.GetFavicon(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- return null;
return new ImageView(imageView, false);
}
}
return ret;
}
- /// This will not be public opened.
- /// <param name="swigCPtr"></param>
- [EditorBrowsable(EditorBrowsableState.Never)]
- protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
- {
- Interop.WebView.DeleteWebView(swigCPtr);
- }
-
private void OnPageLoadStarted(IntPtr data, string pageUrl)
{
WebViewPageLoadEventArgs e = new WebViewPageLoadEventArgs();
private void OnScrollEdgeReached(IntPtr data, int edge)
{
- WebViewScrollEdgeReachedEventArgs arg = new WebViewScrollEdgeReachedEventArgs((WebViewScrollEdgeReachedEventArgs.Edge)edge);
- scrollEdgeReachedEventHandler?.Invoke(this, arg);
+ scrollEdgeReachedEventHandler?.Invoke(this, new WebViewScrollEdgeReachedEventArgs((WebViewScrollEdgeReachedEventArgs.Edge)edge));
}
private void OnUrlChanged(IntPtr data, string pageUrl)
private void OnFormRepostPolicyDecided(IntPtr data, IntPtr decision)
{
- WebFormRepostPolicyDecisionMaker repostDecision = new WebFormRepostPolicyDecisionMaker(decision, false);
- formRepostPolicyDecidedEventHandler?.Invoke(this, new WebViewFormRepostPolicyDecidedEventArgs(repostDecision));
- repostDecision.Dispose();
+ formRepostPolicyDecidedEventHandler?.Invoke(this, new WebViewFormRepostPolicyDecidedEventArgs(new WebFormRepostPolicyDecisionMaker(decision, false)));
}
private void OnFrameRendered(IntPtr data)
{
consoleMessageReceivedEventHandler?.Invoke(this, new WebViewConsoleMessageReceivedEventArgs(new WebConsoleMessage(message, false)));
}
+
+ private void OnContextMenuCustomized(IntPtr data, IntPtr menu)
+ {
+ contextMenuCustomizedEventHandler?.Invoke(this, new WebViewContextMenuCustomizedEventArgs(new WebContextMenu(menu, false)));
+ }
+
+ private void OnContextMenuItemSelected(IntPtr data, IntPtr item)
+ {
+ contextMenuItemSelectedEventHandler?.Invoke(this, new WebViewContextMenuItemSelectedEventArgs(new WebContextMenuItem(item, false)));
+ }
}
}
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Event arguments that passed via the WebView.ContextMenuCustomized.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebViewContextMenuCustomizedEventArgs : EventArgs
+ {
+ internal WebViewContextMenuCustomizedEventArgs(WebContextMenu menu)
+ {
+ ContextMenu = menu;
+ }
+
+ /// <summary>
+ /// The context menu.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public WebContextMenu ContextMenu { get; }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal class WebViewContextMenuCustomizedSignal : Disposable
+ {
+ public WebViewContextMenuCustomizedSignal(global::System.IntPtr cPtr) : base(cPtr, true)
+ {
+ }
+
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.WebView.DeleteWebViewContextMenuCustomizedSignal(swigCPtr);
+ }
+
+ public void Connect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ Interop.WebView.WebViewContextMenuCustomizedSignalConnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ {
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+ }
+
+ public void Disconnect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+ {
+ Interop.WebView.WebViewContextMenuCustomizedSignalDisconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ {
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Event arguments that passed via the WebView.ContextMenuItemSelected.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebViewContextMenuItemSelectedEventArgs : EventArgs
+ {
+ internal WebViewContextMenuItemSelectedEventArgs(WebContextMenuItem item)
+ {
+ ContextMenuItem = item;
+ }
+
+ /// <summary>
+ /// The selected context menu item.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public WebContextMenuItem ContextMenuItem { get; }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal class WebViewContextMenuItemSelectedSignal : Disposable
+ {
+ public WebViewContextMenuItemSelectedSignal(global::System.IntPtr cPtr) : base(cPtr, true)
+ {
+ }
+
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.WebView.DeleteWebViewContextMenuItemSelectedSignal(swigCPtr);
+ }
+
+ public void Connect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
+ {
+ Interop.WebView.WebViewContextMenuItemSelectedSignalConnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ {
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+ }
+
+ public void Disconnect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+ {
+ Interop.WebView.WebViewContextMenuItemSelectedSignalDisconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ {
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+ }
+ }
+}