3606{
3608
3610
3633
3634
3635
3641 {
3643
3651 }
3654 return 0;
3656 {
3657
3662 if ((*pfrom|*pto) & 0xFFFF0000)
3663 return -1;
3665 }
3667 {
3671 return 0;
3672 }
3674 {
3677 else
3679
3680
3681
3683 }
3694 {
3695
3699
3701 }
3703 {
3707
3710
3711 cf.cbSize =
sizeof(
cf);
3714 tmp_size = (
cf.yHeight / 20) +
wParam;
3715
3716 if (tmp_size <= 1)
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)
3732 else
3734
3740
3742 }
3744 {
3745
3746
3747
3753 DWORD changedSettings;
3754
3756 {
3759 break;
3762 break;
3765 break;
3768 }
3769 changedSettings = oldSettings ^
settings;
3770
3771 if (changedSettings) {
3773
3775 {
3781 } else {
3784 }
3786 }
3787
3790
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");
3801 }
3802
3804 }
3806 {
3808 }
3810 {
3813 return 0;
3814 }
3816 {
3818 {
3820 return 0;
3821 }
3823 }
3825 {
3827 }
3829 {
3831
3833 }
3835 {
3837
3839 {
3842 break;
3845 break;
3848 break;
3849 default:
3850 return 0;
3851 }
3852
3861 } else {
3864 }
3865 return 0;
3866 }
3868 {
3873 BOOL bRtf, bUnicode, bSelection, bUTF8;
3875 static const char utf8_bom[] = {0xef, 0xbb, 0xbf};
3876
3877 if (!pStruct) return 0;
3878
3879
3880
3885
3886 TRACE(
"EM_SETTEXTEX - %s, flags %d, cp %d\n",
3889
3891 if (bSelection) {
3895 } else {
3900 }
3901
3902 if (bRtf) {
3904 if (bSelection) {
3905
3906
3908 }
3909 } else {
3910 if (bUTF8 && !bUnicode) {
3914 } else {
3918 }
3919 }
3920
3921 if (bSelection) {
3924 } else {
3929 }
3932 {
3935 }
3938 }
3942 {
3947 }
3949
3951 {
3954 }
3955 else
3956 {
3959 }
3961 return lColor;
3962 }
3966 {
3969 else
3971
3972 return 0;
3973 }
3975 {
3978 else
3980 return 1;
3981 }
3983 {
3985
3987 return nOldMask;
3988 }
3994 {
4000 return 0;
4001 tmp.
cbSize =
sizeof(tmp);
4004 else
4008 }
4010 {
4016 }
4021 {
4024 int ypara = 0;
4026 int ystart, yend;
4030 break;
4032 ypara =
p->member.para.pt.y;
4033 continue;
4034 }
4035 ystart = ypara +
p->member.row.pt.y;
4036 yend = ystart +
p->member.row.nHeight;
4038 break;
4039 }
4041 }
4043 }
4045 {
4048 return 0;
4049 }
4051 {
4056 }
4058 {
4064 return 0;
4065 }
4067 {
4071
4073
4077 }
4080 return 0;
4082 {
4087
4090
4092 return 0;
4093
4101 }
4103
4108 if (bRepaint)
4110#ifdef __REACTOS__
4112 {
4116 }
4117#endif
4118 return 0;
4119 }
4121 {
4126 {
4130 {
4131
4133 }
4134 else
4136 }
4137 else
4138 TRACE(
"WM_SETTEXT - NULL\n");
4146 return 1;
4147 }
4154
4157 return 0;
4161 return 0;
4163 {
4165
4166
4170 }
4174 {
4182 }
4186 {
4190 nTo - nFrom, unicode);
4191 }
4193 {
4197
4202 return 1;
4203 }
4205 {
4211
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)
4216 nEnd = textlength;
4217 if (nStart >= nEnd) return 0;
4218
4221 }
4223 {
4225 const unsigned int nMaxChars = *(
WORD *)
lParam;
4226 unsigned int nCharsLeft = nMaxChars;
4229
4230 TRACE(
"EM_GETLINE: row=%d, nMaxChars=%d (%s)\n", (
int)
wParam, nMaxChars,
4231 unicode ? "Unicode" : "Ansi");
4232
4235 return 0;
4236
4239 {
4241 unsigned int nCopy;
4242
4244
4245 if (unicode)
4247 else
4250 dest += nCopy * (unicode ?
sizeof(
WCHAR) : 1);
4251 nCharsLeft -= nCopy;
4252 }
4253
4254
4255 if (nCharsLeft > 0)
4256 {
4257 if (unicode)
4259 else
4261 nCharsLeft--;
4263 }
4264
4265 TRACE(
"EM_GETLINE: got %u characters\n", nMaxChars - nCharsLeft);
4266 return nMaxChars - nCharsLeft - (wroteNull ? 1 : 0);
4267 }
4269 {
4273
4279 last_para->member.run.nCharOfs == 0 &&
4282 {
4283
4284
4285
4287 }
4288
4289 TRACE(
"EM_GETLINECOUNT: nRows==%d\n",
nRows);
4291 }
4293 {
4296 else
4298 }
4300 {
4303 else
4305 }
4307 {
4309 int nCharOfs;
4310
4313 else
4316 return -1;
4320 TRACE(
"EM_LINEINDEX: nCharOfs==%d\n", nCharOfs);
4321 return nCharOfs;
4322 }
4324 {
4326 int nChars = 0, nThisLineOfs = 0, nNextLineOfs = 0;
4328
4330 return 0;
4332 {
4333 FIXME(
"EM_LINELENGTH: returning number of unselected characters on lines with selection unsupported.\n");
4334 return 0;
4335 }
4342 } else {
4346 }
4347 nChars = nNextLineOfs - nThisLineOfs;
4349 return nChars;
4350 }
4352 {
4354 return 0;
4357 else
4359 return 0;
4360 }
4362 {
4365 else
4367 return 0;
4368 }
4370 {
4372 }
4374 {
4376 if(!unicode){
4380
4385 }else{
4388 }
4390 }
4392 {
4394 if(!unicode){
4398
4403 }else{
4406 }
4408 }
4410 {
4413 }
4415 {
4418 }
4428 {
4433 else
4434 return -1;
4435 }
4437 {
4439 int nCharOfs, nOffset,
nLength;
4441
4443
4448 nCharOfs =
max(nCharOfs, 0);
4449
4456
4459
4462 }
4464 }
4469 return 0;
4471 {
4477 }
4480 {
4484 return 0;
4492 break;
4493 }
4497 return 0;
4500 else
4502
4505 break;
4510 }
4515 return 0;
4516 else
4517 {
4520 }
4521 break;
4528 return 0;
4530 goto do_default;
4533 goto do_default;
4534 break;
4542 return 0;
4552 return 0;
4555 return 0;
4559 return 0;
4560 goto do_default;
4564 return 0;
4566 return 0;
4567 goto do_default;
4571 return 0;
4574 if (unicode)
4575 {
4578 {
4580 {
4584 } else {
4586 }
4587 }
4588 return 0;
4589 }
4590 break;
4593 return 0;
4595 {
4596 const int scrollUnit = 7;
4597
4599 {
4602 break;
4607 break;
4610 break;
4613 break;
4616 break;
4619 break;
4622 {
4627 break;
4628 }
4629 }
4630 break;
4631 }
4634 {
4635 int origNPos;
4637
4639
4641 {
4644 break;
4649 break;
4652 break;
4655 break;
4658 break;
4661 break;
4664 {
4669 break;
4670 }
4671 }
4673 return 0x00010000 | (((editor->
vert_si.
nPos - origNPos)/lineHeight) & 0xffff);
4674 break;
4675 }
4677 {
4678 int delta;
4680
4683 return 0;
4684
4686
4687 delta = GET_WHEEL_DELTA_WPARAM(
wParam);
4688
4689
4690 if ((delta < 0 && editor->wheel_remain < 0) ||
4693 else
4695
4697 {
4698 if (ctrl_is_down) {
4699 int numerator;
4701 {
4702 numerator = 100;
4703 } else {
4705 }
4707 if (numerator >= 10 && numerator <= 500)
4709 } else {
4712
4718 }
4719 }
4720 break;
4721 }
4723 {
4727 return 0;
4728 }
4731 {
4733 {
4737
4741 {
4746 }
else if (
wParam == 1) {
4747
4748
4749
4750
4755 } else {
4756 return 0;
4757 }
4759 }
4760 else
4761 {
4764 }
4770 return 0;
4771 }
4774 return 0;
4776 goto do_default;
4778 {
4781
4786 } else {
4789 }
4792 goto do_default;
4793 }
4794#ifndef __REACTOS__
4795
4796#endif
4798#ifdef __REACTOS__
4799 {
4801 lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW;
4802
4804 {
4807 if (pIC)
4808 {
4811 }
4815 }
4816
4818 }
4819#endif
4821#ifdef __REACTOS__
4823#endif
4825#ifdef __REACTOS__
4827#endif
4829 return 0;
4830 case WM_IME_STARTCOMPOSITION:
4831 {
4832#ifdef __REACTOS__
4834#else
4839#endif
4840 return 0;
4841 }
4842 case WM_IME_COMPOSITION:
4843 {
4845
4851 {
4855 if (!dwIndex)
4857
4862#ifndef __REACTOS__
4864#endif
4866
4867#ifndef __REACTOS__
4871#endif
4872 }
4876#ifdef __REACTOS__
4878#else
4879 return 0;
4880#endif
4881 }
4882 case WM_IME_ENDCOMPOSITION:
4883 {
4884#ifdef __REACTOS__
4886#else
4889 return 0;
4890#endif
4891 }
4893 {
4896 return 0;
4898 return 1;
4899 return 0;
4900 }
4902 {
4904 }
4915 {
4917
4920 }
4922 return editor->
mode;
4924 {
4927
4931
4932
4936
4938 {
4942
4943
4947
4952 }
4953 }
4954
4956 return 0;
4957 }
4959 {
4962 return 0;
4963 }
4966 {
4969 {
4973 }
4974 } else {
4978 {
4982 }
4983 FIXME(
"EM_SETTARGETDEVICE doesn't use non-NULL target devices\n");
4984 }
4986 default:
4987 do_default:
4989 break;
4990 }
4992}
struct mke2fs_defaults settings[]
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
static int list_empty(struct list_entry *head)
LONG WINAPI ImmGetCompositionStringW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen)
#define HeapFree(x, y, z)
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)
void ME_DeleteSelection(ME_TextEditor *editor)
void ME_LButtonDown(ME_TextEditor *editor, int x, int y, int clickNum)
int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how)
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)
int set_selection_cursors(ME_TextEditor *editor, int from, int to)
void create_caret(ME_TextEditor *editor)
void update_caret(ME_TextEditor *editor)
ME_Style * ME_GetSelectionInsertStyle(ME_TextEditor *editor)
static void ME_StreamInRTFString(ME_TextEditor *editor, BOOL selection, char *string)
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 LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stream, BOOL stripLastCR)
static void ME_SetText(ME_TextEditor *editor, void *text, BOOL unicode)
void ME_ReplaceSel(ME_TextEditor *editor, BOOL can_undo, const WCHAR *str, int len)
static LRESULT ME_Char(ME_TextEditor *editor, WPARAM charCode, LPARAM flags, BOOL unicode)
static BOOL ME_SetCursor(ME_TextEditor *editor)
static BOOL ME_ShowContextMenu(ME_TextEditor *editor, int x, int y)
static void ME_SetDefaultFormatRect(ME_TextEditor *editor)
static int ME_GetTextRange(ME_TextEditor *editor, WCHAR *strText, const ME_Cursor *start, int nLen, BOOL unicode)
void ME_SendOldNotify(ME_TextEditor *editor, int nCode)
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 int calc_wheel_change(int *remain, int amount_per_click)
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)
static int get_default_line_height(ME_TextEditor *editor)
static LONG ME_GetSelectionType(ME_TextEditor *editor)
static LRESULT ME_WmCreate(ME_TextEditor *editor, LPARAM lParam, BOOL unicode)
static void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam)
static BOOL ME_UpdateLinkAttribute(ME_TextEditor *editor, ME_Cursor *start, int nChars)
void ME_DestroyEditor(ME_TextEditor *editor)
static BOOL ME_KeyDown(ME_TextEditor *editor, WORD nKey)
static int ME_CalculateClickCount(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
#define ITextHost_TxShowScrollBar(This, a, b)
#define ITextHost_TxSetFocus(This)
void ME_AddRefStyle(ME_Style *item) DECLSPEC_HIDDEN
void ME_ScrollRight(ME_TextEditor *editor, int cx) DECLSPEC_HIDDEN
#define ITextHost_TxInvalidateRect(This, a, b)
void ME_ScrollAbs(ME_TextEditor *editor, int x, int y) DECLSPEC_HIDDEN
BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator) DECLSPEC_HIDDEN
void ME_SendRequestResize(ME_TextEditor *editor, BOOL force) 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_GetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *pFmt) DECLSPEC_HIDDEN
#define ITextHost_TxSetCapture(This, a)
#define ITextHost_TxGetSysColor(This, a)
void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt) 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_GetParagraph(ME_DisplayItem *run) DECLSPEC_HIDDEN
void ME_VScrollAbs(ME_TextEditor *editor, int y) DECLSPEC_HIDDEN
#define ITextHost_TxGetClientRect(This, a)
#define ITextHost_TxGetDC(This)
void ME_ScrollUp(ME_TextEditor *editor, int cy) DECLSPEC_HIDDEN
void ME_InvalidateSelection(ME_TextEditor *editor) DECLSPEC_HIDDEN
int ME_RowNumberFromCharOfs(ME_TextEditor *editor, int nOfs) 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_RewrapRepaint(ME_TextEditor *editor) DECLSPEC_HIDDEN
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_Repaint(ME_TextEditor *editor) DECLSPEC_HIDDEN
#define ITextHost_TxImmGetContext(This)
ME_DisplayItem * ME_RowStart(ME_DisplayItem *item) DECLSPEC_HIDDEN
void ME_ScrollDown(ME_TextEditor *editor, int cy) 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_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
BOOL ME_Undo(ME_TextEditor *editor) DECLSPEC_HIDDEN
@ diStartRowOrParagraphOrEnd
#define SELECTIONBAR_WIDTH
GLint GLint GLsizei GLsizei GLsizei GLint border
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
struct INPUTCONTEXTDX * LPINPUTCONTEXTDX
#define NI_COMPOSITIONSTR
JSAMPARRAY JDIMENSION max_lines
#define memcpy(s1, s2, n)
#define set_selection(hctl, start, end)
#define TM_MULTILEVELUNDO
#define EM_GETAUTOURLDETECT
#define EM_SETOLECALLBACK
#define EM_SETBIDIOPTIONS
#define ECO_AUTOWORDSELECTION
#define EM_GETWORDBREAKPROCEX
#define EM_GETBIDIOPTIONS
#define TM_SINGLECODEPAGE
struct _charformatw CHARFORMATW
#define EM_GETLANGOPTIONS
#define EM_SETWORDBREAKPROCEX
#define EM_SETLANGOPTIONS
#define EM_STOPGROUPTYPING
#define EM_SETTYPOGRAPHYOPTIONS
#define EM_GETTEXTLENGTHEX
#define EM_SETTARGETDEVICE
struct _charformat2w CHARFORMAT2W
#define EM_EXLINEFROMCHAR
#define EM_GETIMECOMPMODE
#define EM_GETOLEINTERFACE
#define TM_SINGLELEVELUNDO
#define EM_GETTYPOGRAPHYOPTIONS
EDITWORDBREAKPROCW pfnWordBreak
ME_SelectionType nSelectionType
BOOL AutoURLDetect_bEnable
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_ DWORD _In_ DWORD dwBufLen
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
HKL WINAPI GetKeyboardLayout(_In_ DWORD)
#define EM_GETWORDBREAKPROC
#define EM_GETPASSWORDCHAR
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define EM_SETPASSWORDCHAR
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define EM_EMPTYUNDOBUFFER
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
#define EM_GETFIRSTVISIBLELINE
#define WM_IME_SETCONTEXT
#define EM_SETWORDBREAKPROC
int(CALLBACK * EDITWORDBREAKPROCW)(LPWSTR, int, int, int)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
#define WM_IME_COMPOSITIONFULL
BOOL WINAPI DestroyCaret(void)
#define WM_WINDOWPOSCHANGED
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)