[idl-generator] Add event handler support

Please use 2-space indent for this file.