Twobjects quick reference ¶
Twobjects is the result of migration taiwins from libweston , as libweston has many constrains, lacks of important features and has several severe bugs for daily users. Firstly I looked into wlroots and found it does not fit the design of taiwins, inspired by the two prior project. I created this library for faciliting the development of the wayland compositor. It is now merged inside libtaiwins.
twobjects implements all the interfaces in the
wayland.xmland several .. code-block:
important protocols such as `xdg-shell` and `linux-dmabuf`.
twobjects is designed to backend agnositc, you can stack it on top of other .. code-block:
backend implementation such as wlroots.
twobjects is designed to be autonomous. Unlike wlroots approach, which heavily exposes
wl_signalfrom protocols so the users still has to write a layer of glue to use them. In twobjects, many of wayland protocols manages itself thus transparent to the backend developer. A good example is
twobjects has built-in logging and profiling system and other utilites.
Commands for build:
meson build ninja -C build
Commands for install:
sudo ninja -C build install
Getting started ¶
Many protocols essentially implements a
in the compositor, twobjects typically implements a corresponding type like
. You can create the static global by using function like
or allocate the memory yourself then use
There are some cases where twobjects abstracts several protocols into common
interface for users. For example, the
for the user, this
is similar to the design of libweston.
For “middle-man” protocols like
, the internals or managing
is transparent to user. Users simply
for getting the clipboard in wayland.
Twobjects utilities ¶
Twobjects implements utilies like matrix, cursor, logging and profiling functions for users. Check out the headers for usage.