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
6b78e24a
Commit
6b78e24a
authored
Dec 17, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Move EnumProps16 to wnd16.c.
parent
15000f32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
44 deletions
+63
-44
property.c
dlls/user32/property.c
+1
-44
wnd16.c
dlls/user32/wnd16.c
+62
-0
No files found.
dlls/user32/property.c
View file @
6b78e24a
...
...
@@ -26,9 +26,8 @@
#include "windef.h"
#include "winbase.h"
#include "w
ownt32
.h"
#include "w
inuser
.h"
#include "wine/unicode.h"
#include "wine/winuser16.h"
#include "wine/server.h"
/* size of buffer needed to store an atom string */
...
...
@@ -252,45 +251,3 @@ INT WINAPI EnumPropsExW(HWND hwnd, PROPENUMPROCEXW func, LPARAM lParam)
}
return
ret
;
}
/***********************************************************************
* EnumProps (USER.27)
*/
INT16
WINAPI
EnumProps16
(
HWND16
hwnd
,
PROPENUMPROC16
func
)
{
int
ret
=
-
1
,
i
,
count
;
property_data_t
*
list
=
get_properties
(
HWND_32
(
hwnd
),
&
count
);
if
(
list
)
{
char
string
[
ATOM_BUFFER_SIZE
];
SEGPTR
segptr
=
MapLS
(
string
);
WORD
args
[
4
];
DWORD
result
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
list
[
i
].
string
)
/* it was a string originally */
{
if
(
!
GlobalGetAtomNameA
(
list
[
i
].
atom
,
string
,
ATOM_BUFFER_SIZE
))
continue
;
args
[
3
]
=
hwnd
;
args
[
2
]
=
SELECTOROF
(
segptr
);
args
[
1
]
=
OFFSETOF
(
segptr
);
args
[
0
]
=
LOWORD
(
list
[
i
].
data
);
}
else
{
args
[
3
]
=
hwnd
;
args
[
2
]
=
0
;
args
[
1
]
=
list
[
i
].
atom
;
args
[
0
]
=
LOWORD
(
list
[
i
].
data
);
}
WOWCallback16Ex
(
(
DWORD
)
func
,
WCB16_PASCAL
,
sizeof
(
args
),
args
,
&
result
);
if
(
!
(
ret
=
LOWORD
(
result
)))
break
;
}
UnMapLS
(
segptr
);
HeapFree
(
GetProcessHeap
(),
0
,
list
);
}
return
ret
;
}
dlls/user32/wnd16.c
View file @
6b78e24a
...
...
@@ -22,6 +22,10 @@
#include "wownt32.h"
#include "win.h"
#include "user_private.h"
#include "wine/server.h"
/* size of buffer needed to store an atom string */
#define ATOM_BUFFER_SIZE 256
/* handle <--> handle16 conversions */
#define HANDLE_16(h32) (LOWORD(h32))
...
...
@@ -158,6 +162,64 @@ BOOL16 WINAPI SetProp16( HWND16 hwnd, LPCSTR str, HANDLE16 handle )
}
/***********************************************************************
* EnumProps (USER.27)
*/
INT16
WINAPI
EnumProps16
(
HWND16
hwnd
,
PROPENUMPROC16
func
)
{
int
ret
=
-
1
,
i
,
count
,
total
=
32
;
property_data_t
*
list
;
while
(
total
)
{
if
(
!
(
list
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
*
sizeof
(
*
list
)
)))
break
;
count
=
0
;
SERVER_START_REQ
(
get_window_properties
)
{
req
->
window
=
wine_server_user_handle
(
HWND_32
(
hwnd
)
);
wine_server_set_reply
(
req
,
list
,
total
*
sizeof
(
*
list
)
);
if
(
!
wine_server_call
(
req
))
count
=
reply
->
total
;
}
SERVER_END_REQ
;
if
(
count
&&
count
<=
total
)
{
char
string
[
ATOM_BUFFER_SIZE
];
SEGPTR
segptr
=
MapLS
(
string
);
WORD
args
[
4
];
DWORD
result
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
list
[
i
].
string
)
/* it was a string originally */
{
if
(
!
GlobalGetAtomNameA
(
list
[
i
].
atom
,
string
,
ATOM_BUFFER_SIZE
))
continue
;
args
[
3
]
=
hwnd
;
args
[
2
]
=
SELECTOROF
(
segptr
);
args
[
1
]
=
OFFSETOF
(
segptr
);
args
[
0
]
=
LOWORD
(
list
[
i
].
data
);
}
else
{
args
[
3
]
=
hwnd
;
args
[
2
]
=
0
;
args
[
1
]
=
list
[
i
].
atom
;
args
[
0
]
=
LOWORD
(
list
[
i
].
data
);
}
WOWCallback16Ex
(
(
DWORD
)
func
,
WCB16_PASCAL
,
sizeof
(
args
),
args
,
&
result
);
if
(
!
(
ret
=
LOWORD
(
result
)))
break
;
}
UnMapLS
(
segptr
);
HeapFree
(
GetProcessHeap
(),
0
,
list
);
break
;
}
HeapFree
(
GetProcessHeap
(),
0
,
list
);
total
=
count
;
/* restart with larger buffer */
}
return
ret
;
}
/**************************************************************************
* ClientToScreen (USER.28)
*/
...
...
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