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
3f4a2a5b
Commit
3f4a2a5b
authored
May 20, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Added fast A->W mapping for EM_GETLINE.
parent
19b42875
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
24 deletions
+20
-24
winproc.c
dlls/user/winproc.c
+20
-24
No files found.
dlls/user/winproc.c
View file @
3f4a2a5b
...
...
@@ -775,17 +775,6 @@ static INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM
case
LB_GETTEXTLEN
:
return
1
;
/* need to map result */
/* Multiline edit */
case
EM_GETLINE
:
{
WORD
len
=
(
WORD
)
*
plparam
;
LPARAM
*
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
LPARAM
)
+
sizeof
(
WORD
)
+
len
*
sizeof
(
WCHAR
)
);
if
(
!
ptr
)
return
-
1
;
*
ptr
++
=
*
plparam
;
/* Store previous lParam */
*
((
WORD
*
)
ptr
)
=
len
;
/* Store the length */
*
plparam
=
(
LPARAM
)
ptr
;
}
return
1
;
case
WM_CHARTOITEM
:
case
WM_MENUCHAR
:
case
WM_CHAR
:
...
...
@@ -873,18 +862,6 @@ static LRESULT WINPROC_UnmapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM wParam, LPA
case
EM_REPLACESEL
:
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
lParam
);
break
;
/* Multiline edit */
case
EM_GETLINE
:
{
LPARAM
*
ptr
=
(
LPARAM
*
)
lParam
-
1
;
/* get the old lParam */
WORD
len
=
*
(
WORD
*
)
lParam
;
result
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPWSTR
)
lParam
,
result
,
(
LPSTR
)
*
ptr
,
len
,
NULL
,
NULL
);
if
(
result
<
len
)
((
LPSTR
)
*
ptr
)[
result
]
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
}
break
;
}
return
result
;
}
...
...
@@ -2708,6 +2685,25 @@ LRESULT WINPROC_CallProcAtoW( winproc_callback_t callback, HWND hwnd, UINT msg,
else
ret
=
callback
(
hwnd
,
msg
,
wParam
,
lParam
,
result
,
arg
);
break
;
case
EM_GETLINE
:
{
WCHAR
*
ptr
,
buffer
[
512
];
WORD
len
=
*
(
WORD
*
)
lParam
;
if
(
!
(
ptr
=
get_buffer
(
buffer
,
sizeof
(
buffer
),
len
*
sizeof
(
WCHAR
)
)))
break
;
*
((
WORD
*
)
ptr
)
=
len
;
/* store the length */
ret
=
callback
(
hwnd
,
msg
,
wParam
,
(
LPARAM
)
ptr
,
result
,
arg
);
if
(
*
result
)
{
DWORD
reslen
;
RtlUnicodeToMultiByteN
(
(
LPSTR
)
lParam
,
len
,
&
reslen
,
ptr
,
*
result
*
sizeof
(
WCHAR
)
);
if
(
reslen
<
len
)
((
LPSTR
)
lParam
)[
reslen
]
=
0
;
*
result
=
reslen
;
}
free_buffer
(
buffer
,
ptr
);
}
break
;
default:
if
(
(
unmap
=
WINPROC_MapMsg32ATo32W
(
hwnd
,
msg
,
&
wParam
,
&
lParam
))
==
-
1
)
{
ERR_
(
msg
)(
"Message translation failed. (msg=%s,wp=%08x,lp=%08lx)
\n
"
,
...
...
@@ -2911,7 +2907,7 @@ static LRESULT WINPROC_CallProcWtoA( winproc_callback_t callback, HWND hwnd, UIN
if
(
*
result
)
{
DWORD
reslen
;
RtlMultiByteToUnicodeN
(
(
LPWSTR
)
lParam
,
len
*
sizeof
(
WCHAR
),
&
reslen
,
buffe
r
,
*
result
);
RtlMultiByteToUnicodeN
(
(
LPWSTR
)
lParam
,
len
*
sizeof
(
WCHAR
),
&
reslen
,
pt
r
,
*
result
);
*
result
=
reslen
/
sizeof
(
WCHAR
);
if
(
*
result
<
len
)
((
LPWSTR
)
lParam
)[
*
result
]
=
0
;
}
...
...
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