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
2c190ab4
Commit
2c190ab4
authored
Sep 10, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Move some documented DPA definitions to public header, use PSDK names.
parent
e7304066
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
28 deletions
+28
-28
comctl32.h
dlls/comctl32/comctl32.h
+0
-12
dpa.c
dlls/comctl32/dpa.c
+8
-8
dpa.c
dlls/comctl32/tests/dpa.c
+3
-8
commctrl.h
include/commctrl.h
+17
-0
No files found.
dlls/comctl32/comctl32.h
View file @
2c190ab4
...
...
@@ -183,18 +183,6 @@ DWORD WINAPI GetSize (LPVOID);
INT
WINAPI
Str_GetPtrA
(
LPCSTR
,
LPSTR
,
INT
);
INT
WINAPI
Str_GetPtrW
(
LPCWSTR
,
LPWSTR
,
INT
);
INT
WINAPI
DPA_GetPtrIndex
(
HDPA
,
LPCVOID
);
BOOL
WINAPI
DPA_Grow
(
HDPA
,
INT
);
#define DPAM_NOSORT 0x0001
#define DPAM_INSERT 0x0004
#define DPAM_DELETE 0x0008
typedef
PVOID
(
CALLBACK
*
PFNDPAMERGE
)(
DWORD
,
PVOID
,
PVOID
,
LPARAM
);
BOOL
WINAPI
DPA_Merge
(
HDPA
,
HDPA
,
DWORD
,
PFNDPACOMPARE
,
PFNDPAMERGE
,
LPARAM
);
#define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
LRESULT
WINAPI
SetPathWordBreakProc
(
HWND
hwnd
,
BOOL
bSet
);
BOOL
WINAPI
MirrorIcon
(
HICON
*
phicon1
,
HICON
*
phicon2
);
...
...
dlls/comctl32/dpa.c
View file @
2c190ab4
...
...
@@ -241,7 +241,7 @@ BOOL WINAPI DPA_Merge (HDPA hdpa1, HDPA hdpa2, DWORD dwFlags,
if
(
IsBadCodePtr
((
FARPROC
)
pfnMerge
))
return
FALSE
;
if
(
!
(
dwFlags
&
DPAM_
NOSORT
))
{
if
(
!
(
dwFlags
&
DPAM_
SORTED
))
{
TRACE
(
"sorting dpa's!
\n
"
);
if
(
hdpa1
->
nItemCount
>
0
)
DPA_Sort
(
hdpa1
,
pfnCompare
,
lParam
);
...
...
@@ -269,14 +269,14 @@ BOOL WINAPI DPA_Merge (HDPA hdpa1, HDPA hdpa2, DWORD dwFlags,
do
{
if
(
nIndex
<
0
)
{
if
((
nCount
>=
0
)
&&
(
dwFlags
&
DPAM_
INSERT
))
{
if
((
nCount
>=
0
)
&&
(
dwFlags
&
DPAM_
UNION
))
{
/* Now insert the remaining new items into DPA 1 */
TRACE
(
"%d items to be inserted at start of DPA 1
\n
"
,
nCount
+
1
);
for
(
i
=
nCount
;
i
>=
0
;
i
--
)
{
PVOID
ptr
;
ptr
=
(
pfnMerge
)(
3
,
*
pWork2
,
NULL
,
lParam
);
ptr
=
(
pfnMerge
)(
DPAMM_INSERT
,
*
pWork2
,
NULL
,
lParam
);
if
(
!
ptr
)
return
FALSE
;
DPA_InsertPtr
(
hdpa1
,
0
,
ptr
);
...
...
@@ -293,7 +293,7 @@ BOOL WINAPI DPA_Merge (HDPA hdpa1, HDPA hdpa2, DWORD dwFlags,
{
PVOID
ptr
;
ptr
=
(
pfnMerge
)(
1
,
*
pWork1
,
*
pWork2
,
lParam
);
ptr
=
(
pfnMerge
)(
DPAMM_MERGE
,
*
pWork1
,
*
pWork2
,
lParam
);
if
(
!
ptr
)
return
FALSE
;
...
...
@@ -306,14 +306,14 @@ BOOL WINAPI DPA_Merge (HDPA hdpa1, HDPA hdpa2, DWORD dwFlags,
else
if
(
nResult
>
0
)
{
/* item in DPA 1 missing from DPA 2 */
if
(
dwFlags
&
DPAM_
DELETE
)
if
(
dwFlags
&
DPAM_
INTERSECT
)
{
/* Now delete the extra item in DPA1 */
PVOID
ptr
;
ptr
=
DPA_DeletePtr
(
hdpa1
,
hdpa1
->
nItemCount
-
1
);
(
pfnMerge
)(
2
,
ptr
,
NULL
,
lParam
);
(
pfnMerge
)(
DPAMM_DELETE
,
ptr
,
NULL
,
lParam
);
}
nIndex
--
;
pWork1
--
;
...
...
@@ -321,12 +321,12 @@ BOOL WINAPI DPA_Merge (HDPA hdpa1, HDPA hdpa2, DWORD dwFlags,
else
{
/* new item in DPA 2 */
if
(
dwFlags
&
DPAM_
INSERT
)
if
(
dwFlags
&
DPAM_
UNION
)
{
/* Now insert the new item in DPA 1 */
PVOID
ptr
;
ptr
=
(
pfnMerge
)(
3
,
*
pWork2
,
NULL
,
lParam
);
ptr
=
(
pfnMerge
)(
DPAMM_INSERT
,
*
pWork2
,
NULL
,
lParam
);
if
(
!
ptr
)
return
FALSE
;
DPA_InsertPtr
(
hdpa1
,
nIndex
+
1
,
ptr
);
...
...
dlls/comctl32/tests/dpa.c
View file @
2c190ab4
...
...
@@ -31,17 +31,12 @@
#include "wine/test.h"
#define DPAM_NOSORT 0x1
#define DPAM_INSERT 0x4
#define DPAM_DELETE 0x8
typedef
struct
_ITEMDATA
{
INT
iPos
;
PVOID
pvData
;
}
ITEMDATA
,
*
LPITEMDATA
;
typedef
PVOID
(
CALLBACK
*
PFNDPAMERGE
)(
UINT
,
PVOID
,
PVOID
,
LPARAM
);
typedef
HRESULT
(
CALLBACK
*
PFNDPASTM
)(
LPITEMDATA
,
IStream
*
,
LPARAM
);
static
HDPA
(
WINAPI
*
pDPA_Clone
)(
const
HDPA
,
const
HDPA
);
...
...
@@ -388,7 +383,7 @@ static void test_DPA_Merge(void)
ok
(
rc
,
"dw=0x%x
\n
"
,
dw
);
/* Delete all odd entries from dpa2 */
pDPA_Merge
(
dpa2
,
dpa
,
DPAM_
DELETE
,
pDPA_Merge
(
dpa2
,
dpa
,
DPAM_
INTERSECT
,
CB_CmpLT
,
CB_MergeDeleteOddSrc
,
0xdeadbeef
);
todo_wine
{
...
...
@@ -397,9 +392,9 @@ static void test_DPA_Merge(void)
}
/* Merge dpa3 into dpa2 and dpa */
pDPA_Merge
(
dpa
,
dpa3
,
DPAM_
INSERT
|
DPAM_NOSORT
,
pDPA_Merge
(
dpa
,
dpa3
,
DPAM_
UNION
|
DPAM_SORTED
,
CB_CmpLT
,
CB_MergeInsertSrc
,
0xdeadbeef
);
pDPA_Merge
(
dpa2
,
dpa3
,
DPAM_
INSERT
|
DPAM_NOSORT
,
pDPA_Merge
(
dpa2
,
dpa3
,
DPAM_
UNION
|
DPAM_SORTED
,
CB_CmpLT
,
CB_MergeInsertSrc
,
0xdeadbeef
);
rc
=
CheckDPA
(
dpa
,
0x123456
,
&
dw
);
...
...
include/commctrl.h
View file @
2c190ab4
...
...
@@ -4979,8 +4979,22 @@ INT WINAPI DSA_InsertItem(HDSA, INT, LPVOID);
struct
_DPA
;
typedef
struct
_DPA
*
HDPA
;
#define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
typedef
INT
(
CALLBACK
*
PFNDPAENUMCALLBACK
)(
LPVOID
,
LPVOID
);
typedef
INT
(
CALLBACK
*
PFNDPACOMPARE
)(
LPVOID
,
LPVOID
,
LPARAM
);
typedef
PVOID
(
CALLBACK
*
PFNDPAMERGE
)(
UINT
,
PVOID
,
PVOID
,
LPARAM
);
/* merge callback codes */
#define DPAMM_MERGE 1
#define DPAMM_DELETE 2
#define DPAMM_INSERT 3
/* merge options */
#define DPAM_SORTED 0x00000001
#define DPAM_NORMAL 0x00000002
#define DPAM_UNION 0x00000004
#define DPAM_INTERSECT 0x00000008
HDPA
WINAPI
DPA_Create
(
INT
);
BOOL
WINAPI
DPA_Destroy
(
HDPA
);
...
...
@@ -4988,11 +5002,14 @@ LPVOID WINAPI DPA_DeletePtr(HDPA, INT);
BOOL
WINAPI
DPA_DeleteAllPtrs
(
HDPA
);
BOOL
WINAPI
DPA_SetPtr
(
HDPA
,
INT
,
LPVOID
);
LPVOID
WINAPI
DPA_GetPtr
(
HDPA
,
INT
);
INT
WINAPI
DPA_GetPtrIndex
(
HDPA
,
LPCVOID
);
BOOL
WINAPI
DPA_Grow
(
HDPA
,
INT
);
INT
WINAPI
DPA_InsertPtr
(
HDPA
,
INT
,
LPVOID
);
BOOL
WINAPI
DPA_Sort
(
HDPA
,
PFNDPACOMPARE
,
LPARAM
);
void
WINAPI
DPA_EnumCallback
(
HDPA
,
PFNDPAENUMCALLBACK
,
LPVOID
);
void
WINAPI
DPA_DestroyCallback
(
HDPA
,
PFNDPAENUMCALLBACK
,
LPVOID
);
INT
WINAPI
DPA_Search
(
HDPA
,
LPVOID
,
INT
,
PFNDPACOMPARE
,
LPARAM
,
UINT
);
BOOL
WINAPI
DPA_Merge
(
HDPA
,
HDPA
,
DWORD
,
PFNDPACOMPARE
,
PFNDPAMERGE
,
LPARAM
);
BOOL
WINAPI
Str_SetPtrW
(
LPWSTR
*
,
LPCWSTR
);
...
...
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