diff options
author | Sven Gothel <[email protected]> | 2011-10-20 20:52:46 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-10-20 20:52:46 +0200 |
commit | 627083adaf1b38c17f42c72650c47103f17313ce (patch) | |
tree | 01d9651be896fb17e9e050856d976089e9cb4e9a /src/newt/native/NewtMacWindow.h | |
parent | e9890fee4c2aa296aff2af5ff555908c6362fc5f (diff) |
NEWT/OSX: Attempt to stabilize native parenting (ie w/ AWT) ; Add windowRepaint() callback
- act on positionChanged(..) only for realized windows,
otherwise we could end in an AWT deadlock (AWT parent window).
- add view parenting calls (addSubView/removeFromSuperview)
- attachToParent after view configuration
- allow concurrently view draw
- add windowRepaint() callback (native -> java)
- add more debug tracing
Diffstat (limited to 'src/newt/native/NewtMacWindow.h')
-rw-r--r-- | src/newt/native/NewtMacWindow.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/newt/native/NewtMacWindow.h b/src/newt/native/NewtMacWindow.h index 648b68275..e649fdb13 100644 --- a/src/newt/native/NewtMacWindow.h +++ b/src/newt/native/NewtMacWindow.h @@ -80,6 +80,10 @@ - (void) rightMouseDown: (NSEvent*) theEvent; - (void) resetCursorRects; +- (void) viewWillDraw; +- (void) drawRect:(NSRect)dirtyRect; +- (void) viewDidHide; +- (void) viewDidUnhide; - (BOOL) acceptsFirstResponder; @end @@ -101,6 +105,16 @@ + (BOOL) initNatives: (JNIEnv*) env forClass: (jobject) clazz; +- (id) initWithContentRect: (NSRect) contentRect + styleMask: (NSUInteger) windowStyle + backing: (NSBackingStoreType) bufferingType + defer: (BOOL) deferCreation + screen:(NSScreen *)screen; + +- (void) updateInsets: (JNIEnv*) env; +- (void) attachToParent: (NSWindow*) parent; +- (void) detachFromParent: (NSWindow*) parent; + - (NSPoint) newtScreenWinPos2OSXScreenPos: (NSPoint) p; - (NSPoint) newtClientWinPos2OSXScreenPos: (NSPoint) p; - (NSPoint) getLocationOnScreen: (NSPoint) p; @@ -111,8 +125,6 @@ - (void) setMouseConfined:(BOOL)v; - (void) setMousePosition:(NSPoint)p; -- (void) updateInsets: (JNIEnv*) env; - - (BOOL) becomeFirstResponder; - (BOOL) resignFirstResponder; - (void) becomeKeyWindow; @@ -122,10 +134,4 @@ - (void) windowDidResignKey: (NSNotification *) notification; - (void) sendFocusLost; -- (id) initWithContentRect: (NSRect) contentRect - styleMask: (NSUInteger) windowStyle - backing: (NSBackingStoreType) bufferingType - defer: (BOOL) deferCreation - screen:(NSScreen *)screen; - @end |