Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom clipboard formats and binary data #8

Open
scottrippey opened this issue Dec 20, 2016 · 3 comments
Open

Custom clipboard formats and binary data #8

scottrippey opened this issue Dec 20, 2016 · 3 comments
Labels
Question General questions about the library

Comments

@scottrippey
Copy link

I've been working on a fork of Robot-JS, trying to build support for native clipboard access. This includes the ability to read / write custom data formats and binary data (instead of just Text and Images).
I'd like to know if these changes would be a welcome addition to the project, and if so, I'd like to make sure I'm headed in a good direction before continuing work and creating a PR. I'd also like to make sure I'm not duplicating any other potential work.
So here's my first question: Should I be modifying the /Native/ code in this repo? Its hard to tell if the Native code is just copied from robot or if it's developed independently?

@dkrutsko
Copy link
Member

dkrutsko commented Feb 25, 2017

Hi, I'm sorry for the late response. Native/Addon is the V8-specific code that binds the JavaScript portion of the library to the C++ version of robot. Native/Robot is a clone of robot. Any changes would likely have to be made on the C++ version of robot unless it's node.js specific.

As for reading/writing custom data formats and binary data, a lot of inspiration for the robot clipboard API came from projects like Qt, JUCE and SDL. From what I remember, they didn't really offer that sort of functionality. Although Qt did something with MIME types, it was rather complicated.

Regardless, I would welcome a change like this but I suggest creating some proof of concept code first as well as some possible use cases for testing. It would also have to support Windows and OSX equally. If you have developed something like that, feel free to share the project with me or open a PR so we can discuss it further. Now is especially a good time since I'm starting work on the next release of Robot!

@dkrutsko dkrutsko added the Question General questions about the library label Feb 25, 2017
@scottrippey
Copy link
Author

Very cool, thanks for the info.
I've successfully built the functionality I was looking for! Although I had little C++ or Obj-C experience, I was very pleased with your codebase, and found it pretty easy to add my additions. I successfully implemented getTypes, getData, and setData for both Win and Mac, and it's working beautifully now!
Honestly, the hardest part was getting the build process configured correctly. It took some work, but I eventually got it building for Node 6 and even for Electron. So I think that would certainly be a useful contribution, too.
Anyway, I definitely want to contribute my changes back to this project, so I'm going to try to get approval to share my work, and I'll follow up later on that.
I'd love to know what you have in store for the next Robot release!

@dkrutsko
Copy link
Member

Yeah, Node is a bit harder to compile because you have to set up a compiler, node-gyp and more but this document explains the entire process for all platforms.

Sounds good on the changes. Looking forward to seeing them. You can track the upcoming features and release progress on the milestons page. I try to work on it whatever I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question General questions about the library
Development

No branches or pull requests

2 participants