1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 #ifndef NEDIT_PREFFILE_H_INCLUDED
28 #define NEDIT_PREFFILE_H_INCLUDED
29
30 #include <X11/Intrinsic.h>
31
32 enum PrefDataTypes {
PREF_INT,
PREF_BOOLEAN,
PREF_ENUM,
PREF_STRING,
33 PREF_ALLOC_STRING};
34
35 typedef struct _PrefDescripRec {
36 char *name;
37 char *class;
38 int dataType;
39 char *defaultString;
40 void *valueAddr;
41 void *arg;
42 int save;
43 } PrefDescripRec;
44
45 XrmDatabase CreatePreferencesDatabase(
const char *fileName,
46 const char *appName, XrmOptionDescList opTable,
47 int nOptions,
unsigned int *argcInOut,
char **argvInOut);
48 void RestorePreferences(XrmDatabase prefDB, XrmDatabase appDB,
49 const char *appName,
const char *appClass, PrefDescripRec *rsrcDescrip,
int nRsrc);
50 void OverlayPreferences(XrmDatabase prefDB,
const char *appName,
51 const char *appClass, PrefDescripRec *rsrcDescrip,
int nRsrc);
52 void RestoreDefaultPreferences(PrefDescripRec *rsrcDescrip,
int nRsrc);
53 int SavePreferences(Display *display,
const char *fileName,
54 const char *fileHeader, PrefDescripRec *rsrcDescrip,
int nRsrc);
55
56 #endif
57