ScrapExplorer - win32_platform.h

Home / ext / glfw / src Lines: 1 | Size: 23270 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1//======================================================================== 2// GLFW 3.5 Win32 - www.glfw.org 3//------------------------------------------------------------------------ 4// Copyright (c) 2002-2006 Marcus Geelnard 5// Copyright (c) 2006-2019 Camilla Löwy <[email protected]> 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 28// We don't need all the fancy stuff 29#ifndef NOMINMAX 30 #define NOMINMAX 31#endif 32 33#ifndef VC_EXTRALEAN 34 #define VC_EXTRALEAN 35#endif 36 37#ifndef WIN32_LEAN_AND_MEAN 38 #define WIN32_LEAN_AND_MEAN 39#endif 40 41// This is a workaround for the fact that glfw3.h needs to export APIENTRY (for 42// example to allow applications to correctly declare a GL_KHR_debug callback) 43// but windows.h assumes no one will define APIENTRY before it does 44#undef APIENTRY 45 46// GLFW on Windows is Unicode only and does not work in MBCS mode 47#ifndef UNICODE 48 #define UNICODE 49#endif 50 51// GLFW requires Windows 7 or later 52#if WINVER < 0x0601 53 #undef WINVER 54 #define WINVER 0x0601 55#endif 56#if _WIN32_WINNT < 0x0601 57 #undef _WIN32_WINNT 58 #define _WIN32_WINNT 0x0601 59#endif 60 61// GLFW uses DirectInput8 interfaces 62#define DIRECTINPUT_VERSION 0x0800 63 64// GLFW uses OEM cursor resources 65#define OEMRESOURCE 66 67#include <wctype.h> 68#include <windows.h> 69#include <dwmapi.h> 70#include <dinput.h> 71#include <xinput.h> 72#include <dbt.h> 73 74// HACK: Define macros that some windows.h variants don't 75#ifndef WM_COPYGLOBALDATA 76 #define WM_COPYGLOBALDATA 0x0049 77#endif 78#ifndef WM_DPICHANGED 79 #define WM_DPICHANGED 0x02E0 80#endif 81#ifndef EDS_ROTATEDMODE 82 #define EDS_ROTATEDMODE 0x00000004 83#endif 84#ifndef _WIN32_WINNT_WINBLUE 85 #define _WIN32_WINNT_WINBLUE 0x0603 86#endif 87#ifndef _WIN32_WINNT_WIN8 88 #define _WIN32_WINNT_WIN8 0x0602 89#endif 90#ifndef WM_GETDPISCALEDSIZE 91 #define WM_GETDPISCALEDSIZE 0x02e4 92#endif 93#ifndef USER_DEFAULT_SCREEN_DPI 94 #define USER_DEFAULT_SCREEN_DPI 96 95#endif 96 97#ifndef DPI_ENUMS_DECLARED 98typedef enum 99{ 100 PROCESS_DPI_UNAWARE = 0, 101 PROCESS_SYSTEM_DPI_AWARE = 1, 102 PROCESS_PER_MONITOR_DPI_AWARE = 2 103} PROCESS_DPI_AWARENESS; 104typedef enum 105{ 106 MDT_EFFECTIVE_DPI = 0, 107 MDT_ANGULAR_DPI = 1, 108 MDT_RAW_DPI = 2, 109 MDT_DEFAULT = MDT_EFFECTIVE_DPI 110} MONITOR_DPI_TYPE; 111#endif /*DPI_ENUMS_DECLARED*/ 112 113#ifndef DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 114#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((HANDLE) -4) 115#endif /*DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2*/ 116 117// Replacement for versionhelpers.h macros, as we cannot rely on the 118// application having a correct embedded manifest 119// 120#define IsWindows8OrGreater() \ 121 _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN8), \ 122 LOBYTE(_WIN32_WINNT_WIN8), 0) 123#define IsWindows8Point1OrGreater() \ 124 _glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WINBLUE), \ 125 LOBYTE(_WIN32_WINNT_WINBLUE), 0) 126 127// Windows 10 Anniversary Update 128#define _glfwIsWindows10Version1607OrGreaterWin32() \ 129 _glfwIsWindows10BuildOrGreaterWin32(14393) 130// Windows 10 Creators Update 131#define _glfwIsWindows10Version1703OrGreaterWin32() \ 132 _glfwIsWindows10BuildOrGreaterWin32(15063) 133 134// HACK: Define macros that some xinput.h variants don't 135#ifndef XINPUT_CAPS_WIRELESS 136 #define XINPUT_CAPS_WIRELESS 0x0002 137#endif 138#ifndef XINPUT_DEVSUBTYPE_WHEEL 139 #define XINPUT_DEVSUBTYPE_WHEEL 0x02 140#endif 141#ifndef XINPUT_DEVSUBTYPE_ARCADE_STICK 142 #define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03 143#endif 144#ifndef XINPUT_DEVSUBTYPE_FLIGHT_STICK 145 #define XINPUT_DEVSUBTYPE_FLIGHT_STICK 0x04 146#endif 147#ifndef XINPUT_DEVSUBTYPE_DANCE_PAD 148 #define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05 149#endif 150#ifndef XINPUT_DEVSUBTYPE_GUITAR 151 #define XINPUT_DEVSUBTYPE_GUITAR 0x06 152#endif 153#ifndef XINPUT_DEVSUBTYPE_DRUM_KIT 154 #define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08 155#endif 156#ifndef XINPUT_DEVSUBTYPE_ARCADE_PAD 157 #define XINPUT_DEVSUBTYPE_ARCADE_PAD 0x13 158#endif 159#ifndef XUSER_MAX_COUNT 160 #define XUSER_MAX_COUNT 4 161#endif 162 163// HACK: Define macros that some dinput.h variants don't 164#ifndef DIDFT_OPTIONAL 165 #define DIDFT_OPTIONAL 0x80000000 166#endif 167 168#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 169#define WGL_SUPPORT_OPENGL_ARB 0x2010 170#define WGL_DRAW_TO_WINDOW_ARB 0x2001 171#define WGL_PIXEL_TYPE_ARB 0x2013 172#define WGL_TYPE_RGBA_ARB 0x202b 173#define WGL_ACCELERATION_ARB 0x2003 174#define WGL_NO_ACCELERATION_ARB 0x2025 175#define WGL_RED_BITS_ARB 0x2015 176#define WGL_RED_SHIFT_ARB 0x2016 177#define WGL_GREEN_BITS_ARB 0x2017 178#define WGL_GREEN_SHIFT_ARB 0x2018 179#define WGL_BLUE_BITS_ARB 0x2019 180#define WGL_BLUE_SHIFT_ARB 0x201a 181#define WGL_ALPHA_BITS_ARB 0x201b 182#define WGL_ALPHA_SHIFT_ARB 0x201c 183#define WGL_ACCUM_BITS_ARB 0x201d 184#define WGL_ACCUM_RED_BITS_ARB 0x201e 185#define WGL_ACCUM_GREEN_BITS_ARB 0x201f 186#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 187#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 188#define WGL_DEPTH_BITS_ARB 0x2022 189#define WGL_STENCIL_BITS_ARB 0x2023 190#define WGL_AUX_BUFFERS_ARB 0x2024 191#define WGL_STEREO_ARB 0x2012 192#define WGL_DOUBLE_BUFFER_ARB 0x2011 193#define WGL_SAMPLES_ARB 0x2042 194#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20a9 195#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 196#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 197#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 198#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 199#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 200#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 201#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 202#define WGL_CONTEXT_FLAGS_ARB 0x2094 203#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 204#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 205#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 206#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 207#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 208#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 209#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 210#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 211#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3 212#define WGL_COLORSPACE_EXT 0x309d 213#define WGL_COLORSPACE_SRGB_EXT 0x3089 214 215#define ERROR_INVALID_VERSION_ARB 0x2095 216#define ERROR_INVALID_PROFILE_ARB 0x2096 217#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 218 219// xinput.dll function pointer typedefs 220typedef DWORD (WINAPI * PFN_XInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*); 221typedef DWORD (WINAPI * PFN_XInputGetState)(DWORD,XINPUT_STATE*); 222#define XInputGetCapabilities _glfw.win32.xinput.GetCapabilities 223#define XInputGetState _glfw.win32.xinput.GetState 224 225// dinput8.dll function pointer typedefs 226typedef HRESULT (WINAPI * PFN_DirectInput8Create)(HINSTANCE,DWORD,REFIID,LPVOID*,LPUNKNOWN); 227#define DirectInput8Create _glfw.win32.dinput8.Create 228 229// user32.dll function pointer typedefs 230typedef BOOL (WINAPI * PFN_EnableNonClientDpiScaling)(HWND); 231typedef BOOL (WINAPI * PFN_SetProcessDpiAwarenessContext)(HANDLE); 232typedef UINT (WINAPI * PFN_GetDpiForWindow)(HWND); 233typedef BOOL (WINAPI * PFN_AdjustWindowRectExForDpi)(LPRECT,DWORD,BOOL,DWORD,UINT); 234typedef int (WINAPI * PFN_GetSystemMetricsForDpi)(int,UINT); 235#define EnableNonClientDpiScaling _glfw.win32.user32.EnableNonClientDpiScaling_ 236#define SetProcessDpiAwarenessContext _glfw.win32.user32.SetProcessDpiAwarenessContext_ 237#define GetDpiForWindow _glfw.win32.user32.GetDpiForWindow_ 238#define AdjustWindowRectExForDpi _glfw.win32.user32.AdjustWindowRectExForDpi_ 239#define GetSystemMetricsForDpi _glfw.win32.user32.GetSystemMetricsForDpi_ 240 241// dwmapi.dll function pointer typedefs 242typedef HRESULT (WINAPI * PFN_DwmIsCompositionEnabled)(BOOL*); 243typedef HRESULT (WINAPI * PFN_DwmFlush)(VOID); 244typedef HRESULT(WINAPI * PFN_DwmEnableBlurBehindWindow)(HWND,const DWM_BLURBEHIND*); 245typedef HRESULT (WINAPI * PFN_DwmGetColorizationColor)(DWORD*,BOOL*); 246#define DwmIsCompositionEnabled _glfw.win32.dwmapi.IsCompositionEnabled 247#define DwmFlush _glfw.win32.dwmapi.Flush 248#define DwmEnableBlurBehindWindow _glfw.win32.dwmapi.EnableBlurBehindWindow 249#define DwmGetColorizationColor _glfw.win32.dwmapi.GetColorizationColor 250 251// shcore.dll function pointer typedefs 252typedef HRESULT (WINAPI * PFN_SetProcessDpiAwareness)(PROCESS_DPI_AWARENESS); 253typedef HRESULT (WINAPI * PFN_GetDpiForMonitor)(HMONITOR,MONITOR_DPI_TYPE,UINT*,UINT*); 254#define SetProcessDpiAwareness _glfw.win32.shcore.SetProcessDpiAwareness_ 255#define GetDpiForMonitor _glfw.win32.shcore.GetDpiForMonitor_ 256 257// ntdll.dll function pointer typedefs 258typedef LONG (WINAPI * PFN_RtlVerifyVersionInfo)(OSVERSIONINFOEXW*,ULONG,ULONGLONG); 259#define RtlVerifyVersionInfo _glfw.win32.ntdll.RtlVerifyVersionInfo_ 260 261// WGL extension pointer typedefs 262typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC)(int); 263typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC,int,int,UINT,const int*,int*); 264typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void); 265typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC); 266typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC,HGLRC,const int*); 267#define wglSwapIntervalEXT _glfw.wgl.SwapIntervalEXT 268#define wglGetPixelFormatAttribivARB _glfw.wgl.GetPixelFormatAttribivARB 269#define wglGetExtensionsStringEXT _glfw.wgl.GetExtensionsStringEXT 270#define wglGetExtensionsStringARB _glfw.wgl.GetExtensionsStringARB 271#define wglCreateContextAttribsARB _glfw.wgl.CreateContextAttribsARB 272 273// opengl32.dll function pointer typedefs 274typedef HGLRC (WINAPI * PFN_wglCreateContext)(HDC); 275typedef BOOL (WINAPI * PFN_wglDeleteContext)(HGLRC); 276typedef PROC (WINAPI * PFN_wglGetProcAddress)(LPCSTR); 277typedef HDC (WINAPI * PFN_wglGetCurrentDC)(void); 278typedef HGLRC (WINAPI * PFN_wglGetCurrentContext)(void); 279typedef BOOL (WINAPI * PFN_wglMakeCurrent)(HDC,HGLRC); 280typedef BOOL (WINAPI * PFN_wglShareLists)(HGLRC,HGLRC); 281#define wglCreateContext _glfw.wgl.CreateContext 282#define wglDeleteContext _glfw.wgl.DeleteContext 283#define wglGetProcAddress _glfw.wgl.GetProcAddress 284#define wglGetCurrentDC _glfw.wgl.GetCurrentDC 285#define wglGetCurrentContext _glfw.wgl.GetCurrentContext 286#define wglMakeCurrent _glfw.wgl.MakeCurrent 287#define wglShareLists _glfw.wgl.ShareLists 288 289typedef VkFlags VkWin32SurfaceCreateFlagsKHR; 290 291typedef struct VkWin32SurfaceCreateInfoKHR 292{ 293 VkStructureType sType; 294 const void* pNext; 295 VkWin32SurfaceCreateFlagsKHR flags; 296 HINSTANCE hinstance; 297 HWND hwnd; 298} VkWin32SurfaceCreateInfoKHR; 299 300typedef VkResult (APIENTRY *PFN_vkCreateWin32SurfaceKHR)(VkInstance,const VkWin32SurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*); 301typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice,uint32_t); 302 303#define GLFW_WIN32_WINDOW_STATE _GLFWwindowWin32 win32; 304#define GLFW_WIN32_LIBRARY_WINDOW_STATE _GLFWlibraryWin32 win32; 305#define GLFW_WIN32_MONITOR_STATE _GLFWmonitorWin32 win32; 306#define GLFW_WIN32_CURSOR_STATE _GLFWcursorWin32 win32; 307 308#define GLFW_WGL_CONTEXT_STATE _GLFWcontextWGL wgl; 309#define GLFW_WGL_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl; 310 311 312// WGL-specific per-context data 313// 314typedef struct _GLFWcontextWGL 315{ 316 HDC dc; 317 HGLRC handle; 318 int interval; 319} _GLFWcontextWGL; 320 321// WGL-specific global data 322// 323typedef struct _GLFWlibraryWGL 324{ 325 HINSTANCE instance; 326 PFN_wglCreateContext CreateContext; 327 PFN_wglDeleteContext DeleteContext; 328 PFN_wglGetProcAddress GetProcAddress; 329 PFN_wglGetCurrentDC GetCurrentDC; 330 PFN_wglGetCurrentContext GetCurrentContext; 331 PFN_wglMakeCurrent MakeCurrent; 332 PFN_wglShareLists ShareLists; 333 334 PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT; 335 PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB; 336 PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT; 337 PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB; 338 PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB; 339 GLFWbool EXT_swap_control; 340 GLFWbool EXT_colorspace; 341 GLFWbool ARB_multisample; 342 GLFWbool ARB_framebuffer_sRGB; 343 GLFWbool EXT_framebuffer_sRGB; 344 GLFWbool ARB_pixel_format; 345 GLFWbool ARB_create_context; 346 GLFWbool ARB_create_context_profile; 347 GLFWbool EXT_create_context_es2_profile; 348 GLFWbool ARB_create_context_robustness; 349 GLFWbool ARB_create_context_no_error; 350 GLFWbool ARB_context_flush_control; 351} _GLFWlibraryWGL; 352 353// Win32-specific per-window data 354// 355typedef struct _GLFWwindowWin32 356{ 357 HWND handle; 358 HICON bigIcon; 359 HICON smallIcon; 360 361 GLFWbool cursorTracked; 362 GLFWbool frameAction; 363 GLFWbool iconified; 364 GLFWbool maximized; 365 // Whether to enable framebuffer transparency on DWM 366 GLFWbool transparent; 367 GLFWbool scaleToMonitor; 368 GLFWbool keymenu; 369 GLFWbool showDefault; 370 371 // Cached size used to filter out duplicate events 372 int width, height; 373 374 // The last received cursor position, regardless of source 375 int lastCursorPosX, lastCursorPosY; 376 // The last received high surrogate when decoding pairs of UTF-16 messages 377 WCHAR highSurrogate; 378} _GLFWwindowWin32; 379 380// Win32-specific global data 381// 382typedef struct _GLFWlibraryWin32 383{ 384 HINSTANCE instance; 385 HWND helperWindowHandle; 386 ATOM helperWindowClass; 387 ATOM mainWindowClass; 388 HDEVNOTIFY deviceNotificationHandle; 389 int acquiredMonitorCount; 390 char* clipboardString; 391 short int keycodes[512]; 392 short int scancodes[GLFW_KEY_LAST + 1]; 393 char keynames[GLFW_KEY_LAST + 1][5]; 394 // Where to place the cursor when re-enabled 395 double restoreCursorPosX, restoreCursorPosY; 396 // The window whose disabled cursor mode is active 397 _GLFWwindow* disabledCursorWindow; 398 // The window the cursor is captured in 399 _GLFWwindow* capturedCursorWindow; 400 RAWINPUT* rawInput; 401 int rawInputSize; 402 UINT mouseTrailSize; 403 // The cursor handle to use to hide the cursor (NULL or a transparent cursor) 404 HCURSOR blankCursor; 405 406 struct { 407 HINSTANCE instance; 408 PFN_DirectInput8Create Create; 409 IDirectInput8W* api; 410 } dinput8; 411 412 struct { 413 HINSTANCE instance; 414 PFN_XInputGetCapabilities GetCapabilities; 415 PFN_XInputGetState GetState; 416 } xinput; 417 418 struct { 419 HINSTANCE instance; 420 PFN_EnableNonClientDpiScaling EnableNonClientDpiScaling_; 421 PFN_SetProcessDpiAwarenessContext SetProcessDpiAwarenessContext_; 422 PFN_GetDpiForWindow GetDpiForWindow_; 423 PFN_AdjustWindowRectExForDpi AdjustWindowRectExForDpi_; 424 PFN_GetSystemMetricsForDpi GetSystemMetricsForDpi_; 425 } user32; 426 427 struct { 428 HINSTANCE instance; 429 PFN_DwmIsCompositionEnabled IsCompositionEnabled; 430 PFN_DwmFlush Flush; 431 PFN_DwmEnableBlurBehindWindow EnableBlurBehindWindow; 432 PFN_DwmGetColorizationColor GetColorizationColor; 433 } dwmapi; 434 435 struct { 436 HINSTANCE instance; 437 PFN_SetProcessDpiAwareness SetProcessDpiAwareness_; 438 PFN_GetDpiForMonitor GetDpiForMonitor_; 439 } shcore; 440 441 struct { 442 HINSTANCE instance; 443 PFN_RtlVerifyVersionInfo RtlVerifyVersionInfo_; 444 } ntdll; 445} _GLFWlibraryWin32; 446 447// Win32-specific per-monitor data 448// 449typedef struct _GLFWmonitorWin32 450{ 451 HMONITOR handle; 452 // This size matches the static size of DISPLAY_DEVICE.DeviceName 453 WCHAR adapterName[32]; 454 WCHAR displayName[32]; 455 char publicAdapterName[32]; 456 char publicDisplayName[32]; 457 GLFWbool modesPruned; 458 GLFWbool modeChanged; 459} _GLFWmonitorWin32; 460 461// Win32-specific per-cursor data 462// 463typedef struct _GLFWcursorWin32 464{ 465 HCURSOR handle; 466} _GLFWcursorWin32; 467 468 469GLFWbool _glfwConnectWin32(int platformID, _GLFWplatform* platform); 470int _glfwInitWin32(void); 471void _glfwTerminateWin32(void); 472 473WCHAR* _glfwCreateWideStringFromUTF8Win32(const char* source); 474char* _glfwCreateUTF8FromWideStringWin32(const WCHAR* source); 475BOOL _glfwIsWindowsVersionOrGreaterWin32(WORD major, WORD minor, WORD sp); 476BOOL _glfwIsWindows10BuildOrGreaterWin32(WORD build); 477void _glfwInputErrorWin32(int error, const char* description); 478void _glfwUpdateKeyNamesWin32(void); 479 480void _glfwPollMonitorsWin32(void); 481void _glfwSetVideoModeWin32(_GLFWmonitor* monitor, const GLFWvidmode* desired); 482void _glfwRestoreVideoModeWin32(_GLFWmonitor* monitor); 483void _glfwGetHMONITORContentScaleWin32(HMONITOR handle, float* xscale, float* yscale); 484 485GLFWbool _glfwCreateWindowWin32(_GLFWwindow* window, const _GLFWwndconfig* wndconfig, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig); 486void _glfwDestroyWindowWin32(_GLFWwindow* window); 487void _glfwSetWindowTitleWin32(_GLFWwindow* window, const char* title); 488void _glfwSetWindowIconWin32(_GLFWwindow* window, int count, const GLFWimage* images); 489void _glfwGetWindowPosWin32(_GLFWwindow* window, int* xpos, int* ypos); 490void _glfwSetWindowPosWin32(_GLFWwindow* window, int xpos, int ypos); 491void _glfwGetWindowSizeWin32(_GLFWwindow* window, int* width, int* height); 492void _glfwSetWindowSizeWin32(_GLFWwindow* window, int width, int height); 493void _glfwSetWindowSizeLimitsWin32(_GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight); 494void _glfwSetWindowAspectRatioWin32(_GLFWwindow* window, int numer, int denom); 495void _glfwGetFramebufferSizeWin32(_GLFWwindow* window, int* width, int* height); 496void _glfwGetWindowFrameSizeWin32(_GLFWwindow* window, int* left, int* top, int* right, int* bottom); 497void _glfwGetWindowContentScaleWin32(_GLFWwindow* window, float* xscale, float* yscale); 498void _glfwIconifyWindowWin32(_GLFWwindow* window); 499void _glfwRestoreWindowWin32(_GLFWwindow* window); 500void _glfwMaximizeWindowWin32(_GLFWwindow* window); 501void _glfwShowWindowWin32(_GLFWwindow* window); 502void _glfwHideWindowWin32(_GLFWwindow* window); 503void _glfwRequestWindowAttentionWin32(_GLFWwindow* window); 504void _glfwFocusWindowWin32(_GLFWwindow* window); 505void _glfwSetWindowMonitorWin32(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate); 506GLFWbool _glfwWindowFocusedWin32(_GLFWwindow* window); 507GLFWbool _glfwWindowIconifiedWin32(_GLFWwindow* window); 508GLFWbool _glfwWindowVisibleWin32(_GLFWwindow* window); 509GLFWbool _glfwWindowMaximizedWin32(_GLFWwindow* window); 510GLFWbool _glfwWindowHoveredWin32(_GLFWwindow* window); 511GLFWbool _glfwFramebufferTransparentWin32(_GLFWwindow* window); 512void _glfwSetWindowResizableWin32(_GLFWwindow* window, GLFWbool enabled); 513void _glfwSetWindowDecoratedWin32(_GLFWwindow* window, GLFWbool enabled); 514void _glfwSetWindowFloatingWin32(_GLFWwindow* window, GLFWbool enabled); 515void _glfwSetWindowMousePassthroughWin32(_GLFWwindow* window, GLFWbool enabled); 516float _glfwGetWindowOpacityWin32(_GLFWwindow* window); 517void _glfwSetWindowOpacityWin32(_GLFWwindow* window, float opacity); 518 519void _glfwSetRawMouseMotionWin32(_GLFWwindow *window, GLFWbool enabled); 520GLFWbool _glfwRawMouseMotionSupportedWin32(void); 521 522void _glfwPollEventsWin32(void); 523void _glfwWaitEventsWin32(void); 524void _glfwWaitEventsTimeoutWin32(double timeout); 525void _glfwPostEmptyEventWin32(void); 526 527void _glfwGetCursorPosWin32(_GLFWwindow* window, double* xpos, double* ypos); 528void _glfwSetCursorPosWin32(_GLFWwindow* window, double xpos, double ypos); 529void _glfwSetCursorModeWin32(_GLFWwindow* window, int mode); 530const char* _glfwGetScancodeNameWin32(int scancode); 531int _glfwGetKeyScancodeWin32(int key); 532GLFWbool _glfwCreateCursorWin32(_GLFWcursor* cursor, const GLFWimage* image, int xhot, int yhot); 533GLFWbool _glfwCreateStandardCursorWin32(_GLFWcursor* cursor, int shape); 534void _glfwDestroyCursorWin32(_GLFWcursor* cursor); 535void _glfwSetCursorWin32(_GLFWwindow* window, _GLFWcursor* cursor); 536void _glfwSetClipboardStringWin32(const char* string); 537const char* _glfwGetClipboardStringWin32(void); 538 539EGLenum _glfwGetEGLPlatformWin32(EGLint** attribs); 540EGLNativeDisplayType _glfwGetEGLNativeDisplayWin32(void); 541EGLNativeWindowType _glfwGetEGLNativeWindowWin32(_GLFWwindow* window); 542 543void _glfwGetRequiredInstanceExtensionsWin32(char** extensions); 544GLFWbool _glfwGetPhysicalDevicePresentationSupportWin32(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily); 545VkResult _glfwCreateWindowSurfaceWin32(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface); 546 547void _glfwFreeMonitorWin32(_GLFWmonitor* monitor); 548void _glfwGetMonitorPosWin32(_GLFWmonitor* monitor, int* xpos, int* ypos); 549void _glfwGetMonitorContentScaleWin32(_GLFWmonitor* monitor, float* xscale, float* yscale); 550void _glfwGetMonitorWorkareaWin32(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height); 551GLFWvidmode* _glfwGetVideoModesWin32(_GLFWmonitor* monitor, int* count); 552GLFWbool _glfwGetVideoModeWin32(_GLFWmonitor* monitor, GLFWvidmode* mode); 553GLFWbool _glfwGetGammaRampWin32(_GLFWmonitor* monitor, GLFWgammaramp* ramp); 554void _glfwSetGammaRampWin32(_GLFWmonitor* monitor, const GLFWgammaramp* ramp); 555 556GLFWbool _glfwInitJoysticksWin32(void); 557void _glfwTerminateJoysticksWin32(void); 558GLFWbool _glfwPollJoystickWin32(_GLFWjoystick* js, int mode); 559const char* _glfwGetMappingNameWin32(void); 560void _glfwUpdateGamepadGUIDWin32(char* guid); 561 562GLFWbool _glfwInitWGL(void); 563void _glfwTerminateWGL(void); 564GLFWbool _glfwCreateContextWGL(_GLFWwindow* window, 565 const _GLFWctxconfig* ctxconfig, 566 const _GLFWfbconfig* fbconfig); 567 568
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.