core: 添加 X11 后端初始化与屏幕信息探测

This commit is contained in:
2026-03-14 13:53:12 +08:00
parent 57c0250c44
commit 6ec4d8422f
5 changed files with 326 additions and 3 deletions

18
src/core/backend.h Normal file
View File

@@ -0,0 +1,18 @@
#pragma once
#include <stddef.h>
#include "wm_desc.h"
typedef struct wm_backend_t wm_backend_t;
typedef struct wm_backend_detect_t {
wm_output_info_t *outputs;
size_t output_count;
} wm_backend_detect_t;
wm_backend_t *wm_backend_create(const char *display_name);
void wm_backend_destroy(wm_backend_t *backend);
wm_backend_detect_t *wm_backend_detect(wm_backend_t *backend);
void wm_backend_detect_destroy(wm_backend_detect_t *detect);