head	1.2;
access;
symbols
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1
	riastradh-drm2:1.1.1.1.0.8
	riastradh-drm2-base:1.1.1.1
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	netbsd-6-1:1.1.1.1.0.6
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	netbsd-6-0-1-RELEASE:1.1.1.1
	netbsd-6-0:1.1.1.1.0.4
	netbsd-6-0-RELEASE:1.1.1.1
	netbsd-6-0-RC2:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	netbsd-6:1.1.1.1.0.2
	netbsd-6-base:1.1.1.1
	MesaLib-7-8-2:1.1.1.1
	xorg:1.1.1;
locks; strict;
comment	@// @;


1.2
date	2014.07.09.19.46.47;	author riastradh;	state dead;
branches;
next	1.1;
commitid	D2zJVI2fYV0xUJHx;

1.1
date	2010.07.19.05.31.30;	author mrg;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2010.07.19.05.31.30;	author mrg;	state Exp;
branches;
next	;


desc
@@


1.2
log
@merge MesaLib 7.11.2
@
text
@/***********************************************************
 *      Copyright (C) 1997, Be Inc.  Copyright (C) 1999, Jake Hamby.
 *
 * This program is freely distributable without licensing fees
 * and is provided without guarantee or warrantee expressed or
 * implied. This program is -not- in the public domain.
 *
 *
 *  FILE:	glutCallback.cpp
 *
 *	DESCRIPTION:	put all the callback setting routines in
 *		one place
 ***********************************************************/

/***********************************************************
 *	Headers
 ***********************************************************/
#include <GL/glut.h>
#include "glutint.h"
#include "glutState.h"

/***********************************************************
 *	Window related callbacks
 ***********************************************************/
void APIENTRY 
glutDisplayFunc(GLUTdisplayCB displayFunc)
{
  /* XXX Remove the warning after GLUT 3.0. */
  if (!displayFunc)
    __glutFatalError("NULL display callback not allowed in GLUT 3.0; update your code.");
  gState.currentWindow->display = displayFunc;
}

void APIENTRY 
glutKeyboardFunc(GLUTkeyboardCB keyboardFunc)
{
  gState.currentWindow->keyboard = keyboardFunc;
}

void APIENTRY 
glutSpecialFunc(GLUTspecialCB specialFunc)
{
  gState.currentWindow->special = specialFunc;
}

void APIENTRY 
glutMouseFunc(GLUTmouseCB mouseFunc)
{
  gState.currentWindow->mouse = mouseFunc;
}

void APIENTRY 
glutMotionFunc(GLUTmotionCB motionFunc)
{
  gState.currentWindow->motion = motionFunc;
}

void APIENTRY 
glutPassiveMotionFunc(GLUTpassiveCB passiveMotionFunc)
{
  gState.currentWindow->passive = passiveMotionFunc;
}

void APIENTRY 
glutEntryFunc(GLUTentryCB entryFunc)
{
  gState.currentWindow->entry = entryFunc;
  if (!entryFunc) {
    gState.currentWindow->entryState = -1;
  }
}

void APIENTRY
glutWindowStatusFunc(GLUTwindowStatusCB windowStatusFunc)
{
  gState.currentWindow->windowStatus = windowStatusFunc;
}

static void
visibilityHelper(int status)
{
  if (status == GLUT_HIDDEN || status == GLUT_FULLY_COVERED)
    gState.currentWindow->visibility(GLUT_NOT_VISIBLE);
  else
    gState.currentWindow->visibility(GLUT_VISIBLE);
}

void APIENTRY 
glutVisibilityFunc(GLUTvisibilityCB visibilityFunc)
{
  gState.currentWindow->visibility = visibilityFunc;
  if (visibilityFunc)
    glutWindowStatusFunc(visibilityHelper);
  else
    glutWindowStatusFunc(NULL);
}

void APIENTRY 
glutReshapeFunc(GLUTreshapeCB reshapeFunc)
{
  if (reshapeFunc) {
    gState.currentWindow->reshape = reshapeFunc;
  } else {
    gState.currentWindow->reshape = __glutDefaultReshape;
  }
}

/***********************************************************
 *	General callbacks (timer callback in glutEvent.cpp)
 ***********************************************************/
/* DEPRICATED, use glutMenuStatusFunc instead. */
void APIENTRY
glutMenuStateFunc(GLUTmenuStateCB menuStateFunc)
{
  gState.menuStatus = (GLUTmenuStatusCB) menuStateFunc;
}

void APIENTRY
glutMenuStatusFunc(GLUTmenuStatusCB menuStatusFunc)
{
  gState.menuStatus = menuStatusFunc;
}

void APIENTRY
glutIdleFunc(GLUTidleCB idleFunc)
{
  gState.idle = idleFunc;
}

/***********************************************************
 *	Unsupported callbacks
 ***********************************************************/
void APIENTRY
glutOverlayDisplayFunc(GLUTdisplayCB displayFunc)
{
}

void APIENTRY
glutSpaceballMotionFunc(GLUTspaceMotionCB spaceMotionFunc)
{
}

void APIENTRY
glutSpaceballRotateFunc(GLUTspaceRotateCB spaceRotateFunc)
{
}

void APIENTRY
glutSpaceballButtonFunc(GLUTspaceButtonCB spaceButtonFunc)
{
}

void APIENTRY
glutButtonBoxFunc(GLUTbuttonBoxCB buttonBoxFunc)
{
}

void APIENTRY
glutDialsFunc(GLUTdialsCB dialsFunc)
{
}

void APIENTRY
glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc)
{
}

void APIENTRY
glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc)
{
}
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@import Mesa 7.8.2, lib part.  major changes since 7.7.1:
- several new extensions for various drivers
- many i965, i915 driver fixes
- many glsl fixes
@
text
@@
