#ifndef Pasteboard_h
#define Pasteboard_h
#include <wtf/Forward.h>
#include <wtf/HashSet.h>
#include <wtf/Noncopyable.h>
#include <wtf/text/WTFString.h>
#if PLATFORM(MAC)
#include <wtf/RetainPtr.h>
#endif
#if PLATFORM(GTK)
#include <PasteboardHelper.h>
#endif
#include <wtf/Vector.h>
#if PLATFORM(MAC)
OBJC_CLASS NSAttributedString;
OBJC_CLASS NSFileWrapper;
OBJC_CLASS NSArray;
#endif
#if PLATFORM(WIN)
#include <windows.h>
typedef struct HWND__* HWND;
#endif
#if PLATFORM(CHROMIUM)
#include "PasteboardPrivate.h"
#endif
namespace WebCore {
#if PLATFORM(MAC)
extern NSString *WebArchivePboardType;
extern const char* WebSmartPastePboardType;
extern const char* WebURLNamePboardType;
extern const char* WebURLPboardType;
extern const char* WebURLsWithTitlesPboardType;
#endif
class ArchiveResource;
class Clipboard;
class DocumentFragment;
class Frame;
class HitTestResult;
class KURL;
class Node;
class Range;
class SharedBuffer;
class Pasteboard {
WTF_MAKE_NONCOPYABLE(Pasteboard); WTF_MAKE_FAST_ALLOCATED;
public:
#if PLATFORM(MAC)
static String getStringSelection(Frame*);
#endif
static Pasteboard* generalPasteboard();
void writePlainText(const String&);
void writeImage(Node*, Frame*);
void writePlainText(const String&, Frame*);
static NSArray* supportedPasteboardTypes();
void writeSelection(Range*, bool canSmartCopyOrDelete, Frame*);
void writeClipboard(Clipboard*);
void clear();
bool canSmartReplace();
PassRefPtr<DocumentFragment> documentFragment(Frame*, PassRefPtr<Range>, bool allowPlainText, bool& chosePlainText);
String plainText(Frame* = 0);
#if PLATFORM(QT) || PLATFORM(CHROMIUM)
bool isSelectionMode() const;
void setSelectionMode(bool selectionMode);
#endif
#if PLATFORM(GTK)
~Pasteboard();
#endif
private:
Pasteboard();
PassRefPtr<DocumentFragment> documentFragmentForPasteboardItemAtIndex(Frame*, int index, bool allowPlainText, bool& chosePlainText);
#if PLATFORM(WIN)
HWND m_owner;
#endif
#if PLATFORM(QT) || PLATFORM(CHROMIUM)
bool m_selectionMode;
#endif
#if PLATFORM(CHROMIUM)
PasteboardPrivate p;
#endif
};
}
#endif // Pasteboard_h