mirror of
https://github.com/reactos/wine.git
synced 2025-01-22 20:04:59 +00:00
Implemented SPI_GETDESKWALLPAPER action, fixed SPI_SETDESKWALLPAPER.
This commit is contained in:
parent
9859606ec8
commit
a32dc91711
@ -82,6 +82,8 @@ static int has_unicode(void) { return 1; }
|
||||
#define SPI_SETFASTTASKSWITCH_VALNAME "CoolSwitch"
|
||||
#define SPI_SETDRAGFULLWINDOWS_REGKEY "Control Panel\\Desktop"
|
||||
#define SPI_SETDRAGFULLWINDOWS_VALNAME "DragFullWindows"
|
||||
#define SPI_SETDESKWALLPAPER_REGKEY "Control Panel\\Desktop"
|
||||
#define SPI_SETDESKWALLPAPER_VALNAME "Wallpaper"
|
||||
/* FIXME - don't have access to Windows with this action (W95, NT5.0). Set real values */
|
||||
#define SPI_SETKEYBOARDPREF_REGKEY "Control Panel\\Desktop"
|
||||
#define SPI_SETKEYBOARDPREF_VALNAME "WINE_WorkArea"
|
||||
@ -984,6 +986,22 @@ static void test_SPI_SETSCREENREADER( void ) /* 71 */
|
||||
/* TODO!!! - don't have version of Windows which has this */
|
||||
}
|
||||
|
||||
static void test_SPI_SETWALLPAPER( void ) /* 115 */
|
||||
{
|
||||
char oldval[260];
|
||||
char newval[260];
|
||||
trace("testing SPI_{GET,SET}DESKWALLPAPER\n");
|
||||
|
||||
SystemParametersInfoA(SPI_GETDESKWALLPAPER, 260, oldval, 0);
|
||||
test_reg_key(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, oldval);
|
||||
|
||||
strcpy(newval, "");
|
||||
SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, newval, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
|
||||
test_change_message(SPI_SETDESKWALLPAPER, "");
|
||||
|
||||
SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, oldval, SPIF_UPDATEINIFILE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Registry entries for the system parameters.
|
||||
* Names are created by 'SET' flags names.
|
||||
@ -1013,6 +1031,7 @@ static DWORD WINAPI SysParamsThreadFunc( LPVOID lpParam )
|
||||
test_SPI_SETSHOWSOUNDS(); /* 57 */
|
||||
test_SPI_SETKEYBOARDPREF(); /* 69 */
|
||||
test_SPI_SETSCREENREADER(); /* 71 */
|
||||
test_SPI_SETWALLPAPER(); /* 115 */
|
||||
SendMessageA( ghTestWnd, WM_DESTROY, 0, 0 );
|
||||
return 0;
|
||||
}
|
||||
|
@ -109,6 +109,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(system);
|
||||
#define SPI_SETWORKAREA_VALNAME "WINE_WorkArea"
|
||||
#define SPI_SETSHOWSOUNDS_REGKEY "Control Panel\\Accessibility\\ShowSounds"
|
||||
#define SPI_SETSHOWSOUNDS_VALNAME "On"
|
||||
#define SPI_SETDESKWALLPAPER_REGKEY "Control Panel\\Desktop"
|
||||
#define SPI_SETDESKWALLPAPER_VALNAME "Wallpaper"
|
||||
/* FIXME - real values */
|
||||
#define SPI_SETKEYBOARDPREF_REGKEY "Control Panel\\Desktop"
|
||||
#define SPI_SETKEYBOARDPREF_VALNAME "WINE_KeyboardPref"
|
||||
@ -836,6 +838,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
|
||||
}
|
||||
|
||||
case SPI_SETDESKWALLPAPER: /* 20 */
|
||||
SYSPARAMS_Save(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, pvParam, fWinIni);
|
||||
ret = SetDeskWallPaper( (LPSTR)pvParam );
|
||||
break;
|
||||
case SPI_SETDESKPATTERN: /* 21 */
|
||||
@ -1661,7 +1664,28 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
|
||||
*(BOOL *)pvParam = screensaver_running;
|
||||
break;
|
||||
|
||||
WINE_SPI_FIXME(SPI_GETDESKWALLPAPER); /* 115 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */
|
||||
case SPI_GETDESKWALLPAPER: /* 115 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */
|
||||
{
|
||||
char buf[MAX_PATH];
|
||||
|
||||
if (uiParam > MAX_PATH)
|
||||
{
|
||||
uiParam = MAX_PATH;
|
||||
}
|
||||
|
||||
if (SYSPARAMS_Load(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, buf))
|
||||
{
|
||||
strncpy((char*)pvParam, buf, uiParam);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Return an empty string */
|
||||
memset((char*)pvParam, 0, uiParam);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
WINE_SPI_FIXME(SPI_GETACTIVEWINDOWTRACKING);/* 0x1000 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */
|
||||
WINE_SPI_FIXME(SPI_SETACTIVEWINDOWTRACKING);/* 0x1001 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */
|
||||
WINE_SPI_FIXME(SPI_GETMENUANIMATION); /* 0x1002 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user