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
b070313c
Commit
b070313c
authored
Feb 20, 2000
by
Juergen Schmied
Committed by
Alexandre Julliard
Feb 20, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started implementation of shell notifications.
parent
cb23a8ed
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
304 additions
and
118 deletions
+304
-118
changenotify.c
dlls/shell32/changenotify.c
+252
-0
shell32.spec
dlls/shell32/shell32.spec
+1
-1
shellord.c
dlls/shell32/shellord.c
+1
-98
shell.h
include/shell.h
+0
-13
shellapi.h
include/shellapi.h
+0
-2
shlobj.h
include/shlobj.h
+50
-4
No files found.
dlls/shell32/changenotify.c
0 → 100644
View file @
b070313c
/*
* shell change notification
*
* Juergen Schmied <juergen.schmied@debitel.de>
*
*/
#include <string.h>
#include "debugtools.h"
#include "pidl.h"
#include "shell32_main.h"
#include "winversion.h"
#include "wine/undocshell.h"
DEFAULT_DEBUG_CHANNEL
(
shell
)
typedef
struct
{
LPCITEMIDLIST
pidlPath
;
BOOL
bWatchSubtree
;
}
NOTIFYREGISTER
,
*
LPNOTIFYREGISTER
;
typedef
const
LPNOTIFYREGISTER
LPCNOTIFYREGISTER
;
typedef
struct
{
USHORT
cb
;
DWORD
dwItem1
;
DWORD
dwItem2
;
}
DWORDITEMID
;
#define SHCNF_ACCEPT_INTERRUPTS 0x0001
#define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002
#define SHCNF_NO_PROXY 0x8001
/* internal list of notification clients */
typedef
struct
_NOTIFICATIONLIST
{
struct
_NOTIFICATIONLIST
*
next
;
struct
_NOTIFICATIONLIST
*
prev
;
HWND
hwnd
;
/* window to notify */
DWORD
uMsg
;
/* message to send */
LPNOTIFYREGISTER
*
apidl
;
/* array of entrys to watch*/
UINT
cidl
;
/* number of pidls in array */
LONG
wEventMask
;
/* subscribed events */
DWORD
dwFlags
;
/* client flags */
}
NOTIFICATIONLIST
,
*
LPNOTIFICATIONLIST
;
NOTIFICATIONLIST
head
;
NOTIFICATIONLIST
tail
;
void
InitChangeNotifications
()
{
ZeroMemory
(
&
head
,
sizeof
(
NOTIFICATIONLIST
));
ZeroMemory
(
&
tail
,
sizeof
(
NOTIFICATIONLIST
));
head
.
next
=
&
tail
;
tail
.
prev
=
&
head
;
}
void
FreeChangeNotifications
()
{
LPNOTIFICATIONLIST
ptr
,
item
;
ptr
=
head
.
next
;
while
(
ptr
!=
&
tail
)
{
int
i
;
item
=
ptr
;
ptr
=
ptr
->
next
;
/* free the item */
for
(
i
=
0
;
i
<
item
->
cidl
;
i
++
)
SHFree
(
item
->
apidl
[
i
]);
SHFree
(
item
->
apidl
);
SHFree
(
item
);
}
head
.
next
=
NULL
;
tail
.
prev
=
NULL
;
}
static
BOOL
AddNode
(
LPNOTIFICATIONLIST
item
)
{
LPNOTIFICATIONLIST
last
;
/* lock list */
/* get last entry */
last
=
tail
.
prev
;
/* link items */
last
->
next
=
item
;
item
->
prev
=
last
;
item
->
next
=
&
tail
;
tail
.
prev
=
item
;
return
TRUE
;
/* unlock list */
}
static
BOOL
DeleteNode
(
LPNOTIFICATIONLIST
item
)
{
LPNOTIFICATIONLIST
ptr
;
int
ret
=
FALSE
;
/* lock list */
ptr
=
head
.
next
;
while
(
ptr
!=
&
tail
)
{
if
(
ptr
==
item
)
{
int
i
;
/* remove item from list */
item
->
prev
->
next
=
item
->
next
;
item
->
next
->
prev
=
item
->
prev
;
/* free the item */
for
(
i
=
0
;
i
<
item
->
cidl
;
i
++
)
SHFree
(
item
->
apidl
[
i
]);
SHFree
(
item
->
apidl
);
SHFree
(
item
);
ret
=
TRUE
;
}
}
/* unlock list */
return
ret
;
}
/*************************************************************************
* SHChangeNotifyRegister [SHELL32.2]
*
*/
HANDLE
WINAPI
SHChangeNotifyRegister
(
HWND
hwnd
,
LONG
dwFlags
,
LONG
wEventMask
,
DWORD
uMsg
,
int
cItems
,
LPCNOTIFYREGISTER
*
lpItems
)
{
LPNOTIFICATIONLIST
item
;
int
i
;
TRACE
(
"(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p)
\n
"
,
hwnd
,
wEventMask
,
wEventMask
,
uMsg
,
cItems
,
lpItems
);
item
=
SHAlloc
(
sizeof
(
NOTIFICATIONLIST
));
item
->
next
=
NULL
;
item
->
prev
=
NULL
;
item
->
cidl
=
cItems
;
item
->
apidl
=
SHAlloc
(
sizeof
(
NOTIFYREGISTER
)
*
cItems
);
for
(
i
=
0
;
i
<
cItems
;
i
++
)
{
item
->
apidl
[
i
]
->
pidlPath
=
ILClone
(
lpItems
[
i
]
->
pidlPath
);
item
->
apidl
[
i
]
->
bWatchSubtree
=
lpItems
[
i
]
->
bWatchSubtree
;
}
item
->
hwnd
=
hwnd
;
item
->
uMsg
=
uMsg
;
item
->
wEventMask
=
wEventMask
;
item
->
dwFlags
=
dwFlags
;
AddNode
(
item
);
return
(
HANDLE
)
item
;
}
/*************************************************************************
* SHChangeNotifyDeregister [SHELL32.4]
*/
BOOL
WINAPI
SHChangeNotifyDeregister
(
HANDLE
hNotify
)
{
TRACE
(
"(0x%08x)
\n
"
,
hNotify
);
return
DeleteNode
((
LPNOTIFICATIONLIST
)
hNotify
);;
}
/*************************************************************************
* SHChangeNotify [SHELL32.239]
*/
void
WINAPI
SHChangeNotifyW
(
LONG
wEventId
,
UINT
uFlags
,
LPCVOID
dwItem1
,
LPCVOID
dwItem2
)
{
FIXME
(
"(0x%08lx,0x%08x,%p,%p):stub.
\n
"
,
wEventId
,
uFlags
,
dwItem1
,
dwItem2
);
}
void
WINAPI
SHChangeNotifyA
(
LONG
wEventId
,
UINT
uFlags
,
LPCVOID
dwItem1
,
LPCVOID
dwItem2
)
{
FIXME
(
"(0x%08lx,0x%08x,%p,%p):stub.
\n
"
,
wEventId
,
uFlags
,
dwItem1
,
dwItem2
);
}
void
WINAPI
SHChangeNotifyAW
(
LONG
wEventId
,
UINT
uFlags
,
LPCVOID
dwItem1
,
LPCVOID
dwItem2
)
{
if
(
VERSION_OsIsUnicode
())
return
SHChangeNotifyW
(
wEventId
,
uFlags
,
dwItem1
,
dwItem2
);
return
SHChangeNotifyA
(
wEventId
,
uFlags
,
dwItem1
,
dwItem2
);
}
/*************************************************************************
* NTSHChangeNotifyRegister [SHELL32.640]
* NOTES
* Idlist is an array of structures and Count specifies how many items in the array
* (usually just one I think).
*/
DWORD
WINAPI
NTSHChangeNotifyRegister
(
HWND
hwnd
,
LONG
events1
,
LONG
events2
,
DWORD
msg
,
int
count
,
LPNOTIFYREGISTER
idlist
)
{
FIXME
(
"(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):stub.
\n
"
,
hwnd
,
events1
,
events2
,
msg
,
count
,
idlist
);
return
0
;
}
/*************************************************************************
* SHChangeNotification_Lock [SHELL32.644]
*/
HANDLE
WINAPI
SHChangeNotification_Lock
(
HANDLE
hMemoryMap
,
DWORD
dwProcessId
,
LPCITEMIDLIST
**
lppidls
,
LPLONG
lpwEventId
)
{
FIXME
(
"
\n
"
);
return
0
;
}
/*************************************************************************
* SHChangeNotification_Unlock [SHELL32.645]
*/
BOOL
WINAPI
SHChangeNotification_Unlock
(
HANDLE
hLock
)
{
FIXME
(
"
\n
"
);
return
0
;
}
/*************************************************************************
* NTSHChangeNotifyDeregister [SHELL32.641]
*/
DWORD
WINAPI
NTSHChangeNotifyDeregister
(
LONG
x1
)
{
FIXME
(
"(0x%08lx):stub.
\n
"
,
x1
);
return
0
;
}
dlls/shell32/shell32.spec
View file @
b070313c
...
...
@@ -245,7 +245,7 @@ rsrc shell32
236 stdcall SHBrowseForFolder(ptr) SHBrowseForFolderA # exported by name
237 stdcall SHBrowseForFolderA(ptr) SHBrowseForFolderA # exported by name
238 stub SHBrowseForFolderW@4 # exported by name
239 stdcall SHChangeNotify (long long ptr ptr) SHChangeNotify # exported by name
239 stdcall SHChangeNotify (long long ptr ptr) SHChangeNotify
AW
# exported by name
240 stub SHEmptyRecycleBinA@12 # exported by name
241 stub SHEmptyRecycleBinW@12 # exported by name
242 stdcall SHFileOperation (ptr) SHFileOperationAW # exported by name
...
...
dlls/shell32/shellord.c
View file @
b070313c
...
...
@@ -23,58 +23,6 @@
DEFAULT_DEBUG_CHANNEL
(
shell
);
/*************************************************************************
* SHChangeNotifyRegister [SHELL32.2]
*
* NOTES
* Idlist is an array of structures and Count specifies how many items in the array
* (usually just one I think).
*/
DWORD
WINAPI
SHChangeNotifyRegister
(
HWND
hwnd
,
LONG
events1
,
LONG
events2
,
DWORD
msg
,
int
count
,
IDSTRUCT
*
idlist
)
{
FIXME
(
"(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):stub.
\n
"
,
hwnd
,
events1
,
events2
,
msg
,
count
,
idlist
);
return
0
;
}
/*************************************************************************
* SHChangeNotifyDeregister [SHELL32.4]
*/
DWORD
WINAPI
SHChangeNotifyDeregister
(
LONG
x1
)
{
FIXME
(
"(0x%08lx):stub.
\n
"
,
x1
);
return
0
;
}
/*************************************************************************
* NTSHChangeNotifyRegister [SHELL32.640]
* NOTES
* Idlist is an array of structures and Count specifies how many items in the array
* (usually just one I think).
*/
DWORD
WINAPI
NTSHChangeNotifyRegister
(
HWND
hwnd
,
LONG
events1
,
LONG
events2
,
DWORD
msg
,
int
count
,
IDSTRUCT
*
idlist
)
{
FIXME
(
"(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):stub.
\n
"
,
hwnd
,
events1
,
events2
,
msg
,
count
,
idlist
);
return
0
;
}
/*************************************************************************
* NTSHChangeNotifyDeregister [SHELL32.641]
*/
DWORD
WINAPI
NTSHChangeNotifyDeregister
(
LONG
x1
)
{
FIXME
(
"(0x%08lx):stub.
\n
"
,
x1
);
return
0
;
}
/*************************************************************************
* ParseField [SHELL32.58]
*
*/
...
...
@@ -470,7 +418,7 @@ DWORD WINAPI SHCreateDirectory(LPSECURITY_ATTRIBUTES sec,LPCSTR path) {
* free_ptr() - frees memory using IMalloc
* exported by ordinal
*/
#define MEM_DEBUG
0
#define MEM_DEBUG
1
DWORD
WINAPI
SHFree
(
LPVOID
x
)
{
#if MEM_DEBUG
...
...
@@ -631,51 +579,6 @@ DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
return
0
;
}
/*************************************************************************
* SHFileOperation [SHELL32.242]
*
*/
DWORD
WINAPI
SHFileOperationAW
(
DWORD
x
)
{
FIXME
(
"0x%08lx stub
\n
"
,
x
);
return
0
;
}
/*************************************************************************
* SHFileOperationA [SHELL32.243]
*
* NOTES
* exported by name
*/
DWORD
WINAPI
SHFileOperationA
(
LPSHFILEOPSTRUCTA
lpFileOp
)
{
FIXME
(
"(%p):stub.
\n
"
,
lpFileOp
);
return
1
;
}
/*************************************************************************
* SHFileOperationW [SHELL32.244]
*
* NOTES
* exported by name
*/
DWORD
WINAPI
SHFileOperationW
(
LPSHFILEOPSTRUCTW
lpFileOp
)
{
FIXME
(
"(%p):stub.
\n
"
,
lpFileOp
);
return
1
;
}
/*************************************************************************
* SHChangeNotify [SHELL32.239]
*
* NOTES
* exported by name
*/
DWORD
WINAPI
SHChangeNotify
(
INT
wEventId
,
/* [IN] flags that specifies the event*/
UINT
uFlags
,
/* [IN] the meaning of dwItem[1|2]*/
LPCVOID
dwItem1
,
LPCVOID
dwItem2
)
{
FIXME
(
"(0x%08x,0x%08ux,%p,%p):stub.
\n
"
,
wEventId
,
uFlags
,
dwItem1
,
dwItem2
);
return
0
;
}
/*************************************************************************
* SHCreateShellFolderViewEx [SHELL32.174]
*
* NOTES
...
...
include/shell.h
View file @
b070313c
...
...
@@ -77,19 +77,6 @@ BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath);
BOOL
WINAPI
SHGetPathFromIDListW
(
LPCITEMIDLIST
pidl
,
LPWSTR
pszPath
);
#define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
/****************************************************************************
* SHChangeNotifyRegister API
*/
typedef
struct
{
LPITEMIDLIST
pidl
;
DWORD
unknown
;
}
IDSTRUCT
;
DWORD
WINAPI
SHChangeNotifyRegister
(
HWND
hwnd
,
LONG
events1
,
LONG
events2
,
DWORD
msg
,
int
count
,
IDSTRUCT
*
idlist
);
DWORD
WINAPI
SHChangeNotifyDeregister
(
LONG
x1
);
/****************************************************************************
* SHAddToRecentDocs API
*/
...
...
include/shellapi.h
View file @
b070313c
...
...
@@ -197,8 +197,6 @@ DWORD WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);
DWORD
WINAPI
SHFileOperationW
(
LPSHFILEOPSTRUCTW
lpFileOp
);
#define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
DWORD
WINAPI
SHFileOperationAW
(
DWORD
x
);
/******************************************
* ShellExecute
*/
...
...
include/shlobj.h
View file @
b070313c
...
...
@@ -200,7 +200,7 @@ typedef struct tagBROWSEINFOA {
UINT
ulFlags
;
BFFCALLBACK
lpfn
;
LPARAM
lParam
;
INT
iImage
;
INT
iImage
;
}
BROWSEINFOA
,
*
PBROWSEINFOA
,
*
LPBROWSEINFOA
;
typedef
struct
tagBROWSEINFOW
{
...
...
@@ -211,7 +211,7 @@ typedef struct tagBROWSEINFOW {
UINT
ulFlags
;
BFFCALLBACK
lpfn
;
LPARAM
lParam
;
INT
iImage
;
INT
iImage
;
}
BROWSEINFOW
,
*
PBROWSEINFOW
,
*
LPBROWSEINFOW
;
#define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
...
...
@@ -260,7 +260,7 @@ typedef struct tagBROWSEINFOW {
*/
LPITEMIDLIST
WINAPI
SHBrowseForFolderA
(
LPBROWSEINFOA
lpbi
);
/*LPITEMIDLIST WINAPI SHBrowseForFolder32W(LPBROWSEINFO32W lpbi);*/
LPITEMIDLIST
WINAPI
SHBrowseForFolder32W
(
LPBROWSEINFOW
lpbi
);
#define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
/****************************************************************************
...
...
@@ -403,7 +403,53 @@ void WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask, DWORD dwx);
#define SSF_NOCONFIRMRECYCLE 0x8000
#define SSF_HIDEICONS 0x4000
/**********************************************************************/
/**********************************************************************
* SHChangeNotify
*/
#define SHCNE_RENAMEITEM 0x00000001
#define SHCNE_CREATE 0x00000002
#define SHCNE_DELETE 0x00000004
#define SHCNE_MKDIR 0x00000008
#define SHCNE_RMDIR 0x00000010
#define SHCNE_MEDIAINSERTED 0x00000020
#define SHCNE_MEDIAREMOVED 0x00000040
#define SHCNE_DRIVEREMOVED 0x00000080
#define SHCNE_DRIVEADD 0x00000100
#define SHCNE_NETSHARE 0x00000200
#define SHCNE_NETUNSHARE 0x00000400
#define SHCNE_ATTRIBUTES 0x00000800
#define SHCNE_UPDATEDIR 0x00001000
#define SHCNE_UPDATEITEM 0x00002000
#define SHCNE_SERVERDISCONNECT 0x00004000
#define SHCNE_UPDATEIMAGE 0x00008000
#define SHCNE_DRIVEADDGUI 0x00010000
#define SHCNE_RENAMEFOLDER 0x00020000
#define SHCNE_FREESPACE 0x00040000
#define SHCNE_EXTENDED_EVENT 0x04000000
#define SHCNE_ASSOCCHANGED 0x08000000
#define SHCNE_DISKEVENTS 0x0002381F
#define SHCNE_GLOBALEVENTS 0x0C0581E0
#define SHCNE_ALLEVENTS 0x7FFFFFFF
#define SHCNE_INTERRUPT 0x80000000
#define SHCNEE_ORDERCHANGED 0x00000002
#define SHCNF_IDLIST 0x0000
#define SHCNF_PATHA 0x0001
#define SHCNF_PRINTERA 0x0002
#define SHCNF_DWORD 0x0003
#define SHCNF_PATHW 0x0005
#define SHCNF_PRINTERW 0x0006
#define SHCNF_TYPE 0x00FF
#define SHCNF_FLUSH 0x1000
#define SHCNF_FLUSHNOWAIT 0x2000
void
WINAPI
SHChangeNotifyA
(
LONG
wEventId
,
UINT
uFlags
,
LPCVOID
dwItem1
,
LPCVOID
dwItem2
);
void
WINAPI
SHChangeNotifyW
(
LONG
wEventId
,
UINT
uFlags
,
LPCVOID
dwItem1
,
LPCVOID
dwItem2
);
#define SHChangeNotify WINELIB_NAME_AW(SHChangeNotify)
/**********************************************************************/
#ifdef __cplusplus
}
/* extern "C" */
...
...
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