Use designated initializers for platform structs

This should make platform struct initializers slightly more resistant to
merge mistakes.
This commit is contained in:
Camilla Löwy 2024-01-11 22:26:19 +01:00
parent bbf661ca38
commit 7e2470d343
5 changed files with 370 additions and 370 deletions

View File

@ -495,78 +495,78 @@ GLFWbool _glfwConnectCocoa(int platformID, _GLFWplatform* platform)
{ {
const _GLFWplatform cocoa = const _GLFWplatform cocoa =
{ {
GLFW_PLATFORM_COCOA, .platformID = GLFW_PLATFORM_COCOA,
_glfwInitCocoa, .init = _glfwInitCocoa,
_glfwTerminateCocoa, .terminate = _glfwTerminateCocoa,
_glfwGetCursorPosCocoa, .getCursorPos = _glfwGetCursorPosCocoa,
_glfwSetCursorPosCocoa, .setCursorPos = _glfwSetCursorPosCocoa,
_glfwSetCursorModeCocoa, .setCursorMode = _glfwSetCursorModeCocoa,
_glfwSetRawMouseMotionCocoa, .setRawMouseMotion = _glfwSetRawMouseMotionCocoa,
_glfwRawMouseMotionSupportedCocoa, .rawMouseMotionSupported = _glfwRawMouseMotionSupportedCocoa,
_glfwCreateCursorCocoa, .createCursor = _glfwCreateCursorCocoa,
_glfwCreateStandardCursorCocoa, .createStandardCursor = _glfwCreateStandardCursorCocoa,
_glfwDestroyCursorCocoa, .destroyCursor = _glfwDestroyCursorCocoa,
_glfwSetCursorCocoa, .setCursor = _glfwSetCursorCocoa,
_glfwGetScancodeNameCocoa, .getScancodeName = _glfwGetScancodeNameCocoa,
_glfwGetKeyScancodeCocoa, .getKeyScancode = _glfwGetKeyScancodeCocoa,
_glfwSetClipboardStringCocoa, .setClipboardString = _glfwSetClipboardStringCocoa,
_glfwGetClipboardStringCocoa, .getClipboardString = _glfwGetClipboardStringCocoa,
_glfwInitJoysticksCocoa, .initJoysticks = _glfwInitJoysticksCocoa,
_glfwTerminateJoysticksCocoa, .terminateJoysticks = _glfwTerminateJoysticksCocoa,
_glfwPollJoystickCocoa, .pollJoystick = _glfwPollJoystickCocoa,
_glfwGetMappingNameCocoa, .getMappingName = _glfwGetMappingNameCocoa,
_glfwUpdateGamepadGUIDCocoa, .updateGamepadGUID = _glfwUpdateGamepadGUIDCocoa,
_glfwFreeMonitorCocoa, .freeMonitor = _glfwFreeMonitorCocoa,
_glfwGetMonitorPosCocoa, .getMonitorPos = _glfwGetMonitorPosCocoa,
_glfwGetMonitorContentScaleCocoa, .getMonitorContentScale = _glfwGetMonitorContentScaleCocoa,
_glfwGetMonitorWorkareaCocoa, .getMonitorWorkarea = _glfwGetMonitorWorkareaCocoa,
_glfwGetVideoModesCocoa, .getVideoModes = _glfwGetVideoModesCocoa,
_glfwGetVideoModeCocoa, .getVideoMode = _glfwGetVideoModeCocoa,
_glfwGetGammaRampCocoa, .getGammaRamp = _glfwGetGammaRampCocoa,
_glfwSetGammaRampCocoa, .setGammaRamp = _glfwSetGammaRampCocoa,
_glfwCreateWindowCocoa, .createWindow = _glfwCreateWindowCocoa,
_glfwDestroyWindowCocoa, .destroyWindow = _glfwDestroyWindowCocoa,
_glfwSetWindowTitleCocoa, .setWindowTitle = _glfwSetWindowTitleCocoa,
_glfwSetWindowIconCocoa, .setWindowIcon = _glfwSetWindowIconCocoa,
_glfwGetWindowPosCocoa, .getWindowPos = _glfwGetWindowPosCocoa,
_glfwSetWindowPosCocoa, .setWindowPos = _glfwSetWindowPosCocoa,
_glfwGetWindowSizeCocoa, .getWindowSize = _glfwGetWindowSizeCocoa,
_glfwSetWindowSizeCocoa, .setWindowSize = _glfwSetWindowSizeCocoa,
_glfwSetWindowSizeLimitsCocoa, .setWindowSizeLimits = _glfwSetWindowSizeLimitsCocoa,
_glfwSetWindowAspectRatioCocoa, .setWindowAspectRatio = _glfwSetWindowAspectRatioCocoa,
_glfwGetFramebufferSizeCocoa, .getFramebufferSize = _glfwGetFramebufferSizeCocoa,
_glfwGetWindowFrameSizeCocoa, .getWindowFrameSize = _glfwGetWindowFrameSizeCocoa,
_glfwGetWindowContentScaleCocoa, .getWindowContentScale = _glfwGetWindowContentScaleCocoa,
_glfwIconifyWindowCocoa, .iconifyWindow = _glfwIconifyWindowCocoa,
_glfwRestoreWindowCocoa, .restoreWindow = _glfwRestoreWindowCocoa,
_glfwMaximizeWindowCocoa, .maximizeWindow = _glfwMaximizeWindowCocoa,
_glfwShowWindowCocoa, .showWindow = _glfwShowWindowCocoa,
_glfwHideWindowCocoa, .hideWindow = _glfwHideWindowCocoa,
_glfwRequestWindowAttentionCocoa, .requestWindowAttention = _glfwRequestWindowAttentionCocoa,
_glfwFocusWindowCocoa, .focusWindow = _glfwFocusWindowCocoa,
_glfwSetWindowMonitorCocoa, .setWindowMonitor = _glfwSetWindowMonitorCocoa,
_glfwWindowFocusedCocoa, .windowFocused = _glfwWindowFocusedCocoa,
_glfwWindowIconifiedCocoa, .windowIconified = _glfwWindowIconifiedCocoa,
_glfwWindowVisibleCocoa, .windowVisible = _glfwWindowVisibleCocoa,
_glfwWindowMaximizedCocoa, .windowMaximized = _glfwWindowMaximizedCocoa,
_glfwWindowHoveredCocoa, .windowHovered = _glfwWindowHoveredCocoa,
_glfwFramebufferTransparentCocoa, .framebufferTransparent = _glfwFramebufferTransparentCocoa,
_glfwGetWindowOpacityCocoa, .getWindowOpacity = _glfwGetWindowOpacityCocoa,
_glfwSetWindowResizableCocoa, .setWindowResizable = _glfwSetWindowResizableCocoa,
_glfwSetWindowDecoratedCocoa, .setWindowDecorated = _glfwSetWindowDecoratedCocoa,
_glfwSetWindowFloatingCocoa, .setWindowFloating = _glfwSetWindowFloatingCocoa,
_glfwSetWindowOpacityCocoa, .setWindowOpacity = _glfwSetWindowOpacityCocoa,
_glfwSetWindowMousePassthroughCocoa, .setWindowMousePassthrough = _glfwSetWindowMousePassthroughCocoa,
_glfwPollEventsCocoa, .pollEvents = _glfwPollEventsCocoa,
_glfwWaitEventsCocoa, .waitEvents = _glfwWaitEventsCocoa,
_glfwWaitEventsTimeoutCocoa, .waitEventsTimeout = _glfwWaitEventsTimeoutCocoa,
_glfwPostEmptyEventCocoa, .postEmptyEvent = _glfwPostEmptyEventCocoa,
_glfwGetEGLPlatformCocoa, .getEGLPlatform = _glfwGetEGLPlatformCocoa,
_glfwGetEGLNativeDisplayCocoa, .getEGLNativeDisplay = _glfwGetEGLNativeDisplayCocoa,
_glfwGetEGLNativeWindowCocoa, .getEGLNativeWindow = _glfwGetEGLNativeWindowCocoa,
_glfwGetRequiredInstanceExtensionsCocoa, .getRequiredInstanceExtensions = _glfwGetRequiredInstanceExtensionsCocoa,
_glfwGetPhysicalDevicePresentationSupportCocoa, .getPhysicalDevicePresentationSupport = _glfwGetPhysicalDevicePresentationSupportCocoa,
_glfwCreateWindowSurfaceCocoa, .createWindowSurface = _glfwCreateWindowSurfaceCocoa
}; };
*platform = cocoa; *platform = cocoa;

View File

@ -39,78 +39,78 @@ GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
{ {
const _GLFWplatform null = const _GLFWplatform null =
{ {
GLFW_PLATFORM_NULL, .platformID = GLFW_PLATFORM_NULL,
_glfwInitNull, .init = _glfwInitNull,
_glfwTerminateNull, .terminate = _glfwTerminateNull,
_glfwGetCursorPosNull, .getCursorPos = _glfwGetCursorPosNull,
_glfwSetCursorPosNull, .setCursorPos = _glfwSetCursorPosNull,
_glfwSetCursorModeNull, .setCursorMode = _glfwSetCursorModeNull,
_glfwSetRawMouseMotionNull, .setRawMouseMotion = _glfwSetRawMouseMotionNull,
_glfwRawMouseMotionSupportedNull, .rawMouseMotionSupported = _glfwRawMouseMotionSupportedNull,
_glfwCreateCursorNull, .createCursor = _glfwCreateCursorNull,
_glfwCreateStandardCursorNull, .createStandardCursor = _glfwCreateStandardCursorNull,
_glfwDestroyCursorNull, .destroyCursor = _glfwDestroyCursorNull,
_glfwSetCursorNull, .setCursor = _glfwSetCursorNull,
_glfwGetScancodeNameNull, .getScancodeName = _glfwGetScancodeNameNull,
_glfwGetKeyScancodeNull, .getKeyScancode = _glfwGetKeyScancodeNull,
_glfwSetClipboardStringNull, .setClipboardString = _glfwSetClipboardStringNull,
_glfwGetClipboardStringNull, .getClipboardString = _glfwGetClipboardStringNull,
_glfwInitJoysticksNull, .initJoysticks = _glfwInitJoysticksNull,
_glfwTerminateJoysticksNull, .terminateJoysticks = _glfwTerminateJoysticksNull,
_glfwPollJoystickNull, .pollJoystick = _glfwPollJoystickNull,
_glfwGetMappingNameNull, .getMappingName = _glfwGetMappingNameNull,
_glfwUpdateGamepadGUIDNull, .updateGamepadGUID = _glfwUpdateGamepadGUIDNull,
_glfwFreeMonitorNull, .freeMonitor = _glfwFreeMonitorNull,
_glfwGetMonitorPosNull, .getMonitorPos = _glfwGetMonitorPosNull,
_glfwGetMonitorContentScaleNull, .getMonitorContentScale = _glfwGetMonitorContentScaleNull,
_glfwGetMonitorWorkareaNull, .getMonitorWorkarea = _glfwGetMonitorWorkareaNull,
_glfwGetVideoModesNull, .getVideoModes = _glfwGetVideoModesNull,
_glfwGetVideoModeNull, .getVideoMode = _glfwGetVideoModeNull,
_glfwGetGammaRampNull, .getGammaRamp = _glfwGetGammaRampNull,
_glfwSetGammaRampNull, .setGammaRamp = _glfwSetGammaRampNull,
_glfwCreateWindowNull, .createWindow = _glfwCreateWindowNull,
_glfwDestroyWindowNull, .destroyWindow = _glfwDestroyWindowNull,
_glfwSetWindowTitleNull, .setWindowTitle = _glfwSetWindowTitleNull,
_glfwSetWindowIconNull, .setWindowIcon = _glfwSetWindowIconNull,
_glfwGetWindowPosNull, .getWindowPos = _glfwGetWindowPosNull,
_glfwSetWindowPosNull, .setWindowPos = _glfwSetWindowPosNull,
_glfwGetWindowSizeNull, .getWindowSize = _glfwGetWindowSizeNull,
_glfwSetWindowSizeNull, .setWindowSize = _glfwSetWindowSizeNull,
_glfwSetWindowSizeLimitsNull, .setWindowSizeLimits = _glfwSetWindowSizeLimitsNull,
_glfwSetWindowAspectRatioNull, .setWindowAspectRatio = _glfwSetWindowAspectRatioNull,
_glfwGetFramebufferSizeNull, .getFramebufferSize = _glfwGetFramebufferSizeNull,
_glfwGetWindowFrameSizeNull, .getWindowFrameSize = _glfwGetWindowFrameSizeNull,
_glfwGetWindowContentScaleNull, .getWindowContentScale = _glfwGetWindowContentScaleNull,
_glfwIconifyWindowNull, .iconifyWindow = _glfwIconifyWindowNull,
_glfwRestoreWindowNull, .restoreWindow = _glfwRestoreWindowNull,
_glfwMaximizeWindowNull, .maximizeWindow = _glfwMaximizeWindowNull,
_glfwShowWindowNull, .showWindow = _glfwShowWindowNull,
_glfwHideWindowNull, .hideWindow = _glfwHideWindowNull,
_glfwRequestWindowAttentionNull, .requestWindowAttention = _glfwRequestWindowAttentionNull,
_glfwFocusWindowNull, .focusWindow = _glfwFocusWindowNull,
_glfwSetWindowMonitorNull, .setWindowMonitor = _glfwSetWindowMonitorNull,
_glfwWindowFocusedNull, .windowFocused = _glfwWindowFocusedNull,
_glfwWindowIconifiedNull, .windowIconified = _glfwWindowIconifiedNull,
_glfwWindowVisibleNull, .windowVisible = _glfwWindowVisibleNull,
_glfwWindowMaximizedNull, .windowMaximized = _glfwWindowMaximizedNull,
_glfwWindowHoveredNull, .windowHovered = _glfwWindowHoveredNull,
_glfwFramebufferTransparentNull, .framebufferTransparent = _glfwFramebufferTransparentNull,
_glfwGetWindowOpacityNull, .getWindowOpacity = _glfwGetWindowOpacityNull,
_glfwSetWindowResizableNull, .setWindowResizable = _glfwSetWindowResizableNull,
_glfwSetWindowDecoratedNull, .setWindowDecorated = _glfwSetWindowDecoratedNull,
_glfwSetWindowFloatingNull, .setWindowFloating = _glfwSetWindowFloatingNull,
_glfwSetWindowOpacityNull, .setWindowOpacity = _glfwSetWindowOpacityNull,
_glfwSetWindowMousePassthroughNull, .setWindowMousePassthrough = _glfwSetWindowMousePassthroughNull,
_glfwPollEventsNull, .pollEvents = _glfwPollEventsNull,
_glfwWaitEventsNull, .waitEvents = _glfwWaitEventsNull,
_glfwWaitEventsTimeoutNull, .waitEventsTimeout = _glfwWaitEventsTimeoutNull,
_glfwPostEmptyEventNull, .postEmptyEvent = _glfwPostEmptyEventNull,
_glfwGetEGLPlatformNull, .getEGLPlatform = _glfwGetEGLPlatformNull,
_glfwGetEGLNativeDisplayNull, .getEGLNativeDisplay = _glfwGetEGLNativeDisplayNull,
_glfwGetEGLNativeWindowNull, .getEGLNativeWindow = _glfwGetEGLNativeWindowNull,
_glfwGetRequiredInstanceExtensionsNull, .getRequiredInstanceExtensions = _glfwGetRequiredInstanceExtensionsNull,
_glfwGetPhysicalDevicePresentationSupportNull, .getPhysicalDevicePresentationSupport = _glfwGetPhysicalDevicePresentationSupportNull,
_glfwCreateWindowSurfaceNull, .createWindowSurface = _glfwCreateWindowSurfaceNull
}; };
*platform = null; *platform = null;

View File

@ -642,78 +642,78 @@ GLFWbool _glfwConnectWin32(int platformID, _GLFWplatform* platform)
{ {
const _GLFWplatform win32 = const _GLFWplatform win32 =
{ {
GLFW_PLATFORM_WIN32, .platformID = GLFW_PLATFORM_WIN32,
_glfwInitWin32, .init = _glfwInitWin32,
_glfwTerminateWin32, .terminate = _glfwTerminateWin32,
_glfwGetCursorPosWin32, .getCursorPos = _glfwGetCursorPosWin32,
_glfwSetCursorPosWin32, .setCursorPos = _glfwSetCursorPosWin32,
_glfwSetCursorModeWin32, .setCursorMode = _glfwSetCursorModeWin32,
_glfwSetRawMouseMotionWin32, .setRawMouseMotion = _glfwSetRawMouseMotionWin32,
_glfwRawMouseMotionSupportedWin32, .rawMouseMotionSupported = _glfwRawMouseMotionSupportedWin32,
_glfwCreateCursorWin32, .createCursor = _glfwCreateCursorWin32,
_glfwCreateStandardCursorWin32, .createStandardCursor = _glfwCreateStandardCursorWin32,
_glfwDestroyCursorWin32, .destroyCursor = _glfwDestroyCursorWin32,
_glfwSetCursorWin32, .setCursor = _glfwSetCursorWin32,
_glfwGetScancodeNameWin32, .getScancodeName = _glfwGetScancodeNameWin32,
_glfwGetKeyScancodeWin32, .getKeyScancode = _glfwGetKeyScancodeWin32,
_glfwSetClipboardStringWin32, .setClipboardString = _glfwSetClipboardStringWin32,
_glfwGetClipboardStringWin32, .getClipboardString = _glfwGetClipboardStringWin32,
_glfwInitJoysticksWin32, .initJoysticks = _glfwInitJoysticksWin32,
_glfwTerminateJoysticksWin32, .terminateJoysticks = _glfwTerminateJoysticksWin32,
_glfwPollJoystickWin32, .pollJoystick = _glfwPollJoystickWin32,
_glfwGetMappingNameWin32, .getMappingName = _glfwGetMappingNameWin32,
_glfwUpdateGamepadGUIDWin32, .updateGamepadGUID = _glfwUpdateGamepadGUIDWin32,
_glfwFreeMonitorWin32, .freeMonitor = _glfwFreeMonitorWin32,
_glfwGetMonitorPosWin32, .getMonitorPos = _glfwGetMonitorPosWin32,
_glfwGetMonitorContentScaleWin32, .getMonitorContentScale = _glfwGetMonitorContentScaleWin32,
_glfwGetMonitorWorkareaWin32, .getMonitorWorkarea = _glfwGetMonitorWorkareaWin32,
_glfwGetVideoModesWin32, .getVideoModes = _glfwGetVideoModesWin32,
_glfwGetVideoModeWin32, .getVideoMode = _glfwGetVideoModeWin32,
_glfwGetGammaRampWin32, .getGammaRamp = _glfwGetGammaRampWin32,
_glfwSetGammaRampWin32, .setGammaRamp = _glfwSetGammaRampWin32,
_glfwCreateWindowWin32, .createWindow = _glfwCreateWindowWin32,
_glfwDestroyWindowWin32, .destroyWindow = _glfwDestroyWindowWin32,
_glfwSetWindowTitleWin32, .setWindowTitle = _glfwSetWindowTitleWin32,
_glfwSetWindowIconWin32, .setWindowIcon = _glfwSetWindowIconWin32,
_glfwGetWindowPosWin32, .getWindowPos = _glfwGetWindowPosWin32,
_glfwSetWindowPosWin32, .setWindowPos = _glfwSetWindowPosWin32,
_glfwGetWindowSizeWin32, .getWindowSize = _glfwGetWindowSizeWin32,
_glfwSetWindowSizeWin32, .setWindowSize = _glfwSetWindowSizeWin32,
_glfwSetWindowSizeLimitsWin32, .setWindowSizeLimits = _glfwSetWindowSizeLimitsWin32,
_glfwSetWindowAspectRatioWin32, .setWindowAspectRatio = _glfwSetWindowAspectRatioWin32,
_glfwGetFramebufferSizeWin32, .getFramebufferSize = _glfwGetFramebufferSizeWin32,
_glfwGetWindowFrameSizeWin32, .getWindowFrameSize = _glfwGetWindowFrameSizeWin32,
_glfwGetWindowContentScaleWin32, .getWindowContentScale = _glfwGetWindowContentScaleWin32,
_glfwIconifyWindowWin32, .iconifyWindow = _glfwIconifyWindowWin32,
_glfwRestoreWindowWin32, .restoreWindow = _glfwRestoreWindowWin32,
_glfwMaximizeWindowWin32, .maximizeWindow = _glfwMaximizeWindowWin32,
_glfwShowWindowWin32, .showWindow = _glfwShowWindowWin32,
_glfwHideWindowWin32, .hideWindow = _glfwHideWindowWin32,
_glfwRequestWindowAttentionWin32, .requestWindowAttention = _glfwRequestWindowAttentionWin32,
_glfwFocusWindowWin32, .focusWindow = _glfwFocusWindowWin32,
_glfwSetWindowMonitorWin32, .setWindowMonitor = _glfwSetWindowMonitorWin32,
_glfwWindowFocusedWin32, .windowFocused = _glfwWindowFocusedWin32,
_glfwWindowIconifiedWin32, .windowIconified = _glfwWindowIconifiedWin32,
_glfwWindowVisibleWin32, .windowVisible = _glfwWindowVisibleWin32,
_glfwWindowMaximizedWin32, .windowMaximized = _glfwWindowMaximizedWin32,
_glfwWindowHoveredWin32, .windowHovered = _glfwWindowHoveredWin32,
_glfwFramebufferTransparentWin32, .framebufferTransparent = _glfwFramebufferTransparentWin32,
_glfwGetWindowOpacityWin32, .getWindowOpacity = _glfwGetWindowOpacityWin32,
_glfwSetWindowResizableWin32, .setWindowResizable = _glfwSetWindowResizableWin32,
_glfwSetWindowDecoratedWin32, .setWindowDecorated = _glfwSetWindowDecoratedWin32,
_glfwSetWindowFloatingWin32, .setWindowFloating = _glfwSetWindowFloatingWin32,
_glfwSetWindowOpacityWin32, .setWindowOpacity = _glfwSetWindowOpacityWin32,
_glfwSetWindowMousePassthroughWin32, .setWindowMousePassthrough = _glfwSetWindowMousePassthroughWin32,
_glfwPollEventsWin32, .pollEvents = _glfwPollEventsWin32,
_glfwWaitEventsWin32, .waitEvents = _glfwWaitEventsWin32,
_glfwWaitEventsTimeoutWin32, .waitEventsTimeout = _glfwWaitEventsTimeoutWin32,
_glfwPostEmptyEventWin32, .postEmptyEvent = _glfwPostEmptyEventWin32,
_glfwGetEGLPlatformWin32, .getEGLPlatform = _glfwGetEGLPlatformWin32,
_glfwGetEGLNativeDisplayWin32, .getEGLNativeDisplay = _glfwGetEGLNativeDisplayWin32,
_glfwGetEGLNativeWindowWin32, .getEGLNativeWindow = _glfwGetEGLNativeWindowWin32,
_glfwGetRequiredInstanceExtensionsWin32, .getRequiredInstanceExtensions = _glfwGetRequiredInstanceExtensionsWin32,
_glfwGetPhysicalDevicePresentationSupportWin32, .getPhysicalDevicePresentationSupport = _glfwGetPhysicalDevicePresentationSupportWin32,
_glfwCreateWindowSurfaceWin32, .createWindowSurface = _glfwCreateWindowSurfaceWin32
}; };
*platform = win32; *platform = win32;

View File

@ -405,86 +405,86 @@ GLFWbool _glfwConnectWayland(int platformID, _GLFWplatform* platform)
{ {
const _GLFWplatform wayland = const _GLFWplatform wayland =
{ {
GLFW_PLATFORM_WAYLAND, .platformID = GLFW_PLATFORM_WAYLAND,
_glfwInitWayland, .init = _glfwInitWayland,
_glfwTerminateWayland, .terminate = _glfwTerminateWayland,
_glfwGetCursorPosWayland, .getCursorPos = _glfwGetCursorPosWayland,
_glfwSetCursorPosWayland, .setCursorPos = _glfwSetCursorPosWayland,
_glfwSetCursorModeWayland, .setCursorMode = _glfwSetCursorModeWayland,
_glfwSetRawMouseMotionWayland, .setRawMouseMotion = _glfwSetRawMouseMotionWayland,
_glfwRawMouseMotionSupportedWayland, .rawMouseMotionSupported = _glfwRawMouseMotionSupportedWayland,
_glfwCreateCursorWayland, .createCursor = _glfwCreateCursorWayland,
_glfwCreateStandardCursorWayland, .createStandardCursor = _glfwCreateStandardCursorWayland,
_glfwDestroyCursorWayland, .destroyCursor = _glfwDestroyCursorWayland,
_glfwSetCursorWayland, .setCursor = _glfwSetCursorWayland,
_glfwGetScancodeNameWayland, .getScancodeName = _glfwGetScancodeNameWayland,
_glfwGetKeyScancodeWayland, .getKeyScancode = _glfwGetKeyScancodeWayland,
_glfwSetClipboardStringWayland, .setClipboardString = _glfwSetClipboardStringWayland,
_glfwGetClipboardStringWayland, .getClipboardString = _glfwGetClipboardStringWayland,
#if defined(GLFW_BUILD_LINUX_JOYSTICK) #if defined(GLFW_BUILD_LINUX_JOYSTICK)
_glfwInitJoysticksLinux, .initJoysticks = _glfwInitJoysticksLinux,
_glfwTerminateJoysticksLinux, .terminateJoysticks = _glfwTerminateJoysticksLinux,
_glfwPollJoystickLinux, .pollJoystick = _glfwPollJoystickLinux,
_glfwGetMappingNameLinux, .getMappingName = _glfwGetMappingNameLinux,
_glfwUpdateGamepadGUIDLinux, .updateGamepadGUID = _glfwUpdateGamepadGUIDLinux,
#else #else
_glfwInitJoysticksNull, .initJoysticks = _glfwInitJoysticksNull,
_glfwTerminateJoysticksNull, .terminateJoysticks = _glfwTerminateJoysticksNull,
_glfwPollJoystickNull, .pollJoystick = _glfwPollJoystickNull,
_glfwGetMappingNameNull, .getMappingName = _glfwGetMappingNameNull,
_glfwUpdateGamepadGUIDNull, .updateGamepadGUID = _glfwUpdateGamepadGUIDNull,
#endif #endif
_glfwFreeMonitorWayland, .freeMonitor = _glfwFreeMonitorWayland,
_glfwGetMonitorPosWayland, .getMonitorPos = _glfwGetMonitorPosWayland,
_glfwGetMonitorContentScaleWayland, .getMonitorContentScale = _glfwGetMonitorContentScaleWayland,
_glfwGetMonitorWorkareaWayland, .getMonitorWorkarea = _glfwGetMonitorWorkareaWayland,
_glfwGetVideoModesWayland, .getVideoModes = _glfwGetVideoModesWayland,
_glfwGetVideoModeWayland, .getVideoMode = _glfwGetVideoModeWayland,
_glfwGetGammaRampWayland, .getGammaRamp = _glfwGetGammaRampWayland,
_glfwSetGammaRampWayland, .setGammaRamp = _glfwSetGammaRampWayland,
_glfwCreateWindowWayland, .createWindow = _glfwCreateWindowWayland,
_glfwDestroyWindowWayland, .destroyWindow = _glfwDestroyWindowWayland,
_glfwSetWindowTitleWayland, .setWindowTitle = _glfwSetWindowTitleWayland,
_glfwSetWindowIconWayland, .setWindowIcon = _glfwSetWindowIconWayland,
_glfwGetWindowPosWayland, .getWindowPos = _glfwGetWindowPosWayland,
_glfwSetWindowPosWayland, .setWindowPos = _glfwSetWindowPosWayland,
_glfwGetWindowSizeWayland, .getWindowSize = _glfwGetWindowSizeWayland,
_glfwSetWindowSizeWayland, .setWindowSize = _glfwSetWindowSizeWayland,
_glfwSetWindowSizeLimitsWayland, .setWindowSizeLimits = _glfwSetWindowSizeLimitsWayland,
_glfwSetWindowAspectRatioWayland, .setWindowAspectRatio = _glfwSetWindowAspectRatioWayland,
_glfwGetFramebufferSizeWayland, .getFramebufferSize = _glfwGetFramebufferSizeWayland,
_glfwGetWindowFrameSizeWayland, .getWindowFrameSize = _glfwGetWindowFrameSizeWayland,
_glfwGetWindowContentScaleWayland, .getWindowContentScale = _glfwGetWindowContentScaleWayland,
_glfwIconifyWindowWayland, .iconifyWindow = _glfwIconifyWindowWayland,
_glfwRestoreWindowWayland, .restoreWindow = _glfwRestoreWindowWayland,
_glfwMaximizeWindowWayland, .maximizeWindow = _glfwMaximizeWindowWayland,
_glfwShowWindowWayland, .showWindow = _glfwShowWindowWayland,
_glfwHideWindowWayland, .hideWindow = _glfwHideWindowWayland,
_glfwRequestWindowAttentionWayland, .requestWindowAttention = _glfwRequestWindowAttentionWayland,
_glfwFocusWindowWayland, .focusWindow = _glfwFocusWindowWayland,
_glfwSetWindowMonitorWayland, .setWindowMonitor = _glfwSetWindowMonitorWayland,
_glfwWindowFocusedWayland, .windowFocused = _glfwWindowFocusedWayland,
_glfwWindowIconifiedWayland, .windowIconified = _glfwWindowIconifiedWayland,
_glfwWindowVisibleWayland, .windowVisible = _glfwWindowVisibleWayland,
_glfwWindowMaximizedWayland, .windowMaximized = _glfwWindowMaximizedWayland,
_glfwWindowHoveredWayland, .windowHovered = _glfwWindowHoveredWayland,
_glfwFramebufferTransparentWayland, .framebufferTransparent = _glfwFramebufferTransparentWayland,
_glfwGetWindowOpacityWayland, .getWindowOpacity = _glfwGetWindowOpacityWayland,
_glfwSetWindowResizableWayland, .setWindowResizable = _glfwSetWindowResizableWayland,
_glfwSetWindowDecoratedWayland, .setWindowDecorated = _glfwSetWindowDecoratedWayland,
_glfwSetWindowFloatingWayland, .setWindowFloating = _glfwSetWindowFloatingWayland,
_glfwSetWindowOpacityWayland, .setWindowOpacity = _glfwSetWindowOpacityWayland,
_glfwSetWindowMousePassthroughWayland, .setWindowMousePassthrough = _glfwSetWindowMousePassthroughWayland,
_glfwPollEventsWayland, .pollEvents = _glfwPollEventsWayland,
_glfwWaitEventsWayland, .waitEvents = _glfwWaitEventsWayland,
_glfwWaitEventsTimeoutWayland, .waitEventsTimeout = _glfwWaitEventsTimeoutWayland,
_glfwPostEmptyEventWayland, .postEmptyEvent = _glfwPostEmptyEventWayland,
_glfwGetEGLPlatformWayland, .getEGLPlatform = _glfwGetEGLPlatformWayland,
_glfwGetEGLNativeDisplayWayland, .getEGLNativeDisplay = _glfwGetEGLNativeDisplayWayland,
_glfwGetEGLNativeWindowWayland, .getEGLNativeWindow = _glfwGetEGLNativeWindowWayland,
_glfwGetRequiredInstanceExtensionsWayland, .getRequiredInstanceExtensions = _glfwGetRequiredInstanceExtensionsWayland,
_glfwGetPhysicalDevicePresentationSupportWayland, .getPhysicalDevicePresentationSupport = _glfwGetPhysicalDevicePresentationSupportWayland,
_glfwCreateWindowSurfaceWayland, .createWindowSurface = _glfwCreateWindowSurfaceWayland
}; };
void* module = _glfwPlatformLoadModule("libwayland-client.so.0"); void* module = _glfwPlatformLoadModule("libwayland-client.so.0");

View File

@ -1166,86 +1166,86 @@ GLFWbool _glfwConnectX11(int platformID, _GLFWplatform* platform)
{ {
const _GLFWplatform x11 = const _GLFWplatform x11 =
{ {
GLFW_PLATFORM_X11, .platformID = GLFW_PLATFORM_X11,
_glfwInitX11, .init = _glfwInitX11,
_glfwTerminateX11, .terminate = _glfwTerminateX11,
_glfwGetCursorPosX11, .getCursorPos = _glfwGetCursorPosX11,
_glfwSetCursorPosX11, .setCursorPos = _glfwSetCursorPosX11,
_glfwSetCursorModeX11, .setCursorMode = _glfwSetCursorModeX11,
_glfwSetRawMouseMotionX11, .setRawMouseMotion = _glfwSetRawMouseMotionX11,
_glfwRawMouseMotionSupportedX11, .rawMouseMotionSupported = _glfwRawMouseMotionSupportedX11,
_glfwCreateCursorX11, .createCursor = _glfwCreateCursorX11,
_glfwCreateStandardCursorX11, .createStandardCursor = _glfwCreateStandardCursorX11,
_glfwDestroyCursorX11, .destroyCursor = _glfwDestroyCursorX11,
_glfwSetCursorX11, .setCursor = _glfwSetCursorX11,
_glfwGetScancodeNameX11, .getScancodeName = _glfwGetScancodeNameX11,
_glfwGetKeyScancodeX11, .getKeyScancode = _glfwGetKeyScancodeX11,
_glfwSetClipboardStringX11, .setClipboardString = _glfwSetClipboardStringX11,
_glfwGetClipboardStringX11, .getClipboardString = _glfwGetClipboardStringX11,
#if defined(GLFW_BUILD_LINUX_JOYSTICK) #if defined(GLFW_BUILD_LINUX_JOYSTICK)
_glfwInitJoysticksLinux, .initJoysticks = _glfwInitJoysticksLinux,
_glfwTerminateJoysticksLinux, .terminateJoysticks = _glfwTerminateJoysticksLinux,
_glfwPollJoystickLinux, .pollJoystick = _glfwPollJoystickLinux,
_glfwGetMappingNameLinux, .getMappingName = _glfwGetMappingNameLinux,
_glfwUpdateGamepadGUIDLinux, .updateGamepadGUID = _glfwUpdateGamepadGUIDLinux,
#else #else
_glfwInitJoysticksNull, .initJoysticks = _glfwInitJoysticksNull,
_glfwTerminateJoysticksNull, .terminateJoysticks = _glfwTerminateJoysticksNull,
_glfwPollJoystickNull, .pollJoystick = _glfwPollJoystickNull,
_glfwGetMappingNameNull, .getMappingName = _glfwGetMappingNameNull,
_glfwUpdateGamepadGUIDNull, .updateGamepadGUID = _glfwUpdateGamepadGUIDNull,
#endif #endif
_glfwFreeMonitorX11, .freeMonitor = _glfwFreeMonitorX11,
_glfwGetMonitorPosX11, .getMonitorPos = _glfwGetMonitorPosX11,
_glfwGetMonitorContentScaleX11, .getMonitorContentScale = _glfwGetMonitorContentScaleX11,
_glfwGetMonitorWorkareaX11, .getMonitorWorkarea = _glfwGetMonitorWorkareaX11,
_glfwGetVideoModesX11, .getVideoModes = _glfwGetVideoModesX11,
_glfwGetVideoModeX11, .getVideoMode = _glfwGetVideoModeX11,
_glfwGetGammaRampX11, .getGammaRamp = _glfwGetGammaRampX11,
_glfwSetGammaRampX11, .setGammaRamp = _glfwSetGammaRampX11,
_glfwCreateWindowX11, .createWindow = _glfwCreateWindowX11,
_glfwDestroyWindowX11, .destroyWindow = _glfwDestroyWindowX11,
_glfwSetWindowTitleX11, .setWindowTitle = _glfwSetWindowTitleX11,
_glfwSetWindowIconX11, .setWindowIcon = _glfwSetWindowIconX11,
_glfwGetWindowPosX11, .getWindowPos = _glfwGetWindowPosX11,
_glfwSetWindowPosX11, .setWindowPos = _glfwSetWindowPosX11,
_glfwGetWindowSizeX11, .getWindowSize = _glfwGetWindowSizeX11,
_glfwSetWindowSizeX11, .setWindowSize = _glfwSetWindowSizeX11,
_glfwSetWindowSizeLimitsX11, .setWindowSizeLimits = _glfwSetWindowSizeLimitsX11,
_glfwSetWindowAspectRatioX11, .setWindowAspectRatio = _glfwSetWindowAspectRatioX11,
_glfwGetFramebufferSizeX11, .getFramebufferSize = _glfwGetFramebufferSizeX11,
_glfwGetWindowFrameSizeX11, .getWindowFrameSize = _glfwGetWindowFrameSizeX11,
_glfwGetWindowContentScaleX11, .getWindowContentScale = _glfwGetWindowContentScaleX11,
_glfwIconifyWindowX11, .iconifyWindow = _glfwIconifyWindowX11,
_glfwRestoreWindowX11, .restoreWindow = _glfwRestoreWindowX11,
_glfwMaximizeWindowX11, .maximizeWindow = _glfwMaximizeWindowX11,
_glfwShowWindowX11, .showWindow = _glfwShowWindowX11,
_glfwHideWindowX11, .hideWindow = _glfwHideWindowX11,
_glfwRequestWindowAttentionX11, .requestWindowAttention = _glfwRequestWindowAttentionX11,
_glfwFocusWindowX11, .focusWindow = _glfwFocusWindowX11,
_glfwSetWindowMonitorX11, .setWindowMonitor = _glfwSetWindowMonitorX11,
_glfwWindowFocusedX11, .windowFocused = _glfwWindowFocusedX11,
_glfwWindowIconifiedX11, .windowIconified = _glfwWindowIconifiedX11,
_glfwWindowVisibleX11, .windowVisible = _glfwWindowVisibleX11,
_glfwWindowMaximizedX11, .windowMaximized = _glfwWindowMaximizedX11,
_glfwWindowHoveredX11, .windowHovered = _glfwWindowHoveredX11,
_glfwFramebufferTransparentX11, .framebufferTransparent = _glfwFramebufferTransparentX11,
_glfwGetWindowOpacityX11, .getWindowOpacity = _glfwGetWindowOpacityX11,
_glfwSetWindowResizableX11, .setWindowResizable = _glfwSetWindowResizableX11,
_glfwSetWindowDecoratedX11, .setWindowDecorated = _glfwSetWindowDecoratedX11,
_glfwSetWindowFloatingX11, .setWindowFloating = _glfwSetWindowFloatingX11,
_glfwSetWindowOpacityX11, .setWindowOpacity = _glfwSetWindowOpacityX11,
_glfwSetWindowMousePassthroughX11, .setWindowMousePassthrough = _glfwSetWindowMousePassthroughX11,
_glfwPollEventsX11, .pollEvents = _glfwPollEventsX11,
_glfwWaitEventsX11, .waitEvents = _glfwWaitEventsX11,
_glfwWaitEventsTimeoutX11, .waitEventsTimeout = _glfwWaitEventsTimeoutX11,
_glfwPostEmptyEventX11, .postEmptyEvent = _glfwPostEmptyEventX11,
_glfwGetEGLPlatformX11, .getEGLPlatform = _glfwGetEGLPlatformX11,
_glfwGetEGLNativeDisplayX11, .getEGLNativeDisplay = _glfwGetEGLNativeDisplayX11,
_glfwGetEGLNativeWindowX11, .getEGLNativeWindow = _glfwGetEGLNativeWindowX11,
_glfwGetRequiredInstanceExtensionsX11, .getRequiredInstanceExtensions = _glfwGetRequiredInstanceExtensionsX11,
_glfwGetPhysicalDevicePresentationSupportX11, .getPhysicalDevicePresentationSupport = _glfwGetPhysicalDevicePresentationSupportX11,
_glfwCreateWindowSurfaceX11, .createWindowSurface = _glfwCreateWindowSurfaceX11
}; };
// HACK: If the application has left the locale as "C" then both wide // HACK: If the application has left the locale as "C" then both wide