Commit 8ddf6c0a authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

riched20: Declare some functions static.

parent b0f2bebc
......@@ -782,7 +782,7 @@ ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs)
}
void
static void
ME_SelectByType(ME_TextEditor *editor, ME_SelectionType selectionType)
{
/* pCursor[0] is the end of the selection
......@@ -1335,6 +1335,31 @@ ME_MoveCursorLines(ME_TextEditor *editor, ME_Cursor *pCursor, int nRelOfs)
assert(pCursor->pRun->type == diRun);
}
static BOOL ME_UpdateSelection(ME_TextEditor *editor, const ME_Cursor *pTempCursor)
{
ME_Cursor old_anchor = editor->pCursors[1];
if (GetKeyState(VK_SHIFT)>=0) /* cancelling selection */
{
/* any selection was present ? if so, it's no more, repaint ! */
editor->pCursors[1] = editor->pCursors[0];
if (memcmp(pTempCursor, &old_anchor, sizeof(ME_Cursor))) {
return TRUE;
}
return FALSE;
}
else
{
if (!memcmp(pTempCursor, &editor->pCursors[1], sizeof(ME_Cursor))) /* starting selection */
{
editor->pCursors[1] = *pTempCursor;
return TRUE;
}
}
ME_Repaint(editor);
return TRUE;
}
static void ME_ArrowPageUp(ME_TextEditor *editor, ME_Cursor *pCursor)
{
......@@ -1522,32 +1547,6 @@ static int ME_GetSelCursor(ME_TextEditor *editor, int dir)
return 1;
}
BOOL ME_UpdateSelection(ME_TextEditor *editor, const ME_Cursor *pTempCursor)
{
ME_Cursor old_anchor = editor->pCursors[1];
if (GetKeyState(VK_SHIFT)>=0) /* cancelling selection */
{
/* any selection was present ? if so, it's no more, repaint ! */
editor->pCursors[1] = editor->pCursors[0];
if (memcmp(pTempCursor, &old_anchor, sizeof(ME_Cursor))) {
return TRUE;
}
return FALSE;
}
else
{
if (!memcmp(pTempCursor, &editor->pCursors[1], sizeof(ME_Cursor))) /* starting selection */
{
editor->pCursors[1] = *pTempCursor;
return TRUE;
}
}
ME_Repaint(editor);
return TRUE;
}
void ME_DeleteSelection(ME_TextEditor *editor)
{
int from, to;
......
......@@ -177,7 +177,6 @@ void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod);
/* caret.c */
int ME_SetSelection(ME_TextEditor *editor, int from, int to);
void ME_SelectByType(ME_TextEditor *editor, ME_SelectionType selectionType);
void ME_HideCaret(ME_TextEditor *ed);
void ME_ShowCaret(ME_TextEditor *ed);
void ME_MoveCaret(ME_TextEditor *ed);
......@@ -204,7 +203,6 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, int nChars, BOOL bFo
int ME_GetTextLength(ME_TextEditor *editor);
int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how);
ME_Style *ME_GetSelectionInsertStyle(ME_TextEditor *editor);
BOOL ME_UpdateSelection(ME_TextEditor *editor, const ME_Cursor *pTempCursor);
/* context.c */
void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC);
......@@ -269,12 +267,7 @@ void ME_CopyReObject(REOBJECT* dst, const REOBJECT* src);
void ME_DeleteReObject(REOBJECT* reo);
/* editor.c */
ME_TextEditor *ME_MakeEditor(HWND hWnd, BOOL bEmulateVersion10);
void ME_DestroyEditor(ME_TextEditor *editor);
LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
LPARAM lParam, BOOL unicode, HRESULT* phresult);
void ME_SendOldNotify(ME_TextEditor *editor, int nCode);
void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam);
int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int nStart, int nChars, BOOL bCRLF);
ME_DisplayItem *ME_FindItemAtOffset(ME_TextEditor *editor, ME_DIType nItemType, int nOffset, int *nItemOffset);
void ME_RTFCharAttrHook(struct _RTF_Info *info);
......@@ -284,11 +277,6 @@ void ME_RTFSpecialCharHook(struct _RTF_Info *info);
void ME_StreamInFill(ME_InStream *stream);
extern int me_debug;
extern void DoWrap(ME_TextEditor *editor);
extern BOOL ME_FindNextURLCandidate(ME_TextEditor *editor, int sel_min, int sel_max,
int * candidate_min, int * candidate_max);
extern BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, int sel_min, int sel_max);
BOOL ME_UpdateLinkAttribute(ME_TextEditor *editor, int sel_min, int sel_max);
void ME_UpdateSelectionLinkAttribute(ME_TextEditor *editor);
/* table.c */
BOOL ME_IsInTable(ME_DisplayItem *pItem);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment