Mercurial > minori
diff dep/animone/include/animone.h @ 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 | adb79bdde329 |
line wrap: on
line diff
--- a/dep/animone/include/animone.h Wed Jun 19 06:32:25 2024 -0400 +++ b/dep/animone/include/animone.h Wed Jun 19 12:51:15 2024 -0400 @@ -1,26 +1,25 @@ #ifndef ANIMONE_ANIMONE_H_ #define ANIMONE_ANIMONE_H_ +#include <cstdint> + #include "animone/media.h" #include "animone/player.h" #include "animone/types.h" namespace animone { -enum class ResultType { - Process, - Window -}; - struct Process { - internal::pid_t pid = 0; /* pid_t == DWORD on Windows, from <sys/types.h> everywhere else */ - std::string name; + internal::pid_t pid = 0; /* platform-dependent PID */ + ExecutablePlatform platform = ExecutablePlatform::Unknown; /* platform of the executable */ + std::string comm; /* the full filename of the executable */ }; struct Window { - unsigned int id = 0; - std::string class_name; - std::string text; /* title bar text */ + std::uint32_t id = 0; /* platform-dependent window id */ + WindowPlatform platform = WindowPlatform::Unknown; /* platform of the window */ + std::string class_name; /* class name on win32 and x11, bundle ID on macos */ + std::string text; /* title bar text if available */ }; struct Result {