mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-17 03:44:53 +02:00
2003-03-10 Miguel de Icaza <miguel@ximian.com>
* gtk/Application.cs: Do not allow instances of Application to be created. (InitCheck): new method, wraps gtk_init_check. Removed inline docs from here. Put them on the documentation file. svn path=/trunk/gtk-sharp/; revision=12418
This commit is contained in:
parent
97eec42d7e
commit
cf022facd6
@ -1,3 +1,10 @@
|
|||||||
|
2003-03-10 Miguel de Icaza <miguel@ximian.com>
|
||||||
|
|
||||||
|
* gtk/Application.cs: Do not allow instances of Application to be
|
||||||
|
created.
|
||||||
|
|
||||||
|
(InitCheck): new method, wraps gtk_init_check.
|
||||||
|
|
||||||
2003-03-08 Miguel de Icaza <miguel@ximian.com>
|
2003-03-08 Miguel de Icaza <miguel@ximian.com>
|
||||||
|
|
||||||
* glib/Idle.cs: Add private constructor.
|
* glib/Idle.cs: Add private constructor.
|
||||||
|
@ -9,20 +9,15 @@ namespace Gtk {
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Application Class
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// Provides the initialization and event loop iteration related
|
|
||||||
/// methods for the GTK widget library. Since GTK is an event
|
|
||||||
/// 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.
|
|
||||||
/// </remarks>
|
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
|
//
|
||||||
|
// Disables creation of instances.
|
||||||
|
//
|
||||||
|
private Application ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
static extern void gtk_init (int argc, IntPtr argv);
|
static extern void gtk_init (int argc, IntPtr argv);
|
||||||
|
|
||||||
@ -33,14 +28,8 @@ namespace Gtk {
|
|||||||
|
|
||||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
static extern void gtk_init (ref int argc, ref String[] argv);
|
static extern void gtk_init (ref int argc, ref String[] argv);
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
/// <summary>
|
static extern bool gtk_init_check (ref int argc, ref String[] argv);
|
||||||
/// Init Method
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// Initializes GTK resources.
|
|
||||||
/// </remarks>
|
|
||||||
|
|
||||||
public static void Init (ref string[] args)
|
public static void Init (ref string[] args)
|
||||||
{
|
{
|
||||||
@ -48,17 +37,15 @@ namespace Gtk {
|
|||||||
gtk_init (ref argc, ref args);
|
gtk_init (ref argc, ref args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool InitCheck (ref string[] args)
|
||||||
|
{
|
||||||
|
int argc = args.Length;
|
||||||
|
return gtk_init_check (ref argc, ref args);
|
||||||
|
}
|
||||||
|
|
||||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
static extern void gtk_main ();
|
static extern void gtk_main ();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Run Method
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// Begins the event loop iteration.
|
|
||||||
/// </remarks>
|
|
||||||
|
|
||||||
public static void Run ()
|
public static void Run ()
|
||||||
{
|
{
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
@ -67,13 +54,6 @@ namespace Gtk {
|
|||||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
static extern bool gtk_events_pending ();
|
static extern bool gtk_events_pending ();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// EventsPending Method
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// Returns true if Gtk+ events are pending in the queue.
|
|
||||||
/// </remarks>
|
|
||||||
|
|
||||||
public static bool EventsPending ()
|
public static bool EventsPending ()
|
||||||
{
|
{
|
||||||
@ -83,34 +63,29 @@ namespace Gtk {
|
|||||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
static extern void gtk_main_iteration ();
|
static extern void gtk_main_iteration ();
|
||||||
|
|
||||||
/// <summary>
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
/// RunIteration Method
|
static extern bool gtk_main_iteration_do (bool blocking);
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// Runs a single iteration of the event loop.
|
|
||||||
/// </remarks>
|
|
||||||
|
|
||||||
public static void RunIteration ()
|
public static void RunIteration ()
|
||||||
{
|
{
|
||||||
gtk_main_iteration ();
|
gtk_main_iteration ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool RunIteration (bool blocking)
|
||||||
|
{
|
||||||
|
return gtk_main_iteration_do (blocking);
|
||||||
|
}
|
||||||
|
|
||||||
[DllImport("libgtk-win32-2.0-0.dll")]
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
static extern void gtk_main_quit ();
|
static extern void gtk_main_quit ();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Quit Method
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// Terminates the event loop iteration.
|
|
||||||
/// </remarks>
|
|
||||||
|
|
||||||
public static void Quit ()
|
public static void Quit ()
|
||||||
{
|
{
|
||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[DllImport("libgtk-win32-2.0-0.dll")]
|
||||||
|
static extern IntPtr gtk_get_current_event ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user