2017-01-23 06:19:43 +00:00
|
|
|
/*
|
2017-04-15 21:47:23 +00:00
|
|
|
4coder_default_framework.cpp - Sets up the basics of the framework that is used for default 4coder behaviour.
|
2017-01-23 06:19:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
#if !defined(FCODER_DEFAULT_FRAMEWORK_H)
|
|
|
|
#define FCODER_DEFAULT_FRAMEWORK_H
|
|
|
|
|
2018-05-09 07:10:07 +00:00
|
|
|
////////////////////////////////
|
2017-01-23 06:19:43 +00:00
|
|
|
|
2019-09-04 05:31:35 +00:00
|
|
|
typedef i64 Rewrite_Type;
|
|
|
|
enum{
|
|
|
|
Rewrite_None,
|
|
|
|
Rewrite_Paste,
|
|
|
|
Rewrite_WordComplete
|
2017-01-23 06:19:43 +00:00
|
|
|
};
|
|
|
|
|
2018-05-09 07:10:07 +00:00
|
|
|
////////////////////////////////
|
2017-01-29 00:03:23 +00:00
|
|
|
|
2018-08-12 03:45:09 +00:00
|
|
|
struct ID_Line_Column_Jump_Location{
|
|
|
|
Buffer_ID buffer_id;
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 line;
|
|
|
|
i32 column;
|
2017-04-15 21:47:23 +00:00
|
|
|
};
|
2018-08-12 03:45:09 +00:00
|
|
|
typedef ID_Line_Column_Jump_Location ID_Based_Jump_Location;
|
|
|
|
|
|
|
|
struct ID_Pos_Jump_Location{
|
|
|
|
Buffer_ID buffer_id;
|
2019-08-24 01:34:42 +00:00
|
|
|
i64 pos;
|
2018-08-12 03:45:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Name_Line_Column_Location{
|
2019-06-01 23:58:28 +00:00
|
|
|
String_Const_u8 file;
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 line;
|
|
|
|
i32 column;
|
2018-08-12 03:45:09 +00:00
|
|
|
};
|
|
|
|
|
2019-04-01 03:50:37 +00:00
|
|
|
struct Parsed_Jump{
|
|
|
|
b32 success;
|
|
|
|
Name_Line_Column_Location location;
|
|
|
|
i32 colon_position;
|
|
|
|
b32 is_sub_jump;
|
|
|
|
b32 sub_jump_indented;
|
|
|
|
b32 sub_jump_note;
|
|
|
|
b32 is_ms_style;
|
|
|
|
b32 has_rust_arrow;
|
|
|
|
};
|
|
|
|
|
2018-08-12 03:45:09 +00:00
|
|
|
struct ID_Pos_Jump_Location_Array{
|
|
|
|
struct ID_Pos_Jump_Location *jumps;
|
2019-02-26 23:17:53 +00:00
|
|
|
i32 count;
|
2018-08-12 03:45:09 +00:00
|
|
|
};
|
2017-01-29 00:03:23 +00:00
|
|
|
|
2018-05-09 07:10:07 +00:00
|
|
|
////////////////////////////////
|
2017-01-29 00:03:23 +00:00
|
|
|
|
2019-10-20 01:32:38 +00:00
|
|
|
typedef i32 Fallback_Dispatch_Result_Code;
|
|
|
|
enum{
|
|
|
|
FallbackDispatch_Unhandled,
|
|
|
|
FallbackDispatch_DidCall,
|
|
|
|
FallbackDispatch_DelayedUICall,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Fallback_Dispatch_Result{
|
|
|
|
Fallback_Dispatch_Result_Code code;
|
|
|
|
Custom_Command_Function *func;
|
2017-11-08 18:24:30 +00:00
|
|
|
};
|
|
|
|
|
2018-08-05 07:09:18 +00:00
|
|
|
////////////////////////////////
|
|
|
|
|
2019-08-16 02:53:11 +00:00
|
|
|
typedef void View_Render_Hook(Application_Links *app, View_ID view, Frame_Info frame_info, Rect_f32 inner);
|
|
|
|
|
|
|
|
////////////////////////////////
|
|
|
|
|
2019-10-14 22:57:47 +00:00
|
|
|
function b32
|
2019-10-25 23:33:50 +00:00
|
|
|
do_buffer_kill_user_check(Application_Links *app, Buffer_ID buffer, View_ID view);
|
2018-08-05 07:09:18 +00:00
|
|
|
|
2019-10-14 22:57:47 +00:00
|
|
|
function b32
|
2019-10-25 23:33:50 +00:00
|
|
|
do_4coder_close_user_check(Application_Links *app, View_ID view);
|
2018-08-05 07:09:18 +00:00
|
|
|
|
2019-11-05 06:25:19 +00:00
|
|
|
////////////////////////////////
|
|
|
|
|
|
|
|
struct Buffer_Modified_Node{
|
|
|
|
Buffer_Modified_Node *next;
|
|
|
|
Buffer_Modified_Node *prev;
|
|
|
|
Buffer_ID buffer;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Buffer_Modified_Set{
|
|
|
|
Arena arena;
|
|
|
|
Buffer_Modified_Node *free;
|
|
|
|
Buffer_Modified_Node *first;
|
|
|
|
Buffer_Modified_Node *last;
|
|
|
|
Table_u64_u64 id_to_node;
|
|
|
|
};
|
|
|
|
|
2020-01-15 18:14:17 +00:00
|
|
|
////////////////////////////////
|
|
|
|
|
|
|
|
struct Fade_Range{
|
|
|
|
Fade_Range *next;
|
2020-05-01 19:28:36 +00:00
|
|
|
Buffer_ID buffer_id;
|
2020-01-15 18:14:17 +00:00
|
|
|
f32 t;
|
|
|
|
f32 full_t;
|
|
|
|
Range_i64 range;
|
|
|
|
ARGB_Color color;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Fade_Range_List{
|
|
|
|
Fade_Range *first;
|
|
|
|
Fade_Range *last;
|
|
|
|
i32 count;
|
|
|
|
};
|
|
|
|
|
2017-01-23 06:19:43 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOTTOM
|
|
|
|
|