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