client/scanner.lisp: Remove unused function %hyphenize
Clarify single-threadedness and server/compositor terminology
This commit clarifies in the README that the library is single-threaded
as it stands right now, but intends to be multi-threadable in the coming
It also clarifies between Wayland servers and compositors, the former
often being casually called the latter since the wl_compositor is the
most critical/visible resource to most users.
Expand docstrings, getting started, API reference
This commit touches up on existing documentation, adds the section (From
Zero to Globals), and completes documentation on the define- macros and
ASDF component in the API reference.
wl-scan: augment text folding
For description text, wl-parse treats a single line as a space, but
n>1 newlines as n-1 newlines.
For copyright text, wl-parse treats each newline as-is.
All whitespace from start of line to EOL is preserved.
Check proxy version when reading events
This commit adds a check to event-reading functions when the event's
:SINCE is greater than 1: if the proxy version is less than the event's
SINCE, it signals a wl-message-error as the server should only send
events introduced in a version at or before the proxy's version.
Signal wl-message-error on message length or opcode mismatches
wl-message-error signifies a malformed message. This commit replaces
assertion errors from message length mismatch, or method dispatch errors
from an undefined opcode, with the wl-message-error.
This commit unfolds whitespace in protocol document CDATA describing
e.g. description text. It also fixes parsing of the enum 'since'
attribute, which missed parsing into an integer.
Signal wl-message-error on some invariants
Touch-up documentation and docstrings
Add wl-error condition family
This commit replaces the singular wl-error condition with a family of
three conditions all children of wl-error:
- wl-socket-error, for conditions related to a Wayland connection's
- wl-message-error, signaled due to reading a malformed
- wl-server-error, signaled due to reading a wl_display::error event
This commit also ignores EPIPE errors when writing to the socket so that
it can read wl_display::error events from the server.
Reexport wayflan symbols in wayflan-client
Programs that use Wayflan client will naturally use symbols from Wayflan
common. This commit uses uiop:define-package to use and re-export
symbols from wayflan to wayflan-client.
This commit also removes :local-nicknames from all src packages (since
uiop:define-package doesn't support them), and alters the scanner to
neither export nor intern arg symbols.
Move wayland primitive types to package #:wayflan
I think in the future, I want to mix all symbols living in #:wayflan
into #:wayflan-client, #:wayflan-server, so that a program only needs to
use one of either in order to use all shared symbols as well.
Define CLOS classes to scan protocol docs into
This commit creates the package #:xyz.shunter.wayflan with various wl-*
CLOS classes to scan XML documents into, rather than transforming them
directly into s-expressions.
This change enables lisp systems to inspect Wayland protocol documents
themselves through the same mechanism that generates client code.
First pass at ASDF protocol components
This commit adds the capability for ASDF systems to vendor their own
Wayland protocols via the component :wayflan-client-impl.
Reorg ASDF systems
This commit makes room for a wayflan-client/wayflan-server dual
heirarchy by moving all client-specific code to #:wayflan-client and
src/client/, keeping shared source code in #:wayflan/common, and
having #:wayflan load both client and server code.
Use package alexandria in src/
After sticking with package-local nicknames for long enough, it feels
long to use treat something as ubiquitous as alexandria as second-class.
I feel that part of Common Lisp metaprogramming ought to be tailoring
each package with the right namespace -- so I've :use'd alexandria in
all packages that use it.
Consolidate sockets system into the wire substrate
wayflan/sockets was created as a shim to replace iolib's socket stream,
to send fd's in the same message as mundane I/O. Using gray-streams
creates a small layer of overhead that this commit removes by
consolidating the systems together.
This commit also rewrites the wire and client unit tests, as the wire
API is completely redesigned.