Framework for XCB event handlers.

The main loop, for now, has the framework in place for all the events
from XCB that we want to handle. Events and data from TTY and the
actual display of data needs to be done.