All the things about the libtui_renderer and the renderer module
◆ LIBTUI_RENDERER_ERR
Error Codes For Renderer Module
Enumerator |
---|
RENDERER_ERROR_OK | No Error.
|
RENDERER_ERROR_MALLOC_FAILED | Tried to use malloc but failed.
|
RENDERER_ERROR_NULL_RENDERER | The libtui_renderer* passed in as an argument is NULL.
|
RENDERER_ERROR_COUNT | Total number of errors.
|
◆ libtui_renderer_create()
Creates a new libtui_renderer.
Client must free the struct libtui_renderer with libtui_renderer_free.
- Parameters
-
width | The width of the screen that the renderer will work on |
height | The height of the screen that the renderer will work on |
- Returns
- Returns the created renderer in struct libtui_renderer **const renderer_out parameter.
-
Returns an enum LIBTUI_RENDERER_ERR as the function result.
◆ libtui_renderer_err_str()
This function returns the string that corresponds to the given LIBTUI_RENDERER_ERR.
- Parameters
-
err | The error code to get the correspinding string. |
◆ libtui_renderer_free()
Frees the renderer completely.
After calling this, don't use any pointer to the struct libtui_buffer or the char* inside because they will be freed.
- Parameters
-
- Returns
- Returns an enum LIBTUI_RENDERER_ERR as the function result.
◆ libtui_renderer_render()
Renders the final buffer to the screen.
- Parameters
-
- Returns
- Returns an enum LIBTUI_RENDERER_ERR as the function result.