From http://www.jwz.org/xscreensaver/xscreensaver-5.37.tar.gz
[xscreensaver] / OSX / SaverRunner.h
index c58e2b331a4437e2908008c9ce3f515f6cc17298..073a87ed68d828a25d7c1074f34835c6a054cfea 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2006-2013 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2006-2016 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
 # import <ScreenSaver/ScreenSaver.h>
 #endif
 
-@class ScreenSaverView;
+#import <XScreenSaverView.h>
+
+#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;
+
+  BOOL _showAboutBox;
+  UIView *aboutBox;
+  NSTimer *splashTimer;
+}
+
+@property(nonatomic, retain) NSString *saverName;
+
+@end
+
+#endif
 
 @interface SaverRunner : NSObject
+# ifdef USE_IPHONE
+  <XScreenSaverViewDelegate>
+# else
+  <NSWindowDelegate>
+# endif
 {
   NSString *saverName;         // the one currently loaded
   NSArray  *saverNames;                // Names of available savers
 
 # 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 *) newSaverView: (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;
+- (NSString *) makeDesc:(NSString *)saver
+               yearOnly:(BOOL) yearp;
 #endif // USE_IPHONE
 
 @end