return true;
}
public bool ProcessKeyDown(int Key){
+ Console.WriteLine("keydown: {0}=>{1}", Key,(Crow.Key)Key);
Keyboard.SetKeyState((Crow.Key)Key,true);
if (_focusedWidget == null)
return false;
lastKeyDownEvt.IsRepeat = true;
_focusedWidget.onKeyDown (this, e);
- keyboardRepeatThread = new Thread (keyboardRepeatThreadFunc);
- keyboardRepeatThread.IsBackground = true;
- keyboardRepeatThread.Start ();
+// keyboardRepeatThread = new Thread (keyboardRepeatThreadFunc);
+// keyboardRepeatThread.IsBackground = true;
+// keyboardRepeatThread.Start ();
return true;
}
_focusedWidget.onKeyUp (this, e);
- if (keyboardRepeatThread != null) {
- keyboardRepeatOn = false;
- keyboardRepeatThread.Abort();
- keyboardRepeatThread.Join ();
- }
+// if (keyboardRepeatThread != null) {
+// keyboardRepeatOn = false;
+// keyboardRepeatThread.Abort();
+// keyboardRepeatThread.Join ();
+// }
return true;
}
- public bool ProcessKeyPress(char Key){
+ public bool ProcessKeyPress(char Key){
if (_focusedWidget == null)
return false;
KeyPressEventArgs e = new KeyPressEventArgs(Key);
public void ShowText(string str)
{
- NativeMethods.cairo_show_text (handle, TerminateUtf8(str));
+ NativeMethods.cairo_show_text (handle, str);
}
-
- public void ShowText(byte[] utf8)
- {
- NativeMethods.cairo_show_text (handle, TerminateUtf8(utf8));
- }
-
+
public void TextPath(string str)
{
NativeMethods.cairo_text_path (handle, TerminateUtf8(str));
public TextExtents TextExtents(string s)
{
TextExtents extents;
- NativeMethods.cairo_text_extents (handle, TerminateUtf8(s), out extents);
- return extents;
- }
-
- public TextExtents TextExtents(byte[] utf8)
- {
- TextExtents extents;
- NativeMethods.cairo_text_extents (handle, TerminateUtf8(utf8), out extents);
+ NativeMethods.cairo_text_extents (handle, s, out extents);
return extents;
}
[MethodImplAttribute(MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute]
internal static extern IntPtr cairo_get_font_face (IntPtr cr);
- [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute]
internal static extern void cairo_get_font_matrix (IntPtr cr, out Matrix matrix);
[MethodImplAttribute(MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute]
internal static extern void cairo_scaled_font_text_extents (IntPtr scaled_font, byte[] utf8, out TextExtents extents);
#endregion
- [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute]
internal static extern void cairo_select_font_face (IntPtr cr, string family, FontSlant slant, FontWeight weight);
[MethodImplAttribute(MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute]
[MethodImplAttribute(MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute]
internal static extern void cairo_show_page (IntPtr cr);
- [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
- internal static extern void cairo_show_text (IntPtr cr, byte[] utf8);
+ [MethodImplAttribute(MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute]
+ internal static extern void cairo_show_text (IntPtr cr, string str);
[MethodImplAttribute(MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute]
internal static extern Status cairo_status (IntPtr cr);
internal static extern IntPtr cairo_svg_surface_restrict_to_version (IntPtr surface, SvgVersion version);
#endregion
- [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
- internal static extern void cairo_text_extents (IntPtr cr, byte[] utf8, out TextExtents extents);
+ [MethodImplAttribute(MethodImplOptions.InternalCall)][System.Security.SecuritySafeCriticalAttribute]
+ internal static extern void cairo_text_extents (IntPtr cr, string txt, out TextExtents extents);
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern void cairo_text_path (IntPtr ct, byte[] utf8);