GtkSharp/glib/Idle.cs
Mike Kestner c0b574a686 2003-02-21 Mike Kestner <mkestner@speakeasy.net>
* mapdllnames.pl : a little whitespace action
	* api/*-api.xml : move to win32 dllnames
	* */makefile.win32 : remove the mapdllnames step
	* */*.cs : move to win32 dllnames
	* */*.custom : move to win32 dllnames
	* sources/gtk-sharp.sources : move to win32 dllnames

svn path=/trunk/gtk-sharp/; revision=11823
2003-02-22 04:34:56 +00:00

46 lines
915 B
C#
Executable file

// GLib.Idle.cs - Idle class implementation
//
// Author: Mike Kestner <mkestner@speakeasy.net>
// Rachel Hestilow <hestilow@ximian.com>
//
// (c) 2002 Mike Kestner, Rachel Hestilow
namespace GLib {
using System;
using System.Runtime.InteropServices;
/// <summary>
/// IdleHandler Delegate
/// </summary>
///
/// <remarks>
/// Delegate used for idle handlerss in the GLib main loop. Return
/// true to restart the idle. Returning false clears the
/// idle.
/// </remarks>
public delegate bool IdleHandler ();
/// <summary>
/// Idle Class
/// </summary>
///
/// <remarks>
/// Allows the installation of Idle Handlers on the GLib main
/// loop.
/// </remarks>
public class Idle {
[DllImport("libglib-2.0-0.dll")]
static extern uint g_idle_add (IdleHandler d, IntPtr data);
public static uint Add (IdleHandler hndlr)
{
return g_idle_add (hndlr, IntPtr.Zero);
}
}
}