#ifndef DragData_h
#define DragData_h
#include "ClipboardAccessPolicy.h"
#include "Color.h"
#include "DragActions.h"
#include "IntPoint.h"
#include <wtf/Forward.h>
#include <wtf/Vector.h>
typedef void* DragDataRef;
namespace WebCore {
class Clipboard;
class Document;
class DocumentFragment;
class KURL;
#if PLATFORM(MAC)
class PasteboardHelper;
#endif
class DragData {
public:
#if PLATFORM(MAC)
DragData(DragDataRef data, const IntPoint& clientPosition, const IntPoint& globalPosition,
DragOperation operation, PasteboardHelper*);
#else
DragData(DragDataRef data, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation operation);
#endif
const IntPoint& clientPosition() const { return m_clientPosition; }
const IntPoint& globalPosition() const { return m_globalPosition; }
DragDataRef platformData() const { return m_platformDragData; }
DragOperation draggingSourceOperationMask() const { return m_draggingSourceOperationMask; }
PassRefPtr<Clipboard> createClipboard(ClipboardAccessPolicy) const;
bool containsURL() const;
bool containsPlainText() const;
bool containsCompatibleContent() const;
String asURL(String* title = 0) const;
String asPlainText() const;
void asFilenames(Vector<String>&) const;
Color asColor() const;
PassRefPtr<DocumentFragment> asFragment(Document*) const;
bool canSmartReplace() const;
bool containsColor() const;
bool containsFiles() const;
private:
IntPoint m_clientPosition;
IntPoint m_globalPosition;
DragDataRef m_platformDragData;
DragOperation m_draggingSourceOperationMask;
#if PLATFORM(MAC)
PasteboardHelper* m_pasteboardHelper;
#endif
};
}
#endif //!DragData_h