/* Create a window and return its pointer. 
Use  */
struct win_window* win_create(struct win_window *parent, const struct win_attributes *attributes)
/* Create a window and return its pointer. 
Use  */
struct win_window* win_create(struct win_window *parent, const struct win_attributes *attributes)
{
	struct win_window *win;
	Assert(parent != NULL);
	Assert(attributes != NULL);
	win = membag_alloc(sizeof(struct win_window));
	if (!win) {
		return NULL;
	}
	win->attributes = *attributes;
	win->is_mapped = false;
	win->top_child = NULL;
	win_add_top_child(parent, win);
	return win;
}