Browse Source

Add header for window

master
monaxys 2 years ago
parent
commit
ac22c64f90
  1. 15
      src/render_window.c
  2. 33
      src/render_window.h

15
src/render_window.c

@ -0,0 +1,15 @@ @@ -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);

33
src/render_window.h

@ -0,0 +1,33 @@ @@ -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…
Cancel
Save