implemented all of event.h APIs

This pull request is including fix of Issue #415.
Should I close #415?