00001 00002 /* Copyright (c) Mark J. Kilgard, 1994. */ 00003 00004 /* This program is freely distributable without licensing fees 00005 and is provided without guarantee or warrantee expressed or 00006 implied. This program is -not- in the public domain. */ 00007 00008 #include <stdlib.h> 00009 00010 #include "glutint.h" 00011 00012 void APIENTRY 00013 glutTabletMotionFunc(GLUTtabletMotionCB tabletMotionFunc) 00014 { 00015 __glutCurrentWindow->tabletMotion = tabletMotionFunc; 00016 __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; 00017 __glutPutOnWorkList(__glutCurrentWindow, 00018 GLUT_DEVICE_MASK_WORK); 00019 /* If deinstalling callback, invalidate tablet position. */ 00020 if (tabletMotionFunc == NULL) { 00021 __glutCurrentWindow->tabletPos[0] = -1; 00022 __glutCurrentWindow->tabletPos[1] = -1; 00023 } 00024 } 00025 00026 void APIENTRY 00027 glutTabletButtonFunc(GLUTtabletButtonCB tabletButtonFunc) 00028 { 00029 __glutCurrentWindow->tabletButton = tabletButtonFunc; 00030 __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; 00031 __glutPutOnWorkList(__glutCurrentWindow, 00032 GLUT_DEVICE_MASK_WORK); 00033 } 00034 00035 void APIENTRY 00036 glutWacomMotionFunc(GLUTwacomMotionCB wacomMotionFunc) 00037 { 00038 __glutCurrentWindow->wacomMotion = wacomMotionFunc; 00039 __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; 00040 __glutPutOnWorkList(__glutCurrentWindow, 00041 GLUT_DEVICE_MASK_WORK); 00042 } 00043 00044 void APIENTRY 00045 glutWacomButtonFunc(GLUTwacomButtonCB wacomButtonFunc) 00046 { 00047 __glutCurrentWindow->wacomButton = wacomButtonFunc; 00048 __glutUpdateInputDeviceMaskFunc = __glutUpdateInputDeviceMask; 00049 __glutPutOnWorkList(__glutCurrentWindow, 00050 GLUT_DEVICE_MASK_WORK); 00051 }