monaxys
2 years ago
2 changed files with 48 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||||||
|
#include "render_window.h" |
||||||
|
|
||||||
|
render_window_t render_window_create(const size_t height, const size_t width); |
||||||
|
|
||||||
|
void render_window_destroy(render_window_t* window); |
||||||
|
|
||||||
|
void render_window_move(render_window_t* window); |
||||||
|
|
||||||
|
void render_window_flush(render_window_t* window); |
||||||
|
|
||||||
|
void render_window_render(render_window_t* window); |
||||||
|
|
||||||
|
void render_window_set(render_window_t* window, const size_t x,
|
||||||
|
const size_t y, char value); |
||||||
|
|
@ -0,0 +1,33 @@ |
|||||||
|
#ifndef RENDER_WINDOW_H_ENTRY |
||||||
|
#define RENDER_WINDOW_H_ENTRY |
||||||
|
|
||||||
|
#include <stdio.h> |
||||||
|
#include <stdlib.h> |
||||||
|
#include <unistd.h> |
||||||
|
|
||||||
|
#define RENDER_WINDOW_EMPTY_CHAR ("") |
||||||
|
#define RENDER_WINDOW_NEW_LINE ("\n") |
||||||
|
|
||||||
|
typedef struct render_window |
||||||
|
{ |
||||||
|
const size_t height; |
||||||
|
const size_t width; |
||||||
|
char** buffer; |
||||||
|
size_t x; |
||||||
|
size_t y; |
||||||
|
} render_window_t; |
||||||
|
|
||||||
|
render_window_t render_window_create(const size_t height, const size_t width); |
||||||
|
|
||||||
|
void render_window_destroy(render_window_t* window); |
||||||
|
|
||||||
|
void render_window_move(render_window_t* window); |
||||||
|
|
||||||
|
void render_window_flush(render_window_t* window); |
||||||
|
|
||||||
|
void render_window_render(render_window_t* window); |
||||||
|
|
||||||
|
void render_window_set(render_window_t* window, const size_t x,
|
||||||
|
const size_t y, char value); |
||||||
|
|
||||||
|
#endif /* RENDER_WINDOW_H_ENTRY */ |
Loading…
Reference in new issue