Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
9fe57a8a
Commit
9fe57a8a
authored
13 years ago
by
Nikolay Sivov
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
shell32: Update to IContextMenu3.
parent
82c72f2f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/shell32/shlview_cmenu.c
+48
-51
48 additions, 51 deletions
dlls/shell32/shlview_cmenu.c
with
48 additions
and
51 deletions
dlls/shell32/shlview_cmenu.c
+
48
−
51
View file @
9fe57a8a
...
...
@@ -45,7 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
typedef
struct
{
IContextMenu
2
IContextMenu
2
_iface
;
IContextMenu
3
IContextMenu
3
_iface
;
LONG
ref
;
IShellFolder
*
parent
;
...
...
@@ -61,22 +61,23 @@ typedef struct
BOOL
desktop
;
}
ContextMenu
;
static
inline
ContextMenu
*
impl_from_IContextMenu
2
(
IContextMenu
2
*
iface
)
static
inline
ContextMenu
*
impl_from_IContextMenu
3
(
IContextMenu
3
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ContextMenu
,
IContextMenu
2
_iface
);
return
CONTAINING_RECORD
(
iface
,
ContextMenu
,
IContextMenu
3
_iface
);
}
static
HRESULT
WINAPI
ContextMenu_QueryInterface
(
IContextMenu
2
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
static
HRESULT
WINAPI
ContextMenu_QueryInterface
(
IContextMenu
3
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
ContextMenu
*
This
=
impl_from_IContextMenu
2
(
iface
);
ContextMenu
*
This
=
impl_from_IContextMenu
3
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObj
);
*
ppvObj
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IContextMenu
)
||
IsEqualIID
(
riid
,
&
IID_IContextMenu2
))
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IContextMenu
)
||
IsEqualIID
(
riid
,
&
IID_IContextMenu2
)
||
IsEqualIID
(
riid
,
&
IID_IContextMenu3
))
{
*
ppvObj
=
This
;
}
...
...
@@ -87,7 +88,7 @@ static HRESULT WINAPI ContextMenu_QueryInterface(IContextMenu2 *iface, REFIID ri
if
(
*
ppvObj
)
{
IContextMenu
2
_AddRef
(
iface
);
IContextMenu
3
_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -95,17 +96,17 @@ static HRESULT WINAPI ContextMenu_QueryInterface(IContextMenu2 *iface, REFIID ri
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ContextMenu_AddRef
(
IContextMenu
2
*
iface
)
static
ULONG
WINAPI
ContextMenu_AddRef
(
IContextMenu
3
*
iface
)
{
ContextMenu
*
This
=
impl_from_IContextMenu
2
(
iface
);
ContextMenu
*
This
=
impl_from_IContextMenu
3
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
ContextMenu_Release
(
IContextMenu
2
*
iface
)
static
ULONG
WINAPI
ContextMenu_Release
(
IContextMenu
3
*
iface
)
{
ContextMenu
*
This
=
impl_from_IContextMenu
2
(
iface
);
ContextMenu
*
This
=
impl_from_IContextMenu
3
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
ref
);
...
...
@@ -125,14 +126,14 @@ static ULONG WINAPI ContextMenu_Release(IContextMenu2 *iface)
}
static
HRESULT
WINAPI
ItemMenu_QueryContextMenu
(
IContextMenu
2
*
iface
,
IContextMenu
3
*
iface
,
HMENU
hmenu
,
UINT
indexMenu
,
UINT
idCmdFirst
,
UINT
idCmdLast
,
UINT
uFlags
)
{
ContextMenu
*
This
=
impl_from_IContextMenu
2
(
iface
);
ContextMenu
*
This
=
impl_from_IContextMenu
3
(
iface
);
INT
uIDMax
;
TRACE
(
"(%p)->(%p %d 0x%x 0x%x 0x%x )
\n
"
,
This
,
hmenu
,
indexMenu
,
idCmdFirst
,
idCmdLast
,
uFlags
);
...
...
@@ -400,10 +401,10 @@ static void DoOpenProperties(ContextMenu *This, HWND hwnd)
}
static
HRESULT
WINAPI
ItemMenu_InvokeCommand
(
IContextMenu
2
*
iface
,
IContextMenu
3
*
iface
,
LPCMINVOKECOMMANDINFO
lpcmi
)
{
ContextMenu
*
This
=
impl_from_IContextMenu
2
(
iface
);
ContextMenu
*
This
=
impl_from_IContextMenu
3
(
iface
);
if
(
lpcmi
->
cbSize
!=
sizeof
(
CMINVOKECOMMANDINFO
))
FIXME
(
"Is an EX structure
\n
"
);
...
...
@@ -485,14 +486,14 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
}
static
HRESULT
WINAPI
ItemMenu_GetCommandString
(
IContextMenu
2
*
iface
,
IContextMenu
3
*
iface
,
UINT_PTR
idCommand
,
UINT
uFlags
,
UINT
*
lpReserved
,
LPSTR
lpszName
,
UINT
uMaxNameLen
)
{
ContextMenu
*
This
=
impl_from_IContextMenu
2
(
iface
);
ContextMenu
*
This
=
impl_from_IContextMenu
3
(
iface
);
HRESULT
hr
=
E_INVALIDARG
;
TRACE
(
"(%p)->(%lx flags=%x %p name=%p len=%x)
\n
"
,
This
,
idCommand
,
uFlags
,
lpReserved
,
lpszName
,
uMaxNameLen
);
...
...
@@ -540,18 +541,23 @@ static HRESULT WINAPI ItemMenu_GetCommandString(
* should be only in IContextMenu2 and IContextMenu3
* is nevertheless called from word95
*/
static
HRESULT
WINAPI
ItemMenu_HandleMenuMsg
(
IContextMenu2
*
iface
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
HRESULT
WINAPI
ContextMenu_HandleMenuMsg
(
IContextMenu3
*
iface
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
ContextMenu
*
This
=
impl_from_IContextMenu
2
(
iface
);
TRAC
E
(
"(%p)->(0x%x 0x%lx 0x%lx)
\n
"
,
This
,
uM
sg
,
wParam
,
lParam
);
ContextMenu
*
This
=
impl_from_IContextMenu
3
(
iface
);
FIXM
E
(
"(%p)->(0x%x 0x%lx 0x%lx)
: stub
\n
"
,
This
,
m
sg
,
wParam
,
lParam
);
return
E_NOTIMPL
;
}
static
const
IContextMenu2Vtbl
ItemContextMenuVtbl
=
static
HRESULT
WINAPI
ContextMenu_HandleMenuMsg2
(
IContextMenu3
*
iface
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
LRESULT
*
result
)
{
ContextMenu
*
This
=
impl_from_IContextMenu3
(
iface
);
FIXME
(
"(%p)->(0x%x 0x%lx 0x%lx %p): stub
\n
"
,
This
,
msg
,
wParam
,
lParam
,
result
);
return
E_NOTIMPL
;
}
static
const
IContextMenu3Vtbl
ItemContextMenuVtbl
=
{
ContextMenu_QueryInterface
,
ContextMenu_AddRef
,
...
...
@@ -559,7 +565,8 @@ static const IContextMenu2Vtbl ItemContextMenuVtbl =
ItemMenu_QueryContextMenu
,
ItemMenu_InvokeCommand
,
ItemMenu_GetCommandString
,
ItemMenu_HandleMenuMsg
ContextMenu_HandleMenuMsg
,
ContextMenu_HandleMenuMsg2
};
IContextMenu2
*
ItemMenu_Constructor
(
IShellFolder
*
parent
,
LPCITEMIDLIST
pidl
,
const
LPCITEMIDLIST
*
apidl
,
UINT
cidl
)
...
...
@@ -568,7 +575,7 @@ IContextMenu2 *ItemMenu_Constructor(IShellFolder *parent, LPCITEMIDLIST pidl, co
UINT
u
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
This
->
IContextMenu
2
_iface
.
lpVtbl
=
&
ItemContextMenuVtbl
;
This
->
IContextMenu
3
_iface
.
lpVtbl
=
&
ItemContextMenuVtbl
;
This
->
ref
=
1
;
This
->
verb_offset
=
0
;
This
->
parent
=
parent
;
...
...
@@ -586,19 +593,19 @@ IContextMenu2 *ItemMenu_Constructor(IShellFolder *parent, LPCITEMIDLIST pidl, co
TRACE
(
"(%p)
\n
"
,
This
);
return
&
This
->
IContextMenu
2
_iface
;
return
(
IContextMenu2
*
)
&
This
->
IContextMenu
3
_iface
;
}
/* Background menu implementation */
static
HRESULT
WINAPI
BackgroundMenu_QueryContextMenu
(
IContextMenu
2
*
iface
,
IContextMenu
3
*
iface
,
HMENU
hMenu
,
UINT
indexMenu
,
UINT
idCmdFirst
,
UINT
idCmdLast
,
UINT
uFlags
)
{
ContextMenu
*
This
=
impl_from_IContextMenu
2
(
iface
);
ContextMenu
*
This
=
impl_from_IContextMenu
3
(
iface
);
HMENU
hMyMenu
;
UINT
idMax
;
HRESULT
hr
;
...
...
@@ -752,10 +759,10 @@ static BOOL DoPaste(ContextMenu *This)
}
static
HRESULT
WINAPI
BackgroundMenu_InvokeCommand
(
IContextMenu
2
*
iface
,
IContextMenu
3
*
iface
,
LPCMINVOKECOMMANDINFO
lpcmi
)
{
ContextMenu
*
This
=
impl_from_IContextMenu
2
(
iface
);
ContextMenu
*
This
=
impl_from_IContextMenu
3
(
iface
);
IShellBrowser
*
browser
;
IShellView
*
view
=
NULL
;
HWND
hWnd
=
NULL
;
...
...
@@ -828,14 +835,14 @@ static HRESULT WINAPI BackgroundMenu_InvokeCommand(
}
static
HRESULT
WINAPI
BackgroundMenu_GetCommandString
(
IContextMenu
2
*
iface
,
IContextMenu
3
*
iface
,
UINT_PTR
idCommand
,
UINT
uFlags
,
UINT
*
lpReserved
,
LPSTR
lpszName
,
UINT
uMaxNameLen
)
{
ContextMenu
*
This
=
impl_from_IContextMenu
2
(
iface
);
ContextMenu
*
This
=
impl_from_IContextMenu
3
(
iface
);
TRACE
(
"(%p)->(idcom=%lx flags=%x %p name=%p len=%x)
\n
"
,
This
,
idCommand
,
uFlags
,
lpReserved
,
lpszName
,
uMaxNameLen
);
...
...
@@ -858,18 +865,7 @@ static HRESULT WINAPI BackgroundMenu_GetCommandString(
return
E_FAIL
;
}
static
HRESULT
WINAPI
BackgroundMenu_HandleMenuMsg
(
IContextMenu2
*
iface
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
ContextMenu
*
This
=
impl_from_IContextMenu2
(
iface
);
FIXME
(
"(%p)->(msg=%x wp=%lx lp=%lx)
\n
"
,
This
,
uMsg
,
wParam
,
lParam
);
return
E_NOTIMPL
;
}
static
const
IContextMenu2Vtbl
BackgroundContextMenuVtbl
=
static
const
IContextMenu3Vtbl
BackgroundContextMenuVtbl
=
{
ContextMenu_QueryInterface
,
ContextMenu_AddRef
,
...
...
@@ -877,7 +873,8 @@ static const IContextMenu2Vtbl BackgroundContextMenuVtbl =
BackgroundMenu_QueryContextMenu
,
BackgroundMenu_InvokeCommand
,
BackgroundMenu_GetCommandString
,
BackgroundMenu_HandleMenuMsg
ContextMenu_HandleMenuMsg
,
ContextMenu_HandleMenuMsg2
};
IContextMenu2
*
BackgroundMenu_Constructor
(
IShellFolder
*
parent
,
BOOL
desktop
)
...
...
@@ -885,7 +882,7 @@ IContextMenu2 *BackgroundMenu_Constructor(IShellFolder *parent, BOOL desktop)
ContextMenu
*
This
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
This
->
IContextMenu
2
_iface
.
lpVtbl
=
&
BackgroundContextMenuVtbl
;
This
->
IContextMenu
3
_iface
.
lpVtbl
=
&
BackgroundContextMenuVtbl
;
This
->
ref
=
1
;
This
->
parent
=
parent
;
This
->
verb_offset
=
0
;
...
...
@@ -899,5 +896,5 @@ IContextMenu2 *BackgroundMenu_Constructor(IShellFolder *parent, BOOL desktop)
if
(
parent
)
IShellFolder_AddRef
(
parent
);
TRACE
(
"(%p)
\n
"
,
This
);
return
&
This
->
IContextMenu
2
_iface
;
return
(
IContextMenu2
*
)
&
This
->
IContextMenu
3
_iface
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment