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
d1594aad
Commit
d1594aad
authored
May 17, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/header: Implement HDM_SETFILTERCHANGETIMEOUT.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
97fea6d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
header.c
dlls/comctl32/header.c
+12
-1
header.c
dlls/comctl32/tests/header.c
+12
-1
No files found.
dlls/comctl32/header.c
View file @
d1594aad
...
...
@@ -84,6 +84,7 @@ typedef struct
INT
iHotItem
;
/* index of hot item (cursor is over this item) */
INT
iHotDivider
;
/* index of the hot divider (used while dragging an item or by HDM_SETHOTDIVIDER) */
INT
iMargin
;
/* width of the margin that surrounds a bitmap */
INT
filter_change_timeout
;
/* change timeout set with HDM_SETFILTERCHANGETIMEOUT */
HIMAGELIST
himl
;
/* handle to an image list (may be 0) */
HEADER_ITEM
*
items
;
/* pointer to array of HEADER_ITEM's */
...
...
@@ -1540,6 +1541,7 @@ HEADER_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
infoPtr
->
iMargin
=
3
*
GetSystemMetrics
(
SM_CXEDGE
);
infoPtr
->
nNotifyFormat
=
SendMessageW
(
infoPtr
->
hwndNotify
,
WM_NOTIFYFORMAT
,
(
WPARAM
)
hwnd
,
NF_QUERY
);
infoPtr
->
filter_change_timeout
=
1000
;
hdc
=
GetDC
(
0
);
hOldFont
=
SelectObject
(
hdc
,
GetStockObject
(
SYSTEM_FONT
));
...
...
@@ -2054,6 +2056,14 @@ static LRESULT HEADER_ThemeChanged(const HEADER_INFO *infoPtr)
return
0
;
}
static
INT
HEADER_SetFilterChangeTimeout
(
HEADER_INFO
*
infoPtr
,
INT
timeout
)
{
INT
old_timeout
=
infoPtr
->
filter_change_timeout
;
if
(
timeout
!=
0
)
infoPtr
->
filter_change_timeout
=
timeout
;
return
old_timeout
;
}
static
LRESULT
WINAPI
HEADER_WindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
...
...
@@ -2112,7 +2122,8 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case
HDM_SETBITMAPMARGIN
:
return
HEADER_SetBitmapMargin
(
infoPtr
,
(
INT
)
wParam
);
/* case HDM_SETFILTERCHANGETIMEOUT: */
case
HDM_SETFILTERCHANGETIMEOUT
:
return
HEADER_SetFilterChangeTimeout
(
infoPtr
,
(
INT
)
lParam
);
case
HDM_SETHOTDIVIDER
:
return
HEADER_SetHotDivider
(
infoPtr
,
wParam
,
lParam
);
...
...
dlls/comctl32/tests/header.c
View file @
d1594aad
...
...
@@ -994,8 +994,19 @@ static void test_hdm_filterMessages(HWND hParent)
ok_sequence
(
sequences
,
PARENT_SEQ_INDEX
,
add_header_to_parent_seq
,
"adder header control to parent"
,
FALSE
);
timeout
=
SendMessageA
(
hChild
,
HDM_SETFILTERCHANGETIMEOUT
,
0
,
0
);
ok
(
timeout
==
1000
,
"got %d
\n
"
,
timeout
);
timeout
=
SendMessageA
(
hChild
,
HDM_SETFILTERCHANGETIMEOUT
,
0
,
0
);
ok
(
timeout
==
1000
,
"got %d
\n
"
,
timeout
);
timeout
=
SendMessageA
(
hChild
,
HDM_SETFILTERCHANGETIMEOUT
,
0
,
-
100
);
ok
(
timeout
==
1000
,
"got %d
\n
"
,
timeout
);
timeout
=
SendMessageA
(
hChild
,
HDM_SETFILTERCHANGETIMEOUT
,
1
,
100
);
SendMessageA
(
hChild
,
HDM_SETFILTERCHANGETIMEOUT
,
1
,
timeout
);
ok
(
timeout
==
-
100
,
"got %d
\n
"
,
timeout
);
retVal
=
SendMessageA
(
hChild
,
HDM_SETFILTERCHANGETIMEOUT
,
1
,
timeout
);
ok
(
retVal
==
100
,
"got %d
\n
"
,
retVal
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
...
...
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