Mercurial > minori
view dep/animia/include/animia.h @ 150:ffa535b6d630
*: avoid usage of std::[pair,tuple]
https://arne-mertz.de/2017/03/smelly-pair-tuple/
it's better to use real structures and such where variables are easily known...
also apparently using [] on structs is actually valid? I had no idea.
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 14 Nov 2023 16:27:33 -0500 |
parents | d8a61e7e2a36 |
children | 8700806c2cc2 |
line wrap: on
line source
#ifndef __animia__animia_h #define __animia__animia_h #include "animia/media.h" #include "animia/player.h" #include "animia/types.h" namespace animia { struct Process { internal::pid_t pid = 0; std::string name; }; struct Window { unsigned int id = 0; std::string class_name; std::string text; // title bar text }; struct Result { Player player; Process process; Window window; // unused with file descriptors std::vector<Media> media; }; bool GetResults(const std::vector<Player>& players, std::vector<Result>& results); } // namespace Animia #endif // __animia__animia_h