rntviewer/src/app_state.h

46 lines
706 B
C
Raw Normal View History

2024-07-11 12:59:59 +00:00
struct Delta_Time_Accum {
f32 *base;
u16 count;
u16 max;
u16 start;
};
2024-07-16 12:34:51 +00:00
struct Inspected_File {
FILE *stream;
u8 *mem;
u64 size;
2024-07-18 13:32:32 +00:00
String8 name;
2024-07-16 12:34:51 +00:00
// @Platform: inotify file descriptor
int inot;
};
2024-07-10 18:11:42 +00:00
struct App_State {
2024-07-25 15:01:08 +00:00
u8 should_quit;
2024-07-10 18:11:42 +00:00
Window_Data win_data;
User_Input user_input;
2024-07-12 09:58:55 +00:00
RNTuple_Data rndata;
2024-07-18 13:32:32 +00:00
TFile_Data tfile_data;
2024-07-16 12:34:51 +00:00
Viewer viewer;
Inspected_File inspected_file;
2024-07-11 12:00:43 +00:00
2024-07-18 13:32:32 +00:00
String8 ntpl_name;
2024-07-15 09:29:32 +00:00
2024-07-16 12:34:51 +00:00
Delta_Time_Accum delta_time_accum;
2024-07-15 09:29:32 +00:00
// Cache the last info node selected for faster lookup of offsets
const Page_Info_Node *last_pinfo;
2024-07-10 18:11:42 +00:00
};
2024-07-11 12:00:43 +00:00
internal
size_t file_size(FILE *f)
{
fseek(f, 0, SEEK_END);
size_t res = ftell(f);
fseek(f, 0, SEEK_SET);
return res;
}