Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
57e9244a
Commit
57e9244a
authored
Dec 11, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Move SystemParametersInfo16 to user16.c.
parent
fb202264
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
131 additions
and
145 deletions
+131
-145
sysparams.c
dlls/user32/sysparams.c
+1
-145
user16.c
dlls/user32/user16.c
+130
-0
No files found.
dlls/user32/sysparams.c
View file @
57e9244a
...
...
@@ -34,7 +34,7 @@
#include "winnls.h"
#include "wingdi.h"
#include "winreg.h"
#include "wine/win
user
16.h"
#include "wine/win
gdi
16.h"
#include "winerror.h"
#include "controls.h"
...
...
@@ -387,25 +387,6 @@ HBRUSH SYSCOLOR_55AABrush = 0;
extern
void
CDECL
__wine_make_gdi_object_system
(
HGDIOBJ
handle
,
BOOL
set
);
/* This function is a copy of the one in objects/font.c */
static
void
SYSPARAMS_LogFont32ATo16
(
const
LOGFONTA
*
font32
,
LPLOGFONT16
font16
)
{
font16
->
lfHeight
=
font32
->
lfHeight
;
font16
->
lfWidth
=
font32
->
lfWidth
;
font16
->
lfEscapement
=
font32
->
lfEscapement
;
font16
->
lfOrientation
=
font32
->
lfOrientation
;
font16
->
lfWeight
=
font32
->
lfWeight
;
font16
->
lfItalic
=
font32
->
lfItalic
;
font16
->
lfUnderline
=
font32
->
lfUnderline
;
font16
->
lfStrikeOut
=
font32
->
lfStrikeOut
;
font16
->
lfCharSet
=
font32
->
lfCharSet
;
font16
->
lfOutPrecision
=
font32
->
lfOutPrecision
;
font16
->
lfClipPrecision
=
font32
->
lfClipPrecision
;
font16
->
lfQuality
=
font32
->
lfQuality
;
font16
->
lfPitchAndFamily
=
font32
->
lfPitchAndFamily
;
lstrcpynA
(
font16
->
lfFaceName
,
font32
->
lfFaceName
,
LF_FACESIZE
);
}
static
void
SYSPARAMS_LogFont16To32W
(
const
LOGFONT16
*
font16
,
LPLOGFONTW
font32
)
{
font32
->
lfHeight
=
font16
->
lfHeight
;
...
...
@@ -463,24 +444,6 @@ static void SYSPARAMS_LogFont32ATo32W( const LOGFONTA* font32A, LPLOGFONTW font3
font32W
->
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
}
static
void
SYSPARAMS_NonClientMetrics32ATo16
(
const
NONCLIENTMETRICSA
*
lpnm32
,
LPNONCLIENTMETRICS16
lpnm16
)
{
lpnm16
->
iBorderWidth
=
lpnm32
->
iBorderWidth
;
lpnm16
->
iScrollWidth
=
lpnm32
->
iScrollWidth
;
lpnm16
->
iScrollHeight
=
lpnm32
->
iScrollHeight
;
lpnm16
->
iCaptionWidth
=
lpnm32
->
iCaptionWidth
;
lpnm16
->
iCaptionHeight
=
lpnm32
->
iCaptionHeight
;
SYSPARAMS_LogFont32ATo16
(
&
lpnm32
->
lfCaptionFont
,
&
lpnm16
->
lfCaptionFont
);
lpnm16
->
iSmCaptionWidth
=
lpnm32
->
iSmCaptionWidth
;
lpnm16
->
iSmCaptionHeight
=
lpnm32
->
iSmCaptionHeight
;
SYSPARAMS_LogFont32ATo16
(
&
lpnm32
->
lfSmCaptionFont
,
&
lpnm16
->
lfSmCaptionFont
);
lpnm16
->
iMenuWidth
=
lpnm32
->
iMenuWidth
;
lpnm16
->
iMenuHeight
=
lpnm32
->
iMenuHeight
;
SYSPARAMS_LogFont32ATo16
(
&
lpnm32
->
lfMenuFont
,
&
lpnm16
->
lfMenuFont
);
SYSPARAMS_LogFont32ATo16
(
&
lpnm32
->
lfStatusFont
,
&
lpnm16
->
lfStatusFont
);
SYSPARAMS_LogFont32ATo16
(
&
lpnm32
->
lfMessageFont
,
&
lpnm16
->
lfMessageFont
);
}
static
void
SYSPARAMS_NonClientMetrics32WTo32A
(
const
NONCLIENTMETRICSW
*
lpnm32W
,
LPNONCLIENTMETRICSA
lpnm32A
)
{
lpnm32A
->
iBorderWidth
=
lpnm32W
->
iBorderWidth
;
...
...
@@ -2528,113 +2491,6 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
/***********************************************************************
* SystemParametersInfo (USER.483)
*/
BOOL16
WINAPI
SystemParametersInfo16
(
UINT16
uAction
,
UINT16
uParam
,
LPVOID
lpvParam
,
UINT16
fuWinIni
)
{
BOOL16
ret
;
TRACE
(
"(%u, %u, %p, %u)
\n
"
,
uAction
,
uParam
,
lpvParam
,
fuWinIni
);
switch
(
uAction
)
{
case
SPI_GETBEEP
:
/* 1 */
case
SPI_GETSCREENSAVEACTIVE
:
/* 16 */
case
SPI_GETICONTITLEWRAP
:
/* 25 */
case
SPI_GETMENUDROPALIGNMENT
:
/* 27 */
case
SPI_GETFASTTASKSWITCH
:
/* 35 */
case
SPI_GETDRAGFULLWINDOWS
:
/* 38 WINVER >= 0x0400 */
{
BOOL
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
*
(
BOOL16
*
)
lpvParam
=
tmp
;
break
;
}
case
SPI_GETBORDER
:
/* 5 */
case
SPI_ICONHORIZONTALSPACING
:
/* 13 */
case
SPI_GETSCREENSAVETIMEOUT
:
/* 14 */
case
SPI_GETGRIDGRANULARITY
:
/* 18 */
case
SPI_GETKEYBOARDDELAY
:
/* 22 */
case
SPI_ICONVERTICALSPACING
:
/* 24 */
{
INT
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
*
(
INT16
*
)
lpvParam
=
tmp
;
break
;
}
case
SPI_GETKEYBOARDSPEED
:
/* 10 */
{
DWORD
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
*
(
WORD
*
)
lpvParam
=
tmp
;
break
;
}
case
SPI_GETICONTITLELOGFONT
:
/* 31 */
{
LOGFONTA
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
SYSPARAMS_LogFont32ATo16
(
&
tmp
,
(
LPLOGFONT16
)
lpvParam
);
break
;
}
case
SPI_GETNONCLIENTMETRICS
:
/* 41 WINVER >= 0x400 */
{
NONCLIENTMETRICSA
tmp
;
LPNONCLIENTMETRICS16
lpnm16
=
(
LPNONCLIENTMETRICS16
)
lpvParam
;
if
(
lpnm16
&&
lpnm16
->
cbSize
==
sizeof
(
NONCLIENTMETRICS16
))
{
tmp
.
cbSize
=
sizeof
(
NONCLIENTMETRICSA
);
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
&
tmp
,
fuWinIni
);
if
(
ret
)
SYSPARAMS_NonClientMetrics32ATo16
(
&
tmp
,
lpnm16
);
}
else
/* winfile 95 sets cbSize to 340 */
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
,
fuWinIni
);
break
;
}
case
SPI_GETWORKAREA
:
/* 48 WINVER >= 0x400 */
{
RECT
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
{
RECT16
*
r16
=
lpvParam
;
r16
->
left
=
tmp
.
left
;
r16
->
top
=
tmp
.
top
;
r16
->
right
=
tmp
.
right
;
r16
->
bottom
=
tmp
.
bottom
;
}
break
;
}
case
SPI_GETMOUSEHOVERWIDTH
:
/* 98 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
case
SPI_GETMOUSEHOVERHEIGHT
:
/* 100 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
case
SPI_GETMOUSEHOVERTIME
:
/* 102 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
{
UINT
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
*
(
UINT16
*
)
lpvParam
=
tmp
;
break
;
}
default:
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
,
fuWinIni
);
}
return
ret
;
}
/***********************************************************************
* SystemParametersInfoA (USER32.@)
*/
BOOL
WINAPI
SystemParametersInfoA
(
UINT
uiAction
,
UINT
uiParam
,
...
...
dlls/user32/user16.c
View file @
57e9244a
...
...
@@ -113,6 +113,24 @@ static BOOL CALLBACK draw_state_callback( HDC hdc, LPARAM lparam, WPARAM wparam,
return
LOWORD
(
ret
);
}
/* This function is a copy of the one in objects/font.c */
static
void
logfont_32_to_16
(
const
LOGFONTA
*
font32
,
LPLOGFONT16
font16
)
{
font16
->
lfHeight
=
font32
->
lfHeight
;
font16
->
lfWidth
=
font32
->
lfWidth
;
font16
->
lfEscapement
=
font32
->
lfEscapement
;
font16
->
lfOrientation
=
font32
->
lfOrientation
;
font16
->
lfWeight
=
font32
->
lfWeight
;
font16
->
lfItalic
=
font32
->
lfItalic
;
font16
->
lfUnderline
=
font32
->
lfUnderline
;
font16
->
lfStrikeOut
=
font32
->
lfStrikeOut
;
font16
->
lfCharSet
=
font32
->
lfCharSet
;
font16
->
lfOutPrecision
=
font32
->
lfOutPrecision
;
font16
->
lfClipPrecision
=
font32
->
lfClipPrecision
;
font16
->
lfQuality
=
font32
->
lfQuality
;
font16
->
lfPitchAndFamily
=
font32
->
lfPitchAndFamily
;
lstrcpynA
(
font16
->
lfFaceName
,
font32
->
lfFaceName
,
LF_FACESIZE
);
}
/**********************************************************************
* InitApp (USER.5)
...
...
@@ -1909,6 +1927,118 @@ INT16 WINAPI GetKeyboardLayoutName16( LPSTR name )
/***********************************************************************
* SystemParametersInfo (USER.483)
*/
BOOL16
WINAPI
SystemParametersInfo16
(
UINT16
uAction
,
UINT16
uParam
,
LPVOID
lpvParam
,
UINT16
fuWinIni
)
{
BOOL16
ret
;
TRACE
(
"(%u, %u, %p, %u)
\n
"
,
uAction
,
uParam
,
lpvParam
,
fuWinIni
);
switch
(
uAction
)
{
case
SPI_GETBEEP
:
case
SPI_GETSCREENSAVEACTIVE
:
case
SPI_GETICONTITLEWRAP
:
case
SPI_GETMENUDROPALIGNMENT
:
case
SPI_GETFASTTASKSWITCH
:
case
SPI_GETDRAGFULLWINDOWS
:
{
BOOL
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
*
(
BOOL16
*
)
lpvParam
=
tmp
;
break
;
}
case
SPI_GETBORDER
:
case
SPI_ICONHORIZONTALSPACING
:
case
SPI_GETSCREENSAVETIMEOUT
:
case
SPI_GETGRIDGRANULARITY
:
case
SPI_GETKEYBOARDDELAY
:
case
SPI_ICONVERTICALSPACING
:
{
INT
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
*
(
INT16
*
)
lpvParam
=
tmp
;
break
;
}
case
SPI_GETKEYBOARDSPEED
:
case
SPI_GETMOUSEHOVERWIDTH
:
case
SPI_GETMOUSEHOVERHEIGHT
:
case
SPI_GETMOUSEHOVERTIME
:
{
DWORD
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
*
(
WORD
*
)
lpvParam
=
tmp
;
break
;
}
case
SPI_GETICONTITLELOGFONT
:
{
LOGFONTA
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
logfont_32_to_16
(
&
tmp
,
(
LPLOGFONT16
)
lpvParam
);
break
;
}
case
SPI_GETNONCLIENTMETRICS
:
{
NONCLIENTMETRICSA
tmp
;
LPNONCLIENTMETRICS16
lpnm16
=
(
LPNONCLIENTMETRICS16
)
lpvParam
;
if
(
lpnm16
&&
lpnm16
->
cbSize
==
sizeof
(
NONCLIENTMETRICS16
))
{
tmp
.
cbSize
=
sizeof
(
NONCLIENTMETRICSA
);
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
&
tmp
,
fuWinIni
);
if
(
ret
)
{
lpnm16
->
iBorderWidth
=
tmp
.
iBorderWidth
;
lpnm16
->
iScrollWidth
=
tmp
.
iScrollWidth
;
lpnm16
->
iScrollHeight
=
tmp
.
iScrollHeight
;
lpnm16
->
iCaptionWidth
=
tmp
.
iCaptionWidth
;
lpnm16
->
iCaptionHeight
=
tmp
.
iCaptionHeight
;
lpnm16
->
iSmCaptionWidth
=
tmp
.
iSmCaptionWidth
;
lpnm16
->
iSmCaptionHeight
=
tmp
.
iSmCaptionHeight
;
lpnm16
->
iMenuWidth
=
tmp
.
iMenuWidth
;
lpnm16
->
iMenuHeight
=
tmp
.
iMenuHeight
;
logfont_32_to_16
(
&
tmp
.
lfCaptionFont
,
&
lpnm16
->
lfCaptionFont
);
logfont_32_to_16
(
&
tmp
.
lfSmCaptionFont
,
&
lpnm16
->
lfSmCaptionFont
);
logfont_32_to_16
(
&
tmp
.
lfMenuFont
,
&
lpnm16
->
lfMenuFont
);
logfont_32_to_16
(
&
tmp
.
lfStatusFont
,
&
lpnm16
->
lfStatusFont
);
logfont_32_to_16
(
&
tmp
.
lfMessageFont
,
&
lpnm16
->
lfMessageFont
);
}
}
else
/* winfile 95 sets cbSize to 340 */
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
,
fuWinIni
);
break
;
}
case
SPI_GETWORKAREA
:
{
RECT
tmp
;
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
lpvParam
)
{
RECT16
*
r16
=
lpvParam
;
r16
->
left
=
tmp
.
left
;
r16
->
top
=
tmp
.
top
;
r16
->
right
=
tmp
.
right
;
r16
->
bottom
=
tmp
.
bottom
;
}
break
;
}
default:
ret
=
SystemParametersInfoA
(
uAction
,
uParam
,
lpvParam
,
fuWinIni
);
break
;
}
return
ret
;
}
/***********************************************************************
* FormatMessage (USER.606)
*/
DWORD
WINAPI
FormatMessage16
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment