SFML/src/SFML
Chris Thrasher cbec344876 Use one InputImpl.hpp header for all implementations
There were 6 copies of InputImpl.hpp for Windows, macOS, Linux,
Linux DRM, iOS, and Android. All but Windows and Linux DRM were
identical so there's already an easy opportunity for consolidation.

The Windows header included some additional private static functions
and data. An equivalent way of expressing this is via more data and
functions instead the anonymous namespace of Win32/InputImpl.cpp so
that's what I did. To fix some issues with functions being used
before they're defined I moved number of functions into the anonymous
namespace of that file which resulted in adding `sf::` in lots of places.

InputImplUDev.hpp used by the DRM backend was trickier because includes
WindowImplDRM as a friend. This creates a weird dependency graph where a
distant class can call private functions that mutate private state. I
kept the definitions of those functions inside DRM/InputImpl.cpp while
moving their declaration to WindowImplDRM.cpp which is the only file
where they're used. This is a bit odd but it avoids using the
preprocessor and ensures that only the file that needs these functions
can call them.

In the end I was able to delete all 6 separate copies of InputImpl.hpp
and consolidate them into src/SFML/Window/InputImpl.hpp saving nearly
1,000 lines of code.

Because `sf::priv::InputImpl` is merely a set of static functions I
converted this class to a simple namespace. The use of a namespace is
what ultimately allowed me to untangle the DRM functions that were not
present in other implementations
2023-09-30 14:16:12 -06:00
..
Audio Use imported targets for Vorbis and Ogg 2023-08-29 23:18:00 -06:00
Graphics Add clang-tidy modernize-return-braced-init-list check 2023-09-17 15:47:33 -06:00
Main Add Android clang-tidy job 2023-07-31 15:28:25 -06:00
Network Add clang-tidy modernize-return-braced-init-list check 2023-09-17 15:47:33 -06:00
System Use cross-platform threading library target 2023-09-24 20:57:33 -06:00
Window Use one InputImpl.hpp header for all implementations 2023-09-30 14:16:12 -06:00
Android.mk Android work in progress changes 2018-04-14 09:59:01 +02:00
CMakeLists.txt Fix path to macOS Frameworks 2023-07-27 13:24:03 -06:00
PCH.hpp Reorder includes hierarchically 2023-04-25 17:25:33 +02:00