< prev index next >

modules/javafx.graphics/src/main/native-glass/mac/GlassWindow+Overrides.m

Print this page




 178 {
 179     [self _sendJavaWindowResizeEvent:com_sun_glass_events_WindowEvent_RESTORE forFrame:[self _flipFrame]];
 180 }
 181 
 182 - (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame
 183 {
 184     GET_MAIN_JENV;
 185 
 186     if ([window isZoomed]) {
 187         return NO;
 188     }
 189 
 190     (*env)->CallVoidMethod(env, jWindow, jWindowNotifyResize, com_sun_glass_events_WindowEvent_MAXIMIZE, (int)newFrame.size.width, (int)newFrame.size.height);
 191 
 192     return YES;
 193 }
 194 
 195 - (void)windowWillEnterFullScreen:(NSNotification *)notification
 196 {
 197     //NSLog(@"windowWillEnterFullScreen");

 198 }
 199 
 200 - (void)windowDidEnterFullScreen:(NSNotification *)notification
 201 {
 202     //NSLog(@"windowDidEnterFullScreen");
 203     [(GlassViewDelegate*)[self->view delegate] sendJavaFullScreenEvent:YES withNativeWidget:YES];
 204     [GlassApplication leaveFullScreenExitingLoopIfNeeded];
 205 }
 206 
 207 - (void)windowWillExitFullScreen:(NSNotification *)notification
 208 {
 209     //NSLog(@"windowWillExitFullScreen");
 210 }

 211 - (void)windowDidExitFullScreen:(NSNotification *)notification
 212 {
 213     //NSLog(@"windowDidExitFullScreen");
 214     [(GlassViewDelegate*)[self->view delegate] sendJavaFullScreenEvent:NO withNativeWidget:YES];




 215     [GlassApplication leaveFullScreenExitingLoopIfNeeded];
 216 }
 217 
 218 - (BOOL)windowShouldClose:(NSNotification *)notification
 219 {
 220     if (self->isEnabled)
 221     {
 222         GET_MAIN_JENV;
 223         (*env)->CallVoidMethod(env, jWindow, jWindowNotifyClose);
 224     }
 225 
 226     // it's up to app to decide if the window should be closed
 227     return FALSE;
 228 }
 229 
 230 #pragma mark --- Title Icon
 231 
 232 - (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
 233 {
 234     return NO;


 178 {
 179     [self _sendJavaWindowResizeEvent:com_sun_glass_events_WindowEvent_RESTORE forFrame:[self _flipFrame]];
 180 }
 181 
 182 - (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame
 183 {
 184     GET_MAIN_JENV;
 185 
 186     if ([window isZoomed]) {
 187         return NO;
 188     }
 189 
 190     (*env)->CallVoidMethod(env, jWindow, jWindowNotifyResize, com_sun_glass_events_WindowEvent_MAXIMIZE, (int)newFrame.size.width, (int)newFrame.size.height);
 191 
 192     return YES;
 193 }
 194 
 195 - (void)windowWillEnterFullScreen:(NSNotification *)notification
 196 {
 197     //NSLog(@"windowWillEnterFullScreen");
 198     [[self->view delegate] setResizableForFullscreen:YES];
 199 }
 200 
 201 - (void)windowDidEnterFullScreen:(NSNotification *)notification
 202 {
 203     //NSLog(@"windowDidEnterFullScreen");
 204     [(GlassViewDelegate*)[self->view delegate] sendJavaFullScreenEvent:YES withNativeWidget:YES];
 205     [GlassApplication leaveFullScreenExitingLoopIfNeeded];
 206 }
 207 
 208 - (void)windowWillExitFullScreen:(NSNotification *)notification
 209 {
 210     //NSLog(@"windowWillExitFullScreen");
 211 }
 212 
 213 - (void)windowDidExitFullScreen:(NSNotification *)notification
 214 {
 215     //NSLog(@"windowDidExitFullScreen");
 216 
 217     GlassViewDelegate* delegate = (GlassViewDelegate*)[self->view delegate];
 218     [delegate setResizableForFullscreen:NO];
 219 
 220     [delegate sendJavaFullScreenEvent:NO withNativeWidget:YES];
 221     [GlassApplication leaveFullScreenExitingLoopIfNeeded];
 222 }
 223 
 224 - (BOOL)windowShouldClose:(NSNotification *)notification
 225 {
 226     if (self->isEnabled)
 227     {
 228         GET_MAIN_JENV;
 229         (*env)->CallVoidMethod(env, jWindow, jWindowNotifyClose);
 230     }
 231 
 232     // it's up to app to decide if the window should be closed
 233     return FALSE;
 234 }
 235 
 236 #pragma mark --- Title Icon
 237 
 238 - (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
 239 {
 240     return NO;
< prev index next >