1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 10:57:35 +00:00

LibCore: Add a forward declaration header

This patch adds <LibCore/Forward.h> and uses it in various places to
shrink the header dependency graph.
This commit is contained in:
Andreas Kling 2020-02-14 22:29:06 +01:00
parent 3bbf4610d2
commit 8f7333f080
35 changed files with 143 additions and 38 deletions

View file

@ -26,23 +26,18 @@
#pragma once
#include <AK/Badge.h>
#include <AK/Forward.h>
#include <AK/HashMap.h>
#include <AK/OwnPtr.h>
#include <AK/Vector.h>
#include <AK/WeakPtr.h>
#include <LibCore/Event.h>
#include <LibCore/LocalServer.h>
#include <LibCore/Forward.h>
#include <LibCore/Object.h>
#include <LibThread/Lock.h>
#include <sys/select.h>
#include <sys/time.h>
#include <time.h>
namespace Core {
class Object;
class Notifier;
class EventLoop {
public:
EventLoop();
@ -87,6 +82,12 @@ private:
void get_next_timer_expiration(timeval&);
struct QueuedEvent {
AK_MAKE_NONCOPYABLE(QueuedEvent);
public:
QueuedEvent(Object& receiver, NonnullOwnPtr<Event>);
QueuedEvent(QueuedEvent&&);
~QueuedEvent();
WeakPtr<Object> receiver;
NonnullOwnPtr<Event> event;
};