Подготовлены файлы фигуры

This commit is contained in:
2025-11-17 14:05:42 +03:00
parent c21df94757
commit de18bd8252
5 changed files with 77 additions and 28 deletions

View File

@@ -2,6 +2,15 @@
#define WAYLAND_WINDOW_H
#include <wayland-client.h>
#include "figure.h"
struct window_draw_info {
uint8_t *data;
int32_t width;
int32_t height;
uint8_t color;
struct figure_info figure;
};
/* Данные одного Wayland-окна (одна поверхность) */
struct wayland_window {
@@ -12,13 +21,11 @@ struct wayland_window {
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
struct wl_event_queue *queue; /* очередь событий для окна */
uint8_t *data;
int32_t width;
int32_t height;
struct window_draw_info draw_info;
int need_close;
uint8_t color;
};
/* Инициализация окна; структура предоставляется вызывающим */
int window_init(struct wl_display *display, struct wl_event_queue *queue, struct wayland_window *win);