$(NULL)
endif
+if IBUS_BUILD_STROKE_INPUT_MODE
+ ibus_engine_libpinyin_CXXFLAGS += \
+ -DIBUS_BUILD_STROKE_INPUT_MODE \
+ $(NULL)
+endif
+
BUILT_SOURCES = \
$(ibus_engine_built_c_sources) \
$(ibus_engine_built_h_sources) \
#ifdef IBUS_BUILD_ENGLISH_INPUT_MODE
#include "PYEnglishEditor.h"
#endif
+#ifdef IBUS_BUILD_STROKE_INPUT_MODE
+#include "PYStrokeEditor.h"
+#endif
#include "PYPFullPinyinEditor.h"
#include "PYPDoublePinyinEditor.h"
#include "PYFallbackEditor.h"
#else
m_editors[MODE_ENGLISH].reset (new Editor (m_props, LibPinyinPinyinConfig::instance ()));
#endif
+#ifdef IBUS_BUILD_STROKE_INPUT_MODE
+ m_editors[MODE_STROKE].reset (new StrokeEditor (m_props, LibPinyinPinyinConfig::instance ()));
+#else
+ m_editors[MODE_STROKE].reset (new Editor (m_props, LibPinyinPinyinConfig::instance ()));
+#endif
m_props.signalUpdateProperty ().connect
(std::bind (&LibPinyinPinyinEngine::updateProperty, this, _1));
m_input_mode = MODE_ENGLISH;
break;
#endif
+#ifdef IBUS_BUILD_STROKE_INPUT_MODE
+ case IBUS_u:
+ // do not enable stroke mode when use double pinyin.
+ if (LibPinyinPinyinConfig::instance ().doublePinyin ())
+ break;
+ m_input_mode = MODE_STROKE;
+ break;
+#endif
}
} else {
/* TODO: Unknown */
MODE_PUNCT, // punct mode
MODE_RAW, // raw mode
MODE_ENGLISH, // press v into English input mode
- #if 0
MODE_STROKE, // press u into stroke input mode
- #endif
MODE_EXTENSION, // press i into extension input mode
MODE_LAST,
} m_input_mode;