From: Philip Withnall Date: Fri, 13 Jan 2012 19:30:29 +0000 (+0000) Subject: vapi: Add glib-unix.h functions to glib-2.0.vapi X-Git-Tag: 0.15.2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=908e52301b10669149821888d02d6090b38c1dbf;p=thirdparty%2Fvala.git 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 --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 25b228fe3..cd94c86bb 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[] elems, size_t size, [CCode (type = "GCompareDataFunc")] GLib.CompareDataFunc 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; + } }