• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
3  *  Copyright (C) 2009-2010 ProFUSION embedded systems
4  *  Copyright (C) 2009-2010 Samsung Electronics
5  *
6  *  This library is free software; you can redistribute it and/or
7  *  modify it under the terms of the GNU Lesser General Public
8  *  License as published by the Free Software Foundation; either
9  *  version 2 of the License, or (at your option) any later version.
10  *
11  *  This library is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  *  Lesser General Public License for more details.
15  *
16  *  You should have received a copy of the GNU Lesser General Public
17  *  License along with this library; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19  */
20 
21 #ifndef ClipboardEfl_h
22 #define ClipboardEfl_h
23 
24 #include "Clipboard.h"
25 
26 namespace WebCore {
27 class CachedImage;
28 
29 class ClipboardEfl : public Clipboard {
30 public:
31     static PassRefPtr<ClipboardEfl> create(ClipboardAccessPolicy policy, ClipboardType clipboardType = CopyAndPaste)
32     {
33         return adoptRef(new ClipboardEfl(policy, clipboardType));
34     }
35     ~ClipboardEfl();
36 
37     void clearData(const String&);
38     void clearAllData();
39     String getData(const String&, bool&) const;
40     bool setData(const String&, const String&);
41 
42     HashSet<String> types() const;
43     virtual PassRefPtr<FileList> files() const;
44 
45     IntPoint dragLocation() const;
46     CachedImage* dragImage() const;
47     void setDragImage(CachedImage*, const IntPoint&);
48     Node* dragImageElement();
49     void setDragImageElement(Node*, const IntPoint&);
50 
51     virtual DragImageRef createDragImage(IntPoint&) const;
52     virtual void declareAndWriteDragImage(Element*, const KURL&, const String&, Frame*);
53     virtual void writeURL(const KURL&, const String&, Frame*);
54     virtual void writeRange(Range*, Frame*);
55 
56     virtual bool hasData();
57 
58     virtual void writePlainText(const WTF::String&);
59 
60 private:
61     ClipboardEfl(ClipboardAccessPolicy, ClipboardType);
62 };
63 }
64 
65 #endif
66