2022-09-07 20:30:31 +02:00
|
|
|
/*
|
2024-10-04 13:19:50 +02:00
|
|
|
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
2022-09-07 20:30:31 +02:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2025-07-19 19:35:33 -07:00
|
|
|
#include <LibWeb/Export.h>
|
2022-09-07 20:30:31 +02:00
|
|
|
#include <LibWeb/Platform/EventLoopPlugin.h>
|
|
|
|
|
2022-09-21 19:33:57 +01:00
|
|
|
namespace Web::Platform {
|
2022-09-07 20:30:31 +02:00
|
|
|
|
2025-07-19 19:35:33 -07:00
|
|
|
class WEB_API EventLoopPluginSerenity final : public Web::Platform::EventLoopPlugin {
|
2022-09-07 20:30:31 +02:00
|
|
|
public:
|
|
|
|
EventLoopPluginSerenity();
|
|
|
|
virtual ~EventLoopPluginSerenity() override;
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
virtual void spin_until(GC::Root<GC::Function<bool()>> goal_condition) override;
|
|
|
|
virtual void deferred_invoke(GC::Root<GC::Function<void()>>) override;
|
|
|
|
virtual GC::Ref<Timer> create_timer(GC::Heap&) override;
|
2022-10-08 10:54:52 +02:00
|
|
|
virtual void quit() override;
|
2022-09-07 20:30:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|