21 Commits

Author SHA1 Message Date
797a24251f Don't clear history each time individual items are added or removed.
This will prevent the playback history from vanishing unexpectedly in case a preset can't be loaded.

Also fixed a few typos in the Doxygen comments and clarified how the history is changed when changing the playlist.
2025-10-27 19:20:07 +01:00
b742bc0082 Add API header compile tests for C
This will enable any future changes to the header to be tested. These additional build checks are only executed if BUILD_TESTING is enabled (e.g. in our automated build checks) to speed up release builds.
2025-03-24 10:00:24 +01:00
7e45cbe1f9 Clean up minor warnings and code style
* Remove warnings for code in vendor folders
* Add pedantic and extra warnings in GCC only to projectM sources
* Rename ResetOpenGL to SetWindowSize
2024-02-01 11:27:10 -06:00
9762297909 Properly namespace all classes under "::libprojectM" 2023-12-30 14:56:35 +01:00
c00d469081 Fix crash if playlist sort item count is out of bounds.
API docs say it's safe to pass out-of-bounds values, so it should behave in that way.
2023-03-23 10:48:07 +01:00
0940ec9532 Replace "-4.0" by "-4" 2023-02-22 16:34:46 +01:00
ede45f2e8c CMake: Replace "api/libprojectM/" by "api/projectM-4.0/" 2023-02-22 16:34:46 +01:00
139bd350fb Replace "#include <libprojectM/" by "#include <projectM-4.0/"
$ git grep -l 'include <libprojectM/' | xargs sed 's,include <libprojectM/,include <projectM-4.0/,' -i
2023-02-22 16:34:46 +01:00
1f33c810b3 Split up API headers into smaller, categorized files.
Also updated copyright and prefixed the render-related function with "opengl".
2023-01-18 12:57:57 +01:00
bac2a7ae12 Fix playlist tests on Windows.
Removed dependency on projectMtarget alltogether, as the playlist tests don't need the core library at all, only a few API functions which are mocked. Also made sure the mocked functions are declared as dllexport on Windows to match the dllimport declspec in the playlist library.
2023-01-17 18:55:29 +01:00
6e795ec632 Only build either shared or static projectM and playlist libraries.
Target name is now just libprojectM::projectM for the main library instead of libprojectM::static or libprojectM::shared.

Now using CMake's default mechanism to select the resulting library type via the BUILD_SHARED_LIBS variable. Main use case will be working with the shared library, which is the default.

Playlist library now also builds as a shared library, including proper symbol exports.

Additionally, deleted the leftover TestRunner class and a few old and rather useless test cases.

Also added LLVM find_package call and as a link dependency if the build is configured for using (experimental) LLVM code.

Reorganized tests to link either one of the object libraries for unit testing.
2023-01-13 11:16:27 +01:00
f2615a1745 Change projectm_playlist_items() method to return a given range of items. 2023-01-07 18:37:23 +01:00
4d54a511d1 Add projectm_playlist_get_shuffle() method to playlist API 2023-01-07 18:37:22 +01:00
c4f24ba5e7 Fix tests on Windows, use correct filter syntax in projectMPlaylistPlaylist_ApplyFilter test. 2022-12-05 12:04:16 +01:00
42387a671b Add preset switched event formerly defined in projectM.h to playlist API 2022-12-04 21:54:29 +01:00
9ea98bf01e Add glob pattern filtering to playlist library.
Syntax is very similar to .gitignore glob syntax, with a few exceptions to simplify use.
2022-12-04 20:54:15 +01:00
a1ffd93e31 Add next/previous/last functions and playback history recording. 2022-11-26 23:47:04 +01:00
03f81ff36f Added more missing functions and tests to the playlist implementation. 2022-11-26 22:17:29 +01:00
7dcbe75db3 Added playback control methods and preset switching support. 2022-11-21 19:56:30 +01:00
7363afecc2 Add path scanning and sorting to the playlist implementation.
Path scanning is using C++17's std::filesystem if available, but uses boost::filesystem as fallback. Using boost can be forced using the ENABLE_BOOST_FILESYSTEM CMake option.
2022-11-21 19:54:57 +01:00
4dfae6bf22 Add test project for playlist library, implemented tests for existing code and fixed a few issues found by testing. 2022-11-21 19:54:57 +01:00