rx.h (549B)
1 #pragma once 2 3 #include <stdbool.h> 4 #include <time.h> 5 #include <mpv/client.h> 6 7 #define RX_UPDATE_COUNT 50 8 9 typedef struct { 10 char uid[256]; 11 char name[256]; 12 char *addr; 13 char *url; 14 char *resolver; 15 } rx_station_t; 16 17 typedef struct { 18 bool quit; 19 rx_station_t *stations; 20 size_t stations_len; 21 const rx_station_t *curr; 22 mpv_handle *ctx; 23 int idx; 24 int count; 25 char *title; 26 int loading; 27 int error; 28 char message[500]; 29 } rx_t; 30 31 void rx_init(rx_t *self); 32 void rx_update(rx_t *self); 33 void rx_draw(rx_t *self); 34 void rx_free(rx_t *self);