Commit Graph

331 Commits

Author SHA1 Message Date
Camilla Löwy
21355e31db Cleanup 2017-03-14 20:39:18 +01:00
Camilla Löwy
97dbd8b63b Win32: Fix monitor event emission
Fixes #784.
2017-03-14 19:21:57 +01:00
Camilla Löwy
e9560ef021 Add GLFW_OSMESA_CONTEXT_API
This allows the creation of OpenGL contexts via OSMesa on existing
platforms.  It does not add a compile- or link-time dependency on
OSMesa.

Fixes #281.
2017-02-28 20:38:10 +01:00
Camilla Löwy
a44f2c0e65 Win32: Fix VC++ warning 2017-02-28 00:07:37 +01:00
Camilla Löwy
918b4e81d2 Win32: Move to WM_INPUT for disabled cursor motion
Related to #125.
2017-02-26 18:48:03 +01:00
Camilla Löwy
dd96d0ac93 Win32: Fix mouse button messages lost by capture
Fixes #954.
2017-02-26 18:48:02 +01:00
Camilla Löwy
355b46e6c5 Win32: Fix screensaver and blanking prevention
On Vista and later, Handling WM_SYSCOMMAND is not enough to prevent
password protected screensavers or monitor blanking.

Fixes #851.
2017-02-10 02:28:55 +01:00
Camilla Löwy
366b90be1a Documentation work 2017-02-10 01:55:03 +01:00
Camilla Löwy
5a74b5008d Cleanup
Related to #842.
2017-02-06 15:16:27 +01:00
Liam Middlebrook
72ac5badb0 Add GLFW_CENTER_CURSOR
Adds a hint for controlling whether the cursor is centered over newly
created full screen windows.

Fixes #749.
Closes #842.
2017-02-06 15:16:26 +01:00
Camilla Löwy
43c1910453 Win32: Cleanup 2017-01-29 19:50:41 +01:00
Camilla Löwy
f3e20ca437 Pass scancode with synthetic key release events 2017-01-29 16:44:38 +01:00
Camilla Löwy
c28778e28c Win32: Improve platform error messages
Related to #733.
2017-01-20 01:35:24 +01:00
Camilla Löwy
221451b817 Cleanup 2017-01-10 15:46:00 +01:00
Camilla Löwy
04f559e28d Restructure monitor enumeration
This way is both kinder on event-based enumeration and less work to
unwind allocations for when properly implementing GLFW_OUT_OF_MEMORY.
2017-01-02 06:03:02 +01:00
Camilla Löwy
9e56099edd Add glfwSetWindowAttrib
This function allows updating the GLFW_DECORATED, GLFW_RESIZABLE,
GLFW_FLOATING and GLFW_AUTO_ICONIFY attributes for existing windows.

Fixes #537.
2016-12-06 15:59:18 +01:00
Camilla Löwy
f4d0c83181 Paperwork done 2016-11-30 14:00:41 +01:00
Camilla Berglund
8d6f265441 Update default name from OS X to macOS
Note that earlier releases are still referred to by their proper names;
OS X <version> or Mac OS X <version>.
2016-10-20 00:53:37 +02:00
Camilla Berglund
c156b50e4c Add glfwSetWindowMaximizeCallback
Fixes #778.
2016-09-29 01:24:56 +02:00
Camilla Berglund
838c4e938c Win32: Allow iconifying undecorated windows
Fixes #861.
2016-09-14 18:12:21 +02:00
Camilla Berglund
f79a52fe9b Win32: Make glfwPostEmptyEvent use helper window 2016-09-14 13:07:52 +02:00
Camilla Berglund
e6a32db7b9 Cleanup 2016-09-07 16:49:29 +02:00
Camilla Berglund
bb3cb8f233 Cleanup
Clean up code and documentation for glfwGetKeyScancode and add
implementation for Wayland and Mir.

Related to #830.
2016-09-07 16:46:48 +02:00
Michael Stocker
e745b0dd47 Add glfwGetKeyScancode
Allows retrieval of platform scancode from GLFW_KEY_*.  Implemented for
Win32, Cocoa and X11.  Stubs for Mir and Wayland.

Closes #830.
2016-09-07 16:38:22 +02:00
Camilla Berglund
5ff7d9505f Simplify Vulkan extension checks
Related to #478.
2016-09-07 16:31:18 +02:00
Camilla Berglund
53fafad915 Start 3.3 2016-08-18 23:55:49 +02:00
Camilla Berglund
fcdef1d0a0 Fix potential context resource leaks
There is a gap between the creation of the context and the call to
_glfwRefreshContextAttribs.
2016-08-05 11:23:05 +02:00
Camilla Berglund
7be62631ae Cleanup 2016-08-01 23:13:11 +02:00
Camilla Berglund
2c32503b10 Fix comment 2016-08-01 12:15:08 +02:00
Camilla Berglund
d5e00e6b0f Initialize context creation APIs on demand 2016-07-20 13:10:51 +02:00
Camilla Berglund
66149a29da Cleanup 2016-06-23 17:40:30 +02:00
Camilla Berglund
0ee8159f6c Win32: Remove intermediate clipboard string copy 2016-06-23 17:06:03 +02:00
Camilla Berglund
6f313ff245 Win32: Use helper window to load WGL extensions
This removes window re-creation logic by performing the initial context
creation on the helper window, simplifying both window and context
creation and paving the way for attaching to existing window handles
without compromising on context or framebuffer hint support.
2016-06-22 23:33:34 +02:00
Camilla Berglund
5f17b61ff2 Win32: Remove accidental C99 2016-06-02 15:57:47 +02:00
Camilla Berglund
757eea2779 Update email address 2016-06-01 21:25:20 +02:00
Camilla Berglund
6a8e169001 Update copyright notice year 2016-06-01 21:25:19 +02:00
Camilla Berglund
ed076b7c5b Win32: Re-enable cursor during modal loops
Related to #650.
2016-05-31 12:59:41 +02:00
Camilla Berglund
2d2756cbad Simplify cursor window logic 2016-05-30 22:12:33 +02:00
Camilla Berglund
03db3ed6e9 Cleanup 2016-05-30 21:19:00 +02:00
Camilla Berglund
bda031f4ac Cleanup 2016-05-29 15:34:08 +02:00
Camilla Berglund
797ee8d8e3 Move all cursor positioning to platform code
Due to Wayland, shared code cannot rely on cursor positioning being
supported by the underlying platform.

This implicitly fixes #617 as it moves cursor centering into
_glfwPlatformSetCursorMode, thus separating it from the stale value of
_glfw.cursorWindow.

Fixes #617.
2016-05-29 15:33:49 +02:00
Camilla Berglund
0e846883bf Clarify cursor position variable names 2016-05-27 02:39:03 +02:00
ocornut
3c1a83d61f Fix keys filtered by IME being passed to callback
Closes #651.
2016-05-10 12:30:04 +02:00
Camilla Berglund
ef80beab81 Add run-time context creation API selection
Fixes #145.
2016-05-04 17:00:07 +02:00
Camilla Berglund
e640d840b7 Fix Win32 window size event race condition
The old window size was reported after re-entering full screen and
setting and reporting the new window size.

Fixes #740.
2016-05-04 16:34:48 +02:00
Camilla Berglund
eb3577c1eb Add initial XInput support 2016-03-31 12:12:04 +02:00
Camilla Berglund
20574fa81f Fix VC++ warnings 2016-03-29 11:13:07 +02:00
Camilla Berglund
7ab7d8b4b1 Make use of uint32_t where appropriate
This change does not affect the ABI.
2016-03-28 12:34:57 +02:00
Camilla Berglund
c1e4c45c7a Replace Win32 window long with window property
Related to #25.
2016-03-28 10:57:19 +02:00
Camilla Berglund
6570d0c4b7 Add glfwSetWindowMonitor
This adds the ability to switch between windowed and full screen modes,
move a full screen window between monitors and update its desired
resolution and refresh rate.

Fixes #43.
2016-03-18 11:13:24 +01:00
Camilla Berglund
99c925efd8 Add tracking of which window 'owns' a monitor 2016-03-16 16:16:29 +01:00
Camilla Berglund
ea888114fa Remove monitor from _GLFWwndconfig 2016-03-16 16:16:02 +01:00
Camilla Berglund
4e4b8727fc Fix Win32 icon restoration 2016-03-11 14:41:58 +01:00
Camilla Berglund
b823f7151e Add glfwSetWindowIcon
Adds support for setting window icons programmatically on platforms
where this makes sense.

Fixes #453.
Closes #467.
2016-03-10 17:26:26 +01:00
Camilla Berglund
fca5a8ab48 Fix Win32 custom cursor set for non-client area
Udating the cursor via glfwSetCursor incorrectly included the non-client
area of the window.
2016-03-07 12:30:25 +01:00
Camilla Berglund
5620895e88 Add glfwWaitEventsTimeout
This function will put the calling thread to sleep until an event
arrives or until the specified timeout has elapsed.
2016-03-06 17:28:40 +01:00
Camilla Berglund
baf574494d Add glfwFocusWindow
This removes the (undocumented) behavior where glfwShowWindow would
bring the window to front and set input focus.  That function now
does what it says.
2016-02-25 21:37:40 +01:00
Camilla Berglund
165171f9c8 Add comment for Win32 helper window path 2016-02-23 11:30:17 +01:00
Camilla Berglund
0ea193c4e2 Fix detection of Win32 software monitor events
Fixes #53.
2016-02-23 11:28:37 +01:00
Camilla Berglund
7669ade19c Make instance extension count unsigned
Fixes #714.
2016-02-22 10:44:43 +01:00
Camilla Berglund
a10caa4631 Add glfwMaximizeWindow and GLFW_MAXIMIZED
Fixes #266.
2016-02-21 15:32:26 +01:00
Camilla Berglund
9b75bffc88 Add basic Vulkan support
Added GLFW_INCLUDE_VULKAN.  Added glfwVulkanSupported,
glfwGetRequiredInstanceExtensions, glfwGetInstanceProcAddress,
glfwGetPhysicalDevicePresentationSupport and glfwCreateWindowSurface.
Added port of LunarG SDK tri example.
2016-02-16 14:58:58 +01:00
Camilla Berglund
12b6c56903 Add suffixes to platform specific helper functions
Also merge win32_tls.h into win32_platform.h.
2015-12-13 14:50:59 +01:00
Camilla Berglund
5c98a44603 Move Win32 clipboard code to helper window 2015-11-23 20:48:51 +01:00
Camilla Berglund
4cd493dd9a Add Win32 helper window 2015-11-23 20:48:51 +01:00
Camilla Berglund
b4b210526a Move to RegisterWindowClassEx for no real reason 2015-11-23 20:38:18 +01:00
Camilla Berglund
1bf33a7402 Clarify WNDPROC window pointer handling 2015-11-21 20:55:13 +01:00
Camilla Berglund
27462c1078 Cleanup 2015-11-10 13:43:55 +01:00
Stanislav
dc373d2e0e Fix for MinGW compilation
GET_XBUTTON_WPARAM is not defined on legacy MinGW.

Fixes #639.
2015-11-10 13:43:17 +01:00
Camilla Berglund
9c315412e1 Add glfwGetKeyName
Fixes #464.
2015-11-09 14:46:09 +01:00
Camilla Berglund
3efaa065a5 Fix comment 2015-11-05 20:55:15 +01:00
Camilla Berglund
9f3636a103 Add partial support for Windows 8.1 per-monitor DPI
Related to #235.
2015-11-01 17:39:21 +01:00
Camilla Berglund
3489b759a0 Simplify Win32 key and mouse button handling 2015-11-01 17:39:18 +01:00
Camilla Berglund
d725eeaf84 Simplify Win32 character message handling 2015-11-01 17:30:52 +01:00
Camilla Berglund
37b20124f9 Make call to DefWindowProcW explicit 2015-10-29 14:03:22 +01:00
Camilla Berglund
43f4afef78 Clarify WGL recreation comment 2015-10-28 03:44:02 +01:00
Camilla Berglund
c117965072 Fix misplaced #endif 2015-10-28 03:42:47 +01:00
Camilla Berglund
23bf1b530b Move all WGL weirdness to Win32 code 2015-10-28 02:08:01 +01:00
Camilla Berglund
496f559c9a Add GLFW_NO_API for creating context-less windows 2015-10-26 00:30:30 +01:00
Camilla Berglund
a94a84b507 Fix segfault on early WM_GETMINMAXINFO 2015-10-18 18:50:38 +02:00
Camilla Berglund
9dd3b8101a Clarify Win32 getWindowFullSize 2015-10-18 17:18:34 +02:00
Camilla Berglund
d84772d620 Add size limits and aspect ratio functions
Fixes #555.
2015-10-18 17:18:29 +02:00
Camilla Berglund
0aca5082ab Replace LoadIcon with LoadImage
Fixes #585.
2015-10-15 17:58:29 +02:00
Camilla Berglund
0eccf75f65 Replace GL booleans with public macros 2015-10-13 00:46:02 +02:00
Camilla Berglund
13fbb4748a Clean up cursor mode setting 2015-10-12 22:01:50 +02:00
Camilla Berglund
95a07f3340 Start 3.2 2015-10-12 21:59:49 +02:00
Camilla Berglund
3dc53e21e5 Cleanup 2015-09-20 15:52:44 +02:00
Camilla Berglund
67eadf1e97 Fix glfwIconifyWindow not restoring video mode
Fixes #590.
2015-09-07 16:32:10 +02:00
Camilla Berglund
0db3940cc4 Formatting 2015-08-16 14:28:51 +02:00
Camilla Berglund
e2bb5e1726 Fix glfwWaitEvents generating events on Win32
Disabled cursor mode caused subsequent glfwWaitEvents calls to return
directly on Win32 due to cursor re-centring emitting WM_MOUSEMOVE.

Fixes #543.
2015-08-16 14:27:54 +02:00
Camilla Berglund
fcd6ec99d3 Formatting 2015-08-09 13:58:50 +02:00
Camilla Berglund
0a1225d0df Decouple Win32 cursor setting and tracking 2015-08-09 13:26:41 +02:00
Camilla Berglund
bfe55118dd Fixed name of Win32 cursor tracking flag. 2015-07-14 15:45:22 +02:00
Camilla Berglund
0f3b69c79d Fixed missing utility function return types.
Fixes #546.
2015-07-05 01:13:52 +02:00
Camilla Berglund
cc4c232956 Renamed cursor window library struct member.
Since _glfwPlatformWindowFocused it has a more limited role.
2015-06-17 12:06:45 +02:00
Camilla Berglund
ec6f0811a0 Improved initial placement of full screen windows. 2015-06-08 16:14:51 +02:00
Camilla Berglund
a257e7a3ee Removed caching of Win32 window styles. 2015-06-08 16:10:07 +02:00
Camilla Berglund
b067bb6304 Removed swap interval re-application hack.
This approach is not compatible with multi-threading.
2015-06-02 03:32:27 +02:00
Camilla Berglund
8309e0ecb0 Use DwmFlush when DWM is enabled.
Use DwmFlush instead of WGL_EXT_swap_control when desktop compositing is
enabled, to avoid the jitter of DWM and WGL vsync fighting.

Fixes #516.
2015-05-21 18:28:53 +02:00
Camilla Berglund
d493a82f9e Various error fixes.
Fixed incorrect error types.  Added missing error string prefixes.
Removed some invalid or superfluous error emissions.  Clarified some
error strings.  Joined error string lines to aid grep.  Replaced some
generic error strings with specific ones.  Documentation work.

Fixes #450.
2015-03-15 15:52:27 +01:00