summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/Event.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-14 13:18:34 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-14 13:18:59 +0100
commit814d59f462cfbcce14b16703a4933ea088800e69 (patch)
treed85a86b8afa30027030104878ceb9e5b8485777b /Libraries/LibGUI/Event.h
parent3cba9c3c251145181c9bf9590cf6c9a6250b7edb (diff)
downloadserenity-814d59f462cfbcce14b16703a4933ea088800e69.zip
LibGUI: Port the drag&drop code to Core::MimeData
Diffstat (limited to 'Libraries/LibGUI/Event.h')
-rw-r--r--Libraries/LibGUI/Event.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/Libraries/LibGUI/Event.h b/Libraries/LibGUI/Event.h
index c518a694a1..17e71783a0 100644
--- a/Libraries/LibGUI/Event.h
+++ b/Libraries/LibGUI/Event.h
@@ -32,6 +32,10 @@
#include <LibGfx/Rect.h>
#include <LibGUI/WindowType.h>
+namespace Core {
+class MimeData;
+}
+
namespace GUI {
class Event : public Core::Event {
@@ -326,25 +330,18 @@ private:
class DropEvent final : public Event {
public:
- DropEvent(const Gfx::Point& position, const String& text, const String& data_type, const String& data)
- : Event(Event::Drop)
- , m_position(position)
- , m_text(text)
- , m_data_type(data_type)
- , m_data(data)
- {
- }
+ DropEvent(const Gfx::Point&, const String& text, NonnullRefPtr<Core::MimeData> mime_data);
+
+ ~DropEvent();
const Gfx::Point& position() const { return m_position; }
const String& text() const { return m_text; }
- const String& data_type() const { return m_data_type; }
- const String& data() const { return m_data; }
+ const Core::MimeData& mime_data() const { return m_mime_data; }
private:
Gfx::Point m_position;
String m_text;
- String m_data_type;
- String m_data;
+ NonnullRefPtr<Core::MimeData> m_mime_data;
};
}