From 05b3e8cdc7f6cf7056c96d9cd150a0e2a8fb85a4 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 28 Oct 2016 17:55:06 +0200 Subject: Rewrite event handler to use shared_ptr Events instead of raw pointers. --- plugingui/nativewindow.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugingui/nativewindow.h') diff --git a/plugingui/nativewindow.h b/plugingui/nativewindow.h index a7d101e..ff24fed 100644 --- a/plugingui/nativewindow.h +++ b/plugingui/nativewindow.h @@ -27,6 +27,7 @@ #pragma once #include +#include #include "guievent.h" @@ -74,11 +75,11 @@ public: //! \brief Read a single event from the event queue. //! \return A pointer to the event or nullptr is none exists. - virtual Event *getNextEvent() = 0; + virtual std::shared_ptr getNextEvent() = 0; //! \brief Read next event without popping it from the event queue. //! \return A pointer to the event or nullptr is none exists. - virtual Event* peekNextEvent() = 0; + virtual std::shared_ptr peekNextEvent() = 0; }; } // GUI:: -- cgit v1.2.3