Skip to content

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

License

Notifications You must be signed in to change notification settings

swaywm/cl-wlroots

Repository files navigation

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:

  • 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.
  • quicklisp. Used to install dependencies such as cffi, cffi-grovel.
  • 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.
  • 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 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 Roswell to run them.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published