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
29bf096f
Commit
29bf096f
authored
Aug 18, 2010
by
David Hedberg
Committed by
Alexandre Julliard
Aug 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorerframe: Implement GetNextItem.
parent
31f53851
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
2 deletions
+91
-2
nstc.c
dlls/explorerframe/nstc.c
+37
-2
nstc.c
dlls/explorerframe/tests/nstc.c
+54
-0
No files found.
dlls/explorerframe/nstc.c
View file @
29bf096f
...
...
@@ -1256,8 +1256,43 @@ static HRESULT WINAPI NSTC2_fnGetNextItem(INameSpaceTreeControl2* iface,
IShellItem
**
ppsiNext
)
{
NSTC2Impl
*
This
=
(
NSTC2Impl
*
)
iface
;
FIXME
(
"stub, %p (%p, %x, %p)
\n
"
,
This
,
psi
,
nstcgi
,
ppsiNext
);
return
E_NOTIMPL
;
HTREEITEM
hitem
,
hnext
;
UINT
tvgn
;
TRACE
(
"%p (%p, %x, %p)
\n
"
,
This
,
psi
,
nstcgi
,
ppsiNext
);
if
(
!
ppsiNext
)
return
E_POINTER
;
if
(
!
psi
)
return
E_FAIL
;
*
ppsiNext
=
NULL
;
hitem
=
treeitem_from_shellitem
(
This
,
psi
);
if
(
!
hitem
)
return
E_INVALIDARG
;
switch
(
nstcgi
)
{
case
NSTCGNI_NEXT
:
tvgn
=
TVGN_NEXT
;
break
;
case
NSTCGNI_NEXTVISIBLE
:
tvgn
=
TVGN_NEXTVISIBLE
;
break
;
case
NSTCGNI_PREV
:
tvgn
=
TVGN_PREVIOUS
;
break
;
case
NSTCGNI_PREVVISIBLE
:
tvgn
=
TVGN_PREVIOUSVISIBLE
;
break
;
case
NSTCGNI_PARENT
:
tvgn
=
TVGN_PARENT
;
break
;
case
NSTCGNI_CHILD
:
tvgn
=
TVGN_CHILD
;
break
;
case
NSTCGNI_FIRSTVISIBLE
:
tvgn
=
TVGN_FIRSTVISIBLE
;
break
;
case
NSTCGNI_LASTVISIBLE
:
tvgn
=
TVGN_LASTVISIBLE
;
break
;
default:
FIXME
(
"Unknown nstcgi value %d
\n
"
,
nstcgi
);
return
E_FAIL
;
}
hnext
=
(
HTREEITEM
)
SendMessageW
(
This
->
hwnd_tv
,
TVM_GETNEXTITEM
,
tvgn
,
(
WPARAM
)
hitem
);
if
(
hnext
)
{
*
ppsiNext
=
shellitem_from_treeitem
(
This
,
hnext
);
IShellItem_AddRef
(
*
ppsiNext
);
return
S_OK
;
}
return
E_FAIL
;
}
static
HRESULT
WINAPI
NSTC2_fnHitTest
(
INameSpaceTreeControl2
*
iface
,
...
...
dlls/explorerframe/tests/nstc.c
View file @
29bf096f
...
...
@@ -1329,6 +1329,7 @@ static void test_events(void)
IOleWindow
*
pow
;
LPITEMIDLIST
pidl_desktop
;
NSTCITEMSTATE
itemstate
;
IShellItem
*
psi
;
DWORD
cookie1
,
cookie2
;
HWND
hwnd_tv
;
HRESULT
hr
;
...
...
@@ -1797,6 +1798,59 @@ static void test_events(void)
ok_event_count
(
pnstceimpl
,
OnItemDeleted
,
1
);
ok_no_events
(
pnstceimpl
);
/* GetNextItem */
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
NULL
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Got (0x%08x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Got (0x%08x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
NULL
,
0
,
&
psi
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
0
,
&
psi
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
process_msgs
();
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_no_events
(
pnstceimpl
);
/* Get child from unexpanded and unfilled parent */
psi
=
(
void
*
)
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
NSTCGNI_CHILD
,
&
psi
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
psi
==
NULL
,
"psi is %p
\n
"
,
psi
);
process_msgs
();
ok_no_events
(
pnstceimpl
);
/* Expand and try again */
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_EXPANDED
,
0xffff
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
process_msgs
();
ok_event_count
(
pnstceimpl
,
OnBeforeExpand
,
1
);
ok_event_broken
(
pnstceimpl
,
OnItemAdded
);
/* Does not fire on Vista */
ok_event_count
(
pnstceimpl
,
OnAfterExpand
,
1
);
todo_wine
ok_event_count_broken
(
pnstceimpl
,
OnSelectionChanged
,
1
,
0
/*Vista */
);
ok_no_events
(
pnstceimpl
);
psi
=
(
void
*
)
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
NSTCGNI_CHILD
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
((
psi
!=
NULL
)
&&
(
psi
!=
(
void
*
)
0xDEADBEEF
),
"psi is %p
\n
"
,
psi
);
process_msgs
();
ok_no_events
(
pnstceimpl
);
if
(
SUCCEEDED
(
hr
))
IShellItem_Release
(
psi
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok_event_count
(
pnstceimpl
,
OnItemDeleted
,
1
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
...
...
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