X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=OSX%2FSaverRunner.h;h=541bb2cf9261f1c448a876d3d115a55b58c5f1c9;hp=3ddc6b87f82074ccd9e67c9a92d0de35b5694121;hb=f8cf5ac7b2f53510f80a0eaf286a25298be17bfe;hpb=ec8d2b32b63649e6d32bdfb306eda062769af823 diff --git a/OSX/SaverRunner.h b/OSX/SaverRunner.h index 3ddc6b87..541bb2cf 100644 --- a/OSX/SaverRunner.h +++ b/OSX/SaverRunner.h @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 2006-2011 Jamie Zawinski +/* xscreensaver, Copyright (c) 2006-2012 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 @@ -9,19 +9,69 @@ * implied warranty. */ -#import -#import +#ifdef USE_IPHONE +# import +# import +# import +# import +# import +# import +# define NSView UIView +# define NSRect CGRect +# define NSSize CGSize +# define NSColor UIColor +# define NSImage UIImage +# define NSEvent UIEvent +# define NSWindow UIWindow +# define NSButton UIButton +# define NSApplication UIApplication +# define NSScreen UIScreen +#else +# import +# import +#endif + +@class ScreenSaverView; + +#ifdef USE_IPHONE +# import "SaverListController.h" +#endif @interface SaverRunner : NSObject { - NSString *saverDir; - NSArray *saverNames; - NSArray *windows; + NSString *saverName; // the one currently loaded + NSArray *saverNames; // Names of available savers + NSString *saverDir; // Where we find saver bundles + +# ifndef USE_IPHONE + NSBundle *saverBundle; + NSArray *windows; IBOutlet NSMenu *menubar; + +# else // USE_IPHONE + + ScreenSaverView *saverView; + UINavigationController *rootViewController; + IBOutlet UIWindow *window; + EAGLContext *eagl_ctx; + GLuint gl_framebuffer, gl_renderbuffer; + IBOutlet UIView *view; + SaverListController *listController; + UIImage *saved_screenshot; + +# endif // USE_IPHONE } -- (IBAction) openPreferences: (id)sender; -- (IBAction) aboutPanel: (id)sender; +- (void) aboutPanel: (id)sender; +- (void) openPreferences: (id)sender; +- (void)loadSaver:(NSString *)name launch:(BOOL)launch; +- (void) loadSaver: (NSString *)name; +- (void)selectedSaverDidChange:(NSDictionary *)change; + +#ifdef USE_IPHONE +- (void) loadSaverMenu: (id)sender; +- (UIImage *) screenshot; +#endif @end