comparison dep/animia/include/animia.h @ 152:8700806c2cc2

dep/animia: awesome new breaking changes! I'm so tired
author Paper <mrpapersonic@gmail.com>
date Wed, 15 Nov 2023 02:34:59 -0500
parents d8a61e7e2a36
children cdf79282d647
comparison
equal deleted inserted replaced
151:54744a48a7d7 152:8700806c2cc2
4 #include "animia/media.h" 4 #include "animia/media.h"
5 #include "animia/player.h" 5 #include "animia/player.h"
6 #include "animia/types.h" 6 #include "animia/types.h"
7 7
8 namespace animia { 8 namespace animia {
9
10 enum class ResultType {
11 Process,
12 Window
13 };
9 14
10 struct Process { 15 struct Process {
11 internal::pid_t pid = 0; 16 internal::pid_t pid = 0;
12 std::string name; 17 std::string name;
13 }; 18 };
17 std::string class_name; 22 std::string class_name;
18 std::string text; // title bar text 23 std::string text; // title bar text
19 }; 24 };
20 25
21 struct Result { 26 struct Result {
27 ResultType type;
22 Player player; 28 Player player;
23 Process process; 29 Process process; // unused when using window_title. it's dumb, blame X11
24 Window window; // unused with file descriptors 30 Window window; // unused with file descriptors
25 std::vector<Media> media; 31 std::vector<Media> media;
26 }; 32 };
27 33
28 bool GetResults(const std::vector<Player>& players, std::vector<Result>& results); 34 bool GetResults(const std::vector<Player>& players, std::vector<Result>& results);
29 35
30 } // namespace Animia 36 } // namespace animia
31 37
32 #endif // __animia__animia_h 38 #endif // __animia__animia_h