2023-08-03 17:38:49 +02:00
|
|
|
#pragma once
|
|
|
|
#include <luna/LinkedList.h>
|
2023-08-14 18:15:29 +02:00
|
|
|
#include <luna/String.h>
|
2023-08-03 17:38:49 +02:00
|
|
|
#include <ui/Canvas.h>
|
|
|
|
#include <ui/Color.h>
|
|
|
|
#include <ui/Rect.h>
|
2023-09-27 18:14:32 +02:00
|
|
|
#include <ui/ipc/Server.h>
|
2023-08-03 17:38:49 +02:00
|
|
|
|
2023-08-15 11:20:17 +02:00
|
|
|
struct Client;
|
|
|
|
|
2023-08-03 17:38:49 +02:00
|
|
|
struct Window : public LinkedListNode<Window>
|
|
|
|
{
|
|
|
|
ui::Rect surface;
|
2023-08-04 16:08:58 +02:00
|
|
|
ui::Rect titlebar;
|
2023-08-14 20:08:05 +02:00
|
|
|
u32* pixels;
|
2023-08-14 18:15:29 +02:00
|
|
|
String name;
|
2023-11-22 21:29:59 +01:00
|
|
|
String shm_path;
|
2023-08-14 20:08:05 +02:00
|
|
|
bool dirty { false };
|
2023-08-15 11:20:17 +02:00
|
|
|
Client* client;
|
|
|
|
int id;
|
2024-02-04 13:35:50 +01:00
|
|
|
ui::WindowAttributes attributes { 0 };
|
2023-08-03 17:38:49 +02:00
|
|
|
|
2023-12-27 12:56:40 +01:00
|
|
|
Window(ui::Rect, String&&);
|
2023-08-14 20:08:05 +02:00
|
|
|
~Window();
|
2023-08-03 17:38:49 +02:00
|
|
|
|
|
|
|
void focus();
|
|
|
|
|
|
|
|
void draw(ui::Canvas& screen);
|
|
|
|
};
|
|
|
|
|
|
|
|
extern LinkedList<Window> g_windows;
|