Path: blob/master/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h
41152 views
/*1* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425#ifndef _AWTWINDOW_H26#define _AWTWINDOW_H2728#import <Cocoa/Cocoa.h>2930#import "CMenuBar.h"31#import "LWCToolkit.h"3233@class AWTView;3435@interface AWTWindow : NSObject <NSWindowDelegate> {36@private37jobject javaPlatformWindow; /* This is a weak ref. Always copy to a local ref before using */38CMenuBar *javaMenuBar;39NSSize javaMinSize;40NSSize javaMaxSize;41jint styleBits;42BOOL isEnabled;43NSWindow *nsWindow;44AWTWindow *ownerWindow;45jint preFullScreenLevel;46NSRect standardFrame;47BOOL isMinimizing;48BOOL keyNotificationRecd;49}5051// An instance of either AWTWindow_Normal or AWTWindow_Panel52@property (nonatomic, retain) NSWindow *nsWindow;5354@property (nonatomic) jobject javaPlatformWindow;55@property (nonatomic, retain) CMenuBar *javaMenuBar;56@property (nonatomic, retain) AWTWindow *ownerWindow;57@property (nonatomic) NSSize javaMinSize;58@property (nonatomic) NSSize javaMaxSize;59@property (nonatomic) jint styleBits;60@property (nonatomic) BOOL isEnabled;61@property (nonatomic) jint preFullScreenLevel;62@property (nonatomic) NSRect standardFrame;63@property (nonatomic) BOOL isMinimizing;64@property (nonatomic) BOOL keyNotificationRecd;6566- (id) initWithPlatformWindow:(jobject)javaPlatformWindow67ownerWindow:owner68styleBits:(jint)styleBits69frameRect:(NSRect)frameRect70contentView:(NSView *)contentView;7172- (BOOL) isTopmostWindowUnderMouse;7374// NSWindow overrides delegate methods75- (BOOL) canBecomeKeyWindow;76- (BOOL) canBecomeMainWindow;77- (BOOL) worksWhenModal;78- (void)sendEvent:(NSEvent *)event;7980+ (void) setLastKeyWindow:(AWTWindow *)window;81+ (AWTWindow *) lastKeyWindow;8283@end8485@interface AWTWindow_Normal : NSWindow86- (id) initWithDelegate:(AWTWindow *)delegate87frameRect:(NSRect)rect88styleMask:(NSUInteger)styleMask89contentView:(NSView *)view;90@end9192@interface AWTWindow_Panel : NSPanel93- (id) initWithDelegate:(AWTWindow *)delegate94frameRect:(NSRect)rect95styleMask:(NSUInteger)styleMask96contentView:(NSView *)view;97@end9899#endif _AWTWINDOW_H100101102