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
ad4ccd18
Commit
ad4ccd18
authored
Jun 11, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorerframe: Internally make calls with interface wrappers.
parent
3d691afd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
19 deletions
+30
-19
nstc.c
dlls/explorerframe/nstc.c
+15
-19
nstc.c
dlls/explorerframe/tests/nstc.c
+15
-0
No files found.
dlls/explorerframe/nstc.c
View file @
ad4ccd18
...
...
@@ -1056,7 +1056,7 @@ static HRESULT WINAPI NSTC2_fnAppendRoot(INameSpaceTreeControl2* iface,
root_count
=
list_count
(
&
This
->
roots
);
return
NSTC2_fn
InsertRoot
(
iface
,
root_count
,
psiRoot
,
grfEnumFlags
,
grfRootStyle
,
pif
);
return
INameSpaceTreeControl2_
InsertRoot
(
iface
,
root_count
,
psiRoot
,
grfEnumFlags
,
grfRootStyle
,
pif
);
}
static
HRESULT
WINAPI
NSTC2_fnRemoveRoot
(
INameSpaceTreeControl2
*
iface
,
...
...
@@ -1101,19 +1101,16 @@ static HRESULT WINAPI NSTC2_fnRemoveAllRoots(INameSpaceTreeControl2* iface)
{
NSTC2Impl
*
This
=
impl_from_INameSpaceTreeControl2
(
iface
);
nstc_root
*
cur1
,
*
cur2
;
UINT
removed
=
0
;
TRACE
(
"%p
\n
"
,
This
);
if
(
list_empty
(
&
This
->
roots
))
return
E_INVALIDARG
;
LIST_FOR_EACH_ENTRY_SAFE
(
cur1
,
cur2
,
&
This
->
roots
,
nstc_root
,
entry
)
{
NSTC2_fnRemoveRoot
(
iface
,
cur1
->
psi
);
removed
++
;
}
INameSpaceTreeControl2_RemoveRoot
(
iface
,
cur1
->
psi
);
if
(
removed
)
return
S_OK
;
else
return
E_INVALIDARG
;
return
S_OK
;
}
static
HRESULT
WINAPI
NSTC2_fnGetRootItems
(
INameSpaceTreeControl2
*
iface
,
...
...
@@ -1253,7 +1250,7 @@ static HRESULT WINAPI NSTC2_fnGetSelectedItems(INameSpaceTreeControl2* iface,
{
NSTC2Impl
*
This
=
impl_from_INameSpaceTreeControl2
(
iface
);
IShellItem
*
psiselected
;
HRESULT
hr
;
TRACE
(
"%p (%p)
\n
"
,
This
,
psiaItems
);
psiselected
=
get_selected_shellitem
(
This
);
...
...
@@ -1263,9 +1260,8 @@ static HRESULT WINAPI NSTC2_fnGetSelectedItems(INameSpaceTreeControl2* iface,
return
E_FAIL
;
}
hr
=
SHCreateShellItemArrayFromShellItem
(
psiselected
,
&
IID_IShellItemArray
,
return
SHCreateShellItemArrayFromShellItem
(
psiselected
,
&
IID_IShellItemArray
,
(
void
**
)
psiaItems
);
return
hr
;
}
static
HRESULT
WINAPI
NSTC2_fnGetItemCustomState
(
INameSpaceTreeControl2
*
iface
,
...
...
@@ -1553,22 +1549,19 @@ static const INameSpaceTreeControl2Vtbl vt_INameSpaceTreeControl2 = {
static
HRESULT
WINAPI
IOW_fnQueryInterface
(
IOleWindow
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
NSTC2Impl
*
This
=
impl_from_IOleWindow
(
iface
);
TRACE
(
"%p
\n
"
,
This
);
return
NSTC2_fnQueryInterface
(
&
This
->
INameSpaceTreeControl2_iface
,
riid
,
ppvObject
);
return
INameSpaceTreeControl2_QueryInterface
(
&
This
->
INameSpaceTreeControl2_iface
,
riid
,
ppvObject
);
}
static
ULONG
WINAPI
IOW_fnAddRef
(
IOleWindow
*
iface
)
{
NSTC2Impl
*
This
=
impl_from_IOleWindow
(
iface
);
TRACE
(
"%p
\n
"
,
This
);
return
NSTC2_fnAddRef
(
&
This
->
INameSpaceTreeControl2_iface
);
return
INameSpaceTreeControl2_AddRef
(
&
This
->
INameSpaceTreeControl2_iface
);
}
static
ULONG
WINAPI
IOW_fnRelease
(
IOleWindow
*
iface
)
{
NSTC2Impl
*
This
=
impl_from_IOleWindow
(
iface
);
TRACE
(
"%p
\n
"
,
This
);
return
NSTC2_fnRelease
(
&
This
->
INameSpaceTreeControl2_iface
);
return
INameSpaceTreeControl2_Release
(
&
This
->
INameSpaceTreeControl2_iface
);
}
static
HRESULT
WINAPI
IOW_fnGetWindow
(
IOleWindow
*
iface
,
HWND
*
phwnd
)
...
...
@@ -1612,6 +1605,9 @@ HRESULT NamespaceTreeControl_Constructor(IUnknown *pUnkOuter, REFIID riid, void
EFRAME_LockModule
();
nstc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
NSTC2Impl
));
if
(
!
nstc
)
return
E_OUTOFMEMORY
;
nstc
->
ref
=
1
;
nstc
->
INameSpaceTreeControl2_iface
.
lpVtbl
=
&
vt_INameSpaceTreeControl2
;
nstc
->
IOleWindow_iface
.
lpVtbl
=
&
vt_IOleWindow
;
...
...
dlls/explorerframe/tests/nstc.c
View file @
ad4ccd18
...
...
@@ -1170,6 +1170,11 @@ static void test_basics(void)
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
5
,
psidesktop
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
roots
[
0
]
=
psitestdir2
;
roots
[
1
]
=
psidesktop
;
roots
[
2
]
=
psidesktop2
;
roots
[
3
]
=
psitestdir
;
roots
[
4
]
=
psitestdir2
;
roots
[
5
]
=
psidesktop
;
roots
[
6
]
=
NULL
;
verify_root_order
(
pnstc
,
roots
);
...
...
@@ -1177,6 +1182,9 @@ static void test_basics(void)
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
3
,
psitestdir2
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
roots
[
0
]
=
psitestdir2
;
roots
[
1
]
=
psidesktop
;
roots
[
2
]
=
psidesktop2
;
roots
[
3
]
=
psitestdir2
;
roots
[
4
]
=
psitestdir
;
roots
[
5
]
=
psitestdir2
;
...
...
@@ -1187,6 +1195,13 @@ static void test_basics(void)
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir2
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
roots
[
0
]
=
psitestdir2
;
roots
[
1
]
=
psidesktop
;
roots
[
2
]
=
psidesktop2
;
roots
[
3
]
=
psitestdir2
;
roots
[
4
]
=
psitestdir
;
roots
[
5
]
=
psitestdir2
;
roots
[
6
]
=
psidesktop
;
roots
[
7
]
=
psitestdir2
;
roots
[
8
]
=
NULL
;
verify_root_order
(
pnstc
,
roots
);
...
...
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