mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 17:35:33 +00:00
bda62ac3b7
* 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
36 lines
752 B
C#
Executable file
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 ();
|
|
}
|
|
|
|
}
|
|
}
|