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
8724c37c
Commit
8724c37c
authored
Mar 17, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Mar 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Set the window title in the host.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a1f88602
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
51 deletions
+47
-51
editor.c
dlls/riched20/editor.c
+17
-38
editor.h
dlls/riched20/editor.h
+2
-2
txthost.c
dlls/riched20/txthost.c
+20
-3
txtsrv.c
dlls/riched20/txtsrv.c
+8
-8
No files found.
dlls/riched20/editor.c
View file @
8724c37c
...
...
@@ -3207,16 +3207,10 @@ static void ME_SetText(ME_TextEditor *editor, void *text, BOOL unicode)
ME_EndToUnicode
(
codepage
,
wszText
);
}
static
LRESULT
ME_WmCreate
(
ME_TextEditor
*
editor
,
LPARAM
lParam
,
BOOL
unicode
)
static
LRESULT
ME_WmCreate
(
ME_TextEditor
*
editor
)
{
CREATESTRUCTW
*
createW
=
(
CREATESTRUCTW
*
)
lParam
;
CREATESTRUCTA
*
createA
=
(
CREATESTRUCTA
*
)
lParam
;
void
*
text
=
NULL
;
INT
max
;
if
(
lParam
)
text
=
unicode
?
(
void
*
)
createW
->
lpszName
:
(
void
*
)
createA
->
lpszName
;
max
=
(
editor
->
scrollbars
&
ES_DISABLENOSCROLL
)
?
1
:
0
;
if
(
~
editor
->
scrollbars
&
ES_DISABLENOSCROLL
||
editor
->
scrollbars
&
WS_VSCROLL
)
ITextHost_TxSetScrollRange
(
editor
->
texthost
,
SB_VERT
,
0
,
max
,
TRUE
);
...
...
@@ -3237,17 +3231,6 @@ static LRESULT ME_WmCreate(ME_TextEditor *editor, LPARAM lParam, BOOL unicode)
ITextHost_TxShowScrollBar
(
editor
->
texthost
,
SB_HORZ
,
TRUE
);
}
}
if
(
text
)
{
ME_SetText
(
editor
,
text
,
unicode
);
ME_SetCursorToStart
(
editor
,
&
editor
->
pCursors
[
0
]);
ME_SetCursorToStart
(
editor
,
&
editor
->
pCursors
[
1
]);
}
ME_CommitUndo
(
editor
);
ME_WrapMarkedParagraphs
(
editor
);
update_caret
(
editor
);
return
0
;
}
...
...
@@ -3312,8 +3295,8 @@ static LRESULT handle_EM_SETCHARFORMAT( ME_TextEditor *editor, WPARAM flags, con
* The LRESULT that is returned is a return value for window procs,
* and the phresult parameter is the COM return code needed by the
* text services interface. */
LRESULT
ME_HandleMessage
(
ME_TextEditor
*
editor
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
,
HRESULT
*
phresult
)
LRESULT
editor_handle_message
(
ME_TextEditor
*
editor
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
HRESULT
*
phresult
)
{
*
phresult
=
S_OK
;
...
...
@@ -3978,7 +3961,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
return
(
wParam
>=
0x40000
)
?
0
:
MAKELONG
(
pt
.
x
,
pt
.
y
);
}
case
WM_CREATE
:
return
ME_WmCreate
(
editor
,
lParam
,
unicode
);
return
ME_WmCreate
(
editor
);
case
WM_SETCURSOR
:
{
POINT
cursor_pos
;
...
...
@@ -4060,23 +4043,19 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
case
WM_CHAR
:
return
handle_wm_char
(
editor
,
wParam
,
lParam
);
case
WM_UNICHAR
:
if
(
unicode
)
{
if
(
wParam
==
UNICODE_NOCHAR
)
return
TRUE
;
if
(
wParam
<=
0x000fffff
)
{
if
(
wParam
>
0xffff
)
/* convert to surrogates */
{
wParam
-=
0x10000
;
handle_wm_char
(
editor
,
(
wParam
>>
10
)
+
0xd800
,
0
);
handle_wm_char
(
editor
,
(
wParam
&
0x03ff
)
+
0xdc00
,
0
);
}
else
handle_wm_char
(
editor
,
wParam
,
0
);
}
return
0
;
}
break
;
if
(
wParam
==
UNICODE_NOCHAR
)
return
TRUE
;
if
(
wParam
<=
0x000fffff
)
{
if
(
wParam
>
0xffff
)
/* convert to surrogates */
{
wParam
-=
0x10000
;
handle_wm_char
(
editor
,
(
wParam
>>
10
)
+
0xd800
,
0
);
handle_wm_char
(
editor
,
(
wParam
&
0x03ff
)
+
0xdc00
,
0
);
}
else
handle_wm_char
(
editor
,
wParam
,
0
);
}
return
0
;
case
EM_STOPGROUPTYPING
:
ME_CommitUndo
(
editor
);
/* End coalesced undos for typed characters */
return
0
;
...
...
dlls/riched20/editor.h
View file @
8724c37c
...
...
@@ -271,8 +271,8 @@ void ME_DeleteReObject(struct re_object *re_object) DECLSPEC_HIDDEN;
/* editor.c */
ME_TextEditor
*
ME_MakeEditor
(
ITextHost
*
texthost
,
BOOL
bEmulateVersion10
)
DECLSPEC_HIDDEN
;
void
ME_DestroyEditor
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
LRESULT
ME_HandleMessage
(
ME_TextEditor
*
editor
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
BOOL
unicode
,
HRESULT
*
phresult
)
DECLSPEC_HIDDEN
;
LRESULT
editor_handle_message
(
ME_TextEditor
*
editor
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
,
HRESULT
*
phresult
)
DECLSPEC_HIDDEN
;
void
ME_SendOldNotify
(
ME_TextEditor
*
editor
,
int
nCode
)
DECLSPEC_HIDDEN
;
int
ME_GetTextW
(
ME_TextEditor
*
editor
,
WCHAR
*
buffer
,
int
buflen
,
const
ME_Cursor
*
start
,
int
srcChars
,
BOOL
bCRLF
,
BOOL
bEOP
)
DECLSPEC_HIDDEN
;
...
...
dlls/riched20/txthost.c
View file @
8724c37c
...
...
@@ -963,10 +963,27 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
}
case
WM_CREATE
:
{
CREATESTRUCTW
*
createW
=
(
CREATESTRUCTW
*
)
lparam
;
CREATESTRUCTA
*
createA
=
(
CREATESTRUCTA
*
)
lparam
;
void
*
text
;
WCHAR
*
textW
=
NULL
;
LONG
codepage
=
unicode
?
CP_UNICODE
:
CP_ACP
;
int
len
;
ITextServices_OnTxPropertyBitsChange
(
host
->
text_srv
,
TXTBIT_CLIENTRECTCHANGE
,
0
);
res
=
ME_HandleMessage
(
editor
,
msg
,
wparam
,
lparam
,
unicode
,
&
hr
);
break
;
if
(
lparam
)
{
text
=
unicode
?
(
void
*
)
createW
->
lpszName
:
(
void
*
)
createA
->
lpszName
;
textW
=
ME_ToUnicode
(
codepage
,
text
,
&
len
);
}
ITextServices_TxSetText
(
host
->
text_srv
,
textW
);
if
(
lparam
)
ME_EndToUnicode
(
codepage
,
textW
);
hr
=
ITextServices_TxSendMessage
(
host
->
text_srv
,
msg
,
wparam
,
lparam
,
&
res
);
break
;
}
case
WM_DESTROY
:
ITextHost_Release
(
&
host
->
ITextHost_iface
);
return
0
;
...
...
@@ -1254,7 +1271,7 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
break
;
}
default:
res
=
ME_HandleMessage
(
editor
,
msg
,
wparam
,
lparam
,
unicode
,
&
hr
);
hr
=
ITextServices_TxSendMessage
(
host
->
text_srv
,
msg
,
wparam
,
lparam
,
&
res
);
}
if
(
hr
==
S_FALSE
)
...
...
dlls/riched20/txtsrv.c
View file @
8724c37c
...
...
@@ -130,16 +130,16 @@ static ULONG WINAPI fnTextSrv_Release(ITextServices *iface)
}
DEFINE_THISCALL_WRAPPER
(
fnTextSrv_TxSendMessage
,
20
)
DECLSPEC_HIDDEN
HRESULT
__thiscall
fnTextSrv_TxSendMessage
(
ITextServices
*
iface
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
LRESULT
*
plresult
)
DECLSPEC_HIDDEN
HRESULT
__thiscall
fnTextSrv_TxSendMessage
(
ITextServices
*
iface
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
LRESULT
*
result
)
{
struct
text_services
*
services
=
impl_from_ITextServices
(
iface
);
HRESULT
hresult
;
LRESULT
lresult
;
struct
text_services
*
services
=
impl_from_ITextServices
(
iface
);
HRESULT
hr
;
LRESULT
res
;
lresult
=
ME_HandleMessage
(
services
->
editor
,
msg
,
wparam
,
lparam
,
TRUE
,
&
hresult
);
if
(
plresult
)
*
plresult
=
lresult
;
return
hresult
;
res
=
editor_handle_message
(
services
->
editor
,
msg
,
wparam
,
lparam
,
&
hr
);
if
(
result
)
*
result
=
res
;
return
hr
;
}
DEFINE_THISCALL_WRAPPER
(
fnTextSrv_TxDraw
,
52
)
...
...
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