[vala] glib-2.0: add IOSource to make IOChannel.create_watch safer and easier



commit 11fdba317d61fb4d17c855f5bc26bef0292ec5fa
Author: David Kozub <zub linux fjfi cvut cz>
Date:   Thu Nov 24 09:15:00 2011 -0800

    glib-2.0: add IOSource to make IOChannel.create_watch safer and easier

 vapi/glib-2.0.vapi |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 8d39693..5b79e46 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,



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