GtkSharp/sample/HelloWorld.cs
Mike Kestner bda62ac3b7 2001-10-02 Mike Kestner <mkestner@speakeasy.net>
* glib/Value.cs : Tried adding CallingConvention.Cdecl to all the
	DllImports, but still couldn't get reliable Propery setting without
	periodic NullReference exceptions.  When all else fails, drop back
	and punt.
	* glib/Object.cs : Rewrote Set|GetProperty methods.  Now they use
	g_object_get|set and don't rely on GValues. The int, bool, and string
	prop types are now working reliably.
	* gtk/Window.cs : Update all Properties to use new GLib.Object
	signatures.
	* sample/HelloWorld.cs : added some more property usage for testing
	purposes.

svn path=/trunk/gtk-sharp/; revision=1048
2001-10-02 01:27:44 +00:00

36 lines
752 B
C#
Executable file

// TestWindow.cs - GTK Window class Test implementation
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// (c) 2001 Mike Kestner
namespace GtkSamples {
using Gtk;
using System;
using System.Drawing;
public class HelloWorld {
public static int Main (string[] args)
{
Application.Init (ref args);
Window win = new Window ("Gtk# Hello World");
win.DefaultSize = new Size (400, 400);
System.Console.WriteLine (win.Title);
System.Console.WriteLine (win.DefaultSize);
System.Console.WriteLine (win.AllowShrink);
win.DeleteEvent += new EventHandler (Window_Delete);
win.Show ();
Application.Run ();
return 0;
}
static void Window_Delete (object obj, EventArgs args)
{
Application.Quit ();
}
}
}