]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vapi: Add glib-unix.h functions to glib-2.0.vapi
authorPhilip Withnall <philip@tecnocode.co.uk>
Fri, 13 Jan 2012 19:30:29 +0000 (19:30 +0000)
committerPhilip Withnall <philip@tecnocode.co.uk>
Sun, 5 Feb 2012 13:42:25 +0000 (13:42 +0000)
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

index 25b228fe381225697be627ec8de2d79727077ac8..cd94c86bbeaa789fdcac5ad65b1273e0a2473382 100644 (file)
@@ -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;
+       }
 }