2023-07-21 11:59:49 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/Bindings/PlatformObject.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::Internals {
|
|
|
|
|
|
|
|
|
|
class Internals final : public Bindings::PlatformObject {
|
|
|
|
|
WEB_PLATFORM_OBJECT(Internals, Bindings::PlatformObject);
|
2023-11-19 19:47:52 +01:00
|
|
|
JS_DECLARE_ALLOCATOR(Internals);
|
2023-07-21 11:59:49 +02:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual ~Internals() override;
|
|
|
|
|
|
2023-09-14 19:17:32 +02:00
|
|
|
void signal_text_test_is_done();
|
|
|
|
|
|
2023-07-21 11:59:49 +02:00
|
|
|
void gc();
|
2023-08-08 22:44:52 +02:00
|
|
|
JS::Object* hit_test(double x, double y);
|
2023-07-21 11:59:49 +02:00
|
|
|
|
2023-11-30 12:54:30 -05:00
|
|
|
void send_text(HTML::HTMLElement&, String const&);
|
|
|
|
|
void commit_text();
|
|
|
|
|
|
2023-12-03 09:54:26 -05:00
|
|
|
void click(double x, double y);
|
2024-02-09 18:14:53 +01:00
|
|
|
void wheel(double x, double y, double delta_x, double delta_y);
|
2023-12-03 09:54:26 -05:00
|
|
|
|
2024-02-20 16:30:26 -05:00
|
|
|
bool bypass_next_transient_activation_test() const { return m_bypass_next_transient_activation_test; }
|
|
|
|
|
void set_bypass_next_transient_activation_test(bool bypass_next_transient_activation_test) { m_bypass_next_transient_activation_test = bypass_next_transient_activation_test; }
|
2023-11-10 16:19:37 -05:00
|
|
|
|
2023-07-21 11:59:49 +02:00
|
|
|
private:
|
|
|
|
|
explicit Internals(JS::Realm&);
|
2023-08-07 08:41:28 +02:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
2024-02-20 16:30:26 -05:00
|
|
|
|
|
|
|
|
bool m_bypass_next_transient_activation_test { false };
|
2023-07-21 11:59:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|