Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/swaywm/cl-wlroots

Common lisp bindings for wlroots, a library for writing Wayland compositors
https://github.com/swaywm/cl-wlroots

bindings common-lisp wayland wlroots

Last synced: 8 days ago
JSON representation

Common lisp bindings for wlroots, a library for writing Wayland compositors

Awesome Lists containing this project

README

        

#+TITLE: cl-wlroots
This system provides cffi bindings for wlroots. Its goal is to just
provide a low level interface to the library, although abstractions
may be added in the future. See the =status.org= file for which
interfaces have been implemented.

** Installation Instructions
*** Requirements
Install the following libraries from source:
+ [[https://github.com/swaywm/wlroots][wlroots]]. Install it per the directions in the project's
readme. The submodule included in this repository will always
work, but may be behind several commits.
+ [[https://www.quicklisp.org][quicklisp]]. Used to install dependencies such as cffi, cffi-grovel.
+ [[https://github.com/sdilts/cl-wayland][cl-wayland]]. As of the time of writing, the distribution included
with quicklisp is not up to date with the latest changes. Use
the devel branch of linked repository instead; it will always be
up to date.
+ [[https://github.com/sdilts/cl-xkbcommon][cl-xkbcommon]]. Not to be confused with =cl-xkb= shipped with
=quicklisp=.
As more and more parts of the library are added, the lisp
dependencies may change. If a dependency that isn't automatically
supplied by =quicklisp= is not listed here, please file an issue.
*** Installation
Download this project to a place that asdf can see it, or add its
path to asdf's source registry. Both of these solutions are
explained in the [[https://common-lisp.net/project/asdf/asdf/Configuring-ASDF-to-find-your-systems.html][asdf manual]].
An additional solution is to download it to
=~/quicklisp/local-projects=. You can then load the project with
~(ql:quickload "cl-wlroots")~.
** Usage
Every symbol and function is exported under the ~wlr~ package. If
you want to go on a file-by-file basis, each c header corresponds to a
package. For example, all of the functions in
~wlr/types/wlr_output.h~ can be found in the ~wlr/types/output~
package. A notable exception to this is ~wlr/types/input-devices~,
which contains all of the code for the input devices.

In addition to defining cffi types for all =wlroots= types, =cl-wlroots=
also defines some macros and error conditions. These are:
+ =with-wlr-accessors= Due to the way that foreign slots are
defined in this project, =cffi:with-foreign-slots= cannot be used, so
this macro is provided in its place.
+ =wlr/error:initialization-error=

** Examples
Example programs can be found in the =example= directory. Use
[[https://github.com/roswell/roswell][Roswell]] to run them.