Wrap mouse handling functions.