From 99778cee0a4b83e8e745421481d9a452096e952d Mon Sep 17 00:00:00 2001 From: Jean-Yves Lamoureux Date: Sun, 17 Sep 2006 13:36:13 +0000 Subject: [PATCH] * Updated .Net bindings --- DotNet/Caca.cs | 12 ++++++------ DotNet/test.cs | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/DotNet/Caca.cs b/DotNet/Caca.cs index fd18de5..444051f 100644 --- a/DotNet/Caca.cs +++ b/DotNet/Caca.cs @@ -93,9 +93,9 @@ namespace libCaca [DllImport("libCaca.dll", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern void caca_refresh_display(IntPtr kk); [DllImport("libCaca.dll", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] - public static extern void caca_set_delay(IntPtr kk, Int32 d); + public static extern void caca_set_display_time(IntPtr kk, Int32 d); [DllImport("libCaca.dll", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] - public static extern Int32 caca_get_rendertime(IntPtr kk); + public static extern Int32 caca_get_display_time(IntPtr kk); [DllImport("libCaca.dll", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] public static extern Int32 caca_get_display_width(IntPtr kk); [DllImport("libCaca.dll", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] @@ -132,13 +132,13 @@ namespace libCaca { caca_refresh_display(kk); } - public void setDelay(Int32 d) + public void setDisplayTime(Int32 d) { - caca_set_delay(kk, d); + caca_set_display_time(kk, d); } - public Int32 getRendertime() + public Int32 getDisplayTime() { - return caca_get_rendertime(kk); + return caca_get_display_time(kk); } public Int32 getDisplayWidth() { diff --git a/DotNet/test.cs b/DotNet/test.cs index 971579c..30a3bfc 100644 --- a/DotNet/test.cs +++ b/DotNet/test.cs @@ -45,16 +45,16 @@ class Test { /* We have a proper canvas, let's display it using Caca */ Caca kk = new Caca(qq); - kk.setDelay(2000000); // Refresh every 2 seconds + kk.setDisplayTime(2000000); // Refresh every 2 seconds kk.setDisplayTitle("libcaca .NET Bindings test suite"); Event e = new Event(); - int startTime = kk.getRendertime(); + int startTime = kk.getDisplayTime(); while(kk.getEvent(Event.type.KEY_RELEASE, e, 10) == 0) { kk.Refresh(); - Console.WriteLine("Render time : {0}", kk.getRendertime()-startTime); + Console.WriteLine("Render time : {0}", kk.getDisplayTime()-startTime); }