Update uim to r334
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Nobuhiro Iwamatsu
9 years ago
0 | 0 | Description: Support uim framework |
1 | Origin: macuim project: http://macuim.googlecode.com/svn/trunk / r330 | |
1 | Origin: macuim project: http://macuim.googlecode.com/svn/trunk / r334 | |
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-11-06 | |
4 | Last-Update: 2014-08-06 | |
5 | 5 | |
6 | From 39db06d612953a30242d24fc8617d732a740b8a5 Mon Sep 17 00:00:00 2001 | |
6 | From 4d373f15d36b065d45e831a503bc0d7904e19aa7 Mon Sep 17 00:00:00 2001 | |
7 | 7 | From: Nobuhiro Iwamatsu <iwamatsu@debian.org> |
8 | Date: Wed, 6 Nov 2013 08:14:22 +0900 | |
9 | Subject: [PATCH] Add support uim / macuim r330 | |
8 | Date: Wed, 6 Aug 2014 04:06:58 +0900 | |
9 | Subject: [PATCH] Add support uim / macuim r334 | |
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 | 1203 ++++++++++++++++++++++++++++++++++++++ | |
15 | unix/uim/mozc.cc | 1217 ++++++++++++++++++++++++++++++++++++++ | |
16 | 16 | unix/uim/scm/mozc-custom.scm | 396 +++++++++++++ |
17 | 17 | unix/uim/scm/mozc-key-custom.scm | 74 +++ |
18 | unix/uim/scm/mozc.scm | 560 ++++++++++++++++++ | |
18 | unix/uim/scm/mozc.scm | 566 ++++++++++++++++++ | |
19 | 19 | unix/uim/uim.gyp | 85 +++ |
20 | 7 files changed, 2865 insertions(+) | |
20 | 7 files changed, 2885 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 |
470 | 470 | +} // namespace mozc |
471 | 471 | diff --git a/unix/uim/key_translator.h b/unix/uim/key_translator.h |
472 | 472 | new file mode 100644 |
473 | index 0000000..32f1659 | |
473 | index 0000000..713955a | |
474 | 474 | --- /dev/null |
475 | 475 | +++ b/unix/uim/key_translator.h |
476 | 476 | @@ -0,0 +1,111 @@ |
513 | 513 | +#include <ext/hash_map> |
514 | 514 | +using __gnu_cxx::hash_map; |
515 | 515 | + |
516 | +#include "base/base.h" | |
516 | +#include "base/port.h" | |
517 | 517 | +#include "session/commands.pb.h" |
518 | 518 | + |
519 | 519 | +namespace mozc { |
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..b300c07 | |
590 | index 0000000..a982570 | |
591 | 591 | --- /dev/null |
592 | 592 | +++ b/unix/uim/mozc.cc |
593 | @@ -0,0 +1,1203 @@ | |
593 | @@ -0,0 +1,1217 @@ | |
594 | 594 | +/* |
595 | 595 | + |
596 | 596 | + Copyright (c) 2010-2013 uim Project http://code.google.com/p/uim/ |
641 | 641 | +# include "plugin.h" |
642 | 642 | +#endif |
643 | 643 | + |
644 | +#include "base/base.h" | |
644 | +#include "base/port.h" | |
645 | 645 | +#include "base/util.h" |
646 | 646 | +#include "base/scoped_ptr.h" |
647 | 647 | +#include "config/config.pb.h" |
1743 | 1743 | + return uim_scm_t(); |
1744 | 1744 | +} |
1745 | 1745 | + |
1746 | +static uim_lisp | |
1747 | +submit(uim_lisp mc_, uim_lisp id_) | |
1748 | +{ | |
1749 | + int id = C_INT(id_); | |
1750 | + commands::SessionCommand command; | |
1751 | + | |
1752 | + command.set_type(commands::SessionCommand::SUBMIT); | |
1753 | + context_slot[id].session->SendCommand(command, context_slot[id].output); | |
1754 | + update_all(mc_, id); | |
1755 | + | |
1756 | + return uim_scm_t(); | |
1757 | +} | |
1758 | + | |
1746 | 1759 | +} // namespace |
1747 | 1760 | +} // namespace |
1748 | 1761 | + |
1769 | 1782 | + uim_scm_init_proc1("mozc-lib-input-rule", mozc::uim::get_input_rule); |
1770 | 1783 | + uim_scm_init_proc3("mozc-lib-set-input-rule", mozc::uim::set_input_rule); |
1771 | 1784 | + uim_scm_init_proc2("mozc-lib-reconvert", mozc::uim::reconvert); |
1785 | + uim_scm_init_proc2("mozc-lib-submit-composition", mozc::uim::submit); | |
1772 | 1786 | + |
1773 | 1787 | + int argc = 1; |
1774 | 1788 | + static const char name[] = "uim-mozc"; |
2278 | 2292 | + (_ "long description will be here")) |
2279 | 2293 | diff --git a/unix/uim/scm/mozc.scm b/unix/uim/scm/mozc.scm |
2280 | 2294 | new file mode 100644 |
2281 | index 0000000..89a5c1c | |
2295 | index 0000000..9938ec4 | |
2282 | 2296 | --- /dev/null |
2283 | 2297 | +++ b/unix/uim/scm/mozc.scm |
2284 | @@ -0,0 +1,560 @@ | |
2298 | @@ -0,0 +1,566 @@ | |
2285 | 2299 | +;;; |
2286 | 2300 | +;;; Copyright (c) 2010-2012 uim Project http://code.google.com/p/uim/ |
2287 | 2301 | +;;; |
2786 | 2800 | + ;(mozc-lib-focus-out mid) |
2787 | 2801 | + ))) |
2788 | 2802 | + |
2803 | +(define mozc-displace-handler | |
2804 | + (lambda (mc) | |
2805 | + (let ((mid (mozc-context-mc-id mc))) | |
2806 | + (and mid | |
2807 | + (mozc-lib-submit-composition mc mid))))) | |
2808 | + | |
2789 | 2809 | +(define mozc-get-candidate-handler |
2790 | 2810 | + (lambda (mc idx accel-enum-hint) |
2791 | 2811 | + (let* ((mid (mozc-context-mc-id mc)) |
2840 | 2860 | + #f ;mozc-focus-in-handler |
2841 | 2861 | + #f ;mozc-focus-out-handler |
2842 | 2862 | + #f |
2843 | + #f | |
2863 | + mozc-displace-handler | |
2844 | 2864 | +) |
2845 | 2865 | diff --git a/unix/uim/uim.gyp b/unix/uim/uim.gyp |
2846 | 2866 | new file mode 100644 |
2934 | 2954 | + ], |
2935 | 2955 | +} |
2936 | 2956 | -- |
2937 | 1.8.4.rc3 | |
2957 | 2.0.1 | |
2938 | 2958 |