diff --git a/CakeScripts/Settings.cake b/CakeScripts/Settings.cake
index 7b161b393..53742c2c7 100644
--- a/CakeScripts/Settings.cake
+++ b/CakeScripts/Settings.cake
@@ -38,7 +38,12 @@ class Settings
new GAssembly("GtkSourceSharp")
{
Deps = new[] { "GLibSharp", "GtkSharp", "GioSharp", "CairoSharp", "PangoSharp", "GdkSharp" },
+ },
+ new GAssembly("WebkitGtkSharp")
+ {
+ Deps = new[] { "GtkSharp","GLibSharp", "GioSharp", "AtkSharp", "CairoSharp", "PangoSharp", "GdkSharp" },
+ ExtraArgs = "--abi-cs-usings=Webkit,Gtk,GLib,Gdk,Atk,Pango,Cairo"
}
};
}
-}
\ No newline at end of file
+}
diff --git a/Source/GtkSharp.sln b/Source/GtkSharp.sln
index 04ff6fbfb..0af4f26a1 100644
--- a/Source/GtkSharp.sln
+++ b/Source/GtkSharp.sln
@@ -22,6 +22,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples", "Samples\Samples.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GtkSourceSharp", "Libs\GtkSourceSharp\GtkSourceSharp.csproj", "{2BD3D08E-0FDD-4DC3-A063-58B10B525DA8}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebkitGtkSharp", "Libs\WebkitGtkSharp\WebkitGtkSharp.csproj", "{60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -140,6 +142,18 @@ Global
{2BD3D08E-0FDD-4DC3-A063-58B10B525DA8}.Release|x64.Build.0 = Release|Any CPU
{2BD3D08E-0FDD-4DC3-A063-58B10B525DA8}.Release|x86.ActiveCfg = Release|Any CPU
{2BD3D08E-0FDD-4DC3-A063-58B10B525DA8}.Release|x86.Build.0 = Release|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Debug|x64.Build.0 = Debug|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Debug|x86.Build.0 = Debug|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Release|x64.ActiveCfg = Release|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Release|x64.Build.0 = Release|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Release|x86.ActiveCfg = Release|Any CPU
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -153,6 +167,7 @@ Global
{B4B26375-BED5-4000-A38F-899FF1672B47} = {CCEA1235-D75F-4919-83F6-16793B11BEF5}
{04597E0B-375D-4E08-A16C-EE5FF3937B73} = {CCEA1235-D75F-4919-83F6-16793B11BEF5}
{2BD3D08E-0FDD-4DC3-A063-58B10B525DA8} = {CCEA1235-D75F-4919-83F6-16793B11BEF5}
+ {60E31DAD-B6E8-4074-B2ED-53FCDFCB0F4D} = {CCEA1235-D75F-4919-83F6-16793B11BEF5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DA4DD75D-B6C8-4836-AF84-B5FF538D9D86}
diff --git a/Source/Libs/Shared/GLibrary.cs b/Source/Libs/Shared/GLibrary.cs
index 62f810f55..ece7345ed 100644
--- a/Source/Libs/Shared/GLibrary.cs
+++ b/Source/Libs/Shared/GLibrary.cs
@@ -28,6 +28,8 @@ class GLibrary
_libraryDefinitions[Library.Gtk] = new[] { "libgtk-3-0.dll", "libgtk-3.so.0", "libgtk-3.0.dylib", "gtk-3.dll" };
_libraryDefinitions[Library.PangoCairo] = new[] { "libpangocairo-1.0-0.dll", "libpangocairo-1.0.so.0", "libpangocairo-1.0.0.dylib", "pangocairo-1.dll" };
_libraryDefinitions[Library.GtkSource] = new[] { "libgtksourceview-4-0.dll", "libgtksourceview-4.so.0", "libgtksourceview-4.0.dylib", "gtksourceview-4.dll" };
+ _libraryDefinitions[Library.Webkit] = new[] { "libwebkit2gtk-4.0.dll", "libwebkit2gtk-4.0.so.37", "libwebkit2gtk-4.0.dylib", "libwebkit2gtk-4.0.0.dll" };
+
}
public static IntPtr Load(Library library)
diff --git a/Source/Libs/Shared/Library.cs b/Source/Libs/Shared/Library.cs
index b47e74888..d07809f0f 100644
--- a/Source/Libs/Shared/Library.cs
+++ b/Source/Libs/Shared/Library.cs
@@ -11,5 +11,6 @@ enum Library
Gdk,
GdkPixbuf,
Gtk,
- GtkSource
+ GtkSource,
+ Webkit
}
\ No newline at end of file
diff --git a/Source/Libs/WebkitGtkSharp/WebkitGtkSharp-api.xml b/Source/Libs/WebkitGtkSharp/WebkitGtkSharp-api.xml
new file mode 100644
index 000000000..b6feeeeb6
--- /dev/null
+++ b/Source/Libs/WebkitGtkSharp/WebkitGtkSharp-api.xml
@@ -0,0 +1,6011 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ missing glib:type-name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Libs/WebkitGtkSharp/WebkitGtkSharp.csproj b/Source/Libs/WebkitGtkSharp/WebkitGtkSharp.csproj
new file mode 100644
index 000000000..2c91172b7
--- /dev/null
+++ b/Source/Libs/WebkitGtkSharp/WebkitGtkSharp.csproj
@@ -0,0 +1,26 @@
+
+
+ true
+ netstandard2.0
+ false
+ https://github.com/GtkSharp/GtkSharp
+ https://github.com/GtkSharp/GtkSharp
+ GtkWebkitSharp is a C# wrapper for the Gtk-Webkit library.
+ webkitgtk;webkitgtksharp;webkit-sharp;wrapper
+ GtkWebkitSharp
+
+
+ ..\..\..\BuildOutput\Debug
+
+
+ ..\..\..\BuildOutput\Release
+
+
+
+ %(RecursiveDir)%(Filename)%(Extension)
+
+
+
+
+
+
diff --git a/Source/Libs/WebkitGtkSharp/WebkitGtkSharp.metadata b/Source/Libs/WebkitGtkSharp/WebkitGtkSharp.metadata
new file mode 100644
index 000000000..1327b292d
--- /dev/null
+++ b/Source/Libs/WebkitGtkSharp/WebkitGtkSharp.metadata
@@ -0,0 +1,6 @@
+
+
+ GetCanSaveCredentials
+ true
+
+
diff --git a/Source/Samples/Samples.csproj b/Source/Samples/Samples.csproj
index a9a1f5291..2e2a7cfe0 100644
--- a/Source/Samples/Samples.csproj
+++ b/Source/Samples/Samples.csproj
@@ -28,5 +28,6 @@
+
diff --git a/Source/Samples/Sections/Widgets/WebviewSection.cs b/Source/Samples/Sections/Widgets/WebviewSection.cs
new file mode 100644
index 000000000..7e1ede642
--- /dev/null
+++ b/Source/Samples/Sections/Widgets/WebviewSection.cs
@@ -0,0 +1,52 @@
+// This is free and unencumbered software released into the public domain.
+// Happy coding!!! - GtkSharp Team
+
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using Atk;
+using Gdk;
+using Gtk;
+using WebKit;
+
+namespace Samples
+{
+
+ [Section(ContentType = typeof(WebView), Category = Category.Widgets)]
+ class WebviewSection : ListSection
+ {
+
+ public WebviewSection()
+ {
+ AddItem(ShowHtml());
+ AddItem(ShowUri());
+
+ }
+
+ public (string, Widget) ShowHtml()
+ {
+ var webView = new WebView {
+ HeightRequest = 100,
+ Hexpand = true
+ };
+
+ webView.LoadHtml($"This is a {nameof(WebView)} showing html text");
+ return ($"{nameof(WebView)} show html text:", webView);
+ }
+
+ public (string, Widget) ShowUri()
+ {
+ var webView = new WebView {
+ Vexpand = true,
+ Hexpand = true,
+ };
+
+ webView.LoadUri("https://github.com/GtkSharp/GtkSharp#readme");
+
+ return ($"{nameof(WebView)} show uri:", webView);
+ }
+
+ }
+
+}
\ No newline at end of file