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
f2530ca1
Commit
f2530ca1
authored
Feb 23, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Feb 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Move the GiveFeedback handling to a separate function.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bf8e8f56
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
46 deletions
+42
-46
ole2.c
dlls/ole32/ole2.c
+31
-42
ole32res.rc
dlls/ole32/ole32res.rc
+6
-4
olestd.h
dlls/ole32/olestd.h
+5
-0
No files found.
dlls/ole32/ole2.c
View file @
f2530ca1
...
...
@@ -46,6 +46,7 @@
#include "wine/unicode.h"
#include "compobj_private.h"
#include "olestd.h"
#include "wine/list.h"
#include "wine/debug.h"
...
...
@@ -2181,6 +2182,35 @@ static LRESULT WINAPI OLEDD_DragTrackerWindowProc(
return
DefWindowProcW
(
hwnd
,
uMsg
,
wParam
,
lParam
);
}
static
HRESULT
give_feedback
(
TrackerWindowInfo
*
info
)
{
HRESULT
hr
;
int
res
;
HCURSOR
cur
;
if
(
info
->
curDragTarget
==
NULL
)
*
info
->
pdwEffect
=
DROPEFFECT_NONE
;
hr
=
IDropSource_GiveFeedback
(
info
->
dropSource
,
*
info
->
pdwEffect
);
if
(
hr
==
DRAGDROP_S_USEDEFAULTCURSORS
)
{
if
(
*
info
->
pdwEffect
&
DROPEFFECT_MOVE
)
res
=
CURSOR_MOVE
;
else
if
(
*
info
->
pdwEffect
&
DROPEFFECT_COPY
)
res
=
CURSOR_COPY
;
else
if
(
*
info
->
pdwEffect
&
DROPEFFECT_LINK
)
res
=
CURSOR_LINK
;
else
res
=
CURSOR_NODROP
;
cur
=
LoadCursorW
(
hProxyDll
,
MAKEINTRESOURCEW
(
res
)
);
SetCursor
(
cur
);
}
return
hr
;
}
/***
* OLEDD_TrackStateChange()
*
...
...
@@ -2288,48 +2318,7 @@ static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo)
}
}
/*
* Now that we have done that, we have to tell the source to give
* us feedback on the work being done by the target. If we don't
* have a target, simulate no effect.
*/
if
(
trackerInfo
->
curDragTarget
==
0
)
{
*
trackerInfo
->
pdwEffect
=
DROPEFFECT_NONE
;
}
hr
=
IDropSource_GiveFeedback
(
trackerInfo
->
dropSource
,
*
trackerInfo
->
pdwEffect
);
/*
* When we ask for feedback from the drop source, sometimes it will
* do all the necessary work and sometimes it will not handle it
* when that's the case, we must display the standard drag and drop
* cursors.
*/
if
(
hr
==
DRAGDROP_S_USEDEFAULTCURSORS
)
{
HCURSOR
hCur
;
if
(
*
trackerInfo
->
pdwEffect
&
DROPEFFECT_MOVE
)
{
hCur
=
LoadCursorW
(
hProxyDll
,
MAKEINTRESOURCEW
(
2
));
}
else
if
(
*
trackerInfo
->
pdwEffect
&
DROPEFFECT_COPY
)
{
hCur
=
LoadCursorW
(
hProxyDll
,
MAKEINTRESOURCEW
(
3
));
}
else
if
(
*
trackerInfo
->
pdwEffect
&
DROPEFFECT_LINK
)
{
hCur
=
LoadCursorW
(
hProxyDll
,
MAKEINTRESOURCEW
(
4
));
}
else
{
hCur
=
LoadCursorW
(
hProxyDll
,
MAKEINTRESOURCEW
(
1
));
}
SetCursor
(
hCur
);
}
give_feedback
(
trackerInfo
);
/*
* All the return valued will stop the operation except the S_OK
...
...
dlls/ole32/ole32res.rc
View file @
f2530ca1
...
...
@@ -23,6 +23,8 @@
#include "winuser.h"
#include "winnls.h"
#include "olestd.h"
#define WINE_FILENAME_STR "ole32.dll"
#define WINE_EXTRAVALUES VALUE "OLESelfRegister",""
...
...
@@ -37,13 +39,13 @@
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* @makedep: nodrop.cur */
1
CURSOR nodrop.cur
CURSOR_NODROP
CURSOR nodrop.cur
/* @makedep: drag_move.cur */
2
CURSOR drag_move.cur
CURSOR_MOVE
CURSOR drag_move.cur
/* @makedep: drag_copy.cur */
3
CURSOR drag_copy.cur
CURSOR_COPY
CURSOR drag_copy.cur
/* @makedep: drag_link.cur */
4
CURSOR drag_link.cur
CURSOR_LINK
CURSOR drag_link.cur
dlls/ole32/olestd.h
View file @
f2530ca1
...
...
@@ -49,4 +49,9 @@
#define OleStdCopyMetafilePict(hpictin, phpictout) \
(*(phpictout) = OleDuplicateData(hpictin,CF_METAFILEPICT,GHND|GMEM_SHARE))
#define CURSOR_NODROP 1
#define CURSOR_MOVE 2
#define CURSOR_COPY 3
#define CURSOR_LINK 4
#endif
/* __WINE_OLESTD_H_ */
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