2008-12-11 Stephane Delcroix <sdelcroix@novell.con>

* glib/Timeout.cs: map AddSeconds ().

svn path=/trunk/gtk-sharp/; revision=121925
This commit is contained in:
Stephane Delcroix 2008-12-20 13:03:07 +00:00
parent 89afb3f49f
commit 3a87d8d650
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2008-12-20 Stephane Delcroix <sdelcroix@novell.con>
* glib/Timeout.cs: map AddSeconds ().
2008-12-19 Mike Kestner <mkestner@novell.com>
* generator/BoxedGen.cs: don't generate glue dependencies.

View File

@ -68,6 +68,20 @@ namespace GLib {
return p.ID;
}
[DllImport("libglib-2.0-0.dll")]
static extern uint g_timeout_add_seconds (uint interval, TimeoutHandlerInternal d, IntPtr data);
public static uint AddSeconds (uint interval, TimeoutHandler hndlr)
{
TimeoutProxy p = new TimeoutProxy (hndlr);
p.ID = g_timeout_add_seconds (interval, (TimeoutHandlerInternal) p.proxy_handler, IntPtr.Zero);
lock (Source.source_handlers)
Source.source_handlers [p.ID] = p;
return p.ID;
}
}
}