Mercurial > minori
annotate 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 |
rev | line source |
---|---|
56
6ff7aabeb9d7
deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
1 #ifndef __animia__animia_h |
6ff7aabeb9d7
deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
2 #define __animia__animia_h |
6ff7aabeb9d7
deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
3 |
137
69db40272acd
dep/animia: [WIP] huge refactor
Paper <mrpapersonic@gmail.com>
parents:
84
diff
changeset
|
4 #include "animia/media.h" |
69db40272acd
dep/animia: [WIP] huge refactor
Paper <mrpapersonic@gmail.com>
parents:
84
diff
changeset
|
5 #include "animia/player.h" |
139
478f3b366199
dep/animia: separate lots of things, use base class for OS stuff
Paper <mrpapersonic@gmail.com>
parents:
138
diff
changeset
|
6 #include "animia/types.h" |
56
6ff7aabeb9d7
deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
7 |
137
69db40272acd
dep/animia: [WIP] huge refactor
Paper <mrpapersonic@gmail.com>
parents:
84
diff
changeset
|
8 namespace animia { |
69db40272acd
dep/animia: [WIP] huge refactor
Paper <mrpapersonic@gmail.com>
parents:
84
diff
changeset
|
9 |
152
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
146
diff
changeset
|
10 enum class ResultType { |
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
146
diff
changeset
|
11 Process, |
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
146
diff
changeset
|
12 Window |
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
146
diff
changeset
|
13 }; |
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
146
diff
changeset
|
14 |
138
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
15 struct Process { |
139
478f3b366199
dep/animia: separate lots of things, use base class for OS stuff
Paper <mrpapersonic@gmail.com>
parents:
138
diff
changeset
|
16 internal::pid_t pid = 0; |
138
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
17 std::string name; |
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
18 }; |
137
69db40272acd
dep/animia: [WIP] huge refactor
Paper <mrpapersonic@gmail.com>
parents:
84
diff
changeset
|
19 |
138
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
20 struct Window { |
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
21 unsigned int id = 0; |
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
22 std::string class_name; |
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
23 std::string text; // title bar text |
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
24 }; |
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
25 |
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
26 struct Result { |
152
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
146
diff
changeset
|
27 ResultType type; |
138
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
28 Player player; |
152
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
146
diff
changeset
|
29 Process process; // unused when using window_title. it's dumb, blame X11 |
146
d8a61e7e2a36
dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
139
diff
changeset
|
30 Window window; // unused with file descriptors |
138
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
31 std::vector<Media> media; |
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
32 }; |
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
33 |
28842a8d0c6b
dep/animia: huge refactor (again...)
Paper <mrpapersonic@gmail.com>
parents:
137
diff
changeset
|
34 bool GetResults(const std::vector<Player>& players, std::vector<Result>& results); |
56
6ff7aabeb9d7
deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
35 |
152
8700806c2cc2
dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents:
146
diff
changeset
|
36 } // namespace animia |
56
6ff7aabeb9d7
deps: add animia for open files detection
Paper <mrpapersonic@gmail.com>
parents:
diff
changeset
|
37 |
62 | 38 #endif // __animia__animia_h |