GtkSharp/doc/en/GLib/Timeout.xml
Mike Kestner b2d042d6a5 GLib updater run
svn path=/trunk/gtk-sharp/; revision=134155
2009-05-14 18:32:22 +00:00

141 lines
5.6 KiB
XML

<Type Name="Timeout" FullName="GLib.Timeout">
<TypeSignature Language="C#" Value="public class Timeout" Maintainer="auto" />
<AssemblyInfo>
<AssemblyName>glib-sharp</AssemblyName>
<AssemblyPublicKey>
</AssemblyPublicKey>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Allows the installation of Timeout Handlers on the GLib main loop.
It's in a way very similar to a System.Windows.Forms.Timer class.
You can use timeouts to invoke routines at specified intervals of time.
The diferance between GLib.Timeout and System.Windows.Forms.Timer is that Timeouts are always invoked on the thread that owns the Gtk mainloop
</summary>
<remarks>
<para>Use the <see cref="M:GLib.Timeout.Add" /> method to install timeout handlers into the mainloop.</para>
<example>
<code lang="C#">
void StartClock ()
{
GLib.Timeout.Add(1000, new GLib.TimeoutHandler(update_status));
}
bool update_status ()
{
time_label.Text=DateTime.Now.ToString ();
//returning true means that the timeout routine should be invoked
//again after the timeout period expires. Returning false would
//terminate the timeout.
return true;
}
</code>
</example>
</remarks>
</Docs>
<Members>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public static uint Add (uint interval, GLib.TimeoutHandler hndlr);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="interval" Type="System.UInt32" />
<Parameter Name="hndlr" Type="GLib.TimeoutHandler" />
</Parameters>
<Docs>
<param name="interval">the interval in milliseconds between invocations of <paramref name="hndlr" />.</param>
<param name="hndlr">a delegate of type <see cref="T:GLib.TimeoutHandler" /> to invoke every <paramref name="interval" />.</param>
<summary>Adds a <see cref="T:GLib.TimeoutHandler" /> delegate to the mainloop. </summary>
<returns>an id representing the event source of the installed timeout handler.</returns>
<remarks>
<para>
The delegate is invoked after the time period specified by <paramref name="interval" />. The delegate is invoked repeatedly until it returns <see langword="false" />.
</para>
<para>
Invocation of the delegate may be delayed by other event processing, so this mechanism cannot be depended on for accurate timing. The interval to the next timeout is calculated at completion of the preceding timeout. There is no attempt made to "catch up" if an invocation is delayed.
</para>
</remarks>
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public static uint Add (uint interval, GLib.TimeoutHandler hndlr, GLib.Priority priority);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="interval" Type="System.UInt32" />
<Parameter Name="hndlr" Type="GLib.TimeoutHandler" />
<Parameter Name="priority" Type="GLib.Priority" />
</Parameters>
<Docs>
<param name="interval">To be added.</param>
<param name="hndlr">To be added.</param>
<param name="priority">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<since version="Gtk# 2.14" />
</Docs>
</Member>
<Member MemberName="AddSeconds">
<MemberSignature Language="C#" Value="public static uint AddSeconds (uint interval, GLib.TimeoutHandler hndlr);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="interval" Type="System.UInt32" />
<Parameter Name="hndlr" Type="GLib.TimeoutHandler" />
</Parameters>
<Docs>
<param name="interval">interval in seconds.</param>
<param name="hndlr">callback.</param>
<summary>Installs a timeout handler for an interval given in seconds.</summary>
<returns>the source id.</returns>
<remarks />
<since version="Gtk# 2.14" />
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public static bool Remove (GLib.TimeoutHandler hndlr);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="hndlr" Type="GLib.TimeoutHandler" />
</Parameters>
<Docs>
<param name="hndlr">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<since version="Gtk# 2.14" />
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public static void Remove (uint id);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.UInt32" />
</Parameters>
<Docs>
<param name="id">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<since version="Gtk# 2.14" />
</Docs>
</Member>
</Members>
</Type>