ladybird/Libraries/LibWeb/Platform/EventLoopPlugin.h
Andreas Kling 3cfc7aa629 LibWeb: Flatten Platform::EventLoopPlugin by merging Serenity impl
EventLoopPluginSerenity was the only implementation of the abstract
EventLoopPlugin base class. Its methods simply wrapped Core::EventLoop
calls with GC function unwrapping.

Remove the virtual dispatch by making EventLoopPlugin concrete and
absorbing the EventLoopPluginSerenity implementation directly.
2026-02-28 15:32:14 +01:00

27 lines
535 B
C++

/*
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
#include <LibGC/Function.h>
#include <LibWeb/Export.h>
namespace Web::Platform {
class WEB_API EventLoopPlugin {
public:
static EventLoopPlugin& the();
static void install(EventLoopPlugin&);
~EventLoopPlugin();
void spin_until(GC::Root<GC::Function<bool()>> goal_condition);
void deferred_invoke(ESCAPING GC::Root<GC::Function<void()>>);
void quit();
};
}