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
2af42008
Commit
2af42008
authored
Aug 02, 2005
by
Vitaly Lipatov
Committed by
Alexandre Julliard
Aug 02, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use STATEIMAGEINDEX / INDEXTOSTATEIMAGEMASK instead of bit
operations.
parent
7be607f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
listview.c
dlls/comctl32/listview.c
+18
-15
No files found.
dlls/comctl32/listview.c
View file @
2af42008
...
...
@@ -379,6 +379,9 @@ typedef struct tagLISTVIEW_INFO
#define LV_FL_DT_FLAGS (DT_TOP | DT_NOPREFIX | DT_EDITCONTROL | DT_CENTER | DT_WORDBREAK | DT_NOCLIP)
#define LV_SL_DT_FLAGS (DT_VCENTER | DT_NOPREFIX | DT_EDITCONTROL | DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS)
/* Image index from state */
#define STATEIMAGEINDEX(x) (((x) & LVIS_STATEIMAGEMASK) >> 12)
/* The time in milliseconds to reset the search in the list */
#define KEY_DELAY 450
...
...
@@ -3729,7 +3732,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS
/* state icons */
if
(
infoPtr
->
himlState
&&
!
IsRectEmpty
(
&
rcState
))
{
UINT
uStateImage
=
(
lvItem
.
state
&
LVIS_STATEIMAGEMASK
)
>>
12
;
UINT
uStateImage
=
STATEIMAGEINDEX
(
lvItem
.
state
)
;
if
(
uStateImage
)
{
TRACE
(
"uStateImage=%d
\n
"
,
uStateImage
);
...
...
@@ -6100,7 +6103,7 @@ static INT LISTVIEW_HitTest(LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht, BOOL s
lpht
->
flags
|=
LVHT_ONITEMICON
;
else
if
(
PtInRect
(
&
rcLabel
,
opt
))
lpht
->
flags
|=
LVHT_ONITEMLABEL
;
else
if
(
infoPtr
->
himlState
&&
((
lvItem
.
state
&
LVIS_STATEIMAGEMASK
)
>>
12
)
&&
PtInRect
(
&
rcState
,
opt
))
else
if
(
infoPtr
->
himlState
&&
STATEIMAGEINDEX
(
lvItem
.
state
)
&&
PtInRect
(
&
rcState
,
opt
))
lpht
->
flags
|=
LVHT_ONITEMSTATEICON
;
if
(
lpht
->
flags
&
LVHT_ONITEM
)
lpht
->
flags
&=
~
LVHT_NOWHERE
;
...
...
@@ -6829,7 +6832,7 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD dwM
*
* PARAMETER(S):
* [I] infoPtr : valid pointer to the listview structure
* [I
} hCuros
r : the new hot cursor handle
* [I
] hCurso
r : the new hot cursor handle
*
* RETURN:
* Returns the previous hot cursor
...
...
@@ -8103,13 +8106,13 @@ static LRESULT LISTVIEW_LButtonDblClk(LISTVIEW_INFO *infoPtr, WORD wKey, INT x,
* DESCRIPTION:
* Processes mouse down messages (left mouse button).
*
* PARAMETER
(S)
:
*
[I] infoPtr :
valid pointer to the listview structure
*
[I] wKey :
key flag
*
[I] x,y :
mouse coordinate
* PARAMETER
S
:
*
infoPtr [I ]
valid pointer to the listview structure
*
wKey [I ]
key flag
*
x,y [I ]
mouse coordinate
*
* RETURN:
* Zero
*
Zero
*/
static
LRESULT
LISTVIEW_LButtonDown
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
INT
x
,
INT
y
)
{
...
...
@@ -8139,12 +8142,12 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN
{
if
((
infoPtr
->
dwLvExStyle
&
LVS_EX_CHECKBOXES
)
&&
(
lvHitTestInfo
.
flags
&
LVHT_ONITEMSTATEICON
))
{
DWORD
state
=
LISTVIEW_GetItemState
(
infoPtr
,
nItem
,
LVIS_STATEIMAGEMASK
)
>>
12
;
DWORD
state
=
STATEIMAGEINDEX
(
LISTVIEW_GetItemState
(
infoPtr
,
nItem
,
LVIS_STATEIMAGEMASK
))
;
if
(
state
==
1
||
state
==
2
)
{
LVITEMW
lvitem
;
state
^=
3
;
lvitem
.
state
=
state
<<
12
;
lvitem
.
state
=
INDEXTOSTATEIMAGEMASK
(
state
)
;
lvitem
.
stateMask
=
LVIS_STATEIMAGEMASK
;
LISTVIEW_SetItemState
(
infoPtr
,
nItem
,
&
lvitem
);
}
...
...
@@ -8218,13 +8221,13 @@ static LRESULT LISTVIEW_LButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, IN
* DESCRIPTION:
* Processes mouse up messages (left mouse button).
*
* PARAMETER
(S)
:
*
[I] infoPtr :
valid pointer to the listview structure
*
[I] wKey :
key flag
*
[I] x,y :
mouse coordinate
* PARAMETER
S
:
*
infoPtr [I ]
valid pointer to the listview structure
*
wKey [I ]
key flag
*
x,y [I ]
mouse coordinate
*
* RETURN:
* Zero
*
Zero
*/
static
LRESULT
LISTVIEW_LButtonUp
(
LISTVIEW_INFO
*
infoPtr
,
WORD
wKey
,
INT
x
,
INT
y
)
{
...
...
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