- Timestamp:
- Nov 28, 2007, 8:15:05 AM (13 years ago)
- Location:
- libcaca/trunk/csharp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/csharp/Caca.cs
r2078 r2089 132 132 SuppressUnmanagedCodeSecurity] 133 133 private static extern int caca_get_event_type(IntPtr ev); 134 public CacaEventType type134 public CacaEventType Type 135 135 { 136 136 get { return (CacaEventType)caca_get_event_type(cevent); } … … 140 140 SuppressUnmanagedCodeSecurity] 141 141 private static extern int caca_get_event_key_ch(IntPtr ev); 142 public int keyCh142 public int KeyCh 143 143 { 144 144 get { return caca_get_event_key_ch(cevent); } … … 148 148 SuppressUnmanagedCodeSecurity] 149 149 private static extern int caca_get_event_key_utf32(IntPtr ev); 150 public int keyUtf32150 public int KeyUtf32 151 151 { 152 152 get { return caca_get_event_key_utf32(cevent); } … … 157 157 private static extern int caca_get_event_key_utf8(IntPtr ev, 158 158 IntPtr _utf8); 159 public string keyUtf8159 public string KeyUtf8 160 160 { 161 161 get … … 169 169 SuppressUnmanagedCodeSecurity] 170 170 private static extern int caca_get_event_mouse_button(IntPtr ev); 171 public int mouseButton171 public int MouseButton 172 172 { 173 173 get { return caca_get_event_mouse_button(cevent); } … … 180 180 SuppressUnmanagedCodeSecurity] 181 181 private static extern int caca_get_event_mouse_y(IntPtr ev); 182 public Point mousePos182 public Point MousePos 183 183 { 184 184 get { return new Point(caca_get_event_mouse_x(cevent), … … 192 192 SuppressUnmanagedCodeSecurity] 193 193 private static extern int caca_get_event_resize_height(IntPtr ev); 194 public Size resizeSize194 public Size ResizeSize 195 195 { 196 196 get { return new Size(caca_get_event_resize_width(cevent), … … 236 236 SuppressUnmanagedCodeSecurity] 237 237 private static extern int caca_get_display_time(IntPtr dp); 238 public int displayTime238 public int DisplayTime 239 239 { 240 240 get { return caca_get_display_time(_dp); } … … 269 269 SuppressUnmanagedCodeSecurity] 270 270 private static extern int caca_set_display_title(IntPtr dp, string t); 271 public string title271 public string Title 272 272 { 273 273 set { caca_set_display_title(_dp, value); } … … 277 277 SuppressUnmanagedCodeSecurity] 278 278 private static extern void caca_set_mouse(IntPtr k, bool status); 279 public bool mouse279 public bool Mouse 280 280 { 281 281 set { caca_set_mouse(_dp, value); } … … 288 288 SuppressUnmanagedCodeSecurity] 289 289 private static extern int caca_get_mouse_y(IntPtr k); 290 public Point mousePos290 public Point MousePos 291 291 { 292 292 get { return new Point(caca_get_mouse_x(_dp), … … 297 297 SuppressUnmanagedCodeSecurity] 298 298 private static extern void caca_set_cursor(IntPtr k, bool status); 299 public bool cursor299 public bool Cursor 300 300 { 301 301 set { caca_set_cursor(_dp, value); } -
libcaca/trunk/csharp/Cucul.cs
r2082 r2089 326 326 327 327 /* primitives drawing */ 328 /* FIXME: highly incomplete */329 328 330 329 [DllImport("libcucul.dll", CallingConvention=CallingConvention.Cdecl), … … 509 508 SuppressUnmanagedCodeSecurity] 510 509 private static extern int cucul_set_frame_name(IntPtr cv, string n); 511 public string frameName510 public string FrameName 512 511 { 513 512 get { return cucul_get_frame_name(_cv); } … … 554 553 public CuculAttr(int attr) 555 554 { 556 attr = _attr;555 _attr = attr; 557 556 } 558 557 -
libcaca/trunk/csharp/test.cs
r2083 r2089 92 92 public DemoDisplay(DemoCanvas _cv) : base(_cv) 93 93 { 94 displayTime = 20000; // Refresh every 20 ms95 title = "libcaca .NET Bindings test suite";94 Title = "libcaca .NET Bindings test suite"; 95 DisplayTime = 20000; // Refresh every 20 ms 96 96 cv = _cv; 97 97 } … … 101 101 CacaEvent ev; 102 102 103 while((ev = getEvent(CacaEventType.KEY_RELEASE, 10)). type == 0)103 while((ev = getEvent(CacaEventType.KEY_RELEASE, 10)).Type == 0) 104 104 { 105 105 cv.Draw(); … … 108 108 } 109 109 110 if(ev. keyCh > 0x20 && ev.keyCh < 0x7f)111 Console.WriteLine("Key pressed: {0}", ev. keyUtf8);110 if(ev.KeyCh > 0x20 && ev.KeyCh < 0x7f) 111 Console.WriteLine("Key pressed: {0}", ev.KeyUtf8); 112 112 else 113 Console.WriteLine("Key pressed: 0x{0:x}", ev. keyCh);113 Console.WriteLine("Key pressed: 0x{0:x}", ev.KeyCh); 114 114 } 115 115 }
Note: See TracChangeset
for help on using the changeset viewer.