Generally, in GUI programming, callback is a function that handles some event. For example:

  glutMouseFunc(mouse);

With this command, GLUT program will then use function mouse as callback to handle mouse clicks. Example:


void mouse(int button, int state, int x, int y)
{
  switch(button) {
  case GLUT_LEFT_BUTTON:
    if(state==GLUT_DOWN)
      clicked(x,y);
    break;
  case GLUT_MIDDLE_BUTTON:
    if(state==GLUT_DOWN)
      reset_state();
    break;
  }
}

This callback will receive mouse button state and click coordinates through the function parameters.

Callbacks aren't always called callbacks, but the idea is same often in GUI programming. =)