diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-09-06 15:09:18 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-09-06 15:09:18 +0100 |
commit | 2ac41bd75de9dd6e18fe08112ba584f87e4fab91 (patch) | |
tree | a03dfa507968079ceb32fe47660def23a9197ab4 | |
parent | f0bad69edd57facd6cffde8cb0863d1a735e2492 (diff) | |
parent | c3c46b921ac657e5f3c63888c8b0230232670b70 (diff) |
Merge branch 'cygwin-patches-for-1.13' into cygwin-release-1.13xserver-cygwin-1.13.0-1
74 files changed, 2680 insertions, 5156 deletions
diff --git a/Makefile.am b/Makefile.am index 9a628537d..7be4271d4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,6 +27,7 @@ SUBDIRS = \ Xext \ miext \ os \ + pseudoramiX \ randr \ render \ Xi \ @@ -77,6 +78,7 @@ DIST_SUBDIRS = \ Xext \ miext \ os \ + pseudoramiX \ randr \ render \ Xi \ diff --git a/configure.ac b/configure.ac index ac3bf26f1..e3f499ebe 100644 --- a/configure.ac +++ b/configure.ac @@ -1062,7 +1062,7 @@ if test "x$GLX" = xyes; then AC_SUBST(XLIB_CFLAGS) AC_DEFINE(GLXEXT, 1, [Build GLX extension]) GLX_LIBS='$(top_builddir)/glx/libglx.la' - GLX_SYS_LIBS="$GLX_SYS_LIBS" + GLX_SYS_LIBS="$GLX_SYS_LIBS -lglapi" else GLX=no fi @@ -2226,6 +2226,7 @@ miext/damage/Makefile miext/shadow/Makefile miext/rootless/Makefile os/Makefile +pseudoramiX/Makefile randr/Makefile render/Makefile xkb/Makefile diff --git a/dix/Makefile.am b/dix/Makefile.am index b7358aa72..28bcd77d1 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -14,6 +14,7 @@ libdix_la_SOURCES = \ dispatch.c \ dispatch.h \ dixfonts.c \ + dixmain.c \ dixutils.c \ enterleave.c \ enterleave.h \ diff --git a/dix/dispatch.c b/dix/dispatch.c index 0ce10c2f7..b2ec1cbd2 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -223,7 +223,11 @@ UpdateCurrentTimeIf(void) #define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */ #define SMART_SCHEDULE_MAX_SLICE 200 /* ms */ +#ifdef __CYGWIN__ +Bool SmartScheduleDisable = TRUE; +#else Bool SmartScheduleDisable = FALSE; +#endif long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL; long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL; long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE; diff --git a/dix/dixmain.c b/dix/dixmain.c new file mode 100644 index 000000000..9a0bc8c5f --- /dev/null +++ b/dix/dixmain.c @@ -0,0 +1,373 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* The panoramix components contained the following notice */ +/***************************************************************** + +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#include <version-config.h> +#endif + +#include <X11/X.h> +#include <X11/Xos.h> /* for unistd.h */ +#include <X11/Xproto.h> +#include <pixman.h> +#include "scrnintstr.h" +#include "misc.h" +#include "os.h" +#include "windowstr.h" +#include "resource.h" +#include "dixstruct.h" +#include "gcstruct.h" +#include "extension.h" +#include "colormap.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "selection.h" +#include <X11/fonts/font.h> +#include "opaque.h" +#include "servermd.h" +#include "hotplug.h" +#include "site.h" +#include "dixfont.h" +#include "extnsionst.h" +#include "privates.h" +#include "registry.h" +#include "client.h" +#include "exevents.h" +#ifdef PANORAMIX +#include "panoramiXsrv.h" +#else +#include "dixevents.h" /* InitEvents() */ +#endif + +#ifdef DPMSExtension +#include <X11/extensions/dpmsconst.h> +#include "dpmsproc.h" +#endif + +extern void Dispatch(void); + +#ifdef XQUARTZ +#include <pthread.h> + +BOOL serverRunning = FALSE; +pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER; +pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER; + +#endif + +int +dix_main(int argc, char *argv[], char *envp[]) +{ + int i; + HWEventQueueType alwaysCheckForInput[2]; + + display = "0"; + + InitRegions(); + + CheckUserParameters(argc, argv, envp); + + CheckUserAuthorization(); + + InitConnectionLimits(); + + ProcessCommandLine(argc, argv); + + alwaysCheckForInput[0] = 0; + alwaysCheckForInput[1] = 1; + while (1) { + serverGeneration++; + ScreenSaverTime = defaultScreenSaverTime; + ScreenSaverInterval = defaultScreenSaverInterval; + ScreenSaverBlanking = defaultScreenSaverBlanking; + ScreenSaverAllowExposures = defaultScreenSaverAllowExposures; +#ifdef DPMSExtension + DPMSStandbyTime = DPMSSuspendTime = DPMSOffTime = ScreenSaverTime; + DPMSEnabled = TRUE; + DPMSPowerLevel = 0; +#endif + InitBlockAndWakeupHandlers(); + if (serverGeneration == 1) { + CreateWellKnownSockets(); + for (i = 1; i < MAXCLIENTS; i++) + clients[i] = NullClient; + serverClient = calloc(sizeof(ClientRec), 1); + if (!serverClient) + FatalError("couldn't create server client"); + InitClient(serverClient, 0, (pointer) NULL); + } + else + ResetWellKnownSockets(); + /* Perform any operating system dependent initializations you'd like */ + OsInit(); + clients[0] = serverClient; + currentMaxClients = 1; + + /* Initialize privates before first allocation */ + dixResetPrivates(); + + /* Initialize server client devPrivates, to be reallocated as + * more client privates are registered + */ + if (!dixAllocatePrivates(&serverClient->devPrivates, PRIVATE_CLIENT)) + FatalError("failed to create server client privates"); + + if (!InitClientResources(serverClient)) /* for root resources */ + FatalError("couldn't init server resources"); + + SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]); + screenInfo.numScreens = 0; + + InitAtoms(); + InitEvents(); + InitSelections(); + InitGlyphCaching(); + dixResetRegistry(); + ResetFontPrivateIndex(); + InitCallbackManager(); + InitOutput(&screenInfo, argc, argv); + + if (screenInfo.numScreens < 1) + FatalError("no screens found"); + InitExtensions(argc, argv); + + for (i = 0; i < screenInfo.numGPUScreens; i++) { + ScreenPtr pScreen = screenInfo.gpuscreens[i]; + if (!CreateScratchPixmapsForScreen(pScreen)) + FatalError("failed to create scratch pixmaps"); + } + + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + + if (!CreateScratchPixmapsForScreen(pScreen)) + FatalError("failed to create scratch pixmaps"); + if (pScreen->CreateScreenResources && + !(*pScreen->CreateScreenResources) (pScreen)) + FatalError("failed to create screen resources"); + if (!CreateGCperDepth(i)) + FatalError("failed to create scratch GCs"); + if (!CreateDefaultStipple(i)) + FatalError("failed to create default stipple"); + if (!CreateRootWindow(pScreen)) + FatalError("failed to create root window"); + } + + InitFonts(); + if (SetDefaultFontPath(defaultFontPath) != Success) { + ErrorF("[dix] failed to set default font path '%s'", + defaultFontPath); + } + if (!SetDefaultFont(defaultTextFont)) { + FatalError("could not open default font '%s'", defaultTextFont); + } + + if (!(rootCursor = CreateRootCursor(NULL, 0))) { + FatalError("could not open default cursor font '%s'", + defaultCursorFont); + } + +#ifdef DPMSExtension + /* check all screens, looking for DPMS Capabilities */ + DPMSCapableFlag = DPMSSupported(); + if (!DPMSCapableFlag) + DPMSEnabled = FALSE; +#endif + +#ifdef PANORAMIX + /* + * Consolidate window and colourmap information for each screen + */ + if (!noPanoramiXExtension) + PanoramiXConsolidate(); +#endif + + for (i = 0; i < screenInfo.numScreens; i++) + InitRootWindow(screenInfo.screens[i]->root); + + InitCoreDevices(); + InitInput(argc, argv); + InitAndStartDevices(); + ReserveClientIds(serverClient); + + dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + +#ifdef PANORAMIX + if (!noPanoramiXExtension) { + if (!PanoramiXCreateConnectionBlock()) { + FatalError("could not create connection block info"); + } + } + else +#endif + { + if (!CreateConnectionBlock()) { + FatalError("could not create connection block info"); + } + } + +#ifdef XQUARTZ + /* Let the other threads know the server is done with its init */ + pthread_mutex_lock(&serverRunningMutex); + serverRunning = TRUE; + pthread_cond_broadcast(&serverRunningCond); + pthread_mutex_unlock(&serverRunningMutex); +#endif + + NotifyParentProcess(); + + Dispatch(); + +#ifdef XQUARTZ + /* Let the other threads know the server is no longer running */ + pthread_mutex_lock(&serverRunningMutex); + serverRunning = FALSE; + pthread_mutex_unlock(&serverRunningMutex); +#endif + + UndisplayDevices(); + DisableAllDevices(); + + /* Now free up whatever must be freed */ + if (screenIsSaved == SCREEN_SAVER_ON) + dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); + FreeScreenSaverTimer(); + CloseDownExtensions(); + +#ifdef PANORAMIX + { + Bool remember_it = noPanoramiXExtension; + + noPanoramiXExtension = TRUE; + FreeAllResources(); + noPanoramiXExtension = remember_it; + } +#else + FreeAllResources(); +#endif + + CloseInput(); + + for (i = 0; i < screenInfo.numScreens; i++) + screenInfo.screens[i]->root = NullWindow; + + CloseDownDevices(); + + CloseDownEvents(); + + for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) { + ScreenPtr pScreen = screenInfo.gpuscreens[i]; + FreeScratchPixmapsForScreen(pScreen); + (*pScreen->CloseScreen) (pScreen); + dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN); + free(pScreen); + screenInfo.numGPUScreens = i; + } + + for (i = screenInfo.numScreens - 1; i >= 0; i--) { + FreeScratchPixmapsForScreen(screenInfo.screens[i]); + FreeGCperDepth(i); + FreeDefaultStipple(i); + dixFreeScreenSpecificPrivates(screenInfo.screens[i]); + (*screenInfo.screens[i]->CloseScreen) (screenInfo.screens[i]); + dixFreePrivates(screenInfo.screens[i]->devPrivates, PRIVATE_SCREEN); + free(screenInfo.screens[i]); + screenInfo.numScreens = i; + } + + ReleaseClientIds(serverClient); + dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT); + serverClient->devPrivates = NULL; + + FreeFonts(); + + FreeAuditTimer(); + + if (dispatchException & DE_TERMINATE) { + CloseWellKnownConnections(); + } + + OsCleanup((dispatchException & DE_TERMINATE) != 0); + + if (dispatchException & DE_TERMINATE) { + ddxGiveUp(EXIT_NO_ERROR); + break; + } + + free(ConnectionInfo); + ConnectionInfo = NULL; + } + return 0; +} diff --git a/dix/main.c b/dix/main.c index fb935c969..ea6c6e0c8 100644 --- a/dix/main.c +++ b/dix/main.c @@ -1,377 +1,33 @@ /*********************************************************** -Copyright 1987, 1998 The Open Group +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -/* The panoramix components contained the following notice */ -/***************************************************************** - -Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, -BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Digital Equipment Corporation -shall not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from Digital -Equipment Corporation. +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. ******************************************************************/ -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#include <version-config.h> -#endif - -#include <X11/X.h> -#include <X11/Xos.h> /* for unistd.h */ -#include <X11/Xproto.h> -#include <pixman.h> -#include "scrnintstr.h" -#include "misc.h" -#include "os.h" -#include "windowstr.h" -#include "resource.h" -#include "dixstruct.h" -#include "gcstruct.h" -#include "extension.h" -#include "colormap.h" -#include "colormapst.h" -#include "cursorstr.h" -#include "selection.h" -#include <X11/fonts/font.h> -#include "opaque.h" -#include "servermd.h" -#include "hotplug.h" -#include "site.h" -#include "dixfont.h" -#include "extnsionst.h" -#include "privates.h" -#include "registry.h" -#include "client.h" -#include "exevents.h" -#ifdef PANORAMIX -#include "panoramiXsrv.h" -#else -#include "dixevents.h" /* InitEvents() */ -#endif - -#ifdef DPMSExtension -#include <X11/extensions/dpmsconst.h> -#include "dpmsproc.h" -#endif - -extern void Dispatch(void); - -#ifdef XQUARTZ -#include <pthread.h> - -BOOL serverRunning = FALSE; -pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER; -pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER; - int dix_main(int argc, char *argv[], char *envp[]); -int -dix_main(int argc, char *argv[], char *envp[]) -#else +/* + A default implementation of main, which can be overridden by DDX + */ int main(int argc, char *argv[], char *envp[]) -#endif { - int i; - HWEventQueueType alwaysCheckForInput[2]; - - display = "0"; - - InitRegions(); - - CheckUserParameters(argc, argv, envp); - - CheckUserAuthorization(); - - InitConnectionLimits(); - - ProcessCommandLine(argc, argv); - - alwaysCheckForInput[0] = 0; - alwaysCheckForInput[1] = 1; - while (1) { - serverGeneration++; - ScreenSaverTime = defaultScreenSaverTime; - ScreenSaverInterval = defaultScreenSaverInterval; - ScreenSaverBlanking = defaultScreenSaverBlanking; - ScreenSaverAllowExposures = defaultScreenSaverAllowExposures; -#ifdef DPMSExtension - DPMSStandbyTime = DPMSSuspendTime = DPMSOffTime = ScreenSaverTime; - DPMSEnabled = TRUE; - DPMSPowerLevel = 0; -#endif - InitBlockAndWakeupHandlers(); - /* Perform any operating system dependent initializations you'd like */ - OsInit(); - if (serverGeneration == 1) { - CreateWellKnownSockets(); - for (i = 1; i < MAXCLIENTS; i++) - clients[i] = NullClient; - serverClient = calloc(sizeof(ClientRec), 1); - if (!serverClient) - FatalError("couldn't create server client"); - InitClient(serverClient, 0, (pointer) NULL); - } - else - ResetWellKnownSockets(); - clients[0] = serverClient; - currentMaxClients = 1; - - /* Initialize privates before first allocation */ - dixResetPrivates(); - - /* Initialize server client devPrivates, to be reallocated as - * more client privates are registered - */ - if (!dixAllocatePrivates(&serverClient->devPrivates, PRIVATE_CLIENT)) - FatalError("failed to create server client privates"); - - if (!InitClientResources(serverClient)) /* for root resources */ - FatalError("couldn't init server resources"); - - SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]); - screenInfo.numScreens = 0; - - InitAtoms(); - InitEvents(); - InitSelections(); - InitGlyphCaching(); - dixResetRegistry(); - ResetFontPrivateIndex(); - InitCallbackManager(); - InitOutput(&screenInfo, argc, argv); - - if (screenInfo.numScreens < 1) - FatalError("no screens found"); - InitExtensions(argc, argv); - - for (i = 0; i < screenInfo.numGPUScreens; i++) { - ScreenPtr pScreen = screenInfo.gpuscreens[i]; - if (!CreateScratchPixmapsForScreen(pScreen)) - FatalError("failed to create scratch pixmaps"); - } - - for (i = 0; i < screenInfo.numScreens; i++) { - ScreenPtr pScreen = screenInfo.screens[i]; - - if (!CreateScratchPixmapsForScreen(pScreen)) - FatalError("failed to create scratch pixmaps"); - if (pScreen->CreateScreenResources && - !(*pScreen->CreateScreenResources) (pScreen)) - FatalError("failed to create screen resources"); - if (!CreateGCperDepth(i)) - FatalError("failed to create scratch GCs"); - if (!CreateDefaultStipple(i)) - FatalError("failed to create default stipple"); - if (!CreateRootWindow(pScreen)) - FatalError("failed to create root window"); - } - - InitFonts(); - if (SetDefaultFontPath(defaultFontPath) != Success) { - ErrorF("[dix] failed to set default font path '%s'", - defaultFontPath); - } - if (!SetDefaultFont(defaultTextFont)) { - FatalError("could not open default font '%s'", defaultTextFont); - } - - if (!(rootCursor = CreateRootCursor(NULL, 0))) { - FatalError("could not open default cursor font '%s'", - defaultCursorFont); - } - -#ifdef DPMSExtension - /* check all screens, looking for DPMS Capabilities */ - DPMSCapableFlag = DPMSSupported(); - if (!DPMSCapableFlag) - DPMSEnabled = FALSE; -#endif - -#ifdef PANORAMIX - /* - * Consolidate window and colourmap information for each screen - */ - if (!noPanoramiXExtension) - PanoramiXConsolidate(); -#endif - - for (i = 0; i < screenInfo.numScreens; i++) - InitRootWindow(screenInfo.screens[i]->root); - - InitCoreDevices(); - InitInput(argc, argv); - InitAndStartDevices(); - ReserveClientIds(serverClient); - - dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); - -#ifdef PANORAMIX - if (!noPanoramiXExtension) { - if (!PanoramiXCreateConnectionBlock()) { - FatalError("could not create connection block info"); - } - } - else -#endif - { - if (!CreateConnectionBlock()) { - FatalError("could not create connection block info"); - } - } - -#ifdef XQUARTZ - /* Let the other threads know the server is done with its init */ - pthread_mutex_lock(&serverRunningMutex); - serverRunning = TRUE; - pthread_cond_broadcast(&serverRunningCond); - pthread_mutex_unlock(&serverRunningMutex); -#endif - - NotifyParentProcess(); - - Dispatch(); - -#ifdef XQUARTZ - /* Let the other threads know the server is no longer running */ - pthread_mutex_lock(&serverRunningMutex); - serverRunning = FALSE; - pthread_mutex_unlock(&serverRunningMutex); -#endif - - UndisplayDevices(); - DisableAllDevices(); - - /* Now free up whatever must be freed */ - if (screenIsSaved == SCREEN_SAVER_ON) - dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); - FreeScreenSaverTimer(); - CloseDownExtensions(); - -#ifdef PANORAMIX - { - Bool remember_it = noPanoramiXExtension; - - noPanoramiXExtension = TRUE; - FreeAllResources(); - noPanoramiXExtension = remember_it; - } -#else - FreeAllResources(); -#endif - - CloseInput(); - - for (i = 0; i < screenInfo.numScreens; i++) - screenInfo.screens[i]->root = NullWindow; - - CloseDownDevices(); - - CloseDownEvents(); - - for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) { - ScreenPtr pScreen = screenInfo.gpuscreens[i]; - FreeScratchPixmapsForScreen(pScreen); - (*pScreen->CloseScreen) (pScreen); - dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN); - free(pScreen); - screenInfo.numGPUScreens = i; - } - - for (i = screenInfo.numScreens - 1; i >= 0; i--) { - FreeScratchPixmapsForScreen(screenInfo.screens[i]); - FreeGCperDepth(i); - FreeDefaultStipple(i); - dixFreeScreenSpecificPrivates(screenInfo.screens[i]); - (*screenInfo.screens[i]->CloseScreen) (screenInfo.screens[i]); - dixFreePrivates(screenInfo.screens[i]->devPrivates, PRIVATE_SCREEN); - free(screenInfo.screens[i]); - screenInfo.numScreens = i; - } - - ReleaseClientIds(serverClient); - dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT); - serverClient->devPrivates = NULL; - - FreeFonts(); - - FreeAuditTimer(); - - if (dispatchException & DE_TERMINATE) { - CloseWellKnownConnections(); - } - - OsCleanup((dispatchException & DE_TERMINATE) != 0); - - if (dispatchException & DE_TERMINATE) { - ddxGiveUp(EXIT_NO_ERROR); - break; - } - - free(ConnectionInfo); - ConnectionInfo = NULL; - } - return 0; + return dix_main(argc, argv, envp); } diff --git a/glx/Makefile.am b/glx/Makefile.am index 591c4ac66..c699581e0 100644 --- a/glx/Makefile.am +++ b/glx/Makefile.am @@ -38,11 +38,8 @@ glapi_sources = \ indirect_table.c \ dispatch.h \ glapitable.h \ - glapi.c \ glapi.h \ glapi_gentable.c \ - glprocs.h \ - glthread.c \ glthread.h libglxdri_la_SOURCES = diff --git a/glx/glapi.c b/glx/glapi.c deleted file mode 100644 index 02e06ac1e..000000000 --- a/glx/glapi.c +++ /dev/null @@ -1,504 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file manages the OpenGL API dispatch layer. There are functions - * to set/get the current dispatch table for the current thread and to - * manage registration/dispatch of dynamically added extension functions. - * - * This code was originally general enough to be shared with Mesa, but - * they diverged long ago, so this is now just enough support to make - * indirect GLX work. - */ - -#include <dix-config.h> -#include <X11/Xfuncproto.h> -#include <os.h> -#define PUBLIC _X_EXPORT - -#include <stdlib.h> -#include <string.h> -#ifdef DEBUG -#include <assert.h> -#endif - -#include "glapi.h" -#include "dispatch.h" -#include "glapitable.h" - -#define FIRST_DYNAMIC_OFFSET (sizeof(struct _glapi_table) / sizeof(void *)) - -#if defined(PTHREADS) || defined(GLX_USE_TLS) -static void init_glapi_relocs(void); -#endif - -/** - * \name Current dispatch and current context control variables - * - * Depending on whether or not multithreading is support, and the type of - * support available, several variables are used to store the current context - * pointer and the current dispatch table pointer. In the non-threaded case, - * the variables \c _glapi_Dispatch and \c _glapi_Context are used for this - * purpose. - * - * In the "normal" threaded case, the variables \c _glapi_Dispatch and - * \c _glapi_Context will be \c NULL if an application is detected as being - * multithreaded. Single-threaded applications will use \c _glapi_Dispatch - * and \c _glapi_Context just like the case without any threading support. - * When \c _glapi_Dispatch and \c _glapi_Context are \c NULL, the thread state - * data \c _gl_DispatchTSD and \c ContextTSD are used. Drivers and the - * static dispatch functions access these variables via \c _glapi_get_dispatch - * and \c _glapi_get_context. - * - * In the TLS case, the variables \c _glapi_Dispatch and \c _glapi_Context are - * hardcoded to \c NULL. Instead the TLS variables \c _glapi_tls_Dispatch and - * \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and - * \c _glapi_Context be hardcoded to \c NULL maintains binary compatability - * between TLS enabled loaders and non-TLS DRI drivers. - */ -/*@{*/ -#if defined(GLX_USE_TLS) - -PUBLIC TLS struct _glapi_table *_glapi_tls_Dispatch = NULL; - -PUBLIC TLS void *_glapi_tls_Context; - -PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL; -PUBLIC const void *_glapi_Context = NULL; - -#else - -#if defined(THREADS) - -_glthread_TSD _gl_DispatchTSD; /**< Per-thread dispatch pointer */ -static _glthread_TSD ContextTSD; /**< Per-thread context pointer */ - -#if defined(WIN32_THREADS) -void FreeTSD(_glthread_TSD * p); -void -FreeAllTSD(void) -{ - FreeTSD(&_gl_DispatchTSD); - FreeTSD(&ContextTSD); -} -#endif /* defined(WIN32_THREADS) */ - -#endif /* defined(THREADS) */ - -PUBLIC struct _glapi_table *_glapi_Dispatch = NULL; -PUBLIC void *_glapi_Context = NULL; - -#endif /* defined(GLX_USE_TLS) */ -/*@}*/ - -/* - * xserver's gl is not multithreaded, we promise. - */ -PUBLIC void -_glapi_check_multithread(void) -{ -} - -/** - * Set the current context pointer for this thread. - * The context pointer is an opaque type which should be cast to - * void from the real context pointer type. - */ -PUBLIC void -_glapi_set_context(void *context) -{ -#if defined(GLX_USE_TLS) - _glapi_tls_Context = context; -#elif defined(THREADS) - _glthread_SetTSD(&ContextTSD, context); - _glapi_Context = context; -#else - _glapi_Context = context; -#endif -} - -/** - * Get the current context pointer for this thread. - * The context pointer is an opaque type which should be cast from - * void to the real context pointer type. - */ -PUBLIC void * -_glapi_get_context(void) -{ -#if defined(GLX_USE_TLS) - return _glapi_tls_Context; -#else - return _glapi_Context; -#endif -} - -/** - * Set the global or per-thread dispatch table pointer. - */ -PUBLIC void -_glapi_set_dispatch(struct _glapi_table *dispatch) -{ -#if defined(PTHREADS) || defined(GLX_USE_TLS) - static pthread_once_t once_control = PTHREAD_ONCE_INIT; - - pthread_once(&once_control, init_glapi_relocs); -#endif - -#if defined(GLX_USE_TLS) - _glapi_tls_Dispatch = dispatch; -#elif defined(THREADS) - _glthread_SetTSD(&_gl_DispatchTSD, (void *) dispatch); - _glapi_Dispatch = dispatch; -#else /*THREADS*/ - _glapi_Dispatch = dispatch; -#endif /*THREADS*/ -} - -/** - * Return pointer to current dispatch table for calling thread. - */ -PUBLIC struct _glapi_table * -_glapi_get_dispatch(void) -{ - struct _glapi_table *api; - -#if defined(GLX_USE_TLS) - api = _glapi_tls_Dispatch; -#else - api = _glapi_Dispatch; -#endif - return api; -} - -/*** - *** The rest of this file is pretty much concerned with GetProcAddress - *** functionality. - ***/ - -#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS) -#define DISPATCH_FUNCTION_SIZE 16 -#elif defined(USE_X86_ASM) -#if defined(THREADS) && !defined(GLX_USE_TLS) -#define DISPATCH_FUNCTION_SIZE 32 -#else -#define DISPATCH_FUNCTION_SIZE 16 -#endif -#endif - -/* The code in this file is auto-generated with Python */ -#include "glprocs.h" - -/** - * Search the table of static entrypoint functions for the named function - * and return the corresponding glprocs_table_t entry. - */ -static const glprocs_table_t * -find_entry(const char *n) -{ - GLuint i; - - for (i = 0; static_functions[i].Name_offset >= 0; i++) { - const char *testName = - gl_string_table + static_functions[i].Name_offset; - if (strcmp(testName, n) == 0) { - return &static_functions[i]; - } - } - return NULL; -} - -/** - * Return dispatch table offset of the named static (built-in) function. - * Return -1 if function not found. - */ -static GLint -get_static_proc_offset(const char *funcName) -{ - const glprocs_table_t *const f = find_entry(funcName); - - if (f) { - return f->Offset; - } - return -1; -} - -/********************************************************************** - * Extension function management. - */ - -/* - * Number of extension functions which we can dynamically add at runtime. - */ -#define MAX_EXTENSION_FUNCS 300 - -/* - * The dispatch table size (number of entries) is the size of the - * _glapi_table struct plus the number of dynamic entries we can add. - * The extra slots can be filled in by DRI drivers that register new extension - * functions. - */ -#define DISPATCH_TABLE_SIZE (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS) - -/** - * Track information about a function added to the GL API. - */ -struct _glapi_function { - /** - * Name of the function. - */ - const char *name; - - /** - * Text string that describes the types of the parameters passed to the - * named function. Parameter types are converted to characters using the - * following rules: - * - 'i' for \c GLint, \c GLuint, and \c GLenum - * - 'p' for any pointer type - * - 'f' for \c GLfloat and \c GLclampf - * - 'd' for \c GLdouble and \c GLclampd - */ - const char *parameter_signature; - - /** - * Offset in the dispatch table where the pointer to the real function is - * located. If the driver has not requested that the named function be - * added to the dispatch table, this will have the value ~0. - */ - unsigned dispatch_offset; -}; - -static struct _glapi_function ExtEntryTable[MAX_EXTENSION_FUNCS]; -static GLuint NumExtEntryPoints = 0; - -/** - * Generate new entrypoint - * - * Use a temporary dispatch offset of ~0 (i.e. -1). Later, when the driver - * calls \c _glapi_add_dispatch we'll put in the proper offset. If that - * never happens, and the user calls this function, he'll segfault. That's - * what you get when you try calling a GL function that doesn't really exist. - * - * \param funcName Name of the function to create an entry-point for. - * - * \sa _glapi_add_entrypoint - */ - -static struct _glapi_function * -add_function_name(const char *funcName) -{ - struct _glapi_function *entry = NULL; - - if (NumExtEntryPoints < MAX_EXTENSION_FUNCS) { - entry = &ExtEntryTable[NumExtEntryPoints]; - - ExtEntryTable[NumExtEntryPoints].name = strdup(funcName); - ExtEntryTable[NumExtEntryPoints].parameter_signature = NULL; - ExtEntryTable[NumExtEntryPoints].dispatch_offset = ~0; - NumExtEntryPoints++; - } - - return entry; -} - -/** - * Fill-in the dispatch stub for the named function. - * - * This function is intended to be called by a hardware driver. When called, - * a dispatch stub may be created created for the function. A pointer to this - * dispatch function will be returned by glXGetProcAddress. - * - * \param function_names Array of pointers to function names that should - * share a common dispatch offset. - * \param parameter_signature String representing the types of the parameters - * passed to the named function. Parameter types - * are converted to characters using the following - * rules: - * - 'i' for \c GLint, \c GLuint, and \c GLenum - * - 'p' for any pointer type - * - 'f' for \c GLfloat and \c GLclampf - * - 'd' for \c GLdouble and \c GLclampd - * - * \returns - * The offset in the dispatch table of the named function. A pointer to the - * driver's implementation of the named function should be stored at - * \c dispatch_table[\c offset]. - * - * \sa glXGetProcAddress - * - * \warning - * This function can only handle up to 8 names at a time. As far as I know, - * the maximum number of names ever associated with an existing GL function is - * 4 (\c glPointParameterfSGIS, \c glPointParameterfEXT, - * \c glPointParameterfARB, and \c glPointParameterf), so this should not be - * too painful of a limitation. - * - * \todo - * Determine whether or not \c parameter_signature should be allowed to be - * \c NULL. It doesn't seem like much of a hardship for drivers to have to - * pass in an empty string. - * - * \todo - * Determine if code should be added to reject function names that start with - * 'glX'. - * - * \bug - * Add code to compare \c parameter_signature with the parameter signature of - * a static function. In order to do that, we need to find a way to \b get - * the parameter signature of a static function. - */ - -PUBLIC int -_glapi_add_dispatch(const char *const *function_names, - const char *parameter_signature) -{ - static int next_dynamic_offset = FIRST_DYNAMIC_OFFSET; - const char *const real_sig = (parameter_signature != NULL) - ? parameter_signature : ""; - struct _glapi_function *entry[8]; - GLboolean is_static[8]; - unsigned i; - unsigned j; - int offset = ~0; - int new_offset; - - (void) memset(is_static, 0, sizeof(is_static)); - (void) memset(entry, 0, sizeof(entry)); - - for (i = 0; function_names[i] != NULL; i++) { - /* Do some trivial validation on the name of the function. */ - - if (function_names[i][0] != 'g' || function_names[i][1] != 'l') - return GL_FALSE; - - /* Determine if the named function already exists. If the function does - * exist, it must have the same parameter signature as the function - * being added. - */ - - new_offset = get_static_proc_offset(function_names[i]); - if (new_offset >= 0) { - /* FIXME: Make sure the parameter signatures match! How do we get - * FIXME: the parameter signature for static functions? - */ - - if ((offset != ~0) && (new_offset != offset)) { - return -1; - } - - is_static[i] = GL_TRUE; - offset = new_offset; - } - - for (j = 0; j < NumExtEntryPoints; j++) { - if (strcmp(ExtEntryTable[j].name, function_names[i]) == 0) { - /* The offset may be ~0 if the function name was added by - * glXGetProcAddress but never filled in by the driver. - */ - - if (ExtEntryTable[j].dispatch_offset != ~0) { - if (strcmp(real_sig, ExtEntryTable[j].parameter_signature) - != 0) - return -1; - - if ((offset != ~0) && - (ExtEntryTable[j].dispatch_offset != offset)) { - return -1; - } - - offset = ExtEntryTable[j].dispatch_offset; - } - - entry[i] = &ExtEntryTable[j]; - break; - } - } - } - - if (offset == ~0) { - offset = next_dynamic_offset; - next_dynamic_offset++; - } - - for (i = 0; function_names[i] != NULL; i++) { - if (!is_static[i]) { - if (entry[i] == NULL) { - entry[i] = add_function_name(function_names[i]); - if (entry[i] == NULL) - return -1; - } - - entry[i]->parameter_signature = strdup(real_sig); - entry[i]->dispatch_offset = offset; - } - } - - return offset; -} - -/* - * glXGetProcAddress doesn't exist in the protocol, the drivers never call - * this themselves, and neither does the server. warn if it happens though. - */ -PUBLIC _glapi_proc -_glapi_get_proc_address(const char *funcName) -{ - ErrorF("_glapi_get_proc_address called!\n"); - return NULL; -} - -/** - * Return size of dispatch table struct as number of functions (or - * slots). - */ -PUBLIC GLuint -_glapi_get_dispatch_table_size(void) -{ - return DISPATCH_TABLE_SIZE; -} - -#if defined(PTHREADS) || defined(GLX_USE_TLS) -/** - * Perform platform-specific GL API entry-point fixups. - */ -static void -init_glapi_relocs(void) -{ -#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT) - extern unsigned long _x86_get_dispatch(void); - - char run_time_patch[] = { - 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */ - }; - GLuint *offset = (GLuint *) & run_time_patch[2]; /* 32-bits for x86/32 */ - const GLubyte *const get_disp = (const GLubyte *) run_time_patch; - GLubyte *curr_func = (GLubyte *) gl_dispatch_functions_start; - - *offset = _x86_get_dispatch(); - while (curr_func != (GLubyte *) gl_dispatch_functions_end) { - (void) memcpy(curr_func, get_disp, sizeof(run_time_patch)); - curr_func += DISPATCH_FUNCTION_SIZE; - } -#endif -} -#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */ diff --git a/glx/glprocs.h b/glx/glprocs.h deleted file mode 100644 index 87063642c..000000000 --- a/glx/glprocs.h +++ /dev/null @@ -1,3534 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gl_procs.py (from Mesa) script */ - -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * (C) Copyright IBM Corporation 2004, 2006 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL, IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* This file is only included by glapi.c and is used for - * the GetProcAddress() function - */ - -typedef struct { - GLint Name_offset; -#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) - _glapi_proc Address; -#endif - GLuint Offset; -} glprocs_table_t; - -#if !defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING) -#define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , o } -#elif defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING) -#define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f1 , o } -#elif defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING) -#define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f2 , o } -#elif !defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING) -#define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f3 , o } -#endif - -static const char gl_string_table[] = - "glNewList\0" - "glEndList\0" - "glCallList\0" - "glCallLists\0" - "glDeleteLists\0" - "glGenLists\0" - "glListBase\0" - "glBegin\0" - "glBitmap\0" - "glColor3b\0" - "glColor3bv\0" - "glColor3d\0" - "glColor3dv\0" - "glColor3f\0" - "glColor3fv\0" - "glColor3i\0" - "glColor3iv\0" - "glColor3s\0" - "glColor3sv\0" - "glColor3ub\0" - "glColor3ubv\0" - "glColor3ui\0" - "glColor3uiv\0" - "glColor3us\0" - "glColor3usv\0" - "glColor4b\0" - "glColor4bv\0" - "glColor4d\0" - "glColor4dv\0" - "glColor4f\0" - "glColor4fv\0" - "glColor4i\0" - "glColor4iv\0" - "glColor4s\0" - "glColor4sv\0" - "glColor4ub\0" - "glColor4ubv\0" - "glColor4ui\0" - "glColor4uiv\0" - "glColor4us\0" - "glColor4usv\0" - "glEdgeFlag\0" - "glEdgeFlagv\0" - "glEnd\0" - "glIndexd\0" - "glIndexdv\0" - "glIndexf\0" - "glIndexfv\0" - "glIndexi\0" - "glIndexiv\0" - "glIndexs\0" - "glIndexsv\0" - "glNormal3b\0" - "glNormal3bv\0" - "glNormal3d\0" - "glNormal3dv\0" - "glNormal3f\0" - "glNormal3fv\0" - "glNormal3i\0" - "glNormal3iv\0" - "glNormal3s\0" - "glNormal3sv\0" - "glRasterPos2d\0" - "glRasterPos2dv\0" - "glRasterPos2f\0" - "glRasterPos2fv\0" - "glRasterPos2i\0" - "glRasterPos2iv\0" - "glRasterPos2s\0" - "glRasterPos2sv\0" - "glRasterPos3d\0" - "glRasterPos3dv\0" - "glRasterPos3f\0" - "glRasterPos3fv\0" - "glRasterPos3i\0" - "glRasterPos3iv\0" - "glRasterPos3s\0" - "glRasterPos3sv\0" - "glRasterPos4d\0" - "glRasterPos4dv\0" - "glRasterPos4f\0" - "glRasterPos4fv\0" - "glRasterPos4i\0" - "glRasterPos4iv\0" - "glRasterPos4s\0" - "glRasterPos4sv\0" - "glRectd\0" - "glRectdv\0" - "glRectf\0" - "glRectfv\0" - "glRecti\0" - "glRectiv\0" - "glRects\0" - "glRectsv\0" - "glTexCoord1d\0" - "glTexCoord1dv\0" - "glTexCoord1f\0" - "glTexCoord1fv\0" - "glTexCoord1i\0" - "glTexCoord1iv\0" - "glTexCoord1s\0" - "glTexCoord1sv\0" - "glTexCoord2d\0" - "glTexCoord2dv\0" - "glTexCoord2f\0" - "glTexCoord2fv\0" - "glTexCoord2i\0" - "glTexCoord2iv\0" - "glTexCoord2s\0" - "glTexCoord2sv\0" - "glTexCoord3d\0" - "glTexCoord3dv\0" - "glTexCoord3f\0" - "glTexCoord3fv\0" - "glTexCoord3i\0" - "glTexCoord3iv\0" - "glTexCoord3s\0" - "glTexCoord3sv\0" - "glTexCoord4d\0" - "glTexCoord4dv\0" - "glTexCoord4f\0" - "glTexCoord4fv\0" - "glTexCoord4i\0" - "glTexCoord4iv\0" - "glTexCoord4s\0" - "glTexCoord4sv\0" - "glVertex2d\0" - "glVertex2dv\0" - "glVertex2f\0" - "glVertex2fv\0" - "glVertex2i\0" - "glVertex2iv\0" - "glVertex2s\0" - "glVertex2sv\0" - "glVertex3d\0" - "glVertex3dv\0" - "glVertex3f\0" - "glVertex3fv\0" - "glVertex3i\0" - "glVertex3iv\0" - "glVertex3s\0" - "glVertex3sv\0" - "glVertex4d\0" - "glVertex4dv\0" - "glVertex4f\0" - "glVertex4fv\0" - "glVertex4i\0" - "glVertex4iv\0" - "glVertex4s\0" - "glVertex4sv\0" - "glClipPlane\0" - "glColorMaterial\0" - "glCullFace\0" - "glFogf\0" - "glFogfv\0" - "glFogi\0" - "glFogiv\0" - "glFrontFace\0" - "glHint\0" - "glLightf\0" - "glLightfv\0" - "glLighti\0" - "glLightiv\0" - "glLightModelf\0" - "glLightModelfv\0" - "glLightModeli\0" - "glLightModeliv\0" - "glLineStipple\0" - "glLineWidth\0" - "glMaterialf\0" - "glMaterialfv\0" - "glMateriali\0" - "glMaterialiv\0" - "glPointSize\0" - "glPolygonMode\0" - "glPolygonStipple\0" - "glScissor\0" - "glShadeModel\0" - "glTexParameterf\0" - "glTexParameterfv\0" - "glTexParameteri\0" - "glTexParameteriv\0" - "glTexImage1D\0" - "glTexImage2D\0" - "glTexEnvf\0" - "glTexEnvfv\0" - "glTexEnvi\0" - "glTexEnviv\0" - "glTexGend\0" - "glTexGendv\0" - "glTexGenf\0" - "glTexGenfv\0" - "glTexGeni\0" - "glTexGeniv\0" - "glFeedbackBuffer\0" - "glSelectBuffer\0" - "glRenderMode\0" - "glInitNames\0" - "glLoadName\0" - "glPassThrough\0" - "glPopName\0" - "glPushName\0" - "glDrawBuffer\0" - "glClear\0" - "glClearAccum\0" - "glClearIndex\0" - "glClearColor\0" - "glClearStencil\0" - "glClearDepth\0" - "glStencilMask\0" - "glColorMask\0" - "glDepthMask\0" - "glIndexMask\0" - "glAccum\0" - "glDisable\0" - "glEnable\0" - "glFinish\0" - "glFlush\0" - "glPopAttrib\0" - "glPushAttrib\0" - "glMap1d\0" - "glMap1f\0" - "glMap2d\0" - "glMap2f\0" - "glMapGrid1d\0" - "glMapGrid1f\0" - "glMapGrid2d\0" - "glMapGrid2f\0" - "glEvalCoord1d\0" - "glEvalCoord1dv\0" - "glEvalCoord1f\0" - "glEvalCoord1fv\0" - "glEvalCoord2d\0" - "glEvalCoord2dv\0" - "glEvalCoord2f\0" - "glEvalCoord2fv\0" - "glEvalMesh1\0" - "glEvalPoint1\0" - "glEvalMesh2\0" - "glEvalPoint2\0" - "glAlphaFunc\0" - "glBlendFunc\0" - "glLogicOp\0" - "glStencilFunc\0" - "glStencilOp\0" - "glDepthFunc\0" - "glPixelZoom\0" - "glPixelTransferf\0" - "glPixelTransferi\0" - "glPixelStoref\0" - "glPixelStorei\0" - "glPixelMapfv\0" - "glPixelMapuiv\0" - "glPixelMapusv\0" - "glReadBuffer\0" - "glCopyPixels\0" - "glReadPixels\0" - "glDrawPixels\0" - "glGetBooleanv\0" - "glGetClipPlane\0" - "glGetDoublev\0" - "glGetError\0" - "glGetFloatv\0" - "glGetIntegerv\0" - "glGetLightfv\0" - "glGetLightiv\0" - "glGetMapdv\0" - "glGetMapfv\0" - "glGetMapiv\0" - "glGetMaterialfv\0" - "glGetMaterialiv\0" - "glGetPixelMapfv\0" - "glGetPixelMapuiv\0" - "glGetPixelMapusv\0" - "glGetPolygonStipple\0" - "glGetString\0" - "glGetTexEnvfv\0" - "glGetTexEnviv\0" - "glGetTexGendv\0" - "glGetTexGenfv\0" - "glGetTexGeniv\0" - "glGetTexImage\0" - "glGetTexParameterfv\0" - "glGetTexParameteriv\0" - "glGetTexLevelParameterfv\0" - "glGetTexLevelParameteriv\0" - "glIsEnabled\0" - "glIsList\0" - "glDepthRange\0" - "glFrustum\0" - "glLoadIdentity\0" - "glLoadMatrixf\0" - "glLoadMatrixd\0" - "glMatrixMode\0" - "glMultMatrixf\0" - "glMultMatrixd\0" - "glOrtho\0" - "glPopMatrix\0" - "glPushMatrix\0" - "glRotated\0" - "glRotatef\0" - "glScaled\0" - "glScalef\0" - "glTranslated\0" - "glTranslatef\0" - "glViewport\0" - "glArrayElement\0" - "glBindTexture\0" - "glColorPointer\0" - "glDisableClientState\0" - "glDrawArrays\0" - "glDrawElements\0" - "glEdgeFlagPointer\0" - "glEnableClientState\0" - "glIndexPointer\0" - "glIndexub\0" - "glIndexubv\0" - "glInterleavedArrays\0" - "glNormalPointer\0" - "glPolygonOffset\0" - "glTexCoordPointer\0" - "glVertexPointer\0" - "glAreTexturesResident\0" - "glCopyTexImage1D\0" - "glCopyTexImage2D\0" - "glCopyTexSubImage1D\0" - "glCopyTexSubImage2D\0" - "glDeleteTextures\0" - "glGenTextures\0" - "glGetPointerv\0" - "glIsTexture\0" - "glPrioritizeTextures\0" - "glTexSubImage1D\0" - "glTexSubImage2D\0" - "glPopClientAttrib\0" - "glPushClientAttrib\0" - "glBlendColor\0" - "glBlendEquation\0" - "glDrawRangeElements\0" - "glColorTable\0" - "glColorTableParameterfv\0" - "glColorTableParameteriv\0" - "glCopyColorTable\0" - "glGetColorTable\0" - "glGetColorTableParameterfv\0" - "glGetColorTableParameteriv\0" - "glColorSubTable\0" - "glCopyColorSubTable\0" - "glConvolutionFilter1D\0" - "glConvolutionFilter2D\0" - "glConvolutionParameterf\0" - "glConvolutionParameterfv\0" - "glConvolutionParameteri\0" - "glConvolutionParameteriv\0" - "glCopyConvolutionFilter1D\0" - "glCopyConvolutionFilter2D\0" - "glGetConvolutionFilter\0" - "glGetConvolutionParameterfv\0" - "glGetConvolutionParameteriv\0" - "glGetSeparableFilter\0" - "glSeparableFilter2D\0" - "glGetHistogram\0" - "glGetHistogramParameterfv\0" - "glGetHistogramParameteriv\0" - "glGetMinmax\0" - "glGetMinmaxParameterfv\0" - "glGetMinmaxParameteriv\0" - "glHistogram\0" - "glMinmax\0" - "glResetHistogram\0" - "glResetMinmax\0" - "glTexImage3D\0" - "glTexSubImage3D\0" - "glCopyTexSubImage3D\0" - "glActiveTextureARB\0" - "glClientActiveTextureARB\0" - "glMultiTexCoord1dARB\0" - "glMultiTexCoord1dvARB\0" - "glMultiTexCoord1fARB\0" - "glMultiTexCoord1fvARB\0" - "glMultiTexCoord1iARB\0" - "glMultiTexCoord1ivARB\0" - "glMultiTexCoord1sARB\0" - "glMultiTexCoord1svARB\0" - "glMultiTexCoord2dARB\0" - "glMultiTexCoord2dvARB\0" - "glMultiTexCoord2fARB\0" - "glMultiTexCoord2fvARB\0" - "glMultiTexCoord2iARB\0" - "glMultiTexCoord2ivARB\0" - "glMultiTexCoord2sARB\0" - "glMultiTexCoord2svARB\0" - "glMultiTexCoord3dARB\0" - "glMultiTexCoord3dvARB\0" - "glMultiTexCoord3fARB\0" - "glMultiTexCoord3fvARB\0" - "glMultiTexCoord3iARB\0" - "glMultiTexCoord3ivARB\0" - "glMultiTexCoord3sARB\0" - "glMultiTexCoord3svARB\0" - "glMultiTexCoord4dARB\0" - "glMultiTexCoord4dvARB\0" - "glMultiTexCoord4fARB\0" - "glMultiTexCoord4fvARB\0" - "glMultiTexCoord4iARB\0" - "glMultiTexCoord4ivARB\0" - "glMultiTexCoord4sARB\0" - "glMultiTexCoord4svARB\0" - "glAttachShader\0" - "glCreateProgram\0" - "glCreateShader\0" - "glDeleteProgram\0" - "glDeleteShader\0" - "glDetachShader\0" - "glGetAttachedShaders\0" - "glGetProgramInfoLog\0" - "glGetProgramiv\0" - "glGetShaderInfoLog\0" - "glGetShaderiv\0" - "glIsProgram\0" - "glIsShader\0" - "glStencilFuncSeparate\0" - "glStencilMaskSeparate\0" - "glStencilOpSeparate\0" - "glUniformMatrix2x3fv\0" - "glUniformMatrix2x4fv\0" - "glUniformMatrix3x2fv\0" - "glUniformMatrix3x4fv\0" - "glUniformMatrix4x2fv\0" - "glUniformMatrix4x3fv\0" - "glClampColor\0" - "glClearBufferfi\0" - "glClearBufferfv\0" - "glClearBufferiv\0" - "glClearBufferuiv\0" - "glGetStringi\0" - "glTexBuffer\0" - "glFramebufferTexture\0" - "glGetBufferParameteri64v\0" - "glGetInteger64i_v\0" - "glVertexAttribDivisor\0" - "glLoadTransposeMatrixdARB\0" - "glLoadTransposeMatrixfARB\0" - "glMultTransposeMatrixdARB\0" - "glMultTransposeMatrixfARB\0" - "glSampleCoverageARB\0" - "glCompressedTexImage1DARB\0" - "glCompressedTexImage2DARB\0" - "glCompressedTexImage3DARB\0" - "glCompressedTexSubImage1DARB\0" - "glCompressedTexSubImage2DARB\0" - "glCompressedTexSubImage3DARB\0" - "glGetCompressedTexImageARB\0" - "glDisableVertexAttribArrayARB\0" - "glEnableVertexAttribArrayARB\0" - "glGetProgramEnvParameterdvARB\0" - "glGetProgramEnvParameterfvARB\0" - "glGetProgramLocalParameterdvARB\0" - "glGetProgramLocalParameterfvARB\0" - "glGetProgramStringARB\0" - "glGetProgramivARB\0" - "glGetVertexAttribdvARB\0" - "glGetVertexAttribfvARB\0" - "glGetVertexAttribivARB\0" - "glProgramEnvParameter4dARB\0" - "glProgramEnvParameter4dvARB\0" - "glProgramEnvParameter4fARB\0" - "glProgramEnvParameter4fvARB\0" - "glProgramLocalParameter4dARB\0" - "glProgramLocalParameter4dvARB\0" - "glProgramLocalParameter4fARB\0" - "glProgramLocalParameter4fvARB\0" - "glProgramStringARB\0" - "glVertexAttrib1dARB\0" - "glVertexAttrib1dvARB\0" - "glVertexAttrib1fARB\0" - "glVertexAttrib1fvARB\0" - "glVertexAttrib1sARB\0" - "glVertexAttrib1svARB\0" - "glVertexAttrib2dARB\0" - "glVertexAttrib2dvARB\0" - "glVertexAttrib2fARB\0" - "glVertexAttrib2fvARB\0" - "glVertexAttrib2sARB\0" - "glVertexAttrib2svARB\0" - "glVertexAttrib3dARB\0" - "glVertexAttrib3dvARB\0" - "glVertexAttrib3fARB\0" - "glVertexAttrib3fvARB\0" - "glVertexAttrib3sARB\0" - "glVertexAttrib3svARB\0" - "glVertexAttrib4NbvARB\0" - "glVertexAttrib4NivARB\0" - "glVertexAttrib4NsvARB\0" - "glVertexAttrib4NubARB\0" - "glVertexAttrib4NubvARB\0" - "glVertexAttrib4NuivARB\0" - "glVertexAttrib4NusvARB\0" - "glVertexAttrib4bvARB\0" - "glVertexAttrib4dARB\0" - "glVertexAttrib4dvARB\0" - "glVertexAttrib4fARB\0" - "glVertexAttrib4fvARB\0" - "glVertexAttrib4ivARB\0" - "glVertexAttrib4sARB\0" - "glVertexAttrib4svARB\0" - "glVertexAttrib4ubvARB\0" - "glVertexAttrib4uivARB\0" - "glVertexAttrib4usvARB\0" - "glVertexAttribPointerARB\0" - "glBindBufferARB\0" - "glBufferDataARB\0" - "glBufferSubDataARB\0" - "glDeleteBuffersARB\0" - "glGenBuffersARB\0" - "glGetBufferParameterivARB\0" - "glGetBufferPointervARB\0" - "glGetBufferSubDataARB\0" - "glIsBufferARB\0" - "glMapBufferARB\0" - "glUnmapBufferARB\0" - "glBeginQueryARB\0" - "glDeleteQueriesARB\0" - "glEndQueryARB\0" - "glGenQueriesARB\0" - "glGetQueryObjectivARB\0" - "glGetQueryObjectuivARB\0" - "glGetQueryivARB\0" - "glIsQueryARB\0" - "glAttachObjectARB\0" - "glCompileShaderARB\0" - "glCreateProgramObjectARB\0" - "glCreateShaderObjectARB\0" - "glDeleteObjectARB\0" - "glDetachObjectARB\0" - "glGetActiveUniformARB\0" - "glGetAttachedObjectsARB\0" - "glGetHandleARB\0" - "glGetInfoLogARB\0" - "glGetObjectParameterfvARB\0" - "glGetObjectParameterivARB\0" - "glGetShaderSourceARB\0" - "glGetUniformLocationARB\0" - "glGetUniformfvARB\0" - "glGetUniformivARB\0" - "glLinkProgramARB\0" - "glShaderSourceARB\0" - "glUniform1fARB\0" - "glUniform1fvARB\0" - "glUniform1iARB\0" - "glUniform1ivARB\0" - "glUniform2fARB\0" - "glUniform2fvARB\0" - "glUniform2iARB\0" - "glUniform2ivARB\0" - "glUniform3fARB\0" - "glUniform3fvARB\0" - "glUniform3iARB\0" - "glUniform3ivARB\0" - "glUniform4fARB\0" - "glUniform4fvARB\0" - "glUniform4iARB\0" - "glUniform4ivARB\0" - "glUniformMatrix2fvARB\0" - "glUniformMatrix3fvARB\0" - "glUniformMatrix4fvARB\0" - "glUseProgramObjectARB\0" - "glValidateProgramARB\0" - "glBindAttribLocationARB\0" - "glGetActiveAttribARB\0" - "glGetAttribLocationARB\0" - "glDrawBuffersARB\0" - "glClampColorARB\0" - "glDrawArraysInstancedARB\0" - "glDrawElementsInstancedARB\0" - "glRenderbufferStorageMultisample\0" - "glFramebufferTextureARB\0" - "glFramebufferTextureFaceARB\0" - "glProgramParameteriARB\0" - "glVertexAttribDivisorARB\0" - "glFlushMappedBufferRange\0" - "glMapBufferRange\0" - "glTexBufferARB\0" - "glBindVertexArray\0" - "glGenVertexArrays\0" - "glCopyBufferSubData\0" - "glClientWaitSync\0" - "glDeleteSync\0" - "glFenceSync\0" - "glGetInteger64v\0" - "glGetSynciv\0" - "glIsSync\0" - "glWaitSync\0" - "glDrawElementsBaseVertex\0" - "glDrawElementsInstancedBaseVertex\0" - "glDrawRangeElementsBaseVertex\0" - "glMultiDrawElementsBaseVertex\0" - "glBlendEquationSeparateiARB\0" - "glBlendEquationiARB\0" - "glBlendFuncSeparateiARB\0" - "glBlendFunciARB\0" - "glBindSampler\0" - "glDeleteSamplers\0" - "glGenSamplers\0" - "glGetSamplerParameterIiv\0" - "glGetSamplerParameterIuiv\0" - "glGetSamplerParameterfv\0" - "glGetSamplerParameteriv\0" - "glIsSampler\0" - "glSamplerParameterIiv\0" - "glSamplerParameterIuiv\0" - "glSamplerParameterf\0" - "glSamplerParameterfv\0" - "glSamplerParameteri\0" - "glSamplerParameteriv\0" - "glColorP3ui\0" - "glColorP3uiv\0" - "glColorP4ui\0" - "glColorP4uiv\0" - "glMultiTexCoordP1ui\0" - "glMultiTexCoordP1uiv\0" - "glMultiTexCoordP2ui\0" - "glMultiTexCoordP2uiv\0" - "glMultiTexCoordP3ui\0" - "glMultiTexCoordP3uiv\0" - "glMultiTexCoordP4ui\0" - "glMultiTexCoordP4uiv\0" - "glNormalP3ui\0" - "glNormalP3uiv\0" - "glSecondaryColorP3ui\0" - "glSecondaryColorP3uiv\0" - "glTexCoordP1ui\0" - "glTexCoordP1uiv\0" - "glTexCoordP2ui\0" - "glTexCoordP2uiv\0" - "glTexCoordP3ui\0" - "glTexCoordP3uiv\0" - "glTexCoordP4ui\0" - "glTexCoordP4uiv\0" - "glVertexAttribP1ui\0" - "glVertexAttribP1uiv\0" - "glVertexAttribP2ui\0" - "glVertexAttribP2uiv\0" - "glVertexAttribP3ui\0" - "glVertexAttribP3uiv\0" - "glVertexAttribP4ui\0" - "glVertexAttribP4uiv\0" - "glVertexP2ui\0" - "glVertexP2uiv\0" - "glVertexP3ui\0" - "glVertexP3uiv\0" - "glVertexP4ui\0" - "glVertexP4uiv\0" - "glBindTransformFeedback\0" - "glDeleteTransformFeedbacks\0" - "glDrawTransformFeedback\0" - "glGenTransformFeedbacks\0" - "glIsTransformFeedback\0" - "glPauseTransformFeedback\0" - "glResumeTransformFeedback\0" - "glClearDepthf\0" - "glDepthRangef\0" - "glGetShaderPrecisionFormat\0" - "glReleaseShaderCompiler\0" - "glShaderBinary\0" - "glGetGraphicsResetStatusARB\0" - "glGetnColorTableARB\0" - "glGetnCompressedTexImageARB\0" - "glGetnConvolutionFilterARB\0" - "glGetnHistogramARB\0" - "glGetnMapdvARB\0" - "glGetnMapfvARB\0" - "glGetnMapivARB\0" - "glGetnMinmaxARB\0" - "glGetnPixelMapfvARB\0" - "glGetnPixelMapuivARB\0" - "glGetnPixelMapusvARB\0" - "glGetnPolygonStippleARB\0" - "glGetnSeparableFilterARB\0" - "glGetnTexImageARB\0" - "glGetnUniformdvARB\0" - "glGetnUniformfvARB\0" - "glGetnUniformivARB\0" - "glGetnUniformuivARB\0" - "glReadnPixelsARB\0" - "glTexStorage1D\0" - "glTexStorage2D\0" - "glTexStorage3D\0" - "glTextureStorage1DEXT\0" - "glTextureStorage2DEXT\0" - "glTextureStorage3DEXT\0" - "glPolygonOffsetEXT\0" - "glGetPixelTexGenParameterfvSGIS\0" - "glGetPixelTexGenParameterivSGIS\0" - "glPixelTexGenParameterfSGIS\0" - "glPixelTexGenParameterfvSGIS\0" - "glPixelTexGenParameteriSGIS\0" - "glPixelTexGenParameterivSGIS\0" - "glSampleMaskSGIS\0" - "glSamplePatternSGIS\0" - "glColorPointerEXT\0" - "glEdgeFlagPointerEXT\0" - "glIndexPointerEXT\0" - "glNormalPointerEXT\0" - "glTexCoordPointerEXT\0" - "glVertexPointerEXT\0" - "glPointParameterfEXT\0" - "glPointParameterfvEXT\0" - "glLockArraysEXT\0" - "glUnlockArraysEXT\0" - "glSecondaryColor3bEXT\0" - "glSecondaryColor3bvEXT\0" - "glSecondaryColor3dEXT\0" - "glSecondaryColor3dvEXT\0" - "glSecondaryColor3fEXT\0" - "glSecondaryColor3fvEXT\0" - "glSecondaryColor3iEXT\0" - "glSecondaryColor3ivEXT\0" - "glSecondaryColor3sEXT\0" - "glSecondaryColor3svEXT\0" - "glSecondaryColor3ubEXT\0" - "glSecondaryColor3ubvEXT\0" - "glSecondaryColor3uiEXT\0" - "glSecondaryColor3uivEXT\0" - "glSecondaryColor3usEXT\0" - "glSecondaryColor3usvEXT\0" - "glSecondaryColorPointerEXT\0" - "glMultiDrawArraysEXT\0" - "glMultiDrawElementsEXT\0" - "glFogCoordPointerEXT\0" - "glFogCoorddEXT\0" - "glFogCoorddvEXT\0" - "glFogCoordfEXT\0" - "glFogCoordfvEXT\0" - "glPixelTexGenSGIX\0" - "glBlendFuncSeparateEXT\0" - "glFlushVertexArrayRangeNV\0" - "glVertexArrayRangeNV\0" - "glCombinerInputNV\0" - "glCombinerOutputNV\0" - "glCombinerParameterfNV\0" - "glCombinerParameterfvNV\0" - "glCombinerParameteriNV\0" - "glCombinerParameterivNV\0" - "glFinalCombinerInputNV\0" - "glGetCombinerInputParameterfvNV\0" - "glGetCombinerInputParameterivNV\0" - "glGetCombinerOutputParameterfvNV\0" - "glGetCombinerOutputParameterivNV\0" - "glGetFinalCombinerInputParameterfvNV\0" - "glGetFinalCombinerInputParameterivNV\0" - "glResizeBuffersMESA\0" - "glWindowPos2dMESA\0" - "glWindowPos2dvMESA\0" - "glWindowPos2fMESA\0" - "glWindowPos2fvMESA\0" - "glWindowPos2iMESA\0" - "glWindowPos2ivMESA\0" - "glWindowPos2sMESA\0" - "glWindowPos2svMESA\0" - "glWindowPos3dMESA\0" - "glWindowPos3dvMESA\0" - "glWindowPos3fMESA\0" - "glWindowPos3fvMESA\0" - "glWindowPos3iMESA\0" - "glWindowPos3ivMESA\0" - "glWindowPos3sMESA\0" - "glWindowPos3svMESA\0" - "glWindowPos4dMESA\0" - "glWindowPos4dvMESA\0" - "glWindowPos4fMESA\0" - "glWindowPos4fvMESA\0" - "glWindowPos4iMESA\0" - "glWindowPos4ivMESA\0" - "glWindowPos4sMESA\0" - "glWindowPos4svMESA\0" - "glMultiModeDrawArraysIBM\0" - "glMultiModeDrawElementsIBM\0" - "glDeleteFencesNV\0" - "glFinishFenceNV\0" - "glGenFencesNV\0" - "glGetFenceivNV\0" - "glIsFenceNV\0" - "glSetFenceNV\0" - "glTestFenceNV\0" - "glAreProgramsResidentNV\0" - "glBindProgramNV\0" - "glDeleteProgramsNV\0" - "glExecuteProgramNV\0" - "glGenProgramsNV\0" - "glGetProgramParameterdvNV\0" - "glGetProgramParameterfvNV\0" - "glGetProgramStringNV\0" - "glGetProgramivNV\0" - "glGetTrackMatrixivNV\0" - "glGetVertexAttribPointervNV\0" - "glGetVertexAttribdvNV\0" - "glGetVertexAttribfvNV\0" - "glGetVertexAttribivNV\0" - "glIsProgramNV\0" - "glLoadProgramNV\0" - "glProgramParameters4dvNV\0" - "glProgramParameters4fvNV\0" - "glRequestResidentProgramsNV\0" - "glTrackMatrixNV\0" - "glVertexAttrib1dNV\0" - "glVertexAttrib1dvNV\0" - "glVertexAttrib1fNV\0" - "glVertexAttrib1fvNV\0" - "glVertexAttrib1sNV\0" - "glVertexAttrib1svNV\0" - "glVertexAttrib2dNV\0" - "glVertexAttrib2dvNV\0" - "glVertexAttrib2fNV\0" - "glVertexAttrib2fvNV\0" - "glVertexAttrib2sNV\0" - "glVertexAttrib2svNV\0" - "glVertexAttrib3dNV\0" - "glVertexAttrib3dvNV\0" - "glVertexAttrib3fNV\0" - "glVertexAttrib3fvNV\0" - "glVertexAttrib3sNV\0" - "glVertexAttrib3svNV\0" - "glVertexAttrib4dNV\0" - "glVertexAttrib4dvNV\0" - "glVertexAttrib4fNV\0" - "glVertexAttrib4fvNV\0" - "glVertexAttrib4sNV\0" - "glVertexAttrib4svNV\0" - "glVertexAttrib4ubNV\0" - "glVertexAttrib4ubvNV\0" - "glVertexAttribPointerNV\0" - "glVertexAttribs1dvNV\0" - "glVertexAttribs1fvNV\0" - "glVertexAttribs1svNV\0" - "glVertexAttribs2dvNV\0" - "glVertexAttribs2fvNV\0" - "glVertexAttribs2svNV\0" - "glVertexAttribs3dvNV\0" - "glVertexAttribs3fvNV\0" - "glVertexAttribs3svNV\0" - "glVertexAttribs4dvNV\0" - "glVertexAttribs4fvNV\0" - "glVertexAttribs4svNV\0" - "glVertexAttribs4ubvNV\0" - "glGetTexBumpParameterfvATI\0" - "glGetTexBumpParameterivATI\0" - "glTexBumpParameterfvATI\0" - "glTexBumpParameterivATI\0" - "glAlphaFragmentOp1ATI\0" - "glAlphaFragmentOp2ATI\0" - "glAlphaFragmentOp3ATI\0" - "glBeginFragmentShaderATI\0" - "glBindFragmentShaderATI\0" - "glColorFragmentOp1ATI\0" - "glColorFragmentOp2ATI\0" - "glColorFragmentOp3ATI\0" - "glDeleteFragmentShaderATI\0" - "glEndFragmentShaderATI\0" - "glGenFragmentShadersATI\0" - "glPassTexCoordATI\0" - "glSampleMapATI\0" - "glSetFragmentShaderConstantATI\0" - "glPointParameteriNV\0" - "glPointParameterivNV\0" - "glActiveStencilFaceEXT\0" - "glBindVertexArrayAPPLE\0" - "glDeleteVertexArraysAPPLE\0" - "glGenVertexArraysAPPLE\0" - "glIsVertexArrayAPPLE\0" - "glGetProgramNamedParameterdvNV\0" - "glGetProgramNamedParameterfvNV\0" - "glProgramNamedParameter4dNV\0" - "glProgramNamedParameter4dvNV\0" - "glProgramNamedParameter4fNV\0" - "glProgramNamedParameter4fvNV\0" - "glPrimitiveRestartIndexNV\0" - "glPrimitiveRestartNV\0" - "glDepthBoundsEXT\0" - "glBlendEquationSeparateEXT\0" - "glBindFramebufferEXT\0" - "glBindRenderbufferEXT\0" - "glCheckFramebufferStatusEXT\0" - "glDeleteFramebuffersEXT\0" - "glDeleteRenderbuffersEXT\0" - "glFramebufferRenderbufferEXT\0" - "glFramebufferTexture1DEXT\0" - "glFramebufferTexture2DEXT\0" - "glFramebufferTexture3DEXT\0" - "glGenFramebuffersEXT\0" - "glGenRenderbuffersEXT\0" - "glGenerateMipmapEXT\0" - "glGetFramebufferAttachmentParameterivEXT\0" - "glGetRenderbufferParameterivEXT\0" - "glIsFramebufferEXT\0" - "glIsRenderbufferEXT\0" - "glRenderbufferStorageEXT\0" - "glBlitFramebufferEXT\0" - "glBufferParameteriAPPLE\0" - "glFlushMappedBufferRangeAPPLE\0" - "glBindFragDataLocationEXT\0" - "glGetFragDataLocationEXT\0" - "glGetUniformuivEXT\0" - "glGetVertexAttribIivEXT\0" - "glGetVertexAttribIuivEXT\0" - "glUniform1uiEXT\0" - "glUniform1uivEXT\0" - "glUniform2uiEXT\0" - "glUniform2uivEXT\0" - "glUniform3uiEXT\0" - "glUniform3uivEXT\0" - "glUniform4uiEXT\0" - "glUniform4uivEXT\0" - "glVertexAttribI1iEXT\0" - "glVertexAttribI1ivEXT\0" - "glVertexAttribI1uiEXT\0" - "glVertexAttribI1uivEXT\0" - "glVertexAttribI2iEXT\0" - "glVertexAttribI2ivEXT\0" - "glVertexAttribI2uiEXT\0" - "glVertexAttribI2uivEXT\0" - "glVertexAttribI3iEXT\0" - "glVertexAttribI3ivEXT\0" - "glVertexAttribI3uiEXT\0" - "glVertexAttribI3uivEXT\0" - "glVertexAttribI4bvEXT\0" - "glVertexAttribI4iEXT\0" - "glVertexAttribI4ivEXT\0" - "glVertexAttribI4svEXT\0" - "glVertexAttribI4ubvEXT\0" - "glVertexAttribI4uiEXT\0" - "glVertexAttribI4uivEXT\0" - "glVertexAttribI4usvEXT\0" - "glVertexAttribIPointerEXT\0" - "glFramebufferTextureLayerEXT\0" - "glColorMaskIndexedEXT\0" - "glDisableIndexedEXT\0" - "glEnableIndexedEXT\0" - "glGetBooleanIndexedvEXT\0" - "glGetIntegerIndexedvEXT\0" - "glIsEnabledIndexedEXT\0" - "glClearColorIiEXT\0" - "glClearColorIuiEXT\0" - "glGetTexParameterIivEXT\0" - "glGetTexParameterIuivEXT\0" - "glTexParameterIivEXT\0" - "glTexParameterIuivEXT\0" - "glBeginConditionalRenderNV\0" - "glEndConditionalRenderNV\0" - "glBeginTransformFeedbackEXT\0" - "glBindBufferBaseEXT\0" - "glBindBufferOffsetEXT\0" - "glBindBufferRangeEXT\0" - "glEndTransformFeedbackEXT\0" - "glGetTransformFeedbackVaryingEXT\0" - "glTransformFeedbackVaryingsEXT\0" - "glProvokingVertexEXT\0" - "glGetTexParameterPointervAPPLE\0" - "glTextureRangeAPPLE\0" - "glGetObjectParameterivAPPLE\0" - "glObjectPurgeableAPPLE\0" - "glObjectUnpurgeableAPPLE\0" - "glActiveProgramEXT\0" - "glCreateShaderProgramEXT\0" - "glUseShaderProgramEXT\0" - "glTextureBarrierNV\0" - "glStencilFuncSeparateATI\0" - "glProgramEnvParameters4fvEXT\0" - "glProgramLocalParameters4fvEXT\0" - "glGetQueryObjecti64vEXT\0" - "glGetQueryObjectui64vEXT\0" - "glEGLImageTargetRenderbufferStorageOES\0" - "glEGLImageTargetTexture2DOES\0" - "glArrayElementEXT\0" - "glBindTextureEXT\0" - "glDrawArraysEXT\0" - "glAreTexturesResidentEXT\0" - "glCopyTexImage1DEXT\0" - "glCopyTexImage2DEXT\0" - "glCopyTexSubImage1DEXT\0" - "glCopyTexSubImage2DEXT\0" - "glDeleteTexturesEXT\0" - "glGenTexturesEXT\0" - "glGetPointervEXT\0" - "glIsTextureEXT\0" - "glPrioritizeTexturesEXT\0" - "glTexSubImage1DEXT\0" - "glTexSubImage2DEXT\0" - "glBlendColorEXT\0" - "glBlendEquationEXT\0" - "glDrawRangeElementsEXT\0" - "glColorTableSGI\0" - "glColorTableEXT\0" - "glColorTableParameterfvSGI\0" - "glColorTableParameterivSGI\0" - "glCopyColorTableSGI\0" - "glGetColorTableSGI\0" - "glGetColorTableEXT\0" - "glGetColorTableParameterfvSGI\0" - "glGetColorTableParameterfvEXT\0" - "glGetColorTableParameterivSGI\0" - "glGetColorTableParameterivEXT\0" - "glColorSubTableEXT\0" - "glCopyColorSubTableEXT\0" - "glConvolutionFilter1DEXT\0" - "glConvolutionFilter2DEXT\0" - "glConvolutionParameterfEXT\0" - "glConvolutionParameterfvEXT\0" - "glConvolutionParameteriEXT\0" - "glConvolutionParameterivEXT\0" - "glCopyConvolutionFilter1DEXT\0" - "glCopyConvolutionFilter2DEXT\0" - "glGetConvolutionFilterEXT\0" - "glGetConvolutionParameterfvEXT\0" - "glGetConvolutionParameterivEXT\0" - "glGetSeparableFilterEXT\0" - "glSeparableFilter2DEXT\0" - "glGetHistogramEXT\0" - "glGetHistogramParameterfvEXT\0" - "glGetHistogramParameterivEXT\0" - "glGetMinmaxEXT\0" - "glGetMinmaxParameterfvEXT\0" - "glGetMinmaxParameterivEXT\0" - "glHistogramEXT\0" - "glMinmaxEXT\0" - "glResetHistogramEXT\0" - "glResetMinmaxEXT\0" - "glTexImage3DEXT\0" - "glTexSubImage3DEXT\0" - "glCopyTexSubImage3DEXT\0" - "glActiveTexture\0" - "glClientActiveTexture\0" - "glMultiTexCoord1d\0" - "glMultiTexCoord1dv\0" - "glMultiTexCoord1f\0" - "glMultiTexCoord1fv\0" - "glMultiTexCoord1i\0" - "glMultiTexCoord1iv\0" - "glMultiTexCoord1s\0" - "glMultiTexCoord1sv\0" - "glMultiTexCoord2d\0" - "glMultiTexCoord2dv\0" - "glMultiTexCoord2f\0" - "glMultiTexCoord2fv\0" - "glMultiTexCoord2i\0" - "glMultiTexCoord2iv\0" - "glMultiTexCoord2s\0" - "glMultiTexCoord2sv\0" - "glMultiTexCoord3d\0" - "glMultiTexCoord3dv\0" - "glMultiTexCoord3f\0" - "glMultiTexCoord3fv\0" - "glMultiTexCoord3i\0" - "glMultiTexCoord3iv\0" - "glMultiTexCoord3s\0" - "glMultiTexCoord3sv\0" - "glMultiTexCoord4d\0" - "glMultiTexCoord4dv\0" - "glMultiTexCoord4f\0" - "glMultiTexCoord4fv\0" - "glMultiTexCoord4i\0" - "glMultiTexCoord4iv\0" - "glMultiTexCoord4s\0" - "glMultiTexCoord4sv\0" - "glStencilOpSeparateATI\0" - "glLoadTransposeMatrixd\0" - "glLoadTransposeMatrixf\0" - "glMultTransposeMatrixd\0" - "glMultTransposeMatrixf\0" - "glSampleCoverage\0" - "glCompressedTexImage1D\0" - "glCompressedTexImage2D\0" - "glCompressedTexImage3D\0" - "glCompressedTexSubImage1D\0" - "glCompressedTexSubImage2D\0" - "glCompressedTexSubImage3D\0" - "glGetCompressedTexImage\0" - "glDisableVertexAttribArray\0" - "glEnableVertexAttribArray\0" - "glGetVertexAttribdv\0" - "glGetVertexAttribfv\0" - "glGetVertexAttribiv\0" - "glProgramParameter4dNV\0" - "glProgramParameter4dvNV\0" - "glProgramParameter4fNV\0" - "glProgramParameter4fvNV\0" - "glVertexAttrib1d\0" - "glVertexAttrib1dv\0" - "glVertexAttrib1f\0" - "glVertexAttrib1fv\0" - "glVertexAttrib1s\0" - "glVertexAttrib1sv\0" - "glVertexAttrib2d\0" - "glVertexAttrib2dv\0" - "glVertexAttrib2f\0" - "glVertexAttrib2fv\0" - "glVertexAttrib2s\0" - "glVertexAttrib2sv\0" - "glVertexAttrib3d\0" - "glVertexAttrib3dv\0" - "glVertexAttrib3f\0" - "glVertexAttrib3fv\0" - "glVertexAttrib3s\0" - "glVertexAttrib3sv\0" - "glVertexAttrib4Nbv\0" - "glVertexAttrib4Niv\0" - "glVertexAttrib4Nsv\0" - "glVertexAttrib4Nub\0" - "glVertexAttrib4Nubv\0" - "glVertexAttrib4Nuiv\0" - "glVertexAttrib4Nusv\0" - "glVertexAttrib4bv\0" - "glVertexAttrib4d\0" - "glVertexAttrib4dv\0" - "glVertexAttrib4f\0" - "glVertexAttrib4fv\0" - "glVertexAttrib4iv\0" - "glVertexAttrib4s\0" - "glVertexAttrib4sv\0" - "glVertexAttrib4ubv\0" - "glVertexAttrib4uiv\0" - "glVertexAttrib4usv\0" - "glVertexAttribPointer\0" - "glBindBuffer\0" - "glBufferData\0" - "glBufferSubData\0" - "glDeleteBuffers\0" - "glGenBuffers\0" - "glGetBufferParameteriv\0" - "glGetBufferPointerv\0" - "glGetBufferSubData\0" - "glIsBuffer\0" - "glMapBuffer\0" - "glUnmapBuffer\0" - "glBeginQuery\0" - "glDeleteQueries\0" - "glEndQuery\0" - "glGenQueries\0" - "glGetQueryObjectiv\0" - "glGetQueryObjectuiv\0" - "glGetQueryiv\0" - "glIsQuery\0" - "glCompileShader\0" - "glGetActiveUniform\0" - "glGetShaderSource\0" - "glGetUniformLocation\0" - "glGetUniformfv\0" - "glGetUniformiv\0" - "glLinkProgram\0" - "glShaderSource\0" - "glUniform1f\0" - "glUniform1fv\0" - "glUniform1i\0" - "glUniform1iv\0" - "glUniform2f\0" - "glUniform2fv\0" - "glUniform2i\0" - "glUniform2iv\0" - "glUniform3f\0" - "glUniform3fv\0" - "glUniform3i\0" - "glUniform3iv\0" - "glUniform4f\0" - "glUniform4fv\0" - "glUniform4i\0" - "glUniform4iv\0" - "glUniformMatrix2fv\0" - "glUniformMatrix3fv\0" - "glUniformMatrix4fv\0" - "glUseProgram\0" - "glValidateProgram\0" - "glBindAttribLocation\0" - "glGetActiveAttrib\0" - "glGetAttribLocation\0" - "glDrawBuffers\0" - "glDrawBuffersATI\0" - "glDrawBuffersNV\0" - "glDrawArraysInstancedEXT\0" - "glDrawArraysInstanced\0" - "glDrawElementsInstancedEXT\0" - "glDrawElementsInstanced\0" - "glRenderbufferStorageMultisampleEXT\0" - "glBlendEquationSeparateIndexedAMD\0" - "glBlendEquationIndexedAMD\0" - "glBlendFuncSeparateIndexedAMD\0" - "glBlendFuncIndexedAMD\0" - "glSampleMaskEXT\0" - "glSamplePatternEXT\0" - "glPointParameterf\0" - "glPointParameterfARB\0" - "glPointParameterfSGIS\0" - "glPointParameterfv\0" - "glPointParameterfvARB\0" - "glPointParameterfvSGIS\0" - "glSecondaryColor3b\0" - "glSecondaryColor3bv\0" - "glSecondaryColor3d\0" - "glSecondaryColor3dv\0" - "glSecondaryColor3f\0" - "glSecondaryColor3fv\0" - "glSecondaryColor3i\0" - "glSecondaryColor3iv\0" - "glSecondaryColor3s\0" - "glSecondaryColor3sv\0" - "glSecondaryColor3ub\0" - "glSecondaryColor3ubv\0" - "glSecondaryColor3ui\0" - "glSecondaryColor3uiv\0" - "glSecondaryColor3us\0" - "glSecondaryColor3usv\0" - "glSecondaryColorPointer\0" - "glMultiDrawArrays\0" - "glMultiDrawElements\0" - "glFogCoordPointer\0" - "glFogCoordd\0" - "glFogCoorddv\0" - "glFogCoordf\0" - "glFogCoordfv\0" - "glBlendFuncSeparate\0" - "glBlendFuncSeparateINGR\0" - "glWindowPos2d\0" - "glWindowPos2dARB\0" - "glWindowPos2dv\0" - "glWindowPos2dvARB\0" - "glWindowPos2f\0" - "glWindowPos2fARB\0" - "glWindowPos2fv\0" - "glWindowPos2fvARB\0" - "glWindowPos2i\0" - "glWindowPos2iARB\0" - "glWindowPos2iv\0" - "glWindowPos2ivARB\0" - "glWindowPos2s\0" - "glWindowPos2sARB\0" - "glWindowPos2sv\0" - "glWindowPos2svARB\0" - "glWindowPos3d\0" - "glWindowPos3dARB\0" - "glWindowPos3dv\0" - "glWindowPos3dvARB\0" - "glWindowPos3f\0" - "glWindowPos3fARB\0" - "glWindowPos3fv\0" - "glWindowPos3fvARB\0" - "glWindowPos3i\0" - "glWindowPos3iARB\0" - "glWindowPos3iv\0" - "glWindowPos3ivARB\0" - "glWindowPos3s\0" - "glWindowPos3sARB\0" - "glWindowPos3sv\0" - "glWindowPos3svARB\0" - "glBindProgramARB\0" - "glDeleteProgramsARB\0" - "glGenProgramsARB\0" - "glGetVertexAttribPointerv\0" - "glGetVertexAttribPointervARB\0" - "glIsProgramARB\0" - "glPointParameteri\0" - "glPointParameteriv\0" - "glDeleteVertexArrays\0" - "glIsVertexArray\0" - "glPrimitiveRestartIndex\0" - "glBlendEquationSeparate\0" - "glBlendEquationSeparateATI\0" - "glBindFramebuffer\0" - "glBindRenderbuffer\0" - "glCheckFramebufferStatus\0" - "glDeleteFramebuffers\0" - "glDeleteRenderbuffers\0" - "glFramebufferRenderbuffer\0" - "glFramebufferTexture1D\0" - "glFramebufferTexture2D\0" - "glFramebufferTexture3D\0" - "glGenFramebuffers\0" - "glGenRenderbuffers\0" - "glGenerateMipmap\0" - "glGetFramebufferAttachmentParameteriv\0" - "glGetRenderbufferParameteriv\0" - "glIsFramebuffer\0" - "glIsRenderbuffer\0" - "glRenderbufferStorage\0" - "glBlitFramebuffer\0" - "glBindFragDataLocation\0" - "glGetFragDataLocation\0" - "glGetUniformuiv\0" - "glGetVertexAttribIiv\0" - "glGetVertexAttribIuiv\0" - "glUniform1ui\0" - "glUniform1uiv\0" - "glUniform2ui\0" - "glUniform2uiv\0" - "glUniform3ui\0" - "glUniform3uiv\0" - "glUniform4ui\0" - "glUniform4uiv\0" - "glVertexAttribI1i\0" - "glVertexAttribI1iv\0" - "glVertexAttribI1ui\0" - "glVertexAttribI1uiv\0" - "glVertexAttribI2i\0" - "glVertexAttribI2iv\0" - "glVertexAttribI2ui\0" - "glVertexAttribI2uiv\0" - "glVertexAttribI3i\0" - "glVertexAttribI3iv\0" - "glVertexAttribI3ui\0" - "glVertexAttribI3uiv\0" - "glVertexAttribI4bv\0" - "glVertexAttribI4i\0" - "glVertexAttribI4iv\0" - "glVertexAttribI4sv\0" - "glVertexAttribI4ubv\0" - "glVertexAttribI4ui\0" - "glVertexAttribI4uiv\0" - "glVertexAttribI4usv\0" - "glVertexAttribIPointer\0" - "glFramebufferTextureLayer\0" - "glFramebufferTextureLayerARB\0" - "glColorMaski\0" - "glDisablei\0" - "glEnablei\0" - "glGetBooleani_v\0" - "glGetIntegeri_v\0" - "glIsEnabledi\0" - "glGetTexParameterIiv\0" - "glGetTexParameterIuiv\0" - "glTexParameterIiv\0" - "glTexParameterIuiv\0" - "glBeginConditionalRender\0" - "glEndConditionalRender\0" - "glBeginTransformFeedback\0" - "glBindBufferBase\0" - "glBindBufferRange\0" - "glEndTransformFeedback\0" - "glGetTransformFeedbackVarying\0" - "glTransformFeedbackVaryings\0" "glProvokingVertex\0"; - -#ifdef USE_MGL_NAMESPACE -#define gl_dispatch_stub_343 mgl_dispatch_stub_343 -#define gl_dispatch_stub_344 mgl_dispatch_stub_344 -#define gl_dispatch_stub_345 mgl_dispatch_stub_345 -#define gl_dispatch_stub_356 mgl_dispatch_stub_356 -#define gl_dispatch_stub_357 mgl_dispatch_stub_357 -#define gl_dispatch_stub_358 mgl_dispatch_stub_358 -#define gl_dispatch_stub_359 mgl_dispatch_stub_359 -#define gl_dispatch_stub_361 mgl_dispatch_stub_361 -#define gl_dispatch_stub_362 mgl_dispatch_stub_362 -#define gl_dispatch_stub_363 mgl_dispatch_stub_363 -#define gl_dispatch_stub_364 mgl_dispatch_stub_364 -#define gl_dispatch_stub_365 mgl_dispatch_stub_365 -#define gl_dispatch_stub_366 mgl_dispatch_stub_366 -#define gl_dispatch_stub_692 mgl_dispatch_stub_692 -#define gl_dispatch_stub_693 mgl_dispatch_stub_693 -#define gl_dispatch_stub_694 mgl_dispatch_stub_694 -#define gl_dispatch_stub_695 mgl_dispatch_stub_695 -#define gl_dispatch_stub_696 mgl_dispatch_stub_696 -#define gl_dispatch_stub_697 mgl_dispatch_stub_697 -#define gl_dispatch_stub_698 mgl_dispatch_stub_698 -#define gl_dispatch_stub_699 mgl_dispatch_stub_699 -#define gl_dispatch_stub_734 mgl_dispatch_stub_734 -#define gl_dispatch_stub_776 mgl_dispatch_stub_776 -#define gl_dispatch_stub_777 mgl_dispatch_stub_777 -#define gl_dispatch_stub_778 mgl_dispatch_stub_778 -#define gl_dispatch_stub_779 mgl_dispatch_stub_779 -#define gl_dispatch_stub_780 mgl_dispatch_stub_780 -#define gl_dispatch_stub_781 mgl_dispatch_stub_781 -#define gl_dispatch_stub_782 mgl_dispatch_stub_782 -#define gl_dispatch_stub_783 mgl_dispatch_stub_783 -#define gl_dispatch_stub_784 mgl_dispatch_stub_784 -#define gl_dispatch_stub_865 mgl_dispatch_stub_865 -#define gl_dispatch_stub_866 mgl_dispatch_stub_866 -#define gl_dispatch_stub_867 mgl_dispatch_stub_867 -#define gl_dispatch_stub_868 mgl_dispatch_stub_868 -#define gl_dispatch_stub_869 mgl_dispatch_stub_869 -#define gl_dispatch_stub_878 mgl_dispatch_stub_878 -#define gl_dispatch_stub_879 mgl_dispatch_stub_879 -#define gl_dispatch_stub_897 mgl_dispatch_stub_897 -#define gl_dispatch_stub_898 mgl_dispatch_stub_898 -#define gl_dispatch_stub_899 mgl_dispatch_stub_899 -#define gl_dispatch_stub_957 mgl_dispatch_stub_957 -#define gl_dispatch_stub_958 mgl_dispatch_stub_958 -#define gl_dispatch_stub_966 mgl_dispatch_stub_966 -#define gl_dispatch_stub_967 mgl_dispatch_stub_967 -#define gl_dispatch_stub_968 mgl_dispatch_stub_968 -#define gl_dispatch_stub_969 mgl_dispatch_stub_969 -#define gl_dispatch_stub_970 mgl_dispatch_stub_970 -#endif /* USE_MGL_NAMESPACE */ - -#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) -void GLAPIENTRY gl_dispatch_stub_343(GLenum target, GLenum format, GLenum type, - GLvoid * table); -void GLAPIENTRY gl_dispatch_stub_344(GLenum target, GLenum pname, - GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_345(GLenum target, GLenum pname, - GLint * params); -void GLAPIENTRY gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, - GLvoid * image); -void GLAPIENTRY gl_dispatch_stub_357(GLenum target, GLenum pname, - GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_358(GLenum target, GLenum pname, - GLint * params); -void GLAPIENTRY gl_dispatch_stub_359(GLenum target, GLenum format, GLenum type, - GLvoid * row, GLvoid * column, - GLvoid * span); -void GLAPIENTRY gl_dispatch_stub_361(GLenum target, GLboolean reset, - GLenum format, GLenum type, - GLvoid * values); -void GLAPIENTRY gl_dispatch_stub_362(GLenum target, GLenum pname, - GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_363(GLenum target, GLenum pname, - GLint * params); -void GLAPIENTRY gl_dispatch_stub_364(GLenum target, GLboolean reset, - GLenum format, GLenum type, - GLvoid * values); -void GLAPIENTRY gl_dispatch_stub_365(GLenum target, GLenum pname, - GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_366(GLenum target, GLenum pname, - GLint * params); -void GLAPIENTRY gl_dispatch_stub_692(GLenum pname, GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_693(GLenum pname, GLint * params); -void GLAPIENTRY gl_dispatch_stub_694(GLenum pname, GLfloat param); -void GLAPIENTRY gl_dispatch_stub_695(GLenum pname, const GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_696(GLenum pname, GLint param); -void GLAPIENTRY gl_dispatch_stub_697(GLenum pname, const GLint * params); -void GLAPIENTRY gl_dispatch_stub_698(GLclampf value, GLboolean invert); -void GLAPIENTRY gl_dispatch_stub_699(GLenum pattern); -void GLAPIENTRY gl_dispatch_stub_734(GLenum mode); -void GLAPIENTRY gl_dispatch_stub_776(const GLenum * mode, const GLint * first, - const GLsizei * count, GLsizei primcount, - GLint modestride); -void GLAPIENTRY gl_dispatch_stub_777(const GLenum * mode, const GLsizei * count, - GLenum type, const GLvoid * const *indices, - GLsizei primcount, GLint modestride); -void GLAPIENTRY gl_dispatch_stub_778(GLsizei n, const GLuint * fences); -void GLAPIENTRY gl_dispatch_stub_779(GLuint fence); -void GLAPIENTRY gl_dispatch_stub_780(GLsizei n, GLuint * fences); -void GLAPIENTRY gl_dispatch_stub_781(GLuint fence, GLenum pname, - GLint * params); -GLboolean GLAPIENTRY gl_dispatch_stub_782(GLuint fence); -void GLAPIENTRY gl_dispatch_stub_783(GLuint fence, GLenum condition); -GLboolean GLAPIENTRY gl_dispatch_stub_784(GLuint fence); -void GLAPIENTRY gl_dispatch_stub_865(GLenum face); -void GLAPIENTRY gl_dispatch_stub_866(GLuint array); -void GLAPIENTRY gl_dispatch_stub_867(GLsizei n, const GLuint * arrays); -void GLAPIENTRY gl_dispatch_stub_868(GLsizei n, GLuint * arrays); -GLboolean GLAPIENTRY gl_dispatch_stub_869(GLuint array); -void GLAPIENTRY gl_dispatch_stub_878(GLclampd zmin, GLclampd zmax); -void GLAPIENTRY gl_dispatch_stub_879(GLenum modeRGB, GLenum modeA); -void GLAPIENTRY gl_dispatch_stub_897(GLint srcX0, GLint srcY0, GLint srcX1, - GLint srcY1, GLint dstX0, GLint dstY0, - GLint dstX1, GLint dstY1, GLbitfield mask, - GLenum filter); -void GLAPIENTRY gl_dispatch_stub_898(GLenum target, GLenum pname, GLint param); -void GLAPIENTRY gl_dispatch_stub_899(GLenum target, GLintptr offset, - GLsizeiptr size); -void GLAPIENTRY gl_dispatch_stub_957(GLenum target, GLenum pname, - GLvoid ** params); -void GLAPIENTRY gl_dispatch_stub_958(GLenum target, GLsizei length, - GLvoid * pointer); -void GLAPIENTRY gl_dispatch_stub_966(GLenum frontfunc, GLenum backfunc, - GLint ref, GLuint mask); -void GLAPIENTRY gl_dispatch_stub_967(GLenum target, GLuint index, GLsizei count, - const GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_968(GLenum target, GLuint index, GLsizei count, - const GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_969(GLuint id, GLenum pname, - GLint64EXT * params); -void GLAPIENTRY gl_dispatch_stub_970(GLuint id, GLenum pname, - GLuint64EXT * params); -#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */ - -static const glprocs_table_t static_functions[] = { - NAME_FUNC_OFFSET(0, glNewList, glNewList, NULL, 0), - NAME_FUNC_OFFSET(10, glEndList, glEndList, NULL, 1), - NAME_FUNC_OFFSET(20, glCallList, glCallList, NULL, 2), - NAME_FUNC_OFFSET(31, glCallLists, glCallLists, NULL, 3), - NAME_FUNC_OFFSET(43, glDeleteLists, glDeleteLists, NULL, 4), - NAME_FUNC_OFFSET(57, glGenLists, glGenLists, NULL, 5), - NAME_FUNC_OFFSET(68, glListBase, glListBase, NULL, 6), - NAME_FUNC_OFFSET(79, glBegin, glBegin, NULL, 7), - NAME_FUNC_OFFSET(87, glBitmap, glBitmap, NULL, 8), - NAME_FUNC_OFFSET(96, glColor3b, glColor3b, NULL, 9), - NAME_FUNC_OFFSET(106, glColor3bv, glColor3bv, NULL, 10), - NAME_FUNC_OFFSET(117, glColor3d, glColor3d, NULL, 11), - NAME_FUNC_OFFSET(127, glColor3dv, glColor3dv, NULL, 12), - NAME_FUNC_OFFSET(138, glColor3f, glColor3f, NULL, 13), - NAME_FUNC_OFFSET(148, glColor3fv, glColor3fv, NULL, 14), - NAME_FUNC_OFFSET(159, glColor3i, glColor3i, NULL, 15), - NAME_FUNC_OFFSET(169, glColor3iv, glColor3iv, NULL, 16), - NAME_FUNC_OFFSET(180, glColor3s, glColor3s, NULL, 17), - NAME_FUNC_OFFSET(190, glColor3sv, glColor3sv, NULL, 18), - NAME_FUNC_OFFSET(201, glColor3ub, glColor3ub, NULL, 19), - NAME_FUNC_OFFSET(212, glColor3ubv, glColor3ubv, NULL, 20), - NAME_FUNC_OFFSET(224, glColor3ui, glColor3ui, NULL, 21), - NAME_FUNC_OFFSET(235, glColor3uiv, glColor3uiv, NULL, 22), - NAME_FUNC_OFFSET(247, glColor3us, glColor3us, NULL, 23), - NAME_FUNC_OFFSET(258, glColor3usv, glColor3usv, NULL, 24), - NAME_FUNC_OFFSET(270, glColor4b, glColor4b, NULL, 25), - NAME_FUNC_OFFSET(280, glColor4bv, glColor4bv, NULL, 26), - NAME_FUNC_OFFSET(291, glColor4d, glColor4d, NULL, 27), - NAME_FUNC_OFFSET(301, glColor4dv, glColor4dv, NULL, 28), - NAME_FUNC_OFFSET(312, glColor4f, glColor4f, NULL, 29), - NAME_FUNC_OFFSET(322, glColor4fv, glColor4fv, NULL, 30), - NAME_FUNC_OFFSET(333, glColor4i, glColor4i, NULL, 31), - NAME_FUNC_OFFSET(343, glColor4iv, glColor4iv, NULL, 32), - NAME_FUNC_OFFSET(354, glColor4s, glColor4s, NULL, 33), - NAME_FUNC_OFFSET(364, glColor4sv, glColor4sv, NULL, 34), - NAME_FUNC_OFFSET(375, glColor4ub, glColor4ub, NULL, 35), - NAME_FUNC_OFFSET(386, glColor4ubv, glColor4ubv, NULL, 36), - NAME_FUNC_OFFSET(398, glColor4ui, glColor4ui, NULL, 37), - NAME_FUNC_OFFSET(409, glColor4uiv, glColor4uiv, NULL, 38), - NAME_FUNC_OFFSET(421, glColor4us, glColor4us, NULL, 39), - NAME_FUNC_OFFSET(432, glColor4usv, glColor4usv, NULL, 40), - NAME_FUNC_OFFSET(444, glEdgeFlag, glEdgeFlag, NULL, 41), - NAME_FUNC_OFFSET(455, glEdgeFlagv, glEdgeFlagv, NULL, 42), - NAME_FUNC_OFFSET(467, glEnd, glEnd, NULL, 43), - NAME_FUNC_OFFSET(473, glIndexd, glIndexd, NULL, 44), - NAME_FUNC_OFFSET(482, glIndexdv, glIndexdv, NULL, 45), - NAME_FUNC_OFFSET(492, glIndexf, glIndexf, NULL, 46), - NAME_FUNC_OFFSET(501, glIndexfv, glIndexfv, NULL, 47), - NAME_FUNC_OFFSET(511, glIndexi, glIndexi, NULL, 48), - NAME_FUNC_OFFSET(520, glIndexiv, glIndexiv, NULL, 49), - NAME_FUNC_OFFSET(530, glIndexs, glIndexs, NULL, 50), - NAME_FUNC_OFFSET(539, glIndexsv, glIndexsv, NULL, 51), - NAME_FUNC_OFFSET(549, glNormal3b, glNormal3b, NULL, 52), - NAME_FUNC_OFFSET(560, glNormal3bv, glNormal3bv, NULL, 53), - NAME_FUNC_OFFSET(572, glNormal3d, glNormal3d, NULL, 54), - NAME_FUNC_OFFSET(583, glNormal3dv, glNormal3dv, NULL, 55), - NAME_FUNC_OFFSET(595, glNormal3f, glNormal3f, NULL, 56), - NAME_FUNC_OFFSET(606, glNormal3fv, glNormal3fv, NULL, 57), - NAME_FUNC_OFFSET(618, glNormal3i, glNormal3i, NULL, 58), - NAME_FUNC_OFFSET(629, glNormal3iv, glNormal3iv, NULL, 59), - NAME_FUNC_OFFSET(641, glNormal3s, glNormal3s, NULL, 60), - NAME_FUNC_OFFSET(652, glNormal3sv, glNormal3sv, NULL, 61), - NAME_FUNC_OFFSET(664, glRasterPos2d, glRasterPos2d, NULL, 62), - NAME_FUNC_OFFSET(678, glRasterPos2dv, glRasterPos2dv, NULL, 63), - NAME_FUNC_OFFSET(693, glRasterPos2f, glRasterPos2f, NULL, 64), - NAME_FUNC_OFFSET(707, glRasterPos2fv, glRasterPos2fv, NULL, 65), - NAME_FUNC_OFFSET(722, glRasterPos2i, glRasterPos2i, NULL, 66), - NAME_FUNC_OFFSET(736, glRasterPos2iv, glRasterPos2iv, NULL, 67), - NAME_FUNC_OFFSET(751, glRasterPos2s, glRasterPos2s, NULL, 68), - NAME_FUNC_OFFSET(765, glRasterPos2sv, glRasterPos2sv, NULL, 69), - NAME_FUNC_OFFSET(780, glRasterPos3d, glRasterPos3d, NULL, 70), - NAME_FUNC_OFFSET(794, glRasterPos3dv, glRasterPos3dv, NULL, 71), - NAME_FUNC_OFFSET(809, glRasterPos3f, glRasterPos3f, NULL, 72), - NAME_FUNC_OFFSET(823, glRasterPos3fv, glRasterPos3fv, NULL, 73), - NAME_FUNC_OFFSET(838, glRasterPos3i, glRasterPos3i, NULL, 74), - NAME_FUNC_OFFSET(852, glRasterPos3iv, glRasterPos3iv, NULL, 75), - NAME_FUNC_OFFSET(867, glRasterPos3s, glRasterPos3s, NULL, 76), - NAME_FUNC_OFFSET(881, glRasterPos3sv, glRasterPos3sv, NULL, 77), - NAME_FUNC_OFFSET(896, glRasterPos4d, glRasterPos4d, NULL, 78), - NAME_FUNC_OFFSET(910, glRasterPos4dv, glRasterPos4dv, NULL, 79), - NAME_FUNC_OFFSET(925, glRasterPos4f, glRasterPos4f, NULL, 80), - NAME_FUNC_OFFSET(939, glRasterPos4fv, glRasterPos4fv, NULL, 81), - NAME_FUNC_OFFSET(954, glRasterPos4i, glRasterPos4i, NULL, 82), - NAME_FUNC_OFFSET(968, glRasterPos4iv, glRasterPos4iv, NULL, 83), - NAME_FUNC_OFFSET(983, glRasterPos4s, glRasterPos4s, NULL, 84), - NAME_FUNC_OFFSET(997, glRasterPos4sv, glRasterPos4sv, NULL, 85), - NAME_FUNC_OFFSET(1012, glRectd, glRectd, NULL, 86), - NAME_FUNC_OFFSET(1020, glRectdv, glRectdv, NULL, 87), - NAME_FUNC_OFFSET(1029, glRectf, glRectf, NULL, 88), - NAME_FUNC_OFFSET(1037, glRectfv, glRectfv, NULL, 89), - NAME_FUNC_OFFSET(1046, glRecti, glRecti, NULL, 90), - NAME_FUNC_OFFSET(1054, glRectiv, glRectiv, NULL, 91), - NAME_FUNC_OFFSET(1063, glRects, glRects, NULL, 92), - NAME_FUNC_OFFSET(1071, glRectsv, glRectsv, NULL, 93), - NAME_FUNC_OFFSET(1080, glTexCoord1d, glTexCoord1d, NULL, 94), - NAME_FUNC_OFFSET(1093, glTexCoord1dv, glTexCoord1dv, NULL, 95), - NAME_FUNC_OFFSET(1107, glTexCoord1f, glTexCoord1f, NULL, 96), - NAME_FUNC_OFFSET(1120, glTexCoord1fv, glTexCoord1fv, NULL, 97), - NAME_FUNC_OFFSET(1134, glTexCoord1i, glTexCoord1i, NULL, 98), - NAME_FUNC_OFFSET(1147, glTexCoord1iv, glTexCoord1iv, NULL, 99), - NAME_FUNC_OFFSET(1161, glTexCoord1s, glTexCoord1s, NULL, 100), - NAME_FUNC_OFFSET(1174, glTexCoord1sv, glTexCoord1sv, NULL, 101), - NAME_FUNC_OFFSET(1188, glTexCoord2d, glTexCoord2d, NULL, 102), - NAME_FUNC_OFFSET(1201, glTexCoord2dv, glTexCoord2dv, NULL, 103), - NAME_FUNC_OFFSET(1215, glTexCoord2f, glTexCoord2f, NULL, 104), - NAME_FUNC_OFFSET(1228, glTexCoord2fv, glTexCoord2fv, NULL, 105), - NAME_FUNC_OFFSET(1242, glTexCoord2i, glTexCoord2i, NULL, 106), - NAME_FUNC_OFFSET(1255, glTexCoord2iv, glTexCoord2iv, NULL, 107), - NAME_FUNC_OFFSET(1269, glTexCoord2s, glTexCoord2s, NULL, 108), - NAME_FUNC_OFFSET(1282, glTexCoord2sv, glTexCoord2sv, NULL, 109), - NAME_FUNC_OFFSET(1296, glTexCoord3d, glTexCoord3d, NULL, 110), - NAME_FUNC_OFFSET(1309, glTexCoord3dv, glTexCoord3dv, NULL, 111), - NAME_FUNC_OFFSET(1323, glTexCoord3f, glTexCoord3f, NULL, 112), - NAME_FUNC_OFFSET(1336, glTexCoord3fv, glTexCoord3fv, NULL, 113), - NAME_FUNC_OFFSET(1350, glTexCoord3i, glTexCoord3i, NULL, 114), - NAME_FUNC_OFFSET(1363, glTexCoord3iv, glTexCoord3iv, NULL, 115), - NAME_FUNC_OFFSET(1377, glTexCoord3s, glTexCoord3s, NULL, 116), - NAME_FUNC_OFFSET(1390, glTexCoord3sv, glTexCoord3sv, NULL, 117), - NAME_FUNC_OFFSET(1404, glTexCoord4d, glTexCoord4d, NULL, 118), - NAME_FUNC_OFFSET(1417, glTexCoord4dv, glTexCoord4dv, NULL, 119), - NAME_FUNC_OFFSET(1431, glTexCoord4f, glTexCoord4f, NULL, 120), - NAME_FUNC_OFFSET(1444, glTexCoord4fv, glTexCoord4fv, NULL, 121), - NAME_FUNC_OFFSET(1458, glTexCoord4i, glTexCoord4i, NULL, 122), - NAME_FUNC_OFFSET(1471, glTexCoord4iv, glTexCoord4iv, NULL, 123), - NAME_FUNC_OFFSET(1485, glTexCoord4s, glTexCoord4s, NULL, 124), - NAME_FUNC_OFFSET(1498, glTexCoord4sv, glTexCoord4sv, NULL, 125), - NAME_FUNC_OFFSET(1512, glVertex2d, glVertex2d, NULL, 126), - NAME_FUNC_OFFSET(1523, glVertex2dv, glVertex2dv, NULL, 127), - NAME_FUNC_OFFSET(1535, glVertex2f, glVertex2f, NULL, 128), - NAME_FUNC_OFFSET(1546, glVertex2fv, glVertex2fv, NULL, 129), - NAME_FUNC_OFFSET(1558, glVertex2i, glVertex2i, NULL, 130), - NAME_FUNC_OFFSET(1569, glVertex2iv, glVertex2iv, NULL, 131), - NAME_FUNC_OFFSET(1581, glVertex2s, glVertex2s, NULL, 132), - NAME_FUNC_OFFSET(1592, glVertex2sv, glVertex2sv, NULL, 133), - NAME_FUNC_OFFSET(1604, glVertex3d, glVertex3d, NULL, 134), - NAME_FUNC_OFFSET(1615, glVertex3dv, glVertex3dv, NULL, 135), - NAME_FUNC_OFFSET(1627, glVertex3f, glVertex3f, NULL, 136), - NAME_FUNC_OFFSET(1638, glVertex3fv, glVertex3fv, NULL, 137), - NAME_FUNC_OFFSET(1650, glVertex3i, glVertex3i, NULL, 138), - NAME_FUNC_OFFSET(1661, glVertex3iv, glVertex3iv, NULL, 139), - NAME_FUNC_OFFSET(1673, glVertex3s, glVertex3s, NULL, 140), - NAME_FUNC_OFFSET(1684, glVertex3sv, glVertex3sv, NULL, 141), - NAME_FUNC_OFFSET(1696, glVertex4d, glVertex4d, NULL, 142), - NAME_FUNC_OFFSET(1707, glVertex4dv, glVertex4dv, NULL, 143), - NAME_FUNC_OFFSET(1719, glVertex4f, glVertex4f, NULL, 144), - NAME_FUNC_OFFSET(1730, glVertex4fv, glVertex4fv, NULL, 145), - NAME_FUNC_OFFSET(1742, glVertex4i, glVertex4i, NULL, 146), - NAME_FUNC_OFFSET(1753, glVertex4iv, glVertex4iv, NULL, 147), - NAME_FUNC_OFFSET(1765, glVertex4s, glVertex4s, NULL, 148), - NAME_FUNC_OFFSET(1776, glVertex4sv, glVertex4sv, NULL, 149), - NAME_FUNC_OFFSET(1788, glClipPlane, glClipPlane, NULL, 150), - NAME_FUNC_OFFSET(1800, glColorMaterial, glColorMaterial, NULL, 151), - NAME_FUNC_OFFSET(1816, glCullFace, glCullFace, NULL, 152), - NAME_FUNC_OFFSET(1827, glFogf, glFogf, NULL, 153), - NAME_FUNC_OFFSET(1834, glFogfv, glFogfv, NULL, 154), - NAME_FUNC_OFFSET(1842, glFogi, glFogi, NULL, 155), - NAME_FUNC_OFFSET(1849, glFogiv, glFogiv, NULL, 156), - NAME_FUNC_OFFSET(1857, glFrontFace, glFrontFace, NULL, 157), - NAME_FUNC_OFFSET(1869, glHint, glHint, NULL, 158), - NAME_FUNC_OFFSET(1876, glLightf, glLightf, NULL, 159), - NAME_FUNC_OFFSET(1885, glLightfv, glLightfv, NULL, 160), - NAME_FUNC_OFFSET(1895, glLighti, glLighti, NULL, 161), - NAME_FUNC_OFFSET(1904, glLightiv, glLightiv, NULL, 162), - NAME_FUNC_OFFSET(1914, glLightModelf, glLightModelf, NULL, 163), - NAME_FUNC_OFFSET(1928, glLightModelfv, glLightModelfv, NULL, 164), - NAME_FUNC_OFFSET(1943, glLightModeli, glLightModeli, NULL, 165), - NAME_FUNC_OFFSET(1957, glLightModeliv, glLightModeliv, NULL, 166), - NAME_FUNC_OFFSET(1972, glLineStipple, glLineStipple, NULL, 167), - NAME_FUNC_OFFSET(1986, glLineWidth, glLineWidth, NULL, 168), - NAME_FUNC_OFFSET(1998, glMaterialf, glMaterialf, NULL, 169), - NAME_FUNC_OFFSET(2010, glMaterialfv, glMaterialfv, NULL, 170), - NAME_FUNC_OFFSET(2023, glMateriali, glMateriali, NULL, 171), - NAME_FUNC_OFFSET(2035, glMaterialiv, glMaterialiv, NULL, 172), - NAME_FUNC_OFFSET(2048, glPointSize, glPointSize, NULL, 173), - NAME_FUNC_OFFSET(2060, glPolygonMode, glPolygonMode, NULL, 174), - NAME_FUNC_OFFSET(2074, glPolygonStipple, glPolygonStipple, NULL, 175), - NAME_FUNC_OFFSET(2091, glScissor, glScissor, NULL, 176), - NAME_FUNC_OFFSET(2101, glShadeModel, glShadeModel, NULL, 177), - NAME_FUNC_OFFSET(2114, glTexParameterf, glTexParameterf, NULL, 178), - NAME_FUNC_OFFSET(2130, glTexParameterfv, glTexParameterfv, NULL, 179), - NAME_FUNC_OFFSET(2147, glTexParameteri, glTexParameteri, NULL, 180), - NAME_FUNC_OFFSET(2163, glTexParameteriv, glTexParameteriv, NULL, 181), - NAME_FUNC_OFFSET(2180, glTexImage1D, glTexImage1D, NULL, 182), - NAME_FUNC_OFFSET(2193, glTexImage2D, glTexImage2D, NULL, 183), - NAME_FUNC_OFFSET(2206, glTexEnvf, glTexEnvf, NULL, 184), - NAME_FUNC_OFFSET(2216, glTexEnvfv, glTexEnvfv, NULL, 185), - NAME_FUNC_OFFSET(2227, glTexEnvi, glTexEnvi, NULL, 186), - NAME_FUNC_OFFSET(2237, glTexEnviv, glTexEnviv, NULL, 187), - NAME_FUNC_OFFSET(2248, glTexGend, glTexGend, NULL, 188), - NAME_FUNC_OFFSET(2258, glTexGendv, glTexGendv, NULL, 189), - NAME_FUNC_OFFSET(2269, glTexGenf, glTexGenf, NULL, 190), - NAME_FUNC_OFFSET(2279, glTexGenfv, glTexGenfv, NULL, 191), - NAME_FUNC_OFFSET(2290, glTexGeni, glTexGeni, NULL, 192), - NAME_FUNC_OFFSET(2300, glTexGeniv, glTexGeniv, NULL, 193), - NAME_FUNC_OFFSET(2311, glFeedbackBuffer, glFeedbackBuffer, NULL, 194), - NAME_FUNC_OFFSET(2328, glSelectBuffer, glSelectBuffer, NULL, 195), - NAME_FUNC_OFFSET(2343, glRenderMode, glRenderMode, NULL, 196), - NAME_FUNC_OFFSET(2356, glInitNames, glInitNames, NULL, 197), - NAME_FUNC_OFFSET(2368, glLoadName, glLoadName, NULL, 198), - NAME_FUNC_OFFSET(2379, glPassThrough, glPassThrough, NULL, 199), - NAME_FUNC_OFFSET(2393, glPopName, glPopName, NULL, 200), - NAME_FUNC_OFFSET(2403, glPushName, glPushName, NULL, 201), - NAME_FUNC_OFFSET(2414, glDrawBuffer, glDrawBuffer, NULL, 202), - NAME_FUNC_OFFSET(2427, glClear, glClear, NULL, 203), - NAME_FUNC_OFFSET(2435, glClearAccum, glClearAccum, NULL, 204), - NAME_FUNC_OFFSET(2448, glClearIndex, glClearIndex, NULL, 205), - NAME_FUNC_OFFSET(2461, glClearColor, glClearColor, NULL, 206), - NAME_FUNC_OFFSET(2474, glClearStencil, glClearStencil, NULL, 207), - NAME_FUNC_OFFSET(2489, glClearDepth, glClearDepth, NULL, 208), - NAME_FUNC_OFFSET(2502, glStencilMask, glStencilMask, NULL, 209), - NAME_FUNC_OFFSET(2516, glColorMask, glColorMask, NULL, 210), - NAME_FUNC_OFFSET(2528, glDepthMask, glDepthMask, NULL, 211), - NAME_FUNC_OFFSET(2540, glIndexMask, glIndexMask, NULL, 212), - NAME_FUNC_OFFSET(2552, glAccum, glAccum, NULL, 213), - NAME_FUNC_OFFSET(2560, glDisable, glDisable, NULL, 214), - NAME_FUNC_OFFSET(2570, glEnable, glEnable, NULL, 215), - NAME_FUNC_OFFSET(2579, glFinish, glFinish, NULL, 216), - NAME_FUNC_OFFSET(2588, glFlush, glFlush, NULL, 217), - NAME_FUNC_OFFSET(2596, glPopAttrib, glPopAttrib, NULL, 218), - NAME_FUNC_OFFSET(2608, glPushAttrib, glPushAttrib, NULL, 219), - NAME_FUNC_OFFSET(2621, glMap1d, glMap1d, NULL, 220), - NAME_FUNC_OFFSET(2629, glMap1f, glMap1f, NULL, 221), - NAME_FUNC_OFFSET(2637, glMap2d, glMap2d, NULL, 222), - NAME_FUNC_OFFSET(2645, glMap2f, glMap2f, NULL, 223), - NAME_FUNC_OFFSET(2653, glMapGrid1d, glMapGrid1d, NULL, 224), - NAME_FUNC_OFFSET(2665, glMapGrid1f, glMapGrid1f, NULL, 225), - NAME_FUNC_OFFSET(2677, glMapGrid2d, glMapGrid2d, NULL, 226), - NAME_FUNC_OFFSET(2689, glMapGrid2f, glMapGrid2f, NULL, 227), - NAME_FUNC_OFFSET(2701, glEvalCoord1d, glEvalCoord1d, NULL, 228), - NAME_FUNC_OFFSET(2715, glEvalCoord1dv, glEvalCoord1dv, NULL, 229), - NAME_FUNC_OFFSET(2730, glEvalCoord1f, glEvalCoord1f, NULL, 230), - NAME_FUNC_OFFSET(2744, glEvalCoord1fv, glEvalCoord1fv, NULL, 231), - NAME_FUNC_OFFSET(2759, glEvalCoord2d, glEvalCoord2d, NULL, 232), - NAME_FUNC_OFFSET(2773, glEvalCoord2dv, glEvalCoord2dv, NULL, 233), - NAME_FUNC_OFFSET(2788, glEvalCoord2f, glEvalCoord2f, NULL, 234), - NAME_FUNC_OFFSET(2802, glEvalCoord2fv, glEvalCoord2fv, NULL, 235), - NAME_FUNC_OFFSET(2817, glEvalMesh1, glEvalMesh1, NULL, 236), - NAME_FUNC_OFFSET(2829, glEvalPoint1, glEvalPoint1, NULL, 237), - NAME_FUNC_OFFSET(2842, glEvalMesh2, glEvalMesh2, NULL, 238), - NAME_FUNC_OFFSET(2854, glEvalPoint2, glEvalPoint2, NULL, 239), - NAME_FUNC_OFFSET(2867, glAlphaFunc, glAlphaFunc, NULL, 240), - NAME_FUNC_OFFSET(2879, glBlendFunc, glBlendFunc, NULL, 241), - NAME_FUNC_OFFSET(2891, glLogicOp, glLogicOp, NULL, 242), - NAME_FUNC_OFFSET(2901, glStencilFunc, glStencilFunc, NULL, 243), - NAME_FUNC_OFFSET(2915, glStencilOp, glStencilOp, NULL, 244), - NAME_FUNC_OFFSET(2927, glDepthFunc, glDepthFunc, NULL, 245), - NAME_FUNC_OFFSET(2939, glPixelZoom, glPixelZoom, NULL, 246), - NAME_FUNC_OFFSET(2951, glPixelTransferf, glPixelTransferf, NULL, 247), - NAME_FUNC_OFFSET(2968, glPixelTransferi, glPixelTransferi, NULL, 248), - NAME_FUNC_OFFSET(2985, glPixelStoref, glPixelStoref, NULL, 249), - NAME_FUNC_OFFSET(2999, glPixelStorei, glPixelStorei, NULL, 250), - NAME_FUNC_OFFSET(3013, glPixelMapfv, glPixelMapfv, NULL, 251), - NAME_FUNC_OFFSET(3026, glPixelMapuiv, glPixelMapuiv, NULL, 252), - NAME_FUNC_OFFSET(3040, glPixelMapusv, glPixelMapusv, NULL, 253), - NAME_FUNC_OFFSET(3054, glReadBuffer, glReadBuffer, NULL, 254), - NAME_FUNC_OFFSET(3067, glCopyPixels, glCopyPixels, NULL, 255), - NAME_FUNC_OFFSET(3080, glReadPixels, glReadPixels, NULL, 256), - NAME_FUNC_OFFSET(3093, glDrawPixels, glDrawPixels, NULL, 257), - NAME_FUNC_OFFSET(3106, glGetBooleanv, glGetBooleanv, NULL, 258), - NAME_FUNC_OFFSET(3120, glGetClipPlane, glGetClipPlane, NULL, 259), - NAME_FUNC_OFFSET(3135, glGetDoublev, glGetDoublev, NULL, 260), - NAME_FUNC_OFFSET(3148, glGetError, glGetError, NULL, 261), - NAME_FUNC_OFFSET(3159, glGetFloatv, glGetFloatv, NULL, 262), - NAME_FUNC_OFFSET(3171, glGetIntegerv, glGetIntegerv, NULL, 263), - NAME_FUNC_OFFSET(3185, glGetLightfv, glGetLightfv, NULL, 264), - NAME_FUNC_OFFSET(3198, glGetLightiv, glGetLightiv, NULL, 265), - NAME_FUNC_OFFSET(3211, glGetMapdv, glGetMapdv, NULL, 266), - NAME_FUNC_OFFSET(3222, glGetMapfv, glGetMapfv, NULL, 267), - NAME_FUNC_OFFSET(3233, glGetMapiv, glGetMapiv, NULL, 268), - NAME_FUNC_OFFSET(3244, glGetMaterialfv, glGetMaterialfv, NULL, 269), - NAME_FUNC_OFFSET(3260, glGetMaterialiv, glGetMaterialiv, NULL, 270), - NAME_FUNC_OFFSET(3276, glGetPixelMapfv, glGetPixelMapfv, NULL, 271), - NAME_FUNC_OFFSET(3292, glGetPixelMapuiv, glGetPixelMapuiv, NULL, 272), - NAME_FUNC_OFFSET(3309, glGetPixelMapusv, glGetPixelMapusv, NULL, 273), - NAME_FUNC_OFFSET(3326, glGetPolygonStipple, glGetPolygonStipple, NULL, 274), - NAME_FUNC_OFFSET(3346, glGetString, glGetString, NULL, 275), - NAME_FUNC_OFFSET(3358, glGetTexEnvfv, glGetTexEnvfv, NULL, 276), - NAME_FUNC_OFFSET(3372, glGetTexEnviv, glGetTexEnviv, NULL, 277), - NAME_FUNC_OFFSET(3386, glGetTexGendv, glGetTexGendv, NULL, 278), - NAME_FUNC_OFFSET(3400, glGetTexGenfv, glGetTexGenfv, NULL, 279), - NAME_FUNC_OFFSET(3414, glGetTexGeniv, glGetTexGeniv, NULL, 280), - NAME_FUNC_OFFSET(3428, glGetTexImage, glGetTexImage, NULL, 281), - NAME_FUNC_OFFSET(3442, glGetTexParameterfv, glGetTexParameterfv, NULL, 282), - NAME_FUNC_OFFSET(3462, glGetTexParameteriv, glGetTexParameteriv, NULL, 283), - NAME_FUNC_OFFSET(3482, glGetTexLevelParameterfv, glGetTexLevelParameterfv, - NULL, 284), - NAME_FUNC_OFFSET(3507, glGetTexLevelParameteriv, glGetTexLevelParameteriv, - NULL, 285), - NAME_FUNC_OFFSET(3532, glIsEnabled, glIsEnabled, NULL, 286), - NAME_FUNC_OFFSET(3544, glIsList, glIsList, NULL, 287), - NAME_FUNC_OFFSET(3553, glDepthRange, glDepthRange, NULL, 288), - NAME_FUNC_OFFSET(3566, glFrustum, glFrustum, NULL, 289), - NAME_FUNC_OFFSET(3576, glLoadIdentity, glLoadIdentity, NULL, 290), - NAME_FUNC_OFFSET(3591, glLoadMatrixf, glLoadMatrixf, NULL, 291), - NAME_FUNC_OFFSET(3605, glLoadMatrixd, glLoadMatrixd, NULL, 292), - NAME_FUNC_OFFSET(3619, glMatrixMode, glMatrixMode, NULL, 293), - NAME_FUNC_OFFSET(3632, glMultMatrixf, glMultMatrixf, NULL, 294), - NAME_FUNC_OFFSET(3646, glMultMatrixd, glMultMatrixd, NULL, 295), - NAME_FUNC_OFFSET(3660, glOrtho, glOrtho, NULL, 296), - NAME_FUNC_OFFSET(3668, glPopMatrix, glPopMatrix, NULL, 297), - NAME_FUNC_OFFSET(3680, glPushMatrix, glPushMatrix, NULL, 298), - NAME_FUNC_OFFSET(3693, glRotated, glRotated, NULL, 299), - NAME_FUNC_OFFSET(3703, glRotatef, glRotatef, NULL, 300), - NAME_FUNC_OFFSET(3713, glScaled, glScaled, NULL, 301), - NAME_FUNC_OFFSET(3722, glScalef, glScalef, NULL, 302), - NAME_FUNC_OFFSET(3731, glTranslated, glTranslated, NULL, 303), - NAME_FUNC_OFFSET(3744, glTranslatef, glTranslatef, NULL, 304), - NAME_FUNC_OFFSET(3757, glViewport, glViewport, NULL, 305), - NAME_FUNC_OFFSET(3768, glArrayElement, glArrayElement, NULL, 306), - NAME_FUNC_OFFSET(3783, glBindTexture, glBindTexture, NULL, 307), - NAME_FUNC_OFFSET(3797, glColorPointer, glColorPointer, NULL, 308), - NAME_FUNC_OFFSET(3812, glDisableClientState, glDisableClientState, NULL, - 309), - NAME_FUNC_OFFSET(3833, glDrawArrays, glDrawArrays, NULL, 310), - NAME_FUNC_OFFSET(3846, glDrawElements, glDrawElements, NULL, 311), - NAME_FUNC_OFFSET(3861, glEdgeFlagPointer, glEdgeFlagPointer, NULL, 312), - NAME_FUNC_OFFSET(3879, glEnableClientState, glEnableClientState, NULL, 313), - NAME_FUNC_OFFSET(3899, glIndexPointer, glIndexPointer, NULL, 314), - NAME_FUNC_OFFSET(3914, glIndexub, glIndexub, NULL, 315), - NAME_FUNC_OFFSET(3924, glIndexubv, glIndexubv, NULL, 316), - NAME_FUNC_OFFSET(3935, glInterleavedArrays, glInterleavedArrays, NULL, 317), - NAME_FUNC_OFFSET(3955, glNormalPointer, glNormalPointer, NULL, 318), - NAME_FUNC_OFFSET(3971, glPolygonOffset, glPolygonOffset, NULL, 319), - NAME_FUNC_OFFSET(3987, glTexCoordPointer, glTexCoordPointer, NULL, 320), - NAME_FUNC_OFFSET(4005, glVertexPointer, glVertexPointer, NULL, 321), - NAME_FUNC_OFFSET(4021, glAreTexturesResident, glAreTexturesResident, NULL, - 322), - NAME_FUNC_OFFSET(4043, glCopyTexImage1D, glCopyTexImage1D, NULL, 323), - NAME_FUNC_OFFSET(4060, glCopyTexImage2D, glCopyTexImage2D, NULL, 324), - NAME_FUNC_OFFSET(4077, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, 325), - NAME_FUNC_OFFSET(4097, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, 326), - NAME_FUNC_OFFSET(4117, glDeleteTextures, glDeleteTextures, NULL, 327), - NAME_FUNC_OFFSET(4134, glGenTextures, glGenTextures, NULL, 328), - NAME_FUNC_OFFSET(4148, glGetPointerv, glGetPointerv, NULL, 329), - NAME_FUNC_OFFSET(4162, glIsTexture, glIsTexture, NULL, 330), - NAME_FUNC_OFFSET(4174, glPrioritizeTextures, glPrioritizeTextures, NULL, - 331), - NAME_FUNC_OFFSET(4195, glTexSubImage1D, glTexSubImage1D, NULL, 332), - NAME_FUNC_OFFSET(4211, glTexSubImage2D, glTexSubImage2D, NULL, 333), - NAME_FUNC_OFFSET(4227, glPopClientAttrib, glPopClientAttrib, NULL, 334), - NAME_FUNC_OFFSET(4245, glPushClientAttrib, glPushClientAttrib, NULL, 335), - NAME_FUNC_OFFSET(4264, glBlendColor, glBlendColor, NULL, 336), - NAME_FUNC_OFFSET(4277, glBlendEquation, glBlendEquation, NULL, 337), - NAME_FUNC_OFFSET(4293, glDrawRangeElements, glDrawRangeElements, NULL, 338), - NAME_FUNC_OFFSET(4313, glColorTable, glColorTable, NULL, 339), - NAME_FUNC_OFFSET(4326, glColorTableParameterfv, glColorTableParameterfv, - NULL, 340), - NAME_FUNC_OFFSET(4350, glColorTableParameteriv, glColorTableParameteriv, - NULL, 341), - NAME_FUNC_OFFSET(4374, glCopyColorTable, glCopyColorTable, NULL, 342), - NAME_FUNC_OFFSET(4391, glGetColorTable, glGetColorTable, NULL, 343), - NAME_FUNC_OFFSET(4407, glGetColorTableParameterfv, - glGetColorTableParameterfv, NULL, 344), - NAME_FUNC_OFFSET(4434, glGetColorTableParameteriv, - glGetColorTableParameteriv, NULL, 345), - NAME_FUNC_OFFSET(4461, glColorSubTable, glColorSubTable, NULL, 346), - NAME_FUNC_OFFSET(4477, glCopyColorSubTable, glCopyColorSubTable, NULL, 347), - NAME_FUNC_OFFSET(4497, glConvolutionFilter1D, glConvolutionFilter1D, NULL, - 348), - NAME_FUNC_OFFSET(4519, glConvolutionFilter2D, glConvolutionFilter2D, NULL, - 349), - NAME_FUNC_OFFSET(4541, glConvolutionParameterf, glConvolutionParameterf, - NULL, 350), - NAME_FUNC_OFFSET(4565, glConvolutionParameterfv, glConvolutionParameterfv, - NULL, 351), - NAME_FUNC_OFFSET(4590, glConvolutionParameteri, glConvolutionParameteri, - NULL, 352), - NAME_FUNC_OFFSET(4614, glConvolutionParameteriv, glConvolutionParameteriv, - NULL, 353), - NAME_FUNC_OFFSET(4639, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, - NULL, 354), - NAME_FUNC_OFFSET(4665, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, - NULL, 355), - NAME_FUNC_OFFSET(4691, glGetConvolutionFilter, glGetConvolutionFilter, NULL, - 356), - NAME_FUNC_OFFSET(4714, glGetConvolutionParameterfv, - glGetConvolutionParameterfv, NULL, 357), - NAME_FUNC_OFFSET(4742, glGetConvolutionParameteriv, - glGetConvolutionParameteriv, NULL, 358), - NAME_FUNC_OFFSET(4770, glGetSeparableFilter, glGetSeparableFilter, NULL, - 359), - NAME_FUNC_OFFSET(4791, glSeparableFilter2D, glSeparableFilter2D, NULL, 360), - NAME_FUNC_OFFSET(4811, glGetHistogram, glGetHistogram, NULL, 361), - NAME_FUNC_OFFSET(4826, glGetHistogramParameterfv, glGetHistogramParameterfv, - NULL, 362), - NAME_FUNC_OFFSET(4852, glGetHistogramParameteriv, glGetHistogramParameteriv, - NULL, 363), - NAME_FUNC_OFFSET(4878, glGetMinmax, glGetMinmax, NULL, 364), - NAME_FUNC_OFFSET(4890, glGetMinmaxParameterfv, glGetMinmaxParameterfv, NULL, - 365), - NAME_FUNC_OFFSET(4913, glGetMinmaxParameteriv, glGetMinmaxParameteriv, NULL, - 366), - NAME_FUNC_OFFSET(4936, glHistogram, glHistogram, NULL, 367), - NAME_FUNC_OFFSET(4948, glMinmax, glMinmax, NULL, 368), - NAME_FUNC_OFFSET(4957, glResetHistogram, glResetHistogram, NULL, 369), - NAME_FUNC_OFFSET(4974, glResetMinmax, glResetMinmax, NULL, 370), - NAME_FUNC_OFFSET(4988, glTexImage3D, glTexImage3D, NULL, 371), - NAME_FUNC_OFFSET(5001, glTexSubImage3D, glTexSubImage3D, NULL, 372), - NAME_FUNC_OFFSET(5017, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, 373), - NAME_FUNC_OFFSET(5037, glActiveTextureARB, glActiveTextureARB, NULL, 374), - NAME_FUNC_OFFSET(5056, glClientActiveTextureARB, glClientActiveTextureARB, - NULL, 375), - NAME_FUNC_OFFSET(5081, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, - 376), - NAME_FUNC_OFFSET(5102, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, - 377), - NAME_FUNC_OFFSET(5124, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, - 378), - NAME_FUNC_OFFSET(5145, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, - 379), - NAME_FUNC_OFFSET(5167, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, - 380), - NAME_FUNC_OFFSET(5188, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, - 381), - NAME_FUNC_OFFSET(5210, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, - 382), - NAME_FUNC_OFFSET(5231, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, - 383), - NAME_FUNC_OFFSET(5253, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, - 384), - NAME_FUNC_OFFSET(5274, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, - 385), - NAME_FUNC_OFFSET(5296, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, - 386), - NAME_FUNC_OFFSET(5317, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, - 387), - NAME_FUNC_OFFSET(5339, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, - 388), - NAME_FUNC_OFFSET(5360, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, - 389), - NAME_FUNC_OFFSET(5382, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, - 390), - NAME_FUNC_OFFSET(5403, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, - 391), - NAME_FUNC_OFFSET(5425, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, - 392), - NAME_FUNC_OFFSET(5446, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, - 393), - NAME_FUNC_OFFSET(5468, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, - 394), - NAME_FUNC_OFFSET(5489, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, - 395), - NAME_FUNC_OFFSET(5511, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, - 396), - NAME_FUNC_OFFSET(5532, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, - 397), - NAME_FUNC_OFFSET(5554, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, - 398), - NAME_FUNC_OFFSET(5575, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, - 399), - NAME_FUNC_OFFSET(5597, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, - 400), - NAME_FUNC_OFFSET(5618, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, - 401), - NAME_FUNC_OFFSET(5640, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, - 402), - NAME_FUNC_OFFSET(5661, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, - 403), - NAME_FUNC_OFFSET(5683, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, - 404), - NAME_FUNC_OFFSET(5704, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, - 405), - NAME_FUNC_OFFSET(5726, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, - 406), - NAME_FUNC_OFFSET(5747, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, - 407), - NAME_FUNC_OFFSET(5769, glAttachShader, glAttachShader, NULL, 408), - NAME_FUNC_OFFSET(5784, glCreateProgram, glCreateProgram, NULL, 409), - NAME_FUNC_OFFSET(5800, glCreateShader, glCreateShader, NULL, 410), - NAME_FUNC_OFFSET(5815, glDeleteProgram, glDeleteProgram, NULL, 411), - NAME_FUNC_OFFSET(5831, glDeleteShader, glDeleteShader, NULL, 412), - NAME_FUNC_OFFSET(5846, glDetachShader, glDetachShader, NULL, 413), - NAME_FUNC_OFFSET(5861, glGetAttachedShaders, glGetAttachedShaders, NULL, - 414), - NAME_FUNC_OFFSET(5882, glGetProgramInfoLog, glGetProgramInfoLog, NULL, 415), - NAME_FUNC_OFFSET(5902, glGetProgramiv, glGetProgramiv, NULL, 416), - NAME_FUNC_OFFSET(5917, glGetShaderInfoLog, glGetShaderInfoLog, NULL, 417), - NAME_FUNC_OFFSET(5936, glGetShaderiv, glGetShaderiv, NULL, 418), - NAME_FUNC_OFFSET(5950, glIsProgram, glIsProgram, NULL, 419), - NAME_FUNC_OFFSET(5962, glIsShader, glIsShader, NULL, 420), - NAME_FUNC_OFFSET(5973, glStencilFuncSeparate, glStencilFuncSeparate, NULL, - 421), - NAME_FUNC_OFFSET(5995, glStencilMaskSeparate, glStencilMaskSeparate, NULL, - 422), - NAME_FUNC_OFFSET(6017, glStencilOpSeparate, glStencilOpSeparate, NULL, 423), - NAME_FUNC_OFFSET(6037, glUniformMatrix2x3fv, glUniformMatrix2x3fv, NULL, - 424), - NAME_FUNC_OFFSET(6058, glUniformMatrix2x4fv, glUniformMatrix2x4fv, NULL, - 425), - NAME_FUNC_OFFSET(6079, glUniformMatrix3x2fv, glUniformMatrix3x2fv, NULL, - 426), - NAME_FUNC_OFFSET(6100, glUniformMatrix3x4fv, glUniformMatrix3x4fv, NULL, - 427), - NAME_FUNC_OFFSET(6121, glUniformMatrix4x2fv, glUniformMatrix4x2fv, NULL, - 428), - NAME_FUNC_OFFSET(6142, glUniformMatrix4x3fv, glUniformMatrix4x3fv, NULL, - 429), - NAME_FUNC_OFFSET(6163, glClampColor, glClampColor, NULL, 430), - NAME_FUNC_OFFSET(6176, glClearBufferfi, glClearBufferfi, NULL, 431), - NAME_FUNC_OFFSET(6192, glClearBufferfv, glClearBufferfv, NULL, 432), - NAME_FUNC_OFFSET(6208, glClearBufferiv, glClearBufferiv, NULL, 433), - NAME_FUNC_OFFSET(6224, glClearBufferuiv, glClearBufferuiv, NULL, 434), - NAME_FUNC_OFFSET(6241, glGetStringi, glGetStringi, NULL, 435), - NAME_FUNC_OFFSET(6254, glTexBuffer, glTexBuffer, NULL, 436), - NAME_FUNC_OFFSET(6266, glFramebufferTexture, glFramebufferTexture, NULL, - 437), - NAME_FUNC_OFFSET(6287, glGetBufferParameteri64v, glGetBufferParameteri64v, - NULL, 438), - NAME_FUNC_OFFSET(6312, glGetInteger64i_v, glGetInteger64i_v, NULL, 439), - NAME_FUNC_OFFSET(6330, glVertexAttribDivisor, glVertexAttribDivisor, NULL, - 440), - NAME_FUNC_OFFSET(6352, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, - NULL, 441), - NAME_FUNC_OFFSET(6378, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, - NULL, 442), - NAME_FUNC_OFFSET(6404, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, - NULL, 443), - NAME_FUNC_OFFSET(6430, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, - NULL, 444), - NAME_FUNC_OFFSET(6456, glSampleCoverageARB, glSampleCoverageARB, NULL, 445), - NAME_FUNC_OFFSET(6476, glCompressedTexImage1DARB, glCompressedTexImage1DARB, - NULL, 446), - NAME_FUNC_OFFSET(6502, glCompressedTexImage2DARB, glCompressedTexImage2DARB, - NULL, 447), - NAME_FUNC_OFFSET(6528, glCompressedTexImage3DARB, glCompressedTexImage3DARB, - NULL, 448), - NAME_FUNC_OFFSET(6554, glCompressedTexSubImage1DARB, - glCompressedTexSubImage1DARB, NULL, 449), - NAME_FUNC_OFFSET(6583, glCompressedTexSubImage2DARB, - glCompressedTexSubImage2DARB, NULL, 450), - NAME_FUNC_OFFSET(6612, glCompressedTexSubImage3DARB, - glCompressedTexSubImage3DARB, NULL, 451), - NAME_FUNC_OFFSET(6641, glGetCompressedTexImageARB, - glGetCompressedTexImageARB, NULL, 452), - NAME_FUNC_OFFSET(6668, glDisableVertexAttribArrayARB, - glDisableVertexAttribArrayARB, NULL, 453), - NAME_FUNC_OFFSET(6698, glEnableVertexAttribArrayARB, - glEnableVertexAttribArrayARB, NULL, 454), - NAME_FUNC_OFFSET(6727, glGetProgramEnvParameterdvARB, - glGetProgramEnvParameterdvARB, NULL, 455), - NAME_FUNC_OFFSET(6757, glGetProgramEnvParameterfvARB, - glGetProgramEnvParameterfvARB, NULL, 456), - NAME_FUNC_OFFSET(6787, glGetProgramLocalParameterdvARB, - glGetProgramLocalParameterdvARB, NULL, 457), - NAME_FUNC_OFFSET(6819, glGetProgramLocalParameterfvARB, - glGetProgramLocalParameterfvARB, NULL, 458), - NAME_FUNC_OFFSET(6851, glGetProgramStringARB, glGetProgramStringARB, NULL, - 459), - NAME_FUNC_OFFSET(6873, glGetProgramivARB, glGetProgramivARB, NULL, 460), - NAME_FUNC_OFFSET(6891, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, - 461), - NAME_FUNC_OFFSET(6914, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, - 462), - NAME_FUNC_OFFSET(6937, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, - 463), - NAME_FUNC_OFFSET(6960, glProgramEnvParameter4dARB, - glProgramEnvParameter4dARB, NULL, 464), - NAME_FUNC_OFFSET(6987, glProgramEnvParameter4dvARB, - glProgramEnvParameter4dvARB, NULL, 465), - NAME_FUNC_OFFSET(7015, glProgramEnvParameter4fARB, - glProgramEnvParameter4fARB, NULL, 466), - NAME_FUNC_OFFSET(7042, glProgramEnvParameter4fvARB, - glProgramEnvParameter4fvARB, NULL, 467), - NAME_FUNC_OFFSET(7070, glProgramLocalParameter4dARB, - glProgramLocalParameter4dARB, NULL, 468), - NAME_FUNC_OFFSET(7099, glProgramLocalParameter4dvARB, - glProgramLocalParameter4dvARB, NULL, 469), - NAME_FUNC_OFFSET(7129, glProgramLocalParameter4fARB, - glProgramLocalParameter4fARB, NULL, 470), - NAME_FUNC_OFFSET(7158, glProgramLocalParameter4fvARB, - glProgramLocalParameter4fvARB, NULL, 471), - NAME_FUNC_OFFSET(7188, glProgramStringARB, glProgramStringARB, NULL, 472), - NAME_FUNC_OFFSET(7207, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, 473), - NAME_FUNC_OFFSET(7227, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, - 474), - NAME_FUNC_OFFSET(7248, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, 475), - NAME_FUNC_OFFSET(7268, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, - 476), - NAME_FUNC_OFFSET(7289, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, 477), - NAME_FUNC_OFFSET(7309, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, - 478), - NAME_FUNC_OFFSET(7330, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, 479), - NAME_FUNC_OFFSET(7350, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, - 480), - NAME_FUNC_OFFSET(7371, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, 481), - NAME_FUNC_OFFSET(7391, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, - 482), - NAME_FUNC_OFFSET(7412, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, 483), - NAME_FUNC_OFFSET(7432, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, - 484), - NAME_FUNC_OFFSET(7453, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, 485), - NAME_FUNC_OFFSET(7473, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, - 486), - NAME_FUNC_OFFSET(7494, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, 487), - NAME_FUNC_OFFSET(7514, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, - 488), - NAME_FUNC_OFFSET(7535, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, 489), - NAME_FUNC_OFFSET(7555, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, - 490), - NAME_FUNC_OFFSET(7576, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, - 491), - NAME_FUNC_OFFSET(7598, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, - 492), - NAME_FUNC_OFFSET(7620, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, - 493), - NAME_FUNC_OFFSET(7642, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, - 494), - NAME_FUNC_OFFSET(7664, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, - 495), - NAME_FUNC_OFFSET(7687, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, - 496), - NAME_FUNC_OFFSET(7710, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, - 497), - NAME_FUNC_OFFSET(7733, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, - 498), - NAME_FUNC_OFFSET(7754, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, 499), - NAME_FUNC_OFFSET(7774, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, - 500), - NAME_FUNC_OFFSET(7795, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, 501), - NAME_FUNC_OFFSET(7815, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, - 502), - NAME_FUNC_OFFSET(7836, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, - 503), - NAME_FUNC_OFFSET(7857, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, 504), - NAME_FUNC_OFFSET(7877, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, - 505), - NAME_FUNC_OFFSET(7898, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, - 506), - NAME_FUNC_OFFSET(7920, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, - 507), - NAME_FUNC_OFFSET(7942, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, - 508), - NAME_FUNC_OFFSET(7964, glVertexAttribPointerARB, glVertexAttribPointerARB, - NULL, 509), - NAME_FUNC_OFFSET(7989, glBindBufferARB, glBindBufferARB, NULL, 510), - NAME_FUNC_OFFSET(8005, glBufferDataARB, glBufferDataARB, NULL, 511), - NAME_FUNC_OFFSET(8021, glBufferSubDataARB, glBufferSubDataARB, NULL, 512), - NAME_FUNC_OFFSET(8040, glDeleteBuffersARB, glDeleteBuffersARB, NULL, 513), - NAME_FUNC_OFFSET(8059, glGenBuffersARB, glGenBuffersARB, NULL, 514), - NAME_FUNC_OFFSET(8075, glGetBufferParameterivARB, glGetBufferParameterivARB, - NULL, 515), - NAME_FUNC_OFFSET(8101, glGetBufferPointervARB, glGetBufferPointervARB, NULL, - 516), - NAME_FUNC_OFFSET(8124, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, - 517), - NAME_FUNC_OFFSET(8146, glIsBufferARB, glIsBufferARB, NULL, 518), - NAME_FUNC_OFFSET(8160, glMapBufferARB, glMapBufferARB, NULL, 519), - NAME_FUNC_OFFSET(8175, glUnmapBufferARB, glUnmapBufferARB, NULL, 520), - NAME_FUNC_OFFSET(8192, glBeginQueryARB, glBeginQueryARB, NULL, 521), - NAME_FUNC_OFFSET(8208, glDeleteQueriesARB, glDeleteQueriesARB, NULL, 522), - NAME_FUNC_OFFSET(8227, glEndQueryARB, glEndQueryARB, NULL, 523), - NAME_FUNC_OFFSET(8241, glGenQueriesARB, glGenQueriesARB, NULL, 524), - NAME_FUNC_OFFSET(8257, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, - 525), - NAME_FUNC_OFFSET(8279, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, - 526), - NAME_FUNC_OFFSET(8302, glGetQueryivARB, glGetQueryivARB, NULL, 527), - NAME_FUNC_OFFSET(8318, glIsQueryARB, glIsQueryARB, NULL, 528), - NAME_FUNC_OFFSET(8331, glAttachObjectARB, glAttachObjectARB, NULL, 529), - NAME_FUNC_OFFSET(8349, glCompileShaderARB, glCompileShaderARB, NULL, 530), - NAME_FUNC_OFFSET(8368, glCreateProgramObjectARB, glCreateProgramObjectARB, - NULL, 531), - NAME_FUNC_OFFSET(8393, glCreateShaderObjectARB, glCreateShaderObjectARB, - NULL, 532), - NAME_FUNC_OFFSET(8417, glDeleteObjectARB, glDeleteObjectARB, NULL, 533), - NAME_FUNC_OFFSET(8435, glDetachObjectARB, glDetachObjectARB, NULL, 534), - NAME_FUNC_OFFSET(8453, glGetActiveUniformARB, glGetActiveUniformARB, NULL, - 535), - NAME_FUNC_OFFSET(8475, glGetAttachedObjectsARB, glGetAttachedObjectsARB, - NULL, 536), - NAME_FUNC_OFFSET(8499, glGetHandleARB, glGetHandleARB, NULL, 537), - NAME_FUNC_OFFSET(8514, glGetInfoLogARB, glGetInfoLogARB, NULL, 538), - NAME_FUNC_OFFSET(8530, glGetObjectParameterfvARB, glGetObjectParameterfvARB, - NULL, 539), - NAME_FUNC_OFFSET(8556, glGetObjectParameterivARB, glGetObjectParameterivARB, - NULL, 540), - NAME_FUNC_OFFSET(8582, glGetShaderSourceARB, glGetShaderSourceARB, NULL, - 541), - NAME_FUNC_OFFSET(8603, glGetUniformLocationARB, glGetUniformLocationARB, - NULL, 542), - NAME_FUNC_OFFSET(8627, glGetUniformfvARB, glGetUniformfvARB, NULL, 543), - NAME_FUNC_OFFSET(8645, glGetUniformivARB, glGetUniformivARB, NULL, 544), - NAME_FUNC_OFFSET(8663, glLinkProgramARB, glLinkProgramARB, NULL, 545), - NAME_FUNC_OFFSET(8680, glShaderSourceARB, glShaderSourceARB, NULL, 546), - NAME_FUNC_OFFSET(8698, glUniform1fARB, glUniform1fARB, NULL, 547), - NAME_FUNC_OFFSET(8713, glUniform1fvARB, glUniform1fvARB, NULL, 548), - NAME_FUNC_OFFSET(8729, glUniform1iARB, glUniform1iARB, NULL, 549), - NAME_FUNC_OFFSET(8744, glUniform1ivARB, glUniform1ivARB, NULL, 550), - NAME_FUNC_OFFSET(8760, glUniform2fARB, glUniform2fARB, NULL, 551), - NAME_FUNC_OFFSET(8775, glUniform2fvARB, glUniform2fvARB, NULL, 552), - NAME_FUNC_OFFSET(8791, glUniform2iARB, glUniform2iARB, NULL, 553), - NAME_FUNC_OFFSET(8806, glUniform2ivARB, glUniform2ivARB, NULL, 554), - NAME_FUNC_OFFSET(8822, glUniform3fARB, glUniform3fARB, NULL, 555), - NAME_FUNC_OFFSET(8837, glUniform3fvARB, glUniform3fvARB, NULL, 556), - NAME_FUNC_OFFSET(8853, glUniform3iARB, glUniform3iARB, NULL, 557), - NAME_FUNC_OFFSET(8868, glUniform3ivARB, glUniform3ivARB, NULL, 558), - NAME_FUNC_OFFSET(8884, glUniform4fARB, glUniform4fARB, NULL, 559), - NAME_FUNC_OFFSET(8899, glUniform4fvARB, glUniform4fvARB, NULL, 560), - NAME_FUNC_OFFSET(8915, glUniform4iARB, glUniform4iARB, NULL, 561), - NAME_FUNC_OFFSET(8930, glUniform4ivARB, glUniform4ivARB, NULL, 562), - NAME_FUNC_OFFSET(8946, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, - 563), - NAME_FUNC_OFFSET(8968, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, - 564), - NAME_FUNC_OFFSET(8990, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, - 565), - NAME_FUNC_OFFSET(9012, glUseProgramObjectARB, glUseProgramObjectARB, NULL, - 566), - NAME_FUNC_OFFSET(9034, glValidateProgramARB, glValidateProgramARB, NULL, - 567), - NAME_FUNC_OFFSET(9055, glBindAttribLocationARB, glBindAttribLocationARB, - NULL, 568), - NAME_FUNC_OFFSET(9079, glGetActiveAttribARB, glGetActiveAttribARB, NULL, - 569), - NAME_FUNC_OFFSET(9100, glGetAttribLocationARB, glGetAttribLocationARB, NULL, - 570), - NAME_FUNC_OFFSET(9123, glDrawBuffersARB, glDrawBuffersARB, NULL, 571), - NAME_FUNC_OFFSET(9140, glClampColorARB, glClampColorARB, NULL, 572), - NAME_FUNC_OFFSET(9156, glDrawArraysInstancedARB, glDrawArraysInstancedARB, - NULL, 573), - NAME_FUNC_OFFSET(9181, glDrawElementsInstancedARB, - glDrawElementsInstancedARB, NULL, 574), - NAME_FUNC_OFFSET(9208, glRenderbufferStorageMultisample, - glRenderbufferStorageMultisample, NULL, 575), - NAME_FUNC_OFFSET(9241, glFramebufferTextureARB, glFramebufferTextureARB, - NULL, 576), - NAME_FUNC_OFFSET(9265, glFramebufferTextureFaceARB, - glFramebufferTextureFaceARB, NULL, 577), - NAME_FUNC_OFFSET(9293, glProgramParameteriARB, glProgramParameteriARB, NULL, - 578), - NAME_FUNC_OFFSET(9316, glVertexAttribDivisorARB, glVertexAttribDivisorARB, - NULL, 579), - NAME_FUNC_OFFSET(9341, glFlushMappedBufferRange, glFlushMappedBufferRange, - NULL, 580), - NAME_FUNC_OFFSET(9366, glMapBufferRange, glMapBufferRange, NULL, 581), - NAME_FUNC_OFFSET(9383, glTexBufferARB, glTexBufferARB, NULL, 582), - NAME_FUNC_OFFSET(9398, glBindVertexArray, glBindVertexArray, NULL, 583), - NAME_FUNC_OFFSET(9416, glGenVertexArrays, glGenVertexArrays, NULL, 584), - NAME_FUNC_OFFSET(9434, glCopyBufferSubData, glCopyBufferSubData, NULL, 585), - NAME_FUNC_OFFSET(9454, glClientWaitSync, glClientWaitSync, NULL, 586), - NAME_FUNC_OFFSET(9471, glDeleteSync, glDeleteSync, NULL, 587), - NAME_FUNC_OFFSET(9484, glFenceSync, glFenceSync, NULL, 588), - NAME_FUNC_OFFSET(9496, glGetInteger64v, glGetInteger64v, NULL, 589), - NAME_FUNC_OFFSET(9512, glGetSynciv, glGetSynciv, NULL, 590), - NAME_FUNC_OFFSET(9524, glIsSync, glIsSync, NULL, 591), - NAME_FUNC_OFFSET(9533, glWaitSync, glWaitSync, NULL, 592), - NAME_FUNC_OFFSET(9544, glDrawElementsBaseVertex, glDrawElementsBaseVertex, - NULL, 593), - NAME_FUNC_OFFSET(9569, glDrawElementsInstancedBaseVertex, - glDrawElementsInstancedBaseVertex, NULL, 594), - NAME_FUNC_OFFSET(9603, glDrawRangeElementsBaseVertex, - glDrawRangeElementsBaseVertex, NULL, 595), - NAME_FUNC_OFFSET(9633, glMultiDrawElementsBaseVertex, - glMultiDrawElementsBaseVertex, NULL, 596), - NAME_FUNC_OFFSET(9663, glBlendEquationSeparateiARB, - glBlendEquationSeparateiARB, NULL, 597), - NAME_FUNC_OFFSET(9691, glBlendEquationiARB, glBlendEquationiARB, NULL, 598), - NAME_FUNC_OFFSET(9711, glBlendFuncSeparateiARB, glBlendFuncSeparateiARB, - NULL, 599), - NAME_FUNC_OFFSET(9735, glBlendFunciARB, glBlendFunciARB, NULL, 600), - NAME_FUNC_OFFSET(9751, glBindSampler, glBindSampler, NULL, 601), - NAME_FUNC_OFFSET(9765, glDeleteSamplers, glDeleteSamplers, NULL, 602), - NAME_FUNC_OFFSET(9782, glGenSamplers, glGenSamplers, NULL, 603), - NAME_FUNC_OFFSET(9796, glGetSamplerParameterIiv, glGetSamplerParameterIiv, - NULL, 604), - NAME_FUNC_OFFSET(9821, glGetSamplerParameterIuiv, glGetSamplerParameterIuiv, - NULL, 605), - NAME_FUNC_OFFSET(9847, glGetSamplerParameterfv, glGetSamplerParameterfv, - NULL, 606), - NAME_FUNC_OFFSET(9871, glGetSamplerParameteriv, glGetSamplerParameteriv, - NULL, 607), - NAME_FUNC_OFFSET(9895, glIsSampler, glIsSampler, NULL, 608), - NAME_FUNC_OFFSET(9907, glSamplerParameterIiv, glSamplerParameterIiv, NULL, - 609), - NAME_FUNC_OFFSET(9929, glSamplerParameterIuiv, glSamplerParameterIuiv, NULL, - 610), - NAME_FUNC_OFFSET(9952, glSamplerParameterf, glSamplerParameterf, NULL, 611), - NAME_FUNC_OFFSET(9972, glSamplerParameterfv, glSamplerParameterfv, NULL, - 612), - NAME_FUNC_OFFSET(9993, glSamplerParameteri, glSamplerParameteri, NULL, 613), - NAME_FUNC_OFFSET(10013, glSamplerParameteriv, glSamplerParameteriv, NULL, - 614), - NAME_FUNC_OFFSET(10034, glColorP3ui, glColorP3ui, NULL, 615), - NAME_FUNC_OFFSET(10046, glColorP3uiv, glColorP3uiv, NULL, 616), - NAME_FUNC_OFFSET(10059, glColorP4ui, glColorP4ui, NULL, 617), - NAME_FUNC_OFFSET(10071, glColorP4uiv, glColorP4uiv, NULL, 618), - NAME_FUNC_OFFSET(10084, glMultiTexCoordP1ui, glMultiTexCoordP1ui, NULL, - 619), - NAME_FUNC_OFFSET(10104, glMultiTexCoordP1uiv, glMultiTexCoordP1uiv, NULL, - 620), - NAME_FUNC_OFFSET(10125, glMultiTexCoordP2ui, glMultiTexCoordP2ui, NULL, - 621), - NAME_FUNC_OFFSET(10145, glMultiTexCoordP2uiv, glMultiTexCoordP2uiv, NULL, - 622), - NAME_FUNC_OFFSET(10166, glMultiTexCoordP3ui, glMultiTexCoordP3ui, NULL, - 623), - NAME_FUNC_OFFSET(10186, glMultiTexCoordP3uiv, glMultiTexCoordP3uiv, NULL, - 624), - NAME_FUNC_OFFSET(10207, glMultiTexCoordP4ui, glMultiTexCoordP4ui, NULL, - 625), - NAME_FUNC_OFFSET(10227, glMultiTexCoordP4uiv, glMultiTexCoordP4uiv, NULL, - 626), - NAME_FUNC_OFFSET(10248, glNormalP3ui, glNormalP3ui, NULL, 627), - NAME_FUNC_OFFSET(10261, glNormalP3uiv, glNormalP3uiv, NULL, 628), - NAME_FUNC_OFFSET(10275, glSecondaryColorP3ui, glSecondaryColorP3ui, NULL, - 629), - NAME_FUNC_OFFSET(10296, glSecondaryColorP3uiv, glSecondaryColorP3uiv, NULL, - 630), - NAME_FUNC_OFFSET(10318, glTexCoordP1ui, glTexCoordP1ui, NULL, 631), - NAME_FUNC_OFFSET(10333, glTexCoordP1uiv, glTexCoordP1uiv, NULL, 632), - NAME_FUNC_OFFSET(10349, glTexCoordP2ui, glTexCoordP2ui, NULL, 633), - NAME_FUNC_OFFSET(10364, glTexCoordP2uiv, glTexCoordP2uiv, NULL, 634), - NAME_FUNC_OFFSET(10380, glTexCoordP3ui, glTexCoordP3ui, NULL, 635), - NAME_FUNC_OFFSET(10395, glTexCoordP3uiv, glTexCoordP3uiv, NULL, 636), - NAME_FUNC_OFFSET(10411, glTexCoordP4ui, glTexCoordP4ui, NULL, 637), - NAME_FUNC_OFFSET(10426, glTexCoordP4uiv, glTexCoordP4uiv, NULL, 638), - NAME_FUNC_OFFSET(10442, glVertexAttribP1ui, glVertexAttribP1ui, NULL, 639), - NAME_FUNC_OFFSET(10461, glVertexAttribP1uiv, glVertexAttribP1uiv, NULL, - 640), - NAME_FUNC_OFFSET(10481, glVertexAttribP2ui, glVertexAttribP2ui, NULL, 641), - NAME_FUNC_OFFSET(10500, glVertexAttribP2uiv, glVertexAttribP2uiv, NULL, - 642), - NAME_FUNC_OFFSET(10520, glVertexAttribP3ui, glVertexAttribP3ui, NULL, 643), - NAME_FUNC_OFFSET(10539, glVertexAttribP3uiv, glVertexAttribP3uiv, NULL, - 644), - NAME_FUNC_OFFSET(10559, glVertexAttribP4ui, glVertexAttribP4ui, NULL, 645), - NAME_FUNC_OFFSET(10578, glVertexAttribP4uiv, glVertexAttribP4uiv, NULL, - 646), - NAME_FUNC_OFFSET(10598, glVertexP2ui, glVertexP2ui, NULL, 647), - NAME_FUNC_OFFSET(10611, glVertexP2uiv, glVertexP2uiv, NULL, 648), - NAME_FUNC_OFFSET(10625, glVertexP3ui, glVertexP3ui, NULL, 649), - NAME_FUNC_OFFSET(10638, glVertexP3uiv, glVertexP3uiv, NULL, 650), - NAME_FUNC_OFFSET(10652, glVertexP4ui, glVertexP4ui, NULL, 651), - NAME_FUNC_OFFSET(10665, glVertexP4uiv, glVertexP4uiv, NULL, 652), - NAME_FUNC_OFFSET(10679, glBindTransformFeedback, glBindTransformFeedback, - NULL, 653), - NAME_FUNC_OFFSET(10703, glDeleteTransformFeedbacks, - glDeleteTransformFeedbacks, NULL, 654), - NAME_FUNC_OFFSET(10730, glDrawTransformFeedback, glDrawTransformFeedback, - NULL, 655), - NAME_FUNC_OFFSET(10754, glGenTransformFeedbacks, glGenTransformFeedbacks, - NULL, 656), - NAME_FUNC_OFFSET(10778, glIsTransformFeedback, glIsTransformFeedback, NULL, - 657), - NAME_FUNC_OFFSET(10800, glPauseTransformFeedback, glPauseTransformFeedback, - NULL, 658), - NAME_FUNC_OFFSET(10825, glResumeTransformFeedback, - glResumeTransformFeedback, NULL, 659), - NAME_FUNC_OFFSET(10851, glClearDepthf, glClearDepthf, NULL, 660), - NAME_FUNC_OFFSET(10865, glDepthRangef, glDepthRangef, NULL, 661), - NAME_FUNC_OFFSET(10879, glGetShaderPrecisionFormat, - glGetShaderPrecisionFormat, NULL, 662), - NAME_FUNC_OFFSET(10906, glReleaseShaderCompiler, glReleaseShaderCompiler, - NULL, 663), - NAME_FUNC_OFFSET(10930, glShaderBinary, glShaderBinary, NULL, 664), - NAME_FUNC_OFFSET(10945, glGetGraphicsResetStatusARB, - glGetGraphicsResetStatusARB, NULL, 665), - NAME_FUNC_OFFSET(10973, glGetnColorTableARB, glGetnColorTableARB, NULL, - 666), - NAME_FUNC_OFFSET(10993, glGetnCompressedTexImageARB, - glGetnCompressedTexImageARB, NULL, 667), - NAME_FUNC_OFFSET(11021, glGetnConvolutionFilterARB, - glGetnConvolutionFilterARB, NULL, 668), - NAME_FUNC_OFFSET(11048, glGetnHistogramARB, glGetnHistogramARB, NULL, 669), - NAME_FUNC_OFFSET(11067, glGetnMapdvARB, glGetnMapdvARB, NULL, 670), - NAME_FUNC_OFFSET(11082, glGetnMapfvARB, glGetnMapfvARB, NULL, 671), - NAME_FUNC_OFFSET(11097, glGetnMapivARB, glGetnMapivARB, NULL, 672), - NAME_FUNC_OFFSET(11112, glGetnMinmaxARB, glGetnMinmaxARB, NULL, 673), - NAME_FUNC_OFFSET(11128, glGetnPixelMapfvARB, glGetnPixelMapfvARB, NULL, - 674), - NAME_FUNC_OFFSET(11148, glGetnPixelMapuivARB, glGetnPixelMapuivARB, NULL, - 675), - NAME_FUNC_OFFSET(11169, glGetnPixelMapusvARB, glGetnPixelMapusvARB, NULL, - 676), - NAME_FUNC_OFFSET(11190, glGetnPolygonStippleARB, glGetnPolygonStippleARB, - NULL, 677), - NAME_FUNC_OFFSET(11214, glGetnSeparableFilterARB, glGetnSeparableFilterARB, - NULL, 678), - NAME_FUNC_OFFSET(11239, glGetnTexImageARB, glGetnTexImageARB, NULL, 679), - NAME_FUNC_OFFSET(11257, glGetnUniformdvARB, glGetnUniformdvARB, NULL, 680), - NAME_FUNC_OFFSET(11276, glGetnUniformfvARB, glGetnUniformfvARB, NULL, 681), - NAME_FUNC_OFFSET(11295, glGetnUniformivARB, glGetnUniformivARB, NULL, 682), - NAME_FUNC_OFFSET(11314, glGetnUniformuivARB, glGetnUniformuivARB, NULL, - 683), - NAME_FUNC_OFFSET(11334, glReadnPixelsARB, glReadnPixelsARB, NULL, 684), - NAME_FUNC_OFFSET(11351, glTexStorage1D, glTexStorage1D, NULL, 685), - NAME_FUNC_OFFSET(11366, glTexStorage2D, glTexStorage2D, NULL, 686), - NAME_FUNC_OFFSET(11381, glTexStorage3D, glTexStorage3D, NULL, 687), - NAME_FUNC_OFFSET(11396, glTextureStorage1DEXT, glTextureStorage1DEXT, NULL, - 688), - NAME_FUNC_OFFSET(11418, glTextureStorage2DEXT, glTextureStorage2DEXT, NULL, - 689), - NAME_FUNC_OFFSET(11440, glTextureStorage3DEXT, glTextureStorage3DEXT, NULL, - 690), - NAME_FUNC_OFFSET(11462, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, 691), - NAME_FUNC_OFFSET(11481, gl_dispatch_stub_692, gl_dispatch_stub_692, NULL, - 692), - NAME_FUNC_OFFSET(11513, gl_dispatch_stub_693, gl_dispatch_stub_693, NULL, - 693), - NAME_FUNC_OFFSET(11545, gl_dispatch_stub_694, gl_dispatch_stub_694, NULL, - 694), - NAME_FUNC_OFFSET(11573, gl_dispatch_stub_695, gl_dispatch_stub_695, NULL, - 695), - NAME_FUNC_OFFSET(11602, gl_dispatch_stub_696, gl_dispatch_stub_696, NULL, - 696), - NAME_FUNC_OFFSET(11630, gl_dispatch_stub_697, gl_dispatch_stub_697, NULL, - 697), - NAME_FUNC_OFFSET(11659, gl_dispatch_stub_698, gl_dispatch_stub_698, NULL, - 698), - NAME_FUNC_OFFSET(11676, gl_dispatch_stub_699, gl_dispatch_stub_699, NULL, - 699), - NAME_FUNC_OFFSET(11696, glColorPointerEXT, glColorPointerEXT, NULL, 700), - NAME_FUNC_OFFSET(11714, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, - 701), - NAME_FUNC_OFFSET(11735, glIndexPointerEXT, glIndexPointerEXT, NULL, 702), - NAME_FUNC_OFFSET(11753, glNormalPointerEXT, glNormalPointerEXT, NULL, 703), - NAME_FUNC_OFFSET(11772, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, - 704), - NAME_FUNC_OFFSET(11793, glVertexPointerEXT, glVertexPointerEXT, NULL, 705), - NAME_FUNC_OFFSET(11812, glPointParameterfEXT, glPointParameterfEXT, NULL, - 706), - NAME_FUNC_OFFSET(11833, glPointParameterfvEXT, glPointParameterfvEXT, NULL, - 707), - NAME_FUNC_OFFSET(11855, glLockArraysEXT, glLockArraysEXT, NULL, 708), - NAME_FUNC_OFFSET(11871, glUnlockArraysEXT, glUnlockArraysEXT, NULL, 709), - NAME_FUNC_OFFSET(11889, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, - 710), - NAME_FUNC_OFFSET(11911, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, - NULL, 711), - NAME_FUNC_OFFSET(11934, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, - 712), - NAME_FUNC_OFFSET(11956, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, - NULL, 713), - NAME_FUNC_OFFSET(11979, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, - 714), - NAME_FUNC_OFFSET(12001, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, - NULL, 715), - NAME_FUNC_OFFSET(12024, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, - 716), - NAME_FUNC_OFFSET(12046, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, - NULL, 717), - NAME_FUNC_OFFSET(12069, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, - 718), - NAME_FUNC_OFFSET(12091, glSecondaryColor3svEXT, glSecondaryColor3svEXT, - NULL, 719), - NAME_FUNC_OFFSET(12114, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, - NULL, 720), - NAME_FUNC_OFFSET(12137, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, - NULL, 721), - NAME_FUNC_OFFSET(12161, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, - NULL, 722), - NAME_FUNC_OFFSET(12184, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, - NULL, 723), - NAME_FUNC_OFFSET(12208, glSecondaryColor3usEXT, glSecondaryColor3usEXT, - NULL, 724), - NAME_FUNC_OFFSET(12231, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, - NULL, 725), - NAME_FUNC_OFFSET(12255, glSecondaryColorPointerEXT, - glSecondaryColorPointerEXT, NULL, 726), - NAME_FUNC_OFFSET(12282, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, - 727), - NAME_FUNC_OFFSET(12303, glMultiDrawElementsEXT, glMultiDrawElementsEXT, - NULL, 728), - NAME_FUNC_OFFSET(12326, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, - 729), - NAME_FUNC_OFFSET(12347, glFogCoorddEXT, glFogCoorddEXT, NULL, 730), - NAME_FUNC_OFFSET(12362, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 731), - NAME_FUNC_OFFSET(12378, glFogCoordfEXT, glFogCoordfEXT, NULL, 732), - NAME_FUNC_OFFSET(12393, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 733), - NAME_FUNC_OFFSET(12409, gl_dispatch_stub_734, gl_dispatch_stub_734, NULL, - 734), - NAME_FUNC_OFFSET(12427, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, - NULL, 735), - NAME_FUNC_OFFSET(12450, glFlushVertexArrayRangeNV, - glFlushVertexArrayRangeNV, NULL, 736), - NAME_FUNC_OFFSET(12476, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, - 737), - NAME_FUNC_OFFSET(12497, glCombinerInputNV, glCombinerInputNV, NULL, 738), - NAME_FUNC_OFFSET(12515, glCombinerOutputNV, glCombinerOutputNV, NULL, 739), - NAME_FUNC_OFFSET(12534, glCombinerParameterfNV, glCombinerParameterfNV, - NULL, 740), - NAME_FUNC_OFFSET(12557, glCombinerParameterfvNV, glCombinerParameterfvNV, - NULL, 741), - NAME_FUNC_OFFSET(12581, glCombinerParameteriNV, glCombinerParameteriNV, - NULL, 742), - NAME_FUNC_OFFSET(12604, glCombinerParameterivNV, glCombinerParameterivNV, - NULL, 743), - NAME_FUNC_OFFSET(12628, glFinalCombinerInputNV, glFinalCombinerInputNV, - NULL, 744), - NAME_FUNC_OFFSET(12651, glGetCombinerInputParameterfvNV, - glGetCombinerInputParameterfvNV, NULL, 745), - NAME_FUNC_OFFSET(12683, glGetCombinerInputParameterivNV, - glGetCombinerInputParameterivNV, NULL, 746), - NAME_FUNC_OFFSET(12715, glGetCombinerOutputParameterfvNV, - glGetCombinerOutputParameterfvNV, NULL, 747), - NAME_FUNC_OFFSET(12748, glGetCombinerOutputParameterivNV, - glGetCombinerOutputParameterivNV, NULL, 748), - NAME_FUNC_OFFSET(12781, glGetFinalCombinerInputParameterfvNV, - glGetFinalCombinerInputParameterfvNV, NULL, 749), - NAME_FUNC_OFFSET(12818, glGetFinalCombinerInputParameterivNV, - glGetFinalCombinerInputParameterivNV, NULL, 750), - NAME_FUNC_OFFSET(12855, glResizeBuffersMESA, glResizeBuffersMESA, NULL, - 751), - NAME_FUNC_OFFSET(12875, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 752), - NAME_FUNC_OFFSET(12893, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 753), - NAME_FUNC_OFFSET(12912, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 754), - NAME_FUNC_OFFSET(12930, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 755), - NAME_FUNC_OFFSET(12949, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 756), - NAME_FUNC_OFFSET(12967, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 757), - NAME_FUNC_OFFSET(12986, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 758), - NAME_FUNC_OFFSET(13004, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 759), - NAME_FUNC_OFFSET(13023, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 760), - NAME_FUNC_OFFSET(13041, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 761), - NAME_FUNC_OFFSET(13060, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 762), - NAME_FUNC_OFFSET(13078, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 763), - NAME_FUNC_OFFSET(13097, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 764), - NAME_FUNC_OFFSET(13115, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 765), - NAME_FUNC_OFFSET(13134, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 766), - NAME_FUNC_OFFSET(13152, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 767), - NAME_FUNC_OFFSET(13171, glWindowPos4dMESA, glWindowPos4dMESA, NULL, 768), - NAME_FUNC_OFFSET(13189, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, 769), - NAME_FUNC_OFFSET(13208, glWindowPos4fMESA, glWindowPos4fMESA, NULL, 770), - NAME_FUNC_OFFSET(13226, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, 771), - NAME_FUNC_OFFSET(13245, glWindowPos4iMESA, glWindowPos4iMESA, NULL, 772), - NAME_FUNC_OFFSET(13263, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, 773), - NAME_FUNC_OFFSET(13282, glWindowPos4sMESA, glWindowPos4sMESA, NULL, 774), - NAME_FUNC_OFFSET(13300, glWindowPos4svMESA, glWindowPos4svMESA, NULL, 775), - NAME_FUNC_OFFSET(13319, gl_dispatch_stub_776, gl_dispatch_stub_776, NULL, - 776), - NAME_FUNC_OFFSET(13344, gl_dispatch_stub_777, gl_dispatch_stub_777, NULL, - 777), - NAME_FUNC_OFFSET(13371, gl_dispatch_stub_778, gl_dispatch_stub_778, NULL, - 778), - NAME_FUNC_OFFSET(13388, gl_dispatch_stub_779, gl_dispatch_stub_779, NULL, - 779), - NAME_FUNC_OFFSET(13404, gl_dispatch_stub_780, gl_dispatch_stub_780, NULL, - 780), - NAME_FUNC_OFFSET(13418, gl_dispatch_stub_781, gl_dispatch_stub_781, NULL, - 781), - NAME_FUNC_OFFSET(13433, gl_dispatch_stub_782, gl_dispatch_stub_782, NULL, - 782), - NAME_FUNC_OFFSET(13445, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, - 783), - NAME_FUNC_OFFSET(13458, gl_dispatch_stub_784, gl_dispatch_stub_784, NULL, - 784), - NAME_FUNC_OFFSET(13472, glAreProgramsResidentNV, glAreProgramsResidentNV, - NULL, 785), - NAME_FUNC_OFFSET(13496, glBindProgramNV, glBindProgramNV, NULL, 786), - NAME_FUNC_OFFSET(13512, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 787), - NAME_FUNC_OFFSET(13531, glExecuteProgramNV, glExecuteProgramNV, NULL, 788), - NAME_FUNC_OFFSET(13550, glGenProgramsNV, glGenProgramsNV, NULL, 789), - NAME_FUNC_OFFSET(13566, glGetProgramParameterdvNV, - glGetProgramParameterdvNV, NULL, 790), - NAME_FUNC_OFFSET(13592, glGetProgramParameterfvNV, - glGetProgramParameterfvNV, NULL, 791), - NAME_FUNC_OFFSET(13618, glGetProgramStringNV, glGetProgramStringNV, NULL, - 792), - NAME_FUNC_OFFSET(13639, glGetProgramivNV, glGetProgramivNV, NULL, 793), - NAME_FUNC_OFFSET(13656, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, - 794), - NAME_FUNC_OFFSET(13677, glGetVertexAttribPointervNV, - glGetVertexAttribPointervNV, NULL, 795), - NAME_FUNC_OFFSET(13705, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, - 796), - NAME_FUNC_OFFSET(13727, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, - 797), - NAME_FUNC_OFFSET(13749, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, - 798), - NAME_FUNC_OFFSET(13771, glIsProgramNV, glIsProgramNV, NULL, 799), - NAME_FUNC_OFFSET(13785, glLoadProgramNV, glLoadProgramNV, NULL, 800), - NAME_FUNC_OFFSET(13801, glProgramParameters4dvNV, glProgramParameters4dvNV, - NULL, 801), - NAME_FUNC_OFFSET(13826, glProgramParameters4fvNV, glProgramParameters4fvNV, - NULL, 802), - NAME_FUNC_OFFSET(13851, glRequestResidentProgramsNV, - glRequestResidentProgramsNV, NULL, 803), - NAME_FUNC_OFFSET(13879, glTrackMatrixNV, glTrackMatrixNV, NULL, 804), - NAME_FUNC_OFFSET(13895, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, 805), - NAME_FUNC_OFFSET(13914, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, - 806), - NAME_FUNC_OFFSET(13934, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, 807), - NAME_FUNC_OFFSET(13953, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, - 808), - NAME_FUNC_OFFSET(13973, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, 809), - NAME_FUNC_OFFSET(13992, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, - 810), - NAME_FUNC_OFFSET(14012, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, 811), - NAME_FUNC_OFFSET(14031, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, - 812), - NAME_FUNC_OFFSET(14051, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, 813), - NAME_FUNC_OFFSET(14070, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, - 814), - NAME_FUNC_OFFSET(14090, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, 815), - NAME_FUNC_OFFSET(14109, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, - 816), - NAME_FUNC_OFFSET(14129, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, 817), - NAME_FUNC_OFFSET(14148, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, - 818), - NAME_FUNC_OFFSET(14168, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, 819), - NAME_FUNC_OFFSET(14187, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, - 820), - NAME_FUNC_OFFSET(14207, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, 821), - NAME_FUNC_OFFSET(14226, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, - 822), - NAME_FUNC_OFFSET(14246, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, 823), - NAME_FUNC_OFFSET(14265, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, - 824), - NAME_FUNC_OFFSET(14285, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, 825), - NAME_FUNC_OFFSET(14304, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, - 826), - NAME_FUNC_OFFSET(14324, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, 827), - NAME_FUNC_OFFSET(14343, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, - 828), - NAME_FUNC_OFFSET(14363, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, - 829), - NAME_FUNC_OFFSET(14383, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, - 830), - NAME_FUNC_OFFSET(14404, glVertexAttribPointerNV, glVertexAttribPointerNV, - NULL, 831), - NAME_FUNC_OFFSET(14428, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, - 832), - NAME_FUNC_OFFSET(14449, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, - 833), - NAME_FUNC_OFFSET(14470, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, - 834), - NAME_FUNC_OFFSET(14491, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, - 835), - NAME_FUNC_OFFSET(14512, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, - 836), - NAME_FUNC_OFFSET(14533, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, - 837), - NAME_FUNC_OFFSET(14554, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, - 838), - NAME_FUNC_OFFSET(14575, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, - 839), - NAME_FUNC_OFFSET(14596, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, - 840), - NAME_FUNC_OFFSET(14617, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, - 841), - NAME_FUNC_OFFSET(14638, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, - 842), - NAME_FUNC_OFFSET(14659, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, - 843), - NAME_FUNC_OFFSET(14680, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, - 844), - NAME_FUNC_OFFSET(14702, glGetTexBumpParameterfvATI, - glGetTexBumpParameterfvATI, NULL, 845), - NAME_FUNC_OFFSET(14729, glGetTexBumpParameterivATI, - glGetTexBumpParameterivATI, NULL, 846), - NAME_FUNC_OFFSET(14756, glTexBumpParameterfvATI, glTexBumpParameterfvATI, - NULL, 847), - NAME_FUNC_OFFSET(14780, glTexBumpParameterivATI, glTexBumpParameterivATI, - NULL, 848), - NAME_FUNC_OFFSET(14804, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, - 849), - NAME_FUNC_OFFSET(14826, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, - 850), - NAME_FUNC_OFFSET(14848, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, - 851), - NAME_FUNC_OFFSET(14870, glBeginFragmentShaderATI, glBeginFragmentShaderATI, - NULL, 852), - NAME_FUNC_OFFSET(14895, glBindFragmentShaderATI, glBindFragmentShaderATI, - NULL, 853), - NAME_FUNC_OFFSET(14919, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, - 854), - NAME_FUNC_OFFSET(14941, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, - 855), - NAME_FUNC_OFFSET(14963, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, - 856), - NAME_FUNC_OFFSET(14985, glDeleteFragmentShaderATI, - glDeleteFragmentShaderATI, NULL, 857), - NAME_FUNC_OFFSET(15011, glEndFragmentShaderATI, glEndFragmentShaderATI, - NULL, 858), - NAME_FUNC_OFFSET(15034, glGenFragmentShadersATI, glGenFragmentShadersATI, - NULL, 859), - NAME_FUNC_OFFSET(15058, glPassTexCoordATI, glPassTexCoordATI, NULL, 860), - NAME_FUNC_OFFSET(15076, glSampleMapATI, glSampleMapATI, NULL, 861), - NAME_FUNC_OFFSET(15091, glSetFragmentShaderConstantATI, - glSetFragmentShaderConstantATI, NULL, 862), - NAME_FUNC_OFFSET(15122, glPointParameteriNV, glPointParameteriNV, NULL, - 863), - NAME_FUNC_OFFSET(15142, glPointParameterivNV, glPointParameterivNV, NULL, - 864), - NAME_FUNC_OFFSET(15163, gl_dispatch_stub_865, gl_dispatch_stub_865, NULL, - 865), - NAME_FUNC_OFFSET(15186, gl_dispatch_stub_866, gl_dispatch_stub_866, NULL, - 866), - NAME_FUNC_OFFSET(15209, gl_dispatch_stub_867, gl_dispatch_stub_867, NULL, - 867), - NAME_FUNC_OFFSET(15235, gl_dispatch_stub_868, gl_dispatch_stub_868, NULL, - 868), - NAME_FUNC_OFFSET(15258, gl_dispatch_stub_869, gl_dispatch_stub_869, NULL, - 869), - NAME_FUNC_OFFSET(15279, glGetProgramNamedParameterdvNV, - glGetProgramNamedParameterdvNV, NULL, 870), - NAME_FUNC_OFFSET(15310, glGetProgramNamedParameterfvNV, - glGetProgramNamedParameterfvNV, NULL, 871), - NAME_FUNC_OFFSET(15341, glProgramNamedParameter4dNV, - glProgramNamedParameter4dNV, NULL, 872), - NAME_FUNC_OFFSET(15369, glProgramNamedParameter4dvNV, - glProgramNamedParameter4dvNV, NULL, 873), - NAME_FUNC_OFFSET(15398, glProgramNamedParameter4fNV, - glProgramNamedParameter4fNV, NULL, 874), - NAME_FUNC_OFFSET(15426, glProgramNamedParameter4fvNV, - glProgramNamedParameter4fvNV, NULL, 875), - NAME_FUNC_OFFSET(15455, glPrimitiveRestartIndexNV, - glPrimitiveRestartIndexNV, NULL, 876), - NAME_FUNC_OFFSET(15481, glPrimitiveRestartNV, glPrimitiveRestartNV, NULL, - 877), - NAME_FUNC_OFFSET(15502, gl_dispatch_stub_878, gl_dispatch_stub_878, NULL, - 878), - NAME_FUNC_OFFSET(15519, gl_dispatch_stub_879, gl_dispatch_stub_879, NULL, - 879), - NAME_FUNC_OFFSET(15546, glBindFramebufferEXT, glBindFramebufferEXT, NULL, - 880), - NAME_FUNC_OFFSET(15567, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, - 881), - NAME_FUNC_OFFSET(15589, glCheckFramebufferStatusEXT, - glCheckFramebufferStatusEXT, NULL, 882), - NAME_FUNC_OFFSET(15617, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, - NULL, 883), - NAME_FUNC_OFFSET(15641, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, - NULL, 884), - NAME_FUNC_OFFSET(15666, glFramebufferRenderbufferEXT, - glFramebufferRenderbufferEXT, NULL, 885), - NAME_FUNC_OFFSET(15695, glFramebufferTexture1DEXT, - glFramebufferTexture1DEXT, NULL, 886), - NAME_FUNC_OFFSET(15721, glFramebufferTexture2DEXT, - glFramebufferTexture2DEXT, NULL, 887), - NAME_FUNC_OFFSET(15747, glFramebufferTexture3DEXT, - glFramebufferTexture3DEXT, NULL, 888), - NAME_FUNC_OFFSET(15773, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, - 889), - NAME_FUNC_OFFSET(15794, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, - 890), - NAME_FUNC_OFFSET(15816, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, - 891), - NAME_FUNC_OFFSET(15836, glGetFramebufferAttachmentParameterivEXT, - glGetFramebufferAttachmentParameterivEXT, NULL, 892), - NAME_FUNC_OFFSET(15877, glGetRenderbufferParameterivEXT, - glGetRenderbufferParameterivEXT, NULL, 893), - NAME_FUNC_OFFSET(15909, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 894), - NAME_FUNC_OFFSET(15928, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, - 895), - NAME_FUNC_OFFSET(15948, glRenderbufferStorageEXT, glRenderbufferStorageEXT, - NULL, 896), - NAME_FUNC_OFFSET(15973, gl_dispatch_stub_897, gl_dispatch_stub_897, NULL, - 897), - NAME_FUNC_OFFSET(15994, gl_dispatch_stub_898, gl_dispatch_stub_898, NULL, - 898), - NAME_FUNC_OFFSET(16018, gl_dispatch_stub_899, gl_dispatch_stub_899, NULL, - 899), - NAME_FUNC_OFFSET(16048, glBindFragDataLocationEXT, - glBindFragDataLocationEXT, NULL, 900), - NAME_FUNC_OFFSET(16074, glGetFragDataLocationEXT, glGetFragDataLocationEXT, - NULL, 901), - NAME_FUNC_OFFSET(16099, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 902), - NAME_FUNC_OFFSET(16118, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, - NULL, 903), - NAME_FUNC_OFFSET(16142, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, - NULL, 904), - NAME_FUNC_OFFSET(16167, glUniform1uiEXT, glUniform1uiEXT, NULL, 905), - NAME_FUNC_OFFSET(16183, glUniform1uivEXT, glUniform1uivEXT, NULL, 906), - NAME_FUNC_OFFSET(16200, glUniform2uiEXT, glUniform2uiEXT, NULL, 907), - NAME_FUNC_OFFSET(16216, glUniform2uivEXT, glUniform2uivEXT, NULL, 908), - NAME_FUNC_OFFSET(16233, glUniform3uiEXT, glUniform3uiEXT, NULL, 909), - NAME_FUNC_OFFSET(16249, glUniform3uivEXT, glUniform3uivEXT, NULL, 910), - NAME_FUNC_OFFSET(16266, glUniform4uiEXT, glUniform4uiEXT, NULL, 911), - NAME_FUNC_OFFSET(16282, glUniform4uivEXT, glUniform4uivEXT, NULL, 912), - NAME_FUNC_OFFSET(16299, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, - 913), - NAME_FUNC_OFFSET(16320, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, - 914), - NAME_FUNC_OFFSET(16342, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, - 915), - NAME_FUNC_OFFSET(16364, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, - NULL, 916), - NAME_FUNC_OFFSET(16387, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, - 917), - NAME_FUNC_OFFSET(16408, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, - 918), - NAME_FUNC_OFFSET(16430, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, - 919), - NAME_FUNC_OFFSET(16452, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, - NULL, 920), - NAME_FUNC_OFFSET(16475, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, - 921), - NAME_FUNC_OFFSET(16496, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, - 922), - NAME_FUNC_OFFSET(16518, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, - 923), - NAME_FUNC_OFFSET(16540, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, - NULL, 924), - NAME_FUNC_OFFSET(16563, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, - 925), - NAME_FUNC_OFFSET(16585, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, - 926), - NAME_FUNC_OFFSET(16606, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, - 927), - NAME_FUNC_OFFSET(16628, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, - 928), - NAME_FUNC_OFFSET(16650, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, - NULL, 929), - NAME_FUNC_OFFSET(16673, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, - 930), - NAME_FUNC_OFFSET(16695, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, - NULL, 931), - NAME_FUNC_OFFSET(16718, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, - NULL, 932), - NAME_FUNC_OFFSET(16741, glVertexAttribIPointerEXT, - glVertexAttribIPointerEXT, NULL, 933), - NAME_FUNC_OFFSET(16767, glFramebufferTextureLayerEXT, - glFramebufferTextureLayerEXT, NULL, 934), - NAME_FUNC_OFFSET(16796, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, - 935), - NAME_FUNC_OFFSET(16818, glDisableIndexedEXT, glDisableIndexedEXT, NULL, - 936), - NAME_FUNC_OFFSET(16838, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 937), - NAME_FUNC_OFFSET(16857, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, - NULL, 938), - NAME_FUNC_OFFSET(16881, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, - NULL, 939), - NAME_FUNC_OFFSET(16905, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, - 940), - NAME_FUNC_OFFSET(16927, glClearColorIiEXT, glClearColorIiEXT, NULL, 941), - NAME_FUNC_OFFSET(16945, glClearColorIuiEXT, glClearColorIuiEXT, NULL, 942), - NAME_FUNC_OFFSET(16964, glGetTexParameterIivEXT, glGetTexParameterIivEXT, - NULL, 943), - NAME_FUNC_OFFSET(16988, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, - NULL, 944), - NAME_FUNC_OFFSET(17013, glTexParameterIivEXT, glTexParameterIivEXT, NULL, - 945), - NAME_FUNC_OFFSET(17034, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, - 946), - NAME_FUNC_OFFSET(17056, glBeginConditionalRenderNV, - glBeginConditionalRenderNV, NULL, 947), - NAME_FUNC_OFFSET(17083, glEndConditionalRenderNV, glEndConditionalRenderNV, - NULL, 948), - NAME_FUNC_OFFSET(17108, glBeginTransformFeedbackEXT, - glBeginTransformFeedbackEXT, NULL, 949), - NAME_FUNC_OFFSET(17136, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, - 950), - NAME_FUNC_OFFSET(17156, glBindBufferOffsetEXT, glBindBufferOffsetEXT, NULL, - 951), - NAME_FUNC_OFFSET(17178, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, - 952), - NAME_FUNC_OFFSET(17199, glEndTransformFeedbackEXT, - glEndTransformFeedbackEXT, NULL, 953), - NAME_FUNC_OFFSET(17225, glGetTransformFeedbackVaryingEXT, - glGetTransformFeedbackVaryingEXT, NULL, 954), - NAME_FUNC_OFFSET(17258, glTransformFeedbackVaryingsEXT, - glTransformFeedbackVaryingsEXT, NULL, 955), - NAME_FUNC_OFFSET(17289, glProvokingVertexEXT, glProvokingVertexEXT, NULL, - 956), - NAME_FUNC_OFFSET(17310, gl_dispatch_stub_957, gl_dispatch_stub_957, NULL, - 957), - NAME_FUNC_OFFSET(17341, gl_dispatch_stub_958, gl_dispatch_stub_958, NULL, - 958), - NAME_FUNC_OFFSET(17361, glGetObjectParameterivAPPLE, - glGetObjectParameterivAPPLE, NULL, 959), - NAME_FUNC_OFFSET(17389, glObjectPurgeableAPPLE, glObjectPurgeableAPPLE, - NULL, 960), - NAME_FUNC_OFFSET(17412, glObjectUnpurgeableAPPLE, glObjectUnpurgeableAPPLE, - NULL, 961), - NAME_FUNC_OFFSET(17437, glActiveProgramEXT, glActiveProgramEXT, NULL, 962), - NAME_FUNC_OFFSET(17456, glCreateShaderProgramEXT, glCreateShaderProgramEXT, - NULL, 963), - NAME_FUNC_OFFSET(17481, glUseShaderProgramEXT, glUseShaderProgramEXT, NULL, - 964), - NAME_FUNC_OFFSET(17503, glTextureBarrierNV, glTextureBarrierNV, NULL, 965), - NAME_FUNC_OFFSET(17522, gl_dispatch_stub_966, gl_dispatch_stub_966, NULL, - 966), - NAME_FUNC_OFFSET(17547, gl_dispatch_stub_967, gl_dispatch_stub_967, NULL, - 967), - NAME_FUNC_OFFSET(17576, gl_dispatch_stub_968, gl_dispatch_stub_968, NULL, - 968), - NAME_FUNC_OFFSET(17607, gl_dispatch_stub_969, gl_dispatch_stub_969, NULL, - 969), - NAME_FUNC_OFFSET(17631, gl_dispatch_stub_970, gl_dispatch_stub_970, NULL, - 970), - NAME_FUNC_OFFSET(17656, glEGLImageTargetRenderbufferStorageOES, - glEGLImageTargetRenderbufferStorageOES, NULL, 971), - NAME_FUNC_OFFSET(17695, glEGLImageTargetTexture2DOES, - glEGLImageTargetTexture2DOES, NULL, 972), - NAME_FUNC_OFFSET(17724, glArrayElement, glArrayElement, NULL, 306), - NAME_FUNC_OFFSET(17742, glBindTexture, glBindTexture, NULL, 307), - NAME_FUNC_OFFSET(17759, glDrawArrays, glDrawArrays, NULL, 310), - NAME_FUNC_OFFSET(17775, glAreTexturesResident, glAreTexturesResidentEXT, - glAreTexturesResidentEXT, 322), - NAME_FUNC_OFFSET(17800, glCopyTexImage1D, glCopyTexImage1D, NULL, 323), - NAME_FUNC_OFFSET(17820, glCopyTexImage2D, glCopyTexImage2D, NULL, 324), - NAME_FUNC_OFFSET(17840, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, - 325), - NAME_FUNC_OFFSET(17863, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, - 326), - NAME_FUNC_OFFSET(17886, glDeleteTextures, glDeleteTexturesEXT, - glDeleteTexturesEXT, 327), - NAME_FUNC_OFFSET(17906, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, - 328), - NAME_FUNC_OFFSET(17923, glGetPointerv, glGetPointerv, NULL, 329), - NAME_FUNC_OFFSET(17940, glIsTexture, glIsTextureEXT, glIsTextureEXT, 330), - NAME_FUNC_OFFSET(17955, glPrioritizeTextures, glPrioritizeTextures, NULL, - 331), - NAME_FUNC_OFFSET(17979, glTexSubImage1D, glTexSubImage1D, NULL, 332), - NAME_FUNC_OFFSET(17998, glTexSubImage2D, glTexSubImage2D, NULL, 333), - NAME_FUNC_OFFSET(18017, glBlendColor, glBlendColor, NULL, 336), - NAME_FUNC_OFFSET(18033, glBlendEquation, glBlendEquation, NULL, 337), - NAME_FUNC_OFFSET(18052, glDrawRangeElements, glDrawRangeElements, NULL, - 338), - NAME_FUNC_OFFSET(18075, glColorTable, glColorTable, NULL, 339), - NAME_FUNC_OFFSET(18091, glColorTable, glColorTable, NULL, 339), - NAME_FUNC_OFFSET(18107, glColorTableParameterfv, glColorTableParameterfv, - NULL, 340), - NAME_FUNC_OFFSET(18134, glColorTableParameteriv, glColorTableParameteriv, - NULL, 341), - NAME_FUNC_OFFSET(18161, glCopyColorTable, glCopyColorTable, NULL, 342), - NAME_FUNC_OFFSET(18181, glGetColorTable, glGetColorTableEXT, - glGetColorTableEXT, 343), - NAME_FUNC_OFFSET(18200, glGetColorTable, glGetColorTableEXT, - glGetColorTableEXT, 343), - NAME_FUNC_OFFSET(18219, glGetColorTableParameterfv, - glGetColorTableParameterfvEXT, - glGetColorTableParameterfvEXT, 344), - NAME_FUNC_OFFSET(18249, glGetColorTableParameterfv, - glGetColorTableParameterfvEXT, - glGetColorTableParameterfvEXT, 344), - NAME_FUNC_OFFSET(18279, glGetColorTableParameteriv, - glGetColorTableParameterivEXT, - glGetColorTableParameterivEXT, 345), - NAME_FUNC_OFFSET(18309, glGetColorTableParameteriv, - glGetColorTableParameterivEXT, - glGetColorTableParameterivEXT, 345), - NAME_FUNC_OFFSET(18339, glColorSubTable, glColorSubTable, NULL, 346), - NAME_FUNC_OFFSET(18358, glCopyColorSubTable, glCopyColorSubTable, NULL, - 347), - NAME_FUNC_OFFSET(18381, glConvolutionFilter1D, glConvolutionFilter1D, NULL, - 348), - NAME_FUNC_OFFSET(18406, glConvolutionFilter2D, glConvolutionFilter2D, NULL, - 349), - NAME_FUNC_OFFSET(18431, glConvolutionParameterf, glConvolutionParameterf, - NULL, 350), - NAME_FUNC_OFFSET(18458, glConvolutionParameterfv, glConvolutionParameterfv, - NULL, 351), - NAME_FUNC_OFFSET(18486, glConvolutionParameteri, glConvolutionParameteri, - NULL, 352), - NAME_FUNC_OFFSET(18513, glConvolutionParameteriv, glConvolutionParameteriv, - NULL, 353), - NAME_FUNC_OFFSET(18541, glCopyConvolutionFilter1D, - glCopyConvolutionFilter1D, NULL, 354), - NAME_FUNC_OFFSET(18570, glCopyConvolutionFilter2D, - glCopyConvolutionFilter2D, NULL, 355), - NAME_FUNC_OFFSET(18599, glGetConvolutionFilter, gl_dispatch_stub_356, - gl_dispatch_stub_356, 356), - NAME_FUNC_OFFSET(18625, glGetConvolutionParameterfv, gl_dispatch_stub_357, - gl_dispatch_stub_357, 357), - NAME_FUNC_OFFSET(18656, glGetConvolutionParameteriv, gl_dispatch_stub_358, - gl_dispatch_stub_358, 358), - NAME_FUNC_OFFSET(18687, glGetSeparableFilter, gl_dispatch_stub_359, - gl_dispatch_stub_359, 359), - NAME_FUNC_OFFSET(18711, glSeparableFilter2D, glSeparableFilter2D, NULL, - 360), - NAME_FUNC_OFFSET(18734, glGetHistogram, gl_dispatch_stub_361, - gl_dispatch_stub_361, 361), - NAME_FUNC_OFFSET(18752, glGetHistogramParameterfv, gl_dispatch_stub_362, - gl_dispatch_stub_362, 362), - NAME_FUNC_OFFSET(18781, glGetHistogramParameteriv, gl_dispatch_stub_363, - gl_dispatch_stub_363, 363), - NAME_FUNC_OFFSET(18810, glGetMinmax, gl_dispatch_stub_364, - gl_dispatch_stub_364, 364), - NAME_FUNC_OFFSET(18825, glGetMinmaxParameterfv, gl_dispatch_stub_365, - gl_dispatch_stub_365, 365), - NAME_FUNC_OFFSET(18851, glGetMinmaxParameteriv, gl_dispatch_stub_366, - gl_dispatch_stub_366, 366), - NAME_FUNC_OFFSET(18877, glHistogram, glHistogram, NULL, 367), - NAME_FUNC_OFFSET(18892, glMinmax, glMinmax, NULL, 368), - NAME_FUNC_OFFSET(18904, glResetHistogram, glResetHistogram, NULL, 369), - NAME_FUNC_OFFSET(18924, glResetMinmax, glResetMinmax, NULL, 370), - NAME_FUNC_OFFSET(18941, glTexImage3D, glTexImage3D, NULL, 371), - NAME_FUNC_OFFSET(18957, glTexSubImage3D, glTexSubImage3D, NULL, 372), - NAME_FUNC_OFFSET(18976, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, - 373), - NAME_FUNC_OFFSET(18999, glActiveTextureARB, glActiveTextureARB, NULL, 374), - NAME_FUNC_OFFSET(19015, glClientActiveTextureARB, glClientActiveTextureARB, - NULL, 375), - NAME_FUNC_OFFSET(19037, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, - 376), - NAME_FUNC_OFFSET(19055, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, - 377), - NAME_FUNC_OFFSET(19074, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, - 378), - NAME_FUNC_OFFSET(19092, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, - 379), - NAME_FUNC_OFFSET(19111, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, - 380), - NAME_FUNC_OFFSET(19129, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, - 381), - NAME_FUNC_OFFSET(19148, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, - 382), - NAME_FUNC_OFFSET(19166, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, - 383), - NAME_FUNC_OFFSET(19185, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, - 384), - NAME_FUNC_OFFSET(19203, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, - 385), - NAME_FUNC_OFFSET(19222, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, - 386), - NAME_FUNC_OFFSET(19240, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, - 387), - NAME_FUNC_OFFSET(19259, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, - 388), - NAME_FUNC_OFFSET(19277, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, - 389), - NAME_FUNC_OFFSET(19296, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, - 390), - NAME_FUNC_OFFSET(19314, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, - 391), - NAME_FUNC_OFFSET(19333, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, - 392), - NAME_FUNC_OFFSET(19351, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, - 393), - NAME_FUNC_OFFSET(19370, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, - 394), - NAME_FUNC_OFFSET(19388, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, - 395), - NAME_FUNC_OFFSET(19407, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, - 396), - NAME_FUNC_OFFSET(19425, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, - 397), - NAME_FUNC_OFFSET(19444, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, - 398), - NAME_FUNC_OFFSET(19462, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, - 399), - NAME_FUNC_OFFSET(19481, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, - 400), - NAME_FUNC_OFFSET(19499, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, - 401), - NAME_FUNC_OFFSET(19518, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, - 402), - NAME_FUNC_OFFSET(19536, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, - 403), - NAME_FUNC_OFFSET(19555, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, - 404), - NAME_FUNC_OFFSET(19573, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, - 405), - NAME_FUNC_OFFSET(19592, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, - 406), - NAME_FUNC_OFFSET(19610, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, - 407), - NAME_FUNC_OFFSET(19629, glStencilOpSeparate, glStencilOpSeparate, NULL, - 423), - NAME_FUNC_OFFSET(19652, glLoadTransposeMatrixdARB, - glLoadTransposeMatrixdARB, NULL, 441), - NAME_FUNC_OFFSET(19675, glLoadTransposeMatrixfARB, - glLoadTransposeMatrixfARB, NULL, 442), - NAME_FUNC_OFFSET(19698, glMultTransposeMatrixdARB, - glMultTransposeMatrixdARB, NULL, 443), - NAME_FUNC_OFFSET(19721, glMultTransposeMatrixfARB, - glMultTransposeMatrixfARB, NULL, 444), - NAME_FUNC_OFFSET(19744, glSampleCoverageARB, glSampleCoverageARB, NULL, - 445), - NAME_FUNC_OFFSET(19761, glCompressedTexImage1DARB, - glCompressedTexImage1DARB, NULL, 446), - NAME_FUNC_OFFSET(19784, glCompressedTexImage2DARB, - glCompressedTexImage2DARB, NULL, 447), - NAME_FUNC_OFFSET(19807, glCompressedTexImage3DARB, - glCompressedTexImage3DARB, NULL, 448), - NAME_FUNC_OFFSET(19830, glCompressedTexSubImage1DARB, - glCompressedTexSubImage1DARB, NULL, 449), - NAME_FUNC_OFFSET(19856, glCompressedTexSubImage2DARB, - glCompressedTexSubImage2DARB, NULL, 450), - NAME_FUNC_OFFSET(19882, glCompressedTexSubImage3DARB, - glCompressedTexSubImage3DARB, NULL, 451), - NAME_FUNC_OFFSET(19908, glGetCompressedTexImageARB, - glGetCompressedTexImageARB, NULL, 452), - NAME_FUNC_OFFSET(19932, glDisableVertexAttribArrayARB, - glDisableVertexAttribArrayARB, NULL, 453), - NAME_FUNC_OFFSET(19959, glEnableVertexAttribArrayARB, - glEnableVertexAttribArrayARB, NULL, 454), - NAME_FUNC_OFFSET(19985, glGetVertexAttribdvARB, glGetVertexAttribdvARB, - NULL, 461), - NAME_FUNC_OFFSET(20005, glGetVertexAttribfvARB, glGetVertexAttribfvARB, - NULL, 462), - NAME_FUNC_OFFSET(20025, glGetVertexAttribivARB, glGetVertexAttribivARB, - NULL, 463), - NAME_FUNC_OFFSET(20045, glProgramEnvParameter4dARB, - glProgramEnvParameter4dARB, NULL, 464), - NAME_FUNC_OFFSET(20068, glProgramEnvParameter4dvARB, - glProgramEnvParameter4dvARB, NULL, 465), - NAME_FUNC_OFFSET(20092, glProgramEnvParameter4fARB, - glProgramEnvParameter4fARB, NULL, 466), - NAME_FUNC_OFFSET(20115, glProgramEnvParameter4fvARB, - glProgramEnvParameter4fvARB, NULL, 467), - NAME_FUNC_OFFSET(20139, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, - 473), - NAME_FUNC_OFFSET(20156, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, - 474), - NAME_FUNC_OFFSET(20174, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, - 475), - NAME_FUNC_OFFSET(20191, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, - 476), - NAME_FUNC_OFFSET(20209, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, - 477), - NAME_FUNC_OFFSET(20226, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, - 478), - NAME_FUNC_OFFSET(20244, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, - 479), - NAME_FUNC_OFFSET(20261, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, - 480), - NAME_FUNC_OFFSET(20279, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, - 481), - NAME_FUNC_OFFSET(20296, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, - 482), - NAME_FUNC_OFFSET(20314, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, - 483), - NAME_FUNC_OFFSET(20331, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, - 484), - NAME_FUNC_OFFSET(20349, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, - 485), - NAME_FUNC_OFFSET(20366, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, - 486), - NAME_FUNC_OFFSET(20384, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, - 487), - NAME_FUNC_OFFSET(20401, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, - 488), - NAME_FUNC_OFFSET(20419, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, - 489), - NAME_FUNC_OFFSET(20436, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, - 490), - NAME_FUNC_OFFSET(20454, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, - 491), - NAME_FUNC_OFFSET(20473, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, - 492), - NAME_FUNC_OFFSET(20492, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, - 493), - NAME_FUNC_OFFSET(20511, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, - 494), - NAME_FUNC_OFFSET(20530, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, - NULL, 495), - NAME_FUNC_OFFSET(20550, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, - NULL, 496), - NAME_FUNC_OFFSET(20570, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, - NULL, 497), - NAME_FUNC_OFFSET(20590, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, - 498), - NAME_FUNC_OFFSET(20608, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, - 499), - NAME_FUNC_OFFSET(20625, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, - 500), - NAME_FUNC_OFFSET(20643, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, - 501), - NAME_FUNC_OFFSET(20660, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, - 502), - NAME_FUNC_OFFSET(20678, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, - 503), - NAME_FUNC_OFFSET(20696, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, - 504), - NAME_FUNC_OFFSET(20713, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, - 505), - NAME_FUNC_OFFSET(20731, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, - 506), - NAME_FUNC_OFFSET(20750, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, - 507), - NAME_FUNC_OFFSET(20769, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, - 508), - NAME_FUNC_OFFSET(20788, glVertexAttribPointerARB, glVertexAttribPointerARB, - NULL, 509), - NAME_FUNC_OFFSET(20810, glBindBufferARB, glBindBufferARB, NULL, 510), - NAME_FUNC_OFFSET(20823, glBufferDataARB, glBufferDataARB, NULL, 511), - NAME_FUNC_OFFSET(20836, glBufferSubDataARB, glBufferSubDataARB, NULL, 512), - NAME_FUNC_OFFSET(20852, glDeleteBuffersARB, glDeleteBuffersARB, NULL, 513), - NAME_FUNC_OFFSET(20868, glGenBuffersARB, glGenBuffersARB, NULL, 514), - NAME_FUNC_OFFSET(20881, glGetBufferParameterivARB, - glGetBufferParameterivARB, NULL, 515), - NAME_FUNC_OFFSET(20904, glGetBufferPointervARB, glGetBufferPointervARB, - NULL, 516), - NAME_FUNC_OFFSET(20924, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, - 517), - NAME_FUNC_OFFSET(20943, glIsBufferARB, glIsBufferARB, NULL, 518), - NAME_FUNC_OFFSET(20954, glMapBufferARB, glMapBufferARB, NULL, 519), - NAME_FUNC_OFFSET(20966, glUnmapBufferARB, glUnmapBufferARB, NULL, 520), - NAME_FUNC_OFFSET(20980, glBeginQueryARB, glBeginQueryARB, NULL, 521), - NAME_FUNC_OFFSET(20993, glDeleteQueriesARB, glDeleteQueriesARB, NULL, 522), - NAME_FUNC_OFFSET(21009, glEndQueryARB, glEndQueryARB, NULL, 523), - NAME_FUNC_OFFSET(21020, glGenQueriesARB, glGenQueriesARB, NULL, 524), - NAME_FUNC_OFFSET(21033, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, - 525), - NAME_FUNC_OFFSET(21052, glGetQueryObjectuivARB, glGetQueryObjectuivARB, - NULL, 526), - NAME_FUNC_OFFSET(21072, glGetQueryivARB, glGetQueryivARB, NULL, 527), - NAME_FUNC_OFFSET(21085, glIsQueryARB, glIsQueryARB, NULL, 528), - NAME_FUNC_OFFSET(21095, glCompileShaderARB, glCompileShaderARB, NULL, 530), - NAME_FUNC_OFFSET(21111, glGetActiveUniformARB, glGetActiveUniformARB, NULL, - 535), - NAME_FUNC_OFFSET(21130, glGetShaderSourceARB, glGetShaderSourceARB, NULL, - 541), - NAME_FUNC_OFFSET(21148, glGetUniformLocationARB, glGetUniformLocationARB, - NULL, 542), - NAME_FUNC_OFFSET(21169, glGetUniformfvARB, glGetUniformfvARB, NULL, 543), - NAME_FUNC_OFFSET(21184, glGetUniformivARB, glGetUniformivARB, NULL, 544), - NAME_FUNC_OFFSET(21199, glLinkProgramARB, glLinkProgramARB, NULL, 545), - NAME_FUNC_OFFSET(21213, glShaderSourceARB, glShaderSourceARB, NULL, 546), - NAME_FUNC_OFFSET(21228, glUniform1fARB, glUniform1fARB, NULL, 547), - NAME_FUNC_OFFSET(21240, glUniform1fvARB, glUniform1fvARB, NULL, 548), - NAME_FUNC_OFFSET(21253, glUniform1iARB, glUniform1iARB, NULL, 549), - NAME_FUNC_OFFSET(21265, glUniform1ivARB, glUniform1ivARB, NULL, 550), - NAME_FUNC_OFFSET(21278, glUniform2fARB, glUniform2fARB, NULL, 551), - NAME_FUNC_OFFSET(21290, glUniform2fvARB, glUniform2fvARB, NULL, 552), - NAME_FUNC_OFFSET(21303, glUniform2iARB, glUniform2iARB, NULL, 553), - NAME_FUNC_OFFSET(21315, glUniform2ivARB, glUniform2ivARB, NULL, 554), - NAME_FUNC_OFFSET(21328, glUniform3fARB, glUniform3fARB, NULL, 555), - NAME_FUNC_OFFSET(21340, glUniform3fvARB, glUniform3fvARB, NULL, 556), - NAME_FUNC_OFFSET(21353, glUniform3iARB, glUniform3iARB, NULL, 557), - NAME_FUNC_OFFSET(21365, glUniform3ivARB, glUniform3ivARB, NULL, 558), - NAME_FUNC_OFFSET(21378, glUniform4fARB, glUniform4fARB, NULL, 559), - NAME_FUNC_OFFSET(21390, glUniform4fvARB, glUniform4fvARB, NULL, 560), - NAME_FUNC_OFFSET(21403, glUniform4iARB, glUniform4iARB, NULL, 561), - NAME_FUNC_OFFSET(21415, glUniform4ivARB, glUniform4ivARB, NULL, 562), - NAME_FUNC_OFFSET(21428, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, - 563), - NAME_FUNC_OFFSET(21447, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, - 564), - NAME_FUNC_OFFSET(21466, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, - 565), - NAME_FUNC_OFFSET(21485, glUseProgramObjectARB, glUseProgramObjectARB, NULL, - 566), - NAME_FUNC_OFFSET(21498, glValidateProgramARB, glValidateProgramARB, NULL, - 567), - NAME_FUNC_OFFSET(21516, glBindAttribLocationARB, glBindAttribLocationARB, - NULL, 568), - NAME_FUNC_OFFSET(21537, glGetActiveAttribARB, glGetActiveAttribARB, NULL, - 569), - NAME_FUNC_OFFSET(21555, glGetAttribLocationARB, glGetAttribLocationARB, - NULL, 570), - NAME_FUNC_OFFSET(21575, glDrawBuffersARB, glDrawBuffersARB, NULL, 571), - NAME_FUNC_OFFSET(21589, glDrawBuffersARB, glDrawBuffersARB, NULL, 571), - NAME_FUNC_OFFSET(21606, glDrawBuffersARB, glDrawBuffersARB, NULL, 571), - NAME_FUNC_OFFSET(21622, glDrawArraysInstancedARB, glDrawArraysInstancedARB, - NULL, 573), - NAME_FUNC_OFFSET(21647, glDrawArraysInstancedARB, glDrawArraysInstancedARB, - NULL, 573), - NAME_FUNC_OFFSET(21669, glDrawElementsInstancedARB, - glDrawElementsInstancedARB, NULL, 574), - NAME_FUNC_OFFSET(21696, glDrawElementsInstancedARB, - glDrawElementsInstancedARB, NULL, 574), - NAME_FUNC_OFFSET(21720, glRenderbufferStorageMultisample, - glRenderbufferStorageMultisample, NULL, 575), - NAME_FUNC_OFFSET(21756, glBlendEquationSeparateiARB, - glBlendEquationSeparateiARB, NULL, 597), - NAME_FUNC_OFFSET(21790, glBlendEquationiARB, glBlendEquationiARB, NULL, - 598), - NAME_FUNC_OFFSET(21816, glBlendFuncSeparateiARB, glBlendFuncSeparateiARB, - NULL, 599), - NAME_FUNC_OFFSET(21846, glBlendFunciARB, glBlendFunciARB, NULL, 600), - NAME_FUNC_OFFSET(21868, gl_dispatch_stub_698, gl_dispatch_stub_698, NULL, - 698), - NAME_FUNC_OFFSET(21884, gl_dispatch_stub_699, gl_dispatch_stub_699, NULL, - 699), - NAME_FUNC_OFFSET(21903, glPointParameterfEXT, glPointParameterfEXT, NULL, - 706), - NAME_FUNC_OFFSET(21921, glPointParameterfEXT, glPointParameterfEXT, NULL, - 706), - NAME_FUNC_OFFSET(21942, glPointParameterfEXT, glPointParameterfEXT, NULL, - 706), - NAME_FUNC_OFFSET(21964, glPointParameterfvEXT, glPointParameterfvEXT, NULL, - 707), - NAME_FUNC_OFFSET(21983, glPointParameterfvEXT, glPointParameterfvEXT, NULL, - 707), - NAME_FUNC_OFFSET(22005, glPointParameterfvEXT, glPointParameterfvEXT, NULL, - 707), - NAME_FUNC_OFFSET(22028, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, - 710), - NAME_FUNC_OFFSET(22047, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, - NULL, 711), - NAME_FUNC_OFFSET(22067, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, - 712), - NAME_FUNC_OFFSET(22086, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, - NULL, 713), - NAME_FUNC_OFFSET(22106, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, - 714), - NAME_FUNC_OFFSET(22125, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, - NULL, 715), - NAME_FUNC_OFFSET(22145, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, - 716), - NAME_FUNC_OFFSET(22164, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, - NULL, 717), - NAME_FUNC_OFFSET(22184, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, - 718), - NAME_FUNC_OFFSET(22203, glSecondaryColor3svEXT, glSecondaryColor3svEXT, - NULL, 719), - NAME_FUNC_OFFSET(22223, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, - NULL, 720), - NAME_FUNC_OFFSET(22243, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, - NULL, 721), - NAME_FUNC_OFFSET(22264, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, - NULL, 722), - NAME_FUNC_OFFSET(22284, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, - NULL, 723), - NAME_FUNC_OFFSET(22305, glSecondaryColor3usEXT, glSecondaryColor3usEXT, - NULL, 724), - NAME_FUNC_OFFSET(22325, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, - NULL, 725), - NAME_FUNC_OFFSET(22346, glSecondaryColorPointerEXT, - glSecondaryColorPointerEXT, NULL, 726), - NAME_FUNC_OFFSET(22370, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, - 727), - NAME_FUNC_OFFSET(22388, glMultiDrawElementsEXT, glMultiDrawElementsEXT, - NULL, 728), - NAME_FUNC_OFFSET(22408, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, - 729), - NAME_FUNC_OFFSET(22426, glFogCoorddEXT, glFogCoorddEXT, NULL, 730), - NAME_FUNC_OFFSET(22438, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 731), - NAME_FUNC_OFFSET(22451, glFogCoordfEXT, glFogCoordfEXT, NULL, 732), - NAME_FUNC_OFFSET(22463, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 733), - NAME_FUNC_OFFSET(22476, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, - NULL, 735), - NAME_FUNC_OFFSET(22496, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, - NULL, 735), - NAME_FUNC_OFFSET(22520, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 752), - NAME_FUNC_OFFSET(22534, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 752), - NAME_FUNC_OFFSET(22551, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 753), - NAME_FUNC_OFFSET(22566, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 753), - NAME_FUNC_OFFSET(22584, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 754), - NAME_FUNC_OFFSET(22598, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 754), - NAME_FUNC_OFFSET(22615, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 755), - NAME_FUNC_OFFSET(22630, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 755), - NAME_FUNC_OFFSET(22648, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 756), - NAME_FUNC_OFFSET(22662, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 756), - NAME_FUNC_OFFSET(22679, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 757), - NAME_FUNC_OFFSET(22694, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 757), - NAME_FUNC_OFFSET(22712, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 758), - NAME_FUNC_OFFSET(22726, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 758), - NAME_FUNC_OFFSET(22743, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 759), - NAME_FUNC_OFFSET(22758, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 759), - NAME_FUNC_OFFSET(22776, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 760), - NAME_FUNC_OFFSET(22790, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 760), - NAME_FUNC_OFFSET(22807, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 761), - NAME_FUNC_OFFSET(22822, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 761), - NAME_FUNC_OFFSET(22840, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 762), - NAME_FUNC_OFFSET(22854, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 762), - NAME_FUNC_OFFSET(22871, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 763), - NAME_FUNC_OFFSET(22886, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 763), - NAME_FUNC_OFFSET(22904, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 764), - NAME_FUNC_OFFSET(22918, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 764), - NAME_FUNC_OFFSET(22935, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 765), - NAME_FUNC_OFFSET(22950, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 765), - NAME_FUNC_OFFSET(22968, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 766), - NAME_FUNC_OFFSET(22982, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 766), - NAME_FUNC_OFFSET(22999, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 767), - NAME_FUNC_OFFSET(23014, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 767), - NAME_FUNC_OFFSET(23032, glBindProgramNV, glBindProgramNV, NULL, 786), - NAME_FUNC_OFFSET(23049, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 787), - NAME_FUNC_OFFSET(23069, glGenProgramsNV, glGenProgramsNV, NULL, 789), - NAME_FUNC_OFFSET(23086, glGetVertexAttribPointervNV, - glGetVertexAttribPointervNV, NULL, 795), - NAME_FUNC_OFFSET(23112, glGetVertexAttribPointervNV, - glGetVertexAttribPointervNV, NULL, 795), - NAME_FUNC_OFFSET(23141, glIsProgramNV, glIsProgramNV, NULL, 799), - NAME_FUNC_OFFSET(23156, glPointParameteriNV, glPointParameteriNV, NULL, - 863), - NAME_FUNC_OFFSET(23174, glPointParameterivNV, glPointParameterivNV, NULL, - 864), - NAME_FUNC_OFFSET(23193, gl_dispatch_stub_867, gl_dispatch_stub_867, NULL, - 867), - NAME_FUNC_OFFSET(23214, gl_dispatch_stub_869, gl_dispatch_stub_869, NULL, - 869), - NAME_FUNC_OFFSET(23230, glPrimitiveRestartIndexNV, - glPrimitiveRestartIndexNV, NULL, 876), - NAME_FUNC_OFFSET(23254, gl_dispatch_stub_879, gl_dispatch_stub_879, NULL, - 879), - NAME_FUNC_OFFSET(23278, gl_dispatch_stub_879, gl_dispatch_stub_879, NULL, - 879), - NAME_FUNC_OFFSET(23305, glBindFramebufferEXT, glBindFramebufferEXT, NULL, - 880), - NAME_FUNC_OFFSET(23323, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, - 881), - NAME_FUNC_OFFSET(23342, glCheckFramebufferStatusEXT, - glCheckFramebufferStatusEXT, NULL, 882), - NAME_FUNC_OFFSET(23367, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, - NULL, 883), - NAME_FUNC_OFFSET(23388, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, - NULL, 884), - NAME_FUNC_OFFSET(23410, glFramebufferRenderbufferEXT, - glFramebufferRenderbufferEXT, NULL, 885), - NAME_FUNC_OFFSET(23436, glFramebufferTexture1DEXT, - glFramebufferTexture1DEXT, NULL, 886), - NAME_FUNC_OFFSET(23459, glFramebufferTexture2DEXT, - glFramebufferTexture2DEXT, NULL, 887), - NAME_FUNC_OFFSET(23482, glFramebufferTexture3DEXT, - glFramebufferTexture3DEXT, NULL, 888), - NAME_FUNC_OFFSET(23505, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, - 889), - NAME_FUNC_OFFSET(23523, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, - 890), - NAME_FUNC_OFFSET(23542, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, - 891), - NAME_FUNC_OFFSET(23559, glGetFramebufferAttachmentParameterivEXT, - glGetFramebufferAttachmentParameterivEXT, NULL, 892), - NAME_FUNC_OFFSET(23597, glGetRenderbufferParameterivEXT, - glGetRenderbufferParameterivEXT, NULL, 893), - NAME_FUNC_OFFSET(23626, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 894), - NAME_FUNC_OFFSET(23642, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, - 895), - NAME_FUNC_OFFSET(23659, glRenderbufferStorageEXT, glRenderbufferStorageEXT, - NULL, 896), - NAME_FUNC_OFFSET(23681, gl_dispatch_stub_897, gl_dispatch_stub_897, NULL, - 897), - NAME_FUNC_OFFSET(23699, glBindFragDataLocationEXT, - glBindFragDataLocationEXT, NULL, 900), - NAME_FUNC_OFFSET(23722, glGetFragDataLocationEXT, glGetFragDataLocationEXT, - NULL, 901), - NAME_FUNC_OFFSET(23744, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 902), - NAME_FUNC_OFFSET(23760, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, - NULL, 903), - NAME_FUNC_OFFSET(23781, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, - NULL, 904), - NAME_FUNC_OFFSET(23803, glUniform1uiEXT, glUniform1uiEXT, NULL, 905), - NAME_FUNC_OFFSET(23816, glUniform1uivEXT, glUniform1uivEXT, NULL, 906), - NAME_FUNC_OFFSET(23830, glUniform2uiEXT, glUniform2uiEXT, NULL, 907), - NAME_FUNC_OFFSET(23843, glUniform2uivEXT, glUniform2uivEXT, NULL, 908), - NAME_FUNC_OFFSET(23857, glUniform3uiEXT, glUniform3uiEXT, NULL, 909), - NAME_FUNC_OFFSET(23870, glUniform3uivEXT, glUniform3uivEXT, NULL, 910), - NAME_FUNC_OFFSET(23884, glUniform4uiEXT, glUniform4uiEXT, NULL, 911), - NAME_FUNC_OFFSET(23897, glUniform4uivEXT, glUniform4uivEXT, NULL, 912), - NAME_FUNC_OFFSET(23911, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, - 913), - NAME_FUNC_OFFSET(23929, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, - 914), - NAME_FUNC_OFFSET(23948, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, - 915), - NAME_FUNC_OFFSET(23967, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, - NULL, 916), - NAME_FUNC_OFFSET(23987, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, - 917), - NAME_FUNC_OFFSET(24005, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, - 918), - NAME_FUNC_OFFSET(24024, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, - 919), - NAME_FUNC_OFFSET(24043, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, - NULL, 920), - NAME_FUNC_OFFSET(24063, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, - 921), - NAME_FUNC_OFFSET(24081, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, - 922), - NAME_FUNC_OFFSET(24100, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, - 923), - NAME_FUNC_OFFSET(24119, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, - NULL, 924), - NAME_FUNC_OFFSET(24139, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, - 925), - NAME_FUNC_OFFSET(24158, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, - 926), - NAME_FUNC_OFFSET(24176, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, - 927), - NAME_FUNC_OFFSET(24195, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, - 928), - NAME_FUNC_OFFSET(24214, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, - NULL, 929), - NAME_FUNC_OFFSET(24234, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, - 930), - NAME_FUNC_OFFSET(24253, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, - NULL, 931), - NAME_FUNC_OFFSET(24273, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, - NULL, 932), - NAME_FUNC_OFFSET(24293, glVertexAttribIPointerEXT, - glVertexAttribIPointerEXT, NULL, 933), - NAME_FUNC_OFFSET(24316, glFramebufferTextureLayerEXT, - glFramebufferTextureLayerEXT, NULL, 934), - NAME_FUNC_OFFSET(24342, glFramebufferTextureLayerEXT, - glFramebufferTextureLayerEXT, NULL, 934), - NAME_FUNC_OFFSET(24371, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, - 935), - NAME_FUNC_OFFSET(24384, glDisableIndexedEXT, glDisableIndexedEXT, NULL, - 936), - NAME_FUNC_OFFSET(24395, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 937), - NAME_FUNC_OFFSET(24405, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, - NULL, 938), - NAME_FUNC_OFFSET(24421, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, - NULL, 939), - NAME_FUNC_OFFSET(24437, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, - 940), - NAME_FUNC_OFFSET(24450, glGetTexParameterIivEXT, glGetTexParameterIivEXT, - NULL, 943), - NAME_FUNC_OFFSET(24471, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, - NULL, 944), - NAME_FUNC_OFFSET(24493, glTexParameterIivEXT, glTexParameterIivEXT, NULL, - 945), - NAME_FUNC_OFFSET(24511, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, - 946), - NAME_FUNC_OFFSET(24530, glBeginConditionalRenderNV, - glBeginConditionalRenderNV, NULL, 947), - NAME_FUNC_OFFSET(24555, glEndConditionalRenderNV, glEndConditionalRenderNV, - NULL, 948), - NAME_FUNC_OFFSET(24578, glBeginTransformFeedbackEXT, - glBeginTransformFeedbackEXT, NULL, 949), - NAME_FUNC_OFFSET(24603, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, - 950), - NAME_FUNC_OFFSET(24620, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, - 952), - NAME_FUNC_OFFSET(24638, glEndTransformFeedbackEXT, - glEndTransformFeedbackEXT, NULL, 953), - NAME_FUNC_OFFSET(24661, glGetTransformFeedbackVaryingEXT, - glGetTransformFeedbackVaryingEXT, NULL, 954), - NAME_FUNC_OFFSET(24691, glTransformFeedbackVaryingsEXT, - glTransformFeedbackVaryingsEXT, NULL, 955), - NAME_FUNC_OFFSET(24719, glProvokingVertexEXT, glProvokingVertexEXT, NULL, - 956), - NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0) -}; - -#undef NAME_FUNC_OFFSET diff --git a/glx/glthread.c b/glx/glthread.c deleted file mode 100644 index fd4c6cc09..000000000 --- a/glx/glthread.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.1 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * XXX There's probably some work to do in order to make this file - * truly reusable outside of Mesa. - */ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#include <X11/Xfuncproto.h> -#endif - -#include <stdlib.h> -#include <stdio.h> -#include "glthread.h" - -/* - * This file should still compile even when THREADS is not defined. - * This is to make things easier to deal with on the makefile scene.. - */ -#ifdef THREADS -#include <errno.h> - -/* - * Error messages - */ -#define INIT_TSD_ERROR "_glthread_: failed to allocate key for thread specific data" -#define GET_TSD_ERROR "_glthread_: failed to get thread specific data" -#define SET_TSD_ERROR "_glthread_: thread failed to set thread specific data" - -/* - * Magic number to determine if a TSD object has been initialized. - * Kind of a hack but there doesn't appear to be a better cross-platform - * solution. - */ -#define INIT_MAGIC 0xff8adc98 - -/* - * POSIX Threads -- The best way to go if your platform supports them. - * Solaris >= 2.5 have POSIX threads, IRIX >= 6.4 reportedly - * has them, and many of the free Unixes now have them. - * Be sure to use appropriate -mt or -D_REENTRANT type - * compile flags when building. - */ -#ifdef PTHREADS - -_X_EXPORT unsigned long -_glthread_GetID(void) -{ - return (unsigned long) pthread_self(); -} - -void -_glthread_InitTSD(_glthread_TSD * tsd) -{ - if (pthread_key_create(&tsd->key, NULL /*free */ ) != 0) { - perror(INIT_TSD_ERROR); - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - -void * -_glthread_GetTSD(_glthread_TSD * tsd) -{ - if (tsd->initMagic != (int) INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - return pthread_getspecific(tsd->key); -} - -void -_glthread_SetTSD(_glthread_TSD * tsd, void *ptr) -{ - if (tsd->initMagic != (int) INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - if (pthread_setspecific(tsd->key, ptr) != 0) { - perror(SET_TSD_ERROR); - exit(-1); - } -} - -#endif /* PTHREADS */ - -/* - * Win32 Threads. The only available option for Windows 95/NT. - * Be sure that you compile using the Multithreaded runtime, otherwise - * bad things will happen. - */ -#ifdef WIN32_THREADS - -void -FreeTSD(_glthread_TSD * p) -{ - if (p->initMagic == INIT_MAGIC) { - TlsFree(p->key); - p->initMagic = 0; - } -} - -void -InsteadOf_exit(int nCode) -{ - DWORD dwErr = GetLastError(); -} - -unsigned long -_glthread_GetID(void) -{ - return GetCurrentThreadId(); -} - -void -_glthread_InitTSD(_glthread_TSD * tsd) -{ - tsd->key = TlsAlloc(); - if (tsd->key == TLS_OUT_OF_INDEXES) { - perror("Mesa:_glthread_InitTSD"); - InsteadOf_exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - -void * -_glthread_GetTSD(_glthread_TSD * tsd) -{ - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - return TlsGetValue(tsd->key); -} - -void -_glthread_SetTSD(_glthread_TSD * tsd, void *ptr) -{ - /* the following code assumes that the _glthread_TSD has been initialized - to zero at creation */ - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - if (TlsSetValue(tsd->key, ptr) == 0) { - perror("Mesa:_glthread_SetTSD"); - InsteadOf_exit(-1); - } -} - -#endif /* WIN32_THREADS */ - -#else /* THREADS */ - -/* - * no-op functions - */ - -_X_EXPORT unsigned long -_glthread_GetID(void) -{ - return 0; -} - -void -_glthread_InitTSD(_glthread_TSD * tsd) -{ - (void) tsd; -} - -void * -_glthread_GetTSD(_glthread_TSD * tsd) -{ - (void) tsd; - return NULL; -} - -void -_glthread_SetTSD(_glthread_TSD * tsd, void *ptr) -{ - (void) tsd; - (void) ptr; -} - -#endif /* THREADS */ diff --git a/glx/glxcmds.c b/glx/glxcmds.c index c1f4e22f8..92b4f05f7 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -215,6 +215,13 @@ __glXdirectContextCreate(__GLXscreen * screen, return context; } +void +FlushContext(__GLXcontext * cx) +{ + CALL_Flush(GET_DISPATCH(), ()); + cx->hasUnflushedCommands = GL_FALSE; +} + /** * Create a GL context with the given properties. This routine is used * to implement \c glXCreateContext, \c glXCreateNewContext, and diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c index b47839868..7eb537df4 100644 --- a/glx/glxdriswrast.c +++ b/glx/glxdriswrast.c @@ -75,6 +75,8 @@ struct __GLXDRIscreen { const __DRIcopySubBufferExtension *copySubBuffer; const __DRItexBufferExtension *texBuffer; const __DRIconfig **driConfigs; + + unsigned char glx_enable_bits[__GLX_EXT_BYTES]; }; struct __GLXDRIcontext { @@ -410,12 +412,27 @@ initializeExtensions(__GLXDRIscreen * screen) extensions = screen->core->getExtensions(screen->driScreen); + /* GLX_MESA_copy_sub_buffer is always enabled. */ + __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_copy_sub_buffer"); + for (i = 0; extensions[i]; i++) { +#ifdef __DRI_READ_DRAWABLE + if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) { + __glXEnableExtension(screen->glx_enable_bits, + "GLX_SGI_make_current_read"); + + LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_make_current_read\n"); + } +#endif + #ifdef __DRI_COPY_SUB_BUFFER if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) { screen->copySubBuffer = (const __DRIcopySubBufferExtension *) extensions[i]; - /* GLX_MESA_copy_sub_buffer is always enabled. */ + __glXEnableExtension(screen->glx_enable_bits, + "GLX_MESA_copy_sub_buffer"); + + LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n"); } #endif @@ -423,6 +440,7 @@ initializeExtensions(__GLXDRIscreen * screen) if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) { screen->texBuffer = (const __DRItexBufferExtension *) extensions[i]; /* GLX_EXT_texture_from_pixmap is always enabled. */ + LogMessage(X_INFO, "AIGLX: enabled GLX_EXT_texture_from_pixmap\n"); } #endif /* Ignore unknown extensions */ @@ -434,6 +452,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) { const char *driverName = "swrast"; __GLXDRIscreen *screen; + size_t buffer_size; screen = calloc(1, sizeof *screen); if (screen == NULL) @@ -445,6 +464,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen) screen->base.swapInterval = NULL; screen->base.pScreen = pScreen; + __glXInitExtensionEnableBits(screen->glx_enable_bits); + screen->driver = glxProbeDriver(driverName, (void **) &screen->core, __DRI_CORE, __DRI_CORE_VERSION, @@ -473,6 +494,19 @@ __glXDRIscreenProbe(ScreenPtr pScreen) __glXScreenInit(&screen->base, pScreen); + /* The first call simply determines the length of the extension string. + * This allows us to allocate some memory to hold the extension string, + * but it requires that we call __glXGetExtensionString a second time. + */ + buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); + if (buffer_size > 0) { + free(screen->base.GLXextensions); + + screen->base.GLXextensions = xnfalloc(buffer_size); + (void) __glXGetExtensionString(screen->glx_enable_bits, + screen->base.GLXextensions); + } + screen->base.GLXmajor = 1; screen->base.GLXminor = 4; diff --git a/glx/glxext.c b/glx/glxext.c index bc7fe8217..3aba6996f 100644 --- a/glx/glxext.c +++ b/glx/glxext.c @@ -139,6 +139,7 @@ DrawableGone(__GLXdrawable * glxPriv, XID xid) for (c = glxAllContexts; c; c = next) { next = c->next; if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) { + FlushContext(c); (*c->loseCurrent) (c); c->isCurrent = GL_FALSE; if (c == __glXLastContext) diff --git a/glx/glxscreens.c b/glx/glxscreens.c index 61d590cc8..6a2382ad4 100644 --- a/glx/glxscreens.c +++ b/glx/glxscreens.c @@ -163,18 +163,6 @@ static const char GLServerExtensions[] = static char GLXServerVendorName[] = "SGI"; unsigned glxMajorVersion = SERVER_GLX_MAJOR_VERSION; unsigned glxMinorVersion = SERVER_GLX_MINOR_VERSION; -static char GLXServerExtensions[] = - "GLX_ARB_multisample " - "GLX_EXT_visual_info " - "GLX_EXT_visual_rating " - "GLX_EXT_import_context " - "GLX_EXT_texture_from_pixmap " - "GLX_OML_swap_method " "GLX_SGI_make_current_read " -#ifndef __APPLE__ - "GLX_SGIS_multisample " -#endif - "GLX_SGIX_fbconfig " - "GLX_SGIX_pbuffer " "GLX_MESA_copy_sub_buffer "; static Bool glxCloseScreen(ScreenPtr pScreen) @@ -331,7 +319,7 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen) pGlxScreen->pScreen = pScreen; pGlxScreen->GLextensions = strdup(GLServerExtensions); pGlxScreen->GLXvendor = strdup(GLXServerVendorName); - pGlxScreen->GLXextensions = strdup(GLXServerExtensions); + pGlxScreen->GLXextensions = strdup(""); /* All GLX providers must support all of the functionality required for at * least GLX 1.2. If the provider supports a higher version, the GLXminor diff --git a/glx/rensize.c b/glx/rensize.c index bcc3a53ad..a78e60c8f 100644 --- a/glx/rensize.c +++ b/glx/rensize.c @@ -226,12 +226,14 @@ __glXImageSize(GLenum format, GLenum type, GLenum target, case GL_INTENSITY: elementsPerGroup = 1; break; + case GL_RG: case GL_422_EXT: case GL_422_REV_EXT: case GL_422_AVERAGE_EXT: case GL_422_REV_AVERAGE_EXT: case GL_DEPTH_STENCIL_NV: case GL_DEPTH_STENCIL_MESA: + case GL_YCBCR_422_APPLE: case GL_YCBCR_MESA: case GL_LUMINANCE_ALPHA: elementsPerGroup = 2; diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index f8fcde956..532d87bbe 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -15,6 +15,7 @@ XVSDKINCS = xf86xv.h xf86xvmc.h xf86xvpriv.h endif if XF86VIDMODE +XF86VMODESOURCES = xf86vmode.c XF86VMODE_SDK = vidmodeproc.h endif @@ -47,7 +48,7 @@ libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ xf86Mode.c xorgHelper.c xf86Extensions.h \ - xf86Extensions.c xf86vmode.c \ + xf86Extensions.c $(XF86VMODESOURCES) \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index a7cc012d9..57928005c 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -28,7 +28,6 @@ libXquartz_la_SOURCES = \ darwinEvents.c \ darwinXinput.c \ keysym2ucs.c \ - pseudoramiX.c \ quartz.c \ quartzCocoa.m \ quartzKeyboard.c \ diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 37cd8b357..346b7556f 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -35,12 +35,10 @@ from The Open Group. #include "winmsg.h" #include "winconfig.h" #include "winprefs.h" -#ifdef XWIN_CLIPBOARD -#include "X11/Xlocale.h" -#endif #ifdef DPMSExtension #include "dpmsproc.h" #endif +#include <locale.h> #ifdef __CYGWIN__ #include <mntent.h> #endif @@ -54,6 +52,8 @@ typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath); #endif +#include "winmonitors.h" +#include "pseudoramiX/pseudoramiX.h" #include "glx_extinit.h" /* @@ -68,6 +68,8 @@ extern HWND g_hwndClipboard; extern Bool g_fClipboard; #endif +extern Bool noRRXineramaExtension; + /* * Function prototypes */ @@ -82,8 +84,6 @@ void OsVendorVErrorF(const char *pszFormat, va_list va_args); #endif -static Bool - winCheckDisplayNumber(void); void winLogCommandLine(int argc, char *argv[]); @@ -98,6 +98,8 @@ Bool const char *winGetBaseDir(void); #endif +static void winCheckMount(void); + /* * For the depth 24 pixmap we default to 32 bits per pixel, but * we change this pixmap format later if we detect that the display @@ -164,7 +166,7 @@ void XwinExtensionInit(void) int i; #ifdef XWIN_GLX_WINDOWS - if ((g_fNativeGl) && (serverGeneration == 1)) { + if (g_fNativeGl) { /* install the native GL provider */ glxWinPushNativeProvider(); } @@ -191,6 +193,27 @@ ddxBeforeReset(void) } #endif +int +main(int argc, char *argv[], char *envp[]) +{ + int iReturn; + + /* Create & acquire the termination mutex */ + iReturn = pthread_mutex_init(&g_pmTerminating, NULL); + if (iReturn != 0) { + ErrorF("ddxMain - pthread_mutex_init () failed: %d\n", iReturn); + } + + iReturn = pthread_mutex_lock(&g_pmTerminating); + if (iReturn != 0) { + ErrorF("ddxMain - pthread_mutex_lock () failed: %d\n", iReturn); + } + + winCheckMount(); + + return dix_main(argc, argv, envp); +} + /* See Porting Layer Definition - p. 57 */ void ddxGiveUp(enum ExitCode error) @@ -209,6 +232,9 @@ ddxGiveUp(enum ExitCode error) } #ifdef XWIN_MULTIWINDOW + /* Unload libraries for taskbar grouping */ + winTaskbarDestroy(); + /* Notify the worker threads we're exiting */ winDeinitMultiWindowWM(); #endif @@ -245,6 +271,19 @@ ddxGiveUp(enum ExitCode error) /* Tell Windows that we want to end the app */ PostQuitMessage(0); + + { + winDebug("ddxGiveUp - Releasing termination mutex\n"); + + int iReturn = pthread_mutex_unlock(&g_pmTerminating); + + if (iReturn != 0) { + ErrorF("winMsgWindowProc - pthread_mutex_unlock () failed: %d\n", + iReturn); + } + } + + winDebug("ddxGiveUp - End\n"); } /* See Porting Layer Definition - p. 57 */ @@ -258,6 +297,8 @@ AbortDDX(enum ExitCode error) } #ifdef __CYGWIN__ +extern Bool nolock; + /* hasmntopt is currently not implemented for cygwin */ static const char * winCheckMntOpt(const struct mntent *mnt, const char *opt) @@ -282,6 +323,9 @@ winCheckMntOpt(const struct mntent *mnt, const char *opt) return NULL; } +/* + Check mounts and issue warnings/activate workarounds as needed + */ static void winCheckMount(void) { @@ -291,6 +335,7 @@ winCheckMount(void) enum { none = 0, sys_root, user_root, sys_tmp, user_tmp } level = none, curlevel; BOOL binary = TRUE; + BOOL fat = TRUE; mnt = setmntent("/etc/mtab", "r"); if (mnt == NULL) { @@ -329,6 +374,11 @@ winCheckMount(void) binary = FALSE; else binary = TRUE; + + if (strcmp(ent->mnt_type, "vfat") == 0) + fat = TRUE; + else + fat = FALSE; } if (endmntent(mnt) != 1) { @@ -338,6 +388,12 @@ winCheckMount(void) if (!binary) winMsg(X_WARNING, "/tmp mounted in textmode\n"); + + if (fat) { + winMsg(X_WARNING, + "/tmp mounted on FAT filesystem, activating -nolock\n"); + nolock = TRUE; + } } #else static void @@ -749,6 +805,9 @@ winUseMsg(void) ErrorF("-fullscreen\n" "\tRun the server in fullscreen mode.\n"); + ErrorF("-hostintitle\n" + "\tIn multiwindow mode, add remote host names to window titles.\n"); + ErrorF("-ignoreinput\n" "\tIgnore keyboard and mouse input.\n"); #ifdef XWIN_MULTIWINDOWEXTWM @@ -809,7 +868,7 @@ winUseMsg(void) ErrorF("-resize=none|scrollbars|randr" "\tIn windowed mode, [don't] allow resizing of the window. 'scrollbars'\n" "\tmode gives the window scrollbars as needed, 'randr' mode uses the RANR\n" - "\textension to resize the X screen.\n"); + "\textension to resize the X screen. 'randr' is the default.\n"); ErrorF("-rootless\n" "\tRun the server in rootless mode.\n"); @@ -842,7 +901,7 @@ winUseMsg(void) #ifdef XWIN_GLX_WINDOWS ErrorF("-[no]wgl\n" - "\tEnable the GLX extension to use the native Windows WGL interface for accelerated OpenGL\n"); + "\tEnable the GLX extension to use the native Windows WGL interface for hardware-accelerated OpenGL\n"); #endif ErrorF("-[no]winkill\n" "\tAlt+F4 exits the X Server.\n"); @@ -901,7 +960,8 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) { int i; - XwinExtensionInit(); + if (serverGeneration == 1) + XwinExtensionInit(); /* Log the command line */ winLogCommandLine(argc, argv); @@ -916,14 +976,6 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) "Exiting.\n"); } - /* Check for duplicate invocation on same display number. */ - if (serverGeneration == 1 && !winCheckDisplayNumber()) { - if (g_fSilentDupError) - g_fSilentFatalError = TRUE; - FatalError("InitOutput - Duplicate invocation on display " - "number: %s. Exiting.\n", display); - } - #ifdef XWIN_XF86CONFIG /* Try to read the xorg.conf-style configuration file */ if (!winReadConfigfile()) @@ -955,10 +1007,18 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) /* Detect supported engines */ winDetectSupportedEngines(); +#ifdef XWIN_MULTIWINDOW + /* Load libraries for taskbar grouping */ + winTaskbarInit(); +#endif /* Store the instance handle */ g_hInstance = GetModuleHandle(NULL); + /* Create the messaging window */ + if (serverGeneration == 1) + winCreateMsgWindowThread(); + /* Initialize each screen */ for (i = 0; i < g_iNumScreens; ++i) { /* Initialize the screen */ @@ -967,6 +1027,61 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) } } + /* + Unless full xinerama has been explicitly enabled, register all native screens with pseudoramiX + */ + if (!noPanoramiXExtension) + noPseudoramiXExtension = TRUE; + + if ((g_ScreenInfo[0].fMultipleMonitors) && !noPseudoramiXExtension) + { + int pass; + + noRRXineramaExtension = TRUE; + + PseudoramiXExtensionInit(argc, argv); + + /* Add primary monitor on pass 0, other monitors on pass 1, to ensure + the primary monitor is first in XINERAMA list */ + for (pass = 0; pass < 2; pass++) + { + int iMonitor; + + for (iMonitor = 1; ; iMonitor++) + { + struct GetMonitorInfoData data; + QueryMonitor(iMonitor, &data); + if (data.bMonitorSpecifiedExists) + { + MONITORINFO mi; + mi.cbSize = sizeof(MONITORINFO); + + if (GetMonitorInfo(data.monitorHandle, &mi)) + { + /* pass == 1 XOR primary monitor flags is set */ + if ((!(pass == 1)) != (!(mi.dwFlags & MONITORINFOF_PRIMARY))) + { + /* + Note the screen origin in a normalized coordinate space where (0,0) is at the top left + of the native virtual desktop area + */ + data.monitorOffsetX = data.monitorOffsetX - GetSystemMetrics(SM_XVIRTUALSCREEN); + data.monitorOffsetY = data.monitorOffsetY - GetSystemMetrics(SM_YVIRTUALSCREEN); + + winDebug ("InitOutput - screen %d added at virtual desktop coordinate (%d,%d) (pseudoramiX) \n", + iMonitor-1, data.monitorOffsetX, data.monitorOffsetY); + + PseudoramiXAddScreen(data.monitorOffsetX, data.monitorOffsetY, + data.monitorWidth, data.monitorHeight); + } + } + } + else + break; + } + } + } + #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) /* Generate a cookie used by internal clients for authorization */ @@ -975,11 +1090,24 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) /* Perform some one time initialization */ if (1 == serverGeneration) { + /* Allow multiple threads to access Xlib */ + if (XInitThreads() == 0) { + ErrorF("XInitThreads failed.\n"); + } + /* * setlocale applies to all threads in the current process. * Apply locale specified in LANG environment variable. */ - setlocale(LC_ALL, ""); + if (!setlocale(LC_ALL, "")) { + ErrorF("setlocale failed.\n"); + } + + /* See if X supports the current locale */ + if (XSupportsLocale() == FALSE) { + ErrorF("Warning: Locale not supported by X, falling back to 'C' locale.\n"); + setlocale(LC_ALL, "C"); + } } #endif @@ -987,70 +1115,3 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) winDebug("InitOutput - Returning.\n"); #endif } - -/* - * winCheckDisplayNumber - Check if another instance of Cygwin/X is - * already running on the same display number. If no one exists, - * make a mutex to prevent new instances from running on the same display. - * - * return FALSE if the display number is already used. - */ - -static Bool -winCheckDisplayNumber(void) -{ - int nDisp; - HANDLE mutex; - char name[MAX_PATH]; - char *pszPrefix = '\0'; - OSVERSIONINFO osvi = { 0 }; - - /* Check display range */ - nDisp = atoi(display); - if (nDisp < 0 || nDisp > 65535) { - ErrorF("winCheckDisplayNumber - Bad display number: %d\n", nDisp); - return FALSE; - } - - /* Set first character of mutex name to null */ - name[0] = '\0'; - - /* Get operating system version information */ - osvi.dwOSVersionInfoSize = sizeof(osvi); - GetVersionEx(&osvi); - - /* Want a mutex shared among all terminals on NT > 4.0 */ - if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && osvi.dwMajorVersion >= 5) { - pszPrefix = "Global\\"; - } - - /* Setup Cygwin/X specific part of name */ - snprintf(name, sizeof(name), "%sCYGWINX_DISPLAY:%d", pszPrefix, nDisp); - - /* Windows automatically releases the mutex when this process exits */ - mutex = CreateMutex(NULL, FALSE, name); - if (!mutex) { - LPVOID lpMsgBuf; - - /* Display a fancy error message */ - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) & lpMsgBuf, 0, NULL); - ErrorF("winCheckDisplayNumber - CreateMutex failed: %s\n", - (LPSTR) lpMsgBuf); - LocalFree(lpMsgBuf); - - return FALSE; - } - if (GetLastError() == ERROR_ALREADY_EXISTS) { - ErrorF("winCheckDisplayNumber - " - PROJECT_NAME " is already running on display %d\n", nDisp); - return FALSE; - } - - return TRUE; -} diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am index 4c2f04ef0..33ab6e95c 100644 --- a/hw/xwin/Makefile.am +++ b/hw/xwin/Makefile.am @@ -25,6 +25,7 @@ SRCS_MULTIWINDOW = \ winmultiwindowwm.c \ winmultiwindowwndproc.c DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW +MULTIWINDOW_LIBS = -lshlwapi -lole32 endif if XWIN_MULTIWINDOWEXTWM @@ -89,6 +90,7 @@ SRCS = InitInput.c \ winmonitors.c \ winmouse.c \ winmsg.c \ + winmsgwindow.c \ winmultiwindowclass.c \ winmultiwindowicons.c \ winprefs.c \ @@ -100,6 +102,7 @@ SRCS = InitInput.c \ winshaddd.c \ winshadddnl.c \ winshadgdi.c \ + wintaskbar.c \ wintrayicon.c \ winvalargs.c \ winwakeup.c \ @@ -119,6 +122,7 @@ SRCS = InitInput.c \ winprefs.h \ winresource.h \ winwindow.h \ + windisplay.c \ XWin.rc \ $(top_srcdir)/Xext/dpmsstubs.c \ $(top_srcdir)/Xi/stubs.c \ @@ -145,8 +149,11 @@ XWin_SOURCES = $(SRCS) INCLUDES = -I$(top_srcdir)/miext/rootless +XWIN_LIBS += $(top_builddir)/pseudoramiX/libPseudoramiX.la +XWIN_SYS_LIBS += -ldxguid + XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) -XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) +XWin_LDADD = $(MULTIWINDOW_LIBS) $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) XWin_LDFLAGS = -mwindows -static .rc.o: diff --git a/hw/xwin/ddraw.h b/hw/xwin/ddraw.h index 9463049c8..fade7306e 100644 --- a/hw/xwin/ddraw.h +++ b/hw/xwin/ddraw.h @@ -3,7 +3,11 @@ #include <winnt.h> #include <wingdi.h> +#pragma push_macro("Status") +#undef Status +#define Status wStatus #include <objbase.h> +#pragma pop_macro("Status") #if defined(NONAMELESSUNION) && !defined(DUMMYUNIONNAME1) #define DUMMYUNIONNAME1 u1 diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index 97b6045b7..664bb5c90 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -86,6 +86,7 @@ #include <winpriv.h> #include <wgl_ext_api.h> +#include <winglobals.h> #define NUM_ELEMENTS(x) (sizeof(x)/ sizeof(x[1])) @@ -341,6 +342,10 @@ swap_method_name(int mthd) static void fbConfigsDump(unsigned int n, __GLXconfig * c) { + LogMessage(X_INFO, "%d fbConfigs\n", n); + + if (g_iLogVerbose < 3) + return; ErrorF("%d fbConfigs\n", n); ErrorF ("pxf vis fb render Ste aux accum MS drawable Group/\n"); @@ -595,11 +600,14 @@ glxWinScreenProbe(ScreenPtr pScreen) gl_renderer = (const char *) glGetStringWrapperNonstatic(GL_RENDERER); ErrorF("GL_RENDERER: %s\n", gl_renderer); gl_extensions = (const char *) glGetStringWrapperNonstatic(GL_EXTENSIONS); - glxLogExtensions("GL_EXTENSIONS: ", gl_extensions); wgl_extensions = wglGetExtensionsStringARBWrapper(hdc); if (!wgl_extensions) wgl_extensions = ""; - glxLogExtensions("WGL_EXTENSIONS: ", wgl_extensions); + + if (g_iLogVerbose >= 3) { + glxLogExtensions("GL_EXTENSIONS: ", gl_extensions); + glxLogExtensions("WGL_EXTENSIONS: ", wgl_extensions); + } if (strcasecmp(gl_renderer, "GDI Generic") == 0) { free(screen); @@ -1835,8 +1843,8 @@ glxWinCreateConfigs(HDC hdc, glxWinScreen * screen) // get the number of pixelformats numConfigs = DescribePixelFormat(hdc, 1, sizeof(PIXELFORMATDESCRIPTOR), NULL); - GLWIN_DEBUG_MSG("DescribePixelFormat says %d possible pixel formats", - numConfigs); + LogMessage(X_INFO, "%d pixel formats reported by DescribePixelFormat\n", + numConfigs); /* alloc */ result = malloc(sizeof(GLXWinConfig) * numConfigs); @@ -2083,9 +2091,9 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen) return; } - GLWIN_DEBUG_MSG - ("wglGetPixelFormatAttribivARB says %d possible pixel formats", - numConfigs); + LogMessage(X_INFO, + "%d pixel formats reported by wglGetPixelFormatAttribivARB\n", + numConfigs); /* alloc */ result = malloc(sizeof(GLXWinConfig) * numConfigs); diff --git a/hw/xwin/glx/winpriv.c b/hw/xwin/glx/winpriv.c index 4f6e4ffd5..11612f905 100644 --- a/hw/xwin/glx/winpriv.c +++ b/hw/xwin/glx/winpriv.c @@ -14,6 +14,36 @@ void winCreateWindowsWindow(WindowPtr pWin); +static void +winCreateWindowsWindowHierarchy(WindowPtr pWin) +{ + winWindowPriv(pWin); + + winDebug("winCreateWindowsWindowHierarchy - pWin:%08x XID:0x%x \n", pWin, + pWin->drawable.id); + + /* recursively ensure parent window exists if it's not the root window */ + if (pWin->parent) { + if (pWin->parent != pWin->drawable.pScreen->root) + winCreateWindowsWindowHierarchy(pWin->parent); + } + + /* ensure this window exists */ + if (pWinPriv->hWnd == NULL) { + winCreateWindowsWindow(pWin); + + /* ... and if it's already been mapped, make sure it's visible */ + if (pWin->mapped) { + /* Display the window without activating it */ + if (pWin->drawable.class != InputOnly) + ShowWindow(pWinPriv->hWnd, SW_SHOWNOACTIVATE); + + /* Send first paint message */ + UpdateWindow(pWinPriv->hWnd); + } + } +} + /** * Return size and handles of a window. * If pWin is NULL, then the information for the root window is requested. @@ -50,8 +80,8 @@ winGetWindowInfo(WindowPtr pWin) } if (pWinPriv->hWnd == NULL) { - winCreateWindowsWindow(pWin); - ErrorF("winGetWindowInfo: forcing window to exist...\n"); + ErrorF("winGetWindowInfo: forcing window to exist\n"); + winCreateWindowsWindowHierarchy(pWin); } if (pWinPriv->hWnd != NULL) { diff --git a/hw/xwin/man/XWin.man b/hw/xwin/man/XWin.man index dbadad6f5..cf5324131 100644 --- a/hw/xwin/man/XWin.man +++ b/hw/xwin/man/XWin.man @@ -76,6 +76,9 @@ preceeding \fB\-screen\fP parameter. .B \-[no]multimonitors or \-[no]multiplemonitors Create a screen 0 that covers all monitors [the primary monitor] on a system with multiple monitors. +Fake XINERAMA data is created describing the individual monitors, +(This is similar to the 'merged framebuffer' or 'pseudo-xinerama' mode provided by +some drivers for the xorg X server). This option is currently enabled by default in \fB\-multiwindow\fP mode. .TP 8 .B "\-screen \fIscreen_number\fP [\fIW\fP \fIH\fP [\fIX\fP \fIY\fP] | [[\fIW\fPx\fIH\fP[+\fIX\fP+\fIY\fP]][@\fIM\fP]] ] " @@ -121,14 +124,16 @@ Alternative name for \fB\-resize=scrollbars\fP. .SH OPTIONS CONTROLLING RESIZE BEHAVIOUR .TP 8 .B \-resize[=none|scrollbars|randr] -Select the resize mode of an X screen. +Select the resize mode of an X screen. The default is randr. .RS .IP \fB\-resize=none\fP 8 -(default). The screen is not resizable. +The screen is not resizable. In windowed mode, if the window has decorations, a fixed frame is used. +Alternative name is \fB\-noresize\fP. + .IP \fB\-resize=scrollbars\fP 8 The screen window is resizeable, but the screen is not resizable. @@ -159,10 +164,16 @@ of the X screen using the RANDR extension is not permitted. The maximum dimensions of the screen are the dimensions of the \fIWindows\fP virtual desktop. -.IP \fB\--resize\fP 8 -on its own is equivalent to \fB\--resize=randr\fP +.IP \fB\-resize\fP 8 +on its own is equivalent to \fB\-resize=randr\fP .RE +.SH OPTIONS FOR MULTIWINDOW MODE +.TP 8 +.B \-hostintitle +Add the host name to the window title for X applications which are running +on remote hosts, when that information is available and it's useful to do so. + .SH OPTIONS CONTROLLING WINDOWS INTEGRATION .TP 8 .B \-[no]clipboard @@ -211,7 +222,7 @@ is disabled by default. .TP 8 .B \-[no]wgl Enable [disable] the GLX extension to use the native Windows WGL interface -for hardware accelerated OpenGL (AIGLX). (Experimental) +for hardware accelerated OpenGL (AIGLX). The default is enabled. .TP 8 .B \-[no]winkill Enable or disable the \fIAlt-F4\fP key combination as a signal to exit the diff --git a/hw/xwin/man/XWinrc.man b/hw/xwin/man/XWinrc.man index 71d8dad23..0f641e92f 100644 --- a/hw/xwin/man/XWinrc.man +++ b/hw/xwin/man/XWinrc.man @@ -54,6 +54,35 @@ There are four kinds of instructions: miscellaneous, menu, icon and style. .SH Miscellaneous instruction .TP 8 +.B DPI \fIresolution\fP +Sets the resolution for all screens, in dots per inch. To be used when +the server cannot determine the screen size(s) from the hardware. + +.TP 8 +.B XKBLayout \fIlayout\fP +.TP 8 +.B XKBModel \fImodel\fP +.TP 8 +.B XKBOptions \fIoption\fP +.TP 8 +.B XKBRules \fIrule\fP +.TP 8 +.B XKBVariant \fIvariant\fp +These options configure the xkeyboard extension to load a particular +keyboard map as the X server starts. The behavior is similar to the +\fIsetxkbmap\fP(1) program. + +See the \fIxkeyboard-config\fP(__miscmansuffix__) manual page for a list of +keyboard configurations. + +Alternatively, you can use \fIsetxkbmap\fP(1) program after \fIXWin\fP +is running. + +The default is to select a keyboard configuration matching your current +layout as reported by \fIWindows\fP, if known, or the default X server +configuration if no matching keyboard configuration was found. + +.TP 8 .B DEBUG \fIString\fP The \fIString\fP is printed to the XWin log file. diff --git a/hw/xwin/system.XWinrc b/hw/xwin/system.XWinrc index f0771c610..5ff3abad6 100644 --- a/hw/xwin/system.XWinrc +++ b/hw/xwin/system.XWinrc @@ -89,9 +89,17 @@ menu apps { } menu root { + "Applications" menu apps // Comments fit here, too... + + SEPARATOR + FAQ EXEC "cygstart http://x.cygwin.com/docs/faq/cygwin-x-faq.html" + "User's Guide" EXEC "cygstart http://x.cygwin.com/docs/ug/cygwin-x-ug.html" + SEPARATOR + "View logfile" EXEC "xterm -e less +F $XWINLOGFILE" + SEPARATOR + "Reload .XWinrc" RELOAD - "Applications" menu apps SEParATOR } diff --git a/hw/xwin/taskbar.h b/hw/xwin/taskbar.h new file mode 100644 index 000000000..11cbeb3f5 --- /dev/null +++ b/hw/xwin/taskbar.h @@ -0,0 +1,88 @@ +/* + *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + * + *Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + *"Software"), to deal in the Software without restriction, including + *without limitation the rights to use, copy, modify, merge, publish, + *distribute, sublicense, and/or sell copies of the Software, and to + *permit persons to whom the Software is furnished to do so, subject to + *the following conditions: + * + *The above copyright notice and this permission notice shall be + *included in all copies or substantial portions of the Software. + * + *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR + *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + *Except as contained in this notice, the name of the XFree86 Project + *shall not be used in advertising or otherwise to promote the sale, use + *or other dealings in this Software without prior written authorization + *from the XFree86 Project. + */ + +#ifndef _TASKBAR_H +#define _TASKBAR_H + +#include <windows.h> + +#ifdef __MINGW64_VERSION_MAJOR +/* If we are using headers from mingw-w64 project, it provides the PSDK headers this needs ... */ +#include <propkey.h> +#include <propsys.h> +#else /* !__MINGW64_VERSION_MAJOR */ +/* ... otherwise, we need to define all this stuff ourselves */ + +typedef struct _tagpropertykey { + GUID fmtid; + DWORD pid; +} PROPERTYKEY; + +#define REFPROPERTYKEY const PROPERTYKEY * +#define REFPROPVARIANT const PROPVARIANT * + +#ifdef INTERFACE +#undef INTERFACE +#endif + +#define INTERFACE IPropertyStore +DECLARE_INTERFACE_(IPropertyStore, IUnknown) +{ + STDMETHOD(QueryInterface) (THIS_ REFIID, PVOID *) PURE; + STDMETHOD_(ULONG, AddRef) (THIS) PURE; + STDMETHOD_(ULONG, Release) (THIS) PURE; + STDMETHOD(GetCount) (THIS_ DWORD) PURE; + STDMETHOD(GetAt) (THIS_ DWORD, PROPERTYKEY) PURE; + STDMETHOD(GetValue) (THIS_ REFPROPERTYKEY, PROPVARIANT) PURE; + STDMETHOD(SetValue) (THIS_ REFPROPERTYKEY, REFPROPVARIANT) PURE; + STDMETHOD(Commit) (THIS) PURE; +}; + +#undef INTERFACE +typedef IPropertyStore *LPPROPERTYSTORE; + +DEFINE_GUID(IID_IPropertyStore, 0x886d8eeb, 0x8cf2, 0x4446, 0x8d, 0x02, 0xcd, + 0xba, 0x1d, 0xbd, 0xcf, 0x99); + +#ifdef INITGUID +#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) GUID_EXT const PROPERTYKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid } +#else +#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) GUID_EXT const PROPERTYKEY name +#endif + +DEFINE_PROPERTYKEY(PKEY_AppUserModel_ID, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, + 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3, 5); + +#endif /* !__MINGW64_VERSION_MAJOR */ + +typedef HRESULT(__stdcall * SHGETPROPERTYSTOREFORWINDOWPROC) (HWND, REFIID, + void **); +typedef HRESULT(__stdcall * PROPVARIANTCLEARPROC) (PROPVARIANT *); + + +#endif diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 89e2a38c9..35eaf2028 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -1249,6 +1249,8 @@ int LRESULT CALLBACK winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); +LRESULT CALLBACK +winChildWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); #endif /* @@ -1413,6 +1415,18 @@ void winDoRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight); +/* + * windisplay.c + */ + +void +winGetDisplayName(char *szDisplay, unsigned int screen); + +/* + * winmsgwindow.c + */ +Bool +winCreateMsgWindowThread(void); /* * END DDX and DIX Function Prototypes diff --git a/hw/xwin/winblock.c b/hw/xwin/winblock.c index 480e3bd48..1d375ca76 100644 --- a/hw/xwin/winblock.c +++ b/hw/xwin/winblock.c @@ -42,7 +42,6 @@ winBlockHandler(ScreenPtr pScreen, #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) winScreenPriv(pScreen); #endif - MSG msg; #ifndef HAS_DEVWINDOWS struct timeval **tvp = pTimeout; @@ -51,6 +50,23 @@ winBlockHandler(ScreenPtr pScreen, (*tvp)->tv_sec = 0; (*tvp)->tv_usec = 100; } +#else + /* + Sometimes, we have work to do on the Windows message queue, + but /dev/windows doesn't appear to be ready. At the moment, + I don't understand how that happens. + + As a workaround, make sure select() just polls rather than + blocking if there are still messages to process... + */ + if (GetQueueStatus(QS_ALLINPUT | QS_ALLPOSTMESSAGE) != 0) { + struct timeval **tvp = pTimeout; + + if (*tvp != NULL) { + (*tvp)->tv_sec = 0; + (*tvp)->tv_usec = 0; + } + } #endif #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) @@ -68,22 +84,17 @@ winBlockHandler(ScreenPtr pScreen, if (iReturn != 0) { ErrorF("winBlockHandler - pthread_mutex_unlock () failed: %d\n", iReturn); - goto winBlockHandler_ProcessMessages; } - - winDebug("winBlockHandler - pthread_mutex_unlock () returned\n"); + else { + winDebug("winBlockHandler - pthread_mutex_unlock () returned\n"); + } } - - winBlockHandler_ProcessMessages: #endif - /* Process all messages on our queue */ - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { - if ((g_hDlgDepthChange == 0 - || !IsDialogMessage(g_hDlgDepthChange, &msg)) - && (g_hDlgExit == 0 || !IsDialogMessage(g_hDlgExit, &msg)) - && (g_hDlgAbout == 0 || !IsDialogMessage(g_hDlgAbout, &msg))) { - DispatchMessage(&msg); - } - } + /* + At least one X client has asked to suspend the screensaver, so + reset Windows' display idle timer + */ + if (screenSaverSuspended) + SetThreadExecutionState(ES_DISPLAY_REQUIRED); } diff --git a/hw/xwin/winclipboard.h b/hw/xwin/winclipboard.h index 27eb2f96f..b051832ba 100644 --- a/hw/xwin/winclipboard.h +++ b/hw/xwin/winclipboard.h @@ -49,7 +49,6 @@ #include <X11/Xatom.h> #include <X11/Xproto.h> #include <X11/Xutil.h> -#include <X11/Xlocale.h> /* Windows headers */ #include <X11/Xwindows.h> diff --git a/hw/xwin/winclipboardtextconv.c b/hw/xwin/winclipboardtextconv.c index 74a351b17..78f7e36de 100644 --- a/hw/xwin/winclipboardtextconv.c +++ b/hw/xwin/winclipboardtextconv.c @@ -48,11 +48,14 @@ void */ void -winClipboardDOStoUNIX(char *pszSrc, int iLength) +winClipboardDOStoUNIX(char *pszData, int iLength) { + char *pszSrc = pszData; char *pszDest = pszSrc; char *pszEnd = pszSrc + iLength; + winDebug("DOXtoUNIX() - Original data:'%s'\n", pszData); + /* Loop until the last character */ while (pszSrc < pszEnd) { /* Copy the current source character to current destination character */ @@ -68,6 +71,8 @@ winClipboardDOStoUNIX(char *pszSrc, int iLength) /* Move the terminating null */ *pszDest = '\0'; + + winDebug("DOStoUNIX() - Final string:'%s'\n", pszData); } /* @@ -101,8 +106,10 @@ winClipboardUNIXtoDOS(unsigned char **ppszData, int iLength) } /* Return if no naked \n's */ - if (iNewlineCount == 0) + if (iNewlineCount == 0) { + winDebug("UNIXtoDOS () - no conversion necessary\n"); return; + } /* Allocate a new string */ pszDestBegin = pszDest = malloc(iLength + iNewlineCount + 1); diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c index f2e8e6d6f..779f3e525 100644 --- a/hw/xwin/winclipboardthread.c +++ b/hw/xwin/winclipboardthread.c @@ -76,6 +76,9 @@ static int static int winClipboardIOErrorHandler(Display * pDisplay); +static void +winClipboardThreadExit(void *arg); + /* * Main thread function */ @@ -102,6 +105,8 @@ winClipboardProc(void *pvNotUsed) char szDisplay[512]; int iSelectError; + pthread_cleanup_push(&winClipboardThreadExit, NULL); + winDebug("winClipboardProc - Hello\n"); ++clipboardRestarts; @@ -111,16 +116,6 @@ winClipboardProc(void *pvNotUsed) /* Save the Unicode support flag in a global */ g_fUseUnicode = fUseUnicode; - /* Allow multiple threads to access Xlib */ - if (XInitThreads() == 0) { - ErrorF("winClipboardProc - XInitThreads failed.\n"); - goto winClipboardProc_Exit; - } - - /* See if X supports the current locale */ - if (XSupportsLocale() == False) { - ErrorF("winClipboardProc - Warning: Locale not supported by X.\n"); - } /* Set error handler */ XSetErrorHandler(winClipboardErrorHandler); @@ -140,7 +135,7 @@ winClipboardProc(void *pvNotUsed) else if (iReturn == WIN_JMP_ERROR_IO) { /* TODO: Cleanup the Win32 window and free any allocated memory */ ErrorF("winClipboardProc - setjmp returned for IO Error Handler.\n"); - pthread_exit(NULL); + goto winClipboardProc_Done; } /* Use our generated cookie for authentication */ @@ -157,7 +152,7 @@ winClipboardProc(void *pvNotUsed) * for all screens on the display. That is why there is only * one clipboard client thread. */ - snprintf(szDisplay, 512, "127.0.0.1:%s.0", display); + winGetDisplayName(szDisplay, 0); /* Print the display connection string */ ErrorF("winClipboardProc - DISPLAY=%s\n", szDisplay); @@ -183,7 +178,7 @@ winClipboardProc(void *pvNotUsed) goto winClipboardProc_Done; } - /* Save the display in the screen privates */ + /* Save the display in a global used by the wndproc */ g_pClipboardDisplay = pDisplay; ErrorF("winClipboardProc - XOpenDisplay () returned and " @@ -269,8 +264,10 @@ winClipboardProc(void *pvNotUsed) winClipboardFlushXEvents(hwnd, iWindow, pDisplay, fUseUnicode); /* Pre-flush Windows messages */ - if (!winClipboardFlushWindowsMessageQueue(hwnd)) - return 0; + if (!winClipboardFlushWindowsMessageQueue(hwnd)) { + ErrorF("winClipboardProc - winClipboardFlushWindowsMessageQueue failed\n"); + pthread_exit(NULL); + } /* Signal that the clipboard client has started */ g_fClipboardStarted = TRUE; @@ -292,6 +289,8 @@ winClipboardProc(void *pvNotUsed) tvTimeout.tv_usec = 100; #endif + winDebug("winClipboardProc - Waiting in select\n"); + /* Wait for a Windows event or an X event */ iReturn = select(iMaxDescriptor, /* Highest fds number */ &fdsRead, /* Read mask */ @@ -323,8 +322,13 @@ winClipboardProc(void *pvNotUsed) break; } + winDebug("winClipboardProc - select returned %d\n", iReturn); + /* Branch on which descriptor became active */ if (FD_ISSET(iConnectionNumber, &fdsRead)) { + winDebug + ("winClipboardProc - X connection ready, pumping X event queue\n"); + /* Process X events */ /* Exit when we see that server is shutting down */ iReturn = winClipboardFlushXEvents(hwnd, @@ -343,6 +347,9 @@ winClipboardProc(void *pvNotUsed) if (1) #endif { + winDebug + ("winClipboardProc - /dev/windows ready, pumping Windows message queue\n"); + /* Process Windows messages */ if (!winClipboardFlushWindowsMessageQueue(hwnd)) { ErrorF("winClipboardProc - " @@ -351,6 +358,11 @@ winClipboardProc(void *pvNotUsed) break; } } + + if (!(FD_ISSET(iConnectionNumber, &fdsRead)) && + !(FD_ISSET(fdMessageQueue, &fdsRead))) { + winDebug("winClipboardProc - Spurious wake\n"); + } } winClipboardProc_Exit: @@ -435,6 +447,7 @@ winClipboardProc(void *pvNotUsed) kill(getpid(), SIGTERM); } + pthread_cleanup_pop(0); return NULL; } @@ -461,7 +474,7 @@ winClipboardErrorHandler(Display * pDisplay, XErrorEvent * pErr) static int winClipboardIOErrorHandler(Display * pDisplay) { - ErrorF("winClipboardIOErrorHandler!\n\n"); + ErrorF("winClipboardIOErrorHandler!\n"); if (pthread_equal(pthread_self(), g_winClipboardProcThread)) { /* Restart at the main entry point */ @@ -473,3 +486,14 @@ winClipboardIOErrorHandler(Display * pDisplay) return 0; } + +/* + * winClipboardThreadExit - Thread exit handler + */ + +static void +winClipboardThreadExit(void *arg) +{ + /* clipboard thread has exited, stop server as well */ + kill(getpid(), SIGTERM); +} diff --git a/hw/xwin/winclipboardwndproc.c b/hw/xwin/winclipboardwndproc.c index e19f678a7..077b9f0bf 100644 --- a/hw/xwin/winclipboardwndproc.c +++ b/hw/xwin/winclipboardwndproc.c @@ -151,6 +151,11 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) static HWND s_hwndNextViewer; static Bool s_fCBCInitialized; +#if CYGDEBUG + winDebugWin32Message("winClipboardWindowProc", hwnd, message, wParam, + lParam); +#endif + /* Branch on message type */ switch (message) { case WM_DESTROY: @@ -325,6 +330,29 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) "Clipboard does not contain CF_TEXT nor " "CF_UNICODETEXT.\n"); + winDebug("winClipboardWindowProc: %d formats\n", + CountClipboardFormats()); + { + unsigned int format = 0; + + do { + format = EnumClipboardFormats(format); + if (GetLastError() != ERROR_SUCCESS) { + winDebug + ("winClipboardWindowProc: EnumClipboardFormats failed %x\n", + GetLastError()); + } + if (format > 0xc000) { + char buff[256]; + + GetClipboardFormatName(format, buff, 256); + winDebug("winClipboardWindowProc: %d %s\n", format, + buff); + } + else if (format > 0) + winDebug("winClipboardWindowProc: %d\n", format); + } while (format != 0); + } /* * We need to make sure that the X Server has processed * previous XSetSelectionOwner messages. @@ -337,24 +365,24 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) iReturn = XGetSelectionOwner(pDisplay, XA_PRIMARY); if (iReturn == g_iClipboardWindow) { winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD - " - "PRIMARY selection is owned by us.\n"); + "PRIMARY selection is owned by us, releasing\n"); XSetSelectionOwner(pDisplay, XA_PRIMARY, None, CurrentTime); } else if (BadWindow == iReturn || BadAtom == iReturn) winErrorFVerb(1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - " - "XGetSelection failed for PRIMARY: %d\n", + "XGetSelectionOwner failed for PRIMARY: %d\n", iReturn); /* Release CLIPBOARD selection if owned */ iReturn = XGetSelectionOwner(pDisplay, atomClipboard); if (iReturn == g_iClipboardWindow) { winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD - " - "CLIPBOARD selection is owned by us.\n"); + "CLIPBOARD selection is owned by us, releasing\n"); XSetSelectionOwner(pDisplay, atomClipboard, None, CurrentTime); } else if (BadWindow == iReturn || BadAtom == iReturn) winErrorFVerb(1, "winClipboardWindowProc - WM_DRAWCLIPBOARD - " - "XGetSelection failed for CLIPBOARD: %d\n", + "XGetSelectionOwner failed for CLIPBOARD: %d\n", iReturn); winDebug("winClipboardWindowProc - WM_DRAWCLIPBOARD: Exit\n"); @@ -424,7 +452,11 @@ winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) Window iWindow = g_iClipboardWindow; Bool fConvertToUnicode; - winDebug("winClipboardWindowProc - WM_RENDER*FORMAT - Hello.\n"); + if (message == WM_RENDERALLFORMATS) + winDebug("winClipboardWindowProc - WM_RENDERALLFORMATS - Hello.\n"); + else + winDebug("winClipboardWindowProc - WM_RENDERFORMAT %d - Hello.\n", + wParam); /* Flag whether to convert to Unicode or not */ if (message == WM_RENDERALLFORMATS) diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c index 1118f4ff8..c4a258100 100644 --- a/hw/xwin/winclipboardwrappers.c +++ b/hw/xwin/winclipboardwrappers.c @@ -199,7 +199,9 @@ winProcSetSelectionOwner(ClientPtr client) REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); - winDebug("winProcSetSelectionOwner - Hello.\n"); + winDebug + ("winProcSetSelectionOwner - Hello. atom 0x%08x window XID 0x%08x \n", + stuff->selection, stuff->window); /* Watch for server reset */ if (s_ulServerGeneration != serverGeneration) { @@ -250,8 +252,9 @@ winProcSetSelectionOwner(ClientPtr client) /* Save new selection owner or None */ s_iOwners[CLIP_OWN_PRIMARY] = stuff->window; - winDebug("winProcSetSelectionOwner - PRIMARY - Now owned by: %d\n", - stuff->window); + winDebug + ("winProcSetSelectionOwner - PRIMARY - Now owned by XID 0x%08x\n", + stuff->window); } else if (MakeAtom("CLIPBOARD", 9, TRUE) == stuff->selection) { /* Look for owned -> not owned transition */ @@ -271,8 +274,9 @@ winProcSetSelectionOwner(ClientPtr client) /* Save new selection owner or None */ s_iOwners[CLIP_OWN_CLIPBOARD] = stuff->window; - winDebug("winProcSetSelectionOwner - CLIPBOARD - Now owned by: %d\n", - stuff->window); + winDebug + ("winProcSetSelectionOwner - CLIPBOARD - Now owned by XID 0x%08x\n", + stuff->window); } else diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c index ce533c59f..32b58540f 100644 --- a/hw/xwin/winclipboardxevents.c +++ b/hw/xwin/winclipboardxevents.c @@ -122,6 +122,7 @@ winClipboardFlushXEvents(HWND hwnd, atomUTF8String, XA_STRING }; + winDebug("SelectionRequest - populating targets\n"); /* Try to change the property */ iReturn = XChangeProperty(pDisplay, @@ -165,6 +166,24 @@ winClipboardFlushXEvents(HWND hwnd, break; } + /* Close clipboard if we have it open already */ + if (GetOpenClipboardWindow() == hwnd) { + CloseClipboard(); + } + + /* Access the clipboard */ + if (!OpenClipboard(hwnd)) { + ErrorF("winClipboardFlushXEvents - SelectionRequest - " + "OpenClipboard () failed: %08lx\n", GetLastError()); + + /* Abort */ + fAbort = TRUE; + goto winClipboardFlushXEvents_SelectionRequest_Done; + } + + /* Indicate that clipboard was opened */ + fCloseClipboard = TRUE; + /* Check that clipboard format is available */ if (fUseUnicode && !IsClipboardFormatAvailable(CF_UNICODETEXT)) { static int count; /* Hack to stop acroread spamming the log */ @@ -192,24 +211,6 @@ winClipboardFlushXEvents(HWND hwnd, goto winClipboardFlushXEvents_SelectionRequest_Done; } - /* Close clipboard if we have it open already */ - if (GetOpenClipboardWindow() == hwnd) { - CloseClipboard(); - } - - /* Access the clipboard */ - if (!OpenClipboard(hwnd)) { - ErrorF("winClipboardFlushXEvents - SelectionRequest - " - "OpenClipboard () failed: %08lx\n", GetLastError()); - - /* Abort */ - fAbort = TRUE; - goto winClipboardFlushXEvents_SelectionRequest_Done; - } - - /* Indicate that clipboard was opened */ - fCloseClipboard = TRUE; - /* Setup the string style */ if (event.xselectionrequest.target == XA_STRING) xiccesStyle = XStringStyle; @@ -367,6 +368,7 @@ winClipboardFlushXEvents(HWND hwnd, * client when we abort. */ if (fAbort) { + winDebug("SelectionRequest - aborting\n"); /* Setup selection notify event */ eventSelection.type = SelectionNotify; eventSelection.send_event = True; @@ -463,6 +465,23 @@ winClipboardFlushXEvents(HWND hwnd, } } + case SelectionClear: + winDebug("SelectionClear - doing nothing\n"); + break; + + case PropertyNotify: + { + char *pszAtomName; + + pszAtomName = XGetAtomName(pDisplay, event.xproperty.atom); + winDebug("winClipboardFlushXEvents - PropertyNotify - ATOM: %s\n", + pszAtomName); + XFree(pszAtomName); + } + + if (event.xproperty.atom != atomLocalProperty) + break; + /* Retrieve the size of the stored data */ iReturn = XGetWindowProperty(pDisplay, iWindow, atomLocalProperty, 0, 0, /* Don't get data, just size */ False, @@ -472,12 +491,12 @@ winClipboardFlushXEvents(HWND hwnd, &xtpText.nitems, &ulReturnBytesLeft, &xtpText.value); if (iReturn != Success) { - ErrorF("winClipboardFlushXEvents - SelectionNotify - " + ErrorF("winClipboardFlushXEvents - PropertyNotify - " "XGetWindowProperty () failed, aborting: %d\n", iReturn); break; } - winDebug("SelectionNotify - returned data %d left %d\n", + winDebug("PropertyNotify - returned data %d left %d\n", xtpText.nitems, ulReturnBytesLeft); /* Request the selection data */ @@ -493,7 +512,7 @@ winClipboardFlushXEvents(HWND hwnd, &xtpText.nitems, &ulReturnBytesLeft, &xtpText.value); if (iReturn != Success) { - ErrorF("winClipboardFlushXEvents - SelectionNotify - " + ErrorF("winClipboardFlushXEvents - PropertyNotify - " "XGetWindowProperty () failed, aborting: %d\n", iReturn); break; } @@ -501,10 +520,11 @@ winClipboardFlushXEvents(HWND hwnd, { char *pszAtomName = NULL; - winDebug("SelectionNotify - returned data %d left %d\n", + winDebug("PropertyNotify - returned data %d left %d\n", xtpText.nitems, ulReturnBytesLeft); pszAtomName = XGetAtomName(pDisplay, xtpText.encoding); - winDebug("Notify atom name %s\n", pszAtomName); + winDebug("PropertyNotify - encoding atom name %s\n", + pszAtomName); XFree(pszAtomName); pszAtomName = NULL; } @@ -536,14 +556,14 @@ winClipboardFlushXEvents(HWND hwnd, } } else { - ErrorF("winClipboardFlushXEvents - SelectionNotify - " + ErrorF("winClipboardFlushXEvents - PropertyNotify - " "X*TextPropertyToTextList list_return is NULL.\n"); pszReturnData = malloc(1); pszReturnData[0] = '\0'; } } else { - ErrorF("winClipboardFlushXEvents - SelectionNotify - " + ErrorF("winClipboardFlushXEvents - PropertyNotify - " "X*TextPropertyToTextList returned: "); switch (iReturn) { case XNoMemory: @@ -584,12 +604,12 @@ winClipboardFlushXEvents(HWND hwnd, pwszUnicodeStr = (wchar_t *) malloc(sizeof(wchar_t) * (iUnicodeLen + 1)); if (!pwszUnicodeStr) { - ErrorF("winClipboardFlushXEvents - SelectionNotify " + ErrorF("winClipboardFlushXEvents - PropertyNotify " "malloc failed for pwszUnicodeStr, aborting.\n"); /* Abort */ fAbort = TRUE; - goto winClipboardFlushXEvents_SelectionNotify_Done; + goto winClipboardFlushXEvents_PropertyNotify_Done; } /* Do the actual conversion */ @@ -614,12 +634,11 @@ winClipboardFlushXEvents(HWND hwnd, /* Check that global memory was allocated */ if (!hGlobal) { - ErrorF("winClipboardFlushXEvents - SelectionNotify " + ErrorF("winClipboardFlushXEvents - PropertyNotify " "GlobalAlloc failed, aborting: %ld\n", GetLastError()); - /* Abort */ fAbort = TRUE; - goto winClipboardFlushXEvents_SelectionNotify_Done; + goto winClipboardFlushXEvents_PropertyNotify_Done; } /* Obtain a pointer to the global memory */ @@ -630,7 +649,7 @@ winClipboardFlushXEvents(HWND hwnd, /* Abort */ fAbort = TRUE; - goto winClipboardFlushXEvents_SelectionNotify_Done; + goto winClipboardFlushXEvents_PropertyNotify_Done; } /* Copy the returned string into the global memory */ @@ -664,7 +683,7 @@ winClipboardFlushXEvents(HWND hwnd, * Windows after the call to SetClipboardData (). */ - winClipboardFlushXEvents_SelectionNotify_Done: + winClipboardFlushXEvents_PropertyNotify_Done: /* Free allocated resources */ if (ppszTextList) XFreeStringList(ppszTextList); @@ -683,13 +702,6 @@ winClipboardFlushXEvents(HWND hwnd, } return WIN_XEVENTS_NOTIFY; - case SelectionClear: - winDebug("SelectionClear - doing nothing\n"); - break; - - case PropertyNotify: - break; - case MappingNotify: break; diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c index 313320f1a..8e6003993 100644 --- a/hw/xwin/winconfig.c +++ b/hw/xwin/winconfig.c @@ -70,6 +70,7 @@ WinCmdlineRec g_cmdline = { #ifdef XWIN_XF86CONFIG NULL, /* keyboard */ #endif + FALSE, /* customDPI */ NULL, /* xkbRules */ NULL, /* xkbModel */ NULL, /* xkbLayout */ diff --git a/hw/xwin/winconfig.h b/hw/xwin/winconfig.h index 94571ff71..4f41a62ad 100644 --- a/hw/xwin/winconfig.h +++ b/hw/xwin/winconfig.h @@ -160,6 +160,7 @@ typedef struct { #ifdef XWIN_XF86CONFIG char *keyboard; #endif + Bool customDPI; char *xkbRules; char *xkbModel; char *xkbLayout; diff --git a/hw/xwin/windisplay.c b/hw/xwin/windisplay.c new file mode 100644 index 000000000..9fc4dac68 --- /dev/null +++ b/hw/xwin/windisplay.c @@ -0,0 +1,52 @@ +/* + * Copyright (C) Jon TURNEY 2009 + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +#include <opaque.h> // for display +#include "win.h" + +/* + Generate a display name string referring to the display of this server, + using a transport we know is enabled +*/ + +void +winGetDisplayName(char *szDisplay, unsigned int screen) +{ + if (TransIsListening("local")) { + snprintf(szDisplay, 512, ":%s.%d", display, screen); + } + else if (TransIsListening("inet")) { + snprintf(szDisplay, 512, "127.0.0.1:%s.%d", display, screen); + } + else if (TransIsListening("inet6")) { + snprintf(szDisplay, 512, "::1:%s.%d", display, screen); + } + else { + // this can't happen! + ErrorF("winGetDisplay: Don't know what to use for DISPLAY\n"); + snprintf(szDisplay, 512, "localhost:%s.%d", display, screen); + } + + winDebug("winGetDisplay: DISPLAY=%s\n", szDisplay); +} diff --git a/hw/xwin/winengine.c b/hw/xwin/winengine.c index 67489598b..b2007d751 100644 --- a/hw/xwin/winengine.c +++ b/hw/xwin/winengine.c @@ -92,7 +92,7 @@ winDetectSupportedEngines(void) else { /* We have DirectDraw */ winErrorFVerb(2, - "winDetectSupportedEngines - DirectDraw installed\n"); + "winDetectSupportedEngines - DirectDraw installed, allowing ShadowDD\n"); g_dwEnginesSupported |= WIN_SERVER_SHADOW_DD; #ifdef XWIN_PRIMARYFB @@ -100,7 +100,7 @@ winDetectSupportedEngines(void) if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) { g_dwEnginesSupported |= WIN_SERVER_PRIMARY_DD; winErrorFVerb(2, - "winDetectSupportedEngines - Allowing PrimaryDD\n"); + "winDetectSupportedEngines - Windows NT, allowing PrimaryDD\n"); } #endif } @@ -112,7 +112,7 @@ winDetectSupportedEngines(void) if (SUCCEEDED(ddrval)) { /* We have DirectDraw4 */ winErrorFVerb(2, - "winDetectSupportedEngines - DirectDraw4 installed\n"); + "winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL\n"); g_dwEnginesSupported |= WIN_SERVER_SHADOW_DDNL; } diff --git a/hw/xwin/winerror.c b/hw/xwin/winerror.c index 56c1e34e7..2b4c430c1 100644 --- a/hw/xwin/winerror.c +++ b/hw/xwin/winerror.c @@ -52,6 +52,16 @@ OsVendorVErrorF(const char *pszFormat, va_list va_args) pthread_mutex_lock(&s_pmPrinting); #endif + /* If we want to silence it, + * detect if we are going to abort due to duplication error */ + if (g_fSilentDupError) { + if ((strcmp(pszFormat, "InitOutput - Duplicate invocation on display number: %s. Exiting.\n") == 0) + || (strcmp(pszFormat, "Server is already active for display %s\n%s %s\n%s\n") == 0) + || (strcmp(pszFormat, "MakeAllCOTSServerListeners: server already running\n") == 0)) { + g_fSilentFatalError = TRUE; + } + } + /* Print the error message to a log file, could be stderr */ LogVWrite(0, pszFormat, va_args); @@ -63,15 +73,16 @@ OsVendorVErrorF(const char *pszFormat, va_list va_args) #endif /* - * os/util.c/FatalError () calls our vendor ErrorF, so the message - * from a FatalError will be logged. Thus, the message for the - * fatal error is not passed to this function. + * os/log.c:FatalError () calls our vendor ErrorF, so the message + * from a FatalError will be logged. * * Attempt to do last-ditch, safe, important cleanup here. */ void OsVendorFatalError(const char *f, va_list args) { + char errormsg[1024] = ""; + /* Don't give duplicate warning if UseMsg was called */ if (g_fSilentFatalError) return; @@ -82,9 +93,28 @@ OsVendorFatalError(const char *f, va_list args) } LogClose(EXIT_ERR_ABORT); - winMessageBoxF("A fatal error has occurred and " PROJECT_NAME - " will now exit.\n" "Please open %s for more information.\n", - MB_ICONERROR, (g_pszLogFile ? g_pszLogFile : "the logfile")); + /* Format the error message */ + vsnprintf(errormsg, sizeof(errormsg), f, args); + + /* + Sometimes the error message needs a bit of cosmetic cleaning + up for use in a dialog box... + */ + { + char *s; + + while ((s = strstr(errormsg, "\n\t")) != NULL) { + s[0] = ' '; + s[1] = '\n'; + } + } + + winMessageBoxF("A fatal error has occurred and " PROJECT_NAME " will now exit.\n\n" + "%s\n\n" + "Please open %s for more information.\n", + MB_ICONERROR, + errormsg, + (g_pszLogFile ? g_pszLogFile : "the logfile")); } /* diff --git a/hw/xwin/winglobals.c b/hw/xwin/winglobals.c index 4953bd0cf..fd6c1b490 100644 --- a/hw/xwin/winglobals.c +++ b/hw/xwin/winglobals.c @@ -77,7 +77,9 @@ Bool g_fKeyboardHookLL = FALSE; Bool g_fNoHelpMessageBox = FALSE; Bool g_fSoftwareCursor = FALSE; Bool g_fSilentDupError = FALSE; -Bool g_fNativeGl = FALSE; +Bool g_fNativeGl = TRUE; +Bool g_fHostInTitle = FALSE; +pthread_mutex_t g_pmTerminating = PTHREAD_MUTEX_INITIALIZER; #ifdef XWIN_CLIPBOARD /* diff --git a/hw/xwin/winglobals.h b/hw/xwin/winglobals.h index 2edf9571e..699f28246 100644 --- a/hw/xwin/winglobals.h +++ b/hw/xwin/winglobals.h @@ -48,6 +48,7 @@ extern Bool g_fXdmcpEnabled; extern Bool g_fNoHelpMessageBox; extern Bool g_fSilentDupError; extern Bool g_fNativeGl; +extern Bool g_fHostInTitle; extern HWND g_hDlgDepthChange; extern HWND g_hDlgExit; @@ -86,4 +87,6 @@ extern Bool g_fButton[3]; extern Bool g_fNoConfigureWindow; #endif +extern pthread_mutex_t g_pmTerminating; + #endif /* WINGLOBALS_H */ diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c index 2ffb9a943..bfb1407b4 100644 --- a/hw/xwin/winkeybd.c +++ b/hw/xwin/winkeybd.c @@ -40,6 +40,7 @@ #include "winmsg.h" #include "xkbsrv.h" +#include "dixgrabs.h" static Bool g_winKeyState[NUM_KEYCODES]; @@ -265,6 +266,30 @@ winRestoreModeKeyStates(void) * have a logical XOR operator, so we use a macro instead. */ + { + /* consider modifer keys */ + + BOOL ctrl = (GetAsyncKeyState(VK_CONTROL) < 0); + BOOL shift = (GetAsyncKeyState(VK_SHIFT) < 0); + BOOL alt = (GetAsyncKeyState(VK_LMENU) < 0); + BOOL altgr = (GetAsyncKeyState(VK_RMENU) < 0); + + if (ctrl && altgr) + ctrl = FALSE; + + if (WIN_XOR(internalKeyStates & ControlMask, ctrl)) + winSendKeyEvent(KEY_LCtrl, ctrl); + + if (WIN_XOR(internalKeyStates & ShiftMask, shift)) + winSendKeyEvent(KEY_ShiftL, shift); + + if (WIN_XOR(internalKeyStates & Mod1Mask, alt)) + winSendKeyEvent(KEY_Alt, alt); + + if (WIN_XOR(internalKeyStates & Mod5Mask, altgr)) + winSendKeyEvent(KEY_AltLang, altgr); + } + /* Has the key state changed? */ dwKeyState = GetKeyState(VK_NUMLOCK) & 0x0001; if (WIN_XOR(internalKeyStates & NumLockMask, dwKeyState)) { @@ -502,3 +527,34 @@ winFixShiftKeys(int iScanCode) if (iScanCode == KEY_ShiftR && g_winKeyState[KEY_ShiftL]) winSendKeyEvent(KEY_ShiftL, FALSE); } + +/* + */ +int +XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act) +{ + XkbAnyAction *xf86act = &(act->any); + char msgbuf[XkbAnyActionDataSize+1]; + + if (xf86act->type == XkbSA_XFree86Private) + { + memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize); + msgbuf[XkbAnyActionDataSize]= '\0'; + if (strcasecmp(msgbuf, "prgrbs")==0) { + DeviceIntPtr tmp; + winMsg(X_INFO, "Printing all currently active device grabs:\n"); + for (tmp = inputInfo.devices; tmp; tmp = tmp->next) + if (tmp->deviceGrab.grab) + PrintDeviceGrabInfo(tmp); + winMsg(X_INFO, "End list of active device grabs\n"); + } + else if (strcasecmp(msgbuf, "ungrab")==0) + UngrabAllDevices(FALSE); + else if (strcasecmp(msgbuf, "clsgrb")==0) + UngrabAllDevices(TRUE); + else if (strcasecmp(msgbuf, "prwins")==0) + PrintWindowTree(); + } + + return 0; +} diff --git a/hw/xwin/winmsgwindow.c b/hw/xwin/winmsgwindow.c new file mode 100644 index 000000000..8067c693c --- /dev/null +++ b/hw/xwin/winmsgwindow.c @@ -0,0 +1,180 @@ +/* + * Copyright (C) Jon TURNEY 2011 + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +#include "win.h" + +/* + * This is the messaging window, a hidden top-level window. We never do anything + * with it, but other programs may send messages to it. + */ + +/* + * winMsgWindowProc - Window procedure for msg window + */ + +static +LRESULT CALLBACK +winMsgWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ +#if CYGDEBUG + winDebugWin32Message("winMsgWindowProc", hwnd, message, wParam, lParam); +#endif + + switch (message) { + case WM_ENDSESSION: + if (!wParam) + return 0; /* shutdown is being cancelled */ + + /* + Send a WM_GIVEUP message to the X server thread so it wakes up if + blocked in select(), performs GiveUp(), and then notices that GiveUp() + has set the DE_TERMINATE flag so exits the msg dispatch loop. + */ + { + ScreenPtr pScreen = screenInfo.screens[0]; + + winScreenPriv(pScreen); + PostMessage(pScreenPriv->hwndScreen, WM_GIVEUP, 0, 0); + } + + /* + This process will be terminated by the system almost immediately + after the last thread with a message queue returns from processing + WM_ENDSESSION, so we cannot rely on any code executing after this + message is processed and need to wait here until ddxGiveUp() is called + and releases the termination mutex to guarantee that the lock file and + unix domain sockets have been removed + + ofc, Microsoft doesn't document this under WM_ENDSESSION, you are supposed + to read the source of CRSS to find out how it works :-) + + http://blogs.msdn.com/b/michen/archive/2008/04/04/application-termination-when-user-logs-off.aspx + */ + { + int iReturn = pthread_mutex_lock(&g_pmTerminating); + + if (iReturn != 0) { + ErrorF("winMsgWindowProc - pthread_mutex_lock () failed: %d\n", + iReturn); + } + winDebug + ("winMsgWindowProc - WM_ENDSESSION termination lock acquired\n"); + } + + return 0; + } + + return DefWindowProc(hwnd, message, wParam, lParam); +} + +static HWND +winCreateMsgWindow(void) +{ + HWND hwndMsg; + wATOM winClass; + + // register window class + { + WNDCLASSEX wcx; + + wcx.cbSize = sizeof(WNDCLASSEX); + wcx.style = CS_HREDRAW | CS_VREDRAW; + wcx.lpfnWndProc = winMsgWindowProc; + wcx.cbClsExtra = 0; + wcx.cbWndExtra = 0; + wcx.hInstance = g_hInstance; + wcx.hIcon = NULL; + wcx.hCursor = 0; + wcx.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); + wcx.lpszMenuName = NULL; + wcx.lpszClassName = WINDOW_CLASS_X_MSG; + wcx.hIconSm = NULL; + winClass = RegisterClassEx(&wcx); + } + + // Create the msg window. + hwndMsg = CreateWindowEx(0, // no extended styles + WINDOW_CLASS_X_MSG, // class name + "XWin Msg Window", // window name + WS_OVERLAPPEDWINDOW, // overlapped window + CW_USEDEFAULT, // default horizontal position + CW_USEDEFAULT, // default vertical position + CW_USEDEFAULT, // default width + CW_USEDEFAULT, // default height + (HWND) NULL, // no parent or owner window + (HMENU) NULL, // class menu used + GetModuleHandle(NULL), // instance handle + NULL); // no window creation data + + if (!hwndMsg) { + ErrorF("winCreateMsgWindow - Create msg window failed\n"); + return NULL; + } + + winDebug("winCreateMsgWindow - Created msg window hwnd 0x%x\n", hwndMsg); + + return hwndMsg; +} + +static void * +winMsgWindowThreadProc(void *arg) +{ + HWND hwndMsg; + + winDebug("winMsgWindowThreadProc - Hello\n"); + + hwndMsg = winCreateMsgWindow(); + if (hwndMsg) { + MSG msg; + + /* Pump the msg window message queue */ + while (GetMessage(&msg, hwndMsg, 0, 0) > 0) { +#if CYGDEBUG + winDebugWin32Message("winMsgWindowThread", msg.hwnd, msg.message, + msg.wParam, msg.lParam); +#endif + DispatchMessage(&msg); + } + } + + winDebug("winMsgWindowThreadProc - Exit\n"); + + return NULL; +} + +Bool +winCreateMsgWindowThread(void) +{ + pthread_t ptMsgWindowThreadProc; + + /* Spawn a thread for the msg window */ + if (pthread_create(&ptMsgWindowThreadProc, + NULL, winMsgWindowThreadProc, NULL)) { + /* Bail if thread creation failed */ + ErrorF("winCreateMsgWindow - pthread_create failed.\n"); + return FALSE; + } + + return TRUE; +} diff --git a/hw/xwin/winmultiwindowclass.c b/hw/xwin/winmultiwindowclass.c index 1af104df9..9fc1be2a4 100644 --- a/hw/xwin/winmultiwindowclass.c +++ b/hw/xwin/winmultiwindowclass.c @@ -68,7 +68,7 @@ winMultiWindowGetClassHint(WindowPtr pWin, char **res_name, char **res_class) while (prop) { if (prop->propertyName == XA_WM_CLASS && prop->type == XA_STRING && prop->format == 8 && prop->data) { - len_name = strlen((char *) prop->data); + len_name = strnlen((char *) prop->data, prop->size); (*res_name) = malloc(len_name + 1); @@ -77,13 +77,17 @@ winMultiWindowGetClassHint(WindowPtr pWin, char **res_name, char **res_class) return 0; } - /* Add one to len_name to allow copying of trailing 0 */ - strncpy((*res_name), prop->data, len_name + 1); + /* Copy name and ensure null terminated */ + memcpy((*res_name), prop->data, len_name); + (*res_name)[len_name] = '\0'; - if (len_name == prop->size) - len_name--; - - len_class = strlen(((char *) prop->data) + 1 + len_name); + /* Compute length of class name, it could be that it is not null terminated */ + if (len_name < prop->size - 1) { + len_class = strnlen(((char *) prop->data) + 1 + len_name, prop->size - 1 - len_name); + } + else { + len_class = 0; + } (*res_class) = malloc(len_class + 1); @@ -95,7 +99,9 @@ winMultiWindowGetClassHint(WindowPtr pWin, char **res_name, char **res_class) return 0; } - strcpy((*res_class), ((char *) prop->data) + 1 + len_name); + /* Copy class name and ensure null terminated */ + memcpy((*res_class), ((char *) prop->data) + 1 + len_name, len_class); + (*res_class)[len_class] = '\0'; return 1; } diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index c0c7db2b7..66b0c1ae4 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -55,11 +55,27 @@ static void static void winFindWindow(pointer value, XID id, pointer cdata); +static Bool +isToplevelWindow(WindowPtr pWin) +{ + assert(pWin->parent); /* root window isn't expected here */ + + /* If the immediate parent is the root window, this is a top-level window */ + if ((pWin->parent) && (pWin->parent->parent == NULL)) { + assert(pWin->parent == pWin->drawable.pScreen->root); + return TRUE; + } + + /* otherwise, a child window */ + return FALSE; +} + static void winInitMultiWindowClass(void) { static wATOM atomXWinClass = 0; + static wATOM atomXWinChildClass = 0; WNDCLASSEX wcx; if (atomXWinClass == 0) { @@ -83,11 +99,40 @@ winInitMultiWindowClass(void) wcx.hIconSm = hIconSmall; #if CYGMULTIWINDOW_DEBUG - ErrorF("winCreateWindowsWindow - Creating class: %s\n", WINDOW_CLASS_X); + ErrorF("winInitMultiWindowClass - Creating class: %s\n", + WINDOW_CLASS_X); #endif atomXWinClass = RegisterClassEx(&wcx); } + + if (atomXWinChildClass == 0) { + HICON hIcon, hIconSmall; + + /* Load the default icons */ + winSelectIcons(&hIcon, &hIconSmall); + + /* Setup our window class */ + wcx.cbSize = sizeof(WNDCLASSEX); + wcx.style = CS_HREDRAW | CS_VREDRAW | (g_fNativeGl ? CS_OWNDC : 0); + wcx.lpfnWndProc = winChildWindowProc; + wcx.cbClsExtra = 0; + wcx.cbWndExtra = 0; + wcx.hInstance = g_hInstance; + wcx.hIcon = hIcon; + wcx.hCursor = 0; + wcx.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); + wcx.lpszMenuName = NULL; + wcx.lpszClassName = WINDOW_CLASS_X_CHILD; + wcx.hIconSm = hIconSmall; + +#if CYGMULTIWINDOW_DEBUG + ErrorF("winInitMultiWindowClass - Creating class: %s\n", + WINDOW_CLASS_X_CHILD); +#endif + + atomXWinChildClass = RegisterClassEx(&wcx); + } } /* @@ -202,6 +247,29 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y) return fResult; } + if (!isToplevelWindow(pWin)) { + POINT parentOrigin; + + /* Get the X and Y location of the X window */ + iX = pWin->drawable.x + GetSystemMetrics(SM_XVIRTUALSCREEN); + iY = pWin->drawable.y + GetSystemMetrics(SM_YVIRTUALSCREEN); + + /* Get the height and width of the X window */ + iWidth = pWin->drawable.width; + iHeight = pWin->drawable.height; + + /* Convert screen coordinates into client area co-ordinates of the parent */ + parentOrigin.x = 0; + parentOrigin.y = 0; + ClientToScreen(GetParent(hWnd), &parentOrigin); + + MoveWindow(hWnd, + iX - parentOrigin.x, iY - parentOrigin.y, iWidth, iHeight, + TRUE); + + return fResult; + } + /* Get the Windows window style and extended style */ dwExStyle = GetWindowLongPtr(hWnd, GWL_EXSTYLE); dwStyle = GetWindowLongPtr(hWnd, GWL_STYLE); @@ -470,12 +538,8 @@ winRestackWindowMultiWindow(WindowPtr pWin, WindowPtr pOldNextSib) #endif } -/* - * winCreateWindowsWindow - Create a Windows window associated with an X window - */ - -void -winCreateWindowsWindow(WindowPtr pWin) +static void +winCreateWindowsTopLevelWindow(WindowPtr pWin) { int iX, iY; int iWidth; @@ -513,8 +577,8 @@ winCreateWindowsWindow(WindowPtr pWin) iY = CW_USEDEFAULT; } - winDebug("winCreateWindowsWindow - %dx%d @ %dx%d\n", iWidth, iHeight, iX, - iY); + winDebug("winCreateWindowsTopLevelWindow - %dx%d @ %dx%d\n", iWidth, + iHeight, iX, iY); if (winMultiWindowGetTransientFor(pWin, &pDaddy)) { if (pDaddy) { @@ -534,7 +598,11 @@ winCreateWindowsWindow(WindowPtr pWin) } } - /* Make it WS_OVERLAPPED in create call since WS_POPUP doesn't support */ + winDebug("winCreateWindowsTopLevelWindow - %dx%d @ %dx%d\n", iWidth, + iHeight, iX, iY); + + /* Create the window */ + /* Make it OVERLAPPED in create call since WS_POPUP doesn't support */ /* CW_USEDEFAULT, change back to popup after creation */ dwStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; dwExStyle = WS_EX_TOOLWINDOW; @@ -572,11 +640,14 @@ winCreateWindowsWindow(WindowPtr pWin) GetModuleHandle(NULL), /* Instance handle */ pWin); /* ScreenPrivates */ if (hWnd == NULL) { - ErrorF("winCreateWindowsWindow - CreateWindowExA () failed: %d\n", - (int) GetLastError()); + ErrorF + ("winCreateWindowsTopLevelWindow - CreateWindowExA () failed: %d\n", + (int) GetLastError()); } pWinPriv->hWnd = hWnd; + winDebug("winCreateWindowsTopLevelWindow - hwnd 0x%08x\n", hWnd); + /* Change style back to popup, already placed... */ SetWindowLongPtr(hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); @@ -602,6 +673,107 @@ winCreateWindowsWindow(WindowPtr pWin) (*pScreenPriv->pwinFinishCreateWindowsWindow) (pWin); } +static void +winCreateWindowsChildWindow(WindowPtr pWin) +{ + int iX, iY, iWidth, iHeight; + HWND hWnd; + WindowPtr pParent = pWin->parent; + DWORD dwStyle = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_DISABLED; + DWORD dwExStyle = WS_EX_TRANSPARENT; + + /* + WS_DISABLED means child window never gains the input focus, so only the + top-level window needs deal with passing input to the X server + + WS_EX_TRANSPARENT ensures that the contents of the top-level + Windows window (which will contain all non-OpenGL drawing for the hierarchy) + can be seen through any intermediate child windows which have nothing + drawn to them + */ + winPrivWinPtr pParentPriv, pWinPriv; + + winDebug("winCreateWindowsChildWindow - pWin:%08x XID:0x%x \n", pWin, + pWin->drawable.id); + + winInitMultiWindowClass(); + + assert(pParent); + + pParentPriv = winGetWindowPriv(pParent); + pWinPriv = winGetWindowPriv(pWin); + + iX = pWin->drawable.x - pParent->drawable.x; + iY = pWin->drawable.y - pParent->drawable.y; + iWidth = pWin->drawable.width; + iHeight = pWin->drawable.height; + + winDebug + ("winCreateWindowsChildWindow - parent pWin:%08x XID:0x%08x hWnd:0x%08x\n", + pParent, pParent->drawable.id, pParentPriv->hWnd); + winDebug("winCreateWindowsChildWindow - %dx%d @ %dx%d\n", iWidth, iHeight, + iX, iY); + + /* Create the window */ + hWnd = CreateWindowExA(dwExStyle, /* Extended styles */ + WINDOW_CLASS_X_CHILD, /* Class name */ + WINDOW_TITLE_X, /* Window name */ + dwStyle, /* Styles */ + iX, /* Horizontal position */ + iY, /* Vertical position */ + iWidth, /* Right edge */ + iHeight, /* Bottom edge */ + pParentPriv->hWnd, /* parent window */ + (HMENU) NULL, /* No menu */ + GetModuleHandle(NULL), /* Instance handle */ + pWin); /* ScreenPrivates */ + if (hWnd == NULL) { + ErrorF("winCreateWindowsChildWindow - CreateWindowExA () failed: %d\n", + (int) GetLastError()); + } + winDebug("winCreateWindowsChildWindow - hwnd 0x%08x\n", hWnd); + pWinPriv->hWnd = hWnd; + + SetProp(hWnd, WIN_WID_PROP, (HANDLE) winGetWindowID(pWin)); +} + +/* + * winCreateWindowsWindow - Create a Windows window associated with an X window + */ + +void +winCreateWindowsWindow(WindowPtr pWin) +{ + winDebug("winCreateWindowsWindow - pWin:%08x XID:0x%x \n", pWin, + pWin->drawable.id); + + if (isToplevelWindow(pWin)) { + winCreateWindowsTopLevelWindow(pWin); + } + else { + winCreateWindowsChildWindow(pWin); + } +} + +static int +winDestroyChildWindowsWindow(WindowPtr pWin, pointer data) +{ + winWindowPriv(pWin); + + winDebug("winDestroyChildWindowsWindow - pWin:%08x XID:0x%x \n", pWin, + pWin->drawable.id); + + /* Null our handle to the Window so referencing it will cause an error */ + pWinPriv->hWnd = NULL; + +#ifdef XWIN_GLX_WINDOWS + /* No longer note WGL used on this window */ + pWinPriv->fWglUsed = FALSE; +#endif + + return WT_WALKCHILDREN; /* continue enumeration */ +} + Bool winInDestroyWindowsWindow = FALSE; /* @@ -617,6 +789,7 @@ winDestroyWindowsWindow(WindowPtr pWin) BOOL oldstate = winInDestroyWindowsWindow; HICON hIcon; HICON hIconSm; + HWND hWnd; winDebug("winDestroyWindowsWindow - pWin:%08x XID:0x%x \n", pWin, pWin->drawable.id); @@ -631,21 +804,20 @@ winDestroyWindowsWindow(WindowPtr pWin) hIcon = (HICON) SendMessage(pWinPriv->hWnd, WM_GETICON, ICON_BIG, 0); hIconSm = (HICON) SendMessage(pWinPriv->hWnd, WM_GETICON, ICON_SMALL, 0); - /* Destroy the Windows window */ - DestroyWindow(pWinPriv->hWnd); + hWnd = pWinPriv->hWnd; - /* Null our handle to the Window so referencing it will cause an error */ - pWinPriv->hWnd = NULL; + /* DestroyWindow() implicitly destroys all child windows, + so first walk over the child tree of this window, clearing + any hWnds */ + TraverseTree(pWin, winDestroyChildWindowsWindow, 0); + + /* Destroy the Windows window */ + DestroyWindow(hWnd); /* Destroy any icons we created for this window */ winDestroyIcon(hIcon); winDestroyIcon(hIconSm); -#ifdef XWIN_GLX_WINDOWS - /* No longer note WGL used on this window */ - pWinPriv->fWglUsed = FALSE; -#endif - /* Process all messages on our queue */ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { if (g_hDlgDepthChange == 0 || !IsDialogMessage(g_hDlgDepthChange, &msg)) { @@ -667,29 +839,58 @@ static void winUpdateWindowsWindow(WindowPtr pWin) { winWindowPriv(pWin); - HWND hWnd = pWinPriv->hWnd; #if CYGMULTIWINDOW_DEBUG ErrorF("winUpdateWindowsWindow\n"); #endif - /* Check if the Windows window's parents have been destroyed */ - if (pWin->parent != NULL && pWin->parent->parent == NULL && pWin->mapped) { - /* Create the Windows window if it has been destroyed */ - if (hWnd == NULL) { - winCreateWindowsWindow(pWin); - assert(pWinPriv->hWnd != NULL); + /* Ignore the root window */ + if (pWin->parent == NULL) + return; + + /* If it's mapped */ + if (pWin->mapped) { + /* If it's a top-level window */ + if (isToplevelWindow(pWin)) { + /* Create the Windows window if needed */ + if (pWinPriv->hWnd == NULL) { + winCreateWindowsWindow(pWin); + assert(pWinPriv->hWnd != NULL); + } + + /* Display the window without activating it */ + if (pWin->drawable.class != InputOnly) + ShowWindow(pWinPriv->hWnd, SW_SHOWNOACTIVATE); + + } + /* It's not a top-level window, but we created a window for GLX */ + else if (pWinPriv->hWnd) { + winPrivWinPtr pParentPriv = winGetWindowPriv(pWin->parent); + + /* XXX: This really belongs in winReparentWindow ??? */ + /* XXX: this assumes parent window has been made to exist */ + assert(pParentPriv->hWnd); + + /* Ensure we have the correct parent and position if reparented */ + SetParent(pWinPriv->hWnd, pParentPriv->hWnd); + SetWindowPos(pWinPriv->hWnd, NULL, + pWin->drawable.x - pWin->parent->drawable.x, + pWin->drawable.y - pWin->parent->drawable.y, 0, 0, + SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW); } - /* Display the window without activating it */ - if (pWin->drawable.class != InputOnly) - ShowWindow(pWinPriv->hWnd, SW_SHOWNOACTIVATE); + /* If it's top level, or a GLX window which has already been created getting mapped, show it */ + if (pWinPriv->hWnd != NULL) { + /* Display the window without activating it */ + if (pWin->drawable.class != InputOnly) + ShowWindow(pWinPriv->hWnd, SW_SHOWNOACTIVATE); - /* Send first paint message */ - UpdateWindow(pWinPriv->hWnd); + /* Send first paint message */ + UpdateWindow(pWinPriv->hWnd); + } } - else if (hWnd != NULL) { - /* Destroy the Windows window if its parents are destroyed */ + else if (pWinPriv->hWnd != NULL) { + /* If it's been reparented to an unmapped window when previously mapped, destroy the Windows window */ winDestroyWindowsWindow(pWin); assert(pWinPriv->hWnd == NULL); } @@ -929,6 +1130,14 @@ winAdjustXWindow(WindowPtr pWin, HWND hwnd) ErrorF("winAdjustXWindow\n"); #endif + if (!isToplevelWindow(pWin)) { +#if 1 + ErrorF + ("winAdjustXWindow - immediately return because not a top-level window\n"); +#endif + return 0; + } + if (IsIconic(hwnd)) { #if CYGWINDOWING_DEBUG ErrorF("\timmediately return because the window is iconized\n"); diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index ffb7c2d0f..b4bd71f62 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -30,6 +30,10 @@ * Colin Harrison */ +#ifndef WINVER +#define WINVER 0x0500 +#endif + /* X headers */ #ifdef HAVE_XWIN_CONFIG_H #include <xwin-config.h> @@ -48,7 +52,6 @@ #include <X11/X.h> #include <X11/Xatom.h> #include <X11/Xlib.h> -#include <X11/Xlocale.h> #include <X11/Xproto.h> #include <X11/Xutil.h> #include <X11/cursorfont.h> @@ -62,6 +65,14 @@ #include "window.h" #include "pixmapstr.h" #include "windowstr.h" +#include "winglobals.h" + +#include <shlwapi.h> + +#define INITGUID +#include "initguid.h" +#include "taskbar.h" +#undef INITGUID #ifdef XWIN_MULTIWINDOWEXTWM #include <X11/extensions/windowswmstr.h> @@ -135,7 +146,6 @@ typedef struct _XMsgProcArgRec { * References to external symbols */ -extern char *display; extern void ErrorF(const char * /*f */ , ...); /* @@ -175,6 +185,9 @@ static int static int winMultiWindowXMsgProcIOErrorHandler(Display * pDisplay); +static void +winMultiWindowThreadExit(void *arg); + static int winRedirectErrorHandler(Display * pDisplay, XErrorEvent * pErr); @@ -192,10 +205,13 @@ CheckAnotherWindowManager(Display * pDisplay, DWORD dwScreen, Bool fAllowOtherWM); static void + winApplyUrgency(Display * pDisplay, Window iWindow, HWND hWnd); + +static void winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle); void - winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle); + winUpdateWindowPosition(HWND hWnd, HWND * zstyle); /* * Local globals @@ -210,6 +226,10 @@ static pthread_t g_winMultiWindowXMsgProcThread; static Bool g_shutdown = FALSE; static Bool redirectError = FALSE; static Bool g_fAnotherWMRunning = FALSE; +static HMODULE g_hmodShell32Dll = NULL; +static HMODULE g_hmodOle32Dll = NULL; +static SHGETPROPERTYSTOREFORWINDOWPROC g_pSHGetPropertyStoreForWindow = NULL; +static PROPVARIANTCLEARPROC g_pPropVariantClear = NULL; /* * PushMessage - Push a message onto the queue @@ -438,7 +458,10 @@ GetWindowName(Display * pDisplay, Window iWin, char **ppWindowName) { int nResult; XTextProperty xtpWindowName; + XTextProperty xtpClientMachine; char *pszWindowName; + char *pszClientMachine; + char hostname[HOST_NAME_MAX + 1]; #if CYGMULTIWINDOW_DEBUG ErrorF("GetWindowName\n"); @@ -458,6 +481,40 @@ GetWindowName(Display * pDisplay, Window iWin, char **ppWindowName) pszWindowName = Xutf8TextPropertyToString(pDisplay, &xtpWindowName); XFree(xtpWindowName.value); + + if (g_fHostInTitle) { + /* Try to get client machine name */ + nResult = XGetWMClientMachine(pDisplay, iWin, &xtpClientMachine); + if (nResult && xtpClientMachine.value && xtpClientMachine.nitems) { + pszClientMachine = + Xutf8TextPropertyToString(pDisplay, &xtpClientMachine); + XFree(xtpClientMachine.value); + + /* + If we have a client machine name + and it's not the local host name... + */ + if (strlen(pszClientMachine) && + !gethostname(hostname, HOST_NAME_MAX + 1) && + strcmp(hostname, pszClientMachine)) { + /* ... add ' (on <clientmachine>)' to end of window name */ + *ppWindowName = + malloc(strlen(pszWindowName) + + strlen(pszClientMachine) + 7); + strcpy(*ppWindowName, pszWindowName); + strcat(*ppWindowName, " (on "); + strcat(*ppWindowName, pszClientMachine); + strcat(*ppWindowName, ")"); + + free(pszWindowName); + free(pszClientMachine); + + return; + } + } + } + + /* otherwise just return the window name */ *ppWindowName = pszWindowName; } @@ -526,7 +583,6 @@ getHwnd(WMInfoPtr pWMInfo, Window iWindow) static void UpdateName(WMInfoPtr pWMInfo, Window iWindow) { - wchar_t *pszName; HWND hWnd; XWindowAttributes attr; @@ -600,6 +656,48 @@ UpdateIcon(WMInfoPtr pWMInfo, Window iWindow) winUpdateIcon(hWnd, pWMInfo->pDisplay, iWindow, hIconNew); } +/* + * Updates the style of a HWND according to its X style properties + */ + +static void +UpdateStyle(WMInfoPtr pWMInfo, Window iWindow) +{ + HWND hWnd; + HWND zstyle = HWND_NOTOPMOST; + UINT flags; + Bool onTaskbar; + + hWnd = getHwnd(pWMInfo, iWindow); + if (!hWnd) + return; + + /* Determine the Window style, which determines borders and clipping region... */ + winApplyHints(pWMInfo->pDisplay, iWindow, hWnd, &zstyle); + winUpdateWindowPosition(hWnd, &zstyle); + + /* Apply the updated window style, without changing it's show or activation state */ + flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE; + if (zstyle == HWND_NOTOPMOST) + flags |= SWP_NOZORDER | SWP_NOOWNERZORDER; + SetWindowPos(hWnd, NULL, 0, 0, 0, 0, flags); + + /* + Use the WS_EX_TOOLWINDOW style to remove window from Alt-Tab window switcher + + According to MSDN, this is supposed to remove the window from the taskbar as well, + if we SW_HIDE before changing the style followed by SW_SHOW afterwards. + + But that doesn't seem to work reliably, so also use iTaskbarList interface to + tell the taskbar to show or hide this window. + */ + onTaskbar = GetWindowLongPtr(hWnd, GWL_EXSTYLE) & WS_EX_APPWINDOW; + wintaskbar(hWnd, onTaskbar); + + /* Check urgency hint */ + winApplyUrgency(pWMInfo->pDisplay, iWindow, hWnd); +} + #if 0 /* * Fix up any differences between the X11 and Win32 window stacks @@ -651,6 +749,8 @@ winMultiWindowWMProc(void *pArg) WMProcArgPtr pProcArg = (WMProcArgPtr) pArg; WMInfoPtr pWMInfo = pProcArg->pWMInfo; + pthread_cleanup_push(&winMultiWindowThreadExit, NULL); + /* Initialize the Window Manager */ winInitMultiWindowWM(pWMInfo, pProcArg); @@ -747,13 +847,18 @@ winMultiWindowWMProc(void *pArg) (unsigned char *) &(pNode->msg.hwndWindow), 1); UpdateName(pWMInfo, pNode->msg.iWindow); UpdateIcon(pWMInfo, pNode->msg.iWindow); - { - HWND zstyle = HWND_NOTOPMOST; + UpdateStyle(pWMInfo, pNode->msg.iWindow); - winApplyHints(pWMInfo->pDisplay, pNode->msg.iWindow, - pNode->msg.hwndWindow, &zstyle); - winUpdateWindowPosition(pNode->msg.hwndWindow, TRUE, &zstyle); + /* Reshape */ + { + WindowPtr pWin = + GetProp(pNode->msg.hwndWindow, WIN_WINDOW_PROP); + if (pWin) { + winReshapeMultiWindow(pWin); + winUpdateRgnMultiWindow(pWin); + } } + break; case WM_WM_UNMAP: @@ -812,6 +917,19 @@ winMultiWindowWMProc(void *pArg) UpdateIcon(pWMInfo, pNode->msg.iWindow); break; + case WM_WM_HINTS_EVENT: + { + XWindowAttributes attr; + + /* Don't do anything if this is an override-redirect window */ + XGetWindowAttributes (pWMInfo->pDisplay, pNode->msg.iWindow, &attr); + if (attr.override_redirect) + break; + + UpdateStyle(pWMInfo, pNode->msg.iWindow); + } + break; + case WM_WM_CHANGE_STATE: /* Minimize the window in Windows */ winMinimizeWindow(pNode->msg.iWindow); @@ -842,6 +960,9 @@ winMultiWindowWMProc(void *pArg) #if CYGMULTIWINDOW_DEBUG ErrorF("-winMultiWindowWMProc ()\n"); #endif + + pthread_cleanup_pop(0); + return NULL; } @@ -861,9 +982,12 @@ winMultiWindowXMsgProc(void *pArg) Atom atmWmHints; Atom atmWmChange; Atom atmNetWmIcon; + Atom atmWindowState, atmMotifWmHints, atmWindowType, atmNormalHints; int iReturn; XIconSize *xis; + pthread_cleanup_push(&winMultiWindowThreadExit, NULL); + winDebug("winMultiWindowXMsgProc - Hello\n"); /* Check that argument pointer is not invalid */ @@ -884,17 +1008,6 @@ winMultiWindowXMsgProc(void *pArg) ErrorF("winMultiWindowXMsgProc - pthread_mutex_lock () returned.\n"); - /* Allow multiple threads to access Xlib */ - if (XInitThreads() == 0) { - ErrorF("winMultiWindowXMsgProc - XInitThreads () failed. Exiting.\n"); - pthread_exit(NULL); - } - - /* See if X supports the current locale */ - if (XSupportsLocale() == False) { - ErrorF("winMultiWindowXMsgProc - Warning: locale not supported by X\n"); - } - /* Release the server started mutex */ pthread_mutex_unlock(pProcArg->ppmServerStarted); @@ -922,8 +1035,7 @@ winMultiWindowXMsgProc(void *pArg) } /* Setup the display connection string x */ - snprintf(pszDisplay, - 512, "127.0.0.1:%s.%d", display, (int) pProcArg->dwScreen); + winGetDisplayName(pszDisplay, (int) pProcArg->dwScreen); /* Print the display connection string */ ErrorF("winMultiWindowXMsgProc - DISPLAY=%s\n", pszDisplay); @@ -987,6 +1099,10 @@ winMultiWindowXMsgProc(void *pArg) atmWmHints = XInternAtom(pProcArg->pDisplay, "WM_HINTS", False); atmWmChange = XInternAtom(pProcArg->pDisplay, "WM_CHANGE_STATE", False); atmNetWmIcon = XInternAtom(pProcArg->pDisplay, "_NET_WM_ICON", False); + atmWindowState = XInternAtom(pProcArg->pDisplay, "_NET_WM_STATE", False); + atmMotifWmHints = XInternAtom(pProcArg->pDisplay, "_MOTIF_WM_HINTS", False); + atmWindowType = XInternAtom(pProcArg->pDisplay, "_NET_WM_WINDOW_TYPE", False); + atmNormalHints = XInternAtom(pProcArg->pDisplay, "WM_NORMAL_HINTS", False); /* iiimxcf had a bug until 2009-04-27, assuming that the @@ -1115,6 +1231,10 @@ winMultiWindowXMsgProc(void *pArg) } } else if (event.type == PropertyNotify) { + char *atomName = + XGetAtomName(pProcArg->pDisplay, event.xproperty.atom); + winDebug("winMultiWindowXMsgProc: PropertyNotify %s\n", atomName); + XFree(atomName); if (event.xproperty.atom == atmWmName) { memset(&msg, 0, sizeof(msg)); @@ -1124,14 +1244,34 @@ winMultiWindowXMsgProc(void *pArg) /* Other fields ignored */ winSendMessageToWM(pProcArg->pWMInfo, &msg); } - else if ((event.xproperty.atom == atmWmHints) || - (event.xproperty.atom == atmNetWmIcon)) { - memset(&msg, 0, sizeof(msg)); - msg.msg = WM_WM_ICON_EVENT; - msg.iWindow = event.xproperty.window; + else { + /* + Several properties are considered for WM hints, check if this property change affects any of them... + (this list needs to be kept in sync with winApplyHints()) + */ + if ((event.xproperty.atom == atmWmHints) || + (event.xproperty.atom == atmWindowState) || + (event.xproperty.atom == atmMotifWmHints) || + (event.xproperty.atom == atmWindowType) || + (event.xproperty.atom == atmNormalHints)) { + memset(&msg, 0, sizeof(msg)); + msg.msg = WM_WM_HINTS_EVENT; + msg.iWindow = event.xproperty.window; + + /* Other fields ignored */ + winSendMessageToWM(pProcArg->pWMInfo, &msg); + } - /* Other fields ignored */ - winSendMessageToWM(pProcArg->pWMInfo, &msg); + /* Not an else as WM_HINTS affects both style and icon */ + if ((event.xproperty.atom == atmWmHints) || + (event.xproperty.atom == atmNetWmIcon)) { + memset(&msg, 0, sizeof(msg)); + msg.msg = WM_WM_ICON_EVENT; + msg.iWindow = event.xproperty.window; + + /* Other fields ignored */ + winSendMessageToWM(pProcArg->pWMInfo, &msg); + } } } else if (event.type == ClientMessage @@ -1149,7 +1289,7 @@ winMultiWindowXMsgProc(void *pArg) } XCloseDisplay(pProcArg->pDisplay); - pthread_exit(NULL); + pthread_cleanup_pop(0); return NULL; } @@ -1255,17 +1395,6 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg) ErrorF("winInitMultiWindowWM - pthread_mutex_lock () returned.\n"); - /* Allow multiple threads to access Xlib */ - if (XInitThreads() == 0) { - ErrorF("winInitMultiWindowWM - XInitThreads () failed. Exiting.\n"); - pthread_exit(NULL); - } - - /* See if X supports the current locale */ - if (XSupportsLocale() == False) { - ErrorF("winInitMultiWindowWM - Warning: Locale not supported by X.\n"); - } - /* Release the server started mutex */ pthread_mutex_unlock(pProcArg->ppmServerStarted); @@ -1293,8 +1422,7 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg) } /* Setup the display connection string x */ - snprintf(pszDisplay, - 512, "127.0.0.1:%s.%d", display, (int) pProcArg->dwScreen); + winGetDisplayName(pszDisplay, (int) pProcArg->dwScreen); /* Print the display connection string */ ErrorF("winInitMultiWindowWM - DISPLAY=%s\n", pszDisplay); @@ -1397,7 +1525,7 @@ winMultiWindowWMErrorHandler(Display * pDisplay, XErrorEvent * pErr) static int winMultiWindowWMIOErrorHandler(Display * pDisplay) { - ErrorF("winMultiWindowWMIOErrorHandler!\n\n"); + ErrorF("winMultiWindowWMIOErrorHandler!\n"); if (pthread_equal(pthread_self(), g_winMultiWindowWMThread)) { if (g_shutdown) @@ -1437,7 +1565,7 @@ winMultiWindowXMsgProcErrorHandler(Display * pDisplay, XErrorEvent * pErr) static int winMultiWindowXMsgProcIOErrorHandler(Display * pDisplay) { - ErrorF("winMultiWindowXMsgProcIOErrorHandler!\n\n"); + ErrorF("winMultiWindowXMsgProcIOErrorHandler!\n"); if (pthread_equal(pthread_self(), g_winMultiWindowXMsgProcThread)) { /* Restart at the main entry point */ @@ -1451,6 +1579,17 @@ winMultiWindowXMsgProcIOErrorHandler(Display * pDisplay) } /* + * winMultiWindowThreadExit - Thread exit handler + */ + +static void +winMultiWindowThreadExit(void *arg) +{ + /* multiwindow client thread has exited, stop server as well */ + kill(getpid(), SIGTERM); +} + +/* * Catch RedirectError to detect other window manager running */ @@ -1505,6 +1644,40 @@ winDeinitMultiWindowWM(void) g_shutdown = TRUE; } +static void +winApplyUrgency(Display * pDisplay, Window iWindow, HWND hWnd) +{ + XWMHints *hints = XGetWMHints(pDisplay, iWindow); + + if (hints) { + FLASHWINFO fwi; + + fwi.cbSize = sizeof(FLASHWINFO); + fwi.hwnd = hWnd; + + winDebug("winApplyUrgency: window 0x%08x has urgency hint %s\n", + iWindow, (hints->flags & XUrgencyHint) ? "on" : "off"); + + if (hints->flags & XUrgencyHint) { + DWORD count = 3; + + SystemParametersInfo(SPI_GETFOREGROUNDFLASHCOUNT, 0, &count, 0); + fwi.dwFlags = FLASHW_TRAY; + fwi.uCount = count; + fwi.dwTimeout = 0; + } + else { + fwi.dwFlags = FLASHW_STOP; + fwi.uCount = 0; + fwi.dwTimeout = 0; + } + + FlashWindowEx(&fwi); + + XFree(hints); + } +} + /* Windows window styles */ #define HINT_NOFRAME (1l<<0) #define HINT_BORDER (1L<<1) @@ -1513,6 +1686,7 @@ winDeinitMultiWindowWM(void) #define HINT_NOMAXIMIZE (1L<<4) #define HINT_NOMINIMIZE (1L<<5) #define HINT_NOSYSMENU (1L<<6) +#define HINT_SKIPTASKBAR (1L<<7) /* These two are used on their own */ #define HINT_MAX (1L<<0) #define HINT_MIN (1L<<1) @@ -1521,12 +1695,14 @@ static void winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle) { static Atom windowState, motif_wm_hints, windowType; - static Atom hiddenState, fullscreenState, belowState, aboveState; + static Atom hiddenState, fullscreenState, belowState, aboveState, + skiptaskbarState; static Atom dockWindow; static int generation; Atom type, *pAtom = NULL; int format; - unsigned long hint = 0, maxmin = 0, style, nitems = 0, left = 0; + unsigned long hint = 0, maxmin = 0, nitems = 0, left = 0; + unsigned long style, exStyle; MwmHints *mwm_hint = NULL; if (!hWnd) @@ -1545,24 +1721,32 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle) belowState = XInternAtom(pDisplay, "_NET_WM_STATE_BELOW", False); aboveState = XInternAtom(pDisplay, "_NET_WM_STATE_ABOVE", False); dockWindow = XInternAtom(pDisplay, "_NET_WM_WINDOW_TYPE_DOCK", False); + skiptaskbarState = + XInternAtom(pDisplay, "_NET_WM_STATE_SKIP_TASKBAR", False); } if (XGetWindowProperty(pDisplay, iWindow, windowState, 0L, - 1L, False, XA_ATOM, &type, &format, + MAXINT, False, XA_ATOM, &type, &format, &nitems, &left, (unsigned char **) &pAtom) == Success) { - if (pAtom && nitems == 1) { - if (*pAtom == hiddenState) - maxmin |= HINT_MIN; - else if (*pAtom == fullscreenState) - maxmin |= HINT_MAX; - if (*pAtom == belowState) - *zstyle = HWND_BOTTOM; - else if (*pAtom == aboveState) - *zstyle = HWND_TOPMOST; - } - if (pAtom) + if (pAtom) { + unsigned long i; + + for (i = 0; i < nitems; i++) { + if (*pAtom == skiptaskbarState) + hint |= HINT_SKIPTASKBAR; + if (*pAtom == hiddenState) + maxmin |= HINT_MIN; + else if (*pAtom == fullscreenState) + maxmin |= HINT_MAX; + if (*pAtom == belowState) + *zstyle = HWND_BOTTOM; + else if (*pAtom == aboveState) + *zstyle = HWND_TOPMOST; + } + XFree(pAtom); + } } nitems = left = 0; @@ -1640,10 +1824,14 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle) XFree(normal_hint); } - /* Override hint settings from above with settings from config file */ + /* + Override hint settings from above with settings from config file and set + application id for grouping. + */ { XClassHint class_hint = { 0, 0 }; char *window_name = 0; + char *application_id = 0; if (XGetClassHint(pDisplay, iWindow, &class_hint)) { XFetchName(pDisplay, iWindow, &window_name); @@ -1652,10 +1840,24 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle) winOverrideStyle(class_hint.res_name, class_hint.res_class, window_name); +#define APPLICATION_ID_FORMAT "%s.xwin.%s" +#define APPLICATION_ID_UNKNOWN "unknown" + if (class_hint.res_class) { + asprintf(&application_id, APPLICATION_ID_FORMAT, XVENDORNAME, + class_hint.res_class); + } + else { + asprintf(&application_id, APPLICATION_ID_FORMAT, XVENDORNAME, + APPLICATION_ID_UNKNOWN); + } + winSetAppID(hWnd, application_id); + if (class_hint.res_name) XFree(class_hint.res_name); if (class_hint.res_class) XFree(class_hint.res_class); + if (application_id) + free(application_id); if (window_name) XFree(window_name); } @@ -1694,9 +1896,9 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle) /* Now apply styles to window */ style = GetWindowLongPtr(hWnd, GWL_STYLE) & ~WS_CAPTION & ~WS_SIZEBOX; /* Just in case */ if (!style) - return; + return; /* GetWindowLongPointer returns 0 on failure, we hope this isn't a valid style */ - if (!hint) /* All on */ + if (!(hint & ~HINT_SKIPTASKBAR)) /* All on */ style = style | WS_CAPTION | WS_SIZEBOX; else if (hint & HINT_NOFRAME) /* All off */ style = style & ~WS_CAPTION & ~WS_SIZEBOX; @@ -1714,11 +1916,26 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle) if (hint & HINT_NOSYSMENU) style = style & ~WS_SYSMENU; + if (hint & HINT_SKIPTASKBAR) + style = style & ~WS_MINIMIZEBOX; /* window will become lost if minimized */ + SetWindowLongPtr(hWnd, GWL_STYLE, style); + + /* now we have iTaskbar, use that as well */ + exStyle = GetWindowLongPtr(hWnd, GWL_EXSTYLE); + if (hint & HINT_SKIPTASKBAR) + exStyle = (exStyle & ~WS_EX_APPWINDOW) | WS_EX_TOOLWINDOW; + else + exStyle = (exStyle & ~WS_EX_TOOLWINDOW) | WS_EX_APPWINDOW; + SetWindowLongPtr(hWnd, GWL_EXSTYLE, exStyle); + + winDebug + ("winApplyHints: iWindow 0x%08x hints 0x%08x style 0x%08x exstyle 0x%08x\n", + iWindow, hint, style, exStyle); } void -winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle) +winUpdateWindowPosition(HWND hWnd, HWND * zstyle) { int iX, iY, iWidth, iHeight; int iDx, iDy; @@ -1769,8 +1986,96 @@ winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle) SetWindowPos(hWnd, *zstyle, rcNew.left, rcNew.top, rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, 0); - if (reshape) { - winReshapeMultiWindow(pWin); - winUpdateRgnMultiWindow(pWin); +} + +void +winTaskbarInit(void) +{ + /* + Load libraries and get function pointers to SHGetPropertyStoreForWindow + and PropVariantClear for winSetAppID() + */ + + /* + SHGetPropertyStoreForWindow is only supported since Windows 7. On previous + versions the pointer will be NULL and taskbar grouping is not supported. + winSetAppID() will do nothing in this case. + */ + g_hmodShell32Dll = LoadLibrary("shell32.dll"); + if (g_hmodShell32Dll == NULL) { + ErrorF("winTaskbarInit - Could not load shell32.dll\n"); + return; + } + + g_pSHGetPropertyStoreForWindow = + (SHGETPROPERTYSTOREFORWINDOWPROC) GetProcAddress(g_hmodShell32Dll, + "SHGetPropertyStoreForWindow"); + if (g_pSHGetPropertyStoreForWindow == NULL) { + ErrorF + ("winTaskbarInit - Could not get SHGetPropertyStoreForWindow address\n"); + return; + } + + /* + PropVariantClear is supported since NT4, but we have no propidl.h to + provide a prototype for it + */ + g_hmodOle32Dll = LoadLibrary("ole32.dll"); + if (g_hmodOle32Dll == NULL) { + ErrorF("winTaskbarInit - Could not load ole32.dll\n"); + return; + } + + g_pPropVariantClear = + (PROPVARIANTCLEARPROC) GetProcAddress(g_hmodOle32Dll, + "PropVariantClear"); + if (g_pPropVariantClear == NULL) { + ErrorF("winTaskbarInit - Could not get g_pPropVariantClear address\n"); + return; + } +} + +void +winTaskbarDestroy(void) +{ + if (g_hmodOle32Dll != NULL) { + FreeLibrary(g_hmodOle32Dll); + g_hmodOle32Dll = NULL; + g_pPropVariantClear = NULL; + } + if (g_hmodShell32Dll != NULL) { + FreeLibrary(g_hmodShell32Dll); + g_hmodShell32Dll = NULL; + g_pSHGetPropertyStoreForWindow = NULL; + } +} + +void +winSetAppID(HWND hWnd, const char *AppID) +{ + PROPVARIANT pv; + IPropertyStore *pps = NULL; + HRESULT hr; + + if (g_pSHGetPropertyStoreForWindow == NULL || g_pPropVariantClear == NULL) { + return; + } + + winDebug("winSetAppID - hwnd 0x%08x appid '%s'\n", hWnd, AppID); + + hr = g_pSHGetPropertyStoreForWindow(hWnd, &IID_IPropertyStore, + (void **) &pps); + if (SUCCEEDED(hr) && pps) { + memset(&pv, 0, sizeof(PROPVARIANT)); + if (AppID) { + pv.vt = VT_LPWSTR; + hr = SHStrDupA(AppID, &pv.pwszVal); + } + + if (SUCCEEDED(hr)) { + hr = pps->lpVtbl->SetValue(pps, &PKEY_AppUserModel_ID, &pv); + g_pPropVariantClear(&pv); + } + pps->lpVtbl->Release(pps); } } diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index af917d6fc..1afbbd0ce 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -42,7 +42,7 @@ #include "winmsg.h" #include "inputstr.h" -extern void winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle); +extern void winUpdateWindowPosition(HWND hWnd, HWND * zstyle); /* * Local globals @@ -316,6 +316,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) static Bool s_fTracking = FALSE; Bool needRestack = FALSE; LRESULT ret; + static Bool hasEnteredSizeMove = FALSE; #if CYGDEBUG winDebugWin32Message("winTopLevelWindowProc", hwnd, message, wParam, @@ -825,6 +826,8 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; case WM_CLOSE: + /* Remove property AppUserModelID */ + winSetAppID(hwnd, NULL); /* Branch on if the window was killed in X already */ if (pWinPriv->fXKilled) { /* Window was killed, go ahead and destroy the window */ @@ -858,7 +861,9 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_MOVE: /* Adjust the X Window to the moved Windows window */ - winAdjustXWindow(pWin, hwnd); + if (!hasEnteredSizeMove) + winAdjustXWindow(pWin, hwnd); + /* else: Wait for WM_EXITSIZEMOVE */ return 0; case WM_SHOWWINDOW: @@ -868,41 +873,36 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* */ if (!pWin->overrideRedirect) { + HWND zstyle = HWND_NOTOPMOST; + /* Flag that this window needs to be made active when clicked */ SetProp(hwnd, WIN_NEEDMANAGE_PROP, (HANDLE) 1); - if (!(GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_APPWINDOW)) { - HWND zstyle = HWND_NOTOPMOST; - - /* Set the window extended style flags */ - SetWindowLongPtr(hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW); - - /* Set the transient style flags */ - if (GetParent(hwnd)) - SetWindowLongPtr(hwnd, GWL_STYLE, - WS_POPUP | WS_OVERLAPPED | WS_SYSMENU | - WS_CLIPCHILDREN | WS_CLIPSIBLINGS); - /* Set the window standard style flags */ - else - SetWindowLongPtr(hwnd, GWL_STYLE, - (WS_POPUP | WS_OVERLAPPEDWINDOW | - WS_CLIPCHILDREN | WS_CLIPSIBLINGS) - & ~WS_CAPTION & ~WS_SIZEBOX); - - winUpdateWindowPosition(hwnd, FALSE, &zstyle); - - { - WinXWMHints hints; - - if (winMultiWindowGetWMHints(pWin, &hints)) { - /* - Give the window focus, unless it has an InputHint - which is FALSE (this is used by e.g. glean to - avoid every test window grabbing the focus) - */ - if (!((hints.flags & InputHint) && (!hints.input))) { - SetForegroundWindow(hwnd); - } + /* Set the transient style flags */ + if (GetParent(hwnd)) + SetWindowLongPtr(hwnd, GWL_STYLE, + WS_POPUP | WS_OVERLAPPED | WS_SYSMENU | + WS_CLIPCHILDREN | WS_CLIPSIBLINGS); + /* Set the window standard style flags */ + else + SetWindowLongPtr(hwnd, GWL_STYLE, + (WS_POPUP | WS_OVERLAPPEDWINDOW | + WS_CLIPCHILDREN | WS_CLIPSIBLINGS) + & ~WS_CAPTION & ~WS_SIZEBOX); + + winUpdateWindowPosition(hwnd, &zstyle); + + { + WinXWMHints hints; + + if (winMultiWindowGetWMHints(pWin, &hints)) { + /* + Give the window focus, unless it has an InputHint + which is FALSE (this is used by e.g. glean to + avoid every test window grabbing the focus) + */ + if (!((hints.flags & InputHint) && (!hints.input))) { + SetForegroundWindow(hwnd); } } } @@ -996,6 +996,16 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) */ break; + case WM_ENTERSIZEMOVE: + hasEnteredSizeMove = TRUE; + return 0; + + case WM_EXITSIZEMOVE: + /* Adjust the X Window to the moved Windows window */ + hasEnteredSizeMove = FALSE; + winAdjustXWindow(pWin, hwnd); + return 0; + case WM_SIZE: /* see dix/window.c */ #if CYGWINDOWING_DEBUG @@ -1020,8 +1030,13 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) (int) (GetTickCount())); } #endif - /* Adjust the X Window to the moved Windows window */ - winAdjustXWindow(pWin, hwnd); + if (!hasEnteredSizeMove) { + /* Adjust the X Window to the moved Windows window */ + winAdjustXWindow(pWin, hwnd); + if (wParam == SIZE_MINIMIZED) + winReorderWindowsMultiWindow(); + } + /* else: wait for WM_EXITSIZEMOVE */ return 0; /* end of WM_SIZE handler */ case WM_STYLECHANGING: @@ -1131,3 +1146,41 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) winReorderWindowsMultiWindow(); return ret; } + +/* + * winChildWindowProc - Window procedure for all top-level Windows windows. + */ + +LRESULT CALLBACK +winChildWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ +#if CYGDEBUG + winDebugWin32Message("winChildWindowProc", hwnd, message, wParam, lParam); +#endif + + switch (message) { + case WM_ERASEBKGND: + return TRUE; + + case WM_PAINT: + /* + We don't have the bits to draw into the window, they went straight into the OpenGL + surface + + XXX: For now, just leave it alone, but ideally we want to send an expose event to + the window so it really redraws the affected region... + */ + { + PAINTSTRUCT ps; + HDC hdcUpdate; + + hdcUpdate = BeginPaint(hwnd, &ps); + ValidateRect(hwnd, &(ps.rcPaint)); + EndPaint(hwnd, &ps); + return 0; + } + /* XXX: this is exactly what DefWindowProc does? */ + } + + return DefWindowProc(hwnd, message, wParam, lParam); +} diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c index faa97c351..d6ec63099 100644 --- a/hw/xwin/winprefs.c +++ b/hw/xwin/winprefs.c @@ -37,6 +37,8 @@ #include <stdlib.h> #ifdef __CYGWIN__ #include <sys/resource.h> +#include <sys/wait.h> +#include <pthread.h> #endif #include "win.h" @@ -57,9 +59,6 @@ extern int parse_file(FILE * fp); /* Currently in use command ID, incremented each new menu item created */ static int g_cmdid = STARTMENUID; -/* Defined in DIX */ -extern char *display; - /* Local function to handle comma-ified icon names */ static HICON LoadImageComma(char *fname, int sx, int sy, int flags); @@ -303,6 +302,110 @@ HandleCustomWM_INITMENU(unsigned long hwndIn, unsigned long hmenuIn) } +#ifdef __CYGWIN__ +static void +LogLineFromFd(int fd, const char *fdname, int pid) +{ +#define BUFSIZE 512 /* must be less than internal buffer size used in LogVWrite */ + char buf[BUFSIZE]; + char *bufptr = buf; + + /* read from fd until eof, newline or our buffer is full */ + while ((read(fd, bufptr, 1) > 0) && (bufptr < &(buf[BUFSIZE - 1]))) { + if (*bufptr == '\n') + break; + bufptr++; + } + + /* null terminate and log */ + *bufptr = 0; + if (strlen(buf)) + ErrorF("(pid %d %s) %s\n", pid, fdname, buf); +} + +static void * +ExecAndLogThread(void *cmd) +{ + int pid; + int stdout_filedes[2]; + int stderr_filedes[2]; + int status; + + /* Create a pair of pipes */ + pipe(stdout_filedes); + pipe(stderr_filedes); + + switch (pid = fork()) { + case 0: /* child */ + { + struct rlimit rl; + unsigned int fd; + + /* dup write end of pipes onto stderr and stdout */ + close(STDOUT_FILENO); + close(STDERR_FILENO); + + dup2(stdout_filedes[1], STDOUT_FILENO); + dup2(stderr_filedes[1], STDERR_FILENO); + + /* Close any open descriptors except for STD* */ + getrlimit(RLIMIT_NOFILE, &rl); + for (fd = STDERR_FILENO + 1; fd < rl.rlim_cur; fd++) + close(fd); + + /* Disassociate any TTYs */ + setsid(); + + execl("/bin/sh", "/bin/sh", "-c", cmd, NULL); + perror("execl failed"); + exit(127); + } + break; + + default: /* parent */ + { + close(stdout_filedes[1]); + close(stderr_filedes[1]); + + ErrorF("executing '%s', pid %d\n", (char *) cmd, pid); + + /* read from pipes, write to log, until both are closed */ + while (TRUE) { + fd_set readfds, errorfds; + int nfds = max(stdout_filedes[0], stderr_filedes[0]) + 1; + + FD_ZERO(&readfds); + FD_SET(stdout_filedes[0], &readfds); + FD_SET(stderr_filedes[0], &readfds); + errorfds = readfds; + + if (select(nfds, &readfds, NULL, &errorfds, NULL) > 0) { + if (FD_ISSET(stdout_filedes[0], &readfds)) + LogLineFromFd(stdout_filedes[0], "stdout", pid); + if (FD_ISSET(stderr_filedes[0], &readfds)) + LogLineFromFd(stderr_filedes[0], "stderr", pid); + + if (FD_ISSET(stdout_filedes[0], &errorfds) && + FD_ISSET(stderr_filedes[0], &errorfds)) + break; + } + else { + break; + } + } + + waitpid(pid, &status, 0); + } + break; + + case -1: /* error */ + ErrorF("fork() to run command failed\n"); + } + + return (void *) status; +} +#endif + /* * Searches for the custom WM_COMMAND command ID and performs action. * Return TRUE if command is proccessed, FALSE otherwise. @@ -328,24 +431,17 @@ HandleCustomWM_COMMAND(unsigned long hwndIn, int command) switch (m->menuItem[j].cmd) { #ifdef __CYGWIN__ case CMD_EXEC: - if (fork() == 0) { - struct rlimit rl; - unsigned long i; - - /* Close any open descriptors except for STD* */ - getrlimit(RLIMIT_NOFILE, &rl); - for (i = STDERR_FILENO + 1; i < rl.rlim_cur; i++) - close(i); - - /* Disassociate any TTYs */ - setsid(); + { + pthread_t t; - execl("/bin/sh", - "/bin/sh", "-c", m->menuItem[j].param, NULL); - exit(0); - } + if (!pthread_create + (&t, NULL, ExecAndLogThread, m->menuItem[j].param)) + pthread_detach(t); else - return TRUE; + ErrorF + ("Creating command output logging thread failed\n"); + } + return TRUE; break; #else case CMD_EXEC: @@ -653,11 +749,17 @@ winPrefsLoadPreferences(char *path) "MENU rmenu {\n" " \"How to customize this menu\" EXEC \"xterm +tb -e man XWinrc\"\n" " \"Launch xterm\" EXEC xterm\n" - " \"Load .XWinrc\" RELOAD\n" + " SEPARATOR\n" + " FAQ EXEC \"cygstart http://x.cygwin.com/docs/faq/cygwin-x-faq.html\"\n" + " \"User's Guide\" EXEC \"cygstart http://x.cygwin.com/docs/ug/cygwin-x-ug.html\"\n" + " SEPARATOR\n" + " \"Reload .XWinrc\" RELOAD\n" " SEPARATOR\n" "}\n" "\n" "ROOTMENU rmenu\n"; path = "built-in default"; prefFile = fmemopen(defaultPrefs, strlen(defaultPrefs), "r"); + + } if (!prefFile) { @@ -728,15 +830,17 @@ LoadPreferences(void) /* Setup a DISPLAY environment variable, need to allocate on heap */ /* because putenv doesn't copy the argument... */ - snprintf(szDisplay, 512, "DISPLAY=127.0.0.1:%s.0", display); - szEnvDisplay = (char *) (malloc(strlen(szDisplay) + 1)); + winGetDisplayName(szDisplay, 0); + szEnvDisplay = (char *) (malloc(strlen(szDisplay) + strlen("DISPLAY=") + 1)); if (szEnvDisplay) { - strcpy(szEnvDisplay, szDisplay); + snprintf(szEnvDisplay, 512, "DISPLAY=%s", szDisplay); putenv(szEnvDisplay); } + /* Setup XWINLOGFILE environment variable */ + setenv("XWINLOGFILE", g_pszLogFile, TRUE); + /* Replace any "%display%" in menu commands with display string */ - snprintf(szDisplay, 512, "127.0.0.1:%s.0", display); for (i = 0; i < pref.menuItems; i++) { for (j = 0; j < pref.menu[i].menuItems; j++) { if (pref.menu[i].menuItem[j].cmd == CMD_EXEC) { diff --git a/hw/xwin/winprefslex.l b/hw/xwin/winprefslex.l index ba8aea696..f3d988c5b 100644 --- a/hw/xwin/winprefslex.l +++ b/hw/xwin/winprefslex.l @@ -92,6 +92,12 @@ DEBUG { return DEBUGOUTPUT; } RELOAD { return RELOAD; } TRAYICON { return TRAYICON; } SILENTEXIT { return SILENTEXIT; } +DPI { return DPI; } +XKBLAYOUT { return XKBLAYOUT; } +XKBMODEL { return XKBMODEL; } +XKBOPTIONS { return XKBOPTIONS; } +XKBRULES { return XKBRULES; } +XKBVARIANT { return XKBVARIANT; } "{" { return LB; } "}" { return RB; } "\""[^\"\r\n]+"\"" { yylval.sVal = makestr(yytext+1); \ diff --git a/hw/xwin/winprefsyacc.y b/hw/xwin/winprefsyacc.y index 0acf160e4..f71969746 100644 --- a/hw/xwin/winprefsyacc.y +++ b/hw/xwin/winprefsyacc.y @@ -38,6 +38,8 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "globals.h" +#include "winconfig.h" #include "winprefs.h" /* The following give better error messages in bison at the cost of a few KB */ @@ -56,6 +58,13 @@ static MENUPARSED menu; /* Functions for parsing the tokens into out structure */ /* Defined at the end section of this file */ +static void SetDPI (char *dpi); +static void SetXKBLayout (char *layout); +static void SetXKBModel (char *model); +static void SetXKBOptions (char *options); +static void SetXKBRules (char *rules); +static void SetXKBVariant (char *variant); + static void SetIconDirectory (char *path); static void SetDefaultIcon (char *fname); static void SetRootMenu (char *menu); @@ -120,6 +129,12 @@ extern int yylex(void); %token TRAYICON %token FORCEEXIT %token SILENTEXIT +%token DPI +%token XKBLAYOUT +%token XKBMODEL +%token XKBOPTIONS +%token XKBRULES +%token XKBVARIANT %token <sVal> STRING %type <uVal> group1 @@ -154,6 +169,30 @@ command: defaulticon | trayicon | forceexit | silentexit + | dpi + | xkblayout + | xkbmodel + | xkboptions + | xkbrules + | xkbvariant + ; + +dpi: DPI STRING NEWLINE { SetDPI($2); free($2); } + ; + +xkblayout: XKBLAYOUT STRING NEWLINE { SetXKBLayout($2); } + ; + +xkbmodel: XKBMODEL STRING NEWLINE { SetXKBModel($2); } + ; + +xkboptions: XKBOPTIONS STRING NEWLINE { SetXKBOptions($2); } + ; + +xkbrules: XKBRULES STRING NEWLINE { SetXKBRules($2); } + ; + +xkbvariant: XKBVARIANT STRING NEWLINE { SetXKBVariant($2); } ; trayicon: TRAYICON STRING NEWLINE { SetTrayIcon($2); free($2); } @@ -260,6 +299,58 @@ yyerror (char *s) return 1; } +static void +SetDPI (char *dpi) +{ + if (!g_cmdline.customDPI) + monitorResolution = atoi (dpi); +} + +static void +SetXKBLayout (char *layout) +{ + if (!g_cmdline.xkbLayout) + g_cmdline.xkbLayout = layout; + else + free (layout); +} + +static void +SetXKBModel (char *model) +{ + if (!g_cmdline.xkbModel) + g_cmdline.xkbModel = model; + else + free (model); +} + +static void +SetXKBOptions (char *options) +{ + if (!g_cmdline.xkbOptions) + g_cmdline.xkbOptions = options; + else + free (options); +} + +static void +SetXKBRules (char *rules) +{ + if (!g_cmdline.xkbRules) + g_cmdline.xkbRules = rules; + else + free (rules); +} + +static void +SetXKBVariant (char *variant) +{ + if (!g_cmdline.xkbVariant) + g_cmdline.xkbVariant = variant; + else + free (variant); +} + /* Miscellaneous functions to store TOKENs into the structure */ static void SetIconDirectory (char *path) diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c index a5b3c07bf..9684c9678 100644 --- a/hw/xwin/winprocarg.c +++ b/hw/xwin/winprocarg.c @@ -31,6 +31,10 @@ from The Open Group. #include <xwin-config.h> #endif +#ifdef HAVE_SYS_UTSNAME_H +#include <sys/utsname.h> +#endif + #include <../xfree86/common/xorgVersion.h> #include "win.h" #include "winconfig.h" @@ -146,7 +150,7 @@ winInitializeScreenDefaults(void) #endif defaultScreenInfo.fMultipleMonitors = FALSE; defaultScreenInfo.fLessPointer = FALSE; - defaultScreenInfo.iResizeMode = notAllowed; + defaultScreenInfo.iResizeMode = resizeWithRandr; defaultScreenInfo.fNoTrayIcon = FALSE; defaultScreenInfo.iE3BTimeout = WIN_E3B_DEFAULT; defaultScreenInfo.fUseWinKillKey = WIN_DEFAULT_WIN_KILL; @@ -942,6 +946,14 @@ ddxProcessArgument(int argc, char *argv[], int i) } /* + * Look for the '-dpi' argument + */ + if (IS_OPTION("-dpi")) { + g_cmdline.customDPI = TRUE; + return 0; /* Let DIX parse this again */ + } + + /* * Look for the '-config' argument */ if (IS_OPTION("-config") @@ -1078,6 +1090,11 @@ ddxProcessArgument(int argc, char *argv[], int i) return 1; } + if (IS_OPTION("-hostintitle")) { + g_fHostInTitle = TRUE; + return 1; + } + return 0; } @@ -1149,6 +1166,100 @@ winLogCommandLine(int argc, char *argv[]) } /* + * Detect the OS + */ + +typedef BOOL(WINAPI * LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); + +static void +winOS(void) +{ + OSVERSIONINFOEX osvi = { 0 }; + char *windowstype = "Unknown"; + char *prodName = "Unknown"; + char *isWow = "Unknown"; + LPFN_ISWOW64PROCESS fnIsWow64Process; + + /* Get operating system version information */ + osvi.dwOSVersionInfoSize = sizeof(osvi); + GetVersionEx((LPOSVERSIONINFO) & osvi); + + /* Branch on platform ID */ + switch (osvi.dwPlatformId) { + case VER_PLATFORM_WIN32_NT: + windowstype = "Windows NT"; + + if (osvi.dwMajorVersion <= 4) + prodName = "Windows NT"; + else if (osvi.dwMajorVersion == 6) { + if (osvi.dwMinorVersion == 2) { + if (osvi.wProductType == VER_NT_WORKSTATION) + prodName = "Windows 8"; + else + prodName = "Windows Server 2012"; + } + else if (osvi.dwMinorVersion == 1) { + if (osvi.wProductType == VER_NT_WORKSTATION) + prodName = "Windows 7"; + else + prodName = "Windows Server 2008 R2"; + } + else if (osvi.dwMinorVersion == 0) { + if (osvi.wProductType == VER_NT_WORKSTATION) + prodName = "Windows Vista"; + else + prodName = "Windows Server 2008"; + } + } + else if (osvi.dwMajorVersion == 5) { + if (osvi.dwMinorVersion == 2) { + if (GetSystemMetrics(SM_SERVERR2)) + prodName = "Windows Server 2003 R2"; + else + prodName = "Windows Server 2003"; + } + else if (osvi.dwMinorVersion == 1) + prodName = "Windows XP"; + else if (osvi.dwMinorVersion == 0) { + prodName = "Windows 2000"; + break; + } + } + + break; + + case VER_PLATFORM_WIN32_WINDOWS: + windowstype = "Windows"; + break; + } + + /* Check if we are running under WoW64 */ + fnIsWow64Process = + (LPFN_ISWOW64PROCESS) GetProcAddress(GetModuleHandle("kernel32"), + "IsWow64Process"); + if (NULL != fnIsWow64Process) { + wBOOL bIsWow64 = FALSE; + + if (fnIsWow64Process(GetCurrentProcess(), &bIsWow64)) { + isWow = bIsWow64 ? " (WoW64)" : " (Win32)"; + } + else { + /* IsWow64Process() failed */ + isWow = " (WoWUnknown)"; + } + } + else { + /* OS doesn't support IsWow64Process() */ + isWow = ""; + } + + ErrorF("OS: %s %s [%s %ld.%ld build %ld]%s\n", + prodName, osvi.szCSDVersion, + windowstype, osvi.dwMajorVersion, osvi.dwMinorVersion, + osvi.dwBuildNumber, isWow); +} + +/* * winLogVersionInfo - Log version information */ @@ -1165,6 +1276,18 @@ winLogVersionInfo(void) ErrorF("Vendor: %s\n", XVENDORNAME); ErrorF("Release: %d.%d.%d.%d\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP); - ErrorF("%s\n\n", BUILDERSTRING); - ErrorF("Contact: %s\n", BUILDERADDR); +#ifdef HAVE_SYS_UTSNAME_H + { + struct utsname name; + + if (uname(&name) >= 0) { + ErrorF("OS: %s %s %s %s %s\n", name.sysname, name.nodename, + name.release, name.version, name.machine); + } + } +#endif + winOS(); + if (strlen(BUILDERSTRING)) + ErrorF("%s\n", BUILDERSTRING); + ErrorF("\n"); } diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index be25f12af..75bd100e2 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -216,15 +216,19 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv) else winErrorFVerb(2, "winScreenInit - Using software cursor\n"); - /* - Note the screen origin in a normalized coordinate space where (0,0) is at the top left - of the native virtual desktop area - */ - pScreen->x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN); - pScreen->y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN); + if (!noPanoramiXExtension) { + /* + Note the screen origin in a normalized coordinate space where (0,0) is at the top left + of the native virtual desktop area + */ + pScreen->x = + pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN); + pScreen->y = + pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN); - ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n", - pScreen->myNum, pScreen->x, pScreen->y); + ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n", + pScreen->myNum, pScreen->x, pScreen->y); + } #if CYGDEBUG || YES winDebug("winScreenInit - returning\n"); diff --git a/hw/xwin/winshaddd.c b/hw/xwin/winshaddd.c index 4c77cc05c..2dab81a69 100644 --- a/hw/xwin/winshaddd.c +++ b/hw/xwin/winshaddd.c @@ -37,24 +37,6 @@ #include "win.h" /* - * FIXME: Headers are broken, DEFINE_GUID doesn't work correctly, - * so we have to redefine it here. - */ -#ifdef DEFINE_GUID -#undef DEFINE_GUID -#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} -#endif /* DEFINE_GUID */ - -/* - * FIXME: Headers are broken, IID_IDirectDraw2 has to be defined - * here manually. Should be handled by ddraw.h - */ -#ifndef IID_IDirectDraw2 -DEFINE_GUID(IID_IDirectDraw2, 0xB3A6F3E0, 0x2B43, 0x11CF, 0xA2, 0xDE, 0x00, - 0xAA, 0x00, 0xB9, 0x33, 0x56); -#endif /* IID_IDirectDraw2 */ - -/* * Local prototypes */ @@ -569,15 +551,9 @@ winShadowUpdateDD(ScreenPtr pScreen, shadowBufPtr pBuf) BoxPtr pBoxExtents = RegionExtents(damage); /* Compute a GDI region from the damaged region */ - hrgnCombined = CreateRectRgn(pBox->x1, pBox->y1, pBox->x2, pBox->y2); - dwBox--; - pBox++; - while (dwBox--) { - hrgnTemp = CreateRectRgn(pBox->x1, pBox->y1, pBox->x2, pBox->y2); - CombineRgn(hrgnCombined, hrgnCombined, hrgnTemp, RGN_OR); - DeleteObject(hrgnTemp); - pBox++; - } + hrgnCombined = + CreateRectRgn(pBoxExtents->x1, pBoxExtents->y1, pBoxExtents->x2, + pBoxExtents->y2); /* Install the GDI region as a clipping region */ SelectClipRgn(pScreenPriv->hdcScreen, hrgnCombined); diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c index c0879752a..5a6fc8d07 100644 --- a/hw/xwin/winshadddnl.c +++ b/hw/xwin/winshadddnl.c @@ -36,24 +36,6 @@ #endif #include "win.h" -/* - * FIXME: Headers are broken, DEFINE_GUID doesn't work correctly, - * so we have to redefine it here. - */ -#ifdef DEFINE_GUID -#undef DEFINE_GUID -#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} -#endif /* DEFINE_GUID */ - -/* - * FIXME: Headers are broken, IID_IDirectDraw4 has to be defined - * here manually. Should be handled by ddraw.h - */ -#ifndef IID_IDirectDraw4 -DEFINE_GUID(IID_IDirectDraw4, 0x9c59509a, 0x39bd, 0x11d1, 0x8c, 0x4a, 0x00, - 0xc0, 0x4f, 0xd9, 0x30, 0xc5); -#endif /* IID_IDirectDraw4 */ - #define FAIL_MSG_MAX_BLT 10 /* @@ -657,15 +639,9 @@ winShadowUpdateDDNL(ScreenPtr pScreen, shadowBufPtr pBuf) BoxPtr pBoxExtents = RegionExtents(damage); /* Compute a GDI region from the damaged region */ - hrgnCombined = CreateRectRgn(pBox->x1, pBox->y1, pBox->x2, pBox->y2); - dwBox--; - pBox++; - while (dwBox--) { - hrgnTemp = CreateRectRgn(pBox->x1, pBox->y1, pBox->x2, pBox->y2); - CombineRgn(hrgnCombined, hrgnCombined, hrgnTemp, RGN_OR); - DeleteObject(hrgnTemp); - pBox++; - } + hrgnCombined = + CreateRectRgn(pBoxExtents->x1, pBoxExtents->y1, pBoxExtents->x2, + pBoxExtents->y2); /* Install the GDI region as a clipping region */ SelectClipRgn(pScreenPriv->hdcScreen, hrgnCombined); diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c index cdbb46bf2..8309e779d 100644 --- a/hw/xwin/winshadgdi.c +++ b/hw/xwin/winshadgdi.c @@ -500,16 +500,11 @@ winShadowUpdateGDI(ScreenPtr pScreen, shadowBufPtr pBuf) } } else if (!pScreenInfo->fMultiWindow) { + /* Compute a GDI region from the damaged region */ - hrgnCombined = CreateRectRgn(pBox->x1, pBox->y1, pBox->x2, pBox->y2); - dwBox--; - pBox++; - while (dwBox--) { - hrgnTemp = CreateRectRgn(pBox->x1, pBox->y1, pBox->x2, pBox->y2); - CombineRgn(hrgnCombined, hrgnCombined, hrgnTemp, RGN_OR); - DeleteObject(hrgnTemp); - pBox++; - } + hrgnCombined = + CreateRectRgn(pBoxExtents->x1, pBoxExtents->y1, pBoxExtents->x2, + pBoxExtents->y2); /* Install the GDI region as a clipping region */ SelectClipRgn(pScreenPriv->hdcScreen, hrgnCombined); diff --git a/hw/xwin/wintaskbar.c b/hw/xwin/wintaskbar.c new file mode 100644 index 000000000..4c0aace25 --- /dev/null +++ b/hw/xwin/wintaskbar.c @@ -0,0 +1,87 @@ +/* + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +#include <windows.h> + +const GUID CLSID_TaskbarList = {0x56fdf344,0xfd6d,0x11d0,{0x95,0x8a,0x0,0x60,0x97,0xc9,0xa0,0x90}}; +const GUID IID_ITaskbarList = {0x56fdf342,0xfd6d,0x11d0,{0x95,0x8a,0x0,0x60,0x97,0xc9,0xa0,0x90}}; + +#ifdef INTERFACE +#undef INTERFACE +#endif + +#define INTERFACE ITaskbarList +DECLARE_INTERFACE_(ITaskbarList, IUnknown) +{ + /* IUnknown methods */ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE; + STDMETHOD_(ULONG, AddRef) (THIS) PURE; + STDMETHOD_(ULONG, Release) (THIS) PURE; + + /* ITaskbarList methods */ + STDMETHOD(HrInit) (THIS) PURE; + STDMETHOD(AddTab) (THIS_ HWND hWnd) PURE; + STDMETHOD(DeleteTab) (THIS_ HWND hWnd) PURE; + STDMETHOD(ActivateTab) (THIS_ HWND hWnd) PURE; + STDMETHOD(SetActiveAlt) (THIS_ HWND hWnd) PURE; +}; +#undef INTERFACE + +/* + The stuff above needs to be in win32api headers, not defined here, + or at least generated from the MIDL :-) +*/ + +/* + This is unnecessarily heavyweight, we could just call CoInitialize() once at + startup and CoUninitialize() once at shutdown +*/ + +/* + The documentation for ITaskbarList::AddTab says that we are responsible for + deleting the tab ourselves when the window is deleted, but that doesn't actually + seem to be the case +*/ + +void wintaskbar(HWND hWnd, BOOL show) +{ + ITaskbarList* pTaskbarList = NULL; + + if (SUCCEEDED(CoInitialize(NULL))) + { + if (SUCCEEDED(CoCreateInstance((const CLSID *)&CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, (const IID *)&IID_ITaskbarList, (void**)&pTaskbarList))) + { + if (SUCCEEDED(pTaskbarList->lpVtbl->HrInit(pTaskbarList))) + { + if (show) + { + pTaskbarList->lpVtbl->AddTab(pTaskbarList,hWnd); + } + else + { + pTaskbarList->lpVtbl->DeleteTab(pTaskbarList,hWnd); + } + } + pTaskbarList->lpVtbl->Release(pTaskbarList); + } + CoUninitialize(); + } +} diff --git a/hw/xwin/winwakeup.c b/hw/xwin/winwakeup.c index 77c160533..795221a1a 100644 --- a/hw/xwin/winwakeup.c +++ b/hw/xwin/winwakeup.c @@ -43,8 +43,8 @@ winWakeupHandler(ScreenPtr pScreen, { MSG msg; - /* Process all messages on our queue */ - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { + /* Process one message from our queue */ + if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { if ((g_hDlgDepthChange == 0 || !IsDialogMessage(g_hDlgDepthChange, &msg)) && (g_hDlgExit == 0 || !IsDialogMessage(g_hDlgExit, &msg)) diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c index 5bf710209..974309248 100644 --- a/hw/xwin/winwin32rootless.c +++ b/hw/xwin/winwin32rootless.c @@ -263,7 +263,7 @@ winMWExtWMCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, strcat(pszClass, pszWindowID); #if CYGMULTIWINDOW_DEBUG - winDebug("winCreateWindowsWindow - Creating class: %s\n", pszClass); + winDebug("winMWExtWMCreateFrame - Creating class: %s\n", pszClass); #endif /* Setup our window class */ diff --git a/hw/xwin/winwindow.h b/hw/xwin/winwindow.h index a5919ee4d..ed0ea942a 100644 --- a/hw/xwin/winwindow.h +++ b/hw/xwin/winwindow.h @@ -49,6 +49,8 @@ #define WINDOW_TITLE_XDMCP "%s:%s.%d" #define WIN_SCR_PROP "cyg_screen_prop rl" #define WINDOW_CLASS_X "cygwin/x X rl" +#define WINDOW_CLASS_X_CHILD "cygwin/x X child" +#define WINDOW_CLASS_X_MSG "cygwin/x X msg" #define WINDOW_TITLE_X PROJECT_NAME " X" #define WIN_WINDOW_PROP "cyg_window_prop_rl" #ifdef HAS_DEVWINDOWS @@ -119,6 +121,7 @@ typedef struct _winWMMessageRec { #define WM_WM_CHANGE_STATE (WM_USER + 11) #define WM_WM_MAP2 (WM_USER + 12) #define WM_WM_MAP3 (WM_USER + 13) +#define WM_WM_HINTS_EVENT (WM_USER + 14) #define WM_MANAGE (WM_USER + 100) #define WM_UNMANAGE (WM_USER + 102) @@ -157,5 +160,14 @@ void void winMinimizeWindow(Window id); +void + winTaskbarInit(void); + +void + winTaskbarDestroy(void); + +void + winSetAppID(HWND hWnd, const char *AppID); + #endif /* XWIN_MULTIWINDOW */ #endif diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c index fe662b9ba..9aba46b98 100644 --- a/hw/xwin/winwndproc.c +++ b/hw/xwin/winwndproc.c @@ -930,6 +930,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WIN_POLLING_MOUSE_TIMER_ID: { + static POINT last_point; POINT point; WPARAM wL, wM, wR, wShift, wCtrl; LPARAM lPos; @@ -941,8 +942,12 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) point.x -= GetSystemMetrics(SM_XVIRTUALSCREEN); point.y -= GetSystemMetrics(SM_YVIRTUALSCREEN); - /* Deliver absolute cursor position to X Server */ - winEnqueueMotion(point.x, point.y); + /* If the mouse pointer has moved, deliver absolute cursor position to X Server */ + if (last_point.x != point.x || last_point.y != point.y) { + winEnqueueMotion(point.x, point.y); + last_point.x = point.x; + last_point.y = point.y; + } /* Check if a button was released but we didn't see it */ GetCursorPos(&point); @@ -1218,7 +1223,6 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } break; - case WM_ENDSESSION: case WM_GIVEUP: /* Tell X that we are giving up */ #ifdef XWIN_MULTIWINDOW diff --git a/include/os.h b/include/os.h index 9e323f331..5721d46a3 100644 --- a/include/os.h +++ b/include/os.h @@ -113,6 +113,8 @@ extern _X_EXPORT int WriteToClient(ClientPtr /*who */ , int /*count */ , extern _X_EXPORT void ResetOsBuffers(void); +extern _X_EXPORT int TransIsListening(char *protocol); + extern _X_EXPORT void InitConnectionLimits(void); extern _X_EXPORT void NotifyParentProcess(void); diff --git a/man/Xserver.man b/man/Xserver.man index 8d243d6b7..a4020139b 100644 --- a/man/Xserver.man +++ b/man/Xserver.man @@ -130,7 +130,7 @@ causes the server to generate a core dump on fatal errors. .B \-displayfd \fIfd\fP specifies a file descriptor in the launching process. Rather than specify a display number, the X server will attempt to listen on successively higher -display numbers, and upon finding a free one, will write the port number back +display numbers, and upon finding a free one, will write the display number back on this file descriptor as a newline-terminated string. The \-pn option is ignored when using \-displayfd. .TP 8 @@ -563,9 +563,6 @@ Outline font directories .I /tmp/.X11-unix/X\fBn\fP Unix domain socket for display number \fBn\fP .TP 30 -.I /usr/adm/X\fBn\fPmsgs -Error log file for display number \fBn\fP if run from \fIinit\fP(__adminmansuffix__) -.TP 30 .I __projectroot__/lib/X11/xdm/xdm-errors Default error log file if the server is run from \fIxdm\fP(1) .SH "SEE ALSO" diff --git a/os/Makefile.am b/os/Makefile.am index 88914852f..30ce9e1be 100644 --- a/os/Makefile.am +++ b/os/Makefile.am @@ -1,6 +1,6 @@ noinst_LTLIBRARIES = libos.la -AM_CFLAGS = $(DIX_CFLAGS) $(SHA1_CFLAGS) +AM_CFLAGS = $(DIX_CFLAGS) $(SHA1_CFLAGS) -DBINDIR=\"$(bindir)\" SECURERPC_SRCS = rpcauth.c XDMCP_SRCS = xdmcp.c diff --git a/os/backtrace.c b/os/backtrace.c index daac60cf6..76aa6b2f3 100644 --- a/os/backtrace.c +++ b/os/backtrace.c @@ -30,6 +30,12 @@ #include <errno.h> #include <string.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + #ifdef HAVE_BACKTRACE #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -147,9 +153,12 @@ xorg_backtrace_frame(uintptr_t pc, int signo, void *arg) } #endif /* HAVE_WALKCONTEXT */ -#ifdef HAVE_PSTACK +/* + fork/exec a program to create a backtrace + Returns 0 if successful. +*/ static int -xorg_backtrace_pstack(void) +xorg_backtrace_exec_wrapper(const char *path) { pid_t kidpid; int pipefd[2]; @@ -158,7 +167,7 @@ xorg_backtrace_pstack(void) return -1; } - kidpid = fork1(); + kidpid = fork(); if (kidpid == -1) { /* ERROR */ @@ -171,11 +180,13 @@ xorg_backtrace_pstack(void) seteuid(0); close(STDIN_FILENO); close(STDOUT_FILENO); + close(STDERR_FILENO); dup2(pipefd[1], STDOUT_FILENO); - closefrom(STDERR_FILENO); + dup2(pipefd[1], STDERR_FILENO); + close(pipefd[1]); snprintf(parent, sizeof(parent), "%d", getppid()); - execle("/usr/bin/pstack", "pstack", parent, NULL); + execle(path, path, parent, NULL, NULL); exit(1); } else { @@ -194,17 +205,34 @@ xorg_backtrace_pstack(void) btline[bytesread] = 0; ErrorFSigSafe("%s", btline); } - else if ((bytesread < 0) || ((errno != EINTR) && (errno != EAGAIN))) + else if ((bytesread == 0) || + ((errno != EINTR) && (errno != EAGAIN))) done = 1; } close(pipefd[0]); waitpid(kidpid, &kidstat, 0); - if (kidstat != 0) + if (!(WIFEXITED(kidstat) && WEXITSTATUS(kidstat) == 0)) { + ErrorFSigSafe("%s failed with returncode %d\n", path, + WEXITSTATUS(kidstat)); return -1; + } } return 0; } -#endif /* HAVE_PSTACK */ + +#ifdef HAVE_PSTACK +static int +xorg_backtrace_pstack(void) +{ + return xorg_backtrace_exec_wrapper("/usr/bin/pstack"); +} +#endif + +static int +xorg_backtrace_script(void) +{ + return xorg_backtrace_exec_wrapper(BINDIR "/xorg-backtrace"); +} #if defined(HAVE_PSTACK) || defined(HAVE_WALKCONTEXT) @@ -241,7 +269,8 @@ xorg_backtrace(void) void xorg_backtrace(void) { - return; + if (xorg_backtrace_script() == 0) + return; } #endif diff --git a/os/connection.c b/os/connection.c index 721ad65b3..669c25566 100644 --- a/os/connection.c +++ b/os/connection.c @@ -269,6 +269,21 @@ lookup_trans_conn(int fd) return NULL; } +int +TransIsListening(char *protocol) +{ + /* look for this transport in the list of listeners */ + int i; + + for (i = 0; i < ListenTransCount; i++) { + if (!strcmp(protocol, ListenTransConns[i]->transptr->TransName)) { + return 1; + } + } + + return 0; +} + /* Set MaxClients and lastfdesc, and allocate ConnectionTranslation */ void @@ -415,6 +430,7 @@ CreateWellKnownSockets(void) else { /* -displayfd */ Bool found = 0; for (i = 0; i < 65535 - X_TCP_PORT; i++) { + ErrorF("Trying to create socket for display number %d\n", i); if (TryCreateSocket(i, &partial) && !partial) { found = 1; break; @@ -216,6 +216,9 @@ LogInit(const char *fname, const char *backup) free(oldLog); } } + else { + unlink(logFileName); + } if ((logFile = fopen(logFileName, "w")) == NULL) FatalError("Cannot open log file \"%s\"\n", logFileName); setvbuf(logFile, NULL, _IONBF, 0); @@ -763,9 +766,9 @@ FatalError(const char *f, ...) static Bool beenhere = FALSE; if (beenhere) - ErrorF("\nFatalError re-entered, aborting\n"); + ErrorF("FatalError re-entered, aborting\n"); else - ErrorF("\nFatal server error:\n"); + ErrorF("Fatal server error: "); va_start(args, f); @@ -784,7 +787,8 @@ FatalError(const char *f, ...) #endif VErrorF(f, args); va_end(args); - ErrorF("\n"); + if (f[strlen(f) - 1] != '\n') + ErrorF("\n"); if (!beenhere) OsVendorFatalError(f, args2); va_end(args2); diff --git a/os/osinit.c b/os/osinit.c index 2eb1f7a8f..005c6efbe 100644 --- a/os/osinit.c +++ b/os/osinit.c @@ -70,10 +70,6 @@ SOFTWARE. #include <sys/resource.h> #endif -#ifndef ADMPATH -#define ADMPATH "/usr/adm/X%smsgs" -#endif - extern char *display; #ifdef RLIMIT_DATA @@ -85,6 +81,7 @@ int limitStackSpace = -1; #ifdef RLIMIT_NOFILE int limitNoFile = -1; #endif +extern Bool install_os_signal_handler; static OsSigWrapperPtr OsSigWrapper = NULL; @@ -124,8 +121,7 @@ OsSigHandler(int signo) } } - /* log, cleanup, and abort */ - xorg_backtrace(); + ErrorF("Fatal signal received in thread 0x%x\n", pthread_self()); #ifdef SA_SIGINFO if (sip->si_code == SI_USER) { @@ -143,6 +139,9 @@ OsSigHandler(int signo) } #endif + /* log, cleanup, and abort */ + xorg_backtrace(); + FatalError("Caught signal %d (%s). Server aborting\n", signo, strsignal(signo)); } @@ -155,30 +154,33 @@ OsInit(void) char fname[PATH_MAX]; if (!been_here) { - struct sigaction act, oact; - int i; - - int siglist[] = { SIGSEGV, SIGQUIT, SIGILL, SIGFPE, SIGBUS, - SIGSYS, - SIGXCPU, - SIGXFSZ, + if (install_os_signal_handler) { + struct sigaction act, oact; + int i; + + int siglist[] = { SIGSEGV, SIGQUIT, SIGILL, SIGFPE, SIGBUS, + SIGSYS, + SIGXCPU, + SIGXFSZ, #ifdef SIGEMT - SIGEMT, + SIGEMT, #endif - 0 /* must be last */ - }; - sigemptyset(&act.sa_mask); + 0 /* must be last */ + }; + sigemptyset(&act.sa_mask); #ifdef SA_SIGINFO - act.sa_sigaction = OsSigHandler; - act.sa_flags = SA_SIGINFO; + act.sa_sigaction = OsSigHandler; + act.sa_flags = SA_SIGINFO; #else - act.sa_handler = OsSigHandler; - act.sa_flags = 0; + act.sa_handler = OsSigHandler; + act.sa_flags = 0; #endif - for (i = 0; siglist[i] != 0; i++) { - if (sigaction(siglist[i], &act, &oact)) { - ErrorF("failed to install signal handler for signal %d: %s\n", - siglist[i], strerror(errno)); + for (i = 0; siglist[i] != 0; i++) { + if (sigaction(siglist[i], &act, &oact)) { + ErrorF + ("failed to install signal handler for signal %d: %s\n", + siglist[i], strerror(errno)); + } } } #ifdef HAVE_BACKTRACE @@ -207,39 +209,6 @@ OsInit(void) fclose(stdin); fclose(stdout); #endif - /* - * If a write of zero bytes to stderr returns non-zero, i.e. -1, - * then writing to stderr failed, and we'll write somewhere else - * instead. (Apparently this never happens in the Real World.) - */ - if (write(2, fname, 0) == -1) { - FILE *err; - - if (strlen(display) + strlen(ADMPATH) + 1 < sizeof fname) - snprintf(fname, sizeof(fname), ADMPATH, display); - else - strcpy(fname, devnull); - /* - * uses stdio to avoid os dependencies here, - * a real os would use - * open (fname, O_WRONLY|O_APPEND|O_CREAT, 0666) - */ - if (!(err = fopen(fname, "a+"))) - err = fopen(devnull, "w"); - if (err && (fileno(err) != 2)) { - dup2(fileno(err), 2); - fclose(err); - } -#if defined(SYSV) || defined(SVR4) || defined(WIN32) || defined(__CYGWIN__) - { - static char buf[BUFSIZ]; - - setvbuf(stderr, buf, _IOLBF, BUFSIZ); - } -#else - setlinebuf(stderr); -#endif - } if (getpgrp() == 0) setpgid(0, 0); diff --git a/os/utils.c b/os/utils.c index 04bcbc61f..7d81d6945 100644 --- a/os/utils.c +++ b/os/utils.c @@ -121,6 +121,8 @@ __stdcall unsigned long GetTickCount(void); #include "picture.h" +Bool install_os_signal_handler = TRUE; + Bool noTestExtensions; #ifdef COMPOSITE @@ -237,7 +239,7 @@ OsSignal(int sig, OsSigHandlerPtr handler) static Bool StillLocking = FALSE; static char LockFile[PATH_MAX]; -static Bool nolock = FALSE; +Bool nolock = FALSE; /* * LockServer -- @@ -503,6 +505,7 @@ UseMsg(void) #ifdef RLIMIT_STACK ErrorF("-ls int limit stack space to N Kb\n"); #endif + ErrorF("-notrapsignals disable catching of fatal signals\n"); ErrorF("-nolock disable the locking mechanism\n"); ErrorF("-nolisten string don't listen on protocol\n"); ErrorF("-noreset don't reset after last client exists\n"); @@ -744,6 +747,9 @@ ProcessCommandLine(int argc, char *argv[]) UseMsg(); } #endif + else if (strcmp(argv[i], "-notrapsignals") == 0) { + install_os_signal_handler = FALSE; + } else if (strcmp(argv[i], "-nolock") == 0) { #if !defined(WIN32) && !defined(__CYGWIN__) if (getuid() != 0) @@ -879,6 +885,7 @@ ProcessCommandLine(int argc, char *argv[]) } else if (strcmp(argv[i], "-schedInterval") == 0) { if (++i < argc) { + SmartScheduleDisable = FALSE; SmartScheduleInterval = atoi(argv[i]); SmartScheduleSlice = SmartScheduleInterval; } @@ -887,6 +894,7 @@ ProcessCommandLine(int argc, char *argv[]) } else if (strcmp(argv[i], "-schedMax") == 0) { if (++i < argc) { + SmartScheduleDisable = FALSE; SmartScheduleMaxSlice = atoi(argv[i]); } else @@ -1277,6 +1285,26 @@ OsAbort(void) * as well. As it is now, xkbcomp messages don't end up in the log file. */ +#ifdef __CYGWIN__ +#include <process.h> +int +System(const char *command) +{ + int status; + + if (!command) + return 1; + + DebugF("System: `%s'\n", command); + + /* + Use spawnl() rather than execl() to implement System() on cygwin to + avoid fork emulation overhead and brittleness + */ + status = spawnl(_P_WAIT, "/bin/sh", "sh", "-c", command, (char *) NULL); + return status; +} +#else int System(const char *command) { @@ -1318,6 +1346,7 @@ System(const char *command) return p == -1 ? -1 : status; } +#endif static struct pid { struct pid *next; @@ -1629,6 +1658,17 @@ System(const char *cmdline) return dwExitCode; } +#elif defined(__CYGWIN__) +const char* +Win32TempDir(void) +{ + if (getenv("TEMP") != NULL) + return getenv("TEMP"); + else if (getenv("TMP") != NULL) + return getenv("TEMP"); + else + return "/tmp"; +} #endif /* diff --git a/pseudoramiX/Makefile.am b/pseudoramiX/Makefile.am new file mode 100644 index 000000000..17b664b9e --- /dev/null +++ b/pseudoramiX/Makefile.am @@ -0,0 +1,7 @@ +# Fake Xinerama extension + +AM_CFLAGS = $(DIX_CFLAGS) + +noinst_LTLIBRARIES = libPseudoramiX.la + +libPseudoramiX_la_SOURCES = pseudoramiX.c pseudoramiX.h diff --git a/hw/xquartz/pseudoramiX.c b/pseudoramiX/pseudoramiX.c index 23dbc7328..23dbc7328 100644 --- a/hw/xquartz/pseudoramiX.c +++ b/pseudoramiX/pseudoramiX.c diff --git a/hw/xquartz/pseudoramiX.h b/pseudoramiX/pseudoramiX.h index f063919dd..f063919dd 100644 --- a/hw/xquartz/pseudoramiX.h +++ b/pseudoramiX/pseudoramiX.h diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c index 76d728c70..128459850 100644 --- a/randr/rrxinerama.c +++ b/randr/rrxinerama.c @@ -84,6 +84,8 @@ static int ProcRRXineramaIsActive(ClientPtr client); static int ProcRRXineramaQueryScreens(ClientPtr client); static int SProcRRXineramaDispatch(ClientPtr client); +Bool noRRXineramaExtension = FALSE; + /* Proc */ int @@ -480,6 +482,9 @@ RRXineramaExtensionInit(void) return; #endif + if (noRRXineramaExtension) + return; + /* * Xinerama isn't capable enough to have multiple protocol screens each * with their own output geometry. So if there's more than one protocol diff --git a/xkb/ddxList.c b/xkb/ddxList.c index 79f46379c..7df54ef0b 100644 --- a/xkb/ddxList.c +++ b/xkb/ddxList.c @@ -53,6 +53,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define W32_tmplen 0 #endif +#if defined(WIN32) +#define PATHSEPARATOR "\\" +#else +#define PATHSEPARATOR "/" +#endif + /***====================================================================***/ static const char *componentDirs[_XkbListNumComponents] = { @@ -120,7 +126,7 @@ XkbDDXListComponent(DeviceIntPtr dev, Status status; Bool haveDir; -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) char tmpname[PATH_MAX]; #else int rval; @@ -143,9 +149,9 @@ XkbDDXListComponent(DeviceIntPtr dev, in = NULL; haveDir = TRUE; -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) strcpy(tmpname, Win32TempDir()); - strcat(tmpname, "\\xkb_XXXXXX"); + strcat(tmpname, PATHSEPARATOR "xkb_XXXXXX"); (void) mktemp(tmpname); #endif if (XkbBaseDirectory != NULL) { @@ -191,7 +197,7 @@ XkbDDXListComponent(DeviceIntPtr dev, } status = Success; if (!haveDir) { -#ifndef WIN32 +#if !defined(WIN32) && !defined(__CYGWIN__) in = Popen(buf, "r"); #else if (xkbDebugFlags) @@ -204,7 +210,7 @@ XkbDDXListComponent(DeviceIntPtr dev, } if (!in) { free(buf); -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) unlink(tmpname); #endif return BadImplementation; @@ -214,7 +220,7 @@ XkbDDXListComponent(DeviceIntPtr dev, buf = malloc(PATH_MAX * sizeof(char)); if (!buf) { fclose(in); -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) unlink(tmpname); #endif return BadAlloc; @@ -268,7 +274,7 @@ XkbDDXListComponent(DeviceIntPtr dev, } status = _AddListComponent(list, what, flags, tmp, client); } -#ifndef WIN32 +#if !defined(WIN32) && !defined(__CYGWIN__) if (haveDir) fclose(in); else if ((rval = Pclose(in)) != 0) { diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index d462957f4..2d00a3430 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -104,7 +104,7 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb, const char *xkbbindir = emptystring; const char *xkbbindirsep = emptystring; -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) /* WIN32 has no popen. The input must be stored in a file which is used as input for xkbcomp. xkbcomp does not read from stdin. */ char tmpname[PATH_MAX]; @@ -117,9 +117,9 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb, OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir)); -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) strcpy(tmpname, Win32TempDir()); - strcat(tmpname, "\\xkb_XXXXXX"); + strcat(tmpname, PATHSEPARATOR "xkb_XXXXXX"); (void) mktemp(tmpname); #endif @@ -158,7 +158,7 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb, return FALSE; } -#ifndef WIN32 +#if !defined(WIN32) && !defined(__CYGWIN__) out = Popen(buf, "w"); #else out = fopen(tmpname, "w"); @@ -172,7 +172,7 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb, } #endif XkbWriteXKBKeymapForNames(out, names, xkb, want, need); -#ifndef WIN32 +#if !defined(WIN32) && !defined(__CYGWIN__) if (Pclose(out) == 0) #else if (fclose(out) == 0 && System(buf) >= 0) @@ -184,14 +184,14 @@ XkbDDXCompileKeymapByNames(XkbDescPtr xkb, strlcpy(nameRtrn, keymap, nameRtrnLen); } free(buf); -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) unlink(tmpname); #endif return TRUE; } else LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap); -#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__) /* remove the temporary file */ unlink(tmpname); #endif |