From 2a15b94200abe8ee0df2dddc296f3dafd55655f8 Mon Sep 17 00:00:00 2001 From: mitchell Date: Thu, 11 Jul 2019 14:12:28 -0400 Subject: Backport: Bug [#2038]. Source of input reported in SCN_CHARADDED. This may be SC_CHARACTERSOURCE_DIRECT_INPUT, SC_CHARACTERSOURCE_TENTATIVE_INPUT, or SC_CHARACTERSOURCE_IME_RESULT. Backport of changeset 7613:4cfac35c71bd. --- doc/ScintillaDoc.html | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 3252c7823..21b288a21 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3815,7 +3815,7 @@ struct Sci_TextToFind { Scintilla may ignore this call in some cases. For example, the inline behaviour might only be supported for some languages.

When the inline IME mode is active, characters are added tentatively before being finalised and an SCN_CHARADDED - notification is sent for each character.

+ notification (with characterSource set to SC_CHARACTERSOURCE_TENTATIVE_INPUT) is sent for each character.

SCI_GRABFOCUS
SCI_SETFOCUS(bool focus)
@@ -7303,7 +7303,7 @@ struct SCNotification { int updated; /* SCN_UPDATEUI */ int listCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */ - + int characterSource; /* SCN_CHARADDED */ }; @@ -7405,6 +7405,44 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber); for DBCS, it is (first byte * 256 + second byte) for 2 byte characters and the byte value for 1 byte characters. This notification is sent before the character has been styled so processing that depends on styling should instead be performed in the SCN_UPDATEUI notification.

+

The SCNotification::characterSource field is the source of the character.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolValueMeaning
SC_CHARACTERSOURCE_DIRECT_INPUT0Direct input characters, including characters generated by calling keyboard commands like SCI_NEWLINE.
SC_CHARACTERSOURCE_TENTATIVE_INPUT1Tentative input characters. They are used by IME (inline mode, see SCI_SETIMEINTERACTION) + to composite final string, normally different from final composited string (which is the string that has been truly added into current document), + and may be withdrawn when the user cancels typing (e.g. by pressing Esc key). + Some system (at least Cocoa) also use tentative input for non-IME features like using dead key to composite diacritical marks (grave accent, etc.). + These characters are not added to macro recording. Most applications can simply ignore the notification when this value is set. +
SC_CHARACTERSOURCE_IME_RESULT2IME (either inline or windowed mode) full composited string. Modern IME is able to composite English word or sentence, + when this value is set, current character may not a Chinese, Japanese or Korean character. + Currently, this is only set on Windows.

SCN_SAVEPOINTREACHED
SCN_SAVEPOINTLEFT
-- cgit v1.2.3