Mercurial > minori
annotate dep/animia/src/win.cc @ 231:69f4768a820c
chore: merge divergent branches
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sat, 13 Jan 2024 09:43:41 -0500 |
parents | 9f3534f6b8c4 |
children |
rev | line source |
---|---|
154 | 1 #include "animia/win.h" |
152
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
2 |
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
3 #ifdef WIN32 |
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
4 # include "animia/win/win32.h" |
198
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
5 #endif |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
6 |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
7 #ifdef MACOSX |
155
d2bbb5773616
dep/animia: add quartz backend for windows
Paper <mrpapersonic@gmail.com>
parents:
154
diff
changeset
|
8 # include "animia/win/quartz.h" |
198
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
9 #endif |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
10 |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
11 #ifdef X11 |
158
80d6b28eb29f
dep/animia: fix most X11 stuff
Paper <mrpapersonic@gmail.com>
parents:
157
diff
changeset
|
12 # include "animia/win/x11.h" |
152
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
13 #endif |
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
14 |
199
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
15 #ifdef WAYLAND |
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
16 # include "animia/win/wayland.h" |
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
17 #endif |
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
18 |
152
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
19 namespace animia::internal { |
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
20 |
198
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
21 bool EnumerateWindows(window_proc_t window_proc) { |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
22 bool success = false; |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
23 |
152
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
24 #ifdef WIN32 |
199
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
25 success |= win32::EnumerateWindows(window_proc); |
152
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
26 #endif |
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
27 |
198
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
28 #ifdef MACOSX |
199
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
29 success |= quartz::EnumerateWindows(window_proc); |
198
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
30 #endif |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
31 |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
32 #ifdef X11 |
199
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
33 success |= x11::EnumerateWindows(window_proc); |
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
34 #endif |
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
35 |
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
36 #ifdef WAYLAND |
9f3534f6b8c4
dep/animia: initial Wayland support, drop non-working kvm fd plugin
Paper <mrpapersonic@gmail.com>
parents:
198
diff
changeset
|
37 success |= wayland::EnumerateWindows(window_proc); |
198
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
38 #endif |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
39 |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
40 return success; |
bc1ae1810855
dep/animia: switch from using classes to global functions
Paper <mrpapersonic@gmail.com>
parents:
190
diff
changeset
|
41 } |
152
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
42 |
156
cdf79282d647
dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
155
diff
changeset
|
43 } // namespace animia::internal |