Defines the DirectObject class, a convenient class to inherit from if the object needs to be able to respond to events.