Kill Size sample

* sample/Size.cs: kill.  was a bug repro sample back in the early
days of broken struct marshaling.  No longer even demonstrates
proper size negotiation with 3.0 and other samples will, like
polarfixed.exe.
* sample/Makefile.am: remove size.exe
This commit is contained in:
Mike Kestner 2011-02-09 18:12:07 -06:00
parent e8250641d6
commit ac0b42f717
2 changed files with 1 additions and 54 deletions

View file

@ -8,7 +8,7 @@ DOTNET_TARGETS=
DOTNET_ASSEMBLY=
endif
TARGETS = polarfixed.exe custom-widget.exe custom-cellrenderer.exe gtk-hello-world.exe button.exe calendar.exe subclass.exe menu.exe size.exe scribble.exe scribble-xinput.exe treeviewdemo.exe managedtreeviewdemo.exe nodeviewdemo.exe treemodeldemo.exe testdnd.exe actions.exe spawn.exe assistant.exe registerprop.exe gexceptiontest.exe cairo-sample.exe native-instantiation.exe $(DOTNET_TARGETS)
TARGETS = gtk-hello-world.exe button.exe calendar.exe subclass.exe menu.exe treeviewdemo.exe managedtreeviewdemo.exe nodeviewdemo.exe treemodeldemo.exe testdnd.exe actions.exe spawn.exe assistant.exe registerprop.exe gexceptiontest.exe cairo-sample.exe native-instantiation.exe polarfixed.exe custom-widget.exe custom-cellrenderer.exe scribble.exe scribble-xinput.exe $(DOTNET_TARGETS)
DEBUGS = $(addsuffix .mdb, $(TARGETS))
@ -44,9 +44,6 @@ menu.exe: $(srcdir)/Menu.cs $(assemblies)
native-instantiation.exe: $(srcdir)/NativeInstantiationTest.cs $(assemblies)
$(CSC) $(CSFLAGS) -out:native-instantiation.exe $(references) $(srcdir)/NativeInstantiationTest.cs
size.exe: $(srcdir)/Size.cs $(assemblies)
$(CSC) $(CSFLAGS) -out:size.exe $(references) $(srcdir)/Size.cs
scribble.exe: $(srcdir)/Scribble.cs $(assemblies)
$(CSC) $(CSFLAGS) -out:scribble.exe $(references) $(srcdir)/Scribble.cs
@ -107,7 +104,6 @@ EXTRA_DIST = \
CalendarApp.cs \
Subclass.cs \
Menu.cs \
Size.cs \
Scribble.cs \
ScribbleXInput.cs \
SpawnTests.cs \

View file

@ -1,49 +0,0 @@
// Size.cs - struct marshalling test
//
// Author: Rachel Hestilow <hestilow@ximian.com>
//
// (c) 2002 Rachel Hestilow
namespace GtkSamples {
using Gtk;
using Gdk;
using System;
public class SizeTest {
public static int Main (string[] args)
{
Application.Init ();
Gtk.Window win = new Gtk.Window ("Gtk# Hello World");
win.DeleteEvent += new DeleteEventHandler (Window_Delete);
win.SizeAllocated += new SizeAllocatedHandler (Size_Allocated);
win.SizeRequested += new SizeRequestedHandler (Size_Requested);
win.ShowAll ();
Application.Run ();
return 0;
}
static void Window_Delete (object obj, DeleteEventArgs args)
{
Application.Quit ();
args.RetVal = true;
}
static void Size_Requested (object obj, SizeRequestedArgs args)
{
Requisition req = args.Requisition;
Console.WriteLine ("Requesting 100 x 100");
req.Width = req.Height = 100;
args.Requisition = req;
}
static void Size_Allocated (object obj, SizeAllocatedArgs args)
{
Rectangle rect = args.Allocation;
if (rect.Width == 0 || rect.Height == 0)
Console.WriteLine ("ERROR: Allocation is null!");
Console.WriteLine ("Size: ({0}, {1})", rect.Width, rect.Height);
}
}
}