Changeset 1051
- Timestamp:
- Sep 17, 2006, 3:36:13 PM (17 years ago)
- Location:
- libcaca/trunk/DotNet
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/DotNet/Caca.cs
r943 r1051 94 94 public static extern void caca_refresh_display(IntPtr kk); 95 95 [DllImport("libCaca.dll", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 96 public static extern void caca_set_d elay(IntPtr kk, Int32 d);96 public static extern void caca_set_display_time(IntPtr kk, Int32 d); 97 97 [DllImport("libCaca.dll", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 98 public static extern Int32 caca_get_ rendertime(IntPtr kk);98 public static extern Int32 caca_get_display_time(IntPtr kk); 99 99 [DllImport("libCaca.dll", CallingConvention=CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 100 100 public static extern Int32 caca_get_display_width(IntPtr kk); … … 133 133 caca_refresh_display(kk); 134 134 } 135 public void setD elay(Int32 d)135 public void setDisplayTime(Int32 d) 136 136 { 137 caca_set_d elay(kk, d);137 caca_set_display_time(kk, d); 138 138 } 139 public Int32 get Rendertime()139 public Int32 getDisplayTime() 140 140 { 141 return caca_get_ rendertime(kk);141 return caca_get_display_time(kk); 142 142 } 143 143 public Int32 getDisplayWidth() -
libcaca/trunk/DotNet/test.cs
r943 r1051 46 46 /* We have a proper canvas, let's display it using Caca */ 47 47 Caca kk = new Caca(qq); 48 kk.setD elay(2000000); // Refresh every 2 seconds48 kk.setDisplayTime(2000000); // Refresh every 2 seconds 49 49 50 50 kk.setDisplayTitle("libcaca .NET Bindings test suite"); 51 51 52 52 Event e = new Event(); 53 int startTime = kk.get Rendertime();53 int startTime = kk.getDisplayTime(); 54 54 while(kk.getEvent(Event.type.KEY_RELEASE, e, 10) == 0) 55 55 { 56 56 kk.Refresh(); 57 Console.WriteLine("Render time : {0}", kk.get Rendertime()-startTime);57 Console.WriteLine("Render time : {0}", kk.getDisplayTime()-startTime); 58 58 } 59 59
Note: See TracChangeset
for help on using the changeset viewer.