1 |
|
/* |
2 |
|
* prefs.h - Preferences handling |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2000 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2002 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
23 |
|
|
24 |
|
#include <stdio.h> |
25 |
|
|
26 |
< |
extern void PrefsInit(void); |
26 |
> |
extern void PrefsInit(int &argc, char **&argv); |
27 |
|
extern void PrefsExit(void); |
28 |
|
|
29 |
+ |
extern void PrefsPrintUsage(void); |
30 |
+ |
|
31 |
+ |
extern void AddPrefsDefaults(void); |
32 |
|
extern void AddPlatformPrefsDefaults(void); |
33 |
|
|
34 |
|
// Preferences loading/saving |
41 |
|
// Public preferences access functions |
42 |
|
extern void PrefsAddString(const char *name, const char *s); |
43 |
|
extern void PrefsAddBool(const char *name, bool b); |
41 |
– |
extern void PrefsAddInt16(const char *name, int16 val); |
44 |
|
extern void PrefsAddInt32(const char *name, int32 val); |
45 |
|
|
46 |
|
extern void PrefsReplaceString(const char *name, const char *s, int index = 0); |
47 |
|
extern void PrefsReplaceBool(const char *name, bool b); |
46 |
– |
extern void PrefsReplaceInt16(const char *name, int16 val); |
48 |
|
extern void PrefsReplaceInt32(const char *name, int32 val); |
49 |
|
|
50 |
|
extern const char *PrefsFindString(const char *name, int index = 0); |
51 |
|
extern bool PrefsFindBool(const char *name); |
51 |
– |
extern int16 PrefsFindInt16(const char *name); |
52 |
|
extern int32 PrefsFindInt32(const char *name); |
53 |
|
|
54 |
|
extern void PrefsRemoveItem(const char *name, int index = 0); |
62 |
|
enum prefs_type { |
63 |
|
TYPE_STRING, // char[] |
64 |
|
TYPE_BOOLEAN, // bool |
65 |
– |
TYPE_INT16, // int16 |
65 |
|
TYPE_INT32, // int32 |
66 |
|
TYPE_ANY, // Wildcard for find_node |
67 |
|
TYPE_END = TYPE_ANY // Terminator for prefs_desc list |
72 |
|
const char *name; // Name of keyword |
73 |
|
prefs_type type; // Type (see above) |
74 |
|
bool multiple; // Can this item occur multiple times (only for TYPE_STRING)? |
75 |
+ |
const char *help; // Help/descriptive text about this item |
76 |
|
}; |
77 |
|
|
78 |
|
// List of common preferences items (those which exist on all platforms) |