mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibGUI+WindowServer: Create and broadcast an event when a window moves
LibWeb's Window object will need to know the OS-level position and size of the GUI::Window for e.g. screenX, screenY, outerWidth, outerHeight. It will also need to know about changes to that data.
This commit is contained in:
parent
6b41da0b9e
commit
f7e747b68e
7 changed files with 47 additions and 0 deletions
|
@ -28,6 +28,7 @@ public:
|
|||
Paint,
|
||||
MultiPaint,
|
||||
Resize,
|
||||
Move,
|
||||
MouseMove,
|
||||
MouseDown,
|
||||
MouseDoubleClick,
|
||||
|
@ -310,6 +311,20 @@ private:
|
|||
Gfx::IntSize m_size;
|
||||
};
|
||||
|
||||
class MoveEvent final : public Event {
|
||||
public:
|
||||
explicit MoveEvent(Gfx::IntPoint const& size)
|
||||
: Event(Event::Move)
|
||||
, m_position(size)
|
||||
{
|
||||
}
|
||||
|
||||
Gfx::IntPoint const& position() const { return m_position; }
|
||||
|
||||
private:
|
||||
Gfx::IntPoint m_position;
|
||||
};
|
||||
|
||||
class ContextMenuEvent final : public Event {
|
||||
public:
|
||||
explicit ContextMenuEvent(Gfx::IntPoint const& position, Gfx::IntPoint const& screen_position)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue