Mercurial > minori
comparison dep/animia/src/fd.cc @ 166:54c5d80a737e
dep/animia: add libutil method
I changed the "linux" method to be "proc", because it isn't exactly Linux specific
this commit also has some changes to the x11 stuff:
instead of enumerating over only top-level windows, we iterate over ALL of them
this is because many X11 apps actually use multiple windows
for some reason, I still can't get it to work with VLC, but it picks up Firefox...
author | paper@DavesDouble.local |
---|---|
date | Sun, 19 Nov 2023 04:21:56 -0500 |
parents | cdf79282d647 |
children | bc1ae1810855 8f6f8dd2eb23 |
comparison
equal
deleted
inserted
replaced
165:8937fb7f2d66 | 166:54c5d80a737e |
---|---|
1 #include "animia/fd.h" | 1 #include "animia/fd.h" |
2 | 2 |
3 #ifdef WIN32 | 3 #ifdef WIN32 |
4 # include "animia/fd/win32.h" | 4 # include "animia/fd/win32.h" |
5 #elif defined(LINUX) | 5 #elif defined(LINUX) || defined(FREEBSD) |
6 # include "animia/fd/linux.h" | 6 # include "animia/fd/proc.h" |
7 #elif defined(MACOSX) | 7 #elif defined(MACOSX) |
8 # include "animia/fd/xnu.h" | 8 # include "animia/fd/xnu.h" |
9 #elif defined(LIBUTIL) | |
10 # include "animia/fd/libutil.h" | |
9 #endif | 11 #endif |
10 | 12 |
11 namespace animia::internal { | 13 namespace animia::internal { |
12 | 14 |
13 #ifdef WIN32 | 15 #ifdef WIN32 |
14 win32::Win32FdTools os_fd; | 16 win32::Win32FdTools os_fd; |
15 #elif defined(LINUX) | 17 #elif defined(LINUX) || defined(FREEBSD) |
16 linux::LinuxFdTools os_fd; | 18 proc::ProcFdTools os_fd; |
17 #elif defined(MACOSX) | 19 #elif defined(MACOSX) |
18 xnu::XnuFdTools os_fd; | 20 xnu::XnuFdTools os_fd; |
21 #elif defined(LIBUTIL) | |
22 libutil::LibutilFdTools os_fd; | |
19 #else | 23 #else |
20 BaseFdTools os_fd; | 24 BaseFdTools os_fd; |
21 #endif | 25 #endif |
22 | 26 |
23 BaseFdTools& fd = os_fd; | 27 BaseFdTools& fd = os_fd; |