Commit MetaInfo

Revisione22b5d3d9e4edbd0e227503e3f469acf8d84008c (tree)
Time2017-01-15 22:22:46
Author <exeal@user...>

Log Message

Refined around InputMethodEvent class.

Change Summary

Incremental Difference

diff -r dd09b0a95e01 -r e22b5d3d9e4e ascension/ascension/viewer/caret.hpp
--- a/ascension/ascension/viewer/caret.hpp Sun Jan 15 22:21:54 2017 +0900
+++ b/ascension/ascension/viewer/caret.hpp Sun Jan 15 22:22:46 2017 +0900
@@ -54,7 +54,7 @@
5454
5555 // documentation is caret.cpp
5656 class Caret : public VisualPoint,
57- public kernel::DocumentListener, public detail::InputMethodEventHandler, public detail::InputMethodQueryEvent {
57+ public kernel::DocumentListener, public detail::InputMethodEventHandler, public detail::InputMethodQueryEventHandler {
5858 public:
5959 /// Mode of tracking match brackets.
6060 enum MatchBracketsTrackingMode {
@@ -201,9 +201,12 @@
201201 void documentAboutToBeChanged(const kernel::Document& document) override;
202202 void documentChanged(const kernel::Document& document, const kernel::DocumentChange& change) override;
203203 // detail.InputMethodEventHandler
204- void handleInputMethodEvent(widgetapi::event::InputMethodEvent& event, const void* nativeEvent) BOOST_NOEXCEPT override;
205- // detail.InputMethodQueryEvent
206- void handleInputMethodQueryEvent(widgetapi::event::InputMethodQueryEvent& event, const void* nativeEvent) BOOST_NOEXCEPT override;
204+ void commitString(widgetapi::event::InputMethodEvent& event) BOOST_NOEXCEPT override;
205+ void preeditChanged(widgetapi::event::InputMethodEvent& event) BOOST_NOEXCEPT override;
206+ void preeditEnded() BOOST_NOEXCEPT override;
207+ void preeditStarted() BOOST_NOEXCEPT override;
208+ // detail.InputMethodQueryEventHandler
209+ std::pair<const StringPiece, StringPiece::const_iterator> querySurroundingText() const BOOST_NOEXCEPT override;
207210 private:
208211 class SelectionAnchor : public VisualPoint {
209212 public:
diff -r dd09b0a95e01 -r e22b5d3d9e4e ascension/ascension/viewer/detail/input-method.hpp
--- a/ascension/ascension/viewer/detail/input-method.hpp Sun Jan 15 22:21:54 2017 +0900
+++ b/ascension/ascension/viewer/detail/input-method.hpp Sun Jan 15 22:22:46 2017 +0900
@@ -21,13 +21,15 @@
2121
2222 namespace detail {
2323 class InputMethodEventHandler {
24- virtual void handleInputMethodEvent(widgetapi::event::InputMethodEvent& event, const void* nativeEvent) BOOST_NOEXCEPT = 0;
25- virtual void handleInputMethodQueryEvent(widgetapi::event::InputMethodQueryEvent& event, const void* nativeEvent) BOOST_NOEXCEPT = 0;
24+ virtual void commitString(widgetapi::event::InputMethodEvent& event) BOOST_NOEXCEPT = 0;
25+ virtual void preeditChanged(widgetapi::event::InputMethodEvent& event) BOOST_NOEXCEPT = 0;
26+ virtual void preeditEnded() BOOST_NOEXCEPT = 0;
27+ virtual void preeditStarted() BOOST_NOEXCEPT = 0;
2628 friend class TextViewer;
2729 };
2830
29- class InputMethodQueryEvent {
30- virtual std::pair<const StringPiece, StringPiece::const_iterator> querySurroundingText() const = 0;
31+ class InputMethodQueryEventHandler {
32+ virtual std::pair<const StringPiece, StringPiece::const_iterator> querySurroundingText() const BOOST_NOEXCEPT = 0;
3133 friend class TextViewer;
3234 };
3335
diff -r dd09b0a95e01 -r e22b5d3d9e4e ascension/ascension/viewer/text-viewer.hpp
--- a/ascension/ascension/viewer/text-viewer.hpp Sun Jan 15 22:21:54 2017 +0900
+++ b/ascension/ascension/viewer/text-viewer.hpp Sun Jan 15 22:22:46 2017 +0900
@@ -256,8 +256,8 @@
256256 /// @{
257257 virtual void focusAboutToBeLost(widgetapi::event::Event& event);
258258 virtual void focusGained(widgetapi::event::Event& event);
259- virtual void handleInputMethodEvent(widgetapi::event::InputMethodEvent& event, const void* nativeEvent);
260- virtual void handleInputMethodQueryEvent(widgetapi::event::InputMethodQueryEvent& event, const void* nativeEvent);
259+ virtual void handleInputMethodEvent(widgetapi::event::InputMethodEvent& event);
260+ virtual void handleInputMethodQueryEvent(widgetapi::event::InputMethodQueryEvent& event);
261261 virtual void keyPressed(widgetapi::event::KeyInput& input);
262262 virtual void keyReleased(widgetapi::event::KeyInput& input);
263263 virtual void mouseDoubleClicked(widgetapi::event::MouseButtonInput& input);
diff -r dd09b0a95e01 -r e22b5d3d9e4e ascension/ascension/viewer/widgetapi/event/input-method-event.hpp
--- a/ascension/ascension/viewer/widgetapi/event/input-method-event.hpp Sun Jan 15 22:21:54 2017 +0900
+++ b/ascension/ascension/viewer/widgetapi/event/input-method-event.hpp Sun Jan 15 22:22:46 2017 +0900
@@ -17,6 +17,24 @@
1717 namespace viewer {
1818 namespace widgetapi {
1919 namespace event {
20+ class InputMethodEventBase : public Event {
21+ public:
22+ /// Returns a pointer to the platform-native object.
23+ const void* native() const BOOST_NOEXCEPT {
24+ return native_;
25+ }
26+
27+ protected:
28+ /**
29+ * Protected constructor.
30+ * @param native A pointer to the platform-native object
31+ */
32+ InputMethodEventBase(const void* native) : native_(native) {}
33+
34+ private:
35+ const void* native_;
36+ };
37+
2038 /**
2139 * Provides parameters for input method events.
2240 * <table>
@@ -28,7 +46,7 @@
2846 * </table>
2947 * @see InputMethodQueryEvent
3048 */
31- class InputMethodEvent : public Event {
49+ class InputMethodEvent : public InputMethodEventBase {
3250 public:
3351 /// Destructor.
3452 virtual ~InputMethodEvent() BOOST_NOEXCEPT {}
@@ -54,6 +72,9 @@
5472 */
5573 virtual boost::optional<NumericRange<Index>> replacementInlineRange() const BOOST_NOEXCEPT = 0;
5674 /// @}
75+
76+ protected:
77+ explicit InputMethodEvent(const void* native) BOOST_NOEXCEPT : InputMethodEventBase(native) {}
5778 };
5879
5980 /// Simple implementation of @c InputMethodEvent interface.
@@ -70,48 +91,55 @@
7091 /// @{
7192 /**
7293 * Creates a @c ConstantInputMethodEvent instance which means the composition canceled.
94+ * @param native A pointer to the platform-native object
7395 */
74- static ConstantInputMethodEvent createCanceledInstance() {
75- return ConstantInputMethodEvent(String(), boost::none, boost::none);
96+ static ConstantInputMethodEvent createCanceledInstance(const void* native) {
97+ return ConstantInputMethodEvent(native, String(), boost::none, boost::none);
7698 }
7799 /**
78100 * Creates a @c ConstantInputMethodEvent instance which means the composition changed.
101+ * @param native A pointer to the platform-native object
79102 * @param preeditString
80103 * @param replacementInlineRange
81104 */
82- static ConstantInputMethodEvent createChangedInstance(const String& preeditString, boost::optional<NumericRange<Index>> replacementInlineRange = boost::none) {
83- return ConstantInputMethodEvent(boost::none, preeditString, replacementInlineRange);
105+ static ConstantInputMethodEvent createChangedInstance(const void* native, const String& preeditString, boost::optional<NumericRange<Index>> replacementInlineRange = boost::none) {
106+ return ConstantInputMethodEvent(native, boost::none, preeditString, replacementInlineRange);
84107 }
85108 /**
86109 * Creates a @c ConstantInputMethodEvent instance which means the composition completed.
110+ * @param native A pointer to the platform-native object
87111 * @param commitString
88112 * @param replacementInlineRange
89113 */
90- static ConstantInputMethodEvent createCompletedInstance(const String& commitString, boost::optional<NumericRange<Index>> replacementInlineRange = boost::none) {
91- return ConstantInputMethodEvent(commitString, boost::none, replacementInlineRange);
114+ static ConstantInputMethodEvent createCompletedInstance(const void* native, const String& commitString, boost::optional<NumericRange<Index>> replacementInlineRange = boost::none) {
115+ return ConstantInputMethodEvent(native, commitString, boost::none, replacementInlineRange);
92116 }
93117 /**
94118 * Creates a @c ConstantInputMethodEvent which means the composition started.
119+ * @param native A pointer to the platform-native object
95120 */
96- static ConstantInputMethodEvent createStartedInstance() {
97- return ConstantInputMethodEvent(boost::none, String(), boost::none);
121+ static ConstantInputMethodEvent createStartedInstance(const void* native) {
122+ return ConstantInputMethodEvent(native, boost::none, String(), boost::none);
98123 }
99124 /// @}
100125
101126 private:
102127 /**
103128 * Creates @c ConstantInputMethodEvent instance.
129+ * @param native A pointer to the platform-native object
104130 * @param commitString The value returned by @c #commitString method
105131 * @param preeditString The value returned by @c #preeditString method
106132 * @param replacementInlineRange The value returned by @c #replacementInlineRange method
107133 */
108- ConstantInputMethodEvent(boost::optional<String> commitString, boost::optional<String> preeditString, boost::optional<NumericRange<Index>> replacementInlineRange)
109- : commitString_(commitString), preeditString_(preeditString), replacementInlineRange_(replacementInlineRange_) {}
134+ ConstantInputMethodEvent(const void* native, boost::optional<String> commitString, boost::optional<String> preeditString, boost::optional<NumericRange<Index>> replacementInlineRange)
135+ : InputMethodEvent(native), commitString_(commitString), preeditString_(preeditString), replacementInlineRange_(replacementInlineRange_) {}
110136 const boost::optional<String> commitString_, preeditString_;
111137 const boost::optional<NumericRange<Index>> replacementInlineRange_;
112138 };
113139
114- class InputMethodQueryEvent : public Event {
140+ class InputMethodQueryEvent : public InputMethodEventBase {
141+ protected:
142+ explicit InputMethodQueryEvent(const void* native) BOOST_NOEXCEPT : InputMethodEventBase(native) {}
115143 };
116144 }
117145 }
diff -r dd09b0a95e01 -r e22b5d3d9e4e ascension/src/viewer/caret-windows.cpp
--- a/ascension/src/viewer/caret-windows.cpp Sun Jan 15 22:21:54 2017 +0900
+++ b/ascension/src/viewer/caret-windows.cpp Sun Jan 15 22:22:46 2017 +0900
@@ -114,61 +114,6 @@
114114 return clipboardLocale_;
115115 }
116116
117- /// @see detail#InputMethodEventHandler#handleInputMethodEvent
118- void Caret::handleInputMethodEvent(widgetapi::event::InputMethodEvent& event, const void* nativeEvent) BOOST_NOEXCEPT {
119- if(document().isReadOnly())
120- return;
121- const auto preeditString(event.preeditString());
122- if(preeditString == boost::none) { // completed or canceled
123- context_.inputMethodCompositionActivated = false;
124-
125- const auto commitString(event.commitString());
126- if(commitString != boost::none && boost::get(commitString).empty()) { // completed => commit
127- if(!context_.inputMethodComposingCharacter)
128- texteditor::commands::TextInputCommand(textArea().textViewer(), boost::get(commitString))();
129- else {
130- auto& d = document();
131- try {
132- d.insertUndoBoundary();
133- d.replace(
134- kernel::Region(
135- insertionPosition(*this),
136- static_cast<kernel::DocumentCharacterIterator&>(++kernel::DocumentCharacterIterator(d, insertionPosition(*this))).tell()),
137- String(1, static_cast<Char>(static_cast<const MSG*>(nativeEvent)->wParam)));
138- d.insertUndoBoundary();
139- } catch(const kernel::DocumentCantChangeException&) {
140- }
141- context_.inputMethodComposingCharacter = false;
142- }
143- }
144-
145- resetVisualization();
146- } else if(boost::get(preeditString).empty()) { // started
147- context_.inputMethodCompositionActivated = true;
148- adjustInputMethodCompositionWindow();
149- utils::closeCompletionProposalsPopup(textArea().textViewer());
150- } else { // changed
151- auto& nativeMessage = *static_cast<const MSG*>(nativeEvent);
152- if((nativeMessage.lParam & CS_INSERTCHAR) != 0) {
153- const auto p(insertionPosition(*this)); // position before motion
154- try {
155- if(context_.inputMethodComposingCharacter)
156- document().replace(
157- kernel::Region(
158- p,
159- static_cast<kernel::DocumentCharacterIterator&>(++kernel::DocumentCharacterIterator(document(), p)).tell()),
160- String(1, static_cast<Char>(nativeMessage.wParam)));
161- else
162- kernel::insert(document(), p, String(1, static_cast<Char>(nativeMessage.wParam)));
163- context_.inputMethodComposingCharacter = true;
164- if((nativeMessage.lParam & CS_NOMOVECARET) != 0)
165- moveTo(TextHit::leading(p));
166- } catch(...) {
167- }
168- event.consume();
169- resetVisualization();
170- }
171- }
172117 #if 0
173118 switch(message) {
174119 case WM_IME_NOTIFY:
@@ -182,64 +127,6 @@
182127 break;
183128 }
184129 #endif
185- }
186-
187- /// Handles Win32 @c WM_IME_COMPOSITION window message.
188- void Caret::onImeComposition(WPARAM wp, LPARAM lp, bool& consumed) {
189- if(document().isReadOnly())
190- return;
191- else if(/*event.lParam == 0 ||*/ win32::boole(lp & GCS_RESULTSTR)) { // completed
192- auto imc(inputMethod(textArea().textViewer()));
193- if(imc.get() != nullptr) {
194- if(const Index len = ::ImmGetCompositionStringW(imc.get(), GCS_RESULTSTR, nullptr, 0) / sizeof(WCHAR)) {
195- // this was not canceled
196- const std::unique_ptr<Char[]> text(new Char[len + 1]);
197- ::ImmGetCompositionStringW(imc.get(), GCS_RESULTSTR, text.get(), static_cast<DWORD>(len * sizeof(WCHAR)));
198- text[len] = 0;
199- if(!context_.inputMethodComposingCharacter)
200- texteditor::commands::TextInputCommand(textArea().textViewer(), text.get())();
201- else {
202- auto& doc = document();
203- try {
204- doc.insertUndoBoundary();
205- doc.replace(
206- kernel::Region(
207- insertionPosition(*this),
208- static_cast<kernel::DocumentCharacterIterator&>(++kernel::DocumentCharacterIterator(doc, insertionPosition(*this))).tell()),
209- String(1, static_cast<Char>(wp)));
210- doc.insertUndoBoundary();
211- } catch(const kernel::DocumentCantChangeException&) {
212- }
213- context_.inputMethodComposingCharacter = false;
214- resetVisualization();
215- }
216- }
217-// adjustInputMethodCompositionWindow();
218- consumed = true; // prevent to be send WM_CHARs
219- }
220- }
221- else if(win32::boole(GCS_COMPSTR & lp)) {
222- if(win32::boole(lp & CS_INSERTCHAR)) {
223- const auto p(insertionPosition(*this)); // position before motion
224- try {
225- if(context_.inputMethodComposingCharacter)
226- document().replace(
227- kernel::Region(
228- p,
229- static_cast<kernel::DocumentCharacterIterator&>(++kernel::DocumentCharacterIterator(document(), p)).tell()),
230- String(1, static_cast<Char>(wp)));
231- else
232- kernel::insert(document(), p, String(1, static_cast<Char>(wp)));
233- context_.inputMethodComposingCharacter = true;
234- if(win32::boole(lp & CS_NOMOVECARET))
235- moveTo(TextHit::leading(p));
236- } catch(...) {
237- }
238- consumed = true;
239- resetVisualization();
240- }
241- }
242- }
243130
244131 /// Handles Win32 @c WM_IME_REQUEST window message.
245132 LRESULT Caret::onImeRequest(WPARAM command, LPARAM lp, bool& consumed) {
@@ -367,6 +254,31 @@
367254 document().insertUndoBoundary();
368255 }
369256
257+ void Caret::preeditChanged(widgetapi::event::InputMethodEvent& event) BOOST_NOEXCEPT {
258+ if(!document().isReadOnly()) {
259+ auto& nativeMessage = *static_cast<const MSG*>(event.native());
260+ if((nativeMessage.lParam & CS_INSERTCHAR) != 0) {
261+ const auto p(insertionPosition(*this)); // position before motion
262+ try {
263+ if(context_.inputMethodComposingCharacter)
264+ document().replace(
265+ kernel::Region(
266+ p,
267+ static_cast<kernel::DocumentCharacterIterator&>(++kernel::DocumentCharacterIterator(document(), p)).tell()),
268+ String(1, static_cast<Char>(nativeMessage.wParam)));
269+ else
270+ kernel::insert(document(), p, String(1, static_cast<Char>(nativeMessage.wParam)));
271+ context_.inputMethodComposingCharacter = true;
272+ if((nativeMessage.lParam & CS_NOMOVECARET) != 0)
273+ moveTo(TextHit::leading(p));
274+ } catch(...) {
275+ }
276+ event.consume();
277+ resetVisualization();
278+ }
279+ }
280+ }
281+
370282 /**
371283 * Sets the locale used to convert non-Unicode data in the clipboard.
372284 * @param newLocale The locale identifier
diff -r dd09b0a95e01 -r e22b5d3d9e4e ascension/src/viewer/caret.cpp
--- a/ascension/src/viewer/caret.cpp Sun Jan 15 22:21:54 2017 +0900
+++ b/ascension/src/viewer/caret.cpp Sun Jan 15 22:22:46 2017 +0900
@@ -15,6 +15,7 @@
1515 #include <ascension/graphics/font/line-layout-vector.hpp>
1616 #include <ascension/graphics/font/text-viewport.hpp>
1717 #include <ascension/kernel/document.hpp>
18+#include <ascension/kernel/document-character-iterator.hpp>
1819 #include <ascension/text-editor/commands/inputs.hpp>
1920 #include <ascension/text-editor/input-sequence-checker.hpp>
2021 #include <ascension/text-editor/session.hpp>
@@ -258,10 +259,28 @@
258259 moveTo(hit());
259260 }
260261
261- /// @see detail#InputMethodEvent#commitInputString
262- void Caret::commitInputString(const StringPiece& text) {
263-// if(!context_.inputMethodComposingCharacter)
264- texteditor::commands::TextInputCommand(textArea().textViewer(), text.to_string())();
262+ /// @see detail#InputMethodEventHandler#commitString
263+ void Caret::commitString(widgetapi::event::InputMethodEvent& event) BOOST_NOEXCEPT {
264+ const auto commitString(event.commitString());
265+ assert(commitString != boost::none);
266+ if(!context_.inputMethodComposingCharacter)
267+ texteditor::commands::TextInputCommand(textArea().textViewer(), boost::get(commitString))();
268+ else {
269+#if ASCENSION_SELECTS_WINDOW_SYSTEM(WIN32)
270+ auto& d = document();
271+ try {
272+ d.insertUndoBoundary();
273+ d.replace(
274+ kernel::Region(
275+ insertionPosition(*this),
276+ static_cast<kernel::DocumentCharacterIterator&>(++kernel::DocumentCharacterIterator(d, insertionPosition(*this))).tell()),
277+ String(1, static_cast<Char>(static_cast<const MSG*>(event.native())->wParam)));
278+ d.insertUndoBoundary();
279+ } catch(const kernel::DocumentCantChangeException&) {
280+ }
281+#endif
282+ context_.inputMethodComposingCharacter = false;
283+ }
265284 }
266285
267286 /// @see kernel#DocumentListener#documentAboutToBeChanged
@@ -613,26 +632,21 @@
613632 }
614633 }
615634
616- /// @see detail#InputMethodEvent#preeditChanged
617- void Caret::preeditChanged() {
618- // TODO: Not implemented.
619- }
620-
621635 /// @see detail#InputMethodEvent#preeditEnded
622- void Caret::preeditEnded() {
636+ void Caret::preeditEnded() BOOST_NOEXCEPT {
623637 context_.inputMethodCompositionActivated = false;
624638 updateVisualAttributes();
625639 }
626640
627- /// @see detail#InputMethodEvent#preeditStarted
628- void Caret::preeditStarted() {
641+ /// @see detail#InputMethodEventHandler#preeditStarted
642+ void Caret::preeditStarted() BOOST_NOEXCEPT {
629643 context_.inputMethodCompositionActivated = true;
630644 adjustInputMethodCompositionWindow();
631645 utils::closeCompletionProposalsPopup(textArea().textViewer());
632646 }
633647
634648 // @see detail#InputMethodQueryEvent#querySurroundingText
635- std::pair<const StringPiece, StringPiece::const_iterator> Caret::querySurroundingText() const {
649+ std::pair<const StringPiece, StringPiece::const_iterator> Caret::querySurroundingText() const BOOST_NOEXCEPT {
636650 const StringPiece lineString(document().lineString(kernel::line(hit().characterIndex())));
637651 StringPiece::const_iterator position(lineString.cbegin());
638652 if(boost::size(selectedRegion().lines()) == 1)
diff -r dd09b0a95e01 -r e22b5d3d9e4e ascension/src/viewer/text-viewer-events.cpp
--- a/ascension/src/viewer/text-viewer-events.cpp Sun Jan 15 22:21:54 2017 +0900
+++ b/ascension/src/viewer/text-viewer-events.cpp Sun Jan 15 22:22:46 2017 +0900
@@ -140,21 +140,31 @@
140140 /**
141141 * Invoked when received input method composition events.
142142 * @param event The event
143- * @param nativeEvent The platform-native event
144143 */
145- void TextViewer::handleInputMethodEvent(widgetapi::event::InputMethodEvent& event, const void* nativeEvent) {
144+ void TextViewer::handleInputMethodEvent(widgetapi::event::InputMethodEvent& event) {
146145 if(auto ta = textArea()) {
147- if(auto caret = ta->caret())
148- static_cast<detail::InputMethodEventHandler*>(caret.get())->handleInputMethodEvent(event, nativeEvent);
146+ if(auto caret = ta->caret()) {
147+ auto& handler = *static_cast<detail::InputMethodEventHandler*>(caret.get());
148+ const auto preeditString(event.preeditString());
149+ if(preeditString == boost::none) { // completed or canceled
150+ const auto commitString(event.commitString());
151+ if(commitString != boost::none && boost::get(commitString).empty()) // completed => commit
152+ handler.commitString(event);
153+ handler.preeditEnded();
154+ } else if(boost::get(preeditString).empty()) { // started
155+ event.consume();
156+ handler.preeditStarted();
157+ } else // changed
158+ handler.preeditChanged(event);
159+ }
149160 }
150161 }
151162
152163 /**
153164 * Invoked when received input method query events.
154165 * @param event The event
155- * @param nativeEvent The platform-native event
156166 */
157- void TextViewer::handleInputMethodQueryEvent(widgetapi::event::InputMethodQueryEvent& event, const void* nativeEvent) {
167+ void TextViewer::handleInputMethodQueryEvent(widgetapi::event::InputMethodQueryEvent& event) {
158168 if(auto ta = textArea()) {
159169 if(auto caret = ta->caret())
160170 static_cast<detail::InputMethodEventHandler*>(caret.get())->handleInputMethodQueryEvent(event, nativeEvent);
diff -r dd09b0a95e01 -r e22b5d3d9e4e ascension/src/viewer/text-viewer-windows.cpp
--- a/ascension/src/viewer/text-viewer-windows.cpp Sun Jan 15 22:21:54 2017 +0900
+++ b/ascension/src/viewer/text-viewer-windows.cpp Sun Jan 15 22:22:46 2017 +0900
@@ -1097,8 +1097,8 @@
10971097 std::unique_ptr<WCHAR[]> buffer(new WCHAR[length]);
10981098 nbytes = ::ImmGetCompositionStringW(im.get(), GCS_RESULTSTR, buffer.get(), nbytes);
10991099 if(nbytes > 0) {
1100- auto e(widgetapi::event::ConstantInputMethodEvent::createCompletedInstance(String(win32::wideString<const Char>(buffer.get()))));
1101- handleInputMethodEvent(e, &native);
1100+ auto e(widgetapi::event::ConstantInputMethodEvent::createCompletedInstance(&native, String(win32::wideString<const Char>(buffer.get()))));
1101+ handleInputMethodEvent(e);
11021102 if(consumed = e.isConsumed())
11031103 return 0L; // block WM_CHARs
11041104 }
@@ -1111,7 +1111,7 @@
11111111 case WM_IME_ENDCOMPOSITION: {
11121112 MSG native;
11131113 nativeMessage(*this, message, wp, lp, native);
1114- handleInputMethodEvent(widgetapi::event::ConstantInputMethodEvent::createCanceledInstance(), &native);
1114+ handleInputMethodEvent(widgetapi::event::ConstantInputMethodEvent::createCanceledInstance(&native));
11151115 break;
11161116 }
11171117 case WM_IME_REQUEST:
@@ -1119,7 +1119,7 @@
11191119 case WM_IME_STARTCOMPOSITION: {
11201120 MSG native;
11211121 nativeMessage(*this, message, wp, lp, native);
1122- handleInputMethodEvent(widgetapi::event::ConstantInputMethodEvent::createStartedInstance(), &native);
1122+ handleInputMethodEvent(widgetapi::event::ConstantInputMethodEvent::createStartedInstance(&native));
11231123 break;
11241124 }
11251125 case WM_KEYDOWN:
Show on old repository browser