comparison dep/animone/src/win.cc @ 337:a7d4e5107531

dep/animone: REFACTOR ALL THE THINGS 1: animone now has its own syntax divergent from anisthesia, making different platforms actually have their own sections 2: process names in animone are now called `comm' (this will probably break things). this is what its called in bsd/linux so I'm just going to use it everywhere 3: the X11 code now checks for the existence of a UTF-8 window title and passes it if available 4: ANYTHING THATS NOT LINUX IS 100% UNTESTED AND CAN AND WILL BREAK! I still actually need to test the bsd code. to be honest I'm probably going to move all of the bsds into separate files because they're all essentially different operating systems at this point
author Paper <paper@paper.us.eu.org>
date Wed, 19 Jun 2024 12:51:15 -0400
parents b1f625b0227c
children
comparison
equal deleted inserted replaced
336:d260549151d6 337:a7d4e5107531
1 #include "animone/win.h" 1 #include "animone/win.h"
2 2
3 #ifdef WIN32 3 #ifdef USE_WIN32
4 # include "animone/win/win32.h" 4 # include "animone/win/win32.h"
5 #endif 5 #endif
6 6
7 #ifdef MACOSX 7 #ifdef USE_MACOSX
8 # include "animone/win/quartz.h" 8 # include "animone/win/quartz.h"
9 #endif 9 #endif
10 10
11 #ifdef X11 11 #ifdef USE_X11
12 # include "animone/win/x11.h" 12 # include "animone/win/x11.h"
13 #endif 13 #endif
14 14
15 namespace animone::internal { 15 namespace animone::internal {
16 16
17 bool EnumerateWindows(window_proc_t window_proc) { 17 bool EnumerateWindows(window_proc_t window_proc) {
18 bool success = false; 18 bool success = false;
19 19
20 #ifdef WIN32 20 #ifdef USE_WIN32
21 success |= win32::EnumerateWindows(window_proc); 21 success |= win32::EnumerateWindows(window_proc);
22 #endif 22 #endif
23 23
24 #ifdef MACOSX 24 #ifdef USE_MACOSX
25 success |= quartz::EnumerateWindows(window_proc); 25 success |= quartz::EnumerateWindows(window_proc);
26 #endif 26 #endif
27 27
28 #ifdef X11 28 #ifdef USE_X11
29 success |= x11::EnumerateWindows(window_proc); 29 success |= x11::EnumerateWindows(window_proc);
30 #endif 30 #endif
31 31
32 return success; 32 return success;
33 } 33 }