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
d17591fd
Commit
d17591fd
authored
Jul 14, 2006
by
Krzysztof Foltman
Committed by
Alexandre Julliard
Jul 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: WM_SETFONT support.
parent
fac6bedd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
3 deletions
+43
-3
editor.c
dlls/riched20/editor.c
+23
-3
editor.h
dlls/riched20/editor.h
+1
-0
style.c
dlls/riched20/style.c
+19
-0
No files found.
dlls/riched20/editor.c
View file @
d17591fd
...
...
@@ -92,7 +92,7 @@
- EM_SELECTIONTYPE
- EM_SETBIDIOPTIONS 3.0
+ EM_SETBKGNDCOLOR
-
EM_SETCHARFORMAT (partly done, no ANSI)
+
EM_SETCHARFORMAT (partly done, no ANSI)
- EM_SETEDITSTYLE
+ EM_SETEVENTMASK (few notifications supported)
- EM_SETFONTSIZE
...
...
@@ -135,7 +135,7 @@
+ WM_GETTEXT (ANSI&Unicode)
+ WM_GETTEXTLENGTH (ANSI version sucks)
+ WM_PASTE
-
WM_SETFONT
+
WM_SETFONT
+ WM_SETTEXT (resets undo stack !) (proper style?) ANSI&Unicode
- WM_STYLECHANGING
- WM_STYLECHANGED (things like read-only flag)
...
...
@@ -1434,7 +1434,6 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
UNSUPPORTED_MSG
(
EM_SETTYPOGRAPHYOPTIONS
)
UNSUPPORTED_MSG
(
EM_SETWORDBREAKPROCEX
)
UNSUPPORTED_MSG
(
EM_SHOWSCROLLBAR
)
UNSUPPORTED_MSG
(
WM_SETFONT
)
UNSUPPORTED_MSG
(
WM_STYLECHANGING
)
UNSUPPORTED_MSG
(
WM_STYLECHANGED
)
/* UNSUPPORTED_MSG(WM_UNICHAR) FIXME missing in Wine headers */
...
...
@@ -1836,6 +1835,27 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
return
0
;
}
case
WM_SETFONT
:
{
LOGFONTW
lf
;
CHARFORMAT2W
fmt
;
HDC
hDC
;
BOOL
bRepaint
=
LOWORD
(
lParam
);
if
(
!
wParam
)
wParam
=
(
WPARAM
)
GetStockObject
(
DEFAULT_GUI_FONT
);
GetObjectW
((
HGDIOBJ
)
wParam
,
sizeof
(
LOGFONTW
),
&
lf
);
hDC
=
GetDC
(
hWnd
);
ME_CharFormatFromLogFont
(
hDC
,
&
lf
,
&
fmt
);
ReleaseDC
(
hWnd
,
hDC
);
ME_SetCharFormat
(
editor
,
0
,
ME_GetTextLength
(
editor
),
&
fmt
);
ME_SetDefaultCharFormat
(
editor
,
&
fmt
);
ME_CommitUndo
(
editor
);
if
(
bRepaint
)
ME_UpdateRepaint
(
editor
);
return
0
;
}
case
WM_SETTEXT
:
{
ME_InternalDeleteText
(
editor
,
0
,
ME_GetTextLength
(
editor
));
...
...
dlls/riched20/editor.h
View file @
d17591fd
...
...
@@ -55,6 +55,7 @@ void ME_CopyToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from);
CHARFORMAT2W
*
ME_ToCFAny
(
CHARFORMAT2W
*
to
,
CHARFORMAT2W
*
from
);
void
ME_CopyToCFAny
(
CHARFORMAT2W
*
to
,
CHARFORMAT2W
*
from
);
void
ME_CopyCharFormat
(
CHARFORMAT2W
*
pDest
,
CHARFORMAT2W
*
pSrc
);
/* only works with 2W structs */
void
ME_CharFormatFromLogFont
(
HDC
hDC
,
LOGFONTW
*
lf
,
CHARFORMAT2W
*
fmt
);
/* ditto */
/* list.c */
void
ME_InsertBefore
(
ME_DisplayItem
*
diWhere
,
ME_DisplayItem
*
diWhat
);
...
...
dlls/riched20/style.c
View file @
d17591fd
...
...
@@ -286,6 +286,25 @@ ME_LogFontFromStyle(HDC hDC, LOGFONTW *lf, ME_Style *s, int nZoomNumerator, int
lf
->
lfCharSet
=
s
->
fmt
.
bCharSet
;
}
void
ME_CharFormatFromLogFont
(
HDC
hDC
,
LOGFONTW
*
lf
,
CHARFORMAT2W
*
fmt
)
{
int
rx
,
ry
;
ME_InitCharFormat2W
(
fmt
);
rx
=
GetDeviceCaps
(
hDC
,
LOGPIXELSX
);
ry
=
GetDeviceCaps
(
hDC
,
LOGPIXELSY
);
lstrcpyW
(
fmt
->
szFaceName
,
lf
->
lfFaceName
);
fmt
->
dwEffects
=
0
;
fmt
->
dwMask
=
CFM_WEIGHT
|
CFM_BOLD
|
CFM_ITALIC
|
CFM_UNDERLINE
|
CFM_STRIKEOUT
|
CFM_SIZE
|
CFM_FACE
|
CFM_CHARSET
;
fmt
->
wWeight
=
lf
->
lfWeight
;
fmt
->
yHeight
=
-
lf
->
lfHeight
*
1440
/
ry
;
if
(
lf
->
lfWeight
>
400
)
fmt
->
dwEffects
|=
CFM_BOLD
;
if
(
lf
->
lfItalic
)
fmt
->
dwEffects
|=
CFM_ITALIC
;
if
(
lf
->
lfUnderline
)
fmt
->
dwEffects
|=
CFM_UNDERLINE
;
if
(
lf
->
lfStrikeOut
)
fmt
->
dwEffects
|=
CFM_STRIKEOUT
;
fmt
->
bPitchAndFamily
=
lf
->
lfPitchAndFamily
;
fmt
->
bCharSet
=
lf
->
lfCharSet
;
}
BOOL
ME_IsFontEqual
(
LOGFONTW
*
p1
,
LOGFONTW
*
p2
)
{
...
...
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