Codebase list mozc / 280822d
Update uim-mozc.patch to r327 Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org> Nobuhiro Iwamatsu 10 years ago
1 changed file(s) with 40 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
00 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
22 Forwarded: http://code.google.com/p/mozc/issues/detail?id=13
33 Author: uim Project http://code.google.com/p/uim/
4 Last-Update: 2013-04-12
4 Last-Update: 2013-09-17
55
6 From 4ffa8f548066a4398d238df4a748cca9993bb105 Mon Sep 17 00:00:00 2001
6 From 8227d59173c5688a4e56bc8db9ffff6c715f60ce Mon Sep 17 00:00:00 2001
77 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
1010
1111 Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
1212 ---
1313 unix/uim/key_translator.cc | 436 ++++++++++++++
1414 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 +++++++++++++
1717 unix/uim/scm/mozc-key-custom.scm | 74 +++
1818 unix/uim/scm/mozc.scm | 560 ++++++++++++++++++
1919 unix/uim/uim.gyp | 85 +++
20 7 files changed, 2841 insertions(+)
20 7 files changed, 2865 insertions(+)
2121 create mode 100644 unix/uim/key_translator.cc
2222 create mode 100644 unix/uim/key_translator.h
2323 create mode 100644 unix/uim/mozc.cc
587587 +#endif // MOZC_UNIX_UIM_KEY_TRANSLATOR_H_
588588 diff --git a/unix/uim/mozc.cc b/unix/uim/mozc.cc
589589 new file mode 100644
590 index 0000000..aa8ec1f
590 index 0000000..b300c07
591591 --- /dev/null
592592 +++ b/unix/uim/mozc.cc
593 @@ -0,0 +1,1185 @@
593 @@ -0,0 +1,1203 @@
594594 +/*
595595 +
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/
597597 +
598598 + All rights reserved.
599599 +
11151115 + if (!(*keyTranslator).Translate(keyval, keycode, modifiers, preedit_method, layout_is_jp, &key))
11161116 + return uim_scm_f();
11171117 +
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 + }
11201138 +
11211139 + update_all(mc_, id);
11221140 +
17781796 +}
17791797 diff --git a/unix/uim/scm/mozc-custom.scm b/unix/uim/scm/mozc-custom.scm
17801798 new file mode 100644
1781 index 0000000..f779728
1799 index 0000000..adfd65b
17821800 --- /dev/null
17831801 +++ b/unix/uim/scm/mozc-custom.scm
1784 @@ -0,0 +1,390 @@
1802 @@ -0,0 +1,396 @@
17851803 +;;;
17861804 +;;; Copyright (c) 2010-2012 uim Project http://code.google.com/p/uim/
17871805 +;;;
20822100 + '(mozc special-op)
20832101 + '(boolean)
20842102 + (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")
20852109 + (N_ "long description will be here."))
20862110 +
20872111 +(define-custom 'mozc-keyboard-type-for-kana-input-method 'jp-keyboard
29102934 + ],
29112935 +}
29122936 --
2913 1.7.10.4
2937 1.8.4.rc3
29142938