github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/tests/raylib/external/glfw/src/null_init.c (about)

     1  //========================================================================
     2  // GLFW 3.4 - www.glfw.org
     3  //------------------------------------------------------------------------
     4  // Copyright (c) 2016 Google Inc.
     5  // Copyright (c) 2016-2017 Camilla Löwy <elmindreda@glfw.org>
     6  //
     7  // This software is provided 'as-is', without any express or implied
     8  // warranty. In no event will the authors be held liable for any damages
     9  // arising from the use of this software.
    10  //
    11  // Permission is granted to anyone to use this software for any purpose,
    12  // including commercial applications, and to alter it and redistribute it
    13  // freely, subject to the following restrictions:
    14  //
    15  // 1. The origin of this software must not be misrepresented; you must not
    16  //    claim that you wrote the original software. If you use this software
    17  //    in a product, an acknowledgment in the product documentation would
    18  //    be appreciated but is not required.
    19  //
    20  // 2. Altered source versions must be plainly marked as such, and must not
    21  //    be misrepresented as being the original software.
    22  //
    23  // 3. This notice may not be removed or altered from any source
    24  //    distribution.
    25  //
    26  //========================================================================
    27  // It is fine to use C99 in this file because it will not be built with VS
    28  //========================================================================
    29  
    30  #include "internal.h"
    31  
    32  #include <stdlib.h>
    33  
    34  
    35  //////////////////////////////////////////////////////////////////////////
    36  //////                       GLFW platform API                      //////
    37  //////////////////////////////////////////////////////////////////////////
    38  
    39  GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
    40  {
    41      const _GLFWplatform null =
    42      {
    43          GLFW_PLATFORM_NULL,
    44          _glfwInitNull,
    45          _glfwTerminateNull,
    46          _glfwGetCursorPosNull,
    47          _glfwSetCursorPosNull,
    48          _glfwSetCursorModeNull,
    49          _glfwSetRawMouseMotionNull,
    50          _glfwRawMouseMotionSupportedNull,
    51          _glfwCreateCursorNull,
    52          _glfwCreateStandardCursorNull,
    53          _glfwDestroyCursorNull,
    54          _glfwSetCursorNull,
    55          _glfwGetScancodeNameNull,
    56          _glfwGetKeyScancodeNull,
    57          _glfwSetClipboardStringNull,
    58          _glfwGetClipboardStringNull,
    59          _glfwInitJoysticksNull,
    60          _glfwTerminateJoysticksNull,
    61          _glfwPollJoystickNull,
    62          _glfwGetMappingNameNull,
    63          _glfwUpdateGamepadGUIDNull,
    64          _glfwFreeMonitorNull,
    65          _glfwGetMonitorPosNull,
    66          _glfwGetMonitorContentScaleNull,
    67          _glfwGetMonitorWorkareaNull,
    68          _glfwGetVideoModesNull,
    69          _glfwGetVideoModeNull,
    70          _glfwGetGammaRampNull,
    71          _glfwSetGammaRampNull,
    72          _glfwCreateWindowNull,
    73          _glfwDestroyWindowNull,
    74          _glfwSetWindowTitleNull,
    75          _glfwSetWindowIconNull,
    76          _glfwGetWindowPosNull,
    77          _glfwSetWindowPosNull,
    78          _glfwGetWindowSizeNull,
    79          _glfwSetWindowSizeNull,
    80          _glfwSetWindowSizeLimitsNull,
    81          _glfwSetWindowAspectRatioNull,
    82          _glfwGetFramebufferSizeNull,
    83          _glfwGetWindowFrameSizeNull,
    84          _glfwGetWindowContentScaleNull,
    85          _glfwIconifyWindowNull,
    86          _glfwRestoreWindowNull,
    87          _glfwMaximizeWindowNull,
    88          _glfwShowWindowNull,
    89          _glfwHideWindowNull,
    90          _glfwRequestWindowAttentionNull,
    91          _glfwFocusWindowNull,
    92          _glfwSetWindowMonitorNull,
    93          _glfwWindowFocusedNull,
    94          _glfwWindowIconifiedNull,
    95          _glfwWindowVisibleNull,
    96          _glfwWindowMaximizedNull,
    97          _glfwWindowHoveredNull,
    98          _glfwFramebufferTransparentNull,
    99          _glfwGetWindowOpacityNull,
   100          _glfwSetWindowResizableNull,
   101          _glfwSetWindowDecoratedNull,
   102          _glfwSetWindowFloatingNull,
   103          _glfwSetWindowOpacityNull,
   104          _glfwSetWindowMousePassthroughNull,
   105          _glfwPollEventsNull,
   106          _glfwWaitEventsNull,
   107          _glfwWaitEventsTimeoutNull,
   108          _glfwPostEmptyEventNull,
   109          _glfwGetEGLPlatformNull,
   110          _glfwGetEGLNativeDisplayNull,
   111          _glfwGetEGLNativeWindowNull,
   112          _glfwGetRequiredInstanceExtensionsNull,
   113          _glfwGetPhysicalDevicePresentationSupportNull,
   114          _glfwCreateWindowSurfaceNull,
   115      };
   116  
   117      *platform = null;
   118      return GLFW_TRUE;
   119  }
   120  
   121  int _glfwInitNull(void)
   122  {
   123      _glfwPollMonitorsNull();
   124      return GLFW_TRUE;
   125  }
   126  
   127  void _glfwTerminateNull(void)
   128  {
   129      free(_glfw.null.clipboardString);
   130      _glfwTerminateOSMesa();
   131      _glfwTerminateEGL();
   132  }
   133