screen.h (740B)
1 #ifndef TA_SCREEN_H
2 #define TA_SCREEN_H
3
4 #include <tuxanci2/syscall.h>
5 #include <tuxanci2/abi.h>
6 #include <stdint.h>
7 #include <stddef.h>
8 #include <stdbool.h>
9
10 typedef void (*ta_screen_init_function)(void);
11 typedef void (*ta_screen_update_function)(void);
12 typedef void (*ta_screen_destroy_function)(void);
13
14 static inline bool ta_screen_register(uint32_t id, ta_screen_init_function init, ta_screen_update_function update, ta_screen_destroy_function destroy) {
15 return ta_syscall(TA_SYS_SCREEN_REGISTER, id, (uint32_t)(size_t)init, (uint32_t)(size_t)update, (uint32_t)(size_t)destroy, 0, 0) != 0;
16 }
17
18 static inline bool ta_screen_switch(uint32_t id) {
19 return ta_syscall(TA_SYS_SCREEN_SWITCH, id, 0, 0, 0, 0, 0) != 0;
20 }
21
22 #endif // TA_SCREEN_H