227#define NONAMELESSUNION
232#define NO_SHLWAPI_STREAM
246#define STACK_SIZE_DEFAULT 100
247#define STACK_SIZE_MAX 1000
249#define TEXT_LIMIT_DEFAULT 32767
256static const WCHAR REListBox20W[] = {
'R',
'E',
'L',
'i',
's',
't',
'B',
'o',
'x',
'2',
'0',
'W', 0};
257static const WCHAR REComboBox20W[] = {
'R',
'E',
'C',
'o',
'm',
'b',
'o',
'B',
'o',
'x',
'2',
'0',
'W', 0};
300 static const char bom_utf8[] = {0xEF, 0xBB, 0xBF};
311 if (
stream->editstream->dwError)
315 total_bytes_read +=
stream->dwSize;
343 while ((
buf[
end-1] & 0xC0) == 0x80)
351 if ((
buf[
end-1] & 0xE0) == 0xC0)
353 if ((
buf[
end-1] & 0xF0) == 0xE0)
355 if ((
buf[
end-1] & 0xF8) == 0xF0)
387 nWideChars =
stream->dwSize >> 1;
396 return total_bytes_read;
408 for (
i = 0;
i < 4;
i++)
412 colorNum = borderDef[
i].
color;
413 while (colorDef && colorDef->
rtfCNum != colorNum)
432 switch(
info->rtfMinor)
450 fmt.dwEffects =
info->rtfParam ?
fmt.dwMask : 0;
478 fmt.dwEffects =
info->rtfParam ?
fmt.dwMask : 0;
492 fmt.dwEffects =
info->rtfParam ?
fmt.dwMask : 0;
497 if (
info->rtfParam == 0)
502 if (
c &&
c->rtfCBlue >= 0)
503 fmt.crBackColor = (
c->rtfCBlue<<16)|(
c->rtfCGreen<<8)|(
c->rtfCRed);
511 if (
info->rtfParam == 0)
516 if (
c &&
c->rtfCBlue >= 0)
517 fmt.crTextColor = (
c->rtfCBlue<<16)|(
c->rtfCGreen<<8)|(
c->rtfCRed);
531 fmt.bCharSet =
f->rtfFCharSet;
533 fmt.bPitchAndFamily =
f->rtfFPitch | (
f->rtfFFamily << 4);
540 fmt.yHeight =
info->rtfParam*10;
549 info->style = style2;
558 switch(
info->rtfMinor)
561 if (!
info->editor->bEmulateVersion10)
571 info->fmt.cTabCount = 0;
572 info->fmt.dxOffset =
info->fmt.dxStartIndent =
info->fmt.dxRightIndent = 0;
573 info->fmt.wBorderWidth =
info->fmt.wBorders = 0;
574 info->fmt.wBorderSpace = 0;
575 info->fmt.bLineSpacingRule = 0;
576 info->fmt.dySpaceBefore =
info->fmt.dySpaceAfter = 0;
577 info->fmt.dyLineSpacing = 0;
578 info->fmt.wEffects &= ~PFE_RTLPARA;
579 info->fmt.wNumbering = 0;
580 info->fmt.wNumberingStart = 0;
581 info->fmt.wNumberingStyle = 0;
582 info->fmt.wNumberingTab = 0;
584 if (!
info->editor->bEmulateVersion10)
586 if (
info->tableDef &&
info->tableDef->tableRowStart &&
595 if (para ==
info->tableDef->tableRowStart->member.para.next_para
596 && !
cursor.nOffset && !
cursor.pRun->member.run.nCharOfs)
602 info->tableDef->tableRowStart =
NULL;
608 info->fmt.wEffects &= ~PFE_TABLE;
612 if (!
info->editor->bEmulateVersion10)
614 while (
info->rtfParam >
info->nestingLevel) {
615 RTFTable *tableDef = heap_alloc_zero(
sizeof(*tableDef));
617 info->tableDef = tableDef;
636 info->nestingLevel++;
643 if (!
info->editor->bEmulateVersion10)
645 if (
info->nestingLevel < 1)
649 info->tableDef = heap_alloc_zero(
sizeof(*
info->tableDef));
650 tableDef =
info->tableDef;
667 info->nestingLevel = 1;
685 info->fmt.dxStartIndent =
fmt.dxStartIndent;
686 info->fmt.dxOffset =
fmt.dxOffset;
690 info->fmt.dxStartIndent +=
info->fmt.dxOffset +
info->rtfParam;
691 info->fmt.dxOffset = -
info->rtfParam;
694 info->fmt.dxStartIndent =
info->rtfParam -
info->fmt.dxOffset;
698 info->fmt.dxRightIndent =
info->rtfParam;
720 fmt.cTabCount *
sizeof(
fmt.rgxTabs[0]));
721 info->fmt.cTabCount =
fmt.cTabCount;
725 info->fmt.rgxTabs[
info->fmt.cTabCount++] =
info->rtfParam;
741 info->fmt.dySpaceAfter =
info->rtfParam;
745 info->fmt.dySpaceBefore =
info->rtfParam;
749 if ((
int)
info->rtfParam > 0)
751 info->fmt.dyLineSpacing =
info->rtfParam;
752 info->fmt.bLineSpacingRule = 3;
756 info->fmt.dyLineSpacing =
info->rtfParam;
757 info->fmt.bLineSpacingRule = 4;
762 info->fmt.dyLineSpacing =
info->rtfParam * 20;
763 info->fmt.bLineSpacingRule = 5;
771 info->fmt.wNumbering = 2;
775 info->fmt.wBorders |= 1;
780 info->fmt.wBorders |= 2;
785 info->fmt.wBorders |= 4;
790 info->fmt.wBorders |= 8;
794 info->fmt.wBorders &= ~0x700;
795 info->fmt.wBorders |= 1 << 8;
799 info->fmt.wBorders &= ~0x700;
800 info->fmt.wBorders |= 2 << 8;
804 info->fmt.wBorders &= ~0x700;
805 info->fmt.wBorders |= 10 << 8;
809 info->fmt.wBorders &= ~0x700;
810 info->fmt.wBorders |= 7 << 8;
814 info->fmt.wBorders &= ~0x700;
815 info->fmt.wBorders |= 11 << 8;
831 info->fmt.wBorderWidth =
info->rtfParam;
836 info->fmt.wBorderSpace =
info->rtfParam;
847 if (!
info->editor->bEmulateVersion10)
869 info->fmt.wEffects &= ~PFE_RTLPARA;
876 switch (
info->rtfMinor)
880 if (!
info->editor->bEmulateVersion10)
881 info->borderType = 0;
884 if (!
info->tableDef) {
898 cellNum =
info->tableDef->numCellsDefined;
901 info->tableDef->cells[cellNum].rightBoundary =
info->rtfParam;
907 pFmt->
rgxTabs[cellNum] &= ~0x00FFFFFF;
908 pFmt->
rgxTabs[cellNum] |= 0x00FFFFFF &
info->rtfParam;
910 info->tableDef->numCellsDefined++;
939 info->tableDef->gapH =
info->rtfParam;
943 info->tableDef->leftEdge =
info->rtfParam;
951 switch (
info->rtfMinor)
954 if (
info->editor->bEmulateVersion10)
961 if (!
info->editor->bEmulateVersion10) {
964 if (!
info->nestingLevel &&
971 info->nestingLevel = 1;
988 if (
info->editor->bEmulateVersion10)
999 if (!
info->editor->bEmulateVersion10) {
1002 if (!
info->nestingLevel &&
1009 info->nestingLevel++;
1018 const int defaultCellSize = 2000;
1019 int nRightBoundary = defaultCellSize;
1023 nRightBoundary += defaultCellSize;
1048 if (
info->editor->pCursors[0].pRun != run ||
1049 info->editor->pCursors[0].nOffset)
1053 info->editor->pCursors[1].pRun = run;
1055 info->editor->pCursors[1].nOffset = 0;
1067 info->nestingLevel--;
1068 if (!
info->nestingLevel)
1070 if (
info->canInheritInTbl) {
1073 while (
info->tableDef) {
1074 tableDef =
info->tableDef;
1108 if (
info->editor->bEmulateVersion10) {
1112 para =
info->editor->pCursors[0].pPara;
1118 info->rtfMajor =
' ';
1120 else if (
info->rtfMinor ==
rtfPar && tableDef)
1132 LPOLECLIENTSITE lpClientSite =
NULL;
1134 LPOLECACHE lpOleCache =
NULL;
1135 LPRICHEDITOLE lpReOle =
NULL;
1144 stgm.tymed = TYMED_ENHMF;
1145 stgm.u.hEnhMetaFile = hemf;
1150 stgm.tymed = TYMED_GDI;
1151 stgm.u.hBitmap =
hbmp;
1154 stgm.pUnkForRelease =
NULL;
1157 fm.dwAspect = DVASPECT_CONTENT;
1159 fm.tymed = stgm.tymed;
1168 IUnknown_QueryInterface(editor->
reOle, &IID_IRichEditOle, (
void**)&lpReOle) ==
S_OK &&
1169 IRichEditOle_GetClientSite(lpReOle, &lpClientSite) ==
S_OK &&
1170 IOleObject_SetClientSite(lpObject, lpClientSite) ==
S_OK &&
1171 IOleObject_GetUserClassID(lpObject, &
clsid) ==
S_OK &&
1172 IOleObject_QueryInterface(lpObject, &
IID_IOleCache, (
void**)&lpOleCache) ==
S_OK &&
1173 IOleCache_Cache(lpOleCache, &fm, 0, &conn) ==
S_OK &&
1175 IDataObject_SetData(lpDataObject, &fm, &stgm,
TRUE) ==
S_OK)
1179 reobject.
cbStruct =
sizeof(reobject);
1180 reobject.
cp = REO_CP_SELECTION;
1183 reobject.
pstg = lpStorage;
1188 reobject.
dvaspect = DVASPECT_CONTENT;
1196 if (lpObject) IOleObject_Release(lpObject);
1197 if (lpClientSite) IOleClientSite_Release(lpClientSite);
1198 if (lpStorage) IStorage_Release(lpStorage);
1199 if (lpDataObject) IDataObject_Release(lpDataObject);
1200 if (lpOleCache) IOleCache_Release(lpOleCache);
1201 if (lpReOle) IRichEditOle_Release(lpReOle);
1217 if (--
level == 0)
break;
1245 ERR(
"Called with incorrect token\n");
1253 for (flip =
TRUE;; flip = !flip)
1275 if (flip)
FIXME(
"wrong hex string\n");
1289 enum gfxkind {gfx_unknown = 0, gfx_enhmetafile, gfx_metafile, gfx_dib} gfx = gfx_unknown;
1316 if (--
level == 0)
break;
1339 if (
info->rtfParam != 0)
FIXME(
"dibitmap should be 0 (%d)\n",
info->rtfParam);
1343 gfx = gfx_enhmetafile;
1353 FIXME(
"Non supported attribute: %d %d %d\n",
info->rtfClass,
info->rtfMajor,
info->rtfMinor);
1360 case gfx_enhmetafile:
1427 FIXME(
"Non supported attribute: %d %d %d\n",
info->rtfClass,
info->rtfMajor,
info->rtfMinor);
1438 WCHAR txt_before = 0, txt_after = 0;
1447 int loc =
info->rtfMinor;
1453 txt_before =
info->rtfMajor;
1455 txt_after =
info->rtfMajor;
1466 if (--
level == 0)
break;
1480 switch (
info->rtfMinor)
1522 if (txt_before == 0 && txt_after == 0)
1524 else if (txt_after ==
'.')
1526 else if (txt_before ==
'(' && txt_after ==
')')
1532 TRACE(
"type %d indent %d start %d txt before %04x txt after %04x\n",
1540 switch(
info->rtfClass)
1543 switch(
info->rtfMajor)
1550 info->stack[
info->stackTop].unicodeLength =
info->unicodeLength;
1559 if (
info->stackTop <= 0)
1561 if (
info->stackTop < 0)
1567 info->unicodeLength =
info->stack[
info->stackTop].unicodeLength;
1578 stream->editstream->dwError =
stream->editstream->pfnCallback(
stream->editstream->dwCookie,
1589 int from, to, nUndoMode;
1688 if (!
parser.editor->bEmulateVersion10)
1699 if (
parser.tableDef &&
parser.tableDef->tableRowStart &&
1711 if (
parser.nestingLevel > 0)
1713 while (
parser.nestingLevel > 1)
1715 para =
parser.tableDef->tableRowStart;
1718 para =
parser.tableDef->tableRowStart;
1739 while (--
parser.stackTop >= 0)
1757 WCHAR lastchar[3] = {
'\0',
'\0'};
1759 ME_Cursor linebreakCursor = *selEnd, lastcharCursor = *selEnd;
1763 cf.cbSize =
sizeof(
cf);
1773 if (lastchar[0] ==
'\r' && (lastchar[1] ==
'\n' || lastchar[1] ==
'\0')) {
1779 num_read = to -
from;
1789 ERR(
"EM_STREAMIN without SF_TEXT or SF_RTF\n");
1862 WCHAR wLastChar =
' ';
1864 TRACE(
"flags==0x%08x, chrg->cpMin==%d, chrg->cpMax==%d text==%s\n",
1868 FIXME(
"Flags 0x%08x not implemented\n",
1872 if (chrg->
cpMax == -1)
1875 nMax = chrg->
cpMax > nTextLen ? nTextLen : chrg->
cpMax;
1888 chrgText->
cpMin = -1;
1889 chrgText->
cpMax = -1;
1903 nMax = nMin > nTextLen ? nTextLen : nMin;
1904 if (nMin < nSwap || chrg->cpMax == -1)
1910 if (!nLen || nMin < 0 || nMax < 0 || nMax < nMin)
1932 int nCurStart =
cursor.nOffset;
1941 if (nMatched == nLen)
1944 int nNextStart = nCurStart;
1953 nNextStart = -nMatched;
1965 cursor.nOffset +=
cursor.pPara->member.para.nCharOfs +
cursor.pRun->member.run.nCharOfs;
1977 nCurStart = -nMatched;
2009 int nCurEnd =
cursor.nOffset;
2025 if (nMatched == nLen)
2028 int nPrevEnd = nCurEnd;
2035 if (nPrevEnd - nMatched == 0)
2055 chrgText->
cpMin = nStart;
2056 chrgText->
cpMax = nStart + nLen;
2058 TRACE(
"found at %d-%d\n", nStart, nStart + nLen);
2061 if (nCurEnd - nMatched == 0)
2082 TRACE(
"not found\n");
2093 if (!
ex->cb || !
pText)
return 0;
2127 buflen =
min(crlfmul * nChars,
ex->cb - 1);
2143 if (!strText)
return 0;
2186 pDest = (
WORD *)lpBuff;
2188 for (
i = 0;
i<
cb && pSrc[
pData->nLength+
i];
i++) {
2189 pDest[
i] = pSrc[
pData->nLength+
i];
2205 for (
i = 0;
i<
cb && pSrc[
pData->nLength+
i];
i++) {
2206 pDest[
i] = pSrc[
pData->nLength+
i];
2214static const WCHAR rtfW[] = {
'R',
'i',
'c',
'h',
' ',
'T',
'e',
'x',
't',
' ',
'F',
'o',
'r',
'm',
'a',
't',0};
2222 gds.
hData = med->u.hGlobal;
2237 gds.
hData = med->u.hGlobal;
2309 if (ps && ps->
dwAspect != DVASPECT_CONTENT)
2320 if (
cf &&
cf !=
format->fmt.cfFormat)
continue;
2327 if (
hr !=
S_OK)
goto done;
2335 IDataObject_Release(
data );
2353 hr = IRichEditOleCallback_GetClipboardData(editor->
lpOleCallback, &
range, RECO_COPY, &dataObj);
2359 IDataObject_Release(dataObj);
2367 int offs, num_chars;
2423 startPara =
from->pPara;
2430 start.pPara = startPara;
2471 static const WCHAR endlv10[] = {
'\r',
'\n'};
2503 cursor.nOffset +
cursor.pRun->member.run.nCharOfs == 0 &&
2552 if (
cursor.pRun->member.run.nCharOfs +
cursor.nOffset == 0 &&
2637 ME_ArrowKey(editor, nKey, shift_is_down, ctrl_is_down);
2659 BOOL bDeletionSucceeded;
2730 chf.
cbSize =
sizeof(chf);
2760 wstr = (
WCHAR)charCode;
2763 CHAR charA = charCode;
2770 if ((
unsigned)wstr >=
' ' || wstr ==
'\t')
2786 cursor.pRun->member.run.nCharOfs +
cursor.nOffset == 0 &&
2791 bSelectedRow =
TRUE;
2845 static int clickNum = 0;
2852 (
msg == WM_XBUTTONDBLCLK))
2860 (
msg == WM_XBUTTONDOWN))
2862 static MSG prevClickMsg;
2866 clickMsg.hwnd = (
HWND)editor;
2867 clickMsg.message =
msg;
2868 clickMsg.wParam =
wParam;
2869 clickMsg.lParam =
lParam;
2873 if ((clickNum != 0) &&
2874 (clickMsg.message == prevClickMsg.message) &&
2875 (clickMsg.hwnd == prevClickMsg.hwnd) &&
2876 (clickMsg.wParam == prevClickMsg.wParam) &&
2885 prevClickMsg = clickMsg;
2909 sbi.
cbSize =
sizeof(sbi);
2918 sbi.
cbSize =
sizeof(sbi);
2961 run = &
cursor.pRun->member.run;
2972 int selStart, selEnd;
2976 if (selStart <= offset && selEnd >=
offset) {
3015 if (
cursor.pRun->member.run.reobj)
3022 if (character_count)
3025 if (character_count >= 2)
3225 ITextHost_Release(editor->
texthost);
3228 IUnknown_Release(editor->
reOle);
3283 *remain -=
WHEEL_DELTA * change / amount_per_click;
3316 "EM_SETPASSWORDCHAR",
3317 "EM_EMPTYUNDOBUFFER",
3318 "EM_GETFIRSTVISIBLELINE",
3320 "EM_SETWORDBREAKPROC",
3321 "EM_GETWORDBREAKPROC",
3322 "EM_GETPASSWORDCHAR",
3337 "EM_EXLINEFROMCHAR",
3343 "EM_GETOLEINTERFACE",
3353 "EM_SETOLECALLBACK",
3355 "EM_SETTARGETDEVICE",
3363 "EM_GETWORDBREAKPROCEX",
3364 "EM_SETWORDBREAKPROCEX",
3366 "EM_UNKNOWN_USER_83",
3371 "EM_STOPGROUPTYPING",
3375 "EM_GETAUTOURLDETECT",
3378 "EM_GETTEXTLENGTHEX",
3381 "EM_UNKNOWN_USER_98",
3382 "EM_UNKNOWN_USER_99",
3383 "EM_SETPUNCTUATION",
3384 "EM_GETPUNCTUATION",
3385 "EM_SETWORDWRAPMODE",
3386 "EM_GETWORDWRAPMODE",
3392 "EM_UNKNOWN_USER_109",
3393 "EM_UNKNOWN_USER_110",
3394 "EM_UNKNOWN_USER_111",
3395 "EM_UNKNOWN_USER_112",
3396 "EM_UNKNOWN_USER_113",
3397 "EM_UNKNOWN_USER_114",
3398 "EM_UNKNOWN_USER_115",
3399 "EM_UNKNOWN_USER_116",
3400 "EM_UNKNOWN_USER_117",
3401 "EM_UNKNOWN_USER_118",
3402 "EM_UNKNOWN_USER_119",
3403 "EM_SETLANGOPTIONS",
3404 "EM_GETLANGOPTIONS",
3405 "EM_GETIMECOMPMODE",
3409 "EM_SETIMEMODEBIAS",
3433 if (!isExact)
return;
3440 info.nmhdr.idFrom = 0;
3465 int from, to, nStartCursor;
3593#define UNSUPPORTED_MSG(e) \
3595 FIXME(#e ": stub\n"); \
3596 *phresult = S_FALSE; \
3662 if ((*pfrom|*pto) & 0xFFFF0000)
3711 cf.cbSize =
sizeof(
cf);
3714 tmp_size = (
cf.yHeight / 20) +
wParam;
3718 else if (tmp_size > 12 && tmp_size < 28 && tmp_size % 2)
3719 size = tmp_size + (is_increase ? 1 : -1);
3720 else if (tmp_size > 28 && tmp_size < 36)
3721 size = is_increase ? 36 : 28;
3722 else if (tmp_size > 36 && tmp_size < 48)
3723 size = is_increase ? 48 : 36;
3724 else if (tmp_size > 48 && tmp_size < 72)
3725 size = is_increase ? 72 : 48;
3726 else if (tmp_size > 72 && tmp_size < 80)
3727 size = is_increase ? 80 : 72;
3728 else if (tmp_size > 80 && tmp_size < 1638)
3729 size = 10 * (is_increase ? (tmp_size / 10 + 1) : (tmp_size / 10));
3730 else if (tmp_size >= 1638)
3753 DWORD changedSettings;
3769 changedSettings = oldSettings ^
settings;
3771 if (changedSettings) {
3792 FIXME(
"ECO_VERTICAL not implemented yet!\n");
3794 FIXME(
"ECO_AUTOHSCROLL not implemented yet!\n");
3796 FIXME(
"ECO_AUTOVSCROLL not implemented yet!\n");
3798 FIXME(
"ECO_WANTRETURN not implemented yet!\n");
3800 FIXME(
"ECO_AUTOWORDSELECTION not implemented yet!\n");
3873 BOOL bRtf, bUnicode, bSelection, bUTF8;
3875 static const char utf8_bom[] = {0xef, 0xbb, 0xbf};
3877 if (!pStruct)
return 0;
3886 TRACE(
"EM_SETTEXTEX - %s, flags %d, cp %d\n",
3910 if (bUTF8 && !bUnicode) {
4001 tmp.
cbSize =
sizeof(tmp);
4032 ypara =
p->member.para.pt.y;
4035 ystart = ypara +
p->member.row.pt.y;
4036 yend = ystart +
p->member.row.nHeight;
4138 TRACE(
"WM_SETTEXT - NULL\n");
4190 nTo - nFrom, unicode);
4212 TRACE(
"EM_GETTEXTRANGE min=%d max=%d unicode=%d textlength=%d\n",
4214 if (nStart < 0)
return 0;
4215 if ((nStart == 0 && nEnd == -1) || nEnd > textlength)
4217 if (nStart >= nEnd)
return 0;
4225 const unsigned int nMaxChars = *(
WORD *)
lParam;
4226 unsigned int nCharsLeft = nMaxChars;
4230 TRACE(
"EM_GETLINE: row=%d, nMaxChars=%d (%s)\n", (
int)
wParam, nMaxChars,
4231 unicode ?
"Unicode" :
"Ansi");
4250 dest += nCopy * (unicode ?
sizeof(
WCHAR) : 1);
4251 nCharsLeft -= nCopy;
4265 TRACE(
"EM_GETLINE: got %u characters\n", nMaxChars - nCharsLeft);
4266 return nMaxChars - nCharsLeft - (wroteNull ? 1 : 0);
4289 TRACE(
"EM_GETLINECOUNT: nRows==%d\n",
nRows);
4320 TRACE(
"EM_LINEINDEX: nCharOfs==%d\n", nCharOfs);
4326 int nChars = 0, nThisLineOfs = 0, nNextLineOfs = 0;
4333 FIXME(
"EM_LINELENGTH: returning number of unselected characters on lines with selection unsupported.\n");
4347 nChars = nNextLineOfs - nThisLineOfs;
4439 int nCharOfs, nOffset,
nLength;
4448 nCharOfs =
max(nCharOfs, 0);
4596 const int scrollUnit = 7;
4673 return 0x00010000 | (((editor->
vert_si.
nPos - origNPos)/lineHeight) & 0xffff);
4687 delta = GET_WHEEL_DELTA_WPARAM(
wParam);
4690 if ((delta < 0 && editor->wheel_remain < 0) ||
4707 if (numerator >= 10 && numerator <= 500)
4746 }
else if (
wParam == 1) {
4801 lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW;
4830 case WM_IME_STARTCOMPOSITION:
4842 case WM_IME_COMPOSITION:
4882 case WM_IME_ENDCOMPOSITION:
4922 return editor->
mode;
4983 FIXME(
"EM_SETTARGETDEVICE doesn't use non-NULL target devices\n");
5004 ITextHost_Release(
host );
5025 TRACE(
"enter hwnd %p msg %04x (%s) %lx %lx, unicode %d\n",
5108 dwStyle = (dwStyle &
~mask) | (lresult &
mask);
5117 dwStyle &= ~ES_READONLY;
5130 TRACE(
"exit hwnd %p msg %04x (%s) %lx %lx, unicode %d -> %lu\n",
5212 while (srcChars && buflen && pNextRun)
5218 if (buflen == 1)
break;
5222 srcChars -=
min(nLen, srcChars);
5226 nLen =
min(nLen, srcChars);
5230 nLen =
min(nLen, buflen);
5303 TRACE(
"hWnd %p msg %04x (%s) %08lx %08lx\n",
5310 TRACE(
"hWnd %p msg %04x (%s) %08lx %08lx\n",
5326 FIXME(
"semi stub\n");
5371 static const WCHAR neutral_chars[] = {
'!',
'\"',
'\'',
'(',
')',
',',
'-',
'.',
':',
';',
'<',
'>',
'?',
'[',
']',
'{',
'}'};
5400 int run_len =
cursor.pRun->member.run.len;
5402 nChars -= run_len -
cursor.nOffset;
5405 if (!candidateStarted)
5407 while (
cursor.nOffset < run_len)
5413 candidateStarted =
TRUE;
5414 neutral_end.pPara =
NULL;
5415 space_end.pPara =
NULL;
5419 quoted = (
c ==
'<');
5425 if (candidateStarted)
5427 while (
cursor.nOffset < run_len)
5432 if (quoted &&
c !=
'\r')
5434 if (!space_end.pPara)
5436 if (neutral_end.pPara)
5437 space_end = neutral_end;
5447 if (quoted &&
c ==
'>')
5449 neutral_end.pPara =
NULL;
5450 space_end.pPara =
NULL;
5453 if (!neutral_end.pPara)
5457 neutral_end.pPara =
NULL;
5469 if (candidateStarted)
5471 if (space_end.pPara)
5472 *candidate_max = space_end;
5473 else if (neutral_end.pPara)
5474 *candidate_max = neutral_end;
5479 *candidate_max = *candidate_min =
cursor;
5488#define MAX_PREFIX_LEN 9
5493 {{
'p',
'r',
'o',
's',
'p',
'e',
'r',
'o',
':'}, 9},
5494 {{
't',
'e',
'l',
'n',
'e',
't',
':'}, 7},
5495 {{
'g',
'o',
'p',
'h',
'e',
'r',
':'}, 7},
5496 {{
'm',
'a',
'i',
'l',
't',
'o',
':'}, 7},
5497 {{
'h',
't',
't',
'p',
's',
':'}, 6},
5498 {{
'f',
'i',
'l',
'e',
':'}, 5},
5499 {{
'n',
'e',
'w',
's',
':'}, 5},
5500 {{
'w',
'a',
'i',
's',
':'}, 5},
5501 {{
'n',
'n',
't',
'p',
':'}, 5},
5502 {{
'h',
't',
't',
'p',
':'}, 5},
5503 {{
'w',
'w',
'w',
'.'}, 4},
5504 {{
'f',
't',
'p',
':'}, 4},
5517#undef MAX_PREFIX_LEN
5546 &candidateStart, &candidateEnd))
5553 candidateStart = candidateEnd;
5562 if (startCur.
pRun != candidateStart.
pRun ||
5587 if (candidateStart.
pRun != candidateEnd.
pRun ||
5604 startCur = candidateEnd;
5605 }
while (nChars > 0);
struct mke2fs_defaults settings[]
basic_ostream< _CharT, _Traits > &_STLP_CALL endl(basic_ostream< _CharT, _Traits > &__os)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
void release_typelib(void)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static int list_empty(struct list_entry *head)
static void list_init(struct list_entry *head)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
LONG WINAPI ImmGetCompositionStringW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen)
static const WCHAR indent[]
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI ImmSetCompositionFontW(HIMC hIMC, LPLOGFONTW lplf)
BOOL WINAPI ImmIsIME(HKL hKL)
BOOL WINAPI ImmNotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD_PTR dwValue)
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
HIMC WINAPI ImmGetContext(HWND hWnd)
BOOL WINAPI ImmReleaseContext(HWND hWnd, HIMC hIMC)
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
static const WCHAR createW[]
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
static const char bom_utf8[]
HRESULT WINAPI OleSetClipboard(IDataObject *data)
HRESULT WINAPI OleGetClipboard(IDataObject **obj)
HRESULT WINAPI OleCreateDefaultHandler(REFCLSID clsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
void ME_InsertEndRowFromCursor(ME_TextEditor *editor, int nCursor)
void ME_SetCursorToStart(ME_TextEditor *editor, ME_Cursor *cursor)
BOOL ME_DeleteTextAtCursor(ME_TextEditor *editor, int nCursor, int nChars)
BOOL ME_IsSelection(ME_TextEditor *editor)
void ME_DeleteSelection(ME_TextEditor *editor)
int ME_GetCursorOfs(const ME_Cursor *cursor)
void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor, const WCHAR *str, int len, ME_Style *style)
int ME_MoveCursorChars(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs, BOOL final_eop)
BOOL ME_MoveCursorWords(ME_TextEditor *editor, ME_Cursor *cursor, int nRelOfs)
void ME_InsertOLEFromCursor(ME_TextEditor *editor, const REOBJECT *reo, int nCursor)
void ME_LButtonDown(ME_TextEditor *editor, int x, int y, int clickNum)
int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how)
int ME_GetSelection(ME_TextEditor *editor, ME_Cursor **from, ME_Cursor **to)
BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start, int nChars, BOOL bForce)
void hide_caret(ME_TextEditor *editor)
void ME_MouseMove(ME_TextEditor *editor, int x, int y)
BOOL ME_CharFromPos(ME_TextEditor *editor, int x, int y, ME_Cursor *cursor, BOOL *isExact)
void ME_SendSelChange(ME_TextEditor *editor)
int set_selection_cursors(ME_TextEditor *editor, int from, int to)
int ME_GetSelectionOfs(ME_TextEditor *editor, int *from, int *to)
BOOL ME_ArrowKey(ME_TextEditor *editor, int nVKey, BOOL extend, BOOL ctrl)
void create_caret(ME_TextEditor *editor)
int ME_GetTextLength(ME_TextEditor *editor)
void update_caret(ME_TextEditor *editor)
ME_Style * ME_GetSelectionInsertStyle(ME_TextEditor *editor)
HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start, int nChars, IDataObject **dataobj)
static BOOL create_windowed_editor(HWND hwnd, CREATESTRUCTW *create, BOOL emulate_10)
static struct paste_format paste_formats[]
static void ME_StreamInRTFString(ME_TextEditor *editor, BOOL selection, char *string)
static void ME_RTFReadParnumGroup(RTF_Info *info)
static BOOL ME_Copy(ME_TextEditor *editor, const ME_Cursor *start, int nChars)
static BOOL paste_special(ME_TextEditor *editor, UINT cf, REPASTESPECIAL *ps, BOOL check_only)
#define UNSUPPORTED_MSG(e)
static int ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCHAR *text, CHARRANGE *chrgText)
static HRESULT insert_static_object(ME_TextEditor *editor, HENHMETAFILE hemf, HBITMAP hbmp, const SIZEL *sz)
static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stream, BOOL stripLastCR)
static void ME_RTFReadShpPictGroup(RTF_Info *info)
static void ME_SetText(ME_TextEditor *editor, void *text, BOOL unicode)
static HRESULT paste_emf(ME_TextEditor *editor, FORMATETC *fmt, STGMEDIUM *med)
void ME_ReplaceSel(ME_TextEditor *editor, BOOL can_undo, const WCHAR *str, int len)
static void ME_UpdateSelectionLinkAttribute(ME_TextEditor *editor)
static LRESULT ME_Char(ME_TextEditor *editor, WPARAM charCode, LPARAM flags, BOOL unicode)
static DWORD CALLBACK ME_ReadFromHGLOBALRTF(DWORD_PTR dwCookie, LPBYTE lpBuff, LONG cb, LONG *pcb)
static LRESULT WINAPI REComboWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static BOOL ME_SetCursor(ME_TextEditor *editor)
static const char *const richedit_messages[]
static BOOL is_version_nt(void)
struct tagME_RTFStringStreamStruct ME_RTFStringStreamStruct
static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
static BOOL ME_IsCandidateAnURL(ME_TextEditor *editor, const ME_Cursor *start, int nChars)
LRESULT WINAPI REExtendedRegisterClass(void)
static DWORD CALLBACK ME_ReadFromHGLOBALUnicode(DWORD_PTR dwCookie, LPBYTE lpBuff, LONG cb, LONG *pcb)
static BOOL ME_ShowContextMenu(ME_TextEditor *editor, int x, int y)
static BOOL ME_FindNextURLCandidate(ME_TextEditor *editor, const ME_Cursor *start, int nChars, ME_Cursor *candidate_min, ME_Cursor *candidate_max)
static void ME_SetDefaultFormatRect(ME_TextEditor *editor)
static int ME_GetTextRange(ME_TextEditor *editor, WCHAR *strText, const ME_Cursor *start, int nLen, BOOL unicode)
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
void ME_SendOldNotify(ME_TextEditor *editor, int nCode)
void ME_StreamInFill(ME_InStream *stream)
static void ME_RTFReadHook(RTF_Info *info)
static LRESULT handle_EM_SETCHARFORMAT(ME_TextEditor *editor, WPARAM flags, const CHARFORMAT2W *fmt_in)
static int ME_GetTextEx(ME_TextEditor *editor, GETTEXTEX *ex, LPARAM pText)
static HRESULT paste_rtf(ME_TextEditor *editor, FORMATETC *fmt, STGMEDIUM *med)
static const WCHAR REListBox20W[]
static int calc_wheel_change(int *remain, int amount_per_click)
void ME_RTFTblAttrHook(RTF_Info *info)
ME_TextEditor * ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
static ME_TextBuffer * ME_MakeText(void)
static BOOL ME_FilterEvent(ME_TextEditor *editor, UINT msg, WPARAM *wParam, LPARAM *lParam)
#define STACK_SIZE_DEFAULT
static BOOL copy_or_cut(ME_TextEditor *editor, BOOL cut)
LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode, HRESULT *phresult)
void ME_RTFCharAttrHook(RTF_Info *info)
static int get_default_line_height(ME_TextEditor *editor)
static HRESULT paste_text(ME_TextEditor *editor, FORMATETC *fmt, STGMEDIUM *med)
static void init_paste_formats(void)
static LRESULT WINAPI RichEditWndProcA(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static LRESULT WINAPI RichEditWndProcW(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void ME_ApplyBorderProperties(RTF_Info *info, ME_BorderRect *borderRect, RTFBorder *borderDef)
#define TEXT_LIMIT_DEFAULT
static BOOL isurlneutral(WCHAR c)
static BOOL ME_ListBoxRegistered
LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void ME_RTFReadPictGroup(RTF_Info *info)
static const WCHAR rtfW[]
static LONG ME_GetSelectionType(ME_TextEditor *editor)
static LRESULT WINAPI REListWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static LRESULT ME_WmCreate(ME_TextEditor *editor, LPARAM lParam, BOOL unicode)
static void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam)
struct tagME_GlobalDestStruct ME_GlobalDestStruct
static BOOL ME_UpdateLinkAttribute(ME_TextEditor *editor, ME_Cursor *start, int nChars)
void ME_RTFSpecialCharHook(RTF_Info *info)
static DWORD CALLBACK ME_ReadFromRTFString(DWORD_PTR dwCookie, LPBYTE lpBuff, LONG cb, LONG *pcb)
int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, const ME_Cursor *start, int srcChars, BOOL bCRLF, BOOL bEOP)
static const char * get_msg_name(UINT msg)
static BOOL ME_ComboBoxRegistered
static const char *const edit_messages[]
static BOOL is_link(ME_Run *run)
void ME_RTFParAttrHook(RTF_Info *info)
static void ME_RTFReadObjectGroup(RTF_Info *info)
void ME_DestroyEditor(ME_TextEditor *editor)
static int __cdecl wchar_comp(const void *key, const void *elem)
static BOOL ME_KeyDown(ME_TextEditor *editor, WORD nKey)
static const WCHAR REComboBox20W[]
static LRESULT ME_StreamInText(ME_TextEditor *editor, DWORD dwFormat, ME_InStream *stream, ME_Style *style)
static DWORD read_hex_data(RTF_Info *info, BYTE **out)
static BOOL ME_RegisterEditorClass(HINSTANCE)
LRESULT WINAPI RichEdit10ANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static BOOL handle_enter(ME_TextEditor *editor)
static int ME_CalculateClickCount(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam)
int RTFCheckCM(const RTF_Info *info, int class, int major)
void RTFDestroy(RTF_Info *info)
void RTFSetEditStream(RTF_Info *info, ME_InStream *stream)
int BeginFile(RTF_Info *info)
int RTFGetToken(RTF_Info *info)
void RTFRead(RTF_Info *info)
RTFFont * RTFGetFont(const RTF_Info *info, int num)
void RTFRouteToken(RTF_Info *info)
void RTFInit(RTF_Info *info)
int RTFCheckMM(const RTF_Info *info, int major, int minor)
void RTFFlushOutputBuffer(RTF_Info *info)
RTFColor * RTFGetColor(const RTF_Info *info, int num)
void RTFSetReadHook(RTF_Info *info, RTFFuncPtr f)
void RTFSkipGroup(RTF_Info *info)
void RTFSetDestinationCallback(RTF_Info *info, int dest, RTFFuncPtr callback)
int RTFCheckCMM(const RTF_Info *info, int class, int major, int minor)
void WriterInit(RTF_Info *info)
void RTFReadGroup(RTF_Info *info)
static const WCHAR cr_lf[]
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
#define ITextHost_TxShowScrollBar(This, a, b)
#define ITextHost_TxSetScrollRange(This, a, b, c, d)
void ME_ReleaseStyle(ME_Style *item) DECLSPEC_HIDDEN
#define ITextHost_TxSetFocus(This)
void ME_MoveCursorFromTableRowStartParagraph(ME_TextEditor *editor) DECLSPEC_HIDDEN
ME_Style * ME_GetInsertStyle(ME_TextEditor *editor, int nCursor) DECLSPEC_HIDDEN
void ME_AddRefStyle(ME_Style *item) DECLSPEC_HIDDEN
BOOL cfany_to_cf2w(CHARFORMAT2W *to, const CHARFORMAT2W *from) DECLSPEC_HIDDEN
BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor) DECLSPEC_HIDDEN
void destroy_para(ME_TextEditor *editor, ME_DisplayItem *item) DECLSPEC_HIDDEN
void mark_para_rewrap(ME_TextEditor *editor, ME_DisplayItem *para) DECLSPEC_HIDDEN
static int ME_CharCompare(WCHAR a, WCHAR b, int caseSensitive)
void ME_ScrollRight(ME_TextEditor *editor, int cx) DECLSPEC_HIDDEN
void ME_ContinueCoalescingTransaction(ME_TextEditor *editor) DECLSPEC_HIDDEN
#define ITextHost_TxInvalidateRect(This, a, b)
#define ITextHost_TxGetPropertyBits(This, a, b)
void ME_CursorFromCharOfs(ME_TextEditor *editor, int nCharOfs, ME_Cursor *pCursor) DECLSPEC_HIDDEN
void ME_CheckCharOffsets(ME_TextEditor *editor) DECLSPEC_HIDDEN
void ME_DestroyStyle(ME_Style *item) DECLSPEC_HIDDEN
void ME_ScrollAbs(ME_TextEditor *editor, int x, int y) DECLSPEC_HIDDEN
void ME_SaveTempStyle(ME_TextEditor *editor, ME_Style *style) DECLSPEC_HIDDEN
ME_Style * ME_ApplyStyle(ME_TextEditor *ed, ME_Style *sSrc, CHARFORMAT2W *style) DECLSPEC_HIDDEN
ME_DisplayItem * ME_InsertTableRowEndFromCursor(ME_TextEditor *editor) DECLSPEC_HIDDEN
BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator) DECLSPEC_HIDDEN
ME_DisplayItem * ME_InsertTableRowStartFromCursor(ME_TextEditor *editor) DECLSPEC_HIDDEN
void ME_SendRequestResize(ME_TextEditor *editor, BOOL force) DECLSPEC_HIDDEN
void ME_CheckTablesForCorruption(ME_TextEditor *editor) DECLSPEC_HIDDEN
void ME_DestroyDisplayItem(ME_DisplayItem *item) DECLSPEC_HIDDEN
BOOL ME_Redo(ME_TextEditor *editor) DECLSPEC_HIDDEN
void ME_RunOfsFromCharOfs(ME_TextEditor *editor, int nCharOfs, ME_DisplayItem **ppPara, ME_DisplayItem **ppRun, int *pOfs) DECLSPEC_HIDDEN
void ME_UpdateScrollBar(ME_TextEditor *editor) DECLSPEC_HIDDEN
ME_DisplayItem * ME_InsertTableCellFromCursor(ME_TextEditor *editor) DECLSPEC_HIDDEN
ME_DisplayItem * ME_FindItemBack(ME_DisplayItem *di, ME_DIType nTypeOrClass) DECLSPEC_HIDDEN
void ME_EmptyUndoStack(ME_TextEditor *editor) DECLSPEC_HIDDEN
void ME_GetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *pFmt) DECLSPEC_HIDDEN
#define ITextHost_TxSetCapture(This, a)
#define ITextHost_TxGetSysColor(This, a)
#define ITextHost_TxNotify(This, a, b)
void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt) DECLSPEC_HIDDEN
void ME_InitTableDef(ME_TextEditor *editor, struct RTFTable *tableDef) DECLSPEC_HIDDEN
void ME_DumpStyleToBuf(CHARFORMAT2W *pFmt, char buf[2048]) DECLSPEC_HIDDEN
void ME_EndToUnicode(LONG codepage, LPVOID psz) DECLSPEC_HIDDEN
void ME_ScrollLeft(ME_TextEditor *editor, int cx) DECLSPEC_HIDDEN
void ME_EnsureVisible(ME_TextEditor *editor, ME_Cursor *pCursor) DECLSPEC_HIDDEN
ME_DisplayItem * ME_AppendTableRow(ME_TextEditor *editor, ME_DisplayItem *table_row) DECLSPEC_HIDDEN
ITextHost * ME_CreateTextHost(HWND hwnd, CREATESTRUCTW *cs, BOOL bEmulateVersion10) DECLSPEC_HIDDEN
ME_DisplayItem * ME_GetParagraph(ME_DisplayItem *run) DECLSPEC_HIDDEN
void ME_SetDefaultParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN
BOOL ME_IsInTable(ME_DisplayItem *pItem) DECLSPEC_HIDDEN
void ME_VScrollAbs(ME_TextEditor *editor, int y) DECLSPEC_HIDDEN
#define ITextHost_TxGetClientRect(This, a)
BOOL ME_NextRun(ME_DisplayItem **para, ME_DisplayItem **run, BOOL all_para) DECLSPEC_HIDDEN
#define ITextHost_TxGetDC(This)
void ME_ScrollUp(ME_TextEditor *editor, int cy) DECLSPEC_HIDDEN
void ME_InvalidateSelection(ME_TextEditor *editor) DECLSPEC_HIDDEN
void ME_TabPressedInTable(ME_TextEditor *editor, BOOL bSelectedRow) DECLSPEC_HIDDEN
void ME_MakeFirstParagraph(ME_TextEditor *editor) DECLSPEC_HIDDEN
void ME_CommitUndo(ME_TextEditor *editor) DECLSPEC_HIDDEN
#define ITextHost_TxScreenToClient(This, a)
int ME_RowNumberFromCharOfs(ME_TextEditor *editor, int nOfs) DECLSPEC_HIDDEN
#define ITextHost_TxGetScrollBars(This, a)
void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now) DECLSPEC_HIDDEN
void ME_HScrollAbs(ME_TextEditor *editor, int x) DECLSPEC_HIDDEN
int ME_CharOfsFromRunOfs(ME_TextEditor *editor, const ME_DisplayItem *pPara, const ME_DisplayItem *pRun, int nOfs) DECLSPEC_HIDDEN
void ME_GetSelectionCharFormat(ME_TextEditor *editor, CHARFORMAT2W *pFmt) DECLSPEC_HIDDEN
void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate) DECLSPEC_HIDDEN
#define ITextHost_TxGetSelectionBarWidth(This, a)
LRESULT CreateIRichEditOle(IUnknown *outer_unk, ME_TextEditor *editor, LPVOID *ppvObj) DECLSPEC_HIDDEN
void ME_RewrapRepaint(ME_TextEditor *editor) DECLSPEC_HIDDEN
ME_DisplayItem * ME_InsertTableRowStartAtParagraph(ME_TextEditor *editor, ME_DisplayItem *para) DECLSPEC_HIDDEN
void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod) DECLSPEC_HIDDEN
#define ITextHost_TxGetPasswordChar(This, a)
BOOL ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN
#define ITextHost_TxReleaseDC(This, a)
ME_DisplayItem * ME_FindRowWithNumber(ME_TextEditor *editor, int nRow) DECLSPEC_HIDDEN
void ME_SetSelectionCharFormat(ME_TextEditor *editor, CHARFORMAT2W *pFmt) DECLSPEC_HIDDEN
#define ITextHost_TxSetCursor(This, a, b)
#define ITextHost_TxEnableScrollBar(This, a, b)
void ME_ClearTempStyle(ME_TextEditor *editor) DECLSPEC_HIDDEN
void ME_Repaint(ME_TextEditor *editor) DECLSPEC_HIDDEN
#define ITextHost_TxImmGetContext(This)
ME_DisplayItem * ME_MakeDI(ME_DIType type) DECLSPEC_HIDDEN
static WCHAR * get_text(const ME_Run *run, int offset)
ME_DisplayItem * ME_RowStart(ME_DisplayItem *item) DECLSPEC_HIDDEN
void ME_ScrollDown(ME_TextEditor *editor, int cy) DECLSPEC_HIDDEN
ME_DisplayItem * ME_FindItemFwd(ME_DisplayItem *di, ME_DIType nTypeOrClass) DECLSPEC_HIDDEN
void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN
BOOL cf2w_to_cfany(CHARFORMAT2W *to, const CHARFORMAT2W *from) DECLSPEC_HIDDEN
int ME_PointFromChar(ME_TextEditor *editor, ME_Run *pRun, int nOffset, BOOL visual_order) DECLSPEC_HIDDEN
void ME_GetCharFormat(ME_TextEditor *editor, const ME_Cursor *from, const ME_Cursor *to, CHARFORMAT2W *pFmt) DECLSPEC_HIDDEN
void ME_MarkAllForWrapping(ME_TextEditor *editor) DECLSPEC_HIDDEN
LPWSTR ME_ToUnicode(LONG codepage, LPVOID psz, INT *len) DECLSPEC_HIDDEN
LRESULT ME_StreamOut(ME_TextEditor *editor, DWORD dwFormat, EDITSTREAM *stream) DECLSPEC_HIDDEN
void ME_CommitCoalescingUndo(ME_TextEditor *editor) DECLSPEC_HIDDEN
void ME_SetCharFormat(ME_TextEditor *editor, ME_Cursor *start, ME_Cursor *end, CHARFORMAT2W *pFmt) DECLSPEC_HIDDEN
BOOL ME_PrevRun(ME_DisplayItem **para, ME_DisplayItem **run, BOOL all_para) DECLSPEC_HIDDEN
BOOL ME_Undo(ME_TextEditor *editor) DECLSPEC_HIDDEN
struct RTFTable * ME_MakeTableDef(ME_TextEditor *editor) DECLSPEC_HIDDEN
@ diStartRowOrParagraphOrEnd
#define STREAMIN_BUFFER_SIZE
#define SELECTIONBAR_WIDTH
GLint GLint GLsizei GLsizei GLsizei GLint border
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
HANDLE WINAPI HeapCreate(DWORD flOptions, SIZE_T dwInitialSize, SIZE_T dwMaximumSize)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
BOOL WINAPI HeapDestroy(HANDLE hHeap)
struct INPUTCONTEXTDX * LPINPUTCONTEXTDX
#define NI_COMPOSITIONSTR
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
REFIID LPVOID DWORD_PTR dw
JSAMPARRAY JDIMENSION max_lines
static IN DWORD IN LPVOID lpvReserved
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static HMODULE MODULEINFO DWORD cb
static const struct access_res create[16]
static float(__cdecl *square_half_float)(float x
static UINT PSTR DWORD UINT * need
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define set_selection(hctl, start, end)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
interface IStorage * LPSTORAGE
interface IDataObject * LPDATAOBJECT
const GUID IID_IDataObject
const GUID IID_IOleObject
DWORD WINAPI GetVersion()
#define TM_MULTILEVELUNDO
#define EM_GETAUTOURLDETECT
#define EM_GETIMEMODEBIAS
#define CFU_UNDERLINEDOUBLE
#define EM_SETOLECALLBACK
#define EM_SETBIDIOPTIONS
#define PFE_NOWIDOWCONTROL
#define ECO_AUTOWORDSELECTION
#define PFM_NUMBERINGSTYLE
#define CFU_UNDERLINEWORD
static const WCHAR RICHEDIT_CLASS20W[]
#define EM_GETWORDBREAKPROCEX
#define EM_GETBIDIOPTIONS
#define TM_SINGLECODEPAGE
struct _charformatw CHARFORMATW
#define EM_GETLANGOPTIONS
#define EM_SETWORDBREAKPROCEX
#define RICHEDIT_CLASS20A
#define EM_SETLANGOPTIONS
#define ES_DISABLENOSCROLL
#define PFM_NOWIDOWCONTROL
#define CFE_AUTOBACKCOLOR
#define EM_STOPGROUPTYPING
#define EM_SETTYPOGRAPHYOPTIONS
#define EM_GETTEXTLENGTHEX
#define EM_SETTARGETDEVICE
struct _charformat2w CHARFORMAT2W
#define CFM_UNDERLINETYPE
static const WCHAR MSFTEDIT_CLASS[]
#define EM_EXLINEFROMCHAR
#define EM_GETIMECOMPMODE
#define EM_GETOLEINTERFACE
#define CFU_UNDERLINEDOTTED
#define TM_SINGLELEVELUNDO
#define EM_GETTYPOGRAPHYOPTIONS
#define PFM_NUMBERINGSTART
#define rtfSuperScrShrink
#define rtfParNumTextBefore
#define RTFBorderTypeMask
#define rtfNoWidowControl
#define rtfParNumTextAfter
#define RTFBorderParaRight
#define rtfNestTableProps
#define rtfCellBordBottom
#define RTFBorderCellRight
#define RTFBorderSideMask
#define RTFBorderCellLeft
#define RTFBorderRowBottom
#define RTFBorderParaBottom
#define RTFBorderTypePara
#define RTFBorderTypeCell
#define RTFBorderParaLeft
#define RTFBorderRowRight
#define RTFBorderCellBottom
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
RTFCell cells[MAX_TABLE_CELLS]
ME_DisplayItem * tableRowStart
enum parser_state stack[4]
BITMAPINFOHEADER bmiHeader
struct tagME_DisplayItem * prev_cell
struct tagME_DisplayItem * next_cell
union tagME_DisplayItem::@536 member
struct tagME_DisplayItem * prev
struct tagME_DisplayItem * next
char buffer[STREAMIN_BUFFER_SIZE]
struct tagME_DisplayItem * next_para
struct tagME_DisplayItem * prev_para
struct tagME_DisplayItem * pCell
EDITWORDBREAKPROCW pfnWordBreak
ME_FontCacheItem pFontCache[HFONT_CACHE_SIZE]
ME_DisplayItem * pLastSelEndPara
ME_DisplayItem * pLastSelStartPara
ME_SelectionType nSelectionType
BOOL AutoURLDetect_bEnable
LPRICHEDITOLECALLBACK lpOleCallback
ME_DisplayItem * first_marked_para
#define TXTBIT_AUTOWORDSEL
#define TXTBIT_SAVESELECTION
#define TXTBIT_USEPASSWORD
#define TXTBIT_HIDESELECTION
#define TXTBIT_DISABLEDRAG
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
TW_UINT32 TW_UINT16 TW_UINT16 MSG
static const WCHAR props[]
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_ DWORD _In_ DWORD dwBufLen
#define HRESULT_FROM_WIN32(x)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HENHMETAFILE WINAPI SetEnhMetaFileBits(_In_ UINT nSize, _In_reads_bytes_(nSize) const BYTE *pb)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
HBITMAP WINAPI CreateDIBitmap(_In_ HDC hdc, _In_opt_ const BITMAPINFOHEADER *pbmih, _In_ DWORD fdwInit, _In_opt_ const VOID *pvInit, _In_opt_ const BITMAPINFO *pbmi, _In_ UINT uUsage)
HENHMETAFILE WINAPI SetWinMetaFileBits(_In_ UINT nSize, _In_reads_bytes_(nSize) const BYTE *lpMeta16Data, _In_opt_ HDC hdcRef, _In_opt_ const METAFILEPICT *lpMFP)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HKL WINAPI GetKeyboardLayout(_In_ DWORD)
#define GetWindowLongPtrW
#define EM_GETWORDBREAKPROC
#define EM_GETPASSWORDCHAR
DWORD WINAPI GetMessagePos(void)
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
struct tagSCROLLINFO SCROLLINFO
#define EM_SETPASSWORDCHAR
int WINAPI MessageBoxA(_In_opt_ HWND hWnd, _In_opt_ LPCSTR lpText, _In_opt_ LPCSTR lpCaption, _In_ UINT uType)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define EM_EMPTYUNDOBUFFER
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
UINT WINAPI RegisterClipboardFormatW(_In_ LPCWSTR)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
BOOL WINAPI MessageBeep(_In_ UINT uType)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define EM_GETFIRSTVISIBLELINE
UINT WINAPI GetDoubleClickTime(void)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_IME_SETCONTEXT
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define STATE_SYSTEM_INVISIBLE
#define EM_SETWORDBREAKPROC
HDC WINAPI GetDC(_In_opt_ HWND)
#define STATE_SYSTEM_OFFSCREEN
int(CALLBACK * EDITWORDBREAKPROCW)(LPWSTR, int, int, int)
LONG WINAPI GetMessageTime(void)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
#define WM_IME_COMPOSITIONFULL
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BOOL WINAPI DestroyCaret(void)
#define MAKEINTRESOURCEW(i)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define SetWindowLongPtrW
BOOL WINAPI GetUpdateRect(_In_ HWND, _Out_opt_ LPRECT, _In_ BOOL)
#define WM_WINDOWPOSCHANGED
BOOL WINAPI GetScrollBarInfo(_In_ HWND, _In_ LONG, _Inout_ PSCROLLBARINFO)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
SHORT WINAPI GetKeyState(_In_ int)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)