Terminal *term = (Terminal *)frontend; struct gui_data *inst = (struct gui_data *)term->frontend;
struct gui_data *inst = (struct gui_data *)frontend;
void *get_window(void *frontend){    Terminal *term = (Terminal *)frontend;    struct gui_data *inst = (struct gui_data *)term->frontend;    return inst->window;}