[vala] vapi: Add glib-unix.h functions to glib-2.0.vapi



commit 908e52301b10669149821888d02d6090b38c1dbf
Author: Philip Withnall <philip tecnocode co uk>
Date:   Fri Jan 13 19:30:29 2012 +0000

    vapi: Add glib-unix.h functions to glib-2.0.vapi
    
    To bind the things in glib-unix.h. Creating a separate glib-unix-2.0.vapi is
    unneccessary because these functions are present in libglib-2.0.so itself,
    rather than a separate library. They just require the glib-unix.h header to
    be included.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=667894

 vapi/glib-2.0.vapi |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 25b228f..cd94c86 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -4711,4 +4711,20 @@ namespace GLib {
 
 	[CCode (simple_generics = true)]
 	private static void qsort_with_data<T> (T[] elems, size_t size, [CCode (type = "GCompareDataFunc")] GLib.CompareDataFunc<T> compare_func);
+
+	/* Unix-specific functions. All of these have to include glib-unix.h. */
+	namespace Unix {
+		[CCode (cheader_filename = "glib-unix.h", cname = "g_unix_signal_add_full")]
+		public static uint signal_add (int signum, owned GLib.SourceFunc handler, [CCode (pos = 0.9)] int priority = Priority.DEFAULT);
+
+		[CCode (cheader_filename = "glib-unix.h", cname = "GSource")]
+		public class SignalSource : GLib.Source {
+			public SignalSource (int signum);
+		}
+
+		[CCode (cheader_filename = "glib-unix.h")]
+		public static bool open_pipe (int fds, int flags) throws GLib.Error;
+		[CCode (cheader_filename = "glib-unix.h")]
+		public static bool set_fd_nonblocking (int fd, bool nonblock) throws GLib.Error;
+	}
 }



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