[uim-commit] r1864 - trunk/scm

yamaken at freedesktop.org yamaken at freedesktop.org
Fri Oct 21 01:26:01 PDT 2005


Author: yamaken
Date: 2005-10-21 01:25:57 -0700 (Fri, 21 Oct 2005)
New Revision: 1864

Modified:
   trunk/scm/action.scm
Log:
* scm/action.scm
  - (context-current-widget-states, context-update-widget-states!):
    New procedure


Modified: trunk/scm/action.scm
===================================================================
--- trunk/scm/action.scm	2005-10-21 03:44:12 UTC (rev 1863)
+++ trunk/scm/action.scm	2005-10-21 08:25:57 UTC (rev 1864)
@@ -327,6 +327,22 @@
 	      context-list)))
 
 ;; API for uim developers
+;; returns action-id list that can be passed to context-update-widget-states!
+;; TODO: write test
+(define context-current-widget-states
+  (let ((widget-act-id (compose action-id widget-activity)))
+    (lambda (context)
+      (map widget-act-id (context-widgets context)))))
+
+;; API for uim developers
+;; TODO: write test
+(define context-update-widget-states!
+  (lambda (context act-ids)
+    (for-each widget-activate!
+	      (context-widgets context)
+	      act-ids)))
+
+;; API for uim developers
 (define context-update-widgets
   (lambda (context)
     (let ((widgets (context-widgets context)))



More information about the uim-commit mailing list