57#define BUFLIMIT_INITIAL 30000
59#define ROUND_TO_GROW(size) (((size) + (GROWLENGTH - 1)) & ~(GROWLENGTH - 1))
60#define HSCROLL_FRACTION 3
65#define EF_MODIFIED 0x0001
66#define EF_FOCUSED 0x0002
67#define EF_UPDATE 0x0004
68#define EF_VSCROLL_TRACK 0x0008
69#define EF_HSCROLL_TRACK 0x0010
70#define EF_AFTER_WRAP 0x0080
72#define EF_USE_SOFTBRK 0x0100
73#define EF_DIALOGMODE 0x0200
75#define ID_CB_LISTBOX 1000
138 BOOL cue_banner_draw_focused;
154 int composition_start;
164#define SWAP_UINT32(x,y) do { UINT temp = (UINT)(x); (x) = (UINT)(y); (y) = temp; } while(0)
165#define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0)
170 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';
219 if(
es->text_length == (
UINT)-1)
221 return es->text_length;
275 ERR(
"unknown action code, please report !\n");
299 if (
es->word_break_proc)
322 line_def = line_def->
next;
360 WARN(
"ScriptStringAnalyse failed (%x)\n",
hr);
370 return line_def->
ssa;
391 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);
393 ScriptStringAnalyse(udc,
es->text,
length, (1.5*
length+16), -1,
SSA_LINK|
SSA_FALLBACK|
SSA_GLYPHS, -1,
NULL,
NULL,
NULL,
NULL,
NULL, &
es->ssa);
404 line_def =
es->first_line_def;
405 while (line_def &&
line)
407 line_def = line_def->
next;
417 INT vlc = (
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
437 INT line_index = 0, nstart_line, nstart_index;
438 INT line_count =
es->line_count;
443 if (istart == iend && delta == 0)
446 previous_line =
NULL;
447 current_line =
es->first_line_def;
452 if (istart < current_line->
index + current_line->
length ||
456 previous_line = current_line;
457 current_line = current_line->
next;
459 }
while (current_line);
463 FIXME(
" modification occurred outside buffer\n");
468 nstart_line = line_index;
469 nstart_index = current_line->
index;
476 current_line = previous_line;
478 start_line = current_line;
480 fw =
es->format_rect.right -
es->format_rect.left;
481 current_position =
es->text + current_line->
index;
484 if (current_line != start_line)
486 if (!current_line || current_line->
index + delta > current_position -
es->text)
490 LINEDEF *new_line = heap_alloc_zero(
sizeof(*new_line));
491 new_line->
next = previous_line->
next;
492 previous_line->
next = new_line;
493 current_line = new_line;
496 else if (current_line->
index + delta < current_position - es->
text)
499 previous_line->
next = current_line->
next;
501 current_line = previous_line->
next;
507 if (current_position -
es->text > iend)
513 current_line->
index = current_position -
es->text;
517 cp = current_position;
519 if (*
cp ==
'\n')
break;
520 if ((*
cp ==
'\r') && (*(
cp + 1) ==
'\n'))
529 }
else if ((
cp > current_position) && (*(
cp - 1) ==
'\r')) {
532 }
else if (*
cp ==
'\n') {
545 if (current_line->
ssa)
553 else current_line->
width = 0;
560 if (current_line->
width > fw && fw >
es->char_width) {
570 if (
d > 1.2f)
d -= 0.2f;
579 if (current_line->
ssa)
587 }
while (prev && current_line->
width > fw);
597 if (current_line->
ssa)
605 current_line->
width -= piDx[prev];
607 }
while ( prev > 0 && current_line->
width > fw);
613 prev = (fw /
es->char_width);
618 if (current_line->
index == nstart_index && istart > current_line->
index + prev)
619 istart = current_line->
index + prev;
622 else if (current_line == start_line &&
623 current_line->
index != nstart_index && orig_net_length < prev)
627 nstart_line = line_index;
628 nstart_index = current_line->
index;
629 istart = current_line->
index + orig_net_length;
638 if (current_line->
ssa)
644 current_line->
width = 0;
646 else current_line->
width = 0;
648 else if (current_line == start_line &&
649 current_line->
index != nstart_index &&
654 nstart_line = line_index;
655 nstart_index = current_line->
index;
656 istart = current_line->
index + orig_net_length;
662 switch (current_line->
ending) {
677 es->text_width =
max(
es->text_width, current_line->
width);
678 current_position += current_line->
length;
679 previous_line = current_line;
682 if ((line_index < es->y_offset) || (line_index >
es->y_offset + vlc))
685 current_line = current_line->
next;
697 pnext = current_line->
next;
700 current_line = pnext;
708 current_line->
index += delta;
709 current_line = current_line->
next;
722 rc.
top =
es->format_rect.top + nstart_line *
es->line_height -
723 (
es->y_offset *
es->line_height);
726 rc.
left =
es->format_rect.left;
733 rc.
right =
es->format_rect.right;
737 rc.
left =
es->format_rect.left;
738 rc.
right =
es->format_rect.right;
743 if (line_count < es->line_count)
745 else if (line_count >
es->line_count)
746 rc.
bottom = line_count *
es->line_height;
748 rc.
bottom = line_index *
es->line_height;
750 rc.
bottom -= (
es->y_offset *
es->line_height);
769 es->text_width =
size->cx;
791 INT line = (
y -
es->format_rect.top) /
es->line_height +
es->y_offset;
795 while ((
line > 0) && line_def->next) {
796 line_index += line_def->length;
797 line_def = line_def->next;
801 x +=
es->x_offset -
es->format_rect.left;
803 x -= (
es->format_rect.right -
es->format_rect.left) - line_def->width;
805 x -= ((
es->format_rect.right -
es->format_rect.left) - line_def->width) / 2;
806 if (
x >= line_def->width) {
808 *after_wrap = (line_def->ending ==
END_WRAP);
809 return line_index + line_def->net_length;
811 if (x <= 0 || !line_def->
ssa) {
821 *after_wrap = ((
index == line_index + line_def->net_length) &&
828 x -=
es->format_rect.left;
834 INT indent = (
es->format_rect.right -
es->format_rect.left) -
es->text_width;
859 if (
x + xoff > 0 || !
es->ssa)
876 else if (
x >
size->cx)
904 *
x =
min(
max(*
x,
es->format_rect.left),
es->format_rect.right - 1);
905 *
y =
min(
max(*
y,
es->format_rect.top),
es->format_rect.bottom - 1);
922 return es->line_count - 1;
927 line_def =
es->first_line_def;
931 line_def = line_def->
next;
950 if (
line >=
es->line_count)
954 line_def =
es->first_line_def;
958 line_index += line_def->
length;
959 line_def = line_def->
next;
964 line_index += line_def->
length;
965 line_def = line_def->
next;
999 line_def =
es->first_line_def;
1001 while ((
index >= 0) && line_def->
next) {
1002 line_def = line_def->
next;
1030 y = (
l -
es->y_offset) *
es->line_height;
1032 if (after_wrap && (
li ==
index) &&
l) {
1034 line_def =
es->first_line_def;
1036 line_def = line_def->
next;
1041 y -=
es->line_height;
1046 line_def =
es->first_line_def;
1048 line_def = line_def->
next;
1050 lw = line_def->
width;
1051 w =
es->format_rect.right -
es->format_rect.left;
1063 x = (lw > 0 ?
es->x_offset :
x -
es->x_offset);
1091 xoff +=
es->char_width * leftover;
1122 w =
es->format_rect.right -
es->format_rect.left;
1123 if (
w >
es->text_width)
1126 x +=
w -
es->text_width;
1128 x += (
w -
es->text_width) / 2;
1134 x +=
es->format_rect.left;
1135 y +=
es->format_rect.top;
1157 rc->
top =
es->format_rect.top + (
line -
es->y_offset) *
es->line_height;
1161 line_def =
es->first_line_def;
1164 while ((
index >= 0) && line_def->
next) {
1165 line_index += line_def->
length;
1166 line_def = line_def->
next;
1171 line_index += line_def->
length;
1172 line_def = line_def->
next;
1181 rc->
top =
es->format_rect.top;
1191 pt3+=
es->format_rect.left;
1201 es->text_length = (
UINT)-1;
1236 WARN(
"edit hwnd %p already destroyed\n",
es->hwndSelf);
1240 if (!
es->lock_count)
1242 ERR(
"lock_count == 0 ... please report\n");
1248 ERR(
"es->text == 0 ... please report\n");
1252 if (force || (
es->lock_count == 1))
1261 ERR(
"no buffer ... please report\n");
1284 TRACE(
"trying to ReAlloc to %d+1 characters\n",
size);
1292 TRACE(
"Old 32 bit handle %p, new handle %p\n",
es->hloc32W, hNew32W);
1293 es->hloc32W = hNew32W;
1300 if (
es->buffer_size <
size) {
1301 WARN(
"FAILED ! We now have %d+1\n",
es->buffer_size);
1305 TRACE(
"We now have %d+1\n",
es->buffer_size);
1322 if (size <= es->undo_buffer_size)
1325 TRACE(
"trying to ReAlloc to %d+1\n",
size);
1329 es->undo_buffer_size = alloc_size/
sizeof(
WCHAR) - 1;
1334 WARN(
"FAILED ! We now have %d+1\n",
es->undo_buffer_size);
1348 es->flags &= ~EF_UPDATE;
1363 es->flags &= ~EF_UPDATE;
1408 if ((el < es->y_offset) || (sl >
es->y_offset + vlc))
1413 if (sl < es->y_offset) {
1417 if (el >
es->y_offset + vlc) {
1418 el =
es->y_offset + vlc;
1434 for (
l = sl + 1 ;
l < el ;
l++) {
1492 UINT old_start =
es->selection_start;
1493 UINT old_end =
es->selection_end;
1496 if (
start == old_start &&
end == old_end)
1501 end =
es->selection_end;
1507 es->selection_end =
end;
1511 es->flags &= ~EF_AFTER_WRAP;
1529 if (
end != old_start)
1539 if (old_start >
end )
1569 si.
nMax =
es->line_count - 1;
1570 si.
nPage = (
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
1572 TRACE(
"SB_VERT, nMin=%d, nMax=%d, nPage=%d, nPos=%d\n",
1583 si.
nMax =
es->text_width - 1;
1584 si.
nPage =
es->format_rect.right -
es->format_rect.left;
1586 TRACE(
"SB_HORZ, nMin=%d, nMax=%d, nPage=%d, nPos=%d\n",
1605 INT x_offset_in_pixels;
1606 INT lines_per_page = (
es->format_rect.bottom -
es->format_rect.top) /
1611 x_offset_in_pixels =
es->x_offset;
1619 if (-
dx > x_offset_in_pixels)
1620 dx = -x_offset_in_pixels;
1621 if (
dx >
es->text_width - x_offset_in_pixels)
1622 dx =
es->text_width - x_offset_in_pixels;
1623 nyoff =
max(0,
es->y_offset +
dy);
1624 if (nyoff >=
es->line_count - lines_per_page)
1625 nyoff =
max(0,
es->line_count - lines_per_page);
1626 dy = (
es->y_offset - nyoff) *
es->line_height;
1631 es->y_offset = nyoff;
1635 es->x_offset +=
dx /
es->char_width;
1663 dx *=
es->char_width;
1688 if (
es->y_offset <
es->line_count - 1)
1693 dy = -(
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
1696 if (
es->y_offset <
es->line_count - 1)
1697 dy = (
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
1705 if(
es->y_offset +
dy >
es->line_count - vlc)
1706 dy =
max(
es->line_count - vlc, 0) -
es->y_offset;
1768 EDIT_ImmSetCompositionWindow(
es,
pt);
1787 INT cw =
es->char_width;
1795 if (
l >=
es->y_offset + vlc)
1796 dy =
l - vlc + 1 -
es->y_offset;
1797 if (l < es->y_offset)
1798 dy =
l -
es->y_offset;
1799 ww =
es->format_rect.right -
es->format_rect.left;
1800 if (x < es->format_rect.left)
1802 if (
x >
es->format_rect.right)
1804 if (
dy ||
dx || (
es->y_offset && (
es->line_count -
es->y_offset < vlc)))
1807 if(
es->x_offset +
dx + ww >
es->text_width)
1808 dx =
es->text_width - ww -
es->x_offset;
1809 if(
dx ||
dy || (
es->y_offset && (
es->line_count -
es->y_offset < vlc)))
1818 format_width =
es->format_rect.right -
es->format_rect.left;
1819 if (x < es->format_rect.left) {
1824 }
while ((
x < goal) &&
es->x_offset);
1827 }
else if (
x >
es->format_rect.right) {
1835 }
while ((
x > goal) && (x_last >
es->format_rect.right));
1852 INT e =
es->selection_end;
1857 (
es->text[
e - 1] ==
'\r') && (
es->text[
e] ==
'\n')) {
1859 if (
e && (
es->text[
e - 1] ==
'\r'))
1879 INT s =
es->selection_start;
1880 INT e =
es->selection_end;
1922 INT e =
es->selection_end;
1927 if (
es->text[
e] ==
'\n')
1929 else if ((
es->text[
e] ==
'\r') && (
es->text[
e + 1] ==
'\n'))
1971 INT s =
es->selection_start;
1972 INT e =
es->selection_end;
1979 y + (
es->format_rect.bottom -
es->format_rect.top),
1999 INT s =
es->selection_start;
2000 INT e =
es->selection_end;
2007 y - (
es->format_rect.bottom -
es->format_rect.top),
2027 INT s =
es->selection_start;
2028 INT e =
es->selection_end;
2049 INT s =
es->selection_start;
2050 INT e =
es->selection_end;
2080 INT s =
es->selection_start;
2081 INT e =
es->selection_end;
2113 HFONT hUnderline = 0;
2129 if (
es->composition_len == 0)
2148 es->tabs_count,
es->tabs,
es->format_rect.left -
es->x_offset));
2158 if (
es->composition_len == 0)
2196 if ((line < es->y_offset) || (
line >
es->y_offset + vlc) || (
line >=
es->line_count))
2210 int line_idx =
line;
2217 while (line_def && line_idx)
2219 line_def = line_def->
next;
2222 w =
es->format_rect.right -
es->format_rect.left;
2223 lw = line_def->
width;
2230 x +=
es->format_rect.left;
2237 s =
min(
es->selection_start,
es->selection_end);
2238 e =
max(
es->selection_start,
es->selection_end);
2245 else if (
rev && (
s !=
e) &&
2253 if (
es->cue_banner_text &&
es->text_length == 0 && (!(
es->flags &
EF_FOCUSED) ||
es->cue_banner_draw_focused))
2273 es->format_rect.right =
max(
es->format_rect.right,
es->format_rect.left +
es->char_width);
2276 INT fw, vlc, max_x_offset, max_y_offset;
2279 es->format_rect.bottom =
es->format_rect.top + vlc *
es->line_height;
2282 fw =
es->format_rect.right -
es->format_rect.left;
2283 max_x_offset =
es->text_width - fw;
2284 if(max_x_offset < 0) max_x_offset = 0;
2285 if(
es->x_offset > max_x_offset)
2286 es->x_offset = max_x_offset;
2289 max_y_offset =
es->line_count - vlc;
2290 if(max_y_offset < 0) max_y_offset = 0;
2291 if(
es->y_offset > max_y_offset)
2292 es->y_offset = max_y_offset;
2299 es->format_rect.bottom =
es->format_rect.top +
es->line_height;
2303 es->format_rect.bottom =
min(
es->format_rect.bottom, ClientRect.
bottom);
2329 es->format_rect.left++;
2330 es->format_rect.right--;
2332 if (
es->format_rect.bottom -
es->format_rect.top
2333 >=
es->line_height + 2)
2335 es->format_rect.top++;
2336 es->format_rect.bottom--;
2343 if (
es->format_rect.bottom -
es->format_rect.top >=
es->line_height + 2 * bh)
2347 es->format_rect.left +=
es->left_margin;
2348 es->format_rect.right -=
es->right_margin;
2394 es->flags &= ~EF_USE_SOFTBRK;
2397 FIXME(
"soft break enabled, not implemented\n");
2422 es->hlocapp =
es->hloc32W;
2436 INT line_len, dst_len;
2442 if (
line >=
es->line_count)
2453 if (dst_len <= line_len)
2494 BOOL send_update,
BOOL honor_limit)
2507 TRACE(
"%s, can_undo %d, send_update %d\n",
2508 debugstr_wn(lpsz_replace, strl), can_undo, send_update);
2510 s =
es->selection_start;
2511 e =
es->selection_end;
2514 if ((
s ==
e) && !strl)
2519 size = tl - (
e -
s) + strl;
2525 if ((honor_limit) && (
size >
es->buffer_limit))
2529 if (
es->buffer_limit < (tl - (
e-
s)))
2532 strl =
min(strl,
es->buffer_limit - (tl - (
e-
s)));
2540 TRACE(
"deleting stuff.\n");
2554 for (
p =
es->text + tl ;
p >=
es->text +
s ;
p--)
2556 for (
i = 0 ,
p =
es->text +
s ;
i < strl ;
i++)
2557 p[
i] = lpsz_replace[
i];
2566 INT st =
min(
es->selection_start,
es->selection_end);
2571 strl -
abs(
es->selection_end -
es->selection_start),
hrgn);
2577 for (
i = 0 ,
p =
es->text ;
i <
e -
s ;
i++)
2581 abs(
es->selection_end -
es->selection_start) - strl,
hrgn);
2589 INT fw =
es->format_rect.right -
es->format_rect.left;
2595 while ((
es->text_width > fw) &&
s + strl > 0) {
2597 while ((
es->text_width > fw) &&
s + strl >=
s) {
2601 es->text_length = -1;
2613 if (!
es->undo_insert_count && (*
es->undo_text && (
s ==
es->undo_position))) {
2617 (
es->undo_text + utl)[
e -
s] = 0;
2618 }
else if (!
es->undo_insert_count && (*
es->undo_text && (
e ==
es->undo_position))) {
2621 for (
p =
es->undo_text + utl ;
p >=
es->undo_text ;
p--)
2623 for (
i = 0 ,
p =
es->undo_text ;
i <
e -
s ;
i++)
2625 es->undo_position =
s;
2630 es->undo_text[
e -
s] = 0;
2631 es->undo_position =
s;
2634 es->undo_insert_count = 0;
2640 if ((
s ==
es->undo_position) ||
2641 ((
es->undo_insert_count) &&
2642 (
s ==
es->undo_position +
es->undo_insert_count)))
2647 es->undo_insert_count += strl;
2650 es->undo_position =
s;
2651 es->undo_insert_count = strl;
2653 *
es->undo_text =
'\0';
2666 INT delta = strl -
abs(
es->selection_end -
es->selection_start);
2668 if (delta < 0 && es->x_offset)
2670 if (
abs(delta) >
es->x_offset)
2673 es->x_offset += delta;
2696 es->flags &= ~EF_UPDATE;
2729 es->x_offset =
es->y_offset = 0;
2730 es->selection_start =
es->selection_end = 0;
2732 es->flags &= ~EF_MODIFIED;
2733 es->flags &= ~EF_UPDATE;
2762 case 932:
case 936:
case 949:
case 950:
case 1361:
2766 (
fs.fsCsb[0] & FS_DBCS_MASK));
2773 if (side_bearing < 0)
2774 margin =
min(-side_bearing,
width/2);
2803 INT default_left_margin = 0;
2804 INT default_right_margin = 0;
2824 default_left_margin =
width / 2;
2825 default_right_margin =
width / 2;
2830 if (rc_width < default_left_margin + default_right_margin +
width * 2) {
2831 default_left_margin =
es->left_margin;
2832 default_right_margin =
es->right_margin;
2840 es->format_rect.left -=
es->left_margin;
2844 es->left_margin = default_left_margin;
2845 es->format_rect.left +=
es->left_margin;
2849 es->format_rect.right +=
es->right_margin;
2853 es->right_margin = default_right_margin;
2854 es->format_rect.right -=
es->right_margin;
2862 TRACE(
"left=%d, right=%d\n",
es->left_margin,
es->right_margin);
2878 if (
es->password_char ==
c)
2882 es->password_char =
c;
2888 es->style &= ~ES_PASSWORD;
2924 if (
es->word_break_proc == wbp)
2927 es->word_break_proc = wbp;
2957 TRACE(
"before UNDO:insertion length = %d, deletion buffer = %s\n",
2969 TRACE(
"after UNDO:insertion length = %d, deletion buffer = %s\n",
3031 INT s =
min(
es->selection_start,
es->selection_end);
3032 INT e =
max(
es->selection_start,
es->selection_end);
3090 if (
es->bCaptureState)
3111 static const WCHAR cr_lfW[] = {
'\r',
'\n'};
3119 static const WCHAR tabW[] = {
'\t'};
3127 if (
es->selection_start !=
es->selection_end)
3194 ERR(
"unknown menu item, please report\n");
3243 if (
pt.x == -1 &&
pt.y == -1)
3288 HWND hLBox =
es->hwndListBox;
3300 TRACE(
"[%p]: handling msg %x (%x)\n",
es->hwndSelf,
msg,
key);
3407 if (
es->selection_start !=
es->selection_end) {
3485 HWND hwndSelf =
es->hwndSelf;
3487 es->flags &= ~EF_FOCUSED;
3493 es->wheelDeltaRemainder = 0;
3513 INT e =
es->selection_end;
3518 es->bCaptureState =
TRUE;
3528 es->region_posx =
es->region_posy = 0;
3544 es->bCaptureState =
TRUE;
3550 es->region_posx =
es->region_posy = 0;
3567 if (
es->bCaptureState) {
3611 es->region_posx = (prex <
x) ? -1 : ((prex >
x) ? 1 : 0);
3612 es->region_posy = (prey <
y) ? -1 : ((prey >
y) ? 1 : 0);
3680 es->format_rect.top,
3681 es->format_rect.right,
3682 es->format_rect.bottom);
3690 if (!
es->bEnableState)
3695 for (
i =
es->y_offset ;
i <=
min(
es->y_offset + vlc,
es->y_offset +
es->line_count - 1) ;
i++) {
3718 HRGN cliprgn = region;
3741 r.right - cxEdge,
r.bottom - cyEdge);
3742 if (region != (HRGN)1)
3767 if (cliprgn != region)
3848 es->line_height =
tm.tmHeight;
3849 es->char_width =
tm.tmAveCharWidth;
3911 ERR(
"SetSel may generate UPDATE message whose handler may reset "
3926 es->flags &= ~EF_MODIFIED;
3985 DWORD style_change_mask;
3995 new_style =
style->styleNew & style_change_mask;
4004 new_style &= ~ES_UPPERCASE;
4007 es->style = (
es->style & ~style_change_mask) | new_style;
4011 WARN (
"Invalid style change %ld\n",
which);
4024 if ((
key ==
VK_BACK) && (key_data & 0x2000)) {
4043 if (
es->region_posx < 0) {
4045 }
else if (
es->region_posx > 0) {
4071 fw =
es->format_rect.right -
es->format_rect.left;
4074 TRACE(
"SB_LINELEFT\n");
4076 dx = -
es->char_width;
4079 TRACE(
"SB_LINERIGHT\n");
4080 if (
es->x_offset <
es->text_width)
4081 dx =
es->char_width;
4084 TRACE(
"SB_PAGELEFT\n");
4089 TRACE(
"SB_PAGERIGHT\n");
4090 if (
es->x_offset <
es->text_width)
4099 TRACE(
"SB_RIGHT\n");
4100 if (
es->x_offset <
es->text_width)
4101 dx =
es->text_width -
es->x_offset;
4112 if(pos < 0 || pos > 100)
return 0;
4114 fw =
es->format_rect.right -
es->format_rect.left;
4115 new_x =
pos * (
es->text_width - fw) / 100;
4116 dx =
es->text_width ? (new_x -
es->x_offset) : 0;
4120 TRACE(
"SB_THUMBPOSITION %d\n",
pos);
4121 es->flags &= ~EF_HSCROLL_TRACK;
4128 if(pos < 0 || pos > 100)
return 0;
4130 fw =
es->format_rect.right -
es->format_rect.left;
4131 new_x =
pos * (
es->text_width - fw) / 100;
4132 dx =
es->text_width ? (new_x -
es->x_offset) : 0;
4141 TRACE(
"SB_ENDSCROLL\n");
4157 INT fw =
es->format_rect.right -
es->format_rect.left;
4158 ret =
es->text_width ?
es->x_offset * 100 / (
es->text_width - fw) : 0;
4160 TRACE(
"EM_GETTHUMB: returning %ld\n",
ret);
4164 TRACE(
"EM_LINESCROLL16\n");
4169 ERR(
"undocumented WM_HSCROLL action %d (0x%04x), please report\n",
4175 INT fw =
es->format_rect.right -
es->format_rect.left;
4177 if(
es->x_offset +
dx + fw >
es->text_width)
4178 dx =
es->text_width - fw -
es->x_offset;
4218 TRACE(
"SB_BOTTOM\n");
4219 dy =
es->line_count - 1 -
es->y_offset;
4231 if(pos < 0 || pos > 100)
return 0;
4233 new_y =
pos * (
es->line_count - vlc) / 100;
4234 dy =
es->line_count ? (new_y -
es->y_offset) : 0;
4235 TRACE(
"line_count=%d, y_offset=%d, pos=%d, dy = %d\n",
4240 TRACE(
"SB_THUMBPOSITION %d\n",
pos);
4241 es->flags &= ~EF_VSCROLL_TRACK;
4249 if(pos < 0 || pos > 100)
return 0;
4251 new_y =
pos * (
es->line_count - vlc) / 100;
4252 dy =
es->line_count ? (new_y -
es->y_offset) : 0;
4253 TRACE(
"line_count=%d, y_offset=%d, pos=%d, dy = %d\n",
4264 TRACE(
"SB_ENDSCROLL\n");
4281 ret =
es->line_count ?
es->y_offset * 100 / (
es->line_count - vlc) : 0;
4283 TRACE(
"EM_GETTHUMB: returning %ld\n",
ret);
4292 ERR(
"undocumented WM_VSCROLL action %d (0x%04x), please report\n",
4337 es->cue_banner_draw_focused = draw_focused;
4352 if (!
es->cue_banner_text)
4389 ERR(
"Unable to allocate IME CompositionString\n");
4406 lpCompStrAttr =
heap_alloc(dwBufLenAttr + 1);
4409 ERR(
"Unable to allocate IME Attribute String\n");
4415 lpCompStrAttr[dwBufLenAttr] = 0;
4421 if (
es->selection_end <
es->composition_start)
4422 es->composition_start =
es->selection_end;
4425 es->selection_start =
es->composition_start;
4427 if (
es->composition_len > 0)
4428 es->selection_end =
es->composition_start +
es->composition_len;
4430 es->selection_end =
es->selection_start;
4433 es->composition_len =
abs(
es->composition_start -
es->selection_end);
4435 es->selection_start =
es->composition_start;
4436 es->selection_end =
es->selection_start +
es->composition_len;
4457 ERR(
"Unable to alloc buffer for IME string\n");
4465 if (
es->selection_end <
es->composition_start)
4466 es->composition_start =
es->selection_end;
4468 es->selection_start =
es->composition_start;
4469 es->selection_end =
es->composition_start +
es->composition_len;
4471 es->composition_start =
es->selection_end;
4472 es->composition_len = 0;
4484 if (
es->selection_start !=
es->selection_end)
4487 if (
es->composition_len == 0 &&
es->selection_start !=
es->selection_end)
4490 es->composition_start =
es->selection_end;
4529 TRACE(
"Creating edit control, style = %08x\n", lpcs->
style);
4531 if (!(
es = heap_alloc_zero(
sizeof(*
es))))
4562 es->style &= ~ES_UPPERCASE;
4570 es->style &= ~ES_PASSWORD;
4574 es->style &= ~ES_CENTER;
4575 es->style &= ~WS_HSCROLL;
4576 es->style &= ~ES_AUTOHSCROLL;
4581 es->style &= ~ES_CENTER;
4582 es->style &= ~WS_HSCROLL;
4583 es->style &= ~WS_VSCROLL;
4585 es->password_char =
'*';
4593 if (!(
es->undo_text = heap_alloc_zero((
es->buffer_size + 1) *
sizeof(
WCHAR))))
4595 es->undo_buffer_size =
es->buffer_size;
4598 if (!(
es->first_line_def = heap_alloc_zero(
sizeof(
LINEDEF))))
4614 es->style &= ~WS_BORDER;
4665 es->selection_start =
es->selection_end = 0;
4701 if (
es->hloc32W && (
es->hloc32W !=
es->hlocapp))
4706 pc =
es->first_line_def;
4817 FIXME(
"undocumented message 0x%x, please report\n",
msg);
4887 es->style &= ~ES_READONLY;
4890 if (old_style ^
es->style)
4967 if (
es->hwndListBox)
4986 if (
es->hwndListBox)
5001 if (
wParam <= 0x000fffff)
5124 case WM_STYLECHANGED:
5128 case WM_STYLECHANGING:
5147 INT pulScrollLines = 3;
5156 wheelDelta = GET_WHEEL_DELTA_WPARAM(
wParam);
5158 if ((wheelDelta < 0 && es->wheelDeltaRemainder < 0) ||
5159 (wheelDelta > 0 &&
es->wheelDeltaRemainder > 0))
5160 es->wheelDeltaRemainder += wheelDelta;
5162 es->wheelDeltaRemainder = wheelDelta;
5164 if (
es->wheelDeltaRemainder && pulScrollLines)
5167 pulScrollLines =
min(
es->line_count, pulScrollLines);
5168 cLineScroll = pulScrollLines *
es->wheelDeltaRemainder /
WHEEL_DELTA;
5169 es->wheelDeltaRemainder -=
WHEEL_DELTA * cLineScroll / pulScrollLines;
5179 lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW;
5199 case WM_IME_STARTCOMPOSITION:
5205 es->composition_start =
es->selection_end;
5206 es->composition_len = 0;
5210 case WM_IME_COMPOSITION:
5217 case WM_IME_ENDCOMPOSITION:
5221 if (
es->composition_len > 0)
5224 es->selection_end =
es->selection_start;
5225 es->composition_len= 0;
5248 case IMR_QUERYCHARPOSITION:
5250 IMECHARPOSITION *chpos = (IMECHARPOSITION *)
lParam;
5256 chpos->cLineHeight =
es->line_height;
5257 chpos->rcDocument =
es->format_rect;
5266 case WM_THEMECHANGED:
5288 memset(&wndClass, 0,
sizeof(wndClass));
5304void EDIT_Unregister(
void)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
LONG WINAPI ImmGetCompositionStringW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen)
static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
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_GetCompositionStr(HIMC hIMC, LPARAM CompFlag, EDITSTATE *es)
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 BOOL EDIT_EM_GetCueBanner(EDITSTATE *es, WCHAR *buf, DWORD size)
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)
static void EDIT_WM_NCPaint(HWND hwnd, HRGN region)
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 WCHAR * heap_strdupW(const WCHAR *str)
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 void EDIT_WM_Timer(EDITSTATE *es)
static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap)
static BOOL EDIT_EM_SetCueBanner(EDITSTATE *es, BOOL draw_focused, const WCHAR *cue_text)
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[]
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 ImmSetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
HIMC WINAPI ImmGetContext(HWND hWnd)
BOOL WINAPI ImmReleaseContext(HWND hWnd, HIMC hIMC)
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
static void cleanup(void)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
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)
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME hTheme, int iPartId, int iStateId)
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
HTHEME WINAPI GetWindowTheme(HWND hwnd)
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
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
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
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)
struct INPUTCONTEXTDX * LPINPUTCONTEXTDX
#define NI_COMPOSITIONSTR
REFIID LPVOID DWORD_PTR dw
#define memcpy(s1, s2, n)
struct task_struct * current
static const WCHAR textW[]
static UINT UINT LPWORD LPABC abc
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static float(__cdecl *square_half_float)(float x
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
static SCRIPT_CACHE SCRIPT_ANALYSIS * psa
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
void redraw(int x, int y, int cx, int cy)
static unsigned __int64 next
wchar_t const *const size_t const buffer_size
SCRIPT_STRING_ANALYSIS ssa
TW_UINT32 TW_UINT16 TW_UINT16 MSG
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)
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)
int WINAPI ExcludeClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
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)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
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)
HWND WINAPI GetFocus(void)
HWND WINAPI SetCapture(_In_ HWND hWnd)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
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)
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define GetWindowLongPtrW
BOOL WINAPI ShowCaret(_In_opt_ HWND)
HDC WINAPI GetWindowDC(_In_opt_ HWND)
#define EM_GETWORDBREAKPROC
BOOL WINAPI ReleaseCapture(void)
#define EM_GETPASSWORDCHAR
#define COLOR_WINDOWFRAME
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
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#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)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
BOOL WINAPI CloseClipboard(void)
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
HWND WINAPI GetCapture(void)
BOOL WINAPI OpenClipboard(_In_opt_ HWND)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
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)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#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)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
#define SIF_DISABLENOSCROLL
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI EmptyClipboard(void)
#define EM_SETWORDBREAKPROC
#define COLOR_HIGHLIGHTTEXT
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI InvalidateRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
DWORD WINAPI CharUpperBuffW(_Inout_updates_(cchLength) LPWSTR lpsz, _In_ DWORD cchLength)
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)
#define WM_IME_COMPOSITIONFULL
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
BOOL WINAPI IsWindowEnabled(_In_ HWND)
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
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 UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
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)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SystemParametersInfo
#define SetWindowLongPtrW
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI IsClipboardFormatAvailable(_In_ UINT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
SHORT WINAPI GetKeyState(_In_ int)
DWORD WINAPI CharLowerBuffW(_Inout_updates_(cchLength) LPWSTR lpsz, _In_ DWORD cchLength)
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)