diff dep/animone/include/animone.h @ 342:adb79bdde329

dep/animone: fix tons of issues for example, the window ID stuff was just... completely wrong. since we're supporting multiple different window systems, it *has* to be a union rather than just a single integer type. HWND is also not a DWORD, it's a pointer(!), so now it's stored as a std::uintptr_t. (this probably breaks things)
author Paper <paper@paper.us.eu.org>
date Thu, 20 Jun 2024 03:03:05 -0400
parents a7d4e5107531
children
line wrap: on
line diff
--- a/dep/animone/include/animone.h	Wed Jun 19 23:21:19 2024 -0400
+++ b/dep/animone/include/animone.h	Thu Jun 20 03:03:05 2024 -0400
@@ -9,27 +9,27 @@
 
 namespace animone {
 
-struct Process {
+struct ANIMONE_API Process {
 	internal::pid_t pid = 0; /* platform-dependent PID */
 	ExecutablePlatform platform = ExecutablePlatform::Unknown; /* platform of the executable */
 	std::string comm; /* the full filename of the executable */
 };
 
-struct Window {
-	std::uint32_t id = 0; /* platform-dependent window id */
+struct ANIMONE_API Window {
+	internal::wid_t id = {0}; /* union of window IDs. depends on the platform which one is correct */
 	WindowPlatform platform = WindowPlatform::Unknown; /* platform of the window */
 	std::string class_name; /* class name on win32 and x11, bundle ID on macos */
 	std::string text; /* title bar text if available */
 };
 
-struct Result {
+struct ANIMONE_API Result {
 	Player player;
 	Process process;
 	Window window; /* has nothing under process mode */
 	std::vector<Media> media;
 };
 
-bool GetResults(const std::vector<Player>& players, std::vector<Result>& results);
+ANIMONE_API bool GetResults(const std::vector<Player>& players, std::vector<Result>& results);
 
 } // namespace animone