Mercurial > minori
annotate dep/animone/include/animone.h @ 340:74e2365326c6
dep/animone: add experimental accessibility strategy
I also moved most of the functions out of util/win32.cc, because that
file is meant for things that are shared between the different functions,
and currently that is only wide string conversion helpers.
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 19 Jun 2024 23:13:55 -0400 |
parents | a7d4e5107531 |
children | adb79bdde329 |
rev | line source |
---|---|
301
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
1 #ifndef ANIMONE_ANIMONE_H_ |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
2 #define ANIMONE_ANIMONE_H_ |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
3 |
337
a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
Paper <paper@paper.us.eu.org>
parents:
301
diff
changeset
|
4 #include <cstdint> |
a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
Paper <paper@paper.us.eu.org>
parents:
301
diff
changeset
|
5 |
301
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
6 #include "animone/media.h" |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
7 #include "animone/player.h" |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
8 #include "animone/types.h" |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
9 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
10 namespace animone { |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
11 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
12 struct Process { |
337
a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
Paper <paper@paper.us.eu.org>
parents:
301
diff
changeset
|
13 internal::pid_t pid = 0; /* platform-dependent PID */ |
a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
Paper <paper@paper.us.eu.org>
parents:
301
diff
changeset
|
14 ExecutablePlatform platform = ExecutablePlatform::Unknown; /* platform of the executable */ |
a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
Paper <paper@paper.us.eu.org>
parents:
301
diff
changeset
|
15 std::string comm; /* the full filename of the executable */ |
301
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
16 }; |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
17 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
18 struct Window { |
337
a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
Paper <paper@paper.us.eu.org>
parents:
301
diff
changeset
|
19 std::uint32_t id = 0; /* platform-dependent window id */ |
a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
Paper <paper@paper.us.eu.org>
parents:
301
diff
changeset
|
20 WindowPlatform platform = WindowPlatform::Unknown; /* platform of the window */ |
a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
Paper <paper@paper.us.eu.org>
parents:
301
diff
changeset
|
21 std::string class_name; /* class name on win32 and x11, bundle ID on macos */ |
a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
Paper <paper@paper.us.eu.org>
parents:
301
diff
changeset
|
22 std::string text; /* title bar text if available */ |
301
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
23 }; |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
24 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
25 struct Result { |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
26 Player player; |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
27 Process process; |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
28 Window window; /* has nothing under process mode */ |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
29 std::vector<Media> media; |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
30 }; |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
31 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
32 bool GetResults(const std::vector<Player>& players, std::vector<Result>& results); |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
33 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
34 } // namespace animone |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
35 |
b1f625b0227c
*: convert all files CRLF -> LF
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
36 #endif // ANIMONE_ANIMONE_H_ |