GithubHelp home page GithubHelp logo

winiciosrocha / clipboardxx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arian8j2/clipboardxx

0.0 0.0 0.0 41 KB

Header only, lightweight and cross platform C++ library for copy and paste text from clipboard.

License: MIT License

C++ 96.96% CMake 3.04%

clipboardxx's Introduction

ClipboardXX

Header only lightweight library to copy and paste text from clipboard
Copyright (C) 2020 Arian Rezazadeh

Example

#include "clipboard.hpp"
#include <string>

int main() {
    clipboardxx::clipboard clipboard;

    // copy
    clipboard << "text you wanna copy";

    // paste
    std::string paste_text;
    clipboard >> paste_text;
}

Setup

Windows

Nothing specially need to do, just copy clipboard.hpp under include folder to your include path.

Linux

in linux based operating systems, clipboardxx requires xcb and pthread to work, Link them manually or use CMake.

MacOS

There is currently no support for MacOS, Any contribute would be much appreciated.

CMake

By using CMake, there is no need to manually change include path or link dependencies, Just put clipboardxx folder in your project subdirectoy and use add_subdirectory function to create ClipboardXX library and then link library to your target.

add_subdirectory(ClipboardXX)
target_link_libraries(your_target ClipboardXX)

Error handling

In certain situations such as:

  • cannot open clipboard in windows
  • cannot empty clipboard in windows

clipboardxx will throw an execption of type clipboardxx::exception you can handle it by your own way.

clipboardxx's People

Contributors

arian8j2 avatar oldarian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.