]> git.tdb.fi Git - libs/gui.git/log
libs/gui.git
23 months agoFix Windows version check for touch input
Mikko Rasa [Sun, 18 Dec 2022 16:46:30 +0000 (18:46 +0200)]
Fix Windows version check for touch input

23 months agoEnable xrandr support by default
Mikko Rasa [Sun, 27 Nov 2022 14:29:47 +0000 (16:29 +0200)]
Enable xrandr support by default

23 months agoAdd an example program for listing video modes
Mikko Rasa [Sun, 27 Nov 2022 14:29:34 +0000 (16:29 +0200)]
Add an example program for listing video modes

23 months agoRemove an unused function
Mikko Rasa [Sun, 27 Nov 2022 14:28:18 +0000 (16:28 +0200)]
Remove an unused function

23 months agoUse lambdas for comparison functions
Mikko Rasa [Sun, 27 Nov 2022 14:27:36 +0000 (16:27 +0200)]
Use lambdas for comparison functions

23 months agoCorrectly sort inactive monitors on X11
Mikko Rasa [Sun, 27 Nov 2022 14:21:30 +0000 (16:21 +0200)]
Correctly sort inactive monitors on X11

23 months agoAdd a missing scope qualifier to Windows GLContext
Mikko Rasa [Sun, 27 Nov 2022 14:20:59 +0000 (16:20 +0200)]
Add a missing scope qualifier to Windows GLContext

23 months agoFix some issues in VulkanContext when Vulkan support is not enabled
Mikko Rasa [Sun, 27 Nov 2022 14:19:29 +0000 (16:19 +0200)]
Fix some issues in VulkanContext when Vulkan support is not enabled

23 months agoAvoid using std::list
Mikko Rasa [Sun, 27 Nov 2022 14:18:31 +0000 (16:18 +0200)]
Avoid using std::list

23 months agoUse nullptr in place of 0 or NULL
Mikko Rasa [Sun, 27 Nov 2022 12:01:01 +0000 (14:01 +0200)]
Use nullptr in place of 0 or NULL

23 months agoRemove unnecessary std:: qualifiers
Mikko Rasa [Sun, 27 Nov 2022 11:14:15 +0000 (13:14 +0200)]
Remove unnecessary std:: qualifiers

23 months agoReimplement reverse key lookup with a sorted vector
Mikko Rasa [Sun, 27 Nov 2022 11:09:58 +0000 (13:09 +0200)]
Reimplement reverse key lookup with a sorted vector

It's more efficient than map due to compact storage.

23 months agoUse constexpr instead of enum to define "typeless" constants
Mikko Rasa [Sun, 27 Nov 2022 10:57:42 +0000 (12:57 +0200)]
Use constexpr instead of enum to define "typeless" constants

23 months agoRename ControlSrcType::NONE to NO_SOURCE
Mikko Rasa [Sun, 27 Nov 2022 10:54:19 +0000 (12:54 +0200)]
Rename ControlSrcType::NONE to NO_SOURCE

NONE is too generic and can easily conflict with something else.

23 months agoUse default member initializers and defaulted default constructors
Mikko Rasa [Sun, 27 Nov 2022 10:51:13 +0000 (12:51 +0200)]
Use default member initializers and defaulted default constructors

23 months agoUse standard fixed size integer types
Mikko Rasa [Sun, 27 Nov 2022 10:13:08 +0000 (12:13 +0200)]
Use standard fixed size integer types

Those in quartzloader.cpp are apparently Apple's types and are
appropriate there.

23 months agoInclude the matching header first in .cpp files
Mikko Rasa [Sun, 27 Nov 2022 10:08:07 +0000 (12:08 +0200)]
Include the matching header first in .cpp files

This helps ensure that the headers are complete.  I haven't tested
building for non-Linux platforms at this time.

23 months agoMake Window's functions non-virtual
Mikko Rasa [Sun, 27 Nov 2022 09:57:24 +0000 (11:57 +0200)]
Make Window's functions non-virtual

The virtual keywords were left behind from the short-lived EventSource
abstraction over a decade ago.

23 months agoUse the override specifier where appropriate
Mikko Rasa [Sun, 27 Nov 2022 09:56:52 +0000 (11:56 +0200)]
Use the override specifier where appropriate

23 months agoRemove destructor declarations from exception classes
Mikko Rasa [Sun, 27 Nov 2022 09:40:46 +0000 (11:40 +0200)]
Remove destructor declarations from exception classes

Destructors are implicitly non-throwing in C++11 so these are no longer
necessary.

23 months agoStreamline iterators and loop constructs
Mikko Rasa [Sun, 27 Nov 2022 09:21:01 +0000 (11:21 +0200)]
Streamline iterators and loop constructs

Use range-based for loops where appropriate and the auto type instead of
spelling out the entire iterator type.

23 months agoBump library version and use C++11 for building
Mikko Rasa [Sun, 27 Nov 2022 09:04:54 +0000 (11:04 +0200)]
Bump library version and use C++11 for building

23 months agoAdd dependency to mspdatafile
Mikko Rasa [Sun, 27 Nov 2022 08:58:10 +0000 (10:58 +0200)]
Add dependency to mspdatafile

This should have been in 7302a06.

23 months agoMake ControlScheme's destructor virtual
Mikko Rasa [Sun, 27 Nov 2022 08:21:47 +0000 (10:21 +0200)]
Make ControlScheme's destructor virtual

2 years agoAdd constants for mouse axes and buttons
Mikko Rasa [Sun, 20 Nov 2022 14:01:20 +0000 (16:01 +0200)]
Add constants for mouse axes and buttons

2 years agoAdd classes for storing and applying bindings to controls
Mikko Rasa [Sat, 19 Nov 2022 22:05:12 +0000 (00:05 +0200)]
Add classes for storing and applying bindings to controls

2 years agoAdd functions to look up subdevices of composite input devices
Mikko Rasa [Sat, 19 Nov 2022 11:52:09 +0000 (13:52 +0200)]
Add functions to look up subdevices of composite input devices

2 years agoAdd conversions to/from string for key names and device types
Mikko Rasa [Sat, 19 Nov 2022 10:10:14 +0000 (12:10 +0200)]
Add conversions to/from string for key names and device types

2 years agoKeep track of edges in Control
Mikko Rasa [Thu, 17 Nov 2022 22:37:17 +0000 (00:37 +0200)]
Keep track of edges in Control

This offers a way to reliably tell if a control was actuated for
applications which don't want to use the signal interface.

2 years agoAdd a type enumeration for devices
Mikko Rasa [Thu, 17 Nov 2022 09:54:28 +0000 (11:54 +0200)]
Add a type enumeration for devices

This will help in storing control bindings in a way that isn't tied to
a particular instance of a device.

2 years agoGo back to using vector to store devices in a Hub
Mikko Rasa [Thu, 17 Nov 2022 09:41:50 +0000 (11:41 +0200)]
Go back to using vector to store devices in a Hub

Hashed names generate ridiculously large button and axis indices, and
Device stores them all in vectors.  The predictability issue will be
solved in a different way.

2 years agoAdd flag for tessellation shaders in Vulkan context
Mikko Rasa [Thu, 1 Sep 2022 19:46:47 +0000 (22:46 +0300)]
Add flag for tessellation shaders in Vulkan context

2 years agoAutomatically break into debugger on Vulkan errors
Mikko Rasa [Wed, 16 Mar 2022 10:13:48 +0000 (12:13 +0200)]
Automatically break into debugger on Vulkan errors

2 years agoAdjust Vulkan debug message output
Mikko Rasa [Wed, 16 Mar 2022 10:13:11 +0000 (12:13 +0200)]
Adjust Vulkan debug message output

All the information seems to already be included in the message, so
printing it is unnecessary.

Also include informational messages.

2 years agoSelect the correct physical device for Vulkan context
Mikko Rasa [Wed, 16 Mar 2022 10:07:17 +0000 (12:07 +0200)]
Select the correct physical device for Vulkan context

2 years agoAdd an option for enabling geometry shaders on Vulkan
Mikko Rasa [Sun, 12 Dec 2021 11:01:15 +0000 (13:01 +0200)]
Add an option for enabling geometry shaders on Vulkan

3 years agoAdd a class for creating Vulkan graphics contexts
Mikko Rasa [Sat, 20 Nov 2021 10:36:07 +0000 (12:36 +0200)]
Add a class for creating Vulkan graphics contexts

3 years agoChange call to hash function
Mikko Rasa [Wed, 17 Nov 2021 12:39:02 +0000 (14:39 +0200)]
Change call to hash function

3 years agoFormatting fix
Mikko Rasa [Tue, 2 Nov 2021 09:57:01 +0000 (11:57 +0200)]
Formatting fix

3 years agoAdd a function to detect image signature without creating a loader
Mikko Rasa [Tue, 2 Nov 2021 09:56:23 +0000 (11:56 +0200)]
Add a function to detect image signature without creating a loader

3 years agoLoad image signature directly into a string
Mikko Rasa [Tue, 2 Nov 2021 09:56:07 +0000 (11:56 +0200)]
Load image signature directly into a string

3 years agoUse the append function to build hex dump
Mikko Rasa [Tue, 2 Nov 2021 09:55:40 +0000 (11:55 +0200)]
Use the append function to build hex dump

3 years agoUse size_t for I/O operation sizes
Mikko Rasa [Tue, 2 Nov 2021 09:55:06 +0000 (11:55 +0200)]
Use size_t for I/O operation sizes

3 years agoAdapt to container type change in mspcore
Mikko Rasa [Tue, 2 Nov 2021 09:54:42 +0000 (11:54 +0200)]
Adapt to container type change in mspcore

3 years agoMake it possible to load an image into an externally allocated buffer
Mikko Rasa [Sun, 7 Feb 2021 16:15:18 +0000 (18:15 +0200)]
Make it possible to load an image into an externally allocated buffer

3 years agoSplit image loading into headers and pixels
Mikko Rasa [Sun, 7 Feb 2021 16:13:51 +0000 (18:13 +0200)]
Split image loading into headers and pixels

3 years agoAdd some state checking to ImageLoader
Mikko Rasa [Sun, 7 Feb 2021 14:36:12 +0000 (16:36 +0200)]
Add some state checking to ImageLoader

Reject attemps to call load again on the same loader

3 years agoRevert some changes which accidentally got included in d3bc6c9
Mikko Rasa [Sun, 7 Feb 2021 14:23:20 +0000 (16:23 +0200)]
Revert some changes which accidentally got included in d3bc6c9

3 years agoClear Image data before loading a new image
Mikko Rasa [Sun, 7 Feb 2021 13:49:22 +0000 (15:49 +0200)]
Clear Image data before loading a new image

3 years agoRename Image::Data::data to pixels
Mikko Rasa [Sun, 7 Feb 2021 13:24:02 +0000 (15:24 +0200)]
Rename Image::Data::data to pixels

And get_data to get_pixels accordingly

3 years agoRegister image loaders more explicitly
Mikko Rasa [Sun, 31 Jan 2021 15:19:42 +0000 (17:19 +0200)]
Register image loaders more explicitly

The automatic registration just doesn't work reliably enough; there was
already a hack to work around the problems, so might as well make that
the official way.

3 years agoFix BMP loader signature check
Mikko Rasa [Sun, 31 Jan 2021 15:18:37 +0000 (17:18 +0200)]
Fix BMP loader signature check

3 years agoAdd support for using the latest available OpenGL version
Mikko Rasa [Mon, 25 Jan 2021 23:30:56 +0000 (01:30 +0200)]
Add support for using the latest available OpenGL version

3 years agoFix compile errors from function casts in wgl
Mikko Rasa [Mon, 25 Jan 2021 23:28:33 +0000 (01:28 +0200)]
Fix compile errors from function casts in wgl

Recent gcc versions don't like casting directly between incompatible
function types.

5 years agoDon't apply user position in fullscreen mode
Mikko Rasa [Sat, 21 Sep 2019 11:05:53 +0000 (14:05 +0300)]
Don't apply user position in fullscreen mode

5 years agoPut Window on the correcte monitor when initially created
Mikko Rasa [Sat, 21 Sep 2019 11:05:29 +0000 (14:05 +0300)]
Put Window on the correcte monitor when initially created

5 years agoGenerate synthetic key release events for repeated keys on Windows
Mikko Rasa [Fri, 20 Sep 2019 22:26:38 +0000 (01:26 +0300)]
Generate synthetic key release events for repeated keys on Windows

The OS only sends WM_KEYDOWN messages as long as the key is pressed.

5 years agoHandle WM_SYSKEYDOWN, WM_SYSKEYUP and WM_SYSCHAR events
Mikko Rasa [Wed, 18 Sep 2019 15:04:33 +0000 (18:04 +0300)]
Handle WM_SYSKEYDOWN, WM_SYSKEYUP and WM_SYSCHAR events

Windows sends F10 and alt presses using these instead of the usual
messages.

5 years agoUse Get/SetWindowLongPtr
Mikko Rasa [Mon, 17 Jun 2019 22:34:52 +0000 (01:34 +0300)]
Use Get/SetWindowLongPtr

Since sizeof(long) != sizeof(void *) on Windows, the non-Ptr versions do
not work properly on 64-bit Windows.

5 years agoAdd a core profile flag to OpenGL context options
Mikko Rasa [Sun, 9 Jun 2019 10:59:59 +0000 (13:59 +0300)]
Add a core profile flag to OpenGL context options

5 years agoSort game controller devices for consistency
Mikko Rasa [Thu, 6 Jun 2019 09:39:00 +0000 (12:39 +0300)]
Sort game controller devices for consistency

Directory order might change as devices are plugged in and removed.

5 years agoMatch against current rate if no request for a specific rate was made
Mikko Rasa [Thu, 6 Jun 2019 09:32:35 +0000 (12:32 +0300)]
Match against current rate if no request for a specific rate was made

5 years agoInitialize monitor.current_settings on Windows
Mikko Rasa [Thu, 6 Jun 2019 09:29:49 +0000 (12:29 +0300)]
Initialize monitor.current_settings on Windows

6 years agoFix image signature comparisons
Mikko Rasa [Thu, 5 Jul 2018 14:27:23 +0000 (17:27 +0300)]
Fix image signature comparisons

The standard states that if a length is not given, the character array
must be nul-terminated.

6 years agoFix sizeof(jpeg_sig)
Mikko Rasa [Wed, 20 Jun 2018 10:30:35 +0000 (13:30 +0300)]
Fix sizeof(jpeg_sig)

Initializing a char array with a string literal appends a nul byte at the
end, which is not something we want.

6 years agoImplement the required virtual functions in JsDevice
Mikko Rasa [Mon, 4 Dec 2017 20:18:49 +0000 (22:18 +0200)]
Implement the required virtual functions in JsDevice

7 years agoInitialize longjmp target before calling jpeg_create_decompress
Mikko Rasa [Sun, 8 Jan 2017 11:40:46 +0000 (13:40 +0200)]
Initialize longjmp target before calling jpeg_create_decompress

7 years agoUse correct keyword in forward declaration
Mikko Rasa [Fri, 6 Jan 2017 02:55:34 +0000 (04:55 +0200)]
Use correct keyword in forward declaration

8 years agoAlter the starting condition for gestures
Mikko Rasa [Fri, 25 Nov 2016 21:18:05 +0000 (23:18 +0200)]
Alter the starting condition for gestures

This makes pinch and rotate in particular easier to perform.

8 years agoOnly hide and show the window on fullscreen change if it was visible
Mikko Rasa [Fri, 25 Nov 2016 11:21:50 +0000 (13:21 +0200)]
Only hide and show the window on fullscreen change if it was visible

8 years agoFix incorrect comparisons
Mikko Rasa [Fri, 25 Nov 2016 11:21:18 +0000 (13:21 +0200)]
Fix incorrect comparisons

8 years agoCreate a temporary context for calling wglGetProcAddress
Mikko Rasa [Sat, 5 Nov 2016 15:07:59 +0000 (17:07 +0200)]
Create a temporary context for calling wglGetProcAddress

8 years agoAdd a missing include for GLContext on Windows
Mikko Rasa [Sat, 5 Nov 2016 12:28:36 +0000 (14:28 +0200)]
Add a missing include for GLContext on Windows

8 years agoUse the name of the function for the SwapInterval function pointers
Mikko Rasa [Wed, 2 Nov 2016 21:27:10 +0000 (23:27 +0200)]
Use the name of the function for the SwapInterval function pointers

8 years agoSupport forward-compatible OpenGL contexts
Mikko Rasa [Wed, 2 Nov 2016 21:23:35 +0000 (23:23 +0200)]
Support forward-compatible OpenGL contexts

8 years agoImprove cursor hiding logic on Windows
Mikko Rasa [Sat, 29 Oct 2016 12:01:01 +0000 (15:01 +0300)]
Improve cursor hiding logic on Windows

Only hide it when it's in the client area of the window

8 years agoFix a memory leak
Mikko Rasa [Fri, 7 Oct 2016 22:27:56 +0000 (01:27 +0300)]
Fix a memory leak

8 years agoAdd support for swap interval control
Mikko Rasa [Sun, 2 Oct 2016 21:10:01 +0000 (00:10 +0300)]
Add support for swap interval control

8 years agoImplement game controllers on Windows through XInput
Mikko Rasa [Tue, 20 Sep 2016 08:14:07 +0000 (11:14 +0300)]
Implement game controllers on Windows through XInput

8 years agoEnumerate available game controllers
Mikko Rasa [Mon, 19 Sep 2016 20:39:14 +0000 (23:39 +0300)]
Enumerate available game controllers

Assign indices from zero to N-1 internally.  This makes it easier for
applications to use game controllers as the first available controller
will always have index zero.

8 years agoFix GameController multiple inclusion guards
Mikko Rasa [Mon, 19 Sep 2016 20:36:51 +0000 (23:36 +0300)]
Fix GameController multiple inclusion guards

8 years agoImplement three-finger tap and drag gestures
Mikko Rasa [Mon, 19 Sep 2016 20:31:45 +0000 (23:31 +0300)]
Implement three-finger tap and drag gestures

8 years agoRefactor GestureDetector logic
Mikko Rasa [Mon, 19 Sep 2016 20:30:14 +0000 (23:30 +0300)]
Refactor GestureDetector logic

Active_points only ever had the one or two bottom bits set and always
matched current gesture.  It's simpler to just use the number of points
for the gesture.

8 years agoTweak GestureDetector button and axis names
Mikko Rasa [Mon, 19 Sep 2016 17:51:32 +0000 (20:51 +0300)]
Tweak GestureDetector button and axis names

Tap gesture buttons were missing names and the progress axis was outdated.

8 years agoAdd touchscreen and gestures to the event test program
Mikko Rasa [Mon, 19 Sep 2016 17:32:45 +0000 (20:32 +0300)]
Add touchscreen and gestures to the event test program

8 years agoAdd focus events to the event test program
Mikko Rasa [Mon, 19 Sep 2016 17:32:22 +0000 (20:32 +0300)]
Add focus events to the event test program

8 years agoPaint the window in WM_PAINT
Mikko Rasa [Sat, 17 Sep 2016 15:47:36 +0000 (18:47 +0300)]
Paint the window in WM_PAINT

Failing to do so will result the application in getting stuck in the
event loop.

8 years agoImplement additional fullscreen options for Window
Mikko Rasa [Fri, 16 Sep 2016 23:08:45 +0000 (02:08 +0300)]
Implement additional fullscreen options for Window

8 years agoRetain monitor positions when setting non-exclusive modes
Mikko Rasa [Fri, 16 Sep 2016 23:00:36 +0000 (02:00 +0300)]
Retain monitor positions when setting non-exclusive modes

Trying to rearrange the monitors was a stupid idea, as it can easily mess
up the user's configuration.

8 years agoRemove names from unused parameters
Mikko Rasa [Fri, 16 Sep 2016 21:43:15 +0000 (00:43 +0300)]
Remove names from unused parameters

8 years agoRefactor storage of monitor settings
Mikko Rasa [Fri, 16 Sep 2016 21:34:26 +0000 (00:34 +0300)]
Refactor storage of monitor settings

8 years agoRemove glViewport calls from GLContext
Mikko Rasa [Thu, 15 Sep 2016 21:12:26 +0000 (00:12 +0300)]
Remove glViewport calls from GLContext

They've been broken for a long time with mspgl, probably since
framebuffer objects were implemented.  The new GL::View class
takes care of viewport size syncing better.

8 years agoGet monitor names from EDID if available
Mikko Rasa [Thu, 15 Sep 2016 17:22:06 +0000 (20:22 +0300)]
Get monitor names from EDID if available

8 years agoSwap fullscreen mode dimensions if the desktop is rotated
Mikko Rasa [Tue, 2 Aug 2016 21:00:51 +0000 (00:00 +0300)]
Swap fullscreen mode dimensions if the desktop is rotated

8 years agoImplement a loader for BMP images
Mikko Rasa [Mon, 25 Jul 2016 21:51:09 +0000 (00:51 +0300)]
Implement a loader for BMP images

8 years agoDon't leak memory if JsDevice constructor throws
Mikko Rasa [Sat, 23 Jul 2016 15:50:32 +0000 (18:50 +0300)]
Don't leak memory if JsDevice constructor throws

8 years agoAdd support for blocking ticks and EventDispatcher in GameController
Mikko Rasa [Thu, 21 Jul 2016 00:01:03 +0000 (03:01 +0300)]
Add support for blocking ticks and EventDispatcher in GameController

Note: the parameterless tick() method was previously non-blocking but now
blocks until an event is received.

8 years agoTrack the currently focused window in Display
Mikko Rasa [Sun, 7 Feb 2016 13:53:19 +0000 (15:53 +0200)]
Track the currently focused window in Display

On mobile platforms it's important for applications to stop rendering or
otherwise using excessive amounts of CPU power when inactive.

OS X code is a dummy implementation because I need more time to understand
the relevant events on that platform.

8 years agoSupport some additional keys
Mikko Rasa [Sat, 30 Jan 2016 19:31:27 +0000 (21:31 +0200)]
Support some additional keys

In particular, the standard keys on Android devices are now supported.

8 years agoCheck for event type and source in Android touchscreen driver
Mikko Rasa [Sat, 30 Jan 2016 18:36:42 +0000 (20:36 +0200)]
Check for event type and source in Android touchscreen driver