typedef void (*ControlFunc) (Control *c);
Control *new_button(Window *w, Rect r, char *text, ControlFunc fn); Control *add_button(Control *c, Rect r, char *text, ControlFunc fn);
The new_button function creates a push-button control, with the given text string being centered within the button. The button will appear on the specified window in the rectangle, given in window co-ordinates.
When the user clicks on the button with the mouse, the specified call-back function fn is called. The parameter to this function will be a pointer to the button which called the function.
The add_button function works in the same way as new_button, except that it attaches the button to a control rather than directly to a window.