Update uim-mozc.patch to r327
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Nobuhiro Iwamatsu
10 years ago
0 | 0 | Description: Support uim framework |
1 | Origin: macuim project: http://macuim.googlecode.com/svn/trunk / r323 | |
1 | Origin: macuim project: http://macuim.googlecode.com/svn/trunk / r327 | |
2 | 2 | Forwarded: http://code.google.com/p/mozc/issues/detail?id=13 |
3 | 3 | Author: uim Project http://code.google.com/p/uim/ |
4 | Last-Update: 2013-04-12 | |
4 | Last-Update: 2013-09-17 | |
5 | 5 | |
6 | From 4ffa8f548066a4398d238df4a748cca9993bb105 Mon Sep 17 00:00:00 2001 | |
6 | From 8227d59173c5688a4e56bc8db9ffff6c715f60ce Mon Sep 17 00:00:00 2001 | |
7 | 7 | From: Nobuhiro Iwamatsu <iwamatsu@debian.org> |
8 | Date: Fri, 12 Apr 2013 12:40:01 +0900 | |
9 | Subject: [PATCH] Add support uim / macuim r323 | |
8 | Date: Tue, 17 Sep 2013 00:48:17 +0900 | |
9 | Subject: [PATCH] Add support uim / macuim r327 | |
10 | 10 | |
11 | 11 | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org> |
12 | 12 | --- |
13 | 13 | unix/uim/key_translator.cc | 436 ++++++++++++++ |
14 | 14 | unix/uim/key_translator.h | 111 ++++ |
15 | unix/uim/mozc.cc | 1185 ++++++++++++++++++++++++++++++++++++++ | |
16 | unix/uim/scm/mozc-custom.scm | 390 +++++++++++++ | |
15 | unix/uim/mozc.cc | 1203 ++++++++++++++++++++++++++++++++++++++ | |
16 | unix/uim/scm/mozc-custom.scm | 396 +++++++++++++ | |
17 | 17 | unix/uim/scm/mozc-key-custom.scm | 74 +++ |
18 | 18 | unix/uim/scm/mozc.scm | 560 ++++++++++++++++++ |
19 | 19 | unix/uim/uim.gyp | 85 +++ |
20 | 7 files changed, 2841 insertions(+) | |
20 | 7 files changed, 2865 insertions(+) | |
21 | 21 | create mode 100644 unix/uim/key_translator.cc |
22 | 22 | create mode 100644 unix/uim/key_translator.h |
23 | 23 | create mode 100644 unix/uim/mozc.cc |
587 | 587 | +#endif // MOZC_UNIX_UIM_KEY_TRANSLATOR_H_ |
588 | 588 | diff --git a/unix/uim/mozc.cc b/unix/uim/mozc.cc |
589 | 589 | new file mode 100644 |
590 | index 0000000..aa8ec1f | |
590 | index 0000000..b300c07 | |
591 | 591 | --- /dev/null |
592 | 592 | +++ b/unix/uim/mozc.cc |
593 | @@ -0,0 +1,1185 @@ | |
593 | @@ -0,0 +1,1203 @@ | |
594 | 594 | +/* |
595 | 595 | + |
596 | + Copyright (c) 2010-2012 uim Project http://code.google.com/p/uim/ | |
596 | + Copyright (c) 2010-2013 uim Project http://code.google.com/p/uim/ | |
597 | 597 | + |
598 | 598 | + All rights reserved. |
599 | 599 | + |
1115 | 1115 | + if (!(*keyTranslator).Translate(keyval, keycode, modifiers, preedit_method, layout_is_jp, &key)) |
1116 | 1116 | + return uim_scm_f(); |
1117 | 1117 | + |
1118 | + if (!(*session).SendKey(key, context_slot[id].output)) | |
1119 | + return uim_scm_f(); | |
1118 | + if (uim_scm_symbol_value_bool("mozc-use-context-aware-conversion?")) { | |
1119 | + commands::Context context; | |
1120 | + uim_lisp ustr = uim_scm_callf("im-acquire-text", "oyyyy", mc_, "primary", "cursor", "line", "line"); | |
1121 | + uim_lisp former, latter, str; | |
1122 | + if (TRUEP(ustr)) { | |
1123 | + if(!NULLP(former = uim_scm_callf("ustr-former-seq", "o", ustr))) { | |
1124 | + str = CAR(former); | |
1125 | + context.set_preceding_text(REFER_C_STR(str)); | |
1126 | + } | |
1127 | + if(!NULLP(latter = uim_scm_callf("ustr-latter-seq", "o", ustr))) { | |
1128 | + str = CAR(latter); | |
1129 | + context.set_following_text(REFER_C_STR(str)); | |
1130 | + } | |
1131 | + } | |
1132 | + if (!(*session).SendKeyWithContext(key, context, context_slot[id].output)) | |
1133 | + return uim_scm_f(); | |
1134 | + } else { | |
1135 | + if (!(*session).SendKey(key, context_slot[id].output)) | |
1136 | + return uim_scm_f(); | |
1137 | + } | |
1120 | 1138 | + |
1121 | 1139 | + update_all(mc_, id); |
1122 | 1140 | + |
1778 | 1796 | +} |
1779 | 1797 | diff --git a/unix/uim/scm/mozc-custom.scm b/unix/uim/scm/mozc-custom.scm |
1780 | 1798 | new file mode 100644 |
1781 | index 0000000..f779728 | |
1799 | index 0000000..adfd65b | |
1782 | 1800 | --- /dev/null |
1783 | 1801 | +++ b/unix/uim/scm/mozc-custom.scm |
1784 | @@ -0,0 +1,390 @@ | |
1802 | @@ -0,0 +1,396 @@ | |
1785 | 1803 | +;;; |
1786 | 1804 | +;;; Copyright (c) 2010-2012 uim Project http://code.google.com/p/uim/ |
1787 | 1805 | +;;; |
2082 | 2100 | + '(mozc special-op) |
2083 | 2101 | + '(boolean) |
2084 | 2102 | + (N_ "Enable vi-cooperative mode") |
2103 | + (N_ "long description will be here.")) | |
2104 | + | |
2105 | +(define-custom 'mozc-use-context-aware-conversion? #f | |
2106 | + '(mozc special-op) | |
2107 | + '(boolean) | |
2108 | + (N_ "Use text input with context awareness") | |
2085 | 2109 | + (N_ "long description will be here.")) |
2086 | 2110 | + |
2087 | 2111 | +(define-custom 'mozc-keyboard-type-for-kana-input-method 'jp-keyboard |
2910 | 2934 | + ], |
2911 | 2935 | +} |
2912 | 2936 | -- |
2913 | 1.7.10.4 | |
2937 | 1.8.4.rc3 | |
2914 | 2938 |