Commit 4688c7ca authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Implement SPI_GETICONMETRICS.

Change WARN -> FIXME for unimplemented SPI_s and set appropriate error.
parent fddbcf3c
...@@ -2222,6 +2222,24 @@ typedef struct { ...@@ -2222,6 +2222,24 @@ typedef struct {
DECL_WINELIB_TYPE_AW(NONCLIENTMETRICS) DECL_WINELIB_TYPE_AW(NONCLIENTMETRICS)
DECL_WINELIB_TYPE_AW(LPNONCLIENTMETRICS) DECL_WINELIB_TYPE_AW(LPNONCLIENTMETRICS)
typedef struct tagICONMETRICSA {
UINT cbSize;
int iHorzSpacing;
int iVertSpacing;
int iTitleWrap;
LOGFONTA lfFont;
} ICONMETRICSA, *LPICONMETRICSA;
typedef struct tagICONMETRICSW {
UINT cbSize;
int iHorzSpacing;
int iVertSpacing;
int iTitleWrap;
LOGFONTW lfFont;
} ICONMETRICSW, *LPICONMETRICSW;
DECL_WINELIB_TYPE_AW(ICONMETRICS)
DECL_WINELIB_TYPE_AW(LPICONMETRICS)
/* Window Styles */ /* Window Styles */
#define WS_OVERLAPPED 0x00000000L #define WS_OVERLAPPED 0x00000000L
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "wingdi.h" #include "wingdi.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "tweak.h" #include "tweak.h"
#include "winerror.h"
/**********************************************************************/ /**********************************************************************/
...@@ -946,6 +947,21 @@ BOOL WINAPI SystemParametersInfoA( UINT uAction, UINT uParam, ...@@ -946,6 +947,21 @@ BOOL WINAPI SystemParametersInfoA( UINT uAction, UINT uParam,
lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
break; break;
} }
case SPI_GETICONMETRICS: {
LPICONMETRICSA lpIcon = lpvParam;
if(!lpIcon || lpIcon->cbSize != sizeof(*lpIcon))
return FALSE;
SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0,
&lpIcon->iHorzSpacing, FALSE );
SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0,
&lpIcon->iVertSpacing, FALSE );
SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0,
&lpIcon->iTitleWrap, FALSE );
SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0,
&lpIcon->lfFont, FALSE );
break;
}
case SPI_GETWORKAREA: case SPI_GETWORKAREA:
SetRect( (RECT *)lpvParam, 0, 0, SetRect( (RECT *)lpvParam, 0, 0,
GetSystemMetrics( SM_CXSCREEN ), GetSystemMetrics( SM_CXSCREEN ),
...@@ -1234,8 +1250,9 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam, ...@@ -1234,8 +1250,9 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
break; break;
default: default:
WARN_(system)("Unknown option %d.\n", uAction); FIXME_(system)("Unknown option %d.\n", uAction);
break; SetLastError(ERROR_INVALID_SPI_VALUE);
return 0;
} }
return 1; return 1;
} }
...@@ -1291,6 +1308,20 @@ BOOL WINAPI SystemParametersInfoW( UINT uAction, UINT uParam, ...@@ -1291,6 +1308,20 @@ BOOL WINAPI SystemParametersInfoW( UINT uAction, UINT uParam,
lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
} }
break; break;
case SPI_GETICONMETRICS: {
LPICONMETRICSW lpIcon = lpvParam;
if(!lpIcon || lpIcon->cbSize != sizeof(*lpIcon))
return FALSE;
SystemParametersInfoW( SPI_ICONHORIZONTALSPACING, 0,
&lpIcon->iHorzSpacing, FALSE );
SystemParametersInfoW( SPI_ICONVERTICALSPACING, 0,
&lpIcon->iVertSpacing, FALSE );
SystemParametersInfoW( SPI_GETICONTITLEWRAP, 0,
&lpIcon->iTitleWrap, FALSE );
SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
&lpIcon->lfFont, FALSE );
break;
}
case SPI_GETNONCLIENTMETRICS: { case SPI_GETNONCLIENTMETRICS: {
/* FIXME: implement correctly */ /* FIXME: implement correctly */
LPNONCLIENTMETRICSW lpnm=(LPNONCLIENTMETRICSW)lpvParam; LPNONCLIENTMETRICSW lpnm=(LPNONCLIENTMETRICSW)lpvParam;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment