Mercurial > minori
diff dep/animia/src/win.cc @ 202:71832ffe425a
animia: re-add kvm fd source
this is all being merged from my wildly out-of-date laptop. SORRY!
in other news, I edited the CI file to install the wayland client
as well, so the linux CI build might finally get wayland stuff.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Tue, 02 Jan 2024 06:05:06 -0500 |
parents | 9f3534f6b8c4 |
children |
line wrap: on
line diff
--- a/dep/animia/src/win.cc Sun Nov 19 19:13:28 2023 -0500 +++ b/dep/animia/src/win.cc Tue Jan 02 06:05:06 2024 -0500 @@ -2,24 +2,42 @@ #ifdef WIN32 # include "animia/win/win32.h" -#elif MACOSX +#endif + +#ifdef MACOSX # include "animia/win/quartz.h" -#elif X11 +#endif + +#ifdef X11 # include "animia/win/x11.h" #endif +#ifdef WAYLAND +# include "animia/win/wayland.h" +#endif + namespace animia::internal { +bool EnumerateWindows(window_proc_t window_proc) { + bool success = false; + #ifdef WIN32 -win32::Win32WinTools os_win; -#elif MACOSX -quartz::QuartzWinTools os_win; -#elif X11 -x11::X11WinTools os_win; -#else -BaseWinTools os_win; + success |= win32::EnumerateWindows(window_proc); +#endif + +#ifdef MACOSX + success |= quartz::EnumerateWindows(window_proc); #endif -BaseWinTools& win = os_win; +#ifdef X11 + success |= x11::EnumerateWindows(window_proc); +#endif + +#ifdef WAYLAND + success |= wayland::EnumerateWindows(window_proc); +#endif + + return success; +} } // namespace animia::internal