1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
<Type Name="ThreadNotify" FullName="Gtk.ThreadNotify">
<TypeSignature Language="C#" Maintainer="auto" Value="public class ThreadNotify : IDisposable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ThreadNotify extends System.Object implements class System.IDisposable" />
<AssemblyInfo>
<AssemblyName>gtk-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>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Multi-threaded integration with Gtk support.</summary>
<remarks>
<para>
You should consider using <see cref="M:Gtk.Application.Invoke" /> instead of this class as it
provides a simpler interface.
</para>
<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 {
static ThreadNotify notify;
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 ();
}
static void LargeComputation ()
{
// lots of processing here
}
}
</code>
</example>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ThreadNotify (Gtk.ReadyEvent re);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class Gtk.ReadyEvent re) cil managed" />
<MemberType>Constructor</MemberType>
<ReturnValue />
<Parameters>
<Parameter Name="re" Type="Gtk.ReadyEvent" />
</Parameters>
<Docs>
<param name="re">A ReadyEvent delegate.</param>
<summary>ThreadNotify constructor</summary>
<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>
</Docs>
</Member>
<Member MemberName="Close">
<MemberSignature Language="C#" Value="public void Close ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Close() cil managed" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added</summary>
<remarks />
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" />
<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>
<summary>To be added</summary>
<remarks />
</Docs>
</Member>
<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>
</Members>
</Type>
|