Commit Graph

301 Commits

Author SHA1 Message Date
Camilla Löwy
56aad76b16 Add C dialect reminders to each source file
Files built for Win32 must use C89 style declarations for compatibility
with VS 2010 and 2012, which are still supported by GLFW.
2019-05-24 14:43:49 +02:00
Camilla Löwy
a337c56848 Start 3.4 2019-04-16 23:08:39 +02:00
Camilla Löwy
ab118b2529 Fix copyright years (somewhat) 2019-04-15 20:50:00 +02:00
Camilla Löwy
1155c83013 Rename raw input to raw mouse motion, cleanup
This renames 'raw input' to 'raw mouse motion' as there are other kinds
of raw input.  The update path is restructured to avoid reinitializing
all of disabled cursor mode.  Modification of shared state is moved out
into shared code.  Raw mouse motion is disabled by default for
compatibility.

Related to #1401.
2019-02-22 13:04:11 +01:00
Nathan Poirier
9e29f556fd Add GLFW_RAW_INPUT and glfwRawInputSupported
This adds runtime per-window control of whether accelerated or raw mouse
motion is provided when the cursor is disabled.

Fixes #1400.
Closes #1401.
2019-02-22 13:04:11 +01:00
Camilla Löwy
d5ab3e919a Cleanup
Replace client area with content area.
2019-01-25 12:46:46 +01:00
iamCaveLamp
a46104ee69 Removed duplicates of centerCursor function 2019-01-22 20:17:35 +01:00
Camilla Löwy
55b1a16f90 Remove window requirement for all event functions
This lets an application wait for non-window events without needing to
create a window.

Fixes #1317.
2019-01-15 19:28:17 +01:00
Camilla Löwy
089ea9af22 Add GLFW_SCALE_TO_MONITOR
This adds the GLFW_SCALE_TO_MONITOR window hint for automatically
resizing the content area of a window to the requested size times the
monitor content scale each time it is placed on a new monitor.  This
only applies to windowed mode windows and includes the initial placement
at window creation.

This hint only has an effect on platforms where screen coordinates and
pixels always map 1:1 such as Windows and X11.  Platforms like macOS
instead change the resolution of the framebuffer independently of the
window size.

Related to #676.
Related to #1115.
2018-09-03 23:12:39 +02:00
Doug Binks
0be4f3f75a Add GLFW_FOCUS_ON_SHOW window hint and attribute
This adds a window hint and attribute for controlling whether
glfwShowWindow gives the specified window input focus in addition to
making it visible.

Fixes #1189.
Closes #1275.
2018-05-29 15:51:36 +02:00
Camilla Löwy
58cc4b2c5c Move full screen cursor centering to shared code 2018-02-07 16:47:00 +01:00
Camilla Löwy
c29e4455bb Move more context logic out of glfwCreateWindow 2018-02-06 13:10:41 +01:00
Camilla Löwy
bb3ab87a18 Remove unmaintained internal Doxygen docs
The useful bits have been transformed to function definition comments.
The style guide stub has been added to the regular docs build.
2018-01-17 11:25:32 +01:00
Camilla Löwy
ee9dffcd66 Add GLFW_HOVERED for polling cursor hover state
This window attribute corresponds to the cursor enter/leave callback.

Fixes #1166.
2018-01-09 18:02:52 +01:00
Camilla Löwy
370eac3c48 Add glfwSetWindowContentScaleCallback
Related to #677.
Related to #1115.
2018-01-09 18:00:22 +01:00
Camilla Löwy
1034b6e0db Move context management out of glfwCreateWindow
Related to #25.
2018-01-09 17:58:54 +01:00
Camilla Löwy
9da2285b14 Cocoa: Make frame autosave hint a string 2017-12-19 15:08:28 +01:00
Camilla Löwy
6158801aeb Change glfwInitHintString to glfwWindowHintString
Fixes #1139.
2017-12-19 15:08:27 +01:00
Camilla Löwy
11e47f08b1 Add glfwGetWindowOpacity and glfwSetWindowOpacity
This adds support for setting the opacity of the whole window, including
any decorations.

Fixes #1089.
2017-11-15 15:46:01 +01:00
Camilla Löwy
49130ab8ec Rename framebuffer transparency hint
This is a breaking change of an unreleased API.
2017-11-14 17:21:36 +01:00
Camilla Löwy
a1154247fa Fix default value of GLFW_CENTER_CURSOR
Regression introduced by 72ac5badb0.

Fixes #1105.
2017-10-29 15:53:19 +01:00
Camilla Löwy
bf09dba95b Cleanup 2017-10-26 18:05:56 +02:00
Camilla Löwy
16bf872117 Add content scale queries
This adds glfwGetWindowContentScale and glfwGetMonitorContentScale for
querying the recommended drawing scale factor for DPI-aware rendering.

Parts of this patch are based on code by @ferreiradaselva.

Fixes #235.
Fixes #439.
Fixes #677.
Fixes #845.
Fixes #898.
2017-10-26 17:26:36 +02:00
Camilla Löwy
32e78aeb2e Add GLFW_TRANSPARENT attribute and documentation
This completes support for window framebuffer transparency on Windows,
macOS and X11.  Note that the hint/attribute may be renamed before
release to clarify its relationship to GLFW_OPACITY.

Fixes #197.
Closes #1079.
Related to #663.
Related to #715.
Related to #723.
Related to #1078.
2017-09-27 21:54:04 +02:00
Bailey Cosier
93e66661d3 Cleanup
This is an extract of a commit, minimally edited to ensure it compiles.

Closes #1078.
Related to #197.
2017-09-27 21:33:03 +02:00
Wolfgang Draxinger
019609b6cd Add GLFW_TRANSPARENT and X11 implementation
This is a squashed extract of several commits, minimally edited to
ensure it compiles.

Related to #197.
Related to #715.
2017-09-27 21:33:03 +02:00
Camilla Löwy
b97039f3f5 Cleanup 2017-09-10 20:57:06 +02:00
Camilla Löwy
d5de48ab53 Report invalid constants in the appropriate base
If the expected constants are defined in hexadecimal in the header then
the error string should also use hexadecimal.

Idea by IntellectualKitty.

Related to #970.
2017-06-28 12:07:06 +02:00
Camilla Löwy
14a3fe0ac0 Make glfwGetError also provide description
Related to #970.
2017-06-08 16:08:36 +02:00
Felipe Ferreira da Silva
412eb6a611 Add glfwRequestWindowAttention
Related to #988.
2017-05-11 13:36:39 +02:00
Camilla Löwy
aaf2800c9c Add internal TLS support
Related to #970.
2017-03-19 00:52:46 +01:00
Camilla Löwy
6d9a58bfef Add glfwInitHint
This allows setting hints that control how the library is initialized,
transforming more compile-time options into run-time ones.
2017-03-01 04:35:41 +01:00
Camilla Löwy
3817b4e1c5 Add more assertions 2017-02-23 17:47:41 +01:00
Camilla Löwy
2ba461e348 Formatting 2017-02-23 17:46:59 +01:00
Camilla Löwy
77a8f103d8 Add GLFW_COCOA_GRAPHICS_SWICTHING
This provides control over whether the context should participate in
macOS Automatic Graphics Switching.

Closes #377.
Closes #935.
2017-02-10 01:29:29 +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
f3e20ca437 Pass scancode with synthetic key release events 2017-01-29 16:44:38 +01:00
Camilla Löwy
a2867ff6ea Cleanup 2017-01-29 16:44:37 +01:00
Camilla Löwy
9689f7b925 Remove superfluous comments 2017-01-29 16:44:37 +01:00
Camilla Löwy
4661315192 Add GLFW_COCOA_FRAME_AUTOSAVE
Fixes #195.
2017-01-01 19:58:34 +01:00
Camilla Löwy
58ceab5f1e Add GLFW_COCOA_RETINA_FRAMEBUFFER
Look, a can of worms!  I wonder what's inside.

This adds the first platform specific window hint, transforming
a compile-time option to a run-time per-window one.
2016-12-08 16:56:05 +01:00
Camilla Löwy
744cee6ec9 Cleanup 2016-12-08 16:56:05 +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
c156b50e4c Add glfwSetWindowMaximizeCallback
Fixes #778.
2016-09-29 01:24:56 +02:00
Camilla Berglund
9cd0c101f0 Fix glfwMaximizeWindow not checking window mode 2016-08-21 17:43:40 +02:00
Camilla Berglund
53fafad915 Start 3.3 2016-08-18 23:55:49 +02:00
Camilla Berglund
613868b893 Add missing assertion 2016-07-11 16:39:53 +02:00
Camilla Berglund
a991c01731 Fail sharing if either window is context-less 2016-06-22 14:36:46 +02:00