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
bad1dda9
Commit
bad1dda9
authored
May 12, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: A couple of tests for changing item attributes.
parent
b4e7e257
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
1 deletion
+64
-1
listview.c
dlls/comctl32/tests/listview.c
+62
-0
msg.h
dlls/comctl32/tests/msg.h
+2
-1
No files found.
dlls/comctl32/tests/listview.c
View file @
bad1dda9
...
...
@@ -168,6 +168,18 @@ static const struct message forward_erasebkgnd_parent_seq[] = {
{
0
}
};
static
const
struct
message
ownderdata_select_focus_parent_seq
[]
=
{
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
LVN_ITEMCHANGED
},
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
LVN_GETDISPINFOA
},
{
0
}
};
static
const
struct
message
textcallback_set_again_parent_seq
[]
=
{
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
LVN_ITEMCHANGING
},
{
WM_NOTIFY
,
sent
|
id
,
0
,
0
,
LVN_ITEMCHANGED
},
{
0
}
};
struct
subclass_info
{
WNDPROC
oldproc
;
...
...
@@ -184,6 +196,7 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
if
(
defwndproc_counter
)
msg
.
flags
|=
defwinproc
;
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
if
(
message
==
WM_NOTIFY
&&
lParam
)
msg
.
id
=
((
NMHDR
*
)
lParam
)
->
code
;
/* log system messages, except for painting */
if
(
message
<
WM_USER
&&
...
...
@@ -827,6 +840,26 @@ static void test_items(void)
r
=
SendMessage
(
hwnd
,
LVM_GETITEMA
,
0
,
(
LPARAM
)
&
item
);
ok
(
r
!=
0
,
"ret %d
\n
"
,
r
);
/* set text to callback value already having it */
r
=
SendMessage
(
hwnd
,
LVM_DELETEALLITEMS
,
0
,
0
);
expect
(
TRUE
,
r
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
mask
=
LVIF_TEXT
;
item
.
pszText
=
LPSTR_TEXTCALLBACK
;
item
.
iItem
=
0
;
r
=
SendMessage
(
hwnd
,
LVM_INSERTITEMA
,
0
,
(
LPARAM
)
&
item
);
ok
(
r
==
0
,
"ret %d
\n
"
,
r
);
memset
(
&
item
,
0
,
sizeof
(
item
));
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
item
.
pszText
=
LPSTR_TEXTCALLBACK
;
r
=
SendMessage
(
hwnd
,
LVM_SETITEMTEXT
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
r
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
textcallback_set_again_parent_seq
,
"check callback text comparison rule"
,
TRUE
);
DestroyWindow
(
hwnd
);
}
...
...
@@ -1983,6 +2016,35 @@ static void test_ownerdata(void)
res
=
SendMessageA
(
hwnd
,
LVM_SETITEM
,
0
,
(
LPARAM
)
&
item
);
expect
(
FALSE
,
res
);
DestroyWindow
(
hwnd
);
/* check notifications after focused/selected changed */
hwnd
=
create_listview_control
(
LVS_OWNERDATA
);
ok
(
hwnd
!=
NULL
,
"failed to create a listview window
\n
"
);
res
=
SendMessageA
(
hwnd
,
LVM_SETITEMCOUNT
,
1
,
0
);
ok
(
res
!=
0
,
"Expected LVM_SETITEMCOUNT to succeed
\n
"
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
stateMask
=
LVIS_SELECTED
;
item
.
state
=
LVIS_SELECTED
;
res
=
SendMessageA
(
hwnd
,
LVM_SETITEMSTATE
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
res
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
ownderdata_select_focus_parent_seq
,
"ownerdata select notification"
,
TRUE
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
memset
(
&
item
,
0
,
sizeof
(
item
));
item
.
stateMask
=
LVIS_FOCUSED
;
item
.
state
=
LVIS_FOCUSED
;
res
=
SendMessageA
(
hwnd
,
LVM_SETITEMSTATE
,
0
,
(
LPARAM
)
&
item
);
expect
(
TRUE
,
res
);
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
ownderdata_select_focus_parent_seq
,
"ownerdata focus notification"
,
TRUE
);
DestroyWindow
(
hwnd
);
}
static
void
test_norecompute
(
void
)
...
...
dlls/comctl32/tests/msg.h
View file @
bad1dda9
...
...
@@ -47,7 +47,8 @@ struct message
msg_flags_t
flags
;
/* message props */
WPARAM
wParam
;
/* expected value of wParam */
LPARAM
lParam
;
/* expected value of lParam */
UINT
id
;
/* id of the window */
UINT
id
;
/* extra message data: id of the window,
notify code etc. */
};
struct
msg_sequence
...
...
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