2026-03-27 21:45:40 -04:00
|
|
|
#ifndef APP_H
|
|
|
|
|
#define APP_H
|
|
|
|
|
|
|
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
|
|
|
|
|
|
#include "channel.h"
|
|
|
|
|
#include "player.h"
|
|
|
|
|
#include "theme.h"
|
|
|
|
|
#include "ui.h"
|
|
|
|
|
|
|
|
|
|
typedef struct App {
|
|
|
|
|
SDL_Window *window;
|
|
|
|
|
SDL_Renderer *renderer;
|
|
|
|
|
SDL_Texture *video_texture;
|
|
|
|
|
int texture_width;
|
|
|
|
|
int texture_height;
|
|
|
|
|
AppMode mode;
|
|
|
|
|
int running;
|
2026-03-28 00:45:10 -04:00
|
|
|
int is_fullscreen;
|
2026-03-28 01:40:11 -04:00
|
|
|
int theme_index;
|
|
|
|
|
int theme_picker_open;
|
|
|
|
|
int theme_picker_selection;
|
2026-03-28 02:12:06 -04:00
|
|
|
int about_modal_open;
|
2026-03-27 22:59:37 -04:00
|
|
|
int startup_handoff_active;
|
|
|
|
|
int last_blackout_state;
|
|
|
|
|
Uint32 startup_handoff_until;
|
2026-03-27 21:45:40 -04:00
|
|
|
time_t app_start_time;
|
2026-03-27 23:19:42 -04:00
|
|
|
Uint64 app_start_ticks;
|
2026-03-27 21:45:40 -04:00
|
|
|
ChannelList channels;
|
|
|
|
|
Player player;
|
|
|
|
|
UiFonts fonts;
|
2026-03-27 23:19:42 -04:00
|
|
|
UiCache ui_cache;
|
2026-03-27 21:45:40 -04:00
|
|
|
} App;
|
|
|
|
|
|
|
|
|
|
int app_init(App *app);
|
|
|
|
|
void app_run(App *app);
|
|
|
|
|
void app_destroy(App *app);
|
|
|
|
|
|
|
|
|
|
#endif
|