20 printf(
"dwm surface error: failed to allocate surface\n");
28 surface->
pos = *point;
33 printf(
"dwm surface error: failed to open shmem\n");
41 printf(
"dwm surface error: failed to allocate gfx buffer\n");
45 surface->
width = width;
surface_type_t
Surface types.
#define ENOMEM
Out of memory.
#define errno
Error number variable.
fd_t open(const char *path)
System call for opening files.
uint64_t close(fd_t fd)
System call for closing files.
static void list_entry_init(list_entry_t *entry)
Initializes a list entry.
void * mmap(fd_t fd, void *address, uint64_t length, prot_t prot)
System call to map memory from a file.
uint64_t munmap(void *address, uint64_t length)
System call to unmap mapped memory.
@ PROT_READ
Memory can be read from.
@ PROT_WRITE
Memory can be written to.
#define NULL
Pointer error value.
#define ERR
Integer error value.
#define SURFACE_SCREEN_RECT(surface)
_PUBLIC int printf(const char *_RESTRICT format,...)
_PUBLIC void * malloc(size_t size)
_PUBLIC void free(void *ptr)
_PUBLIC char * strcpy(char *_RESTRICT s1, const char *_RESTRICT s2)
_PUBLIC void * memset(void *s, int c, size_t n)
surface_t * surface_new(client_t *client, const char *name, const point_t *point, uint64_t width, uint64_t height, surface_type_t type)
static surface_id_t newId
void surface_free(surface_t *surface)
void surface_get_info(surface_t *surface, surface_info_t *info)