Commit 62b887da authored by Evan Nemerson's avatar Evan Nemerson

Replace WebKit 3.0 bindings with 4.0.

WebKitGTK+ is bumping their API version to 4.0 starting with 2.5.1.
These bindings haven't been part of a stable Vala release, so it should
be safe to just bump the version we distribute, too, instead of adding
4.0 alongside 3.0.
parent 7616e033
......@@ -288,10 +288,10 @@ dist_vapi_DATA = \
vte-2.90.vapi \
webkit-1.0.deps \
webkit-1.0.vapi \
webkit2gtk-3.0.vapi \
webkit2gtk-3.0.deps \
webkit2gtk-web-extension-3.0.vapi \
webkit2gtk-web-extension-3.0.deps \
webkit2gtk-4.0.vapi \
webkit2gtk-4.0.deps \
webkit2gtk-web-extension-4.0.vapi \
webkit2gtk-web-extension-4.0.deps \
x11.vapi \
xcb.vapi \
xcb-icccm.vapi \
......@@ -418,8 +418,8 @@ GIR_BINDINGS = \
rest-0.7 \
udisks2 \
vte-2.90 \
webkit2gtk-3.0 \
webkit2gtk-web-extension-3.0 \
webkit2gtk-4.0 \
webkit2gtk-web-extension-4.0 \
$(GSTREAMER_1_0_BINDINGS) \
$(NULL)
......@@ -773,9 +773,8 @@ vte-2.90:
webkit-1.0:
$(GENVAPI) --library $(srcdir)/webkit-1.0 $(PACKAGESDIR)/webkit-1.0/webkit-1.0.gi
webkit2gtk-3.0:
$(GENVAPI) --library $(srcdir)/webkit2gtk-3.0 --metadatadir $(METADATADIR) --pkg gtk+-3.0 --pkg libsoup-2.4 $(GIRDIR)/WebKit2-3.0.gir
webkit2gtk-web-extension-3.0:
$(GENVAPI) --library $(srcdir)/webkit2gtk-web-extension-3.0 --metadatadir $(METADATADIR) --pkg gtk+-3.0 $(GIRDIR)/WebKit2WebExtension-3.0.gir
webkit2gtk-4.0:
$(GENVAPI) --library $(srcdir)/webkit2gtk-4.0 --metadatadir $(METADATADIR) --pkg gtk+-3.0 --pkg libsoup-2.4 $(GIRDIR)/WebKit2-4.0.gir
webkit2gtk-web-extension-4.0:
$(GENVAPI) --library $(srcdir)/webkit2gtk-web-extension-4.0 --metadatadir $(METADATADIR) --pkg gtk+-3.0 $(GIRDIR)/WebKit2WebExtension-4.0.gir
/* webkit2gtk-3.0.vapi generated by vapigen, do not modify. */
/* webkit2gtk-4.0.vapi generated by vapigen, do not modify. */
[CCode (cprefix = "WebKit", gir_namespace = "WebKit2", gir_version = "3.0", lower_case_cprefix = "webkit_")]
[CCode (cprefix = "WebKit", gir_namespace = "WebKit2", gir_version = "4.0", lower_case_cprefix = "webkit_")]
namespace WebKit {
[CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_authentication_request_get_type ()")]
public class AuthenticationRequest : GLib.Object {
......@@ -41,14 +41,6 @@ namespace WebKit {
public unowned string get_title ();
public unowned string get_uri ();
}
[CCode (cheader_filename = "webkit2/webkit2.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "webkit_certificate_info_get_type ()")]
[Compact]
public class CertificateInfo {
public WebKit.CertificateInfo copy ();
public void free ();
public unowned GLib.TlsCertificate get_tls_certificate ();
public GLib.TlsCertificateFlags get_tls_errors ();
}
[CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_context_menu_get_type ()")]
public class ContextMenu : GLib.Object {
[CCode (has_construct_function = false)]
......@@ -233,6 +225,17 @@ namespace WebKit {
public WebKit.MimeInfo @ref ();
public void unref ();
}
[CCode (cheader_filename = "webkit2/webkit2.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "webkit_navigation_action_get_type ()")]
[Compact]
public class NavigationAction {
public WebKit.NavigationAction copy ();
public void free ();
public uint get_modifiers ();
public uint get_mouse_button ();
public WebKit.NavigationType get_navigation_type ();
public unowned WebKit.URIRequest get_request ();
public bool is_user_gesture ();
}
[CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_navigation_policy_decision_get_type ()")]
public class NavigationPolicyDecision : WebKit.PolicyDecision {
[CCode (has_construct_function = false)]
......@@ -503,11 +506,26 @@ namespace WebKit {
public unowned string get_uri ();
public unowned WebKit.WebView get_web_view ();
}
[CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_user_content_manager_get_type ()")]
public class UserContentManager : GLib.Object {
[CCode (has_construct_function = false)]
public UserContentManager ();
public void add_style_sheet (WebKit.UserStyleSheet stylesheet);
public void remove_all_style_sheets ();
}
[CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_user_style_sheet_ref", type_id = "webkit_user_style_sheet_get_type ()", unref_function = "webkit_user_style_sheet_unref")]
[Compact]
public class UserStyleSheet {
[CCode (has_construct_function = false)]
public UserStyleSheet (string source, WebKit.UserContentInjectedFrames injected_frames, WebKit.UserStyleLevel level, [CCode (array_length = false, array_null_terminated = true)] string[]? whitelist, [CCode (array_length = false, array_null_terminated = true)] string[]? blacklist);
public WebKit.UserStyleSheet @ref ();
public void unref ();
}
[CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_context_get_type ()")]
public class WebContext : GLib.Object {
[CCode (has_construct_function = false)]
protected WebContext ();
public void allow_tls_certificate_for_host (WebKit.CertificateInfo info, string host);
public void allow_tls_certificate_for_host (GLib.TlsCertificate certificate, string host);
public void clear_cache ();
public WebKit.Download download_uri (string uri);
public WebKit.CacheModel get_cache_model ();
......@@ -562,7 +580,7 @@ namespace WebKit {
public class WebResource : GLib.Object {
[CCode (has_construct_function = false)]
protected WebResource ();
public async uint8 get_data (GLib.Cancellable? cancellable, out size_t length) throws GLib.Error;
public async uint8[] get_data (GLib.Cancellable? cancellable) throws GLib.Error;
public unowned WebKit.URIResponse get_response ();
public unowned string get_uri ();
public WebKit.URIResponse response { get; }
......@@ -588,7 +606,6 @@ namespace WebKit {
public double get_estimated_load_progress ();
public unowned Cairo.Surface get_favicon ();
public unowned WebKit.FindController get_find_controller ();
public unowned WebKit.WebViewGroup get_group ();
public unowned WebKit.WebInspector get_inspector ();
public unowned WebKit.WebResource get_main_resource ();
public uint64 get_page_id ();
......@@ -597,13 +614,14 @@ namespace WebKit {
public unowned string get_title ();
public bool get_tls_info (out unowned GLib.TlsCertificate certificate, out GLib.TlsCertificateFlags errors);
public unowned string get_uri ();
public WebKit.ViewMode get_view_mode ();
public unowned WebKit.UserContentManager get_user_content_manager ();
public unowned WebKit.WindowProperties get_window_properties ();
public double get_zoom_level ();
public void go_back ();
public void go_forward ();
public void go_to_back_forward_list_item (WebKit.BackForwardListItem list_item);
public void load_alternate_html (string content, string content_uri, string? base_uri);
public void load_bytes (GLib.Bytes bytes, string? mime_type, string? encoding, string? base_uri);
public void load_html (string content, string? base_uri);
public void load_plain_text (string plain_text);
public void load_request (WebKit.URIRequest request);
......@@ -617,22 +635,23 @@ namespace WebKit {
public async bool save_to_file (GLib.File file, WebKit.SaveMode save_mode, GLib.Cancellable? cancellable) throws GLib.Error;
public void set_custom_charset (string? charset);
public void set_settings (WebKit.Settings settings);
public void set_view_mode (WebKit.ViewMode view_mode);
public void set_zoom_level (double zoom_level);
public void stop_loading ();
[CCode (has_construct_function = false, type = "GtkWidget*")]
public WebView.with_context (WebKit.WebContext context);
[CCode (has_construct_function = false, type = "GtkWidget*")]
public WebView.with_group (WebKit.WebViewGroup group);
public WebView.with_settings (WebKit.Settings settings);
[CCode (has_construct_function = false, type = "GtkWidget*")]
public WebView.with_user_content_manager (WebKit.UserContentManager user_content_manager);
public double estimated_load_progress { get; }
public void* favicon { get; }
public WebKit.WebViewGroup group { get; construct; }
[NoAccessorMethod]
public bool is_loading { get; }
public WebKit.WebView related_view { construct; }
public WebKit.Settings settings { set construct; }
public string title { get; }
public string uri { get; }
public WebKit.ViewMode view_mode { get; set; }
public WebKit.UserContentManager user_content_manager { get; construct; }
[NoAccessorMethod]
public WebKit.WebContext web_context { owned get; construct; }
public double zoom_level { get; set; }
......@@ -640,14 +659,14 @@ namespace WebKit {
public virtual signal void close ();
public virtual signal bool context_menu (WebKit.ContextMenu context_menu, Gdk.Event event, WebKit.HitTestResult hit_test_result);
public virtual signal void context_menu_dismissed ();
public signal Gtk.Widget create ();
public signal Gtk.Widget create (WebKit.NavigationAction navigation_action);
public virtual signal bool decide_policy (WebKit.PolicyDecision decision, WebKit.PolicyDecisionType type);
public virtual signal bool enter_fullscreen ();
public virtual signal void insecure_content_detected (WebKit.InsecureContentEvent event);
public virtual signal bool leave_fullscreen ();
public virtual signal void load_changed (WebKit.LoadEvent load_event);
public virtual signal bool load_failed (WebKit.LoadEvent load_event, string failing_uri, void* error);
public virtual signal bool load_failed_with_tls_errors (WebKit.CertificateInfo info, string host);
public virtual signal bool load_failed_with_tls_errors (GLib.TlsCertificate certificate, GLib.TlsCertificateFlags errors, string host);
public virtual signal void mouse_target_changed (WebKit.HitTestResult hit_test_result, uint modifiers);
public virtual signal bool permission_request (WebKit.PermissionRequest permission_request);
public virtual signal bool print (WebKit.PrintOperation print_operation);
......@@ -664,17 +683,6 @@ namespace WebKit {
[CCode (has_construct_function = false)]
protected WebViewBase ();
}
[CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_view_group_get_type ()")]
public class WebViewGroup : GLib.Object {
[CCode (has_construct_function = false)]
public WebViewGroup (string? name);
public void add_user_style_sheet (string source, string? base_uri, [CCode (array_length = false, array_null_terminated = true)] string[]? whitelist, [CCode (array_length = false, array_null_terminated = true)] string[]? blacklist, WebKit.InjectedContentFrames injected_frames);
public unowned string get_name ();
public unowned WebKit.Settings get_settings ();
public void remove_all_user_style_sheets ();
public void set_settings (WebKit.Settings settings);
public WebKit.Settings settings { get; set; }
}
[CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_window_properties_get_type ()")]
public class WindowProperties : GLib.Object {
[CCode (has_construct_function = false)]
......@@ -804,11 +812,6 @@ namespace WebKit {
EDITABLE,
SCROLLBAR
}
[CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_INJECTED_CONTENT_FRAMES_", type_id = "webkit_injected_content_frames_get_type ()")]
public enum InjectedContentFrames {
ALL,
TOP_ONLY
}
[CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_INSECURE_CONTENT_", type_id = "webkit_insecure_content_event_get_type ()")]
public enum InsecureContentEvent {
RUN,
......@@ -872,10 +875,15 @@ namespace WebKit {
IGNORE,
FAIL
}
[CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_VIEW_MODE_", type_id = "webkit_view_mode_get_type ()")]
public enum ViewMode {
WEB,
SOURCE
[CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_USER_CONTENT_INJECT_", type_id = "webkit_user_content_injected_frames_get_type ()")]
public enum UserContentInjectedFrames {
ALL_FRAMES,
TOP_FRAME
}
[CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_USER_STYLE_LEVEL_", type_id = "webkit_user_style_level_get_type ()")]
public enum UserStyleLevel {
USER,
AUTHOR
}
[CCode (cheader_filename = "webkit2/webkit2.h", cprefix = "WEBKIT_DOWNLOAD_ERROR_")]
public errordomain DownloadError {
......@@ -950,4 +958,16 @@ namespace WebKit {
public const string EDITING_COMMAND_SELECT_ALL;
[CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_EDITING_COMMAND_UNDO")]
public const string EDITING_COMMAND_UNDO;
[CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_MAJOR_VERSION")]
public const int MAJOR_VERSION;
[CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_MICRO_VERSION")]
public const int MICRO_VERSION;
[CCode (cheader_filename = "webkit2/webkit2.h", cname = "WEBKIT_MINOR_VERSION")]
public const int MINOR_VERSION;
[CCode (cheader_filename = "webkit2/webkit2.h")]
public static uint get_major_version ();
[CCode (cheader_filename = "webkit2/webkit2.h")]
public static uint get_micro_version ();
[CCode (cheader_filename = "webkit2/webkit2.h")]
public static uint get_minor_version ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment