Add mouse callback function.