3605{
3607
3609
3632
3633
3634
3640 {
3642
3650 }
3653 return 0;
3655 {
3656
3661 if ((*pfrom|*pto) & 0xFFFF0000)
3662 return -1;
3664 }
3666 {
3670 return 0;
3671 }
3673 {
3676 else
3678
3679
3680
3682 }
3693 {
3694
3698
3700 }
3702 {
3706
3709
3710 cf.cbSize =
sizeof(
cf);
3713 tmp_size = (
cf.yHeight / 20) +
wParam;
3714
3715 if (tmp_size <= 1)
3717 else if (tmp_size > 12 && tmp_size < 28 && tmp_size % 2)
3718 size = tmp_size + (is_increase ? 1 : -1);
3719 else if (tmp_size > 28 && tmp_size < 36)
3720 size = is_increase ? 36 : 28;
3721 else if (tmp_size > 36 && tmp_size < 48)
3722 size = is_increase ? 48 : 36;
3723 else if (tmp_size > 48 && tmp_size < 72)
3724 size = is_increase ? 72 : 48;
3725 else if (tmp_size > 72 && tmp_size < 80)
3726 size = is_increase ? 80 : 72;
3727 else if (tmp_size > 80 && tmp_size < 1638)
3728 size = 10 * (is_increase ? (tmp_size / 10 + 1) : (tmp_size / 10));
3729 else if (tmp_size >= 1638)
3731 else
3733
3739
3741 }
3743 {
3744
3745
3746
3752 DWORD changedSettings;
3753
3755 {
3758 break;
3761 break;
3764 break;
3767 }
3768 changedSettings = oldSettings ^
settings;
3769
3770 if (changedSettings) {
3772
3774 {
3780 } else {
3783 }
3785 }
3786
3789
3791 FIXME(
"ECO_VERTICAL not implemented yet!\n");
3793 FIXME(
"ECO_AUTOHSCROLL not implemented yet!\n");
3795 FIXME(
"ECO_AUTOVSCROLL not implemented yet!\n");
3797 FIXME(
"ECO_WANTRETURN not implemented yet!\n");
3799 FIXME(
"ECO_AUTOWORDSELECTION not implemented yet!\n");
3800 }
3801
3803 }
3805 {
3807 }
3809 {
3812 return 0;
3813 }
3815 {
3817 {
3819 return 0;
3820 }
3822 }
3824 {
3826 }
3828 {
3830
3832 }
3834 {
3836
3838 {
3841 break;
3844 break;
3847 break;
3848 default:
3849 return 0;
3850 }
3851
3860 } else {
3863 }
3864 return 0;
3865 }
3867 {
3872 BOOL bRtf, bUnicode, bSelection, bUTF8;
3874 static const char utf8_bom[] = {0xef, 0xbb, 0xbf};
3875
3876 if (!pStruct) return 0;
3877
3878
3879
3884
3885 TRACE(
"EM_SETTEXTEX - %s, flags %d, cp %d\n",
3888
3890 if (bSelection) {
3894 } else {
3899 }
3900
3901 if (bRtf) {
3903 if (bSelection) {
3904
3905
3907 }
3908 } else {
3909 if (bUTF8 && !bUnicode) {
3913 } else {
3917 }
3918 }
3919
3920 if (bSelection) {
3923 } else {
3928 }
3931 {
3934 }
3937 }
3941 {
3946 }
3948
3950 {
3953 }
3954 else
3955 {
3958 }
3960 return lColor;
3961 }
3965 {
3968 else
3970
3971 return 0;
3972 }
3974 {
3977 else
3979 return 1;
3980 }
3982 {
3984
3986 return nOldMask;
3987 }
3993 {
3999 return 0;
4000 tmp.
cbSize =
sizeof(tmp);
4003 else
4007 }
4009 {
4015 }
4020 {
4023 int ypara = 0;
4025 int ystart, yend;
4029 break;
4031 ypara =
p->member.para.pt.y;
4032 continue;
4033 }
4034 ystart = ypara +
p->member.row.pt.y;
4035 yend = ystart +
p->member.row.nHeight;
4037 break;
4038 }
4040 }
4042 }
4044 {
4047 return 0;
4048 }
4050 {
4055 }
4057 {
4063 return 0;
4064 }
4066 {
4070
4072
4076 }
4079 return 0;
4081 {
4086
4089
4091 return 0;
4092
4100 }
4102
4107 if (bRepaint)
4109#ifdef __REACTOS__
4111 {
4115 }
4116#endif
4117 return 0;
4118 }
4120 {
4125 {
4129 {
4130
4132 }
4133 else
4135 }
4136 else
4137 TRACE(
"WM_SETTEXT - NULL\n");
4145 return 1;
4146 }
4153
4156 return 0;
4160 return 0;
4162 {
4164
4165
4169 }
4173 {
4181 }
4185 {
4189 nTo - nFrom, unicode);
4190 }
4192 {
4196
4201 return 1;
4202 }
4204 {
4210
4211 TRACE(
"EM_GETTEXTRANGE min=%d max=%d unicode=%d textlength=%d\n",
4213 if (nStart < 0) return 0;
4214 if ((nStart == 0 && nEnd == -1) || nEnd > textlength)
4215 nEnd = textlength;
4216 if (nStart >= nEnd) return 0;
4217
4220 }
4222 {
4224 const unsigned int nMaxChars = *(
WORD *)
lParam;
4225 unsigned int nCharsLeft = nMaxChars;
4228
4229 TRACE(
"EM_GETLINE: row=%d, nMaxChars=%d (%s)\n", (
int)
wParam, nMaxChars,
4230 unicode ? "Unicode" : "Ansi");
4231
4234 return 0;
4235
4238 {
4240 unsigned int nCopy;
4241
4243
4244 if (unicode)
4246 else
4249 dest += nCopy * (unicode ?
sizeof(
WCHAR) : 1);
4250 nCharsLeft -= nCopy;
4251 }
4252
4253
4254 if (nCharsLeft > 0)
4255 {
4256 if (unicode)
4258 else
4260 nCharsLeft--;
4262 }
4263
4264 TRACE(
"EM_GETLINE: got %u characters\n", nMaxChars - nCharsLeft);
4265 return nMaxChars - nCharsLeft - (wroteNull ? 1 : 0);
4266 }
4268 {
4272
4278 last_para->member.run.nCharOfs == 0 &&
4281 {
4282
4283
4284
4286 }
4287
4288 TRACE(
"EM_GETLINECOUNT: nRows==%d\n",
nRows);
4290 }
4292 {
4295 else
4297 }
4299 {
4302 else
4304 }
4306 {
4308 int nCharOfs;
4309
4312 else
4315 return -1;
4319 TRACE(
"EM_LINEINDEX: nCharOfs==%d\n", nCharOfs);
4320 return nCharOfs;
4321 }
4323 {
4325 int nChars = 0, nThisLineOfs = 0, nNextLineOfs = 0;
4327
4329 return 0;
4331 {
4332 FIXME(
"EM_LINELENGTH: returning number of unselected characters on lines with selection unsupported.\n");
4333 return 0;
4334 }
4341 } else {
4345 }
4346 nChars = nNextLineOfs - nThisLineOfs;
4348 return nChars;
4349 }
4351 {
4353 return 0;
4356 else
4358 return 0;
4359 }
4361 {
4364 else
4366 return 0;
4367 }
4369 {
4371 }
4373 {
4375 if(!unicode){
4379
4384 }else{
4387 }
4389 }
4391 {
4393 if(!unicode){
4397
4402 }else{
4405 }
4407 }
4409 {
4412 }
4414 {
4417 }
4427 {
4432 else
4433 return -1;
4434 }
4436 {
4438 int nCharOfs, nOffset,
nLength;
4440
4442
4447 nCharOfs =
max(nCharOfs, 0);
4448
4455
4458
4461 }
4463 }
4468 return 0;
4470 {
4476 }
4479 {
4483 return 0;
4491 break;
4492 }
4496 return 0;
4499 else
4501
4504 break;
4509 }
4514 return 0;
4515 else
4516 {
4519 }
4520 break;
4527 return 0;
4529 goto do_default;
4532 goto do_default;
4533 break;
4541 return 0;
4551 return 0;
4554 return 0;
4558 return 0;
4559 goto do_default;
4563 return 0;
4565 return 0;
4566 goto do_default;
4570 return 0;
4573 if (unicode)
4574 {
4577 {
4579 {
4583 } else {
4585 }
4586 }
4587 return 0;
4588 }
4589 break;
4592 return 0;
4594 {
4595 const int scrollUnit = 7;
4596
4598 {
4601 break;
4606 break;
4609 break;
4612 break;
4615 break;
4618 break;
4621 {
4626 break;
4627 }
4628 }
4629 break;
4630 }
4633 {
4634 int origNPos;
4636
4638
4640 {
4643 break;
4648 break;
4651 break;
4654 break;
4657 break;
4660 break;
4663 {
4668 break;
4669 }
4670 }
4672 return 0x00010000 | (((editor->
vert_si.
nPos - origNPos)/lineHeight) & 0xffff);
4673 break;
4674 }
4676 {
4677 int delta;
4679
4682 return 0;
4683
4685
4686 delta = GET_WHEEL_DELTA_WPARAM(
wParam);
4687
4688
4689 if ((delta < 0 && editor->wheel_remain < 0) ||
4692 else
4694
4696 {
4697 if (ctrl_is_down) {
4698 int numerator;
4700 {
4701 numerator = 100;
4702 } else {
4704 }
4706 if (numerator >= 10 && numerator <= 500)
4708 } else {
4711
4717 }
4718 }
4719 break;
4720 }
4722 {
4726 return 0;
4727 }
4730 {
4732 {
4736
4740 {
4745 }
else if (
wParam == 1) {
4746
4747
4748
4749
4754 } else {
4755 return 0;
4756 }
4758 }
4759 else
4760 {
4763 }
4769 return 0;
4770 }
4773 return 0;
4775 goto do_default;
4777 {
4780
4785 } else {
4788 }
4791 goto do_default;
4792 }
4793#ifndef __REACTOS__
4794
4795#endif
4797#ifdef __REACTOS__
4798 {
4800 lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW;
4801
4803 {
4806 if (pIC)
4807 {
4810 }
4814 }
4815
4817 }
4818#endif
4820#ifdef __REACTOS__
4822#endif
4824#ifdef __REACTOS__
4826#endif
4828 return 0;
4829 case WM_IME_STARTCOMPOSITION:
4830 {
4831#ifdef __REACTOS__
4833#else
4838#endif
4839 return 0;
4840 }
4841 case WM_IME_COMPOSITION:
4842 {
4844
4850 {
4854 if (!dwIndex)
4856
4861#ifndef __REACTOS__
4863#endif
4865
4866#ifndef __REACTOS__
4870#endif
4871 }
4875#ifdef __REACTOS__
4877#else
4878 return 0;
4879#endif
4880 }
4881 case WM_IME_ENDCOMPOSITION:
4882 {
4883#ifdef __REACTOS__
4885#else
4888 return 0;
4889#endif
4890 }
4892 {
4895 return 0;
4897 return 1;
4898 return 0;
4899 }
4901 {
4903 }
4914 {
4916
4919 }
4921 return editor->
mode;
4923 {
4926
4930
4931
4935
4937 {
4941
4942
4946
4951 }
4952 }
4953
4955 return 0;
4956 }
4958 {
4961 return 0;
4962 }
4965 {
4968 {
4972 }
4973 } else {
4977 {
4981 }
4982 FIXME(
"EM_SETTARGETDEVICE doesn't use non-NULL target devices\n");
4983 }
4985 default:
4986 do_default:
4988 break;
4989 }
4991}
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 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
#define NI_COMPOSITIONSTR
struct INPUTCONTEXTDX * LPINPUTCONTEXTDX
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)