Luna/wind/Window.h

33 lines
564 B
C

#pragma once
#include <luna/LinkedList.h>
#include <luna/String.h>
#include <ui/Canvas.h>
#include <ui/Color.h>
#include <ui/Rect.h>
struct Client;
struct Window : public LinkedListNode<Window>
{
ui::Rect surface;
ui::Rect titlebar;
ui::Rect close_button;
ui::Rect contents;
u32* pixels;
String name;
bool dirty { false };
Client* client;
int id;
static int titlebar_height();
Window(ui::Rect, String&&);
~Window();
void focus();
void draw(ui::Canvas& screen);
};
extern LinkedList<Window> g_windows;