/******************************************************************************* * * * prefFile.c -- Nirvana utilities for providing application preferences files * * * * Copyright (c) 1991 Universities Research Association, Inc. * * All rights reserved. * * * * This material resulted from work developed under a Government Contract and * * is subject to the following license: The Government retains a paid-up, * * nonexclusive, irrevocable worldwide license to reproduce, prepare derivative * * works, perform publicly and display publicly by or for the Government, * * including the right to distribute to other Government contractors. Neither * * the United States nor the United States Department of Energy, nor any of * * their employees, makes any warrenty, express or implied, or assumes any * * legal liability or responsibility for the accuracy, completeness, or * * usefulness of any information, apparatus, product, or process disclosed, or * * represents that its use would not infringe privately owned rights. * * * * Fermilab Nirvana GUI Library * * June 3, 1993 * * * * Written by Mark Edel * * * *******************************************************************************/ /* SCCS ID: prefFile.h 1.4 7/8/93 */ enum PrefDataTypes {PREF_INT, PREF_BOOLEAN, PREF_ENUM, PREF_STRING}; typedef struct _PrefDescripRec { char *name; char *class; int dataType; char *defaultString; void *valueAddr; void *arg; int save; } PrefDescripRec; XrmDatabase CreatePreferencesDatabase(char *fileName, char *appName, XrmOptionDescList opTable, int nOptions, unsigned int *argcInOut, char **argvInOut); void RestorePreferences(XrmDatabase prefDB, XrmDatabase appDB, char *appName, char *appClass, PrefDescripRec *rsrcDescrip, int nRsrc); void RestoreDefaultPreferences(PrefDescripRec *rsrcDescrip, int nRsrc); int SavePreferences(Display *display, char *fileName, char *fileHeader, PrefDescripRec *rsrcDescrip, int nRsrc);