]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
improve GSource support
authorJürg Billeter <j@bitron.ch>
Sun, 25 Feb 2007 17:19:49 +0000 (17:19 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sun, 25 Feb 2007 17:19:49 +0000 (17:19 +0000)
2007-02-25  Jürg Billeter  <j@bitron.ch>

* vapi/glib-2.0.vala: improve GSource support

svn path=/trunk/; revision=194

vala/ChangeLog
vala/vapi/glib-2.0.vala

index 7e458b2d8c8e071e842b4ff0c6d1013bb2404cb4..727e9b74558ec38d79e542362b044e70fa9e37f9 100644 (file)
@@ -1,3 +1,7 @@
+2007-02-25  Jürg Billeter  <j@bitron.ch>
+
+       * vapi/glib-2.0.vala: improve GSource support
+
 2007-02-22  Raffaele Sandrini  <rasa@gmx.ch>
 
        * vala/valacodegenerator.vala: don't allow NULL terminated arrays of
index d67280737e5caca6e7965b62baefa89d0ca593e7..1cd1fec91ce76b49921518dc1fe078d43d426ed0 100644 (file)
@@ -328,6 +328,14 @@ namespace GLib {
                public MainContext get_context ();
        }
        
+       public enum Priority {
+               HIGH,
+               DEFAULT,
+               HIGH_IDLE,
+               DEFAULT_IDLE,
+               LOW
+       }
+       
        [ReferenceType (dup_function = "g_main_context_ref", free_function = "g_main_context_unref")]
        public struct MainContext {
                public construct ();
@@ -393,11 +401,14 @@ namespace GLib {
        }
        
        public struct PollFD {
+               public int fd;
+               public IOCondition events;
+               public IOCondition revents;
        }
        
        [ReferenceType (dup_function = "g_source_ref", free_function = "g_source_unref")]
        public struct Source {
-               public construct (SourceFuncs source_funcs, uint struct_size);
+               public construct (SourceFuncs source_funcs);
                public void set_funcs (SourceFuncs funcs);
                public uint attach (MainContext context);
                public void destroy ();
@@ -587,7 +598,17 @@ namespace GLib {
                public IOStatus seek_position (int64 offset, SeekType type, out Error error);
                public IOStatus shutdown (bool flush, out Error error);
        }
-       
+
+       [CCode (cprefix = "G_IO_")]
+       public enum IOCondition {
+               IN,
+               OUT,
+               PRI,
+               ERR,
+               HUP,
+               NVAL
+       }
+
        [CCode (cprefix = "G_SEEK_")]
        public enum SeekType {
                CUR,