/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "ClientConnection.h" #include "WMClientConnection.h" #include #include #include #include namespace WindowServer { class ClientConnection; class EventLoop { public: EventLoop(); virtual ~EventLoop(); int exec() { return m_event_loop.exec(); } private: void drain_mouse(); void drain_keyboard(); Core::EventLoop m_event_loop; int m_keyboard_fd { -1 }; RefPtr m_keyboard_notifier; int m_mouse_fd { -1 }; RefPtr m_mouse_notifier; OwnPtr> m_window_server; OwnPtr> m_wm_server; }; }