grace/tpb
Tee your Paste Board
git clone https://git.gae.moe/grace/tpb
565174c
latest
1// Simple bridge to objective_c code 2// https://nathancraddock.com/blog/writing-to-the-clipboard-the-hard-way/ 3#import <Cocoa/Cocoa.h> 4NSPasteboard *pboard; 5 6void initPB() { pboard = [NSPasteboard generalPasteboard]; } 7 8void sendPB(const char *text) { 9 [pboard clearContents]; 10 [pboard setString:[NSString stringWithUTF8String:text] 11 forType:NSPasteboardTypeString]; 12}