2018-03-24 21:43:57 +00:00
|
|
|
/*
|
|
|
|
* Mr. 4th Dimention - Allen Webster
|
|
|
|
*
|
|
|
|
* 24.03.2018
|
|
|
|
*
|
|
|
|
* Working_Set data structure
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
#if !defined(FRED_WORKING_SET_H)
|
|
|
|
#define FRED_WORKING_SET_H
|
|
|
|
|
2019-08-12 09:16:04 +00:00
|
|
|
struct Working_Set{
|
2019-08-13 04:19:02 +00:00
|
|
|
// NOTE(allen): After initialization of file_change_thread
|
|
|
|
// the members of this struct should only be accessed by a thread
|
|
|
|
// who owns the mutex member.
|
|
|
|
|
2019-08-12 09:16:04 +00:00
|
|
|
Arena arena;
|
|
|
|
|
|
|
|
Editing_File *free_files;
|
|
|
|
Buffer_ID id_counter;
|
|
|
|
|
|
|
|
Node active_file_sentinel;
|
2019-08-13 00:51:27 +00:00
|
|
|
Node touch_order_sentinel;
|
2019-08-12 09:16:04 +00:00
|
|
|
i32 active_file_count;
|
|
|
|
|
|
|
|
Table_u64_u64 id_to_ptr_table;
|
|
|
|
Table_Data_u64 canon_table;
|
|
|
|
Table_Data_u64 name_table;
|
|
|
|
|
2019-08-13 04:19:02 +00:00
|
|
|
Node *sync_check_iterator;
|
2019-08-13 18:54:15 +00:00
|
|
|
Node has_external_mod_sentinel;
|
2019-08-13 04:19:02 +00:00
|
|
|
System_Mutex mutex;
|
|
|
|
System_Thread file_change_thread;
|
|
|
|
|
2019-08-12 09:16:04 +00:00
|
|
|
// TODO(allen): do(update clipboard system to exist fully in the custom layer)
|
2019-08-13 04:19:02 +00:00
|
|
|
// NOTE(allen): These members have nothing to do with the working set or
|
|
|
|
// the mutex that gaurds the other members.
|
2019-08-12 09:16:04 +00:00
|
|
|
String_Const_u8 clipboards[64];
|
|
|
|
i32 clipboard_size;
|
|
|
|
i32 clipboard_max_size;
|
|
|
|
i32 clipboard_current;
|
2018-03-24 21:43:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOTTOM
|
|
|
|
|