From: David Kozub Date: Thu, 24 Nov 2011 17:15:00 +0000 (-0800) Subject: glib-2.0: add IOSource to make IOChannel.create_watch safer and easier X-Git-Tag: 0.15.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11fdba317d61fb4d17c855f5bc26bef0292ec5fa;p=thirdparty%2Fvala.git glib-2.0: add IOSource to make IOChannel.create_watch safer and easier --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 8d39693fd..5b79e4631 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -2014,7 +2014,7 @@ namespace GLib { public IOStatus seek_position (int64 offset, SeekType type) throws IOChannelError; public IOStatus shutdown (bool flush) throws IOChannelError; [CCode (cname = "g_io_create_watch")] - public GLib.Source create_watch (IOCondition condition); + public IOSource create_watch (IOCondition condition); [CCode (cname = "g_io_add_watch")] public uint add_watch (IOCondition condition, IOFunc func); [CCode (cname = "g_io_add_watch_full")] @@ -2034,6 +2034,15 @@ namespace GLib { public void set_close_on_unref (bool do_close); } + [Compact] + [CCode (cname = "GSource")] + public class IOSource : Source { + [CCode (cname = "g_io_create_watch")] + public IOSource (IOChannel channel, IOCondition condition); + [CCode (cname = "g_source_set_callback")] + public void set_callback ([CCode (type = "GSourceFunc")] owned IOFunc func); + } + [CCode (cprefix = "G_SEEK_", has_type_id = false)] public enum SeekType { CUR,