Sure events are task/user specific, but specificity should be accomplished at the level of arguments to the function.
Possible solution: input variable could be a struct, fields are names of events of interest, content are vectors (1-by-nTrials) of event time (in seconds) relative to trial start.