MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _processSDLEvent

Method _processSDLEvent

Engine/source/windowManager/sdl/sdlWindow.cpp:600–687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598}
599
600void PlatformWindowSDL::_processSDLEvent(SDL_Event &evt)
601{
602 switch(evt.type)
603 {
604 case SDL_KEYDOWN:
605 case SDL_KEYUP:
606 {
607 _triggerKeyNotify(evt);
608 break;
609 }
610
611 case SDL_TEXTINPUT:
612 {
613 _triggerTextNotify(evt);
614 break;
615 }
616
617 case SDL_MOUSEWHEEL:
618 {
619 _triggerMouseWheelNotify(evt);
620 break;
621 }
622
623 case SDL_MOUSEMOTION:
624 {
625 _triggerMouseLocationNotify(evt);
626 break;
627 }
628 case SDL_MOUSEBUTTONDOWN:
629 case SDL_MOUSEBUTTONUP:
630 {
631 _triggerMouseButtonNotify(evt);
632 break;
633 }
634
635 case SDL_WINDOWEVENT:
636 {
637 if (!mClosing)
638 {
639 switch (evt.window.event)
640 {
641 case SDL_WINDOWEVENT_FOCUS_GAINED:
642 appEvent.trigger(getWindowId(), GainFocus);
643 break;
644 case SDL_WINDOWEVENT_FOCUS_LOST:
645 appEvent.trigger(getWindowId(), LoseFocus);
646 break;
647 case SDL_WINDOWEVENT_MOVED:
648 {
649 S32 oldDisplay = Con::getIntVariable("pref::Video::deviceId", 0);
650 _updateMonitorFromMove(evt);
651 // If display device has changed, make sure window params are compatible with the new device.
652 if (oldDisplay != Con::getIntVariable("pref::Video::deviceId", 0))
653 Con::evaluate("configureCanvas();");
654 break;
655 }
656 case SDL_WINDOWEVENT_RESIZED:
657 {

Callers 1

_processMethod · 0.80

Calls 7

getIntVariableFunction · 0.85
evaluateFunction · 0.85
SDL_GetWindowSizeFunction · 0.85
setBoolVariableFunction · 0.85
triggerMethod · 0.45
setMethod · 0.45
resetModeMethod · 0.45

Tested by

no test coverage detected