添加壁纸功能

This commit is contained in:
2025-08-10 02:07:57 +08:00
parent 751fce23c1
commit fc58edca2d
8 changed files with 241 additions and 21 deletions

10
src/include/renderer.h Normal file
View File

@@ -0,0 +1,10 @@
#pragma once
#include <stdint.h>
#include "types.h"
uint32_t *generate_wallpaper(const wallpaper_config_t *wallpaper_config,
const monitor_t *monitors, const uint32_t index,
const uint32_t screen_width,
const uint32_t screen_height);

View File

@@ -5,6 +5,9 @@
#define LENGTH(X) (sizeof(X) / sizeof(X)[0])
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
void die(const char *format, ...);
void *ecalloc(size_t number_of_member, size_t member_size);

View File

@@ -16,6 +16,13 @@ struct monitor_rect_t {
};
monitor_rect_t *detect_monitor_rect(void);
typedef struct rect_size_t {
uint32_t width;
uint32_t height;
} rect_size_t;
rect_size_t *get_screen_size(void);
void set_wallpaper(uint32_t *wallpaper_data);
typedef struct window_list_t {
uint32_t count;
xcb_window_t *list;