Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
67fab90d
Commit
67fab90d
authored
Nov 09, 2001
by
Andriy Palamarchuk
Committed by
Alexandre Julliard
Nov 09, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented SPI_ICONHORIZONTALSPACING, SPI_ICONVERTICALSPACING system
parameters processing.
parent
a5bb38e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
16 deletions
+88
-16
sysmetrics.c
windows/sysmetrics.c
+9
-5
sysparams.c
windows/sysparams.c
+79
-11
No files found.
windows/sysmetrics.c
View file @
67fab90d
...
...
@@ -184,10 +184,14 @@ void SYSMETRICS_Init(void)
(
GetProfileIntA
(
"Windows"
,
"DoubleClickWidth"
,
4
)
+
1
)
&
~
1
;
sysMetrics
[
SM_CYDOUBLECLK
]
=
(
GetProfileIntA
(
"Windows"
,
"DoubleClickHeight"
,
4
)
+
1
)
&
~
1
;
sysMetrics
[
SM_CXICONSPACING
]
=
GetProfileIntA
(
"Desktop"
,
"IconSpacing"
,
75
);
sysMetrics
[
SM_CYICONSPACING
]
=
GetProfileIntA
(
"Desktop"
,
"IconVerticalSpacing"
,
75
);
sysMetrics
[
SM_CXICONSPACING
]
=
75
;
SystemParametersInfoA
(
SPI_ICONHORIZONTALSPACING
,
0
,
&
sysMetrics
[
SM_CXICONSPACING
],
0
);
sysMetrics
[
SM_CYICONSPACING
]
=
75
;
SystemParametersInfoA
(
SPI_ICONVERTICALSPACING
,
0
,
&
sysMetrics
[
SM_CYICONSPACING
],
0
);
sysMetrics
[
SM_MENUDROPALIGNMENT
]
=
GetProfileIntA
(
"Windows"
,
"MenuDropAlignment"
,
0
);
sysMetrics
[
SM_PENWINDOWS
]
=
0
;
...
...
@@ -249,7 +253,7 @@ void SYSMETRICS_Init(void)
sysMetrics
[
SM_SAMEDISPLAYFORMAT
]
=
1
;
sysMetrics
[
SM_CMETRICS
]
=
SM_CMETRICS
;
SystemParametersInfoA
(
SPI_GETSHOWSOUNDS
,
0
,
&
sysMetrics
[
SM_SHOWSOUNDS
],
FALSE
);
SystemParametersInfoA
(
SPI_GETSHOWSOUNDS
,
0
,
&
sysMetrics
[
SM_SHOWSOUNDS
],
0
);
if
(
hkey
)
RegCloseKey
(
hkey
);
DeleteDC
(
hdc
);
...
...
windows/sysparams.c
View file @
67fab90d
...
...
@@ -27,7 +27,9 @@ DEFAULT_DEBUG_CHANNEL(system);
/* System parameter indexes */
#define SPI_SETBEEP_IDX 0
#define SPI_SETBORDER_IDX 1
#define SPI_SETSHOWSOUNDS_IDX 2
#define SPI_ICONHORIZONTALSPACING_IDX 2
#define SPI_ICONVERTICALSPACING_IDX 3
#define SPI_SETSHOWSOUNDS_IDX 4
#define SPI_WINE_IDX SPI_SETSHOWSOUNDS_IDX
/**
...
...
@@ -39,10 +41,14 @@ DEFAULT_DEBUG_CHANNEL(system);
*/
#define SPI_SETBEEP_REGKEY "Control Panel\\Sound"
#define SPI_SETBEEP_VALNAME "Beep"
#define SPI_SETSHOWSOUNDS_REGKEY "Control Panel\\Accessibility\\ShowSounds"
#define SPI_SETSHOWSOUNDS_VALNAME "On"
#define SPI_SETBORDER_REGKEY "Control Panel\\Desktop"
#define SPI_SETBORDER_VALNAME "BorderWidth"
#define SPI_ICONHORIZONTALSPACING_REGKEY "Control Panel\\Desktop"
#define SPI_ICONHORIZONTALSPACING_VALNAME "IconSpacing"
#define SPI_ICONVERTICALSPACING_REGKEY "Control Panel\\Desktop"
#define SPI_ICONVERTICALSPACING_VALNAME "IconVerticalSpacing"
#define SPI_SETSHOWSOUNDS_REGKEY "Control Panel\\Accessibility\\ShowSounds"
#define SPI_SETSHOWSOUNDS_VALNAME "On"
/* volatile registry branch under CURRENT_USER_REGKEY for temporary values storage */
#define WINE_CURRENT_USER_REGKEY "Wine"
...
...
@@ -184,6 +190,8 @@ void SYSPARAMS_Reset( UINT uiAction )
memset
(
spi_loaded
,
0
,
sizeof
(
spi_loaded
)
);
WINE_RELOAD_SPI
(
SPI_SETBORDER
);
WINE_RELOAD_SPI
(
SPI_ICONHORIZONTALSPACING
);
WINE_RELOAD_SPI
(
SPI_ICONVERTICALSPACING
);
WINE_RELOAD_SPI
(
SPI_SETSHOWSOUNDS
);
default:
...
...
@@ -447,11 +455,41 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
WINE_SPI_WARN
(
SPI_LANGDRIVER
);
/* 12 */
case
SPI_ICONHORIZONTALSPACING
:
/* 13 */
/* FIXME Get/SetProfileInt */
if
(
pvParam
==
NULL
)
/*SetSystemMetrics( SM_CXICONSPACING, uiParam )*/
;
spi_idx
=
SPI_ICONHORIZONTALSPACING_IDX
;
if
(
pvParam
!=
NULL
)
{
if
(
!
spi_loaded
[
spi_idx
])
{
char
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_ICONHORIZONTALSPACING_REGKEY
,
SPI_ICONHORIZONTALSPACING_VALNAME
,
buf
))
{
SYSMETRICS_Set
(
SM_CXICONSPACING
,
atoi
(
buf
)
);
}
spi_loaded
[
spi_idx
]
=
TRUE
;
}
*
(
INT
*
)
pvParam
=
GetSystemMetrics
(
SM_CXICONSPACING
);
}
else
*
(
INT
*
)
pvParam
=
GetSystemMetrics
(
SM_CXICONSPACING
);
{
char
buf
[
10
];
if
(
uiParam
<
32
)
uiParam
=
32
;
sprintf
(
buf
,
"%u"
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_ICONHORIZONTALSPACING_REGKEY
,
SPI_ICONHORIZONTALSPACING_VALNAME
,
buf
,
fWinIni
))
{
SYSMETRICS_Set
(
SM_CXICONSPACING
,
uiParam
);
spi_loaded
[
spi_idx
]
=
TRUE
;
}
else
ret
=
FALSE
;
}
break
;
case
SPI_GETSCREENSAVETIMEOUT
:
/* 14 */
...
...
@@ -506,11 +544,41 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
WINE_SPI_WARN
(
SPI_SETKEYBOARDDELAY
);
/* 23 */
case
SPI_ICONVERTICALSPACING
:
/* 24 */
/* FIXME Get/SetProfileInt */
if
(
pvParam
==
NULL
)
/*SetSystemMetrics( SM_CYICONSPACING, uiParam )*/
;
spi_idx
=
SPI_ICONVERTICALSPACING_IDX
;
if
(
pvParam
!=
NULL
)
{
if
(
!
spi_loaded
[
spi_idx
])
{
char
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_ICONVERTICALSPACING_REGKEY
,
SPI_ICONVERTICALSPACING_VALNAME
,
buf
))
{
SYSMETRICS_Set
(
SM_CYICONSPACING
,
atoi
(
buf
)
);
}
spi_loaded
[
spi_idx
]
=
TRUE
;
}
*
(
INT
*
)
pvParam
=
GetSystemMetrics
(
SM_CYICONSPACING
);
}
else
*
(
INT
*
)
pvParam
=
GetSystemMetrics
(
SM_CYICONSPACING
);
{
char
buf
[
10
];
if
(
uiParam
<
32
)
uiParam
=
32
;
sprintf
(
buf
,
"%u"
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_ICONVERTICALSPACING_REGKEY
,
SPI_ICONVERTICALSPACING_VALNAME
,
buf
,
fWinIni
))
{
SYSMETRICS_Set
(
SM_CYICONSPACING
,
uiParam
);
spi_loaded
[
spi_idx
]
=
TRUE
;
}
else
ret
=
FALSE
;
}
break
;
case
SPI_GETICONTITLEWRAP
:
/* 25 */
...
...
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