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
ed93ed9a
Commit
ed93ed9a
authored
Aug 13, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Aug 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Constify some variables.
parent
216c3b0d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
editor.h
dlls/riched20/editor.h
+8
-8
paint.c
dlls/riched20/paint.c
+3
-3
para.c
dlls/riched20/para.c
+7
-7
No files found.
dlls/riched20/editor.h
View file @
ed93ed9a
...
...
@@ -226,24 +226,24 @@ void ME_MakeFirstParagraph(HDC hDC, ME_TextBuffer *editor);
ME_DisplayItem
*
ME_SplitParagraph
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
rp
,
ME_Style
*
style
);
ME_DisplayItem
*
ME_JoinParagraphs
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
tp
);
void
ME_DumpParaStyle
(
ME_Paragraph
*
s
);
void
ME_DumpParaStyleToBuf
(
PARAFORMAT2
*
pFmt
,
char
buf
[
2048
]);
void
ME_SetParaFormat
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
para
,
PARAFORMAT2
*
pFmt
);
void
ME_SetSelectionParaFormat
(
ME_TextEditor
*
editor
,
PARAFORMAT2
*
pFmt
);
void
ME_GetParaFormat
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
para
,
PARAFORMAT2
*
pFmt
);
void
ME_DumpParaStyleToBuf
(
const
PARAFORMAT2
*
pFmt
,
char
buf
[
2048
]);
void
ME_SetParaFormat
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
para
,
const
PARAFORMAT2
*
pFmt
);
void
ME_SetSelectionParaFormat
(
ME_TextEditor
*
editor
,
const
PARAFORMAT2
*
pFmt
);
void
ME_GetParaFormat
(
ME_TextEditor
*
editor
,
const
ME_DisplayItem
*
para
,
PARAFORMAT2
*
pFmt
);
void
ME_GetSelectionParaFormat
(
ME_TextEditor
*
editor
,
PARAFORMAT2
*
pFmt
);
/* marks from first up to (but not including) last */
void
ME_MarkForWrapping
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
first
,
ME_DisplayItem
*
last
);
void
ME_MarkForPainting
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
first
,
ME_DisplayItem
*
last
);
void
ME_MarkForWrapping
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
first
,
const
ME_DisplayItem
*
last
);
void
ME_MarkForPainting
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
first
,
const
ME_DisplayItem
*
last
);
void
ME_MarkAllForWrapping
(
ME_TextEditor
*
editor
);
/* paint.c */
void
ME_PaintContent
(
ME_TextEditor
*
editor
,
HDC
hDC
,
BOOL
bOnlyNew
,
RECT
*
rcUpdate
);
void
ME_PaintContent
(
ME_TextEditor
*
editor
,
HDC
hDC
,
BOOL
bOnlyNew
,
const
RECT
*
rcUpdate
);
void
ME_Repaint
(
ME_TextEditor
*
editor
);
void
ME_RewrapRepaint
(
ME_TextEditor
*
editor
);
void
ME_UpdateRepaint
(
ME_TextEditor
*
editor
);
void
ME_DrawParagraph
(
ME_Context
*
c
,
ME_DisplayItem
*
paragraph
);
void
ME_EnsureVisible
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
pRun
);
COLORREF
ME_GetBackColor
(
ME_TextEditor
*
editor
);
COLORREF
ME_GetBackColor
(
const
ME_TextEditor
*
editor
);
void
ME_InvalidateSelection
(
ME_TextEditor
*
editor
);
void
ME_QueueInvalidateFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
);
BOOL
ME_SetZoom
(
ME_TextEditor
*
editor
,
int
numerator
,
int
denominator
);
...
...
dlls/riched20/paint.c
View file @
ed93ed9a
...
...
@@ -23,7 +23,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
richedit
);
void
ME_PaintContent
(
ME_TextEditor
*
editor
,
HDC
hDC
,
BOOL
bOnlyNew
,
RECT
*
rcUpdate
)
{
void
ME_PaintContent
(
ME_TextEditor
*
editor
,
HDC
hDC
,
BOOL
bOnlyNew
,
const
RECT
*
rcUpdate
)
{
ME_DisplayItem
*
item
;
ME_Context
c
;
int
yoffset
;
...
...
@@ -196,7 +196,7 @@ static void ME_DrawTextWithStyle(ME_Context *c, int x, int y, LPCWSTR szText, in
ME_UnselectStyleFont
(
c
->
editor
,
hDC
,
s
,
hOldFont
);
}
static
void
ME_DebugWrite
(
HDC
hDC
,
POINT
*
pt
,
WCHAR
*
szText
)
{
static
void
ME_DebugWrite
(
HDC
hDC
,
const
POINT
*
pt
,
LPCWSTR
szText
)
{
int
align
=
SetTextAlign
(
hDC
,
TA_LEFT
|
TA_TOP
);
HGDIOBJ
hFont
=
SelectObject
(
hDC
,
GetStockObject
(
DEFAULT_GUI_FONT
));
COLORREF
color
=
SetTextColor
(
hDC
,
RGB
(
128
,
128
,
128
));
...
...
@@ -276,7 +276,7 @@ static void ME_DrawRun(ME_Context *c, int x, int y, ME_DisplayItem *rundi, ME_Pa
}
}
COLORREF
ME_GetBackColor
(
ME_TextEditor
*
editor
)
COLORREF
ME_GetBackColor
(
const
ME_TextEditor
*
editor
)
{
/* Looks like I was seriously confused
return GetSysColor((GetWindowLong(editor->hWnd, GWL_STYLE) & ES_READONLY) ? COLOR_3DFACE: COLOR_WINDOW);
...
...
dlls/riched20/para.c
View file @
ed93ed9a
...
...
@@ -83,7 +83,7 @@ void ME_MarkAllForWrapping(ME_TextEditor *editor)
ME_MarkForWrapping
(
editor
,
editor
->
pBuffer
->
pFirst
->
member
.
para
.
next_para
,
editor
->
pBuffer
->
pLast
);
}
void
ME_MarkForWrapping
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
first
,
ME_DisplayItem
*
last
)
void
ME_MarkForWrapping
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
first
,
const
ME_DisplayItem
*
last
)
{
while
(
first
!=
last
)
{
...
...
@@ -92,7 +92,7 @@ void ME_MarkForWrapping(ME_TextEditor *editor, ME_DisplayItem *first, ME_Display
}
}
void
ME_MarkForPainting
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
first
,
ME_DisplayItem
*
last
)
void
ME_MarkForPainting
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
first
,
const
ME_DisplayItem
*
last
)
{
while
(
first
!=
last
)
{
...
...
@@ -277,12 +277,12 @@ ME_DisplayItem *ME_GetParagraph(ME_DisplayItem *item) {
return
ME_FindItemBackOrHere
(
item
,
diParagraph
);
}
static
void
ME_DumpStyleEffect
(
char
**
p
,
const
char
*
name
,
PARAFORMAT2
*
fmt
,
int
mask
)
static
void
ME_DumpStyleEffect
(
char
**
p
,
const
char
*
name
,
const
PARAFORMAT2
*
fmt
,
int
mask
)
{
*
p
+=
sprintf
(
*
p
,
"%-22s%s
\n
"
,
name
,
(
fmt
->
dwMask
&
mask
)
?
((
fmt
->
wEffects
&
mask
)
?
"yes"
:
"no"
)
:
"N/A"
);
}
void
ME_DumpParaStyleToBuf
(
PARAFORMAT2
*
pFmt
,
char
buf
[
2048
])
void
ME_DumpParaStyleToBuf
(
const
PARAFORMAT2
*
pFmt
,
char
buf
[
2048
])
{
/* FIXME only PARAFORMAT styles implemented */
char
*
p
;
...
...
@@ -318,7 +318,7 @@ void ME_DumpParaStyleToBuf(PARAFORMAT2 *pFmt, char buf[2048])
ME_DumpStyleEffect
(
&
p
,
"Page break before:"
,
pFmt
,
PFM_PAGEBREAKBEFORE
);
}
void
ME_SetParaFormat
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
para
,
PARAFORMAT2
*
pFmt
)
void
ME_SetParaFormat
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
para
,
const
PARAFORMAT2
*
pFmt
)
{
PARAFORMAT2
copy
;
assert
(
sizeof
(
*
para
->
member
.
para
.
pFmt
)
==
sizeof
(
PARAFORMAT2
));
...
...
@@ -372,7 +372,7 @@ ME_GetSelectionParas(ME_TextEditor *editor, ME_DisplayItem **para, ME_DisplayIte
}
void
ME_SetSelectionParaFormat
(
ME_TextEditor
*
editor
,
PARAFORMAT2
*
pFmt
)
void
ME_SetSelectionParaFormat
(
ME_TextEditor
*
editor
,
const
PARAFORMAT2
*
pFmt
)
{
ME_DisplayItem
*
para
,
*
para_end
;
...
...
@@ -386,7 +386,7 @@ void ME_SetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt)
}
while
(
1
);
}
void
ME_GetParaFormat
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
para
,
PARAFORMAT2
*
pFmt
)
void
ME_GetParaFormat
(
ME_TextEditor
*
editor
,
const
ME_DisplayItem
*
para
,
PARAFORMAT2
*
pFmt
)
{
if
(
pFmt
->
cbSize
>=
sizeof
(
PARAFORMAT2
))
{
...
...
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