Browse Source

Platform: make Screen::{focus,blur}Event() optional to implement.

pull/364/head
Vladimír Vondruš 7 years ago
parent
commit
f3e0a852d5
  1. 4
      src/Magnum/Platform/Screen.h
  2. 3
      src/Magnum/Platform/ScreenedApplication.hpp

4
src/Magnum/Platform/Screen.h

@ -283,7 +283,7 @@ template<class Application> class BasicScreen:
* Called when screen is focused using @ref BasicScreenedApplication::focusScreen()
* or @ref BasicScreenedApplication::addScreen().
*/
virtual void focusEvent() = 0;
virtual void focusEvent();
/**
* @brief Blur event
@ -292,7 +292,7 @@ template<class Application> class BasicScreen:
* @ref BasicScreenedApplication::addScreen() or before the screen is
* removed from application using @ref BasicScreenedApplication::removeScreen().
*/
virtual void blurEvent() = 0;
virtual void blurEvent();
/**
* @brief Viewport event

3
src/Magnum/Platform/ScreenedApplication.hpp

@ -108,6 +108,9 @@ true>::textEditingEvent(TextEditingEvent&) {}
template<class Application> BasicScreen<Application>::BasicScreen() = default;
template<class Application> BasicScreen<Application>::~BasicScreen() = default;
template<class Application> void BasicScreen<Application>::focusEvent() {}
template<class Application> void BasicScreen<Application>::blurEvent() {}
template<class Application> void BasicScreen<Application>::viewportEvent(ViewportEvent& event) {
#ifdef MAGNUM_BUILD_DEPRECATED
CORRADE_IGNORE_DEPRECATED_PUSH

Loading…
Cancel
Save