blob: a993ae68d4a55c45ab3a671c491e0f7e4c3b16f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#ifndef SAFFRON_API_H
#define SAFFRON_API_H
#include "saffron_widget.h" /* satisfy the lsp and also if someone includes api without the saffron.h wrapper (you lunatic) then it still works */
#include "saffron_window.h"
bool saffron_init(void);
void saffron_quit(void);
void saffron_widget_draw(SaffronWidget* widget, SDL_Renderer *renderer);
void saffron_widget_add_child(SaffronWidget* parent, SaffronWidget* child);
SaffronWidget* saffron_widget_new(); /* generic primitive for generic widgets, e.g. the window root. ideally window root is a hbox/vbox/box once those are implemented */
void saffron_widget_free(SaffronWidget* widget);
SaffronWindow* saffron_window_new(const char* title, int w, int h);
void saffron_window_free(SaffronWindow* window);
void saffron_window_show(SaffronWindow* window);
void saffron_window_main(SaffronWindow* window);
#endif
|