Module: wine
Branch: master
Commit: cb4fecc208d4278323d5ffb6cbbd81359affb215
URL: https://gitlab.winehq.org/wine/wine/-/commit/cb4fecc208d4278323d5ffb6cbbd81…
Author: Rémi Bernon <rbernon(a)codeweavers.com>
Date: Mon Nov 7 16:24:08 2022 +0100
opengl32: Split opengl_ext.h into private.h and unix_private.h.
---
dlls/opengl32/make_opengl | 8 +++----
dlls/opengl32/opengl_ext.h | 54 --------------------------------------------
dlls/opengl32/private.h | 35 ++++++++++++++++++++++++++++
dlls/opengl32/thunks.c | 3 +--
dlls/opengl32/unix_private.h | 53 +++++++++++++++++++++++++++++++++++++++++++
dlls/opengl32/unix_thunks.c | 3 +--
dlls/opengl32/unix_wgl.c | 3 +--
dlls/opengl32/wgl.c | 5 ++--
8 files changed, 98 insertions(+), 66 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl
index 8722b4d786a..3b67d3d9f61 100755
--- a/dlls/opengl32/make_opengl
+++ b/dlls/opengl32/make_opengl
@@ -868,8 +868,8 @@ print OUT "#include \"windef.h\"\n";
print OUT "#include \"winbase.h\"\n";
print OUT "#include \"wingdi.h\"\n\n";
-print OUT "#include \"unixlib.h\"\n\n";
-print OUT "#include \"opengl_ext.h\"\n\n";
+print OUT "#include \"unixlib.h\"\n";
+print OUT "#include \"private.h\"\n\n";
print OUT "#include \"wine/debug.h\"\n\n";
print OUT "WINE_DEFAULT_DEBUG_CHANNEL(opengl);\n";
@@ -926,8 +926,8 @@ print OUT "#include \"windef.h\"\n";
print OUT "#include \"winbase.h\"\n";
print OUT "#include \"wingdi.h\"\n\n";
-print OUT "#include \"unixlib.h\"\n\n";
-print OUT "#include \"opengl_ext.h\"\n\n";
+print OUT "#include \"unixlib.h\"\n";
+print OUT "#include \"unix_private.h\"\n\n";
foreach (sort keys %wgl_functions)
{
diff --git a/dlls/opengl32/opengl_ext.h b/dlls/opengl32/opengl_ext.h
deleted file mode 100644
index 9cffc5a06f7..00000000000
--- a/dlls/opengl32/opengl_ext.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Typedefs for extensions loading
-
- Copyright (c) 2000 Lionel Ulmer
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU Lesser General Public
-* License as published by the Free Software Foundation; either
-* version 2.1 of the License, or (at your option) any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this library; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-*/
-#ifndef __DLLS_OPENGL32_OPENGL_EXT_H
-#define __DLLS_OPENGL32_OPENGL_EXT_H
-
-#include <stdarg.h>
-#include <stddef.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winternl.h"
-#include "wingdi.h"
-
-#include "wine/wgl.h"
-#include "wine/wgl_driver.h"
-
-struct registry_entry
-{
- const char *name; /* name of the extension */
- const char *extension; /* name of the GL/WGL extension */
-};
-
-extern const struct registry_entry extension_registry[] DECLSPEC_HIDDEN;
-extern const int extension_registry_size DECLSPEC_HIDDEN;
-extern const void *extension_procs[] DECLSPEC_HIDDEN;
-extern struct opengl_funcs null_opengl_funcs DECLSPEC_HIDDEN;
-
-static inline struct opengl_funcs *get_dc_funcs( HDC hdc )
-{
- struct opengl_funcs *funcs = __wine_get_wgl_driver( hdc, WINE_WGL_DRIVER_VERSION );
- if (!funcs) SetLastError( ERROR_INVALID_HANDLE );
- else if (funcs == (void *)-1) funcs = &null_opengl_funcs;
- return funcs;
-}
-
-extern int WINAPI wglDescribePixelFormat( HDC hdc, int ipfd, UINT cjpfd, PIXELFORMATDESCRIPTOR *ppfd );
-
-#endif /* __DLLS_OPENGL32_OPENGL_EXT_H */
diff --git a/dlls/opengl32/private.h b/dlls/opengl32/private.h
new file mode 100644
index 00000000000..06a97b43987
--- /dev/null
+++ b/dlls/opengl32/private.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2000 Lionel Ulmer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+#ifndef __WINE_OPENGL32_PRIVATE_H
+#define __WINE_OPENGL32_PRIVATE_H
+
+#include <stdarg.h>
+#include <stddef.h>
+
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#include "winternl.h"
+#include "wingdi.h"
+
+extern const void *extension_procs[] DECLSPEC_HIDDEN;
+
+extern int WINAPI wglDescribePixelFormat( HDC hdc, int ipfd, UINT cjpfd, PIXELFORMATDESCRIPTOR *ppfd );
+
+#endif /* __WINE_OPENGL32_PRIVATE_H */
diff --git a/dlls/opengl32/thunks.c b/dlls/opengl32/thunks.c
index fd2ad53dcf9..aad9330a108 100644
--- a/dlls/opengl32/thunks.c
+++ b/dlls/opengl32/thunks.c
@@ -10,8 +10,7 @@
#include "wingdi.h"
#include "unixlib.h"
-
-#include "opengl_ext.h"
+#include "private.h"
#include "wine/debug.h"
diff --git a/dlls/opengl32/unix_private.h b/dlls/opengl32/unix_private.h
new file mode 100644
index 00000000000..eb8adf00090
--- /dev/null
+++ b/dlls/opengl32/unix_private.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2000 Lionel Ulmer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+#ifndef __WINE_OPENGL32_UNIX_PRIVATE_H
+#define __WINE_OPENGL32_UNIX_PRIVATE_H
+
+#include <stdarg.h>
+#include <stddef.h>
+
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#include "winternl.h"
+#include "wingdi.h"
+
+#include "wine/wgl.h"
+#include "wine/wgl_driver.h"
+
+struct registry_entry
+{
+ const char *name; /* name of the extension */
+ const char *extension; /* name of the GL/WGL extension */
+};
+
+extern const struct registry_entry extension_registry[] DECLSPEC_HIDDEN;
+extern const int extension_registry_size DECLSPEC_HIDDEN;
+
+extern struct opengl_funcs null_opengl_funcs DECLSPEC_HIDDEN;
+
+static inline struct opengl_funcs *get_dc_funcs( HDC hdc )
+{
+ struct opengl_funcs *funcs = __wine_get_wgl_driver( hdc, WINE_WGL_DRIVER_VERSION );
+ if (!funcs) SetLastError( ERROR_INVALID_HANDLE );
+ else if (funcs == (void *)-1) funcs = &null_opengl_funcs;
+ return funcs;
+}
+
+#endif /* __WINE_OPENGL32_UNIX_PRIVATE_H */
diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c
index 515a765f0a7..1be25db9a5f 100644
--- a/dlls/opengl32/unix_thunks.c
+++ b/dlls/opengl32/unix_thunks.c
@@ -10,8 +10,7 @@
#include "wingdi.h"
#include "unixlib.h"
-
-#include "opengl_ext.h"
+#include "unix_private.h"
extern NTSTATUS wgl_wglCopyContext( void *args ) DECLSPEC_HIDDEN;
extern NTSTATUS wgl_wglCreateContext( void *args ) DECLSPEC_HIDDEN;
diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c
index 8f3fa70556e..cb09fa5993a 100644
--- a/dlls/opengl32/unix_wgl.c
+++ b/dlls/opengl32/unix_wgl.c
@@ -30,9 +30,8 @@
#include "winreg.h"
#include "ntuser.h"
-#include "opengl_ext.h"
-
#include "unixlib.h"
+#include "unix_private.h"
#include "wine/debug.h"
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 8a648318a42..76ce3437a97 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -31,9 +31,8 @@
#include "winreg.h"
#include "ntuser.h"
-#include "opengl_ext.h"
-
#include "unixlib.h"
+#include "private.h"
#include "wine/glu.h"
#include "wine/debug.h"
@@ -866,6 +865,8 @@ static BOOL WINAPI call_opengl_debug_message_callback( struct wine_gl_debug_mess
return TRUE;
}
+extern struct opengl_funcs null_opengl_funcs DECLSPEC_HIDDEN;
+
/***********************************************************************
* OpenGL initialisation routine
*/