All Projects → dacap → Clip

dacap / Clip

Licence: mit
Cross-platform C++ library to copy/paste clipboard content

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Clip

x11-clipboard
x11 clipboard support for Rust
Stars: ✭ 28 (-91.79%)
Mutual labels:  clipboard, x11
Extrakto
tmux - quickly select, copy/insert/complete text without a mouse
Stars: ✭ 320 (-6.16%)
Mutual labels:  clipboard
Devour
X11 window swallower
Stars: ✭ 253 (-25.81%)
Mutual labels:  x11
Wsl Ssh Agent
Helper to interface with Windows ssh-agent.exe service from Windows Subsystem for Linux (WSL)
Stars: ✭ 298 (-12.61%)
Mutual labels:  clipboard
Shapeshifter
A clipboard manager for the 21st century.
Stars: ✭ 256 (-24.93%)
Mutual labels:  clipboard
Clipjump
📋 Clipboard Manager for Windows, built in AutoHotkey
Stars: ✭ 305 (-10.56%)
Mutual labels:  clipboard
X11
A Haskell binding to the X11 graphics library.
Stars: ✭ 96 (-71.85%)
Mutual labels:  x11
Autopilot Deno
🚀 Cross-platform desktop automation library for Deno.
Stars: ✭ 341 (+0%)
Mutual labels:  x11
Clipboard
Ruby access to the clipboard on Windows, Linux, macOS, Java, Cygwin, and WSL 📋︎
Stars: ✭ 310 (-9.09%)
Mutual labels:  clipboard
Gromit Mpx
Gromit-MPX is an on-screen annotation tool that works with any Unix desktop environment under X11 as well as Wayland.
Stars: ✭ 287 (-15.84%)
Mutual labels:  x11
X11vnc
a VNC server for real X displays
Stars: ✭ 272 (-20.23%)
Mutual labels:  x11
Pasteboard Viewer
📋 Inspect the system pasteboards on macOS
Stars: ✭ 257 (-24.63%)
Mutual labels:  clipboard
Xbanish
banish the mouse cursor when typing, show it again when the mouse moves
Stars: ✭ 306 (-10.26%)
Mutual labels:  x11
Use Clipboard Copy
📋 Lightweight copy to clipboard hook for React
Stars: ✭ 256 (-24.93%)
Mutual labels:  clipboard
Rofimoji
An emoji and character picker for rofi 😁
Stars: ✭ 319 (-6.45%)
Mutual labels:  x11
gummy
Linux brightness/temperature manager for X11
Stars: ✭ 13 (-96.19%)
Mutual labels:  x11
Basic wm
An example basic X11 window manager.
Stars: ✭ 271 (-20.53%)
Mutual labels:  x11
Xwinwrap
My fork of xwinwrap. Xwinwrap allows you to stick most of the apps to your desktop background.
Stars: ✭ 300 (-12.02%)
Mutual labels:  x11
Wmderland
🌳 X11 tiling window manager using space partitioning trees
Stars: ✭ 341 (+0%)
Mutual labels:  x11
Copyq
Clipboard manager with advanced features
Stars: ✭ 4,346 (+1174.49%)
Mutual labels:  clipboard

Clip Library

Copyright (c) 2015-2020 David Capello

build MIT Licensed

Library to copy/retrieve content to/from the clipboard/pasteboard.

Features

Available features on Windows, macOS, and Linux (X11):

  • Copy/paste UTF-8 text.
  • Copy/paste user-defined data.
  • Copy/paste RGB/RGBA images. This library use non-premultiplied alpha RGB values.

Example

#include "clip.h"
#include <iostream>

int main() {
  clip::set_text("Hello World");

  std::string value;
  clip::get_text(value);
  std::cout << value << "\n";
}

User-defined clipboard formats

#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));
}

Platform specific details

  • If two versions of your application (32-bit and 64-bit) can run at at the same time, remember to avoid storing data types that could change depending on the platform (e.g. size_t) in your custom format data.
  • Windows:
  • Linux:
    • To be able to copy/paste on Linux you need libx11-dev/libX11-devel package.
    • To copy/paste images you will need libpng-dev/libpng-devel package.

Who is using this library?

Check the wiki to know what projects are using the clip library.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].