2010-09-07 15:34:51 +00:00
|
|
|
//========================================================================
|
2019-04-16 12:43:29 +00:00
|
|
|
// GLFW 3.4 Win32 - www.glfw.org
|
2010-09-07 15:34:51 +00:00
|
|
|
//------------------------------------------------------------------------
|
|
|
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
2019-04-15 18:50:00 +00:00
|
|
|
// Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
|
2010-09-07 15:34:51 +00:00
|
|
|
//
|
|
|
|
// This software is provided 'as-is', without any express or implied
|
|
|
|
// warranty. In no event will the authors be held liable for any damages
|
|
|
|
// arising from the use of this software.
|
|
|
|
//
|
|
|
|
// Permission is granted to anyone to use this software for any purpose,
|
|
|
|
// including commercial applications, and to alter it and redistribute it
|
|
|
|
// freely, subject to the following restrictions:
|
|
|
|
//
|
|
|
|
// 1. The origin of this software must not be misrepresented; you must not
|
|
|
|
// claim that you wrote the original software. If you use this software
|
|
|
|
// in a product, an acknowledgment in the product documentation would
|
|
|
|
// be appreciated but is not required.
|
|
|
|
//
|
|
|
|
// 2. Altered source versions must be plainly marked as such, and must not
|
|
|
|
// be misrepresented as being the original software.
|
|
|
|
//
|
|
|
|
// 3. This notice may not be removed or altered from any source
|
|
|
|
// distribution.
|
|
|
|
//
|
|
|
|
//========================================================================
|
|
|
|
|
|
|
|
// We don't need all the fancy stuff
|
2012-03-29 21:41:05 +00:00
|
|
|
#ifndef NOMINMAX
|
|
|
|
#define NOMINMAX
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef VC_EXTRALEAN
|
|
|
|
#define VC_EXTRALEAN
|
|
|
|
#endif
|
2010-09-07 15:34:51 +00:00
|
|
|
|
2011-07-27 15:09:17 +00:00
|
|
|
#ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#endif
|
|
|
|
|
2014-08-20 15:49:58 +00:00
|
|
|
// This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
|
2021-04-11 22:04:33 +00:00
|
|
|
// example to allow applications to correctly declare a GL_KHR_debug callback)
|
|
|
|
// but windows.h assumes no one will define APIENTRY before it does
|
2012-01-18 17:44:28 +00:00
|
|
|
#undef APIENTRY
|
|
|
|
|
2012-02-05 01:41:52 +00:00
|
|
|
// GLFW on Windows is Unicode only and does not work in MBCS mode
|
|
|
|
#ifndef UNICODE
|
|
|
|
#define UNICODE
|
|
|
|
#endif
|
|
|
|
|
2013-09-03 11:38:16 +00:00
|
|
|
// GLFW requires Windows XP or later
|
2013-09-13 10:27:43 +00:00
|
|
|
#if WINVER < 0x0501
|
|
|
|
#undef WINVER
|
2012-03-29 23:55:28 +00:00
|
|
|
#define WINVER 0x0501
|
2012-03-22 13:58:14 +00:00
|
|
|
#endif
|
2013-09-13 10:27:43 +00:00
|
|
|
#if _WIN32_WINNT < 0x0501
|
|
|
|
#undef _WIN32_WINNT
|
2013-09-03 11:38:16 +00:00
|
|
|
#define _WIN32_WINNT 0x0501
|
|
|
|
#endif
|
2012-02-03 19:34:24 +00:00
|
|
|
|
2016-02-16 22:06:29 +00:00
|
|
|
// GLFW uses DirectInput8 interfaces
|
|
|
|
#define DIRECTINPUT_VERSION 0x0800
|
|
|
|
|
2019-02-13 22:21:05 +00:00
|
|
|
// GLFW uses OEM cursor resources
|
2019-02-11 17:14:03 +00:00
|
|
|
#define OEMRESOURCE
|
|
|
|
|
2016-03-31 12:22:54 +00:00
|
|
|
#include <wctype.h>
|
2014-03-31 20:33:22 +00:00
|
|
|
#include <windows.h>
|
2016-02-16 22:06:29 +00:00
|
|
|
#include <dinput.h>
|
2014-08-15 13:08:09 +00:00
|
|
|
#include <xinput.h>
|
2014-03-31 20:33:22 +00:00
|
|
|
#include <dbt.h>
|
|
|
|
|
2016-02-16 22:06:29 +00:00
|
|
|
// HACK: Define macros that some windows.h variants don't
|
2010-09-27 00:32:41 +00:00
|
|
|
#ifndef WM_MOUSEHWHEEL
|
2012-02-05 01:43:49 +00:00
|
|
|
#define WM_MOUSEHWHEEL 0x020E
|
2010-09-07 15:34:51 +00:00
|
|
|
#endif
|
2013-03-11 19:54:32 +00:00
|
|
|
#ifndef WM_DWMCOMPOSITIONCHANGED
|
|
|
|
#define WM_DWMCOMPOSITIONCHANGED 0x031E
|
|
|
|
#endif
|
2020-07-27 22:12:45 +00:00
|
|
|
#ifndef WM_DWMCOLORIZATIONCOLORCHANGED
|
|
|
|
#define WM_DWMCOLORIZATIONCOLORCHANGED 0x0320
|
|
|
|
#endif
|
2014-02-10 14:03:23 +00:00
|
|
|
#ifndef WM_COPYGLOBALDATA
|
|
|
|
#define WM_COPYGLOBALDATA 0x0049
|
|
|
|
#endif
|
2014-03-06 22:33:09 +00:00
|
|
|
#ifndef WM_UNICHAR
|
|
|
|
#define WM_UNICHAR 0x0109
|
|
|
|
#endif
|
|
|
|
#ifndef UNICODE_NOCHAR
|
|
|
|
#define UNICODE_NOCHAR 0xFFFF
|
|
|
|
#endif
|
2015-11-01 16:29:13 +00:00
|
|
|
#ifndef WM_DPICHANGED
|
|
|
|
#define WM_DPICHANGED 0x02E0
|
|
|
|
#endif
|
2015-11-10 12:42:56 +00:00
|
|
|
#ifndef GET_XBUTTON_WPARAM
|
|
|
|
#define GET_XBUTTON_WPARAM(w) (HIWORD(w))
|
|
|
|
#endif
|
2016-02-18 12:34:21 +00:00
|
|
|
#ifndef EDS_ROTATEDMODE
|
|
|
|
#define EDS_ROTATEDMODE 0x00000004
|
|
|
|
#endif
|
|
|
|
#ifndef DISPLAY_DEVICE_ACTIVE
|
|
|
|
#define DISPLAY_DEVICE_ACTIVE 0x00000001
|
|
|
|
#endif
|
2017-09-18 16:10:57 +00:00
|
|
|
#ifndef _WIN32_WINNT_WINBLUE
|
2020-09-29 17:03:42 +00:00
|
|
|
#define _WIN32_WINNT_WINBLUE 0x0603
|
2017-09-18 16:10:57 +00:00
|
|
|
#endif
|
2019-04-14 18:51:46 +00:00
|
|
|
#ifndef _WIN32_WINNT_WIN8
|
|
|
|
#define _WIN32_WINNT_WIN8 0x0602
|
|
|
|
#endif
|
2018-06-07 17:01:07 +00:00
|
|
|
#ifndef WM_GETDPISCALEDSIZE
|
|
|
|
#define WM_GETDPISCALEDSIZE 0x02e4
|
|
|
|
#endif
|
|
|
|
#ifndef USER_DEFAULT_SCREEN_DPI
|
|
|
|
#define USER_DEFAULT_SCREEN_DPI 96
|
|
|
|
#endif
|
2019-02-24 03:04:23 +00:00
|
|
|
#ifndef OCR_HAND
|
|
|
|
#define OCR_HAND 32649
|
|
|
|
#endif
|
2014-02-10 14:03:23 +00:00
|
|
|
|
2014-02-10 20:12:20 +00:00
|
|
|
#if WINVER < 0x0601
|
2017-11-29 20:04:57 +00:00
|
|
|
typedef struct
|
2014-02-10 14:03:23 +00:00
|
|
|
{
|
|
|
|
DWORD cbSize;
|
|
|
|
DWORD ExtStatus;
|
2017-11-29 20:04:57 +00:00
|
|
|
} CHANGEFILTERSTRUCT;
|
2014-02-10 20:12:20 +00:00
|
|
|
#ifndef MSGFLT_ALLOW
|
|
|
|
#define MSGFLT_ALLOW 1
|
|
|
|
#endif
|
|
|
|
#endif /*Windows 7*/
|
2010-09-07 15:34:51 +00:00
|
|
|
|
2017-09-18 16:10:57 +00:00
|
|
|
#if WINVER < 0x0600
|
|
|
|
#define DWM_BB_ENABLE 0x00000001
|
|
|
|
#define DWM_BB_BLURREGION 0x00000002
|
2016-02-24 04:40:22 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
DWORD dwFlags;
|
|
|
|
BOOL fEnable;
|
|
|
|
HRGN hRgnBlur;
|
|
|
|
BOOL fTransitionOnMaximized;
|
|
|
|
} DWM_BLURBEHIND;
|
2018-04-15 08:23:34 +00:00
|
|
|
#else
|
2018-04-17 21:02:47 +00:00
|
|
|
#include <dwmapi.h>
|
2017-09-18 16:10:57 +00:00
|
|
|
#endif /*Windows Vista*/
|
2016-02-24 04:40:22 +00:00
|
|
|
|
2017-09-18 16:10:57 +00:00
|
|
|
#ifndef DPI_ENUMS_DECLARED
|
2017-11-29 20:04:57 +00:00
|
|
|
typedef enum
|
2017-08-29 18:05:44 +00:00
|
|
|
{
|
2017-09-18 16:10:57 +00:00
|
|
|
PROCESS_DPI_UNAWARE = 0,
|
|
|
|
PROCESS_SYSTEM_DPI_AWARE = 1,
|
|
|
|
PROCESS_PER_MONITOR_DPI_AWARE = 2
|
|
|
|
} PROCESS_DPI_AWARENESS;
|
2017-11-29 20:04:57 +00:00
|
|
|
typedef enum
|
2017-08-29 17:19:00 +00:00
|
|
|
{
|
|
|
|
MDT_EFFECTIVE_DPI = 0,
|
|
|
|
MDT_ANGULAR_DPI = 1,
|
|
|
|
MDT_RAW_DPI = 2,
|
|
|
|
MDT_DEFAULT = MDT_EFFECTIVE_DPI
|
|
|
|
} MONITOR_DPI_TYPE;
|
2017-09-18 16:10:57 +00:00
|
|
|
#endif /*DPI_ENUMS_DECLARED*/
|
2017-08-29 18:05:44 +00:00
|
|
|
|
2018-09-05 20:45:06 +00:00
|
|
|
#ifndef DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
|
2018-09-26 16:04:53 +00:00
|
|
|
#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((HANDLE) -4)
|
2018-09-05 20:45:06 +00:00
|
|
|
#endif /*DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2*/
|
2018-06-07 17:01:07 +00:00
|
|
|
|
2022-03-09 17:18:04 +00:00
|
|
|
// Replacement for versionhelpers.h macros, as we cannot rely on the
|
|
|
|
// application having a correct embedded manifest
|
|
|
|
//
|
2018-06-07 17:01:07 +00:00
|
|
|
#define IsWindowsVistaOrGreater() \
|
|
|
|
_glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_VISTA), \
|
|
|
|
LOBYTE(_WIN32_WINNT_VISTA), 0)
|
|
|
|
#define IsWindows7OrGreater() \
|
|
|
|
_glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN7), \
|
|
|
|
LOBYTE(_WIN32_WINNT_WIN7), 0)
|
|
|
|
#define IsWindows8OrGreater() \
|
|
|
|
_glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WIN8), \
|
|
|
|
LOBYTE(_WIN32_WINNT_WIN8), 0)
|
|
|
|
#define IsWindows8Point1OrGreater() \
|
|
|
|
_glfwIsWindowsVersionOrGreaterWin32(HIBYTE(_WIN32_WINNT_WINBLUE), \
|
|
|
|
LOBYTE(_WIN32_WINNT_WINBLUE), 0)
|
|
|
|
|
2022-03-09 16:30:06 +00:00
|
|
|
// Windows 10 Anniversary Update
|
|
|
|
#define _glfwIsWindows10Version1607OrGreaterWin32() \
|
2018-06-07 17:01:07 +00:00
|
|
|
_glfwIsWindows10BuildOrGreaterWin32(14393)
|
2022-03-09 16:30:06 +00:00
|
|
|
// Windows 10 Creators Update
|
|
|
|
#define _glfwIsWindows10Version1703OrGreaterWin32() \
|
2018-06-07 17:01:07 +00:00
|
|
|
_glfwIsWindows10BuildOrGreaterWin32(15063)
|
2017-08-29 18:05:44 +00:00
|
|
|
|
2016-02-16 22:06:29 +00:00
|
|
|
// HACK: Define macros that some xinput.h variants don't
|
2014-08-15 13:08:09 +00:00
|
|
|
#ifndef XINPUT_CAPS_WIRELESS
|
|
|
|
#define XINPUT_CAPS_WIRELESS 0x0002
|
|
|
|
#endif
|
|
|
|
#ifndef XINPUT_DEVSUBTYPE_WHEEL
|
|
|
|
#define XINPUT_DEVSUBTYPE_WHEEL 0x02
|
|
|
|
#endif
|
|
|
|
#ifndef XINPUT_DEVSUBTYPE_ARCADE_STICK
|
|
|
|
#define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03
|
|
|
|
#endif
|
|
|
|
#ifndef XINPUT_DEVSUBTYPE_FLIGHT_STICK
|
|
|
|
#define XINPUT_DEVSUBTYPE_FLIGHT_STICK 0x04
|
|
|
|
#endif
|
|
|
|
#ifndef XINPUT_DEVSUBTYPE_DANCE_PAD
|
|
|
|
#define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05
|
|
|
|
#endif
|
|
|
|
#ifndef XINPUT_DEVSUBTYPE_GUITAR
|
|
|
|
#define XINPUT_DEVSUBTYPE_GUITAR 0x06
|
|
|
|
#endif
|
|
|
|
#ifndef XINPUT_DEVSUBTYPE_DRUM_KIT
|
|
|
|
#define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08
|
|
|
|
#endif
|
|
|
|
#ifndef XINPUT_DEVSUBTYPE_ARCADE_PAD
|
|
|
|
#define XINPUT_DEVSUBTYPE_ARCADE_PAD 0x13
|
|
|
|
#endif
|
2016-03-31 11:07:06 +00:00
|
|
|
#ifndef XUSER_MAX_COUNT
|
|
|
|
#define XUSER_MAX_COUNT 4
|
|
|
|
#endif
|
2014-08-15 13:08:09 +00:00
|
|
|
|
2016-02-16 22:06:29 +00:00
|
|
|
// HACK: Define macros that some dinput.h variants don't
|
|
|
|
#ifndef DIDFT_OPTIONAL
|
2019-06-07 21:35:10 +00:00
|
|
|
#define DIDFT_OPTIONAL 0x80000000
|
2016-02-16 22:06:29 +00:00
|
|
|
#endif
|
|
|
|
|
2021-07-18 14:57:53 +00:00
|
|
|
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
|
|
|
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
|
|
|
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
|
|
|
#define WGL_PIXEL_TYPE_ARB 0x2013
|
|
|
|
#define WGL_TYPE_RGBA_ARB 0x202b
|
|
|
|
#define WGL_ACCELERATION_ARB 0x2003
|
|
|
|
#define WGL_NO_ACCELERATION_ARB 0x2025
|
|
|
|
#define WGL_RED_BITS_ARB 0x2015
|
|
|
|
#define WGL_RED_SHIFT_ARB 0x2016
|
|
|
|
#define WGL_GREEN_BITS_ARB 0x2017
|
|
|
|
#define WGL_GREEN_SHIFT_ARB 0x2018
|
|
|
|
#define WGL_BLUE_BITS_ARB 0x2019
|
|
|
|
#define WGL_BLUE_SHIFT_ARB 0x201a
|
|
|
|
#define WGL_ALPHA_BITS_ARB 0x201b
|
|
|
|
#define WGL_ALPHA_SHIFT_ARB 0x201c
|
|
|
|
#define WGL_ACCUM_BITS_ARB 0x201d
|
|
|
|
#define WGL_ACCUM_RED_BITS_ARB 0x201e
|
|
|
|
#define WGL_ACCUM_GREEN_BITS_ARB 0x201f
|
|
|
|
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
|
|
|
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
|
|
|
#define WGL_DEPTH_BITS_ARB 0x2022
|
|
|
|
#define WGL_STENCIL_BITS_ARB 0x2023
|
|
|
|
#define WGL_AUX_BUFFERS_ARB 0x2024
|
|
|
|
#define WGL_STEREO_ARB 0x2012
|
|
|
|
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
|
|
|
#define WGL_SAMPLES_ARB 0x2042
|
|
|
|
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20a9
|
|
|
|
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
|
|
|
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
|
|
|
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
|
|
|
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
|
|
|
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
|
|
|
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
|
|
|
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
|
|
|
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
|
|
|
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
|
|
|
#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
|
|
|
#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
|
|
|
#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
|
|
|
#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
|
|
|
|
#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
|
|
|
#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
|
|
|
#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
|
|
|
#define WGL_CONTEXT_OPENGL_NO_ERROR_ARB 0x31b3
|
|
|
|
#define WGL_COLORSPACE_EXT 0x309d
|
|
|
|
#define WGL_COLORSPACE_SRGB_EXT 0x3089
|
|
|
|
|
|
|
|
#define ERROR_INVALID_VERSION_ARB 0x2095
|
|
|
|
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
|
|
|
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
|
|
|
|
2014-08-15 13:08:09 +00:00
|
|
|
// xinput.dll function pointer typedefs
|
2016-12-06 19:10:51 +00:00
|
|
|
typedef DWORD (WINAPI * PFN_XInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*);
|
|
|
|
typedef DWORD (WINAPI * PFN_XInputGetState)(DWORD,XINPUT_STATE*);
|
2017-01-29 17:03:51 +00:00
|
|
|
#define XInputGetCapabilities _glfw.win32.xinput.GetCapabilities
|
|
|
|
#define XInputGetState _glfw.win32.xinput.GetState
|
2014-08-15 13:08:09 +00:00
|
|
|
|
2016-02-16 22:06:29 +00:00
|
|
|
// dinput8.dll function pointer typedefs
|
2016-12-06 19:10:51 +00:00
|
|
|
typedef HRESULT (WINAPI * PFN_DirectInput8Create)(HINSTANCE,DWORD,REFIID,LPVOID*,LPUNKNOWN);
|
2017-01-29 17:03:51 +00:00
|
|
|
#define DirectInput8Create _glfw.win32.dinput8.Create
|
2016-02-16 22:06:29 +00:00
|
|
|
|
2013-03-10 18:23:42 +00:00
|
|
|
// user32.dll function pointer typedefs
|
2016-12-06 19:10:51 +00:00
|
|
|
typedef BOOL (WINAPI * PFN_SetProcessDPIAware)(void);
|
2017-11-29 20:04:57 +00:00
|
|
|
typedef BOOL (WINAPI * PFN_ChangeWindowMessageFilterEx)(HWND,UINT,DWORD,CHANGEFILTERSTRUCT*);
|
2018-06-07 17:01:07 +00:00
|
|
|
typedef BOOL (WINAPI * PFN_EnableNonClientDpiScaling)(HWND);
|
2018-09-26 16:04:53 +00:00
|
|
|
typedef BOOL (WINAPI * PFN_SetProcessDpiAwarenessContext)(HANDLE);
|
2018-06-07 17:01:07 +00:00
|
|
|
typedef UINT (WINAPI * PFN_GetDpiForWindow)(HWND);
|
|
|
|
typedef BOOL (WINAPI * PFN_AdjustWindowRectExForDpi)(LPRECT,DWORD,BOOL,DWORD,UINT);
|
2022-03-08 22:00:47 +00:00
|
|
|
typedef int (WINAPI * PFN_GetSystemMetricsForDpi)(int,UINT);
|
2017-08-29 18:05:44 +00:00
|
|
|
#define SetProcessDPIAware _glfw.win32.user32.SetProcessDPIAware_
|
|
|
|
#define ChangeWindowMessageFilterEx _glfw.win32.user32.ChangeWindowMessageFilterEx_
|
2018-06-07 17:01:07 +00:00
|
|
|
#define EnableNonClientDpiScaling _glfw.win32.user32.EnableNonClientDpiScaling_
|
|
|
|
#define SetProcessDpiAwarenessContext _glfw.win32.user32.SetProcessDpiAwarenessContext_
|
|
|
|
#define GetDpiForWindow _glfw.win32.user32.GetDpiForWindow_
|
|
|
|
#define AdjustWindowRectExForDpi _glfw.win32.user32.AdjustWindowRectExForDpi_
|
2022-03-08 22:00:47 +00:00
|
|
|
#define GetSystemMetricsForDpi _glfw.win32.user32.GetSystemMetricsForDpi_
|
2013-03-10 18:23:42 +00:00
|
|
|
|
2013-03-11 19:54:32 +00:00
|
|
|
// dwmapi.dll function pointer typedefs
|
2016-12-06 19:10:51 +00:00
|
|
|
typedef HRESULT (WINAPI * PFN_DwmIsCompositionEnabled)(BOOL*);
|
|
|
|
typedef HRESULT (WINAPI * PFN_DwmFlush)(VOID);
|
2017-09-18 16:10:57 +00:00
|
|
|
typedef HRESULT(WINAPI * PFN_DwmEnableBlurBehindWindow)(HWND,const DWM_BLURBEHIND*);
|
2020-07-27 22:12:45 +00:00
|
|
|
typedef HRESULT (WINAPI * PFN_DwmGetColorizationColor)(DWORD*,BOOL*);
|
2017-08-20 12:41:49 +00:00
|
|
|
#define DwmIsCompositionEnabled _glfw.win32.dwmapi.IsCompositionEnabled
|
|
|
|
#define DwmFlush _glfw.win32.dwmapi.Flush
|
2017-09-18 16:10:57 +00:00
|
|
|
#define DwmEnableBlurBehindWindow _glfw.win32.dwmapi.EnableBlurBehindWindow
|
2020-07-27 22:12:45 +00:00
|
|
|
#define DwmGetColorizationColor _glfw.win32.dwmapi.GetColorizationColor
|
2013-03-11 19:54:32 +00:00
|
|
|
|
2015-11-01 16:29:13 +00:00
|
|
|
// shcore.dll function pointer typedefs
|
2016-12-06 19:10:51 +00:00
|
|
|
typedef HRESULT (WINAPI * PFN_SetProcessDpiAwareness)(PROCESS_DPI_AWARENESS);
|
2017-08-29 17:19:00 +00:00
|
|
|
typedef HRESULT (WINAPI * PFN_GetDpiForMonitor)(HMONITOR,MONITOR_DPI_TYPE,UINT*,UINT*);
|
2017-08-29 18:05:44 +00:00
|
|
|
#define SetProcessDpiAwareness _glfw.win32.shcore.SetProcessDpiAwareness_
|
2017-08-29 17:19:00 +00:00
|
|
|
#define GetDpiForMonitor _glfw.win32.shcore.GetDpiForMonitor_
|
2015-11-01 16:29:13 +00:00
|
|
|
|
2018-06-07 17:01:07 +00:00
|
|
|
// ntdll.dll function pointer typedefs
|
|
|
|
typedef LONG (WINAPI * PFN_RtlVerifyVersionInfo)(OSVERSIONINFOEXW*,ULONG,ULONGLONG);
|
|
|
|
#define RtlVerifyVersionInfo _glfw.win32.ntdll.RtlVerifyVersionInfo_
|
|
|
|
|
2021-07-18 14:57:53 +00:00
|
|
|
// WGL extension pointer typedefs
|
|
|
|
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC)(int);
|
|
|
|
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC,int,int,UINT,const int*,int*);
|
|
|
|
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC)(void);
|
|
|
|
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC);
|
|
|
|
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC,HGLRC,const int*);
|
|
|
|
#define wglSwapIntervalEXT _glfw.wgl.SwapIntervalEXT
|
|
|
|
#define wglGetPixelFormatAttribivARB _glfw.wgl.GetPixelFormatAttribivARB
|
|
|
|
#define wglGetExtensionsStringEXT _glfw.wgl.GetExtensionsStringEXT
|
|
|
|
#define wglGetExtensionsStringARB _glfw.wgl.GetExtensionsStringARB
|
|
|
|
#define wglCreateContextAttribsARB _glfw.wgl.CreateContextAttribsARB
|
|
|
|
|
|
|
|
// opengl32.dll function pointer typedefs
|
|
|
|
typedef HGLRC (WINAPI * PFN_wglCreateContext)(HDC);
|
|
|
|
typedef BOOL (WINAPI * PFN_wglDeleteContext)(HGLRC);
|
|
|
|
typedef PROC (WINAPI * PFN_wglGetProcAddress)(LPCSTR);
|
|
|
|
typedef HDC (WINAPI * PFN_wglGetCurrentDC)(void);
|
|
|
|
typedef HGLRC (WINAPI * PFN_wglGetCurrentContext)(void);
|
|
|
|
typedef BOOL (WINAPI * PFN_wglMakeCurrent)(HDC,HGLRC);
|
|
|
|
typedef BOOL (WINAPI * PFN_wglShareLists)(HGLRC,HGLRC);
|
|
|
|
#define wglCreateContext _glfw.wgl.CreateContext
|
|
|
|
#define wglDeleteContext _glfw.wgl.DeleteContext
|
|
|
|
#define wglGetProcAddress _glfw.wgl.GetProcAddress
|
|
|
|
#define wglGetCurrentDC _glfw.wgl.GetCurrentDC
|
|
|
|
#define wglGetCurrentContext _glfw.wgl.GetCurrentContext
|
|
|
|
#define wglMakeCurrent _glfw.wgl.MakeCurrent
|
|
|
|
#define wglShareLists _glfw.wgl.ShareLists
|
|
|
|
|
2015-08-10 18:19:04 +00:00
|
|
|
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
|
|
|
|
|
|
|
|
typedef struct VkWin32SurfaceCreateInfoKHR
|
|
|
|
{
|
|
|
|
VkStructureType sType;
|
|
|
|
const void* pNext;
|
|
|
|
VkWin32SurfaceCreateFlagsKHR flags;
|
|
|
|
HINSTANCE hinstance;
|
|
|
|
HWND hwnd;
|
|
|
|
} VkWin32SurfaceCreateInfoKHR;
|
|
|
|
|
|
|
|
typedef VkResult (APIENTRY *PFN_vkCreateWin32SurfaceKHR)(VkInstance,const VkWin32SurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);
|
|
|
|
typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice,uint32_t);
|
|
|
|
|
2021-07-13 19:50:09 +00:00
|
|
|
#define GLFW_WIN32_WINDOW_STATE _GLFWwindowWin32 win32;
|
|
|
|
#define GLFW_WIN32_LIBRARY_WINDOW_STATE _GLFWlibraryWin32 win32;
|
|
|
|
#define GLFW_WIN32_MONITOR_STATE _GLFWmonitorWin32 win32;
|
|
|
|
#define GLFW_WIN32_CURSOR_STATE _GLFWcursorWin32 win32;
|
2010-09-10 20:26:17 +00:00
|
|
|
|
2021-07-13 19:50:09 +00:00
|
|
|
#define GLFW_WGL_CONTEXT_STATE _GLFWcontextWGL wgl;
|
|
|
|
#define GLFW_WGL_LIBRARY_CONTEXT_STATE _GLFWlibraryWGL wgl;
|
2021-07-18 14:57:53 +00:00
|
|
|
|
2023-03-01 16:25:58 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
TBPF_NOPROGRESS = 0x0,
|
|
|
|
TBPF_INDETERMINATE = 0x1,
|
|
|
|
TBPF_NORMAL = 0x2,
|
|
|
|
TBPF_ERROR = 0x4,
|
|
|
|
TBPF_PAUSED = 0x8
|
|
|
|
} TBPFLAG;
|
|
|
|
|
|
|
|
static const IID IID_ITaskbarList3 = { 0xea1afb91, 0x9e28, 0x4b86, {0x90, 0xe9, 0x9e, 0x9f, 0x8a, 0x5e, 0xef, 0xaf} };
|
|
|
|
static const IID CLSID_TaskbarList = { 0x56fdf344, 0xfd6d, 0x11d0, {0x95, 0x8a, 0x00, 0x60, 0x97, 0xc9, 0xa0, 0x90} };
|
|
|
|
|
|
|
|
typedef enum THUMBBUTTONMASK
|
|
|
|
{
|
|
|
|
THB_BITMAP = 0x1,
|
|
|
|
THB_ICON = 0x2,
|
|
|
|
THB_TOOLTIP = 0x4,
|
|
|
|
THB_FLAGS = 0x8
|
2023-03-03 15:18:16 +00:00
|
|
|
} THUMBBUTTONMASK;
|
2023-03-01 16:25:58 +00:00
|
|
|
|
|
|
|
typedef enum THUMBBUTTONFLAGS
|
|
|
|
{
|
|
|
|
THBF_ENABLED = 0,
|
|
|
|
THBF_DISABLED = 0x1,
|
|
|
|
THBF_DISMISSONCLICK = 0x2,
|
|
|
|
THBF_NOBACKGROUND = 0x4,
|
|
|
|
THBF_HIDDEN = 0x8,
|
|
|
|
THBF_NONINTERACTIVE = 0x10
|
2023-03-03 15:18:16 +00:00
|
|
|
} THUMBBUTTONFLAGS;
|
2023-03-01 16:25:58 +00:00
|
|
|
|
|
|
|
typedef struct THUMBBUTTON {
|
|
|
|
THUMBBUTTONMASK dwMask;
|
|
|
|
UINT iId;
|
|
|
|
UINT iBitmap;
|
|
|
|
HICON hIcon;
|
|
|
|
WCHAR szTip[260];
|
|
|
|
THUMBBUTTONFLAGS dwFlags;
|
2023-03-03 15:18:16 +00:00
|
|
|
} THUMBBUTTON, *LPTHUMBBUTTON;
|
2023-03-01 16:25:58 +00:00
|
|
|
|
|
|
|
struct _IMAGELIST;
|
|
|
|
typedef struct _IMAGELIST* HIMAGELIST;
|
|
|
|
|
|
|
|
typedef struct ITaskbarList3 ITaskbarList3;
|
|
|
|
|
|
|
|
typedef struct ITaskbarList3Vtbl
|
|
|
|
{
|
|
|
|
HRESULT(WINAPI* QueryInterface)(struct ITaskbarList3*, const IID* const, void**);
|
|
|
|
ULONG(WINAPI* AddRef)(struct ITaskbarList3*);
|
|
|
|
ULONG(WINAPI* Release)(struct ITaskbarList3*);
|
|
|
|
HRESULT(WINAPI* HrInit)(struct ITaskbarList3*);
|
|
|
|
HRESULT(WINAPI* AddTab)(struct ITaskbarList3*, HWND);
|
|
|
|
HRESULT(WINAPI* DeleteTab)(struct ITaskbarList3*, HWND);
|
|
|
|
HRESULT(WINAPI* ActivateTab)(struct ITaskbarList3*, HWND);
|
|
|
|
HRESULT(WINAPI* SetActiveAlt)(struct ITaskbarList3*, HWND);
|
|
|
|
HRESULT(WINAPI* MarkFullscreenWindow)(struct ITaskbarList3*, HWND, BOOL);
|
|
|
|
HRESULT(WINAPI* SetProgressValue)(struct ITaskbarList3*, HWND, ULONGLONG, ULONGLONG);
|
|
|
|
HRESULT(WINAPI* SetProgressState)(struct ITaskbarList3*, HWND, TBPFLAG);
|
|
|
|
HRESULT(WINAPI* RegisterTab)(struct ITaskbarList3*, HWND, HWND);
|
|
|
|
HRESULT(WINAPI* UnregisterTab)(struct ITaskbarList3*, HWND);
|
|
|
|
HRESULT(WINAPI* SetTabOrder)(struct ITaskbarList3*, HWND, HWND);
|
|
|
|
HRESULT(WINAPI* SetTabActive)(struct ITaskbarList3*, HWND, HWND, DWORD);
|
|
|
|
HRESULT(WINAPI* ThumbBarAddButtons)(struct ITaskbarList3*, HWND, UINT, LPTHUMBBUTTON);
|
|
|
|
HRESULT(WINAPI* ThumbBarUpdateButtons)(struct ITaskbarList3*, HWND, UINT, LPTHUMBBUTTON);
|
|
|
|
HRESULT(WINAPI* ThumbBarSetImageList)(struct ITaskbarList3*, HWND, HIMAGELIST);
|
|
|
|
HRESULT(WINAPI* SetOverlayIcon)(struct ITaskbarList3*, HWND, HICON, LPCWSTR);
|
|
|
|
HRESULT(WINAPI* SetThumbnailTooltip)(struct ITaskbarList3*, HWND, LPCWSTR);
|
|
|
|
HRESULT(WINAPI* SetThumbnailClip)(struct ITaskbarList3*, HWND, RECT*);
|
|
|
|
} ITaskbarList3Vtbl;
|
|
|
|
|
|
|
|
struct ITaskbarList3
|
|
|
|
{
|
|
|
|
struct ITaskbarList3Vtbl* lpVtbl;
|
|
|
|
};
|
2021-07-18 14:57:53 +00:00
|
|
|
|
|
|
|
// WGL-specific per-context data
|
|
|
|
//
|
|
|
|
typedef struct _GLFWcontextWGL
|
|
|
|
{
|
|
|
|
HDC dc;
|
|
|
|
HGLRC handle;
|
|
|
|
int interval;
|
|
|
|
} _GLFWcontextWGL;
|
|
|
|
|
|
|
|
// WGL-specific global data
|
|
|
|
//
|
|
|
|
typedef struct _GLFWlibraryWGL
|
|
|
|
{
|
|
|
|
HINSTANCE instance;
|
|
|
|
PFN_wglCreateContext CreateContext;
|
|
|
|
PFN_wglDeleteContext DeleteContext;
|
|
|
|
PFN_wglGetProcAddress GetProcAddress;
|
|
|
|
PFN_wglGetCurrentDC GetCurrentDC;
|
|
|
|
PFN_wglGetCurrentContext GetCurrentContext;
|
|
|
|
PFN_wglMakeCurrent MakeCurrent;
|
|
|
|
PFN_wglShareLists ShareLists;
|
|
|
|
|
|
|
|
PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT;
|
|
|
|
PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB;
|
|
|
|
PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT;
|
|
|
|
PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB;
|
|
|
|
PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB;
|
|
|
|
GLFWbool EXT_swap_control;
|
|
|
|
GLFWbool EXT_colorspace;
|
|
|
|
GLFWbool ARB_multisample;
|
|
|
|
GLFWbool ARB_framebuffer_sRGB;
|
|
|
|
GLFWbool EXT_framebuffer_sRGB;
|
|
|
|
GLFWbool ARB_pixel_format;
|
|
|
|
GLFWbool ARB_create_context;
|
|
|
|
GLFWbool ARB_create_context_profile;
|
|
|
|
GLFWbool EXT_create_context_es2_profile;
|
|
|
|
GLFWbool ARB_create_context_robustness;
|
|
|
|
GLFWbool ARB_create_context_no_error;
|
|
|
|
GLFWbool ARB_context_flush_control;
|
|
|
|
} _GLFWlibraryWGL;
|
2010-09-10 20:26:17 +00:00
|
|
|
|
2014-09-02 17:42:43 +00:00
|
|
|
// Win32-specific per-window data
|
|
|
|
//
|
2010-09-10 20:26:17 +00:00
|
|
|
typedef struct _GLFWwindowWin32
|
|
|
|
{
|
2014-09-02 17:42:43 +00:00
|
|
|
HWND handle;
|
2016-03-07 13:55:30 +00:00
|
|
|
HICON bigIcon;
|
|
|
|
HICON smallIcon;
|
2010-09-07 15:34:51 +00:00
|
|
|
|
2015-08-23 17:30:04 +00:00
|
|
|
GLFWbool cursorTracked;
|
2017-09-08 14:15:57 +00:00
|
|
|
GLFWbool frameAction;
|
2015-08-23 17:30:04 +00:00
|
|
|
GLFWbool iconified;
|
2016-06-16 11:09:28 +00:00
|
|
|
GLFWbool maximized;
|
2017-09-18 16:10:57 +00:00
|
|
|
// Whether to enable framebuffer transparency on DWM
|
|
|
|
GLFWbool transparent;
|
2018-08-31 11:33:48 +00:00
|
|
|
GLFWbool scaleToMonitor;
|
2019-08-20 17:00:59 +00:00
|
|
|
GLFWbool keymenu;
|
2014-02-11 17:24:01 +00:00
|
|
|
|
2020-10-07 21:35:17 +00:00
|
|
|
// Cached size used to filter out duplicate events
|
|
|
|
int width, height;
|
|
|
|
|
2014-02-11 17:24:01 +00:00
|
|
|
// The last received cursor position, regardless of source
|
2016-05-24 10:23:58 +00:00
|
|
|
int lastCursorPosX, lastCursorPosY;
|
2021-09-15 12:20:56 +00:00
|
|
|
// The last received high surrogate when decoding pairs of UTF-16 messages
|
2020-06-29 18:43:28 +00:00
|
|
|
WCHAR highSurrogate;
|
2022-07-23 19:28:35 +00:00
|
|
|
|
2023-03-03 15:18:16 +00:00
|
|
|
ITaskbarList3* taskbarList;
|
|
|
|
UINT taskbarListMsgID;
|
2010-09-10 20:26:17 +00:00
|
|
|
} _GLFWwindowWin32;
|
2010-09-07 15:34:51 +00:00
|
|
|
|
2014-09-02 17:42:43 +00:00
|
|
|
// Win32-specific global data
|
|
|
|
//
|
2010-09-10 20:26:17 +00:00
|
|
|
typedef struct _GLFWlibraryWin32
|
|
|
|
{
|
2022-03-17 22:54:39 +00:00
|
|
|
HINSTANCE instance;
|
2016-05-30 19:19:00 +00:00
|
|
|
HWND helperWindowHandle;
|
2022-05-06 15:58:42 +00:00
|
|
|
ATOM helperWindowClass;
|
|
|
|
ATOM mainWindowClass;
|
2018-01-04 19:45:55 +00:00
|
|
|
HDEVNOTIFY deviceNotificationHandle;
|
2017-02-09 20:21:58 +00:00
|
|
|
int acquiredMonitorCount;
|
2013-01-02 15:48:02 +00:00
|
|
|
char* clipboardString;
|
2016-09-07 13:43:39 +00:00
|
|
|
short int keycodes[512];
|
|
|
|
short int scancodes[GLFW_KEY_LAST + 1];
|
2017-02-07 02:29:57 +00:00
|
|
|
char keynames[GLFW_KEY_LAST + 1][5];
|
2016-05-25 12:06:02 +00:00
|
|
|
// Where to place the cursor when re-enabled
|
|
|
|
double restoreCursorPosX, restoreCursorPosY;
|
2016-05-30 19:21:09 +00:00
|
|
|
// The window whose disabled cursor mode is active
|
|
|
|
_GLFWwindow* disabledCursorWindow;
|
2019-07-08 12:45:31 +00:00
|
|
|
// The window the cursor is captured in
|
|
|
|
_GLFWwindow* capturedCursorWindow;
|
2017-01-10 17:16:15 +00:00
|
|
|
RAWINPUT* rawInput;
|
|
|
|
int rawInputSize;
|
2018-08-01 22:01:26 +00:00
|
|
|
UINT mouseTrailSize;
|
2010-09-10 20:26:17 +00:00
|
|
|
|
2016-02-16 22:06:29 +00:00
|
|
|
struct {
|
2016-12-06 21:47:25 +00:00
|
|
|
HINSTANCE instance;
|
2017-01-29 17:03:51 +00:00
|
|
|
PFN_DirectInput8Create Create;
|
2016-12-06 21:47:25 +00:00
|
|
|
IDirectInput8W* api;
|
2016-02-16 22:06:29 +00:00
|
|
|
} dinput8;
|
|
|
|
|
2013-03-10 18:23:42 +00:00
|
|
|
struct {
|
2016-12-06 21:47:25 +00:00
|
|
|
HINSTANCE instance;
|
2017-01-29 17:03:51 +00:00
|
|
|
PFN_XInputGetCapabilities GetCapabilities;
|
|
|
|
PFN_XInputGetState GetState;
|
2014-08-15 13:08:09 +00:00
|
|
|
} xinput;
|
|
|
|
|
|
|
|
struct {
|
2016-12-06 21:47:25 +00:00
|
|
|
HINSTANCE instance;
|
2017-08-29 18:05:44 +00:00
|
|
|
PFN_SetProcessDPIAware SetProcessDPIAware_;
|
|
|
|
PFN_ChangeWindowMessageFilterEx ChangeWindowMessageFilterEx_;
|
2018-06-07 17:01:07 +00:00
|
|
|
PFN_EnableNonClientDpiScaling EnableNonClientDpiScaling_;
|
|
|
|
PFN_SetProcessDpiAwarenessContext SetProcessDpiAwarenessContext_;
|
|
|
|
PFN_GetDpiForWindow GetDpiForWindow_;
|
|
|
|
PFN_AdjustWindowRectExForDpi AdjustWindowRectExForDpi_;
|
2022-03-08 22:00:47 +00:00
|
|
|
PFN_GetSystemMetricsForDpi GetSystemMetricsForDpi_;
|
2013-03-10 18:23:42 +00:00
|
|
|
} user32;
|
|
|
|
|
2013-03-11 19:54:32 +00:00
|
|
|
struct {
|
2016-12-06 21:47:25 +00:00
|
|
|
HINSTANCE instance;
|
2017-08-20 12:41:49 +00:00
|
|
|
PFN_DwmIsCompositionEnabled IsCompositionEnabled;
|
|
|
|
PFN_DwmFlush Flush;
|
2017-09-18 16:10:57 +00:00
|
|
|
PFN_DwmEnableBlurBehindWindow EnableBlurBehindWindow;
|
2020-07-27 22:12:45 +00:00
|
|
|
PFN_DwmGetColorizationColor GetColorizationColor;
|
2013-03-11 19:54:32 +00:00
|
|
|
} dwmapi;
|
|
|
|
|
2015-11-01 16:29:13 +00:00
|
|
|
struct {
|
2016-12-06 21:47:25 +00:00
|
|
|
HINSTANCE instance;
|
2017-08-29 18:05:44 +00:00
|
|
|
PFN_SetProcessDpiAwareness SetProcessDpiAwareness_;
|
2017-08-29 17:19:00 +00:00
|
|
|
PFN_GetDpiForMonitor GetDpiForMonitor_;
|
2015-11-01 16:29:13 +00:00
|
|
|
} shcore;
|
|
|
|
|
2018-06-07 17:01:07 +00:00
|
|
|
struct {
|
|
|
|
HINSTANCE instance;
|
|
|
|
PFN_RtlVerifyVersionInfo RtlVerifyVersionInfo_;
|
|
|
|
} ntdll;
|
2010-09-10 20:26:17 +00:00
|
|
|
} _GLFWlibraryWin32;
|
2010-09-07 15:34:51 +00:00
|
|
|
|
2014-09-02 17:42:43 +00:00
|
|
|
// Win32-specific per-monitor data
|
|
|
|
//
|
2011-10-03 07:24:35 +00:00
|
|
|
typedef struct _GLFWmonitorWin32
|
2011-10-02 20:13:47 +00:00
|
|
|
{
|
2017-08-27 20:42:23 +00:00
|
|
|
HMONITOR handle;
|
2013-02-20 14:44:37 +00:00
|
|
|
// This size matches the static size of DISPLAY_DEVICE.DeviceName
|
2014-09-12 15:00:05 +00:00
|
|
|
WCHAR adapterName[32];
|
|
|
|
WCHAR displayName[32];
|
2017-11-06 17:27:39 +00:00
|
|
|
char publicAdapterName[32];
|
|
|
|
char publicDisplayName[32];
|
2015-08-23 17:30:04 +00:00
|
|
|
GLFWbool modesPruned;
|
|
|
|
GLFWbool modeChanged;
|
2011-10-03 07:24:35 +00:00
|
|
|
} _GLFWmonitorWin32;
|
2010-09-07 15:34:51 +00:00
|
|
|
|
2014-09-02 17:42:43 +00:00
|
|
|
// Win32-specific per-cursor data
|
|
|
|
//
|
2013-12-04 13:19:22 +00:00
|
|
|
typedef struct _GLFWcursorWin32
|
|
|
|
{
|
2016-12-06 21:47:25 +00:00
|
|
|
HCURSOR handle;
|
2013-12-04 13:19:22 +00:00
|
|
|
} _GLFWcursorWin32;
|
|
|
|
|
2021-07-13 19:50:09 +00:00
|
|
|
GLFWbool _glfwConnectWin32(int platformID, _GLFWplatform* platform);
|
|
|
|
int _glfwInitWin32(void);
|
|
|
|
void _glfwTerminateWin32(void);
|
|
|
|
|
2015-12-03 17:16:46 +00:00
|
|
|
WCHAR* _glfwCreateWideStringFromUTF8Win32(const char* source);
|
|
|
|
char* _glfwCreateUTF8FromWideStringWin32(const WCHAR* source);
|
2018-06-07 17:01:07 +00:00
|
|
|
BOOL _glfwIsWindowsVersionOrGreaterWin32(WORD major, WORD minor, WORD sp);
|
|
|
|
BOOL _glfwIsWindows10BuildOrGreaterWin32(WORD build);
|
2017-01-19 19:29:27 +00:00
|
|
|
void _glfwInputErrorWin32(int error, const char* description);
|
2017-02-07 02:29:57 +00:00
|
|
|
void _glfwUpdateKeyNamesWin32(void);
|
2012-02-05 01:07:50 +00:00
|
|
|
|
2016-12-05 00:19:48 +00:00
|
|
|
void _glfwPollMonitorsWin32(void);
|
2018-02-05 16:11:04 +00:00
|
|
|
void _glfwSetVideoModeWin32(_GLFWmonitor* monitor, const GLFWvidmode* desired);
|
2015-12-03 17:16:46 +00:00
|
|
|
void _glfwRestoreVideoModeWin32(_GLFWmonitor* monitor);
|
2021-07-13 19:50:09 +00:00
|
|
|
void _glfwGetHMONITORContentScaleWin32(HMONITOR handle, float* xscale, float* yscale);
|
|
|
|
|
2022-05-22 12:40:00 +00:00
|
|
|
GLFWbool _glfwCreateWindowWin32(_GLFWwindow* window, const _GLFWwndconfig* wndconfig, const _GLFWctxconfig* ctxconfig, const _GLFWfbconfig* fbconfig);
|
2021-07-13 19:50:09 +00:00
|
|
|
void _glfwDestroyWindowWin32(_GLFWwindow* window);
|
|
|
|
void _glfwSetWindowTitleWin32(_GLFWwindow* window, const char* title);
|
|
|
|
void _glfwSetWindowIconWin32(_GLFWwindow* window, int count, const GLFWimage* images);
|
2023-03-02 14:51:10 +00:00
|
|
|
void _glfwSetWindowTaskbarProgressWin32(_GLFWwindow* window, int progressState, double value);
|
2021-07-13 19:50:09 +00:00
|
|
|
void _glfwGetWindowPosWin32(_GLFWwindow* window, int* xpos, int* ypos);
|
|
|
|
void _glfwSetWindowPosWin32(_GLFWwindow* window, int xpos, int ypos);
|
|
|
|
void _glfwGetWindowSizeWin32(_GLFWwindow* window, int* width, int* height);
|
|
|
|
void _glfwSetWindowSizeWin32(_GLFWwindow* window, int width, int height);
|
|
|
|
void _glfwSetWindowSizeLimitsWin32(_GLFWwindow* window, int minwidth, int minheight, int maxwidth, int maxheight);
|
|
|
|
void _glfwSetWindowAspectRatioWin32(_GLFWwindow* window, int numer, int denom);
|
|
|
|
void _glfwGetFramebufferSizeWin32(_GLFWwindow* window, int* width, int* height);
|
|
|
|
void _glfwGetWindowFrameSizeWin32(_GLFWwindow* window, int* left, int* top, int* right, int* bottom);
|
|
|
|
void _glfwGetWindowContentScaleWin32(_GLFWwindow* window, float* xscale, float* yscale);
|
|
|
|
void _glfwIconifyWindowWin32(_GLFWwindow* window);
|
|
|
|
void _glfwRestoreWindowWin32(_GLFWwindow* window);
|
|
|
|
void _glfwMaximizeWindowWin32(_GLFWwindow* window);
|
|
|
|
void _glfwShowWindowWin32(_GLFWwindow* window);
|
|
|
|
void _glfwHideWindowWin32(_GLFWwindow* window);
|
|
|
|
void _glfwRequestWindowAttentionWin32(_GLFWwindow* window);
|
|
|
|
void _glfwFocusWindowWin32(_GLFWwindow* window);
|
|
|
|
void _glfwSetWindowMonitorWin32(_GLFWwindow* window, _GLFWmonitor* monitor, int xpos, int ypos, int width, int height, int refreshRate);
|
2022-05-22 12:40:00 +00:00
|
|
|
GLFWbool _glfwWindowFocusedWin32(_GLFWwindow* window);
|
|
|
|
GLFWbool _glfwWindowIconifiedWin32(_GLFWwindow* window);
|
|
|
|
GLFWbool _glfwWindowVisibleWin32(_GLFWwindow* window);
|
|
|
|
GLFWbool _glfwWindowMaximizedWin32(_GLFWwindow* window);
|
|
|
|
GLFWbool _glfwWindowHoveredWin32(_GLFWwindow* window);
|
|
|
|
GLFWbool _glfwFramebufferTransparentWin32(_GLFWwindow* window);
|
2021-07-13 19:50:09 +00:00
|
|
|
void _glfwSetWindowResizableWin32(_GLFWwindow* window, GLFWbool enabled);
|
|
|
|
void _glfwSetWindowDecoratedWin32(_GLFWwindow* window, GLFWbool enabled);
|
|
|
|
void _glfwSetWindowFloatingWin32(_GLFWwindow* window, GLFWbool enabled);
|
|
|
|
void _glfwSetWindowMousePassthroughWin32(_GLFWwindow* window, GLFWbool enabled);
|
|
|
|
float _glfwGetWindowOpacityWin32(_GLFWwindow* window);
|
|
|
|
void _glfwSetWindowOpacityWin32(_GLFWwindow* window, float opacity);
|
|
|
|
|
|
|
|
void _glfwSetRawMouseMotionWin32(_GLFWwindow *window, GLFWbool enabled);
|
|
|
|
GLFWbool _glfwRawMouseMotionSupportedWin32(void);
|
|
|
|
|
|
|
|
void _glfwPollEventsWin32(void);
|
|
|
|
void _glfwWaitEventsWin32(void);
|
|
|
|
void _glfwWaitEventsTimeoutWin32(double timeout);
|
|
|
|
void _glfwPostEmptyEventWin32(void);
|
|
|
|
|
|
|
|
void _glfwGetCursorPosWin32(_GLFWwindow* window, double* xpos, double* ypos);
|
|
|
|
void _glfwSetCursorPosWin32(_GLFWwindow* window, double xpos, double ypos);
|
|
|
|
void _glfwSetCursorModeWin32(_GLFWwindow* window, int mode);
|
|
|
|
const char* _glfwGetScancodeNameWin32(int scancode);
|
|
|
|
int _glfwGetKeyScancodeWin32(int key);
|
2022-05-22 12:40:00 +00:00
|
|
|
GLFWbool _glfwCreateCursorWin32(_GLFWcursor* cursor, const GLFWimage* image, int xhot, int yhot);
|
|
|
|
GLFWbool _glfwCreateStandardCursorWin32(_GLFWcursor* cursor, int shape);
|
2021-07-13 19:50:09 +00:00
|
|
|
void _glfwDestroyCursorWin32(_GLFWcursor* cursor);
|
|
|
|
void _glfwSetCursorWin32(_GLFWwindow* window, _GLFWcursor* cursor);
|
|
|
|
void _glfwSetClipboardStringWin32(const char* string);
|
|
|
|
const char* _glfwGetClipboardStringWin32(void);
|
|
|
|
|
|
|
|
EGLenum _glfwGetEGLPlatformWin32(EGLint** attribs);
|
|
|
|
EGLNativeDisplayType _glfwGetEGLNativeDisplayWin32(void);
|
|
|
|
EGLNativeWindowType _glfwGetEGLNativeWindowWin32(_GLFWwindow* window);
|
|
|
|
|
|
|
|
void _glfwGetRequiredInstanceExtensionsWin32(char** extensions);
|
2022-05-22 12:40:00 +00:00
|
|
|
GLFWbool _glfwGetPhysicalDevicePresentationSupportWin32(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily);
|
2021-07-13 19:50:09 +00:00
|
|
|
VkResult _glfwCreateWindowSurfaceWin32(VkInstance instance, _GLFWwindow* window, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface);
|
|
|
|
|
|
|
|
void _glfwFreeMonitorWin32(_GLFWmonitor* monitor);
|
|
|
|
void _glfwGetMonitorPosWin32(_GLFWmonitor* monitor, int* xpos, int* ypos);
|
|
|
|
void _glfwGetMonitorContentScaleWin32(_GLFWmonitor* monitor, float* xscale, float* yscale);
|
|
|
|
void _glfwGetMonitorWorkareaWin32(_GLFWmonitor* monitor, int* xpos, int* ypos, int* width, int* height);
|
|
|
|
GLFWvidmode* _glfwGetVideoModesWin32(_GLFWmonitor* monitor, int* count);
|
|
|
|
void _glfwGetVideoModeWin32(_GLFWmonitor* monitor, GLFWvidmode* mode);
|
|
|
|
GLFWbool _glfwGetGammaRampWin32(_GLFWmonitor* monitor, GLFWgammaramp* ramp);
|
|
|
|
void _glfwSetGammaRampWin32(_GLFWmonitor* monitor, const GLFWgammaramp* ramp);
|
|
|
|
|
|
|
|
GLFWbool _glfwInitJoysticksWin32(void);
|
|
|
|
void _glfwTerminateJoysticksWin32(void);
|
2022-05-22 12:40:00 +00:00
|
|
|
GLFWbool _glfwPollJoystickWin32(_GLFWjoystick* js, int mode);
|
2021-07-13 19:50:09 +00:00
|
|
|
const char* _glfwGetMappingNameWin32(void);
|
|
|
|
void _glfwUpdateGamepadGUIDWin32(char* guid);
|
2010-09-07 15:34:51 +00:00
|
|
|
|
2021-07-18 14:57:53 +00:00
|
|
|
GLFWbool _glfwInitWGL(void);
|
|
|
|
void _glfwTerminateWGL(void);
|
|
|
|
GLFWbool _glfwCreateContextWGL(_GLFWwindow* window,
|
|
|
|
const _GLFWctxconfig* ctxconfig,
|
|
|
|
const _GLFWfbconfig* fbconfig);
|
|
|
|
|