Revision: 14217
http://sourceforge.net/p/skim-app/code/14217
Author: hofman
Date: 2024-04-18 14:43:09 +0000 (Thu, 18 Apr 2024)
Log Message:
-----------
rename methods and variables
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2024-04-18 14:36:31 UTC (rev
14216)
+++ trunk/SKMainWindowController_FullScreen.m 2024-04-18 14:43:09 UTC (rev
14217)
@@ -284,16 +284,16 @@
}
- (void)removePresentationWindow {
- NSWindow *fullScreenWindow = [self window];
+ NSWindow *presentationWindow = [self window];
[self setWindow:mainWindow];
[mainWindow setAlphaValue:0.0];
[mainWindow setAnimationBehavior:NSWindowAnimationBehaviorNone];
- if (NSPointInRect(SKCenterPoint([mainWindow frame]), [[fullScreenWindow
screen] frame])) {
+ if (NSPointInRect(SKCenterPoint([mainWindow frame]), [[presentationWindow
screen] frame])) {
NSWindowCollectionBehavior collectionBehavior = [mainWindow
collectionBehavior];
// trick to make sure the main window shows up in the same space as
the fullscreen window
- [fullScreenWindow addChildWindow:mainWindow ordered:NSWindowBelow];
- [fullScreenWindow removeChildWindow:mainWindow];
+ [presentationWindow addChildWindow:mainWindow ordered:NSWindowBelow];
+ [presentationWindow removeChildWindow:mainWindow];
// these can change due to the child window trick
[mainWindow setLevel:NSNormalWindowLevel];
[mainWindow setCollectionBehavior:collectionBehavior];
@@ -307,10 +307,10 @@
[mainWindow makeKeyWindow];
[NSApp updatePresentationOptionsForWindow:mainWindow];
[mainWindow setAnimationBehavior:NSWindowAnimationBehaviorDefault];
- [NSApp removeWindowsItem:fullScreenWindow];
+ [NSApp removeWindowsItem:presentationWindow];
}
-- (void)showStaticContentForWindow:(NSWindow *)window {
+- (void)displayStaticContentForWindow:(NSWindow *)window {
NSRect frame = [window frame];
CGImageRef cgImage = CGWindowListCreateImage(CGRectNull,
kCGWindowListOptionIncludingWindow, (CGWindowID)[window windowNumber],
kCGWindowImageBoundsIgnoreFraming);
if (([window styleMask] & NSWindowStyleMaskFullScreen) != 0 &&
autoHideToolbarInFullScreen == NO && [[window toolbar] isVisible]) {
@@ -355,7 +355,7 @@
return CGRectGetWidth(r) > 0.0 && CGRectGetHeight(r) > 0.0 ?
CGContextConvertRectToUserSpace(context, r) : NSZeroRect;
}
-- (void)showStaticContentInPresentationWindow:(NSWindow *)window {
+- (void)displayStaticContentInPresentationWindow:(NSWindow *)window {
NSRect rect = [[window contentView] bounds];
NSBitmapImageRep *imageRep = nil;
@@ -435,21 +435,21 @@
screen = [screens firstObject];
}
- NSWindow *fullScreenWindow = [[SKFullScreenWindow alloc]
initWithScreen:screen ?: [mainWindow screen]];
- [[fullScreenWindow contentView] setWantsLayer:YES];
- [fullScreenWindow setAlphaValue:0.0];
- [self showStaticContentInPresentationWindow:fullScreenWindow];
- [fullScreenWindow orderFront:nil];
+ NSWindow *presentationWindow = [[SKFullScreenWindow alloc]
initWithScreen:screen ?: [mainWindow screen]];
+ [[presentationWindow contentView] setWantsLayer:YES];
+ [presentationWindow setAlphaValue:0.0];
+ [self displayStaticContentInPresentationWindow:presentationWindow];
+ [presentationWindow orderFront:nil];
if ([self presentationNotesDocument])
[self showPresentationNotes];
- BOOL shouldFadeOut = NSContainsRect([fullScreenWindow frame], [[self
window] frame]) == NO && [[[self window] tabbedWindows] count] <= 1;
+ BOOL shouldFadeOut = NSContainsRect([presentationWindow frame], [[self
window] frame]) == NO && [[[self window] tabbedWindows] count] <= 1;
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
[context setDuration:PRESENTATION_DURATION];
[context setTimingFunction:[CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
- [[fullScreenWindow animator] setAlphaValue:1.0];
+ [[presentationWindow animator] setAlphaValue:1.0];
if (shouldFadeOut)
[[mainWindow animator] setAlphaValue:0.0];
[[[presentationPreview window] animator] setAlphaValue:1.0];
@@ -466,16 +466,16 @@
}
[mainWindow setDelegate:nil];
- [self setWindow:fullScreenWindow];
- [NSApp updatePresentationOptionsForWindow:fullScreenWindow];
+ [self setWindow:presentationWindow];
+ [NSApp updatePresentationOptionsForWindow:presentationWindow];
[mainWindow setAnimationBehavior:NSWindowAnimationBehaviorNone];
[mainWindow orderOut:nil];
[mainWindow setAnimationBehavior:NSWindowAnimationBehaviorDefault];
[mainWindow setAlphaValue:1.0];
if ([[NSUserDefaults standardUserDefaults]
boolForKey:SKUseNormalLevelForPresentationKey])
- [fullScreenWindow setLevel:NSNormalWindowLevel];
- [fullScreenWindow makeKeyAndOrderFront:nil];
- [NSApp addWindowsItem:fullScreenWindow title:[self
windowTitleForDocumentDisplayName:[[self document] displayName]] filename:NO];
+ [presentationWindow setLevel:NSNormalWindowLevel];
+ [presentationWindow makeKeyAndOrderFront:nil];
+ [NSApp addWindowsItem:presentationWindow title:[self
windowTitleForDocumentDisplayName:[[self document] displayName]] filename:NO];
if ([self hasOverview])
[self hideOverviewAnimating:NO];
@@ -482,13 +482,13 @@
[self enterPresentationMode];
- [[[[fullScreenWindow contentView] subviews] firstObject]
removeFromSuperview];
- [[fullScreenWindow contentView] addSubviewWithConstraints:pdfView];
+ [[[[presentationWindow contentView] subviews] firstObject]
removeFromSuperview];
+ [[presentationWindow contentView]
addSubviewWithConstraints:pdfView];
[pdfView layoutDocumentView];
[pdfView requiresDisplay];
- [fullScreenWindow makeFirstResponder:pdfView];
- [fullScreenWindow recalculateKeyViewLoop];
- [fullScreenWindow setDelegate:self];
+ [presentationWindow makeFirstResponder:pdfView];
+ [presentationWindow recalculateKeyViewLoop];
+ [presentationWindow setDelegate:self];
if ([[pdfView currentPage] isEqual:page] == NO)
[pdfView goToPage:page];
@@ -524,18 +524,18 @@
// do this first, otherwise the navigation window may be covered by
fadeWindow and then reveiled again, which looks odd
[pdfView setPresentationMode:NO];
- NSWindow *fullScreenWindow = [self window];
+ NSWindow *presentationWindow = [self window];
- [self showStaticContentInPresentationWindow:fullScreenWindow];
+ [self displayStaticContentInPresentationWindow:presentationWindow];
- while ([[fullScreenWindow childWindows] count] > 0) {
- NSWindow *childWindow = [[fullScreenWindow childWindows] lastObject];
- [fullScreenWindow removeChildWindow:childWindow];
+ while ([[presentationWindow childWindows] count] > 0) {
+ NSWindow *childWindow = [[presentationWindow childWindows] lastObject];
+ [presentationWindow removeChildWindow:childWindow];
[childWindow orderOut:nil];
}
- [fullScreenWindow setDelegate:nil];
- [fullScreenWindow makeFirstResponder:nil];
+ [presentationWindow setDelegate:nil];
+ [presentationWindow makeFirstResponder:nil];
interactionMode = SKNormalMode;
@@ -572,9 +572,9 @@
[self removePresentationWindow];
- [fullScreenWindow setLevel:NSPopUpMenuWindowLevel];
+ [presentationWindow setLevel:NSPopUpMenuWindowLevel];
- BOOL covered = NSContainsRect([fullScreenWindow frame], [mainWindow
frame]);
+ BOOL covered = NSContainsRect([presentationWindow frame], [mainWindow
frame]);
if (covered)
[mainWindow setAlphaValue:1.0];
@@ -589,11 +589,11 @@
[context setTimingFunction:[CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
if (covered == NO)
[[mainWindow animator] setAlphaValue:1.0];
- [[fullScreenWindow animator] setAlphaValue:0.0];
+ [[presentationWindow animator] setAlphaValue:0.0];
[[[presentationPreview window] animator] setAlphaValue:0.0];
}
completionHandler:^{
- [fullScreenWindow orderOut:nil];
+ [presentationWindow orderOut:nil];
if (presentationPreview) {
[[presentationPreview window]
setAnimationBehavior:NSWindowAnimationBehaviorNone];
[presentationPreview close];
@@ -710,7 +710,7 @@
if ([[NSUserDefaults standardUserDefaults]
boolForKey:AppleMenuBarVisibleInFullscreenKey])
frame.size.height -= [[NSApp mainMenu] menuBarHeight] ?: 24.0;
if (animationWindow != nil) {
- [self showStaticContentForWindow:window];
+ [self displayStaticContentForWindow:window];
[(SKMainWindow *)window setDisableConstrainedFrame:YES];
[window setFrame:frame display:YES];
[window orderWindow:NSWindowAbove relativeTo:animationWindow];
@@ -799,7 +799,7 @@
- (void)window:(NSWindow *)window
startCustomAnimationToExitFullScreenWithDuration:(NSTimeInterval)duration {
NSRect frame = NSRectFromString([savedNormalSetup
objectForKey:MAINWINDOWFRAME_KEY]);
if (animationWindow != nil) {
- [self showStaticContentForWindow:window];
+ [self displayStaticContentForWindow:window];
[window setStyleMask:[window styleMask] &
~NSWindowStyleMaskFullScreen];
setAlphaValueOfTitleBarControls(window, 1.0, NO);
[window setFrame:frame display:YES];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit