diff options
author | Grant Gayed <ggayed> | 2008-06-13 18:32:52 +0000 |
---|---|---|
committer | Grant Gayed <ggayed> | 2008-06-13 18:32:52 +0000 |
commit | f820540f9bb45c85c8821653a4e1191ecaea8557 (patch) | |
tree | 53f2185d737148e440bb0e57ea8639d890625a69 | |
parent | bba33a1e564234287281c03cfe2e543e62547b0e (diff) | |
download | eclipse.platform.swt-f820540f9bb45c85c8821653a4e1191ecaea8557.tar.gz eclipse.platform.swt-f820540f9bb45c85c8821653a4e1191ecaea8557.tar.xz eclipse.platform.swt-f820540f9bb45c85c8821653a4e1191ecaea8557.zip |
230118 - Typing in StyledText is accompanied with the error bell
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java | 6 | ||||
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java index 91742fb508..5699ce1150 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java @@ -1667,6 +1667,8 @@ void initClasses () { OS.class_addMethod(cls, OS.sel_isOpaque, proc2, "@:"); OS.class_addMethod(cls, OS.sel_hitTest_1, hitTestProc, "@:{NSPoint}"); OS.class_addMethod(cls, OS.sel_flagsChanged_1, proc3, "@:@"); + OS.class_addMethod(cls, OS.sel_keyDown_1, proc3, "@:@"); + OS.class_addMethod(cls, OS.sel_keyUp_1, proc3, "@:@"); addEventMethods(cls, proc2, proc3); addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc); OS.objc_registerClassPair(cls); @@ -3368,6 +3370,10 @@ int windowDelegateProc(int id, int sel, int arg0) { return widget.windowShouldClose(arg0) ? 1 : 0; } else if (sel == OS.sel_mouseDown_1) { widget.mouseDown(id, sel, arg0); + } else if (sel == OS.sel_keyDown_1) { + widget.keyDown(arg0); + } else if (sel == OS.sel_keyUp_1) { + widget.keyUp(arg0); } else if (sel == OS.sel_mouseUp_1) { widget.mouseUp(id, sel, arg0); } else if (sel == OS.sel_rightMouseDown_1) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java index 89c14d1a0e..23a3272f7f 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java @@ -622,6 +622,14 @@ boolean isValidThread () { void flagsChanged(int event) { } +void keyDown (int theEvent) { + /* keyDown handler that prevents error bell */ +} + +void keyUp (int theEvent) { + /* keyUp handler that prevents error bell */ +} + void mouseDown(int id, int sel, int theEvent) { callSuper(id, sel, theEvent); } |