view dep/animia/src/win.cc @ 198:bc1ae1810855

dep/animia: switch from using classes to global functions the old idea was ok, but sort of hackish; this method doesn't use classes at all, and this way (especially important!) we can do wayland stuff AND x11 at the same time, which wasn't really possible without stupid workarounds in the other method
author Paper <mrpapersonic@gmail.com>
date Sun, 24 Dec 2023 02:59:42 -0500
parents 2d5823df870f
children 9f3534f6b8c4
line wrap: on
line source

#include "animia/win.h"

#ifdef WIN32
#	include "animia/win/win32.h"
#endif

#ifdef MACOSX
#	include "animia/win/quartz.h"
#endif

#ifdef X11
#	include "animia/win/x11.h"
#endif

namespace animia::internal {

bool EnumerateWindows(window_proc_t window_proc) {
	bool success = false;

#ifdef WIN32
	success ^= win32::EnumerateWindows(window_proc);
#endif

#ifdef MACOSX
	success ^= quartz::EnumerateWindows(window_proc);
#endif

#ifdef X11
	success ^= x11::EnumerateWindows(window_proc);
#endif

	return success;
}

} // namespace animia::internal