Mercurial > minori
comparison 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 |
comparison
equal
deleted
inserted
replaced
201:8f6f8dd2eb23 | 202:71832ffe425a |
---|---|
1 #include "animia/win.h" | 1 #include "animia/win.h" |
2 | 2 |
3 #ifdef WIN32 | 3 #ifdef WIN32 |
4 # include "animia/win/win32.h" | 4 # include "animia/win/win32.h" |
5 #elif MACOSX | 5 #endif |
6 | |
7 #ifdef MACOSX | |
6 # include "animia/win/quartz.h" | 8 # include "animia/win/quartz.h" |
7 #elif X11 | 9 #endif |
10 | |
11 #ifdef X11 | |
8 # include "animia/win/x11.h" | 12 # include "animia/win/x11.h" |
13 #endif | |
14 | |
15 #ifdef WAYLAND | |
16 # include "animia/win/wayland.h" | |
9 #endif | 17 #endif |
10 | 18 |
11 namespace animia::internal { | 19 namespace animia::internal { |
12 | 20 |
21 bool EnumerateWindows(window_proc_t window_proc) { | |
22 bool success = false; | |
23 | |
13 #ifdef WIN32 | 24 #ifdef WIN32 |
14 win32::Win32WinTools os_win; | 25 success |= win32::EnumerateWindows(window_proc); |
15 #elif MACOSX | |
16 quartz::QuartzWinTools os_win; | |
17 #elif X11 | |
18 x11::X11WinTools os_win; | |
19 #else | |
20 BaseWinTools os_win; | |
21 #endif | 26 #endif |
22 | 27 |
23 BaseWinTools& win = os_win; | 28 #ifdef MACOSX |
29 success |= quartz::EnumerateWindows(window_proc); | |
30 #endif | |
31 | |
32 #ifdef X11 | |
33 success |= x11::EnumerateWindows(window_proc); | |
34 #endif | |
35 | |
36 #ifdef WAYLAND | |
37 success |= wayland::EnumerateWindows(window_proc); | |
38 #endif | |
39 | |
40 return success; | |
41 } | |
24 | 42 |
25 } // namespace animia::internal | 43 } // namespace animia::internal |