aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native/NewtMacWindow.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-16 03:47:31 +0200
committerSven Gothel <[email protected]>2011-10-16 03:47:31 +0200
commitaeffc47f9fea7ae94c7531e6ee4cb53bc88e64f1 (patch)
tree4f31c2924b4ee7f375b7b15e181d849fcc26b0bf /src/newt/native/NewtMacWindow.h
parentec2fc482bf97459c57417a8f856345a5836680f3 (diff)
NEWT/OSX: Add mouse enter/exit and pointer features (visible, confined, warp) - cleanup pos/coord translations
Diffstat (limited to 'src/newt/native/NewtMacWindow.h')
-rw-r--r--src/newt/native/NewtMacWindow.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/newt/native/NewtMacWindow.h b/src/newt/native/NewtMacWindow.h
index 911abb8aa..532eba6b4 100644
--- a/src/newt/native/NewtMacWindow.h
+++ b/src/newt/native/NewtMacWindow.h
@@ -53,8 +53,16 @@
int jvmVersion;
BOOL destroyNotifySent;
+
+ NSTrackingRectTag ptrTrackingTag;
+ NSRect ptrRect;
+ NSCursor * myCursor;
}
+- (id)initWithFrame:(NSRect)frameRect;
+
+- (NSCursor *) cursor;
+
/* Set during event dispatching cycle */
- (void) setJVMHandle: (JavaVM*) vm;
- (JavaVM*) getJVMHandle;
@@ -70,6 +78,7 @@
- (BOOL) getDestroyNotifySent;
- (void) rightMouseDown: (NSEvent*) theEvent;
+- (void) resetCursorRects;
@end
@@ -79,14 +88,29 @@
@interface NewtMacWindow : NSWindow
#endif
{
+ BOOL mouseConfined;
+ BOOL mouseVisible;
+ BOOL mouseInside;
+ BOOL cursorIsHidden;
+ NSPoint lastInsideMousePosition;
@public
int cachedInsets[4]; // l, r, t, b
}
+ (BOOL) initNatives: (JNIEnv*) env forClass: (jobject) clazz;
+- (NSPoint) newtScreenWinPos2OSXScreenPos: (NSPoint) p;
+
+- (NSPoint) newtClientWinPos2OSXScreenPos: (NSPoint) p;
- (NSPoint) getLocationOnScreen: (NSPoint) p;
+- (NSPoint) screenPos2NewtClientWinPos: (NSPoint) p;
+
+- (void) cursorHide:(BOOL)v;
+- (void) setMouseVisible:(BOOL)v;
+- (void) setMouseConfined:(BOOL)v;
+- (void) setMousePosition:(NSPoint)p;
+
- (void) updateInsets: (JNIEnv*) env;
- (id) initWithContentRect: (NSRect) contentRect