src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m
Print this page
*** 65,82 ****
--- 65,84 ----
#define AWT_NS_WINDOW_IMPLEMENTATION \
- (id) initWithDelegate:(AWTWindow *)delegate \
frameRect:(NSRect)contectRect \
styleMask:(NSUInteger)styleMask \
contentView:(NSView *)view \
+ zoomed:(BOOL)zoomed \
{ \
self = [super initWithContentRect:contectRect \
styleMask:styleMask \
backing:NSBackingStoreBuffered \
defer:NO]; \
\
if (self == nil) return nil; \
\
+ if (zoomed) [self zoom:nil]; \
[self setDelegate:delegate]; \
[self setContentView:view]; \
[self setInitialFirstResponder:view]; \
[self setReleasedWhenClosed:NO]; \
[self setPreservesContentDuringLiveResize:YES]; \
*** 267,276 ****
--- 269,279 ----
- (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)platformWindow
ownerWindow:owner
styleBits:(jint)bits
frameRect:(NSRect)rect
contentView:(NSView *)view
+ zoomed:(BOOL)zoomed
{
AWT_ASSERT_APPKIT_THREAD;
NSUInteger styleMask = [AWTWindow styleMaskForStyleBits:bits];
NSRect contentRect = rect; //[NSWindow contentRectForFrameRect:rect styleMask:styleMask];
*** 291,309 ****
IS(bits, HIDES_ON_DEACTIVATE))
{
self.nsWindow = [[AWTWindow_Panel alloc] initWithDelegate:self
frameRect:contentRect
styleMask:styleMask
! contentView:view];
}
else
{
// These windows will appear in the window list in the dock icon menu
self.nsWindow = [[AWTWindow_Normal alloc] initWithDelegate:self
frameRect:contentRect
styleMask:styleMask
! contentView:view];
}
if (self.nsWindow == nil) return nil; // no hope either
[self.nsWindow release]; // the property retains the object already
--- 294,314 ----
IS(bits, HIDES_ON_DEACTIVATE))
{
self.nsWindow = [[AWTWindow_Panel alloc] initWithDelegate:self
frameRect:contentRect
styleMask:styleMask
! contentView:view
! zoomed:NO];
}
else
{
// These windows will appear in the window list in the dock icon menu
self.nsWindow = [[AWTWindow_Normal alloc] initWithDelegate:self
frameRect:contentRect
styleMask:styleMask
! contentView:view
! zoomed: zoomed];
}
if (self.nsWindow == nil) return nil; // no hope either
[self.nsWindow release]; // the property retains the object already
*** 781,791 ****
* Class: sun_lwawt_macosx_CPlatformWindow
* Method: nativeCreateNSWindow
* Signature: (JJIIII)J
*/
JNIEXPORT jlong JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeCreateNSWindow
! (JNIEnv *env, jobject obj, jlong contentViewPtr, jlong ownerPtr, jlong styleBits, jdouble x, jdouble y, jdouble w, jdouble h)
{
__block AWTWindow *window = nil;
JNF_COCOA_ENTER(env);
--- 786,797 ----
* Class: sun_lwawt_macosx_CPlatformWindow
* Method: nativeCreateNSWindow
* Signature: (JJIIII)J
*/
JNIEXPORT jlong JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeCreateNSWindow
! (JNIEnv *env, jobject obj, jlong contentViewPtr, jlong ownerPtr, jlong styleBits,
! jdouble x, jdouble y, jdouble w, jdouble h, jboolean zoomed)
{
__block AWTWindow *window = nil;
JNF_COCOA_ENTER(env);
*** 797,807 ****
window = [[AWTWindow alloc] initWithPlatformWindow:platformWindow
ownerWindow:owner
styleBits:styleBits
frameRect:frameRect
! contentView:contentView];
// the window is released is CPlatformWindow.nativeDispose()
if (window) [window.nsWindow retain];
}];
--- 803,814 ----
window = [[AWTWindow alloc] initWithPlatformWindow:platformWindow
ownerWindow:owner
styleBits:styleBits
frameRect:frameRect
! contentView:contentView
! zoomed: zoomed ? YES : NO];
// the window is released is CPlatformWindow.nativeDispose()
if (window) [window.nsWindow retain];
}];