[vala/0.36] webkit2gtk-4.0: Update to 2.18



commit 1b1aee8d0cf4190ea528826cfc22fb4ec05b342c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Oct 6 08:32:19 2017 +0200

    webkit2gtk-4.0: Update to 2.18

 vapi/metadata/WebKit2-4.0.metadata     |    1 +
 vapi/webkit2gtk-4.0.vapi               |   96 +++++++++++++++++++++++++++++++-
 vapi/webkit2gtk-web-extension-4.0.vapi |   50 ++++++++++++++++
 3 files changed, 145 insertions(+), 2 deletions(-)
---
diff --git a/vapi/metadata/WebKit2-4.0.metadata b/vapi/metadata/WebKit2-4.0.metadata
index 1e3bbb3..1b6b61b 100644
--- a/vapi/metadata/WebKit2-4.0.metadata
+++ b/vapi/metadata/WebKit2-4.0.metadata
@@ -14,5 +14,6 @@ WebResource
   .failed#signal.error type="GLib.Error"
 WebView
   .load_failed#signal.error type="GLib.Error"
+  .show_option_menu#signal name="on_show_option_menu"
 
 *.ref unowned
diff --git a/vapi/webkit2gtk-4.0.vapi b/vapi/webkit2gtk-4.0.vapi
index df78fa3..4f349fa 100644
--- a/vapi/webkit2gtk-4.0.vapi
+++ b/vapi/webkit2gtk-4.0.vapi
@@ -2,6 +2,25 @@
 
 [CCode (cprefix = "WebKit", gir_namespace = "WebKit2", gir_version = "4.0", lower_case_cprefix = "webkit_")]
 namespace WebKit {
+       [CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_application_info_ref", type_id 
= "webkit_application_info_get_type ()", unref_function = "webkit_application_info_unref")]
+       [Compact]
+       public class ApplicationInfo {
+               [CCode (has_construct_function = false)]
+               [Version (since = "2.18")]
+               public ApplicationInfo ();
+               [Version (since = "2.18")]
+               public unowned string get_name ();
+               [Version (since = "2.18")]
+               public void get_version (out uint64 major, out uint64 minor, out uint64 micro);
+               [Version (since = "2.18")]
+               public unowned WebKit.ApplicationInfo @ref ();
+               [Version (since = "2.18")]
+               public void set_name (string name);
+               [Version (since = "2.18")]
+               public void set_version (uint64 major, uint64 minor, uint64 micro);
+               [Version (since = "2.18")]
+               public void unref ();
+       }
        [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_authentication_request_get_type 
()")]
        public class AuthenticationRequest : GLib.Object {
                [CCode (has_construct_function = false)]
@@ -29,6 +48,21 @@ namespace WebKit {
                [Version (since = "2.2")]
                public signal void cancelled ();
        }
+       [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_automation_session_get_type ()")]
+       public class AutomationSession : GLib.Object {
+               [CCode (has_construct_function = false)]
+               protected AutomationSession ();
+               [Version (since = "2.18")]
+               public unowned WebKit.ApplicationInfo get_application_info ();
+               [Version (since = "2.18")]
+               public unowned string get_id ();
+               [Version (since = "2.18")]
+               public void set_application_info (WebKit.ApplicationInfo info);
+               [Version (since = "2.18")]
+               public string id { get; construct; }
+               [Version (since = "2.18")]
+               public signal unowned WebKit.WebView create_web_view ();
+       }
        [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_back_forward_list_get_type ()")]
        public class BackForwardList : GLib.Object {
                [CCode (has_construct_function = false)]
@@ -95,12 +129,19 @@ namespace WebKit {
        [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_context_menu_item_get_type ()")]
        public class ContextMenuItem : GLib.InitiallyUnowned {
                [CCode (has_construct_function = false)]
+               [Version (deprecated = true, deprecated_since = "2.18")]
                public ContextMenuItem (Gtk.Action action);
                [CCode (has_construct_function = false)]
+               [Version (since = "2.18")]
+               public ContextMenuItem.from_gaction (GLib.Action action, string label, GLib.Variant? target);
+               [CCode (has_construct_function = false)]
                public ContextMenuItem.from_stock_action (WebKit.ContextMenuAction action);
                [CCode (has_construct_function = false)]
                public ContextMenuItem.from_stock_action_with_label (WebKit.ContextMenuAction action, string 
label);
+               [Version (deprecated = true, deprecated_since = "2.18")]
                public unowned Gtk.Action get_action ();
+               [Version (since = "2.18")]
+               public unowned GLib.Action get_gaction ();
                public WebKit.ContextMenuAction get_stock_action ();
                public unowned WebKit.ContextMenu get_submenu ();
                public bool is_separator ();
@@ -383,6 +424,42 @@ namespace WebKit {
                [CCode (has_construct_function = false)]
                protected NotificationPermissionRequest ();
        }
+       [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_option_menu_get_type ()")]
+       public class OptionMenu : GLib.Object {
+               [CCode (has_construct_function = false)]
+               protected OptionMenu ();
+               [Version (since = "2.18")]
+               public void activate_item (uint index);
+               [Version (since = "2.18")]
+               public unowned WebKit.OptionMenuItem get_item (uint index);
+               [Version (since = "2.18")]
+               public uint get_n_items ();
+               [Version (since = "2.18")]
+               public void select_item (uint index);
+               [HasEmitter]
+               [Version (since = "2.18")]
+               public signal void close ();
+       }
+       [CCode (cheader_filename = "webkit2/webkit2.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "webkit_option_menu_item_get_type ()")]
+       [Compact]
+       public class OptionMenuItem {
+               [Version (since = "2.18")]
+               public WebKit.OptionMenuItem copy ();
+               [Version (since = "2.18")]
+               public void free ();
+               [Version (since = "2.18")]
+               public unowned string get_label ();
+               [Version (since = "2.18")]
+               public unowned string get_tooltip ();
+               [Version (since = "2.18")]
+               public bool is_enabled ();
+               [Version (since = "2.18")]
+               public bool is_group_child ();
+               [Version (since = "2.18")]
+               public bool is_group_label ();
+               [Version (since = "2.18")]
+               public bool is_selected ();
+       }
        [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_plugin_get_type ()")]
        public class Plugin : GLib.Object {
                [CCode (has_construct_function = false)]
@@ -806,11 +883,15 @@ namespace WebKit {
                public uint get_web_process_count_limit ();
                [Version (since = "2.10")]
                public unowned WebKit.WebsiteDataManager get_website_data_manager ();
+               [Version (since = "2.18")]
+               public bool is_automation_allowed ();
                [Version (since = "2.16")]
                public bool is_ephemeral ();
                public void prefetch_dns (string hostname);
                public void register_uri_scheme (string scheme, owned WebKit.URISchemeRequestCallback 
callback);
                public void set_additional_plugins_directory (string directory);
+               [Version (since = "2.18")]
+               public void set_automation_allowed (bool allowed);
                public void set_cache_model (WebKit.CacheModel cache_model);
                [Version (deprecated = true, deprecated_since = "2.10.")]
                public void set_disk_cache_directory (string directory);
@@ -836,6 +917,8 @@ namespace WebKit {
                public string local_storage_directory { owned get; construct; }
                [Version (since = "2.10")]
                public WebKit.WebsiteDataManager website_data_manager { get; construct; }
+               [Version (since = "2.18")]
+               public virtual signal void automation_started (WebKit.AutomationSession session);
                public virtual signal void download_started (WebKit.Download download);
                [HasEmitter]
                [Version (since = "2.16")]
@@ -932,8 +1015,6 @@ namespace WebKit {
                public void load_plain_text (string plain_text);
                public void load_request (WebKit.URIRequest request);
                public void load_uri (string uri);
-               [Version (since = "2.4")]
-               public Gtk.Widget new_with_related_view ();
                public void reload ();
                public void reload_bypass_cache ();
                [Version (since = "2.12")]
@@ -949,12 +1030,17 @@ namespace WebKit {
                public void set_editable (bool editable);
                public void set_settings (WebKit.Settings settings);
                public void set_zoom_level (double zoom_level);
+               [NoWrapper]
+               public virtual bool show_option_menu (Gdk.Rectangle rectangle, WebKit.OptionMenu menu);
                public void stop_loading ();
                [Version (since = "2.12")]
                public void try_close ();
                [CCode (has_construct_function = false, type = "GtkWidget*")]
                public WebView.with_context (WebKit.WebContext context);
                [CCode (has_construct_function = false, type = "GtkWidget*")]
+               [Version (since = "2.4")]
+               public WebView.with_related_view (WebKit.WebView web_view);
+               [CCode (has_construct_function = false, type = "GtkWidget*")]
                [Version (since = "2.6")]
                public WebView.with_settings (WebKit.Settings settings);
                [CCode (has_construct_function = false, type = "GtkWidget*")]
@@ -966,6 +1052,9 @@ namespace WebKit {
                public double estimated_load_progress { get; }
                public void* favicon { get; }
                [NoAccessorMethod]
+               [Version (since = "2.18")]
+               public bool is_controlled_by_automation { get; construct; }
+               [NoAccessorMethod]
                [Version (since = "2.16")]
                public bool is_ephemeral { get; construct; }
                [NoAccessorMethod]
@@ -999,6 +1088,9 @@ namespace WebKit {
                [Version (since = "2.6")]
                public virtual signal bool load_failed_with_tls_errors (string failing_uri, 
GLib.TlsCertificate certificate, GLib.TlsCertificateFlags errors);
                public virtual signal void mouse_target_changed (WebKit.HitTestResult hit_test_result, uint 
modifiers);
+               [CCode (cname = "show-option-menu")]
+               [Version (since = "2.18")]
+               public signal bool on_show_option_menu (WebKit.OptionMenu menu, Gdk.Event event, 
Gdk.Rectangle rectangle);
                public virtual signal bool permission_request (WebKit.PermissionRequest permission_request);
                public virtual signal bool print (WebKit.PrintOperation print_operation);
                public virtual signal void ready_to_show ();
diff --git a/vapi/webkit2gtk-web-extension-4.0.vapi b/vapi/webkit2gtk-web-extension-4.0.vapi
index d8ea424..2b124c7 100644
--- a/vapi/webkit2gtk-web-extension-4.0.vapi
+++ b/vapi/webkit2gtk-web-extension-4.0.vapi
@@ -129,6 +129,41 @@ namespace WebKit {
                        public string data { owned get; set; }
                        public ulong length { get; }
                }
+               [CCode (cheader_filename = "webkit2/webkit-web-extension.h", type_id = 
"webkit_dom_client_rect_get_type ()")]
+               [GIR (name = "DOMClientRect")]
+               public class ClientRect : WebKit.DOM.Object {
+                       [CCode (has_construct_function = false)]
+                       protected ClientRect ();
+                       [Version (since = "2.18")]
+                       public float get_bottom ();
+                       [Version (since = "2.18")]
+                       public float get_height ();
+                       [Version (since = "2.18")]
+                       public float get_left ();
+                       [Version (since = "2.18")]
+                       public float get_right ();
+                       [Version (since = "2.18")]
+                       public float get_top ();
+                       [Version (since = "2.18")]
+                       public float get_width ();
+                       public float bottom { get; }
+                       public float height { get; }
+                       public float left { get; }
+                       public float right { get; }
+                       public float top { get; }
+                       public float width { get; }
+               }
+               [CCode (cheader_filename = "webkit2/webkit-web-extension.h", type_id = 
"webkit_dom_client_rect_list_get_type ()")]
+               [GIR (name = "DOMClientRectList")]
+               public class ClientRectList : WebKit.DOM.Object {
+                       [CCode (has_construct_function = false)]
+                       protected ClientRectList ();
+                       [Version (since = "2.18")]
+                       public ulong get_length ();
+                       [Version (since = "2.18")]
+                       public unowned WebKit.DOM.ClientRect item (ulong index);
+                       public ulong length { get; }
+               }
                [CCode (cheader_filename = "webkit2/webkit-web-extension.h", type_id = 
"webkit_dom_comment_get_type ()")]
                [GIR (name = "DOMComment")]
                public class Comment : WebKit.DOM.CharacterData, WebKit.DOM.EventTarget {
@@ -628,6 +663,8 @@ namespace WebKit {
                        public unowned WebKit.DOM.Attr get_attribute_node_ns (string namespaceURI, string 
localName);
                        public string get_attribute_ns (string namespaceURI, string localName);
                        public WebKit.DOM.NamedNodeMap get_attributes ();
+                       [Version (since = "2.18")]
+                       public WebKit.DOM.ClientRect get_bounding_client_rect ();
                        public ulong get_child_element_count ();
                        [Version (since = "2.10")]
                        public WebKit.DOM.HTMLCollection get_children ();
@@ -636,6 +673,8 @@ namespace WebKit {
                        public string get_class_name ();
                        public double get_client_height ();
                        public double get_client_left ();
+                       [Version (since = "2.18")]
+                       public WebKit.DOM.ClientRectList get_client_rects ();
                        public double get_client_top ();
                        public double get_client_width ();
                        [Version (deprecated = true, deprecated_since = "2.12")]
@@ -2850,12 +2889,19 @@ namespace WebKit {
        [CCode (cheader_filename = "webkit2/webkit-web-extension.h", type_id = 
"webkit_context_menu_item_get_type ()")]
        public class ContextMenuItem : GLib.InitiallyUnowned {
                [CCode (has_construct_function = false)]
+               [Version (deprecated = true, deprecated_since = "2.18")]
                public ContextMenuItem (Gtk.Action action);
                [CCode (has_construct_function = false)]
+               [Version (since = "2.18")]
+               public ContextMenuItem.from_gaction (GLib.Action action, string label, GLib.Variant? target);
+               [CCode (has_construct_function = false)]
                public ContextMenuItem.from_stock_action (WebKit.ContextMenuAction action);
                [CCode (has_construct_function = false)]
                public ContextMenuItem.from_stock_action_with_label (WebKit.ContextMenuAction action, string 
label);
+               [Version (deprecated = true, deprecated_since = "2.18")]
                public unowned Gtk.Action get_action ();
+               [Version (since = "2.18")]
+               public unowned GLib.Action get_gaction ();
                public WebKit.ContextMenuAction get_stock_action ();
                public unowned WebKit.ContextMenu get_submenu ();
                public bool is_separator ();
@@ -2887,6 +2933,7 @@ namespace WebKit {
                public bool context_is_link ();
                public bool context_is_media ();
                public bool context_is_scrollbar ();
+               [Version (since = "2.8")]
                public bool context_is_selection ();
                public uint get_context ();
                public unowned string get_image_uri ();
@@ -2916,6 +2963,7 @@ namespace WebKit {
                [CCode (has_construct_function = false)]
                public URIRequest (string uri);
                public unowned Soup.MessageHeaders get_http_headers ();
+               [Version (since = "2.12")]
                public unowned string get_http_method ();
                public unowned string get_uri ();
                public void set_uri (string uri);
@@ -2926,12 +2974,14 @@ namespace WebKit {
                [CCode (has_construct_function = false)]
                protected URIResponse ();
                public uint64 get_content_length ();
+               [Version (since = "2.6")]
                public unowned Soup.MessageHeaders get_http_headers ();
                public unowned string get_mime_type ();
                public uint get_status_code ();
                public unowned string get_suggested_filename ();
                public unowned string get_uri ();
                public uint64 content_length { get; }
+               [Version (since = "2.6")]
                public Soup.MessageHeaders http_headers { get; }
                public string mime_type { get; }
                public uint status_code { get; }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]