2023-08-03 15:38:49 +00:00
|
|
|
#pragma once
|
|
|
|
#include <luna/LinkedList.h>
|
2023-08-14 16:15:29 +00:00
|
|
|
#include <luna/String.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;
|
|
|
|
|
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;
|
2023-08-14 16:15:29 +00:00
|
|
|
String name;
|
2023-11-22 20:29:59 +00:00
|
|
|
String shm_path;
|
2023-08-14 18:08:05 +00:00
|
|
|
bool dirty { false };
|
2023-08-15 09:20:17 +00:00
|
|
|
Client* client;
|
|
|
|
int id;
|
2023-08-03 15:38:49 +00:00
|
|
|
|
2023-12-27 11:56:40 +00:00
|
|
|
Window(ui::Rect, String&&);
|
2023-08-14 18:08:05 +00:00
|
|
|
~Window();
|
2023-08-03 15:38:49 +00:00
|
|
|
|
|
|
|
void focus();
|
|
|
|
|
|
|
|
void draw(ui::Canvas& screen);
|
|
|
|
};
|
|
|
|
|
|
|
|
extern LinkedList<Window> g_windows;
|