scrap clipboard header on Mac?

Started by
3 comments, last by mike44 7 years ago

Hi

how/where is the header for using the scrap clipboard on Mac alike:

http://www.xsquawkbox.net/xpsdk/mediawiki/index.php?title=TextFieldFilters&redirect=no

Can't find scrap.h

Thanks

Advertisement

That code appears to be using the old Carbon "Scrap Manager" API. That entire API has been deprecated since 10.5 or so and isn't in modern SDKs; Carbon in general is a dead-end technology you shouldn't build new code around.

These days you want to use the NSPasteboard APIs, probably the Objective-C flavors thereof.

Thanks I only need to get the clipboard content in c++. The simpler the better.

The "clipboard" is a thing provided by your OS, so there's no standard C++ mechanism for doing so.

Your best bet is to find a cross-platform library that handles it for you; failing that, you have to write code against the specific OS APIs for every platform you want to support. This includes NSPasteboard in Cocoa if you want to support macOS.

ok got it thanks

This topic is closed to new replies.

Advertisement