Превосходное состояние проекта

This commit is contained in:
2025-11-17 01:31:00 +03:00
parent 0d3efeda49
commit e0ac79bae1
8 changed files with 336 additions and 271 deletions

View File

@@ -3,7 +3,7 @@
#include <wayland-client.h>
/* Data for a single Wayland window (one surface) */
/* Данные одного Wayland-окна (одна поверхность) */
struct wayland_window {
int id;
struct wl_surface *wl_surface;
@@ -11,6 +11,7 @@ struct wayland_window {
struct wl_callback *frame_callback;
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
struct wl_event_queue *queue; /* очередь событий для окна */
uint8_t *data;
int32_t width;
int32_t height;
@@ -18,13 +19,13 @@ struct wayland_window {
uint8_t color;
};
/* Initialize windowing for the given window structure. Caller provides the struct (on stack or heap) */
int window_init(struct wl_display *display, struct wayland_window *win);
/* Инициализация окна; структура предоставляется вызывающим */
int window_init(struct wl_display *display, struct wl_event_queue *queue, struct wayland_window *win);
/* Returns non-zero if the window requested to close */
/* Нечётное значение — окно запросило закрытие */
int window_should_close(struct wayland_window *win);
/* Destroy window and related resources */
/* Уничтожить окно и связанные ресурсы */
void window_destroy(struct wayland_window *win);
#endif