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
e776f3cc
Commit
e776f3cc
authored
Mar 05, 2011
by
Erich Hoover
Committed by
Alexandre Julliard
Mar 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Implement semi-stub of GetCursorFrameInfo.
parent
7b0ab606
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
5 deletions
+41
-5
cursoricon.c
dlls/user32/cursoricon.c
+39
-4
cursoricon.c
dlls/user32/tests/cursoricon.c
+0
-0
user32.spec
dlls/user32/user32.spec
+1
-1
winuser.h
include/winuser.h
+1
-0
No files found.
dlls/user32/cursoricon.c
View file @
e776f3cc
...
...
@@ -101,7 +101,7 @@ struct cursoricon_object
UINT
height
;
POINT
hotspot
;
UINT
num_frames
;
/* number of frames in the icon/cursor */
UINT
ms_delay
;
/* delay between frames (in millisecond
s) */
UINT
delay
;
/* delay between frames (in jiffie
s) */
struct
cursoricon_frame
frames
[
1
];
/* icon frame information */
};
...
...
@@ -111,6 +111,7 @@ static HICON alloc_icon_handle( UINT num_frames )
FIELD_OFFSET
(
struct
cursoricon_object
,
frames
[
num_frames
]
));
if
(
!
obj
)
return
0
;
obj
->
delay
=
0
;
obj
->
num_frames
=
num_frames
;
return
alloc_user_handle
(
&
obj
->
obj
,
USER_ICON
);
}
...
...
@@ -1027,8 +1028,8 @@ static HCURSOR CURSORICON_CreateIconFromANI( const LPBYTE bits, DWORD bits_size,
info
=
get_icon_ptr
(
cursor
);
info
->
is_icon
=
FALSE
;
/* The .ANI stores the display rate in
1/60s, we store the delay between frames in ms
*/
info
->
ms_delay
=
(
100
*
header
.
display_rate
)
/
6
;
/* The .ANI stores the display rate in
jiffies (1/60s)
*/
info
->
delay
=
header
.
display_rate
;
icon_chunk
=
fram_chunk
.
data
;
icon_data
=
fram_chunk
.
data
+
(
2
*
sizeof
(
DWORD
));
...
...
@@ -1084,7 +1085,7 @@ static HCURSOR CURSORICON_CreateIconFromANI( const LPBYTE bits, DWORD bits_size,
if
(
info
->
frames
[
i
].
alpha
)
DeleteObject
(
info
->
frames
[
i
].
alpha
);
}
info
->
num_frames
=
1
;
info
->
ms_
delay
=
0
;
info
->
delay
=
0
;
}
info
->
width
=
header
.
width
;
info
->
height
=
header
.
height
;
...
...
@@ -1697,6 +1698,40 @@ HICON WINAPI LoadIconA(HINSTANCE hInstance, LPCSTR name)
}
/**********************************************************************
* GetCursorFrameInfo (USER32.@)
*/
HCURSOR
WINAPI
GetCursorFrameInfo
(
HCURSOR
hCursor
,
DWORD
unk1
,
DWORD
rate_index_num
,
DWORD
*
rate_jiffies
,
DWORD
*
is_static
)
{
struct
cursoricon_object
*
ptr
;
HCURSOR
ret
=
0
;
if
(
rate_jiffies
==
NULL
||
is_static
==
NULL
)
return
0
;
if
(
!
(
ptr
=
get_icon_ptr
(
hCursor
)))
return
0
;
FIXME
(
"semi-stub! %p => %d %d %p %p
\n
"
,
hCursor
,
unk1
,
rate_index_num
,
rate_jiffies
,
is_static
);
if
(
ptr
->
num_frames
==
1
||
rate_index_num
==
0
)
{
ret
=
hCursor
;
if
(
ptr
->
num_frames
==
1
)
{
*
rate_jiffies
=
0
;
*
is_static
=
1
;
}
else
{
*
is_static
=
~
0
;
*
rate_jiffies
=
ptr
->
delay
;
}
}
release_icon_ptr
(
hCursor
,
ptr
);
return
ret
;
}
/**********************************************************************
* GetIconInfo (USER32.@)
*/
BOOL
WINAPI
GetIconInfo
(
HICON
hIcon
,
PICONINFO
iconinfo
)
...
...
dlls/user32/tests/cursoricon.c
View file @
e776f3cc
This diff is collapsed.
Click to expand it.
dlls/user32/user32.spec
View file @
e776f3cc
...
...
@@ -272,7 +272,7 @@
@ stdcall GetClipboardViewer()
@ stdcall GetComboBoxInfo(long ptr)
@ stdcall GetCursor()
# @ stub GetCursorFrameInfo
@ stdcall GetCursorFrameInfo(long long long ptr ptr)
@ stdcall GetCursorInfo(ptr)
@ stdcall GetCursorPos(ptr)
@ stdcall GetDC(long)
...
...
include/winuser.h
View file @
e776f3cc
...
...
@@ -4646,6 +4646,7 @@ WINUSERAPI BOOL WINAPI GetClipCursor(LPRECT);
WINUSERAPI
BOOL
WINAPI
GetComboBoxInfo
(
HWND
,
PCOMBOBOXINFO
);
WINUSERAPI
HCURSOR
WINAPI
GetCursor
(
void
);
WINUSERAPI
BOOL
WINAPI
GetCursorInfo
(
PCURSORINFO
);
WINUSERAPI
HCURSOR
WINAPI
GetCursorFrameInfo
(
HCURSOR
,
DWORD
,
DWORD
,
DWORD
*
,
DWORD
*
);
WINUSERAPI
BOOL
WINAPI
GetCursorPos
(
LPPOINT
);
WINUSERAPI
HDC
WINAPI
GetDC
(
HWND
);
WINUSERAPI
HDC
WINAPI
GetDCEx
(
HWND
,
HRGN
,
DWORD
);
...
...
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