Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
e474bfe0
Commit
e474bfe0
authored
15 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
user: Reimplement GetIconInfo16 using the 16-bit icon structure directly.
parent
7e42fd8b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/user.exe16/user.c
+38
-9
38 additions, 9 deletions
dlls/user.exe16/user.c
with
38 additions
and
9 deletions
dlls/user.exe16/user.c
+
38
−
9
View file @
e474bfe0
...
...
@@ -265,6 +265,8 @@ struct cache_entry
static
struct
list
icon_cache
=
LIST_INIT
(
icon_cache
);
static
const
WORD
ICON_HOTSPOT
=
0x4242
;
static
HICON16
alloc_icon_handle
(
unsigned
int
size
)
{
HGLOBAL16
handle
=
GlobalAlloc16
(
GMEM_MOVEABLE
,
size
);
...
...
@@ -2117,15 +2119,43 @@ BOOL16 WINAPI DrawIconEx16(HDC16 hdc, INT16 xLeft, INT16 yTop, HICON16 hIcon,
*/
BOOL16
WINAPI
GetIconInfo16
(
HICON16
hIcon
,
LPICONINFO16
iconinfo
)
{
ICONINFO
ii32
;
BOOL16
ret
=
GetIconInfo
(
HICON_32
(
hIcon
),
&
ii32
);
CURSORICONINFO
*
info
=
get_icon_ptr
(
hIcon
);
INT
height
;
if
(
!
info
)
return
FALSE
;
if
((
info
->
ptHotSpot
.
x
==
ICON_HOTSPOT
)
&&
(
info
->
ptHotSpot
.
y
==
ICON_HOTSPOT
))
{
iconinfo
->
fIcon
=
TRUE
;
iconinfo
->
xHotspot
=
info
->
nWidth
/
2
;
iconinfo
->
yHotspot
=
info
->
nHeight
/
2
;
}
else
{
iconinfo
->
fIcon
=
FALSE
;
iconinfo
->
xHotspot
=
info
->
ptHotSpot
.
x
;
iconinfo
->
yHotspot
=
info
->
ptHotSpot
.
y
;
}
iconinfo
->
fIcon
=
ii32
.
fIcon
;
iconinfo
->
xHotspot
=
ii32
.
xHotspot
;
iconinfo
->
yHotspot
=
ii32
.
yHotspot
;
iconinfo
->
hbmMask
=
HBITMAP_16
(
ii32
.
hbmMask
);
iconinfo
->
hbmColor
=
HBITMAP_16
(
ii32
.
hbmColor
);
return
ret
;
height
=
info
->
nHeight
;
if
(
info
->
bBitsPerPixel
>
1
)
{
iconinfo
->
hbmColor
=
HBITMAP_16
(
CreateBitmap
(
info
->
nWidth
,
info
->
nHeight
,
info
->
bPlanes
,
info
->
bBitsPerPixel
,
(
char
*
)(
info
+
1
)
+
info
->
nHeight
*
get_bitmap_width_bytes
(
info
->
nWidth
,
1
)
));
}
else
{
iconinfo
->
hbmColor
=
0
;
height
*=
2
;
}
iconinfo
->
hbmMask
=
HBITMAP_16
(
CreateBitmap
(
info
->
nWidth
,
height
,
1
,
1
,
info
+
1
));
release_icon_ptr
(
hIcon
,
info
);
return
TRUE
;
}
...
...
@@ -2167,7 +2197,6 @@ HICON16 WINAPI CreateIcon16( HINSTANCE16 hInstance, INT16 nWidth,
INT16
nHeight
,
BYTE
bPlanes
,
BYTE
bBitsPixel
,
LPCVOID
lpANDbits
,
LPCVOID
lpXORbits
)
{
static
const
WORD
ICON_HOTSPOT
=
0x4242
;
CURSORICONINFO
info
;
info
.
ptHotSpot
.
x
=
ICON_HOTSPOT
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment