Codebase list mozc / 39d515b
Update uim to r334 Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org> Nobuhiro Iwamatsu 9 years ago
1 changed file(s) with 37 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
00 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
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-11-06
4 Last-Update: 2014-08-06
55
6 From 39db06d612953a30242d24fc8617d732a740b8a5 Mon Sep 17 00:00:00 2001
6 From 4d373f15d36b065d45e831a503bc0d7904e19aa7 Mon Sep 17 00:00:00 2001
77 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
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 | 1203 ++++++++++++++++++++++++++++++++++++++
15 unix/uim/mozc.cc | 1217 ++++++++++++++++++++++++++++++++++++++
1616 unix/uim/scm/mozc-custom.scm | 396 +++++++++++++
1717 unix/uim/scm/mozc-key-custom.scm | 74 +++
18 unix/uim/scm/mozc.scm | 560 ++++++++++++++++++
18 unix/uim/scm/mozc.scm | 566 ++++++++++++++++++
1919 unix/uim/uim.gyp | 85 +++
20 7 files changed, 2865 insertions(+)
20 7 files changed, 2885 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
470470 +} // namespace mozc
471471 diff --git a/unix/uim/key_translator.h b/unix/uim/key_translator.h
472472 new file mode 100644
473 index 0000000..32f1659
473 index 0000000..713955a
474474 --- /dev/null
475475 +++ b/unix/uim/key_translator.h
476476 @@ -0,0 +1,111 @@
513513 +#include <ext/hash_map>
514514 +using __gnu_cxx::hash_map;
515515 +
516 +#include "base/base.h"
516 +#include "base/port.h"
517517 +#include "session/commands.pb.h"
518518 +
519519 +namespace mozc {
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..b300c07
590 index 0000000..a982570
591591 --- /dev/null
592592 +++ b/unix/uim/mozc.cc
593 @@ -0,0 +1,1203 @@
593 @@ -0,0 +1,1217 @@
594594 +/*
595595 +
596596 + Copyright (c) 2010-2013 uim Project http://code.google.com/p/uim/
641641 +# include "plugin.h"
642642 +#endif
643643 +
644 +#include "base/base.h"
644 +#include "base/port.h"
645645 +#include "base/util.h"
646646 +#include "base/scoped_ptr.h"
647647 +#include "config/config.pb.h"
17431743 + return uim_scm_t();
17441744 +}
17451745 +
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 +
17461759 +} // namespace
17471760 +} // namespace
17481761 +
17691782 + uim_scm_init_proc1("mozc-lib-input-rule", mozc::uim::get_input_rule);
17701783 + uim_scm_init_proc3("mozc-lib-set-input-rule", mozc::uim::set_input_rule);
17711784 + uim_scm_init_proc2("mozc-lib-reconvert", mozc::uim::reconvert);
1785 + uim_scm_init_proc2("mozc-lib-submit-composition", mozc::uim::submit);
17721786 +
17731787 + int argc = 1;
17741788 + static const char name[] = "uim-mozc";
22782292 + (_ "long description will be here"))
22792293 diff --git a/unix/uim/scm/mozc.scm b/unix/uim/scm/mozc.scm
22802294 new file mode 100644
2281 index 0000000..89a5c1c
2295 index 0000000..9938ec4
22822296 --- /dev/null
22832297 +++ b/unix/uim/scm/mozc.scm
2284 @@ -0,0 +1,560 @@
2298 @@ -0,0 +1,566 @@
22852299 +;;;
22862300 +;;; Copyright (c) 2010-2012 uim Project http://code.google.com/p/uim/
22872301 +;;;
27862800 + ;(mozc-lib-focus-out mid)
27872801 + )))
27882802 +
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 +
27892809 +(define mozc-get-candidate-handler
27902810 + (lambda (mc idx accel-enum-hint)
27912811 + (let* ((mid (mozc-context-mc-id mc))
28402860 + #f ;mozc-focus-in-handler
28412861 + #f ;mozc-focus-out-handler
28422862 + #f
2843 + #f
2863 + mozc-displace-handler
28442864 +)
28452865 diff --git a/unix/uim/uim.gyp b/unix/uim/uim.gyp
28462866 new file mode 100644
29342954 + ],
29352955 +}
29362956 --
2937 1.8.4.rc3
2957 2.0.1
29382958