The signal call-back function titlebar() is expecting as the second argument a structure.
void titlebar(GtkWidget *widget,struct init any)
When you have connected the signal using
you are passing as the second argument a pointer to the GtkWindow. These are not the same type. This is why you have the run-time error
You will need to re-write the function titlebar() so that the second argument is a pointer and not a structure and to make sure that the types used by the function titlebar() and that passed to the function to connect the signal are the same.