2023-08-03 15:38:49 +00:00
|
|
|
#pragma once
|
|
|
|
#include <luna/LinkedList.h>
|
2024-10-26 12:00:26 +00:00
|
|
|
#include <luna/RefString.h>
|
2023-08-03 15:38:49 +00:00
|
|
|
#include <ui/Canvas.h>
|
|
|
|
#include <ui/Color.h>
|
|
|
|
#include <ui/Rect.h>
|
2023-09-27 16:14:32 +00:00
|
|
|
#include <ui/ipc/Server.h>
|
2023-08-03 15:38:49 +00:00
|
|
|
|
2023-08-15 09:20:17 +00:00
|
|
|
struct Client;
|
2024-12-13 20:53:12 +00:00
|
|
|
struct Layer;
|
2023-08-15 09:20:17 +00:00
|
|
|
|
2023-08-03 15:38:49 +00:00
|
|
|
struct Window : public LinkedListNode<Window>
|
|
|
|
{
|
|
|
|
ui::Rect surface;
|
2023-08-04 14:08:58 +00:00
|
|
|
ui::Rect titlebar;
|
2023-08-14 18:08:05 +00:00
|
|
|
u32* pixels;
|
2024-10-26 12:00:26 +00:00
|
|
|
RefString name;
|
|
|
|
RefString shm_path;
|
2023-08-14 18:08:05 +00:00
|
|
|
bool dirty { false };
|
2023-08-15 09:20:17 +00:00
|
|
|
Client* client;
|
2024-12-13 20:53:12 +00:00
|
|
|
Layer* layer;
|
2023-08-15 09:20:17 +00:00
|
|
|
int id;
|
2023-08-03 15:38:49 +00:00
|
|
|
|
2024-10-26 12:00:26 +00:00
|
|
|
Window(ui::Rect, RefString&&);
|
2023-08-14 18:08:05 +00:00
|
|
|
~Window();
|
2023-08-03 15:38:49 +00:00
|
|
|
|
|
|
|
void focus();
|
|
|
|
|
|
|
|
void draw(ui::Canvas& screen);
|
|
|
|
};
|