[][src]Module arboard::x11_clipboard

This implementation is a port of https://github.com/dacap/clip to Rust The structure of the original is more or less maintained.

Disclaimer: The original C++ code is well organized and feels clean but it relies on C++ allowing a liberal data sharing between threads and it is painfully obvious from certain parts of this port that this code was not designed for Rust. It should probably be reworked because the absolute plague that the Arc<Mutex<>> objects are in this code is horrible just to look at and will forever haunt me in my nightmares.

Most changes are to conform with Rusts rules for example there are multiple overloads of the get_atom functtion in the original but there's no function overloading in Rust so those are split apart into functions with different names. (get_atom_by_id and the other one at the time of writing I haven't needed to use)

More noteably the Manager class had to be split into mutliple structs and some member functions were made into global functions to conform Rust's aliasing rules. Furthermore the signature of many functions was changed to follow a simple locking philosophy; namely that the mutex gets locked at the topmost level possible and then most functions don't need to attempt to lock, instead they just use the direct object references passed on as arguments.

Structs

X11ClipboardContext