28 if (
readfile(
"/dev/fb/0/name", name,
sizeof(name) - 1, 0) ==
ERR)
40 printf(
"dwm: using framebuffer '%s' width=%lu height=%lu pitch=%lu format=%s\n", name,
width,
height,
pitch,
68 printf(
"dwm: failed to allocate backbuffer memory\n");
#define MAX_NAME
Maximum length of names.
#define MAX_PATH
Maximum length of filepaths.
static void * frontbuffer
void screen_transfer(surface_t *surface, const rect_t *rect)
uint64_t screen_height(void)
void screen_transfer_blend(surface_t *surface, const rect_t *rect)
static char format[MAX_NAME]
void screen_rect(rect_t *rect)
static region_t invalidRegion
void screen_transfer_frontbuffer(surface_t *surface, const rect_t *rect)
uint64_t screen_width(void)
static void frontbuffer_init(void)
static void backbuffer_init(void)
void screen_init(void)
Initialize and enable the screen logging.
#define errno
Error number variable.
fd_t open(const char *path)
System call for opening files.
uint64_t scanfile(const char *path, const char *format,...)
Wrapper for reading from a file path using scan formatting.
uint64_t close(fd_t fd)
System call for closing files.
size_t readfile(const char *path, void *buffer, size_t count, size_t offset)
Wrapper for reading a file directly using a path.
void * mmap(fd_t fd, void *address, size_t length, prot_t prot)
System call to map memory from a file.
void * munmap(void *address, size_t length)
System call to unmap mapped memory.
@ PROT_READ
Readable memory.
@ PROT_WRITE
Writable memory.
#define NULL
Pointer error value.
#define ERR
Integer error value.
__UINT64_TYPE__ fd_t
A file descriptor.
static void screen_invalidate(const screen_pos_t *pos)
#define PIXEL_BLEND(dest, src)
#define RECT_FIT(rect, parent)
#define RECT_INIT_DIM(x, y, width, height)
#define RECT_HEIGHT(rect)
static void region_add(region_t *region, const rect_t *rect)
static void region_init(region_t *region)
static void region_clear(region_t *region)
_PUBLIC int printf(const char *_RESTRICT format,...)
_PUBLIC void * malloc(size_t size)
_PUBLIC _NORETURN void abort(void)
_PUBLIC void free(void *ptr)
_PUBLIC char * strerror(int errnum)
_PUBLIC void * memcpy(void *_RESTRICT s1, const void *_RESTRICT s2, size_t n)
_PUBLIC void * memset(void *s, int c, size_t n)
rect_t rects[MAX_REGION_RECTS]