ladybird/Userland/Libraries/LibWeb/Platform/EventLoopPluginSerenity.h
Andreas Kling 829186af7d LibWeb+WebContent: Add EventLoopPlugin::quit() virtual
This allows you to customize breaking out of the system event loop.
2022-10-08 10:54:52 +02:00

24 lines
596 B
C++

/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Platform/EventLoopPlugin.h>
namespace Web::Platform {
class EventLoopPluginSerenity final : public Web::Platform::EventLoopPlugin {
public:
EventLoopPluginSerenity();
virtual ~EventLoopPluginSerenity() override;
virtual void spin_until(Function<bool()> goal_condition) override;
virtual void deferred_invoke(Function<void()>) override;
virtual NonnullRefPtr<Timer> create_timer() override;
virtual void quit() override;
};
}