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
c16b65cd
Commit
c16b65cd
authored
Jan 21, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Add partial implementation of LVM_GETNEXTITEMINDEX.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b74b6343
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
listview.c
dlls/comctl32/listview.c
+14
-0
listview.c
dlls/comctl32/tests/listview.c
+32
-0
No files found.
dlls/comctl32/listview.c
View file @
c16b65cd
...
...
@@ -7452,6 +7452,17 @@ static INT LISTVIEW_GetNextItem(const LISTVIEW_INFO *infoPtr, INT nItem, UINT uF
return
-
1
;
}
static
BOOL
LISTVIEW_GetNextItemIndex
(
const
LISTVIEW_INFO
*
infoPtr
,
LVITEMINDEX
*
index
,
UINT
flags
)
{
/* FIXME: specified item group is ignored */
if
(
!
index
)
return
FALSE
;
index
->
iItem
=
LISTVIEW_GetNextItem
(
infoPtr
,
index
->
iItem
,
flags
);
return
index
->
iItem
!=
-
1
;
}
/* LISTVIEW_GetNumberOfWorkAreas */
/***
...
...
@@ -11426,6 +11437,9 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
LVM_GETNEXTITEM
:
return
LISTVIEW_GetNextItem
(
infoPtr
,
(
INT
)
wParam
,
LOWORD
(
lParam
));
case
LVM_GETNEXTITEMINDEX
:
return
LISTVIEW_GetNextItemIndex
(
infoPtr
,
(
LVITEMINDEX
*
)
wParam
,
lParam
);
case
LVM_GETNUMBEROFWORKAREAS
:
FIXME
(
"LVM_GETNUMBEROFWORKAREAS: unimplemented
\n
"
);
return
1
;
...
...
dlls/comctl32/tests/listview.c
View file @
c16b65cd
...
...
@@ -6624,6 +6624,37 @@ static void test_selected_column(void)
}
}
static
void
test_LVM_GETNEXTITEMINDEX
(
void
)
{
LVITEMINDEX
index
;
HWND
hwnd
;
BOOL
ret
;
hwnd
=
create_listview_control
(
LVS_REPORT
);
insert_item
(
hwnd
,
0
);
insert_item
(
hwnd
,
1
);
ret
=
SendMessageA
(
hwnd
,
LVM_GETNEXTITEMINDEX
,
0
,
LVNI_ALL
);
ok
(
!
ret
,
"Unexpected return value %d.
\n
"
,
ret
);
index
.
iItem
=
-
1
;
index
.
iGroup
=
0
;
ret
=
SendMessageA
(
hwnd
,
LVM_GETNEXTITEMINDEX
,
(
WPARAM
)
&
index
,
LVNI_ALL
);
ok
(
ret
,
"Unexpected return value %d.
\n
"
,
ret
);
ok
(
index
.
iItem
==
0
,
"Unexpected item index %d.
\n
"
,
index
.
iItem
);
ret
=
SendMessageA
(
hwnd
,
LVM_GETNEXTITEMINDEX
,
(
WPARAM
)
&
index
,
LVNI_ALL
);
ok
(
ret
,
"Unexpected return value %d.
\n
"
,
ret
);
ok
(
index
.
iItem
==
1
,
"Unexpected item index %d.
\n
"
,
index
.
iItem
);
ret
=
SendMessageA
(
hwnd
,
LVM_GETNEXTITEMINDEX
,
(
WPARAM
)
&
index
,
LVNI_ALL
);
ok
(
!
ret
,
"Unexpected return value %d.
\n
"
,
ret
);
ok
(
index
.
iItem
==
-
1
,
"Unexpected item index %d.
\n
"
,
index
.
iItem
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
listview
)
{
ULONG_PTR
ctx_cookie
;
...
...
@@ -6730,6 +6761,7 @@ START_TEST(listview)
test_LVM_GETCOUNTPERPAGE
();
test_item_state_change
();
test_selected_column
();
test_LVM_GETNEXTITEMINDEX
();
unload_v6_module
(
ctx_cookie
,
hCtx
);
...
...
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