2003-02-12 02:00:12 +00:00
<Type Name= "ThreadNotify" FullName= "Gtk.ThreadNotify" >
2007-01-16 16:18:05 +00:00
<TypeSignature Language= "C#" Maintainer= "auto" Value= "public class ThreadNotify : IDisposable" />
2011-11-09 16:01:51 +00:00
<TypeSignature Language= "ILAsm" Value= ".class public auto ansi beforefieldinit ThreadNotify extends System.Object implements class System.IDisposable" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
2003-12-24 01:35:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
2003-02-12 02:00:12 +00:00
</AssemblyInfo>
2003-02-23 07:26:30 +00:00
<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>
2011-11-09 16:01:51 +00:00
<Base >
<BaseTypeName > System.Object</BaseTypeName>
</Base>
<Interfaces >
<Interface >
<InterfaceName > System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
2003-02-12 02:00:12 +00:00
<Docs >
2004-04-21 20:46:56 +00:00
<summary > Multi-threaded integration with Gtk support.</summary>
<remarks >
2005-09-02 22:55:48 +00:00
<para >
2005-09-07 17:56:34 +00:00
You should consider using <see cref= "M:Gtk.Application.Invoke" /> instead of this class as it
2005-09-02 22:55:48 +00:00
provides a simpler interface.
</para>
2004-04-21 20:46:56 +00:00
<para > The ThreadNotify class is used to invoke methods in the Gtk+ thread. Since Gtk is not a thread-safe toolkit, only a single thread at a time might be making calls into Gtk.</para>
<para > Typically applications will be executing the main Gtk+ main loop and when threads are done processing work, they invoke <see cref= "M:Gtk.ThreadNotify.WakeupMain()" /> to invoke a method on the main Gtk+ thread.</para>
<example >
<code lang= "C#" >
using Gtk;
class Demo {
2004-06-19 18:25:02 +00:00
static ThreadNotify notify;
2004-04-21 20:46:56 +00:00
static void Main ()
{
Application.Init ();
notify = new ThreadNotify (new ReadyEvent (ready));
Application.Run ();
}
static void ready ()
{
// Update the GUI with computation values.
}
static void ThreadRoutine ()
{
LargeComputation ();
notify.WakeupMain ();
}
2004-06-19 18:25:02 +00:00
static void LargeComputation ()
{
// lots of processing here
}
2004-04-21 20:46:56 +00:00
}
</code>
</example>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
<Members >
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public ThreadNotify (Gtk.ReadyEvent re);" />
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig specialname rtspecialname instance void .ctor(class Gtk.ReadyEvent re) cil managed" />
2003-02-12 02:00:12 +00:00
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "re" Type= "Gtk.ReadyEvent" />
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2004-04-21 20:46:56 +00:00
<param name= "re" > A ReadyEvent delegate.</param>
2011-11-09 16:01:51 +00:00
<summary > ThreadNotify constructor</summary>
2004-04-21 20:46:56 +00:00
<remarks > The method referenced by the delegate will be invoked on the Gtk+ mainloop whenever any thread invokes the <see cref= "M:Gtk.ThreadNotify.WakeupMain ()" /> method.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
2003-10-28 00:48:23 +00:00
<Member MemberName= "Close" >
<MemberSignature Language= "C#" Value= "public void Close ();" />
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig instance void Close() cil managed" />
2003-10-28 00:48:23 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > To be added</summary>
2004-11-05 21:25:40 +00:00
<remarks />
2003-10-28 00:48:23 +00:00
</Docs>
</Member>
<Member MemberName= "Dispose" >
<MemberSignature Language= "C#" Value= "protected virtual void Dispose (bool disposing);" />
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "ILAsm" Value= ".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" />
2003-10-28 00:48:23 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "disposing" Type= "System.Boolean" />
</Parameters>
<Docs >
<param name= "disposing" > a <see cref= "T:System.Boolean" /> </param>
2011-11-09 16:01:51 +00:00
<summary > To be added</summary>
2004-11-05 21:25:40 +00:00
<remarks />
2003-10-28 00:48:23 +00:00
</Docs>
</Member>
2011-11-09 16:01:51 +00:00
<Member MemberName= "Finalize" >
<MemberSignature Language= "C#" Value= "~ThreadNotify ();" />
<MemberSignature Language= "ILAsm" Value= ".method familyhidebysig virtual instance void Finalize() cil managed" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > To be added.</summary>
<remarks > To be added.</remarks>
<since version= "Gtk# 3.0" />
</Docs>
</Member>
<Member MemberName= "System.IDisposable.Dispose" >
<MemberSignature Language= "C#" Value= "void IDisposable.Dispose ();" />
<MemberSignature Language= "ILAsm" Value= ".method hidebysig newslot virtual instance void System.IDisposable.Dispose() cil managed" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > To be added.</summary>
<remarks > To be added.</remarks>
<since version= "Gtk# 3.0" />
</Docs>
</Member>
<Member MemberName= "WakeupMain" >
<MemberSignature Language= "C#" Value= "public void WakeupMain ();" />
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig instance void WakeupMain() cil managed" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > Wakeup the main thread, and invoke delegate.</summary>
<remarks > This methods wakes up the Gtk+ main thread and executes the delegate that was specified at construction time in the Gtk+ thread. </remarks>
</Docs>
</Member>
2003-02-12 02:00:12 +00:00
</Members>
2005-05-23 20:41:51 +00:00
</Type>