31#define WIN32_LEAN_AND_MEAN
36#define ImmGetCompositionStringW IMM_FN(ImmGetCompositionStringW)
37#define ImmGetCompositionWindow IMM_FN(ImmGetCompositionWindow)
38#define ImmGetContext IMM_FN(ImmGetContext)
39#define ImmIsIME IMM_FN(ImmIsIME)
40#define ImmLockIMC IMM_FN(ImmLockIMC)
41#define ImmNotifyIME IMM_FN(ImmNotifyIME)
42#define ImmReleaseContext IMM_FN(ImmReleaseContext)
43#define ImmSetCompositionFontW IMM_FN(ImmSetCompositionFontW)
44#define ImmSetCompositionWindow IMM_FN(ImmSetCompositionWindow)
45#define ImmUnlockIMC IMM_FN(ImmUnlockIMC)
52#define BUFLIMIT_INITIAL 30000
54#define ROUND_TO_GROW(size) (((size) + (GROWLENGTH - 1)) & ~(GROWLENGTH - 1))
55#define HSCROLL_FRACTION 3
60#define EF_MODIFIED 0x0001
61#define EF_FOCUSED 0x0002
62#define EF_UPDATE 0x0004
63#define EF_VSCROLL_TRACK 0x0008
64#define EF_HSCROLL_TRACK 0x0010
65#define EF_AFTER_WRAP 0x0080
67#define EF_USE_SOFTBRK 0x0100
68#define EF_DIALOGMODE 0x0200
106 INT undo_insert_count;
109 UINT undo_buffer_size;
118 void *word_break_proc;
154#define SWAP_UINT32(x,y) do { UINT temp = (UINT)(x); (x) = (UINT)(y); (y) = temp; } while(0)
155#define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0)
160 TRACE(
"notification %d sent to %p.\n",
code,
es->hwndParent);
184 return (
es->undo_insert_count ||
lstrlenW(
es->undo_text));
195 es->undo_insert_count = 0;
196 *
es->undo_text =
'\0';
221 DWORD dwEmulatedVersion;
230 version = dwProcVersion < dwEmulatedVersion ? dwProcVersion : dwEmulatedVersion;
260 if(
es->text_length == (
UINT)-1)
262 return es->text_length;
316 ERR(
"unknown action code, please report !\n");
340 if (
es->word_break_proc)
346 TRACE_(relay)(
"\1Call wordbreakW %p (str=%s,idx=%d,cnt=%d,act=%d)\n",
349 TRACE_(relay)(
"\1Ret wordbreakW %p retval=%d\n",
es->word_break_proc,
ret );
364 TRACE_(relay)(
"\1Call wordbreakA %p(str=%s,idx=%d,cnt=%d,act=%d)\n",
368 TRACE_(relay)(
"\1Ret wordbreakA %p retval=%d\n",
es->word_break_proc,
ret );
392 line_def = line_def->
next;
409 HFONT old_font =
NULL;
447 WARN(
"ScriptStringAnalyse failed (%lx)\n",
hr);
457 return line_def->
ssa;
469 HFONT old_font =
NULL;
480 ScriptStringAnalyse(udc, &
es->password_char,
length, (3*
length/2+16), -1,
SSA_LINK|
SSA_FALLBACK|
SSA_GLYPHS|
SSA_PASSWORD, -1,
NULL,
NULL,
NULL,
NULL,
NULL, &
es->ssa);
482 ScriptStringAnalyse(udc, &
es->password_char,
length, (1.5*
length+16), -1,
SSA_LINK|
SSA_FALLBACK|
SSA_GLYPHS|
SSA_PASSWORD, -1,
NULL,
NULL,
NULL,
NULL,
NULL, &
es->ssa);
487 ScriptStringAnalyse(udc,
es->text,
length, (3*
length/2+16), -1,
SSA_LINK|
SSA_FALLBACK|
SSA_GLYPHS, -1,
NULL,
NULL,
NULL,
NULL,
NULL, &
es->ssa);
489 ScriptStringAnalyse(udc,
es->text,
length, (1.5*
length+16), -1,
SSA_LINK|
SSA_FALLBACK|
SSA_GLYPHS, -1,
NULL,
NULL,
NULL,
NULL,
NULL, &
es->ssa);
501 line_def =
es->first_line_def;
502 while (line_def &&
line)
504 line_def = line_def->
next;
514 INT vlc =
es->line_height ? (
es->format_rect.bottom -
es->format_rect.top) /
es->line_height : 0;
534 INT line_index = 0, nstart_line, nstart_index;
535 INT line_count =
es->line_count;
540 if (istart == iend && delta == 0)
543 previous_line =
NULL;
544 current_line =
es->first_line_def;
549 if (istart < current_line->
index + current_line->
length ||
553 previous_line = current_line;
554 current_line = current_line->
next;
556 }
while (current_line);
560 FIXME(
" modification occurred outside buffer\n");
565 nstart_line = line_index;
566 nstart_index = current_line->
index;
573 current_line = previous_line;
575 start_line = current_line;
577 fw =
es->format_rect.right -
es->format_rect.left;
578 current_position =
es->text + current_line->
index;
581 if (current_line != start_line)
583 if (!current_line || current_line->
index + delta > current_position -
es->text)
590 if (new_line ==
NULL)
593 new_line->
next = previous_line->
next;
594 previous_line->
next = new_line;
595 current_line = new_line;
598 else if (current_line->
index + delta < current_position - es->
text)
601 previous_line->
next = current_line->
next;
603 current_line = previous_line->
next;
609 if (current_position -
es->text > iend)
615 current_line->
index = current_position -
es->text;
619 cp = current_position;
621 if (*
cp ==
'\n')
break;
622 if ((*
cp ==
'\r') && (*(
cp + 1) ==
'\n'))
631 }
else if ((
cp > current_position) && (*(
cp - 1) ==
'\r')) {
634 }
else if (*
cp ==
'\n') {
647 if (current_line->
ssa)
655 else current_line->
width = 0;
662 if (current_line->
width > fw && fw >
es->char_width) {
672 if (
d > 1.2f)
d -= 0.2f;
681 if (current_line->
ssa)
689 }
while (prev && current_line->
width > fw);
699 if (current_line->
ssa)
707 current_line->
width -= piDx[prev];
709 }
while ( prev > 0 && current_line->
width > fw);
715 prev = (fw /
es->char_width);
720 if (current_line->
index == nstart_index && istart > current_line->
index + prev)
721 istart = current_line->
index + prev;
724 else if (current_line == start_line &&
725 current_line->
index != nstart_index && orig_net_length < prev)
729 nstart_line = line_index;
730 nstart_index = current_line->
index;
731 istart = current_line->
index + orig_net_length;
740 if (current_line->
ssa)
746 current_line->
width = 0;
748 else current_line->
width = 0;
750 else if (current_line == start_line &&
751 current_line->
index != nstart_index &&
756 nstart_line = line_index;
757 nstart_index = current_line->
index;
758 istart = current_line->
index + orig_net_length;
764 switch (current_line->
ending) {
779 es->text_width =
max(
es->text_width, current_line->
width);
780 current_position += current_line->
length;
781 previous_line = current_line;
784 if ((line_index < es->y_offset) || (line_index >
es->y_offset + vlc))
787 current_line = current_line->
next;
799 pnext = current_line->
next;
802 current_line = pnext;
810 current_line->
index += delta;
811 current_line = current_line->
next;
824 rc.
top =
es->format_rect.top + nstart_line *
es->line_height -
825 (
es->y_offset *
es->line_height);
828 rc.
left =
es->format_rect.left;
835 rc.
right =
es->format_rect.right;
839 rc.
left =
es->format_rect.left;
840 rc.
right =
es->format_rect.right;
845 if (line_count < es->line_count)
847 else if (line_count >
es->line_count)
848 rc.
bottom = line_count *
es->line_height;
850 rc.
bottom = line_index *
es->line_height;
852 rc.
bottom -= (
es->y_offset *
es->line_height);
871 es->text_width =
size->cx;
893 INT line = (
y -
es->format_rect.top) /
es->line_height +
es->y_offset;
897 while ((
line > 0) && line_def->next) {
898 line_index += line_def->length;
899 line_def = line_def->next;
903 x +=
es->x_offset -
es->format_rect.left;
905 x -= (
es->format_rect.right -
es->format_rect.left) - line_def->width;
907 x -= ((
es->format_rect.right -
es->format_rect.left) - line_def->width) / 2;
908 if (
x >= line_def->width) {
910 *after_wrap = (line_def->ending ==
END_WRAP);
911 return line_index + line_def->net_length;
913 if (x <= 0 || !line_def->
ssa) {
923 *after_wrap = ((
index == line_index + line_def->net_length) &&
930 x -=
es->format_rect.left;
936 INT indent = (
es->format_rect.right -
es->format_rect.left) -
es->text_width;
961 if (
x + xoff > 0 || !
es->ssa)
978 else if (
x >
size->cx)
1006 *
x =
min(
max(*
x,
es->format_rect.left),
es->format_rect.right - 1);
1007 *
y =
min(
max(*
y,
es->format_rect.top),
es->format_rect.bottom - 1);
1024 return es->line_count - 1;
1029 line_def =
es->first_line_def;
1031 while ((
index >= 0) && line_def->
next) {
1033 line_def = line_def->
next;
1052 if (
line >=
es->line_count)
1056 line_def =
es->first_line_def;
1059 while ((
index >= 0) && line_def->
next) {
1060 line_index += line_def->
length;
1061 line_def = line_def->
next;
1066 line_index += line_def->
length;
1067 line_def = line_def->
next;
1101 line_def =
es->first_line_def;
1103 while ((
index >= 0) && line_def->
next) {
1104 line_def = line_def->
next;
1132 y = (
l -
es->y_offset) *
es->line_height;
1134 if (after_wrap && (
li ==
index) &&
l) {
1136 line_def =
es->first_line_def;
1138 line_def = line_def->
next;
1143 y -=
es->line_height;
1148 line_def =
es->first_line_def;
1150 line_def = line_def->
next;
1152 lw = line_def->
width;
1153 w =
es->format_rect.right -
es->format_rect.left;
1181 xoff +=
es->char_width * leftover;
1212 w =
es->format_rect.right -
es->format_rect.left;
1213 if (
w >
es->text_width)
1216 x +=
w -
es->text_width;
1218 x += (
w -
es->text_width) / 2;
1224 x +=
es->format_rect.left;
1225 y +=
es->format_rect.top;
1247 rc->
top =
es->format_rect.top + (
line -
es->y_offset) *
es->line_height;
1251 line_def =
es->first_line_def;
1254 while ((
index >= 0) && line_def->
next) {
1255 line_index += line_def->
length;
1256 line_def = line_def->
next;
1261 line_index += line_def->
length;
1262 line_def = line_def->
next;
1271 rc->
top =
es->format_rect.top;
1281 pt3+=
es->format_rect.left;
1291 es->text_length = (
UINT)-1;
1315 TRACE(
"Synchronizing with 32-bit ANSI buffer\n");
1321 ERR(
"no buffer ... please report\n");
1328 if(!
es->hloc32W)
return;
1336 if(countW_new >
es->buffer_size + 1)
1339 TRACE(
"Resizing 32-bit UNICODE buffer from %d+1 to %d WCHARs\n",
es->buffer_size, countW_new);
1343 es->hloc32W = hloc32W_new;
1345 TRACE(
"Real new size %d+1 WCHARs\n",
es->buffer_size);
1348 WARN(
"FAILED! Will synchronize partially\n");
1370 WARN(
"edit hwnd %p already destroyed\n",
es->hwndSelf);
1374 if (!
es->lock_count) {
1375 ERR(
"lock_count == 0 ... please report\n");
1379 ERR(
"es->text == 0 ... please report\n");
1382 if (
force || (
es->lock_count == 1)) {
1390 TRACE(
"Synchronizing with 32-bit ANSI buffer\n");
1391 TRACE(
"%d WCHARs translated to %d bytes\n", countW, countA_new);
1393 if(countA_new > countA)
1397 TRACE(
"Resizing 32-bit ANSI buffer from %d to %d bytes\n", countA, alloc_size);
1401 es->hloc32A = hloc32A_new;
1403 TRACE(
"Real new size %d bytes\n", countA);
1406 WARN(
"FAILED! Will synchronize partially\n");
1417 ERR(
"no buffer ... please report\n");
1438 TRACE(
"trying to ReAlloc to %d+1 characters\n",
size);
1446 TRACE(
"Old 32 bit handle %p, new handle %p\n",
es->hloc32W, hNew32W);
1447 es->hloc32W = hNew32W;
1454 if (
es->buffer_size <
size) {
1455 WARN(
"FAILED ! We now have %d+1\n",
es->buffer_size);
1459 TRACE(
"We now have %d+1\n",
es->buffer_size);
1476 if (size <= es->undo_buffer_size)
1479 TRACE(
"trying to ReAlloc to %d+1\n",
size);
1483 es->undo_buffer_size = alloc_size/
sizeof(
WCHAR) - 1;
1488 WARN(
"FAILED ! We now have %d+1\n",
es->undo_buffer_size);
1502 es->flags &= ~EF_UPDATE;
1517 es->flags &= ~EF_UPDATE;
1562 if ((el < es->y_offset) || (sl >
es->y_offset + vlc))
1567 if (sl < es->y_offset) {
1571 if (el >
es->y_offset + vlc) {
1572 el =
es->y_offset + vlc;
1588 for (
l = sl + 1 ;
l < el ;
l++) {
1646 UINT old_start =
es->selection_start;
1647 UINT old_end =
es->selection_end;
1652 end =
es->selection_end;
1658 es->selection_end =
end;
1662 es->flags &= ~EF_AFTER_WRAP;
1680 if (
end != old_start)
1690 if (old_start >
end )
1718 si.nMax =
es->line_count - 1;
1719 si.nPage =
es->line_height ? (
es->format_rect.bottom -
es->format_rect.top) /
es->line_height : 0;
1720 si.nPos =
es->y_offset;
1721 TRACE(
"SB_VERT, nMin=%d, nMax=%d, nPage=%d, nPos=%d\n",
1722 si.nMin,
si.nMax,
si.nPage,
si.nPos);
1737 si.nMax =
es->text_width - 1;
1738 si.nPage =
es->format_rect.right -
es->format_rect.left;
1739 si.nPos =
es->x_offset;
1740 TRACE(
"SB_HORZ, nMin=%d, nMax=%d, nPage=%d, nPos=%d\n",
1741 si.nMin,
si.nMax,
si.nPage,
si.nPos);
1763 INT x_offset_in_pixels;
1766 if (!
es->line_height || !
es->char_width)
1769 lines_per_page = (
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
1773 x_offset_in_pixels =
es->x_offset;
1781 if (-
dx > x_offset_in_pixels)
1782 dx = -x_offset_in_pixels;
1783 if (
dx >
es->text_width - x_offset_in_pixels)
1784 dx =
es->text_width - x_offset_in_pixels;
1785 nyoff =
max(0,
es->y_offset +
dy);
1786 if (nyoff >=
es->line_count - lines_per_page)
1787 nyoff =
max(0,
es->line_count - lines_per_page);
1788 dy = (
es->y_offset - nyoff) *
es->line_height;
1793 es->y_offset = nyoff;
1797 es->x_offset +=
dx /
es->char_width;
1825 dx *=
es->char_width;
1850 if (
es->y_offset <
es->line_count - 1)
1855 dy = -(
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
1858 if (
es->y_offset <
es->line_count - 1)
1859 dy = (
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
1867 if(
es->y_offset +
dy >
es->line_count - vlc)
1868 dy =
max(
es->line_count - vlc, 0) -
es->y_offset;
1912 .ptCurrentPos = {.x =
x, .y =
y},
1913 .rcArea =
es->format_rect,
1945 EDIT_ImmSetCompositionWindow(
es,
pt);
1966 INT cw =
es->char_width;
1974 if (
l >=
es->y_offset + vlc)
1975 dy =
l - vlc + 1 -
es->y_offset;
1976 if (l < es->y_offset)
1977 dy =
l -
es->y_offset;
1978 ww =
es->format_rect.right -
es->format_rect.left;
1979 if (x < es->format_rect.left)
1981 if (
x >
es->format_rect.right)
1983 if (
dy ||
dx || (
es->y_offset && (
es->line_count -
es->y_offset < vlc)))
1986 if(
es->x_offset +
dx + ww >
es->text_width)
1987 dx =
es->text_width - ww -
es->x_offset;
1988 if(
dx ||
dy || (
es->y_offset && (
es->line_count -
es->y_offset < vlc)))
1997 format_width =
es->format_rect.right -
es->format_rect.left;
1998 if (x < es->format_rect.left) {
2003 }
while ((
x < goal) &&
es->x_offset);
2006 }
else if (
x >
es->format_rect.right) {
2014 }
while ((
x > goal) && (x_last >
es->format_rect.right));
2031 INT e =
es->selection_end;
2036 (
es->text[
e - 1] ==
'\r') && (
es->text[
e] ==
'\n')) {
2038 if (
e && (
es->text[
e - 1] ==
'\r'))
2058 INT s =
es->selection_start;
2059 INT e =
es->selection_end;
2101 INT e =
es->selection_end;
2106 if (
es->text[
e] ==
'\n')
2108 else if ((
es->text[
e] ==
'\r') && (
es->text[
e + 1] ==
'\n'))
2150 INT s =
es->selection_start;
2151 INT e =
es->selection_end;
2158 y + (
es->format_rect.bottom -
es->format_rect.top),
2178 INT s =
es->selection_start;
2179 INT e =
es->selection_end;
2186 y - (
es->format_rect.bottom -
es->format_rect.top),
2206 INT s =
es->selection_start;
2207 INT e =
es->selection_end;
2228 INT s =
es->selection_start;
2229 INT e =
es->selection_end;
2259 INT s =
es->selection_start;
2260 INT e =
es->selection_end;
2309 es->tabs_count,
es->tabs,
es->format_rect.left -
es->x_offset));
2343 if ((line < es->y_offset) || (
line >
es->y_offset + vlc) || (
line >=
es->line_count))
2357 int line_idx =
line;
2364 while (line_def && line_idx)
2366 line_def = line_def->
next;
2369 w =
es->format_rect.right -
es->format_rect.left;
2370 lw = line_def->
width;
2377 x +=
es->format_rect.left;
2384 s =
min(
es->selection_start,
es->selection_end);
2385 e =
max(
es->selection_start,
es->selection_end);
2392 else if (
rev && (
s !=
e) &&
2414 es->format_rect.right =
max(
es->format_rect.right,
es->format_rect.left +
es->char_width);
2417 INT fw, vlc, max_x_offset, max_y_offset;
2420 es->format_rect.bottom =
es->format_rect.top + vlc *
es->line_height;
2423 fw =
es->format_rect.right -
es->format_rect.left;
2424 max_x_offset =
es->text_width - fw;
2425 if(max_x_offset < 0) max_x_offset = 0;
2426 if(
es->x_offset > max_x_offset)
2427 es->x_offset = max_x_offset;
2430 max_y_offset =
es->line_count - vlc;
2431 if(max_y_offset < 0) max_y_offset = 0;
2432 if(
es->y_offset > max_y_offset)
2433 es->y_offset = max_y_offset;
2441 es->format_rect.bottom =
es->format_rect.top +
es->line_height;
2445 es->format_rect.bottom =
min(
es->format_rect.bottom, ClientRect.
bottom);
2492 es->format_rect.left++;
2493 es->format_rect.right--;
2495 if (
es->format_rect.bottom -
es->format_rect.top
2496 >=
es->line_height + 2)
2498 es->format_rect.top++;
2499 es->format_rect.bottom--;
2505 es->format_rect.left +=
bw;
2506 es->format_rect.right -=
bw;
2507 if (
es->format_rect.bottom -
es->format_rect.top
2508 >=
es->line_height + 2 * bh)
2510 es->format_rect.top += bh;
2511 es->format_rect.bottom -= bh;
2515 es->format_rect.left +=
es->left_margin;
2516 es->format_rect.right -=
es->right_margin;
2562 es->flags &= ~EF_USE_SOFTBRK;
2565 FIXME(
"soft break enabled, not implemented\n");
2590 hLocal =
es->hloc32W;
2596 UINT countA, alloc_size;
2597 TRACE(
"Allocating 32-bit ANSI alias buffer\n");
2602 ERR(
"Could not allocate %d bytes for 32-bit ANSI alias buffer\n", alloc_size);
2609 hLocal =
es->hloc32A;
2615 es->hlocapp = hLocal;
2617 TRACE(
"Returning %p, LocalSize() = %Id\n", hLocal,
LocalSize(hLocal));
2630 INT line_len, dst_len;
2634 if (
line >=
es->line_count)
2644 if(dst_len <= line_len)
2659 if(!
ret && line_len)
2695 BOOL send_update,
BOOL honor_limit)
2708 TRACE(
"%s, can_undo %d, send_update %d\n",
2709 debugstr_wn(lpsz_replace, strl), can_undo, send_update);
2711 s =
es->selection_start;
2712 e =
es->selection_end;
2715 if ((
s ==
e) && !strl)
2720 size = tl - (
e -
s) + strl;
2726 if ((honor_limit) && (
size >
es->buffer_limit))
2730 if (
es->buffer_limit < (tl - (
e-
s)))
2733 strl =
min(strl,
es->buffer_limit - (tl - (
e-
s)));
2741 TRACE(
"deleting stuff.\n");
2755 for (
p =
es->text + tl ;
p >=
es->text +
s ;
p--)
2757 for (
i = 0 ,
p =
es->text +
s ;
i < strl ;
i++)
2758 p[
i] = lpsz_replace[
i];
2767 INT st =
min(
es->selection_start,
es->selection_end);
2772 strl -
abs(
es->selection_end -
es->selection_start),
hrgn);
2778 for (
i = 0 ,
p =
es->text ;
i <
e -
s ;
i++)
2782 abs(
es->selection_end -
es->selection_start) - strl,
hrgn);
2790 INT fw =
es->format_rect.right -
es->format_rect.left;
2795 while ((
es->text_width > fw) &&
s + strl >=
s) {
2798 es->text_length = -1;
2810 if (!
es->undo_insert_count && (*
es->undo_text && (
s ==
es->undo_position))) {
2814 (
es->undo_text + utl)[
e -
s] = 0;
2815 }
else if (!
es->undo_insert_count && (*
es->undo_text && (
e ==
es->undo_position))) {
2818 for (
p =
es->undo_text + utl ;
p >=
es->undo_text ;
p--)
2820 for (
i = 0 ,
p =
es->undo_text ;
i <
e -
s ;
i++)
2822 es->undo_position =
s;
2827 es->undo_text[
e -
s] = 0;
2828 es->undo_position =
s;
2831 es->undo_insert_count = 0;
2837 if ((
s ==
es->undo_position) ||
2838 ((
es->undo_insert_count) &&
2839 (
s ==
es->undo_position +
es->undo_insert_count)))
2844 es->undo_insert_count += strl;
2847 es->undo_position =
s;
2848 es->undo_insert_count = strl;
2850 *
es->undo_text =
'\0';
2863 INT delta = strl -
abs(
es->selection_end -
es->selection_start);
2865 if (delta < 0 && es->x_offset)
2867 if (
abs(delta) >
es->x_offset)
2870 es->x_offset += delta;
2893 es->flags &= ~EF_UPDATE;
2913 WARN(
"called with NULL handle\n");
2943 ERR(
"Could not allocate new unicode buffer\n");
2954 es->hloc32W = hloc32W_new;
2966 es->x_offset =
es->y_offset = 0;
2967 es->selection_start =
es->selection_end = 0;
2969 es->flags &= ~EF_MODIFIED;
2970 es->flags &= ~EF_UPDATE;
2996 case 932:
case 936:
case 949:
case 950:
case 1361:
3008 (
fs.fsCsb[0] & FS_DBCS_MASK));
3014 if (side_bearing < 0)
3015 margin =
min(-side_bearing,
width/2);
3044 INT default_left_margin = 0;
3045 INT default_right_margin = 0;
3066 default_left_margin =
width / 2;
3067 default_right_margin =
width / 2;
3072 if (rc_width < default_left_margin + default_right_margin +
width * 2) {
3073 default_left_margin =
es->left_margin;
3074 default_right_margin =
es->right_margin;
3082 es->format_rect.left -=
es->left_margin;
3086 es->left_margin = default_left_margin;
3087 es->format_rect.left +=
es->left_margin;
3091 es->format_rect.right +=
es->right_margin;
3095 es->right_margin = default_right_margin;
3096 es->format_rect.right -=
es->right_margin;
3104 TRACE(
"left=%d, right=%d\n",
es->left_margin,
es->right_margin);
3117 if (
es->password_char ==
c)
3121 es->password_char =
c;
3127 es->style &= ~ES_PASSWORD;
3172 if (
es->word_break_proc == wbp)
3175 es->word_break_proc = wbp;
3210 TRACE(
"before UNDO:insertion length = %d, deletion buffer = %s\n",
3222 TRACE(
"after UNDO:insertion length = %d, deletion buffer = %s\n",
3284 INT s =
min(
es->selection_start,
es->selection_end);
3285 INT e =
max(
es->selection_start,
es->selection_end);
3343 if (
es->bCaptureState)
3377 if (
es->selection_start !=
es->selection_end)
3444 ERR(
"unknown menu item, please report\n");
3496 if (
x == -1 &&
y == -1)
3540 if(!
count)
return 0;
3563 HWND hLBox =
es->hwndListBox;
3575 TRACE_(combo)(
"[%p]: handling msg %x (%x)\n",
es->hwndSelf,
msg,
key);
3628 if (
es->bCaptureState)
3685 if (
es->selection_start !=
es->selection_end) {
3745 FIXME(
"Ctrl+Backspace\n");
3765 es->flags &= ~EF_FOCUSED;
3771 es->wheelDeltaRemainder = 0;
3773 if (
es->hwndListBox ==
NULL) {
3783 es->flags &= ~EF_FOCUSED;
3784 NtUserDestroyCaret();
3789 es->wheelDeltaRemainder = 0;
3805 INT e =
es->selection_end;
3810 es->bCaptureState =
TRUE;
3834 es->bCaptureState =
TRUE;
3854 if (
es->bCaptureState) {
3958 es->format_rect.top,
3959 es->format_rect.right,
3960 es->format_rect.bottom);
3968 if (!
es->bEnableState)
3973 for (
i =
es->y_offset ;
i <=
min(
es->y_offset + vlc,
es->y_offset +
es->line_count - 1) ;
i++) {
4089 es->line_height =
tm.tmHeight;
4090 es->char_width =
tm.tmAveCharWidth;
4154 if (!unicode &&
text)
4166 ERR(
"SetSel may generate UPDATE message whose handler may reset "
4183 es->flags &= ~EF_MODIFIED;
4242 DWORD style_change_mask;
4257 new_style =
style->styleNew & style_change_mask;
4266 new_style &= ~ES_UPPERCASE;
4269 es->style = (
es->style & ~style_change_mask) | new_style;
4273 WARN (
"Invalid style change %Id\n",
which);
4286 if ((
key ==
VK_BACK) && (key_data & 0x2000)) {
4314 fw =
es->format_rect.right -
es->format_rect.left;
4317 TRACE(
"SB_LINELEFT\n");
4319 dx = -
es->char_width;
4322 TRACE(
"SB_LINERIGHT\n");
4323 if (
es->x_offset <
es->text_width)
4324 dx =
es->char_width;
4327 TRACE(
"SB_PAGELEFT\n");
4332 TRACE(
"SB_PAGERIGHT\n");
4333 if (
es->x_offset <
es->text_width)
4342 TRACE(
"SB_RIGHT\n");
4343 if (
es->x_offset <
es->text_width)
4344 dx =
es->text_width -
es->x_offset;
4355 if(pos < 0 || pos > 100)
return 0;
4357 fw =
es->format_rect.right -
es->format_rect.left;
4358 new_x =
pos * (
es->text_width - fw) / 100;
4359 dx =
es->text_width ? (new_x -
es->x_offset) : 0;
4363 TRACE(
"SB_THUMBPOSITION %d\n",
pos);
4364 es->flags &= ~EF_HSCROLL_TRACK;
4371 if(pos < 0 || pos > 100)
return 0;
4373 fw =
es->format_rect.right -
es->format_rect.left;
4374 new_x =
pos * (
es->text_width - fw) / 100;
4375 dx =
es->text_width ? (new_x -
es->x_offset) : 0;
4384 TRACE(
"SB_ENDSCROLL\n");
4400 INT fw =
es->format_rect.right -
es->format_rect.left;
4401 ret =
es->text_width ?
es->x_offset * 100 / (
es->text_width - fw) : 0;
4403 TRACE(
"EM_GETTHUMB: returning %Id\n",
ret);
4407 TRACE(
"EM_LINESCROLL16\n");
4412 ERR(
"undocumented WM_HSCROLL action %d (0x%04x), please report\n",
4418 INT fw =
es->format_rect.right -
es->format_rect.left;
4420 if(
es->x_offset +
dx + fw >
es->text_width)
4421 dx =
es->text_width - fw -
es->x_offset;
4461 TRACE(
"SB_BOTTOM\n");
4462 dy =
es->line_count - 1 -
es->y_offset;
4474 if(pos < 0 || pos > 100)
return 0;
4476 new_y =
pos * (
es->line_count - vlc) / 100;
4477 dy =
es->line_count ? (new_y -
es->y_offset) : 0;
4478 TRACE(
"line_count=%d, y_offset=%d, pos=%d, dy = %d\n",
4483 TRACE(
"SB_THUMBPOSITION %d\n",
pos);
4484 es->flags &= ~EF_VSCROLL_TRACK;
4492 if(pos < 0 || pos > 100)
return 0;
4494 new_y =
pos * (
es->line_count - vlc) / 100;
4495 dy =
es->line_count ? (new_y -
es->y_offset) : 0;
4496 TRACE(
"line_count=%d, y_offset=%d, pos=%d, dy = %d\n",
4507 TRACE(
"SB_ENDSCROLL\n");
4524 ret =
es->line_count ?
es->y_offset * 100 / (
es->line_count - vlc) : 0;
4526 TRACE(
"EM_GETTHUMB: returning %Id\n",
ret);
4535 ERR(
"undocumented WM_VSCROLL action %d (0x%04x), please report\n",
4580 ERR(
"Unable to alloc buffer for IME string\n");
4614 TRACE(
"Creating %s edit control, style = %08lx\n",
4615 unicode ?
"Unicode" :
"ANSI", lpcs->
style);
4627 es->is_unicode = unicode;
4649 es->style &= ~ES_UPPERCASE;
4657 es->style &= ~ES_PASSWORD;
4661 es->style &= ~ES_CENTER;
4662 es->style &= ~WS_HSCROLL;
4663 es->style &= ~ES_AUTOHSCROLL;
4668 es->style &= ~ES_CENTER;
4669 es->style &= ~WS_HSCROLL;
4670 es->style &= ~WS_VSCROLL;
4672 es->password_char =
'*';
4682 es->undo_buffer_size =
es->buffer_size;
4701 es->style &= ~WS_BORDER;
4750 es->selection_start =
es->selection_end = 0;
4779 if (
es->hloc32W && (
es->hloc32W !=
es->hlocapp)) {
4782 if (
es->hloc32A && (
es->hloc32A !=
es->hlocapp)) {
4786 pc =
es->first_line_def;
4911 FIXME(
"undocumented message 0x%x, please report\n",
msg);
5005 es->style &= ~ES_READONLY;
5008 if (old_style ^
es->style)
5030 WCHAR charW =
es->password_char;
5060 if (
wParam == EMSIS_COMPOSITIONSTRING)
5100 if (
es->hwndListBox)
5123 ch[0] =
es->lead_byte;
5129 es->lead_byte = low;
5138 if (
es->hwndListBox)
5155 if (
wParam <= 0x000fffff)
5289 case WM_STYLECHANGED:
5293 case WM_STYLECHANGING:
5306 si.cbSize =
sizeof(
si);
5327 INT pulScrollLines = 3;
5334 wheelDelta = GET_WHEEL_DELTA_WPARAM(
wParam);
5336 if ((wheelDelta < 0 && es->wheelDeltaRemainder < 0) ||
5337 (wheelDelta > 0 &&
es->wheelDeltaRemainder > 0))
5338 es->wheelDeltaRemainder += wheelDelta;
5340 es->wheelDeltaRemainder = wheelDelta;
5341 if (
es->wheelDeltaRemainder && pulScrollLines)
5344 pulScrollLines =
min(
es->line_count, pulScrollLines);
5345 cLineScroll = pulScrollLines *
es->wheelDeltaRemainder /
WHEEL_DELTA;
5346 es->wheelDeltaRemainder -=
WHEEL_DELTA * cLineScroll / pulScrollLines;
5361 lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW;
5387 case WM_IME_STARTCOMPOSITION:
5400 case WM_IME_COMPOSITION:
5421 case IMR_QUERYCHARPOSITION:
5424 IMECHARPOSITION *chpos = (IMECHARPOSITION *)
lParam;
5429 chpos->cLineHeight =
es->line_height;
5430 chpos->rcDocument =
es->format_rect;
5480static const WCHAR editW[] = {
'E',
'd',
'i',
't',0};
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static const WCHAR nameW[]
LRESULT WINAPI EditWndProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
LRESULT WINAPI EditWndProcA(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static float(WINAPI *pD2D1Tan)(float angle)
static void EDIT_WM_Paint(EDITSTATE *es, HDC hdc)
static void EDIT_MoveEnd(EDITSTATE *es, BOOL extend, BOOL ctrl)
static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev)
static void EDIT_GetResultStr(HIMC hIMC, EDITSTATE *es)
static BOOL EDIT_IsInsideDialog(EDITSTATE *es)
static INT get_vertical_line_count(EDITSTATE *es)
static INT EDIT_WordBreakProc(EDITSTATE *es, LPWSTR s, INT index, INT count, INT action)
static LRESULT EDIT_WM_LButtonDblClk(EDITSTATE *es)
static void EDIT_MoveBackward(EDITSTATE *es, BOOL extend)
static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c)
BOOL WINAPI GetCharWidthInfo(HDC, struct char_width_info *)
static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw)
static SCRIPT_STRING_ANALYSIS EDIT_UpdateUniscribeData(EDITSTATE *es, HDC dc, INT line)
static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_replace, UINT strl, BOOL send_update, BOOL honor_limit)
static void EDIT_CalcLineWidth_SL(EDITSTATE *es)
static LRESULT EDIT_WM_MButtonDown(EDITSTATE *es)
static void EDIT_EM_ScrollCaret(EDITSTATE *es)
static void EDIT_InvalidateUniscribeData_linedef(LINEDEF *line_def)
#define ROUND_TO_GROW(size)
static BOOL EDIT_CheckCombo(EDITSTATE *es, UINT msg, INT key)
static void EDIT_SetRectNP(EDITSTATE *es, const RECT *rc)
static BOOL EDIT_EM_FmtLines(EDITSTATE *es, BOOL add_eol)
static void EDIT_WM_Copy(EDITSTATE *es)
static void EDIT_ML_InvalidateText(EDITSTATE *es, INT start, INT end)
static void EDIT_GetLineRect(EDITSTATE *es, INT line, INT scol, INT ecol, LPRECT rc)
static BOOL EDIT_EM_LineScroll_internal(EDITSTATE *es, INT dx, INT dy)
static void EDIT_SetCaretPos(EDITSTATE *es, INT pos, BOOL after_wrap)
static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta, HRGN hrgn)
static void EDIT_MoveUp_ML(EDITSTATE *es, BOOL extend)
static INT EDIT_PaintText(EDITSTATE *es, HDC dc, INT x, INT y, INT line, INT col, INT count, BOOL rev)
static LRESULT EDIT_EM_CharFromPos(EDITSTATE *es, INT x, INT y)
static void EDIT_MoveHome(EDITSTATE *es, BOOL extend, BOOL ctrl)
static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos)
static void EDIT_WM_Cut(EDITSTATE *es)
static void EDIT_EM_SetPasswordChar(EDITSTATE *es, WCHAR c)
static SCRIPT_STRING_ANALYSIS EDIT_UpdateUniscribeData_linedef(EDITSTATE *es, HDC dc, LINEDEF *line_def)
struct tagLINEDEF LINEDEF
static void EDIT_AdjustFormatRect(EDITSTATE *es)
static INT EDIT_WM_GetText(const EDITSTATE *es, INT count, LPWSTR dst)
static void EDIT_WM_ContextMenu(EDITSTATE *es, INT x, INT y)
static LRESULT EDIT_WM_MouseMove(EDITSTATE *es, INT x, INT y)
static void EDIT_MovePageUp_ML(EDITSTATE *es, BOOL extend)
static void EDIT_LockBuffer(EDITSTATE *es)
static void EDIT_UnlockBuffer(EDITSTATE *es, BOOL force)
static LRESULT EDIT_WM_NCDestroy(EDITSTATE *es)
static LRESULT EDIT_WM_LButtonDown(EDITSTATE *es, DWORD keys, INT x, INT y)
static BOOL notify_parent(const EDITSTATE *es, INT code)
static INT EDIT_EM_LineIndex(const EDITSTATE *es, INT line)
static void EDIT_ConfinePoint(const EDITSTATE *es, LPINT x, LPINT y)
static HLOCAL EDIT_EM_GetHandle(EDITSTATE *es)
static INT EDIT_EM_GetLine(EDITSTATE *es, INT line, LPWSTR dst)
static BOOL EDIT_EM_Undo(EDITSTATE *es)
static UINT get_text_length(EDITSTATE *es)
static void EDIT_InvalidateUniscribeData(EDITSTATE *es)
static void EDIT_WM_Paste(EDITSTATE *es)
static void EDIT_UpdateScrollInfo(EDITSTATE *es)
static void EDIT_MovePageDown_ML(EDITSTATE *es, BOOL extend)
static LRESULT EDIT_WM_KillFocus(HTHEME theme, EDITSTATE *es)
static void EDIT_MoveWordForward(EDITSTATE *es, BOOL extend)
static int get_cjk_fontinfo_margin(int width, int side_bearing)
static LRESULT EDIT_WM_SysKeyDown(EDITSTATE *es, INT key, DWORD key_data)
static LRESULT EDIT_EM_GetThumb(EDITSTATE *es)
static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs)
static LRESULT EDIT_WM_LButtonUp(EDITSTATE *es)
static void EDIT_WM_Clear(EDITSTATE *es)
static BOOL EDIT_EM_CanUndo(const EDITSTATE *es)
static void EDIT_EM_EmptyUndoBuffer(EDITSTATE *es)
static INT EDIT_CharFromPos(EDITSTATE *es, INT x, INT y, LPBOOL after_wrap)
static void EDIT_EM_SetMargins(EDITSTATE *es, INT action, WORD left, WORD right, BOOL repaint)
static void EDIT_MoveWordBackward(EDITSTATE *es, BOOL extend)
static void text_buffer_changed(EDITSTATE *es)
static HBRUSH EDIT_NotifyCtlColor(EDITSTATE *es, HDC hdc)
static void EDIT_WM_SetFocus(HTHEME theme, EDITSTATE *es)
static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc)
static LRESULT EDIT_WM_Create(EDITSTATE *es, const WCHAR *name)
static void EDIT_InvalidateText(EDITSTATE *es, INT start, INT end)
static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key)
static void EDIT_EM_SetLimitText(EDITSTATE *es, UINT limit)
static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap)
static void EDIT_MoveForward(EDITSTATE *es, BOOL extend)
static LRESULT EDIT_EM_Scroll(EDITSTATE *es, INT action)
static LRESULT EDIT_EM_GetSel(const EDITSTATE *es, PUINT start, PUINT end)
static void EDIT_EM_SetWordBreakProc(EDITSTATE *es, EDITWORDBREAKPROCW wbp)
static void EDIT_SL_InvalidateText(EDITSTATE *es, INT start, INT end)
static void EDIT_MoveDown_ML(EDITSTATE *es, BOOL extend)
static LRESULT EDIT_WM_StyleChanged(EDITSTATE *es, WPARAM which, const STYLESTRUCT *style)
static INT EDIT_CallWordBreakProc(EDITSTATE *es, INT start, INT index, INT count, INT action)
static INT EDIT_EM_LineFromChar(EDITSTATE *es, INT index)
static void EDIT_ContextMenuCommand(EDITSTATE *es, UINT id)
static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos)
static BOOL EDIT_MakeFit(EDITSTATE *es, UINT size)
static void EDIT_WM_SetText(EDITSTATE *es, LPCWSTR text)
static BOOL EDIT_MakeUndoFit(EDITSTATE *es, UINT size)
static void EDIT_UpdateTextRegion(EDITSTATE *es, HRGN hrgn, BOOL bErase)
static void EDIT_UpdateText(EDITSTATE *es, const RECT *rc, BOOL bErase)
static BOOL EDIT_EM_SetTabStops(EDITSTATE *es, INT count, const INT *tabs)
static DWORD get_font_margins(HDC hdc, const TEXTMETRICW *tm)
static BOOL EDIT_EM_SetSel(EDITSTATE *es, UINT start, UINT end, BOOL after_wrap)
static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es)
static BOOL EDIT_EM_LineScroll(EDITSTATE *es, INT dx, INT dy)
static void EDIT_WM_Size(EDITSTATE *es, UINT action)
static INT EDIT_EM_LineLength(EDITSTATE *es, INT index)
static const WCHAR indent[]
static __inline const char * debugstr_an(const char *s, int n)
#define HeapFree(x, y, z)
#define WINE_DECLARE_DEBUG_CHANNEL(x)
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR version[]
static void cleanup(void)
DWORD WINAPI GetProcessVersion(IN DWORD ProcessId)
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
BOOL WINAPI IsDBCSLeadByteEx(UINT codepage, BYTE testchar)
DWORD WINAPI CharLowerBuffW(WCHAR *str, DWORD len)
DWORD WINAPI CharUpperBuffW(WCHAR *str, DWORD len)
_ACRTIMP size_t __cdecl strlen(const char *)
HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa)
HRESULT WINAPI ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS ssa, int *piDx)
HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, int cGlyphs, int iCharset, DWORD dwFlags, int iReqWidth, SCRIPT_CONTROL *psControl, SCRIPT_STATE *psState, const int *piDx, SCRIPT_TABDEF *pTabdef, const BYTE *pbInClass, SCRIPT_STRING_ANALYSIS *pssa)
HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS ssa, int iX, int iY, UINT uOptions, const RECT *prc, int iMinSel, int iMaxSel, BOOL fDisabled)
const SIZE *WINAPI ScriptString_pSize(SCRIPT_STRING_ANALYSIS ssa)
const int *WINAPI ScriptString_pcOutChars(SCRIPT_STRING_ANALYSIS ssa)
HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS ssa, int iX, int *piCh, int *piTrailing)
HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS ssa, int icp, BOOL fTrailing, int *pX)
HRESULT WINAPI ScriptBreak(const WCHAR *chars, int count, const SCRIPT_ANALYSIS *sa, SCRIPT_LOGATTR *la)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
struct FONTSIGNATURE FONTSIGNATURE
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei width
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLubyte GLubyte GLubyte GLubyte w
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
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 * u
HLOCAL NTAPI LocalReAlloc(HLOCAL hMem, SIZE_T dwBytes, UINT uFlags)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
LPVOID NTAPI LocalLock(HLOCAL hMem)
BOOL NTAPI LocalUnlock(HLOCAL hMem)
SIZE_T NTAPI LocalSize(HLOCAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
BOOL WINAPI ImmSetCompositionFontW(_In_ HIMC hIMC, _In_ LPLOGFONTW lplf)
struct INPUTCONTEXTDX * LPINPUTCONTEXTDX
BOOL WINAPI ImmSetCompositionWindow(_In_ HIMC hIMC, _In_ LPCOMPOSITIONFORM lpCompForm)
HIMC WINAPI ImmGetContext(_In_ HWND hWnd)
BOOL WINAPI ImmReleaseContext(_In_ HWND hWnd, _In_ HIMC hIMC)
LONG WINAPI ImmGetCompositionStringW(_In_ HIMC hIMC, _In_ DWORD dwIndex, _Out_writes_bytes_opt_(dwBufLen) LPVOID lpBuf, _In_ DWORD dwBufLen)
BOOL WINAPI ImmIsIME(_In_ HKL hKL)
BOOL WINAPI ImmNotifyIME(_In_ HIMC hIMC, _In_ DWORD dwAction, _In_ DWORD dwIndex, _In_ DWORD_PTR dwValue)
LPINPUTCONTEXT WINAPI ImmLockIMC(_In_ HIMC hIMC)
#define NI_COMPOSITIONSTR
BOOL WINAPI ImmUnlockIMC(_In_ HIMC hIMC)
DWORD NTAPI NtUserScrollWindowEx(HWND hWnd, INT dx, INT dy, const RECT *rect, const RECT *clipRect, HRGN hrgnUpdate, LPRECT rcUpdate, UINT flags)
BOOL NTAPI NtUserShowCaret(HWND hWnd)
HWND NTAPI NtUserSetFocus(HWND hWnd)
DWORD NTAPI NtUserSetScrollInfo(HWND hwnd, int fnBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
BOOL NTAPI NtUserInvalidateRect(HWND hWnd, CONST RECT *lpRect, BOOL bErase)
BOOL NTAPI NtUserGetCaretPos(LPPOINT lpPoint)
BOOL NTAPI NtUserCloseClipboard(VOID)
BOOL NTAPI NtUserInvalidateRgn(HWND hWnd, HRGN hRgn, BOOL bErase)
BOOL NTAPI NtUserCreateCaret(HWND hWnd, HBITMAP hBitmap, int nWidth, int nHeight)
BOOL NTAPI NtUserEmptyClipboard(VOID)
UINT NTAPI NtUserEnableMenuItem(HMENU hMenu, UINT uIDEnableItem, UINT uEnable)
BOOL NTAPI NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT *lPs)
HDC NTAPI NtUserBeginPaint(HWND hWnd, PAINTSTRUCT *lPs)
HWND NTAPI NtUserSetCapture(HWND Wnd)
BOOL NTAPI NtUserDestroyMenu(HMENU hMenu)
SHORT NTAPI NtUserGetKeyState(INT VirtKey)
#define GetWin32ClientInfo()
BOOL NTAPI NtUserIsClipboardFormatAvailable(UINT format)
BOOL NTAPI NtUserSetWindowFNID(HWND hWnd, WORD fnID)
HDC NTAPI NtUserGetDC(HWND hWnd)
REFIID LPVOID DWORD_PTR dw
static ERESOURCE GlobalLock
#define memcpy(s1, s2, n)
static const char textA[]
static const WCHAR textW[]
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
static BOOL is_cjk_charset(HDC dc)
static BOOL is_cjk_font(HDC dc)
static DWORD get_input_codepage(void)
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI CopyRect(_Out_ LPRECT, _In_ LPCRECT)
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_CTLCOLORSTATIC
HKL WINAPI GetKeyboardLayout(_In_ DWORD)
#define GetWindowLongPtrW
#define EM_GETWORDBREAKPROC
#define EM_GETPASSWORDCHAR
#define COLOR_WINDOWFRAME
int(CALLBACK * EDITWORDBREAKPROCA)(LPSTR, int, int, int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CAPTURECHANGED
struct tagSCROLLINFO SCROLLINFO
#define EM_SETPASSWORDCHAR
HBRUSH WINAPI GetSysColorBrush(_In_ int)
HANDLE WINAPI SetClipboardData(_In_ UINT, _In_opt_ HANDLE)
#define EM_EMPTYUNDOBUFFER
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
struct tagCREATESTRUCTA * LPCREATESTRUCTA
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
HWND WINAPI GetCapture(void)
BOOL WINAPI OpenClipboard(_In_opt_ HWND)
HANDLE WINAPI GetClipboardData(_In_ UINT)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define EM_GETFIRSTVISIBLELINE
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_IME_SETCONTEXT
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define SIF_DISABLENOSCROLL
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
#define EM_SETWORDBREAKPROC
#define COLOR_HIGHLIGHTTEXT
int(CALLBACK * EDITWORDBREAKPROCW)(LPWSTR, int, int, int)
#define CB_GETDROPPEDSTATE
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
BOOL WINAPI SetCaretPos(_In_ int, _In_ int)
int WINAPI GetScrollPos(_In_ HWND, _In_ int)
BOOL WINAPI CreateCaret(_In_ HWND, _In_opt_ HBITMAP, _In_ int, _In_ int)
BOOL WINAPI DestroyCaret(void)
#define SystemParametersInfo
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
BOOL WINAPI IsWindowVisible(_In_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG WINAPI TabbedTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(chCount) LPCWSTR lpString, _In_ int chCount, _In_ int nTabPositions, _In_reads_opt_(nTabPositions) CONST INT *lpnTabStopPositions, _In_ int nTabOrigin)
HMENU WINAPI LoadMenuA(_In_opt_ HINSTANCE, _In_ LPCSTR)
void redraw(int x, int y, int cx, int cy)
const struct builtin_class_descr EDIT_builtin_class
wchar_t const *const size_t const buffer_size
SCRIPT_STRING_ANALYSIS ssa
PSYMCRYPT_PARALLEL_HASH_OPERATION next
#define WM_CBLOSTTEXTFOCUS
const char * SPY_GetMsgName(UINT msg, HWND hWnd)
#define NtUserSetPrivateData(HWND, OFFSET, SIZE, VALUE)
#define NtUserReleaseDC(HWND, HDC)
#define NTUSER_WNDPROC_EDIT
#define NtUserGetPrivateData(HWND, OFFSET, SIZE)
#define NtUserReleaseCapture()
HBRUSH FASTCALL GetControlBrush(PWND pwnd, HDC hdc, UINT ctlType)
static void EDIT_UpdateImmCompositionWindow(EDITSTATE *es, UINT x, UINT y)
static EDITSTATE * get_control_state(HWND hwnd)
LRESULT WINAPI EditWndProc_common(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
static LRESULT DefWindowProcT(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode)
static int EDIT_is_valid_format_rect(const EDITSTATE *es, const RECT *rc)
DWORD get_app_version(void)
static void EDIT_UpdateImmCompositionFont(EDITSTATE *es)
static EDITSTATE * set_control_state(HWND hwnd, EDITSTATE *state)
int WINAPI GetBkMode(_In_ HDC)
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
BOOL WINAPI GetCharABCWidthsA(_In_ HDC hdc, _In_ UINT wFirst, _In_ UINT wLast, _Out_writes_(wLast - wFirst+1) LPABC lpABC)
int WINAPI GetTextCharsetInfo(_In_ HDC, _Out_opt_ LPFONTSIGNATURE, _In_ DWORD)
int WINAPI GetClipBox(_In_ HDC, _Out_ LPRECT)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *)
COLORREF WINAPI GetTextColor(_In_ HDC)
int WINAPI IntersectClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
COLORREF WINAPI GetBkColor(_In_ HDC)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
DWORD WINAPI GdiGetCodePage(HDC)
BOOL WINAPI TextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCWSTR lpString, _In_ int c)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
BOOL WINAPI SetRectRgn(_In_ HRGN, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI GetTextExtentPoint32W(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE psizl)
BOOL WINAPI GetCharABCWidthsW(_In_ HDC hdc, _In_ UINT wFirst, _In_ UINT wLast, _Out_writes_(wLast - wFirst+1) LPABC lpABC)
struct _OSVERSIONINFOW OSVERSIONINFOW