28 lines
894 B
C
28 lines
894 B
C
#ifndef CANVAS_H_
|
|
#define CANVAS_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
// Open the canvaspixel window and start the gui loop (in a separate thread)
|
|
void canvaspixel_start(unsigned int texSize, void (*on_close)());
|
|
|
|
void canvaspixel_setcb_key(void (*on_key)(int key, int scancode, int mods));
|
|
void canvaspixel_setcb_resize(void (*on_resize)());
|
|
|
|
// Close the canvaspixel window and free any resources and contexts
|
|
void canvaspixel_close();
|
|
|
|
void canvaspixel_fullscreen(int display);
|
|
int canvaspixel_get_display();
|
|
|
|
void canvaspixel_fill(uint32_t rgba);
|
|
void canvaspixel_set_px(unsigned int x, unsigned int y, uint32_t rgba);
|
|
void canvaspixel_get_px(unsigned int x, unsigned int y, uint32_t *rgba);
|
|
|
|
// get the current visible canvaspixel size in pixel.
|
|
// The actual window might be bigger if scaling is enabled.
|
|
void canvaspixel_get_size(unsigned int *width, unsigned int *height);
|
|
|
|
|
|
#endif /* CANVAS_H_ */
|