2003-03-31 21:41:55 +02:00
|
|
|
/*
|
|
|
|
* WineCfg configuration management
|
|
|
|
*
|
|
|
|
* Copyright 2002 Jaco Greeff
|
|
|
|
* Copyright 2003 Dimitrie O. Paun
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WINE_CFG_H
|
|
|
|
#define WINE_CFG_H
|
|
|
|
|
|
|
|
#include "properties.h"
|
|
|
|
|
2003-08-30 02:40:46 +02:00
|
|
|
#define IS_OPTION_TRUE(ch) \
|
|
|
|
((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
|
|
|
|
#define IS_OPTION_FALSE(ch) \
|
|
|
|
((ch) == 'n' || (ch) == 'N' || (ch) == 'f' || (ch) == 'F' || (ch) == '0')
|
|
|
|
|
2003-03-31 21:41:55 +02:00
|
|
|
typedef struct structWineCfg
|
|
|
|
{
|
|
|
|
char szWinVer[MAX_VERSION_LENGTH];
|
|
|
|
char szWinLook[MAX_VERSION_LENGTH];
|
|
|
|
char szDOSVer[MAX_VERSION_LENGTH];
|
|
|
|
|
|
|
|
char szWinDir[MAX_PATH];
|
|
|
|
char szWinSysDir[MAX_PATH];
|
|
|
|
char szWinPath[MAX_PATH];
|
|
|
|
char szWinTmpDir[MAX_PATH];
|
|
|
|
char szWinProfDir[MAX_PATH];
|
|
|
|
|
|
|
|
char szGraphDriver[MAX_NAME_LENGTH];
|
|
|
|
|
2003-08-30 02:49:00 +02:00
|
|
|
HDPA pDlls;
|
|
|
|
HDPA pApps;
|
|
|
|
HDPA pDrives;
|
|
|
|
|
|
|
|
int driveCount;
|
2003-03-31 21:41:55 +02:00
|
|
|
|
|
|
|
X11DRV_DESC sX11Drv;
|
|
|
|
} WINECFG_DESC;
|
|
|
|
|
2003-08-30 02:40:46 +02:00
|
|
|
extern WINECFG_DESC config;
|
|
|
|
|
2003-03-31 21:41:55 +02:00
|
|
|
WINECFG_DESC *allocConfig(void);
|
|
|
|
int freeConfig(WINECFG_DESC *pCfg);
|
|
|
|
|
|
|
|
int loadConfig(WINECFG_DESC *pCfg);
|
|
|
|
int saveConfig(const WINECFG_DESC *pCfg);
|
|
|
|
|
2003-08-30 02:40:46 +02:00
|
|
|
int setConfigValue (HKEY hCurrent, char *subkey, char *valueName, const char *value);
|
|
|
|
int getConfigValue (HKEY hCurrent, char *subkey, char *valueName, char *retVal, int length, char *defaultResult);
|
|
|
|
|
2003-08-30 02:49:00 +02:00
|
|
|
|
|
|
|
/* X11DRV */
|
2003-08-30 02:40:46 +02:00
|
|
|
void initX11DrvDlg (HWND hDlg);
|
|
|
|
void saveX11DrvDlgSettings (HWND hDlg);
|
|
|
|
INT_PTR CALLBACK X11DrvDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
2003-08-30 02:49:00 +02:00
|
|
|
/* Drive management */
|
|
|
|
void initDriveDlg (HWND hDlg);
|
|
|
|
void saveDriveSettings (HWND hDlg);
|
|
|
|
|
|
|
|
INT_PTR CALLBACK DriveDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR CALLBACK DriveEditDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
2003-08-30 02:27:08 +02:00
|
|
|
#define WINE_KEY_ROOT "Software\\Wine\\Wine\\Config"
|
|
|
|
|
2003-03-31 21:41:55 +02:00
|
|
|
#endif
|