9337fad2c6efb028ecd44b745bdd5682ac9bc191
[platform/core/csapi/tizenfx.git] / src / Tizen.WebView / Interop / Interop.ChromiumEwk.ContextMenu.cs
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18 using System.Runtime.InteropServices;
19 using Tizen.WebView;
20
21 internal static partial class Interop
22 {
23     internal static partial class ChromiumEwk
24     {
25         [DllImport(Libraries.ChromiumEwk)]
26         internal static extern int ewk_context_menu_item_tag_get(IntPtr contextMenuItem);
27
28         [DllImport(Libraries.ChromiumEwk)]
29         internal static extern int ewk_context_menu_item_count(IntPtr contextMenu);
30
31         [DllImport(Libraries.ChromiumEwk)]
32         internal static extern IntPtr ewk_context_menu_nth_item_get(IntPtr contextMenu, int n);
33
34         [DllImport(Libraries.ChromiumEwk)]
35         [return: MarshalAs(UnmanagedType.U1)]
36         internal static extern bool ewk_context_menu_item_remove(IntPtr contextMenu, IntPtr contextMenuItem);
37
38         [DllImport(Libraries.ChromiumEwk)]
39         [return: MarshalAs(UnmanagedType.U1)]
40         internal static extern bool ewk_context_menu_item_append_as_action(IntPtr contextMenu, ContextMenuItemTag tag, string title, bool enabled);
41
42         [DllImport(Libraries.ChromiumEwk)]
43         [return: MarshalAs(UnmanagedType.U1)]
44         internal static extern bool ewk_context_menu_item_append(IntPtr contextMenu, ContextMenuItemTag tag, string title, string iconPath, bool enabled);
45     }
46 }