2003-02-12 02:00:12 +00:00
<Type Name= "Application" FullName= "Gtk.Application" >
2003-07-04 21:36:15 +00:00
<TypeSignature Language= "C#" Value= "public class Application" Maintainer= "John Luke" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
<AssemblyVersion > 0.0.0.0</AssemblyVersion>
<Attributes />
</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>
2003-02-12 02:00:12 +00:00
<Docs >
2003-03-11 02:07:29 +00:00
<summary > Application class</summary>
<remarks >
<para >
Provides the initialization and event loop iteration related
2003-07-04 21:36:15 +00:00
methods for the Gtk# widget library. Since Gtk# is an event
2003-03-11 02:07:29 +00:00
driven toolkit, Applications register callbacks against various
events to handle user input. These callbacks are invoked from
the main event loop when events are detected.
</para>
2003-07-04 21:36:15 +00:00
<example >
<code lang= "C#" >
using Gtk;
using GtkSharp;
using System;
public class HelloWorld {
public static int Main (string[] args)
{
Application.Init ();
Gtk.Window win = new Gtk.Window ("Gtk# Hello World");
win.DeleteEvent += new DeleteEventHandler (Window_Delete);
win.ShowAll ();
Application.Run ();
return 0;
}
static void Window_Delete (object obj, DeleteEventArgs args)
{
SignalArgs sa = (SignalArgs) args;
Application.Quit ();
sa.RetVal = true;
}
}
</code>
</example>
2003-03-11 02:07:29 +00:00
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
<Base >
<BaseTypeName > System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes />
<Members >
<Member MemberName= "Quit" >
<MemberSignature Language= "C#" Value= "public static void Quit ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-03-11 02:07:29 +00:00
<summary > Quits the current main loop</summary>
<remarks >
2003-03-15 22:58:57 +00:00
<para >
2003-03-11 02:07:29 +00:00
Makes the innermost invocation of the main loop return when it regains control.
</para>
2003-03-15 22:58:57 +00:00
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "RunIteration" >
<MemberSignature Language= "C#" Value= "public static void RunIteration ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-03-15 22:58:57 +00:00
<summary />
2003-03-11 02:07:29 +00:00
<remarks >
2003-03-15 22:58:57 +00:00
<para >
2003-03-11 02:07:29 +00:00
Runs a single iteration of the mainloop. If no events are
2003-07-04 21:36:15 +00:00
waiting to be processed Gtk# will block until the next
event is noticed. If you do not want to block look at <see cref= "M:Gtk.Application.RunIteration(System.Boolean)" /> or check if
2003-03-15 22:58:57 +00:00
any events are pending with <see cref= "M:Gtk.Application.EventsPending()" /> first.
2003-03-11 02:07:29 +00:00
</para>
2003-03-15 22:58:57 +00:00
</remarks>
2003-03-11 02:07:29 +00:00
</Docs>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "EventsPending" >
<MemberSignature Language= "C#" Value= "public static bool EventsPending ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-03-11 02:07:29 +00:00
<summary > Whether there are events on the queue</summary>
2003-07-17 06:38:40 +00:00
<returns >
<see langword= "true" /> if events are available to be processed, <see langword= "false" /> otherwise</returns>
2003-03-11 02:07:29 +00:00
<remarks >
2003-03-15 22:58:57 +00:00
<para >
2003-03-11 02:07:29 +00:00
Checks if any events are pending. This can be used to
update the GUI and invoke timeouts etc. while doing some
time intensive computation.
</para>
2003-03-15 22:58:57 +00:00
<example >
<code lang= "C#" >
2003-07-04 21:36:15 +00:00
void LongComputation ()
{
while (!done){
ComputationChunk ();
2003-03-11 02:07:29 +00:00
2003-07-04 21:36:15 +00:00
// Flush pending events to keep the GUI reponsive
while (Application.EventsPending ())
Application.RunIteration ();
}
}
2003-03-11 02:07:29 +00:00
</code>
2003-03-15 22:58:57 +00:00
</example>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Run" >
<MemberSignature Language= "C#" Value= "public static void Run ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-03-11 02:07:29 +00:00
<summary > Runs the main loop</summary>
<remarks >
2003-03-15 22:58:57 +00:00
<para >
Runs the main loop until <see cref= "M:Gtk.Application.Quit()" /> is called. You can nest
2003-07-04 21:36:15 +00:00
calls to <see cref= "M:Gtk.Application.Run()" /> . In that
2003-03-15 22:58:57 +00:00
case <see cref= "M:Gtk.Application.Quit()" /> will make the
2003-03-11 02:07:29 +00:00
innermost invocation of the main loop return.
</para>
2003-03-15 22:58:57 +00:00
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
2003-03-15 23:06:26 +00:00
<Member MemberName= "Init" >
2003-03-11 02:07:29 +00:00
<MemberSignature Language= "C#" Value= "public static void Init (ref string [] args);" />
2003-02-12 02:00:12 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
2003-03-11 02:07:29 +00:00
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "args" Type= "System.String []&" />
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-04 21:36:15 +00:00
<summary > Initializes Gtk# for operation.</summary>
2003-03-11 02:07:29 +00:00
<param name= "args" > The arguments to pass to the toolkit</param>
<remarks >
2003-03-15 22:58:57 +00:00
<para >
2003-07-04 21:36:15 +00:00
Call this function before using any other Gtk# functions
2003-03-11 02:07:29 +00:00
in your GUI applications. It will initialize everything
needed to operate the toolkit.
</para>
2003-03-15 22:58:57 +00:00
<para >
2003-03-11 02:07:29 +00:00
This function will terminate your program if it was unable
to initialize the GUI for some reason. If you want your
program to fall back to a textual interface you want to
2003-07-04 21:36:15 +00:00
call <see cref= "M:Gtk.Application.InitCheck(System.String []&)" /> instead.
2003-03-11 02:07:29 +00:00
</para>
2003-03-15 22:58:57 +00:00
<para >
2003-03-11 02:07:29 +00:00
The args values will be modified after Gtk has removed the
command line options that it handles itself.
</para>
2003-03-15 22:58:57 +00:00
</remarks>
2003-03-11 02:07:29 +00:00
</Docs>
</Member>
2003-03-15 23:06:26 +00:00
<Member MemberName= "InitCheck" >
2003-03-11 02:07:29 +00:00
<MemberSignature Language= "C#" Value= "public static bool InitCheck (ref string [] args);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "args" Type= "System.String []&" />
</Parameters>
2003-03-11 02:07:29 +00:00
<Docs >
2003-07-04 21:36:15 +00:00
<summary > Initializes Gtk# for operation, probes window system.</summary>
2003-03-11 02:07:29 +00:00
<returns > true if the toolkit was initialized, false if the
windowing system can not be initilized.</returns>
<param name= "args" > The arguments to pass to the toolkit</param>
<remarks >
2003-03-15 22:58:57 +00:00
<para >
2003-07-04 21:36:15 +00:00
You use this call to initialize Gtk# for your GUI
2003-03-11 02:07:29 +00:00
applications. This method will allow your application to
be both GUI/text. A true return value means that the
toolkit was initialized, a false value means that the
toolkit could not be initialized. If you do not want to
2003-03-15 22:58:57 +00:00
do dual GUI/text applications, you can use <see cref= "M:Gtk.Application.Init()" /> instead.
2003-03-11 02:07:29 +00:00
</para>
2003-03-15 22:58:57 +00:00
<para >
2003-03-11 02:07:29 +00:00
This function will terminate your program if it was unable
to initialize the GUI for some reason. If you want your
program to fall back to a textual interface you want to
2003-07-04 21:36:15 +00:00
call <see cref= "M:Gtk.Application.InitCheck(System.String []&)" /> instead.
2003-03-11 02:07:29 +00:00
</para>
2003-03-15 22:58:57 +00:00
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
2003-03-07 01:30:00 +00:00
<Member MemberName= "Init" >
2003-03-11 02:07:29 +00:00
<MemberSignature Language= "C#" Value= "public static void Init ();" />
2003-03-07 01:30:00 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
2003-03-15 22:58:57 +00:00
<Parameters />
2003-03-07 01:30:00 +00:00
<Docs >
2003-03-11 02:07:29 +00:00
<summary > Initializes GTK+ for operation.</summary>
<remarks >
2003-03-15 22:58:57 +00:00
<para >
2003-07-04 21:36:15 +00:00
Call this function before using any other Gtk# functions
2003-03-11 02:07:29 +00:00
in your GUI applications. It will initialize everything
needed to operate the toolkit.
</para>
2003-03-15 22:58:57 +00:00
<para >
2003-03-11 02:07:29 +00:00
This function will terminate your program if it was unable
to initialize the GUI for some reason. If you want your
program to fall back to a textual interface you want to
2003-07-04 21:36:15 +00:00
call <see cref= "M:Gtk.Application.InitCheck(System.String []&)" /> instead.
2003-03-11 02:07:29 +00:00
</para>
2003-03-15 22:58:57 +00:00
<para >
2003-03-11 02:07:29 +00:00
If you want to pass arguments from the command line use
2003-07-04 21:36:15 +00:00
the <see cref= "T:Gtk.Application.Init(System.String []&)" />
2003-03-11 02:07:29 +00:00
method instead.
</para>
2003-03-15 22:58:57 +00:00
</remarks>
</Docs>
</Member>
2003-03-26 00:54:24 +00:00
<Member MemberName= "RunIteration" >
<MemberSignature Language= "C#" Value= "public static bool RunIteration (bool blocking);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "blocking" Type= "System.Boolean" />
</Parameters>
2003-03-26 00:54:24 +00:00
<Docs >
<summary />
<param name= "block" > A boolean value, whether the iteration should block or not</param>
<remarks >
<para >
2003-07-17 06:38:40 +00:00
Runs a single iteration of the mainloop. If <paramref name= "blocking" /> is <see langword= "true" /> , then if no events are
waiting to be processed Gtk# will block until the next event is noticed; If <paramref name= "blocking" /> is <see langword= "false" /> ,
2003-07-04 21:36:15 +00:00
then it if no events are waiting to be processed Gtk#, routine will return immediately.
2003-03-26 00:54:24 +00:00
</para>
</remarks>
</Docs>
</Member>
2003-05-08 20:26:02 +00:00
<Member MemberName= "CurrentEvent" >
<MemberSignature Language= "C#" Value= "public static object CurrentEvent { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Object</ReturnType>
</ReturnValue>
<Docs >
<summary > To be added</summary>
2003-07-17 06:38:40 +00:00
<returns > an object of type <see cref= "System.Object" /> </returns>
2003-05-08 20:26:02 +00:00
<remarks > To be added</remarks>
</Docs>
</Member>
2003-02-12 02:00:12 +00:00
</Members>
2003-09-17 21:56:59 +00:00
</Type>