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
96b90570
Commit
96b90570
authored
Nov 26, 2003
by
Huw Davies
Committed by
Alexandre Julliard
Nov 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge GetItem[AW] into GetItemT.
parent
97903d26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
62 deletions
+36
-62
treeview.c
dlls/comctl32/treeview.c
+36
-62
No files found.
dlls/comctl32/treeview.c
View file @
96b90570
...
@@ -2004,7 +2004,7 @@ TREEVIEW_GetVisibleCount(TREEVIEW_INFO *infoPtr)
...
@@ -2004,7 +2004,7 @@ TREEVIEW_GetVisibleCount(TREEVIEW_INFO *infoPtr)
static
LRESULT
static
LRESULT
TREEVIEW_GetItem
W
(
TREEVIEW_INFO
*
infoPtr
,
LPTVITEMEXW
tvItem
)
TREEVIEW_GetItem
T
(
TREEVIEW_INFO
*
infoPtr
,
LPTVITEMEXW
tvItem
,
BOOL
isW
)
{
{
TREEVIEW_ITEM
*
wineItem
;
TREEVIEW_ITEM
*
wineItem
;
...
@@ -2015,7 +2015,11 @@ TREEVIEW_GetItemW(TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem)
...
@@ -2015,7 +2015,11 @@ TREEVIEW_GetItemW(TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem)
TREEVIEW_UpdateDispInfo
(
infoPtr
,
wineItem
,
tvItem
->
mask
);
TREEVIEW_UpdateDispInfo
(
infoPtr
,
wineItem
,
tvItem
->
mask
);
if
(
tvItem
->
mask
&
TVIF_CHILDREN
)
if
(
tvItem
->
mask
&
TVIF_CHILDREN
)
{
if
(
TVIF_CHILDREN
==
I_CHILDRENCALLBACK
)
FIXME
(
"I_CHILDRENCALLBACK not supported
\n
"
);
tvItem
->
cChildren
=
wineItem
->
cChildren
;
tvItem
->
cChildren
=
wineItem
->
cChildren
;
}
if
(
tvItem
->
mask
&
TVIF_HANDLE
)
if
(
tvItem
->
mask
&
TVIF_HANDLE
)
tvItem
->
hItem
=
wineItem
;
tvItem
->
hItem
=
wineItem
;
...
@@ -2034,16 +2038,40 @@ TREEVIEW_GetItemW(TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem)
...
@@ -2034,16 +2038,40 @@ TREEVIEW_GetItemW(TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem)
if
(
tvItem
->
mask
&
TVIF_SELECTEDIMAGE
)
if
(
tvItem
->
mask
&
TVIF_SELECTEDIMAGE
)
tvItem
->
iSelectedImage
=
wineItem
->
iSelectedImage
;
tvItem
->
iSelectedImage
=
wineItem
->
iSelectedImage
;
if
(
tvItem
->
mask
&
TVIF_STATE
)
{
if
(
tvItem
->
mask
&
TVIF_STATE
)
/* Careful here - Windows ignores the stateMask when you get the state
/* Careful here - Windows ignores the stateMask when you get the state
That contradicts the documentation, but makes more common sense, masking
That contradicts the documentation, but makes more common sense, masking
retrieval in this way seems overkill */
retrieval in this way seems overkill */
tvItem
->
state
=
wineItem
->
state
;
tvItem
->
state
=
wineItem
->
state
;
}
if
(
tvItem
->
mask
&
TVIF_TEXT
)
if
(
tvItem
->
mask
&
TVIF_TEXT
)
lstrcpynW
(
tvItem
->
pszText
,
wineItem
->
pszText
,
tvItem
->
cchTextMax
);
{
if
(
isW
)
{
if
(
wineItem
->
pszText
==
LPSTR_TEXTCALLBACKW
)
{
tvItem
->
pszText
=
LPSTR_TEXTCALLBACKW
;
FIXME
(
" GetItem called with LPSTR_TEXTCALLBACK
\n
"
);
}
else
{
lstrcpynW
(
tvItem
->
pszText
,
wineItem
->
pszText
,
tvItem
->
cchTextMax
);
}
}
else
{
if
(
wineItem
->
pszText
==
LPSTR_TEXTCALLBACKW
)
{
tvItem
->
pszText
=
(
LPWSTR
)
LPSTR_TEXTCALLBACKA
;
FIXME
(
" GetItem called with LPSTR_TEXTCALLBACK
\n
"
);
}
else
{
WideCharToMultiByte
(
CP_ACP
,
0
,
wineItem
->
pszText
,
-
1
,
(
LPSTR
)
tvItem
->
pszText
,
tvItem
->
cchTextMax
,
NULL
,
NULL
);
}
}
}
TRACE
(
"item <%p>, txt %p, img %p, mask %x
\n
"
,
TRACE
(
"item <%p>, txt %p, img %p, mask %x
\n
"
,
wineItem
,
tvItem
->
pszText
,
&
tvItem
->
iImage
,
tvItem
->
mask
);
wineItem
,
tvItem
->
pszText
,
&
tvItem
->
iImage
,
tvItem
->
mask
);
...
@@ -2109,60 +2137,6 @@ TREEVIEW_SetItemW(TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem)
...
@@ -2109,60 +2137,6 @@ TREEVIEW_SetItemW(TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem)
}
}
static
LRESULT
static
LRESULT
TREEVIEW_GetItemA
(
TREEVIEW_INFO
*
infoPtr
,
LPTVITEMEXA
tvItem
)
{
TREEVIEW_ITEM
*
wineItem
;
wineItem
=
tvItem
->
hItem
;
if
(
!
TREEVIEW_ValidItem
(
infoPtr
,
wineItem
))
return
FALSE
;
TREEVIEW_UpdateDispInfo
(
infoPtr
,
wineItem
,
tvItem
->
mask
);
if
(
tvItem
->
mask
&
TVIF_CHILDREN
)
{
if
(
TVIF_CHILDREN
==
I_CHILDRENCALLBACK
)
FIXME
(
"I_CHILDRENCALLBACK not supported
\n
"
);
tvItem
->
cChildren
=
wineItem
->
cChildren
;
}
if
(
tvItem
->
mask
&
TVIF_HANDLE
)
{
tvItem
->
hItem
=
wineItem
;
}
if
(
tvItem
->
mask
&
TVIF_IMAGE
)
{
tvItem
->
iImage
=
wineItem
->
iImage
;
}
if
(
tvItem
->
mask
&
TVIF_INTEGRAL
)
{
tvItem
->
iIntegral
=
wineItem
->
iIntegral
;
}
/* undocumented: windows ignores TVIF_PARAM and
* always sets lParam */
tvItem
->
lParam
=
wineItem
->
lParam
;
if
(
tvItem
->
mask
&
TVIF_SELECTEDIMAGE
)
{
tvItem
->
iSelectedImage
=
wineItem
->
iSelectedImage
;
}
if
(
tvItem
->
mask
&
TVIF_STATE
)
{
tvItem
->
state
=
wineItem
->
state
&
tvItem
->
stateMask
;
}
if
(
tvItem
->
mask
&
TVIF_TEXT
)
{
if
(
wineItem
->
pszText
==
LPSTR_TEXTCALLBACKW
)
{
tvItem
->
pszText
=
LPSTR_TEXTCALLBACKA
;
FIXME
(
" GetItem called with LPSTR_TEXTCALLBACK
\n
"
);
}
else
if
(
wineItem
->
pszText
)
{
TRACE
(
"orig str %s at %p
\n
"
,
debugstr_w
(
wineItem
->
pszText
),
wineItem
->
pszText
);
WideCharToMultiByte
(
CP_ACP
,
0
,
wineItem
->
pszText
,
-
1
,
tvItem
->
pszText
,
tvItem
->
cchTextMax
,
NULL
,
NULL
);
}
}
TRACE
(
"item <%p>, txt %p, img %p, action %x
\n
"
,
tvItem
,
tvItem
->
pszText
,
&
tvItem
->
iImage
,
tvItem
->
mask
);
return
TRUE
;
}
static
LRESULT
TREEVIEW_SetItemA
(
TREEVIEW_INFO
*
infoPtr
,
LPTVITEMEXA
tvItem
)
TREEVIEW_SetItemA
(
TREEVIEW_INFO
*
infoPtr
,
LPTVITEMEXA
tvItem
)
{
{
TVITEMEXW
tvItemW
;
TVITEMEXW
tvItemW
;
...
@@ -4379,7 +4353,7 @@ static INT TREEVIEW_ProcessLetterKeys(
...
@@ -4379,7 +4353,7 @@ static INT TREEVIEW_ProcessLetterKeys(
item
.
hItem
=
idx
;
item
.
hItem
=
idx
;
item
.
pszText
=
buffer
;
item
.
pszText
=
buffer
;
item
.
cchTextMax
=
sizeof
(
buffer
);
item
.
cchTextMax
=
sizeof
(
buffer
);
TREEVIEW_GetItem
W
(
infoPtr
,
&
item
);
TREEVIEW_GetItem
T
(
infoPtr
,
&
item
,
TRUE
);
/* check for a match */
/* check for a match */
if
(
strncmpiW
(
item
.
pszText
,
infoPtr
->
szSearchParam
,
infoPtr
->
nSearchParamLength
)
==
0
)
{
if
(
strncmpiW
(
item
.
pszText
,
infoPtr
->
szSearchParam
,
infoPtr
->
nSearchParamLength
)
==
0
)
{
...
@@ -5262,10 +5236,10 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -5262,10 +5236,10 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
0
;
return
0
;
case
TVM_GETITEMA
:
case
TVM_GETITEMA
:
return
TREEVIEW_GetItem
A
(
infoPtr
,
(
LPTVITEMEXA
)
lParam
);
return
TREEVIEW_GetItem
T
(
infoPtr
,
(
LPTVITEMEXW
)
lParam
,
FALSE
);
case
TVM_GETITEMW
:
case
TVM_GETITEMW
:
return
TREEVIEW_GetItem
W
(
infoPtr
,
(
LPTVITEMEXW
)
lParam
);
return
TREEVIEW_GetItem
T
(
infoPtr
,
(
LPTVITEMEXW
)
lParam
,
TRUE
);
case
TVM_GETITEMHEIGHT
:
case
TVM_GETITEMHEIGHT
:
return
TREEVIEW_GetItemHeight
(
infoPtr
);
return
TREEVIEW_GetItemHeight
(
infoPtr
);
...
...
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