Implement generating of Event and Error types

This crashes due to what is probably a bug in xcb-types.