diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-31 00:12:37 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-31 00:12:37 +0100 |
commit | 5b782cce0b60f67ca06085bb7a48528ce5a14987 (patch) | |
tree | 1a29d3d90830f3c07ee12f6ce744f6abe34b235b /module/vcalendar | |
parent | Add as-{string,symb}. (diff) | |
download | calp-5b782cce0b60f67ca06085bb7a48528ce5a14987.tar.gz calp-5b782cce0b60f67ca06085bb7a48528ce5a14987.tar.xz |
Add (read only) property access from scheme.
Diffstat (limited to '')
-rw-r--r-- | module/vcalendar.scm | 12 | ||||
-rw-r--r-- | module/vcalendar/primitive.scm | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/module/vcalendar.scm b/module/vcalendar.scm index 51c4f8e3..0f1a3c57 100644 --- a/module/vcalendar.scm +++ b/module/vcalendar.scm @@ -39,6 +39,18 @@ component (as-string attr))) +(define (get-property component attr prop) + (%vcomponent-get-property + component + (as-string attr) + (as-string prop))) + +;; TODO replace this with procedure-with-setter +(define-public prop get-property) + +(define-public (properties component attr) + (%vcomponent-property-list component (as-string attr))) + ;; Enables symmetric get and set: ;; (set! (attr ev "KEY") 10) (define-public attr (make-procedure-with-setter get-attr set-attr!)) diff --git a/module/vcalendar/primitive.scm b/module/vcalendar/primitive.scm index fed799f9..f41a7803 100644 --- a/module/vcalendar/primitive.scm +++ b/module/vcalendar/primitive.scm @@ -14,6 +14,9 @@ %vcomponent-set-attribute! %vcomponent-get-attribute + %vcomponent-get-property + %vcomponent-property-list + %vcomponent-attribute-list %vcomponent-shallow-copy)) |