1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-14 10:47:36 +00:00
serenity/Servers/WindowServer/WSEventLoop.h
Andreas Kling d6abfbdc5a LibCore: Remove ObjectPtr in favor of RefPtr
Now that CObject is fully ref-counted, just use RefPtr everywhere! :^)
2019-09-22 00:31:54 +02:00

28 lines
586 B
C++

#pragma once
#include <AK/ByteBuffer.h>
#include <LibCore/CEventLoop.h>
#include <LibCore/CLocalServer.h>
#include <LibCore/CNotifier.h>
class WSClientConnection;
struct WSAPI_ClientMessage;
class WSEventLoop {
public:
WSEventLoop();
virtual ~WSEventLoop();
int exec() { return m_event_loop.exec(); }
private:
void drain_mouse();
void drain_keyboard();
CEventLoop m_event_loop;
int m_keyboard_fd { -1 };
RefPtr<CNotifier> m_keyboard_notifier;
int m_mouse_fd { -1 };
RefPtr<CNotifier> m_mouse_notifier;
RefPtr<CLocalServer> m_server;
};