2022-09-07 15:30:31 -03:00
|
|
|
/*
|
2024-10-04 08:19:50 -03:00
|
|
|
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
2022-09-07 15:30:31 -03:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2025-07-19 23:35:33 -03:00
|
|
|
#include <LibWeb/Export.h>
|
2022-09-07 15:30:31 -03:00
|
|
|
#include <LibWeb/Platform/EventLoopPlugin.h>
|
|
|
|
|
|
2022-09-21 15:33:57 -03:00
|
|
|
namespace Web::Platform {
|
2022-09-07 15:30:31 -03:00
|
|
|
|
2025-07-19 23:35:33 -03:00
|
|
|
class WEB_API EventLoopPluginSerenity final : public Web::Platform::EventLoopPlugin {
|
2022-09-07 15:30:31 -03:00
|
|
|
public:
|
|
|
|
|
EventLoopPluginSerenity();
|
|
|
|
|
virtual ~EventLoopPluginSerenity() override;
|
|
|
|
|
|
2024-11-14 12:01:23 -03: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 05:54:52 -03:00
|
|
|
virtual void quit() override;
|
2022-09-07 15:30:31 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|