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
1d1f8e2a
Commit
1d1f8e2a
authored
Dec 22, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Move DestroyIcon32 implementation to user16.c.
parent
ff04a5e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
52 deletions
+50
-52
cursoricon.c
dlls/user32/cursoricon.c
+11
-46
user16.c
dlls/user32/user16.c
+39
-1
user32.spec
dlls/user32/user32.spec
+0
-5
No files found.
dlls/user32/cursoricon.c
View file @
1d1f8e2a
...
...
@@ -84,10 +84,6 @@ typedef struct
#include "poppack.h"
#define CID_RESOURCE 0x0001
#define CID_WIN32 0x0004
#define CID_NONSHARED 0x0008
static
RECT
CURSOR_ClipRect
;
/* Cursor clipping rect */
static
HDC
screen_dc
;
...
...
@@ -1470,52 +1466,16 @@ HICON WINAPI CopyIcon( HICON hIcon )
}
/**********************************************************************
* DestroyIcon32 (USER.610)
*
* This routine is actually exported from Win95 USER under the name
* DestroyIcon32 ... The behaviour implemented here should mimic
* the Win95 one exactly, especially the return values, which
* depend on the setting of various flags.
*/
WORD
WINAPI
DestroyIcon32
(
HGLOBAL16
handle
,
UINT16
flags
)
{
WORD
retv
;
TRACE_
(
icon
)(
"(%04x, %04x)
\n
"
,
handle
,
flags
);
/* Check whether destroying active cursor */
if
(
get_user_thread_info
()
->
cursor
==
HICON_32
(
handle
)
)
{
WARN_
(
cursor
)(
"Destroying active cursor!
\n
"
);
return
FALSE
;
}
/* Try shared cursor/icon first */
if
(
!
(
flags
&
CID_NONSHARED
)
)
{
INT
count
=
CURSORICON_DelSharedIcon
(
HICON_32
(
handle
));
if
(
count
!=
-
1
)
return
(
flags
&
CID_WIN32
)
?
TRUE
:
(
count
==
0
);
/* FIXME: OEM cursors/icons should be recognized */
}
/* Now assume non-shared cursor/icon */
retv
=
GlobalFree16
(
handle
);
return
(
flags
&
CID_RESOURCE
)
?
retv
:
TRUE
;
}
/***********************************************************************
* DestroyIcon (USER32.@)
*/
BOOL
WINAPI
DestroyIcon
(
HICON
hIcon
)
{
return
DestroyIcon32
(
HICON_16
(
hIcon
),
CID_WIN32
);
TRACE_
(
icon
)(
"%p
\n
"
,
hIcon
);
if
(
CURSORICON_DelSharedIcon
(
hIcon
)
==
-
1
)
GlobalFree16
(
HICON_16
(
hIcon
)
);
return
TRUE
;
}
...
...
@@ -1524,7 +1484,12 @@ BOOL WINAPI DestroyIcon( HICON hIcon )
*/
BOOL
WINAPI
DestroyCursor
(
HCURSOR
hCursor
)
{
return
DestroyIcon32
(
HCURSOR_16
(
hCursor
),
CID_WIN32
);
if
(
get_user_thread_info
()
->
cursor
==
hCursor
)
{
WARN_
(
cursor
)(
"Destroying active cursor!
\n
"
);
return
FALSE
;
}
return
DestroyIcon
(
hCursor
);
}
/***********************************************************************
...
...
dlls/user32/user16.c
View file @
1d1f8e2a
...
...
@@ -55,7 +55,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(user);
#define USUD_LOCALHEAP 0x0004
#define USUD_FIRSTCLASS 0x0005
WORD
WINAPI
DestroyIcon32
(
HGLOBAL16
,
UINT16
);
#define CID_RESOURCE 0x0001
#define CID_WIN32 0x0004
#define CID_NONSHARED 0x0008
WORD
USER_HeapSel
=
0
;
/* USER heap selector */
...
...
@@ -2854,6 +2856,42 @@ DWORD WINAPI FormatMessage16(
#undef ADD_TO_T
/**********************************************************************
* DestroyIcon32 (USER.610)
*
* This routine is actually exported from Win95 USER under the name
* DestroyIcon32 ... The behaviour implemented here should mimic
* the Win95 one exactly, especially the return values, which
* depend on the setting of various flags.
*/
WORD
WINAPI
DestroyIcon32
(
HGLOBAL16
handle
,
UINT16
flags
)
{
WORD
retv
;
/* Check whether destroying active cursor */
if
(
GetCursor16
()
==
handle
)
{
WARN
(
"Destroying active cursor!
\n
"
);
return
FALSE
;
}
/* Try shared cursor/icon first */
if
(
!
(
flags
&
CID_NONSHARED
))
{
INT
count
=
release_shared_icon
(
handle
);
if
(
count
!=
-
1
)
return
(
flags
&
CID_WIN32
)
?
TRUE
:
(
count
==
0
);
}
/* Now assume non-shared cursor/icon */
retv
=
GlobalFree16
(
handle
);
return
(
flags
&
CID_RESOURCE
)
?
retv
:
TRUE
;
}
/***********************************************************************
* ChangeDisplaySettings (USER.620)
*/
...
...
dlls/user32/user32.spec
View file @
1d1f8e2a
...
...
@@ -772,11 +772,6 @@
@ stdcall wvsprintfW(ptr wstr ptr)
################################################################
# Wine extensions: Win16 functions that are needed by other dlls
#
@ stdcall DestroyIcon32(long long)
################################################################
# Wine dll separation hacks, these will go away, don't use them
#
@ cdecl HOOK_CallHooks(long long long long long)
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