Commit Graph

622 Commits

Author SHA1 Message Date
GamesTrap
e9f57088e3
Merge branch 'taskbar-progress' into application-badge 2024-06-12 20:47:12 +02:00
GamesTrap
940b7a8668
Merge branch 'glfw:master' into taskbar-progress 2024-06-12 19:57:51 +02:00
Grzesiek11
bf945f1213 Unlimited mouse button input mode
This adds the GLFW_UNLIMITED_MOUSE_BUTTONS input mode which permits
mouse buttons over GLFW_MOUSE_BUTTON_LAST to be reported to the mouse
button callback.

Closes #2423
2024-03-12 16:24:01 +00:00
Camilla Löwy
7bdcdf435a Cleanup 2024-02-19 14:21:48 +01:00
Doug Binks
95d464bb4b Add glfwGetWindowTitle
This adds a function for querying the current title of a window.  This
currently returns a copy of the last title set via GLFW.

Fixes #1448
Closes #1909
Closes #2482
2024-02-19 14:20:52 +01:00
Camilla Löwy
eeb403135d Add minor features and updates to window test
- Button label reflects window mode
- Window attention request button
- Slightly less bad button layout possibly
- Applicable button labels list expected delay
- Less telegraphic message for positions being unsupported
- Window size more likely to fit contents
2024-02-09 13:45:48 +01:00
Camilla Löwy
d81fcb93f1 Clarify event test reporting of keys
Reshuffled line to group key-related items together.  Omitted key code
output for unknown keys to put focus on the (lack of) name.
2024-01-29 21:09:10 +01:00
GamesTrap
dacb814e8b
Merge upstream/master into origin/taskbar-progress 2023-04-05 19:57:47 +02:00
GamesTrap
aec406ec1f
Merge upstream/master into origin/application-badge 2023-04-05 19:55:52 +02:00
Camilla Löwy
f27daa34ad Fix glfwinfo output of Vulkan layer spec version 2023-03-31 16:18:46 +02:00
Camilla Löwy
6f2d7064be Make glfwinfo try Vulkan even if GL/GLES fails 2023-03-31 16:18:46 +02:00
GamesTrap
3ed4a360fd
Merge origin/taskbar-progress into origin/application-badge 2023-03-21 13:36:38 +01:00
Andreas
ef4d722b76
Merge(#3): Finalized progress API 2023-03-08 14:10:00 +01:00
GamesTrap
367a50e82d
Renamed badge API functions 2023-03-08 01:00:21 +01:00
ws909
cf2d81d116 Add glfwSetWindowTaskbarBadgeString
Change from GLFW_DONT_CARE to 0 for disabling the badge for glfwSetWindowTaskbarBadge
2023-03-06 13:23:55 +01:00
GamesTrap
ec03ae4d05
Added glfwSetWindowTaskbarBadge() example to tests/window 2023-03-04 21:08:25 +01:00
ws909
a9b36d48d7 Simplify _glfwSetWindowTaskbarProgressCocoa
Fix merge issues
Rename taskbarState to progressState
Remove const qualifier from progressState parameter
2023-03-02 15:51:10 +01:00
ws909
0173252ee1 Merge remote-tracking branch 'refs/remotes/GamesTrap/taskbar-progress'
Conflicts:
	src/cocoa_window.m
	tests/window.c
2023-03-02 14:08:25 +01:00
GamesTrap
0f142e3a1a
glfwSetWindowTaskbarProgress Changed value type from int to double 2023-03-02 13:55:42 +01:00
ws909
78e4f9bd67 Make progress bar slider in window test program responsive 2023-03-02 05:20:32 +01:00
GamesTrap
3e7b016a00
Renamed GLFW_TASKBAR_PROGRESS_NOPROGRESS to GLFW_TASKBAR_PROGRESS_DISABLED 2023-03-01 22:22:01 +01:00
Jan Schürkamp
fb4c22ed9c
Merge branch 'glfw:master' into taskbar-progress 2022-08-06 16:38:09 +02:00
Camilla Löwy
0f9a9578f3 Add window hints for initial position
This adds window hints for the initial position, in screen coordinates,
of a window.  The special value GLFW_ANY_POSITION means the window
manager will be allowed to position the window.

It is not possible to set window positions on Wayland and GLFW will
always behave as if these hints are set to GLFW_ANY_POSITION.

Fixes #1603
Fixes #1747
2022-07-29 11:50:13 +02:00
Camilla Löwy
488008e0a2 Add cursor mode GLFW_CURSOR_CAPTURED
This adds a cursor mode that provides a visible cursor confined to the
content area of the window.

Fixes #58
2022-07-25 18:02:57 +02:00
GamesTrap
8acb72b9a1
Win32 Added support for taskbar progress 2022-07-23 21:28:35 +02:00
Camilla Löwy
c50d53160f Make events test window appear on Wayland 2022-07-13 21:54:55 +02:00
Camilla Löwy
84e165ef64 Win32: Work around warnings on MSVC 19.32.x 2022-07-08 00:24:03 +02:00
Camilla Löwy
3b3d58df47 Add support for VK_KHR_portability_enumeration
The use of this extension is required to enable the MoltenVK physical
device as of Vulkan SDK 1.3.216.0.  This is because MoltenVK is still
very (very) slightly non-conformant.
2022-07-07 23:48:16 +02:00
Camilla Löwy
8aaea57421 Fix gamma test not checking for NULL return value 2021-12-31 13:13:21 +01:00
Camilla Löwy
f8ef3ca719 Add hiding and showing to interactive window test 2021-12-24 00:56:44 +01:00
Camilla Löwy
cd01187b9d Fix initial windowed mode size for test 2021-12-09 20:05:07 +01:00
Camilla Löwy
575d2971d4 Fix glfwinfo not handling --platform=any 2021-10-27 18:22:06 +02:00
Camilla Löwy
56a4cb0a3a Add runtime platform selection
This adds compile-time support for multiple platforms and runtime
detection of them.  Window system related platform functions are now
called from shared code via the function pointer struct _GLFWplatform.

The timer, thread and module loading platform functions are still called
directly by name and the implementation chosen at link-time.  These
functions are the same for any backend on a given OS, including the Null
backend.

The platforms are now enabled via CMake dependent options following the
GLFW_BUILD_<platform> pattern instead of a mix of automagic and ad-hoc
option names.  There is no longer any option for the Null backend as it
is now always enabled.

Much of the struct stitching work in platform.h was based on an earlier
experimental branch for runtime platform selection by @ronchaine.

Every platform function related to windows, contexts, monitors, input,
event processing and Vulkan have been renamed so that multiple sets of
them can exist without colliding.  Calls to these are now routed through
the _glfw.platform struct member.  These changes makes up most of this
commit.

For Wayland and X11 the client library loading and display creation is
used to detect a running compositor/server.  The XDG_SESSION_TYPE
environment variable is ignored for now, as X11 is still by far the more
complete implementation.

Closes #1655
Closes #1958
2021-10-13 21:47:11 +02:00
Camilla Löwy
1d8d1ff3d0 Fix output for missing Vulkan surface extensions
When the Vulkan loader is present but there are no required surface
extensions, as will for example happen with the Null platform, glfwinfo
caused an error in glfwGetPhysicalDevicePresentationSupport and produced
confusing output.
2021-10-12 12:54:34 +02:00
Camilla Löwy
7614d088e9 Fix string buffer sizes in window test 2021-10-05 18:11:25 +02:00
Camilla Löwy
62074f3dea Update glad2 and switch to header-only version
This updates to a newer version of glad2 and switches to the header-only
variant.

This also (finally) switches to the newer glad2 loader signature that
allows us to pass in glfwGetInstanceProcAddress directly.
2021-08-26 16:03:40 +02:00
Camilla Löwy
22b586b3d8 Add pluggable heap allocator
This adds the glfwInitAllocator function for specifying a custom memory
allocator to use instead of the C runtime library.

The allocator is a struct of type GLFWallocator with fields
corresponding to malloc, realloc and free, while the internal API
corresponds to calloc, realloc and free.

Heap allocation calls are filtered before reaching the user-provided
functions, so deallocation of NULL and allocations of zero bytes are not
passed on, reallocating NULL is transformed into an allocation and
reallocating to size zero is transformed into deallocation.

The clearing of a new block to zero is performed by the internal
calloc-like function.

Closes #544.
Fixes #1628.
Closes #1947.
2021-08-25 21:00:10 +02:00
Camilla Löwy
061a0263a9 Win32: Fix compilation with standalone LLVM
The /clang: suffix passed to Clang-CL was accidentally also passed to
the regular standalone Clang, which caused compilation to fail.  We now
pass /W3 to Clang-CL, which it interprets as -Wall.

The _CRT_SECURE_NO_WARNINGS macro is now defined for both Clang and
Clang-CL.

The /entry: flag passed to link.exe is now also passed to lld-link,
letting the windows subsystem tests and examples link.

Fixes #1807.
Closes #1824.
Closes #1874.
2021-04-22 22:37:37 +02:00
Camilla Löwy
330f7da746 Add Vulkan device presentation support to glfwinfo
The glfwinfo tool now reports the results of
glfwGetPhysicalDevicePresentationSupport for each physical device.
2021-04-22 22:37:13 +02:00
Camilla Löwy
0beadfdc66 Add window surface creation to glfwinfo
The glfwinfo tool now attempts Vulkan surface creation via
glfwCreateWindowSurface and reports the results.
2021-04-22 22:34:40 +02:00
Camilla Löwy
f90df24244 Add GLFW_X11_XCB_VULKAN_SURFACE flag to glfwinfo 2021-04-22 22:33:40 +02:00
Nicolas Caramelli
8d47dc5894 Update test SPIR-V shader code
Closes #1781.
2020-10-05 23:24:12 +02:00
Camilla Löwy
5c92cd9f52 Make windows test a tolerable example 2020-07-15 19:22:30 +02:00
Camilla Löwy
686e18fd72 Remove window opacity test
It has been superceded by the window property test.
2020-07-15 19:08:09 +02:00
Camilla Löwy
3207fc7120 Add window property test 2020-07-15 19:08:04 +02:00
Camilla Löwy
0dea8a4441 EGL: Add support for EGL_ANGLE_platform_angle
This adds basic support for selecting the platform type (rendering
backend) when running on ANGLE.

Related to #1380.
2020-06-29 00:02:22 +02:00
Camilla Löwy
e6a6a99813 Use stdbool more consistently in glfwinfo 2020-06-28 21:23:29 +02:00
Camilla Löwy
1cecb8beb0 Move glfwinfo argument processing before glfwInit
This will allow init hints to be controlled by command-line arguments.
2020-06-28 21:23:29 +02:00
Camilla Löwy
b420ca7404 Add GLFW_CONTEXT_DEBUG window hint alias
This adds GLFW_CONTEXT_DEBUG as a preferred alias for
the GLFW_OPENGL_DEBUG_CONTEXT window hint, as debug contexts are
defined for both OpenGL and OpenGL ES.

Related to #1720.
2020-06-28 19:27:48 +02:00
Camilla Löwy
72366ac9a9 Cocoa: Finish launching NSApp in glfwInit
This moves the remaining bits of NSApplication initialization into
_glfwPlatformInit.  As a side-effect of this, any command-line program
initializing GLFW will get a menu bar, which is not ideal.

If this has happened to you and a bisect led you here, please see the
GLFW_COCOA_MENUBAR init hint introduced in GLFW 3.3.

If this patch is a terrible idea, please get in touch in the 3.4 release
timeframe.

This is a replacement for 6e6805000a,
which attempts to preserve the existing menu bar creation behavior for
the 3.3-stable branch.

Fixes #1649.
2020-03-12 01:56:35 +01:00