C object event handler