Mercurial > minori
view dep/animone/include/animone.h @ 347:a0aa8c8c4307
dep/anitomy: port to use UCS-4 rather than wide strings
rationale: wide strings are not the same on every platform, and
might not even be Unicode. (while they usually are, its possible
that they are not)
I was *going* to change StringToInt to use a string stream, but
outputting to an integer doesn't seem to work at all with UCS-4,
even though it ought to, so I just rolled my own that uses the
arabic digits only.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 23 Jun 2024 10:32:09 -0400 |
parents | adb79bdde329 |
children |
line wrap: on
line source
#ifndef ANIMONE_ANIMONE_H_ #define ANIMONE_ANIMONE_H_ #include <cstdint> #include "animone/media.h" #include "animone/player.h" #include "animone/types.h" namespace animone { struct ANIMONE_API Process { 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 ANIMONE_API Window { internal::wid_t id = {0}; /* union of window IDs. depends on the platform which one is correct */ 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 ANIMONE_API Result { Player player; Process process; Window window; /* has nothing under process mode */ std::vector<Media> media; }; ANIMONE_API bool GetResults(const std::vector<Player>& players, std::vector<Result>& results); } // namespace animone #endif // ANIMONE_ANIMONE_H_