]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gio-2.0, gio-unix-2.0, gdk-pixbuf-2.0: Fix cancellable parameters
authorLuca Bruno <lucabru@src.gnome.org>
Tue, 10 May 2011 14:34:31 +0000 (16:34 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 29 May 2011 10:40:41 +0000 (12:40 +0200)
Fixes bug 649873.

vapi/gdk-pixbuf-2.0.vapi
vapi/gio-2.0.vapi
vapi/gio-unix-2.0.vapi
vapi/packages/gdk-pixbuf-2.0/gdk-pixbuf-2.0.metadata
vapi/packages/gio-2.0/gio-2.0.metadata
vapi/packages/gio-unix-2.0/gio-unix-2.0.metadata

index e37f2ad9c920f8c7efab02cbfb4a1c03893803f5..8910a8392e444e5fd9468fdd828df9cc511b89c0 100644 (file)
@@ -28,13 +28,13 @@ namespace Gdk {
                public Pixbuf.from_inline (int data_length, [CCode (array_length = false)] uint8[] data, bool copy_pixels = true) throws GLib.Error;
                public static unowned Gdk.Pixbuf from_pixdata (Gdk.Pixdata pixdata, bool copy_pixels) throws GLib.Error;
                [CCode (has_construct_function = false)]
-               public Pixbuf.from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable) throws GLib.Error;
+               public Pixbuf.from_stream (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [CCode (type = "void", has_construct_function = false)]
-               public async Pixbuf.from_stream_async (GLib.InputStream stream, GLib.Cancellable cancellable) throws GLib.Error;
+               public async Pixbuf.from_stream_async (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [CCode (has_construct_function = false)]
-               public Pixbuf.from_stream_at_scale (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable) throws GLib.Error;
+               public Pixbuf.from_stream_at_scale (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable = null) throws GLib.Error;
                [CCode (type = "void", has_construct_function = false)]
-               public async Pixbuf.from_stream_at_scale_async (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable cancellable);
+               public async Pixbuf.from_stream_at_scale_async (GLib.InputStream stream, int width, int height, bool preserve_aspect_ratio, GLib.Cancellable? cancellable = null);
                [CCode (has_construct_function = false)]
                public Pixbuf.from_xpm_data ([CCode (array_length = false)] string[] data);
                public int get_bits_per_sample ();
@@ -56,8 +56,8 @@ namespace Gdk {
                public bool save_to_bufferv ([CCode (type = "gchar**", array_length_type = "gsize")] out uint8[] buffer, string type, string[] option_keys, string[] option_values) throws GLib.Error;
                public bool save_to_callback (Gdk.PixbufSaveFunc save_func, string type, ...) throws GLib.Error;
                public bool save_to_callbackv (Gdk.PixbufSaveFunc save_func, string type, string[] option_keys, string[] option_values) throws GLib.Error;
-               public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable cancellable) throws GLib.Error;
-               public async bool save_to_stream_async (GLib.OutputStream stream, string type, GLib.Cancellable cancellable) throws GLib.Error;
+               public bool save_to_stream (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public async bool save_to_stream_async (GLib.OutputStream stream, string type, GLib.Cancellable? cancellable = null) throws GLib.Error;
                public bool savev (string filename, string type, out unowned string option_keys, out unowned string option_values) throws GLib.Error;
                public void scale (Gdk.Pixbuf dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, Gdk.InterpType interp_type);
                public Gdk.Pixbuf scale_simple (int dest_width, int dest_height, Gdk.InterpType interp_type);
@@ -218,7 +218,7 @@ namespace Gdk {
        [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
        public delegate void PixbufDestroyNotify ([CCode (array_length = false)] uint8[] pixels);
        [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
-       public delegate bool PixbufSaveFunc (string buf, size_t count, GLib.Error error);
+       public delegate bool PixbufSaveFunc (string buf, size_t count) throws GLib.Error;
        [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
        public const int PIXBUF_FEATURES_H;
        [CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
index 3596c1b3fc030fc2f59f6e704e32c5f0e0bd5e1c..67e2067eaded0f71de7f1e4124c8eabe2b2d5f5b 100644 (file)
@@ -160,7 +160,7 @@ namespace GLib {
                public void cancel ();
                public ulong connect ([CCode (type = "GCallback*")] owned GLib.Func<GLib.Cancellable> callback);
                public void disconnect (ulong handler_id);
-               public static unowned GLib.Cancellable get_current ();
+               public static unowned GLib.Cancellable? get_current ();
                public int get_fd ();
                public bool is_cancelled ();
                public bool make_pollfd (GLib.PollFD pollfd);
@@ -2474,7 +2474,7 @@ namespace GLib {
        [CCode (cheader_filename = "gio/gio.h")]
        public delegate void BusNameVanishedCallback (GLib.DBusConnection connection, string name);
        [CCode (cheader_filename = "gio/gio.h")]
-       public delegate bool CancellableSourceFunc (GLib.Cancellable cancellable);
+       public delegate bool CancellableSourceFunc (GLib.Cancellable? cancellable);
        [CCode (cheader_filename = "gio/gio.h")]
        public delegate unowned GLib.Variant DBusInterfaceGetPropertyFunc (GLib.DBusConnection connection, string sender, string object_path, string interface_name, string property_name, GLib.Error error);
        [CCode (cheader_filename = "gio/gio.h")]
@@ -2496,7 +2496,7 @@ namespace GLib {
        [CCode (cheader_filename = "gio/gio.h", has_target = false)]
        public delegate bool FileReadMoreCallback (string file_contents, int64 file_size, void* callback_data);
        [CCode (cheader_filename = "gio/gio.h")]
-       public delegate bool IOSchedulerJobFunc (GLib.IOSchedulerJob job, GLib.Cancellable cancellable);
+       public delegate bool IOSchedulerJobFunc (GLib.IOSchedulerJob job, GLib.Cancellable? cancellable);
        [CCode (cheader_filename = "gio/gio.h")]
        public delegate bool PollableSourceFunc (GLib.Object pollable_stream);
        [CCode (cheader_filename = "gio/gio.h", has_target = false)]
@@ -2508,7 +2508,7 @@ namespace GLib {
        [CCode (cheader_filename = "gio/gio.h")]
        public delegate bool SettingsGetMapping (GLib.Variant value, void* result);
        [CCode (cheader_filename = "gio/gio.h", has_target = false)]
-       public delegate void SimpleAsyncThreadFunc (GLib.SimpleAsyncResult res, GLib.Object object, GLib.Cancellable cancellable);
+       public delegate void SimpleAsyncThreadFunc (GLib.SimpleAsyncResult res, GLib.Object object, GLib.Cancellable? cancellable);
        [CCode (cheader_filename = "gio/gio.h")]
        public delegate bool SocketSourceFunc (GLib.Socket socket, GLib.IOCondition condition);
        [CCode (cheader_filename = "gio/gio.h")]
index 24e698e6a9f2900679b2d861e2b0f26334443bda..8929287aecfe8b531b22ebebe19e76824b35d5fa 100644 (file)
@@ -19,10 +19,10 @@ namespace GLib {
        public class UnixConnection : GLib.SocketConnection {
                [CCode (has_construct_function = false)]
                protected UnixConnection ();
-               public unowned GLib.Credentials receive_credentials (GLib.Cancellable cancellable) throws GLib.Error;
-               public int receive_fd (GLib.Cancellable cancellable) throws GLib.Error;
-               public bool send_credentials (GLib.Cancellable cancellable) throws GLib.Error;
-               public bool send_fd (int fd, GLib.Cancellable cancellable) throws GLib.Error;
+               public unowned GLib.Credentials receive_credentials (GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public int receive_fd (GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public bool send_credentials (GLib.Cancellable? cancellable = null) throws GLib.Error;
+               public bool send_fd (int fd, GLib.Cancellable? cancellable = null) throws GLib.Error;
        }
        [CCode (cheader_filename = "gio/gunixfdmessage.h")]
        public class UnixFDMessage : GLib.SocketControlMessage {
index bb8a10d4df693e8d91a3ceb857cd4e1ae8c0174d..25ad7f59f5d49841d8d479e930cfd5c68cd92ecc 100644 (file)
@@ -1,4 +1,5 @@
 Gdk cheader_filename="gdk-pixbuf/gdk-pixdata.h" gir_namespace="GdkPixbuf" gir_version="2.0"
+gdk_pixbuf_*.cancellable nullable="1" default_value="null"
 gdk_pixbuf_copy transfer_ownership="1"
 gdk_pixbuf_get_file_info.width is_out="1"
 gdk_pixbuf_get_file_info.height is_out="1"
@@ -7,8 +8,6 @@ gdk_pixbuf_get_pixels type_name="uint8" is_array="1" no_array_length="1"
 gdk_pixbuf_new_from_data.destroy_fn nullable="1"
 gdk_pixbuf_new_from_data.destroy_fn_data hidden="1"
 gdk_pixbuf_new_from_data.data type_name="uint8" is_array="1" no_array_length="1"
-gdk_pixbuf_new_from_stream.cancellable nullable="1"
-gdk_pixbuf_new_from_stream_at_scale.cancellable nullable="1"
 gdk_pixbuf_new_from_xpm_data.data is_array="1" no_array_length="1"
 gdk_pixbuf_new_from_inline.data type_name="uint8" is_array="1" no_array_length="1"
 gdk_pixbuf_new_from_inline.copy_pixels default_value="true"
index c77ade515fbe0c75da251b8f9ec66058e4e7fafc..1fa43c0f877008c97d1e6d04509955e3dfa44645 100644 (file)
@@ -18,6 +18,8 @@ g_buffered_input_stream_peek.count hidden="1"
 g_buffered_input_stream_peek.offset default_value="0"
 g_buffered_input_stream_peek_buffer type_name="uint8" is_array="1" array_length_type="gsize"
 g_buffered_input_stream_peek_buffer.count hidden="1"
+GCancellableSourceFunc.cancellable nullable="1"
+g_cancellable_get_current nullable="1"
 g_content_type_can_be_executable parent="ContentType"
 g_content_type_equals parent="ContentType"
 g_content_type_from_mime_type parent="ContentType" transfer_ownership="1"
@@ -198,6 +200,7 @@ GInputVector.size hidden="1"
 GIOErrorEnum rename_to="IOError" errordomain="1"
 g_io_extension_point_get_extensions type_arguments="IOExtension"
 g_io_modules_load_all_in_directory type_arguments="unowned TypeModule" transfer_ownership="1"
+GIOSchedulerJobFunc.cancellable nullable="1"
 g_io_scheduler_job_send_to_mainloop.func transfer_ownership="1"
 g_io_scheduler_job_send_to_mainloop.notify hidden="1"
 g_io_scheduler_job_send_to_mainloop_async.func transfer_ownership="1"
@@ -360,6 +363,7 @@ g_settings_get_strv is_array="1" no_array_length="1" array_null_terminated="1" t
 g_settings_set_strv.value is_array="1" no_array_length="1"
 GSettingsBindSetMapping transfer_ownership="1"
 
+GSimpleAsyncThreadFunc.cancellable nullable="1"
 g_simple_async_result_new.source_object nullable="1"
 g_simple_async_result_new_take_error hidden="1"
 
index 62de7d64f891cb8ba95c689c5935c4786edcfabe..ef3ff76911e60bc89967a968bf4405a36320eb72 100644 (file)
@@ -6,6 +6,7 @@ GUnixFDMessage cheader_filename="gio/gunixfdmessage.h"
 GUnixInputStream cheader_filename="gio/gunixinputstream.h"
 g_unix_is_mount_path_system_internal name="is_mount_path_system_internal"
 GUnixMountEntry hidden="1"
+g_unix_*.cancellable nullable="1" default_value="null"
 g_unix_mounts_changed_since name="mounts_changed_since"
 g_unix_mounts_get hidden="1"
 g_unix_mount_at hidden="1"