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.
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 withquicklisp
.
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.
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")
.
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
Example programs can be found in the example
directory. Use
Roswell to run them.