documentation

This commit is contained in:
2026-04-01 16:23:56 +02:00
parent 5ee62d0064
commit ab666368b1
27 changed files with 1080 additions and 164 deletions

View File

@@ -145,6 +145,7 @@
(define (event-handler wv evt)
(let ((event (hash-ref evt 'event 'unknown-event))
)
(displayln evt)
(cond
((eq? event 'resize)
(send this resized (hash-ref evt 'w) (hash-ref evt 'h)))
@@ -163,7 +164,7 @@
(let* ((je (hash-copy (hash-ref evt 'js-evt)))
(e (make-hash)))
(hash-set! e 'evt (string->symbol (hash-ref je 'evt)))
(hash-set! e 'id (string->symbol (hash-ref je 'id #f)))
(hash-set! e 'id (string->symbol (hash-ref je 'id "nil")))
(hash-set! e 'data (hash-ref je 'js_evt (make-hash)))
(hash-set! e 'event 'js-evt)
(when (eq? (send this js-event e) 'wv-unhandled-js-event)
@@ -244,7 +245,6 @@
)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Commands
@@ -257,6 +257,15 @@
(define/public (remove-class! selector-or-id cl)
(webview-remove-class! wv selector-or-id cl)
this)
(define/public (set-menu! menu)
(webview-set-menu! wv menu)
this)
(define/public (connect-menu! id callback)
(send this bind! (string->symbol (format "~a" id)) 'menu-item-choosen
(λ (el evt data)
(callback))))
(define/public (devtools)
(webview-devtools wv)