25000abee7
*.cs : Added .dll extension to a load of DllImports. * makefile : now can make the project with one make windows and on both NT and Win98. * gdk/Event.cs : Fixed some invalid symbol names and commented out a load of stuff. * gdk/SimpleEvent.cs : Relocated file from unnecessary subdir and fixed several event keyword clashing bugs. Need to relocate the EventArgs class out of here into its own file. Fixed loads of typos. * glib/Object.cs : Killed the Constructor, this should be a purely abstract class. made Events property public until I can fix the Signal proxying system's broken reliance on it. * glib/SimpleSignal.cs : Relocated, namespaces, and named this Class. Loads of bugfixes. Still doesn't work worth a damn, but it builds. * glib/TypeFundamentals.cs : New enum for use in the Value code. * glib/Value.cs : Implemented a more opaque approach with heap allocated memory and g_value_init and friends. Still doesn't work. Will probably switch to a more C# like approach and avoid GValues altogether. * gtk/Button.cs : Commented out some brokeness until I can get around to fixing it later. * gtk/Widget.cs : Commented out a bunch of the new signal stuff until I get around to it. * gtk/Window.cs (Title): using g_object_set until I work out the details of the new Value/SetProperty system. It looks like g_object_set will end up being easier to use via PInvoke. svn path=/trunk/gtk-sharp/; revision=1008
77 lines
1.5 KiB
C#
Executable file
77 lines
1.5 KiB
C#
Executable file
// GTK.Application.cs - GTK Main Event Loop class implementation
|
|
//
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
//
|
|
// (c) 2001 Mike Kestner
|
|
|
|
namespace Gtk {
|
|
|
|
using System;
|
|
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 {
|
|
|
|
[DllImport("gtk-1.3.dll")]
|
|
static extern void gtk_init (ref int argc, ref String[] argv);
|
|
|
|
/// <summary>
|
|
/// Init Method
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Initializes GTK resources.
|
|
/// </remarks>
|
|
|
|
public static void Init (ref string[] args)
|
|
{
|
|
int argc = args.Length;
|
|
gtk_init (ref argc, ref args);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Run Method
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Begins the event loop iteration.
|
|
/// </remarks>
|
|
|
|
[DllImport("gtk-1.3.dll")]
|
|
static extern void gtk_main ();
|
|
|
|
public static void Run ()
|
|
{
|
|
gtk_main ();
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Quit Method
|
|
/// </summary>
|
|
///
|
|
/// <remarks>
|
|
/// Terminates the event loop iteration.
|
|
/// </remarks>
|
|
|
|
[DllImport("gtk-1.3.dll")]
|
|
static extern void gtk_main_quit ();
|
|
|
|
public static void Quit ()
|
|
{
|
|
gtk_main_quit ();
|
|
}
|
|
|
|
}
|
|
}
|