[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fun with wayland
From: |
宋文武 |
Subject: |
Re: fun with wayland |
Date: |
Mon, 06 Feb 2023 10:59:17 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Matt Wette <matt.wette@gmail.com> writes:
> I finally got my Wayland demo in guile working. I thought I'd share
> some bits.
> (I started with creating FFI to libwayland, but with all the callbacks
> it was
> not worth it.)
>
> Wayland is a display server for Linux (and others?), meant to replace X11.
> It uses UNIX socket I/O between the "compositor" (i.e., server) and clients.
> I have written a client app without using libwayland: I've coded down
> to the
> socket protocol in Guile Scheme.
>
> Summary:
> 1) I created sendmsg/recvmsg! wrappers for Guile, in C. This allows me
> to send file descriptors as shared buffer references to the server.
> 2) I am using my proposed mmap wrapper for Guile, in C, to create a file-
> mapped shared drawing.
> 3) I created a "scanner" program in Guile that converts protocol specs
> (e.g., wayland.xml) to scheme.
> 4) I created "sender", "receiver" and "monitor" tasks within Fibers to
> run the client app
> 5) I used my ffi-helper generated code to use cairo for drawing.
>
> prototype code is located at https://github.com/mwette/guile-wl-play
Cool, I will definitely play/learn with it, thank you for sharing!