From f5c8cdad92687782184122fecc341258a6283d89 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 16 Jan 2012 10:56:59 +0100 Subject: NEWT/OSX Pointer Invisible Fix: 10.6.* responder declarations & test focus/isInside On OS X 10.6.8 the lack of responder method declarations (mouseEntered, ..) lead to ignore the impl. callbacks. 'isMouseInside' cannot rely on 'mouseExit'/'mouseEntered' when setMouseInvisible() is being called, deduce it manually. focusLost == mouseExit (OS X behavior), hence focusGained needs to set mouse invisible/visible in case it's requested. --- src/newt/native/NewtMacWindow.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/newt/native/NewtMacWindow.h') diff --git a/src/newt/native/NewtMacWindow.h b/src/newt/native/NewtMacWindow.h index 3ba89de1e..dea7e32ae 100644 --- a/src/newt/native/NewtMacWindow.h +++ b/src/newt/native/NewtMacWindow.h @@ -129,12 +129,26 @@ - (NSPoint) newtClientWinPos2OSXScreenPos: (NSPoint) p; - (NSPoint) getLocationOnScreen: (NSPoint) p; - (NSPoint) screenPos2NewtClientWinPos: (NSPoint) p; +- (BOOL) isMouseInside; - (void) cursorHide:(BOOL)v; - (void) setMouseVisible:(BOOL)v; - (void) setMouseConfined:(BOOL)v; - (void) setMousePosition:(NSPoint)p; +- (void) mouseEntered: (NSEvent*) theEvent; +- (void) mouseExited: (NSEvent*) theEvent; +- (void) mouseMoved: (NSEvent*) theEvent; +- (void) scrollWheel: (NSEvent*) theEvent; +- (void) mouseDown: (NSEvent*) theEvent; +- (void) mouseDragged: (NSEvent*) theEvent; +- (void) mouseUp: (NSEvent*) theEvent; +- (void) rightMouseDown: (NSEvent*) theEvent; +- (void) rightMouseDragged: (NSEvent*) theEvent; +- (void) rightMouseUp: (NSEvent*) theEvent; +- (void) otherMouseDown: (NSEvent*) theEvent; +- (void) otherMouseUp: (NSEvent*) theEvent; + - (BOOL) becomeFirstResponder; - (BOOL) resignFirstResponder; - (void) becomeKeyWindow; -- cgit v1.2.3