X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=OSX%2FSaverRunner.h;h=99d7f6843cf528cc5cf73b571e0143126c1be1b9;hp=35d22354761c410b581fa2489d3c394598b12e28;hb=d1ae2829ff0fd2a96c16a0c8c5420efaa47d7b30;hpb=7edd66e6bd3209013ee059819747b10b5835635b diff --git a/OSX/SaverRunner.h b/OSX/SaverRunner.h index 35d22354..99d7f684 100644 --- a/OSX/SaverRunner.h +++ b/OSX/SaverRunner.h @@ -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 @@ -52,10 +82,7 @@ IBOutlet UIWindow *window; IBOutlet UIView *view; - UINavigationController *nonrotating_nav; // Hierarchy 2 (savers) - UIWindow *saverWindow; - UIView *backgroundView; - ScreenSaverView *saverView; + SaverViewController *nonrotating_controller; // Hierarchy 2 (savers) EAGLContext *eagl_ctx; GLuint gl_framebuffer, gl_renderbuffer; @@ -66,16 +93,18 @@ # 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; -- (void) aboutPanel: (id)sender; #ifndef USE_IPHONE - (void) openPreferences: (id)sender; #else // USE_IPHONE - (void) openPreferences: (NSString *)which; - (UIImage *) screenshot; +- (void)aboutPanel:(UIView *)saverView + orientation:(UIInterfaceOrientation)orient; #endif // USE_IPHONE @end