AtlatestRepositorysigil-ui

sigil-ui / tree / test / link-check / src / linkmain.sgl

1(define-library (link main)
2 (import (sigil ui raster) (sigil io)
3 (prefix (sigil ui wayland) ui:)
4 (prefix (sigil window wayland) window:))
5 (export main)
6 (begin
7 (define (main)
8 (unless (and (procedure? ui:open-wayland-surface)
9 (procedure? window:open-wayland-surface))
10 (error "Both linked Wayland entry points must be available"))
11 (let ((canvas (make-canvas 12 10)))
12 (canvas-fill! canvas 2 3 4 5 #x123456)
13 (unless (= (canvas-pixel canvas 3 4) #x123456)
14 (error "Linked native raster did not draw the expected pixel"))
15 (println "PASS: linked sigil-ui native executable rasterized 0x123456")))))