Copyright (c) 2015-2021 David Capello
Library to copy/retrieve content to/from the clipboard/pasteboard.
Available features on Windows, macOS, and Linux (X11):
#include "clip.h"
#include <iostream>
int main() {
clip::set_text("Hello World");
std::string value;
clip::get_text(value);
std::cout << value << "\n";
}
#include "clip.h"
int main() {
clip::format my_format =
clip::register_format("com.appname.FormatName");
int value = 32;
clip::lock l;
l.clear();
l.set_data(clip::text_format(), "Alternative text for value 32");
l.set_data(my_format, &value, sizeof(int));
}
size_t
) in your custom
format data.libx11-dev
/libX11-devel
package.libpng-dev
/libpng-devel
package.Check the wiki
to know what projects are using the clip
library.