aboutsummaryrefslogtreecommitdiff
path: root/src/render.h
blob: d9850fdd58624a75e244ee0efd480a686f6c8231 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * render.h
 *
 *  Created on: 15.01.2018
 *      Author: Superleo1810
 */

#ifndef RENDER_H_
#define RENDER_H_

#include <gtk/gtk.h>
#include "defs.h"

typedef struct config {
	u32 iterations;
	u32 colorFrom;
	u32 colorTo;
	bool video;
	u8 filetype;
	u16 width;
	u16 height;
	u8 renderFPS;
	u8 videoFPS;
	u32 bitrate;
	const char *path;
	// TODO: key mapping als option in die struct
} Config;

typedef struct Ui_render {
	GtkWindow *window;
	GtkFrame *frame;
	GtkDrawingArea *drawing_area;
} Ui_render;

Config *_config;
Ui_render ui_render;
u32 (*_sfunc) (double, double, u32);

void render_init(Config *config, u32 (*sfunc) (double, double, u32));
void render_show();
cairo_surface_t *render_surface();

void on_draw(GtkWidget *widget, cairo_t *cr, gpointer data);

#endif /* RENDER_H_ */