1;;; generic-custom.scm: Customization variables for generic.scm
2;;;
3;;; Copyright (c) 2003-2013 uim Project https://github.com/uim/uim
4;;;
5;;; All rights reserved.
6;;;
7;;; Redistribution and use in source and binary forms, with or without
8;;; modification, are permitted provided that the following conditions
9;;; are met:
10;;; 1. Redistributions of source code must retain the above copyright
11;;;    notice, this list of conditions and the following disclaimer.
12;;; 2. Redistributions in binary form must reproduce the above copyright
13;;;    notice, this list of conditions and the following disclaimer in the
14;;;    documentation and/or other materials provided with the distribution.
15;;; 3. Neither the name of authors nor the names of its contributors
16;;;    may be used to endorse or promote products derived from this software
17;;;    without specific prior written permission.
18;;;
19;;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
20;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
23;;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25;;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27;;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29;;; SUCH DAMAGE.
30;;;;
31
32(require "i18n.scm")
33
34
35(define-custom-group 'other-ims
36		     (N_ "Other input methods")
37		     (N_ "long description will be here."))
38
39(define-custom 'generic-use-candidate-window? #t
40  '(other-ims candwin)
41  '(boolean)
42  (N_ "Use candidate window")
43  (N_ "long description will be here."))
44
45(define-custom 'generic-candidate-op-count 1
46  '(other-ims candwin)
47  '(integer 0 99)
48  (N_ "Conversion key press count to show candidate window")
49  (N_ "long description will be here."))
50
51(define-custom 'generic-nr-candidate-max 10
52  '(other-ims candwin)
53  '(integer 1 20)
54  (N_ "Number of candidates in candidate window at a time")
55  (N_ "long description will be here."))
56
57(define-custom 'generic-commit-candidate-by-numeral-key? #t
58  '(other-ims candwin)
59  '(boolean)
60  (N_ "Select candidate by numeral keys")
61  (N_ "long description will be here."))
62
63(define-custom 'generic-show-candidate-implicitly? #t
64  '(other-ims candwin)
65  '(boolean)
66  (N_ "Show candidate window without explicit conversion action")
67  (N_ "long description will be here."))
68
69(define-custom 'generic-show-prediction-candidates? #t
70  '(other-ims candwin)
71  '(boolean)
72  (N_ "Show candidates matching with expected keys")
73  (N_ "long description will be here."))
74
75;; activity dependency
76(custom-add-hook 'generic-candidate-op-count
77		 'custom-activity-hooks
78		 (lambda ()
79		   generic-use-candidate-window?))
80
81(custom-add-hook 'generic-nr-candidate-max
82		 'custom-activity-hooks
83		 (lambda ()
84		   generic-use-candidate-window?))
85
86(custom-add-hook 'generic-commit-candidate-by-numeral-key?
87		 'custom-activity-hooks
88		 (lambda ()
89		   generic-use-candidate-window?))
90
91(custom-add-hook 'generic-show-candidate-implicitly?
92		 'custom-activity-hooks
93		 (lambda ()
94		   generic-use-candidate-window?))
95