[refactor] Organize INT

This commit is contained in:
2026-06-05 18:29:11 +08:00
Unverified
parent 7c66610c13
commit da03b301fb
17 changed files with 79 additions and 59 deletions
+5 -4
View File
@@ -1,6 +1,7 @@
#pragma once
#include <efi.h>
#include <common.h>
#define LAYER_MAX 32
#define LAYER_NAME_LEN 32
@@ -16,9 +17,9 @@ typedef struct layer {
UINT32 id;
char name[LAYER_NAME_LEN];
layer_type_t type;
int x, y;
SSINT32 x, y;
UINT32 w, h;
int z;
SSINT32 z;
bool visible;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL* buffer;
struct layer* next;
@@ -30,8 +31,8 @@ void layer_init(void);
// Layer management
layer_t* layer_create(const char* name, layer_type_t type, UINT32 w, UINT32 h);
void layer_destroy(layer_t* layer);
void layer_set_z(layer_t* layer, int z);
void layer_set_pos(layer_t* layer, int x, int y);
void layer_set_z(layer_t* layer, SSINT32 z);
void layer_set_pos(layer_t* layer, SSINT32 x, SSINT32 y);
void layer_set_visible(layer_t* layer, bool visible);
layer_t* layer_get_by_id(UINT32 id);
layer_t* layer_get_focused(void);