Create and initialize a widget.
The widget represents a window that can be drawn into. It also is the base class for user-interface widgets such as buttons and text boxes.
All the arguments can be NULL in which case a top level window with size 0 is created. The event callback function has to be provided only if the caller wants to deal with the events this widget receives. The event callback is basically a preprocess hook called synchronously. The return value determines whether the event goes to the default window procedure or it is hidden to the os. The assumption is that if the event handler returns false the widget does not see the event. The widget should not automatically clear the window to the background color. The calling code must handle paint messages and clear the background itself.