[vala] bindings: Update GIR-based bindings



commit d9a758813b0c99d6df09a277377d325b72ae7a80
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Nov 24 23:38:16 2014 +0100

    bindings: Update GIR-based bindings

 vapi/atk.vapi                                  |    1 +
 vapi/atspi-2.vapi                              |    3 +-
 vapi/libpeas-1.0.vapi                          |    4 +
 vapi/libsoup-2.4.vapi                          |   64 ++++++------
 vapi/metadata/WebKit2WebExtension-4.0.metadata |    4 +
 vapi/webkit2gtk-4.0.vapi                       |   14 ++-
 vapi/webkit2gtk-web-extension-4.0.vapi         |  124 +++++++++++++++++++++++-
 7 files changed, 178 insertions(+), 36 deletions(-)
---
diff --git a/vapi/atk.vapi b/vapi/atk.vapi
index 291153c..759e867 100644
--- a/vapi/atk.vapi
+++ b/vapi/atk.vapi
@@ -739,6 +739,7 @@ namespace Atk {
                DESCRIPTION_LIST,
                DESCRIPTION_TERM,
                DESCRIPTION_VALUE,
+               STATIC,
                LAST_DEFINED;
                [CCode (cheader_filename = "atk/atk.h")]
                public static Atk.Role for_name (string name);
diff --git a/vapi/atspi-2.vapi b/vapi/atspi-2.vapi
index 73239ce..0bde155 100644
--- a/vapi/atspi-2.vapi
+++ b/vapi/atspi-2.vapi
@@ -53,7 +53,7 @@ namespace Atspi {
                public unowned string get_object_locale () throws GLib.Error;
                public Atspi.Accessible? get_parent () throws GLib.Error;
                public uint get_process_id () throws GLib.Error;
-               public GLib.Array<Atspi.Accessible> get_relation_set () throws GLib.Error;
+               public GLib.Array<Atspi.Relation> get_relation_set () throws GLib.Error;
                public Atspi.Role get_role () throws GLib.Error;
                public string get_role_name () throws GLib.Error;
                [Deprecated (since = "2.10")]
@@ -691,6 +691,7 @@ namespace Atspi {
                MATH,
                RATING,
                TIMER,
+               STATIC,
                LAST_DEFINED;
                public static string get_name (Atspi.Role role);
        }
diff --git a/vapi/libpeas-1.0.vapi b/vapi/libpeas-1.0.vapi
index 4e44f82..ec7e109 100644
--- a/vapi/libpeas-1.0.vapi
+++ b/vapi/libpeas-1.0.vapi
@@ -24,8 +24,12 @@ namespace Peas {
                public bool try_load_plugin (Peas.PluginInfo info);
                [CCode (cname = "peas_engine_unload_plugin")]
                public bool try_unload_plugin (Peas.PluginInfo info);
+               [CCode (has_construct_function = false)]
+               public Engine.with_nonglobal_loaders ();
                [CCode (array_length = false, array_null_terminated = true)]
                public string[] loaded_plugins { owned get; set; }
+               [NoAccessorMethod]
+               public bool nonglobal_loaders { get; construct; }
                public void* plugin_list { get; }
                public virtual signal void load_plugin (Peas.PluginInfo info);
                public virtual signal void unload_plugin (Peas.PluginInfo info);
diff --git a/vapi/libsoup-2.4.vapi b/vapi/libsoup-2.4.vapi
index a057f94..13031fb 100644
--- a/vapi/libsoup-2.4.vapi
+++ b/vapi/libsoup-2.4.vapi
@@ -6,7 +6,7 @@ namespace Soup {
                [CCode (cheader_filename = "libsoup/soup.h")]
                public static GLib.HashTable<string,string> decode (string encoded_form);
                [CCode (cheader_filename = "libsoup/soup.h")]
-               public static GLib.HashTable<string,string> decode_multipart (Soup.Message msg, string? 
file_control_name, out string filename, out string content_type, out Soup.Buffer file);
+               public static GLib.HashTable<string,string>? decode_multipart (Soup.Message msg, string? 
file_control_name, out string filename, out string content_type, out Soup.Buffer file);
                [CCode (cheader_filename = "libsoup/soup.h")]
                public static string encode (...);
                [CCode (cheader_filename = "libsoup/soup.h")]
@@ -49,9 +49,9 @@ namespace Soup {
                [PrintfFormat]
                public static string build_fault (int fault_code, string fault_format, ...);
                [CCode (cheader_filename = "libsoup/soup.h")]
-               public static string build_method_call (string method_name, [CCode (array_length_cname = 
"n_params", array_length_pos = 2.1)] GLib.Value[] @params);
+               public static string? build_method_call (string method_name, [CCode (array_length_cname = 
"n_params", array_length_pos = 2.1)] GLib.Value[] @params);
                [CCode (cheader_filename = "libsoup/soup.h")]
-               public static string build_method_response (GLib.Value value);
+               public static string? build_method_response (GLib.Value value);
                [CCode (cheader_filename = "libsoup/soup.h")]
                public static GLib.Quark error_quark ();
                [CCode (cheader_filename = "libsoup/soup.h", sentinel = "G_TYPE_INVALID")]
@@ -83,8 +83,8 @@ namespace Soup {
                [CCode (has_construct_function = false)]
                public Address.from_sockaddr (void* sa, int len);
                public GLib.SocketAddress get_gsockaddr ();
-               public unowned string get_name ();
-               public unowned string get_physical ();
+               public unowned string? get_name ();
+               public unowned string? get_physical ();
                public uint get_port ();
                public void* get_sockaddr (int len);
                public uint hash_by_ip ();
@@ -208,7 +208,7 @@ namespace Soup {
                public size_t length;
                [CCode (has_construct_function = false)]
                [Deprecated (replacement = "Buffer.take", since = "2.32")]
-               public Buffer (Soup.MemoryUse use, [CCode (array_length_cname = "length", array_length_pos = 
2.1, array_length_type = "gsize", type = "gconstpointer")] uint8[] data);
+               public Buffer (Soup.MemoryUse use, [CCode (array_length_cname = "length", array_length_pos = 
2.1, array_length_type = "gsize")] uint8[] data);
                public Soup.Buffer copy ();
                public void free ();
                public GLib.Bytes get_as_bytes ();
@@ -219,7 +219,7 @@ namespace Soup {
                [CCode (has_construct_function = false)]
                public Buffer.take ([CCode (array_length_cname = "length", array_length_pos = 1.1, 
array_length_type = "gsize")] owned uint8[] data);
                [CCode (has_construct_function = false)]
-               public Buffer.with_owner ([CCode (array_length_cname = "length", array_length_pos = 1.5, 
array_length_type = "gsize", type = "gconstpointer")] uint8[] data, void* owner, GLib.DestroyNotify? 
owner_dnotify);
+               public Buffer.with_owner ([CCode (array_length_cname = "length", array_length_pos = 1.5, 
array_length_type = "gsize")] uint8[] data, void* owner, GLib.DestroyNotify? owner_dnotify);
        }
        [CCode (cheader_filename = "libsoup/soup.h", copy_function = "g_boxed_copy", free_function = 
"g_boxed_free", type_id = "soup_byte_array_get_type ()")]
        [Compact]
@@ -247,8 +247,8 @@ namespace Soup {
        public class ClientContext {
                [Deprecated]
                public unowned Soup.Address get_address ();
-               public unowned Soup.AuthDomain get_auth_domain ();
-               public unowned string get_auth_user ();
+               public unowned Soup.AuthDomain? get_auth_domain ();
+               public unowned string? get_auth_user ();
                public unowned GLib.Socket get_gsocket ();
                public unowned string get_host ();
                public unowned GLib.SocketAddress get_local_address ();
@@ -296,7 +296,7 @@ namespace Soup {
                public unowned string get_path ();
                public bool get_secure ();
                public unowned string get_value ();
-               public static Soup.Cookie parse (string header, Soup.URI origin);
+               public static Soup.Cookie? parse (string header, Soup.URI origin);
                public void set_domain (string domain);
                public void set_expires (Soup.Date expires);
                public void set_http_only (bool http_only);
@@ -318,7 +318,7 @@ namespace Soup {
                public void delete_cookie (Soup.Cookie cookie);
                public Soup.CookieJarAcceptPolicy get_accept_policy ();
                public GLib.SList<Soup.Cookie> get_cookie_list (Soup.URI uri, bool for_http);
-               public string get_cookies (Soup.URI uri, bool for_http);
+               public string? get_cookies (Soup.URI uri, bool for_http);
                public virtual bool is_persistent ();
                [Deprecated]
                public virtual void save ();
@@ -479,7 +479,7 @@ namespace Soup {
                public Soup.Buffer flatten ();
                public void free ();
                public bool get_accumulate ();
-               public Soup.Buffer get_chunk (int64 offset);
+               public Soup.Buffer? get_chunk (int64 offset);
                public void got_chunk (Soup.Buffer chunk);
                public void set_accumulate (bool accumulate);
                public void truncate ();
@@ -497,16 +497,16 @@ namespace Soup {
                public void free ();
                public void free_ranges (Soup.Range ranges);
                [Deprecated]
-               public unowned string @get (string name);
+               public unowned string? @get (string name);
                public bool get_content_disposition (out string disposition, out 
GLib.HashTable<string,string> @params);
                public int64 get_content_length ();
                public bool get_content_range (int64 start, int64 end, int64 total_length);
-               public unowned string get_content_type (out GLib.HashTable<string,string> @params);
+               public unowned string? get_content_type (out GLib.HashTable<string,string> @params);
                public Soup.Encoding get_encoding ();
                public Soup.Expectation get_expectations ();
-               public unowned string get_list (string name);
-               public unowned string get_one (string name);
-               public bool get_ranges (int64 total_length, [CCode (array_length_cname = "length", 
array_length_pos = 2.1, type = "SoupRange**")] out Soup.Range[] ranges);
+               public unowned string? get_list (string name);
+               public unowned string? get_one (string name);
+               public bool get_ranges (int64 total_length, [CCode (array_length_cname = "length", 
array_length_pos = 2.1)] out Soup.Range[] ranges);
                public void remove (string name);
                public void replace (string name, string value);
                public void set_content_disposition (string disposition, GLib.HashTable<string,string>? 
@params);
@@ -545,9 +545,9 @@ namespace Soup {
        public class MultipartInputStream : GLib.FilterInputStream, GLib.PollableInputStream {
                [CCode (has_construct_function = false)]
                public MultipartInputStream (Soup.Message msg, GLib.InputStream base_stream);
-               public unowned Soup.MessageHeaders get_headers ();
-               public GLib.InputStream next_part (GLib.Cancellable? cancellable = null) throws GLib.Error;
-               public async GLib.InputStream next_part_async (int io_priority, GLib.Cancellable? 
cancellable) throws GLib.Error;
+               public unowned Soup.MessageHeaders? get_headers ();
+               public GLib.InputStream? next_part (GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public async GLib.InputStream? next_part_async (int io_priority, GLib.Cancellable? 
cancellable) throws GLib.Error;
                [NoAccessorMethod]
                public Soup.Message message { owned get; construct; }
        }
@@ -565,7 +565,7 @@ namespace Soup {
                [NoWrapper]
                public virtual bool check_uri (Soup.URI uri) throws GLib.Error;
                public virtual int64 get_content_length ();
-               public virtual unowned string get_content_type ();
+               public virtual unowned string? get_content_type ();
                public unowned Soup.Session get_session ();
                public unowned Soup.URI get_uri ();
                public virtual GLib.InputStream send (GLib.Cancellable? cancellable = null) throws GLib.Error;
@@ -606,7 +606,7 @@ namespace Soup {
                public void add_handler (string? path, owned Soup.ServerCallback callback);
                public void disconnect ();
                [Deprecated]
-               public unowned GLib.MainContext get_async_context ();
+               public unowned GLib.MainContext? get_async_context ();
                [Deprecated]
                public unowned Soup.Socket get_listener ();
                public GLib.SList<weak GLib.Socket> get_listeners ();
@@ -672,9 +672,9 @@ namespace Soup {
                public virtual void cancel_message (Soup.Message msg, uint status_code);
                [NoWrapper]
                public virtual void flush_queue ();
-               public unowned GLib.MainContext get_async_context ();
-               public unowned Soup.SessionFeature get_feature (GLib.Type feature_type);
-               public unowned Soup.SessionFeature get_feature_for_message (GLib.Type feature_type, 
Soup.Message msg);
+               public unowned GLib.MainContext? get_async_context ();
+               public unowned Soup.SessionFeature? get_feature (GLib.Type feature_type);
+               public unowned Soup.SessionFeature? get_feature_for_message (GLib.Type feature_type, 
Soup.Message msg);
                public GLib.SList<Soup.SessionFeature> get_features (GLib.Type feature_type);
                public bool has_feature (GLib.Type feature_type);
                [NoWrapper]
@@ -780,11 +780,11 @@ namespace Soup {
                public bool is_connected ();
                public bool is_ssl ();
                public bool listen ();
-               public Soup.SocketIOStatus read ([CCode (array_length_cname = "len", array_length_pos = 1.5, 
array_length_type = "gsize", type = "gpointer")] uint8[] buffer, out size_t nread, GLib.Cancellable? 
cancellable = null) throws GLib.Error;
-               public Soup.SocketIOStatus read_until ([CCode (array_length_cname = "len", array_length_pos = 
1.5, array_length_type = "gsize", type = "gpointer")] uint8[] buffer, void* boundary, size_t boundary_len, 
out size_t nread, bool got_boundary, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public Soup.SocketIOStatus read ([CCode (array_length_cname = "len", array_length_pos = 1.5, 
array_length_type = "gsize")] uint8[] buffer, out size_t nread, GLib.Cancellable? cancellable = null) throws 
GLib.Error;
+               public Soup.SocketIOStatus read_until ([CCode (array_length_cname = "len", array_length_pos = 
1.5, array_length_type = "gsize")] uint8[] buffer, void* boundary, size_t boundary_len, out size_t nread, 
bool got_boundary, GLib.Cancellable? cancellable = null) throws GLib.Error;
                public bool start_proxy_ssl (string ssl_host, GLib.Cancellable? cancellable = null);
                public bool start_ssl (GLib.Cancellable? cancellable = null);
-               public Soup.SocketIOStatus write ([CCode (array_length_cname = "len", array_length_pos = 1.5, 
array_length_type = "gsize", type = "gconstpointer")] uint8[] buffer, out size_t nwrote, GLib.Cancellable? 
cancellable = null) throws GLib.Error;
+               public Soup.SocketIOStatus write ([CCode (array_length_cname = "len", array_length_pos = 1.5, 
array_length_type = "gsize")] uint8[] buffer, out size_t nwrote, GLib.Cancellable? cancellable = null) throws 
GLib.Error;
                [NoAccessorMethod]
                public GLib.MainContext async_context { owned get; construct; }
                [NoAccessorMethod]
@@ -879,7 +879,9 @@ namespace Soup {
        }
        [CCode (cheader_filename = "libsoup/soup.h", type_cname = "SoupProxyURIResolverInterface", type_id = 
"soup_proxy_uri_resolver_get_type ()")]
        public interface ProxyURIResolver : Soup.SessionFeature, GLib.Object {
+               [Deprecated]
                public abstract void get_proxy_uri_async (Soup.URI uri, GLib.MainContext? async_context, 
GLib.Cancellable? cancellable, [CCode (scope = "async")] owned Soup.ProxyURIResolverCallback callback);
+               [Deprecated]
                public abstract uint get_proxy_uri_sync (Soup.URI uri, GLib.Cancellable? cancellable, out 
Soup.URI proxy_uri);
        }
        [CCode (cheader_filename = "libsoup/soup.h", type_cname = "SoupSessionFeatureInterface", type_id = 
"soup_session_feature_get_type ()")]
@@ -1199,14 +1201,14 @@ namespace Soup {
        [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 4.9)]
        public delegate bool AuthDomainBasicAuthCallback (Soup.AuthDomain domain, Soup.Message msg, string 
username, string password);
        [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 3.9)]
-       public delegate string AuthDomainDigestAuthCallback (Soup.AuthDomain domain, Soup.Message msg, string 
username);
+       public delegate string? AuthDomainDigestAuthCallback (Soup.AuthDomain domain, Soup.Message msg, 
string username);
        [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 2.9)]
        public delegate bool AuthDomainFilter (Soup.AuthDomain domain, Soup.Message msg);
        [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 3.9)]
        public delegate bool AuthDomainGenericAuthCallback (Soup.AuthDomain domain, Soup.Message msg, string 
username);
        [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 2.9)]
        [Deprecated]
-       public delegate Soup.Buffer ChunkAllocator (Soup.Message msg, size_t max_len);
+       public delegate Soup.Buffer? ChunkAllocator (Soup.Message msg, size_t max_len);
        [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 2.9)]
        public delegate Soup.LoggerLogLevel LoggerFilter (Soup.Logger logger, Soup.Message msg);
        [CCode (cheader_filename = "libsoup/soup.h", instance_pos = 4.9)]
@@ -1612,7 +1614,7 @@ namespace Soup {
        [CCode (cheader_filename = "libsoup/soup.h")]
        public static void value_array_append_vals (GLib.ValueArray array, ...);
        [CCode (cheader_filename = "libsoup/soup.h")]
-       public static GLib.ValueArray value_array_from_args (va_list args);
+       public static GLib.ValueArray? value_array_from_args (va_list args);
        [CCode (cheader_filename = "libsoup/soup.h")]
        public static bool value_array_get_nth (GLib.ValueArray array, uint index_, GLib.Type type, ...);
        [CCode (cheader_filename = "libsoup/soup.h")]
diff --git a/vapi/metadata/WebKit2WebExtension-4.0.metadata b/vapi/metadata/WebKit2WebExtension-4.0.metadata
index 1c01075..65bfbfe 100644
--- a/vapi/metadata/WebKit2WebExtension-4.0.metadata
+++ b/vapi/metadata/WebKit2WebExtension-4.0.metadata
@@ -1,7 +1,11 @@
 DOM* parent="WebKit.DOM" name="DOM(.+)"
 
 DOMEventTarget.add_event_listener skip
+_ContextMenu skip
+_ContextMenuItem skip
 
 Frame.get_javascript_* type="void*"
 
 DOMEventTarget.add_event_listener_with_closure.handler type="owned WebKit.DOM.EventTargetFunc"
+
+
diff --git a/vapi/webkit2gtk-4.0.vapi b/vapi/webkit2gtk-4.0.vapi
index afdbd21..d6a4ff8 100644
--- a/vapi/webkit2gtk-4.0.vapi
+++ b/vapi/webkit2gtk-4.0.vapi
@@ -50,12 +50,14 @@ namespace WebKit {
                public unowned WebKit.ContextMenuItem get_item_at_position (uint position);
                public unowned GLib.List<WebKit.ContextMenuItem> get_items ();
                public uint get_n_items ();
+               public unowned GLib.Variant get_user_data ();
                public void insert (WebKit.ContextMenuItem item, int position);
                public unowned WebKit.ContextMenuItem last ();
                public void move_item (WebKit.ContextMenuItem item, int position);
                public void prepend (WebKit.ContextMenuItem item);
                public void remove (WebKit.ContextMenuItem item);
                public void remove_all ();
+               public void set_user_data (GLib.Variant user_data);
                [CCode (has_construct_function = false)]
                public ContextMenu.with_items (GLib.List<WebKit.ContextMenuItem> items);
        }
@@ -528,8 +530,11 @@ namespace WebKit {
                public UserContentManager ();
                public void add_script (WebKit.UserScript script);
                public void add_style_sheet (WebKit.UserStyleSheet stylesheet);
+               public bool register_script_message_handler (string name);
                public void remove_all_scripts ();
                public void remove_all_style_sheets ();
+               public void unregister_script_message_handler (string name);
+               public signal void script_message_received (WebKit.JavascriptResult js_result);
        }
        [CCode (cheader_filename = "webkit2/webkit2.h", ref_function = "webkit_user_script_ref", type_id = 
"webkit_user_script_get_type ()", unref_function = "webkit_user_script_unref")]
        [Compact]
@@ -550,7 +555,7 @@ namespace WebKit {
        [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 WebContext ();
                public void allow_tls_certificate_for_host (GLib.TlsCertificate certificate, string host);
                public void clear_cache ();
                public WebKit.Download download_uri (string uri);
@@ -579,8 +584,10 @@ namespace WebKit {
                public void set_tls_errors_policy (WebKit.TLSErrorsPolicy policy);
                public void set_web_extensions_directory (string directory);
                public void set_web_extensions_initialization_user_data (GLib.Variant user_data);
-               public signal void download_started (WebKit.Download download);
-               public signal void initialize_web_extensions ();
+               [NoAccessorMethod]
+               public string local_storage_directory { owned get; construct; }
+               public virtual signal void download_started (WebKit.Download download);
+               public virtual signal void initialize_web_extensions ();
        }
        [CCode (cheader_filename = "webkit2/webkit2.h", type_id = "webkit_web_inspector_get_type ()")]
        public class WebInspector : GLib.Object {
@@ -614,6 +621,7 @@ namespace WebKit {
                public WebKit.URIResponse response { get; }
                public string uri { get; }
                public signal void failed (void* error);
+               public signal void failed_with_tls_errors (GLib.TlsCertificate certificate, 
GLib.TlsCertificateFlags errors);
                public signal void finished ();
                public signal void received_data (uint64 data_length);
                public signal void sent_request (WebKit.URIRequest request, WebKit.URIResponse 
redirected_response);
diff --git a/vapi/webkit2gtk-web-extension-4.0.vapi b/vapi/webkit2gtk-web-extension-4.0.vapi
index 46f87fe..fb8159b 100644
--- a/vapi/webkit2gtk-web-extension-4.0.vapi
+++ b/vapi/webkit2gtk-web-extension-4.0.vapi
@@ -146,6 +146,7 @@ namespace WebKit {
                public class DOMWindow : WebKit.DOM.Object, WebKit.DOM.EventTarget {
                        [CCode (has_construct_function = false)]
                        protected DOMWindow ();
+                       public bool webkit_message_handlers_post_message (string handler, string message);
                        [NoAccessorMethod]
                        public bool closed { get; }
                        [NoAccessorMethod]
@@ -559,7 +560,8 @@ namespace WebKit {
                        public string search { owned get; set; }
                        public string shape { owned get; set; }
                        public string target { owned get; set; }
-                       public string text { owned get; }
+                       [NoAccessorMethod]
+                       public string text { owned get; set; }
                        [NoAccessorMethod]
                        public string type { owned get; set; }
                }
@@ -2603,6 +2605,36 @@ namespace WebKit {
                [CCode (cheader_filename = "webkit2/webkit-web-extension.h", cname = 
"WEBKIT_DOM_XPATH_RESULT_UNORDERED_NODE_SNAPSHOT_TYPE")]
                public const int _XPATH_RESULT_UNORDERED_NODE_SNAPSHOT_TYPE;
        }
+       [CCode (cheader_filename = "webkit2/webkit-web-extension.h", type_id = "webkit_context_menu_get_type 
()")]
+       public class ContextMenu : GLib.Object {
+               [CCode (has_construct_function = false)]
+               public ContextMenu ();
+               public void append (WebKit.ContextMenuItem item);
+               public uint get_n_items ();
+               public GLib.Variant get_user_data ();
+               public void insert (WebKit.ContextMenuItem item, int position);
+               public void move_item (WebKit.ContextMenuItem item, int position);
+               public void prepend (WebKit.ContextMenuItem item);
+               public void remove (WebKit.ContextMenuItem item);
+               public void remove_all ();
+               public void set_user_data (GLib.Variant user_data);
+       }
+       [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)]
+               public ContextMenuItem (Gtk.Action action);
+               [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);
+               public WebKit.ContextMenuAction get_stock_action ();
+               public bool is_separator ();
+               [CCode (has_construct_function = false)]
+               public ContextMenuItem.separator ();
+               public void set_submenu (WebKit.ContextMenu submenu);
+               [CCode (has_construct_function = false)]
+               public ContextMenuItem.with_submenu (string label, WebKit.ContextMenu submenu);
+       }
        [CCode (cheader_filename = "webkit2/webkit-web-extension.h", type_id = "webkit_frame_get_type ()")]
        public class Frame : GLib.Object {
                [CCode (has_construct_function = false)]
@@ -2612,6 +2644,29 @@ namespace WebKit {
                public unowned string get_uri ();
                public bool is_main_frame ();
        }
+       [CCode (cheader_filename = "webkit2/webkit-web-extension.h", type_id = 
"webkit_hit_test_result_get_type ()")]
+       public class HitTestResult : GLib.Object {
+               [CCode (has_construct_function = false)]
+               protected HitTestResult ();
+               public bool context_is_editable ();
+               public bool context_is_image ();
+               public bool context_is_link ();
+               public bool context_is_media ();
+               public bool context_is_scrollbar ();
+               public bool context_is_selection ();
+               public uint get_context ();
+               public unowned string get_image_uri ();
+               public unowned string get_link_label ();
+               public unowned string get_link_title ();
+               public unowned string get_link_uri ();
+               public unowned string get_media_uri ();
+               public uint context { get; construct; }
+               public string image_uri { get; construct; }
+               public string link_label { get; construct; }
+               public string link_title { get; construct; }
+               public string link_uri { get; construct; }
+               public string media_uri { get; construct; }
+       }
        [CCode (cheader_filename = "webkit2/webkit-web-extension.h", type_id = "webkit_script_world_get_type 
()")]
        public class ScriptWorld : GLib.Object {
                [CCode (has_construct_function = false)]
@@ -2652,6 +2707,13 @@ namespace WebKit {
                public unowned WebKit.WebPage get_page (uint64 page_id);
                public signal void page_created (WebKit.WebPage web_page);
        }
+       [CCode (cheader_filename = "webkit2/webkit-web-extension.h", type_id = 
"webkit_web_hit_test_result_get_type ()")]
+       public class WebHitTestResult : WebKit.HitTestResult {
+               [CCode (has_construct_function = false)]
+               protected WebHitTestResult ();
+               public unowned WebKit.DOM.Node get_node ();
+               public WebKit.DOM.Node node { get; construct; }
+       }
        [CCode (cheader_filename = "webkit2/webkit-web-extension.h", type_id = "webkit_web_page_get_type ()")]
        public class WebPage : GLib.Object {
                [CCode (has_construct_function = false)]
@@ -2661,9 +2723,69 @@ namespace WebKit {
                public unowned WebKit.Frame get_main_frame ();
                public unowned string get_uri ();
                public string uri { get; }
+               public signal bool context_menu (WebKit.ContextMenu context_menu, WebKit.WebHitTestResult 
hit_test_result);
                public signal void document_loaded ();
                public signal bool send_request (WebKit.URIRequest request, WebKit.URIResponse 
redirected_response);
        }
+       [CCode (cheader_filename = "webkit2/webkit-web-extension.h", cprefix = "WEBKIT_CONTEXT_MENU_ACTION_", 
has_type_id = false)]
+       public enum ContextMenuAction {
+               NO_ACTION,
+               OPEN_LINK,
+               OPEN_LINK_IN_NEW_WINDOW,
+               DOWNLOAD_LINK_TO_DISK,
+               COPY_LINK_TO_CLIPBOARD,
+               OPEN_IMAGE_IN_NEW_WINDOW,
+               DOWNLOAD_IMAGE_TO_DISK,
+               COPY_IMAGE_TO_CLIPBOARD,
+               COPY_IMAGE_URL_TO_CLIPBOARD,
+               OPEN_FRAME_IN_NEW_WINDOW,
+               GO_BACK,
+               GO_FORWARD,
+               STOP,
+               RELOAD,
+               COPY,
+               CUT,
+               PASTE,
+               DELETE,
+               SELECT_ALL,
+               INPUT_METHODS,
+               UNICODE,
+               SPELLING_GUESS,
+               NO_GUESSES_FOUND,
+               IGNORE_SPELLING,
+               LEARN_SPELLING,
+               IGNORE_GRAMMAR,
+               FONT_MENU,
+               BOLD,
+               ITALIC,
+               UNDERLINE,
+               OUTLINE,
+               INSPECT_ELEMENT,
+               OPEN_VIDEO_IN_NEW_WINDOW,
+               OPEN_AUDIO_IN_NEW_WINDOW,
+               COPY_VIDEO_LINK_TO_CLIPBOARD,
+               COPY_AUDIO_LINK_TO_CLIPBOARD,
+               TOGGLE_MEDIA_CONTROLS,
+               TOGGLE_MEDIA_LOOP,
+               ENTER_VIDEO_FULLSCREEN,
+               MEDIA_PLAY,
+               MEDIA_PAUSE,
+               MEDIA_MUTE,
+               DOWNLOAD_VIDEO_TO_DISK,
+               DOWNLOAD_AUDIO_TO_DISK,
+               CUSTOM
+       }
+       [CCode (cheader_filename = "webkit2/webkit-web-extension.h", cprefix = 
"WEBKIT_HIT_TEST_RESULT_CONTEXT_", has_type_id = false)]
+       [Flags]
+       public enum HitTestResultContext {
+               DOCUMENT,
+               LINK,
+               IMAGE,
+               MEDIA,
+               EDITABLE,
+               SCROLLBAR,
+               SELECTION
+       }
        [CCode (cheader_filename = "webkit2/webkit-web-extension.h", has_target = false)]
        public delegate void WebExtensionInitializeFunction (WebKit.WebExtension extension);
        [CCode (cheader_filename = "webkit2/webkit-web-extension.h", has_target = false)]


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