http://slackware.bholcomb.com/slackware/slackware-11.0/source/xap/xscreensaver/xscree...
[xscreensaver] / OSX / XScreenSaverView.h
1 /* xscreensaver, Copyright (c) 2006 Jamie Zawinski <jwz@jwz.org>
2 *
3 * Permission to use, copy, modify, distribute, and sell this software and its
4 * documentation for any purpose is hereby granted without fee, provided that
5 * the above copyright notice appear in all copies and that both that
6 * copyright notice and this permission notice appear in supporting
7 * documentation.  No representations are made about the suitability of this
8 * software for any purpose.  It is provided "as is" without express or 
9 * implied warranty.
10 */
11
12 /* This is a subclass of Apple's ScreenSaverView that knows how to run
13    xscreensaver programs without X11 via the dark magic of the "jwxyz"
14    library.  In xscreensaver terminology, this is the replacement for
15    the "screenhack.c" module.
16  */
17
18 #import <Cocoa/Cocoa.h>
19 #import <ScreenSaver/ScreenSaver.h>
20 #import "screenhackI.h"
21 #import "PrefsReader.h"
22
23 @interface XScreenSaverView : ScreenSaverView
24 {
25   struct xscreensaver_function_table *xsft;
26   PrefsReader *prefsReader;
27
28   BOOL setup_p;            // whether xsft->setup_cb() has been run
29   BOOL initted_p;          // whether xsft->init_cb() has been run
30   BOOL resized_p;          // whether to run the xsft->reshape_cb() soon
31   double next_frame_time;  // time_t in milliseconds of when to tick the frame
32
33   // Data used by the Xlib-flavored screensaver
34   Display *xdpy;
35   Window xwindow;
36   void *xdata;
37 }
38
39 - (void) prepareContext;
40 - (void) resizeContext;
41
42 @end