mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 10:26:59 +00:00
V1.61 feature update: JPEG image viewer and JPEG wallpaper setting.
This commit is contained in:
35
src/kernel/wallpaper.h
Normal file
35
src/kernel/wallpaper.h
Normal file
@@ -0,0 +1,35 @@
|
||||
// wallpaper.h - Wallpaper management for BoredOS
|
||||
#ifndef WALLPAPER_H
|
||||
#define WALLPAPER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
// Initialize wallpaper subsystem (creates /Wallpapers dir, writes JPEGs, pre-generates thumbnails)
|
||||
void wallpaper_init(void);
|
||||
|
||||
// Request wallpaper change by embedded index (safe from interrupt context)
|
||||
void wallpaper_request_set(int index);
|
||||
|
||||
// Request wallpaper change by file path (safe from interrupt context)
|
||||
void wallpaper_request_set_from_file(const char *path);
|
||||
|
||||
// Process pending wallpaper actions (call from main loop only!)
|
||||
void wallpaper_process_pending(void);
|
||||
|
||||
// Get pre-generated thumbnail pixel buffer (index 0=moon, 1=mountain)
|
||||
#define WALLPAPER_THUMB_W 100
|
||||
#define WALLPAPER_THUMB_H 60
|
||||
uint32_t* wallpaper_get_thumb(int index);
|
||||
bool wallpaper_thumb_valid(int index);
|
||||
|
||||
// Wallpaper info
|
||||
#define WALLPAPER_COUNT 2
|
||||
extern const char *wallpaper_names[WALLPAPER_COUNT];
|
||||
|
||||
// Get decoded wallpaper pixel buffer
|
||||
uint32_t* wallpaper_get_pixels(void);
|
||||
int wallpaper_get_width(void);
|
||||
int wallpaper_get_height(void);
|
||||
|
||||
#endif // WALLPAPER_H
|
||||
Reference in New Issue
Block a user