began for maemo
[xscreensaver] / xscreensaver / OSX / XScreenSaverConfigSheet.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 /* XScreenSaver uses XML files to describe the user interface for configuring
13    the various screen savers.  These files live in .../hacks/config/ and
14    say relatively high level things like: "there should be a checkbox
15    labelled "Leave Trails", and when it is checked, add the option '-trails'
16    to the command line when launching the program."
17
18    This code reads that XML and constructs a Cocoa interface from it.
19    The Cocoa controls are hooked up to NSUserDefaultsController to save
20    those settings into the MacOS preferences system.  The Cocoa preferences
21    names are the same as the resource names specified in the screenhack's
22    'options' array (we use that array to map the command line switches
23    specified in the XML to the resource names to use).
24  */
25
26 #import <Cocoa/Cocoa.h>
27 #import "jwxyz.h"
28
29 @interface XScreenSaverConfigSheet : NSWindow
30 {
31   NSUserDefaultsController *userDefaultsController;
32 }
33
34 - (id)initWithXMLFile: (NSString *) xml_file
35               options: (const XrmOptionDescRec *) opts
36            controller: (NSUserDefaultsController *) prefs;
37
38 @end