libtui
Loading...
Searching...
No Matches
libtui_draw.h
Go to the documentation of this file.
1#ifndef LIBTUI_DRAW_H
2#define LIBTUI_DRAW_H
3
4#include <stdlib.h>
5
6struct libtui_renderer;
7
31
37const char *libtui_draw_err_str(enum LIBTUI_DRAW_ERR err);
38
50libtui_draw_clear_with_char(struct libtui_renderer *const renderer,
51 const char c);
52
62enum LIBTUI_DRAW_ERR libtui_draw_clear(struct libtui_renderer *const renderer);
63
77libtui_draw_single_char(struct libtui_renderer *const renderer, const char c,
78 size_t x, size_t y);
79
85
86#endif
const char * libtui_draw_err_str(enum LIBTUI_DRAW_ERR err)
This function returns the string that corresponds to the given LIBTUI_DRAW_ERR.
Definition libtui_draw.c:7
enum LIBTUI_DRAW_ERR libtui_draw_clear_with_char(struct libtui_renderer *const renderer, const char c)
Clears the screen with the specified char.
Definition libtui_draw.c:30
enum LIBTUI_DRAW_ERR libtui_draw_clear(struct libtui_renderer *const renderer)
Clears the screen.
Definition libtui_draw.c:49
enum LIBTUI_DRAW_ERR libtui_draw_single_char(struct libtui_renderer *const renderer, const char c, size_t x, size_t y)
Draws a single char at the specified (x, y).
Definition libtui_draw.c:61
LIBTUI_DRAW_ERR
Error Codes For Draw Module.
Definition libtui_draw.h:20
@ DRAW_ERROR_OK
No Error.
Definition libtui_draw.h:22
@ DRAW_ERROR_NULL_RENDERER
The libtui_renderer* passed in as an argument is NULL.
Definition libtui_draw.h:24
@ DRAW_ERROR_INVALID_DIMENSIONS
The dimensions that were passed to the function were invalid.
Definition libtui_draw.h:26
@ DRAW_ERROR_COUNT
Count of errors.
Definition libtui_draw.h:29
Struct that holds data used by therendering module.
Definition libtui_renderer.h:44