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
d3de0c26
Commit
d3de0c26
authored
Oct 08, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Implemented GetIconInfoExA/W.
parent
beba1f15
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
9 deletions
+95
-9
cursoricon.c
dlls/user32/cursoricon.c
+62
-9
user32.spec
dlls/user32/user32.spec
+2
-0
winuser.h
include/winuser.h
+31
-0
No files found.
dlls/user32/cursoricon.c
View file @
d3de0c26
...
...
@@ -1866,19 +1866,72 @@ HICON WINAPI LoadIconA(HINSTANCE hInstance, LPCSTR name)
*/
BOOL
WINAPI
GetIconInfo
(
HICON
hIcon
,
PICONINFO
iconinfo
)
{
struct
cursoricon_object
*
ptr
;
ICONINFOEXW
infoW
;
infoW
.
cbSize
=
sizeof
(
infoW
);
if
(
!
GetIconInfoExW
(
hIcon
,
&
infoW
))
return
FALSE
;
iconinfo
->
fIcon
=
infoW
.
fIcon
;
iconinfo
->
xHotspot
=
infoW
.
xHotspot
;
iconinfo
->
yHotspot
=
infoW
.
yHotspot
;
iconinfo
->
hbmColor
=
infoW
.
hbmColor
;
iconinfo
->
hbmMask
=
infoW
.
hbmMask
;
return
TRUE
;
}
if
(
!
(
ptr
=
get_icon_ptr
(
hIcon
)))
return
FALSE
;
/**********************************************************************
* GetIconInfoExA (USER32.@)
*/
BOOL
WINAPI
GetIconInfoExA
(
HICON
icon
,
ICONINFOEXA
*
info
)
{
ICONINFOEXW
infoW
;
TRACE
(
"%p => %dx%d
\n
"
,
hIcon
,
ptr
->
width
,
ptr
->
height
);
if
(
info
->
cbSize
!=
sizeof
(
*
info
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
infoW
.
cbSize
=
sizeof
(
infoW
);
if
(
!
GetIconInfoExW
(
icon
,
&
infoW
))
return
FALSE
;
info
->
fIcon
=
infoW
.
fIcon
;
info
->
xHotspot
=
infoW
.
xHotspot
;
info
->
yHotspot
=
infoW
.
yHotspot
;
info
->
hbmColor
=
infoW
.
hbmColor
;
info
->
hbmMask
=
infoW
.
hbmMask
;
info
->
wResID
=
infoW
.
wResID
;
WideCharToMultiByte
(
CP_ACP
,
0
,
infoW
.
szModName
,
-
1
,
info
->
szModName
,
MAX_PATH
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
infoW
.
szResName
,
-
1
,
info
->
szResName
,
MAX_PATH
,
NULL
,
NULL
);
return
TRUE
;
}
iconinfo
->
fIcon
=
ptr
->
is_icon
;
iconinfo
->
xHotspot
=
ptr
->
hotspot
.
x
;
iconinfo
->
yHotspot
=
ptr
->
hotspot
.
y
;
iconinfo
->
hbmColor
=
copy_bitmap
(
ptr
->
frames
[
0
].
color
);
iconinfo
->
hbmMask
=
copy_bitmap
(
ptr
->
frames
[
0
].
mask
);
release_icon_ptr
(
hIcon
,
ptr
);
/**********************************************************************
* GetIconInfoExW (USER32.@)
*/
BOOL
WINAPI
GetIconInfoExW
(
HICON
icon
,
ICONINFOEXW
*
info
)
{
struct
cursoricon_object
*
ptr
;
if
(
info
->
cbSize
!=
sizeof
(
*
info
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
(
ptr
=
get_icon_ptr
(
icon
)))
{
SetLastError
(
ERROR_INVALID_CURSOR_HANDLE
);
return
FALSE
;
}
TRACE
(
"%p => %dx%d
\n
"
,
icon
,
ptr
->
width
,
ptr
->
height
);
info
->
fIcon
=
ptr
->
is_icon
;
info
->
xHotspot
=
ptr
->
hotspot
.
x
;
info
->
yHotspot
=
ptr
->
hotspot
.
y
;
info
->
hbmColor
=
copy_bitmap
(
ptr
->
frames
[
0
].
color
);
info
->
hbmMask
=
copy_bitmap
(
ptr
->
frames
[
0
].
mask
);
info
->
wResID
=
0
;
/* FIXME */
info
->
szModName
[
0
]
=
0
;
/* FIXME */
info
->
szResName
[
0
]
=
0
;
/* FIXME */
release_icon_ptr
(
icon
,
ptr
);
return
TRUE
;
}
...
...
dlls/user32/user32.spec
View file @
d3de0c26
...
...
@@ -290,6 +290,8 @@
@ stdcall GetGUIThreadInfo(long ptr)
@ stdcall GetGuiResources(long long)
@ stdcall GetIconInfo(long ptr)
@ stdcall GetIconInfoExA(long ptr)
@ stdcall GetIconInfoExW(long ptr)
@ stub GetInputDesktop
@ stdcall GetInputState()
@ stdcall GetInternalWindowPos(long ptr ptr)
...
...
include/winuser.h
View file @
d3de0c26
...
...
@@ -2107,6 +2107,34 @@ typedef struct _ICONINFO {
HBITMAP
hbmColor
;
}
ICONINFO
,
*
PICONINFO
;
typedef
struct
_ICONINFOEXA
{
DWORD
cbSize
;
BOOL
fIcon
;
DWORD
xHotspot
;
DWORD
yHotspot
;
HBITMAP
hbmMask
;
HBITMAP
hbmColor
;
WORD
wResID
;
CHAR
szModName
[
MAX_PATH
];
CHAR
szResName
[
MAX_PATH
];
}
ICONINFOEXA
,
*
PICONINFOEXA
;
typedef
struct
_ICONINFOEXW
{
DWORD
cbSize
;
BOOL
fIcon
;
DWORD
xHotspot
;
DWORD
yHotspot
;
HBITMAP
hbmMask
;
HBITMAP
hbmColor
;
WORD
wResID
;
WCHAR
szModName
[
MAX_PATH
];
WCHAR
szResName
[
MAX_PATH
];
}
ICONINFOEXW
,
*
PICONINFOEXW
;
DECL_WINELIB_TYPE_AW
(
ICONINFOEX
);
DECL_WINELIB_TYPE_AW
(
PICONINFOEX
);
typedef
struct
tagCURSORINFO
{
...
...
@@ -4633,6 +4661,9 @@ WINUSERAPI HWND WINAPI GetFocus(void);
WINUSERAPI
HWND
WINAPI
GetForegroundWindow
(
void
);
WINUSERAPI
BOOL
WINAPI
GetGUIThreadInfo
(
DWORD
,
GUITHREADINFO
*
);
WINUSERAPI
BOOL
WINAPI
GetIconInfo
(
HICON
,
PICONINFO
);
WINUSERAPI
BOOL
WINAPI
GetIconInfoExA
(
HICON
,
ICONINFOEXA
*
);
WINUSERAPI
BOOL
WINAPI
GetIconInfoExW
(
HICON
,
ICONINFOEXW
*
);
#define GetIconInfoEx WINELIB_NAME_AW(GetIconInfoEx)
WINUSERAPI
BOOL
WINAPI
GetInputState
(
void
);
WINUSERAPI
UINT
WINAPI
GetInternalWindowPos
(
HWND
,
LPRECT
,
LPPOINT
);
WINUSERAPI
UINT
WINAPI
GetKBCodePage
(
void
);
...
...
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