Update CairoSample to API 3.0

* sample/CairoSample.cs: replace OnExposeEvent with OnDrawn.
* sample/Makefile.am: include cairo-sample.exe in TARGETS.
This commit is contained in:
Mike Kestner 2011-02-10 12:47:17 -06:00
parent 70d1b232f2
commit 86e4b4c170
2 changed files with 3 additions and 7 deletions

View file

@ -133,13 +133,9 @@ class Knockout : DrawingArea
circles.Destroy ();
}
protected override bool OnExposeEvent (Gdk.EventExpose e)
protected override bool OnDrawn (Cairo.Context ctx)
{
using (Context cr = Gdk.CairoHelper.Create (e.Window)) {
int w, h;
e.Window.GetSize (out w, out h);
Draw (cr, w, h);
}
Draw (ctx, Window.Width, Window.Height);
return true;
}

View file

@ -8,7 +8,7 @@ DOTNET_TARGETS=
DOTNET_ASSEMBLY=
endif
TARGETS = gtk-hello-world.exe button.exe calendar.exe subclass.exe menu.exe treeviewdemo.exe managedtreeviewdemo.exe nodeviewdemo.exe treemodeldemo.exe actions.exe spawn.exe assistant.exe registerprop.exe gexceptiontest.exe native-instantiation.exe polarfixed.exe # cairo-sample.exe custom-widget.exe custom-cellrenderer.exe scribble.exe scribble-xinput.exe testdnd.exe $(DOTNET_TARGETS)
TARGETS = gtk-hello-world.exe button.exe calendar.exe subclass.exe menu.exe treeviewdemo.exe managedtreeviewdemo.exe nodeviewdemo.exe treemodeldemo.exe actions.exe spawn.exe assistant.exe registerprop.exe gexceptiontest.exe native-instantiation.exe polarfixed.exe cairo-sample.exe # custom-widget.exe custom-cellrenderer.exe scribble.exe scribble-xinput.exe testdnd.exe $(DOTNET_TARGETS)
DEBUGS = $(addsuffix .mdb, $(TARGETS))