#pragma once

#include <efi.h>
#include <common.h>

struct gfx_context {
    EFI_GRAPHICS_OUTPUT_PROTOCOL *GOP;
    SUINT32 hr;
    SUINT32 vr;
    EFI_GRAPHICS_OUTPUT_BLT_PIXEL *base;
};

extern gfx_context g_gfx;

struct draw_target {
    EFI_GRAPHICS_OUTPUT_BLT_PIXEL *buf;
    SUINT32 w;
    SUINT32 h;
};

extern draw_target g_draw_target;

void gfx_init(EFI_GRAPHICS_OUTPUT_PROTOCOL *GOP);
void gfx_clear(void);
void draw_set_target(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *buf, SUINT32 w, SUINT32 h);
void draw_set_default_target(void);