PlatformPasteboard.h [plain text]
#ifndef PlatformPasteboard_h
#define PlatformPasteboard_h
#include <wtf/Forward.h>
#include <wtf/RefCounted.h>
#include <wtf/RetainPtr.h>
#include <wtf/Vector.h>
#if PLATFORM(MAC)
OBJC_CLASS NSPasteboard;
#endif
#if PLATFORM(IOS)
OBJC_CLASS UIPasteboard;
#endif
namespace WebCore {
class Color;
class SharedBuffer;
class URL;
struct PasteboardImage;
struct PasteboardWebContent;
class PlatformPasteboard {
public:
explicit PlatformPasteboard(const String& pasteboardName);
#if PLATFORM(IOS)
PlatformPasteboard();
#endif
static String uniqueName();
void getTypes(Vector<String>& types);
PassRefPtr<SharedBuffer> bufferForType(const String& pasteboardType);
void getPathnamesForType(Vector<String>& pathnames, const String& pasteboardType);
String stringForType(const String& pasteboardType);
long changeCount() const;
Color color();
URL url();
long addTypes(const Vector<String>& pasteboardTypes);
long setTypes(const Vector<String>& pasteboardTypes);
long copy(const String& fromPasteboard);
long setBufferForType(PassRefPtr<SharedBuffer>, const String& pasteboardType);
long setPathnamesForType(const Vector<String>& pathnames, const String& pasteboardType);
long setStringForType(const String&, const String& pasteboardType);
void write(const PasteboardWebContent&);
void write(const PasteboardImage&);
void write(const String& pasteboardType, const String&);
PassRefPtr<SharedBuffer> readBuffer(int index, const String& pasteboardType);
String readString(int index, const String& pasteboardType);
URL readURL(int index, const String& pasteboardType);
int count();
private:
#if PLATFORM(MAC)
RetainPtr<NSPasteboard> m_pasteboard;
#endif
#if PLATFORM(IOS)
RetainPtr<UIPasteboard> m_pasteboard;
#endif
};
}
#endif // !PlatformPasteboard_h