mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 10:55:07 +00:00

Introduces `internals.hitTest(x, y)` that is going to allow us write tests for hit testing :)
27 lines
527 B
C++
27 lines
527 B
C++
/*
|
|
* 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);
|
|
|
|
public:
|
|
virtual ~Internals() override;
|
|
|
|
void gc();
|
|
JS::Object* hit_test(double x, double y);
|
|
|
|
private:
|
|
explicit Internals(JS::Realm&);
|
|
virtual void initialize(JS::Realm&) override;
|
|
};
|
|
|
|
}
|