| 75 | #endif |
| 76 | |
| 77 | bool Clipboard::hasString() |
| 78 | { |
| 79 | #if defined( CINDER_MAC ) |
| 80 | NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; |
| 81 | NSArray *classArray = [NSArray arrayWithObject:[NSString class]]; |
| 82 | NSDictionary *options = [NSDictionary dictionary]; |
| 83 | |
| 84 | return [pasteboard canReadObjectForClasses:classArray options:options]; |
| 85 | #elif defined( CINDER_COCOA_TOUCH ) |
| 86 | UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; |
| 87 | return [pasteboard containsPasteboardTypes:UIPasteboardTypeListString]; |
| 88 | #elif defined( CINDER_MSW ) |
| 89 | std::set<UINT> textFormats; |
| 90 | textFormats.insert( CF_TEXT ); textFormats.insert( CF_UNICODETEXT ); textFormats.insert( CF_OEMTEXT ); |
| 91 | return clipboardContainsFormat( textFormats ); |
| 92 | #elif defined( CINDER_LINUX ) |
| 93 | return glfwGetClipboardString( (GLFWwindow*)app::getWindow()->getNative() ) != nullptr; |
| 94 | #endif |
| 95 | } |
| 96 | |
| 97 | bool Clipboard::hasImage() |
| 98 | { |
nothing calls this directly
no test coverage detected