internal/cglfw: rename files

Updates #2703
This commit is contained in:
Hajime Hoshi 2023-10-07 16:36:55 +09:00
parent 82f2319020
commit a971e32ec1
36 changed files with 47 additions and 47 deletions

View File

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2009-2019 Camilla Löwy <elmindreda@glfw.org> // SPDX-FileCopyrightText: 2009-2019 Camilla Löwy <elmindreda@glfw.org>
// SPDX-FileCopyrightText: 2023 The Ebitengine Authors // SPDX-FileCopyrightText: 2023 The Ebitengine Authors
#include "internal.h" #include "internal_unix.h"
#include <sys/param.h> // For MAXPATHLEN #include <sys/param.h> // For MAXPATHLEN
// Needed for _NSGetProgname // Needed for _NSGetProgname

View File

@ -3,7 +3,7 @@
// SPDX-FileCopyrightText: 2006-2019 Camilla Löwy <elmindreda@glfw.org> // SPDX-FileCopyrightText: 2006-2019 Camilla Löwy <elmindreda@glfw.org>
// SPDX-FileCopyrightText: 2023 The Ebitengine Authors // SPDX-FileCopyrightText: 2023 The Ebitengine Authors
#include "internal.h" #include "internal_unix.h"
#include <stdlib.h> #include <stdlib.h>
#include <limits.h> #include <limits.h>

View File

@ -51,10 +51,10 @@ typedef void* id;
#define NSPasteboardTypeURL NSURLPboardType #define NSPasteboardTypeURL NSURLPboardType
#endif #endif
#include "posix_thread.h" #include "posix_thread_unix.h"
#include "nsgl_context_darwin.h" #include "nsgl_context_darwin.h"
#include "egl_context.h" #include "egl_context_unix.h"
#include "osmesa_context.h" #include "osmesa_context_unix.h"
#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL) #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)
#define _glfw_dlclose(handle) dlclose(handle) #define _glfw_dlclose(handle) dlclose(handle)

View File

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2009-2016 Camilla Löwy <elmindreda@glfw.org> // SPDX-FileCopyrightText: 2009-2016 Camilla Löwy <elmindreda@glfw.org>
// SPDX-FileCopyrightText: 2023 The Ebitengine Authors // SPDX-FileCopyrightText: 2023 The Ebitengine Authors
#include "internal.h" #include "internal_unix.h"
#include <mach/mach_time.h> #include <mach/mach_time.h>

View File

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2009-2019 Camilla Löwy <elmindreda@glfw.org> // SPDX-FileCopyrightText: 2009-2019 Camilla Löwy <elmindreda@glfw.org>
// SPDX-FileCopyrightText: 2023 The Ebitengine Authors // SPDX-FileCopyrightText: 2023 The Ebitengine Authors
#include "internal.h" #include "internal_unix.h"
#include <float.h> #include <float.h>
#include <string.h> #include <string.h>

View File

@ -5,7 +5,7 @@
//go:build darwin || freebsd || linux || netbsd || openbsd //go:build darwin || freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>

View File

@ -8,7 +8,7 @@ package cglfw
//#include <stdlib.h> //#include <stdlib.h>
//#define GLFW_INCLUDE_NONE //#define GLFW_INCLUDE_NONE
//#include "glfw3.h" //#include "glfw3_unix.h"
import "C" import "C"
import ( import (

View File

@ -5,7 +5,7 @@
//go:build darwin || freebsd || linux || netbsd || openbsd //go:build darwin || freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@ -7,7 +7,7 @@
package cglfw package cglfw
// #define GLFW_INCLUDE_NONE // #define GLFW_INCLUDE_NONE
// #include "glfw3.h" // #include "glfw3_unix.h"
// //
// void goErrorCB(int code, char* desc); // void goErrorCB(int code, char* desc);
// //

View File

@ -38,7 +38,7 @@ extern "C" {
* Doxygen documentation * Doxygen documentation
*************************************************************************/ *************************************************************************/
/*! @file glfw3.h /*! @file glfw3_unix.h
* @brief The header of the GLFW 3 API. * @brief The header of the GLFW 3 API.
* *
* This is the header file of the GLFW 3 API. It defines all its types and * This is the header file of the GLFW 3 API. It defines all its types and

View File

@ -38,7 +38,7 @@ extern "C" {
* Doxygen documentation * Doxygen documentation
*************************************************************************/ *************************************************************************/
/*! @file glfw3native.h /*! @file glfw3native_unix.h
* @brief The header of the native access functions. * @brief The header of the native access functions.
* *
* This is the header file of the native access functions. See @ref native for * This is the header file of the native access functions. See @ref native for
@ -51,7 +51,7 @@ extern "C" {
* doing and how to fix problems caused by using them. If you don't, you * doing and how to fix problems caused by using them. If you don't, you
* shouldn't be using them.** * shouldn't be using them.**
* *
* Before the inclusion of @ref glfw3native.h, you may define zero or more * Before the inclusion of @ref glfw3native_unix.h, you may define zero or more
* window system API macro and zero or more context creation API macros. * window system API macro and zero or more context creation API macros.
* *
* The chosen backends must match those the library was compiled for. Failure * The chosen backends must match those the library was compiled for. Failure
@ -75,13 +75,13 @@ extern "C" {
* defined. * defined.
* *
* If you do not want the platform-specific headers to be included, define * If you do not want the platform-specific headers to be included, define
* `GLFW_NATIVE_INCLUDE_NONE` before including the @ref glfw3native.h header. * `GLFW_NATIVE_INCLUDE_NONE` before including the @ref glfw3native_unix.h header.
* *
* @code * @code
* #define GLFW_EXPOSE_NATIVE_WIN32 * #define GLFW_EXPOSE_NATIVE_WIN32
* #define GLFW_EXPOSE_NATIVE_WGL * #define GLFW_EXPOSE_NATIVE_WGL
* #define GLFW_NATIVE_INCLUDE_NONE * #define GLFW_NATIVE_INCLUDE_NONE
* #include <GLFW/glfw3native.h> * #include <GLFW/glfw3native_unix.h>
* @endcode * @endcode
*/ */
@ -108,7 +108,7 @@ extern "C" {
/* NSGL is declared by Cocoa.h */ /* NSGL is declared by Cocoa.h */
#endif #endif
#if defined(GLFW_EXPOSE_NATIVE_GLX) #if defined(GLFW_EXPOSE_NATIVE_GLX)
/* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by /* This is a workaround for the fact that glfw3_unix.h defines GLAPIENTRY because by
* default it also acts as an OpenGL header * default it also acts as an OpenGL header
* However, glx.h will include gl.h, which will define it unconditionally * However, glx.h will include gl.h, which will define it unconditionally
*/ */
@ -122,7 +122,7 @@ extern "C" {
#include <EGL/egl.h> #include <EGL/egl.h>
#endif #endif
#if defined(GLFW_EXPOSE_NATIVE_OSMESA) #if defined(GLFW_EXPOSE_NATIVE_OSMESA)
/* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by /* This is a workaround for the fact that glfw3_unix.h defines GLAPIENTRY because by
* default it also acts as an OpenGL header * default it also acts as an OpenGL header
* However, osmesa.h will include gl.h, which will define it unconditionally * However, osmesa.h will include gl.h, which will define it unconditionally
*/ */

View File

@ -8,7 +8,7 @@ package cglfw
//#include <stdlib.h> //#include <stdlib.h>
//#define GLFW_INCLUDE_NONE //#define GLFW_INCLUDE_NONE
//#include "glfw3.h" //#include "glfw3_unix.h"
import "C" import "C"
import "unsafe" import "unsafe"

View File

@ -5,7 +5,7 @@
//go:build freebsd || linux || netbsd || openbsd //go:build freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -5,7 +5,7 @@
//go:build darwin || freebsd || linux || netbsd || openbsd //go:build darwin || freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -5,7 +5,7 @@
//go:build darwin || freebsd || linux || netbsd || openbsd //go:build darwin || freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
#include <assert.h> #include <assert.h>
#include <float.h> #include <float.h>

View File

@ -8,7 +8,7 @@ package cglfw
// #include <stdlib.h> // #include <stdlib.h>
// #define GLFW_INCLUDE_NONE // #define GLFW_INCLUDE_NONE
// #include "glfw3.h" // #include "glfw3_unix.h"
// //
// void goKeyCB(void* window, int key, int scancode, int action, int mods); // void goKeyCB(void* window, int key, int scancode, int action, int mods);
// void goCharCB(void* window, unsigned int character); // void goCharCB(void* window, unsigned int character);

View File

@ -25,7 +25,7 @@
#endif #endif
#define GLFW_INCLUDE_NONE #define GLFW_INCLUDE_NONE
#include "glfw3.h" #include "glfw3_unix.h"
#define _GLFW_INSERT_FIRST 0 #define _GLFW_INSERT_FIRST 0
#define _GLFW_INSERT_LAST 1 #define _GLFW_INSERT_LAST 1
@ -259,9 +259,9 @@ struct _GLFWcontext
// This is defined in the context API's context.h // This is defined in the context API's context.h
_GLFW_PLATFORM_CONTEXT_STATE; _GLFW_PLATFORM_CONTEXT_STATE;
// This is defined in egl_context.h // This is defined in egl_context_unix.h
_GLFW_EGL_CONTEXT_STATE; _GLFW_EGL_CONTEXT_STATE;
// This is defined in osmesa_context.h // This is defined in osmesa_context_unix.h
_GLFW_OSMESA_CONTEXT_STATE; _GLFW_OSMESA_CONTEXT_STATE;
}; };
@ -414,9 +414,9 @@ struct _GLFWlibrary
_GLFW_PLATFORM_LIBRARY_WINDOW_STATE; _GLFW_PLATFORM_LIBRARY_WINDOW_STATE;
// This is defined in the context API's context.h // This is defined in the context API's context.h
_GLFW_PLATFORM_LIBRARY_CONTEXT_STATE; _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE;
// This is defined in egl_context.h // This is defined in egl_context_unix.h
_GLFW_EGL_LIBRARY_CONTEXT_STATE; _GLFW_EGL_LIBRARY_CONTEXT_STATE;
// This is defined in osmesa_context.h // This is defined in osmesa_context_unix.h
_GLFW_OSMESA_LIBRARY_CONTEXT_STATE; _GLFW_OSMESA_LIBRARY_CONTEXT_STATE;
}; };

View File

@ -5,7 +5,7 @@
//go:build darwin || freebsd || linux || netbsd || openbsd //go:build darwin || freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
#include <assert.h> #include <assert.h>
#include <math.h> #include <math.h>

View File

@ -7,7 +7,7 @@
package cglfw package cglfw
// #define GLFW_INCLUDE_NONE // #define GLFW_INCLUDE_NONE
// #include "glfw3.h" // #include "glfw3_unix.h"
// //
// void goMonitorCB(void* monitor, int event); // void goMonitorCB(void* monitor, int event);
// //

View File

@ -7,8 +7,8 @@ package cglfw
/* /*
#define GLFW_EXPOSE_NATIVE_COCOA #define GLFW_EXPOSE_NATIVE_COCOA
#define GLFW_EXPOSE_NATIVE_NSGL #define GLFW_EXPOSE_NATIVE_NSGL
#include "glfw3.h" #include "glfw3_unix.h"
#include "glfw3native.h" #include "glfw3native_unix.h"
// workaround wrappers needed due to a cgo and/or LLVM bug. // workaround wrappers needed due to a cgo and/or LLVM bug.
// See: https://github.com/go-gl/glfw/issues/136 // See: https://github.com/go-gl/glfw/issues/136

View File

@ -10,8 +10,8 @@ package cglfw
//#define GLFW_EXPOSE_NATIVE_X11 //#define GLFW_EXPOSE_NATIVE_X11
//#define GLFW_EXPOSE_NATIVE_GLX //#define GLFW_EXPOSE_NATIVE_GLX
//#define GLFW_INCLUDE_NONE //#define GLFW_INCLUDE_NONE
//#include "glfw3.h" //#include "glfw3_unix.h"
//#include "glfw3native.h" //#include "glfw3native_unix.h"
import "C" import "C"
import "unsafe" import "unsafe"

View File

@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2009-2019 Camilla Löwy <elmindreda@glfw.org> // SPDX-FileCopyrightText: 2009-2019 Camilla Löwy <elmindreda@glfw.org>
// SPDX-FileCopyrightText: 2023 The Ebitengine Authors // SPDX-FileCopyrightText: 2023 The Ebitengine Authors
#include "internal.h" #include "internal_unix.h"
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>

View File

@ -9,7 +9,7 @@
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include "internal.h" #include "internal_unix.h"
static void makeContextCurrentOSMesa(_GLFWwindow* window) static void makeContextCurrentOSMesa(_GLFWwindow* window)

View File

@ -5,7 +5,7 @@
//go:build darwin || freebsd || linux || netbsd || openbsd //go:build darwin || freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>

View File

@ -5,7 +5,7 @@
//go:build freebsd || linux || netbsd || openbsd //go:build freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
#include <sys/time.h> #include <sys/time.h>
#include <time.h> #include <time.h>

View File

@ -6,7 +6,7 @@
//go:build darwin || freebsd || linux || netbsd || openbsd //go:build darwin || freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>

View File

@ -8,7 +8,7 @@ package cglfw
// #include <stdlib.h> // #include <stdlib.h>
// #define GLFW_INCLUDE_NONE // #define GLFW_INCLUDE_NONE
// #include "glfw3.h" // #include "glfw3_unix.h"
// //
// void goWindowPosCB(void* window, int xpos, int ypos); // void goWindowPosCB(void* window, int xpos, int ypos);
// void goWindowSizeCB(void* window, int width, int height); // void goWindowSizeCB(void* window, int width, int height);

View File

@ -9,7 +9,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
#include "internal.h" #include "internal_unix.h"
#include <X11/Xresource.h> #include <X11/Xresource.h>

View File

@ -5,7 +5,7 @@
//go:build freebsd || linux || netbsd || openbsd //go:build freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
#include <limits.h> #include <limits.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -122,12 +122,12 @@ typedef void (* PFN_XShapeCombineMask)(Display*,Window,int,int,int,Pixmap,int);
#define XShapeCombineRegion _glfw.x11.xshape.ShapeCombineRegion #define XShapeCombineRegion _glfw.x11.xshape.ShapeCombineRegion
#define XShapeCombineMask _glfw.x11.xshape.ShapeCombineMask #define XShapeCombineMask _glfw.x11.xshape.ShapeCombineMask
#include "posix_thread.h" #include "posix_thread_unix.h"
#include "posix_time_linbsd.h" #include "posix_time_linbsd.h"
#include "xkb_unicode_linbsd.h" #include "xkb_unicode_linbsd.h"
#include "glx_context_linbsd.h" #include "glx_context_linbsd.h"
#include "egl_context.h" #include "egl_context_unix.h"
#include "osmesa_context.h" #include "osmesa_context_unix.h"
#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL) #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)
#define _glfw_dlclose(handle) dlclose(handle) #define _glfw_dlclose(handle) dlclose(handle)

View File

@ -9,7 +9,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
#include "internal.h" #include "internal_unix.h"
#include <X11/cursorfont.h> #include <X11/cursorfont.h>
#include <X11/Xmd.h> #include <X11/Xmd.h>

View File

@ -5,7 +5,7 @@
//go:build freebsd || linux || netbsd || openbsd //go:build freebsd || linux || netbsd || openbsd
#include "internal.h" #include "internal_unix.h"
/* /*