mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-18 22:10:09 +01:00
internal/glfw: remove unused functions
This commit is contained in:
parent
ea93969845
commit
947c87baae
@ -561,13 +561,3 @@ void _glfwPlatformTerminate(void)
|
|||||||
|
|
||||||
} // autoreleasepool
|
} // autoreleasepool
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* _glfwPlatformGetVersionString(void)
|
|
||||||
{
|
|
||||||
return _GLFW_VERSION_NUMBER " Cocoa NSGL EGL OSMesa"
|
|
||||||
#if defined(_GLFW_BUILD_DLL)
|
|
||||||
" dynamic"
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -16,13 +16,6 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Version constants.
|
|
||||||
const (
|
|
||||||
VersionMajor = C.GLFW_VERSION_MAJOR // This is incremented when the API is changed in non-compatible ways.
|
|
||||||
VersionMinor = C.GLFW_VERSION_MINOR // This is incremented when features are added to the API but it remains backward-compatible.
|
|
||||||
VersionRevision = C.GLFW_VERSION_REVISION // This is incremented when a bug fix release is made that does not contain any API changes.
|
|
||||||
)
|
|
||||||
|
|
||||||
// Init initializes the GLFW library. Before most GLFW functions can be used,
|
// Init initializes the GLFW library. Before most GLFW functions can be used,
|
||||||
// GLFW must be initialized, and before a program terminates GLFW should be
|
// GLFW must be initialized, and before a program terminates GLFW should be
|
||||||
// terminated in order to free any resources allocated during or after
|
// terminated in order to free any resources allocated during or after
|
||||||
@ -83,32 +76,6 @@ func InitHint(hint Hint, value int) {
|
|||||||
C.glfwInitHint(C.int(hint), C.int(value))
|
C.glfwInitHint(C.int(hint), C.int(value))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetVersion retrieves the major, minor and revision numbers of the GLFW
|
|
||||||
// library. It is intended for when you are using GLFW as a shared library and
|
|
||||||
// want to ensure that you are using the minimum required version.
|
|
||||||
//
|
|
||||||
// This function may be called before Init.
|
|
||||||
func GetVersion() (major, minor, revision int) {
|
|
||||||
var (
|
|
||||||
maj C.int
|
|
||||||
min C.int
|
|
||||||
rev C.int
|
|
||||||
)
|
|
||||||
|
|
||||||
C.glfwGetVersion(&maj, &min, &rev)
|
|
||||||
return int(maj), int(min), int(rev)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetVersionString returns a static string generated at compile-time according
|
|
||||||
// to which configuration macros were defined. This is intended for use when
|
|
||||||
// submitting bug reports, to allow developers to see which code paths are
|
|
||||||
// enabled in a binary.
|
|
||||||
//
|
|
||||||
// This function may be called before Init.
|
|
||||||
func GetVersionString() string {
|
|
||||||
return C.GoString(C.glfwGetVersionString())
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetClipboardString returns the contents of the system clipboard, if it
|
// GetClipboardString returns the contents of the system clipboard, if it
|
||||||
// contains or is convertible to a UTF-8 encoded string.
|
// contains or is convertible to a UTF-8 encoded string.
|
||||||
//
|
//
|
||||||
|
@ -340,21 +340,6 @@ GLFWAPI void glfwInitHint(int hint, int value)
|
|||||||
"Invalid init hint 0x%08X", hint);
|
"Invalid init hint 0x%08X", hint);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLFWAPI void glfwGetVersion(int* major, int* minor, int* rev)
|
|
||||||
{
|
|
||||||
if (major != NULL)
|
|
||||||
*major = GLFW_VERSION_MAJOR;
|
|
||||||
if (minor != NULL)
|
|
||||||
*minor = GLFW_VERSION_MINOR;
|
|
||||||
if (rev != NULL)
|
|
||||||
*rev = GLFW_VERSION_REVISION;
|
|
||||||
}
|
|
||||||
|
|
||||||
GLFWAPI const char* glfwGetVersionString(void)
|
|
||||||
{
|
|
||||||
return _glfwPlatformGetVersionString();
|
|
||||||
}
|
|
||||||
|
|
||||||
GLFWAPI int glfwGetError(const char** description)
|
GLFWAPI int glfwGetError(const char** description)
|
||||||
{
|
{
|
||||||
_GLFWerror* error;
|
_GLFWerror* error;
|
||||||
|
@ -1264,21 +1264,3 @@ void _glfwPlatformTerminate(void)
|
|||||||
close(_glfw.x11.emptyEventPipe[1]);
|
close(_glfw.x11.emptyEventPipe[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* _glfwPlatformGetVersionString(void)
|
|
||||||
{
|
|
||||||
return _GLFW_VERSION_NUMBER " X11 GLX EGL OSMesa"
|
|
||||||
#if defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK)
|
|
||||||
" clock_gettime"
|
|
||||||
#else
|
|
||||||
" gettimeofday"
|
|
||||||
#endif
|
|
||||||
#if defined(__linux__)
|
|
||||||
" evdev"
|
|
||||||
#endif
|
|
||||||
#if defined(_GLFW_BUILD_DLL)
|
|
||||||
" shared"
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user