2022-06-04 04:18:32 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
|
2022-08-08 22:29:40 +02:00
|
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
2022-06-04 04:18:32 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/DOM/Event.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::WebGL {
|
|
|
|
|
|
|
|
|
|
struct WebGLContextEventInit final : public DOM::EventInit {
|
2022-12-04 18:02:33 +00:00
|
|
|
DeprecatedString status_message { DeprecatedString::empty() };
|
2022-06-04 04:18:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class WebGLContextEvent final : public DOM::Event {
|
2022-08-28 13:42:07 +02:00
|
|
|
WEB_PLATFORM_OBJECT(WebGLContextEvent, DOM::Event);
|
2022-08-08 22:29:40 +02:00
|
|
|
|
2022-06-04 04:18:32 +01:00
|
|
|
public:
|
2023-02-19 16:35:16 +01:00
|
|
|
static WebIDL::ExceptionOr<JS::NonnullGCPtr<WebGLContextEvent>> create(JS::Realm&, DeprecatedFlyString const& type, WebGLContextEventInit const& event_init);
|
|
|
|
|
static WebIDL::ExceptionOr<JS::NonnullGCPtr<WebGLContextEvent>> construct_impl(JS::Realm&, DeprecatedFlyString const& type, WebGLContextEventInit const& event_init);
|
2022-06-04 04:18:32 +01:00
|
|
|
|
2022-08-08 22:29:40 +02:00
|
|
|
virtual ~WebGLContextEvent() override;
|
2022-06-04 04:18:32 +01:00
|
|
|
|
2022-12-04 18:02:33 +00:00
|
|
|
DeprecatedString const& status_message() const { return m_status_message; }
|
2022-06-04 04:18:32 +01:00
|
|
|
|
|
|
|
|
private:
|
2023-01-08 19:23:00 -05:00
|
|
|
WebGLContextEvent(JS::Realm&, DeprecatedFlyString const& type, WebGLContextEventInit const& event_init);
|
2022-09-25 18:12:50 -06:00
|
|
|
|
2023-01-28 12:33:35 -05:00
|
|
|
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
2023-01-10 06:28:20 -05:00
|
|
|
|
2022-12-04 18:02:33 +00:00
|
|
|
DeprecatedString m_status_message { DeprecatedString::empty() };
|
2022-06-04 04:18:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|