2005-08-25 Mike Kestner <mkestner@novell.com>

* sample/GtkDemo/DemoIconView.cs : remove C# 2.0-isms.
	* sample/opaquetest/OpaqueTest.cs : remove C# 2.0-isms.
	* sample/valuetest/ValueTest.cs : remove C# 2.0-isms.
	* sample/PolarFixed.cs : remove C# 2.0-isms.

svn path=/trunk/gtk-sharp/; revision=48852
This commit is contained in:
Mike Kestner 2005-08-25 19:34:26 +00:00
parent 0772f353e2
commit 92494900ef
5 changed files with 22 additions and 19 deletions

View File

@ -1,6 +1,9 @@
2005-08-25 Mike Kestner <mkestner@novell.com>
* sample/GtkDemo/DemoIconView.cs : remove some C# 2.0-isms.
* sample/GtkDemo/DemoIconView.cs : remove C# 2.0-isms.
* sample/opaquetest/OpaqueTest.cs : remove C# 2.0-isms.
* sample/valuetest/ValueTest.cs : remove C# 2.0-isms.
* sample/PolarFixed.cs : remove C# 2.0-isms.
2005-08-23 Ben Maurer <bmaurer@novell.com>

View File

@ -185,7 +185,7 @@ class Test {
Application.Init ();
Gtk.Window win = new Gtk.Window ("Polar Coordinate Container");
win.DeleteEvent += Window_Delete;
win.DeleteEvent += new DeleteEventHandler (Window_Delete);
Notebook notebook = new Notebook ();
win.Add (notebook);

View File

@ -5,7 +5,7 @@ assemblies=../../glib/glib-sharp.dll ../../pango/pango-sharp.dll ../../atk/atk-s
references=$(addprefix /r:, $(assemblies))
opaquetest.exe: OpaqueTest.cs generated/*.cs $(assemblies)
$(CSC) /out:opaquetest.exe $(references) $(srcdir)/OpaqueTest.cs generated/*.cs
$(CSC) /out:opaquetest.exe $(references) $(srcdir)/OpaqueTest.cs $(GENERATED_SOURCES)
libopaque_la_SOURCES = \
opaques.c \

View File

@ -100,7 +100,7 @@ public class OpaqueTest {
Console.WriteLine ("Testing returning a Gtk#-owned opaque from C# to C");
ret_op = new Opaque ();
op = Opaque.Check (ReturnOpaque, GC);
op = Opaque.Check (new Gtksharp.OpaqueReturnFunc (ReturnOpaque), new Gtksharp.GCFunc (GC));
if (op.Serial != Opaque.LastSerial || Opaquetest.Error)
Error ("Error during Opaque.Check. Expected {0}, Got {1}", Opaque.LastSerial, op.Serial);
op.Dispose ();
@ -109,7 +109,7 @@ public class OpaqueTest {
Console.WriteLine ("Testing returning a Gtk#-owned opaque to a C method that will free it");
ret_op = new Opaque ();
op = Opaque.CheckFree (ReturnOpaque, GC);
op = Opaque.CheckFree (new Gtksharp.OpaqueReturnFunc (ReturnOpaque), new Gtksharp.GCFunc (GC));
if (Opaquetest.Error)
Error ("Error during Opaque.CheckFree.");
Opaquetest.ExpectError = true;
@ -125,7 +125,7 @@ public class OpaqueTest {
Console.WriteLine ("Testing leaking a C-owned opaque");
ret_op = new Opaque ();
ret_op.Owned = false;
op = Opaque.Check (ReturnOpaque, GC);
op = Opaque.Check (new Gtksharp.OpaqueReturnFunc (ReturnOpaque), new Gtksharp.GCFunc (GC));
if (op.Serial != Opaque.LastSerial || Opaquetest.Error)
Error ("Error during Opaque.Check. Expected {0}, Got {1}", Opaque.LastSerial, op.Serial);
handle = op.Handle;
@ -139,7 +139,7 @@ public class OpaqueTest {
Console.WriteLine ("Testing handing over a C-owned opaque to a C method that will free it");
ret_op = new Opaque ();
ret_op.Owned = false;
op = Opaque.CheckFree (ReturnOpaque, GC);
op = Opaque.CheckFree (new Gtksharp.OpaqueReturnFunc (ReturnOpaque), new Gtksharp.GCFunc (GC));
if (Opaquetest.Error)
Error ("Error during Opaque.CheckFree.");
Opaquetest.ExpectError = true;
@ -222,7 +222,7 @@ public class OpaqueTest {
Console.WriteLine ("Testing returning a Gtk#-owned refcounted from C# to C");
ret_ref = new Refcounted ();
ref1 = Refcounted.Check (ReturnRefcounted, GC);
ref1 = Refcounted.Check (new Gtksharp.RefcountedReturnFunc (ReturnRefcounted), new Gtksharp.GCFunc (GC));
if (ref1.Serial != Refcounted.LastSerial || Opaquetest.Error)
Error ("Error during Refcounted.Check. Expected {0}, Got {1}", Refcounted.LastSerial, ref1.Serial);
ref1.Dispose ();
@ -231,7 +231,7 @@ public class OpaqueTest {
Console.WriteLine ("Testing returning a Gtk#-owned refcounted to a C method that will free it");
ret_ref = new Refcounted ();
ref1 = Refcounted.CheckUnref (ReturnRefcounted, GC);
ref1 = Refcounted.CheckUnref (new Gtksharp.RefcountedReturnFunc (ReturnRefcounted), new Gtksharp.GCFunc (GC));
if (Opaquetest.Error)
Error ("Error during Refcounted.CheckUnref.");
Opaquetest.ExpectError = true;
@ -247,7 +247,7 @@ public class OpaqueTest {
Console.WriteLine ("Testing leaking a C-owned refcounted");
ret_ref = new Refcounted ();
ret_ref.Owned = false;
ref1 = Refcounted.Check (ReturnRefcounted, GC);
ref1 = Refcounted.Check (new Gtksharp.RefcountedReturnFunc (ReturnRefcounted), new Gtksharp.GCFunc (GC));
if (ref1.Serial != Refcounted.LastSerial || Opaquetest.Error)
Error ("Error during Refcounted.Check. Expected {0}, Got {1}", Refcounted.LastSerial, ref1.Serial);
handle = ref1.Handle;
@ -261,7 +261,7 @@ public class OpaqueTest {
Console.WriteLine ("Testing handing over a C-owned refcounted to a C method that will free it");
ret_ref = new Refcounted ();
ret_ref.Owned = false;
ref1 = Refcounted.CheckUnref (ReturnRefcounted, GC);
ref1 = Refcounted.CheckUnref (new Gtksharp.RefcountedReturnFunc (ReturnRefcounted), new Gtksharp.GCFunc (GC));
if (Opaquetest.Error)
Error ("Error during Refcounted.CheckUnref.");
Opaquetest.ExpectError = true;

View File

@ -89,20 +89,20 @@ public class Valtest {
try {
val = new GLib.Value (ENUM_VAL);
if ((Gtk.ArrowType)val != ENUM_VAL)
CVError ("enum cast", ENUM_VAL, (Gtk.ArrowType)val, val.Val);
if ((Gtk.ArrowType)val.Val != ENUM_VAL)
CVError ("enum Val", ENUM_VAL, (Gtk.ArrowType)val, val.Val);
if ((Gtk.ArrowType)(Enum)val != ENUM_VAL)
CVError ("enum cast", ENUM_VAL, (Gtk.ArrowType)(Enum)val, val.Val);
if ((Gtk.ArrowType)(Enum)val.Val != ENUM_VAL)
CVError ("enum Val", ENUM_VAL, (Gtk.ArrowType)(Enum)val, val.Val);
} catch (Exception e) {
ExceptionError ("enum", e);
}
try {
val = new GLib.Value (FLAGS_VAL);
if ((Gtk.AttachOptions)val != FLAGS_VAL)
CVError ("flags cast", FLAGS_VAL, (Gtk.AttachOptions)val, val.Val);
if ((Gtk.AttachOptions)val.Val != FLAGS_VAL)
CVError ("flags Val", FLAGS_VAL, (Gtk.AttachOptions)val, val.Val);
if ((Gtk.AttachOptions)(Enum)val != FLAGS_VAL)
CVError ("flags cast", FLAGS_VAL, (Gtk.AttachOptions)(Enum)val, val.Val);
if ((Gtk.AttachOptions)(Enum)val.Val != FLAGS_VAL)
CVError ("flags Val", FLAGS_VAL, (Gtk.AttachOptions)(Enum)val, val.Val);
} catch (Exception e) {
ExceptionError ("flags", e);
}