mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Use designated initializers for platform structs
This should make platform struct initializers slightly more resistant to merge mistakes.
This commit is contained in:
144
src/null_init.c
144
src/null_init.c
@@ -39,78 +39,78 @@ GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
|
||||
{
|
||||
const _GLFWplatform null =
|
||||
{
|
||||
GLFW_PLATFORM_NULL,
|
||||
_glfwInitNull,
|
||||
_glfwTerminateNull,
|
||||
_glfwGetCursorPosNull,
|
||||
_glfwSetCursorPosNull,
|
||||
_glfwSetCursorModeNull,
|
||||
_glfwSetRawMouseMotionNull,
|
||||
_glfwRawMouseMotionSupportedNull,
|
||||
_glfwCreateCursorNull,
|
||||
_glfwCreateStandardCursorNull,
|
||||
_glfwDestroyCursorNull,
|
||||
_glfwSetCursorNull,
|
||||
_glfwGetScancodeNameNull,
|
||||
_glfwGetKeyScancodeNull,
|
||||
_glfwSetClipboardStringNull,
|
||||
_glfwGetClipboardStringNull,
|
||||
_glfwInitJoysticksNull,
|
||||
_glfwTerminateJoysticksNull,
|
||||
_glfwPollJoystickNull,
|
||||
_glfwGetMappingNameNull,
|
||||
_glfwUpdateGamepadGUIDNull,
|
||||
_glfwFreeMonitorNull,
|
||||
_glfwGetMonitorPosNull,
|
||||
_glfwGetMonitorContentScaleNull,
|
||||
_glfwGetMonitorWorkareaNull,
|
||||
_glfwGetVideoModesNull,
|
||||
_glfwGetVideoModeNull,
|
||||
_glfwGetGammaRampNull,
|
||||
_glfwSetGammaRampNull,
|
||||
_glfwCreateWindowNull,
|
||||
_glfwDestroyWindowNull,
|
||||
_glfwSetWindowTitleNull,
|
||||
_glfwSetWindowIconNull,
|
||||
_glfwGetWindowPosNull,
|
||||
_glfwSetWindowPosNull,
|
||||
_glfwGetWindowSizeNull,
|
||||
_glfwSetWindowSizeNull,
|
||||
_glfwSetWindowSizeLimitsNull,
|
||||
_glfwSetWindowAspectRatioNull,
|
||||
_glfwGetFramebufferSizeNull,
|
||||
_glfwGetWindowFrameSizeNull,
|
||||
_glfwGetWindowContentScaleNull,
|
||||
_glfwIconifyWindowNull,
|
||||
_glfwRestoreWindowNull,
|
||||
_glfwMaximizeWindowNull,
|
||||
_glfwShowWindowNull,
|
||||
_glfwHideWindowNull,
|
||||
_glfwRequestWindowAttentionNull,
|
||||
_glfwFocusWindowNull,
|
||||
_glfwSetWindowMonitorNull,
|
||||
_glfwWindowFocusedNull,
|
||||
_glfwWindowIconifiedNull,
|
||||
_glfwWindowVisibleNull,
|
||||
_glfwWindowMaximizedNull,
|
||||
_glfwWindowHoveredNull,
|
||||
_glfwFramebufferTransparentNull,
|
||||
_glfwGetWindowOpacityNull,
|
||||
_glfwSetWindowResizableNull,
|
||||
_glfwSetWindowDecoratedNull,
|
||||
_glfwSetWindowFloatingNull,
|
||||
_glfwSetWindowOpacityNull,
|
||||
_glfwSetWindowMousePassthroughNull,
|
||||
_glfwPollEventsNull,
|
||||
_glfwWaitEventsNull,
|
||||
_glfwWaitEventsTimeoutNull,
|
||||
_glfwPostEmptyEventNull,
|
||||
_glfwGetEGLPlatformNull,
|
||||
_glfwGetEGLNativeDisplayNull,
|
||||
_glfwGetEGLNativeWindowNull,
|
||||
_glfwGetRequiredInstanceExtensionsNull,
|
||||
_glfwGetPhysicalDevicePresentationSupportNull,
|
||||
_glfwCreateWindowSurfaceNull,
|
||||
.platformID = GLFW_PLATFORM_NULL,
|
||||
.init = _glfwInitNull,
|
||||
.terminate = _glfwTerminateNull,
|
||||
.getCursorPos = _glfwGetCursorPosNull,
|
||||
.setCursorPos = _glfwSetCursorPosNull,
|
||||
.setCursorMode = _glfwSetCursorModeNull,
|
||||
.setRawMouseMotion = _glfwSetRawMouseMotionNull,
|
||||
.rawMouseMotionSupported = _glfwRawMouseMotionSupportedNull,
|
||||
.createCursor = _glfwCreateCursorNull,
|
||||
.createStandardCursor = _glfwCreateStandardCursorNull,
|
||||
.destroyCursor = _glfwDestroyCursorNull,
|
||||
.setCursor = _glfwSetCursorNull,
|
||||
.getScancodeName = _glfwGetScancodeNameNull,
|
||||
.getKeyScancode = _glfwGetKeyScancodeNull,
|
||||
.setClipboardString = _glfwSetClipboardStringNull,
|
||||
.getClipboardString = _glfwGetClipboardStringNull,
|
||||
.initJoysticks = _glfwInitJoysticksNull,
|
||||
.terminateJoysticks = _glfwTerminateJoysticksNull,
|
||||
.pollJoystick = _glfwPollJoystickNull,
|
||||
.getMappingName = _glfwGetMappingNameNull,
|
||||
.updateGamepadGUID = _glfwUpdateGamepadGUIDNull,
|
||||
.freeMonitor = _glfwFreeMonitorNull,
|
||||
.getMonitorPos = _glfwGetMonitorPosNull,
|
||||
.getMonitorContentScale = _glfwGetMonitorContentScaleNull,
|
||||
.getMonitorWorkarea = _glfwGetMonitorWorkareaNull,
|
||||
.getVideoModes = _glfwGetVideoModesNull,
|
||||
.getVideoMode = _glfwGetVideoModeNull,
|
||||
.getGammaRamp = _glfwGetGammaRampNull,
|
||||
.setGammaRamp = _glfwSetGammaRampNull,
|
||||
.createWindow = _glfwCreateWindowNull,
|
||||
.destroyWindow = _glfwDestroyWindowNull,
|
||||
.setWindowTitle = _glfwSetWindowTitleNull,
|
||||
.setWindowIcon = _glfwSetWindowIconNull,
|
||||
.getWindowPos = _glfwGetWindowPosNull,
|
||||
.setWindowPos = _glfwSetWindowPosNull,
|
||||
.getWindowSize = _glfwGetWindowSizeNull,
|
||||
.setWindowSize = _glfwSetWindowSizeNull,
|
||||
.setWindowSizeLimits = _glfwSetWindowSizeLimitsNull,
|
||||
.setWindowAspectRatio = _glfwSetWindowAspectRatioNull,
|
||||
.getFramebufferSize = _glfwGetFramebufferSizeNull,
|
||||
.getWindowFrameSize = _glfwGetWindowFrameSizeNull,
|
||||
.getWindowContentScale = _glfwGetWindowContentScaleNull,
|
||||
.iconifyWindow = _glfwIconifyWindowNull,
|
||||
.restoreWindow = _glfwRestoreWindowNull,
|
||||
.maximizeWindow = _glfwMaximizeWindowNull,
|
||||
.showWindow = _glfwShowWindowNull,
|
||||
.hideWindow = _glfwHideWindowNull,
|
||||
.requestWindowAttention = _glfwRequestWindowAttentionNull,
|
||||
.focusWindow = _glfwFocusWindowNull,
|
||||
.setWindowMonitor = _glfwSetWindowMonitorNull,
|
||||
.windowFocused = _glfwWindowFocusedNull,
|
||||
.windowIconified = _glfwWindowIconifiedNull,
|
||||
.windowVisible = _glfwWindowVisibleNull,
|
||||
.windowMaximized = _glfwWindowMaximizedNull,
|
||||
.windowHovered = _glfwWindowHoveredNull,
|
||||
.framebufferTransparent = _glfwFramebufferTransparentNull,
|
||||
.getWindowOpacity = _glfwGetWindowOpacityNull,
|
||||
.setWindowResizable = _glfwSetWindowResizableNull,
|
||||
.setWindowDecorated = _glfwSetWindowDecoratedNull,
|
||||
.setWindowFloating = _glfwSetWindowFloatingNull,
|
||||
.setWindowOpacity = _glfwSetWindowOpacityNull,
|
||||
.setWindowMousePassthrough = _glfwSetWindowMousePassthroughNull,
|
||||
.pollEvents = _glfwPollEventsNull,
|
||||
.waitEvents = _glfwWaitEventsNull,
|
||||
.waitEventsTimeout = _glfwWaitEventsTimeoutNull,
|
||||
.postEmptyEvent = _glfwPostEmptyEventNull,
|
||||
.getEGLPlatform = _glfwGetEGLPlatformNull,
|
||||
.getEGLNativeDisplay = _glfwGetEGLNativeDisplayNull,
|
||||
.getEGLNativeWindow = _glfwGetEGLNativeWindowNull,
|
||||
.getRequiredInstanceExtensions = _glfwGetRequiredInstanceExtensionsNull,
|
||||
.getPhysicalDevicePresentationSupport = _glfwGetPhysicalDevicePresentationSupportNull,
|
||||
.createWindowSurface = _glfwCreateWindowSurfaceNull
|
||||
};
|
||||
|
||||
*platform = null;
|
||||
|
||||
Reference in New Issue
Block a user