diff options
author | Neil <nyamatongwe@gmail.com> | 2025-04-22 11:13:52 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2025-04-22 11:13:52 +1000 |
commit | 99e69de57d94f4bcf8d72a69c9215684ee4152ee (patch) | |
tree | c9d4fb2406babae42a9772309becc59c017f3165 /win32/ScintillaWin.cxx | |
parent | ac87d3e3b29fead6e30514535b8cf87dcc66304e (diff) | |
download | scintilla-mirror-99e69de57d94f4bcf8d72a69c9215684ee4152ee.tar.gz |
Move common IME code from platform layers to ScintillaBase.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index bfa5dbb1f..c05dbd8fc 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -125,11 +125,6 @@ constexpr UINT SC_WIN_IDLE = 5001; // and delivering SCN_UPDATEUI constexpr UINT SC_WORK_IDLE = 5002; -constexpr int IndicatorInput = static_cast<int>(Scintilla::IndicatorNumbers::Ime); -constexpr int IndicatorTarget = IndicatorInput + 1; -constexpr int IndicatorConverted = IndicatorInput + 2; -constexpr int IndicatorUnknown = IndicatorInput + 3; - using SetCoalescableTimerSig = UINT_PTR (WINAPI *)(HWND hwnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc, ULONG uToleranceDelay); @@ -548,8 +543,6 @@ class ScintillaWin : sptr_t HandleCompositionWindowed(uptr_t wParam, sptr_t lParam); sptr_t HandleCompositionInline(uptr_t wParam, sptr_t lParam); static bool KoreanIME() noexcept; - void MoveImeCarets(Sci::Position offset) noexcept; - void DrawImeIndicator(int indicator, Sci::Position len); void SetCandidateWindowPos(); void SelectionToHangul(); void EscapeHanja(); @@ -1334,29 +1327,6 @@ bool ScintillaWin::KoreanIME() noexcept { return codePage == cp949 || codePage == cp1361; } -void ScintillaWin::MoveImeCarets(Sci::Position offset) noexcept { - // Move carets relatively by bytes. - for (size_t r=0; r<sel.Count(); r++) { - const Sci::Position positionInsert = sel.Range(r).Start().Position(); - sel.Range(r) = SelectionRange(positionInsert + offset); - } -} - -void ScintillaWin::DrawImeIndicator(int indicator, Sci::Position len) { - // Emulate the visual style of IME characters with indicators. - // Draw an indicator on the character before caret by the character bytes of len - // so it should be called after InsertCharacter(). - // It does not affect caret positions. - if (indicator < 8 || indicator > IndicatorMax) { - return; - } - pdoc->DecorationSetCurrentIndicator(indicator); - for (size_t r=0; r<sel.Count(); r++) { - const Sci::Position positionInsert = sel.Range(r).Start().Position(); - pdoc->DecorationFillRange(positionInsert - len, 1, len); - } -} - void ScintillaWin::SetCandidateWindowPos() { IMContext imc(MainHWND()); if (imc.hIMC) { |