gdk3: backport event sub classes from gtk2/

GitHub: #180

This is based on Masafumi Yokoyama. Thanks!!!