1 /* xscreensaver, Copyright (c) 2006 Jamie Zawinski <jwz@jwz.org>
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
12 /* This implements the substrate of the xscreensaver preferences code:
13 It does this by writing defaults to, and reading values from, the
14 NSUserDefaultsController (and ScreenSaverDefaults/NSUserDefaults)
15 and thereby reading the preferences that may have been edited by
16 the UI (XScreenSaverConfigSheet).
19 #import <Cocoa/Cocoa.h>
22 @interface PrefsReader : NSObject
24 NSUserDefaultsController *userDefaultsController;
25 NSUserDefaults *userDefaults; // this is actually a 'ScreenSaverDefaults'
28 - (id) initWithName: (NSString *) name
29 xrmKeys: (const XrmOptionDescRec *) opts
30 defaults: (const char * const *) defs;
32 - (NSUserDefaultsController *) userDefaultsController;
34 - (char *) getStringResource: (const char *) name;
35 - (double) getFloatResource: (const char *) name;
36 - (int) getIntegerResource: (const char *) name;
37 - (BOOL) getBooleanResource: (const char *) name;