#ifndef RENDER_H
#define RENDER_H

#include <string>

struct render {
  int speed;
  int effect;
};

void reset_render(void);
int ms_sleep(unsigned int ms);
void render_sleep(void);

void write_color(int fd, int color);
void send_goto(int fd, int x, int y);
/*
int send_file(int fd, char *filename);
int send_file(int fd, int x, int y, char *filename);
*/
const char *process_trigger(int fd, const char *cp);
void process_trigger(int fd, std::string str, size_t &pos);
void render_effect(int fd, char ch);
/*
void render(int fd, const char *string_out, int len);
*/
void render(int fd, std::string &string_out);
void render_image(const char **lines, int size);

#define TRIGGER "^"
// Max limit we'll sleep before ignoring effects/speed.
#define SLEEP_LIMIT 30

#endif