2017-01-23 06:19:43 +00:00
|
|
|
#if !defined(FCODER_TYPES_H)
|
|
|
|
#define FCODER_TYPES_H
|
2016-09-02 23:14:25 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 04:10:29 +00:00
|
|
|
struct Thread_Context_Extra_Info{
|
|
|
|
void *coroutine;
|
|
|
|
void *async_thread;
|
|
|
|
};
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-05 02:48:05 +00:00
|
|
|
struct Application_Links{
|
2019-10-22 04:10:29 +00:00
|
|
|
Thread_Context *tctx;
|
2019-10-05 02:48:05 +00:00
|
|
|
void *cmd_context;
|
|
|
|
};
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-10 22:57:02 +00:00
|
|
|
typedef void Custom_Layer_Init_Type(Application_Links *app);
|
|
|
|
void custom_layer_init(Application_Links *app);
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-10 22:57:02 +00:00
|
|
|
typedef b32 _Get_Version_Type(i32 maj, i32 min, i32 patch);
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-10 22:57:02 +00:00
|
|
|
typedef Custom_Layer_Init_Type *_Init_APIs_Type(struct API_VTable_custom *custom_vtable,
|
|
|
|
struct API_VTable_system *system_vtable);
|
2019-10-05 02:48:05 +00:00
|
|
|
|
|
|
|
////////////////////////////////
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
typedef u16 ID_Color;
|
2019-12-16 06:56:13 +00:00
|
|
|
|
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
union FColor{
|
|
|
|
struct{
|
|
|
|
u8 padding__[3];
|
|
|
|
u8 a_byte;
|
|
|
|
};
|
|
|
|
ARGB_Color argb;
|
|
|
|
struct{
|
|
|
|
ID_Color id;
|
2019-11-26 06:09:31 +00:00
|
|
|
u8 sub_index;
|
|
|
|
u8 padding_;
|
2019-10-23 01:25:40 +00:00
|
|
|
};
|
|
|
|
};
|
2019-02-25 23:42:13 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
struct Theme_Color{
|
|
|
|
ID_Color tag;
|
|
|
|
ARGB_Color color;
|
|
|
|
};
|
2019-02-25 23:42:13 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-11-26 06:09:31 +00:00
|
|
|
struct Color_Array{
|
|
|
|
ARGB_Color *vals;
|
|
|
|
i32 count;
|
|
|
|
};
|
2016-07-02 14:15:15 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
struct Color_Table{
|
2019-11-26 06:09:31 +00:00
|
|
|
Color_Array *arrays;
|
2019-10-23 01:25:40 +00:00
|
|
|
u32 count;
|
|
|
|
};
|
2019-03-21 03:18:08 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
struct Color_Picker{
|
|
|
|
String_Const_u8 title;
|
|
|
|
ARGB_Color *dest;
|
|
|
|
b32 *finished;
|
|
|
|
};
|
2016-07-02 14:15:15 +00:00
|
|
|
|
2019-10-23 01:25:40 +00:00
|
|
|
////////////////////////////////
|
2016-07-02 14:15:15 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
typedef u32 Face_ID;
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
struct Fancy_String{
|
|
|
|
Fancy_String *next;
|
|
|
|
String_Const_u8 value;
|
|
|
|
Face_ID face;
|
|
|
|
FColor fore;
|
|
|
|
f32 pre_margin;
|
|
|
|
f32 post_margin;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
struct Fancy_Line{
|
|
|
|
Fancy_Line *next;
|
|
|
|
Face_ID face;
|
|
|
|
FColor fore;
|
|
|
|
Fancy_String *first;
|
|
|
|
Fancy_String *last;
|
|
|
|
};
|
2019-02-24 07:22:16 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
struct Fancy_Block{
|
|
|
|
Fancy_Line *first;
|
|
|
|
Fancy_Line *last;
|
|
|
|
i32 line_count;
|
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
typedef i32 Buffer_ID;
|
2019-12-16 06:56:13 +00:00
|
|
|
|
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
typedef i32 View_ID;
|
2019-12-16 06:56:13 +00:00
|
|
|
|
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
typedef i32 Panel_ID;
|
2019-12-16 06:56:13 +00:00
|
|
|
|
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Text_Layout_ID;
|
2019-12-16 06:56:13 +00:00
|
|
|
|
|
|
|
api(custom)
|
2019-10-23 01:25:40 +00:00
|
|
|
typedef u32 Child_Process_ID;
|
2019-04-01 00:36:09 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 02:13:15 +00:00
|
|
|
typedef i32 UI_Highlight_Level;
|
|
|
|
enum{
|
|
|
|
UIHighlight_None,
|
|
|
|
UIHighlight_Hover,
|
|
|
|
UIHighlight_Active,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Buffer_Point{
|
2019-06-20 23:43:27 +00:00
|
|
|
i64 line_number;
|
2019-10-28 04:20:30 +00:00
|
|
|
Vec2_f32 pixel_shift;
|
2019-04-01 00:36:09 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Line_Shift_Vertical{
|
2019-09-02 18:59:36 +00:00
|
|
|
i64 line;
|
|
|
|
f32 y_delta;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Line_Shift_Character{
|
2019-09-02 18:59:36 +00:00
|
|
|
i64 line;
|
|
|
|
i64 character_delta;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Child_Process_Set_Target_Flags;
|
|
|
|
enum{
|
2019-03-21 03:18:08 +00:00
|
|
|
ChildProcessSet_FailIfBufferAlreadyAttachedToAProcess = 1,
|
|
|
|
ChildProcessSet_FailIfProcessAlreadyAttachedToABuffer = 2,
|
|
|
|
ChildProcessSet_NeverOverrideExistingAttachment = 3,
|
|
|
|
ChildProcessSet_CursorAtEnd = 4,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Memory_Protect_Flags;
|
|
|
|
enum{
|
2016-09-01 00:26:52 +00:00
|
|
|
MemProtect_Read = 0x1,
|
|
|
|
MemProtect_Write = 0x2,
|
2016-07-10 05:49:11 +00:00
|
|
|
MemProtect_Execute = 0x4,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 Wrap_Indicator_Mode;
|
|
|
|
enum{
|
2016-10-27 23:45:41 +00:00
|
|
|
WrapIndicator_Hide,
|
|
|
|
WrapIndicator_Show_After_Line,
|
|
|
|
WrapIndicator_Show_At_Wrap_Edge,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 Global_Setting_ID;
|
|
|
|
enum{
|
2017-05-14 23:42:16 +00:00
|
|
|
GlobalSetting_Null,
|
|
|
|
GlobalSetting_LAltLCtrlIsAltGr,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 Buffer_Setting_ID;
|
|
|
|
enum{
|
2016-07-01 05:42:19 +00:00
|
|
|
BufferSetting_Null,
|
2016-07-12 18:20:06 +00:00
|
|
|
BufferSetting_Unimportant,
|
|
|
|
BufferSetting_ReadOnly,
|
2019-02-12 02:33:11 +00:00
|
|
|
BufferSetting_RecordsHistory,
|
2016-07-01 05:42:19 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Character_Predicate{
|
2019-06-09 00:09:14 +00:00
|
|
|
u8 b[32];
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 06:58:49 +00:00
|
|
|
struct Frame_Info{
|
|
|
|
i32 index;
|
|
|
|
f32 literal_dt;
|
|
|
|
f32 animation_dt;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 View_Setting_ID;
|
|
|
|
enum{
|
2016-07-01 05:42:19 +00:00
|
|
|
ViewSetting_Null,
|
2016-07-04 20:40:57 +00:00
|
|
|
ViewSetting_ShowWhitespace,
|
2016-07-01 05:42:19 +00:00
|
|
|
ViewSetting_ShowScrollbar,
|
2017-03-27 22:36:42 +00:00
|
|
|
ViewSetting_ShowFileBar,
|
2016-07-01 05:42:19 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Buffer_Create_Flag;
|
|
|
|
enum{
|
2016-07-01 05:42:19 +00:00
|
|
|
BufferCreate_Background = 0x1,
|
|
|
|
BufferCreate_AlwaysNew = 0x2,
|
2016-09-01 00:26:52 +00:00
|
|
|
BufferCreate_NeverNew = 0x4,
|
2017-11-21 21:30:40 +00:00
|
|
|
BufferCreate_JustChangedFile = 0x8,
|
2018-08-05 07:09:18 +00:00
|
|
|
BufferCreate_MustAttachToFile = 0x10,
|
|
|
|
BufferCreate_NeverAttachToFile = 0x20,
|
2018-10-06 01:42:56 +00:00
|
|
|
BufferCreate_SuppressNewFileHook = 0x40,
|
2016-07-01 05:42:19 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Buffer_Save_Flag;
|
|
|
|
enum{
|
2017-11-21 21:30:40 +00:00
|
|
|
BufferSave_IgnoreDirtyFlag = 0x1,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Buffer_Kill_Flag;
|
|
|
|
enum{
|
2016-07-01 05:42:19 +00:00
|
|
|
BufferKill_AlwaysKill = 0x2,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Buffer_Reopen_Flag;
|
|
|
|
enum{};
|
2018-11-21 07:48:42 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Buffer_Kill_Result;
|
|
|
|
enum{
|
2018-08-05 07:09:18 +00:00
|
|
|
BufferKillResult_Killed = 0,
|
|
|
|
BufferKillResult_Dirty = 1,
|
|
|
|
BufferKillResult_Unkillable = 2,
|
|
|
|
BufferKillResult_DoesNotExist = 3,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Buffer_Reopen_Result;
|
|
|
|
enum{
|
2018-11-21 07:48:42 +00:00
|
|
|
BufferReopenResult_Reopened = 0,
|
|
|
|
BufferReopenResult_Failed = 1,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-18 02:54:02 +00:00
|
|
|
typedef u32 Access_Flag;
|
|
|
|
enum{
|
|
|
|
Access_Write = 0x1,
|
|
|
|
Access_Read = 0x2,
|
|
|
|
Access_Visible = 0x4,
|
|
|
|
};
|
|
|
|
enum{
|
|
|
|
Access_Always = 0,
|
|
|
|
Access_ReadWrite = Access_Write|Access_Read,
|
|
|
|
Access_ReadVisible = Access_Read|Access_Visible,
|
|
|
|
Access_ReadWriteVisible = Access_Write|Access_Read|Access_Visible,
|
2016-07-01 05:42:19 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 Dirty_State;
|
|
|
|
enum{
|
2016-09-14 23:39:33 +00:00
|
|
|
DirtyState_UpToDate = 0,
|
|
|
|
DirtyState_UnsavedChanges = 1,
|
2019-02-25 23:42:13 +00:00
|
|
|
DirtyState_UnloadedChanges = 2,
|
|
|
|
DirtyState_UnsavedChangesAndUnloadedChanges = 3,
|
2016-09-09 22:56:43 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Command_Line_Interface_Flag;
|
|
|
|
enum{
|
2016-07-01 05:42:19 +00:00
|
|
|
CLI_OverlapWithConflict = 0x1,
|
|
|
|
CLI_AlwaysBindToView = 0x2,
|
|
|
|
CLI_CursorAtEnd = 0x4,
|
2019-03-17 23:11:37 +00:00
|
|
|
CLI_SendEndSignal = 0x8,
|
2016-07-01 05:42:19 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Set_Buffer_Flag;
|
|
|
|
enum{
|
2016-07-01 05:42:19 +00:00
|
|
|
SetBuffer_KeepOriginalGUI = 0x1
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 Mouse_Cursor_Show_Type;
|
|
|
|
enum{
|
2016-07-01 05:42:19 +00:00
|
|
|
MouseCursorShow_Never,
|
|
|
|
MouseCursorShow_Always,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 View_Split_Position;
|
|
|
|
enum{
|
2016-07-05 01:36:30 +00:00
|
|
|
ViewSplit_Top,
|
|
|
|
ViewSplit_Bottom,
|
|
|
|
ViewSplit_Left,
|
2019-02-05 09:13:38 +00:00
|
|
|
ViewSplit_Right,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 Panel_Split_Kind;
|
|
|
|
enum{
|
2019-02-24 07:22:16 +00:00
|
|
|
PanelSplitKind_Ratio_Min = 0,
|
|
|
|
PanelSplitKind_Ratio_Max = 1,
|
|
|
|
PanelSplitKind_FixedPixels_Min = 2,
|
|
|
|
PanelSplitKind_FixedPixels_Max = 3,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u8 Key_Modifier;
|
2017-01-23 06:19:43 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Mouse_State{
|
2019-10-10 00:07:38 +00:00
|
|
|
b8 l;
|
|
|
|
b8 r;
|
|
|
|
b8 press_l;
|
|
|
|
b8 press_r;
|
|
|
|
b8 release_l;
|
|
|
|
b8 release_r;
|
|
|
|
b8 out_of_window;
|
2019-02-26 23:08:42 +00:00
|
|
|
i32 wheel;
|
2019-10-22 22:07:05 +00:00
|
|
|
union{
|
|
|
|
struct{
|
2019-02-26 23:08:42 +00:00
|
|
|
i32 x;
|
|
|
|
i32 y;
|
2019-02-25 23:42:13 +00:00
|
|
|
};
|
|
|
|
Vec2_i32 p;
|
|
|
|
};
|
2016-07-01 05:42:19 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Parser_String_And_Type{
|
2017-05-21 01:22:20 +00:00
|
|
|
char *str;
|
2019-02-26 23:08:42 +00:00
|
|
|
u32 length;
|
|
|
|
u32 type;
|
2017-05-21 01:22:20 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 File_Attribute_Flag;
|
|
|
|
enum{
|
2019-06-02 00:45:18 +00:00
|
|
|
FileAttribute_IsDirectory = 1,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct File_Attributes{
|
2019-06-02 00:45:18 +00:00
|
|
|
u64 size;
|
|
|
|
u64 last_write_time;
|
|
|
|
File_Attribute_Flag flags;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct File_Info{
|
2019-08-04 00:49:40 +00:00
|
|
|
File_Info *next;
|
|
|
|
String_Const_u8 file_name;
|
|
|
|
File_Attributes attributes;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct File_List{
|
2019-08-04 00:49:40 +00:00
|
|
|
File_Info **infos;
|
2019-02-26 23:08:42 +00:00
|
|
|
u32 count;
|
2016-07-01 05:42:19 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Buffer_Identifier{
|
2016-07-01 05:42:19 +00:00
|
|
|
char *name;
|
2019-02-26 23:08:42 +00:00
|
|
|
i32 name_len;
|
2017-01-07 02:59:55 +00:00
|
|
|
Buffer_ID id;
|
2016-07-01 05:42:19 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-15 03:26:00 +00:00
|
|
|
typedef i32 Set_Buffer_Scroll_Rule;
|
|
|
|
enum{
|
|
|
|
SetBufferScroll_NoCursorChange,
|
|
|
|
SetBufferScroll_SnapCursorIntoView,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 02:13:15 +00:00
|
|
|
struct Buffer_Scroll{
|
2019-09-02 18:59:36 +00:00
|
|
|
Buffer_Point position;
|
|
|
|
Buffer_Point target;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 02:13:15 +00:00
|
|
|
struct Basic_Scroll{
|
2019-09-02 18:59:36 +00:00
|
|
|
Vec2_f32 position;
|
|
|
|
Vec2_f32 target;
|
2016-07-02 22:59:16 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 Buffer_Seek_Type;
|
|
|
|
enum{
|
2016-09-24 06:17:06 +00:00
|
|
|
buffer_seek_pos,
|
2019-09-02 18:59:36 +00:00
|
|
|
buffer_seek_line_col,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Buffer_Seek{
|
2016-07-02 22:59:16 +00:00
|
|
|
Buffer_Seek_Type type;
|
2019-10-22 22:07:05 +00:00
|
|
|
union{
|
|
|
|
struct{
|
2019-06-20 23:43:27 +00:00
|
|
|
i64 pos;
|
2016-07-02 22:59:16 +00:00
|
|
|
};
|
2019-10-22 22:07:05 +00:00
|
|
|
struct{
|
2019-06-20 23:43:27 +00:00
|
|
|
i64 line;
|
2019-09-02 18:59:36 +00:00
|
|
|
i64 col;
|
2016-07-02 22:59:16 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Buffer_Cursor{
|
2019-06-20 23:43:27 +00:00
|
|
|
i64 pos;
|
|
|
|
i64 line;
|
2019-09-02 18:59:36 +00:00
|
|
|
i64 col;
|
2016-09-24 06:17:06 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Range_Cursor{
|
2019-06-01 23:58:28 +00:00
|
|
|
struct{
|
2019-09-02 18:59:36 +00:00
|
|
|
Buffer_Cursor min;
|
|
|
|
Buffer_Cursor max;
|
2019-06-01 23:58:28 +00:00
|
|
|
};
|
|
|
|
struct{
|
2019-09-02 18:59:36 +00:00
|
|
|
Buffer_Cursor start;
|
|
|
|
Buffer_Cursor end;
|
2019-06-01 23:58:28 +00:00
|
|
|
};
|
|
|
|
struct{
|
2019-09-02 18:59:36 +00:00
|
|
|
Buffer_Cursor first;
|
|
|
|
Buffer_Cursor one_past_last;
|
2019-06-01 23:58:28 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Marker{
|
2019-08-24 01:34:42 +00:00
|
|
|
i64 pos;
|
2019-02-26 23:08:42 +00:00
|
|
|
b32 lean_right;
|
2017-02-24 02:30:29 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 Managed_Object_Type;
|
|
|
|
enum{
|
2018-09-07 22:39:33 +00:00
|
|
|
ManagedObjectType_Error = 0,
|
|
|
|
ManagedObjectType_Memory = 1,
|
|
|
|
ManagedObjectType_Markers = 2,
|
2019-02-26 19:59:57 +00:00
|
|
|
|
|
|
|
ManagedObjectType_COUNT = 4,
|
2016-07-01 05:42:19 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u64 Managed_ID;
|
2018-10-06 15:26:20 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u64 Managed_Scope;
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u64 Managed_Object;
|
2018-09-28 23:42:32 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Marker_Visual{
|
2018-09-28 23:42:32 +00:00
|
|
|
Managed_Scope scope;
|
2019-02-26 23:08:42 +00:00
|
|
|
u32 slot_id;
|
|
|
|
u32 gen_id;
|
2018-09-28 23:42:32 +00:00
|
|
|
};
|
2018-10-06 15:26:20 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Glyph_Flag;
|
|
|
|
enum{
|
2019-02-24 07:22:16 +00:00
|
|
|
GlyphFlag_None = 0x0,
|
|
|
|
GlyphFlag_Rotate90 = 0x1,
|
2019-01-25 21:03:52 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-13 20:17:22 +00:00
|
|
|
struct Query_Bar{
|
2019-06-01 23:58:28 +00:00
|
|
|
String_Const_u8 prompt;
|
|
|
|
String_Const_u8 string;
|
2019-12-18 03:38:08 +00:00
|
|
|
u64 string_capacity;
|
2018-09-07 22:39:33 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-13 20:17:22 +00:00
|
|
|
struct Query_Bar_Ptr_Array{
|
2019-02-27 05:49:35 +00:00
|
|
|
Query_Bar **ptrs;
|
|
|
|
i32 count;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-13 20:17:22 +00:00
|
|
|
struct Query_Bar_Group{
|
|
|
|
Application_Links *app;
|
|
|
|
View_ID view;
|
|
|
|
|
|
|
|
Query_Bar_Group(Application_Links *app);
|
|
|
|
Query_Bar_Group(Application_Links *app, View_ID view);
|
|
|
|
~Query_Bar_Group();
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-21 02:02:58 +00:00
|
|
|
struct Font_Load_Location{
|
2019-07-24 07:41:40 +00:00
|
|
|
String_Const_u8 file_name;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-21 02:02:58 +00:00
|
|
|
struct Face_Load_Parameters{
|
2019-07-24 07:41:40 +00:00
|
|
|
u32 pt_size;
|
2019-02-26 23:08:42 +00:00
|
|
|
b32 bold;
|
|
|
|
b32 italic;
|
|
|
|
b32 underline;
|
|
|
|
b32 hinting;
|
2017-11-20 23:31:57 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-21 02:02:58 +00:00
|
|
|
struct Face_Description{
|
2019-07-24 07:41:40 +00:00
|
|
|
Font_Load_Location font;
|
|
|
|
Face_Load_Parameters parameters;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-17 04:22:06 +00:00
|
|
|
struct Face_Metrics{
|
2019-10-09 14:40:50 +00:00
|
|
|
f32 text_height;
|
2019-03-31 21:30:06 +00:00
|
|
|
f32 line_height;
|
2019-10-29 04:27:20 +00:00
|
|
|
f32 ascent;
|
|
|
|
f32 descent;
|
|
|
|
f32 line_skip;
|
|
|
|
|
|
|
|
f32 underline_yoff1;
|
|
|
|
f32 underline_yoff2;
|
|
|
|
|
2019-10-09 14:40:50 +00:00
|
|
|
f32 max_advance;
|
|
|
|
f32 space_advance;
|
|
|
|
f32 decimal_digit_advance;
|
|
|
|
f32 hex_digit_advance;
|
2019-10-29 04:27:20 +00:00
|
|
|
f32 byte_advance;
|
|
|
|
f32 byte_sub_advances[3];
|
|
|
|
f32 normal_lowercase_advance;
|
|
|
|
f32 normal_uppercase_advance;
|
|
|
|
f32 normal_advance;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-29 04:27:20 +00:00
|
|
|
struct Codepoint_Index_Map{
|
|
|
|
b32 has_zero_index;
|
|
|
|
u16 zero_index;
|
|
|
|
u16 max_index;
|
|
|
|
Table_u32_u16 table;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-29 04:27:20 +00:00
|
|
|
struct Face_Advance_Map{
|
|
|
|
Codepoint_Index_Map codepoint_to_index;
|
|
|
|
f32 *advance;
|
|
|
|
u16 index_count;
|
2019-03-31 21:30:06 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-17 04:22:06 +00:00
|
|
|
struct Edit{
|
2019-09-02 18:59:36 +00:00
|
|
|
String_Const_u8 text;
|
2019-12-18 03:38:08 +00:00
|
|
|
Range_i64 range;
|
2019-02-08 10:03:48 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-17 04:22:06 +00:00
|
|
|
struct Batch_Edit{
|
2019-09-02 18:59:36 +00:00
|
|
|
Batch_Edit *next;
|
|
|
|
Edit edit;
|
2016-09-09 01:02:51 +00:00
|
|
|
};
|
2016-09-02 17:01:52 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 Record_Kind;
|
|
|
|
enum{
|
2019-02-08 10:03:48 +00:00
|
|
|
RecordKind_Single,
|
|
|
|
RecordKind_Group,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 Record_Error;
|
|
|
|
enum{
|
2019-02-08 12:33:43 +00:00
|
|
|
RecordError_NoError,
|
|
|
|
RecordError_InvalidBuffer,
|
|
|
|
RecordError_NoHistoryAttached,
|
|
|
|
RecordError_IndexOutOfBounds,
|
2019-06-01 23:58:28 +00:00
|
|
|
RecordError_SubIndexOutOfBounds,
|
2019-02-08 12:33:43 +00:00
|
|
|
RecordError_InitialStateDummyRecord,
|
|
|
|
RecordError_WrongRecordTypeAtIndex,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 Record_Merge_Flag;
|
|
|
|
enum{
|
2019-02-09 01:48:11 +00:00
|
|
|
RecordMergeFlag_StateInRange_MoveStateForward = 0x0,
|
|
|
|
RecordMergeFlag_StateInRange_MoveStateBackward = 0x1,
|
|
|
|
RecordMergeFlag_StateInRange_ErrorOut = 0x2,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef i32 History_Record_Index;
|
2019-02-08 10:03:48 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct Record_Info{
|
2019-02-08 12:33:43 +00:00
|
|
|
Record_Error error;
|
|
|
|
Record_Kind kind;
|
2019-02-26 23:08:42 +00:00
|
|
|
i32 edit_number;
|
2019-02-08 12:33:43 +00:00
|
|
|
union{
|
|
|
|
struct{
|
2019-12-16 06:56:13 +00:00
|
|
|
String_Const_u8 single_string_forward;
|
|
|
|
String_Const_u8 single_string_backward;
|
|
|
|
i64 single_first;
|
|
|
|
};
|
2019-02-08 12:33:43 +00:00
|
|
|
struct{
|
2019-12-16 06:56:13 +00:00
|
|
|
i32 group_count;
|
|
|
|
};
|
2019-02-08 12:33:43 +00:00
|
|
|
};
|
2019-02-08 10:03:48 +00:00
|
|
|
};
|
2016-09-02 17:01:52 +00:00
|
|
|
|
2019-10-20 01:32:38 +00:00
|
|
|
#if defined(CUSTOM_COMMAND_SIG) || defined(CUSTOM_UI_COMMAND_SIG) || defined(CUSTOM_DOC) || defined(CUSTOM_COMMAND)
|
|
|
|
#error Please do not define CUSTOM_COMMAND_SIG, CUSTOM_DOC, CUSTOM_UI_COMMAND_SIG, or CUSTOM_COMMAND
|
2018-06-15 20:10:49 +00:00
|
|
|
#endif
|
2018-06-22 20:59:21 +00:00
|
|
|
|
|
|
|
#if !defined(META_PASS)
|
|
|
|
#define CUSTOM_COMMAND_SIG(name) void name(struct Application_Links *app)
|
2019-10-20 01:17:44 +00:00
|
|
|
#define CUSTOM_UI_COMMAND_SIG(name) void name(struct Application_Links *app)
|
2018-06-22 20:59:21 +00:00
|
|
|
#define CUSTOM_DOC(str)
|
2019-11-24 23:13:51 +00:00
|
|
|
#define CUSTOM_ID(group, name) global Managed_ID name;
|
2018-06-22 20:59:21 +00:00
|
|
|
#else
|
2019-10-20 01:17:44 +00:00
|
|
|
#define CUSTOM_COMMAND_SIG(name) CUSTOM_COMMAND(name, __FILE__, __LINE__, Normal)
|
|
|
|
#define CUSTOM_UI_COMMAND_SIG(name) CUSTOM_COMMAND(name, __FILE__, __LINE__, UI)
|
2018-06-22 20:59:21 +00:00
|
|
|
#define CUSTOM_DOC(str) CUSTOM_DOC(str)
|
2019-11-24 23:13:51 +00:00
|
|
|
#define CUSTOM_ID(group, name) CUSTOM_ID(group, name)
|
2018-06-15 20:10:49 +00:00
|
|
|
#endif
|
2017-01-23 06:19:43 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
struct User_Input{
|
2019-10-10 00:07:38 +00:00
|
|
|
Input_Event event;
|
2019-02-26 23:08:42 +00:00
|
|
|
b32 abort;
|
2017-01-23 06:19:43 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-10 22:57:02 +00:00
|
|
|
typedef i32 Hook_ID;
|
|
|
|
enum{
|
2019-11-05 06:25:19 +00:00
|
|
|
HookID_Tick,
|
2019-10-14 22:57:47 +00:00
|
|
|
HookID_RenderCaller,
|
2019-10-15 03:26:00 +00:00
|
|
|
HookID_DeltaRule,
|
2019-10-10 22:57:02 +00:00
|
|
|
HookID_BufferViewerUpdate,
|
2019-10-13 20:17:22 +00:00
|
|
|
HookID_ViewEventHandler,
|
2019-10-10 22:57:02 +00:00
|
|
|
HookID_BufferNameResolver,
|
2019-10-14 22:57:47 +00:00
|
|
|
HookID_BeginBuffer,
|
|
|
|
HookID_EndBuffer,
|
|
|
|
HookID_NewFile,
|
|
|
|
HookID_SaveFile,
|
|
|
|
HookID_BufferEditRange,
|
|
|
|
HookID_BufferRegion,
|
2019-10-29 04:27:20 +00:00
|
|
|
HookID_Layout,
|
2019-10-10 22:57:02 +00:00
|
|
|
};
|
2018-09-22 23:45:24 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 22:57:47 +00:00
|
|
|
typedef i32 Hook_Function(Application_Links *app);
|
|
|
|
#define HOOK_SIG(name) i32 name(Application_Links *app)
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 22:57:47 +00:00
|
|
|
struct Buffer_Name_Conflict_Entry{
|
|
|
|
Buffer_ID buffer_id;
|
|
|
|
String_Const_u8 file_name;
|
|
|
|
String_Const_u8 base_name;
|
|
|
|
u8 *unique_name_in_out;
|
2019-12-18 03:38:08 +00:00
|
|
|
u64 unique_name_len_in_out;
|
|
|
|
u64 unique_name_capacity;
|
2019-10-14 22:57:47 +00:00
|
|
|
};
|
2017-01-23 06:19:43 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 22:57:47 +00:00
|
|
|
typedef void Buffer_Name_Resolver_Function(Application_Links *app, Buffer_Name_Conflict_Entry *conflicts, i32 conflict_count);
|
2019-11-01 03:46:53 +00:00
|
|
|
#define BUFFER_NAME_RESOLVER_SIG(n) void n(Application_Links *app, Buffer_Name_Conflict_Entry *conflicts, i32 conflict_count)
|
2017-01-23 06:19:43 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 22:57:47 +00:00
|
|
|
typedef i32 Buffer_Hook_Function(Application_Links *app, Buffer_ID buffer_id);
|
|
|
|
#define BUFFER_HOOK_SIG(name) i32 name(Application_Links *app, Buffer_ID buffer_id)
|
2019-03-22 01:27:28 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 22:57:47 +00:00
|
|
|
typedef i32 Buffer_Edit_Range_Function(Application_Links *app, Buffer_ID buffer_id,
|
2019-12-18 03:38:08 +00:00
|
|
|
Range_i64 new_range, u64 original_size);
|
|
|
|
#define BUFFER_EDIT_RANGE_SIG(name) i32 name(Application_Links *app, Buffer_ID buffer_id, Range_i64 new_range, u64 original_size)
|
2019-08-13 18:54:15 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-15 03:26:00 +00:00
|
|
|
typedef Vec2_f32 Delta_Rule_Function(Vec2_f32 pending, b32 is_new_target, f32 dt, void *data);
|
2019-11-01 03:46:53 +00:00
|
|
|
#define DELTA_RULE_SIG(name) Vec2_f32 name(Vec2_f32 pending, b32 is_new_target, f32 dt, void *data)
|
2017-01-23 06:19:43 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 22:57:47 +00:00
|
|
|
typedef Rect_f32 Buffer_Region_Function(Application_Links *app, View_ID view_id, Rect_f32 region);
|
2017-01-23 06:19:43 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 22:57:47 +00:00
|
|
|
typedef void New_Clipboard_Contents_Function(Application_Links *app, String_Const_u8 contents);
|
2019-11-01 03:46:53 +00:00
|
|
|
#define NEW_CLIPBOARD_CONTENTS_SIG(name) void name(Application_Links *app, String_Const_u8 contents)
|
2019-03-15 08:38:28 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-11-05 06:25:19 +00:00
|
|
|
typedef void Tick_Function(Application_Links *app, Frame_Info frame_info);
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 22:57:47 +00:00
|
|
|
typedef void Render_Caller_Function(Application_Links *app, Frame_Info frame_info, View_ID view);
|
2019-02-27 05:49:35 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-29 04:27:20 +00:00
|
|
|
typedef u32 Layout_Item_Flag;
|
|
|
|
enum{
|
|
|
|
LayoutItemFlag_Special_Character = (1 << 0),
|
|
|
|
LayoutItemFlag_Ghost_Character = (1 << 1)
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-29 04:27:20 +00:00
|
|
|
struct Layout_Item{
|
|
|
|
i64 index;
|
|
|
|
u32 codepoint;
|
|
|
|
Layout_Item_Flag flags;
|
|
|
|
Rect_f32 rect;
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-29 04:27:20 +00:00
|
|
|
struct Layout_Item_Block{
|
|
|
|
Layout_Item_Block *next;
|
|
|
|
Layout_Item *items;
|
2019-11-04 00:03:23 +00:00
|
|
|
i64 item_count;
|
2019-10-29 04:27:20 +00:00
|
|
|
i64 character_count;
|
2019-12-17 01:52:20 +00:00
|
|
|
Face_ID face;
|
2019-10-29 04:27:20 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-29 04:27:20 +00:00
|
|
|
struct Layout_Item_List{
|
|
|
|
Layout_Item_Block *first;
|
|
|
|
Layout_Item_Block *last;
|
2019-11-04 00:03:23 +00:00
|
|
|
i64 item_count;
|
|
|
|
i64 character_count;
|
2019-10-29 04:27:20 +00:00
|
|
|
i32 node_count;
|
|
|
|
f32 height;
|
2019-10-30 23:27:37 +00:00
|
|
|
f32 bottom_padding;
|
|
|
|
Range_i64 input_index_range;
|
|
|
|
Range_i64 manifested_index_range;
|
2019-10-29 04:27:20 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-11-04 00:03:23 +00:00
|
|
|
typedef Layout_Item_List Layout_Function(Application_Links *app, Arena *arena, Buffer_ID buffer, Range_i64 range, Face_ID face, f32 width);
|
2019-10-29 04:27:20 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-14 22:57:47 +00:00
|
|
|
struct View_Context{
|
|
|
|
Render_Caller_Function *render_caller;
|
2019-10-15 03:26:00 +00:00
|
|
|
Delta_Rule_Function *delta_rule;
|
2019-12-18 03:38:08 +00:00
|
|
|
u64 delta_rule_memory_size;
|
2019-10-14 22:57:47 +00:00
|
|
|
b32 hides_buffer;
|
2019-12-17 08:11:31 +00:00
|
|
|
struct Mapping *mapping;
|
|
|
|
i64 map_id;
|
2017-12-01 18:04:07 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-22 22:07:05 +00:00
|
|
|
typedef u32 String_Match_Flag;
|
|
|
|
enum{
|
2019-06-16 23:38:22 +00:00
|
|
|
StringMatch_CaseSensitive = 1,
|
|
|
|
StringMatch_LeftSideSloppy = 2,
|
|
|
|
StringMatch_RightSideSloppy = 4,
|
|
|
|
StringMatch_Straddled = 8,
|
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-19 18:55:56 +00:00
|
|
|
struct String_Match{
|
2019-06-16 23:38:22 +00:00
|
|
|
String_Match *next;
|
|
|
|
Buffer_ID buffer;
|
2019-06-18 04:47:00 +00:00
|
|
|
i32 string_id;
|
2019-06-16 23:38:22 +00:00
|
|
|
String_Match_Flag flags;
|
2019-06-20 03:43:02 +00:00
|
|
|
Range_i64 range;
|
2019-06-16 23:38:22 +00:00
|
|
|
};
|
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-19 18:55:56 +00:00
|
|
|
struct String_Match_List{
|
2019-06-16 23:38:22 +00:00
|
|
|
String_Match *first;
|
|
|
|
String_Match *last;
|
|
|
|
i32 count;
|
|
|
|
};
|
2019-02-24 07:22:16 +00:00
|
|
|
|
2019-12-16 06:56:13 +00:00
|
|
|
api(custom)
|
2019-10-19 18:55:56 +00:00
|
|
|
struct Process_State{
|
2019-06-19 02:31:59 +00:00
|
|
|
b32 valid;
|
2019-03-15 08:38:28 +00:00
|
|
|
b32 is_updating;
|
|
|
|
i64 return_code;
|
|
|
|
};
|
|
|
|
|
2017-01-23 06:19:43 +00:00
|
|
|
#endif
|
|
|
|
|