X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=OSX%2FSaverRunner.h;h=8e88b86b606e8e6c5fd7f81a0906082850d510e9;hb=88cfe534a698a0562e81345957a50714af1453bc;hp=0284ccf5065a296ebb7a9b3f9b8aad96d1e6f865;hpb=c141c2b05e374757b6499d12bb8a6d4d943b1529;p=xscreensaver diff --git a/OSX/SaverRunner.h b/OSX/SaverRunner.h index 0284ccf5..8e88b86b 100644 --- a/OSX/SaverRunner.h +++ b/OSX/SaverRunner.h @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 2006-2012 Jamie Zawinski +/* xscreensaver, Copyright (c) 2006-2015 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -31,9 +31,39 @@ # import #endif -@class ScreenSaverView; +#import + +#ifdef USE_IPHONE + +@class SaverRunner; + +@interface SaverViewController : UIViewController +{ + SaverRunner *_parent; + NSString *_saverName; + XScreenSaverView *_saverView; + + /* When a the SaverViewController is presented, iOS automatically changes + the status bar orientation. (And, by extension, the notification center + orientation.) But there's no willPresentAsModal: event for a + UIViewController so that it knows when this is going to happen, and the + other event handlers occur after the status bar is changed. So save the + orientation just before the view controller is modal-presented, and + restore the proper status bar orientation just before the saverView is + created so it can pick it up in didRotate:. */ + UIInterfaceOrientation _storedOrientation; +} + +@property(nonatomic, retain) NSString *saverName; + +@end + +#endif @interface SaverRunner : NSObject +# ifdef USE_IPHONE + +# endif { NSString *saverName; // the one currently loaded NSArray *saverNames; // Names of available savers @@ -44,31 +74,35 @@ NSBundle *saverBundle; NSArray *windows; IBOutlet NSMenu *menubar; + NSTimer *anim_timer; # else // USE_IPHONE - ScreenSaverView *saverView; - UIView *backgroundView; - UINavigationController *rootViewController; + UINavigationController *rotating_nav; // Hierarchy 1 (UI) IBOutlet UIWindow *window; - EAGLContext *eagl_ctx; - GLuint gl_framebuffer, gl_renderbuffer; IBOutlet UIView *view; + + SaverViewController *nonrotating_controller; // Hierarchy 2 (savers) + UIImage *saved_screenshot; + UIView *aboutBox; + NSTimer *splashTimer; # endif // USE_IPHONE } -- (void) loadSaver: (NSString *)name launch:(BOOL)launch; +- (XScreenSaverView *) makeSaverView: (NSString *) module + withSize: (NSSize) size; - (void) loadSaver: (NSString *)name; - (void) selectedSaverDidChange:(NSDictionary *)change; #ifndef USE_IPHONE -- (void) aboutPanel: (id)sender; - (void) openPreferences: (id)sender; #else // USE_IPHONE - (void) openPreferences: (NSString *)which; - (UIImage *) screenshot; +- (void)aboutPanel:(UIView *)saverView + orientation:(UIInterfaceOrientation)orient; #endif // USE_IPHONE @end