Codebase list mozc / c6e83c7
Update uim-mozc.patch Update to r242. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org> Nobuhiro Iwamatsu 12 years ago
1 changed file(s) with 341 addition(s) and 48 deletion(s). Raw diff Collapse all Expand all
0 From 02ae723697b09c3cf86d0d4595849bc2f3e0fe3f Mon Sep 17 00:00:00 2001
0 From 17ade5618602a04753c960a90603d6663b2578ec Mon Sep 17 00:00:00 2001
11 From: Nobuhiro Iwamatsu <iwamatsu@debian.org>
2 Date: Tue, 15 Mar 2011 01:04:04 +0900
3 Subject: [PATCH] Add uim-mozc r222
2 Date: Tue, 31 May 2011 08:47:27 +0900
3 Subject: [PATCH] Add uim-mozc r242
44
55 Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
66 ---
77 unix/uim/key_translator.cc | 436 +++++++++++++++++
88 unix/uim/key_translator.h | 111 +++++
99 unix/uim/mozc.cc | 992 ++++++++++++++++++++++++++++++++++++++
10 unix/uim/scm/mozc-custom.scm | 259 ++++++++++
10 unix/uim/scm/mozc-custom.scm | 392 +++++++++++++++
1111 unix/uim/scm/mozc-key-custom.scm | 74 +++
12 unix/uim/scm/mozc.scm | 352 ++++++++++++++
12 unix/uim/scm/mozc.scm | 512 ++++++++++++++++++++
1313 unix/uim/uim.gyp | 82 ++++
14 7 files changed, 2306 insertions(+), 0 deletions(-)
14 7 files changed, 2599 insertions(+), 0 deletions(-)
1515 create mode 100644 unix/uim/key_translator.cc
1616 create mode 100644 unix/uim/key_translator.h
1717 create mode 100644 unix/uim/mozc.cc
2222
2323 diff --git a/unix/uim/key_translator.cc b/unix/uim/key_translator.cc
2424 new file mode 100644
25 index 0000000..ae1cd2d
25 index 0000000..6020923
2626 --- /dev/null
2727 +++ b/unix/uim/key_translator.cc
2828 @@ -0,0 +1,436 @@
2929 +// Copyright 2010, Google Inc.
30 +// Copyright (c) 2010 uim Project http://code.google.com/p/uim/
30 +// Copyright (c) 2010-2011 uim Project http://code.google.com/p/uim/
3131 +// All rights reserved.
3232 +//
3333 +// Redistribution and use in source and binary forms, with or without
464464 +} // namespace mozc
465465 diff --git a/unix/uim/key_translator.h b/unix/uim/key_translator.h
466466 new file mode 100644
467 index 0000000..be58c9b
467 index 0000000..fbcc365
468468 --- /dev/null
469469 +++ b/unix/uim/key_translator.h
470470 @@ -0,0 +1,111 @@
471471 +// Copyright 2010, Google Inc.
472 +// Copyright (c) 2010 uim Project http://code.google.com/p/uim/
472 +// Copyright (c) 2010-2011 uim Project http://code.google.com/p/uim/
473473 +// All rights reserved.
474474 +//
475475 +// Redistribution and use in source and binary forms, with or without
581581 +#endif // MOZC_UNIX_UIM_KEY_TRANSLATOR_H_
582582 diff --git a/unix/uim/mozc.cc b/unix/uim/mozc.cc
583583 new file mode 100644
584 index 0000000..80d54fa
584 index 0000000..7a96cb5
585585 --- /dev/null
586586 +++ b/unix/uim/mozc.cc
587587 @@ -0,0 +1,992 @@
588588 +/*
589589 +
590 + Copyright (c) 2010 uim Project http://code.google.com/p/uim/
590 + Copyright (c) 2010-2011 uim Project http://code.google.com/p/uim/
591591 +
592592 + All rights reserved.
593593 +
15791579 +}
15801580 diff --git a/unix/uim/scm/mozc-custom.scm b/unix/uim/scm/mozc-custom.scm
15811581 new file mode 100644
1582 index 0000000..d2cea8c
1582 index 0000000..b283970
15831583 --- /dev/null
15841584 +++ b/unix/uim/scm/mozc-custom.scm
1585 @@ -0,0 +1,259 @@
1585 @@ -0,0 +1,392 @@
15861586 +;;;
1587 +;;; Copyright (c) 2010 uim Project http://code.google.com/p/uim/
1587 +;;; Copyright (c) 2010-2011 uim Project http://code.google.com/p/uim/
15881588 +;;;
15891589 +;;; All rights reserved.
15901590 +;;;
16951695 + (N_ "Kana")
16961696 + (N_ "Kana input mode"))))
16971697 +
1698 +(define mozc-tool-indication-alist
1699 + (list
1700 + (list 'action_mozc_tool_selector
1701 + 'mozc_tool_selector
1702 + "T"
1703 + (N_ "MozcTool selector")
1704 + (N_ "MozcTool selector"))
1705 + (list 'action_mozc_tool_about_dialog
1706 + 'mozc_tool_about_dialog
1707 + "A"
1708 + (N_ "About")
1709 + (N_ "About"))
1710 + (list 'action_mozc_tool_config_dialog
1711 + 'mozc_tool_config_dialog
1712 + "C"
1713 + (N_ "Config dialog")
1714 + (N_ "Config dialog"))
1715 + (list 'action_mozc_tool_dictionary_tool
1716 + 'mozc_tool_dictionary_tool
1717 + "D"
1718 + (N_ "Dictionary tool")
1719 + (N_ "Dictionary tool"))
1720 + (list 'action_mozc_tool_word_register_dialog
1721 + 'mozc_tool_word_register_dialog
1722 + "W"
1723 + (N_ "Word register dialog")
1724 + (N_ "Word register dialog"))
1725 + (list 'action_mozc_tool_character_palette
1726 + 'mozc_tool_character_palette
1727 + "P"
1728 + (N_ "Character palette")
1729 + (N_ "Character palette"))
1730 + (list 'action_mozc_tool_hand_writing
1731 + 'mozc_tool_hand_writing
1732 + "H"
1733 + (N_ "Hand writing")
1734 + (N_ "Hand writing"))))
1735 +
1736 +
16981737 +;;; Buttons
16991738 +
17001739 +(define-custom 'mozc-widgets '(widget_mozc_input_mode
1701 + widget_mozc_kana_input_method)
1740 + widget_mozc_kana_input_method
1741 + widget_mozc_tool)
17021742 + '(mozc toolbar)
17031743 + (list 'ordered-list
17041744 + (list 'widget_mozc_input_mode
17061746 + (_ "Input mode"))
17071747 + (list 'widget_mozc_kana_input_method
17081748 + (_ "Kana input method")
1709 + (_ "Kana input method")))
1749 + (_ "Kana input method"))
1750 + (list 'widget_mozc_tool
1751 + (_ "Mozc tool")
1752 + (_ "Mozc tool")))
17101753 + (_ "Enabled toolbar buttons")
17111754 + (_ "long description will be here."))
17121755 +
18221865 + 'custom-set-hooks
18231866 + (lambda ()
18241867 + (mozc-configure-widgets)))
1868 +
1869 +
1870 +;;; Mozc tool
1871 +(define-custom 'mozc-tool-actions
1872 + (map car mozc-tool-indication-alist)
1873 + '(mozc toolbar)
1874 + (cons 'ordered-list
1875 + (map indication-alist-entry-extract-choice
1876 + mozc-tool-indication-alist))
1877 + (N_ "Mozc tool menu items")
1878 + (N_ "long description will be here."))
1879 +
1880 +
1881 +
18251882 +
18261883 +
18271884 +(define-custom 'mozc-use-with-vi? #f
18421899 + (N_ "Keyboard type for kana input method")
18431900 + (N_ "long description will be here."))
18441901 +
1902 +
1903 +(define-custom-group 'mozc-tool
1904 + (N_ "MozcTool")
1905 + (N_ "MozcTool settings"))
1906 +
1907 +(define-custom 'mozc-tool-about-dialog-cmd "/usr/lib/mozc/mozc_tool"
1908 + '(mozc-tool)
1909 + '(pathname regular-file)
1910 + (N_ "Path of about dialog command")
1911 + (N_ "long description will be here."))
1912 +
1913 +(define-custom 'mozc-tool-about-dialog-cmd-option "--mode=about_dialog"
1914 + '(mozc-tool)
1915 + '(pathname regular-file)
1916 + (N_ "Option for about dialog command")
1917 + (N_ "long description will be here."))
1918 +
1919 +(define-custom 'mozc-tool-config-dialog-cmd "/usr/lib/mozc/mozc_tool"
1920 + '(mozc-tool)
1921 + '(pathname regular-file)
1922 + (N_ "Path of config dialog command")
1923 + (N_ "long description will be here."))
1924 +
1925 +(define-custom 'mozc-tool-config-dialog-cmd-option "--mode=config_dialog"
1926 + '(mozc-tool)
1927 + '(pathname regular-file)
1928 + (N_ "Option for config dialog command")
1929 + (N_ "long description will be here."))
1930 +
1931 +(define-custom 'mozc-tool-dictionary-tool-cmd "/usr/lib/mozc/mozc_tool"
1932 + '(mozc-tool)
1933 + '(pathname regular-file)
1934 + (N_ "Path of dictionary tool command")
1935 + (N_ "long description will be here."))
1936 +
1937 +(define-custom 'mozc-tool-dictionary-tool-cmd-option "--mode=dictionary_tool"
1938 + '(mozc-tool)
1939 + '(pathname regular-file)
1940 + (N_ "Option for dictionary tool command")
1941 + (N_ "long description will be here."))
1942 +
1943 +(define-custom 'mozc-tool-word-register-dialog-cmd "/usr/lib/mozc/mozc_tool"
1944 + '(mozc-tool)
1945 + '(pathname regular-file)
1946 + (N_ "Path of word register dialog command")
1947 + (N_ "long description will be here."))
1948 +
1949 +(define-custom 'mozc-tool-word-register-dialog-cmd-option "--mode=word_register_dialog"
1950 + '(mozc-tool)
1951 + '(pathname regular-file)
1952 + (N_ "Option for word register dialog command")
1953 + (N_ "long description will be here."))
1954 +
1955 +(define-custom 'mozc-tool-character-palette-cmd "/usr/lib/mozc/mozc_tool"
1956 + '(mozc-tool)
1957 + '(pathname regular-file)
1958 + (N_ "Path of character palette command")
1959 + (N_ "long description will be here."))
1960 +
1961 +(define-custom 'mozc-tool-character-palette-cmd-option "--mode=character_palette"
1962 + '(mozc-tool)
1963 + '(pathname regular-file)
1964 + (N_ "Option for character palette command")
1965 + (N_ "long description will be here."))
1966 +
1967 +(define-custom 'mozc-tool-hand-writing-cmd "/usr/lib/mozc/mozc_tool"
1968 + '(mozc-tool)
1969 + '(pathname regular-file)
1970 + (N_ "Path of hand writing command")
1971 + (N_ "long description will be here."))
1972 +
1973 +(define-custom 'mozc-tool-hand-writing-cmd-option "--mode=hand_writing"
1974 + '(mozc-tool)
1975 + '(pathname regular-file)
1976 + (N_ "Option for hand writing command")
1977 + (N_ "long description will be here."))
18451978 diff --git a/unix/uim/scm/mozc-key-custom.scm b/unix/uim/scm/mozc-key-custom.scm
18461979 new file mode 100644
1847 index 0000000..553fe1f
1980 index 0000000..fbc94ae
18481981 --- /dev/null
18491982 +++ b/unix/uim/scm/mozc-key-custom.scm
18501983 @@ -0,0 +1,74 @@
18511984 +;;;
1852 +;;; Copyright (c) 2010 uim Project http://code.google.com/p/uim/
1985 +;;; Copyright (c) 2010-2011 uim Project http://code.google.com/p/uim/
18531986 +;;;
18541987 +;;; All rights reserved.
18551988 +;;;
19242057 + (_ "long description will be here"))
19252058 diff --git a/unix/uim/scm/mozc.scm b/unix/uim/scm/mozc.scm
19262059 new file mode 100644
1927 index 0000000..41f34f9
2060 index 0000000..619b5b5
19282061 --- /dev/null
19292062 +++ b/unix/uim/scm/mozc.scm
1930 @@ -0,0 +1,352 @@
2063 @@ -0,0 +1,512 @@
19312064 +;;;
1932 +;;; Copyright (c) 2010 uim Project http://code.google.com/p/uim/
2065 +;;; Copyright (c) 2010-2011 uim Project http://code.google.com/p/uim/
19332066 +;;;
19342067 +;;; All rights reserved.
19352068 +;;;
19592092 +;;;;
19602093 +
19612094 +(require "util.scm")
2095 +(require "process.scm")
19622096 +(require "japanese.scm")
19632097 +(require-custom "generic-key-custom.scm")
19642098 +(require-custom "mozc-custom.scm")
19782112 +
19792113 +(define mozc-prepare-input-mode-activation
19802114 + (lambda (mc new-mode)
1981 + (mozc-lib-set-input-mode mc (mozc-context-mc-id mc) new-mode)))
2115 + (let ((mid (mozc-context-mc-id mc)))
2116 + (if mid
2117 + (mozc-lib-set-input-mode mc mid new-mode)
2118 + #f))))
19822119 +
19832120 +(define mozc-prepare-input-rule-activation
19842121 + (lambda (mc new-rule)
1985 + (mozc-lib-set-input-rule mc (mozc-context-mc-id mc) new-rule)))
2122 + (let ((mid (mozc-context-mc-id mc)))
2123 + (if mid
2124 + (mozc-lib-set-input-rule mc mid new-rule)
2125 + #f))))
2126 +
2127 +(define (mozc-run-process file . args)
2128 + (let-optionals* args ((argv (list file)))
2129 + (let ((pid (process-fork)))
2130 + (cond ((< pid 0)
2131 + (begin
2132 + (uim-notify-fatal (N_ "cannot fork"))
2133 + #f))
2134 + ((= 0 pid) ;; child
2135 + (let ((pid2 (process-fork)))
2136 + (cond ((< pid2 0)
2137 + (begin
2138 + (uim-notify-fatal (N_ "cannot fork"))
2139 + #f))
2140 + ((= 0 pid2)
2141 + (if (= (process-execute file argv) -1)
2142 + (uim-notify-fatal (format (N_ "cannot execute ~a") file)))
2143 + (_exit 0))
2144 + (else
2145 + (_exit 0)))))
2146 + (else
2147 + (process-waitpid pid 0)
2148 + pid)))))
2149 +
2150 +(define mozc-tool-activate
2151 + (lambda (mc option)
2152 + (case option
2153 + ((mozc-tool-about-dialog)
2154 + (mozc-run-process mozc-tool-about-dialog-cmd (list mozc-tool-about-dialog-cmd mozc-tool-about-dialog-cmd-option)))
2155 + ((mozc-tool-config-dialog)
2156 + (mozc-run-process mozc-tool-config-dialog-cmd (list mozc-tool-config-dialog-cmd mozc-tool-config-dialog-cmd-option)))
2157 + ((mozc-tool-dictionary-tool)
2158 + (mozc-run-process mozc-tool-dictionary-tool-cmd (list mozc-tool-dictionary-tool-cmd mozc-tool-dictionary-tool-cmd-option)))
2159 + ((mozc-tool-word-register-dialog)
2160 + (mozc-run-process mozc-tool-word-register-dialog-cmd (list mozc-tool-word-register-dialog-cmd mozc-tool-word-register-dialog-cmd-option)))
2161 + ((mozc-tool-character-palette)
2162 + (mozc-run-process mozc-tool-character-palette-cmd (list mozc-tool-character-palette-cmd mozc-tool-character-palette-cmd-option)))
2163 + ((mozc-tool-hand-writing)
2164 + (mozc-run-process mozc-tool-hand-writing-cmd (list mozc-tool-hand-writing-cmd mozc-tool-hand-writing-cmd-option)))
2165 + (else
2166 + #f))))
19862167 +
19872168 +(register-action 'action_mozc_hiragana
19882169 + (lambda (mc) ;; indication handler
19922173 + "ひらがな入力モード"))
19932174 + (lambda (mc) ;; activity predicate
19942175 + (and
2176 + (mozc-context-mc-id mc)
19952177 + (mozc-context-on mc)
19962178 + (= (mozc-lib-input-mode (mozc-context-mc-id mc)) mozc-type-hiragana)))
19972179 + (lambda (mc) ;; action handler
20052187 + "カタカナ入力モード"))
20062188 + (lambda (mc)
20072189 + (and
2190 + (mozc-context-mc-id mc)
20082191 + (mozc-context-on mc)
20092192 + (= (mozc-lib-input-mode (mozc-context-mc-id mc)) mozc-type-katakana)))
20102193 + (lambda (mc)
20182201 + "半角カタカナ入力モード"))
20192202 + (lambda (mc)
20202203 + (and
2204 + (mozc-context-mc-id mc)
20212205 + (mozc-context-on mc)
20222206 + (= (mozc-lib-input-mode (mozc-context-mc-id mc)) mozc-type-halfkana)))
20232207 + (lambda (mc)
20312215 + "半角英数入力モード"))
20322216 + (lambda (mc)
20332217 + (and
2218 + (mozc-context-mc-id mc)
20342219 + (mozc-context-on mc)
20352220 + (= (mozc-lib-input-mode (mozc-context-mc-id mc)) mozc-type-halfwidth-alnum)))
20362221 + (lambda (mc)
20552240 + "全角英数入力モード"))
20562241 + (lambda (mc)
20572242 + (and
2243 + (mozc-context-mc-id mc)
20582244 + (mozc-context-on mc)
20592245 + (= (mozc-lib-input-mode (mozc-context-mc-id mc)) mozc-type-fullwidth-alnum)))
20602246 + (lambda (mc)
20692255 + "ローマ字"
20702256 + "ローマ字入力モード"))
20712257 + (lambda (mc)
2072 + (= (mozc-lib-input-rule (mozc-context-mc-id mc))
2073 + mozc-input-rule-roma))
2258 + (and (mozc-context-mc-id mc)
2259 + (= (mozc-lib-input-rule (mozc-context-mc-id mc))
2260 + mozc-input-rule-roma)))
20742261 + (lambda (mc)
20752262 + (mozc-prepare-input-rule-activation mc mozc-input-rule-roma)
20762263 +))
20842271 + "かな"
20852272 + "かな入力モード"))
20862273 + (lambda (mc)
2087 + (= (mozc-lib-input-rule (mozc-context-mc-id mc))
2088 + mozc-input-rule-kana))
2274 + (and (mozc-context-mc-id mc)
2275 + (= (mozc-lib-input-rule (mozc-context-mc-id mc))
2276 + mozc-input-rule-kana)))
20892277 + (lambda (mc)
20902278 + (mozc-prepare-input-rule-activation mc mozc-input-rule-kana)
20912279 + ))
2280 +
2281 +(register-action 'action_mozc_tool_selector
2282 +;; (indication-alist-indicator 'action_mozc_tool_selector
2283 +;; mozc-tool-indication-alist)
2284 + (lambda (mc)
2285 + '(mozc_tool_selector
2286 + "T"
2287 + "MozcTool selector"
2288 + "MozcTool selector"))
2289 + (lambda (mc)
2290 + #t)
2291 + (lambda (mc)
2292 + #f))
2293 +
2294 +(register-action 'action_mozc_tool_about_dialog
2295 +;; (indication-alist-indicator 'action_mozc_tool_about_dialog
2296 +;; mozc-tool-indication-alist)
2297 + (lambda (mc)
2298 + '(mozc_tool_about_dialog
2299 + "A"
2300 + "About"
2301 + "About Mozc"))
2302 + (lambda (mc)
2303 + #f)
2304 + (lambda (mc)
2305 + (mozc-tool-activate mc 'mozc-tool-about-dialog)))
2306 +
2307 +(register-action 'action_mozc_tool_config_dialog
2308 +;; (indication-alist-indicator 'action_mozc_tool_config_dialog
2309 +;; mozc-tool-indication-alist)
2310 + (lambda (mc)
2311 + '(mozc_tool_config_dialog
2312 + "C"
2313 + "Config dialog"
2314 + "Config dialog"))
2315 + (lambda (mc)
2316 + #f)
2317 + (lambda (mc)
2318 + (mozc-tool-activate mc 'mozc-tool-config-dialog)))
2319 +
2320 +(register-action 'action_mozc_tool_dictionary_tool
2321 +;; (indication-alist-indicator 'action_mozc_tool_dictionary_tool
2322 +;; mozc-tool-indication-alist)
2323 + (lambda (mc)
2324 + '(mozc_tool_dictionary_tool
2325 + "D"
2326 + "Dictionary tool"
2327 + "Dictionary tool"))
2328 + (lambda (mc)
2329 + #f)
2330 + (lambda (mc)
2331 + (mozc-tool-activate mc 'mozc-tool-dictionary-tool)))
2332 +
2333 +(register-action 'action_mozc_tool_word_register_dialog
2334 +;; (indication-alist-indicator 'action_mozc_tool_word_register_dialog
2335 +;; mozc-tool-indication-alist)
2336 + (lambda (mc)
2337 + '(mozc_tool_word_register_dialog
2338 + "W"
2339 + "Word register dialog"
2340 + "Word register dialog"))
2341 + (lambda (mc)
2342 + #f)
2343 + (lambda (mc)
2344 + (mozc-tool-activate mc 'mozc-tool-word-register-dialog)))
2345 +
2346 +(register-action 'action_mozc_tool_character_palette
2347 +;; (indication-alist-indicator 'action_mozc_tool_character_palette
2348 +;; mozc-tool-indication-alist)
2349 + (lambda (mc)
2350 + '(mozc_tool_character_palette
2351 + "W"
2352 + "Character palette"
2353 + "Character palette"))
2354 + (lambda (mc)
2355 + #f)
2356 + (lambda (mc)
2357 + (mozc-tool-activate mc 'mozc-tool-character-palette)))
2358 +
2359 +(register-action 'action_mozc_tool_hand_writing
2360 +;; (indication-alist-indicator 'action_mozc_tool_hand_writing
2361 +;; mozc-tool-indication-alist)
2362 + (lambda (mc)
2363 + '(mozc_tool_hand_writing
2364 + "W"
2365 + "Hand writing"
2366 + "Hand writing"))
2367 + (lambda (mc)
2368 + #f)
2369 + (lambda (mc)
2370 + (mozc-tool-activate mc 'mozc-tool-hand-writing)))
2371 +
20922372 +
20932373 +;; Update widget definitions based on action configurations. The
20942374 +;; procedure is needed for on-the-fly reconfiguration involving the
21012381 + (register-widget 'widget_mozc_kana_input_method
21022382 + (activity-indicator-new mozc-kana-input-method-actions)
21032383 + (actions-new mozc-kana-input-method-actions))
2384 + (register-widget 'widget_mozc_tool
2385 + (activity-indicator-new mozc-tool-actions)
2386 + (actions-new mozc-tool-actions))
21042387 + (context-list-replace-widgets! 'mozc mozc-widgets)))
21052388 +
21062389 +(define mozc-context-rec-spec
21162399 +(define mozc-context-new
21172400 + (lambda (id im name)
21182401 + (let* ((mc (mozc-context-new-internal id im))
2119 + (mc-id (mozc-lib-alloc-context mc)))
2402 + (mc-id (if (symbol-bound? 'mozc-lib-alloc-context)
2403 + (mozc-lib-alloc-context mc)
2404 + #f)))
21202405 + (mozc-context-set-widgets! mc mozc-widgets)
21212406 + (mozc-context-set-mc-id! mc mc-id)
21222407 + mc)))
21322417 +(define mozc-proc-direct-state
21332418 + (lambda (mc key key-state)
21342419 + (if (mozc-on-key? key key-state)
2135 + (begin
2136 + (mozc-lib-set-on (mozc-context-mc-id mc))
2420 + (let ((mid (mozc-context-mc-id mc)))
2421 + (if mid
2422 + (mozc-lib-set-on (mozc-context-mc-id mc)))
21372423 + (mozc-context-set-on! mc #t))
21382424 + (im-commit-raw mc))))
21392425 +
21662452 +
21672453 +(define mozc-kana-toggle
21682454 + (lambda (mc mid)
2169 + (let ((mode (mozc-lib-input-mode mid)))
2170 + (cond
2171 + ((= mode mozc-type-hiragana)
2172 + (mozc-lib-set-input-mode mc mid mozc-type-katakana))
2173 + ((= mode mozc-type-katakana)
2174 + (mozc-lib-set-input-mode mc mid mozc-type-hiragana))
2175 + (else
2176 + #f)))))
2455 + (if mid
2456 + (let ((mode (mozc-lib-input-mode mid)))
2457 + (cond
2458 + ((= mode mozc-type-hiragana)
2459 + (mozc-lib-set-input-mode mc mid mozc-type-katakana))
2460 + ((= mode mozc-type-katakana)
2461 + (mozc-lib-set-input-mode mc mid mozc-type-hiragana))
2462 + (else
2463 + #f)))
2464 + #f)))
21772465 +
21782466 +(define mozc-proc-input-state
21792467 + (lambda (mc key key-state)
21822470 + (let ((mid (mozc-context-mc-id mc)))
21832471 + (cond
21842472 + ((and
2473 + mid
21852474 + (mozc-off-key? key key-state)
21862475 + (not (mozc-lib-has-preedit? mid)))
21872476 + (mozc-lib-set-input-mode mc mid mozc-type-direct))
21902479 + (meta-key-mask key-state)
21912480 + (super-key-mask key-state)
21922481 + (hyper-key-mask key-state))
2193 + (if (mozc-lib-has-preedit? mid)
2482 + (if (and mid
2483 + (mozc-lib-has-preedit? mid))
21942484 + #f ;; ignore
21952485 + (im-commit-raw mc))) ;; pass through
21962486 + (else
22012491 + (let* ((new (mozc-transpose-keys mid key key-state))
22022492 + (nkey (car new))
22032493 + (nkey-state (cdr new)))
2204 + (if (mozc-lib-press-key mc mid (if (symbol? nkey)
2205 + (keysym-to-int nkey) nkey)
2206 + nkey-state)
2494 + (if (and mid
2495 + (mozc-lib-press-key mc mid (if (symbol? nkey)
2496 + (keysym-to-int nkey) nkey)
2497 + nkey-state))
22072498 + #f ; Key event is consumed
22082499 + (begin
2209 + (and mozc-use-with-vi?
2500 + (and mid
2501 + mozc-use-with-vi?
22102502 + (mozc-vi-escape-key? key key-state)
22112503 + (mozc-lib-set-input-mode mc mid mozc-type-direct))
22122504 + (im-commit-raw mc)))))))))))
22262518 +(define mozc-reset-handler
22272519 + (lambda (mc)
22282520 + (let ((mid (mozc-context-mc-id mc)))
2229 + (mozc-lib-reset mid))))
2521 + (and mid
2522 + (mozc-lib-reset mid)))))
22302523 +
22312524 +(define mozc-focus-in-handler
22322525 + (lambda (mc)
22822575 +)
22832576 diff --git a/unix/uim/uim.gyp b/unix/uim/uim.gyp
22842577 new file mode 100644
2285 index 0000000..7147a12
2578 index 0000000..44fda8c
22862579 --- /dev/null
22872580 +++ b/unix/uim/uim.gyp
22882581 @@ -0,0 +1,82 @@
22892582 +#
2290 +# Copyright (c) 2010 uim Project http://code.google.com/p/uim/
2583 +# Copyright (c) 2010-2011 uim Project http://code.google.com/p/uim/
22912584 +#
22922585 +# All rights reserved.
22932586 +#
23692662 + ],
23702663 +}
23712664 --
2372 1.7.4.1
2665 1.7.5.1
23732666