Luna/gui/wind/Window.h

32 lines
570 B
C
Raw Normal View History

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>
#include <ui/ipc/Server.h>
2023-08-03 15:38:49 +00:00
struct Client;
2023-08-03 15:38:49 +00:00
struct Window : public LinkedListNode<Window>
{
ui::Rect surface;
ui::Rect titlebar;
u32* pixels;
2023-08-14 16:15:29 +00:00
String name;
String shm_path;
bool dirty { false };
Client* client;
int id;
ui::WindowAttributes attributes { 0 };
2023-08-03 15:38:49 +00:00
Window(ui::Rect, String&&);
~Window();
2023-08-03 15:38:49 +00:00
void focus();
void draw(ui::Canvas& screen);
};
extern LinkedList<Window> g_windows;