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
60e17529
Commit
60e17529
authored
Sep 25, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use documented DROPFILES structure instead of internal DROPFILESTRUCT.
parent
d8fab2e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
89 deletions
+56
-89
clipboard.c
dlls/shell32/clipboard.c
+6
-7
shell.c
dlls/shell32/shell.c
+8
-1
shellole.c
dlls/shell32/shellole.c
+12
-18
event.c
windows/x11drv/event.c
+30
-63
No files found.
dlls/shell32/clipboard.c
View file @
60e17529
...
...
@@ -26,7 +26,6 @@
#include "pidl.h"
#include "wine/undocshell.h"
#include "shell32_main.h"
#include "shell.h"
/* DROPFILESTRUCT */
DEFAULT_DEBUG_CHANNEL
(
shell
)
...
...
@@ -96,13 +95,13 @@ HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
char
szRootPath
[
MAX_PATH
];
char
szFileName
[
MAX_PATH
];
HGLOBAL
hGlobal
;
LPDROPFILESTRUCT
pDropFiles
;
DROPFILES
*
pDropFiles
;
int
offset
;
TRACE
(
"(%p,%p,%u)
\n
"
,
pidlRoot
,
apidl
,
cidl
);
/* get the size needed */
size
=
sizeof
(
DROPFILES
TRUCT
);
size
=
sizeof
(
DROPFILES
);
SHGetPathFromIDListA
(
pidlRoot
,
szRootPath
);
PathAddBackslashA
(
szRootPath
);
...
...
@@ -120,11 +119,11 @@ HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
hGlobal
=
GlobalAlloc
(
GHND
|
GMEM_SHARE
,
size
);
if
(
!
hGlobal
)
return
hGlobal
;
pDropFiles
=
(
LPDROPFILESTRUCT
)
GlobalLock
(
hGlobal
);
pDropFiles
->
lSize
=
sizeof
(
DROPFILESTRUCT
);
pDropFiles
->
fWide
Char
=
FALSE
;
pDropFiles
=
(
DROPFILES
*
)
GlobalLock
(
hGlobal
);
pDropFiles
->
pFiles
=
sizeof
(
DROPFILES
);
pDropFiles
->
fWide
=
FALSE
;
offset
=
pDropFiles
->
lSize
;
offset
=
pDropFiles
->
pFiles
;
strcpy
(
szFileName
,
szRootPath
);
for
(
i
=
0
;
i
<
cidl
;
i
++
)
...
...
dlls/shell32/shell.c
View file @
60e17529
...
...
@@ -55,6 +55,13 @@ typedef struct
#include "poppack.h"
typedef
struct
{
/* structure for dropped files */
WORD
wSize
;
POINT16
ptMousePos
;
BOOL16
fInNonClientArea
;
/* memory block with filenames follows */
}
DROPFILESTRUCT16
,
*
LPDROPFILESTRUCT16
;
static
const
char
*
lpstrMsgWndCreated
=
"OTHERWINDOWCREATED"
;
static
const
char
*
lpstrMsgWndDestroyed
=
"OTHERWINDOWDESTROYED"
;
static
const
char
*
lpstrMsgShellActivate
=
"ACTIVATESHELLWINDOW"
;
...
...
@@ -1022,7 +1029,7 @@ LPSTR SHELL_FindString(LPSTR lpEnv, LPCSTR entry)
l
=
strlen
(
entry
);
for
(
;
*
lpEnv
;
lpEnv
+=
strlen
(
lpEnv
)
+
1
)
{
if
(
lstrncmpiA
(
lpEnv
,
entry
,
l
)
)
{
if
(
strncasecmp
(
lpEnv
,
entry
,
l
)
)
continue
;
if
(
!*
(
lpEnv
+
l
)
)
return
(
lpEnv
+
l
);
/* empty entry */
...
...
dlls/shell32/shellole.c
View file @
60e17529
...
...
@@ -9,16 +9,10 @@
#include <stdlib.h>
#include <string.h>
#include "wine/obj_base.h"
#include "wine/obj_shelllink.h"
#include "wine/obj_shellfolder.h"
#include "wine/obj_shellbrowser.h"
#include "wine/obj_contextmenu.h"
#include "wine/obj_shellextinit.h"
#include "wine/obj_extracticon.h"
#include "shlobj.h"
#include "shlguid.h"
#include "winreg.h"
#include "wine/unicode.h"
#include "winerror.h"
#include "debugtools.h"
...
...
@@ -543,15 +537,15 @@ void WINAPI DragFinish(HDROP h)
*/
BOOL
WINAPI
DragQueryPoint
(
HDROP
hDrop
,
POINT
*
p
)
{
LPDROPFILESTRUCT
lpDropFileStruct
;
DROPFILES
*
lpDropFileStruct
;
BOOL
bRet
;
TRACE
(
"
\n
"
);
lpDropFileStruct
=
(
LPDROPFILESTRUCT
)
GlobalLock
(
hDrop
);
memcpy
(
p
,
&
lpDropFileStruct
->
ptMousePos
,
sizeof
(
POINT
))
;
bRet
=
lpDropFileStruct
->
f
InNonClientArea
;
lpDropFileStruct
=
(
DROPFILES
*
)
GlobalLock
(
hDrop
);
*
p
=
lpDropFileStruct
->
pt
;
bRet
=
lpDropFileStruct
->
f
NC
;
GlobalUnlock
(
hDrop
);
return
bRet
;
...
...
@@ -568,13 +562,13 @@ UINT WINAPI DragQueryFileA(
{
LPSTR
lpDrop
;
UINT
i
=
0
;
LPDROPFILESTRUCT
lpDropFileStruct
=
(
LPDROPFILESTRUCT
)
GlobalLock
(
hDrop
);
DROPFILES
*
lpDropFileStruct
=
(
DROPFILES
*
)
GlobalLock
(
hDrop
);
TRACE
(
"(%08x, %x, %p, %u)
\n
"
,
hDrop
,
lFile
,
lpszFile
,
lLength
);
if
(
!
lpDropFileStruct
)
goto
end
;
lpDrop
=
(
LPSTR
)
lpDropFileStruct
+
lpDropFileStruct
->
lSize
;
lpDrop
=
(
LPSTR
)
lpDropFileStruct
+
lpDropFileStruct
->
pFiles
;
while
(
i
++
<
lFile
)
{
...
...
@@ -607,13 +601,13 @@ UINT WINAPI DragQueryFileW(
{
LPWSTR
lpwDrop
;
UINT
i
=
0
;
LPDROPFILESTRUCT
lpDropFileStruct
=
(
LPDROPFILESTRUCT
)
GlobalLock
(
hDrop
);
DROPFILES
*
lpDropFileStruct
=
(
DROPFILES
*
)
GlobalLock
(
hDrop
);
TRACE
(
"(%08x, %x, %p, %u)
\n
"
,
hDrop
,
lFile
,
lpszwFile
,
lLength
);
if
(
!
lpDropFileStruct
)
goto
end
;
lpwDrop
=
(
LPWSTR
)
lpDropFileStruct
+
lpDropFileStruct
->
lSize
;
lpwDrop
=
(
LPWSTR
)
lpDropFileStruct
+
lpDropFileStruct
->
pFiles
;
i
=
0
;
while
(
i
++
<
lFile
)
...
...
@@ -626,7 +620,7 @@ UINT WINAPI DragQueryFileW(
}
}
i
=
l
strlenW
(
lpwDrop
);
i
=
strlenW
(
lpwDrop
);
i
++
;
if
(
!
lpszwFile
)
goto
end
;
/* needed buffer size */
...
...
windows/x11drv/event.c
View file @
60e17529
...
...
@@ -23,6 +23,7 @@
#include <assert.h>
#include <string.h>
#include "wine/winuser16.h"
#include "shlobj.h"
/* DROPFILES */
#include "clipboard.h"
#include "dce.h"
...
...
@@ -35,7 +36,6 @@
#include "mouse.h"
#include "options.h"
#include "queue.h"
#include "shell.h"
#include "win.h"
#include "winpos.h"
#include "services.h"
...
...
@@ -1587,24 +1587,25 @@ static void EVENT_DropFromOffiX( HWND hWnd, XClientMessageEvent *event )
}
if
(
aux_long
&&
aux_long
<
65535
)
{
HDROP
16
hDrop
;
LPDROPFILESTRUCT16
lpDrop
;
HDROP
hDrop
;
DROPFILES
*
lpDrop
;
aux_long
+=
sizeof
(
DROPFILES
TRUCT16
)
+
1
;
hDrop
=
(
HDROP16
)
GlobalAlloc16
(
GMEM_SHARE
,
aux_long
);
lpDrop
=
(
LPDROPFILESTRUCT16
)
GlobalLock16
(
hDrop
);
aux_long
+=
sizeof
(
DROPFILES
)
+
1
;
hDrop
=
GlobalAlloc
(
GMEM_SHARE
,
aux_long
);
lpDrop
=
(
DROPFILES
*
)
GlobalLock
(
hDrop
);
if
(
lpDrop
)
{
lpDrop
->
wSize
=
sizeof
(
DROPFILESTRUCT16
);
lpDrop
->
pt
MousePos
.
x
=
(
INT16
)
x
;
lpDrop
->
pt
MousePos
.
y
=
(
INT16
)
y
;
lpDrop
->
f
InNonClientArea
=
(
BOOL16
)
lpDrop
->
pFiles
=
sizeof
(
DROPFILES
);
lpDrop
->
pt
.
x
=
x
;
lpDrop
->
pt
.
y
=
y
;
lpDrop
->
f
NC
=
(
x
<
(
pDropWnd
->
rectClient
.
left
-
pDropWnd
->
rectWindow
.
left
)
||
y
<
(
pDropWnd
->
rectClient
.
top
-
pDropWnd
->
rectWindow
.
top
)
||
x
>
(
pDropWnd
->
rectClient
.
right
-
pDropWnd
->
rectWindow
.
left
)
||
y
>
(
pDropWnd
->
rectClient
.
bottom
-
pDropWnd
->
rectWindow
.
top
)
);
p_drop
=
((
char
*
)
lpDrop
)
+
sizeof
(
DROPFILESTRUCT16
);
lpDrop
->
fWide
=
FALSE
;
p_drop
=
(
char
*
)(
lpDrop
+
1
);
p
=
p_data
;
while
(
*
p
)
{
...
...
@@ -1616,8 +1617,7 @@ static void EVENT_DropFromOffiX( HWND hWnd, XClientMessageEvent *event )
p
+=
strlen
(
p
)
+
1
;
}
*
p_drop
=
'\0'
;
PostMessage16
(
hWnd
,
WM_DROPFILES
,
(
WPARAM16
)
hDrop
,
0L
);
PostMessageA
(
hWnd
,
WM_DROPFILES
,
hDrop
,
0L
);
}
}
}
...
...
@@ -1645,19 +1645,16 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event )
unsigned
char
*
p_data
=
NULL
;
/* property data */
char
*
p_drop
=
NULL
;
char
*
p
,
*
next
;
int
x
,
y
,
drop32
=
FALSE
;
int
x
,
y
;
DROPFILES
*
lpDrop
;
HDROP
hDrop
;
union
{
Atom
atom_aux
;
int
i
;
Window
w_aux
;
}
u
;
/* unused */
union
{
HDROP16
h16
;
HDROP
h32
;
}
hDrop
;
pWnd
=
WIN_FindWndPtr
(
hWnd
);
drop32
=
pWnd
->
flags
&
WIN_ISWIN32
;
if
(
!
(
pWnd
->
dwExStyle
&
WS_EX_ACCEPTFILES
))
{
...
...
@@ -1699,43 +1696,23 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event )
pDropWnd
=
WIN_FindWndPtr
(
hWnd
);
if
(
drop32
)
{
LPDROPFILESTRUCT
lpDrop
;
drop_len
+=
sizeof
(
DROPFILESTRUCT
)
+
1
;
hDrop
.
h32
=
(
HDROP
)
GlobalAlloc
(
GMEM_SHARE
,
drop_len
);
lpDrop
=
(
LPDROPFILESTRUCT
)
GlobalLock
(
hDrop
.
h32
);
if
(
lpDrop
)
{
lpDrop
->
lSize
=
sizeof
(
DROPFILESTRUCT
);
lpDrop
->
ptMousePos
.
x
=
(
INT
)
x
;
lpDrop
->
ptMousePos
.
y
=
(
INT
)
y
;
lpDrop
->
fInNonClientArea
=
(
BOOL
)
drop_len
+=
sizeof
(
DROPFILES
)
+
1
;
hDrop
=
(
HDROP
)
GlobalAlloc
(
GMEM_SHARE
,
drop_len
);
lpDrop
=
(
DROPFILES
*
)
GlobalLock
(
hDrop
);
if
(
lpDrop
)
{
lpDrop
->
pFiles
=
sizeof
(
DROPFILES
);
lpDrop
->
pt
.
x
=
(
INT
)
x
;
lpDrop
->
pt
.
y
=
(
INT
)
y
;
lpDrop
->
fNC
=
(
x
<
(
pDropWnd
->
rectClient
.
left
-
pDropWnd
->
rectWindow
.
left
)
||
y
<
(
pDropWnd
->
rectClient
.
top
-
pDropWnd
->
rectWindow
.
top
)
||
x
>
(
pDropWnd
->
rectClient
.
right
-
pDropWnd
->
rectWindow
.
left
)
||
y
>
(
pDropWnd
->
rectClient
.
bottom
-
pDropWnd
->
rectWindow
.
top
)
);
lpDrop
->
fWideChar
=
FALSE
;
p_drop
=
((
char
*
)
lpDrop
)
+
sizeof
(
DROPFILESTRUCT
);
}
}
else
{
LPDROPFILESTRUCT16
lpDrop
;
drop_len
+=
sizeof
(
DROPFILESTRUCT16
)
+
1
;
hDrop
.
h16
=
(
HDROP16
)
GlobalAlloc16
(
GMEM_SHARE
,
drop_len
);
lpDrop
=
(
LPDROPFILESTRUCT16
)
GlobalLock16
(
hDrop
.
h16
);
if
(
lpDrop
)
{
lpDrop
->
wSize
=
sizeof
(
DROPFILESTRUCT16
);
lpDrop
->
ptMousePos
.
x
=
(
INT16
)
x
;
lpDrop
->
ptMousePos
.
y
=
(
INT16
)
y
;
lpDrop
->
fInNonClientArea
=
(
BOOL16
)
(
x
<
(
pDropWnd
->
rectClient
.
left
-
pDropWnd
->
rectWindow
.
left
)
||
y
<
(
pDropWnd
->
rectClient
.
top
-
pDropWnd
->
rectWindow
.
top
)
||
x
>
(
pDropWnd
->
rectClient
.
right
-
pDropWnd
->
rectWindow
.
left
)
||
y
>
(
pDropWnd
->
rectClient
.
bottom
-
pDropWnd
->
rectWindow
.
top
)
);
p_drop
=
((
char
*
)
lpDrop
)
+
sizeof
(
DROPFILESTRUCT16
);
}
lpDrop
->
fWide
=
FALSE
;
p_drop
=
(
char
*
)(
lpDrop
+
1
);
}
/* create message content */
if
(
p_drop
)
{
p
=
p_data
;
...
...
@@ -1763,18 +1740,8 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event )
*
p_drop
=
'\0'
;
}
if
(
drop32
)
{
/* can not use PostMessage32A because it is currently based on
* PostMessage16 and WPARAM32 would be truncated to WPARAM16
*/
GlobalUnlock
(
hDrop
.
h32
);
SendMessageA
(
hWnd
,
WM_DROPFILES
,
(
WPARAM
)
hDrop
.
h32
,
0L
);
}
else
{
GlobalUnlock16
(
hDrop
.
h16
);
PostMessage16
(
hWnd
,
WM_DROPFILES
,
(
WPARAM16
)
hDrop
.
h16
,
0L
);
}
GlobalUnlock
(
hDrop
);
PostMessageA
(
hWnd
,
WM_DROPFILES
,
hDrop
,
0L
);
}
WIN_ReleaseWndPtr
(
pDropWnd
);
}
...
...
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