Browse Source

Platform: replace mouse events with pointer events in ScreenedApp.

Because this overrides the base pointer*Event() implementations, it
additionally has to call into the parent implementation in order to fall
back to the deprecated mouse event if the new pointer event isn't
handled.
pull/651/head
Vladimír Vondruš 2 years ago
parent
commit
fc80172148
  1. 6
      doc/changelog.dox
  2. 10
      doc/snippets/Platform.cpp
  3. 6
      src/Magnum/Platform/AbstractXApplication.h
  4. 6
      src/Magnum/Platform/AndroidApplication.h
  5. 6
      src/Magnum/Platform/EmscriptenApplication.h
  6. 10
      src/Magnum/Platform/GlfwApplication.cpp
  7. 6
      src/Magnum/Platform/GlfwApplication.h
  8. 111
      src/Magnum/Platform/Screen.h
  9. 23
      src/Magnum/Platform/ScreenedApplication.h
  10. 69
      src/Magnum/Platform/ScreenedApplication.hpp
  11. 11
      src/Magnum/Platform/Sdl2Application.cpp
  12. 6
      src/Magnum/Platform/Sdl2Application.h

6
doc/changelog.dox

@ -1399,8 +1399,10 @@ See also:
@relativeref{Platform::Sdl2Application,PointerMoveEvent} APIs that provide @relativeref{Platform::Sdl2Application,PointerMoveEvent} APIs that provide
a better abstraction over general pointer input, not just a mouse alone. a better abstraction over general pointer input, not just a mouse alone.
The same change is done in @ref Platform::AbstractXApplication, The same change is done in @ref Platform::AbstractXApplication,
@ref Platform::AndroidApplication, @ref Platform::EmscriptenApplication and @ref Platform::AndroidApplication, @ref Platform::EmscriptenApplication,
@ref Platform::GlfwApplication. @ref Platform::GlfwApplication and the
@ref Platform::BasicScreenedApplication / @ref Platform::BasicScreen
wrappers as well.
- @cpp Platform::AbstractXApplication::MouseEvent::Button::WheelUp @ce and - @cpp Platform::AbstractXApplication::MouseEvent::Button::WheelUp @ce and
`WheelDown` members are deprecated in favor of a dedicated `WheelDown` members are deprecated in favor of a dedicated
@ref Platform::AbstractXApplication::mouseScrollEvent(). Similar change was @ref Platform::AbstractXApplication::mouseScrollEvent(). Similar change was

10
doc/snippets/Platform.cpp

@ -163,6 +163,13 @@ MyApplication::MyApplication(const Arguments& arguments):
namespace F { namespace F {
/* On MSVC 2017, deprecation warning suppression doesn't work on virtual
function overrides, so ScreenedApplication overriding mousePressEvent(),
mouseReleaseEvent() mouseMoveEvent() and mouseScrollEvent() causes warnings.
Disable them at a higher level instead. */
#if defined(MAGNUM_BUILD_DEPRECATED) && defined(CORRADE_TARGET_MSVC) && !defined(CORRADE_TARGET_CLANG) && _MSC_VER < 1920
CORRADE_IGNORE_DEPRECATED_PUSH
#endif
int argc = 0; int argc = 0;
struct MyApplication: Platform::ScreenedApplication { struct MyApplication: Platform::ScreenedApplication {
MyApplication(): Platform::ScreenedApplication{Arguments{argc, nullptr}} {} MyApplication(): Platform::ScreenedApplication{Arguments{argc, nullptr}} {}
@ -170,6 +177,9 @@ struct MyApplication: Platform::ScreenedApplication {
void globalViewportEvent(ViewportEvent& event) override; void globalViewportEvent(ViewportEvent& event) override;
void globalDrawEvent() override; void globalDrawEvent() override;
}; };
#if defined(MAGNUM_BUILD_DEPRECATED) && defined(CORRADE_TARGET_MSVC) && !defined(CORRADE_TARGET_CLANG) && _MSC_VER < 1920
CORRADE_IGNORE_DEPRECATED_POP
#endif
/* [ScreenedApplication-global-events] */ /* [ScreenedApplication-global-events] */
void MyApplication::globalViewportEvent(ViewportEvent& event) { void MyApplication::globalViewportEvent(ViewportEvent& event) {

6
src/Magnum/Platform/AbstractXApplication.h

@ -421,6 +421,12 @@ class AbstractXApplication {
explicit AbstractXApplication(Implementation::AbstractContextHandler<GLConfiguration, Display*, VisualID, Window>* contextHandler, const Arguments& arguments, NoCreateT); explicit AbstractXApplication(Implementation::AbstractContextHandler<GLConfiguration, Display*, VisualID, Window>* contextHandler, const Arguments& arguments, NoCreateT);
private: private:
#ifdef MAGNUM_BUILD_DEPRECATED
/* Calls the base pointer*Event() in order to delegate to deprecated
mouse events */
template<class> friend class BasicScreenedApplication;
#endif
enum class Flag: unsigned int { enum class Flag: unsigned int {
Redraw = 1 << 0, Redraw = 1 << 0,
Exit = 1 << 1 Exit = 1 << 1

6
src/Magnum/Platform/AndroidApplication.h

@ -495,6 +495,12 @@ class AndroidApplication {
*/ */
private: private:
#ifdef MAGNUM_BUILD_DEPRECATED
/* Calls the base pointer*Event() in order to delegate to deprecated
mouse events */
template<class> friend class BasicScreenedApplication;
#endif
struct LogOutput; struct LogOutput;
enum class Flag: UnsignedByte; enum class Flag: UnsignedByte;

6
src/Magnum/Platform/EmscriptenApplication.h

@ -980,6 +980,12 @@ class EmscriptenApplication {
*/ */
private: private:
#ifdef MAGNUM_BUILD_DEPRECATED
/* Calls the base pointer*Event() in order to delegate to deprecated
mouse events */
template<class> friend class BasicScreenedApplication;
#endif
enum class Flag: UnsignedByte; enum class Flag: UnsignedByte;
typedef Containers::EnumSet<Flag> Flags; typedef Containers::EnumSet<Flag> Flags;
CORRADE_ENUMSET_FRIEND_OPERATORS(Flags) CORRADE_ENUMSET_FRIEND_OPERATORS(Flags)

10
src/Magnum/Platform/GlfwApplication.cpp

@ -1168,7 +1168,17 @@ auto GlfwApplication::MouseScrollEvent::modifiers() -> Modifiers {
return *_modifiers; return *_modifiers;
} }
/* On MSVC 2017, deprecation warning suppression doesn't work on virtual
function overrides, so ScreenedApplication overriding mousePressEvent(),
mouseReleaseEvent(), and mouseMoveEvent() causes warnings. Disable them at a
higher level instead. */
#if defined(MAGNUM_BUILD_DEPRECATED) && defined(CORRADE_TARGET_MSVC) && !defined(CORRADE_TARGET_CLANG) && _MSC_VER < 1920
CORRADE_IGNORE_DEPRECATED_PUSH
#endif
template class BasicScreen<GlfwApplication>; template class BasicScreen<GlfwApplication>;
template class BasicScreenedApplication<GlfwApplication>; template class BasicScreenedApplication<GlfwApplication>;
#if defined(MAGNUM_BUILD_DEPRECATED) && defined(CORRADE_TARGET_MSVC) && !defined(CORRADE_TARGET_CLANG) && _MSC_VER < 1920
CORRADE_IGNORE_DEPRECATED_POP
#endif
}} }}

6
src/Magnum/Platform/GlfwApplication.h

@ -866,6 +866,12 @@ class GlfwApplication {
virtual void tickEvent(); virtual void tickEvent();
private: private:
#ifdef MAGNUM_BUILD_DEPRECATED
/* Calls the base pointer*Event() in order to delegate to deprecated
mouse events */
template<class> friend class BasicScreenedApplication;
#endif
enum class Flag: UnsignedByte; enum class Flag: UnsignedByte;
typedef Containers::EnumSet<Flag> Flags; typedef Containers::EnumSet<Flag> Flags;
CORRADE_ENUMSET_FRIEND_OPERATORS(Flags) CORRADE_ENUMSET_FRIEND_OPERATORS(Flags)

111
src/Magnum/Platform/Screen.h

@ -146,8 +146,8 @@ template<class Application> class BasicScreen:
* Input events. * Input events.
* *
* When enabled, @ref keyPressEvent(), @ref keyReleaseEvent(), * When enabled, @ref keyPressEvent(), @ref keyReleaseEvent(),
* @ref mousePressEvent(), @ref mouseReleaseEvent(), * @ref pointerPressEvent(), @ref pointerReleaseEvent(),
* @ref mouseMoveEvent(), @ref mouseScrollEvent(), * @ref pointerMoveEvent(), @ref mouseScrollEvent(),
* @ref textInputEvent() and @ref textEditingEvent() are propagated * @ref textInputEvent() and @ref textEditingEvent() are propagated
* to this screen. * to this screen.
*/ */
@ -181,11 +181,52 @@ template<class Application> class BasicScreen:
typedef typename BasicScreenedApplication<Application>::KeyEvent KeyEvent; typedef typename BasicScreenedApplication<Application>::KeyEvent KeyEvent;
#endif #endif
/** @brief Mouse event */ /**
typedef typename BasicScreenedApplication<Application>::MouseEvent MouseEvent; * @brief Pointer type
* @m_since_latest
*/
typedef typename BasicScreenedApplication<Application>::Pointer Pointer;
/**
* @brief Set of pointer types
* @m_since_latest
*/
typedef typename BasicScreenedApplication<Application>::Pointers Pointers;
/**
* @brief Pointer event
* @m_since_latest
*/
typedef typename BasicScreenedApplication<Application>::PointerEvent PointerEvent;
/**
* @brief Pointer move event
* @m_since_latest
*/
typedef typename BasicScreenedApplication<Application>::PointerMoveEvent PointerMoveEvent;
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief Mouse event
* @m_deprecated_since_latest Use @ref PointerEvent,
* @ref pointerPressEvent() and @ref pointerReleaseEvent()
* instead, which is a better abstraction for covering both mouse
* and touch / pen input.
*/
CORRADE_IGNORE_DEPRECATED_PUSH
typedef CORRADE_DEPRECATED("use PointerEvent, pointerPressEvent() and pointerReleaseEvent() instead") typename BasicScreenedApplication<Application>::MouseEvent MouseEvent;
CORRADE_IGNORE_DEPRECATED_POP
/** @brief Mouse move event */ /**
typedef typename BasicScreenedApplication<Application>::MouseMoveEvent MouseMoveEvent; * @brief Mouse move event
* @m_deprecated_since_latest Use @ref PointerMoveEvent and
* @ref pointerMoveEvent() instead, which is a better abstraction
* for covering both mouse and touch / pen input.
*/
CORRADE_IGNORE_DEPRECATED_PUSH
typedef CORRADE_DEPRECATED("use PointerMoveEvent and pointerMoveEvent() instead") typename BasicScreenedApplication<Application>::MouseMoveEvent MouseMoveEvent;
CORRADE_IGNORE_DEPRECATED_POP
#endif
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
/** /**
@ -401,34 +442,84 @@ template<class Application> class BasicScreen:
* @} * @}
*/ */
/** @{ @name Mouse handling */ /** @{ @name Pointer handling */
/**
* @brief Pointer press event
* @m_since_latest
*
* Called when @ref PropagatedEvent::Input is enabled and a pointer is
* pressed. See @ref Sdl2Application::pointerPressEvent() "*Application::pointerPressEvent()"
* for more information.
*/
virtual void pointerPressEvent(PointerEvent& event);
#ifdef MAGNUM_BUILD_DEPRECATED
/** /**
* @brief Mouse press event * @brief Mouse press event
* @m_deprecated_since_latest Use @ref pointerPressEvent() instead,
* which is a better abstraction for covering both mouse and touch
* / pen input.
* *
* Called when @ref PropagatedEvent::Input is enabled and mouse button * Called when @ref PropagatedEvent::Input is enabled and mouse button
* is pressed. See @ref Sdl2Application::mousePressEvent() "*Application::mousePressEvent()" * is pressed. See @ref Sdl2Application::mousePressEvent() "*Application::mousePressEvent()"
* for more information. * for more information.
*/ */
virtual void mousePressEvent(MouseEvent& event); CORRADE_IGNORE_DEPRECATED_PUSH
virtual CORRADE_DEPRECATED("use pointerPressEvent() instead") void mousePressEvent(MouseEvent& event);
CORRADE_IGNORE_DEPRECATED_POP
#endif
/**
* @brief Pointer release event
* @m_since_latest
*
* Called when @ref PropagatedEvent::Input is enabled and a pointer is
* released. See @ref Sdl2Application::pointerReleaseEvent() "*Application::pointerReleaseEvent()"
* for more information.
*/
virtual void pointerReleaseEvent(PointerEvent& event);
#ifdef MAGNUM_BUILD_DEPRECATED
/** /**
* @brief Mouse release event * @brief Mouse release event
* @m_deprecated_since_latest Use @ref pointerReleaseEvent() instead,
* which is a better abstraction for covering both mouse and touch
* / pen input.
* *
* Called when @ref PropagatedEvent::Input is enabled and mouse button * Called when @ref PropagatedEvent::Input is enabled and mouse button
* is released. See @ref Sdl2Application::mouseReleaseEvent() "*Application::mouseReleaseEvent()" * is released. See @ref Sdl2Application::mouseReleaseEvent() "*Application::mouseReleaseEvent()"
* for more information. * for more information.
*/ */
virtual void mouseReleaseEvent(MouseEvent& event); CORRADE_IGNORE_DEPRECATED_PUSH
virtual CORRADE_DEPRECATED("use pointerReleaseEvent() instead") void mouseReleaseEvent(MouseEvent& event);
CORRADE_IGNORE_DEPRECATED_POP
#endif
/**
* @brief Pointer move event
*
* Called when @ref PropagatedEvent::Input is enabled and a pointer is
* moved. See @ref Sdl2Application::pointerMoveEvent() "*Application::pointerMoveEvent()"
* for more information.
*/
virtual void pointerMoveEvent(PointerMoveEvent& event);
#ifdef MAGNUM_BUILD_DEPRECATED
/** /**
* @brief Mouse move event * @brief Mouse move event
* @m_deprecated_since_latest Use @ref pointerMoveEvent() instead,
* which is a better abstraction for covering both mouse and touch
* / pen input.
* *
* Called when @ref PropagatedEvent::Input is enabled and mouse is * Called when @ref PropagatedEvent::Input is enabled and mouse is
* moved. See @ref Sdl2Application::mouseMoveEvent() "*Application::mouseMoveEvent()" * moved. See @ref Sdl2Application::mouseMoveEvent() "*Application::mouseMoveEvent()"
* for more information. * for more information.
*/ */
virtual void mouseMoveEvent(MouseMoveEvent& event); CORRADE_IGNORE_DEPRECATED_PUSH
virtual CORRADE_DEPRECATED("use pointerMoveEvent() instead") void mouseMoveEvent(MouseMoveEvent& event);
CORRADE_IGNORE_DEPRECATED_POP
#endif
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
/** /**

23
src/Magnum/Platform/ScreenedApplication.h

@ -122,14 +122,14 @@ event, they are propagated to the screens:
- @ref Sdl2Application::drawEvent() "drawEvent()" is propagated in - @ref Sdl2Application::drawEvent() "drawEvent()" is propagated in
back-to-front order to screens which have @ref BasicScreen::PropagatedEvent::Draw back-to-front order to screens which have @ref BasicScreen::PropagatedEvent::Draw
enabled. enabled.
- Input events (@ref Sdl2Application::keyPressEvent() "keyPressEvent()", - Input events (@relativeref{Sdl2Application,keyPressEvent()},
@ref Sdl2Application::keyReleaseEvent() "keyReleaseEvent()", @relativeref{Sdl2Application,keyReleaseEvent()},
@ref Sdl2Application::mousePressEvent() "mousePressEvent()", @relativeref{Sdl2Application,pointerPressEvent()},
@ref Sdl2Application::mouseReleaseEvent() "mouseReleaseEvent()", @relativeref{Sdl2Application,pointerReleaseEvent()},
@ref Sdl2Application::mouseMoveEvent() "mouseMoveEvent()", @relativeref{Sdl2Application,pointerMoveEvent()},
@ref Sdl2Application::mouseMoveEvent() "mouseScrollEvent()", @relativeref{Sdl2Application,mouseScrollEvent()},
@ref Sdl2Application::textInputEvent() "textInputEvent()" and @relativeref{Sdl2Application,textInputEvent()} and
@ref Sdl2Application::textEditingEvent() "textEditingEvent()") @relativeref{Sdl2Application,textEditingEvent()})
are propagated in front-to-back order to screens which have are propagated in front-to-back order to screens which have
@ref BasicScreen::PropagatedEvent::Input enabled. If any screen sets the @ref BasicScreen::PropagatedEvent::Input enabled. If any screen sets the
event as accepted, it is not propagated further. event as accepted, it is not propagated further.
@ -324,9 +324,16 @@ template<class Application> class BasicScreenedApplication:
implementations are dispatching the events to attached screens. */ implementations are dispatching the events to attached screens. */
void viewportEvent(typename Application::ViewportEvent& event) override final; void viewportEvent(typename Application::ViewportEvent& event) override final;
void drawEvent() override final; void drawEvent() override final;
void pointerPressEvent(typename Application::PointerEvent& event) override final;
void pointerReleaseEvent(typename Application::PointerEvent& event) override final;
void pointerMoveEvent(typename Application::PointerMoveEvent& event) override final;
#ifdef MAGNUM_BUILD_DEPRECATED
CORRADE_IGNORE_DEPRECATED_PUSH
void mousePressEvent(typename Application::MouseEvent& event) override final; void mousePressEvent(typename Application::MouseEvent& event) override final;
void mouseReleaseEvent(typename Application::MouseEvent& event) override final; void mouseReleaseEvent(typename Application::MouseEvent& event) override final;
void mouseMoveEvent(typename Application::MouseMoveEvent& event) override final; void mouseMoveEvent(typename Application::MouseMoveEvent& event) override final;
CORRADE_IGNORE_DEPRECATED_POP
#endif
/* These events are not available in all cases, so if the Application /* These events are not available in all cases, so if the Application
doesn't have them, they're overriding a mixin dummy */ doesn't have them, they're overriding a mixin dummy */

69
src/Magnum/Platform/ScreenedApplication.hpp

@ -143,9 +143,17 @@ template<class Application> void BasicScreen<Application>::viewportEvent(Viewpor
static_cast<void>(event); static_cast<void>(event);
} }
template<class Application> void BasicScreen<Application>::pointerPressEvent(PointerEvent&) {}
template<class Application> void BasicScreen<Application>::pointerReleaseEvent(PointerEvent&) {}
template<class Application> void BasicScreen<Application>::pointerMoveEvent(PointerMoveEvent&) {}
#ifdef MAGNUM_BUILD_DEPRECATED
CORRADE_IGNORE_DEPRECATED_PUSH
template<class Application> void BasicScreen<Application>::mousePressEvent(MouseEvent&) {} template<class Application> void BasicScreen<Application>::mousePressEvent(MouseEvent&) {}
template<class Application> void BasicScreen<Application>::mouseReleaseEvent(MouseEvent&) {} template<class Application> void BasicScreen<Application>::mouseReleaseEvent(MouseEvent&) {}
template<class Application> void BasicScreen<Application>::mouseMoveEvent(MouseMoveEvent&) {} template<class Application> void BasicScreen<Application>::mouseMoveEvent(MouseMoveEvent&) {}
CORRADE_IGNORE_DEPRECATED_POP
#endif
#ifdef MAGNUM_TARGET_GL #ifdef MAGNUM_TARGET_GL
template<class Application> BasicScreenedApplication<Application>::BasicScreenedApplication(const typename Application::Arguments& arguments, const typename Application::Configuration& configuration, const typename Application::GLConfiguration& glConfiguration): Application(arguments, configuration, glConfiguration) {} template<class Application> BasicScreenedApplication<Application>::BasicScreenedApplication(const typename Application::Arguments& arguments, const typename Application::Configuration& configuration, const typename Application::GLConfiguration& glConfiguration): Application(arguments, configuration, glConfiguration) {}
@ -225,6 +233,65 @@ template<class Application> void BasicScreenedApplication<Application>::keyRelea
this->callKeyReleaseEvent(event, screens()); this->callKeyReleaseEvent(event, screens());
} }
template<class Application> void BasicScreenedApplication<Application>::pointerPressEvent(typename Application::PointerEvent& event) {
/* Front-to-back event propagation, stop when the event gets accepted */
for(BasicScreen<Application>* s = screens().first(); s; s = s->nextFartherScreen()) {
if(s->propagatedEvents() & Implementation::PropagatedScreenEvent::Input) {
s->pointerPressEvent(event);
if(event.isAccepted()) break;
}
}
#ifdef MAGNUM_BUILD_DEPRECATED
/* If the event wasn't accepted, it's possible that the screens still only
implement the deprecated mouse events. Call into the base
implementation and assume it appropriately delegates to
mousePressEvent(). */
if(!event.isAccepted())
Application::pointerPressEvent(event);
#endif
}
template<class Application> void BasicScreenedApplication<Application>::pointerReleaseEvent(typename Application::PointerEvent& event) {
/* Front-to-back event propagation, stop when the event gets accepted */
for(BasicScreen<Application>* s = screens().first(); s; s = s->nextFartherScreen()) {
if(s->propagatedEvents() & Implementation::PropagatedScreenEvent::Input) {
s->pointerReleaseEvent(event);
if(event.isAccepted()) break;
}
}
#ifdef MAGNUM_BUILD_DEPRECATED
/* If the event wasn't accepted, it's possible that the screens still only
implement the deprecated mouse events. Call into the base
implementation and assume it appropriately delegates to
mouseReleaseEvent(). */
if(!event.isAccepted())
Application::pointerReleaseEvent(event);
#endif
}
template<class Application> void BasicScreenedApplication<Application>::pointerMoveEvent(typename Application::PointerMoveEvent& event) {
/* Front-to-back event propagation, stop when the event gets accepted */
for(BasicScreen<Application>* s = screens().first(); s; s = s->nextFartherScreen()) {
if(s->propagatedEvents() & Implementation::PropagatedScreenEvent::Input) {
s->pointerMoveEvent(event);
if(event.isAccepted()) break;
}
}
#ifdef MAGNUM_BUILD_DEPRECATED
/* If the event wasn't accepted, it's possible that the screens still only
implement the deprecated mouse events. Call into the base
implementation and assume it appropriately delegates to
mouseMoveEvent(), mousePressEvent() or mouseReleaseEvent(). */
if(!event.isAccepted())
Application::pointerMoveEvent(event);
#endif
}
#ifdef MAGNUM_BUILD_DEPRECATED
CORRADE_IGNORE_DEPRECATED_PUSH
template<class Application> void BasicScreenedApplication<Application>::mousePressEvent(typename Application::MouseEvent& event) { template<class Application> void BasicScreenedApplication<Application>::mousePressEvent(typename Application::MouseEvent& event) {
/* Front-to-back event propagation, stop when the event gets accepted */ /* Front-to-back event propagation, stop when the event gets accepted */
for(BasicScreen<Application>* s = screens().first(); s; s = s->nextFartherScreen()) { for(BasicScreen<Application>* s = screens().first(); s; s = s->nextFartherScreen()) {
@ -254,6 +321,8 @@ template<class Application> void BasicScreenedApplication<Application>::mouseMov
} }
} }
} }
CORRADE_IGNORE_DEPRECATED_POP
#endif
template<class Application> void BasicScreenedApplication<Application>::mouseScrollEvent(typename BasicScreenedApplication<Application>::MouseScrollEvent& event) { template<class Application> void BasicScreenedApplication<Application>::mouseScrollEvent(typename BasicScreenedApplication<Application>::MouseScrollEvent& event) {
this->callMouseScrollEvent(event, screens()); this->callMouseScrollEvent(event, screens());

11
src/Magnum/Platform/Sdl2Application.cpp

@ -1485,7 +1485,18 @@ Sdl2Application::InputEvent::Modifiers Sdl2Application::MouseScrollEvent::modifi
return *(_modifiers = fixedModifiers(Uint16(SDL_GetModState()))); return *(_modifiers = fixedModifiers(Uint16(SDL_GetModState())));
} }
/* WinRT builds by default have deprecation warnings as errors. Combined with a
MSVC 2017 bug where deprecation warning suppression doesn't work on virtual
function overrides this make the build fail on deprecation warnings due to
ScreenedApplication overriding mousePressEvent(), mouseReleaseEvent() and
mouseMoveEvent(). Disable the warnings at a higher level instead. */
#if defined(MAGNUM_BUILD_DEPRECATED) && defined(CORRADE_TARGET_MSVC) && !defined(CORRADE_TARGET_CLANG) && _MSC_VER < 1920
CORRADE_IGNORE_DEPRECATED_PUSH
#endif
template class BasicScreen<Sdl2Application>; template class BasicScreen<Sdl2Application>;
template class BasicScreenedApplication<Sdl2Application>; template class BasicScreenedApplication<Sdl2Application>;
#if defined(MAGNUM_BUILD_DEPRECATED) && defined(CORRADE_TARGET_MSVC) && !defined(CORRADE_TARGET_CLANG) && _MSC_VER < 1920
CORRADE_IGNORE_DEPRECATED_POP
#endif
}} }}

6
src/Magnum/Platform/Sdl2Application.h

@ -1323,6 +1323,12 @@ class Sdl2Application {
*/ */
private: private:
#ifdef MAGNUM_BUILD_DEPRECATED
/* Calls the base pointer*Event() in order to delegate to deprecated
mouse events */
template<class> friend class BasicScreenedApplication;
#endif
enum class Flag: UnsignedByte; enum class Flag: UnsignedByte;
typedef Containers::EnumSet<Flag> Flags; typedef Containers::EnumSet<Flag> Flags;
CORRADE_ENUMSET_FRIEND_OPERATORS(Flags) CORRADE_ENUMSET_FRIEND_OPERATORS(Flags)

Loading…
Cancel
Save