[uim-commit] r873 - branches/composer/scm

yamaken at freedesktop.org yamaken at freedesktop.org
Wed Jun 8 16:51:35 PDT 2005


Author: yamaken
Date: 2005-06-08 16:51:33 -0700 (Wed, 08 Jun 2005)
New Revision: 873

Modified:
   branches/composer/scm/anthy.scm
   branches/composer/scm/event.scm
   branches/composer/scm/ng-japanese-romaji.scm
Log:
* scm/event.scm
  - (record action-event): Rename a member
  - (record action-groups-req-event, record
    action-groups-export-event, record actions-req-event, record
    actions-export-event, record chooser-event, record
    chooser-req-event, record chooser-config-event, record
    chooser-update-event, record indicator-req-event, record
    indicator-config-event, record indicator-update-event): New record

* scm/ng-japanese-romaji.scm
  - (ja-romaji-double-consonant-guide-alist): New variable

* scm/anthy.scm
  - (anthy-get-candidate-handler): Remove an unneeded code


Modified: branches/composer/scm/anthy.scm
===================================================================
--- branches/composer/scm/anthy.scm	2005-06-07 10:02:04 UTC (rev 872)
+++ branches/composer/scm/anthy.scm	2005-06-08 23:51:33 UTC (rev 873)
@@ -644,7 +644,7 @@
     (((mod_Control lkey_g))   (action_anthy_cancel_conv)) ;; generic
     (((mod_Control lkey_G))   (action_anthy_cancel_conv)) ;; generic
 
-    ;; converting-state-action-map-ruleset
+    ;; converting-state
     ((lkey_q)                 (action_anthy_toggle_kana))
     ((lkey_Q)                 (action_anthy_toggle_kana))
     ((lkey_Page_Up)           (action_anthy_prev_page))	;; generic
@@ -1596,8 +1596,7 @@
 
 (define anthy-get-candidate-handler
   (lambda (ac idx accel-enum-hint)
-    (let* ((ac-id (anthy-context-ac-id ac))
-	   (cur-seg (ustr-cursor-pos (anthy-context-segments ac)))
+    (let* ((cur-seg (ustr-cursor-pos (anthy-context-segments ac)))
 	   (cand (anthy-get-nth-candidate ac cur-seg idx)))
       (list cand (digit->string (+ idx 1)) ""))))
 

Modified: branches/composer/scm/event.scm
===================================================================
--- branches/composer/scm/event.scm	2005-06-07 10:02:04 UTC (rev 872)
+++ branches/composer/scm/event.scm	2005-06-08 23:51:33 UTC (rev 873)
@@ -87,14 +87,6 @@
 (define-record 'reset-event
   event-rec-spec)
 
-(define-record 'action-event
-  (append
-   event-rec-spec
-   '((name #f))))  ;; 'action_input_mode_direct
-
-;; TODO: define req/ack events for action and chooser (candidate
-;; selector) to export their items
-
 (define-record 'commit-event
   (append
    event-rec-spec
@@ -107,6 +99,100 @@
    event-rec-spec
    '((utext #f))))
 
+
+;; action, chooser, and indicator events may be canged drastically
+;; -- YamaKen 2005-06-09
+
+;; action
+
+(define-record 'action-event
+  (append
+   event-rec-spec
+   '((action-id #f))))  ;; 'action_input_mode_direct
+
+(define-record 'action-groups-req-event
+  event-rec-spec)
+
+(define-record 'action-groups-export-event
+  (append
+   event-rec-spec
+   '((action-groups ()))))  ;; list of action-group-id
+
+(define-record 'actions-req-event
+  (append
+   event-rec-spec
+   '((action-group-id #f))))  ;; 'action_group_input_mode
+
+(define-record 'actions-export-event
+  (append
+   event-rec-spec
+   '((action-group-id #f)
+     (actions         ()))))  ;; list of action objects (!= action-id)
+
+;; chooser  
+
+(define-record 'chooser-event
+  (append
+   event-rec-spec
+   '((chooser-id #f)  ;; 'chooser_candidate_selector
+     (index      -1)  ;; negative value means no spot
+     (scope-top  -1)
+     (finish     #t))))
+
+(define-record 'chooser-req-event
+  (append
+   event-rec-spec
+   '((chooser-id   #f)  ;; 'chooser_candidate_selector 'chooser_all etc.
+     (config       #f)
+     (items-top    -1)
+     (items-length -1))))
+
+(define-record 'chooser-config-event
+  (append
+   event-rec-spec
+   '((chooser-id      #f)
+     (label           "")
+     (desc            "")
+     (scope-size-hint 10)  ;; number of items displayable at a time
+     (scope-top       0)   ;; initial position of scope
+     (nr-items        0)
+     ;;(spot-pos        -1)
+     ;;(initial-items-top -1)
+     ;;(initial-items     ())
+     )))
+
+(define-record 'chooser-update-event
+  (append
+   event-rec-spec
+   '((chooser-id        #f)
+     (transition        'none)  ;; 'activate 'deactivate 'none
+     (scope-top         -1)
+     (spot-pos          -1)
+     (updated-items-top -1)
+     (updated-items     ()))))
+
+;; indicator
+
+(define-record 'indicator-req-event
+  (append
+   event-rec-spec
+   '((indicator-id #f)  ;; 'indicator_candidate_selector 'indicator_all etc.
+     (config       #f))))
+
+(define-record 'indicator-config-event
+  (append
+   event-rec-spec
+   '((indicator-id #f)             ;; 'indicator_input_mode
+     (indicator-indication #f)     ;; indication object for indicator itself
+     (state-indication     #f))))  ;; indication object for the content
+
+(define-record 'indicator-update-event
+  (append
+   event-rec-spec
+   '((indicator-id     #f)
+     (state-indication #f))))
+
+
 ;; #f means "don't care" for lkey, pkey, str, press and autorepeat
 ;; when comparing with other key-event. But modifiers require exact
 ;; match.

Modified: branches/composer/scm/ng-japanese-romaji.scm
===================================================================
--- branches/composer/scm/ng-japanese-romaji.scm	2005-06-07 10:02:04 UTC (rev 872)
+++ branches/composer/scm/ng-japanese-romaji.scm	2005-06-08 23:51:33 UTC (rev 873)
@@ -55,6 +55,18 @@
 	 ;;"m"  ;; rk contains this rule
 	 "y" "r" "v" "w")))
 
+(define ja-romaji-double-consonant-guide-alist
+  (map (lambda (c)
+	 (cons c ja-kana-xtsu))
+       '(("c" "h")
+	 ("s" "h")
+	 ("t" "y")
+	 ("z" "y")
+	 ("j" "y")
+	 "k" "g" "s" "z" "j" "t" "c" "d" "h" "f" "b" "p"
+	 ;;"m"  ;; rk contains this rule
+	 "y" "r" "v" "w")))
+
 (define ja-romaji-generate-double-consonant-ruleset
   (lambda (romaji-ruleset)
     (filter-map (lambda (rule)



More information about the uim-commit mailing list