#ifndef SWIFT_WIDGET_MANAGER_H
#define SWIFT_WIDGET_MANAGER_H
#include <swift/stdlib.h>
#include <swift/window.h>
#include <swift/data.h>
#include <swift/maths.h>
#include <swift/gui/api.h>
#include <swift/gui/widget.h>

typedef struct swift_wgt_man_t swift_wgt_man_t;

struct swift_wgt_man_t {
	swift_window_t *window;
	swift_widgets_t wgts;
	swift_font_t *font;
	swift_list_t node;
};

#define SWIFT_WIDGET_MANAGER(...) ((swift_wgt_man_t){__VA_ARGS__})

SWIFT_GUI_API swift_list_t *swift_get_widget_managers(void);
SWIFT_GUI_API bool swift_init_widget_manager(swift_wgt_man_t *widget_manager,
	swift_vec2f_t hw, const char *title, bool decor, void *user_data);
SWIFT_GUI_API bool swift_widget_manager_create_window(
	swift_wgt_man_t *widget_manager, swift_wgt_man_t *new_widget_manager,
		swift_vec2f_t hw, swift_vec2f_t pos, const char *title, bool decor,
			void *user_data);
SWIFT_GUI_API void swift_term_widget_manager(void);
SWIFT_GUI_API void swift_widget_manager_term_window(
	swift_wgt_man_t *widget_manager);
#endif /*SWIFT_WIDGET_MANAGER_H*/
