Event handling

Poll events, such as user input and window events. Upon calling this
function, all window states, keyboard states and mouse states are updated.
If any related callback functions are registered, these are called during
the call of pollEvents.

Wait for events, such as user input and window events. The calling thread
will be put to sleep until any event appears in the event queue.
When events are ready, the events will be processed just as they are
processed by pollEvents.

Set the function that will be called when the window client area needs to
be refreshed, which occurs when any part of the window client area is
damaged and needs to be repainted (for instance, if a part of the window
that was previously occluded by another window has become visible).

Set the function that will be called when there is a character event,
i.e., every time a key that results in a printable Unicode character is
pressed or released. Characters are affected by modifiers (such as SHIFT
or ALT).