forked from gobbledegook/creevey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SlideshowWindow.h
84 lines (67 loc) · 2.5 KB
/
SlideshowWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//Copyright 2005 Dominic Yu. Some rights reserved.
//This work is licensed under the Creative Commons
//Attribution-NonCommercial-ShareAlike License. To view a copy of this
//license, visit http://creativecommons.org/licenses/by-nc-sa/2.0/ or send
//a letter to Creative Commons, 559 Nathan Abbott Way, Stanford,
//California 94305, USA.
/* SlideshowWindow
* give it a list of images
* a full screen window pops up
* remember to hide it when the app becomes inactive!
*/
#import <Cocoa/Cocoa.h>
#import "DYImageView.h"
#import "DYImageCache.h"
@class DYRandomizableArray;
@interface SlideshowWindow : NSWindow
{
NSMutableSet **cats;
DYImageView *imgView;
NSTextField *infoFld, *catsFld; BOOL hideInfoFld, moreExif;
NSTextView *exifFld;
// int blurr;
DYImageCache *imgCache;
NSTimeInterval timerIntvl; BOOL timerPaused;
NSTimer *autoTimer;
DYRandomizableArray *filenames;
NSMutableDictionary *rotations, *zooms, *flips;
NSString *basePath;
NSRect screenRect;
NSScreen *oldScreen;
volatile NSUInteger currentIndex;
NSUInteger lastIndex; // for outside access to last slide shown
NSTextView *helpFld;
NSImageView *loopImageView;
BOOL loopMode, randomMode, rerandomizeOnLoop, autoRotate;
unsigned char keyIsRepeating;
BOOL mouseDragged;
}
- (void)setCats:(NSMutableSet **)newCats;
- (void)setFilenames:(NSArray *)files; // call this before starting the slideshow
- (void)setBasePath:(NSString *)s;
- (void)startSlideshow;
- (void)startSlideshowAtIndex:(NSUInteger)n;
- (void)endSlideshow;
- (void)resetScreen;
- (void)setAutoadvanceTime:(NSTimeInterval)s; // 0 to turn off
- (NSUInteger)currentIndex;
- (NSString *)currentFile;
- (NSString *)basePath;
- (unsigned short)currentOrientation; // returns an EXIF orientation
- (unsigned short)currentFileExifOrientation;
- (void)displayImage; // to reload current file, assuming the mod date is different (oops - don't use this anymore)
- (void)redisplayImage; // to force reload of current file, regardless of mod date
- (BOOL)currentImageLoaded;
- (void)removeImageForFile:(NSString *)s; // use this if something's been deleted
- (void)uncacheImage:(NSString *)s; // when an image is modified, remove it from cache
- (void)setRerandomizeOnLoop:(BOOL)b;
- (void)setAutoRotate:(BOOL)b;
- (BOOL)autoRotate;
// menu methods
- (IBAction)endSlideshow:(id)sender;
- (IBAction)toggleLoopMode:(id)sender;
- (IBAction)toggleCheatSheet:(id)sender;
- (IBAction)toggleScalesUp:(id)sender;
- (IBAction)toggleShowActualSize:(id)sender;
- (IBAction)toggleRandom:(id)sender;
@end