Commit Graph

377 Commits

Author SHA1 Message Date
Camilla Löwy
683b7524d2 Improve documentation relating to key tokens
Shifted the documentation away from the term 'named keys' as something
different than keys that glfwGetKeyName will return a name for.  The
already existing term 'key token' should now be used to refer to the
GLFW_KEY_* constants.

The associated term 'named mouse button' was also replaced with
'supported mouse button'.

The parts explaining which key tokens will return a valid scancode from
glfwGetKeyScancode have hopefully been clarified.  This issue was
reported in #2055.

The GLFW_KEY_UNKNOWN constant has been moved out of the list of key
tokens to simplify and hopefully clarify the related documentation.

Various other keyboard key related edits were made, hopefully resulting
in improvements.

Related to #2055

(cherry picked from commit 9959dc69ca)
2023-12-07 18:04:48 +01:00
Camilla Löwy
356f56a166 Fix list of possible errors for glfwGetKeyName
(cherry picked from commit 557a633b2d)
2023-12-07 18:04:48 +01:00
Camilla Löwy
1c989eace3 Clarify documentation for glfwMakeContextCurrent
(cherry picked from commit 3f31519de8)
2023-12-07 18:04:48 +01:00
Grzesiek11
b52b074be5 Documentation: only named keys generate synthetic key releases
The current wording states that all keys have synthetic key release
events generated after focus is lost, but keys that aren't named
don't have any state held, so no such events are generated for them.

The new wording clarifies that only named keys have the events generated
for them.

(cherry picked from commit dbe810e403)
2023-11-28 22:19:08 +01:00
Camilla Löwy
0c2db4a23e Wayland: Add initial support for libdecor
This is partly based on the implementation of libdecor support in
PR #1693 by @ christianrauch.

Where available, the libdecor library is loaded at init and becomes the
preferred method for window decorations.  On compositors that support
XDG decorations, libdecor in turn uses those.  If not, libdecor has
a plug-in archtecture and may load additional libraries to either use
compositor-specific decorations or draw its own.

If necessary, support for libdecor can be disabled with the
GLFW_WAYLAND_LIBDECOR init hint.  This is mostly in case some part of
the dynamic loading or duplication of header material added here turns
out to cause problems with future versions of libdecor-0.so.0.

Fixes #1639
Closes #1693
Related to #1725

This was adapted to 3.3-stable from
fbdb53b9ca.
2023-07-19 17:23:25 +02:00
Camilla Löwy
1fe29e2c19 Fix native access macros being mutually exclusive
The documentation was updated with the introduction of run-time platform
selection, but the preprocessor logic was not.

(cherry picked from commit 2efc598d70)
2022-10-31 21:47:57 +01:00
Camilla Löwy
fe2ac5027b Start 3.3.9 2022-07-22 16:04:36 +02:00
Camilla Löwy
7482de6071 Documentation work
Fixes #1596

(cherry picked from commit aa80d24d01)
2022-07-15 00:11:23 +02:00
Camilla Löwy
935d7098b6 Documentation work
(cherry picked from commit 2796e61af7)
2022-07-15 00:11:23 +02:00
Emmanuel Gil Peyrot
581fed38be Wayland: Remove support for wl_shell
This is adapted to 3.3-stable from
599fb3de34 and
27295b508f.
2022-07-13 22:40:46 +02:00
Camilla Löwy
aa1efada52 Add support for GLFW_NATIVE_INCLUDE_NONE macro
By default, the glfw3native.h header will include the platform-specific
headers necessary for the return types of GLFW native access functions.

Sometimes it is preferrable to declare those types

This commit adds support for the GLFW_NATIVE_INCLUDE_NONE macro, which
when defined disables the inclusion of all platform-specific headers.

Fixes #1348

(cherry picked from commit 05f6c13d11)
2022-07-12 20:29:22 +02:00
Camilla Löwy
b86fcd7cd0 Cocoa: Use system header to declare id type
Related to #1348

(cherry picked from commit edec334b32)
2022-07-12 20:29:22 +02:00
Camilla Löwy
f001aa3490 Fix and clarify comments for GLFWAPI
(cherry picked from commit 685de9089f)
2022-06-10 17:11:13 +02:00
Camilla Löwy
bf5529512c Document delayed initialization of EGL display
(cherry picked from commit 06089a91a6)
2022-06-09 19:50:00 +02:00
Camilla Löwy
802882f7cb Add checks for some invalid values to public API
There were no checks for invalid values or asserts for all invalid NULL
pointers to glfwSetWindowIcon or glfwCreateCursor.

Fixes #1862

(cherry picked from commit 66a4882eb1)
2022-05-06 19:34:05 +02:00
Camilla Löwy
c2188e2d0a Fix accidental C99 in C89 header
(cherry picked from commit add0521efb)
2022-05-06 19:34:04 +02:00
Camilla Löwy
e7a81f8aaa Fix GLAPIENTRY redefinition warning
On a Unix system, if you define GLFW_INCLUDE_NONE and
GLFW_EXPOSE_NATIVE_GLX, then include glfw3.h and glfw3native.h, you will
get a redefinition warning for GLAPIENTRY.

The glfw3.h header defines GLAPIENTRY as a service for OpenGL related
headers that assume it's already defined.  However, glx.h includes gl.h,
which defines GLAPIENTRY unconditionally.

If not for Hyrum's law, the better solution would have been not to
define GLAPIENTRY if GLFW_INCLUDE_NONE is defined.

Fixes #2010

This is adapted to 3.3-stable from
535c3ce632 and
ce85c7dcaf.
2022-05-06 19:33:08 +02:00
Camilla Löwy
b43c122dd1 Start 3.3.8 2022-04-05 19:54:09 +02:00
Camilla Löwy
6afc571ade Wayland: Document delayed window showing
(cherry picked from commit 8edbc4971d)
2022-02-15 20:40:37 +01:00
Camilla Löwy
22eaa04b49 Update docs for specific Vulkan surface extensions
Related to #2014

(cherry picked from commit 05b0e2fab2)
2022-02-15 20:39:40 +01:00
Camilla Löwy
869e68a015 Start 3.3.7 2021-12-10 01:26:54 +01:00
InKryption
7d5a16ce71 Add missing errors section for glfwGetGamepadName
The reference documentation for glfwGetGamepadName lacked the possible
errors section.

Closes #2007

(cherry picked from commit c19f36b28d)
2021-12-08 20:23:20 +01:00
Stephen Gutekanst
81d762bf66 Fix docs calling GLFW_CONTEXT_REVISION a hint
This docstring previously indicated that GLFW_CONTEXT_REVISION was
a window hint and attribute, but in fact it is only a window attribute
(there is no code which uses this constant in any other context.)

We noticed this in https://github.com/hexops/mach/pull/71/files#r749741814

Closes #1992

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
(cherry picked from commit 37fc28bff6)
2021-11-30 19:04:56 +01:00
InKryption
c59092619a Add missing error to glfwGetClipboardString docs
Add GLFW_FORMAT_UNAVAILABLE to the list of possible errors in the
reference documentation for glfwGetClipboardString.

Slightly edited by @elmindreda.

Closes #1998

(cherry picked from commit bb193325cc)
2021-11-30 19:03:59 +01:00
Camilla Löwy
19543afbfb Start 3.3.6 2021-10-28 22:16:41 +02:00
Camilla Löwy
b77a9b1d0d Fix GLFW_INCLUDE_GLEXT being ignored for glcorearb
The GLFW_INCLUDE_GLCOREARB branch was left out when GLFW_INCLUDE_GLEXT
was originally added, for reasons that are lost to history.  The current
versions of these headers seem to co-exist just fine.

Issue reported on IRC.

(cherry picked from commit 309d79376f)
2021-10-28 12:31:02 +02:00
Camilla Löwy
73b6754a67 Document possible native access function errors
(cherry picked from commit 983c44b255)
2021-10-28 12:13:36 +02:00
Camilla Löwy
9400bc9f35 Remove potentially incorrect claim
(cherry picked from commit 4be0444ee6)
2021-10-13 23:11:53 +02:00
Camilla Löwy
1a7e4da343 Fix docs for Windows monitor size calculation
This sentence was truncated by 951a9583fa
and then not updated when content scale support was added with
16bf872117.

(cherry picked from commit 6a20053102)
2021-10-13 23:11:48 +02:00
Camilla Löwy
ffe0795e64 Name parameters for callback function types
Started adding these because of Doxygen warnings but it should have been
done regardless.

(cherry picked from commit 4e557437f2)
2021-08-27 17:20:08 +02:00
Camilla Löwy
e04cd8283e Add notes on getting the HDC of a window on Win32
Related to #1913.

(cherry picked from commit 15e05adf67)
2021-06-25 00:23:11 +02:00
Camilla Löwy
2a5038e4e9 Fix header version macro descriptions in docs
(cherry picked from commit e17ffcd0db)
2021-06-09 18:33:44 +02:00
Camilla Löwy
30b02dd709 Fix description of video mode ordering in docs
The two final sorting criteria were not included in the documentation.

Fixes #1889.

(cherry picked from commit 0e9ec7788b)
2021-06-09 18:32:05 +02:00
Camilla Löwy
3cded29c2f Replace GL_ARB_debug_output in comments
(cherry picked from commit 85bce8a8ea)
2021-06-09 18:26:39 +02:00
Camilla Löwy
bcaf8daa72 Fix grammar in MoltenVK support docs
(cherry picked from commit 4c90e21e8f)
2021-06-09 18:25:09 +02:00
Camilla Löwy
713711f5e9 Start 3.3.5 2021-04-08 20:48:17 +02:00
Camilla Löwy
b8202d9ca3 Start 3.3.4 2021-02-23 21:23:46 +01:00
Emmanuel Gil Peyrot
bbc4caf04c Fix typo in GLFWwindowmaximizefun documentation
Thanks brianzuvich!

Fixes #1764.

(cherry picked from commit 1ed1489831)
2020-09-16 13:31:22 +02:00
Camilla Löwy
f921caf4a6 Re-word docs for GLFW_OPENGL_DEBUG_CONTEXT attrib
Related to #1720.

(cherry picked from commit 4e3b43383a)
2020-06-30 17:10:50 +02:00
Tatsuya Yatagawa
307ce3aa1a Fix GLU header inclusion being disabled
This fixes a regression introduced by
105cf32e0b where GLFW_INCLUDE_GLU had no
effect if the GLFW header detected an earlier OpenGL header or loader
library header.

Closes #1712.

(cherry picked from commit 81f475bccb)
2020-06-30 17:07:47 +02:00
A. Tombs
fb0c8d4662 Add statement to docs for glfwTerminate
It is safe to call glfwTerminate both before initialization and after
termination.

Closes #1698.

(cherry picked from commit 7486e12f88)
2020-06-02 19:01:25 +02:00
Camilla Löwy
78ad4e8f36 Fix desktop GL header not always being suppressed
If an OpenGL ES header or the glcorearb header is included before the
GLFW header (with no options defined), the legacy OpenGL header will be
implicitly included and the compilation will fail.

This disables the default behavior if we detect any known OpenGL, OpenGL
ES or extension loader inclusion guard macro.

Sources:
 - Khronos headers
 - Windows SDK
 - MinGW
 - MinGW-w64
 - flextGL
 - glad
 - glad2
 - GLEW
 - Galogen
 - gl3w
 - GLXW
 - glbinding
 - Epoxy
 - Glatter
 - glLoadGen
 - Regal
 - GLee
 - OpenGL.framework
 - Debian
 - FreeBSD
 - ANGLE
 - SwiftShader

Related to #1695.

(cherry picked from commit 105cf32e0b)
2020-06-02 19:01:21 +02:00
Camilla Löwy
8216a148cf Disambiguate Vulkan support reference link
(cherry picked from commit 41a19ed49c)
2020-05-19 14:33:20 +02:00
Camilla Löwy
0ac013381b X11: Fix CJK IME input when locale CTYPE is "C"
Fixes #1587.
Fixes #1636.

(cherry picked from commit 4381b86b6b)
2020-02-13 22:03:51 +01:00
Camilla Löwy
64c7aa50d0 Start 3.3.3 2020-02-13 22:01:33 +01:00
ByunghoonKim
50f3979dfd Cocoa: Add support for VK_EXT_metal_surface
This adds optional support for the VK_EXT_metal_surface instance
extension.

Closes #1619.

(cherry picked from commit c5cb4a253a)
2020-01-17 15:38:54 +01:00
Camilla Löwy
0938462616 Start 3.3.2 2020-01-05 14:50:14 +01:00
luz.paz
13a4e4e810 Fix typos
Found via `codespell -q 3 -S ./deps -L fo,numer,te,uint,wille`

(cherry picked from commit 7105ff2dfd)
2019-09-23 15:27:17 +02:00
Camilla Löwy
79f4ec6822 Unify key name string handling
This makes key names per-key static strings for all supported platforms.

Fixes #1200.

(cherry picked from commit 56ca0cb3b3)
2019-09-23 15:26:23 +02:00
Lukas Zanner
452a648abb Fix typo in glfwGetRequiredInstanceExtensions docs
Closes #1500.

(cherry picked from commit 84b13113ed)
2019-07-16 14:41:06 +02:00