mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Start working on a Widgets library.
This commit is contained in:
parent
a181a8f6e7
commit
8c84f9749e
18 changed files with 594 additions and 0 deletions
24
Widgets/EventLoopSDL.cpp
Normal file
24
Widgets/EventLoopSDL.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include "EventLoopSDL.h"
|
||||
#include "Event.h"
|
||||
#include <SDL.h>
|
||||
|
||||
EventLoopSDL::EventLoopSDL()
|
||||
{
|
||||
}
|
||||
|
||||
EventLoopSDL::~EventLoopSDL()
|
||||
{
|
||||
}
|
||||
|
||||
void EventLoopSDL::waitForEvent()
|
||||
{
|
||||
SDL_Event sdlEvent;
|
||||
while (SDL_WaitEvent(&sdlEvent) != 0) {
|
||||
switch (sdlEvent.type) {
|
||||
case SDL_QUIT:
|
||||
postEvent(nullptr, make<QuitEvent>());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue