/* * Test .NET bindings test program * Copyright (c) 2006 Jean-Yves Lamoureux * All Rights Reserved * * $Id$ * * This program is free software. It comes without any warranty, to * the extent permitted by applicable law. You can redistribute it * and/or modify it under the terms of the Do What The Fuck You Want * To Public License, Version 2, as published by Sam Hocevar. See * http://sam.zoy.org/wtfpl/COPYING for more details. */ using System; using Cucul; using Caca; class Test { public static void Main() { int barCount = 6; Console.WriteLine("libcaca .NET test"); Console.WriteLine("(c) 2006 Jean-Yves Lamoureux "); /* Instanciate a cucul canvas */ CuculCanvas cv = new CuculCanvas(); /* Random number. This is a static method, not to be used with previous instance */ Console.WriteLine("A random number : {0}", Libcucul.Rand(0, 1337)); /* We have a proper canvas, let's display it using Caca */ Display dp = new Display(cv); dp.setDisplayTime(20000); // Refresh every 20 ms dp.setDisplayTitle("libcaca .NET Bindings test suite"); double v; Int32 y = 0; Event e = new Event(); int i; DateTime startTime = DateTime.Now; while(dp.getEvent(Event.type.KEY_RELEASE, e, 10) == 0) { TimeSpan curTime = DateTime.Now - startTime; double t = curTime.TotalMilliseconds; cv.setColorAnsi(Libcucul.WHITE, Libcucul.BLACK); for(i=0; i