diff --git a/src/base/base_entry_point.c b/src/base/base_entry_point.c index 1a24e3e0..d0e65a8f 100644 --- a/src/base/base_entry_point.c +++ b/src/base/base_entry_point.c @@ -78,8 +78,8 @@ main_thread_base_entry_point(void (*entry_point)(CmdLine *cmdline), char **argum #if defined(DBG_ENGINE_CORE_H) && !defined(D_INIT_MANUAL) d_init(); #endif -#if defined(DBG_FRONTEND_CORE_H) && !defined(DF_INIT_MANUAL) - df_init(&cmdline); +#if defined(RADDBG_CORE_H) && !defined(RD_INIT_MANUAL) + rd_init(&cmdline); #endif //- rjf: call into entry point diff --git a/src/dbg_engine/dbg_engine.mdesk b/src/dbg_engine/dbg_engine.mdesk index 78db1a89..cc01dc9e 100644 --- a/src/dbg_engine/dbg_engine.mdesk +++ b/src/dbg_engine/dbg_engine.mdesk @@ -101,7 +101,7 @@ D_ViewRuleTable: //~ rjf: Developer Toggles @table(name) -DF_DevToggleTable: +D_DevToggleTable: { {telemetry_capture} {simulate_lag} @@ -117,13 +117,13 @@ DF_DevToggleTable: @gen { - @expand(DF_DevToggleTable a) `global B32 DEV_$(a.name) = 0;` + @expand(D_DevToggleTable a) `global B32 DEV_$(a.name) = 0;` } @gen { `struct {B32 *value_ptr; String8 name;} DEV_toggle_table[] =`; `{`; - @expand(DF_DevToggleTable a) `{&DEV_$(a.name), str8_lit_comp("$(a.name)")},` + @expand(D_DevToggleTable a) `{&DEV_$(a.name), str8_lit_comp("$(a.name)")},` `};`; } diff --git a/src/dbg_engine/dbg_engine_core.c b/src/dbg_engine/dbg_engine_core.c index 61138329..e6fb7bab 100644 --- a/src/dbg_engine/dbg_engine_core.c +++ b/src/dbg_engine/dbg_engine_core.c @@ -951,7 +951,7 @@ d_lines_array_from_file_path_line_range(Arena *arena, String8 file_path, Rng1S64 Temp scratch = scratch_begin(&arena, 1); DI_Scope *scope = di_scope_open(); DI_KeyList dbgi_keys = d_push_active_dbgi_key_list(scratch.arena); - String8List overrides = d_possible_overrides_from_file_path(scratch.arena, file_path); + String8List overrides = rd_possible_overrides_from_file_path(scratch.arena, file_path); for(String8Node *override_n = overrides.first; override_n != 0; override_n = override_n->next) @@ -1536,7 +1536,7 @@ d_init(void) d_state = push_array(arena, D_State, 1); d_state->arena = arena; d_state->cmds_arena = arena_alloc(); - d_state->output_log_key = hs_hash_from_data(str8_lit("df_output_log_key")); + d_state->output_log_key = hs_hash_from_data(str8_lit("output_log_key")); d_state->ctrl_entity_store = ctrl_entity_store_alloc(); d_state->ctrl_stop_arena = arena_alloc(); d_state->view_rule_spec_table_size = 1024; @@ -1632,16 +1632,16 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P // rjf: kill all entities which are marked to die on stop { - DF_Entity *request = df_entity_from_id(event->msg_id); - if(df_entity_is_nil(request)) + RD_Entity *request = rd_entity_from_id(event->msg_id); + if(rd_entity_is_nil(request)) { - for(DF_Entity *entity = df_entity_root(); - !df_entity_is_nil(entity); - entity = df_entity_rec_depth_first_pre(entity, df_entity_root()).next) + for(RD_Entity *entity = rd_entity_root(); + !rd_entity_is_nil(entity); + entity = rd_entity_rec_depth_first_pre(entity, rd_entity_root()).next) { - if(entity->flags & DF_EntityFlag_DiesOnRunStop) + if(entity->flags & RD_EntityFlag_DiesOnRunStop) { - df_entity_mark_for_deletion(entity); + rd_entity_mark_for_deletion(entity); } } } @@ -1685,8 +1685,8 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P MTX_Op op = {r1u64(0, 0xffffffffffffffffull), str8_lit("[new session]\n")}; mtx_push_op(d_state->output_log_key, op); #if 0 // TODO(rjf): @msgs - DF_EntityList bps = d_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - for(DF_EntityNode *n = bps.first; n != 0; n = n->next) + RD_EntityList bps = d_query_cached_entity_list_with_kind(RD_EntityKind_Breakpoint); + for(RD_EntityNode *n = bps.first; n != 0; n = n->next) { n->entity->u64 = 0; } @@ -1694,39 +1694,39 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P } // rjf: create entity - DF_Entity *machine = df_machine_entity_from_machine_id(event->entity.machine_id); - DF_Entity *entity = df_entity_alloc(machine, DF_EntityKind_Process); - df_entity_equip_u64(entity, event->msg_id); - df_entity_equip_ctrl_handle(entity, event->entity); - df_entity_equip_ctrl_id(entity, event->entity_id); - df_entity_equip_arch(entity, event->arch); + RD_Entity *machine = rd_machine_entity_from_machine_id(event->entity.machine_id); + RD_Entity *entity = rd_entity_alloc(machine, RD_EntityKind_Process); + rd_entity_equip_u64(entity, event->msg_id); + rd_entity_equip_ctrl_handle(entity, event->entity); + rd_entity_equip_ctrl_id(entity, event->entity_id); + rd_entity_equip_arch(entity, event->arch); }break; case CTRL_EventKind_NewThread: { // rjf: create entity - DF_Entity *parent = df_entity_from_ctrl_handle(event->parent); - DF_Entity *entity = df_entity_alloc(parent, DF_EntityKind_Thread); - df_entity_equip_ctrl_handle(entity, event->entity); - df_entity_equip_arch(entity, event->arch); - df_entity_equip_ctrl_id(entity, event->entity_id); - df_entity_equip_stack_base(entity, event->stack_base); - df_entity_equip_vaddr(entity, event->rip_vaddr); + RD_Entity *parent = rd_entity_from_ctrl_handle(event->parent); + RD_Entity *entity = rd_entity_alloc(parent, RD_EntityKind_Thread); + rd_entity_equip_ctrl_handle(entity, event->entity); + rd_entity_equip_arch(entity, event->arch); + rd_entity_equip_ctrl_id(entity, event->entity_id); + rd_entity_equip_stack_base(entity, event->stack_base); + rd_entity_equip_vaddr(entity, event->rip_vaddr); if(event->string.size != 0) { - df_entity_equip_name(entity, event->string); + rd_entity_equip_name(entity, event->string); } // rjf: find any pending thread names correllating with this TID -> equip name if found match { - DF_EntityList pending_thread_names = d_query_cached_entity_list_with_kind(DF_EntityKind_PendingThreadName); - for(DF_EntityNode *n = pending_thread_names.first; n != 0; n = n->next) + RD_EntityList pending_thread_names = d_query_cached_entity_list_with_kind(RD_EntityKind_PendingThreadName); + for(RD_EntityNode *n = pending_thread_names.first; n != 0; n = n->next) { - DF_Entity *pending_thread_name = n->entity; + RD_Entity *pending_thread_name = n->entity; if(event->entity.machine_id == pending_thread_name->ctrl_handle.machine_id && event->entity_id == pending_thread_name->ctrl_id) { - df_entity_mark_for_deletion(pending_thread_name); - df_entity_equip_name(entity, pending_thread_name->string); + rd_entity_mark_for_deletion(pending_thread_name); + rd_entity_equip_name(entity, pending_thread_name->string); break; } } @@ -1734,13 +1734,13 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P // rjf: determine index in process U64 thread_idx_in_process = 0; - for(DF_Entity *child = parent->first; !df_entity_is_nil(child); child = child->next) + for(RD_Entity *child = parent->first; !rd_entity_is_nil(child); child = child->next) { if(child == entity) { break; } - if(child->kind == DF_EntityKind_Thread) + if(child->kind == RD_EntityKind_Thread) { thread_idx_in_process += 1; } @@ -1749,63 +1749,63 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P // rjf: build default thread color table Vec4F32 thread_colors[] = { - df_rgba_from_theme_color(DF_ThemeColor_Thread0), - df_rgba_from_theme_color(DF_ThemeColor_Thread1), - df_rgba_from_theme_color(DF_ThemeColor_Thread2), - df_rgba_from_theme_color(DF_ThemeColor_Thread3), - df_rgba_from_theme_color(DF_ThemeColor_Thread4), - df_rgba_from_theme_color(DF_ThemeColor_Thread5), - df_rgba_from_theme_color(DF_ThemeColor_Thread6), - df_rgba_from_theme_color(DF_ThemeColor_Thread7), + rd_rgba_from_theme_color(RD_ThemeColor_Thread0), + rd_rgba_from_theme_color(RD_ThemeColor_Thread1), + rd_rgba_from_theme_color(RD_ThemeColor_Thread2), + rd_rgba_from_theme_color(RD_ThemeColor_Thread3), + rd_rgba_from_theme_color(RD_ThemeColor_Thread4), + rd_rgba_from_theme_color(RD_ThemeColor_Thread5), + rd_rgba_from_theme_color(RD_ThemeColor_Thread6), + rd_rgba_from_theme_color(RD_ThemeColor_Thread7), }; // rjf: pick color Vec4F32 thread_color = thread_colors[thread_idx_in_process % ArrayCount(thread_colors)]; // rjf: equip color - df_entity_equip_color_rgba(entity, thread_color); + rd_entity_equip_color_rgba(entity, thread_color); }break; case CTRL_EventKind_NewModule: { // rjf: grab process - DF_Entity *parent = df_entity_from_ctrl_handle(event->parent); + RD_Entity *parent = rd_entity_from_ctrl_handle(event->parent); // rjf: determine if this is the first module B32 is_first = 0; - if(df_entity_is_nil(df_entity_child_from_kind(parent, DF_EntityKind_Module))) + if(rd_entity_is_nil(rd_entity_child_from_kind(parent, RD_EntityKind_Module))) { is_first = 1; } // rjf: create module entity - DF_Entity *module = df_entity_alloc(parent, DF_EntityKind_Module); - df_entity_equip_ctrl_handle(module, event->entity); - df_entity_equip_arch(module, event->arch); - df_entity_equip_name(module, event->string); - df_entity_equip_vaddr_rng(module, event->vaddr_rng); - df_entity_equip_vaddr(module, event->rip_vaddr); - df_entity_equip_timestamp(module, event->timestamp); + RD_Entity *module = rd_entity_alloc(parent, RD_EntityKind_Module); + rd_entity_equip_ctrl_handle(module, event->entity); + rd_entity_equip_arch(module, event->arch); + rd_entity_equip_name(module, event->string); + rd_entity_equip_vaddr_rng(module, event->vaddr_rng); + rd_entity_equip_vaddr(module, event->rip_vaddr); + rd_entity_equip_timestamp(module, event->timestamp); // rjf: is first -> find target, equip process & module & first thread with target color if(is_first) { - DF_EntityList targets = d_query_cached_entity_list_with_kind(DF_EntityKind_Target); - for(DF_EntityNode *n = targets.first; n != 0; n = n->next) + RD_EntityList targets = d_query_cached_entity_list_with_kind(RD_EntityKind_Target); + for(RD_EntityNode *n = targets.first; n != 0; n = n->next) { - DF_Entity *target = n->entity; - DF_Entity *exe = df_entity_child_from_kind(target, DF_EntityKind_Executable); + RD_Entity *target = n->entity; + RD_Entity *exe = rd_entity_child_from_kind(target, RD_EntityKind_Executable); String8 exe_name = exe->string; String8 exe_name_normalized = path_normalized_from_string(scratch.arena, exe_name); String8 module_name_normalized = path_normalized_from_string(scratch.arena, module->string); if(str8_match(exe_name_normalized, module_name_normalized, StringMatchFlag_CaseInsensitive) && - target->flags & DF_EntityFlag_HasColor) + target->flags & RD_EntityFlag_HasColor) { - DF_Entity *first_thread = df_entity_child_from_kind(parent, DF_EntityKind_Thread); - Vec4F32 rgba = df_rgba_from_entity(target); - df_entity_equip_color_rgba(parent, rgba); - df_entity_equip_color_rgba(first_thread, rgba); - df_entity_equip_color_rgba(module, rgba); + RD_Entity *first_thread = rd_entity_child_from_kind(parent, RD_EntityKind_Thread); + Vec4F32 rgba = rd_rgba_from_entity(target); + rd_entity_equip_color_rgba(parent, rgba); + rd_entity_equip_color_rgba(first_thread, rgba); + rd_entity_equip_color_rgba(module, rgba); break; } } @@ -1815,34 +1815,34 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P case CTRL_EventKind_EndProc: { U32 pid = event->entity_id; - DF_Entity *process = df_entity_from_ctrl_handle(event->entity); - df_entity_mark_for_deletion(process); + RD_Entity *process = rd_entity_from_ctrl_handle(event->entity); + rd_entity_mark_for_deletion(process); }break; case CTRL_EventKind_EndThread: { - DF_Entity *thread = df_entity_from_ctrl_handle(event->entity); - df_entity_mark_for_deletion(thread); + RD_Entity *thread = rd_entity_from_ctrl_handle(event->entity); + rd_entity_mark_for_deletion(thread); }break; case CTRL_EventKind_EndModule: { - DF_Entity *module = df_entity_from_ctrl_handle(event->entity); - df_entity_mark_for_deletion(module); + RD_Entity *module = rd_entity_from_ctrl_handle(event->entity); + rd_entity_mark_for_deletion(module); }break; //- rjf: debug info changes case CTRL_EventKind_ModuleDebugInfoPathChange: { - DF_Entity *module = df_entity_from_ctrl_handle(event->entity); - DF_Entity *debug_info = df_entity_child_from_kind(module, DF_EntityKind_DebugInfoPath); - if(df_entity_is_nil(debug_info)) + RD_Entity *module = rd_entity_from_ctrl_handle(event->entity); + RD_Entity *debug_info = rd_entity_child_from_kind(module, RD_EntityKind_DebugInfoPath); + if(rd_entity_is_nil(debug_info)) { - debug_info = df_entity_alloc(module, DF_EntityKind_DebugInfoPath); + debug_info = rd_entity_alloc(module, RD_EntityKind_DebugInfoPath); } - df_entity_equip_name(debug_info, event->string); - df_entity_equip_timestamp(debug_info, event->timestamp); + rd_entity_equip_name(debug_info, event->string); + rd_entity_equip_timestamp(debug_info, event->timestamp); }break; //- rjf: debug strings @@ -1856,25 +1856,25 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P case CTRL_EventKind_ThreadName: { String8 string = event->string; - DF_Entity *entity = df_entity_from_ctrl_handle(event->entity); + RD_Entity *entity = rd_entity_from_ctrl_handle(event->entity); if(event->entity_id != 0) { - entity = df_entity_from_ctrl_id(event->entity.machine_id, event->entity_id); + entity = rd_entity_from_ctrl_id(event->entity.machine_id, event->entity_id); } - if(df_entity_is_nil(entity)) + if(rd_entity_is_nil(entity)) { - DF_Entity *process = df_entity_from_ctrl_handle(event->parent); - if(!df_entity_is_nil(process)) + RD_Entity *process = rd_entity_from_ctrl_handle(event->parent); + if(!rd_entity_is_nil(process)) { - entity = df_entity_alloc(process, DF_EntityKind_PendingThreadName); - df_entity_equip_name(entity, string); - df_entity_equip_ctrl_handle(entity, ctrl_handle_make(event->entity.machine_id, dmn_handle_zero())); - df_entity_equip_ctrl_id(entity, event->entity_id); + entity = rd_entity_alloc(process, RD_EntityKind_PendingThreadName); + rd_entity_equip_name(entity, string); + rd_entity_equip_ctrl_handle(entity, ctrl_handle_make(event->entity.machine_id, dmn_handle_zero())); + rd_entity_equip_ctrl_id(entity, event->entity_id); } } - if(!df_entity_is_nil(entity)) + if(!rd_entity_is_nil(entity)) { - df_entity_equip_name(entity, string); + rd_entity_equip_name(entity, string); } }break; @@ -2000,15 +2000,15 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P default:{}break; case DI_EventKind_ConversionStarted: { - DF_Entity *task = df_entity_alloc(df_entity_root(), DF_EntityKind_ConversionTask); - df_entity_equip_name(task, event->string); + RD_Entity *task = rd_entity_alloc(rd_entity_root(), RD_EntityKind_ConversionTask); + rd_entity_equip_name(task, event->string); }break; case DI_EventKind_ConversionEnded: { - DF_Entity *task = df_entity_from_name_and_kind(event->string, DF_EntityKind_ConversionTask); - if(!df_entity_is_nil(task)) + RD_Entity *task = rd_entity_from_name_and_kind(event->string, RD_EntityKind_ConversionTask); + if(!rd_entity_is_nil(task)) { - df_entity_mark_for_deletion(task); + rd_entity_mark_for_deletion(task); } }break; } @@ -2355,22 +2355,22 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P #if 0 // TODO(rjf): @msgs // rjf: gather targets corresponding to all launched processes - DF_EntityList targets = {0}; + RD_EntityList targets = {0}; { - DF_EntityList processes = d_query_cached_entity_list_with_kind(DF_EntityKind_Process); - for(DF_EntityNode *n = processes.first; n != 0; n = n->next) + RD_EntityList processes = d_query_cached_entity_list_with_kind(RD_EntityKind_Process); + for(RD_EntityNode *n = processes.first; n != 0; n = n->next) { - DF_Entity *process = n->entity; - DF_Entity *target = df_entity_from_handle(process->entity_handle); - if(!df_entity_is_nil(target)) + RD_Entity *process = n->entity; + RD_Entity *target = rd_entity_from_handle(process->entity_handle); + if(!rd_entity_is_nil(target)) { - df_entity_list_push(scratch.arena, &targets, target); + rd_entity_list_push(scratch.arena, &targets, target); } } } // rjf: re-launch targets - d_cmd(D_CmdKind_LaunchAndRun, .entity_list = df_handle_list_from_entity_list(scratch.arena, targets)); + d_cmd(D_CmdKind_LaunchAndRun, .entity_list = rd_handle_list_from_entity_list(scratch.arena, targets)); #endif }break; case D_CmdKind_StepInto: diff --git a/src/dbg_frontend/dbg_frontend_core.h b/src/dbg_frontend/dbg_frontend_core.h deleted file mode 100644 index 827cbb30..00000000 --- a/src/dbg_frontend/dbg_frontend_core.h +++ /dev/null @@ -1,1554 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -#ifndef DBG_FRONTEND_CORE_H -#define DBG_FRONTEND_CORE_H - -//////////////////////////////// -//~ rjf: Handles - -typedef struct D_Handle D_Handle; -struct D_Handle -{ - U64 u64[2]; -}; - -typedef struct D_HandleNode D_HandleNode; -struct D_HandleNode -{ - D_HandleNode *next; - D_HandleNode *prev; - D_Handle handle; -}; - -typedef struct D_HandleList D_HandleList; -struct D_HandleList -{ - D_HandleNode *first; - D_HandleNode *last; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Entity Kind Flags - -typedef U32 DF_EntityKindFlags; -enum -{ - //- rjf: allowed operations - DF_EntityKindFlag_CanDelete = (1<<0), - DF_EntityKindFlag_CanFreeze = (1<<1), - DF_EntityKindFlag_CanEdit = (1<<2), - DF_EntityKindFlag_CanRename = (1<<3), - DF_EntityKindFlag_CanEnable = (1<<4), - DF_EntityKindFlag_CanCondition = (1<<5), - DF_EntityKindFlag_CanDuplicate = (1<<6), - - //- rjf: name categorization - DF_EntityKindFlag_NameIsCode = (1<<7), - DF_EntityKindFlag_NameIsPath = (1<<8), - - //- rjf: lifetime categorization - DF_EntityKindFlag_UserDefinedLifetime = (1<<9), - - //- rjf: serialization - DF_EntityKindFlag_IsSerializedToConfig = (1<<10), -}; - -//////////////////////////////// -//~ rjf: Entity Flags - -typedef U32 DF_EntityFlags; -enum -{ - //- rjf: allocationless, simple equipment - DF_EntityFlag_HasTextPoint = (1<<0), - DF_EntityFlag_HasEntityHandle = (1<<2), - DF_EntityFlag_HasU64 = (1<<4), - DF_EntityFlag_HasColor = (1<<6), - DF_EntityFlag_DiesOnRunStop = (1<<8), - - //- rjf: ctrl entity equipment - DF_EntityFlag_HasCtrlHandle = (1<<9), - DF_EntityFlag_HasArch = (1<<10), - DF_EntityFlag_HasCtrlID = (1<<11), - DF_EntityFlag_HasStackBase = (1<<12), - DF_EntityFlag_HasTLSRoot = (1<<13), - DF_EntityFlag_HasVAddrRng = (1<<14), - DF_EntityFlag_HasVAddr = (1<<15), - - //- rjf: file properties - DF_EntityFlag_IsFolder = (1<<16), - DF_EntityFlag_IsMissing = (1<<17), - - //- rjf: deletion - DF_EntityFlag_MarkedForDeletion = (1<<31), -}; - -//////////////////////////////// -//~ rjf: Evaluation Spaces - -typedef U64 DF_EvalSpaceKind; -enum -{ - DF_EvalSpaceKind_CtrlEntity = E_SpaceKind_FirstUserDefined, - DF_EvalSpaceKind_CfgEntity, -}; - -//////////////////////////////// -//~ rjf: Binding Types - -typedef struct DF_Binding DF_Binding; -struct DF_Binding -{ - OS_Key key; - OS_EventFlags flags; -}; - -typedef struct DF_BindingNode DF_BindingNode; -struct DF_BindingNode -{ - DF_BindingNode *next; - DF_Binding binding; -}; - -typedef struct DF_BindingList DF_BindingList; -struct DF_BindingList -{ - DF_BindingNode *first; - DF_BindingNode *last; - U64 count; -}; - -typedef struct DF_StringBindingPair DF_StringBindingPair; -struct DF_StringBindingPair -{ - String8 string; - DF_Binding binding; -}; - -//////////////////////////////// -//~ rjf: Key Map Types - -typedef struct DF_KeyMapNode DF_KeyMapNode; -struct DF_KeyMapNode -{ - DF_KeyMapNode *hash_next; - DF_KeyMapNode *hash_prev; - String8 name; - DF_Binding binding; -}; - -typedef struct DF_KeyMapSlot DF_KeyMapSlot; -struct DF_KeyMapSlot -{ - DF_KeyMapNode *first; - DF_KeyMapNode *last; -}; - -//////////////////////////////// -//~ rjf: Setting Types - -typedef struct DF_SettingVal DF_SettingVal; -struct DF_SettingVal -{ - B32 set; - S32 s32; -}; - -//////////////////////////////// -//~ rjf: View Hook Function Types - -typedef struct DF_View DF_View; - -#define DF_VIEW_SETUP_FUNCTION_SIG(name) void name(DF_View *view, MD_Node *params, String8 string) -#define DF_VIEW_SETUP_FUNCTION_NAME(name) df_view_setup_##name -#define DF_VIEW_SETUP_FUNCTION_DEF(name) internal DF_VIEW_SETUP_FUNCTION_SIG(DF_VIEW_SETUP_FUNCTION_NAME(name)) -typedef DF_VIEW_SETUP_FUNCTION_SIG(DF_ViewSetupFunctionType); - -#define DF_VIEW_CMD_FUNCTION_SIG(name) void name(DF_View *view, MD_Node *params, String8 string) -#define DF_VIEW_CMD_FUNCTION_NAME(name) df_view_cmds_##name -#define DF_VIEW_CMD_FUNCTION_DEF(name) internal DF_VIEW_CMD_FUNCTION_SIG(DF_VIEW_CMD_FUNCTION_NAME(name)) -typedef DF_VIEW_CMD_FUNCTION_SIG(DF_ViewCmdFunctionType); - -#define DF_VIEW_UI_FUNCTION_SIG(name) void name(DF_View *view, MD_Node *params, String8 string, Rng2F32 rect) -#define DF_VIEW_UI_FUNCTION_NAME(name) df_view_ui_##name -#define DF_VIEW_UI_FUNCTION_DEF(name) internal DF_VIEW_UI_FUNCTION_SIG(DF_VIEW_UI_FUNCTION_NAME(name)) -typedef DF_VIEW_UI_FUNCTION_SIG(DF_ViewUIFunctionType); - -//////////////////////////////// -//~ rjf: View Rule Info Types - -typedef U32 DF_ViewRuleInfoFlags; -enum -{ - DF_ViewRuleInfoFlag_ShowInDocs = (1<<0), - DF_ViewRuleInfoFlag_CanFilter = (1<<1), - DF_ViewRuleInfoFlag_FilterIsCode = (1<<2), - DF_ViewRuleInfoFlag_TypingAutomaticallyFilters = (1<<3), -}; - -#define DF_VIEW_RULE_UI_FUNCTION_SIG(name) void name(DF_View *view, String8 string, MD_Node *params, Rng2F32 rect) -#define DF_VIEW_RULE_UI_FUNCTION_NAME(name) df_view_rule_ui_##name -#define DF_VIEW_RULE_UI_FUNCTION_DEF(name) internal DF_VIEW_RULE_UI_FUNCTION_SIG(DF_VIEW_RULE_UI_FUNCTION_NAME(name)) -typedef DF_VIEW_RULE_UI_FUNCTION_SIG(DF_ViewRuleUIFunctionType); - -//////////////////////////////// -//~ rjf: View Specification Types - -#if 1 // TODO(rjf): @msgs -typedef U32 DF_ViewSpecFlags; -enum -{ - DF_ViewSpecFlag_ParameterizedByEntity = (1<<0), - DF_ViewSpecFlag_ProjectSpecific = (1<<1), - DF_ViewSpecFlag_CanSerialize = (1<<2), - DF_ViewSpecFlag_CanFilter = (1<<3), - DF_ViewSpecFlag_FilterIsCode = (1<<4), - DF_ViewSpecFlag_TypingAutomaticallyFilters = (1<<5), -}; - -typedef struct DF_ViewSpecInfo DF_ViewSpecInfo; -struct DF_ViewSpecInfo -{ - DF_ViewSpecFlags flags; - String8 name; - String8 display_string; - U32 icon_kind; - DF_ViewSetupFunctionType *setup_hook; - DF_ViewCmdFunctionType *cmd_hook; - DF_ViewUIFunctionType *ui_hook; -}; - -typedef struct DF_ViewSpec DF_ViewSpec; -struct DF_ViewSpec -{ - DF_ViewSpec *hash_next; - DF_ViewSpecInfo info; -}; - -typedef struct DF_ViewSpecInfoArray DF_ViewSpecInfoArray; -struct DF_ViewSpecInfoArray -{ - DF_ViewSpecInfo *v; - U64 count; -}; - -typedef struct DF_CmdParamSlotViewSpecRuleNode DF_CmdParamSlotViewSpecRuleNode; -struct DF_CmdParamSlotViewSpecRuleNode -{ - DF_CmdParamSlotViewSpecRuleNode *next; - DF_ViewSpec *view_spec; - String8 cmd_name; -}; - -typedef struct DF_CmdParamSlotViewSpecRuleList DF_CmdParamSlotViewSpecRuleList; -struct DF_CmdParamSlotViewSpecRuleList -{ - DF_CmdParamSlotViewSpecRuleNode *first; - DF_CmdParamSlotViewSpecRuleNode *last; - U64 count; -}; -#endif - -//////////////////////////////// -//~ rjf: View Types - -typedef struct DF_ArenaExt DF_ArenaExt; -struct DF_ArenaExt -{ - DF_ArenaExt *next; - Arena *arena; -}; - -typedef struct DF_TransientViewNode DF_TransientViewNode; -struct DF_TransientViewNode -{ - DF_TransientViewNode *next; - DF_TransientViewNode *prev; - EV_Key key; - DF_View *view; - Arena *initial_params_arena; - MD_Node *initial_params; - U64 first_frame_index_touched; - U64 last_frame_index_touched; -}; - -typedef struct DF_TransientViewSlot DF_TransientViewSlot; -struct DF_TransientViewSlot -{ - DF_TransientViewNode *first; - DF_TransientViewNode *last; -}; - -typedef struct DF_View DF_View; -struct DF_View -{ - // rjf: allocation links (for iterating all views) - DF_View *alloc_next; - DF_View *alloc_prev; - - // rjf: ownership links ('owners' can have lists of views) - DF_View *order_next; - DF_View *order_prev; - - // rjf: transient view children - DF_View *first_transient; - DF_View *last_transient; - - // rjf: view specification info - DF_ViewSpec *spec; - - // rjf: allocation info - U64 generation; - - // rjf: loading animation state - F32 loading_t; - F32 loading_t_target; - U64 loading_progress_v; - U64 loading_progress_v_target; - - // rjf: view project (for project-specific/filtered views) - Arena *project_path_arena; - String8 project_path; - - // rjf: view state - UI_ScrollPt2 scroll_pos; - - // rjf: view-lifetime allocation & user data extensions - Arena *arena; - DF_ArenaExt *first_arena_ext; - DF_ArenaExt *last_arena_ext; - U64 transient_view_slots_count; - DF_TransientViewSlot *transient_view_slots; - DF_TransientViewNode *free_transient_view_node; - void *user_data; - - // rjf: filter mode - B32 is_filtering; - F32 is_filtering_t; - - // rjf: params tree state - Arena *params_arenas[2]; - MD_Node *params_roots[2]; - U64 params_write_gen; - U64 params_read_gen; - - // rjf: text query state - TxtPt query_cursor; - TxtPt query_mark; - U64 query_string_size; - U8 query_buffer[KB(4)]; -}; - -//////////////////////////////// -//~ rjf: Panel Types - -typedef struct DF_Panel DF_Panel; -struct DF_Panel -{ - // rjf: tree links/data - DF_Panel *first; - DF_Panel *last; - DF_Panel *next; - DF_Panel *prev; - DF_Panel *parent; - U64 child_count; - - // rjf: allocation data - U64 generation; - - // rjf: split data - Axis2 split_axis; - F32 pct_of_parent; - - // rjf: animated rectangle data - Rng2F32 animated_rect_pct; - - // rjf: tab params - Side tab_side; - - // rjf: stable views (tabs) - DF_View *first_tab_view; - DF_View *last_tab_view; - U64 tab_view_count; - D_Handle selected_tab_view; -}; - -typedef struct DF_PanelRec DF_PanelRec; -struct DF_PanelRec -{ - DF_Panel *next; - int push_count; - int pop_count; -}; - -//////////////////////////////// -//~ rjf: Drag/Drop Types - -typedef enum DF_DragDropState -{ - DF_DragDropState_Null, - DF_DragDropState_Dragging, - DF_DragDropState_Dropping, - DF_DragDropState_COUNT -} -DF_DragDropState; - -typedef struct DF_DragDropPayload DF_DragDropPayload; -struct DF_DragDropPayload -{ - UI_Key key; - D_Handle panel; - D_Handle view; - D_Handle entity; - TxtPt text_point; -}; - -//////////////////////////////// -//~ rjf: View Rule Spec Types - -typedef U32 DF_ViewRuleSpecInfoFlags; // NOTE(rjf): see @view_rule_info -enum -{ - DF_ViewRuleSpecInfoFlag_VizRowProd = (1<<0), - DF_ViewRuleSpecInfoFlag_LineStringize = (1<<1), - DF_ViewRuleSpecInfoFlag_RowUI = (1<<2), - DF_ViewRuleSpecInfoFlag_ViewUI = (1<<3), -}; - -#define DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_SIG(name) void name(void) -#define DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(name) df_view_rule_viz_row_prod__##name -#define DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(name) internal DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_SIG(DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(name)) - -#define DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_SIG(name) void name(void) -#define DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(name) df_view_rule_line_stringize__##name -#define DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(name) internal DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_SIG(DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(name)) - -#define DF_VIEW_RULE_ROW_UI_FUNCTION_SIG(name) void name(EV_Key key, MD_Node *params, String8 string) -#define DF_VIEW_RULE_ROW_UI_FUNCTION_NAME(name) df_view_rule_row_ui__##name -#define DF_VIEW_RULE_ROW_UI_FUNCTION_DEF(name) DF_VIEW_RULE_ROW_UI_FUNCTION_SIG(DF_VIEW_RULE_ROW_UI_FUNCTION_NAME(name)) - -typedef DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_SIG(DF_ViewRuleVizRowProdHookFunctionType); -typedef DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_SIG(DF_ViewRuleLineStringizeHookFunctionType); -typedef DF_VIEW_RULE_ROW_UI_FUNCTION_SIG(DF_ViewRuleRowUIFunctionType); - -typedef struct DF_ViewRuleSpecInfo DF_ViewRuleSpecInfo; -struct DF_ViewRuleSpecInfo -{ - String8 string; - DF_ViewRuleSpecInfoFlags flags; - DF_ViewRuleVizRowProdHookFunctionType *viz_row_prod; - DF_ViewRuleLineStringizeHookFunctionType *line_stringize; - DF_ViewRuleRowUIFunctionType *row_ui; -}; - -typedef struct DF_ViewRuleSpecInfoArray DF_ViewRuleSpecInfoArray; -struct DF_ViewRuleSpecInfoArray -{ - DF_ViewRuleSpecInfo *v; - U64 count; -}; - -typedef struct DF_ViewRuleSpec DF_ViewRuleSpec; -struct DF_ViewRuleSpec -{ - DF_ViewRuleSpec *hash_next; - DF_ViewRuleSpecInfo info; -}; - -//////////////////////////////// -//~ rjf: Command Kind Types - -typedef U32 DF_QueryFlags; -enum -{ - DF_QueryFlag_AllowFiles = (1<<0), - DF_QueryFlag_AllowFolders = (1<<1), - DF_QueryFlag_CodeInput = (1<<2), - DF_QueryFlag_KeepOldInput = (1<<3), - DF_QueryFlag_SelectOldInput = (1<<4), - DF_QueryFlag_Required = (1<<5), -}; - -typedef U32 DF_CmdKindFlags; -enum -{ - DF_CmdKindFlag_ListInUI = (1<<0), - DF_CmdKindFlag_ListInIPCDocs = (1<<1), -}; - -//////////////////////////////// -//~ rjf: Generated Code - -#include "generated/dbg_frontend.meta.h" - -//////////////////////////////// -//~ rjf: Config Types - -typedef struct D_CfgTree D_CfgTree; -struct D_CfgTree -{ - D_CfgTree *next; - DF_CfgSrc source; - MD_Node *root; -}; - -typedef struct D_CfgVal D_CfgVal; -struct D_CfgVal -{ - D_CfgVal *hash_next; - D_CfgVal *linear_next; - D_CfgTree *first; - D_CfgTree *last; - U64 insertion_stamp; - String8 string; -}; - -typedef struct D_CfgSlot D_CfgSlot; -struct D_CfgSlot -{ - D_CfgVal *first; -}; - -typedef struct D_CfgTable D_CfgTable; -struct D_CfgTable -{ - U64 slot_count; - D_CfgSlot *slots; - U64 insertion_stamp_counter; - D_CfgVal *first_val; - D_CfgVal *last_val; -}; - -//////////////////////////////// -//~ rjf: Entity Types - -typedef U64 DF_EntityID; - -typedef struct DF_Entity DF_Entity; -struct DF_Entity -{ - // rjf: tree links - DF_Entity *first; - DF_Entity *last; - DF_Entity *next; - DF_Entity *prev; - DF_Entity *parent; - - // rjf: metadata - DF_EntityKind kind; - DF_EntityFlags flags; - DF_EntityID id; - U64 gen; - U64 alloc_time_us; - F32 alive_t; - - // rjf: basic equipment - TxtPt text_point; - D_Handle entity_handle; - B32 disabled; - U64 u64; - Vec4F32 color_hsva; - DF_CfgSrc cfg_src; - U64 timestamp; - - // rjf: ctrl equipment - CTRL_Handle ctrl_handle; - Arch arch; - U32 ctrl_id; - U64 stack_base; - Rng1U64 vaddr_rng; - U64 vaddr; - - // rjf: string equipment - String8 string; - - // rjf: parameter tree - Arena *params_arena; - MD_Node *params_root; -}; - -typedef struct DF_EntityNode DF_EntityNode; -struct DF_EntityNode -{ - DF_EntityNode *next; - DF_Entity *entity; -}; - -typedef struct DF_EntityList DF_EntityList; -struct DF_EntityList -{ - DF_EntityNode *first; - DF_EntityNode *last; - U64 count; -}; - -typedef struct DF_EntityArray DF_EntityArray; -struct DF_EntityArray -{ - DF_Entity **v; - U64 count; -}; - -typedef struct DF_EntityRec DF_EntityRec; -struct DF_EntityRec -{ - DF_Entity *next; - S32 push_count; - S32 pop_count; -}; - -//////////////////////////////// -//~ rjf: Entity Evaluation Types - -typedef struct DF_EntityEval DF_EntityEval; -struct DF_EntityEval -{ - B64 enabled; - U64 hit_count; - U64 label_off; - U64 location_off; - U64 condition_off; -}; - -//////////////////////////////// -//~ rjf: Entity Fuzzy Listing Types - -typedef struct DF_EntityFuzzyItem DF_EntityFuzzyItem; -struct DF_EntityFuzzyItem -{ - DF_Entity *entity; - FuzzyMatchRangeList matches; -}; - -typedef struct DF_EntityFuzzyItemArray DF_EntityFuzzyItemArray; -struct DF_EntityFuzzyItemArray -{ - DF_EntityFuzzyItem *v; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Command Types - -typedef struct DF_Cmd DF_Cmd; -struct DF_Cmd -{ - String8 name; - DF_Regs *regs; -}; - -typedef struct DF_CmdNode DF_CmdNode; -struct DF_CmdNode -{ - DF_CmdNode *next; - DF_CmdNode *prev; - DF_Cmd cmd; -}; - -typedef struct DF_CmdList DF_CmdList; -struct DF_CmdList -{ - DF_CmdNode *first; - DF_CmdNode *last; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Context Register Types - -typedef struct DF_RegsNode DF_RegsNode; -struct DF_RegsNode -{ - DF_RegsNode *next; - DF_Regs v; -}; - -//////////////////////////////// -//~ rjf: Theme Types - -typedef struct DF_Theme DF_Theme; -struct DF_Theme -{ - Vec4F32 colors[DF_ThemeColor_COUNT]; -}; - -typedef enum DF_FontSlot -{ - DF_FontSlot_Main, - DF_FontSlot_Code, - DF_FontSlot_Icons, - DF_FontSlot_COUNT -} -DF_FontSlot; - -typedef enum DF_PaletteCode -{ - DF_PaletteCode_Base, - DF_PaletteCode_MenuBar, - DF_PaletteCode_Floating, - DF_PaletteCode_ImplicitButton, - DF_PaletteCode_PlainButton, - DF_PaletteCode_PositivePopButton, - DF_PaletteCode_NegativePopButton, - DF_PaletteCode_NeutralPopButton, - DF_PaletteCode_ScrollBarButton, - DF_PaletteCode_Tab, - DF_PaletteCode_TabInactive, - DF_PaletteCode_DropSiteOverlay, - DF_PaletteCode_COUNT -} -DF_PaletteCode; - -//////////////////////////////// -//~ rjf: Auto-Complete Lister Types - -typedef U32 DF_AutoCompListerFlags; -enum -{ - DF_AutoCompListerFlag_Locals = (1<<0), - DF_AutoCompListerFlag_Registers = (1<<1), - DF_AutoCompListerFlag_ViewRules = (1<<2), - DF_AutoCompListerFlag_ViewRuleParams= (1<<3), - DF_AutoCompListerFlag_Members = (1<<4), - DF_AutoCompListerFlag_Languages = (1<<5), - DF_AutoCompListerFlag_Architectures = (1<<6), - DF_AutoCompListerFlag_Tex2DFormats = (1<<7), -}; - -typedef struct DF_AutoCompListerItem DF_AutoCompListerItem; -struct DF_AutoCompListerItem -{ - String8 string; - String8 kind_string; - FuzzyMatchRangeList matches; -}; - -typedef struct DF_AutoCompListerItemChunkNode DF_AutoCompListerItemChunkNode; -struct DF_AutoCompListerItemChunkNode -{ - DF_AutoCompListerItemChunkNode *next; - DF_AutoCompListerItem *v; - U64 count; - U64 cap; -}; - -typedef struct DF_AutoCompListerItemChunkList DF_AutoCompListerItemChunkList; -struct DF_AutoCompListerItemChunkList -{ - DF_AutoCompListerItemChunkNode *first; - DF_AutoCompListerItemChunkNode *last; - U64 chunk_count; - U64 total_count; -}; - -typedef struct DF_AutoCompListerItemArray DF_AutoCompListerItemArray; -struct DF_AutoCompListerItemArray -{ - DF_AutoCompListerItem *v; - U64 count; -}; - -typedef struct DF_AutoCompListerParams DF_AutoCompListerParams; -struct DF_AutoCompListerParams -{ - DF_AutoCompListerFlags flags; - String8List strings; -}; - -//////////////////////////////// -//~ rjf: Per-Window State - -typedef struct DF_Window DF_Window; -struct DF_Window -{ - // rjf: links & metadata - DF_Window *next; - DF_Window *prev; - U64 gen; - U64 frames_alive; - DF_CfgSrc cfg_src; - - // rjf: top-level info & handles - Arena *arena; - OS_Handle os; - R_Handle r; - UI_State *ui; - F32 last_dpi; - B32 window_temporarily_focused_ipc; - - // rjf: config/settings - DF_SettingVal setting_vals[DF_SettingCode_COUNT]; - UI_Palette cfg_palettes[DF_PaletteCode_COUNT]; // derivative from theme - - // rjf: dev interface state - B32 dev_menu_is_open; - - // rjf: menu bar state - B32 menu_bar_focused; - B32 menu_bar_focused_on_press; - B32 menu_bar_key_held; - B32 menu_bar_focus_press_started; - - // rjf: code context menu state - Arena *code_ctx_menu_arena; - String8 code_ctx_menu_file_path; - U128 code_ctx_menu_text_key; - TXT_LangKind code_ctx_menu_lang_kind; - TxtRng code_ctx_menu_range; - U64 code_ctx_menu_vaddr; - D_LineList code_ctx_menu_lines; - - // rjf: entity context menu state - D_Handle entity_ctx_menu_entity; - U8 entity_ctx_menu_input_buffer[1024]; - U64 entity_ctx_menu_input_size; - TxtPt entity_ctx_menu_input_cursor; - TxtPt entity_ctx_menu_input_mark; - - // rjf: tab context menu state - D_Handle tab_ctx_menu_panel; - D_Handle tab_ctx_menu_view; - U8 tab_ctx_menu_input_buffer[1024]; - U64 tab_ctx_menu_input_size; - TxtPt tab_ctx_menu_input_cursor; - TxtPt tab_ctx_menu_input_mark; - - // rjf: autocomplete lister state - U64 autocomp_last_frame_idx; - B32 autocomp_force_closed; - B32 autocomp_query_dirty; - UI_Key autocomp_root_key; - Arena *autocomp_lister_params_arena; - DF_AutoCompListerParams autocomp_lister_params; - U64 autocomp_cursor_off; - U8 autocomp_lister_query_buffer[1024]; - U64 autocomp_lister_query_size; - F32 autocomp_open_t; - F32 autocomp_num_visible_rows_t; - S64 autocomp_cursor_num; - - // rjf: query view stack - Arena *query_cmd_arena; - String8 query_cmd_name; - DF_Regs *query_cmd_regs; - U64 query_cmd_regs_mask[(DF_RegSlot_COUNT + 63) / 64]; - DF_View *query_view_stack_top; - B32 query_view_selected; - F32 query_view_selected_t; - F32 query_view_t; - - // rjf: hover eval stable state - B32 hover_eval_focused; - TxtPt hover_eval_txt_cursor; - TxtPt hover_eval_txt_mark; - U8 hover_eval_txt_buffer[1024]; - U64 hover_eval_txt_size; - Arena *hover_eval_arena; - Vec2F32 hover_eval_spawn_pos; - String8 hover_eval_string; - - // rjf: hover eval timer - U64 hover_eval_first_frame_idx; - U64 hover_eval_last_frame_idx; - - // rjf: hover eval params - String8 hover_eval_file_path; - TxtPt hover_eval_file_pt; - U64 hover_eval_vaddr; - F32 hover_eval_open_t; - F32 hover_eval_num_visible_rows_t; - - // rjf: error state - U8 error_buffer[512]; - U64 error_string_size; - F32 error_t; - - // rjf: panel state - DF_Panel *root_panel; - DF_Panel *free_panel; - DF_Panel *focused_panel; - - // rjf: per-frame ui events state - UI_EventList ui_events; - - // rjf: per-frame drawing state - DR_Bucket *draw_bucket; -}; - -//////////////////////////////// -//~ rjf: Eval Visualization View Cache Types - -typedef struct DF_EvalVizViewCacheNode DF_EvalVizViewCacheNode; -struct DF_EvalVizViewCacheNode -{ - DF_EvalVizViewCacheNode *next; - DF_EvalVizViewCacheNode *prev; - U64 key; - EV_View *v; -}; - -typedef struct DF_EvalVizViewCacheSlot DF_EvalVizViewCacheSlot; -struct DF_EvalVizViewCacheSlot -{ - DF_EvalVizViewCacheNode *first; - DF_EvalVizViewCacheNode *last; -}; - -//////////////////////////////// -//~ rjf: Main Per-Process Graphical State - -typedef struct D_NameChunkNode D_NameChunkNode; -struct D_NameChunkNode -{ - D_NameChunkNode *next; - U64 size; -}; - -typedef struct D_EntityListCache D_EntityListCache; -struct D_EntityListCache -{ - Arena *arena; - U64 alloc_gen; - DF_EntityList list; -}; - -typedef struct DF_State DF_State; -struct DF_State -{ - // rjf: top-level state - Arena *arena; - B32 quit; - F64 time_in_seconds; - Log *log; - String8 log_path; - - // rjf: frame state - F32 frame_dt; - U64 frame_index; - Arena *frame_arenas[2]; - - // rjf: frame time history - U64 frame_time_us_history[64]; - - // rjf: registers stack - DF_RegsNode base_regs; - DF_RegsNode *top_regs; - - // rjf: commands - Arena *cmds_arena; - DF_CmdList cmds; - - // rjf: frame request state - U64 num_frames_requested; - - // rjf: autosave timer - F32 seconds_until_autosave; - - // rjf: name allocator - D_NameChunkNode *free_name_chunks[8]; - - // rjf: entity state - Arena *entities_arena; - DF_Entity *entities_base; - U64 entities_count; - U64 entities_id_gen; - DF_Entity *entities_root; - DF_Entity *entities_free[2]; // [0] -> normal lifetime, not user defined; [1] -> user defined lifetime (& thus undoable) - U64 entities_free_count; - U64 entities_active_count; - - // rjf: entity query caches - U64 kind_alloc_gens[DF_EntityKind_COUNT]; - D_EntityListCache kind_caches[DF_EntityKind_COUNT]; - - // rjf: key map table - Arena *key_map_arena; - U64 key_map_table_size; - DF_KeyMapSlot *key_map_table; - DF_KeyMapNode *free_key_map_node; - U64 key_map_total_count; - - // rjf: bind change - Arena *bind_change_arena; - B32 bind_change_active; - String8 bind_change_cmd_name; - DF_Binding bind_change_binding; - - // rjf: top-level context menu keys - UI_Key code_ctx_menu_key; - UI_Key entity_ctx_menu_key; - UI_Key tab_ctx_menu_key; - - // rjf: confirmation popup state - UI_Key confirm_key; - B32 confirm_active; - F32 confirm_t; - Arena *confirm_arena; - DF_CmdList confirm_cmds; - String8 confirm_title; - String8 confirm_desc; - - // rjf: string search state - Arena *string_search_arena; - String8 string_search_string; - - // rjf: view specs - U64 view_spec_table_size; - DF_ViewSpec **view_spec_table; - - // rjf: view rule specs - U64 view_rule_spec_table_size; - DF_ViewRuleSpec **view_rule_spec_table; - - // rjf: windows - DF_Window *first_window; - DF_Window *last_window; - DF_Window *free_window; - U64 window_count; - B32 last_window_queued_save; - D_Handle last_focused_window; - - // rjf: eval visualization view cache - U64 eval_viz_view_cache_slots_count; - DF_EvalVizViewCacheSlot *eval_viz_view_cache_slots; - DF_EvalVizViewCacheNode *eval_viz_view_cache_node_free; - - // rjf: view state - DF_View *first_view; - DF_View *last_view; - DF_View *free_view; - U64 free_view_count; - U64 allocated_view_count; - - // rjf: drag/drop state machine - DF_DragDropState drag_drop_state; - - // rjf: rich hover info - DF_Regs *hover_regs; - DF_Regs *next_hover_regs; - - // rjf: config reading state - Arena *cfg_path_arenas[DF_CfgSrc_COUNT]; - String8 cfg_paths[DF_CfgSrc_COUNT]; - U64 cfg_cached_timestamp[DF_CfgSrc_COUNT]; - Arena *cfg_arena; - D_CfgTable cfg_table; - U64 ctrl_exception_code_filters[(CTRL_ExceptionCodeKind_COUNT+63)/64]; - - // rjf: running theme state - DF_Theme cfg_theme_target; - DF_Theme cfg_theme; - Arena *cfg_main_font_path_arena; - Arena *cfg_code_font_path_arena; - String8 cfg_main_font_path; - String8 cfg_code_font_path; - FNT_Tag cfg_font_tags[DF_FontSlot_COUNT]; // derivative from font paths - - // rjf: global settings - DF_SettingVal cfg_setting_vals[DF_CfgSrc_COUNT][DF_SettingCode_COUNT]; - - // rjf: icon texture - R_Handle icon_texture; - - // rjf: current path - Arena *current_path_arena; - String8 current_path; -}; - -//////////////////////////////// -//~ rjf: Globals - -read_only global D_CfgTree d_nil_cfg_tree = {&d_nil_cfg_tree, DF_CfgSrc_User, &md_nil_node}; -read_only global D_CfgVal d_nil_cfg_val = {&d_nil_cfg_val, &d_nil_cfg_val, &d_nil_cfg_tree, &d_nil_cfg_tree}; - -read_only global DF_Entity d_nil_entity = -{ - &d_nil_entity, - &d_nil_entity, - &d_nil_entity, - &d_nil_entity, - &d_nil_entity, -}; - -read_only global DF_CmdKindInfo df_nil_cmd_kind_info = {0}; - -read_only global DF_ViewRuleInfo df_nil_view_rule_info = {0}; - -read_only global DF_ViewSpec df_nil_view_spec = -{ - &df_nil_view_spec, - { - 0, - {0}, - {0}, - DF_IconKind_Null, - DF_VIEW_SETUP_FUNCTION_NAME(null), - DF_VIEW_CMD_FUNCTION_NAME(null), - DF_VIEW_UI_FUNCTION_NAME(null), - }, -}; - -read_only global DF_ViewRuleSpec df_nil_view_rule_spec = -{ - &df_nil_view_rule_spec, -}; - -read_only global DF_View df_nil_view = -{ - &df_nil_view, - &df_nil_view, - &df_nil_view, - &df_nil_view, - &df_nil_view, - &df_nil_view, - &df_nil_view_spec, -}; - -read_only global DF_Panel df_nil_panel = -{ - &df_nil_panel, - &df_nil_panel, - &df_nil_panel, - &df_nil_panel, - &df_nil_panel, -}; - -global DF_State *df_state = 0; -global DF_DragDropPayload df_drag_drop_payload = {0}; -global D_Handle df_last_drag_drop_panel = {0}; -global D_Handle df_last_drag_drop_prev_tab = {0}; - -//////////////////////////////// -//~ rjf: Handle Type Pure Functions - -internal D_Handle d_handle_zero(void); -internal B32 d_handle_match(D_Handle a, D_Handle b); -internal void d_handle_list_push_node(D_HandleList *list, D_HandleNode *node); -internal void d_handle_list_push(Arena *arena, D_HandleList *list, D_Handle handle); -internal D_HandleList d_handle_list_copy(Arena *arena, D_HandleList list); - -//////////////////////////////// -//~ rjf: Config Type Pure Functions - -internal void d_cfg_table_push_unparsed_string(Arena *arena, D_CfgTable *table, String8 string, DF_CfgSrc source); -internal D_CfgVal *d_cfg_val_from_string(D_CfgTable *table, String8 string); - -//////////////////////////////// -//~ rjf: Registers Type Functions - -internal void df_regs_copy_contents(Arena *arena, DF_Regs *dst, DF_Regs *src); -internal DF_Regs *df_regs_copy(Arena *arena, DF_Regs *src); - -//////////////////////////////// -//~ rjf: Commands Type Functions - -internal void df_cmd_list_push_new(Arena *arena, DF_CmdList *cmds, String8 name, DF_Regs *regs); - -//////////////////////////////// -//~ rjf: Entity Type Pure Functions - -//- rjf: nil -internal B32 df_entity_is_nil(DF_Entity *entity); -#define df_require_entity_nonnil(entity, if_nil_stmts) do{if(df_entity_is_nil(entity)){if_nil_stmts;}}while(0) - -//- rjf: handle <-> entity conversions -internal U64 df_index_from_entity(DF_Entity *entity); -internal D_Handle df_handle_from_entity(DF_Entity *entity); -internal DF_Entity *df_entity_from_handle(D_Handle handle); -internal D_HandleList df_handle_list_from_entity_list(Arena *arena, DF_EntityList entities); - -//- rjf: entity recursion iterators -internal DF_EntityRec df_entity_rec_depth_first(DF_Entity *entity, DF_Entity *subtree_root, U64 sib_off, U64 child_off); -#define df_entity_rec_depth_first_pre(entity, subtree_root) df_entity_rec_depth_first((entity), (subtree_root), OffsetOf(DF_Entity, next), OffsetOf(DF_Entity, first)) -#define df_entity_rec_depth_first_post(entity, subtree_root) df_entity_rec_depth_first((entity), (subtree_root), OffsetOf(DF_Entity, prev), OffsetOf(DF_Entity, last)) - -//- rjf: ancestor/child introspection -internal DF_Entity *df_entity_child_from_kind(DF_Entity *entity, DF_EntityKind kind); -internal DF_Entity *df_entity_ancestor_from_kind(DF_Entity *entity, DF_EntityKind kind); -internal DF_EntityList df_push_entity_child_list_with_kind(Arena *arena, DF_Entity *entity, DF_EntityKind kind); -internal DF_Entity *df_entity_child_from_string_and_kind(DF_Entity *parent, String8 string, DF_EntityKind kind); - -//- rjf: entity list building -internal void df_entity_list_push(Arena *arena, DF_EntityList *list, DF_Entity *entity); -internal DF_EntityArray df_entity_array_from_list(Arena *arena, DF_EntityList *list); -#define df_first_entity_from_list(list) ((list)->first != 0 ? (list)->first->entity : &d_nil_entity) - -//- rjf: entity fuzzy list building -internal DF_EntityFuzzyItemArray df_entity_fuzzy_item_array_from_entity_list_needle(Arena *arena, DF_EntityList *list, String8 needle); -internal DF_EntityFuzzyItemArray df_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, DF_EntityArray *array, String8 needle); - -//- rjf: full path building, from file/folder entities -internal String8 df_full_path_from_entity(Arena *arena, DF_Entity *entity); - -//- rjf: display string entities, for referencing entities in ui -internal String8 df_display_string_from_entity(Arena *arena, DF_Entity *entity); - -//- rjf: extra search tag strings for fuzzy filtering entities -internal String8 df_search_tags_from_entity(Arena *arena, DF_Entity *entity); - -//- rjf: entity -> color operations -internal Vec4F32 df_hsva_from_entity(DF_Entity *entity); -internal Vec4F32 df_rgba_from_entity(DF_Entity *entity); - -//- rjf: entity -> expansion tree keys -internal EV_Key df_ev_key_from_entity(DF_Entity *entity); -internal EV_Key df_parent_ev_key_from_entity(DF_Entity *entity); - -//- rjf: entity -> evaluation -internal DF_EntityEval *df_eval_from_entity(Arena *arena, DF_Entity *entity); - -//////////////////////////////// -//~ rjf: View Type Functions - -internal B32 df_view_is_nil(DF_View *view); -internal B32 df_view_is_project_filtered(DF_View *view); -internal D_Handle df_handle_from_view(DF_View *view); -internal DF_View *df_view_from_handle(D_Handle handle); - -//////////////////////////////// -//~ rjf: View Spec Type Functions - -internal DF_ViewKind df_view_kind_from_string(String8 string); - -//////////////////////////////// -//~ rjf: Panel Type Functions - -//- rjf: basic type functions -internal B32 df_panel_is_nil(DF_Panel *panel); -internal D_Handle df_handle_from_panel(DF_Panel *panel); -internal DF_Panel *df_panel_from_handle(D_Handle handle); -internal UI_Key df_ui_key_from_panel(DF_Panel *panel); - -//- rjf: tree construction -internal void df_panel_insert(DF_Panel *parent, DF_Panel *prev_child, DF_Panel *new_child); -internal void df_panel_remove(DF_Panel *parent, DF_Panel *child); - -//- rjf: tree walk -internal DF_PanelRec df_panel_rec_df(DF_Panel *panel, U64 sib_off, U64 child_off); -#define df_panel_rec_df_pre(panel) df_panel_rec_df(panel, OffsetOf(DF_Panel, next), OffsetOf(DF_Panel, first)) -#define df_panel_rec_df_post(panel) df_panel_rec_df(panel, OffsetOf(DF_Panel, prev), OffsetOf(DF_Panel, last)) - -//- rjf: panel -> rect calculations -internal Rng2F32 df_target_rect_from_panel_child(Rng2F32 parent_rect, DF_Panel *parent, DF_Panel *panel); -internal Rng2F32 df_target_rect_from_panel(Rng2F32 root_rect, DF_Panel *root, DF_Panel *panel); - -//- rjf: view ownership insertion/removal -internal void df_panel_insert_tab_view(DF_Panel *panel, DF_View *prev_view, DF_View *view); -internal void df_panel_remove_tab_view(DF_Panel *panel, DF_View *view); -internal DF_View *df_selected_tab_from_panel(DF_Panel *panel); - -//- rjf: icons & display strings -internal DF_IconKind df_icon_kind_from_view(DF_View *view); -internal DR_FancyStringList df_title_fstrs_from_view(Arena *arena, DF_View *view, Vec4F32 primary_color, Vec4F32 secondary_color, F32 size); - -//////////////////////////////// -//~ rjf: Window Type Functions - -internal D_Handle df_handle_from_window(DF_Window *window); -internal DF_Window *df_window_from_handle(D_Handle handle); - -//////////////////////////////// -//~ rjf: Command Parameters From Context - -internal B32 df_prefer_dasm_from_window(DF_Window *window); -#if 0 // TODO(rjf): @msgs -internal D_CmdParams df_cmd_params_from_window(DF_Window *window); -internal D_CmdParams df_cmd_params_from_panel(DF_Window *window, DF_Panel *panel); -internal D_CmdParams df_cmd_params_from_view(DF_Window *window, DF_Panel *panel, DF_View *view); -#endif - -//////////////////////////////// -//~ rjf: Global Cross-Window UI Interaction State Functions - -internal B32 df_drag_is_active(void); -internal void df_drag_begin(DF_DragDropPayload *payload); -internal B32 df_drag_drop(DF_DragDropPayload *out_payload); -internal void df_drag_kill(void); -internal void df_queue_drag_drop(void); - -internal void df_set_hover_regs(void); -internal DF_Regs *df_get_hover_regs(void); - -//////////////////////////////// -//~ rjf: Name Allocation - -internal U64 df_name_bucket_idx_from_string_size(U64 size); -internal String8 df_name_alloc(String8 string); -internal void df_name_release(String8 string); - -//////////////////////////////// -//~ rjf: Entity Stateful Functions - -//- rjf: entity allocation + tree forming -internal DF_Entity *df_entity_alloc(DF_Entity *parent, DF_EntityKind kind); -internal void df_entity_mark_for_deletion(DF_Entity *entity); -internal void df_entity_release(DF_Entity *entity); -internal void df_entity_change_parent(DF_Entity *entity, DF_Entity *old_parent, DF_Entity *new_parent, DF_Entity *prev_child); - -//- rjf: entity simple equipment -internal void df_entity_equip_txt_pt(DF_Entity *entity, TxtPt point); -internal void df_entity_equip_entity_handle(DF_Entity *entity, D_Handle handle); -internal void df_entity_equip_disabled(DF_Entity *entity, B32 b32); -internal void df_entity_equip_u64(DF_Entity *entity, U64 u64); -internal void df_entity_equip_color_rgba(DF_Entity *entity, Vec4F32 rgba); -internal void df_entity_equip_color_hsva(DF_Entity *entity, Vec4F32 hsva); -internal void df_entity_equip_cfg_src(DF_Entity *entity, DF_CfgSrc cfg_src); -internal void df_entity_equip_timestamp(DF_Entity *entity, U64 timestamp); - -//- rjf: control layer correllation equipment -internal void df_entity_equip_ctrl_handle(DF_Entity *entity, CTRL_Handle handle); -internal void df_entity_equip_arch(DF_Entity *entity, Arch arch); -internal void df_entity_equip_ctrl_id(DF_Entity *entity, U32 id); -internal void df_entity_equip_stack_base(DF_Entity *entity, U64 stack_base); -internal void df_entity_equip_vaddr_rng(DF_Entity *entity, Rng1U64 range); -internal void df_entity_equip_vaddr(DF_Entity *entity, U64 vaddr); - -//- rjf: name equipment -internal void df_entity_equip_name(DF_Entity *entity, String8 name); - -//- rjf: file path map override lookups -internal String8List d_possible_overrides_from_file_path(Arena *arena, String8 file_path); - -//- rjf: top-level state queries -internal DF_Entity *df_entity_root(void); -internal DF_EntityList df_push_entity_list_with_kind(Arena *arena, DF_EntityKind kind); -internal DF_Entity *df_entity_from_id(DF_EntityID id); -internal DF_Entity *df_machine_entity_from_machine_id(CTRL_MachineID machine_id); -internal DF_Entity *df_entity_from_ctrl_handle(CTRL_Handle handle); -internal DF_Entity *df_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id); -internal DF_Entity *df_entity_from_name_and_kind(String8 string, DF_EntityKind kind); - -//////////////////////////////// -//~ rjf: Evaluation Spaces - -//- rjf: ctrl entity <-> eval space -internal CTRL_Entity *d_ctrl_entity_from_eval_space(E_Space space); -internal E_Space d_eval_space_from_ctrl_entity(CTRL_Entity *entity); - -//- rjf: entity <-> eval space -internal DF_Entity *d_entity_from_eval_space(E_Space space); -internal E_Space d_eval_space_from_entity(DF_Entity *entity); - -//- rjf: eval space reads/writes -internal B32 d_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range); -internal B32 d_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range); - -//- rjf: asynchronous streamed reads -> hashes from spaces -internal U128 d_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated); - -//- rjf: space -> entire range -internal Rng1U64 d_whole_range_from_eval_space(E_Space space); - -//////////////////////////////// -//~ rjf: Evaluation Visualization - -//- rjf: writing values back to child processes -internal B32 d_commit_eval_value_string(E_Eval dst_eval, String8 string); - -//- rjf: eval / view rule params tree info extraction -internal U64 d_base_offset_from_eval(E_Eval eval); -internal E_Value d_value_from_params_key(MD_Node *params, String8 key); -internal Rng1U64 d_range_from_eval_params(E_Eval eval, MD_Node *params); -internal TXT_LangKind d_lang_kind_from_eval_params(E_Eval eval, MD_Node *params); -internal Arch d_arch_from_eval_params(E_Eval eval, MD_Node *params); -internal Vec2S32 d_dim2s32_from_eval_params(E_Eval eval, MD_Node *params); -internal R_Tex2DFormat d_tex2dformat_from_eval_params(E_Eval eval, MD_Node *params); - -//- rjf: eval <-> entity -internal DF_Entity *d_entity_from_eval_string(String8 string); -internal String8 d_eval_string_from_entity(Arena *arena, DF_Entity *entity); - -//- rjf: eval <-> file path -internal String8 d_file_path_from_eval_string(Arena *arena, String8 string); -internal String8 d_eval_string_from_file_path(Arena *arena, String8 string); - -//////////////////////////////// -//~ rjf: View Rule Kind Functions - -internal DF_ViewRuleInfo *df_view_rule_info_from_string(String8 string); - -//////////////////////////////// -//~ rjf: View Spec State Functions - -internal void df_register_view_specs(DF_ViewSpecInfoArray specs); -internal DF_ViewSpec *df_view_spec_from_string(String8 string); -internal DF_ViewSpec *df_view_spec_from_kind(DF_ViewKind kind); - -//////////////////////////////// -//~ rjf: View Rule Spec State Functions - -internal void df_register_view_rule_specs(DF_ViewRuleSpecInfoArray specs); -internal DF_ViewRuleSpec *df_view_rule_spec_from_string(String8 string); - -//////////////////////////////// -//~ rjf: View State Functions - -//- rjf: allocation/releasing -internal DF_View *df_view_alloc(void); -internal void df_view_release(DF_View *view); - -//- rjf: equipment -internal void df_view_equip_spec(DF_View *view, DF_ViewSpec *spec, String8 query, MD_Node *params); -internal void df_view_equip_query(DF_View *view, String8 query); -internal void df_view_equip_loading_info(DF_View *view, B32 is_loading, U64 progress_v, U64 progress_target); - -//- rjf: user state extensions -internal void *df_view_get_or_push_user_state(DF_View *view, U64 size); -internal Arena *df_view_push_arena_ext(DF_View *view); -#define df_view_user_state(view, type) (type *)df_view_get_or_push_user_state((view), sizeof(type)) - -//- rjf: param saving -internal void df_view_store_param(DF_View *view, String8 key, String8 value); -internal void df_view_store_paramf(DF_View *view, String8 key, char *fmt, ...); -#define df_view_store_param_f32(view, key, f32) df_view_store_paramf((view), (key), "%ff", (f32)) -#define df_view_store_param_s64(view, key, s64) df_view_store_paramf((view), (key), "%I64d", (s64)) -#define df_view_store_param_u64(view, key, u64) df_view_store_paramf((view), (key), "0x%I64x", (u64)) - -//////////////////////////////// -//~ rjf: Expand-Keyed Transient View Functions - -internal DF_TransientViewNode *df_transient_view_node_from_ev_key(DF_View *owner_view, EV_Key key); - -//////////////////////////////// -//~ rjf: Panel State Functions - -internal DF_Panel *df_panel_alloc(DF_Window *ws); -internal void df_panel_release(DF_Window *ws, DF_Panel *panel); -internal void df_panel_release_all_views(DF_Panel *panel); - -//////////////////////////////// -//~ rjf: Window State Functions - -internal DF_Window *df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src); - -internal DF_Window *df_window_from_os_handle(OS_Handle os); - -internal void df_window_frame(DF_Window *ws); - -//////////////////////////////// -//~ rjf: Eval Visualization - -internal EV_View *df_ev_view_from_key(U64 key); -internal F32 df_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, S32 depth, E_Eval eval, E_Member *member, EV_ViewRuleList *view_rules, String8List *out); -internal String8 df_value_string_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval, E_Member *member, EV_ViewRuleList *view_rules); - -//////////////////////////////// -//~ rjf: Hover Eval - -internal void df_set_hover_eval(Vec2F32 pos, String8 file_path, TxtPt pt, U64 vaddr, String8 string); - -//////////////////////////////// -//~ rjf: Auto-Complete Lister - -internal void df_autocomp_lister_item_chunk_list_push(Arena *arena, DF_AutoCompListerItemChunkList *list, U64 cap, DF_AutoCompListerItem *item); -internal DF_AutoCompListerItemArray df_autocomp_lister_item_array_from_chunk_list(Arena *arena, DF_AutoCompListerItemChunkList *list); -internal int df_autocomp_lister_item_qsort_compare(DF_AutoCompListerItem *a, DF_AutoCompListerItem *b); -internal void df_autocomp_lister_item_array_sort__in_place(DF_AutoCompListerItemArray *array); - -internal String8 df_autocomp_query_word_from_input_string_off(String8 input, U64 cursor_off); -internal DF_AutoCompListerParams df_view_rule_autocomp_lister_params_from_input_cursor(Arena *arena, String8 string, U64 cursor_off); -internal void df_set_autocomp_lister_query(UI_Key root_key, DF_AutoCompListerParams *params, String8 input, U64 cursor_off); - -//////////////////////////////// -//~ rjf: Search Strings - -internal void df_set_search_string(String8 string); -internal String8 df_push_search_string(Arena *arena); - -//////////////////////////////// -//~ rjf: Colors, Fonts, Config - -//- rjf: keybindings -internal OS_Key df_os_key_from_cfg_string(String8 string); -internal void df_clear_bindings(void); -internal DF_BindingList df_bindings_from_name(Arena *arena, String8 name); -internal void df_bind_name(String8 name, DF_Binding binding); -internal void df_unbind_name(String8 name, DF_Binding binding); -internal String8List df_cmd_name_list_from_binding(Arena *arena, DF_Binding binding); - -//- rjf: colors -internal Vec4F32 df_rgba_from_theme_color(DF_ThemeColor color); -internal DF_ThemeColor df_theme_color_from_txt_token_kind(TXT_TokenKind kind); - -//- rjf: code -> palette -internal UI_Palette *df_palette_from_code(DF_PaletteCode code); - -//- rjf: fonts/sizes -internal FNT_Tag df_font_from_slot(DF_FontSlot slot); -internal F32 df_font_size_from_slot(DF_FontSlot slot); -internal FNT_RasterFlags df_raster_flags_from_slot(DF_FontSlot slot); - -//- rjf: settings -internal DF_SettingVal df_setting_val_from_code(DF_SettingCode code); - -//- rjf: config serialization -internal int df_qsort_compare__cfg_string_bindings(DF_StringBindingPair *a, DF_StringBindingPair *b); -internal String8List df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source); - -//////////////////////////////// -//~ rjf: Process Control Info Stringification - -internal String8 df_string_from_exception_code(U32 code); -internal String8 df_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, DF_IconKind *icon_out); - -//////////////////////////////// -//~ rjf: Continuous Frame Requests - -internal void df_request_frame(void); - -//////////////////////////////// -//~ rjf: Main State Accessors - -//- rjf: per-frame arena -internal Arena *df_frame_arena(void); - -//- rjf: config paths -internal String8 df_cfg_path_from_src(DF_CfgSrc src); - -//- rjf: entity cache queries -internal DF_EntityList d_query_cached_entity_list_with_kind(DF_EntityKind kind); -internal DF_EntityList d_push_active_target_list(Arena *arena); -internal DF_Entity *d_entity_from_ev_key_and_kind(EV_Key key, DF_EntityKind kind); - -//- rjf: config state -internal D_CfgTable *df_cfg_table(void); - -//////////////////////////////// -//~ rjf: Registers - -internal DF_Regs *df_regs(void); -internal DF_Regs *df_base_regs(void); -internal DF_Regs *df_push_regs_(DF_Regs *regs); -#define df_push_regs(...) df_push_regs_(&(DF_Regs){df_regs_lit_init_top __VA_ARGS__}) -internal DF_Regs *df_pop_regs(void); -#define DF_RegsScope(...) DeferLoop(df_push_regs(__VA_ARGS__), df_pop_regs()) -internal void df_regs_fill_slot_from_string(DF_RegSlot slot, String8 string); - -//////////////////////////////// -//~ rjf: Commands - -// TODO(rjf): @msgs temporary glue -#if 0 -internal D_CmdSpec *df_cmd_spec_from_kind(DF_CmdKind kind); -#endif -internal DF_CmdKind df_cmd_kind_from_string(String8 string); - -//- rjf: name -> info -internal DF_CmdKindInfo *df_cmd_kind_info_from_string(String8 string); - -//- rjf: pushing -internal void df_push_cmd(String8 name, DF_Regs *regs); -#define df_cmd(kind, ...) df_push_cmd(df_cmd_kind_info_table[kind].string, &(DF_Regs){df_regs_lit_init_top __VA_ARGS__}) - -//- rjf: iterating -internal B32 df_next_cmd(DF_Cmd **cmd); - -//////////////////////////////// -//~ rjf: Main Layer Top-Level Calls - -internal void df_init(CmdLine *cmdln); -internal void df_frame(void); - -#endif // DBG_FRONTEND_CORE_H diff --git a/src/dbg_frontend/dbg_frontend_inc.c b/src/dbg_frontend/dbg_frontend_inc.c deleted file mode 100644 index 1efd6af3..00000000 --- a/src/dbg_frontend/dbg_frontend_inc.c +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -#include "dbg_frontend_core.c" -#include "dbg_frontend_widgets.c" -#include "dbg_frontend_views.c" -#include "dbg_frontend_view_rules.c" diff --git a/src/dbg_frontend/dbg_frontend_inc.h b/src/dbg_frontend/dbg_frontend_inc.h deleted file mode 100644 index 99b81adc..00000000 --- a/src/dbg_frontend/dbg_frontend_inc.h +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -#ifndef DBG_FRONTEND_INC_H -#define DBG_FRONTEND_INC_H - -#include "dbg_frontend_core.h" -#include "dbg_frontend_widgets.h" -#include "dbg_frontend_views.h" -#include "dbg_frontend_view_rules.h" - -#endif // DBG_GFX_INC_H diff --git a/src/dbg_frontend/dbg_frontend_view_rules.c b/src/dbg_frontend/dbg_frontend_view_rules.c deleted file mode 100644 index 2658eefc..00000000 --- a/src/dbg_frontend/dbg_frontend_view_rules.c +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -//////////////////////////////// -//~ rjf: "list" - -EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(list){} -DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(list){} - -//////////////////////////////// -//~ rjf: "dec" - -DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(dec){} - -//////////////////////////////// -//~ rjf: "bin" - -DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(bin){} - -//////////////////////////////// -//~ rjf: "oct" - -DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(oct){} - -//////////////////////////////// -//~ rjf: "hex" - -DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(hex){} - -//////////////////////////////// -//~ rjf: "only" - -EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(only){} -DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(only){} -DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(only){} - -//////////////////////////////// -//~ rjf: "omit" - -EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(omit){} -DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(omit){} -DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(omit){} - -//////////////////////////////// -//~ rjf: "no_addr" - -DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(no_addr){} - -//////////////////////////////// -//~ rjf: "checkbox" - -DF_VIEW_RULE_ROW_UI_FUNCTION_DEF(checkbox) -{ - Temp scratch = scratch_begin(0, 0); - E_Eval eval = e_eval_from_string(scratch.arena, string); - E_Eval value_eval = e_value_eval_from_eval(eval); - if(ui_clicked(df_icon_buttonf(value_eval.value.u64 == 0 ? DF_IconKind_CheckHollow : DF_IconKind_CheckFilled, 0, "###check"))) - { - d_commit_eval_value_string(eval, value_eval.value.u64 == 0 ? str8_lit("1") : str8_lit("0")); - } - scratch_end(scratch); -} - -//////////////////////////////// -//~ rjf: "rgba" - -EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(color_rgba) -{ - EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); - vb->string = string; - vb->expr = expr; - vb->visual_idx_range = r1u64(0, 8); - vb->semantic_idx_range = r1u64(0, 1); - vb->view_rules = view_rules; - ev_block_end(out, vb); -} - -DF_VIEW_RULE_ROW_UI_FUNCTION_DEF(color_rgba) -{ - Temp scratch = scratch_begin(0, 0); - E_Eval eval = e_eval_from_string(scratch.arena, string); - Vec4F32 rgba = df_rgba_from_eval_params(eval, params); - Vec4F32 hsva = hsva_from_rgba(rgba); - - //- rjf: build text box - UI_Box *text_box = &ui_g_nil_box; - UI_WidthFill DF_Font(DF_FontSlot_Code) - { - text_box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); - DR_FancyStringList fancy_strings = {0}; - { - DR_FancyString open_paren = {ui_top_font(), str8_lit("("), ui_top_palette()->text, ui_top_font_size(), 0, 0}; - DR_FancyString comma = {ui_top_font(), str8_lit(", "), ui_top_palette()->text, ui_top_font_size(), 0, 0}; - DR_FancyString r_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.x), v4f32(1.f, 0.25f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; - DR_FancyString g_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.y), v4f32(0.25f, 1.f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; - DR_FancyString b_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.z), v4f32(0.25f, 0.25f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; - DR_FancyString a_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.w), v4f32(1.f, 1.f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; - DR_FancyString clse_paren = {ui_top_font(), str8_lit(")"), ui_top_palette()->text, ui_top_font_size(), 0, 0}; - dr_fancy_string_list_push(scratch.arena, &fancy_strings, &open_paren); - dr_fancy_string_list_push(scratch.arena, &fancy_strings, &r_fstr); - dr_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); - dr_fancy_string_list_push(scratch.arena, &fancy_strings, &g_fstr); - dr_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); - dr_fancy_string_list_push(scratch.arena, &fancy_strings, &b_fstr); - dr_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); - dr_fancy_string_list_push(scratch.arena, &fancy_strings, &a_fstr); - dr_fancy_string_list_push(scratch.arena, &fancy_strings, &clse_paren); - } - ui_box_equip_display_fancy_strings(text_box, &fancy_strings); - } - - //- rjf: build color box - UI_Box *color_box = &ui_g_nil_box; - UI_PrefWidth(ui_em(1.875f, 1.f)) UI_ChildLayoutAxis(Axis2_Y) - { - color_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable, "color_box"); - UI_Parent(color_box) UI_PrefHeight(ui_em(1.875f, 1.f)) UI_Padding(ui_pct(1, 0)) - { - UI_Palette(ui_build_palette(ui_top_palette(), .background = rgba)) UI_CornerRadius(ui_top_font_size()*0.5f) - ui_build_box_from_key(UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawBorder, ui_key_zero()); - } - } - - //- rjf: space - ui_spacer(ui_em(0.375f, 1.f)); - - //- rjf: hover color box -> show components - UI_Signal sig = ui_signal_from_box(color_box); - if(ui_hovering(sig)) - { - ui_do_color_tooltip_hsva(hsva); - } - - scratch_end(scratch); -} - -//////////////////////////////// -//~ rjf: "text" - -EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(text) -{ - EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); - vb->string = string; - vb->expr = expr; - vb->visual_idx_range = r1u64(0, 8); - vb->semantic_idx_range = r1u64(0, 1); - vb->view_rules = view_rules; - ev_block_end(out, vb); -} - -//////////////////////////////// -//~ rjf: "disasm" - -EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(disasm) -{ - EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); - vb->string = string; - vb->expr = expr; - vb->visual_idx_range = r1u64(0, 8); - vb->semantic_idx_range = r1u64(0, 1); - vb->view_rules = view_rules; - ev_block_end(out, vb); -} - -//////////////////////////////// -//~ rjf: "memory" - -EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(memory) -{ - EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); - vb->string = string; - vb->expr = expr; - vb->visual_idx_range = r1u64(0, 16); - vb->semantic_idx_range = r1u64(0, 1); - vb->view_rules = view_rules; - ev_block_end(out, vb); -} - -//////////////////////////////// -//~ rjf: "graph" - -EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(graph) -{ - EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); - vb->string = string; - vb->expr = expr; - vb->visual_idx_range = r1u64(0, 8); - vb->semantic_idx_range = r1u64(0, 1); - vb->view_rules = view_rules; - ev_block_end(out, vb); -} - -//////////////////////////////// -//~ rjf: "bitmap" - -EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(bitmap) -{ - EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); - vb->string = string; - vb->expr = expr; - vb->visual_idx_range = r1u64(0, 8); - vb->semantic_idx_range = r1u64(0, 1); - vb->view_rules = view_rules; - ev_block_end(out, vb); -} - -//////////////////////////////// -//~ rjf: "geo3d" - -EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(geo3d) -{ - EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); - vb->string = string; - vb->expr = expr; - vb->visual_idx_range = r1u64(0, 16); - vb->semantic_idx_range = r1u64(0, 1); - vb->view_rules = view_rules; - ev_block_end(out, vb); -} diff --git a/src/dbg_frontend/dbg_frontend_views.h b/src/dbg_frontend/dbg_frontend_views.h deleted file mode 100644 index baaaa71c..00000000 --- a/src/dbg_frontend/dbg_frontend_views.h +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -#ifndef DBG_FRONTEND_VIEWS_H -#define DBG_FRONTEND_VIEWS_H - -//////////////////////////////// -//~ rjf: Code View Types - -typedef U32 DF_CodeViewFlags; -enum -{ - DF_CodeViewFlag_StickToBottom = (1<<0), -}; - -typedef U32 DF_CodeViewBuildFlags; -enum -{ - DF_CodeViewBuildFlag_Margins = (1<<0), - DF_CodeViewBuildFlag_All = 0xffffffff, -}; - -typedef struct DF_CodeViewState DF_CodeViewState; -struct DF_CodeViewState -{ - // rjf: stable state - B32 initialized; - S64 preferred_column; - B32 drifted_for_search; - DF_CodeViewFlags flags; - - // rjf: per-frame command info - S64 goto_line_num; - B32 center_cursor; - B32 contain_cursor; - B32 watch_expr_at_mouse; - Arena *find_text_arena; - String8 find_text_fwd; - String8 find_text_bwd; -}; - -typedef struct DF_CodeViewBuildResult DF_CodeViewBuildResult; -struct DF_CodeViewBuildResult -{ - DI_KeyList dbgi_keys; -}; - -//////////////////////////////// -//~ rjf: Watch View Types - -typedef enum DF_WatchViewColumnKind -{ - DF_WatchViewColumnKind_Expr, - DF_WatchViewColumnKind_Value, - DF_WatchViewColumnKind_Type, - DF_WatchViewColumnKind_ViewRule, - DF_WatchViewColumnKind_Module, - DF_WatchViewColumnKind_FrameSelection, - DF_WatchViewColumnKind_Member, - DF_WatchViewColumnKind_COUNT -} -DF_WatchViewColumnKind; - -typedef struct DF_WatchViewColumnParams DF_WatchViewColumnParams; -struct DF_WatchViewColumnParams -{ - String8 string; - String8 display_string; - String8 view_rule; - B32 is_non_code; - B32 dequote_string; -}; - -typedef struct DF_WatchViewColumn DF_WatchViewColumn; -struct DF_WatchViewColumn -{ - DF_WatchViewColumn *next; - DF_WatchViewColumn *prev; - DF_WatchViewColumnKind kind; - F32 pct; - U8 string_buffer[1024]; - U64 string_size; - U8 display_string_buffer[1024]; - U64 display_string_size; - U8 view_rule_buffer[1024]; - U64 view_rule_size; - B32 is_non_code; - B32 dequote_string; -}; - -typedef enum DF_WatchViewFillKind -{ - DF_WatchViewFillKind_Watch, - DF_WatchViewFillKind_Breakpoints, - DF_WatchViewFillKind_WatchPins, - DF_WatchViewFillKind_CallStack, - DF_WatchViewFillKind_Registers, - DF_WatchViewFillKind_Locals, - DF_WatchViewFillKind_Globals, - DF_WatchViewFillKind_ThreadLocals, - DF_WatchViewFillKind_Types, - DF_WatchViewFillKind_Procedures, - DF_WatchViewFillKind_COUNT -} -DF_WatchViewFillKind; - -typedef struct DF_WatchViewPoint DF_WatchViewPoint; -struct DF_WatchViewPoint -{ - S64 x; - EV_Key parent_key; - EV_Key key; -}; - -typedef struct DF_WatchViewTextEditState DF_WatchViewTextEditState; -struct DF_WatchViewTextEditState -{ - DF_WatchViewTextEditState *pt_hash_next; - DF_WatchViewPoint pt; - TxtPt cursor; - TxtPt mark; - U8 input_buffer[1024]; - U64 input_size; - U8 initial_buffer[1024]; - U64 initial_size; -}; - -typedef struct DF_WatchViewState DF_WatchViewState; -struct DF_WatchViewState -{ - B32 initialized; - - // rjf: fill kinds (way that the contents of the watch view are computed) - DF_WatchViewFillKind fill_kind; - - // rjf: column state - Arena *column_arena; - DF_WatchViewColumn *first_column; - DF_WatchViewColumn *last_column; - DF_WatchViewColumn *free_column; - U64 column_count; - - // rjf; table cursor state - DF_WatchViewPoint cursor; - DF_WatchViewPoint mark; - DF_WatchViewPoint next_cursor; - DF_WatchViewPoint next_mark; - - // rjf: text input state - Arena *text_edit_arena; - U64 text_edit_state_slots_count; - DF_WatchViewTextEditState dummy_text_edit_state; - DF_WatchViewTextEditState **text_edit_state_slots; - B32 text_editing; -}; - -//////////////////////////////// -//~ rjf: Code View Functions - -internal void df_code_view_init(DF_CodeViewState *cv, DF_View *view); -internal void df_code_view_cmds(DF_View *view, DF_CodeViewState *cv, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); -internal DF_CodeViewBuildResult df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); - -//////////////////////////////// -//~ rjf: Watch View Functions - -//- rjf: index -> column -internal DF_WatchViewColumn *df_watch_view_column_from_x(DF_WatchViewState *wv, S64 index); - -//- rjf: watch view points <-> table coordinates -internal B32 df_watch_view_point_match(DF_WatchViewPoint a, DF_WatchViewPoint b); -internal DF_WatchViewPoint df_watch_view_point_from_tbl(EV_BlockList *blocks, Vec2S64 tbl); -internal Vec2S64 df_tbl_from_watch_view_point(EV_BlockList *blocks, DF_WatchViewPoint pt); - -//- rjf: table coordinates -> strings -internal String8 df_string_from_eval_viz_row_column(Arena *arena, EV_View *ev, EV_Row *row, DF_WatchViewColumn *col, B32 editable, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px); - -//- rjf: table coordinates -> text edit state -internal DF_WatchViewTextEditState *df_watch_view_text_edit_state_from_pt(DF_WatchViewState *wv, DF_WatchViewPoint pt); - -//- rjf: watch view column state mutation -internal DF_WatchViewColumn *df_watch_view_column_alloc_(DF_WatchViewState *wv, DF_WatchViewColumnKind kind, F32 pct, DF_WatchViewColumnParams *params); -#define df_watch_view_column_alloc(wv, kind, pct, ...) df_watch_view_column_alloc_((wv), (kind), (pct), &(DF_WatchViewColumnParams){.string = str8_zero(), __VA_ARGS__}) -internal void df_watch_view_column_release(DF_WatchViewState *wv, DF_WatchViewColumn *col); - -//- rjf: watch view main hooks -internal void df_watch_view_init(DF_WatchViewState *ewv, DF_View *view, DF_WatchViewFillKind fill_kind); -internal void df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect); - -#endif // DBG_FRONTEND_VIEWS_H diff --git a/src/dbg_frontend/dbg_frontend_widgets.h b/src/dbg_frontend/dbg_frontend_widgets.h deleted file mode 100644 index d8029d07..00000000 --- a/src/dbg_frontend/dbg_frontend_widgets.h +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -#ifndef DBG_FRONTEND_WIDGETS_H -#define DBG_FRONTEND_WIDGETS_H - -//////////////////////////////// -//~ rjf: Line Edit Types - -typedef U32 DF_LineEditFlags; -enum -{ - DF_LineEditFlag_Expander = (1<<0), - DF_LineEditFlag_ExpanderSpace = (1<<1), - DF_LineEditFlag_ExpanderPlaceholder = (1<<2), - DF_LineEditFlag_DisableEdit = (1<<3), - DF_LineEditFlag_CodeContents = (1<<4), - DF_LineEditFlag_Border = (1<<5), - DF_LineEditFlag_NoBackground = (1<<6), - DF_LineEditFlag_PreferDisplayString = (1<<7), - DF_LineEditFlag_DisplayStringIsCode = (1<<8), -}; - -//////////////////////////////// -//~ rjf: Code Slice Types - -typedef U32 DF_CodeSliceFlags; -enum -{ - DF_CodeSliceFlag_Clickable = (1<<0), - DF_CodeSliceFlag_PriorityMargin = (1<<1), - DF_CodeSliceFlag_CatchallMargin = (1<<2), - DF_CodeSliceFlag_LineNums = (1<<3), -}; - -typedef struct DF_CodeSliceParams DF_CodeSliceParams; -struct DF_CodeSliceParams -{ - // rjf: content - DF_CodeSliceFlags flags; - Rng1S64 line_num_range; - String8 *line_text; - Rng1U64 *line_ranges; - TXT_TokenArray *line_tokens; - DF_EntityList *line_bps; - CTRL_EntityList *line_ips; - DF_EntityList *line_pins; - U64 *line_vaddrs; - D_LineList *line_infos; - DI_KeyList relevant_dbgi_keys; - - // rjf: visual parameters - FNT_Tag font; - F32 font_size; - F32 tab_size; - String8 search_query; - F32 line_height_px; - F32 priority_margin_width_px; - F32 catchall_margin_width_px; - F32 line_num_width_px; - F32 line_text_max_width_px; - F32 margin_float_off_px; -}; - -typedef struct DF_CodeSliceSignal DF_CodeSliceSignal; -struct DF_CodeSliceSignal -{ - UI_Signal base; - TxtPt mouse_pt; - TxtRng mouse_expr_rng; -}; - -//////////////////////////////// -//~ rjf: UI Building Helpers - -#define DF_Palette(code) UI_Palette(df_palette_from_code(code)) -#define DF_Font(slot) UI_Font(df_font_from_slot(slot)) UI_TextRasterFlags(df_raster_flags_from_slot((slot))) - -//////////////////////////////// -//~ rjf: UI Widgets: Loading Overlay - -internal void df_loading_overlay(Rng2F32 rect, F32 loading_t, U64 progress_v, U64 progress_v_target); - -//////////////////////////////// -//~ rjf: UI Widgets: Fancy Buttons - -internal void df_cmd_binding_buttons(String8 name); -internal UI_Signal df_menu_bar_button(String8 string); -internal UI_Signal df_cmd_spec_button(String8 name); -internal void df_cmd_list_menu_buttons(U64 count, String8 *cmd_names, U32 *fastpath_codepoints); -internal UI_Signal df_icon_button(DF_IconKind kind, FuzzyMatchRangeList *matches, String8 string); -internal UI_Signal df_icon_buttonf(DF_IconKind kind, FuzzyMatchRangeList *matches, char *fmt, ...); -internal void df_entity_tooltips(DF_Entity *entity); -internal UI_Signal df_entity_desc_button(DF_Entity *entity, FuzzyMatchRangeList *name_matches, String8 fuzzy_query, B32 is_implicit); -internal void df_src_loc_button(String8 file_path, TxtPt point); - -//////////////////////////////// -//~ rjf: UI Widgets: Text View - -internal UI_BOX_CUSTOM_DRAW(df_thread_box_draw_extensions); -internal UI_BOX_CUSTOM_DRAW(df_bp_box_draw_extensions); -internal DF_CodeSliceSignal df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *preferred_column, String8 string); -internal DF_CodeSliceSignal df_code_slicef(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *preferred_column, char *fmt, ...); - -internal B32 df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, TxtPt *cursor, TxtPt *mark, S64 *preferred_column); - -//////////////////////////////// -//~ rjf: UI Widgets: Fancy Labels - -internal UI_Signal df_label(String8 string); -internal UI_Signal df_error_label(String8 string); -internal B32 df_help_label(String8 string); -internal DR_FancyStringList df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string); -internal UI_Box *df_code_label(F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string); - -//////////////////////////////// -//~ rjf: UI Widgets: Line Edit - -internal UI_Signal df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, TxtPt *cursor, TxtPt *mark, U8 *edit_buffer, U64 edit_buffer_size, U64 *edit_string_size_out, B32 *expanded_out, String8 pre_edit_value, String8 string); -internal UI_Signal df_line_editf(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, TxtPt *cursor, TxtPt *mark, U8 *edit_buffer, U64 edit_buffer_size, U64 *edit_string_size_out, B32 *expanded_out, String8 pre_edit_value, char *fmt, ...); - -#endif // DBG_FRONTEND_WIDGETS_H diff --git a/src/dbg_frontend/generated/dbg_frontend.meta.c b/src/dbg_frontend/generated/dbg_frontend.meta.c deleted file mode 100644 index 64cbcb0e..00000000 --- a/src/dbg_frontend/generated/dbg_frontend.meta.c +++ /dev/null @@ -1,1899 +0,0 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -//- GENERATED CODE - -C_LINKAGE_BEGIN -String8 d_cfg_src_string_table[4] = -{ -str8_lit_comp("user"), -str8_lit_comp("project"), -str8_lit_comp("command_line"), -str8_lit_comp("transient"), -}; - -DF_CmdKind d_cfg_src_load_cmd_kind_table[4] = -{ -DF_CmdKind_OpenUser, -DF_CmdKind_OpenProject, -DF_CmdKind_Null, -DF_CmdKind_Null, -}; - -DF_CmdKind d_cfg_src_write_cmd_kind_table[4] = -{ -DF_CmdKind_WriteUserData, -DF_CmdKind_WriteProjectData, -DF_CmdKind_Null, -DF_CmdKind_Null, -}; - -DF_CmdKind d_cfg_src_apply_cmd_kind_table[4] = -{ -DF_CmdKind_ApplyUserData, -DF_CmdKind_ApplyProjectData, -DF_CmdKind_Null, -DF_CmdKind_Null, -}; - -String8 d_entity_kind_display_string_table[30] = -{ -str8_lit_comp("Nil"), -str8_lit_comp("Root"), -str8_lit_comp("Machine"), -str8_lit_comp("File"), -str8_lit_comp("Auto View Rule"), -str8_lit_comp("File Path Map"), -str8_lit_comp("Watch Pin"), -str8_lit_comp("Watch"), -str8_lit_comp("View Rule"), -str8_lit_comp("Breakpoint"), -str8_lit_comp("Condition"), -str8_lit_comp("Location"), -str8_lit_comp("Target"), -str8_lit_comp("Executable"), -str8_lit_comp("Arguments"), -str8_lit_comp("Working Directory"), -str8_lit_comp("Entry Point"), -str8_lit_comp("Window"), -str8_lit_comp("Panel"), -str8_lit_comp("View"), -str8_lit_comp("Recent Project"), -str8_lit_comp("Source"), -str8_lit_comp("Destination"), -str8_lit_comp("Process"), -str8_lit_comp("Thread"), -str8_lit_comp("Module"), -str8_lit_comp("Pending Thread Name"), -str8_lit_comp("Debug Info Path"), -str8_lit_comp("Conversion Task"), -str8_lit_comp("Conversion Failure"), -}; - -String8 d_entity_kind_name_lower_table[30] = -{ -str8_lit_comp("nil"), -str8_lit_comp("root"), -str8_lit_comp("machine"), -str8_lit_comp("file"), -str8_lit_comp("auto_view_rule"), -str8_lit_comp("file_path_map"), -str8_lit_comp("watch_pin"), -str8_lit_comp("watch"), -str8_lit_comp("view_rule"), -str8_lit_comp("breakpoint"), -str8_lit_comp("condition"), -str8_lit_comp("location"), -str8_lit_comp("target"), -str8_lit_comp("executable"), -str8_lit_comp("arguments"), -str8_lit_comp("working_directory"), -str8_lit_comp("entry_point"), -str8_lit_comp("window"), -str8_lit_comp("panel"), -str8_lit_comp("view"), -str8_lit_comp("recent_project"), -str8_lit_comp("source"), -str8_lit_comp("dest"), -str8_lit_comp("process"), -str8_lit_comp("thread"), -str8_lit_comp("module"), -str8_lit_comp("pending_thread_name"), -str8_lit_comp("debug_info_path"), -str8_lit_comp("conversion_task"), -str8_lit_comp("conversion_fail"), -}; - -String8 d_entity_kind_name_lower_plural_table[30] = -{ -str8_lit_comp("nils"), -str8_lit_comp("roots"), -str8_lit_comp("machines"), -str8_lit_comp("files"), -str8_lit_comp("auto_view_rules"), -str8_lit_comp("file_path_maps"), -str8_lit_comp("watch_pins"), -str8_lit_comp("watches"), -str8_lit_comp("view_rules"), -str8_lit_comp("breakpoints"), -str8_lit_comp("conditions"), -str8_lit_comp("locations"), -str8_lit_comp("targets"), -str8_lit_comp("executables"), -str8_lit_comp("argumentses"), -str8_lit_comp("working_directories"), -str8_lit_comp("entry_points"), -str8_lit_comp("windows"), -str8_lit_comp("panels"), -str8_lit_comp("views"), -str8_lit_comp("recent_projects"), -str8_lit_comp("sources"), -str8_lit_comp("dests"), -str8_lit_comp("processes"), -str8_lit_comp("threads"), -str8_lit_comp("modules"), -str8_lit_comp("pending_thread_names"), -str8_lit_comp("debug_info_paths"), -str8_lit_comp("conversion_tasks"), -str8_lit_comp("conversion_fails"), -}; - -String8 d_entity_kind_name_label_table[30] = -{ -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Expression"), -str8_lit_comp("Expression"), -str8_lit_comp("Expression"), -str8_lit_comp("Label"), -str8_lit_comp("Expression"), -str8_lit_comp("Location"), -str8_lit_comp("Label"), -str8_lit_comp("Executable"), -str8_lit_comp("Arguments"), -str8_lit_comp("Execution Path"), -str8_lit_comp("Symbol Name"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Path"), -str8_lit_comp("Path"), -str8_lit_comp("Path"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -str8_lit_comp("Label"), -}; - -DF_EntityKindFlags d_entity_kind_flags_table[30] = -{ -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (1*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (1*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (1*DF_EntityKindFlag_IsSerializedToConfig), -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (1*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (1*DF_EntityKindFlag_IsSerializedToConfig), -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (1*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (1*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (1*DF_EntityKindFlag_IsSerializedToConfig), -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (1*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (1*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (1*DF_EntityKindFlag_CanEnable) | (1*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (1*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (1*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (1*DF_EntityKindFlag_NameIsCode) | (1*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (1*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (1*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (1*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (1*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (1*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (1*DF_EntityKindFlag_IsSerializedToConfig), -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (1*DF_EntityKindFlag_IsSerializedToConfig), -(1*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (1*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (1*DF_EntityKindFlag_UserDefinedLifetime) | (1*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (1*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (1*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (1*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (1*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (0*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -(0*DF_EntityKindFlag_CanDelete) | (0*DF_EntityKindFlag_CanFreeze) | (0*DF_EntityKindFlag_CanEdit) | (1*DF_EntityKindFlag_CanRename) | (0*DF_EntityKindFlag_CanEnable) | (0*DF_EntityKindFlag_CanCondition) | (0*DF_EntityKindFlag_CanDuplicate) | (0*DF_EntityKindFlag_NameIsCode) | (0*DF_EntityKindFlag_NameIsPath) | (0*DF_EntityKindFlag_UserDefinedLifetime) | (0*DF_EntityKindFlag_IsSerializedToConfig), -}; - -Rng1U64 df_reg_slot_range_table[32] = -{ -{0}, -{OffsetOf(DF_Regs, machine), OffsetOf(DF_Regs, machine) + sizeof(CTRL_Handle)}, -{OffsetOf(DF_Regs, module), OffsetOf(DF_Regs, module) + sizeof(CTRL_Handle)}, -{OffsetOf(DF_Regs, process), OffsetOf(DF_Regs, process) + sizeof(CTRL_Handle)}, -{OffsetOf(DF_Regs, thread), OffsetOf(DF_Regs, thread) + sizeof(CTRL_Handle)}, -{OffsetOf(DF_Regs, window), OffsetOf(DF_Regs, window) + sizeof(D_Handle)}, -{OffsetOf(DF_Regs, panel), OffsetOf(DF_Regs, panel) + sizeof(D_Handle)}, -{OffsetOf(DF_Regs, view), OffsetOf(DF_Regs, view) + sizeof(D_Handle)}, -{OffsetOf(DF_Regs, prev_view), OffsetOf(DF_Regs, prev_view) + sizeof(D_Handle)}, -{OffsetOf(DF_Regs, dst_panel), OffsetOf(DF_Regs, dst_panel) + sizeof(D_Handle)}, -{OffsetOf(DF_Regs, entity), OffsetOf(DF_Regs, entity) + sizeof(D_Handle)}, -{OffsetOf(DF_Regs, entity_list), OffsetOf(DF_Regs, entity_list) + sizeof(D_HandleList)}, -{OffsetOf(DF_Regs, unwind_count), OffsetOf(DF_Regs, unwind_count) + sizeof(U64)}, -{OffsetOf(DF_Regs, inline_depth), OffsetOf(DF_Regs, inline_depth) + sizeof(U64)}, -{OffsetOf(DF_Regs, file_path), OffsetOf(DF_Regs, file_path) + sizeof(String8)}, -{OffsetOf(DF_Regs, cursor), OffsetOf(DF_Regs, cursor) + sizeof(TxtPt)}, -{OffsetOf(DF_Regs, mark), OffsetOf(DF_Regs, mark) + sizeof(TxtPt)}, -{OffsetOf(DF_Regs, text_key), OffsetOf(DF_Regs, text_key) + sizeof(U128)}, -{OffsetOf(DF_Regs, lang_kind), OffsetOf(DF_Regs, lang_kind) + sizeof(TXT_LangKind)}, -{OffsetOf(DF_Regs, lines), OffsetOf(DF_Regs, lines) + sizeof(D_LineList)}, -{OffsetOf(DF_Regs, dbgi_key), OffsetOf(DF_Regs, dbgi_key) + sizeof(DI_Key)}, -{OffsetOf(DF_Regs, vaddr), OffsetOf(DF_Regs, vaddr) + sizeof(U64)}, -{OffsetOf(DF_Regs, voff), OffsetOf(DF_Regs, voff) + sizeof(U64)}, -{OffsetOf(DF_Regs, vaddr_range), OffsetOf(DF_Regs, vaddr_range) + sizeof(Rng1U64)}, -{OffsetOf(DF_Regs, voff_range), OffsetOf(DF_Regs, voff_range) + sizeof(Rng1U64)}, -{OffsetOf(DF_Regs, pid), OffsetOf(DF_Regs, pid) + sizeof(U32)}, -{OffsetOf(DF_Regs, force_confirm), OffsetOf(DF_Regs, force_confirm) + sizeof(B32)}, -{OffsetOf(DF_Regs, prefer_disasm), OffsetOf(DF_Regs, prefer_disasm) + sizeof(B32)}, -{OffsetOf(DF_Regs, dir2), OffsetOf(DF_Regs, dir2) + sizeof(Dir2)}, -{OffsetOf(DF_Regs, string), OffsetOf(DF_Regs, string) + sizeof(String8)}, -{OffsetOf(DF_Regs, params_tree), OffsetOf(DF_Regs, params_tree) + sizeof(MD_Node *)}, -{OffsetOf(DF_Regs, os_event), OffsetOf(DF_Regs, os_event) + sizeof(OS_Event *)}, -}; - -DF_CmdKindInfo df_cmd_kind_info_table[219] = -{ -{0}, -{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp("Launch and Run"), DF_IconKind_Play, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_EntityList, str8_lit_comp(""), DF_EntityKind_Target}}, -{ str8_lit_comp("launch_and_init"), str8_lit_comp("Starts debugging a new instance of a target, then stops at the program's entry point."), str8_lit_comp("launch,start,entry,point"), str8_lit_comp("Launch and Initialize"), DF_IconKind_PlayStepForward, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_EntityList, str8_lit_comp(""), DF_EntityKind_Target}}, -{ str8_lit_comp("kill"), str8_lit_comp("Kills the specified existing debugged process(es)."), str8_lit_comp("stop,kill"), str8_lit_comp("Kill"), DF_IconKind_Stop, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_EntityList, str8_lit_comp(""), DF_EntityKind_Process}}, -{ str8_lit_comp("kill_all"), str8_lit_comp("Kills all debugged child processes."), str8_lit_comp("stop,kill,all"), str8_lit_comp("Kill All"), DF_IconKind_Stop, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("detach"), str8_lit_comp("Detaches the specified debugged process."), str8_lit_comp("detach"), str8_lit_comp("Detach"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_EntityList, str8_lit_comp(""), DF_EntityKind_Process}}, -{ str8_lit_comp("continue"), str8_lit_comp("Continues all halted threads."), str8_lit_comp(""), str8_lit_comp("Continue"), DF_IconKind_Play, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("step_into_inst"), str8_lit_comp("Performs a step that goes into calls, at the instruction level."), str8_lit_comp("single,step,thread"), str8_lit_comp("Step Into (Assembly)"), DF_IconKind_StepInto, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("step_over_inst"), str8_lit_comp("Performs a step that skips calls, at the instruction level."), str8_lit_comp("single,step,thread"), str8_lit_comp("Step Over (Assembly)"), DF_IconKind_StepOver, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("step_into_line"), str8_lit_comp("Performs a step that goes into calls, at the source code line level."), str8_lit_comp("step,thread"), str8_lit_comp("Step Into (Line)"), DF_IconKind_StepInto, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("step_over_line"), str8_lit_comp("Performs a step that skips calls, at the source code line level."), str8_lit_comp("step,thread"), str8_lit_comp("Step Over (Line)"), DF_IconKind_StepOver, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("step_out"), str8_lit_comp("Runs to the end of the current function and exits it."), str8_lit_comp(""), str8_lit_comp("Step Out"), DF_IconKind_StepOut, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("halt"), str8_lit_comp("Halts all running processes."), str8_lit_comp("pause"), str8_lit_comp("Halt"), DF_IconKind_Pause, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("soft_halt_refresh"), str8_lit_comp("Interrupts all running processes to collect data, and then resumes them."), str8_lit_comp(""), str8_lit_comp("Soft Halt Refresh"), DF_IconKind_Refresh, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("set_thread_ip"), str8_lit_comp("Sets the passed thread's instruction pointer at the passed address."), str8_lit_comp(""), str8_lit_comp("Set Thread IP"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Vaddr, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("run_to_line"), str8_lit_comp("Runs until a particular source line is hit."), str8_lit_comp(""), str8_lit_comp("Run To Line"), DF_IconKind_Play, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("run_to_address"), str8_lit_comp("Runs until a particular address is hit."), str8_lit_comp(""), str8_lit_comp("Run To Address"), DF_IconKind_PlayStepForward, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Vaddr, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("run"), str8_lit_comp("Runs all targets after starting them if they have not been started yet."), str8_lit_comp("play"), str8_lit_comp("Run"), DF_IconKind_Play, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("restart"), str8_lit_comp("Kills all running processes, then restarts the targets which were used to launch all current processes (if any)."), str8_lit_comp("restart,retry"), str8_lit_comp("Restart"), DF_IconKind_Redo, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("step_into"), str8_lit_comp("Steps once, possibly into function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Into"), DF_IconKind_StepInto, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("step_over"), str8_lit_comp("Steps once, always over function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Over"), DF_IconKind_StepOver, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("freeze_thread"), str8_lit_comp("Freezes the passed thread."), str8_lit_comp("callstack,unwind"), str8_lit_comp("Freeze Thread"), DF_IconKind_Locked, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Thread}}, -{ str8_lit_comp("thaw_thread"), str8_lit_comp("Thaws the passed thread."), str8_lit_comp(""), str8_lit_comp("Thaw Thread"), DF_IconKind_Unlocked, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Thread}}, -{ str8_lit_comp("freeze_process"), str8_lit_comp("Freezes the passed process."), str8_lit_comp(""), str8_lit_comp("Freeze Process"), DF_IconKind_Locked, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Process}}, -{ str8_lit_comp("thaw_process"), str8_lit_comp("Thaws the passed process."), str8_lit_comp(""), str8_lit_comp("Thaw Process"), DF_IconKind_Unlocked, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Process}}, -{ str8_lit_comp("freeze_machine"), str8_lit_comp("Freezes the passed machine."), str8_lit_comp(""), str8_lit_comp("Freeze Machine"), DF_IconKind_Locked, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Machine}}, -{ str8_lit_comp("thaw_machine"), str8_lit_comp("Thaws the passed machine."), str8_lit_comp(""), str8_lit_comp("Thaw Machine"), DF_IconKind_Unlocked, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Machine}}, -{ str8_lit_comp("freeze_local_machine"), str8_lit_comp("Freezes the local machine."), str8_lit_comp(""), str8_lit_comp("Freeze Local Machine"), DF_IconKind_Machine, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("thaw_local_machine"), str8_lit_comp("Thaws the local machine."), str8_lit_comp(""), str8_lit_comp("Thaw Local Machine"), DF_IconKind_Machine, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("freeze_entity"), str8_lit_comp("Freezes an entity."), str8_lit_comp(""), str8_lit_comp("Freeze Entity"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("thaw_entity"), str8_lit_comp("Thaws an entity."), str8_lit_comp(""), str8_lit_comp("Thaw Entity"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("attach"), str8_lit_comp("Attaches to a process that is already running on the local machine."), str8_lit_comp(""), str8_lit_comp("Attach"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_PID, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("exit"), str8_lit_comp("Exits the debugger."), str8_lit_comp("quit,close,abort"), str8_lit_comp("Exit"), DF_IconKind_X, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("run_command"), str8_lit_comp("Runs a command from the command palette."), str8_lit_comp("help,cmd"), str8_lit_comp("Run Command"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_String, str8_lit_comp("commands"), DF_EntityKind_Nil}}, -{ str8_lit_comp("os_event"), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("OS Event"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("select_thread"), str8_lit_comp("Selects a thread."), str8_lit_comp(""), str8_lit_comp("Select Thread"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Thread}}, -{ str8_lit_comp("select_unwind"), str8_lit_comp("Selects an unwind frame number for the selected thread."), str8_lit_comp(""), str8_lit_comp("Select Unwind"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("up_one_frame"), str8_lit_comp("Selects the call stack frame above the currently selected."), str8_lit_comp(""), str8_lit_comp("Up One Frame"), DF_IconKind_UpArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("down_one_frame"), str8_lit_comp("Selects the call stack frame below the currently selected."), str8_lit_comp("callstack,unwind"), str8_lit_comp("Down One Frame"), DF_IconKind_DownArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("inc_ui_font_scale"), str8_lit_comp("Increases the font size used for UI."), str8_lit_comp(""), str8_lit_comp("Increase UI Font Scale"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("dec_ui_font_scale"), str8_lit_comp("Decreases the font size used for UI."), str8_lit_comp(""), str8_lit_comp("Decrease UI Font Scale"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("inc_code_font_scale"), str8_lit_comp("Increases the font size used for code."), str8_lit_comp(""), str8_lit_comp("Increase Code Font Scale"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("dec_code_font_scale"), str8_lit_comp("Decreases the font size used for code."), str8_lit_comp(""), str8_lit_comp("Decrease Code Font Scale"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("open_window"), str8_lit_comp("Opens a new window."), str8_lit_comp(""), str8_lit_comp("Open New Window"), DF_IconKind_Window, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("close_window"), str8_lit_comp("Closes an opened window."), str8_lit_comp(""), str8_lit_comp("Close Window"), DF_IconKind_Window, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_fullscreen"), str8_lit_comp("Toggles fullscreen view on the active window."), str8_lit_comp(""), str8_lit_comp("Toggle Fullscreen"), DF_IconKind_Window, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("confirm_accept"), str8_lit_comp("Accepts the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Accept"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("confirm_cancel"), str8_lit_comp("Cancels the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Cancel"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("reset_to_default_panels"), str8_lit_comp("Resets the window to the default panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Default Panel Layout"), DF_IconKind_Window, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("reset_to_compact_panels"), str8_lit_comp("Resets the window to the compact panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Compact Panel Layout"), DF_IconKind_Window, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("new_panel_left"), str8_lit_comp("Creates a new panel to the left of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Left"), DF_IconKind_XSplit, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("new_panel_up"), str8_lit_comp("Creates a new panel at the top of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Up"), DF_IconKind_YSplit, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("new_panel_right"), str8_lit_comp("Creates a new panel to the right of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Right"), DF_IconKind_XSplit, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("new_panel_down"), str8_lit_comp("Creates a new panel at the bottom of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Down"), DF_IconKind_YSplit, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("split_panel"), str8_lit_comp("Creates a new panel in a given direction, and moves a tab to it, if specified."), str8_lit_comp(""), str8_lit_comp("Split Panel"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("rotate_panel_columns"), str8_lit_comp("Rotates all panels at the closest column level of the panel hierarchy."), str8_lit_comp(""), str8_lit_comp("Rotate Panel Columns"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("next_panel"), str8_lit_comp("Cycles the active panel forward."), str8_lit_comp(""), str8_lit_comp("Focus Next Panel"), DF_IconKind_RightArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("prev_panel"), str8_lit_comp("Cycles the active panel backwards."), str8_lit_comp(""), str8_lit_comp("Focus Previous Panel"), DF_IconKind_LeftArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("focus_panel"), str8_lit_comp("Focuses a new panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("focus_panel_right"), str8_lit_comp("Focuses a panel rightward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Right"), DF_IconKind_RightArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("focus_panel_left"), str8_lit_comp("Focuses a panel leftward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Left"), DF_IconKind_LeftArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("focus_panel_up"), str8_lit_comp("Focuses a panel upward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Up"), DF_IconKind_UpArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("focus_panel_down"), str8_lit_comp("Focuses a panel downward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Down"), DF_IconKind_DownArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("undo"), str8_lit_comp("Undoes the previous action."), str8_lit_comp(""), str8_lit_comp("Undo"), DF_IconKind_Undo, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("redo"), str8_lit_comp("Redoes the first previously undone action."), str8_lit_comp(""), str8_lit_comp("Redo"), DF_IconKind_Redo, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("go_back"), str8_lit_comp("Returns to the previously selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Back"), DF_IconKind_LeftArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("go_forward"), str8_lit_comp("Returns to the next selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Forward"), DF_IconKind_RightArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("close_panel"), str8_lit_comp("Closes the currently active panel."), str8_lit_comp(""), str8_lit_comp("Close Panel"), DF_IconKind_ClosePanel, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("next_tab"), str8_lit_comp("Focuses the next tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Next Tab"), DF_IconKind_RightArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("prev_tab"), str8_lit_comp("Focuses the previous tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Previous Tab"), DF_IconKind_LeftArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_tab_right"), str8_lit_comp("Moves the selected tab right one slot."), str8_lit_comp(""), str8_lit_comp("Move Tab Right"), DF_IconKind_RightArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_tab_left"), str8_lit_comp("Moves the selected tab left one slot."), str8_lit_comp(""), str8_lit_comp("Move Tab Left"), DF_IconKind_LeftArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("open_tab"), str8_lit_comp("Opens a new tab with the parameterized view specification."), str8_lit_comp(""), str8_lit_comp("Open Tab"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("close_tab"), str8_lit_comp("Closes the currently opened tab."), str8_lit_comp(""), str8_lit_comp("Close Tab"), DF_IconKind_X, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_tab"), str8_lit_comp("Moves a tab to a new panel."), str8_lit_comp(""), str8_lit_comp("Move Tab"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("tab_bar_top"), str8_lit_comp("Anchors a panel's tab bar to the top of the panel."), str8_lit_comp(""), str8_lit_comp("Anchor Tab Bar To Top"), DF_IconKind_UpArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("tab_bar_bottom"), str8_lit_comp("Anchors a panel's tab bar to the bottom of the panel."), str8_lit_comp(""), str8_lit_comp("Anchor Tab Bar To Bottom"), DF_IconKind_DownArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("set_current_path"), str8_lit_comp("Sets the debugger's current path, which is used as a starting point when browsing for files."), str8_lit_comp(""), str8_lit_comp("Set Current Path"), DF_IconKind_FileOutline, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("open"), str8_lit_comp("Opens a file."), str8_lit_comp("code,source,file"), str8_lit_comp("Open"), DF_IconKind_FileOutline, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*1)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_FilePath, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("switch"), str8_lit_comp("Switches to a loaded file."), str8_lit_comp("code,source,file"), str8_lit_comp("Switch"), DF_IconKind_FileOutline, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_File}}, -{ str8_lit_comp("switch_to_partner_file"), str8_lit_comp("Switches to the focused file's partner; or from header to implementation or vice versa."), str8_lit_comp("code,source,file"), str8_lit_comp("Switch To Partner File"), DF_IconKind_FileOutline, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("go_to_disassembly"), str8_lit_comp("Goes to the disassembly, if any, for a given source code line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("Go To Disassembly"), DF_IconKind_Glasses, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("go_to_source"), str8_lit_comp("Goes to the source code, if any, for a given disassembly line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("Go To Source"), DF_IconKind_FileOutline, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("set_file_override_link_src"), str8_lit_comp("Sets the source path for an override file link."), str8_lit_comp(""), str8_lit_comp("Set File Override Link Source"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("set_file_override_link_dst"), str8_lit_comp("Sets the destination path for an override file link."), str8_lit_comp(""), str8_lit_comp("Set File Override Link Destination"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("set_file_replacement_path"), str8_lit_comp("Sets the path which should be used as the replacement for the passed file."), str8_lit_comp(""), str8_lit_comp("Set File Replacement Path"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("set_auto_view_rule_type"), str8_lit_comp("Sets the type for an auto view rule."), str8_lit_comp(""), str8_lit_comp("Set Auto View Rule Type"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("set_auto_view_rule_view_rule"), str8_lit_comp("Sets the view rule string for an auto view rule."), str8_lit_comp(""), str8_lit_comp("Set Auto View Rule View Rule"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("open_user"), str8_lit_comp("Opens a user file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("load,user,project,layout"), str8_lit_comp("Open User"), DF_IconKind_Person, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*1)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_FilePath, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("open_project"), str8_lit_comp("Opens a project file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("project,project,session"), str8_lit_comp("Open Project"), DF_IconKind_Briefcase, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*1)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_FilePath, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("open_recent_project"), str8_lit_comp("Opens a recently used project file."), str8_lit_comp("project,project,session"), str8_lit_comp("Open Recent Project"), DF_IconKind_Briefcase, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_RecentProject}}, -{ str8_lit_comp("apply_user_data"), str8_lit_comp("Applies user data from the active user file."), str8_lit_comp(""), str8_lit_comp("Apply User Data"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("apply_project_data"), str8_lit_comp("Applies project data from the active project file."), str8_lit_comp(""), str8_lit_comp("Apply Project Data"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("write_user_data"), str8_lit_comp("Writes user data to the active user file."), str8_lit_comp(""), str8_lit_comp("Write User Data"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("write_project_data"), str8_lit_comp("Writes project data to the active project file."), str8_lit_comp(""), str8_lit_comp("Write Project Data"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("edit"), str8_lit_comp("Edits the current selection."), str8_lit_comp(""), str8_lit_comp("Edit"), DF_IconKind_Pencil, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("accept"), str8_lit_comp("Accepts current changes, or answers prompts in the affirmative."), str8_lit_comp(""), str8_lit_comp("Accept"), DF_IconKind_CheckFilled, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("cancel"), str8_lit_comp("Rejects current changes, exits temporary menus, or answers prompts in the negative."), str8_lit_comp(""), str8_lit_comp("Cancel"), DF_IconKind_X, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_left"), str8_lit_comp("Moves the cursor or selection left."), str8_lit_comp(""), str8_lit_comp("Move Left"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_right"), str8_lit_comp("Moves the cursor or selection right."), str8_lit_comp(""), str8_lit_comp("Move Right"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_up"), str8_lit_comp("Moves the cursor or selection up."), str8_lit_comp(""), str8_lit_comp("Move Up"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_down"), str8_lit_comp("Moves the cursor or selection down."), str8_lit_comp(""), str8_lit_comp("Move Down"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_left_select"), str8_lit_comp("Moves the cursor or selection left, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Left Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_right_select"), str8_lit_comp("Moves the cursor or selection right, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Right Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_up_select"), str8_lit_comp("Moves the cursor or selection up, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_down_select"), str8_lit_comp("Moves the cursor or selection down, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_left_chunk"), str8_lit_comp("Moves the cursor or selection left one chunk."), str8_lit_comp(""), str8_lit_comp("Move Left Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_right_chunk"), str8_lit_comp("Moves the cursor or selection right one chunk."), str8_lit_comp(""), str8_lit_comp("Move Right Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_up_chunk"), str8_lit_comp("Moves the cursor or selection up one chunk."), str8_lit_comp(""), str8_lit_comp("Move Up Chunk"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_down_chunk"), str8_lit_comp("Moves the cursor or selection down one chunk."), str8_lit_comp(""), str8_lit_comp("Move Down Chunk"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_up_page"), str8_lit_comp("Moves the cursor or selection up one page."), str8_lit_comp(""), str8_lit_comp("Move Up Page"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_down_page"), str8_lit_comp("Moves the cursor or selection down one page."), str8_lit_comp(""), str8_lit_comp("Move Down Page"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_up_whole"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content."), str8_lit_comp(""), str8_lit_comp("Move Up Whole"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_down_whole"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content."), str8_lit_comp(""), str8_lit_comp("Move Down Whole"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_left_chunk_select"), str8_lit_comp("Moves the cursor or selection left one chunk."), str8_lit_comp(""), str8_lit_comp("Move Left Chunk Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_right_chunk_select"), str8_lit_comp("Moves the cursor or selection right one chunk."), str8_lit_comp(""), str8_lit_comp("Move Right Chunk Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_up_chunk_select"), str8_lit_comp("Moves the cursor or selection up one chunk."), str8_lit_comp(""), str8_lit_comp("Move Up Chunk Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_down_chunk_select"), str8_lit_comp("Moves the cursor or selection down one chunk."), str8_lit_comp(""), str8_lit_comp("Move Down Chunk Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_up_page_select"), str8_lit_comp("Moves the cursor or selection up one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Page Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_down_page_select"), str8_lit_comp("Moves the cursor or selection down one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Page Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_up_whole_select"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Whole Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_down_whole_select"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Whole Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_up_reorder"), str8_lit_comp("Moves the cursor or selection up, while swapping the currently selected element with that upward."), str8_lit_comp(""), str8_lit_comp("Move Up Reorder"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_down_reorder"), str8_lit_comp("Moves the cursor or selection down, while swapping the currently selected element with that downward."), str8_lit_comp(""), str8_lit_comp("Move Down Reorder"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_home"), str8_lit_comp("Moves the cursor to the beginning of the line."), str8_lit_comp(""), str8_lit_comp("Move Home"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_end"), str8_lit_comp("Moves the cursor to the end of the line."), str8_lit_comp(""), str8_lit_comp("Move End"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_home_select"), str8_lit_comp("Moves the cursor to the beginning of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Home Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("move_end_select"), str8_lit_comp("Moves the cursor to the end of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move End Select"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("select_all"), str8_lit_comp("Selects everything possible."), str8_lit_comp(""), str8_lit_comp("Select All"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("delete_single"), str8_lit_comp("Deletes a single element to the right of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Delete Single"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("delete_chunk"), str8_lit_comp("Deletes a chunk to the right of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Delete Chunk"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("backspace_single"), str8_lit_comp("Deletes a single element to the left of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Backspace Single"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("backspace_chunk"), str8_lit_comp("Deletes a chunk to the left of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Backspace Chunk"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("copy"), str8_lit_comp("Copies the active selection to the clipboard."), str8_lit_comp(""), str8_lit_comp("Copy"), DF_IconKind_Clipboard, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("cut"), str8_lit_comp("Copies the active selection to the clipboard, then deletes it."), str8_lit_comp(""), str8_lit_comp("Cut"), DF_IconKind_Clipboard, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("paste"), str8_lit_comp("Pastes the current contents of the clipboard."), str8_lit_comp(""), str8_lit_comp("Paste"), DF_IconKind_Clipboard, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("insert_text"), str8_lit_comp("Inserts the text that was used to cause this command."), str8_lit_comp(""), str8_lit_comp("Insert Text"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("goto_line"), str8_lit_comp("Jumps to a line number in the current code file."), str8_lit_comp(""), str8_lit_comp("Go To Line"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Cursor, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("goto_address"), str8_lit_comp("Jumps to an address in the current memory or disassembly view."), str8_lit_comp(""), str8_lit_comp("Go To Address"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Vaddr, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("center_cursor"), str8_lit_comp("Snaps the current code view to center the cursor."), str8_lit_comp(""), str8_lit_comp("Center Cursor"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("contain_cursor"), str8_lit_comp("Snaps the current code view to contain the cursor."), str8_lit_comp(""), str8_lit_comp("Contain Cursor"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("find_text_forward"), str8_lit_comp("Searches the current code file forward (from the cursor) for a string."), str8_lit_comp(""), str8_lit_comp("Find Text (Forward)"), DF_IconKind_Find, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*1)|(DF_QueryFlag_SelectOldInput*1)|(DF_QueryFlag_Required*1), DF_RegSlot_String, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("find_text_backward"), str8_lit_comp("Searches the current code file backwards (from the cursor) for a string."), str8_lit_comp(""), str8_lit_comp("Find Text (Backwards)"), DF_IconKind_Find, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*1)|(DF_QueryFlag_SelectOldInput*1)|(DF_QueryFlag_Required*1), DF_RegSlot_String, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("find_next"), str8_lit_comp("Searches the current code file forward (from the cursor) for the last searched string."), str8_lit_comp(""), str8_lit_comp("Find Next"), DF_IconKind_Find, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*1)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("find_prev"), str8_lit_comp("Searches the current code file backwards (from the cursor) for the last searched string."), str8_lit_comp(""), str8_lit_comp("Find Previous"), DF_IconKind_Find, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*1)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("find_thread"), str8_lit_comp("Jumps to the passed thread in either source code, disassembly, or both if they're already open."), str8_lit_comp(""), str8_lit_comp("Find Thread"), DF_IconKind_Find, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Thread}}, -{ str8_lit_comp("find_selected_thread"), str8_lit_comp("Jumps to the selected thread in either source code, disassembly, or both if they're already open."), str8_lit_comp(""), str8_lit_comp("Find Selected Thread"), DF_IconKind_Find, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("goto_name"), str8_lit_comp("Searches for the passed string as a file, a symbol in debug info, and more, then jumps to it if possible."), str8_lit_comp(""), str8_lit_comp("Go To Name"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_String, str8_lit_comp("symbol_lister"), DF_EntityKind_Nil}}, -{ str8_lit_comp("goto_name_at_cursor"), str8_lit_comp("Searches for the text at the cursor as a file, a symbol in debug info, and more, then jumps to it if possible."), str8_lit_comp(""), str8_lit_comp("Go To Name At Cursor"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_watch_expr"), str8_lit_comp("Adds or removes an expression to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_watch_expr_at_cursor"), str8_lit_comp("Adds or removes the expression that the cursor or selection is currently over to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression At Cursor"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_watch_expr_at_mouse"), str8_lit_comp("Adds or removes the expression that the mouse is currently over to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression At Mouse"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("set_columns"), str8_lit_comp("Sets the number of columns for a memory view."), str8_lit_comp(""), str8_lit_comp("Set Columns"), DF_IconKind_Thumbnails, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_address_visibility"), str8_lit_comp("Toggles the visibility of addresses in a disassembly view."), str8_lit_comp(""), str8_lit_comp("Toggle Address Visibility"), DF_IconKind_Thumbnails, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_code_bytes_visibility"), str8_lit_comp("Toggles the visibility of machine code bytes in a disassembly view."), str8_lit_comp(""), str8_lit_comp("Toggle Code Bytes Visibility"), DF_IconKind_Thumbnails, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("enable_entity"), str8_lit_comp("Enables an entity."), str8_lit_comp(""), str8_lit_comp("Enable Entity"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("disable_entity"), str8_lit_comp("Disables an entity."), str8_lit_comp(""), str8_lit_comp("Disable Entity"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("remove_entity"), str8_lit_comp("Removes an entity."), str8_lit_comp(""), str8_lit_comp("Remove Entity"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("name_entity"), str8_lit_comp("Equips an entity with a name."), str8_lit_comp(""), str8_lit_comp("Name Entity"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("edit_entity"), str8_lit_comp("Opens the editor for an entity."), str8_lit_comp(""), str8_lit_comp("Edit Entity"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("duplicate_entity"), str8_lit_comp("Duplicates an entity."), str8_lit_comp(""), str8_lit_comp("Duplicate Entity"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("relocate_entity"), str8_lit_comp("Relocates an entity."), str8_lit_comp(""), str8_lit_comp("Relocate Entity"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("add_breakpoint"), str8_lit_comp("Places a breakpoint at a given location (file path and line number, address, or symbol name)."), str8_lit_comp(""), str8_lit_comp("Add Breakpoint"), DF_IconKind_CircleFilled, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("add_address_breakpoint"), str8_lit_comp("Places a breakpoint on the specified address."), str8_lit_comp(""), str8_lit_comp("Add Address Breakpoint"), DF_IconKind_CircleFilled, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Vaddr, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("add_function_breakpoint"), str8_lit_comp("Places a breakpoint on the first address(es) of the specified function."), str8_lit_comp(""), str8_lit_comp("Add Function Breakpoint"), DF_IconKind_CircleFilled, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_String, str8_lit_comp("symbol_lister"), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_breakpoint"), str8_lit_comp("Places or removes a breakpoint at a given location (file path and line number, address, or symbol name)."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint"), DF_IconKind_CircleFilled, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("remove_breakpoint"), str8_lit_comp("Removes an existing breakpoint."), str8_lit_comp(""), str8_lit_comp("Remove Breakpoint"), DF_IconKind_Trash, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Breakpoint}}, -{ str8_lit_comp("enable_breakpoint"), str8_lit_comp("Enables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Enable Breakpoint"), DF_IconKind_CheckFilled, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Breakpoint}}, -{ str8_lit_comp("disable_breakpoint"), str8_lit_comp("Disables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Disable Breakpoint"), DF_IconKind_CheckHollow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Breakpoint}}, -{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_breakpoint_cursor"), str8_lit_comp("Places or removes a breakpoint on the line on which the active cursor sits."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint At Cursor"), DF_IconKind_CircleFilled, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_watch_pin_at_cursor"), str8_lit_comp("Places or removes a watch pin at the cursor on the currently active file."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin At Cursor"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*1)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_String, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("run_to_cursor"), str8_lit_comp("Runs the selected thread to the current cursor."), str8_lit_comp("line"), str8_lit_comp("Run To Cursor"), DF_IconKind_Play, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("set_next_statement"), str8_lit_comp("Sets the selected thread's instruction pointer to the cursor's position."), str8_lit_comp(""), str8_lit_comp("Set Next Statement"), DF_IconKind_RightArrow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("add_target"), str8_lit_comp("Adds a new target."), str8_lit_comp("application,executable,debug"), str8_lit_comp("Add Target"), DF_IconKind_Target, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*1)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_FilePath, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("remove_target"), str8_lit_comp("Removes an existing target."), str8_lit_comp("delete,remove,target"), str8_lit_comp("Remove Target"), DF_IconKind_Trash, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Target}}, -{ str8_lit_comp("edit_target"), str8_lit_comp("Edits an existing target."), str8_lit_comp(""), str8_lit_comp("Edit Target"), DF_IconKind_Pencil, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Target}}, -{ str8_lit_comp("select_target"), str8_lit_comp("Selects a target."), str8_lit_comp(""), str8_lit_comp("Select Target"), DF_IconKind_Target, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Target}}, -{ str8_lit_comp("enable_target"), str8_lit_comp("Enables a target, in addition to all targets currently enabled."), str8_lit_comp(""), str8_lit_comp("Enable Target"), DF_IconKind_CheckFilled, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Target}}, -{ str8_lit_comp("disable_target"), str8_lit_comp("Disables a target."), str8_lit_comp(""), str8_lit_comp("Disable Target"), DF_IconKind_CheckHollow, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_Entity, str8_lit_comp(""), DF_EntityKind_Target}}, -{ str8_lit_comp("register_as_jit_debugger"), str8_lit_comp("Registers the RAD debugger as the just-in-time (JIT) debugger used by the operating system."), str8_lit_comp(""), str8_lit_comp("Register As Just-In-Time (JIT) Debugger"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("entity_ref_fast_path"), str8_lit_comp("Activates the default behavior when clicking an entity reference."), str8_lit_comp(""), str8_lit_comp("Entity Reference Fast Path"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("spawn_entity_view"), str8_lit_comp("Spawns a new view, given an entity and other parameterizations."), str8_lit_comp(""), str8_lit_comp("Spawn Entity View"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("find_code_location"), str8_lit_comp("Finds a specific source code location given file, line, and column coordinates. Opens the file if necessary."), str8_lit_comp(""), str8_lit_comp("Find Code Location"), DF_IconKind_FileOutline, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_FilePath, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("filter"), str8_lit_comp("Begins filtering the active view."), str8_lit_comp("sort,search,filter,find"), str8_lit_comp("Filter"), DF_IconKind_Find, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("apply_filter"), str8_lit_comp("Applies the typed filter to the active view."), str8_lit_comp("sort,search,filter,find,apply"), str8_lit_comp("Apply Filter"), DF_IconKind_Find, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("clear_filter"), str8_lit_comp("Clears the filter applied to the active view."), str8_lit_comp("sort,search,filter,find,clear"), str8_lit_comp("Clear Filter"), DF_IconKind_Find, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("getting_started"), str8_lit_comp("Opens the menu for information on getting started."), str8_lit_comp("tutorial,help"), str8_lit_comp("Getting Started"), DF_IconKind_QuestionMark, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("commands"), str8_lit_comp("Opens the list of all commands."), str8_lit_comp(""), str8_lit_comp("Commands"), DF_IconKind_List, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("target"), str8_lit_comp("Opens the editor for a target."), str8_lit_comp(""), str8_lit_comp("Target"), DF_IconKind_Target, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("targets"), str8_lit_comp("Opens the list of all targets."), str8_lit_comp(""), str8_lit_comp("Targets"), DF_IconKind_Target, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("file_path_map"), str8_lit_comp("Opens the file path mapping editor."), str8_lit_comp(""), str8_lit_comp("File Path Map"), DF_IconKind_FileOutline, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("auto_view_rules"), str8_lit_comp("Opens the auto view rule editor."), str8_lit_comp(""), str8_lit_comp("Auto View Rules"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("breakpoints"), str8_lit_comp("Opens the breakpoints view."), str8_lit_comp(""), str8_lit_comp("Breakpoints"), DF_IconKind_CircleFilled, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("watch_pins"), str8_lit_comp("Opens the watch pins view."), str8_lit_comp(""), str8_lit_comp("Watch Pins"), DF_IconKind_Pin, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("scheduler"), str8_lit_comp("Opens the scheduler view, for process and thread controls."), str8_lit_comp("threads,processes,targets"), str8_lit_comp("Scheduler"), DF_IconKind_Scheduler, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("call_stack"), str8_lit_comp("Opens the call stack view."), str8_lit_comp("callstack,thread,unwind"), str8_lit_comp("Call Stack"), DF_IconKind_Thread, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("modules"), str8_lit_comp("Opens the modules view."), str8_lit_comp(""), str8_lit_comp("Modules"), DF_IconKind_Module, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("watch"), str8_lit_comp("Opens a watch view."), str8_lit_comp(""), str8_lit_comp("Watch"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("locals"), str8_lit_comp("Opens a locals view."), str8_lit_comp(""), str8_lit_comp("Locals"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("registers"), str8_lit_comp("Opens a registers view."), str8_lit_comp(""), str8_lit_comp("Registers"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("globals"), str8_lit_comp("Opens a globals view."), str8_lit_comp(""), str8_lit_comp("Globals"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("thread_locals"), str8_lit_comp("Opens a thread locals view."), str8_lit_comp(""), str8_lit_comp("Thread Locals"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("types"), str8_lit_comp("Opens a types view."), str8_lit_comp(""), str8_lit_comp("Types"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("procedures"), str8_lit_comp("Opens a procedures view."), str8_lit_comp(""), str8_lit_comp("Procedures"), DF_IconKind_Binoculars, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("pending_file"), str8_lit_comp("Opens a view which asynchronously analyzes the file path parameter, then picks an appropriate viewer for it."), str8_lit_comp(""), str8_lit_comp("Pending File"), DF_IconKind_FileOutline, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("disassembly"), str8_lit_comp("Opens the disassembly view."), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), DF_IconKind_Glasses, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("output"), str8_lit_comp("Opens an output view."), str8_lit_comp(""), str8_lit_comp("Output"), DF_IconKind_List, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("memory"), str8_lit_comp("Opens a memory view."), str8_lit_comp(""), str8_lit_comp("Memory"), DF_IconKind_Grid, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("exception_filters"), str8_lit_comp("Opens the exception filters view."), str8_lit_comp("exceptions,filters"), str8_lit_comp("Exception Filters"), DF_IconKind_Gear, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("settings"), str8_lit_comp("Opens the settings view."), str8_lit_comp("theme,color,scheme,options"), str8_lit_comp("Settings"), DF_IconKind_Gear, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("pick_file"), str8_lit_comp("Opens the file browser to pick a file."), str8_lit_comp(""), str8_lit_comp("Pick File"), DF_IconKind_FileOutline, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*1)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_FilePath, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("pick_folder"), str8_lit_comp("Opens the file browser to pick a folder."), str8_lit_comp(""), str8_lit_comp("Pick Folder"), DF_IconKind_FolderOpenFilled, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*1)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_FilePath, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("pick_file_or_folder"), str8_lit_comp("Opens the file browser to pick a file or folder."), str8_lit_comp(""), str8_lit_comp("Pick File/Folder"), DF_IconKind_FileOutline, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*1)|(DF_QueryFlag_AllowFolders*1)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*1), DF_RegSlot_FilePath, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("complete_query"), str8_lit_comp("Completes a query."), str8_lit_comp(""), str8_lit_comp("Complete Query"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("cancel_query"), str8_lit_comp("Cancels a query."), str8_lit_comp(""), str8_lit_comp("Cancel Query"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*0)|(DF_CmdKindFlag_ListInIPCDocs*0), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("toggle_dev_menu"), str8_lit_comp("Opens and closes the developer menu."), str8_lit_comp(""), str8_lit_comp("Toggle Developer Menu"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -{ str8_lit_comp("log_marker"), str8_lit_comp("Logs a marker in the application log, to denote specific points in time within the log."), str8_lit_comp(""), str8_lit_comp("Log Marker"), DF_IconKind_Null, (DF_CmdKindFlag_ListInUI*1)|(DF_CmdKindFlag_ListInIPCDocs*1), {(DF_QueryFlag_AllowFiles*0)|(DF_QueryFlag_AllowFolders*0)|(DF_QueryFlag_CodeInput*0)|(DF_QueryFlag_KeepOldInput*0)|(DF_QueryFlag_SelectOldInput*0)|(DF_QueryFlag_Required*0), DF_RegSlot_Null, str8_lit_comp(""), DF_EntityKind_Nil}}, -}; - -DF_StringBindingPair df_g_default_binding_table[110] = -{ -{str8_lit_comp("kill_all"), {OS_Key_F5, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("step_into_inst"), {OS_Key_F11, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("step_over_inst"), {OS_Key_F10, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("step_out"), {OS_Key_F11, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("halt"), {OS_Key_X, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("halt"), {OS_Key_Pause, 0 }}, -{str8_lit_comp("soft_halt_refresh"), {OS_Key_R, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("run"), {OS_Key_F5, 0 }}, -{str8_lit_comp("restart"), {OS_Key_F5, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("step_into"), {OS_Key_F11, 0 }}, -{str8_lit_comp("step_over"), {OS_Key_F10, 0 }}, -{str8_lit_comp("run_to_cursor"), {OS_Key_F10, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("set_next_statement"), {OS_Key_F10, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("inc_ui_font_scale"), {OS_Key_Equal, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("dec_ui_font_scale"), {OS_Key_Minus, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("inc_code_font_scale"), {OS_Key_Equal, 0 |OS_EventFlag_Shift |OS_EventFlag_Alt}}, -{str8_lit_comp("dec_code_font_scale"), {OS_Key_Minus, 0 |OS_EventFlag_Shift |OS_EventFlag_Alt}}, -{str8_lit_comp("window"), {OS_Key_N, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("toggle_fullscreen"), {OS_Key_Return, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("new_panel_right"), {OS_Key_P, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("new_panel_down"), {OS_Key_Minus, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("rotate_panel_columns"), {OS_Key_2, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("next_panel"), {OS_Key_Comma, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("prev_panel"), {OS_Key_Comma, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("focus_panel_right"), {OS_Key_Right, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}}, -{str8_lit_comp("focus_panel_left"), {OS_Key_Left, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}}, -{str8_lit_comp("focus_panel_up"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}}, -{str8_lit_comp("focus_panel_down"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}}, -{str8_lit_comp("undo"), {OS_Key_Z, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("redo"), {OS_Key_Y, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("go_back"), {OS_Key_Left, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("go_forward"), {OS_Key_Right, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("close_panel"), {OS_Key_P, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("next_tab"), {OS_Key_PageDown, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("prev_tab"), {OS_Key_PageUp, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("next_tab"), {OS_Key_Tab, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("prev_tab"), {OS_Key_Tab, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("move_tab_right"), {OS_Key_PageDown, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("move_tab_left"), {OS_Key_PageUp, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("close_tab"), {OS_Key_W, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("tab_bar_top"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}}, -{str8_lit_comp("tab_bar_bottom"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}}, -{str8_lit_comp("open"), {OS_Key_O, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("reload_active"), {OS_Key_R, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("switch"), {OS_Key_I, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("switch_to_partner_file"), {OS_Key_O, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("open_user"), {OS_Key_O, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}}, -{str8_lit_comp("open_project"), {OS_Key_O, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}}, -{str8_lit_comp("edit"), {OS_Key_F2, 0 }}, -{str8_lit_comp("accept"), {OS_Key_Return, 0 }}, -{str8_lit_comp("cancel"), {OS_Key_Esc, 0 }}, -{str8_lit_comp("move_left"), {OS_Key_Left, 0 }}, -{str8_lit_comp("move_right"), {OS_Key_Right, 0 }}, -{str8_lit_comp("move_up"), {OS_Key_Up, 0 }}, -{str8_lit_comp("move_down"), {OS_Key_Down, 0 }}, -{str8_lit_comp("move_left_select"), {OS_Key_Left, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("move_right_select"), {OS_Key_Right, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("move_up_select"), {OS_Key_Up, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("move_down_select"), {OS_Key_Down, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("move_left_chunk"), {OS_Key_Left, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("move_right_chunk"), {OS_Key_Right, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("move_up_chunk"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("move_down_chunk"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("move_up_page"), {OS_Key_PageUp, 0 }}, -{str8_lit_comp("move_down_page"), {OS_Key_PageDown, 0 }}, -{str8_lit_comp("move_up_whole"), {OS_Key_Home, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("move_down_whole"), {OS_Key_End, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("move_left_chunk_select"), {OS_Key_Left, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("move_right_chunk_select"), {OS_Key_Right, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("move_up_chunk_select"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("move_down_chunk_select"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("move_up_page_select"), {OS_Key_PageUp, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("move_down_page_select"), {OS_Key_PageDown, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("move_up_whole_select"), {OS_Key_Home, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("move_down_whole_select"), {OS_Key_End, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, -{str8_lit_comp("move_up_reorder"), {OS_Key_Up, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("move_down_reorder"), {OS_Key_Down, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("move_home"), {OS_Key_Home, 0 }}, -{str8_lit_comp("move_end"), {OS_Key_End, 0 }}, -{str8_lit_comp("move_home_select"), {OS_Key_Home, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("move_end_select"), {OS_Key_End, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("select_all"), {OS_Key_A, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("delete_single"), {OS_Key_Delete, 0 }}, -{str8_lit_comp("delete_chunk"), {OS_Key_Delete, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("backspace_single"), {OS_Key_Backspace, 0 }}, -{str8_lit_comp("backspace_chunk"), {OS_Key_Backspace, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("copy"), {OS_Key_C, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("copy"), {OS_Key_Insert, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("cut"), {OS_Key_X, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("paste"), {OS_Key_V, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("paste"), {OS_Key_Insert, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("insert_text"), {OS_Key_Null, 0 }}, -{str8_lit_comp("goto_line"), {OS_Key_G, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("goto_address"), {OS_Key_G, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("find_text_forward"), {OS_Key_F, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("find_text_backward"), {OS_Key_R, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("find_next"), {OS_Key_F3, 0 }}, -{str8_lit_comp("find_prev"), {OS_Key_F3, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("find_selected_thread"), {OS_Key_F4, 0 }}, -{str8_lit_comp("goto_name"), {OS_Key_J, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("goto_name_at_cursor"), {OS_Key_F12, 0 }}, -{str8_lit_comp("toggle_watch_expr_at_cursor"), {OS_Key_W, 0 |OS_EventFlag_Alt}}, -{str8_lit_comp("toggle_watch_expr_at_mouse"), {OS_Key_D, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("toggle_watch_pin_at_cursor"), {OS_Key_F9, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("toggle_breakpoint_cursor"), {OS_Key_F9, 0 }}, -{str8_lit_comp("add_target"), {OS_Key_T, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("attach"), {OS_Key_F6, 0 |OS_EventFlag_Shift }}, -{str8_lit_comp("filter"), {OS_Key_Slash, 0 |OS_EventFlag_Ctrl }}, -{str8_lit_comp("run_command"), {OS_Key_F1, 0 }}, -{str8_lit_comp("log_marker"), {OS_Key_M, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}}, -}; - -String8 df_g_binding_version_remap_old_name_table[7] = -{ -str8_lit_comp("commands"), -str8_lit_comp("load_user"), -str8_lit_comp("load_profile"), -str8_lit_comp("load_project"), -str8_lit_comp("open_profile"), -str8_lit_comp("address_breakpoint"), -str8_lit_comp("function_breakpoint"), -}; - -String8 df_g_binding_version_remap_new_name_table[7] = -{ -str8_lit_comp("run_command"), -str8_lit_comp("open_user"), -str8_lit_comp("open_profile"), -str8_lit_comp("open_project"), -str8_lit_comp("open_project"), -str8_lit_comp("add_address_breakpoint"), -str8_lit_comp("add_function_breakpoint"), -}; - -String8 df_g_icon_kind_text_table[69] = -{ -str8_lit_comp(""), -str8_lit_comp("b"), -str8_lit_comp("c"), -str8_lit_comp("B"), -str8_lit_comp("C"), -str8_lit_comp("f"), -str8_lit_comp("F"), -str8_lit_comp("g"), -str8_lit_comp("h"), -str8_lit_comp("r"), -str8_lit_comp("s"), -str8_lit_comp("i"), -str8_lit_comp("w"), -str8_lit_comp("W"), -str8_lit_comp("k"), -str8_lit_comp("K"), -str8_lit_comp("L"), -str8_lit_comp("R"), -str8_lit_comp("U"), -str8_lit_comp("D"), -str8_lit_comp("G"), -str8_lit_comp("P"), -str8_lit_comp("3"), -str8_lit_comp("p"), -str8_lit_comp("O"), -str8_lit_comp("o"), -str8_lit_comp("!"), -str8_lit_comp("1"), -str8_lit_comp("<"), -str8_lit_comp(">"), -str8_lit_comp("^"), -str8_lit_comp("v"), -str8_lit_comp("9"), -str8_lit_comp("0"), -str8_lit_comp("7"), -str8_lit_comp("8"), -str8_lit_comp("+"), -str8_lit_comp("-"), -str8_lit_comp("'"), -str8_lit_comp("\""), -str8_lit_comp("M"), -str8_lit_comp("."), -str8_lit_comp("x"), -str8_lit_comp("q"), -str8_lit_comp("j"), -str8_lit_comp("u"), -str8_lit_comp("m"), -str8_lit_comp("n"), -str8_lit_comp("l"), -str8_lit_comp("a"), -str8_lit_comp("z"), -str8_lit_comp("y"), -str8_lit_comp("X"), -str8_lit_comp("Y"), -str8_lit_comp("S"), -str8_lit_comp("T"), -str8_lit_comp("Z"), -str8_lit_comp("d"), -str8_lit_comp("N"), -str8_lit_comp("E"), -str8_lit_comp("H"), -str8_lit_comp("e"), -str8_lit_comp("I"), -str8_lit_comp("J"), -str8_lit_comp("A"), -str8_lit_comp("?"), -str8_lit_comp("4"), -str8_lit_comp("5"), -str8_lit_comp("c"), -}; - -String8 df_view_kind_name_lower_table[34] = -{ -str8_lit_comp("null"), -str8_lit_comp("empty"), -str8_lit_comp("getting_started"), -str8_lit_comp("commands"), -str8_lit_comp("file_system"), -str8_lit_comp("system_processes"), -str8_lit_comp("entity_lister"), -str8_lit_comp("symbol_lister"), -str8_lit_comp("target"), -str8_lit_comp("targets"), -str8_lit_comp("file_path_map"), -str8_lit_comp("auto_view_rules"), -str8_lit_comp("breakpoints"), -str8_lit_comp("watch_pins"), -str8_lit_comp("scheduler"), -str8_lit_comp("call_stack"), -str8_lit_comp("modules"), -str8_lit_comp("watch"), -str8_lit_comp("locals"), -str8_lit_comp("registers"), -str8_lit_comp("globals"), -str8_lit_comp("thread_locals"), -str8_lit_comp("types"), -str8_lit_comp("procedures"), -str8_lit_comp("pending_file"), -str8_lit_comp("text"), -str8_lit_comp("disasm"), -str8_lit_comp("output"), -str8_lit_comp("memory"), -str8_lit_comp("bitmap"), -str8_lit_comp("color_rgba"), -str8_lit_comp("geo3d"), -str8_lit_comp("exception_filters"), -str8_lit_comp("settings"), -}; - -DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[34] = -{ -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("null"), str8_lit_comp(""), DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(null), DF_VIEW_CMD_FUNCTION_NAME(null), DF_VIEW_UI_FUNCTION_NAME(null)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("empty"), str8_lit_comp(""), DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(empty), DF_VIEW_CMD_FUNCTION_NAME(empty), DF_VIEW_UI_FUNCTION_NAME(empty)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("getting_started"), str8_lit_comp("Getting Started"), DF_IconKind_QuestionMark, DF_VIEW_SETUP_FUNCTION_NAME(getting_started), DF_VIEW_CMD_FUNCTION_NAME(getting_started), DF_VIEW_UI_FUNCTION_NAME(getting_started)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("commands"), str8_lit_comp("Commands"), DF_IconKind_List, DF_VIEW_SETUP_FUNCTION_NAME(commands), DF_VIEW_CMD_FUNCTION_NAME(commands), DF_VIEW_UI_FUNCTION_NAME(commands)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_system"), str8_lit_comp("File System"), DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(file_system), DF_VIEW_CMD_FUNCTION_NAME(file_system), DF_VIEW_UI_FUNCTION_NAME(file_system)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("system_processes"), str8_lit_comp("System Processes"), DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(system_processes), DF_VIEW_CMD_FUNCTION_NAME(system_processes), DF_VIEW_UI_FUNCTION_NAME(system_processes)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("entity_lister"), str8_lit_comp("Entity List"), DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(entity_lister), DF_VIEW_CMD_FUNCTION_NAME(entity_lister), DF_VIEW_UI_FUNCTION_NAME(entity_lister)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("symbol_lister"), str8_lit_comp("Symbols"), DF_IconKind_Null, DF_VIEW_SETUP_FUNCTION_NAME(symbol_lister), DF_VIEW_CMD_FUNCTION_NAME(symbol_lister), DF_VIEW_UI_FUNCTION_NAME(symbol_lister)}, -{(0|1*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("target"), str8_lit_comp("Target"), DF_IconKind_Target, DF_VIEW_SETUP_FUNCTION_NAME(target), DF_VIEW_CMD_FUNCTION_NAME(target), DF_VIEW_UI_FUNCTION_NAME(target)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("targets"), str8_lit_comp("Targets"), DF_IconKind_Target, DF_VIEW_SETUP_FUNCTION_NAME(targets), DF_VIEW_CMD_FUNCTION_NAME(targets), DF_VIEW_UI_FUNCTION_NAME(targets)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_path_map"), str8_lit_comp("File Path Map"), DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(file_path_map), DF_VIEW_CMD_FUNCTION_NAME(file_path_map), DF_VIEW_UI_FUNCTION_NAME(file_path_map)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rules"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(auto_view_rules), DF_VIEW_CMD_FUNCTION_NAME(auto_view_rules), DF_VIEW_UI_FUNCTION_NAME(auto_view_rules)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("breakpoints"), str8_lit_comp("Breakpoints"), DF_IconKind_CircleFilled, DF_VIEW_SETUP_FUNCTION_NAME(breakpoints), DF_VIEW_CMD_FUNCTION_NAME(breakpoints), DF_VIEW_UI_FUNCTION_NAME(breakpoints)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("watch_pins"), str8_lit_comp("Watch Pins"), DF_IconKind_Pin, DF_VIEW_SETUP_FUNCTION_NAME(watch_pins), DF_VIEW_CMD_FUNCTION_NAME(watch_pins), DF_VIEW_UI_FUNCTION_NAME(watch_pins)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("scheduler"), str8_lit_comp("Scheduler"), DF_IconKind_Scheduler, DF_VIEW_SETUP_FUNCTION_NAME(scheduler), DF_VIEW_CMD_FUNCTION_NAME(scheduler), DF_VIEW_UI_FUNCTION_NAME(scheduler)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("call_stack"), str8_lit_comp("Call Stack"), DF_IconKind_Thread, DF_VIEW_SETUP_FUNCTION_NAME(call_stack), DF_VIEW_CMD_FUNCTION_NAME(call_stack), DF_VIEW_UI_FUNCTION_NAME(call_stack)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("modules"), str8_lit_comp("Modules"), DF_IconKind_Module, DF_VIEW_SETUP_FUNCTION_NAME(modules), DF_VIEW_CMD_FUNCTION_NAME(modules), DF_VIEW_UI_FUNCTION_NAME(modules)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("watch"), str8_lit_comp("Watch"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(watch), DF_VIEW_CMD_FUNCTION_NAME(watch), DF_VIEW_UI_FUNCTION_NAME(watch)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("locals"), str8_lit_comp("Locals"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(locals), DF_VIEW_CMD_FUNCTION_NAME(locals), DF_VIEW_UI_FUNCTION_NAME(locals)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("registers"), str8_lit_comp("Registers"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(registers), DF_VIEW_CMD_FUNCTION_NAME(registers), DF_VIEW_UI_FUNCTION_NAME(registers)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("globals"), str8_lit_comp("Globals"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(globals), DF_VIEW_CMD_FUNCTION_NAME(globals), DF_VIEW_UI_FUNCTION_NAME(globals)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("thread_locals"), str8_lit_comp("Thread Locals"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(thread_locals), DF_VIEW_CMD_FUNCTION_NAME(thread_locals), DF_VIEW_UI_FUNCTION_NAME(thread_locals)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("types"), str8_lit_comp("Types"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(types), DF_VIEW_CMD_FUNCTION_NAME(types), DF_VIEW_UI_FUNCTION_NAME(types)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("procedures"), str8_lit_comp("Procedures"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(procedures), DF_VIEW_CMD_FUNCTION_NAME(procedures), DF_VIEW_UI_FUNCTION_NAME(procedures)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|0*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("pending_file"), str8_lit_comp("Pending File"), DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(pending_file), DF_VIEW_CMD_FUNCTION_NAME(pending_file), DF_VIEW_UI_FUNCTION_NAME(pending_file)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|1*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("text"), str8_lit_comp("Text"), DF_IconKind_FileOutline, DF_VIEW_SETUP_FUNCTION_NAME(text), DF_VIEW_CMD_FUNCTION_NAME(text), DF_VIEW_UI_FUNCTION_NAME(text)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), DF_IconKind_Glasses, DF_VIEW_SETUP_FUNCTION_NAME(disasm), DF_VIEW_CMD_FUNCTION_NAME(disasm), DF_VIEW_UI_FUNCTION_NAME(disasm)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("output"), str8_lit_comp("Output"), DF_IconKind_List, DF_VIEW_SETUP_FUNCTION_NAME(output), DF_VIEW_CMD_FUNCTION_NAME(output), DF_VIEW_UI_FUNCTION_NAME(output)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("memory"), str8_lit_comp("Memory"), DF_IconKind_Grid, DF_VIEW_SETUP_FUNCTION_NAME(memory), DF_VIEW_CMD_FUNCTION_NAME(memory), DF_VIEW_UI_FUNCTION_NAME(memory)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(bitmap), DF_VIEW_CMD_FUNCTION_NAME(bitmap), DF_VIEW_UI_FUNCTION_NAME(bitmap)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("color_rgba"), str8_lit_comp("Color (RGBA)"), DF_IconKind_Palette, DF_VIEW_SETUP_FUNCTION_NAME(color_rgba), DF_VIEW_CMD_FUNCTION_NAME(color_rgba), DF_VIEW_UI_FUNCTION_NAME(color_rgba)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|0*DF_ViewSpecFlag_CanFilter|1*DF_ViewSpecFlag_FilterIsCode|0*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("geo3d"), str8_lit_comp("Geometry (3D)"), DF_IconKind_Binoculars, DF_VIEW_SETUP_FUNCTION_NAME(geo3d), DF_VIEW_CMD_FUNCTION_NAME(geo3d), DF_VIEW_UI_FUNCTION_NAME(geo3d)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("exception_filters"), str8_lit_comp("Exception Filters"), DF_IconKind_Gear, DF_VIEW_SETUP_FUNCTION_NAME(exception_filters), DF_VIEW_CMD_FUNCTION_NAME(exception_filters), DF_VIEW_UI_FUNCTION_NAME(exception_filters)}, -{(0|0*DF_ViewSpecFlag_ParameterizedByEntity|0*DF_ViewSpecFlag_ProjectSpecific|1*DF_ViewSpecFlag_CanSerialize|1*DF_ViewSpecFlag_CanFilter|0*DF_ViewSpecFlag_FilterIsCode|1*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("settings"), str8_lit_comp("Settings"), DF_IconKind_Gear, DF_VIEW_SETUP_FUNCTION_NAME(settings), DF_VIEW_CMD_FUNCTION_NAME(settings), DF_VIEW_UI_FUNCTION_NAME(settings)}, -}; - -DF_IconKind df_entity_kind_icon_kind_table[30] = -{ -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Machine, -DF_IconKind_FileOutline, -DF_IconKind_Binoculars, -DF_IconKind_FileOutline, -DF_IconKind_Pin, -DF_IconKind_Binoculars, -DF_IconKind_Binoculars, -DF_IconKind_CircleFilled, -DF_IconKind_CircleFilled, -DF_IconKind_Null, -DF_IconKind_Target, -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Window, -DF_IconKind_XSplit, -DF_IconKind_Null, -DF_IconKind_Briefcase, -DF_IconKind_Null, -DF_IconKind_Null, -DF_IconKind_Threads, -DF_IconKind_Thread, -DF_IconKind_Module, -DF_IconKind_Threads, -DF_IconKind_Module, -DF_IconKind_Null, -DF_IconKind_Null, -}; - -DF_ViewRuleSpecInfo df_g_gfx_view_rule_spec_info_table[32] = -{ -{ str8_lit_comp("Empty"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("GettingStarted"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("ExceptionFilters"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Settings"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("PendingFile"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Commands"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("FileSystem"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("SystemProcesses"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("EntityLister"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("SymbolLister"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Watch"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Locals"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Registers"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Globals"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("ThreadLocals"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Types"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Procedures"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Targets"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("FilePathMap"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("AutoViewRules"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Breakpoints"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("WatchPins"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Scheduler"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("CallStack"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Modules"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Text"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Disasm"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Output"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Memory"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Bitmap"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("ColorRGBA"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -{ str8_lit_comp("Geo3D"), (DF_ViewRuleSpecInfoFlag_VizRowProd*0)|(DF_ViewRuleSpecInfoFlag_LineStringize*0)|(DF_ViewRuleSpecInfoFlag_RowUI*0)|(DF_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, -}; - -String8 df_g_theme_preset_display_string_table[9] = -{ -str8_lit_comp("Default (Dark)"), -str8_lit_comp("Default (Light)"), -str8_lit_comp("VS (Dark)"), -str8_lit_comp("VS (Light)"), -str8_lit_comp("Solarized (Dark)"), -str8_lit_comp("Solarized (Light)"), -str8_lit_comp("Handmade Hero"), -str8_lit_comp("4coder"), -str8_lit_comp("Far Manager"), -}; - -String8 df_g_theme_preset_code_string_table[9] = -{ -str8_lit_comp("default_dark"), -str8_lit_comp("default_light"), -str8_lit_comp("vs_dark"), -str8_lit_comp("vs_light"), -str8_lit_comp("solarized_dark"), -str8_lit_comp("solarized_light"), -str8_lit_comp("handmade_hero"), -str8_lit_comp("four_coder"), -str8_lit_comp("far_manager"), -}; - -String8 df_g_theme_color_version_remap_old_name_table[22] = -{ -str8_lit_comp("plain_text"), -str8_lit_comp("plain_background"), -str8_lit_comp("plain_border"), -str8_lit_comp("plain_overlay"), -str8_lit_comp("code_function"), -str8_lit_comp("code_symbol"), -str8_lit_comp("code_numeric"), -str8_lit_comp("line_info_0"), -str8_lit_comp("line_info_1"), -str8_lit_comp("line_info_2"), -str8_lit_comp("line_info_3"), -str8_lit_comp("alt_background"), -str8_lit_comp("alt_border"), -str8_lit_comp("tab_inactive"), -str8_lit_comp("tab_active"), -str8_lit_comp("weak_text"), -str8_lit_comp("text_selection"), -str8_lit_comp("cursor"), -str8_lit_comp("highlight_0"), -str8_lit_comp("success_background"), -str8_lit_comp("failure_background"), -str8_lit_comp("action_background"), -}; - -String8 df_g_theme_color_version_remap_new_name_table[22] = -{ -str8_lit_comp("text"), -str8_lit_comp("base_background"), -str8_lit_comp("base_border"), -str8_lit_comp("drop_site_overlay"), -str8_lit_comp("code_symbol"), -str8_lit_comp("code_delimiter_operator"), -str8_lit_comp("code_numeric_alt_digit_group"), -str8_lit_comp("line_info_background_0"), -str8_lit_comp("line_info_background_1"), -str8_lit_comp("line_info_background_2"), -str8_lit_comp("line_info_background_3"), -str8_lit_comp("menu_bar_background"), -str8_lit_comp("menu_bar_border"), -str8_lit_comp("tab_background_inactive"), -str8_lit_comp("tab_background"), -str8_lit_comp("text_weak"), -str8_lit_comp("selection"), -str8_lit_comp("cursor"), -str8_lit_comp("focus"), -str8_lit_comp("positive_pop_button_background"), -str8_lit_comp("negative_pop_button_background"), -str8_lit_comp("neutral_pop_button_background"), -}; - -Vec4F32 df_g_theme_preset_colors__default_dark[75] = -{ -rgba_from_u32_lit_comp(0xff00ffff), -rgba_from_u32_lit_comp(0xe5e5e5ff), -rgba_from_u32_lit_comp(0x4dc221ff), -rgba_from_u32_lit_comp(0xc56452ff), -rgba_from_u32_lit_comp(0x307eb2ff), -rgba_from_u32_lit_comp(0xa4a4a4fe), -rgba_from_u32_lit_comp(0x8aff00ff), -rgba_from_u32_lit_comp(0xb23217ff), -rgba_from_u32_lit_comp(0xfda200ff), -rgba_from_u32_lit_comp(0xffffffff), -rgba_from_u32_lit_comp(0x0000007f), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0xffffff0c), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0x99ccff4c), -rgba_from_u32_lit_comp(0xffffff1e), -rgba_from_u32_lit_comp(0x5f12005f), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0x2b2b2bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x3e4c577f), -rgba_from_u32_lit_comp(0x3e4c577f), -rgba_from_u32_lit_comp(0xffffff19), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x2c5b36ff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x803425ff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x355b6eff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x2b2b2bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x6f5135fe), -rgba_from_u32_lit_comp(0xfefefe4d), -rgba_from_u32_lit_comp(0x3e4c577f), -rgba_from_u32_lit_comp(0xffffff19), -rgba_from_u32_lit_comp(0xcbcbcbff), -rgba_from_u32_lit_comp(0x42a2cffe), -rgba_from_u32_lit_comp(0xfec746ff), -rgba_from_u32_lit_comp(0x98bc80ff), -rgba_from_u32_lit_comp(0xb7afd5ff), -rgba_from_u32_lit_comp(0xb38d4cff), -rgba_from_u32_lit_comp(0x767676ff), -rgba_from_u32_lit_comp(0x98abb1ff), -rgba_from_u32_lit_comp(0x738287ff), -rgba_from_u32_lit_comp(0x98abb1ff), -rgba_from_u32_lit_comp(0xd96759ff), -rgba_from_u32_lit_comp(0x717171ff), -rgba_from_u32_lit_comp(0x7f7f7fff), -rgba_from_u32_lit_comp(0xbebebeff), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0xffcb7fff), -rgba_from_u32_lit_comp(0xb2ff65ff), -rgba_from_u32_lit_comp(0xff99e5ff), -rgba_from_u32_lit_comp(0x6598ffff), -rgba_from_u32_lit_comp(0x65ffcbff), -rgba_from_u32_lit_comp(0xff9819ff), -rgba_from_u32_lit_comp(0x9932ffff), -rgba_from_u32_lit_comp(0x65ff4cff), -rgba_from_u32_lit_comp(0xb2ccd8ff), -rgba_from_u32_lit_comp(0xb23219ff), -rgba_from_u32_lit_comp(0xa72911ff), -}; - -Vec4F32 df_g_theme_preset_colors__default_light[75] = -{ -rgba_from_u32_lit_comp(0xff00ffff), -rgba_from_u32_lit_comp(0x4c4c4cff), -rgba_from_u32_lit_comp(0x4d9e2eff), -rgba_from_u32_lit_comp(0xbd371eff), -rgba_from_u32_lit_comp(0x0064a7ff), -rgba_from_u32_lit_comp(0x4c4c4cff), -rgba_from_u32_lit_comp(0x699830ff), -rgba_from_u32_lit_comp(0xb23217ff), -rgba_from_u32_lit_comp(0x9c5900ff), -rgba_from_u32_lit_comp(0xffffffff), -rgba_from_u32_lit_comp(0x0000004c), -rgba_from_u32_lit_comp(0xa6a6a63f), -rgba_from_u32_lit_comp(0x4848480c), -rgba_from_u32_lit_comp(0xa4a4a43f), -rgba_from_u32_lit_comp(0x003d7a48), -rgba_from_u32_lit_comp(0xffffff1e), -rgba_from_u32_lit_comp(0xff30005f), -rgba_from_u32_lit_comp(0xccccccfe), -rgba_from_u32_lit_comp(0x2b2b2bfe), -rgba_from_u32_lit_comp(0xa4a4a4fe), -rgba_from_u32_lit_comp(0xeaeaea7f), -rgba_from_u32_lit_comp(0x3e4c577f), -rgba_from_u32_lit_comp(0xa4a4a4fe), -rgba_from_u32_lit_comp(0xccccccc0), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0xa4a4a4fe), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x65f534ff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0xff694cff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0xa6becaff), -rgba_from_u32_lit_comp(0xa6a6a6fd), -rgba_from_u32_lit_comp(0xa9a9a9fe), -rgba_from_u32_lit_comp(0xc0c0c0fe), -rgba_from_u32_lit_comp(0xa98b6fff), -rgba_from_u32_lit_comp(0xffffff4d), -rgba_from_u32_lit_comp(0x8282827f), -rgba_from_u32_lit_comp(0xffffff19), -rgba_from_u32_lit_comp(0x4d4d4dff), -rgba_from_u32_lit_comp(0x205670fe), -rgba_from_u32_lit_comp(0x996b00ff), -rgba_from_u32_lit_comp(0x446a2bff), -rgba_from_u32_lit_comp(0x4c35a1ff), -rgba_from_u32_lit_comp(0x573700ff), -rgba_from_u32_lit_comp(0x767676ff), -rgba_from_u32_lit_comp(0x3f6e7dff), -rgba_from_u32_lit_comp(0x1f4450ff), -rgba_from_u32_lit_comp(0x3c606bff), -rgba_from_u32_lit_comp(0xad3627ff), -rgba_from_u32_lit_comp(0x4b4b4bff), -rgba_from_u32_lit_comp(0x4b4b4bff), -rgba_from_u32_lit_comp(0x000000ff), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x945800ff), -rgba_from_u32_lit_comp(0x3f5b23ff), -rgba_from_u32_lit_comp(0x642a55ff), -rgba_from_u32_lit_comp(0x30456fff), -rgba_from_u32_lit_comp(0x264f41ff), -rgba_from_u32_lit_comp(0x736a5fff), -rgba_from_u32_lit_comp(0x472f5eff), -rgba_from_u32_lit_comp(0x405d3bff), -rgba_from_u32_lit_comp(0x49606aff), -rgba_from_u32_lit_comp(0xb23219ff), -rgba_from_u32_lit_comp(0xff2800ff), -}; - -Vec4F32 df_g_theme_preset_colors__vs_dark[75] = -{ -rgba_from_u32_lit_comp(0xff00ffff), -rgba_from_u32_lit_comp(0xe5e5e5ff), -rgba_from_u32_lit_comp(0x4dc221ff), -rgba_from_u32_lit_comp(0xc56452ff), -rgba_from_u32_lit_comp(0x307eb2ff), -rgba_from_u32_lit_comp(0xa4a4a4fe), -rgba_from_u32_lit_comp(0x8aff00ff), -rgba_from_u32_lit_comp(0xb23217ff), -rgba_from_u32_lit_comp(0xfda200ff), -rgba_from_u32_lit_comp(0xffffffff), -rgba_from_u32_lit_comp(0x0000007f), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0xffffff0c), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0x99ccff4c), -rgba_from_u32_lit_comp(0xffffff1e), -rgba_from_u32_lit_comp(0x5f12005f), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x1b1b1bfd), -rgba_from_u32_lit_comp(0x1b1b1bfd), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x2c5b36ff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x803425ff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x355b6eff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x2b2b2bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x0079ccff), -rgba_from_u32_lit_comp(0xfefefe4d), -rgba_from_u32_lit_comp(0xfefefe14), -rgba_from_u32_lit_comp(0xffffff00), -rgba_from_u32_lit_comp(0xcbcbcbff), -rgba_from_u32_lit_comp(0xdcdcaaff), -rgba_from_u32_lit_comp(0x4ec9afff), -rgba_from_u32_lit_comp(0x9cdbfeff), -rgba_from_u32_lit_comp(0xb7afd5ff), -rgba_from_u32_lit_comp(0x569cd6ff), -rgba_from_u32_lit_comp(0x767676ff), -rgba_from_u32_lit_comp(0xb5cea8ff), -rgba_from_u32_lit_comp(0x729360ff), -rgba_from_u32_lit_comp(0xd59b85ff), -rgba_from_u32_lit_comp(0xd59c85ff), -rgba_from_u32_lit_comp(0x57a54aff), -rgba_from_u32_lit_comp(0x2a91afff), -rgba_from_u32_lit_comp(0x9ddaecff), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0xffcb7fff), -rgba_from_u32_lit_comp(0xb2ff65ff), -rgba_from_u32_lit_comp(0xff99e5ff), -rgba_from_u32_lit_comp(0x6598ffff), -rgba_from_u32_lit_comp(0x65ffcbff), -rgba_from_u32_lit_comp(0xff9819ff), -rgba_from_u32_lit_comp(0x9932ffff), -rgba_from_u32_lit_comp(0x65ff4cff), -rgba_from_u32_lit_comp(0xb2ccd8ff), -rgba_from_u32_lit_comp(0xb23219ff), -rgba_from_u32_lit_comp(0xa72911ff), -}; - -Vec4F32 df_g_theme_preset_colors__vs_light[75] = -{ -rgba_from_u32_lit_comp(0xff00ffff), -rgba_from_u32_lit_comp(0x000000ff), -rgba_from_u32_lit_comp(0x4dc221ff), -rgba_from_u32_lit_comp(0xc46451ff), -rgba_from_u32_lit_comp(0x307eb2ff), -rgba_from_u32_lit_comp(0x0000007f), -rgba_from_u32_lit_comp(0x000000ff), -rgba_from_u32_lit_comp(0xb23217ff), -rgba_from_u32_lit_comp(0x002affff), -rgba_from_u32_lit_comp(0x000000ff), -rgba_from_u32_lit_comp(0xa3a3a37e), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0x0000000c), -rgba_from_u32_lit_comp(0xfefefe53), -rgba_from_u32_lit_comp(0x3d74ab4b), -rgba_from_u32_lit_comp(0x0000001e), -rgba_from_u32_lit_comp(0x5f12005f), -rgba_from_u32_lit_comp(0xfefefefe), -rgba_from_u32_lit_comp(0xe7e7e7fe), -rgba_from_u32_lit_comp(0xb6b6b6ff), -rgba_from_u32_lit_comp(0xffffff7f), -rgba_from_u32_lit_comp(0xffffff7f), -rgba_from_u32_lit_comp(0xb6b6b6ff), -rgba_from_u32_lit_comp(0xfefefec7), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0xb6b6b6ff), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0xb6b6b6ff), -rgba_from_u32_lit_comp(0x84ce93ff), -rgba_from_u32_lit_comp(0xb6b6b6ff), -rgba_from_u32_lit_comp(0xbd3e24ff), -rgba_from_u32_lit_comp(0xb6b6b6ff), -rgba_from_u32_lit_comp(0x6e9db5ff), -rgba_from_u32_lit_comp(0xb6b6b6ff), -rgba_from_u32_lit_comp(0xe8e8e8fe), -rgba_from_u32_lit_comp(0xb6b6b6ff), -rgba_from_u32_lit_comp(0xfffffffe), -rgba_from_u32_lit_comp(0xb6b6b6ff), -rgba_from_u32_lit_comp(0xcdd4dc7f), -rgba_from_u32_lit_comp(0xb6b6b6ff), -rgba_from_u32_lit_comp(0x000000ff), -rgba_from_u32_lit_comp(0x000000ff), -rgba_from_u32_lit_comp(0xa33700ff), -rgba_from_u32_lit_comp(0x007666ff), -rgba_from_u32_lit_comp(0xb7afd5ff), -rgba_from_u32_lit_comp(0x0000ffff), -rgba_from_u32_lit_comp(0x767676ff), -rgba_from_u32_lit_comp(0x088658ff), -rgba_from_u32_lit_comp(0x0c3828ff), -rgba_from_u32_lit_comp(0xa31414ff), -rgba_from_u32_lit_comp(0x0000ffff), -rgba_from_u32_lit_comp(0x008000ff), -rgba_from_u32_lit_comp(0x227893ff), -rgba_from_u32_lit_comp(0x123d4bfe), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x945800ff), -rgba_from_u32_lit_comp(0x3f5b23ff), -rgba_from_u32_lit_comp(0x642a55ff), -rgba_from_u32_lit_comp(0x30456fff), -rgba_from_u32_lit_comp(0x264f41ff), -rgba_from_u32_lit_comp(0x736a5fff), -rgba_from_u32_lit_comp(0x472f5eff), -rgba_from_u32_lit_comp(0x405d3bff), -rgba_from_u32_lit_comp(0x49606aff), -rgba_from_u32_lit_comp(0xb23219ff), -rgba_from_u32_lit_comp(0xa72911ff), -}; - -Vec4F32 df_g_theme_preset_colors__solarized_dark[75] = -{ -rgba_from_u32_lit_comp(0xff00ffff), -rgba_from_u32_lit_comp(0x999999ff), -rgba_from_u32_lit_comp(0x4dc221ff), -rgba_from_u32_lit_comp(0xc56452ff), -rgba_from_u32_lit_comp(0x307eb2ff), -rgba_from_u32_lit_comp(0x9999998a), -rgba_from_u32_lit_comp(0x8aff00ff), -rgba_from_u32_lit_comp(0xb23217ff), -rgba_from_u32_lit_comp(0xfda200ff), -rgba_from_u32_lit_comp(0xffffffff), -rgba_from_u32_lit_comp(0x0000007f), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0xffffff0c), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0x99ccff4c), -rgba_from_u32_lit_comp(0xffffff1e), -rgba_from_u32_lit_comp(0x5f12005f), -rgba_from_u32_lit_comp(0x002a35fe), -rgba_from_u32_lit_comp(0x2b2b2bfe), -rgba_from_u32_lit_comp(0xfefefe3a), -rgba_from_u32_lit_comp(0x00202bff), -rgba_from_u32_lit_comp(0x3e4c577f), -rgba_from_u32_lit_comp(0xffffff19), -rgba_from_u32_lit_comp(0x007fa14e), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0xfdfdfd3a), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0xfefefe3a), -rgba_from_u32_lit_comp(0x2c5b36ff), -rgba_from_u32_lit_comp(0xfefefe3a), -rgba_from_u32_lit_comp(0x803425ff), -rgba_from_u32_lit_comp(0xfefefe3a), -rgba_from_u32_lit_comp(0x355b6eff), -rgba_from_u32_lit_comp(0xfefefe3a), -rgba_from_u32_lit_comp(0x005e77fe), -rgba_from_u32_lit_comp(0xfefefe3a), -rgba_from_u32_lit_comp(0x005e77fe), -rgba_from_u32_lit_comp(0xfefefe4d), -rgba_from_u32_lit_comp(0x3e4c577f), -rgba_from_u32_lit_comp(0xffffff19), -rgba_from_u32_lit_comp(0xcbcbcbff), -rgba_from_u32_lit_comp(0xcb4a15ff), -rgba_from_u32_lit_comp(0xcb4a15ff), -rgba_from_u32_lit_comp(0x98bc80ff), -rgba_from_u32_lit_comp(0xb7afd5ff), -rgba_from_u32_lit_comp(0x849803ff), -rgba_from_u32_lit_comp(0x767676ff), -rgba_from_u32_lit_comp(0xd33582ff), -rgba_from_u32_lit_comp(0x902559ff), -rgba_from_u32_lit_comp(0x1f9d91ff), -rgba_from_u32_lit_comp(0x839802ff), -rgba_from_u32_lit_comp(0x556a6fff), -rgba_from_u32_lit_comp(0x566c73ff), -rgba_from_u32_lit_comp(0xa2aaacff), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0xffcb7fff), -rgba_from_u32_lit_comp(0xb2ff65ff), -rgba_from_u32_lit_comp(0xff99e5ff), -rgba_from_u32_lit_comp(0x6598ffff), -rgba_from_u32_lit_comp(0x65ffcbff), -rgba_from_u32_lit_comp(0xff9819ff), -rgba_from_u32_lit_comp(0x9932ffff), -rgba_from_u32_lit_comp(0x65ff4cff), -rgba_from_u32_lit_comp(0xb2ccd8ff), -rgba_from_u32_lit_comp(0xb23219ff), -rgba_from_u32_lit_comp(0xa72911ff), -}; - -Vec4F32 df_g_theme_preset_colors__solarized_light[75] = -{ -rgba_from_u32_lit_comp(0xff00ffff), -rgba_from_u32_lit_comp(0x333333ff), -rgba_from_u32_lit_comp(0x4dc221ff), -rgba_from_u32_lit_comp(0xc56452ff), -rgba_from_u32_lit_comp(0x307eb2ff), -rgba_from_u32_lit_comp(0x818181ff), -rgba_from_u32_lit_comp(0x586e75ff), -rgba_from_u32_lit_comp(0xb23217ff), -rgba_from_u32_lit_comp(0x92743dff), -rgba_from_u32_lit_comp(0x747474ff), -rgba_from_u32_lit_comp(0xc9bfa394), -rgba_from_u32_lit_comp(0xe4dac090), -rgba_from_u32_lit_comp(0xffffff0c), -rgba_from_u32_lit_comp(0x0000001c), -rgba_from_u32_lit_comp(0x678cb24c), -rgba_from_u32_lit_comp(0xffffff1e), -rgba_from_u32_lit_comp(0x5f12005f), -rgba_from_u32_lit_comp(0xfcf5e2fe), -rgba_from_u32_lit_comp(0x2b2b2bfe), -rgba_from_u32_lit_comp(0xbebaabfe), -rgba_from_u32_lit_comp(0xeee8d5ff), -rgba_from_u32_lit_comp(0x3e4c577f), -rgba_from_u32_lit_comp(0xbebaabfe), -rgba_from_u32_lit_comp(0xffffff7c), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0xbebaabfe), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0xbdb9aa00), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0xbebaabfe), -rgba_from_u32_lit_comp(0xb6ddbeff), -rgba_from_u32_lit_comp(0xbebaabfe), -rgba_from_u32_lit_comp(0xf8b0a1ff), -rgba_from_u32_lit_comp(0xbebaabfe), -rgba_from_u32_lit_comp(0xb2d3e3ff), -rgba_from_u32_lit_comp(0xbebaabfe), -rgba_from_u32_lit_comp(0xe3dbc7fe), -rgba_from_u32_lit_comp(0xbebaabfe), -rgba_from_u32_lit_comp(0xfdf6e3ff), -rgba_from_u32_lit_comp(0xbebaabfe), -rgba_from_u32_lit_comp(0xd4cfc0fe), -rgba_from_u32_lit_comp(0xbebaabfe), -rgba_from_u32_lit_comp(0x657b83ff), -rgba_from_u32_lit_comp(0xcb4a15ff), -rgba_from_u32_lit_comp(0xcb4a15ff), -rgba_from_u32_lit_comp(0x258ad2ff), -rgba_from_u32_lit_comp(0x373345ff), -rgba_from_u32_lit_comp(0x586e75ff), -rgba_from_u32_lit_comp(0x767676ff), -rgba_from_u32_lit_comp(0xd33482ef), -rgba_from_u32_lit_comp(0x8e2659ff), -rgba_from_u32_lit_comp(0x29a198ff), -rgba_from_u32_lit_comp(0xd96759ff), -rgba_from_u32_lit_comp(0x93a1a1ff), -rgba_from_u32_lit_comp(0x227893ef), -rgba_from_u32_lit_comp(0x111e22ef), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x945800ff), -rgba_from_u32_lit_comp(0x3f5b23ff), -rgba_from_u32_lit_comp(0x642a55ff), -rgba_from_u32_lit_comp(0x30456fff), -rgba_from_u32_lit_comp(0x264f41ff), -rgba_from_u32_lit_comp(0x736a5fff), -rgba_from_u32_lit_comp(0x472f5eff), -rgba_from_u32_lit_comp(0x405d3bff), -rgba_from_u32_lit_comp(0x49606aff), -rgba_from_u32_lit_comp(0xb23218ff), -rgba_from_u32_lit_comp(0xff684bff), -}; - -Vec4F32 df_g_theme_preset_colors__handmade_hero[75] = -{ -rgba_from_u32_lit_comp(0xff00ffff), -rgba_from_u32_lit_comp(0xa08462ff), -rgba_from_u32_lit_comp(0x4dc221ff), -rgba_from_u32_lit_comp(0xc56452ff), -rgba_from_u32_lit_comp(0x307eb2ff), -rgba_from_u32_lit_comp(0x6e512eff), -rgba_from_u32_lit_comp(0x8aff00ff), -rgba_from_u32_lit_comp(0xb23217ff), -rgba_from_u32_lit_comp(0xfda200ff), -rgba_from_u32_lit_comp(0xffffffff), -rgba_from_u32_lit_comp(0x0000007f), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0xffffff0c), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0x99ccff4c), -rgba_from_u32_lit_comp(0xffffff1e), -rgba_from_u32_lit_comp(0x5f12005f), -rgba_from_u32_lit_comp(0x0c0c0cfe), -rgba_from_u32_lit_comp(0x2b2b2bfe), -rgba_from_u32_lit_comp(0x423525fe), -rgba_from_u32_lit_comp(0x0c0c0cfe), -rgba_from_u32_lit_comp(0x3e4c577f), -rgba_from_u32_lit_comp(0xffffff19), -rgba_from_u32_lit_comp(0x0c0c0c32), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0x423425fe), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x132e19ff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x803425ff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x15445cff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x1f1f27fe), -rgba_from_u32_lit_comp(0xfefefe4d), -rgba_from_u32_lit_comp(0x1f1f27fe), -rgba_from_u32_lit_comp(0xfefefe4d), -rgba_from_u32_lit_comp(0x131315ee), -rgba_from_u32_lit_comp(0xffffff19), -rgba_from_u32_lit_comp(0xa08462ff), -rgba_from_u32_lit_comp(0xcc5634ff), -rgba_from_u32_lit_comp(0xd8a51bff), -rgba_from_u32_lit_comp(0xc04047ff), -rgba_from_u32_lit_comp(0xb7afd5ff), -rgba_from_u32_lit_comp(0xac7a09ff), -rgba_from_u32_lit_comp(0xa08462ff), -rgba_from_u32_lit_comp(0x698e21ff), -rgba_from_u32_lit_comp(0x3a4e11ff), -rgba_from_u32_lit_comp(0x6a8e22ff), -rgba_from_u32_lit_comp(0xdab98fff), -rgba_from_u32_lit_comp(0x686868ff), -rgba_from_u32_lit_comp(0xa08462ff), -rgba_from_u32_lit_comp(0xc8b399ff), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0xffcb7fff), -rgba_from_u32_lit_comp(0xb2ff65ff), -rgba_from_u32_lit_comp(0xff99e5ff), -rgba_from_u32_lit_comp(0x6598ffff), -rgba_from_u32_lit_comp(0x65ffcbff), -rgba_from_u32_lit_comp(0xff9819ff), -rgba_from_u32_lit_comp(0x9932ffff), -rgba_from_u32_lit_comp(0x65ff4cff), -rgba_from_u32_lit_comp(0xb2ccd8ff), -rgba_from_u32_lit_comp(0xb23219ff), -rgba_from_u32_lit_comp(0xa72911ff), -}; - -Vec4F32 df_g_theme_preset_colors__four_coder[75] = -{ -rgba_from_u32_lit_comp(0xff00ffff), -rgba_from_u32_lit_comp(0x90b080ff), -rgba_from_u32_lit_comp(0x4dc221ff), -rgba_from_u32_lit_comp(0xc56452ff), -rgba_from_u32_lit_comp(0x307eb2ff), -rgba_from_u32_lit_comp(0x566e4bff), -rgba_from_u32_lit_comp(0x8aff00ff), -rgba_from_u32_lit_comp(0xb23217ff), -rgba_from_u32_lit_comp(0xfda200ff), -rgba_from_u32_lit_comp(0xffffffff), -rgba_from_u32_lit_comp(0x0000007f), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0xffffff0c), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0x99ccff4c), -rgba_from_u32_lit_comp(0xffffff1e), -rgba_from_u32_lit_comp(0x5f12005f), -rgba_from_u32_lit_comp(0x0c0c0cfe), -rgba_from_u32_lit_comp(0x2b2b2bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x0c0c0cfe), -rgba_from_u32_lit_comp(0x3e4c577f), -rgba_from_u32_lit_comp(0xffffff19), -rgba_from_u32_lit_comp(0x0c0c0c3e), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x152f1bff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x43150cff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x1b323eff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x212721fe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x212721fe), -rgba_from_u32_lit_comp(0xfefefe4d), -rgba_from_u32_lit_comp(0x3a3a3a7f), -rgba_from_u32_lit_comp(0x00000019), -rgba_from_u32_lit_comp(0x90b080ff), -rgba_from_u32_lit_comp(0x42a2cffe), -rgba_from_u32_lit_comp(0xfd7c52ff), -rgba_from_u32_lit_comp(0x98bc80ff), -rgba_from_u32_lit_comp(0xb7afd5ff), -rgba_from_u32_lit_comp(0xd08f1eff), -rgba_from_u32_lit_comp(0x90b080ff), -rgba_from_u32_lit_comp(0x4fff2eff), -rgba_from_u32_lit_comp(0x3ccd21ff), -rgba_from_u32_lit_comp(0x4fff2eff), -rgba_from_u32_lit_comp(0xa0b8a0ff), -rgba_from_u32_lit_comp(0x1e8fefff), -rgba_from_u32_lit_comp(0x7e7e7ffe), -rgba_from_u32_lit_comp(0xbebebeff), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0xffcb7fff), -rgba_from_u32_lit_comp(0xb2ff65ff), -rgba_from_u32_lit_comp(0xff99e5ff), -rgba_from_u32_lit_comp(0x6598ffff), -rgba_from_u32_lit_comp(0x65ffcbff), -rgba_from_u32_lit_comp(0xff9819ff), -rgba_from_u32_lit_comp(0x9932ffff), -rgba_from_u32_lit_comp(0x65ff4cff), -rgba_from_u32_lit_comp(0xb2ccd8ff), -rgba_from_u32_lit_comp(0xb23219ff), -rgba_from_u32_lit_comp(0xa72911ff), -}; - -Vec4F32 df_g_theme_preset_colors__far_manager[75] = -{ -rgba_from_u32_lit_comp(0xff00ffff), -rgba_from_u32_lit_comp(0x00fefeff), -rgba_from_u32_lit_comp(0x4dc221ff), -rgba_from_u32_lit_comp(0xc56452ff), -rgba_from_u32_lit_comp(0x307eb2ff), -rgba_from_u32_lit_comp(0x00a9a9ff), -rgba_from_u32_lit_comp(0x8aff00ff), -rgba_from_u32_lit_comp(0xb23217ff), -rgba_from_u32_lit_comp(0x00fefeff), -rgba_from_u32_lit_comp(0xffffffff), -rgba_from_u32_lit_comp(0x0000007f), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0xffffff0c), -rgba_from_u32_lit_comp(0x0000003f), -rgba_from_u32_lit_comp(0x99ccff4c), -rgba_from_u32_lit_comp(0xffffff1e), -rgba_from_u32_lit_comp(0x5f12005f), -rgba_from_u32_lit_comp(0x000081fe), -rgba_from_u32_lit_comp(0x2b2b2bfe), -rgba_from_u32_lit_comp(0x0000fffe), -rgba_from_u32_lit_comp(0x007d7dff), -rgba_from_u32_lit_comp(0x007d7dff), -rgba_from_u32_lit_comp(0xfefefe00), -rgba_from_u32_lit_comp(0x007c7c55), -rgba_from_u32_lit_comp(0x33333333), -rgba_from_u32_lit_comp(0x00ffff55), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x00000000), -rgba_from_u32_lit_comp(0x1b1b1bfe), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x2c5b36ff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x803425ff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x933100ff), -rgba_from_u32_lit_comp(0x3f3f3ffd), -rgba_from_u32_lit_comp(0x007d7dff), -rgba_from_u32_lit_comp(0x3f3f3ffe), -rgba_from_u32_lit_comp(0x007d7dff), -rgba_from_u32_lit_comp(0xfefefe4d), -rgba_from_u32_lit_comp(0x3e4c577f), -rgba_from_u32_lit_comp(0xfefefe19), -rgba_from_u32_lit_comp(0x00fefeff), -rgba_from_u32_lit_comp(0x65b1ffff), -rgba_from_u32_lit_comp(0xfec746ff), -rgba_from_u32_lit_comp(0x00ff00ff), -rgba_from_u32_lit_comp(0xb7afd5ff), -rgba_from_u32_lit_comp(0x00ffffff), -rgba_from_u32_lit_comp(0xffffffff), -rgba_from_u32_lit_comp(0x00ff00ff), -rgba_from_u32_lit_comp(0x738287ff), -rgba_from_u32_lit_comp(0x98abb1ff), -rgba_from_u32_lit_comp(0xff0000ff), -rgba_from_u32_lit_comp(0xffffffff), -rgba_from_u32_lit_comp(0x007d7dff), -rgba_from_u32_lit_comp(0x00fefeff), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0x99503d3f), -rgba_from_u32_lit_comp(0xfe82493f), -rgba_from_u32_lit_comp(0xffba173f), -rgba_from_u32_lit_comp(0xcefd693f), -rgba_from_u32_lit_comp(0xffcb7fff), -rgba_from_u32_lit_comp(0xb2ff65ff), -rgba_from_u32_lit_comp(0xff99e5ff), -rgba_from_u32_lit_comp(0x6598ffff), -rgba_from_u32_lit_comp(0x65ffcbff), -rgba_from_u32_lit_comp(0xff9819ff), -rgba_from_u32_lit_comp(0x9932ffff), -rgba_from_u32_lit_comp(0x65ff4cff), -rgba_from_u32_lit_comp(0xb2ccd8ff), -rgba_from_u32_lit_comp(0xb23219ff), -rgba_from_u32_lit_comp(0xff2800ff), -}; - -Vec4F32* df_g_theme_preset_colors_table[9] = -{ -df_g_theme_preset_colors__default_dark, -df_g_theme_preset_colors__default_light, -df_g_theme_preset_colors__vs_dark, -df_g_theme_preset_colors__vs_light, -df_g_theme_preset_colors__solarized_dark, -df_g_theme_preset_colors__solarized_light, -df_g_theme_preset_colors__handmade_hero, -df_g_theme_preset_colors__four_coder, -df_g_theme_preset_colors__far_manager, -}; - -String8 df_g_theme_color_display_string_table[75] = -{ -str8_lit_comp("Null"), -str8_lit_comp("Text"), -str8_lit_comp("Text (Positive)"), -str8_lit_comp("Text (Negative)"), -str8_lit_comp("Text (Neutral)"), -str8_lit_comp("Text (Weak)"), -str8_lit_comp("Cursor"), -str8_lit_comp("Cursor (Inactive)"), -str8_lit_comp("Focus"), -str8_lit_comp("Hover"), -str8_lit_comp("Drop Shadow"), -str8_lit_comp("Disabled Overlay"), -str8_lit_comp("Drop Site Overlay"), -str8_lit_comp("Inactive Panel Overlay"), -str8_lit_comp("Selection Overlay"), -str8_lit_comp("Highlight Overlay"), -str8_lit_comp("Error Highlight Overlay"), -str8_lit_comp("Base Background"), -str8_lit_comp("Base Background (Alternate)"), -str8_lit_comp("Base Border"), -str8_lit_comp("Menu Bar Background"), -str8_lit_comp("Menu Bar Background (Alternate)"), -str8_lit_comp("Menu Bar Border"), -str8_lit_comp("Floating Background"), -str8_lit_comp("Floating Background (Alternate)"), -str8_lit_comp("Floating Border"), -str8_lit_comp("Implicit Button Background"), -str8_lit_comp("Implicit Button Border"), -str8_lit_comp("Plain Button Background"), -str8_lit_comp("Plain Button Border"), -str8_lit_comp("Positive Pop Button Background"), -str8_lit_comp("Positive Pop Button Border"), -str8_lit_comp("Negative Pop Button Background"), -str8_lit_comp("Negative Pop Button Border"), -str8_lit_comp("Neutral Pop Button Background"), -str8_lit_comp("Neutral Pop Button Border"), -str8_lit_comp("Scroll Bar Button Background"), -str8_lit_comp("Scroll Bar Button Border"), -str8_lit_comp("Tab Background"), -str8_lit_comp("Tab Border"), -str8_lit_comp("Tab Background (Inactive)"), -str8_lit_comp("Tab Border (Inactive)"), -str8_lit_comp("Code (Default)"), -str8_lit_comp("Code (Symbol)"), -str8_lit_comp("Code (Type)"), -str8_lit_comp("Code (Local)"), -str8_lit_comp("Code (Register)"), -str8_lit_comp("Code (Keyword)"), -str8_lit_comp("Code (Delimiters/Operators)"), -str8_lit_comp("Code (Numeric)"), -str8_lit_comp("Code (Numeric, Alt. Digit Group)"), -str8_lit_comp("Code (String)"), -str8_lit_comp("Code (Meta)"), -str8_lit_comp("Code (Comment)"), -str8_lit_comp("Code Line Numbers"), -str8_lit_comp("Code Line Numbers (Selected)"), -str8_lit_comp("Line Info Background 0"), -str8_lit_comp("Line Info Background 1"), -str8_lit_comp("Line Info Background 2"), -str8_lit_comp("Line Info Background 3"), -str8_lit_comp("Line Info Background 4"), -str8_lit_comp("Line Info Background 5"), -str8_lit_comp("Line Info Background 6"), -str8_lit_comp("Line Info Background 7"), -str8_lit_comp("Thread 0"), -str8_lit_comp("Thread 1"), -str8_lit_comp("Thread 2"), -str8_lit_comp("Thread 3"), -str8_lit_comp("Thread 4"), -str8_lit_comp("Thread 5"), -str8_lit_comp("Thread 6"), -str8_lit_comp("Thread 7"), -str8_lit_comp("Thread (Unwound)"), -str8_lit_comp("Thread (Error)"), -str8_lit_comp("Breakpoint"), -}; - -String8 df_g_theme_color_cfg_string_table[75] = -{ -str8_lit_comp("null"), -str8_lit_comp("text"), -str8_lit_comp("text_positive"), -str8_lit_comp("text_negative"), -str8_lit_comp("text_neutral"), -str8_lit_comp("text_weak"), -str8_lit_comp("cursor"), -str8_lit_comp("cursor_inactive"), -str8_lit_comp("focus"), -str8_lit_comp("hover"), -str8_lit_comp("drop_shadow"), -str8_lit_comp("disabled_overlay"), -str8_lit_comp("drop_site_overlay"), -str8_lit_comp("inactive_panel_overlay"), -str8_lit_comp("selection_overlay"), -str8_lit_comp("highlight_overlay"), -str8_lit_comp("error_highlight_overlay"), -str8_lit_comp("base_background"), -str8_lit_comp("base_background_alt"), -str8_lit_comp("base_border"), -str8_lit_comp("menu_bar_background"), -str8_lit_comp("menu_bar_background_alt"), -str8_lit_comp("menu_bar_border"), -str8_lit_comp("floating_background"), -str8_lit_comp("floating_background_alt"), -str8_lit_comp("floating_border"), -str8_lit_comp("implicit_button_background"), -str8_lit_comp("implicit_button_border"), -str8_lit_comp("plain_button_background"), -str8_lit_comp("plain_button_border"), -str8_lit_comp("positive_pop_button_background"), -str8_lit_comp("positive_pop_button_border"), -str8_lit_comp("negative_pop_button_background"), -str8_lit_comp("negative_pop_button_border"), -str8_lit_comp("neutral_pop_button_background"), -str8_lit_comp("neutral_pop_button_border"), -str8_lit_comp("scroll_bar_button_background"), -str8_lit_comp("scroll_bar_button_border"), -str8_lit_comp("tab_background"), -str8_lit_comp("tab_border"), -str8_lit_comp("tab_background_inactive"), -str8_lit_comp("tab_border_inactive"), -str8_lit_comp("code_default"), -str8_lit_comp("code_symbol"), -str8_lit_comp("code_type"), -str8_lit_comp("code_local"), -str8_lit_comp("code_register"), -str8_lit_comp("code_keyword"), -str8_lit_comp("code_delimiter_operator"), -str8_lit_comp("code_numeric"), -str8_lit_comp("code_numeric_alt_digit_group"), -str8_lit_comp("code_string"), -str8_lit_comp("code_meta"), -str8_lit_comp("code_comment"), -str8_lit_comp("code_line_numbers"), -str8_lit_comp("code_line_numbers_selected"), -str8_lit_comp("line_info_background_0"), -str8_lit_comp("line_info_background_1"), -str8_lit_comp("line_info_background_2"), -str8_lit_comp("line_info_background_3"), -str8_lit_comp("line_info_background_4"), -str8_lit_comp("line_info_background_5"), -str8_lit_comp("line_info_background_6"), -str8_lit_comp("line_info_background_7"), -str8_lit_comp("thread_0"), -str8_lit_comp("thread_1"), -str8_lit_comp("thread_2"), -str8_lit_comp("thread_3"), -str8_lit_comp("thread_4"), -str8_lit_comp("thread_5"), -str8_lit_comp("thread_6"), -str8_lit_comp("thread_7"), -str8_lit_comp("thread_unwound"), -str8_lit_comp("thread_error"), -str8_lit_comp("breakpoint"), -}; - -String8 df_g_setting_code_display_string_table[19] = -{ -str8_lit_comp("Hover Animations"), -str8_lit_comp("Press Animations"), -str8_lit_comp("Focus Animations"), -str8_lit_comp("Tooltip Animations"), -str8_lit_comp("Menu Animations"), -str8_lit_comp("Scrolling Animations"), -str8_lit_comp("Background Blur"), -str8_lit_comp("Thread Lines"), -str8_lit_comp("Breakpoint Lines"), -str8_lit_comp("Thread Glow"), -str8_lit_comp("Breakpoint Glow"), -str8_lit_comp("Opaque Backgrounds"), -str8_lit_comp("Tab Width"), -str8_lit_comp("Main Font Size"), -str8_lit_comp("Code Font Size"), -str8_lit_comp("Smooth UI Text"), -str8_lit_comp("Smooth Code Text"), -str8_lit_comp("Hint UI Text"), -str8_lit_comp("Hint Code Text"), -}; - -String8 df_g_setting_code_lower_string_table[19] = -{ -str8_lit_comp("hover_animations"), -str8_lit_comp("press_animations"), -str8_lit_comp("focus_animations"), -str8_lit_comp("tooltip_animations"), -str8_lit_comp("menu_animations"), -str8_lit_comp("scrolling_animations"), -str8_lit_comp("background_blur"), -str8_lit_comp("thread_lines"), -str8_lit_comp("breakpoint_lines"), -str8_lit_comp("thread_glow"), -str8_lit_comp("breakpoint_glow"), -str8_lit_comp("opaque_backgrounds"), -str8_lit_comp("tab_width"), -str8_lit_comp("main_font_size"), -str8_lit_comp("code_font_size"), -str8_lit_comp("smooth_ui_text"), -str8_lit_comp("smooth_code_text"), -str8_lit_comp("hint_ui_text"), -str8_lit_comp("hint_code_text"), -}; - -B8 df_g_setting_code_default_is_per_window_table[19] = -{ -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -1, -1, -1, -1, -1, -1, -}; - -DF_SettingVal df_g_setting_code_default_val_table[19] = -{ -{1, 1}, -{1, 1}, -{1, 0}, -{1, 1}, -{1, 1}, -{1, 1}, -{1, 1}, -{1, 1}, -{1, 1}, -{1, 1}, -{1, 1}, -{1, 0}, -{1, 4}, -{1, 12}, -{1, 12}, -{1, 1}, -{1, 0}, -{1, 1}, -{1, 1}, -}; - -Rng1S32 df_g_setting_code_s32_range_table[19] = -{ -{0, 1}, -{0, 1}, -{0, 1}, -{0, 1}, -{0, 1}, -{0, 1}, -{0, 1}, -{0, 1}, -{0, 1}, -{0, 1}, -{0, 1}, -{0, 1}, -{1, 32}, -{6, 72}, -{6, 72}, -{0, 1}, -{0, 1}, -{0, 1}, -{0, 1}, -}; - -C_LINKAGE_END - diff --git a/src/raddbg/generated/raddbg.meta.c b/src/raddbg/generated/raddbg.meta.c new file mode 100644 index 00000000..7cdd69e1 --- /dev/null +++ b/src/raddbg/generated/raddbg.meta.c @@ -0,0 +1,1899 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +//- GENERATED CODE + +C_LINKAGE_BEGIN +String8 rd_cfg_src_string_table[4] = +{ +str8_lit_comp("user"), +str8_lit_comp("project"), +str8_lit_comp("command_line"), +str8_lit_comp("transient"), +}; + +RD_CmdKind rd_cfg_src_load_cmd_kind_table[4] = +{ +RD_CmdKind_OpenUser, +RD_CmdKind_OpenProject, +RD_CmdKind_Null, +RD_CmdKind_Null, +}; + +RD_CmdKind rd_cfg_src_write_cmd_kind_table[4] = +{ +RD_CmdKind_WriteUserData, +RD_CmdKind_WriteProjectData, +RD_CmdKind_Null, +RD_CmdKind_Null, +}; + +RD_CmdKind rd_cfg_src_apply_cmd_kind_table[4] = +{ +RD_CmdKind_ApplyUserData, +RD_CmdKind_ApplyProjectData, +RD_CmdKind_Null, +RD_CmdKind_Null, +}; + +String8 d_entity_kind_display_string_table[30] = +{ +str8_lit_comp("Nil"), +str8_lit_comp("Root"), +str8_lit_comp("Machine"), +str8_lit_comp("File"), +str8_lit_comp("Auto View Rule"), +str8_lit_comp("File Path Map"), +str8_lit_comp("Watch Pin"), +str8_lit_comp("Watch"), +str8_lit_comp("View Rule"), +str8_lit_comp("Breakpoint"), +str8_lit_comp("Condition"), +str8_lit_comp("Location"), +str8_lit_comp("Target"), +str8_lit_comp("Executable"), +str8_lit_comp("Arguments"), +str8_lit_comp("Working Directory"), +str8_lit_comp("Entry Point"), +str8_lit_comp("Window"), +str8_lit_comp("Panel"), +str8_lit_comp("View"), +str8_lit_comp("Recent Project"), +str8_lit_comp("Source"), +str8_lit_comp("Destination"), +str8_lit_comp("Process"), +str8_lit_comp("Thread"), +str8_lit_comp("Module"), +str8_lit_comp("Pending Thread Name"), +str8_lit_comp("Debug Info Path"), +str8_lit_comp("Conversion Task"), +str8_lit_comp("Conversion Failure"), +}; + +String8 d_entity_kind_name_lower_table[30] = +{ +str8_lit_comp("nil"), +str8_lit_comp("root"), +str8_lit_comp("machine"), +str8_lit_comp("file"), +str8_lit_comp("auto_view_rule"), +str8_lit_comp("file_path_map"), +str8_lit_comp("watch_pin"), +str8_lit_comp("watch"), +str8_lit_comp("view_rule"), +str8_lit_comp("breakpoint"), +str8_lit_comp("condition"), +str8_lit_comp("location"), +str8_lit_comp("target"), +str8_lit_comp("executable"), +str8_lit_comp("arguments"), +str8_lit_comp("working_directory"), +str8_lit_comp("entry_point"), +str8_lit_comp("window"), +str8_lit_comp("panel"), +str8_lit_comp("view"), +str8_lit_comp("recent_project"), +str8_lit_comp("source"), +str8_lit_comp("dest"), +str8_lit_comp("process"), +str8_lit_comp("thread"), +str8_lit_comp("module"), +str8_lit_comp("pending_thread_name"), +str8_lit_comp("debug_info_path"), +str8_lit_comp("conversion_task"), +str8_lit_comp("conversion_fail"), +}; + +String8 d_entity_kind_name_lower_plural_table[30] = +{ +str8_lit_comp("nils"), +str8_lit_comp("roots"), +str8_lit_comp("machines"), +str8_lit_comp("files"), +str8_lit_comp("auto_view_rules"), +str8_lit_comp("file_path_maps"), +str8_lit_comp("watch_pins"), +str8_lit_comp("watches"), +str8_lit_comp("view_rules"), +str8_lit_comp("breakpoints"), +str8_lit_comp("conditions"), +str8_lit_comp("locations"), +str8_lit_comp("targets"), +str8_lit_comp("executables"), +str8_lit_comp("argumentses"), +str8_lit_comp("working_directories"), +str8_lit_comp("entry_points"), +str8_lit_comp("windows"), +str8_lit_comp("panels"), +str8_lit_comp("views"), +str8_lit_comp("recent_projects"), +str8_lit_comp("sources"), +str8_lit_comp("dests"), +str8_lit_comp("processes"), +str8_lit_comp("threads"), +str8_lit_comp("modules"), +str8_lit_comp("pending_thread_names"), +str8_lit_comp("debug_info_paths"), +str8_lit_comp("conversion_tasks"), +str8_lit_comp("conversion_fails"), +}; + +String8 d_entity_kind_name_label_table[30] = +{ +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Expression"), +str8_lit_comp("Expression"), +str8_lit_comp("Expression"), +str8_lit_comp("Label"), +str8_lit_comp("Expression"), +str8_lit_comp("Location"), +str8_lit_comp("Label"), +str8_lit_comp("Executable"), +str8_lit_comp("Arguments"), +str8_lit_comp("Execution Path"), +str8_lit_comp("Symbol Name"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Path"), +str8_lit_comp("Path"), +str8_lit_comp("Path"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +str8_lit_comp("Label"), +}; + +RD_EntityKindFlags rd_entity_kind_flags_table[30] = +{ +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (1*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (1*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (1*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (1*RD_EntityKindFlag_IsSerializedToConfig), +(1*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (1*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (1*RD_EntityKindFlag_CanDuplicate) | (1*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (1*RD_EntityKindFlag_IsSerializedToConfig), +(1*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (1*RD_EntityKindFlag_CanRename) | (1*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (1*RD_EntityKindFlag_CanDuplicate) | (1*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (1*RD_EntityKindFlag_IsSerializedToConfig), +(1*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (1*RD_EntityKindFlag_CanRename) | (1*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (1*RD_EntityKindFlag_CanDuplicate) | (1*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(1*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (1*RD_EntityKindFlag_CanRename) | (1*RD_EntityKindFlag_CanEnable) | (1*RD_EntityKindFlag_CanCondition) | (1*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (1*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (1*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (1*RD_EntityKindFlag_NameIsCode) | (1*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(1*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (1*RD_EntityKindFlag_CanEdit) | (1*RD_EntityKindFlag_CanRename) | (1*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (1*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (1*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (1*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (1*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(1*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (1*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (1*RD_EntityKindFlag_IsSerializedToConfig), +(1*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (1*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (1*RD_EntityKindFlag_IsSerializedToConfig), +(1*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (1*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (1*RD_EntityKindFlag_UserDefinedLifetime) | (1*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (1*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (1*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (1*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (1*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (1*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (1*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (0*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (1*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +(0*RD_EntityKindFlag_CanDelete) | (0*RD_EntityKindFlag_CanFreeze) | (0*RD_EntityKindFlag_CanEdit) | (1*RD_EntityKindFlag_CanRename) | (0*RD_EntityKindFlag_CanEnable) | (0*RD_EntityKindFlag_CanCondition) | (0*RD_EntityKindFlag_CanDuplicate) | (0*RD_EntityKindFlag_NameIsCode) | (0*RD_EntityKindFlag_NameIsPath) | (0*RD_EntityKindFlag_UserDefinedLifetime) | (0*RD_EntityKindFlag_IsSerializedToConfig), +}; + +Rng1U64 rd_reg_slot_range_table[32] = +{ +{0}, +{OffsetOf(RD_Regs, machine), OffsetOf(RD_Regs, machine) + sizeof(CTRL_Handle)}, +{OffsetOf(RD_Regs, module), OffsetOf(RD_Regs, module) + sizeof(CTRL_Handle)}, +{OffsetOf(RD_Regs, process), OffsetOf(RD_Regs, process) + sizeof(CTRL_Handle)}, +{OffsetOf(RD_Regs, thread), OffsetOf(RD_Regs, thread) + sizeof(CTRL_Handle)}, +{OffsetOf(RD_Regs, window), OffsetOf(RD_Regs, window) + sizeof(RD_Handle)}, +{OffsetOf(RD_Regs, panel), OffsetOf(RD_Regs, panel) + sizeof(RD_Handle)}, +{OffsetOf(RD_Regs, view), OffsetOf(RD_Regs, view) + sizeof(RD_Handle)}, +{OffsetOf(RD_Regs, prev_view), OffsetOf(RD_Regs, prev_view) + sizeof(RD_Handle)}, +{OffsetOf(RD_Regs, dst_panel), OffsetOf(RD_Regs, dst_panel) + sizeof(RD_Handle)}, +{OffsetOf(RD_Regs, entity), OffsetOf(RD_Regs, entity) + sizeof(RD_Handle)}, +{OffsetOf(RD_Regs, entity_list), OffsetOf(RD_Regs, entity_list) + sizeof(RD_HandleList)}, +{OffsetOf(RD_Regs, unwind_count), OffsetOf(RD_Regs, unwind_count) + sizeof(U64)}, +{OffsetOf(RD_Regs, inline_depth), OffsetOf(RD_Regs, inline_depth) + sizeof(U64)}, +{OffsetOf(RD_Regs, file_path), OffsetOf(RD_Regs, file_path) + sizeof(String8)}, +{OffsetOf(RD_Regs, cursor), OffsetOf(RD_Regs, cursor) + sizeof(TxtPt)}, +{OffsetOf(RD_Regs, mark), OffsetOf(RD_Regs, mark) + sizeof(TxtPt)}, +{OffsetOf(RD_Regs, text_key), OffsetOf(RD_Regs, text_key) + sizeof(U128)}, +{OffsetOf(RD_Regs, lang_kind), OffsetOf(RD_Regs, lang_kind) + sizeof(TXT_LangKind)}, +{OffsetOf(RD_Regs, lines), OffsetOf(RD_Regs, lines) + sizeof(D_LineList)}, +{OffsetOf(RD_Regs, dbgi_key), OffsetOf(RD_Regs, dbgi_key) + sizeof(DI_Key)}, +{OffsetOf(RD_Regs, vaddr), OffsetOf(RD_Regs, vaddr) + sizeof(U64)}, +{OffsetOf(RD_Regs, voff), OffsetOf(RD_Regs, voff) + sizeof(U64)}, +{OffsetOf(RD_Regs, vaddr_range), OffsetOf(RD_Regs, vaddr_range) + sizeof(Rng1U64)}, +{OffsetOf(RD_Regs, voff_range), OffsetOf(RD_Regs, voff_range) + sizeof(Rng1U64)}, +{OffsetOf(RD_Regs, pid), OffsetOf(RD_Regs, pid) + sizeof(U32)}, +{OffsetOf(RD_Regs, force_confirm), OffsetOf(RD_Regs, force_confirm) + sizeof(B32)}, +{OffsetOf(RD_Regs, prefer_disasm), OffsetOf(RD_Regs, prefer_disasm) + sizeof(B32)}, +{OffsetOf(RD_Regs, dir2), OffsetOf(RD_Regs, dir2) + sizeof(Dir2)}, +{OffsetOf(RD_Regs, string), OffsetOf(RD_Regs, string) + sizeof(String8)}, +{OffsetOf(RD_Regs, params_tree), OffsetOf(RD_Regs, params_tree) + sizeof(MD_Node *)}, +{OffsetOf(RD_Regs, os_event), OffsetOf(RD_Regs, os_event) + sizeof(OS_Event *)}, +}; + +RD_CmdKindInfo rd_cmd_kind_info_table[219] = +{ +{0}, +{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp("Launch and Run"), RD_IconKind_Play, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_EntityList, str8_lit_comp(""), RD_EntityKind_Target}}, +{ str8_lit_comp("launch_and_init"), str8_lit_comp("Starts debugging a new instance of a target, then stops at the program's entry point."), str8_lit_comp("launch,start,entry,point"), str8_lit_comp("Launch and Initialize"), RD_IconKind_PlayStepForward, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_EntityList, str8_lit_comp(""), RD_EntityKind_Target}}, +{ str8_lit_comp("kill"), str8_lit_comp("Kills the specified existing debugged process(es)."), str8_lit_comp("stop,kill"), str8_lit_comp("Kill"), RD_IconKind_Stop, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_EntityList, str8_lit_comp(""), RD_EntityKind_Process}}, +{ str8_lit_comp("kill_all"), str8_lit_comp("Kills all debugged child processes."), str8_lit_comp("stop,kill,all"), str8_lit_comp("Kill All"), RD_IconKind_Stop, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("detach"), str8_lit_comp("Detaches the specified debugged process."), str8_lit_comp("detach"), str8_lit_comp("Detach"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_EntityList, str8_lit_comp(""), RD_EntityKind_Process}}, +{ str8_lit_comp("continue"), str8_lit_comp("Continues all halted threads."), str8_lit_comp(""), str8_lit_comp("Continue"), RD_IconKind_Play, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("step_into_inst"), str8_lit_comp("Performs a step that goes into calls, at the instruction level."), str8_lit_comp("single,step,thread"), str8_lit_comp("Step Into (Assembly)"), RD_IconKind_StepInto, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("step_over_inst"), str8_lit_comp("Performs a step that skips calls, at the instruction level."), str8_lit_comp("single,step,thread"), str8_lit_comp("Step Over (Assembly)"), RD_IconKind_StepOver, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("step_into_line"), str8_lit_comp("Performs a step that goes into calls, at the source code line level."), str8_lit_comp("step,thread"), str8_lit_comp("Step Into (Line)"), RD_IconKind_StepInto, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("step_over_line"), str8_lit_comp("Performs a step that skips calls, at the source code line level."), str8_lit_comp("step,thread"), str8_lit_comp("Step Over (Line)"), RD_IconKind_StepOver, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("step_out"), str8_lit_comp("Runs to the end of the current function and exits it."), str8_lit_comp(""), str8_lit_comp("Step Out"), RD_IconKind_StepOut, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("halt"), str8_lit_comp("Halts all running processes."), str8_lit_comp("pause"), str8_lit_comp("Halt"), RD_IconKind_Pause, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("soft_halt_refresh"), str8_lit_comp("Interrupts all running processes to collect data, and then resumes them."), str8_lit_comp(""), str8_lit_comp("Soft Halt Refresh"), RD_IconKind_Refresh, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("set_thread_ip"), str8_lit_comp("Sets the passed thread's instruction pointer at the passed address."), str8_lit_comp(""), str8_lit_comp("Set Thread IP"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Vaddr, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("run_to_line"), str8_lit_comp("Runs until a particular source line is hit."), str8_lit_comp(""), str8_lit_comp("Run To Line"), RD_IconKind_Play, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("run_to_address"), str8_lit_comp("Runs until a particular address is hit."), str8_lit_comp(""), str8_lit_comp("Run To Address"), RD_IconKind_PlayStepForward, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Vaddr, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("run"), str8_lit_comp("Runs all targets after starting them if they have not been started yet."), str8_lit_comp("play"), str8_lit_comp("Run"), RD_IconKind_Play, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("restart"), str8_lit_comp("Kills all running processes, then restarts the targets which were used to launch all current processes (if any)."), str8_lit_comp("restart,retry"), str8_lit_comp("Restart"), RD_IconKind_Redo, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("step_into"), str8_lit_comp("Steps once, possibly into function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Into"), RD_IconKind_StepInto, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("step_over"), str8_lit_comp("Steps once, always over function calls, for either line or instructions."), str8_lit_comp(""), str8_lit_comp("Step Over"), RD_IconKind_StepOver, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("freeze_thread"), str8_lit_comp("Freezes the passed thread."), str8_lit_comp("callstack,unwind"), str8_lit_comp("Freeze Thread"), RD_IconKind_Locked, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Thread}}, +{ str8_lit_comp("thaw_thread"), str8_lit_comp("Thaws the passed thread."), str8_lit_comp(""), str8_lit_comp("Thaw Thread"), RD_IconKind_Unlocked, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Thread}}, +{ str8_lit_comp("freeze_process"), str8_lit_comp("Freezes the passed process."), str8_lit_comp(""), str8_lit_comp("Freeze Process"), RD_IconKind_Locked, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Process}}, +{ str8_lit_comp("thaw_process"), str8_lit_comp("Thaws the passed process."), str8_lit_comp(""), str8_lit_comp("Thaw Process"), RD_IconKind_Unlocked, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Process}}, +{ str8_lit_comp("freeze_machine"), str8_lit_comp("Freezes the passed machine."), str8_lit_comp(""), str8_lit_comp("Freeze Machine"), RD_IconKind_Locked, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Machine}}, +{ str8_lit_comp("thaw_machine"), str8_lit_comp("Thaws the passed machine."), str8_lit_comp(""), str8_lit_comp("Thaw Machine"), RD_IconKind_Unlocked, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Machine}}, +{ str8_lit_comp("freeze_local_machine"), str8_lit_comp("Freezes the local machine."), str8_lit_comp(""), str8_lit_comp("Freeze Local Machine"), RD_IconKind_Machine, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("thaw_local_machine"), str8_lit_comp("Thaws the local machine."), str8_lit_comp(""), str8_lit_comp("Thaw Local Machine"), RD_IconKind_Machine, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("freeze_entity"), str8_lit_comp("Freezes an entity."), str8_lit_comp(""), str8_lit_comp("Freeze Entity"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("thaw_entity"), str8_lit_comp("Thaws an entity."), str8_lit_comp(""), str8_lit_comp("Thaw Entity"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("attach"), str8_lit_comp("Attaches to a process that is already running on the local machine."), str8_lit_comp(""), str8_lit_comp("Attach"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_PID, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("exit"), str8_lit_comp("Exits the debugger."), str8_lit_comp("quit,close,abort"), str8_lit_comp("Exit"), RD_IconKind_X, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("run_command"), str8_lit_comp("Runs a command from the command palette."), str8_lit_comp("help,cmd"), str8_lit_comp("Run Command"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_String, str8_lit_comp("commands"), RD_EntityKind_Nil}}, +{ str8_lit_comp("os_event"), str8_lit_comp(""), str8_lit_comp(""), str8_lit_comp("OS Event"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("select_thread"), str8_lit_comp("Selects a thread."), str8_lit_comp(""), str8_lit_comp("Select Thread"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Thread}}, +{ str8_lit_comp("select_unwind"), str8_lit_comp("Selects an unwind frame number for the selected thread."), str8_lit_comp(""), str8_lit_comp("Select Unwind"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("up_one_frame"), str8_lit_comp("Selects the call stack frame above the currently selected."), str8_lit_comp(""), str8_lit_comp("Up One Frame"), RD_IconKind_UpArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("down_one_frame"), str8_lit_comp("Selects the call stack frame below the currently selected."), str8_lit_comp("callstack,unwind"), str8_lit_comp("Down One Frame"), RD_IconKind_DownArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("inc_ui_font_scale"), str8_lit_comp("Increases the font size used for UI."), str8_lit_comp(""), str8_lit_comp("Increase UI Font Scale"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("dec_ui_font_scale"), str8_lit_comp("Decreases the font size used for UI."), str8_lit_comp(""), str8_lit_comp("Decrease UI Font Scale"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("inc_code_font_scale"), str8_lit_comp("Increases the font size used for code."), str8_lit_comp(""), str8_lit_comp("Increase Code Font Scale"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("dec_code_font_scale"), str8_lit_comp("Decreases the font size used for code."), str8_lit_comp(""), str8_lit_comp("Decrease Code Font Scale"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("open_window"), str8_lit_comp("Opens a new window."), str8_lit_comp(""), str8_lit_comp("Open New Window"), RD_IconKind_Window, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("close_window"), str8_lit_comp("Closes an opened window."), str8_lit_comp(""), str8_lit_comp("Close Window"), RD_IconKind_Window, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_fullscreen"), str8_lit_comp("Toggles fullscreen view on the active window."), str8_lit_comp(""), str8_lit_comp("Toggle Fullscreen"), RD_IconKind_Window, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("confirm_accept"), str8_lit_comp("Accepts the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Accept"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("confirm_cancel"), str8_lit_comp("Cancels the active confirmation prompt."), str8_lit_comp(""), str8_lit_comp("Confirm Cancel"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("reset_to_default_panels"), str8_lit_comp("Resets the window to the default panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Default Panel Layout"), RD_IconKind_Window, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("reset_to_compact_panels"), str8_lit_comp("Resets the window to the compact panel layout."), str8_lit_comp("panel"), str8_lit_comp("Reset To Compact Panel Layout"), RD_IconKind_Window, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("new_panel_left"), str8_lit_comp("Creates a new panel to the left of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Left"), RD_IconKind_XSplit, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("new_panel_up"), str8_lit_comp("Creates a new panel at the top of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Up"), RD_IconKind_YSplit, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("new_panel_right"), str8_lit_comp("Creates a new panel to the right of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Right"), RD_IconKind_XSplit, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("new_panel_down"), str8_lit_comp("Creates a new panel at the bottom of the active panel."), str8_lit_comp("panel"), str8_lit_comp("Split Panel Down"), RD_IconKind_YSplit, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("split_panel"), str8_lit_comp("Creates a new panel in a given direction, and moves a tab to it, if specified."), str8_lit_comp(""), str8_lit_comp("Split Panel"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("rotate_panel_columns"), str8_lit_comp("Rotates all panels at the closest column level of the panel hierarchy."), str8_lit_comp(""), str8_lit_comp("Rotate Panel Columns"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("next_panel"), str8_lit_comp("Cycles the active panel forward."), str8_lit_comp(""), str8_lit_comp("Focus Next Panel"), RD_IconKind_RightArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("prev_panel"), str8_lit_comp("Cycles the active panel backwards."), str8_lit_comp(""), str8_lit_comp("Focus Previous Panel"), RD_IconKind_LeftArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("focus_panel"), str8_lit_comp("Focuses a new panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("focus_panel_right"), str8_lit_comp("Focuses a panel rightward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Right"), RD_IconKind_RightArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("focus_panel_left"), str8_lit_comp("Focuses a panel leftward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Left"), RD_IconKind_LeftArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("focus_panel_up"), str8_lit_comp("Focuses a panel upward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Up"), RD_IconKind_UpArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("focus_panel_down"), str8_lit_comp("Focuses a panel downward of the currently focused panel."), str8_lit_comp(""), str8_lit_comp("Focus Panel Down"), RD_IconKind_DownArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("undo"), str8_lit_comp("Undoes the previous action."), str8_lit_comp(""), str8_lit_comp("Undo"), RD_IconKind_Undo, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("redo"), str8_lit_comp("Redoes the first previously undone action."), str8_lit_comp(""), str8_lit_comp("Redo"), RD_IconKind_Redo, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("go_back"), str8_lit_comp("Returns to the previously selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Back"), RD_IconKind_LeftArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("go_forward"), str8_lit_comp("Returns to the next selected panel and tab in recorded history."), str8_lit_comp(""), str8_lit_comp("Go Forward"), RD_IconKind_RightArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("close_panel"), str8_lit_comp("Closes the currently active panel."), str8_lit_comp(""), str8_lit_comp("Close Panel"), RD_IconKind_ClosePanel, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("next_tab"), str8_lit_comp("Focuses the next tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Next Tab"), RD_IconKind_RightArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("prev_tab"), str8_lit_comp("Focuses the previous tab on the active panel."), str8_lit_comp(""), str8_lit_comp("Focus Previous Tab"), RD_IconKind_LeftArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_tab_right"), str8_lit_comp("Moves the selected tab right one slot."), str8_lit_comp(""), str8_lit_comp("Move Tab Right"), RD_IconKind_RightArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_tab_left"), str8_lit_comp("Moves the selected tab left one slot."), str8_lit_comp(""), str8_lit_comp("Move Tab Left"), RD_IconKind_LeftArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("open_tab"), str8_lit_comp("Opens a new tab with the parameterized view specification."), str8_lit_comp(""), str8_lit_comp("Open Tab"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("close_tab"), str8_lit_comp("Closes the currently opened tab."), str8_lit_comp(""), str8_lit_comp("Close Tab"), RD_IconKind_X, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_tab"), str8_lit_comp("Moves a tab to a new panel."), str8_lit_comp(""), str8_lit_comp("Move Tab"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("tab_bar_top"), str8_lit_comp("Anchors a panel's tab bar to the top of the panel."), str8_lit_comp(""), str8_lit_comp("Anchor Tab Bar To Top"), RD_IconKind_UpArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("tab_bar_bottom"), str8_lit_comp("Anchors a panel's tab bar to the bottom of the panel."), str8_lit_comp(""), str8_lit_comp("Anchor Tab Bar To Bottom"), RD_IconKind_DownArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("set_current_path"), str8_lit_comp("Sets the debugger's current path, which is used as a starting point when browsing for files."), str8_lit_comp(""), str8_lit_comp("Set Current Path"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("open"), str8_lit_comp("Opens a file."), str8_lit_comp("code,source,file"), str8_lit_comp("Open"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("switch"), str8_lit_comp("Switches to a loaded file."), str8_lit_comp("code,source,file"), str8_lit_comp("Switch"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_File}}, +{ str8_lit_comp("switch_to_partner_file"), str8_lit_comp("Switches to the focused file's partner; or from header to implementation or vice versa."), str8_lit_comp("code,source,file"), str8_lit_comp("Switch To Partner File"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("go_to_disassembly"), str8_lit_comp("Goes to the disassembly, if any, for a given source code line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("Go To Disassembly"), RD_IconKind_Glasses, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("go_to_source"), str8_lit_comp("Goes to the source code, if any, for a given disassembly line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("Go To Source"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("set_file_override_link_src"), str8_lit_comp("Sets the source path for an override file link."), str8_lit_comp(""), str8_lit_comp("Set File Override Link Source"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("set_file_override_link_dst"), str8_lit_comp("Sets the destination path for an override file link."), str8_lit_comp(""), str8_lit_comp("Set File Override Link Destination"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("set_file_replacement_path"), str8_lit_comp("Sets the path which should be used as the replacement for the passed file."), str8_lit_comp(""), str8_lit_comp("Set File Replacement Path"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("set_auto_view_rule_type"), str8_lit_comp("Sets the type for an auto view rule."), str8_lit_comp(""), str8_lit_comp("Set Auto View Rule Type"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("set_auto_view_rule_view_rule"), str8_lit_comp("Sets the view rule string for an auto view rule."), str8_lit_comp(""), str8_lit_comp("Set Auto View Rule View Rule"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("open_user"), str8_lit_comp("Opens a user file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("load,user,project,layout"), str8_lit_comp("Open User"), RD_IconKind_Person, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("open_project"), str8_lit_comp("Opens a project file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("project,project,session"), str8_lit_comp("Open Project"), RD_IconKind_Briefcase, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("open_recent_project"), str8_lit_comp("Opens a recently used project file."), str8_lit_comp("project,project,session"), str8_lit_comp("Open Recent Project"), RD_IconKind_Briefcase, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_RecentProject}}, +{ str8_lit_comp("apply_user_data"), str8_lit_comp("Applies user data from the active user file."), str8_lit_comp(""), str8_lit_comp("Apply User Data"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("apply_project_data"), str8_lit_comp("Applies project data from the active project file."), str8_lit_comp(""), str8_lit_comp("Apply Project Data"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("write_user_data"), str8_lit_comp("Writes user data to the active user file."), str8_lit_comp(""), str8_lit_comp("Write User Data"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("write_project_data"), str8_lit_comp("Writes project data to the active project file."), str8_lit_comp(""), str8_lit_comp("Write Project Data"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("edit"), str8_lit_comp("Edits the current selection."), str8_lit_comp(""), str8_lit_comp("Edit"), RD_IconKind_Pencil, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("accept"), str8_lit_comp("Accepts current changes, or answers prompts in the affirmative."), str8_lit_comp(""), str8_lit_comp("Accept"), RD_IconKind_CheckFilled, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("cancel"), str8_lit_comp("Rejects current changes, exits temporary menus, or answers prompts in the negative."), str8_lit_comp(""), str8_lit_comp("Cancel"), RD_IconKind_X, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_left"), str8_lit_comp("Moves the cursor or selection left."), str8_lit_comp(""), str8_lit_comp("Move Left"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_right"), str8_lit_comp("Moves the cursor or selection right."), str8_lit_comp(""), str8_lit_comp("Move Right"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_up"), str8_lit_comp("Moves the cursor or selection up."), str8_lit_comp(""), str8_lit_comp("Move Up"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_down"), str8_lit_comp("Moves the cursor or selection down."), str8_lit_comp(""), str8_lit_comp("Move Down"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_left_select"), str8_lit_comp("Moves the cursor or selection left, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Left Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_right_select"), str8_lit_comp("Moves the cursor or selection right, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Right Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_up_select"), str8_lit_comp("Moves the cursor or selection up, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_down_select"), str8_lit_comp("Moves the cursor or selection down, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_left_chunk"), str8_lit_comp("Moves the cursor or selection left one chunk."), str8_lit_comp(""), str8_lit_comp("Move Left Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_right_chunk"), str8_lit_comp("Moves the cursor or selection right one chunk."), str8_lit_comp(""), str8_lit_comp("Move Right Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_up_chunk"), str8_lit_comp("Moves the cursor or selection up one chunk."), str8_lit_comp(""), str8_lit_comp("Move Up Chunk"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_down_chunk"), str8_lit_comp("Moves the cursor or selection down one chunk."), str8_lit_comp(""), str8_lit_comp("Move Down Chunk"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_up_page"), str8_lit_comp("Moves the cursor or selection up one page."), str8_lit_comp(""), str8_lit_comp("Move Up Page"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_down_page"), str8_lit_comp("Moves the cursor or selection down one page."), str8_lit_comp(""), str8_lit_comp("Move Down Page"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_up_whole"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content."), str8_lit_comp(""), str8_lit_comp("Move Up Whole"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_down_whole"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content."), str8_lit_comp(""), str8_lit_comp("Move Down Whole"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_left_chunk_select"), str8_lit_comp("Moves the cursor or selection left one chunk."), str8_lit_comp(""), str8_lit_comp("Move Left Chunk Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_right_chunk_select"), str8_lit_comp("Moves the cursor or selection right one chunk."), str8_lit_comp(""), str8_lit_comp("Move Right Chunk Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_up_chunk_select"), str8_lit_comp("Moves the cursor or selection up one chunk."), str8_lit_comp(""), str8_lit_comp("Move Up Chunk Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_down_chunk_select"), str8_lit_comp("Moves the cursor or selection down one chunk."), str8_lit_comp(""), str8_lit_comp("Move Down Chunk Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_up_page_select"), str8_lit_comp("Moves the cursor or selection up one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Page Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_down_page_select"), str8_lit_comp("Moves the cursor or selection down one page, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Page Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_up_whole_select"), str8_lit_comp("Moves the cursor or selection to the beginning of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Up Whole Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_down_whole_select"), str8_lit_comp("Moves the cursor or selection to the end of the relevant content, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Down Whole Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_up_reorder"), str8_lit_comp("Moves the cursor or selection up, while swapping the currently selected element with that upward."), str8_lit_comp(""), str8_lit_comp("Move Up Reorder"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_down_reorder"), str8_lit_comp("Moves the cursor or selection down, while swapping the currently selected element with that downward."), str8_lit_comp(""), str8_lit_comp("Move Down Reorder"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_home"), str8_lit_comp("Moves the cursor to the beginning of the line."), str8_lit_comp(""), str8_lit_comp("Move Home"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_end"), str8_lit_comp("Moves the cursor to the end of the line."), str8_lit_comp(""), str8_lit_comp("Move End"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_home_select"), str8_lit_comp("Moves the cursor to the beginning of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move Home Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("move_end_select"), str8_lit_comp("Moves the cursor to the end of the line, while selecting."), str8_lit_comp(""), str8_lit_comp("Move End Select"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("select_all"), str8_lit_comp("Selects everything possible."), str8_lit_comp(""), str8_lit_comp("Select All"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("delete_single"), str8_lit_comp("Deletes a single element to the right of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Delete Single"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("delete_chunk"), str8_lit_comp("Deletes a chunk to the right of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Delete Chunk"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("backspace_single"), str8_lit_comp("Deletes a single element to the left of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Backspace Single"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("backspace_chunk"), str8_lit_comp("Deletes a chunk to the left of the cursor, or the active selection."), str8_lit_comp(""), str8_lit_comp("Backspace Chunk"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("copy"), str8_lit_comp("Copies the active selection to the clipboard."), str8_lit_comp(""), str8_lit_comp("Copy"), RD_IconKind_Clipboard, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("cut"), str8_lit_comp("Copies the active selection to the clipboard, then deletes it."), str8_lit_comp(""), str8_lit_comp("Cut"), RD_IconKind_Clipboard, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("paste"), str8_lit_comp("Pastes the current contents of the clipboard."), str8_lit_comp(""), str8_lit_comp("Paste"), RD_IconKind_Clipboard, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("insert_text"), str8_lit_comp("Inserts the text that was used to cause this command."), str8_lit_comp(""), str8_lit_comp("Insert Text"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("goto_line"), str8_lit_comp("Jumps to a line number in the current code file."), str8_lit_comp(""), str8_lit_comp("Go To Line"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Cursor, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("goto_address"), str8_lit_comp("Jumps to an address in the current memory or disassembly view."), str8_lit_comp(""), str8_lit_comp("Go To Address"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Vaddr, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("center_cursor"), str8_lit_comp("Snaps the current code view to center the cursor."), str8_lit_comp(""), str8_lit_comp("Center Cursor"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("contain_cursor"), str8_lit_comp("Snaps the current code view to contain the cursor."), str8_lit_comp(""), str8_lit_comp("Contain Cursor"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("find_text_forward"), str8_lit_comp("Searches the current code file forward (from the cursor) for a string."), str8_lit_comp(""), str8_lit_comp("Find Text (Forward)"), RD_IconKind_Find, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*1)|(RD_QueryFlag_SelectOldInput*1)|(RD_QueryFlag_Required*1), RD_RegSlot_String, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("find_text_backward"), str8_lit_comp("Searches the current code file backwards (from the cursor) for a string."), str8_lit_comp(""), str8_lit_comp("Find Text (Backwards)"), RD_IconKind_Find, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*1)|(RD_QueryFlag_SelectOldInput*1)|(RD_QueryFlag_Required*1), RD_RegSlot_String, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("find_next"), str8_lit_comp("Searches the current code file forward (from the cursor) for the last searched string."), str8_lit_comp(""), str8_lit_comp("Find Next"), RD_IconKind_Find, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*1)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("find_prev"), str8_lit_comp("Searches the current code file backwards (from the cursor) for the last searched string."), str8_lit_comp(""), str8_lit_comp("Find Previous"), RD_IconKind_Find, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*1)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("find_thread"), str8_lit_comp("Jumps to the passed thread in either source code, disassembly, or both if they're already open."), str8_lit_comp(""), str8_lit_comp("Find Thread"), RD_IconKind_Find, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Thread}}, +{ str8_lit_comp("find_selected_thread"), str8_lit_comp("Jumps to the selected thread in either source code, disassembly, or both if they're already open."), str8_lit_comp(""), str8_lit_comp("Find Selected Thread"), RD_IconKind_Find, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("goto_name"), str8_lit_comp("Searches for the passed string as a file, a symbol in debug info, and more, then jumps to it if possible."), str8_lit_comp(""), str8_lit_comp("Go To Name"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_String, str8_lit_comp("symbol_lister"), RD_EntityKind_Nil}}, +{ str8_lit_comp("goto_name_at_cursor"), str8_lit_comp("Searches for the text at the cursor as a file, a symbol in debug info, and more, then jumps to it if possible."), str8_lit_comp(""), str8_lit_comp("Go To Name At Cursor"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_watch_expr"), str8_lit_comp("Adds or removes an expression to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_watch_expr_at_cursor"), str8_lit_comp("Adds or removes the expression that the cursor or selection is currently over to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression At Cursor"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_watch_expr_at_mouse"), str8_lit_comp("Adds or removes the expression that the mouse is currently over to an opened watch view."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Expression At Mouse"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("set_columns"), str8_lit_comp("Sets the number of columns for a memory view."), str8_lit_comp(""), str8_lit_comp("Set Columns"), RD_IconKind_Thumbnails, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_address_visibility"), str8_lit_comp("Toggles the visibility of addresses in a disassembly view."), str8_lit_comp(""), str8_lit_comp("Toggle Address Visibility"), RD_IconKind_Thumbnails, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_code_bytes_visibility"), str8_lit_comp("Toggles the visibility of machine code bytes in a disassembly view."), str8_lit_comp(""), str8_lit_comp("Toggle Code Bytes Visibility"), RD_IconKind_Thumbnails, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("enable_entity"), str8_lit_comp("Enables an entity."), str8_lit_comp(""), str8_lit_comp("Enable Entity"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("disable_entity"), str8_lit_comp("Disables an entity."), str8_lit_comp(""), str8_lit_comp("Disable Entity"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("remove_entity"), str8_lit_comp("Removes an entity."), str8_lit_comp(""), str8_lit_comp("Remove Entity"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("name_entity"), str8_lit_comp("Equips an entity with a name."), str8_lit_comp(""), str8_lit_comp("Name Entity"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("edit_entity"), str8_lit_comp("Opens the editor for an entity."), str8_lit_comp(""), str8_lit_comp("Edit Entity"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("duplicate_entity"), str8_lit_comp("Duplicates an entity."), str8_lit_comp(""), str8_lit_comp("Duplicate Entity"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("relocate_entity"), str8_lit_comp("Relocates an entity."), str8_lit_comp(""), str8_lit_comp("Relocate Entity"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("add_breakpoint"), str8_lit_comp("Places a breakpoint at a given location (file path and line number, address, or symbol name)."), str8_lit_comp(""), str8_lit_comp("Add Breakpoint"), RD_IconKind_CircleFilled, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("add_address_breakpoint"), str8_lit_comp("Places a breakpoint on the specified address."), str8_lit_comp(""), str8_lit_comp("Add Address Breakpoint"), RD_IconKind_CircleFilled, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Vaddr, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("add_function_breakpoint"), str8_lit_comp("Places a breakpoint on the first address(es) of the specified function."), str8_lit_comp(""), str8_lit_comp("Add Function Breakpoint"), RD_IconKind_CircleFilled, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_String, str8_lit_comp("symbol_lister"), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_breakpoint"), str8_lit_comp("Places or removes a breakpoint at a given location (file path and line number, address, or symbol name)."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint"), RD_IconKind_CircleFilled, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("remove_breakpoint"), str8_lit_comp("Removes an existing breakpoint."), str8_lit_comp(""), str8_lit_comp("Remove Breakpoint"), RD_IconKind_Trash, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Breakpoint}}, +{ str8_lit_comp("enable_breakpoint"), str8_lit_comp("Enables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Enable Breakpoint"), RD_IconKind_CheckFilled, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Breakpoint}}, +{ str8_lit_comp("disable_breakpoint"), str8_lit_comp("Disables a breakpoint."), str8_lit_comp(""), str8_lit_comp("Disable Breakpoint"), RD_IconKind_CheckHollow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Breakpoint}}, +{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_breakpoint_cursor"), str8_lit_comp("Places or removes a breakpoint on the line on which the active cursor sits."), str8_lit_comp(""), str8_lit_comp("Toggle Breakpoint At Cursor"), RD_IconKind_CircleFilled, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_watch_pin_at_cursor"), str8_lit_comp("Places or removes a watch pin at the cursor on the currently active file."), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin At Cursor"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_String, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("run_to_cursor"), str8_lit_comp("Runs the selected thread to the current cursor."), str8_lit_comp("line"), str8_lit_comp("Run To Cursor"), RD_IconKind_Play, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("set_next_statement"), str8_lit_comp("Sets the selected thread's instruction pointer to the cursor's position."), str8_lit_comp(""), str8_lit_comp("Set Next Statement"), RD_IconKind_RightArrow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("add_target"), str8_lit_comp("Adds a new target."), str8_lit_comp("application,executable,debug"), str8_lit_comp("Add Target"), RD_IconKind_Target, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("remove_target"), str8_lit_comp("Removes an existing target."), str8_lit_comp("delete,remove,target"), str8_lit_comp("Remove Target"), RD_IconKind_Trash, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Target}}, +{ str8_lit_comp("edit_target"), str8_lit_comp("Edits an existing target."), str8_lit_comp(""), str8_lit_comp("Edit Target"), RD_IconKind_Pencil, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Target}}, +{ str8_lit_comp("select_target"), str8_lit_comp("Selects a target."), str8_lit_comp(""), str8_lit_comp("Select Target"), RD_IconKind_Target, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Target}}, +{ str8_lit_comp("enable_target"), str8_lit_comp("Enables a target, in addition to all targets currently enabled."), str8_lit_comp(""), str8_lit_comp("Enable Target"), RD_IconKind_CheckFilled, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Target}}, +{ str8_lit_comp("disable_target"), str8_lit_comp("Disables a target."), str8_lit_comp(""), str8_lit_comp("Disable Target"), RD_IconKind_CheckHollow, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_Entity, str8_lit_comp(""), RD_EntityKind_Target}}, +{ str8_lit_comp("register_as_jit_debugger"), str8_lit_comp("Registers the RAD debugger as the just-in-time (JIT) debugger used by the operating system."), str8_lit_comp(""), str8_lit_comp("Register As Just-In-Time (JIT) Debugger"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("entity_ref_fast_path"), str8_lit_comp("Activates the default behavior when clicking an entity reference."), str8_lit_comp(""), str8_lit_comp("Entity Reference Fast Path"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("spawn_entity_view"), str8_lit_comp("Spawns a new view, given an entity and other parameterizations."), str8_lit_comp(""), str8_lit_comp("Spawn Entity View"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("find_code_location"), str8_lit_comp("Finds a specific source code location given file, line, and column coordinates. Opens the file if necessary."), str8_lit_comp(""), str8_lit_comp("Find Code Location"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("filter"), str8_lit_comp("Begins filtering the active view."), str8_lit_comp("sort,search,filter,find"), str8_lit_comp("Filter"), RD_IconKind_Find, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("apply_filter"), str8_lit_comp("Applies the typed filter to the active view."), str8_lit_comp("sort,search,filter,find,apply"), str8_lit_comp("Apply Filter"), RD_IconKind_Find, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("clear_filter"), str8_lit_comp("Clears the filter applied to the active view."), str8_lit_comp("sort,search,filter,find,clear"), str8_lit_comp("Clear Filter"), RD_IconKind_Find, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("getting_started"), str8_lit_comp("Opens the menu for information on getting started."), str8_lit_comp("tutorial,help"), str8_lit_comp("Getting Started"), RD_IconKind_QuestionMark, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("commands"), str8_lit_comp("Opens the list of all commands."), str8_lit_comp(""), str8_lit_comp("Commands"), RD_IconKind_List, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("target"), str8_lit_comp("Opens the editor for a target."), str8_lit_comp(""), str8_lit_comp("Target"), RD_IconKind_Target, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("targets"), str8_lit_comp("Opens the list of all targets."), str8_lit_comp(""), str8_lit_comp("Targets"), RD_IconKind_Target, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("file_path_map"), str8_lit_comp("Opens the file path mapping editor."), str8_lit_comp(""), str8_lit_comp("File Path Map"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("auto_view_rules"), str8_lit_comp("Opens the auto view rule editor."), str8_lit_comp(""), str8_lit_comp("Auto View Rules"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("breakpoints"), str8_lit_comp("Opens the breakpoints view."), str8_lit_comp(""), str8_lit_comp("Breakpoints"), RD_IconKind_CircleFilled, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("watch_pins"), str8_lit_comp("Opens the watch pins view."), str8_lit_comp(""), str8_lit_comp("Watch Pins"), RD_IconKind_Pin, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("scheduler"), str8_lit_comp("Opens the scheduler view, for process and thread controls."), str8_lit_comp("threads,processes,targets"), str8_lit_comp("Scheduler"), RD_IconKind_Scheduler, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("call_stack"), str8_lit_comp("Opens the call stack view."), str8_lit_comp("callstack,thread,unwind"), str8_lit_comp("Call Stack"), RD_IconKind_Thread, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("modules"), str8_lit_comp("Opens the modules view."), str8_lit_comp(""), str8_lit_comp("Modules"), RD_IconKind_Module, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("watch"), str8_lit_comp("Opens a watch view."), str8_lit_comp(""), str8_lit_comp("Watch"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("locals"), str8_lit_comp("Opens a locals view."), str8_lit_comp(""), str8_lit_comp("Locals"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("registers"), str8_lit_comp("Opens a registers view."), str8_lit_comp(""), str8_lit_comp("Registers"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("globals"), str8_lit_comp("Opens a globals view."), str8_lit_comp(""), str8_lit_comp("Globals"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("thread_locals"), str8_lit_comp("Opens a thread locals view."), str8_lit_comp(""), str8_lit_comp("Thread Locals"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("types"), str8_lit_comp("Opens a types view."), str8_lit_comp(""), str8_lit_comp("Types"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("procedures"), str8_lit_comp("Opens a procedures view."), str8_lit_comp(""), str8_lit_comp("Procedures"), RD_IconKind_Binoculars, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("pending_file"), str8_lit_comp("Opens a view which asynchronously analyzes the file path parameter, then picks an appropriate viewer for it."), str8_lit_comp(""), str8_lit_comp("Pending File"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("disassembly"), str8_lit_comp("Opens the disassembly view."), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), RD_IconKind_Glasses, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("output"), str8_lit_comp("Opens an output view."), str8_lit_comp(""), str8_lit_comp("Output"), RD_IconKind_List, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("memory"), str8_lit_comp("Opens a memory view."), str8_lit_comp(""), str8_lit_comp("Memory"), RD_IconKind_Grid, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("exception_filters"), str8_lit_comp("Opens the exception filters view."), str8_lit_comp("exceptions,filters"), str8_lit_comp("Exception Filters"), RD_IconKind_Gear, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("settings"), str8_lit_comp("Opens the settings view."), str8_lit_comp("theme,color,scheme,options"), str8_lit_comp("Settings"), RD_IconKind_Gear, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("pick_file"), str8_lit_comp("Opens the file browser to pick a file."), str8_lit_comp(""), str8_lit_comp("Pick File"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("pick_folder"), str8_lit_comp("Opens the file browser to pick a folder."), str8_lit_comp(""), str8_lit_comp("Pick Folder"), RD_IconKind_FolderOpenFilled, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*1)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("pick_file_or_folder"), str8_lit_comp("Opens the file browser to pick a file or folder."), str8_lit_comp(""), str8_lit_comp("Pick File/Folder"), RD_IconKind_FileOutline, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*1)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("complete_query"), str8_lit_comp("Completes a query."), str8_lit_comp(""), str8_lit_comp("Complete Query"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("cancel_query"), str8_lit_comp("Cancels a query."), str8_lit_comp(""), str8_lit_comp("Cancel Query"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("toggle_dev_menu"), str8_lit_comp("Opens and closes the developer menu."), str8_lit_comp(""), str8_lit_comp("Toggle Developer Menu"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +{ str8_lit_comp("log_marker"), str8_lit_comp("Logs a marker in the application log, to denote specific points in time within the log."), str8_lit_comp(""), str8_lit_comp("Log Marker"), RD_IconKind_Null, (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), RD_EntityKind_Nil}}, +}; + +RD_StringBindingPair rd_default_binding_table[110] = +{ +{str8_lit_comp("kill_all"), {OS_Key_F5, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("step_into_inst"), {OS_Key_F11, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("step_over_inst"), {OS_Key_F10, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("step_out"), {OS_Key_F11, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("halt"), {OS_Key_X, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("halt"), {OS_Key_Pause, 0 }}, +{str8_lit_comp("soft_halt_refresh"), {OS_Key_R, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("run"), {OS_Key_F5, 0 }}, +{str8_lit_comp("restart"), {OS_Key_F5, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("step_into"), {OS_Key_F11, 0 }}, +{str8_lit_comp("step_over"), {OS_Key_F10, 0 }}, +{str8_lit_comp("run_to_cursor"), {OS_Key_F10, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("set_next_statement"), {OS_Key_F10, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("inc_ui_font_scale"), {OS_Key_Equal, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("dec_ui_font_scale"), {OS_Key_Minus, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("inc_code_font_scale"), {OS_Key_Equal, 0 |OS_EventFlag_Shift |OS_EventFlag_Alt}}, +{str8_lit_comp("dec_code_font_scale"), {OS_Key_Minus, 0 |OS_EventFlag_Shift |OS_EventFlag_Alt}}, +{str8_lit_comp("window"), {OS_Key_N, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("toggle_fullscreen"), {OS_Key_Return, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("new_panel_right"), {OS_Key_P, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("new_panel_down"), {OS_Key_Minus, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("rotate_panel_columns"), {OS_Key_2, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("next_panel"), {OS_Key_Comma, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("prev_panel"), {OS_Key_Comma, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("focus_panel_right"), {OS_Key_Right, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}}, +{str8_lit_comp("focus_panel_left"), {OS_Key_Left, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}}, +{str8_lit_comp("focus_panel_up"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}}, +{str8_lit_comp("focus_panel_down"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}}, +{str8_lit_comp("undo"), {OS_Key_Z, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("redo"), {OS_Key_Y, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("go_back"), {OS_Key_Left, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("go_forward"), {OS_Key_Right, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("close_panel"), {OS_Key_P, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("next_tab"), {OS_Key_PageDown, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("prev_tab"), {OS_Key_PageUp, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("next_tab"), {OS_Key_Tab, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("prev_tab"), {OS_Key_Tab, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("move_tab_right"), {OS_Key_PageDown, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("move_tab_left"), {OS_Key_PageUp, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("close_tab"), {OS_Key_W, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("tab_bar_top"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}}, +{str8_lit_comp("tab_bar_bottom"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}}, +{str8_lit_comp("open"), {OS_Key_O, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("reload_active"), {OS_Key_R, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("switch"), {OS_Key_I, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("switch_to_partner_file"), {OS_Key_O, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("open_user"), {OS_Key_O, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}}, +{str8_lit_comp("open_project"), {OS_Key_O, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Alt}}, +{str8_lit_comp("edit"), {OS_Key_F2, 0 }}, +{str8_lit_comp("accept"), {OS_Key_Return, 0 }}, +{str8_lit_comp("cancel"), {OS_Key_Esc, 0 }}, +{str8_lit_comp("move_left"), {OS_Key_Left, 0 }}, +{str8_lit_comp("move_right"), {OS_Key_Right, 0 }}, +{str8_lit_comp("move_up"), {OS_Key_Up, 0 }}, +{str8_lit_comp("move_down"), {OS_Key_Down, 0 }}, +{str8_lit_comp("move_left_select"), {OS_Key_Left, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("move_right_select"), {OS_Key_Right, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("move_up_select"), {OS_Key_Up, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("move_down_select"), {OS_Key_Down, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("move_left_chunk"), {OS_Key_Left, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("move_right_chunk"), {OS_Key_Right, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("move_up_chunk"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("move_down_chunk"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("move_up_page"), {OS_Key_PageUp, 0 }}, +{str8_lit_comp("move_down_page"), {OS_Key_PageDown, 0 }}, +{str8_lit_comp("move_up_whole"), {OS_Key_Home, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("move_down_whole"), {OS_Key_End, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("move_left_chunk_select"), {OS_Key_Left, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("move_right_chunk_select"), {OS_Key_Right, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("move_up_chunk_select"), {OS_Key_Up, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("move_down_chunk_select"), {OS_Key_Down, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("move_up_page_select"), {OS_Key_PageUp, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("move_down_page_select"), {OS_Key_PageDown, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("move_up_whole_select"), {OS_Key_Home, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("move_down_whole_select"), {OS_Key_End, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift }}, +{str8_lit_comp("move_up_reorder"), {OS_Key_Up, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("move_down_reorder"), {OS_Key_Down, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("move_home"), {OS_Key_Home, 0 }}, +{str8_lit_comp("move_end"), {OS_Key_End, 0 }}, +{str8_lit_comp("move_home_select"), {OS_Key_Home, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("move_end_select"), {OS_Key_End, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("select_all"), {OS_Key_A, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("delete_single"), {OS_Key_Delete, 0 }}, +{str8_lit_comp("delete_chunk"), {OS_Key_Delete, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("backspace_single"), {OS_Key_Backspace, 0 }}, +{str8_lit_comp("backspace_chunk"), {OS_Key_Backspace, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("copy"), {OS_Key_C, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("copy"), {OS_Key_Insert, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("cut"), {OS_Key_X, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("paste"), {OS_Key_V, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("paste"), {OS_Key_Insert, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("insert_text"), {OS_Key_Null, 0 }}, +{str8_lit_comp("goto_line"), {OS_Key_G, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("goto_address"), {OS_Key_G, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("find_text_forward"), {OS_Key_F, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("find_text_backward"), {OS_Key_R, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("find_next"), {OS_Key_F3, 0 }}, +{str8_lit_comp("find_prev"), {OS_Key_F3, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("find_selected_thread"), {OS_Key_F4, 0 }}, +{str8_lit_comp("goto_name"), {OS_Key_J, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("goto_name_at_cursor"), {OS_Key_F12, 0 }}, +{str8_lit_comp("toggle_watch_expr_at_cursor"), {OS_Key_W, 0 |OS_EventFlag_Alt}}, +{str8_lit_comp("toggle_watch_expr_at_mouse"), {OS_Key_D, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("toggle_watch_pin_at_cursor"), {OS_Key_F9, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("toggle_breakpoint_cursor"), {OS_Key_F9, 0 }}, +{str8_lit_comp("add_target"), {OS_Key_T, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("attach"), {OS_Key_F6, 0 |OS_EventFlag_Shift }}, +{str8_lit_comp("filter"), {OS_Key_Slash, 0 |OS_EventFlag_Ctrl }}, +{str8_lit_comp("run_command"), {OS_Key_F1, 0 }}, +{str8_lit_comp("log_marker"), {OS_Key_M, 0 |OS_EventFlag_Ctrl |OS_EventFlag_Shift |OS_EventFlag_Alt}}, +}; + +String8 rd_binding_version_remap_old_name_table[7] = +{ +str8_lit_comp("commands"), +str8_lit_comp("load_user"), +str8_lit_comp("load_profile"), +str8_lit_comp("load_project"), +str8_lit_comp("open_profile"), +str8_lit_comp("address_breakpoint"), +str8_lit_comp("function_breakpoint"), +}; + +String8 rd_binding_version_remap_new_name_table[7] = +{ +str8_lit_comp("run_command"), +str8_lit_comp("open_user"), +str8_lit_comp("open_profile"), +str8_lit_comp("open_project"), +str8_lit_comp("open_project"), +str8_lit_comp("add_address_breakpoint"), +str8_lit_comp("add_function_breakpoint"), +}; + +String8 rd_icon_kind_text_table[69] = +{ +str8_lit_comp(""), +str8_lit_comp("b"), +str8_lit_comp("c"), +str8_lit_comp("B"), +str8_lit_comp("C"), +str8_lit_comp("f"), +str8_lit_comp("F"), +str8_lit_comp("g"), +str8_lit_comp("h"), +str8_lit_comp("r"), +str8_lit_comp("s"), +str8_lit_comp("i"), +str8_lit_comp("w"), +str8_lit_comp("W"), +str8_lit_comp("k"), +str8_lit_comp("K"), +str8_lit_comp("L"), +str8_lit_comp("R"), +str8_lit_comp("U"), +str8_lit_comp("D"), +str8_lit_comp("G"), +str8_lit_comp("P"), +str8_lit_comp("3"), +str8_lit_comp("p"), +str8_lit_comp("O"), +str8_lit_comp("o"), +str8_lit_comp("!"), +str8_lit_comp("1"), +str8_lit_comp("<"), +str8_lit_comp(">"), +str8_lit_comp("^"), +str8_lit_comp("v"), +str8_lit_comp("9"), +str8_lit_comp("0"), +str8_lit_comp("7"), +str8_lit_comp("8"), +str8_lit_comp("+"), +str8_lit_comp("-"), +str8_lit_comp("'"), +str8_lit_comp("\""), +str8_lit_comp("M"), +str8_lit_comp("."), +str8_lit_comp("x"), +str8_lit_comp("q"), +str8_lit_comp("j"), +str8_lit_comp("u"), +str8_lit_comp("m"), +str8_lit_comp("n"), +str8_lit_comp("l"), +str8_lit_comp("a"), +str8_lit_comp("z"), +str8_lit_comp("y"), +str8_lit_comp("X"), +str8_lit_comp("Y"), +str8_lit_comp("S"), +str8_lit_comp("T"), +str8_lit_comp("Z"), +str8_lit_comp("d"), +str8_lit_comp("N"), +str8_lit_comp("E"), +str8_lit_comp("H"), +str8_lit_comp("e"), +str8_lit_comp("I"), +str8_lit_comp("J"), +str8_lit_comp("A"), +str8_lit_comp("?"), +str8_lit_comp("4"), +str8_lit_comp("5"), +str8_lit_comp("c"), +}; + +String8 rd_view_kind_name_lower_table[34] = +{ +str8_lit_comp("null"), +str8_lit_comp("empty"), +str8_lit_comp("getting_started"), +str8_lit_comp("commands"), +str8_lit_comp("file_system"), +str8_lit_comp("system_processes"), +str8_lit_comp("entity_lister"), +str8_lit_comp("symbol_lister"), +str8_lit_comp("target"), +str8_lit_comp("targets"), +str8_lit_comp("file_path_map"), +str8_lit_comp("auto_view_rules"), +str8_lit_comp("breakpoints"), +str8_lit_comp("watch_pins"), +str8_lit_comp("scheduler"), +str8_lit_comp("call_stack"), +str8_lit_comp("modules"), +str8_lit_comp("watch"), +str8_lit_comp("locals"), +str8_lit_comp("registers"), +str8_lit_comp("globals"), +str8_lit_comp("thread_locals"), +str8_lit_comp("types"), +str8_lit_comp("procedures"), +str8_lit_comp("pending_file"), +str8_lit_comp("text"), +str8_lit_comp("disasm"), +str8_lit_comp("output"), +str8_lit_comp("memory"), +str8_lit_comp("bitmap"), +str8_lit_comp("color_rgba"), +str8_lit_comp("geo3d"), +str8_lit_comp("exception_filters"), +str8_lit_comp("settings"), +}; + +RD_ViewSpecInfo rd_gfx_view_kind_spec_info_table[34] = +{ +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("null"), str8_lit_comp(""), RD_IconKind_Null, RD_VIEW_SETUP_FUNCTION_NAME(null), RD_VIEW_CMD_FUNCTION_NAME(null), RD_VIEW_UI_FUNCTION_NAME(null)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("empty"), str8_lit_comp(""), RD_IconKind_Null, RD_VIEW_SETUP_FUNCTION_NAME(empty), RD_VIEW_CMD_FUNCTION_NAME(empty), RD_VIEW_UI_FUNCTION_NAME(empty)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("getting_started"), str8_lit_comp("Getting Started"), RD_IconKind_QuestionMark, RD_VIEW_SETUP_FUNCTION_NAME(getting_started), RD_VIEW_CMD_FUNCTION_NAME(getting_started), RD_VIEW_UI_FUNCTION_NAME(getting_started)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("commands"), str8_lit_comp("Commands"), RD_IconKind_List, RD_VIEW_SETUP_FUNCTION_NAME(commands), RD_VIEW_CMD_FUNCTION_NAME(commands), RD_VIEW_UI_FUNCTION_NAME(commands)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_system"), str8_lit_comp("File System"), RD_IconKind_FileOutline, RD_VIEW_SETUP_FUNCTION_NAME(file_system), RD_VIEW_CMD_FUNCTION_NAME(file_system), RD_VIEW_UI_FUNCTION_NAME(file_system)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("system_processes"), str8_lit_comp("System Processes"), RD_IconKind_Null, RD_VIEW_SETUP_FUNCTION_NAME(system_processes), RD_VIEW_CMD_FUNCTION_NAME(system_processes), RD_VIEW_UI_FUNCTION_NAME(system_processes)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("entity_lister"), str8_lit_comp("Entity List"), RD_IconKind_Null, RD_VIEW_SETUP_FUNCTION_NAME(entity_lister), RD_VIEW_CMD_FUNCTION_NAME(entity_lister), RD_VIEW_UI_FUNCTION_NAME(entity_lister)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("symbol_lister"), str8_lit_comp("Symbols"), RD_IconKind_Null, RD_VIEW_SETUP_FUNCTION_NAME(symbol_lister), RD_VIEW_CMD_FUNCTION_NAME(symbol_lister), RD_VIEW_UI_FUNCTION_NAME(symbol_lister)}, +{(0|1*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("target"), str8_lit_comp("Target"), RD_IconKind_Target, RD_VIEW_SETUP_FUNCTION_NAME(target), RD_VIEW_CMD_FUNCTION_NAME(target), RD_VIEW_UI_FUNCTION_NAME(target)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("targets"), str8_lit_comp("Targets"), RD_IconKind_Target, RD_VIEW_SETUP_FUNCTION_NAME(targets), RD_VIEW_CMD_FUNCTION_NAME(targets), RD_VIEW_UI_FUNCTION_NAME(targets)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("file_path_map"), str8_lit_comp("File Path Map"), RD_IconKind_FileOutline, RD_VIEW_SETUP_FUNCTION_NAME(file_path_map), RD_VIEW_CMD_FUNCTION_NAME(file_path_map), RD_VIEW_UI_FUNCTION_NAME(file_path_map)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rules"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(auto_view_rules), RD_VIEW_CMD_FUNCTION_NAME(auto_view_rules), RD_VIEW_UI_FUNCTION_NAME(auto_view_rules)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("breakpoints"), str8_lit_comp("Breakpoints"), RD_IconKind_CircleFilled, RD_VIEW_SETUP_FUNCTION_NAME(breakpoints), RD_VIEW_CMD_FUNCTION_NAME(breakpoints), RD_VIEW_UI_FUNCTION_NAME(breakpoints)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("watch_pins"), str8_lit_comp("Watch Pins"), RD_IconKind_Pin, RD_VIEW_SETUP_FUNCTION_NAME(watch_pins), RD_VIEW_CMD_FUNCTION_NAME(watch_pins), RD_VIEW_UI_FUNCTION_NAME(watch_pins)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("scheduler"), str8_lit_comp("Scheduler"), RD_IconKind_Scheduler, RD_VIEW_SETUP_FUNCTION_NAME(scheduler), RD_VIEW_CMD_FUNCTION_NAME(scheduler), RD_VIEW_UI_FUNCTION_NAME(scheduler)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("call_stack"), str8_lit_comp("Call Stack"), RD_IconKind_Thread, RD_VIEW_SETUP_FUNCTION_NAME(call_stack), RD_VIEW_CMD_FUNCTION_NAME(call_stack), RD_VIEW_UI_FUNCTION_NAME(call_stack)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("modules"), str8_lit_comp("Modules"), RD_IconKind_Module, RD_VIEW_SETUP_FUNCTION_NAME(modules), RD_VIEW_CMD_FUNCTION_NAME(modules), RD_VIEW_UI_FUNCTION_NAME(modules)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("watch"), str8_lit_comp("Watch"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(watch), RD_VIEW_CMD_FUNCTION_NAME(watch), RD_VIEW_UI_FUNCTION_NAME(watch)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("locals"), str8_lit_comp("Locals"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(locals), RD_VIEW_CMD_FUNCTION_NAME(locals), RD_VIEW_UI_FUNCTION_NAME(locals)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("registers"), str8_lit_comp("Registers"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(registers), RD_VIEW_CMD_FUNCTION_NAME(registers), RD_VIEW_UI_FUNCTION_NAME(registers)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("globals"), str8_lit_comp("Globals"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(globals), RD_VIEW_CMD_FUNCTION_NAME(globals), RD_VIEW_UI_FUNCTION_NAME(globals)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("thread_locals"), str8_lit_comp("Thread Locals"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(thread_locals), RD_VIEW_CMD_FUNCTION_NAME(thread_locals), RD_VIEW_UI_FUNCTION_NAME(thread_locals)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("types"), str8_lit_comp("Types"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(types), RD_VIEW_CMD_FUNCTION_NAME(types), RD_VIEW_UI_FUNCTION_NAME(types)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("procedures"), str8_lit_comp("Procedures"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(procedures), RD_VIEW_CMD_FUNCTION_NAME(procedures), RD_VIEW_UI_FUNCTION_NAME(procedures)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|0*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("pending_file"), str8_lit_comp("Pending File"), RD_IconKind_FileOutline, RD_VIEW_SETUP_FUNCTION_NAME(pending_file), RD_VIEW_CMD_FUNCTION_NAME(pending_file), RD_VIEW_UI_FUNCTION_NAME(pending_file)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|1*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("text"), str8_lit_comp("Text"), RD_IconKind_FileOutline, RD_VIEW_SETUP_FUNCTION_NAME(text), RD_VIEW_CMD_FUNCTION_NAME(text), RD_VIEW_UI_FUNCTION_NAME(text)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("disasm"), str8_lit_comp("Disassembly"), RD_IconKind_Glasses, RD_VIEW_SETUP_FUNCTION_NAME(disasm), RD_VIEW_CMD_FUNCTION_NAME(disasm), RD_VIEW_UI_FUNCTION_NAME(disasm)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("output"), str8_lit_comp("Output"), RD_IconKind_List, RD_VIEW_SETUP_FUNCTION_NAME(output), RD_VIEW_CMD_FUNCTION_NAME(output), RD_VIEW_UI_FUNCTION_NAME(output)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("memory"), str8_lit_comp("Memory"), RD_IconKind_Grid, RD_VIEW_SETUP_FUNCTION_NAME(memory), RD_VIEW_CMD_FUNCTION_NAME(memory), RD_VIEW_UI_FUNCTION_NAME(memory)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("bitmap"), str8_lit_comp("Bitmap"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(bitmap), RD_VIEW_CMD_FUNCTION_NAME(bitmap), RD_VIEW_UI_FUNCTION_NAME(bitmap)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("color_rgba"), str8_lit_comp("Color (RGBA)"), RD_IconKind_Palette, RD_VIEW_SETUP_FUNCTION_NAME(color_rgba), RD_VIEW_CMD_FUNCTION_NAME(color_rgba), RD_VIEW_UI_FUNCTION_NAME(color_rgba)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|0*RD_ViewSpecFlag_CanFilter|1*RD_ViewSpecFlag_FilterIsCode|0*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("geo3d"), str8_lit_comp("Geometry (3D)"), RD_IconKind_Binoculars, RD_VIEW_SETUP_FUNCTION_NAME(geo3d), RD_VIEW_CMD_FUNCTION_NAME(geo3d), RD_VIEW_UI_FUNCTION_NAME(geo3d)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("exception_filters"), str8_lit_comp("Exception Filters"), RD_IconKind_Gear, RD_VIEW_SETUP_FUNCTION_NAME(exception_filters), RD_VIEW_CMD_FUNCTION_NAME(exception_filters), RD_VIEW_UI_FUNCTION_NAME(exception_filters)}, +{(0|0*RD_ViewSpecFlag_ParameterizedByEntity|0*RD_ViewSpecFlag_ProjectSpecific|1*RD_ViewSpecFlag_CanSerialize|1*RD_ViewSpecFlag_CanFilter|0*RD_ViewSpecFlag_FilterIsCode|1*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("settings"), str8_lit_comp("Settings"), RD_IconKind_Gear, RD_VIEW_SETUP_FUNCTION_NAME(settings), RD_VIEW_CMD_FUNCTION_NAME(settings), RD_VIEW_UI_FUNCTION_NAME(settings)}, +}; + +RD_IconKind rd_entity_kind_icon_kind_table[30] = +{ +RD_IconKind_Null, +RD_IconKind_Null, +RD_IconKind_Machine, +RD_IconKind_FileOutline, +RD_IconKind_Binoculars, +RD_IconKind_FileOutline, +RD_IconKind_Pin, +RD_IconKind_Binoculars, +RD_IconKind_Binoculars, +RD_IconKind_CircleFilled, +RD_IconKind_CircleFilled, +RD_IconKind_Null, +RD_IconKind_Target, +RD_IconKind_Null, +RD_IconKind_Null, +RD_IconKind_Null, +RD_IconKind_Null, +RD_IconKind_Window, +RD_IconKind_XSplit, +RD_IconKind_Null, +RD_IconKind_Briefcase, +RD_IconKind_Null, +RD_IconKind_Null, +RD_IconKind_Threads, +RD_IconKind_Thread, +RD_IconKind_Module, +RD_IconKind_Threads, +RD_IconKind_Module, +RD_IconKind_Null, +RD_IconKind_Null, +}; + +RD_ViewRuleSpecInfo rd_gfx_view_rule_spec_info_table[32] = +{ +{ str8_lit_comp("Empty"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("GettingStarted"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("ExceptionFilters"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Settings"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("PendingFile"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Commands"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("FileSystem"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("SystemProcesses"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("EntityLister"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("SymbolLister"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Watch"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Locals"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Registers"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Globals"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("ThreadLocals"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Types"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Procedures"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Targets"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("FilePathMap"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("AutoViewRules"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Breakpoints"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("WatchPins"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Scheduler"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("CallStack"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Modules"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Text"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Disasm"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Output"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Memory"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Bitmap"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("ColorRGBA"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +{ str8_lit_comp("Geo3D"), (RD_ViewRuleSpecInfoFlag_VizRowProd*0)|(RD_ViewRuleSpecInfoFlag_LineStringize*0)|(RD_ViewRuleSpecInfoFlag_RowUI*0)|(RD_ViewRuleSpecInfoFlag_ViewUI*0), 0, 0, 0 }, +}; + +String8 rd_theme_preset_display_string_table[9] = +{ +str8_lit_comp("Default (Dark)"), +str8_lit_comp("Default (Light)"), +str8_lit_comp("VS (Dark)"), +str8_lit_comp("VS (Light)"), +str8_lit_comp("Solarized (Dark)"), +str8_lit_comp("Solarized (Light)"), +str8_lit_comp("Handmade Hero"), +str8_lit_comp("4coder"), +str8_lit_comp("Far Manager"), +}; + +String8 rd_theme_preset_code_string_table[9] = +{ +str8_lit_comp("default_dark"), +str8_lit_comp("default_light"), +str8_lit_comp("vs_dark"), +str8_lit_comp("vs_light"), +str8_lit_comp("solarized_dark"), +str8_lit_comp("solarized_light"), +str8_lit_comp("handmade_hero"), +str8_lit_comp("four_coder"), +str8_lit_comp("far_manager"), +}; + +String8 rd_theme_color_version_remap_old_name_table[22] = +{ +str8_lit_comp("plain_text"), +str8_lit_comp("plain_background"), +str8_lit_comp("plain_border"), +str8_lit_comp("plain_overlay"), +str8_lit_comp("code_function"), +str8_lit_comp("code_symbol"), +str8_lit_comp("code_numeric"), +str8_lit_comp("line_info_0"), +str8_lit_comp("line_info_1"), +str8_lit_comp("line_info_2"), +str8_lit_comp("line_info_3"), +str8_lit_comp("alt_background"), +str8_lit_comp("alt_border"), +str8_lit_comp("tab_inactive"), +str8_lit_comp("tab_active"), +str8_lit_comp("weak_text"), +str8_lit_comp("text_selection"), +str8_lit_comp("cursor"), +str8_lit_comp("highlight_0"), +str8_lit_comp("success_background"), +str8_lit_comp("failure_background"), +str8_lit_comp("action_background"), +}; + +String8 rd_theme_color_version_remap_new_name_table[22] = +{ +str8_lit_comp("text"), +str8_lit_comp("base_background"), +str8_lit_comp("base_border"), +str8_lit_comp("drop_site_overlay"), +str8_lit_comp("code_symbol"), +str8_lit_comp("code_delimiter_operator"), +str8_lit_comp("code_numeric_alt_digit_group"), +str8_lit_comp("line_info_background_0"), +str8_lit_comp("line_info_background_1"), +str8_lit_comp("line_info_background_2"), +str8_lit_comp("line_info_background_3"), +str8_lit_comp("menu_bar_background"), +str8_lit_comp("menu_bar_border"), +str8_lit_comp("tab_background_inactive"), +str8_lit_comp("tab_background"), +str8_lit_comp("text_weak"), +str8_lit_comp("selection"), +str8_lit_comp("cursor"), +str8_lit_comp("focus"), +str8_lit_comp("positive_pop_button_background"), +str8_lit_comp("negative_pop_button_background"), +str8_lit_comp("neutral_pop_button_background"), +}; + +Vec4F32 rd_theme_preset_colors__default_dark[75] = +{ +rgba_from_u32_lit_comp(0xff00ffff), +rgba_from_u32_lit_comp(0xe5e5e5ff), +rgba_from_u32_lit_comp(0x4dc221ff), +rgba_from_u32_lit_comp(0xc56452ff), +rgba_from_u32_lit_comp(0x307eb2ff), +rgba_from_u32_lit_comp(0xa4a4a4fe), +rgba_from_u32_lit_comp(0x8aff00ff), +rgba_from_u32_lit_comp(0xb23217ff), +rgba_from_u32_lit_comp(0xfda200ff), +rgba_from_u32_lit_comp(0xffffffff), +rgba_from_u32_lit_comp(0x0000007f), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0xffffff0c), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0x99ccff4c), +rgba_from_u32_lit_comp(0xffffff1e), +rgba_from_u32_lit_comp(0x5f12005f), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0x2b2b2bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x3e4c577f), +rgba_from_u32_lit_comp(0x3e4c577f), +rgba_from_u32_lit_comp(0xffffff19), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x2c5b36ff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x803425ff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x355b6eff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x2b2b2bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x6f5135fe), +rgba_from_u32_lit_comp(0xfefefe4d), +rgba_from_u32_lit_comp(0x3e4c577f), +rgba_from_u32_lit_comp(0xffffff19), +rgba_from_u32_lit_comp(0xcbcbcbff), +rgba_from_u32_lit_comp(0x42a2cffe), +rgba_from_u32_lit_comp(0xfec746ff), +rgba_from_u32_lit_comp(0x98bc80ff), +rgba_from_u32_lit_comp(0xb7afd5ff), +rgba_from_u32_lit_comp(0xb38d4cff), +rgba_from_u32_lit_comp(0x767676ff), +rgba_from_u32_lit_comp(0x98abb1ff), +rgba_from_u32_lit_comp(0x738287ff), +rgba_from_u32_lit_comp(0x98abb1ff), +rgba_from_u32_lit_comp(0xd96759ff), +rgba_from_u32_lit_comp(0x717171ff), +rgba_from_u32_lit_comp(0x7f7f7fff), +rgba_from_u32_lit_comp(0xbebebeff), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0xffcb7fff), +rgba_from_u32_lit_comp(0xb2ff65ff), +rgba_from_u32_lit_comp(0xff99e5ff), +rgba_from_u32_lit_comp(0x6598ffff), +rgba_from_u32_lit_comp(0x65ffcbff), +rgba_from_u32_lit_comp(0xff9819ff), +rgba_from_u32_lit_comp(0x9932ffff), +rgba_from_u32_lit_comp(0x65ff4cff), +rgba_from_u32_lit_comp(0xb2ccd8ff), +rgba_from_u32_lit_comp(0xb23219ff), +rgba_from_u32_lit_comp(0xa72911ff), +}; + +Vec4F32 rd_theme_preset_colors__default_light[75] = +{ +rgba_from_u32_lit_comp(0xff00ffff), +rgba_from_u32_lit_comp(0x4c4c4cff), +rgba_from_u32_lit_comp(0x4d9e2eff), +rgba_from_u32_lit_comp(0xbd371eff), +rgba_from_u32_lit_comp(0x0064a7ff), +rgba_from_u32_lit_comp(0x4c4c4cff), +rgba_from_u32_lit_comp(0x699830ff), +rgba_from_u32_lit_comp(0xb23217ff), +rgba_from_u32_lit_comp(0x9c5900ff), +rgba_from_u32_lit_comp(0xffffffff), +rgba_from_u32_lit_comp(0x0000004c), +rgba_from_u32_lit_comp(0xa6a6a63f), +rgba_from_u32_lit_comp(0x4848480c), +rgba_from_u32_lit_comp(0xa4a4a43f), +rgba_from_u32_lit_comp(0x003d7a48), +rgba_from_u32_lit_comp(0xffffff1e), +rgba_from_u32_lit_comp(0xff30005f), +rgba_from_u32_lit_comp(0xccccccfe), +rgba_from_u32_lit_comp(0x2b2b2bfe), +rgba_from_u32_lit_comp(0xa4a4a4fe), +rgba_from_u32_lit_comp(0xeaeaea7f), +rgba_from_u32_lit_comp(0x3e4c577f), +rgba_from_u32_lit_comp(0xa4a4a4fe), +rgba_from_u32_lit_comp(0xccccccc0), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0xa4a4a4fe), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x65f534ff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0xff694cff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0xa6becaff), +rgba_from_u32_lit_comp(0xa6a6a6fd), +rgba_from_u32_lit_comp(0xa9a9a9fe), +rgba_from_u32_lit_comp(0xc0c0c0fe), +rgba_from_u32_lit_comp(0xa98b6fff), +rgba_from_u32_lit_comp(0xffffff4d), +rgba_from_u32_lit_comp(0x8282827f), +rgba_from_u32_lit_comp(0xffffff19), +rgba_from_u32_lit_comp(0x4d4d4dff), +rgba_from_u32_lit_comp(0x205670fe), +rgba_from_u32_lit_comp(0x996b00ff), +rgba_from_u32_lit_comp(0x446a2bff), +rgba_from_u32_lit_comp(0x4c35a1ff), +rgba_from_u32_lit_comp(0x573700ff), +rgba_from_u32_lit_comp(0x767676ff), +rgba_from_u32_lit_comp(0x3f6e7dff), +rgba_from_u32_lit_comp(0x1f4450ff), +rgba_from_u32_lit_comp(0x3c606bff), +rgba_from_u32_lit_comp(0xad3627ff), +rgba_from_u32_lit_comp(0x4b4b4bff), +rgba_from_u32_lit_comp(0x4b4b4bff), +rgba_from_u32_lit_comp(0x000000ff), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x945800ff), +rgba_from_u32_lit_comp(0x3f5b23ff), +rgba_from_u32_lit_comp(0x642a55ff), +rgba_from_u32_lit_comp(0x30456fff), +rgba_from_u32_lit_comp(0x264f41ff), +rgba_from_u32_lit_comp(0x736a5fff), +rgba_from_u32_lit_comp(0x472f5eff), +rgba_from_u32_lit_comp(0x405d3bff), +rgba_from_u32_lit_comp(0x49606aff), +rgba_from_u32_lit_comp(0xb23219ff), +rgba_from_u32_lit_comp(0xff2800ff), +}; + +Vec4F32 rd_theme_preset_colors__vs_dark[75] = +{ +rgba_from_u32_lit_comp(0xff00ffff), +rgba_from_u32_lit_comp(0xe5e5e5ff), +rgba_from_u32_lit_comp(0x4dc221ff), +rgba_from_u32_lit_comp(0xc56452ff), +rgba_from_u32_lit_comp(0x307eb2ff), +rgba_from_u32_lit_comp(0xa4a4a4fe), +rgba_from_u32_lit_comp(0x8aff00ff), +rgba_from_u32_lit_comp(0xb23217ff), +rgba_from_u32_lit_comp(0xfda200ff), +rgba_from_u32_lit_comp(0xffffffff), +rgba_from_u32_lit_comp(0x0000007f), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0xffffff0c), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0x99ccff4c), +rgba_from_u32_lit_comp(0xffffff1e), +rgba_from_u32_lit_comp(0x5f12005f), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x1b1b1bfd), +rgba_from_u32_lit_comp(0x1b1b1bfd), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x2c5b36ff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x803425ff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x355b6eff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x2b2b2bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x0079ccff), +rgba_from_u32_lit_comp(0xfefefe4d), +rgba_from_u32_lit_comp(0xfefefe14), +rgba_from_u32_lit_comp(0xffffff00), +rgba_from_u32_lit_comp(0xcbcbcbff), +rgba_from_u32_lit_comp(0xdcdcaaff), +rgba_from_u32_lit_comp(0x4ec9afff), +rgba_from_u32_lit_comp(0x9cdbfeff), +rgba_from_u32_lit_comp(0xb7afd5ff), +rgba_from_u32_lit_comp(0x569cd6ff), +rgba_from_u32_lit_comp(0x767676ff), +rgba_from_u32_lit_comp(0xb5cea8ff), +rgba_from_u32_lit_comp(0x729360ff), +rgba_from_u32_lit_comp(0xd59b85ff), +rgba_from_u32_lit_comp(0xd59c85ff), +rgba_from_u32_lit_comp(0x57a54aff), +rgba_from_u32_lit_comp(0x2a91afff), +rgba_from_u32_lit_comp(0x9ddaecff), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0xffcb7fff), +rgba_from_u32_lit_comp(0xb2ff65ff), +rgba_from_u32_lit_comp(0xff99e5ff), +rgba_from_u32_lit_comp(0x6598ffff), +rgba_from_u32_lit_comp(0x65ffcbff), +rgba_from_u32_lit_comp(0xff9819ff), +rgba_from_u32_lit_comp(0x9932ffff), +rgba_from_u32_lit_comp(0x65ff4cff), +rgba_from_u32_lit_comp(0xb2ccd8ff), +rgba_from_u32_lit_comp(0xb23219ff), +rgba_from_u32_lit_comp(0xa72911ff), +}; + +Vec4F32 rd_theme_preset_colors__vs_light[75] = +{ +rgba_from_u32_lit_comp(0xff00ffff), +rgba_from_u32_lit_comp(0x000000ff), +rgba_from_u32_lit_comp(0x4dc221ff), +rgba_from_u32_lit_comp(0xc46451ff), +rgba_from_u32_lit_comp(0x307eb2ff), +rgba_from_u32_lit_comp(0x0000007f), +rgba_from_u32_lit_comp(0x000000ff), +rgba_from_u32_lit_comp(0xb23217ff), +rgba_from_u32_lit_comp(0x002affff), +rgba_from_u32_lit_comp(0x000000ff), +rgba_from_u32_lit_comp(0xa3a3a37e), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0x0000000c), +rgba_from_u32_lit_comp(0xfefefe53), +rgba_from_u32_lit_comp(0x3d74ab4b), +rgba_from_u32_lit_comp(0x0000001e), +rgba_from_u32_lit_comp(0x5f12005f), +rgba_from_u32_lit_comp(0xfefefefe), +rgba_from_u32_lit_comp(0xe7e7e7fe), +rgba_from_u32_lit_comp(0xb6b6b6ff), +rgba_from_u32_lit_comp(0xffffff7f), +rgba_from_u32_lit_comp(0xffffff7f), +rgba_from_u32_lit_comp(0xb6b6b6ff), +rgba_from_u32_lit_comp(0xfefefec7), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0xb6b6b6ff), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0xb6b6b6ff), +rgba_from_u32_lit_comp(0x84ce93ff), +rgba_from_u32_lit_comp(0xb6b6b6ff), +rgba_from_u32_lit_comp(0xbd3e24ff), +rgba_from_u32_lit_comp(0xb6b6b6ff), +rgba_from_u32_lit_comp(0x6e9db5ff), +rgba_from_u32_lit_comp(0xb6b6b6ff), +rgba_from_u32_lit_comp(0xe8e8e8fe), +rgba_from_u32_lit_comp(0xb6b6b6ff), +rgba_from_u32_lit_comp(0xfffffffe), +rgba_from_u32_lit_comp(0xb6b6b6ff), +rgba_from_u32_lit_comp(0xcdd4dc7f), +rgba_from_u32_lit_comp(0xb6b6b6ff), +rgba_from_u32_lit_comp(0x000000ff), +rgba_from_u32_lit_comp(0x000000ff), +rgba_from_u32_lit_comp(0xa33700ff), +rgba_from_u32_lit_comp(0x007666ff), +rgba_from_u32_lit_comp(0xb7afd5ff), +rgba_from_u32_lit_comp(0x0000ffff), +rgba_from_u32_lit_comp(0x767676ff), +rgba_from_u32_lit_comp(0x088658ff), +rgba_from_u32_lit_comp(0x0c3828ff), +rgba_from_u32_lit_comp(0xa31414ff), +rgba_from_u32_lit_comp(0x0000ffff), +rgba_from_u32_lit_comp(0x008000ff), +rgba_from_u32_lit_comp(0x227893ff), +rgba_from_u32_lit_comp(0x123d4bfe), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x945800ff), +rgba_from_u32_lit_comp(0x3f5b23ff), +rgba_from_u32_lit_comp(0x642a55ff), +rgba_from_u32_lit_comp(0x30456fff), +rgba_from_u32_lit_comp(0x264f41ff), +rgba_from_u32_lit_comp(0x736a5fff), +rgba_from_u32_lit_comp(0x472f5eff), +rgba_from_u32_lit_comp(0x405d3bff), +rgba_from_u32_lit_comp(0x49606aff), +rgba_from_u32_lit_comp(0xb23219ff), +rgba_from_u32_lit_comp(0xa72911ff), +}; + +Vec4F32 rd_theme_preset_colors__solarized_dark[75] = +{ +rgba_from_u32_lit_comp(0xff00ffff), +rgba_from_u32_lit_comp(0x999999ff), +rgba_from_u32_lit_comp(0x4dc221ff), +rgba_from_u32_lit_comp(0xc56452ff), +rgba_from_u32_lit_comp(0x307eb2ff), +rgba_from_u32_lit_comp(0x9999998a), +rgba_from_u32_lit_comp(0x8aff00ff), +rgba_from_u32_lit_comp(0xb23217ff), +rgba_from_u32_lit_comp(0xfda200ff), +rgba_from_u32_lit_comp(0xffffffff), +rgba_from_u32_lit_comp(0x0000007f), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0xffffff0c), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0x99ccff4c), +rgba_from_u32_lit_comp(0xffffff1e), +rgba_from_u32_lit_comp(0x5f12005f), +rgba_from_u32_lit_comp(0x002a35fe), +rgba_from_u32_lit_comp(0x2b2b2bfe), +rgba_from_u32_lit_comp(0xfefefe3a), +rgba_from_u32_lit_comp(0x00202bff), +rgba_from_u32_lit_comp(0x3e4c577f), +rgba_from_u32_lit_comp(0xffffff19), +rgba_from_u32_lit_comp(0x007fa14e), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0xfdfdfd3a), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0xfefefe3a), +rgba_from_u32_lit_comp(0x2c5b36ff), +rgba_from_u32_lit_comp(0xfefefe3a), +rgba_from_u32_lit_comp(0x803425ff), +rgba_from_u32_lit_comp(0xfefefe3a), +rgba_from_u32_lit_comp(0x355b6eff), +rgba_from_u32_lit_comp(0xfefefe3a), +rgba_from_u32_lit_comp(0x005e77fe), +rgba_from_u32_lit_comp(0xfefefe3a), +rgba_from_u32_lit_comp(0x005e77fe), +rgba_from_u32_lit_comp(0xfefefe4d), +rgba_from_u32_lit_comp(0x3e4c577f), +rgba_from_u32_lit_comp(0xffffff19), +rgba_from_u32_lit_comp(0xcbcbcbff), +rgba_from_u32_lit_comp(0xcb4a15ff), +rgba_from_u32_lit_comp(0xcb4a15ff), +rgba_from_u32_lit_comp(0x98bc80ff), +rgba_from_u32_lit_comp(0xb7afd5ff), +rgba_from_u32_lit_comp(0x849803ff), +rgba_from_u32_lit_comp(0x767676ff), +rgba_from_u32_lit_comp(0xd33582ff), +rgba_from_u32_lit_comp(0x902559ff), +rgba_from_u32_lit_comp(0x1f9d91ff), +rgba_from_u32_lit_comp(0x839802ff), +rgba_from_u32_lit_comp(0x556a6fff), +rgba_from_u32_lit_comp(0x566c73ff), +rgba_from_u32_lit_comp(0xa2aaacff), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0xffcb7fff), +rgba_from_u32_lit_comp(0xb2ff65ff), +rgba_from_u32_lit_comp(0xff99e5ff), +rgba_from_u32_lit_comp(0x6598ffff), +rgba_from_u32_lit_comp(0x65ffcbff), +rgba_from_u32_lit_comp(0xff9819ff), +rgba_from_u32_lit_comp(0x9932ffff), +rgba_from_u32_lit_comp(0x65ff4cff), +rgba_from_u32_lit_comp(0xb2ccd8ff), +rgba_from_u32_lit_comp(0xb23219ff), +rgba_from_u32_lit_comp(0xa72911ff), +}; + +Vec4F32 rd_theme_preset_colors__solarized_light[75] = +{ +rgba_from_u32_lit_comp(0xff00ffff), +rgba_from_u32_lit_comp(0x333333ff), +rgba_from_u32_lit_comp(0x4dc221ff), +rgba_from_u32_lit_comp(0xc56452ff), +rgba_from_u32_lit_comp(0x307eb2ff), +rgba_from_u32_lit_comp(0x818181ff), +rgba_from_u32_lit_comp(0x586e75ff), +rgba_from_u32_lit_comp(0xb23217ff), +rgba_from_u32_lit_comp(0x92743dff), +rgba_from_u32_lit_comp(0x747474ff), +rgba_from_u32_lit_comp(0xc9bfa394), +rgba_from_u32_lit_comp(0xe4dac090), +rgba_from_u32_lit_comp(0xffffff0c), +rgba_from_u32_lit_comp(0x0000001c), +rgba_from_u32_lit_comp(0x678cb24c), +rgba_from_u32_lit_comp(0xffffff1e), +rgba_from_u32_lit_comp(0x5f12005f), +rgba_from_u32_lit_comp(0xfcf5e2fe), +rgba_from_u32_lit_comp(0x2b2b2bfe), +rgba_from_u32_lit_comp(0xbebaabfe), +rgba_from_u32_lit_comp(0xeee8d5ff), +rgba_from_u32_lit_comp(0x3e4c577f), +rgba_from_u32_lit_comp(0xbebaabfe), +rgba_from_u32_lit_comp(0xffffff7c), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0xbebaabfe), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0xbdb9aa00), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0xbebaabfe), +rgba_from_u32_lit_comp(0xb6ddbeff), +rgba_from_u32_lit_comp(0xbebaabfe), +rgba_from_u32_lit_comp(0xf8b0a1ff), +rgba_from_u32_lit_comp(0xbebaabfe), +rgba_from_u32_lit_comp(0xb2d3e3ff), +rgba_from_u32_lit_comp(0xbebaabfe), +rgba_from_u32_lit_comp(0xe3dbc7fe), +rgba_from_u32_lit_comp(0xbebaabfe), +rgba_from_u32_lit_comp(0xfdf6e3ff), +rgba_from_u32_lit_comp(0xbebaabfe), +rgba_from_u32_lit_comp(0xd4cfc0fe), +rgba_from_u32_lit_comp(0xbebaabfe), +rgba_from_u32_lit_comp(0x657b83ff), +rgba_from_u32_lit_comp(0xcb4a15ff), +rgba_from_u32_lit_comp(0xcb4a15ff), +rgba_from_u32_lit_comp(0x258ad2ff), +rgba_from_u32_lit_comp(0x373345ff), +rgba_from_u32_lit_comp(0x586e75ff), +rgba_from_u32_lit_comp(0x767676ff), +rgba_from_u32_lit_comp(0xd33482ef), +rgba_from_u32_lit_comp(0x8e2659ff), +rgba_from_u32_lit_comp(0x29a198ff), +rgba_from_u32_lit_comp(0xd96759ff), +rgba_from_u32_lit_comp(0x93a1a1ff), +rgba_from_u32_lit_comp(0x227893ef), +rgba_from_u32_lit_comp(0x111e22ef), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x945800ff), +rgba_from_u32_lit_comp(0x3f5b23ff), +rgba_from_u32_lit_comp(0x642a55ff), +rgba_from_u32_lit_comp(0x30456fff), +rgba_from_u32_lit_comp(0x264f41ff), +rgba_from_u32_lit_comp(0x736a5fff), +rgba_from_u32_lit_comp(0x472f5eff), +rgba_from_u32_lit_comp(0x405d3bff), +rgba_from_u32_lit_comp(0x49606aff), +rgba_from_u32_lit_comp(0xb23218ff), +rgba_from_u32_lit_comp(0xff684bff), +}; + +Vec4F32 rd_theme_preset_colors__handmade_hero[75] = +{ +rgba_from_u32_lit_comp(0xff00ffff), +rgba_from_u32_lit_comp(0xa08462ff), +rgba_from_u32_lit_comp(0x4dc221ff), +rgba_from_u32_lit_comp(0xc56452ff), +rgba_from_u32_lit_comp(0x307eb2ff), +rgba_from_u32_lit_comp(0x6e512eff), +rgba_from_u32_lit_comp(0x8aff00ff), +rgba_from_u32_lit_comp(0xb23217ff), +rgba_from_u32_lit_comp(0xfda200ff), +rgba_from_u32_lit_comp(0xffffffff), +rgba_from_u32_lit_comp(0x0000007f), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0xffffff0c), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0x99ccff4c), +rgba_from_u32_lit_comp(0xffffff1e), +rgba_from_u32_lit_comp(0x5f12005f), +rgba_from_u32_lit_comp(0x0c0c0cfe), +rgba_from_u32_lit_comp(0x2b2b2bfe), +rgba_from_u32_lit_comp(0x423525fe), +rgba_from_u32_lit_comp(0x0c0c0cfe), +rgba_from_u32_lit_comp(0x3e4c577f), +rgba_from_u32_lit_comp(0xffffff19), +rgba_from_u32_lit_comp(0x0c0c0c32), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0x423425fe), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x132e19ff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x803425ff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x15445cff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x1f1f27fe), +rgba_from_u32_lit_comp(0xfefefe4d), +rgba_from_u32_lit_comp(0x1f1f27fe), +rgba_from_u32_lit_comp(0xfefefe4d), +rgba_from_u32_lit_comp(0x131315ee), +rgba_from_u32_lit_comp(0xffffff19), +rgba_from_u32_lit_comp(0xa08462ff), +rgba_from_u32_lit_comp(0xcc5634ff), +rgba_from_u32_lit_comp(0xd8a51bff), +rgba_from_u32_lit_comp(0xc04047ff), +rgba_from_u32_lit_comp(0xb7afd5ff), +rgba_from_u32_lit_comp(0xac7a09ff), +rgba_from_u32_lit_comp(0xa08462ff), +rgba_from_u32_lit_comp(0x698e21ff), +rgba_from_u32_lit_comp(0x3a4e11ff), +rgba_from_u32_lit_comp(0x6a8e22ff), +rgba_from_u32_lit_comp(0xdab98fff), +rgba_from_u32_lit_comp(0x686868ff), +rgba_from_u32_lit_comp(0xa08462ff), +rgba_from_u32_lit_comp(0xc8b399ff), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0xffcb7fff), +rgba_from_u32_lit_comp(0xb2ff65ff), +rgba_from_u32_lit_comp(0xff99e5ff), +rgba_from_u32_lit_comp(0x6598ffff), +rgba_from_u32_lit_comp(0x65ffcbff), +rgba_from_u32_lit_comp(0xff9819ff), +rgba_from_u32_lit_comp(0x9932ffff), +rgba_from_u32_lit_comp(0x65ff4cff), +rgba_from_u32_lit_comp(0xb2ccd8ff), +rgba_from_u32_lit_comp(0xb23219ff), +rgba_from_u32_lit_comp(0xa72911ff), +}; + +Vec4F32 rd_theme_preset_colors__four_coder[75] = +{ +rgba_from_u32_lit_comp(0xff00ffff), +rgba_from_u32_lit_comp(0x90b080ff), +rgba_from_u32_lit_comp(0x4dc221ff), +rgba_from_u32_lit_comp(0xc56452ff), +rgba_from_u32_lit_comp(0x307eb2ff), +rgba_from_u32_lit_comp(0x566e4bff), +rgba_from_u32_lit_comp(0x8aff00ff), +rgba_from_u32_lit_comp(0xb23217ff), +rgba_from_u32_lit_comp(0xfda200ff), +rgba_from_u32_lit_comp(0xffffffff), +rgba_from_u32_lit_comp(0x0000007f), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0xffffff0c), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0x99ccff4c), +rgba_from_u32_lit_comp(0xffffff1e), +rgba_from_u32_lit_comp(0x5f12005f), +rgba_from_u32_lit_comp(0x0c0c0cfe), +rgba_from_u32_lit_comp(0x2b2b2bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x0c0c0cfe), +rgba_from_u32_lit_comp(0x3e4c577f), +rgba_from_u32_lit_comp(0xffffff19), +rgba_from_u32_lit_comp(0x0c0c0c3e), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x152f1bff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x43150cff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x1b323eff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x212721fe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x212721fe), +rgba_from_u32_lit_comp(0xfefefe4d), +rgba_from_u32_lit_comp(0x3a3a3a7f), +rgba_from_u32_lit_comp(0x00000019), +rgba_from_u32_lit_comp(0x90b080ff), +rgba_from_u32_lit_comp(0x42a2cffe), +rgba_from_u32_lit_comp(0xfd7c52ff), +rgba_from_u32_lit_comp(0x98bc80ff), +rgba_from_u32_lit_comp(0xb7afd5ff), +rgba_from_u32_lit_comp(0xd08f1eff), +rgba_from_u32_lit_comp(0x90b080ff), +rgba_from_u32_lit_comp(0x4fff2eff), +rgba_from_u32_lit_comp(0x3ccd21ff), +rgba_from_u32_lit_comp(0x4fff2eff), +rgba_from_u32_lit_comp(0xa0b8a0ff), +rgba_from_u32_lit_comp(0x1e8fefff), +rgba_from_u32_lit_comp(0x7e7e7ffe), +rgba_from_u32_lit_comp(0xbebebeff), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0xffcb7fff), +rgba_from_u32_lit_comp(0xb2ff65ff), +rgba_from_u32_lit_comp(0xff99e5ff), +rgba_from_u32_lit_comp(0x6598ffff), +rgba_from_u32_lit_comp(0x65ffcbff), +rgba_from_u32_lit_comp(0xff9819ff), +rgba_from_u32_lit_comp(0x9932ffff), +rgba_from_u32_lit_comp(0x65ff4cff), +rgba_from_u32_lit_comp(0xb2ccd8ff), +rgba_from_u32_lit_comp(0xb23219ff), +rgba_from_u32_lit_comp(0xa72911ff), +}; + +Vec4F32 rd_theme_preset_colors__far_manager[75] = +{ +rgba_from_u32_lit_comp(0xff00ffff), +rgba_from_u32_lit_comp(0x00fefeff), +rgba_from_u32_lit_comp(0x4dc221ff), +rgba_from_u32_lit_comp(0xc56452ff), +rgba_from_u32_lit_comp(0x307eb2ff), +rgba_from_u32_lit_comp(0x00a9a9ff), +rgba_from_u32_lit_comp(0x8aff00ff), +rgba_from_u32_lit_comp(0xb23217ff), +rgba_from_u32_lit_comp(0x00fefeff), +rgba_from_u32_lit_comp(0xffffffff), +rgba_from_u32_lit_comp(0x0000007f), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0xffffff0c), +rgba_from_u32_lit_comp(0x0000003f), +rgba_from_u32_lit_comp(0x99ccff4c), +rgba_from_u32_lit_comp(0xffffff1e), +rgba_from_u32_lit_comp(0x5f12005f), +rgba_from_u32_lit_comp(0x000081fe), +rgba_from_u32_lit_comp(0x2b2b2bfe), +rgba_from_u32_lit_comp(0x0000fffe), +rgba_from_u32_lit_comp(0x007d7dff), +rgba_from_u32_lit_comp(0x007d7dff), +rgba_from_u32_lit_comp(0xfefefe00), +rgba_from_u32_lit_comp(0x007c7c55), +rgba_from_u32_lit_comp(0x33333333), +rgba_from_u32_lit_comp(0x00ffff55), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x00000000), +rgba_from_u32_lit_comp(0x1b1b1bfe), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x2c5b36ff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x803425ff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x933100ff), +rgba_from_u32_lit_comp(0x3f3f3ffd), +rgba_from_u32_lit_comp(0x007d7dff), +rgba_from_u32_lit_comp(0x3f3f3ffe), +rgba_from_u32_lit_comp(0x007d7dff), +rgba_from_u32_lit_comp(0xfefefe4d), +rgba_from_u32_lit_comp(0x3e4c577f), +rgba_from_u32_lit_comp(0xfefefe19), +rgba_from_u32_lit_comp(0x00fefeff), +rgba_from_u32_lit_comp(0x65b1ffff), +rgba_from_u32_lit_comp(0xfec746ff), +rgba_from_u32_lit_comp(0x00ff00ff), +rgba_from_u32_lit_comp(0xb7afd5ff), +rgba_from_u32_lit_comp(0x00ffffff), +rgba_from_u32_lit_comp(0xffffffff), +rgba_from_u32_lit_comp(0x00ff00ff), +rgba_from_u32_lit_comp(0x738287ff), +rgba_from_u32_lit_comp(0x98abb1ff), +rgba_from_u32_lit_comp(0xff0000ff), +rgba_from_u32_lit_comp(0xffffffff), +rgba_from_u32_lit_comp(0x007d7dff), +rgba_from_u32_lit_comp(0x00fefeff), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0x99503d3f), +rgba_from_u32_lit_comp(0xfe82493f), +rgba_from_u32_lit_comp(0xffba173f), +rgba_from_u32_lit_comp(0xcefd693f), +rgba_from_u32_lit_comp(0xffcb7fff), +rgba_from_u32_lit_comp(0xb2ff65ff), +rgba_from_u32_lit_comp(0xff99e5ff), +rgba_from_u32_lit_comp(0x6598ffff), +rgba_from_u32_lit_comp(0x65ffcbff), +rgba_from_u32_lit_comp(0xff9819ff), +rgba_from_u32_lit_comp(0x9932ffff), +rgba_from_u32_lit_comp(0x65ff4cff), +rgba_from_u32_lit_comp(0xb2ccd8ff), +rgba_from_u32_lit_comp(0xb23219ff), +rgba_from_u32_lit_comp(0xff2800ff), +}; + +Vec4F32* rd_theme_preset_colors_table[9] = +{ +rd_theme_preset_colors__default_dark, +rd_theme_preset_colors__default_light, +rd_theme_preset_colors__vs_dark, +rd_theme_preset_colors__vs_light, +rd_theme_preset_colors__solarized_dark, +rd_theme_preset_colors__solarized_light, +rd_theme_preset_colors__handmade_hero, +rd_theme_preset_colors__four_coder, +rd_theme_preset_colors__far_manager, +}; + +String8 rd_theme_color_display_string_table[75] = +{ +str8_lit_comp("Null"), +str8_lit_comp("Text"), +str8_lit_comp("Text (Positive)"), +str8_lit_comp("Text (Negative)"), +str8_lit_comp("Text (Neutral)"), +str8_lit_comp("Text (Weak)"), +str8_lit_comp("Cursor"), +str8_lit_comp("Cursor (Inactive)"), +str8_lit_comp("Focus"), +str8_lit_comp("Hover"), +str8_lit_comp("Drop Shadow"), +str8_lit_comp("Disabled Overlay"), +str8_lit_comp("Drop Site Overlay"), +str8_lit_comp("Inactive Panel Overlay"), +str8_lit_comp("Selection Overlay"), +str8_lit_comp("Highlight Overlay"), +str8_lit_comp("Error Highlight Overlay"), +str8_lit_comp("Base Background"), +str8_lit_comp("Base Background (Alternate)"), +str8_lit_comp("Base Border"), +str8_lit_comp("Menu Bar Background"), +str8_lit_comp("Menu Bar Background (Alternate)"), +str8_lit_comp("Menu Bar Border"), +str8_lit_comp("Floating Background"), +str8_lit_comp("Floating Background (Alternate)"), +str8_lit_comp("Floating Border"), +str8_lit_comp("Implicit Button Background"), +str8_lit_comp("Implicit Button Border"), +str8_lit_comp("Plain Button Background"), +str8_lit_comp("Plain Button Border"), +str8_lit_comp("Positive Pop Button Background"), +str8_lit_comp("Positive Pop Button Border"), +str8_lit_comp("Negative Pop Button Background"), +str8_lit_comp("Negative Pop Button Border"), +str8_lit_comp("Neutral Pop Button Background"), +str8_lit_comp("Neutral Pop Button Border"), +str8_lit_comp("Scroll Bar Button Background"), +str8_lit_comp("Scroll Bar Button Border"), +str8_lit_comp("Tab Background"), +str8_lit_comp("Tab Border"), +str8_lit_comp("Tab Background (Inactive)"), +str8_lit_comp("Tab Border (Inactive)"), +str8_lit_comp("Code (Default)"), +str8_lit_comp("Code (Symbol)"), +str8_lit_comp("Code (Type)"), +str8_lit_comp("Code (Local)"), +str8_lit_comp("Code (Register)"), +str8_lit_comp("Code (Keyword)"), +str8_lit_comp("Code (Delimiters/Operators)"), +str8_lit_comp("Code (Numeric)"), +str8_lit_comp("Code (Numeric, Alt. Digit Group)"), +str8_lit_comp("Code (String)"), +str8_lit_comp("Code (Meta)"), +str8_lit_comp("Code (Comment)"), +str8_lit_comp("Code Line Numbers"), +str8_lit_comp("Code Line Numbers (Selected)"), +str8_lit_comp("Line Info Background 0"), +str8_lit_comp("Line Info Background 1"), +str8_lit_comp("Line Info Background 2"), +str8_lit_comp("Line Info Background 3"), +str8_lit_comp("Line Info Background 4"), +str8_lit_comp("Line Info Background 5"), +str8_lit_comp("Line Info Background 6"), +str8_lit_comp("Line Info Background 7"), +str8_lit_comp("Thread 0"), +str8_lit_comp("Thread 1"), +str8_lit_comp("Thread 2"), +str8_lit_comp("Thread 3"), +str8_lit_comp("Thread 4"), +str8_lit_comp("Thread 5"), +str8_lit_comp("Thread 6"), +str8_lit_comp("Thread 7"), +str8_lit_comp("Thread (Unwound)"), +str8_lit_comp("Thread (Error)"), +str8_lit_comp("Breakpoint"), +}; + +String8 rd_theme_color_cfg_string_table[75] = +{ +str8_lit_comp("null"), +str8_lit_comp("text"), +str8_lit_comp("text_positive"), +str8_lit_comp("text_negative"), +str8_lit_comp("text_neutral"), +str8_lit_comp("text_weak"), +str8_lit_comp("cursor"), +str8_lit_comp("cursor_inactive"), +str8_lit_comp("focus"), +str8_lit_comp("hover"), +str8_lit_comp("drop_shadow"), +str8_lit_comp("disabled_overlay"), +str8_lit_comp("drop_site_overlay"), +str8_lit_comp("inactive_panel_overlay"), +str8_lit_comp("selection_overlay"), +str8_lit_comp("highlight_overlay"), +str8_lit_comp("error_highlight_overlay"), +str8_lit_comp("base_background"), +str8_lit_comp("base_background_alt"), +str8_lit_comp("base_border"), +str8_lit_comp("menu_bar_background"), +str8_lit_comp("menu_bar_background_alt"), +str8_lit_comp("menu_bar_border"), +str8_lit_comp("floating_background"), +str8_lit_comp("floating_background_alt"), +str8_lit_comp("floating_border"), +str8_lit_comp("implicit_button_background"), +str8_lit_comp("implicit_button_border"), +str8_lit_comp("plain_button_background"), +str8_lit_comp("plain_button_border"), +str8_lit_comp("positive_pop_button_background"), +str8_lit_comp("positive_pop_button_border"), +str8_lit_comp("negative_pop_button_background"), +str8_lit_comp("negative_pop_button_border"), +str8_lit_comp("neutral_pop_button_background"), +str8_lit_comp("neutral_pop_button_border"), +str8_lit_comp("scroll_bar_button_background"), +str8_lit_comp("scroll_bar_button_border"), +str8_lit_comp("tab_background"), +str8_lit_comp("tab_border"), +str8_lit_comp("tab_background_inactive"), +str8_lit_comp("tab_border_inactive"), +str8_lit_comp("code_default"), +str8_lit_comp("code_symbol"), +str8_lit_comp("code_type"), +str8_lit_comp("code_local"), +str8_lit_comp("code_register"), +str8_lit_comp("code_keyword"), +str8_lit_comp("code_delimiter_operator"), +str8_lit_comp("code_numeric"), +str8_lit_comp("code_numeric_alt_digit_group"), +str8_lit_comp("code_string"), +str8_lit_comp("code_meta"), +str8_lit_comp("code_comment"), +str8_lit_comp("code_line_numbers"), +str8_lit_comp("code_line_numbers_selected"), +str8_lit_comp("line_info_background_0"), +str8_lit_comp("line_info_background_1"), +str8_lit_comp("line_info_background_2"), +str8_lit_comp("line_info_background_3"), +str8_lit_comp("line_info_background_4"), +str8_lit_comp("line_info_background_5"), +str8_lit_comp("line_info_background_6"), +str8_lit_comp("line_info_background_7"), +str8_lit_comp("thread_0"), +str8_lit_comp("thread_1"), +str8_lit_comp("thread_2"), +str8_lit_comp("thread_3"), +str8_lit_comp("thread_4"), +str8_lit_comp("thread_5"), +str8_lit_comp("thread_6"), +str8_lit_comp("thread_7"), +str8_lit_comp("thread_unwound"), +str8_lit_comp("thread_error"), +str8_lit_comp("breakpoint"), +}; + +String8 rd_setting_code_display_string_table[19] = +{ +str8_lit_comp("Hover Animations"), +str8_lit_comp("Press Animations"), +str8_lit_comp("Focus Animations"), +str8_lit_comp("Tooltip Animations"), +str8_lit_comp("Menu Animations"), +str8_lit_comp("Scrolling Animations"), +str8_lit_comp("Background Blur"), +str8_lit_comp("Thread Lines"), +str8_lit_comp("Breakpoint Lines"), +str8_lit_comp("Thread Glow"), +str8_lit_comp("Breakpoint Glow"), +str8_lit_comp("Opaque Backgrounds"), +str8_lit_comp("Tab Width"), +str8_lit_comp("Main Font Size"), +str8_lit_comp("Code Font Size"), +str8_lit_comp("Smooth UI Text"), +str8_lit_comp("Smooth Code Text"), +str8_lit_comp("Hint UI Text"), +str8_lit_comp("Hint Code Text"), +}; + +String8 rd_setting_code_lower_string_table[19] = +{ +str8_lit_comp("hover_animations"), +str8_lit_comp("press_animations"), +str8_lit_comp("focus_animations"), +str8_lit_comp("tooltip_animations"), +str8_lit_comp("menu_animations"), +str8_lit_comp("scrolling_animations"), +str8_lit_comp("background_blur"), +str8_lit_comp("thread_lines"), +str8_lit_comp("breakpoint_lines"), +str8_lit_comp("thread_glow"), +str8_lit_comp("breakpoint_glow"), +str8_lit_comp("opaque_backgrounds"), +str8_lit_comp("tab_width"), +str8_lit_comp("main_font_size"), +str8_lit_comp("code_font_size"), +str8_lit_comp("smooth_ui_text"), +str8_lit_comp("smooth_code_text"), +str8_lit_comp("hint_ui_text"), +str8_lit_comp("hint_code_text"), +}; + +B8 rd_setting_code_default_is_per_window_table[19] = +{ +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +1, +1, +1, +1, +1, +1, +}; + +RD_SettingVal rd_setting_code_default_val_table[19] = +{ +{1, 1}, +{1, 1}, +{1, 0}, +{1, 1}, +{1, 1}, +{1, 1}, +{1, 1}, +{1, 1}, +{1, 1}, +{1, 1}, +{1, 1}, +{1, 0}, +{1, 4}, +{1, 12}, +{1, 12}, +{1, 1}, +{1, 0}, +{1, 1}, +{1, 1}, +}; + +Rng1S32 rd_setting_code_s32_range_table[19] = +{ +{0, 1}, +{0, 1}, +{0, 1}, +{0, 1}, +{0, 1}, +{0, 1}, +{0, 1}, +{0, 1}, +{0, 1}, +{0, 1}, +{0, 1}, +{0, 1}, +{1, 32}, +{6, 72}, +{6, 72}, +{0, 1}, +{0, 1}, +{0, 1}, +{0, 1}, +}; + +C_LINKAGE_END + diff --git a/src/dbg_frontend/generated/dbg_frontend.meta.h b/src/raddbg/generated/raddbg.meta.h similarity index 98% rename from src/dbg_frontend/generated/dbg_frontend.meta.h rename to src/raddbg/generated/raddbg.meta.h index 0d08356d..6f778bf4 100644 --- a/src/dbg_frontend/generated/dbg_frontend.meta.h +++ b/src/raddbg/generated/raddbg.meta.h @@ -3,597 +3,597 @@ //- GENERATED CODE -#ifndef DBG_FRONTEND_META_H -#define DBG_FRONTEND_META_H +#ifndef RADDBG_META_H +#define RADDBG_META_H -typedef enum DF_CfgSrc +typedef enum RD_CfgSrc { -DF_CfgSrc_User, -DF_CfgSrc_Project, -DF_CfgSrc_CommandLine, -DF_CfgSrc_Transient, -DF_CfgSrc_COUNT, -} DF_CfgSrc; +RD_CfgSrc_User, +RD_CfgSrc_Project, +RD_CfgSrc_CommandLine, +RD_CfgSrc_Transient, +RD_CfgSrc_COUNT, +} RD_CfgSrc; -typedef enum DF_EntityKind +typedef enum RD_EntityKind { -DF_EntityKind_Nil, -DF_EntityKind_Root, -DF_EntityKind_Machine, -DF_EntityKind_File, -DF_EntityKind_AutoViewRule, -DF_EntityKind_FilePathMap, -DF_EntityKind_WatchPin, -DF_EntityKind_Watch, -DF_EntityKind_ViewRule, -DF_EntityKind_Breakpoint, -DF_EntityKind_Condition, -DF_EntityKind_Location, -DF_EntityKind_Target, -DF_EntityKind_Executable, -DF_EntityKind_Arguments, -DF_EntityKind_WorkingDirectory, -DF_EntityKind_EntryPoint, -DF_EntityKind_Window, -DF_EntityKind_Panel, -DF_EntityKind_View, -DF_EntityKind_RecentProject, -DF_EntityKind_Source, -DF_EntityKind_Dest, -DF_EntityKind_Process, -DF_EntityKind_Thread, -DF_EntityKind_Module, -DF_EntityKind_PendingThreadName, -DF_EntityKind_DebugInfoPath, -DF_EntityKind_ConversionTask, -DF_EntityKind_ConversionFail, -DF_EntityKind_COUNT, -} DF_EntityKind; +RD_EntityKind_Nil, +RD_EntityKind_Root, +RD_EntityKind_Machine, +RD_EntityKind_File, +RD_EntityKind_AutoViewRule, +RD_EntityKind_FilePathMap, +RD_EntityKind_WatchPin, +RD_EntityKind_Watch, +RD_EntityKind_ViewRule, +RD_EntityKind_Breakpoint, +RD_EntityKind_Condition, +RD_EntityKind_Location, +RD_EntityKind_Target, +RD_EntityKind_Executable, +RD_EntityKind_Arguments, +RD_EntityKind_WorkingDirectory, +RD_EntityKind_EntryPoint, +RD_EntityKind_Window, +RD_EntityKind_Panel, +RD_EntityKind_View, +RD_EntityKind_RecentProject, +RD_EntityKind_Source, +RD_EntityKind_Dest, +RD_EntityKind_Process, +RD_EntityKind_Thread, +RD_EntityKind_Module, +RD_EntityKind_PendingThreadName, +RD_EntityKind_DebugInfoPath, +RD_EntityKind_ConversionTask, +RD_EntityKind_ConversionFail, +RD_EntityKind_COUNT, +} RD_EntityKind; -typedef enum DF_RegSlot +typedef enum RD_RegSlot { -DF_RegSlot_Null, -DF_RegSlot_Machine, -DF_RegSlot_Module, -DF_RegSlot_Process, -DF_RegSlot_Thread, -DF_RegSlot_Window, -DF_RegSlot_Panel, -DF_RegSlot_View, -DF_RegSlot_PrevView, -DF_RegSlot_DstPanel, -DF_RegSlot_Entity, -DF_RegSlot_EntityList, -DF_RegSlot_UnwindCount, -DF_RegSlot_InlineDepth, -DF_RegSlot_FilePath, -DF_RegSlot_Cursor, -DF_RegSlot_Mark, -DF_RegSlot_TextKey, -DF_RegSlot_LangKind, -DF_RegSlot_Lines, -DF_RegSlot_DbgiKey, -DF_RegSlot_Vaddr, -DF_RegSlot_Voff, -DF_RegSlot_VaddrRange, -DF_RegSlot_VoffRange, -DF_RegSlot_PID, -DF_RegSlot_ForceConfirm, -DF_RegSlot_PreferDisasm, -DF_RegSlot_Dir2, -DF_RegSlot_String, -DF_RegSlot_ParamsTree, -DF_RegSlot_OSEvent, -DF_RegSlot_COUNT, -} DF_RegSlot; +RD_RegSlot_Null, +RD_RegSlot_Machine, +RD_RegSlot_Module, +RD_RegSlot_Process, +RD_RegSlot_Thread, +RD_RegSlot_Window, +RD_RegSlot_Panel, +RD_RegSlot_View, +RD_RegSlot_PrevView, +RD_RegSlot_DstPanel, +RD_RegSlot_Entity, +RD_RegSlot_EntityList, +RD_RegSlot_UnwindCount, +RD_RegSlot_InlineDepth, +RD_RegSlot_FilePath, +RD_RegSlot_Cursor, +RD_RegSlot_Mark, +RD_RegSlot_TextKey, +RD_RegSlot_LangKind, +RD_RegSlot_Lines, +RD_RegSlot_DbgiKey, +RD_RegSlot_Vaddr, +RD_RegSlot_Voff, +RD_RegSlot_VaddrRange, +RD_RegSlot_VoffRange, +RD_RegSlot_PID, +RD_RegSlot_ForceConfirm, +RD_RegSlot_PreferDisasm, +RD_RegSlot_Dir2, +RD_RegSlot_String, +RD_RegSlot_ParamsTree, +RD_RegSlot_OSEvent, +RD_RegSlot_COUNT, +} RD_RegSlot; -typedef enum DF_CmdKind +typedef enum RD_CmdKind { -DF_CmdKind_Null, -DF_CmdKind_LaunchAndRun, -DF_CmdKind_LaunchAndInit, -DF_CmdKind_Kill, -DF_CmdKind_KillAll, -DF_CmdKind_Detach, -DF_CmdKind_Continue, -DF_CmdKind_StepIntoInst, -DF_CmdKind_StepOverInst, -DF_CmdKind_StepIntoLine, -DF_CmdKind_StepOverLine, -DF_CmdKind_StepOut, -DF_CmdKind_Halt, -DF_CmdKind_SoftHaltRefresh, -DF_CmdKind_SetThreadIP, -DF_CmdKind_RunToLine, -DF_CmdKind_RunToAddress, -DF_CmdKind_Run, -DF_CmdKind_Restart, -DF_CmdKind_StepInto, -DF_CmdKind_StepOver, -DF_CmdKind_FreezeThread, -DF_CmdKind_ThawThread, -DF_CmdKind_FreezeProcess, -DF_CmdKind_ThawProcess, -DF_CmdKind_FreezeMachine, -DF_CmdKind_ThawMachine, -DF_CmdKind_FreezeLocalMachine, -DF_CmdKind_ThawLocalMachine, -DF_CmdKind_FreezeEntity, -DF_CmdKind_ThawEntity, -DF_CmdKind_Attach, -DF_CmdKind_Exit, -DF_CmdKind_RunCommand, -DF_CmdKind_OSEvent, -DF_CmdKind_SelectThread, -DF_CmdKind_SelectUnwind, -DF_CmdKind_UpOneFrame, -DF_CmdKind_DownOneFrame, -DF_CmdKind_IncUIFontScale, -DF_CmdKind_DecUIFontScale, -DF_CmdKind_IncCodeFontScale, -DF_CmdKind_DecCodeFontScale, -DF_CmdKind_OpenWindow, -DF_CmdKind_CloseWindow, -DF_CmdKind_ToggleFullscreen, -DF_CmdKind_ConfirmAccept, -DF_CmdKind_ConfirmCancel, -DF_CmdKind_ResetToDefaultPanels, -DF_CmdKind_ResetToCompactPanels, -DF_CmdKind_NewPanelLeft, -DF_CmdKind_NewPanelUp, -DF_CmdKind_NewPanelRight, -DF_CmdKind_NewPanelDown, -DF_CmdKind_SplitPanel, -DF_CmdKind_RotatePanelColumns, -DF_CmdKind_NextPanel, -DF_CmdKind_PrevPanel, -DF_CmdKind_FocusPanel, -DF_CmdKind_FocusPanelRight, -DF_CmdKind_FocusPanelLeft, -DF_CmdKind_FocusPanelUp, -DF_CmdKind_FocusPanelDown, -DF_CmdKind_Undo, -DF_CmdKind_Redo, -DF_CmdKind_GoBack, -DF_CmdKind_GoForward, -DF_CmdKind_ClosePanel, -DF_CmdKind_NextTab, -DF_CmdKind_PrevTab, -DF_CmdKind_MoveTabRight, -DF_CmdKind_MoveTabLeft, -DF_CmdKind_OpenTab, -DF_CmdKind_CloseTab, -DF_CmdKind_MoveTab, -DF_CmdKind_TabBarTop, -DF_CmdKind_TabBarBottom, -DF_CmdKind_SetCurrentPath, -DF_CmdKind_Open, -DF_CmdKind_Switch, -DF_CmdKind_SwitchToPartnerFile, -DF_CmdKind_GoToDisassembly, -DF_CmdKind_GoToSource, -DF_CmdKind_SetFileOverrideLinkSrc, -DF_CmdKind_SetFileOverrideLinkDst, -DF_CmdKind_SetFileReplacementPath, -DF_CmdKind_SetAutoViewRuleType, -DF_CmdKind_SetAutoViewRuleViewRule, -DF_CmdKind_OpenUser, -DF_CmdKind_OpenProject, -DF_CmdKind_OpenRecentProject, -DF_CmdKind_ApplyUserData, -DF_CmdKind_ApplyProjectData, -DF_CmdKind_WriteUserData, -DF_CmdKind_WriteProjectData, -DF_CmdKind_Edit, -DF_CmdKind_Accept, -DF_CmdKind_Cancel, -DF_CmdKind_MoveLeft, -DF_CmdKind_MoveRight, -DF_CmdKind_MoveUp, -DF_CmdKind_MoveDown, -DF_CmdKind_MoveLeftSelect, -DF_CmdKind_MoveRightSelect, -DF_CmdKind_MoveUpSelect, -DF_CmdKind_MoveDownSelect, -DF_CmdKind_MoveLeftChunk, -DF_CmdKind_MoveRightChunk, -DF_CmdKind_MoveUpChunk, -DF_CmdKind_MoveDownChunk, -DF_CmdKind_MoveUpPage, -DF_CmdKind_MoveDownPage, -DF_CmdKind_MoveUpWhole, -DF_CmdKind_MoveDownWhole, -DF_CmdKind_MoveLeftChunkSelect, -DF_CmdKind_MoveRightChunkSelect, -DF_CmdKind_MoveUpChunkSelect, -DF_CmdKind_MoveDownChunkSelect, -DF_CmdKind_MoveUpPageSelect, -DF_CmdKind_MoveDownPageSelect, -DF_CmdKind_MoveUpWholeSelect, -DF_CmdKind_MoveDownWholeSelect, -DF_CmdKind_MoveUpReorder, -DF_CmdKind_MoveDownReorder, -DF_CmdKind_MoveHome, -DF_CmdKind_MoveEnd, -DF_CmdKind_MoveHomeSelect, -DF_CmdKind_MoveEndSelect, -DF_CmdKind_SelectAll, -DF_CmdKind_DeleteSingle, -DF_CmdKind_DeleteChunk, -DF_CmdKind_BackspaceSingle, -DF_CmdKind_BackspaceChunk, -DF_CmdKind_Copy, -DF_CmdKind_Cut, -DF_CmdKind_Paste, -DF_CmdKind_InsertText, -DF_CmdKind_GoToLine, -DF_CmdKind_GoToAddress, -DF_CmdKind_CenterCursor, -DF_CmdKind_ContainCursor, -DF_CmdKind_FindTextForward, -DF_CmdKind_FindTextBackward, -DF_CmdKind_FindNext, -DF_CmdKind_FindPrev, -DF_CmdKind_FindThread, -DF_CmdKind_FindSelectedThread, -DF_CmdKind_GoToName, -DF_CmdKind_GoToNameAtCursor, -DF_CmdKind_ToggleWatchExpression, -DF_CmdKind_ToggleWatchExpressionAtCursor, -DF_CmdKind_ToggleWatchExpressionAtMouse, -DF_CmdKind_SetColumns, -DF_CmdKind_ToggleAddressVisibility, -DF_CmdKind_ToggleCodeBytesVisibility, -DF_CmdKind_EnableEntity, -DF_CmdKind_DisableEntity, -DF_CmdKind_RemoveEntity, -DF_CmdKind_NameEntity, -DF_CmdKind_EditEntity, -DF_CmdKind_DuplicateEntity, -DF_CmdKind_RelocateEntity, -DF_CmdKind_AddBreakpoint, -DF_CmdKind_AddAddressBreakpoint, -DF_CmdKind_AddFunctionBreakpoint, -DF_CmdKind_ToggleBreakpoint, -DF_CmdKind_RemoveBreakpoint, -DF_CmdKind_EnableBreakpoint, -DF_CmdKind_DisableBreakpoint, -DF_CmdKind_AddWatchPin, -DF_CmdKind_ToggleWatchPin, -DF_CmdKind_ToggleBreakpointAtCursor, -DF_CmdKind_ToggleWatchPinAtCursor, -DF_CmdKind_RunToCursor, -DF_CmdKind_SetNextStatement, -DF_CmdKind_AddTarget, -DF_CmdKind_RemoveTarget, -DF_CmdKind_EditTarget, -DF_CmdKind_SelectTarget, -DF_CmdKind_EnableTarget, -DF_CmdKind_DisableTarget, -DF_CmdKind_RegisterAsJITDebugger, -DF_CmdKind_EntityRefFastPath, -DF_CmdKind_SpawnEntityView, -DF_CmdKind_FindCodeLocation, -DF_CmdKind_Filter, -DF_CmdKind_ApplyFilter, -DF_CmdKind_ClearFilter, -DF_CmdKind_GettingStarted, -DF_CmdKind_Commands, -DF_CmdKind_Target, -DF_CmdKind_Targets, -DF_CmdKind_FilePathMap, -DF_CmdKind_AutoViewRules, -DF_CmdKind_Breakpoints, -DF_CmdKind_WatchPins, -DF_CmdKind_Scheduler, -DF_CmdKind_CallStack, -DF_CmdKind_Modules, -DF_CmdKind_Watch, -DF_CmdKind_Locals, -DF_CmdKind_Registers, -DF_CmdKind_Globals, -DF_CmdKind_ThreadLocals, -DF_CmdKind_Types, -DF_CmdKind_Procedures, -DF_CmdKind_PendingFile, -DF_CmdKind_Disassembly, -DF_CmdKind_Output, -DF_CmdKind_Memory, -DF_CmdKind_ExceptionFilters, -DF_CmdKind_Settings, -DF_CmdKind_PickFile, -DF_CmdKind_PickFolder, -DF_CmdKind_PickFileOrFolder, -DF_CmdKind_CompleteQuery, -DF_CmdKind_CancelQuery, -DF_CmdKind_ToggleDevMenu, -DF_CmdKind_LogMarker, -DF_CmdKind_COUNT, -} DF_CmdKind; +RD_CmdKind_Null, +RD_CmdKind_LaunchAndRun, +RD_CmdKind_LaunchAndInit, +RD_CmdKind_Kill, +RD_CmdKind_KillAll, +RD_CmdKind_Detach, +RD_CmdKind_Continue, +RD_CmdKind_StepIntoInst, +RD_CmdKind_StepOverInst, +RD_CmdKind_StepIntoLine, +RD_CmdKind_StepOverLine, +RD_CmdKind_StepOut, +RD_CmdKind_Halt, +RD_CmdKind_SoftHaltRefresh, +RD_CmdKind_SetThreadIP, +RD_CmdKind_RunToLine, +RD_CmdKind_RunToAddress, +RD_CmdKind_Run, +RD_CmdKind_Restart, +RD_CmdKind_StepInto, +RD_CmdKind_StepOver, +RD_CmdKind_FreezeThread, +RD_CmdKind_ThawThread, +RD_CmdKind_FreezeProcess, +RD_CmdKind_ThawProcess, +RD_CmdKind_FreezeMachine, +RD_CmdKind_ThawMachine, +RD_CmdKind_FreezeLocalMachine, +RD_CmdKind_ThawLocalMachine, +RD_CmdKind_FreezeEntity, +RD_CmdKind_ThawEntity, +RD_CmdKind_Attach, +RD_CmdKind_Exit, +RD_CmdKind_RunCommand, +RD_CmdKind_OSEvent, +RD_CmdKind_SelectThread, +RD_CmdKind_SelectUnwind, +RD_CmdKind_UpOneFrame, +RD_CmdKind_DownOneFrame, +RD_CmdKind_IncUIFontScale, +RD_CmdKind_DecUIFontScale, +RD_CmdKind_IncCodeFontScale, +RD_CmdKind_DecCodeFontScale, +RD_CmdKind_OpenWindow, +RD_CmdKind_CloseWindow, +RD_CmdKind_ToggleFullscreen, +RD_CmdKind_ConfirmAccept, +RD_CmdKind_ConfirmCancel, +RD_CmdKind_ResetToDefaultPanels, +RD_CmdKind_ResetToCompactPanels, +RD_CmdKind_NewPanelLeft, +RD_CmdKind_NewPanelUp, +RD_CmdKind_NewPanelRight, +RD_CmdKind_NewPanelDown, +RD_CmdKind_SplitPanel, +RD_CmdKind_RotatePanelColumns, +RD_CmdKind_NextPanel, +RD_CmdKind_PrevPanel, +RD_CmdKind_FocusPanel, +RD_CmdKind_FocusPanelRight, +RD_CmdKind_FocusPanelLeft, +RD_CmdKind_FocusPanelUp, +RD_CmdKind_FocusPanelDown, +RD_CmdKind_Undo, +RD_CmdKind_Redo, +RD_CmdKind_GoBack, +RD_CmdKind_GoForward, +RD_CmdKind_ClosePanel, +RD_CmdKind_NextTab, +RD_CmdKind_PrevTab, +RD_CmdKind_MoveTabRight, +RD_CmdKind_MoveTabLeft, +RD_CmdKind_OpenTab, +RD_CmdKind_CloseTab, +RD_CmdKind_MoveTab, +RD_CmdKind_TabBarTop, +RD_CmdKind_TabBarBottom, +RD_CmdKind_SetCurrentPath, +RD_CmdKind_Open, +RD_CmdKind_Switch, +RD_CmdKind_SwitchToPartnerFile, +RD_CmdKind_GoToDisassembly, +RD_CmdKind_GoToSource, +RD_CmdKind_SetFileOverrideLinkSrc, +RD_CmdKind_SetFileOverrideLinkDst, +RD_CmdKind_SetFileReplacementPath, +RD_CmdKind_SetAutoViewRuleType, +RD_CmdKind_SetAutoViewRuleViewRule, +RD_CmdKind_OpenUser, +RD_CmdKind_OpenProject, +RD_CmdKind_OpenRecentProject, +RD_CmdKind_ApplyUserData, +RD_CmdKind_ApplyProjectData, +RD_CmdKind_WriteUserData, +RD_CmdKind_WriteProjectData, +RD_CmdKind_Edit, +RD_CmdKind_Accept, +RD_CmdKind_Cancel, +RD_CmdKind_MoveLeft, +RD_CmdKind_MoveRight, +RD_CmdKind_MoveUp, +RD_CmdKind_MoveDown, +RD_CmdKind_MoveLeftSelect, +RD_CmdKind_MoveRightSelect, +RD_CmdKind_MoveUpSelect, +RD_CmdKind_MoveDownSelect, +RD_CmdKind_MoveLeftChunk, +RD_CmdKind_MoveRightChunk, +RD_CmdKind_MoveUpChunk, +RD_CmdKind_MoveDownChunk, +RD_CmdKind_MoveUpPage, +RD_CmdKind_MoveDownPage, +RD_CmdKind_MoveUpWhole, +RD_CmdKind_MoveDownWhole, +RD_CmdKind_MoveLeftChunkSelect, +RD_CmdKind_MoveRightChunkSelect, +RD_CmdKind_MoveUpChunkSelect, +RD_CmdKind_MoveDownChunkSelect, +RD_CmdKind_MoveUpPageSelect, +RD_CmdKind_MoveDownPageSelect, +RD_CmdKind_MoveUpWholeSelect, +RD_CmdKind_MoveDownWholeSelect, +RD_CmdKind_MoveUpReorder, +RD_CmdKind_MoveDownReorder, +RD_CmdKind_MoveHome, +RD_CmdKind_MoveEnd, +RD_CmdKind_MoveHomeSelect, +RD_CmdKind_MoveEndSelect, +RD_CmdKind_SelectAll, +RD_CmdKind_DeleteSingle, +RD_CmdKind_DeleteChunk, +RD_CmdKind_BackspaceSingle, +RD_CmdKind_BackspaceChunk, +RD_CmdKind_Copy, +RD_CmdKind_Cut, +RD_CmdKind_Paste, +RD_CmdKind_InsertText, +RD_CmdKind_GoToLine, +RD_CmdKind_GoToAddress, +RD_CmdKind_CenterCursor, +RD_CmdKind_ContainCursor, +RD_CmdKind_FindTextForward, +RD_CmdKind_FindTextBackward, +RD_CmdKind_FindNext, +RD_CmdKind_FindPrev, +RD_CmdKind_FindThread, +RD_CmdKind_FindSelectedThread, +RD_CmdKind_GoToName, +RD_CmdKind_GoToNameAtCursor, +RD_CmdKind_ToggleWatchExpression, +RD_CmdKind_ToggleWatchExpressionAtCursor, +RD_CmdKind_ToggleWatchExpressionAtMouse, +RD_CmdKind_SetColumns, +RD_CmdKind_ToggleAddressVisibility, +RD_CmdKind_ToggleCodeBytesVisibility, +RD_CmdKind_EnableEntity, +RD_CmdKind_DisableEntity, +RD_CmdKind_RemoveEntity, +RD_CmdKind_NameEntity, +RD_CmdKind_EditEntity, +RD_CmdKind_DuplicateEntity, +RD_CmdKind_RelocateEntity, +RD_CmdKind_AddBreakpoint, +RD_CmdKind_AddAddressBreakpoint, +RD_CmdKind_AddFunctionBreakpoint, +RD_CmdKind_ToggleBreakpoint, +RD_CmdKind_RemoveBreakpoint, +RD_CmdKind_EnableBreakpoint, +RD_CmdKind_DisableBreakpoint, +RD_CmdKind_AddWatchPin, +RD_CmdKind_ToggleWatchPin, +RD_CmdKind_ToggleBreakpointAtCursor, +RD_CmdKind_ToggleWatchPinAtCursor, +RD_CmdKind_RunToCursor, +RD_CmdKind_SetNextStatement, +RD_CmdKind_AddTarget, +RD_CmdKind_RemoveTarget, +RD_CmdKind_EditTarget, +RD_CmdKind_SelectTarget, +RD_CmdKind_EnableTarget, +RD_CmdKind_DisableTarget, +RD_CmdKind_RegisterAsJITDebugger, +RD_CmdKind_EntityRefFastPath, +RD_CmdKind_SpawnEntityView, +RD_CmdKind_FindCodeLocation, +RD_CmdKind_Filter, +RD_CmdKind_ApplyFilter, +RD_CmdKind_ClearFilter, +RD_CmdKind_GettingStarted, +RD_CmdKind_Commands, +RD_CmdKind_Target, +RD_CmdKind_Targets, +RD_CmdKind_FilePathMap, +RD_CmdKind_AutoViewRules, +RD_CmdKind_Breakpoints, +RD_CmdKind_WatchPins, +RD_CmdKind_Scheduler, +RD_CmdKind_CallStack, +RD_CmdKind_Modules, +RD_CmdKind_Watch, +RD_CmdKind_Locals, +RD_CmdKind_Registers, +RD_CmdKind_Globals, +RD_CmdKind_ThreadLocals, +RD_CmdKind_Types, +RD_CmdKind_Procedures, +RD_CmdKind_PendingFile, +RD_CmdKind_Disassembly, +RD_CmdKind_Output, +RD_CmdKind_Memory, +RD_CmdKind_ExceptionFilters, +RD_CmdKind_Settings, +RD_CmdKind_PickFile, +RD_CmdKind_PickFolder, +RD_CmdKind_PickFileOrFolder, +RD_CmdKind_CompleteQuery, +RD_CmdKind_CancelQuery, +RD_CmdKind_ToggleDevMenu, +RD_CmdKind_LogMarker, +RD_CmdKind_COUNT, +} RD_CmdKind; -typedef enum DF_IconKind +typedef enum RD_IconKind { -DF_IconKind_Null, -DF_IconKind_FolderOpenOutline, -DF_IconKind_FolderClosedOutline, -DF_IconKind_FolderOpenFilled, -DF_IconKind_FolderClosedFilled, -DF_IconKind_FileOutline, -DF_IconKind_FileFilled, -DF_IconKind_Play, -DF_IconKind_PlayStepForward, -DF_IconKind_Pause, -DF_IconKind_Stop, -DF_IconKind_Info, -DF_IconKind_WarningSmall, -DF_IconKind_WarningBig, -DF_IconKind_Unlocked, -DF_IconKind_Locked, -DF_IconKind_LeftArrow, -DF_IconKind_RightArrow, -DF_IconKind_UpArrow, -DF_IconKind_DownArrow, -DF_IconKind_Gear, -DF_IconKind_Pencil, -DF_IconKind_Trash, -DF_IconKind_Pin, -DF_IconKind_RadioHollow, -DF_IconKind_RadioFilled, -DF_IconKind_CheckHollow, -DF_IconKind_CheckFilled, -DF_IconKind_LeftCaret, -DF_IconKind_RightCaret, -DF_IconKind_UpCaret, -DF_IconKind_DownCaret, -DF_IconKind_UpScroll, -DF_IconKind_DownScroll, -DF_IconKind_LeftScroll, -DF_IconKind_RightScroll, -DF_IconKind_Add, -DF_IconKind_Minus, -DF_IconKind_Thread, -DF_IconKind_Threads, -DF_IconKind_Machine, -DF_IconKind_CircleFilled, -DF_IconKind_X, -DF_IconKind_Refresh, -DF_IconKind_Undo, -DF_IconKind_Redo, -DF_IconKind_Save, -DF_IconKind_Window, -DF_IconKind_Target, -DF_IconKind_Clipboard, -DF_IconKind_Scheduler, -DF_IconKind_Module, -DF_IconKind_XSplit, -DF_IconKind_YSplit, -DF_IconKind_ClosePanel, -DF_IconKind_StepInto, -DF_IconKind_StepOver, -DF_IconKind_StepOut, -DF_IconKind_Find, -DF_IconKind_Palette, -DF_IconKind_Thumbnails, -DF_IconKind_Glasses, -DF_IconKind_Binoculars, -DF_IconKind_List, -DF_IconKind_Grid, -DF_IconKind_QuestionMark, -DF_IconKind_Person, -DF_IconKind_Briefcase, -DF_IconKind_Dot, -DF_IconKind_COUNT, -} DF_IconKind; +RD_IconKind_Null, +RD_IconKind_FolderOpenOutline, +RD_IconKind_FolderClosedOutline, +RD_IconKind_FolderOpenFilled, +RD_IconKind_FolderClosedFilled, +RD_IconKind_FileOutline, +RD_IconKind_FileFilled, +RD_IconKind_Play, +RD_IconKind_PlayStepForward, +RD_IconKind_Pause, +RD_IconKind_Stop, +RD_IconKind_Info, +RD_IconKind_WarningSmall, +RD_IconKind_WarningBig, +RD_IconKind_Unlocked, +RD_IconKind_Locked, +RD_IconKind_LeftArrow, +RD_IconKind_RightArrow, +RD_IconKind_UpArrow, +RD_IconKind_DownArrow, +RD_IconKind_Gear, +RD_IconKind_Pencil, +RD_IconKind_Trash, +RD_IconKind_Pin, +RD_IconKind_RadioHollow, +RD_IconKind_RadioFilled, +RD_IconKind_CheckHollow, +RD_IconKind_CheckFilled, +RD_IconKind_LeftCaret, +RD_IconKind_RightCaret, +RD_IconKind_UpCaret, +RD_IconKind_DownCaret, +RD_IconKind_UpScroll, +RD_IconKind_DownScroll, +RD_IconKind_LeftScroll, +RD_IconKind_RightScroll, +RD_IconKind_Add, +RD_IconKind_Minus, +RD_IconKind_Thread, +RD_IconKind_Threads, +RD_IconKind_Machine, +RD_IconKind_CircleFilled, +RD_IconKind_X, +RD_IconKind_Refresh, +RD_IconKind_Undo, +RD_IconKind_Redo, +RD_IconKind_Save, +RD_IconKind_Window, +RD_IconKind_Target, +RD_IconKind_Clipboard, +RD_IconKind_Scheduler, +RD_IconKind_Module, +RD_IconKind_XSplit, +RD_IconKind_YSplit, +RD_IconKind_ClosePanel, +RD_IconKind_StepInto, +RD_IconKind_StepOver, +RD_IconKind_StepOut, +RD_IconKind_Find, +RD_IconKind_Palette, +RD_IconKind_Thumbnails, +RD_IconKind_Glasses, +RD_IconKind_Binoculars, +RD_IconKind_List, +RD_IconKind_Grid, +RD_IconKind_QuestionMark, +RD_IconKind_Person, +RD_IconKind_Briefcase, +RD_IconKind_Dot, +RD_IconKind_COUNT, +} RD_IconKind; -typedef enum DF_ViewRuleKind +typedef enum RD_ViewRuleKind { -DF_ViewRuleKind_Null, -DF_ViewRuleKind_Empty, -DF_ViewRuleKind_GettingStarted, -DF_ViewRuleKind_ExceptionFilters, -DF_ViewRuleKind_Settings, -DF_ViewRuleKind_PendingFile, -DF_ViewRuleKind_Commands, -DF_ViewRuleKind_FileSystem, -DF_ViewRuleKind_SystemProcesses, -DF_ViewRuleKind_EntityLister, -DF_ViewRuleKind_SymbolLister, -DF_ViewRuleKind_Watch, -DF_ViewRuleKind_Locals, -DF_ViewRuleKind_Registers, -DF_ViewRuleKind_Globals, -DF_ViewRuleKind_ThreadLocals, -DF_ViewRuleKind_Types, -DF_ViewRuleKind_Procedures, -DF_ViewRuleKind_Targets, -DF_ViewRuleKind_FilePathMap, -DF_ViewRuleKind_AutoViewRules, -DF_ViewRuleKind_Breakpoints, -DF_ViewRuleKind_WatchPins, -DF_ViewRuleKind_Scheduler, -DF_ViewRuleKind_CallStack, -DF_ViewRuleKind_Modules, -DF_ViewRuleKind_Text, -DF_ViewRuleKind_Disasm, -DF_ViewRuleKind_Output, -DF_ViewRuleKind_Memory, -DF_ViewRuleKind_Bitmap, -DF_ViewRuleKind_ColorRGBA, -DF_ViewRuleKind_Geo3D, -DF_ViewRuleKind_COUNT, -} DF_ViewRuleKind; +RD_ViewRuleKind_Null, +RD_ViewRuleKind_Empty, +RD_ViewRuleKind_GettingStarted, +RD_ViewRuleKind_ExceptionFilters, +RD_ViewRuleKind_Settings, +RD_ViewRuleKind_PendingFile, +RD_ViewRuleKind_Commands, +RD_ViewRuleKind_FileSystem, +RD_ViewRuleKind_SystemProcesses, +RD_ViewRuleKind_EntityLister, +RD_ViewRuleKind_SymbolLister, +RD_ViewRuleKind_Watch, +RD_ViewRuleKind_Locals, +RD_ViewRuleKind_Registers, +RD_ViewRuleKind_Globals, +RD_ViewRuleKind_ThreadLocals, +RD_ViewRuleKind_Types, +RD_ViewRuleKind_Procedures, +RD_ViewRuleKind_Targets, +RD_ViewRuleKind_FilePathMap, +RD_ViewRuleKind_AutoViewRules, +RD_ViewRuleKind_Breakpoints, +RD_ViewRuleKind_WatchPins, +RD_ViewRuleKind_Scheduler, +RD_ViewRuleKind_CallStack, +RD_ViewRuleKind_Modules, +RD_ViewRuleKind_Text, +RD_ViewRuleKind_Disasm, +RD_ViewRuleKind_Output, +RD_ViewRuleKind_Memory, +RD_ViewRuleKind_Bitmap, +RD_ViewRuleKind_ColorRGBA, +RD_ViewRuleKind_Geo3D, +RD_ViewRuleKind_COUNT, +} RD_ViewRuleKind; -typedef enum DF_ViewKind +typedef enum RD_ViewKind { -DF_ViewKind_Null, -DF_ViewKind_Empty, -DF_ViewKind_GettingStarted, -DF_ViewKind_Commands, -DF_ViewKind_FileSystem, -DF_ViewKind_SystemProcesses, -DF_ViewKind_EntityLister, -DF_ViewKind_SymbolLister, -DF_ViewKind_Target, -DF_ViewKind_Targets, -DF_ViewKind_FilePathMap, -DF_ViewKind_AutoViewRules, -DF_ViewKind_Breakpoints, -DF_ViewKind_WatchPins, -DF_ViewKind_Scheduler, -DF_ViewKind_CallStack, -DF_ViewKind_Modules, -DF_ViewKind_Watch, -DF_ViewKind_Locals, -DF_ViewKind_Registers, -DF_ViewKind_Globals, -DF_ViewKind_ThreadLocals, -DF_ViewKind_Types, -DF_ViewKind_Procedures, -DF_ViewKind_PendingFile, -DF_ViewKind_Text, -DF_ViewKind_Disasm, -DF_ViewKind_Output, -DF_ViewKind_Memory, -DF_ViewKind_Bitmap, -DF_ViewKind_ColorRGBA, -DF_ViewKind_Geo3D, -DF_ViewKind_ExceptionFilters, -DF_ViewKind_Settings, -DF_ViewKind_COUNT, -} DF_ViewKind; +RD_ViewKind_Null, +RD_ViewKind_Empty, +RD_ViewKind_GettingStarted, +RD_ViewKind_Commands, +RD_ViewKind_FileSystem, +RD_ViewKind_SystemProcesses, +RD_ViewKind_EntityLister, +RD_ViewKind_SymbolLister, +RD_ViewKind_Target, +RD_ViewKind_Targets, +RD_ViewKind_FilePathMap, +RD_ViewKind_AutoViewRules, +RD_ViewKind_Breakpoints, +RD_ViewKind_WatchPins, +RD_ViewKind_Scheduler, +RD_ViewKind_CallStack, +RD_ViewKind_Modules, +RD_ViewKind_Watch, +RD_ViewKind_Locals, +RD_ViewKind_Registers, +RD_ViewKind_Globals, +RD_ViewKind_ThreadLocals, +RD_ViewKind_Types, +RD_ViewKind_Procedures, +RD_ViewKind_PendingFile, +RD_ViewKind_Text, +RD_ViewKind_Disasm, +RD_ViewKind_Output, +RD_ViewKind_Memory, +RD_ViewKind_Bitmap, +RD_ViewKind_ColorRGBA, +RD_ViewKind_Geo3D, +RD_ViewKind_ExceptionFilters, +RD_ViewKind_Settings, +RD_ViewKind_COUNT, +} RD_ViewKind; -typedef enum DF_ThemeColor +typedef enum RD_ThemeColor { -DF_ThemeColor_Null, -DF_ThemeColor_Text, -DF_ThemeColor_TextPositive, -DF_ThemeColor_TextNegative, -DF_ThemeColor_TextNeutral, -DF_ThemeColor_TextWeak, -DF_ThemeColor_Cursor, -DF_ThemeColor_CursorInactive, -DF_ThemeColor_Focus, -DF_ThemeColor_Hover, -DF_ThemeColor_DropShadow, -DF_ThemeColor_DisabledOverlay, -DF_ThemeColor_DropSiteOverlay, -DF_ThemeColor_InactivePanelOverlay, -DF_ThemeColor_SelectionOverlay, -DF_ThemeColor_HighlightOverlay, -DF_ThemeColor_HighlightOverlayError, -DF_ThemeColor_BaseBackground, -DF_ThemeColor_BaseBackgroundAlt, -DF_ThemeColor_BaseBorder, -DF_ThemeColor_MenuBarBackground, -DF_ThemeColor_MenuBarBackgroundAlt, -DF_ThemeColor_MenuBarBorder, -DF_ThemeColor_FloatingBackground, -DF_ThemeColor_FloatingBackgroundAlt, -DF_ThemeColor_FloatingBorder, -DF_ThemeColor_ImplicitButtonBackground, -DF_ThemeColor_ImplicitButtonBorder, -DF_ThemeColor_PlainButtonBackground, -DF_ThemeColor_PlainButtonBorder, -DF_ThemeColor_PositivePopButtonBackground, -DF_ThemeColor_PositivePopButtonBorder, -DF_ThemeColor_NegativePopButtonBackground, -DF_ThemeColor_NegativePopButtonBorder, -DF_ThemeColor_NeutralPopButtonBackground, -DF_ThemeColor_NeutralPopButtonBorder, -DF_ThemeColor_ScrollBarButtonBackground, -DF_ThemeColor_ScrollBarButtonBorder, -DF_ThemeColor_TabBackground, -DF_ThemeColor_TabBorder, -DF_ThemeColor_TabBackgroundInactive, -DF_ThemeColor_TabBorderInactive, -DF_ThemeColor_CodeDefault, -DF_ThemeColor_CodeSymbol, -DF_ThemeColor_CodeType, -DF_ThemeColor_CodeLocal, -DF_ThemeColor_CodeRegister, -DF_ThemeColor_CodeKeyword, -DF_ThemeColor_CodeDelimiterOperator, -DF_ThemeColor_CodeNumeric, -DF_ThemeColor_CodeNumericAltDigitGroup, -DF_ThemeColor_CodeString, -DF_ThemeColor_CodeMeta, -DF_ThemeColor_CodeComment, -DF_ThemeColor_CodeLineNumbers, -DF_ThemeColor_CodeLineNumbersSelected, -DF_ThemeColor_LineInfoBackground0, -DF_ThemeColor_LineInfoBackground1, -DF_ThemeColor_LineInfoBackground2, -DF_ThemeColor_LineInfoBackground3, -DF_ThemeColor_LineInfoBackground4, -DF_ThemeColor_LineInfoBackground5, -DF_ThemeColor_LineInfoBackground6, -DF_ThemeColor_LineInfoBackground7, -DF_ThemeColor_Thread0, -DF_ThemeColor_Thread1, -DF_ThemeColor_Thread2, -DF_ThemeColor_Thread3, -DF_ThemeColor_Thread4, -DF_ThemeColor_Thread5, -DF_ThemeColor_Thread6, -DF_ThemeColor_Thread7, -DF_ThemeColor_ThreadUnwound, -DF_ThemeColor_ThreadError, -DF_ThemeColor_Breakpoint, -DF_ThemeColor_COUNT, -} DF_ThemeColor; +RD_ThemeColor_Null, +RD_ThemeColor_Text, +RD_ThemeColor_TextPositive, +RD_ThemeColor_TextNegative, +RD_ThemeColor_TextNeutral, +RD_ThemeColor_TextWeak, +RD_ThemeColor_Cursor, +RD_ThemeColor_CursorInactive, +RD_ThemeColor_Focus, +RD_ThemeColor_Hover, +RD_ThemeColor_DropShadow, +RD_ThemeColor_DisabledOverlay, +RD_ThemeColor_DropSiteOverlay, +RD_ThemeColor_InactivePanelOverlay, +RD_ThemeColor_SelectionOverlay, +RD_ThemeColor_HighlightOverlay, +RD_ThemeColor_HighlightOverlayError, +RD_ThemeColor_BaseBackground, +RD_ThemeColor_BaseBackgroundAlt, +RD_ThemeColor_BaseBorder, +RD_ThemeColor_MenuBarBackground, +RD_ThemeColor_MenuBarBackgroundAlt, +RD_ThemeColor_MenuBarBorder, +RD_ThemeColor_FloatingBackground, +RD_ThemeColor_FloatingBackgroundAlt, +RD_ThemeColor_FloatingBorder, +RD_ThemeColor_ImplicitButtonBackground, +RD_ThemeColor_ImplicitButtonBorder, +RD_ThemeColor_PlainButtonBackground, +RD_ThemeColor_PlainButtonBorder, +RD_ThemeColor_PositivePopButtonBackground, +RD_ThemeColor_PositivePopButtonBorder, +RD_ThemeColor_NegativePopButtonBackground, +RD_ThemeColor_NegativePopButtonBorder, +RD_ThemeColor_NeutralPopButtonBackground, +RD_ThemeColor_NeutralPopButtonBorder, +RD_ThemeColor_ScrollBarButtonBackground, +RD_ThemeColor_ScrollBarButtonBorder, +RD_ThemeColor_TabBackground, +RD_ThemeColor_TabBorder, +RD_ThemeColor_TabBackgroundInactive, +RD_ThemeColor_TabBorderInactive, +RD_ThemeColor_CodeDefault, +RD_ThemeColor_CodeSymbol, +RD_ThemeColor_CodeType, +RD_ThemeColor_CodeLocal, +RD_ThemeColor_CodeRegister, +RD_ThemeColor_CodeKeyword, +RD_ThemeColor_CodeDelimiterOperator, +RD_ThemeColor_CodeNumeric, +RD_ThemeColor_CodeNumericAltDigitGroup, +RD_ThemeColor_CodeString, +RD_ThemeColor_CodeMeta, +RD_ThemeColor_CodeComment, +RD_ThemeColor_CodeLineNumbers, +RD_ThemeColor_CodeLineNumbersSelected, +RD_ThemeColor_LineInfoBackground0, +RD_ThemeColor_LineInfoBackground1, +RD_ThemeColor_LineInfoBackground2, +RD_ThemeColor_LineInfoBackground3, +RD_ThemeColor_LineInfoBackground4, +RD_ThemeColor_LineInfoBackground5, +RD_ThemeColor_LineInfoBackground6, +RD_ThemeColor_LineInfoBackground7, +RD_ThemeColor_Thread0, +RD_ThemeColor_Thread1, +RD_ThemeColor_Thread2, +RD_ThemeColor_Thread3, +RD_ThemeColor_Thread4, +RD_ThemeColor_Thread5, +RD_ThemeColor_Thread6, +RD_ThemeColor_Thread7, +RD_ThemeColor_ThreadUnwound, +RD_ThemeColor_ThreadError, +RD_ThemeColor_Breakpoint, +RD_ThemeColor_COUNT, +} RD_ThemeColor; -typedef enum DF_ThemePreset +typedef enum RD_ThemePreset { -DF_ThemePreset_DefaultDark, -DF_ThemePreset_DefaultLight, -DF_ThemePreset_VSDark, -DF_ThemePreset_VSLight, -DF_ThemePreset_SolarizedDark, -DF_ThemePreset_SolarizedLight, -DF_ThemePreset_HandmadeHero, -DF_ThemePreset_FourCoder, -DF_ThemePreset_FarManager, -DF_ThemePreset_COUNT, -} DF_ThemePreset; +RD_ThemePreset_DefaultDark, +RD_ThemePreset_DefaultLight, +RD_ThemePreset_VSDark, +RD_ThemePreset_VSLight, +RD_ThemePreset_SolarizedDark, +RD_ThemePreset_SolarizedLight, +RD_ThemePreset_HandmadeHero, +RD_ThemePreset_FourCoder, +RD_ThemePreset_FarManager, +RD_ThemePreset_COUNT, +} RD_ThemePreset; -typedef enum DF_SettingCode +typedef enum RD_SettingCode { -DF_SettingCode_HoverAnimations, -DF_SettingCode_PressAnimations, -DF_SettingCode_FocusAnimations, -DF_SettingCode_TooltipAnimations, -DF_SettingCode_MenuAnimations, -DF_SettingCode_ScrollingAnimations, -DF_SettingCode_BackgroundBlur, -DF_SettingCode_ThreadLines, -DF_SettingCode_BreakpointLines, -DF_SettingCode_ThreadGlow, -DF_SettingCode_BreakpointGlow, -DF_SettingCode_OpaqueBackgrounds, -DF_SettingCode_TabWidth, -DF_SettingCode_MainFontSize, -DF_SettingCode_CodeFontSize, -DF_SettingCode_SmoothUIText, -DF_SettingCode_SmoothCodeText, -DF_SettingCode_HintUIText, -DF_SettingCode_HintCodeText, -DF_SettingCode_COUNT, -} DF_SettingCode; +RD_SettingCode_HoverAnimations, +RD_SettingCode_PressAnimations, +RD_SettingCode_FocusAnimations, +RD_SettingCode_TooltipAnimations, +RD_SettingCode_MenuAnimations, +RD_SettingCode_ScrollingAnimations, +RD_SettingCode_BackgroundBlur, +RD_SettingCode_ThreadLines, +RD_SettingCode_BreakpointLines, +RD_SettingCode_ThreadGlow, +RD_SettingCode_BreakpointGlow, +RD_SettingCode_OpaqueBackgrounds, +RD_SettingCode_TabWidth, +RD_SettingCode_MainFontSize, +RD_SettingCode_CodeFontSize, +RD_SettingCode_SmoothUIText, +RD_SettingCode_SmoothCodeText, +RD_SettingCode_HintUIText, +RD_SettingCode_HintCodeText, +RD_SettingCode_COUNT, +} RD_SettingCode; -typedef struct DF_Regs DF_Regs; -struct DF_Regs +typedef struct RD_Regs RD_Regs; +struct RD_Regs { CTRL_Handle machine; CTRL_Handle module; CTRL_Handle process; CTRL_Handle thread; -D_Handle window; -D_Handle panel; -D_Handle view; -D_Handle prev_view; -D_Handle dst_panel; -D_Handle entity; -D_HandleList entity_list; +RD_Handle window; +RD_Handle panel; +RD_Handle view; +RD_Handle prev_view; +RD_Handle dst_panel; +RD_Handle entity; +RD_HandleList entity_list; U64 unwind_count; U64 inline_depth; String8 file_path; @@ -616,215 +616,215 @@ MD_Node * params_tree; OS_Event * os_event; }; -typedef struct DF_Query DF_Query; -struct DF_Query +typedef struct RD_Query RD_Query; +struct RD_Query { -DF_QueryFlags flags; -DF_RegSlot slot; +RD_QueryFlags flags; +RD_RegSlot slot; String8 view_name; -DF_EntityKind entity_kind; +RD_EntityKind entity_kind; }; -typedef struct DF_CmdKindInfo DF_CmdKindInfo; -struct DF_CmdKindInfo +typedef struct RD_CmdKindInfo RD_CmdKindInfo; +struct RD_CmdKindInfo { String8 string; String8 description; String8 search_tags; String8 display_name; -DF_IconKind icon_kind; -DF_CmdKindFlags flags; -DF_Query query; +RD_IconKind icon_kind; +RD_CmdKindFlags flags; +RD_Query query; }; -typedef struct DF_ViewRuleInfo DF_ViewRuleInfo; -struct DF_ViewRuleInfo +typedef struct RD_ViewRuleInfo RD_ViewRuleInfo; +struct RD_ViewRuleInfo { String8 string; String8 description; String8 display_name; String8 params_schema; -DF_IconKind icon_kind; -DF_ViewRuleInfoFlags flags; -DF_ViewRuleUIFunctionType *ui; +RD_IconKind icon_kind; +RD_ViewRuleInfoFlags flags; +RD_ViewRuleUIFunctionType *ui; }; -#define df_regs_lit_init_top \ -.machine = df_regs()->machine,\ -.module = df_regs()->module,\ -.process = df_regs()->process,\ -.thread = df_regs()->thread,\ -.window = df_regs()->window,\ -.panel = df_regs()->panel,\ -.view = df_regs()->view,\ -.prev_view = df_regs()->prev_view,\ -.dst_panel = df_regs()->dst_panel,\ -.entity = df_regs()->entity,\ -.entity_list = df_regs()->entity_list,\ -.unwind_count = df_regs()->unwind_count,\ -.inline_depth = df_regs()->inline_depth,\ -.file_path = df_regs()->file_path,\ -.cursor = df_regs()->cursor,\ -.mark = df_regs()->mark,\ -.text_key = df_regs()->text_key,\ -.lang_kind = df_regs()->lang_kind,\ -.lines = df_regs()->lines,\ -.dbgi_key = df_regs()->dbgi_key,\ -.vaddr = df_regs()->vaddr,\ -.voff = df_regs()->voff,\ -.vaddr_range = df_regs()->vaddr_range,\ -.voff_range = df_regs()->voff_range,\ -.pid = df_regs()->pid,\ -.force_confirm = df_regs()->force_confirm,\ -.prefer_disasm = df_regs()->prefer_disasm,\ -.dir2 = df_regs()->dir2,\ -.string = df_regs()->string,\ -.params_tree = df_regs()->params_tree,\ -.os_event = df_regs()->os_event,\ +#define rd_regs_lit_init_top \ +.machine = rd_regs()->machine,\ +.module = rd_regs()->module,\ +.process = rd_regs()->process,\ +.thread = rd_regs()->thread,\ +.window = rd_regs()->window,\ +.panel = rd_regs()->panel,\ +.view = rd_regs()->view,\ +.prev_view = rd_regs()->prev_view,\ +.dst_panel = rd_regs()->dst_panel,\ +.entity = rd_regs()->entity,\ +.entity_list = rd_regs()->entity_list,\ +.unwind_count = rd_regs()->unwind_count,\ +.inline_depth = rd_regs()->inline_depth,\ +.file_path = rd_regs()->file_path,\ +.cursor = rd_regs()->cursor,\ +.mark = rd_regs()->mark,\ +.text_key = rd_regs()->text_key,\ +.lang_kind = rd_regs()->lang_kind,\ +.lines = rd_regs()->lines,\ +.dbgi_key = rd_regs()->dbgi_key,\ +.vaddr = rd_regs()->vaddr,\ +.voff = rd_regs()->voff,\ +.vaddr_range = rd_regs()->vaddr_range,\ +.voff_range = rd_regs()->voff_range,\ +.pid = rd_regs()->pid,\ +.force_confirm = rd_regs()->force_confirm,\ +.prefer_disasm = rd_regs()->prefer_disasm,\ +.dir2 = rd_regs()->dir2,\ +.string = rd_regs()->string,\ +.params_tree = rd_regs()->params_tree,\ +.os_event = rd_regs()->os_event,\ -DF_VIEW_SETUP_FUNCTION_DEF(null); -DF_VIEW_SETUP_FUNCTION_DEF(empty); -DF_VIEW_SETUP_FUNCTION_DEF(getting_started); -DF_VIEW_SETUP_FUNCTION_DEF(commands); -DF_VIEW_SETUP_FUNCTION_DEF(file_system); -DF_VIEW_SETUP_FUNCTION_DEF(system_processes); -DF_VIEW_SETUP_FUNCTION_DEF(entity_lister); -DF_VIEW_SETUP_FUNCTION_DEF(symbol_lister); -DF_VIEW_SETUP_FUNCTION_DEF(target); -DF_VIEW_SETUP_FUNCTION_DEF(targets); -DF_VIEW_SETUP_FUNCTION_DEF(file_path_map); -DF_VIEW_SETUP_FUNCTION_DEF(auto_view_rules); -DF_VIEW_SETUP_FUNCTION_DEF(breakpoints); -DF_VIEW_SETUP_FUNCTION_DEF(watch_pins); -DF_VIEW_SETUP_FUNCTION_DEF(scheduler); -DF_VIEW_SETUP_FUNCTION_DEF(call_stack); -DF_VIEW_SETUP_FUNCTION_DEF(modules); -DF_VIEW_SETUP_FUNCTION_DEF(watch); -DF_VIEW_SETUP_FUNCTION_DEF(locals); -DF_VIEW_SETUP_FUNCTION_DEF(registers); -DF_VIEW_SETUP_FUNCTION_DEF(globals); -DF_VIEW_SETUP_FUNCTION_DEF(thread_locals); -DF_VIEW_SETUP_FUNCTION_DEF(types); -DF_VIEW_SETUP_FUNCTION_DEF(procedures); -DF_VIEW_SETUP_FUNCTION_DEF(pending_file); -DF_VIEW_SETUP_FUNCTION_DEF(text); -DF_VIEW_SETUP_FUNCTION_DEF(disasm); -DF_VIEW_SETUP_FUNCTION_DEF(output); -DF_VIEW_SETUP_FUNCTION_DEF(memory); -DF_VIEW_SETUP_FUNCTION_DEF(bitmap); -DF_VIEW_SETUP_FUNCTION_DEF(color_rgba); -DF_VIEW_SETUP_FUNCTION_DEF(geo3d); -DF_VIEW_SETUP_FUNCTION_DEF(exception_filters); -DF_VIEW_SETUP_FUNCTION_DEF(settings); -DF_VIEW_CMD_FUNCTION_DEF(null); -DF_VIEW_CMD_FUNCTION_DEF(empty); -DF_VIEW_CMD_FUNCTION_DEF(getting_started); -DF_VIEW_CMD_FUNCTION_DEF(commands); -DF_VIEW_CMD_FUNCTION_DEF(file_system); -DF_VIEW_CMD_FUNCTION_DEF(system_processes); -DF_VIEW_CMD_FUNCTION_DEF(entity_lister); -DF_VIEW_CMD_FUNCTION_DEF(symbol_lister); -DF_VIEW_CMD_FUNCTION_DEF(target); -DF_VIEW_CMD_FUNCTION_DEF(targets); -DF_VIEW_CMD_FUNCTION_DEF(file_path_map); -DF_VIEW_CMD_FUNCTION_DEF(auto_view_rules); -DF_VIEW_CMD_FUNCTION_DEF(breakpoints); -DF_VIEW_CMD_FUNCTION_DEF(watch_pins); -DF_VIEW_CMD_FUNCTION_DEF(scheduler); -DF_VIEW_CMD_FUNCTION_DEF(call_stack); -DF_VIEW_CMD_FUNCTION_DEF(modules); -DF_VIEW_CMD_FUNCTION_DEF(watch); -DF_VIEW_CMD_FUNCTION_DEF(locals); -DF_VIEW_CMD_FUNCTION_DEF(registers); -DF_VIEW_CMD_FUNCTION_DEF(globals); -DF_VIEW_CMD_FUNCTION_DEF(thread_locals); -DF_VIEW_CMD_FUNCTION_DEF(types); -DF_VIEW_CMD_FUNCTION_DEF(procedures); -DF_VIEW_CMD_FUNCTION_DEF(pending_file); -DF_VIEW_CMD_FUNCTION_DEF(text); -DF_VIEW_CMD_FUNCTION_DEF(disasm); -DF_VIEW_CMD_FUNCTION_DEF(output); -DF_VIEW_CMD_FUNCTION_DEF(memory); -DF_VIEW_CMD_FUNCTION_DEF(bitmap); -DF_VIEW_CMD_FUNCTION_DEF(color_rgba); -DF_VIEW_CMD_FUNCTION_DEF(geo3d); -DF_VIEW_CMD_FUNCTION_DEF(exception_filters); -DF_VIEW_CMD_FUNCTION_DEF(settings); -DF_VIEW_UI_FUNCTION_DEF(null); -DF_VIEW_UI_FUNCTION_DEF(empty); -DF_VIEW_UI_FUNCTION_DEF(getting_started); -DF_VIEW_UI_FUNCTION_DEF(commands); -DF_VIEW_UI_FUNCTION_DEF(file_system); -DF_VIEW_UI_FUNCTION_DEF(system_processes); -DF_VIEW_UI_FUNCTION_DEF(entity_lister); -DF_VIEW_UI_FUNCTION_DEF(symbol_lister); -DF_VIEW_UI_FUNCTION_DEF(target); -DF_VIEW_UI_FUNCTION_DEF(targets); -DF_VIEW_UI_FUNCTION_DEF(file_path_map); -DF_VIEW_UI_FUNCTION_DEF(auto_view_rules); -DF_VIEW_UI_FUNCTION_DEF(breakpoints); -DF_VIEW_UI_FUNCTION_DEF(watch_pins); -DF_VIEW_UI_FUNCTION_DEF(scheduler); -DF_VIEW_UI_FUNCTION_DEF(call_stack); -DF_VIEW_UI_FUNCTION_DEF(modules); -DF_VIEW_UI_FUNCTION_DEF(watch); -DF_VIEW_UI_FUNCTION_DEF(locals); -DF_VIEW_UI_FUNCTION_DEF(registers); -DF_VIEW_UI_FUNCTION_DEF(globals); -DF_VIEW_UI_FUNCTION_DEF(thread_locals); -DF_VIEW_UI_FUNCTION_DEF(types); -DF_VIEW_UI_FUNCTION_DEF(procedures); -DF_VIEW_UI_FUNCTION_DEF(pending_file); -DF_VIEW_UI_FUNCTION_DEF(text); -DF_VIEW_UI_FUNCTION_DEF(disasm); -DF_VIEW_UI_FUNCTION_DEF(output); -DF_VIEW_UI_FUNCTION_DEF(memory); -DF_VIEW_UI_FUNCTION_DEF(bitmap); -DF_VIEW_UI_FUNCTION_DEF(color_rgba); -DF_VIEW_UI_FUNCTION_DEF(geo3d); -DF_VIEW_UI_FUNCTION_DEF(exception_filters); -DF_VIEW_UI_FUNCTION_DEF(settings); +RD_VIEW_SETUP_FUNCTION_DEF(null); +RD_VIEW_SETUP_FUNCTION_DEF(empty); +RD_VIEW_SETUP_FUNCTION_DEF(getting_started); +RD_VIEW_SETUP_FUNCTION_DEF(commands); +RD_VIEW_SETUP_FUNCTION_DEF(file_system); +RD_VIEW_SETUP_FUNCTION_DEF(system_processes); +RD_VIEW_SETUP_FUNCTION_DEF(entity_lister); +RD_VIEW_SETUP_FUNCTION_DEF(symbol_lister); +RD_VIEW_SETUP_FUNCTION_DEF(target); +RD_VIEW_SETUP_FUNCTION_DEF(targets); +RD_VIEW_SETUP_FUNCTION_DEF(file_path_map); +RD_VIEW_SETUP_FUNCTION_DEF(auto_view_rules); +RD_VIEW_SETUP_FUNCTION_DEF(breakpoints); +RD_VIEW_SETUP_FUNCTION_DEF(watch_pins); +RD_VIEW_SETUP_FUNCTION_DEF(scheduler); +RD_VIEW_SETUP_FUNCTION_DEF(call_stack); +RD_VIEW_SETUP_FUNCTION_DEF(modules); +RD_VIEW_SETUP_FUNCTION_DEF(watch); +RD_VIEW_SETUP_FUNCTION_DEF(locals); +RD_VIEW_SETUP_FUNCTION_DEF(registers); +RD_VIEW_SETUP_FUNCTION_DEF(globals); +RD_VIEW_SETUP_FUNCTION_DEF(thread_locals); +RD_VIEW_SETUP_FUNCTION_DEF(types); +RD_VIEW_SETUP_FUNCTION_DEF(procedures); +RD_VIEW_SETUP_FUNCTION_DEF(pending_file); +RD_VIEW_SETUP_FUNCTION_DEF(text); +RD_VIEW_SETUP_FUNCTION_DEF(disasm); +RD_VIEW_SETUP_FUNCTION_DEF(output); +RD_VIEW_SETUP_FUNCTION_DEF(memory); +RD_VIEW_SETUP_FUNCTION_DEF(bitmap); +RD_VIEW_SETUP_FUNCTION_DEF(color_rgba); +RD_VIEW_SETUP_FUNCTION_DEF(geo3d); +RD_VIEW_SETUP_FUNCTION_DEF(exception_filters); +RD_VIEW_SETUP_FUNCTION_DEF(settings); +RD_VIEW_CMD_FUNCTION_DEF(null); +RD_VIEW_CMD_FUNCTION_DEF(empty); +RD_VIEW_CMD_FUNCTION_DEF(getting_started); +RD_VIEW_CMD_FUNCTION_DEF(commands); +RD_VIEW_CMD_FUNCTION_DEF(file_system); +RD_VIEW_CMD_FUNCTION_DEF(system_processes); +RD_VIEW_CMD_FUNCTION_DEF(entity_lister); +RD_VIEW_CMD_FUNCTION_DEF(symbol_lister); +RD_VIEW_CMD_FUNCTION_DEF(target); +RD_VIEW_CMD_FUNCTION_DEF(targets); +RD_VIEW_CMD_FUNCTION_DEF(file_path_map); +RD_VIEW_CMD_FUNCTION_DEF(auto_view_rules); +RD_VIEW_CMD_FUNCTION_DEF(breakpoints); +RD_VIEW_CMD_FUNCTION_DEF(watch_pins); +RD_VIEW_CMD_FUNCTION_DEF(scheduler); +RD_VIEW_CMD_FUNCTION_DEF(call_stack); +RD_VIEW_CMD_FUNCTION_DEF(modules); +RD_VIEW_CMD_FUNCTION_DEF(watch); +RD_VIEW_CMD_FUNCTION_DEF(locals); +RD_VIEW_CMD_FUNCTION_DEF(registers); +RD_VIEW_CMD_FUNCTION_DEF(globals); +RD_VIEW_CMD_FUNCTION_DEF(thread_locals); +RD_VIEW_CMD_FUNCTION_DEF(types); +RD_VIEW_CMD_FUNCTION_DEF(procedures); +RD_VIEW_CMD_FUNCTION_DEF(pending_file); +RD_VIEW_CMD_FUNCTION_DEF(text); +RD_VIEW_CMD_FUNCTION_DEF(disasm); +RD_VIEW_CMD_FUNCTION_DEF(output); +RD_VIEW_CMD_FUNCTION_DEF(memory); +RD_VIEW_CMD_FUNCTION_DEF(bitmap); +RD_VIEW_CMD_FUNCTION_DEF(color_rgba); +RD_VIEW_CMD_FUNCTION_DEF(geo3d); +RD_VIEW_CMD_FUNCTION_DEF(exception_filters); +RD_VIEW_CMD_FUNCTION_DEF(settings); +RD_VIEW_UI_FUNCTION_DEF(null); +RD_VIEW_UI_FUNCTION_DEF(empty); +RD_VIEW_UI_FUNCTION_DEF(getting_started); +RD_VIEW_UI_FUNCTION_DEF(commands); +RD_VIEW_UI_FUNCTION_DEF(file_system); +RD_VIEW_UI_FUNCTION_DEF(system_processes); +RD_VIEW_UI_FUNCTION_DEF(entity_lister); +RD_VIEW_UI_FUNCTION_DEF(symbol_lister); +RD_VIEW_UI_FUNCTION_DEF(target); +RD_VIEW_UI_FUNCTION_DEF(targets); +RD_VIEW_UI_FUNCTION_DEF(file_path_map); +RD_VIEW_UI_FUNCTION_DEF(auto_view_rules); +RD_VIEW_UI_FUNCTION_DEF(breakpoints); +RD_VIEW_UI_FUNCTION_DEF(watch_pins); +RD_VIEW_UI_FUNCTION_DEF(scheduler); +RD_VIEW_UI_FUNCTION_DEF(call_stack); +RD_VIEW_UI_FUNCTION_DEF(modules); +RD_VIEW_UI_FUNCTION_DEF(watch); +RD_VIEW_UI_FUNCTION_DEF(locals); +RD_VIEW_UI_FUNCTION_DEF(registers); +RD_VIEW_UI_FUNCTION_DEF(globals); +RD_VIEW_UI_FUNCTION_DEF(thread_locals); +RD_VIEW_UI_FUNCTION_DEF(types); +RD_VIEW_UI_FUNCTION_DEF(procedures); +RD_VIEW_UI_FUNCTION_DEF(pending_file); +RD_VIEW_UI_FUNCTION_DEF(text); +RD_VIEW_UI_FUNCTION_DEF(disasm); +RD_VIEW_UI_FUNCTION_DEF(output); +RD_VIEW_UI_FUNCTION_DEF(memory); +RD_VIEW_UI_FUNCTION_DEF(bitmap); +RD_VIEW_UI_FUNCTION_DEF(color_rgba); +RD_VIEW_UI_FUNCTION_DEF(geo3d); +RD_VIEW_UI_FUNCTION_DEF(exception_filters); +RD_VIEW_UI_FUNCTION_DEF(settings); C_LINKAGE_BEGIN -extern String8 d_cfg_src_string_table[4]; -extern DF_CmdKind d_cfg_src_load_cmd_kind_table[4]; -extern DF_CmdKind d_cfg_src_write_cmd_kind_table[4]; -extern DF_CmdKind d_cfg_src_apply_cmd_kind_table[4]; +extern String8 rd_cfg_src_string_table[4]; +extern RD_CmdKind rd_cfg_src_load_cmd_kind_table[4]; +extern RD_CmdKind rd_cfg_src_write_cmd_kind_table[4]; +extern RD_CmdKind rd_cfg_src_apply_cmd_kind_table[4]; extern String8 d_entity_kind_display_string_table[30]; extern String8 d_entity_kind_name_lower_table[30]; extern String8 d_entity_kind_name_lower_plural_table[30]; extern String8 d_entity_kind_name_label_table[30]; -extern DF_EntityKindFlags d_entity_kind_flags_table[30]; -extern Rng1U64 df_reg_slot_range_table[32]; -extern DF_StringBindingPair df_g_default_binding_table[110]; -extern String8 df_g_binding_version_remap_old_name_table[7]; -extern String8 df_g_binding_version_remap_new_name_table[7]; -extern String8 df_g_icon_kind_text_table[69]; -extern String8 df_view_kind_name_lower_table[34]; -extern DF_ViewSpecInfo df_g_gfx_view_kind_spec_info_table[34]; -extern DF_IconKind df_entity_kind_icon_kind_table[30]; -extern String8 df_g_theme_preset_display_string_table[9]; -extern String8 df_g_theme_preset_code_string_table[9]; -extern String8 df_g_theme_color_version_remap_old_name_table[22]; -extern String8 df_g_theme_color_version_remap_new_name_table[22]; -extern Vec4F32 df_g_theme_preset_colors__default_dark[75]; -extern Vec4F32 df_g_theme_preset_colors__default_light[75]; -extern Vec4F32 df_g_theme_preset_colors__vs_dark[75]; -extern Vec4F32 df_g_theme_preset_colors__vs_light[75]; -extern Vec4F32 df_g_theme_preset_colors__solarized_dark[75]; -extern Vec4F32 df_g_theme_preset_colors__solarized_light[75]; -extern Vec4F32 df_g_theme_preset_colors__handmade_hero[75]; -extern Vec4F32 df_g_theme_preset_colors__four_coder[75]; -extern Vec4F32 df_g_theme_preset_colors__far_manager[75]; -extern Vec4F32* df_g_theme_preset_colors_table[9]; -extern String8 df_g_theme_color_display_string_table[75]; -extern String8 df_g_theme_color_cfg_string_table[75]; -extern String8 df_g_setting_code_display_string_table[19]; -extern String8 df_g_setting_code_lower_string_table[19]; -extern B8 df_g_setting_code_default_is_per_window_table[19]; -extern DF_SettingVal df_g_setting_code_default_val_table[19]; -extern Rng1S32 df_g_setting_code_s32_range_table[19]; -read_only global U8 df_g_icon_font_bytes__data[] = +extern RD_EntityKindFlags rd_entity_kind_flags_table[30]; +extern Rng1U64 rd_reg_slot_range_table[32]; +extern RD_StringBindingPair rd_default_binding_table[110]; +extern String8 rd_binding_version_remap_old_name_table[7]; +extern String8 rd_binding_version_remap_new_name_table[7]; +extern String8 rd_icon_kind_text_table[69]; +extern String8 rd_view_kind_name_lower_table[34]; +extern RD_ViewSpecInfo rd_gfx_view_kind_spec_info_table[34]; +extern RD_IconKind rd_entity_kind_icon_kind_table[30]; +extern String8 rd_theme_preset_display_string_table[9]; +extern String8 rd_theme_preset_code_string_table[9]; +extern String8 rd_theme_color_version_remap_old_name_table[22]; +extern String8 rd_theme_color_version_remap_new_name_table[22]; +extern Vec4F32 rd_theme_preset_colors__default_dark[75]; +extern Vec4F32 rd_theme_preset_colors__default_light[75]; +extern Vec4F32 rd_theme_preset_colors__vs_dark[75]; +extern Vec4F32 rd_theme_preset_colors__vs_light[75]; +extern Vec4F32 rd_theme_preset_colors__solarized_dark[75]; +extern Vec4F32 rd_theme_preset_colors__solarized_light[75]; +extern Vec4F32 rd_theme_preset_colors__handmade_hero[75]; +extern Vec4F32 rd_theme_preset_colors__four_coder[75]; +extern Vec4F32 rd_theme_preset_colors__far_manager[75]; +extern Vec4F32* rd_theme_preset_colors_table[9]; +extern String8 rd_theme_color_display_string_table[75]; +extern String8 rd_theme_color_cfg_string_table[75]; +extern String8 rd_setting_code_display_string_table[19]; +extern String8 rd_setting_code_lower_string_table[19]; +extern B8 rd_setting_code_default_is_per_window_table[19]; +extern RD_SettingVal rd_setting_code_default_val_table[19]; +extern Rng1S32 rd_setting_code_s32_range_table[19]; +read_only global U8 rd_icon_font_bytes__data[] = { 0x00,0x01,0x00,0x00,0x00,0x0f,0x00,0x80,0x00,0x03,0x00,0x70,0x47,0x53,0x55,0x42,0x20,0x8b,0x25,0x7a,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x54,0x4f,0x53,0x2f,0x32,0x56,0x44,0x49,0xa0,0x00,0x00,0x01,0x50,0x00,0x00,0x00,0x60,0x63,0x6d,0x61,0x70,0x2a,0x09,0xe2,0xc2,0x00,0x00,0x01,0xb0,0x00,0x00,0x05,0xec,0x63,0x76,0x74,0x20, 0x0e,0x5d,0x06,0x6d,0x00,0x00,0x53,0xc0,0x00,0x00,0x00,0x38,0x66,0x70,0x67,0x6d,0x62,0x31,0xfb,0x7b,0x00,0x00,0x53,0xf8,0x00,0x00,0x0e,0x0c,0x67,0x61,0x73,0x70,0x00,0x00,0x00,0x10,0x00,0x00,0x53,0xb8,0x00,0x00,0x00,0x08,0x67,0x6c,0x79,0x66,0x3f,0x82,0x6a,0x1b,0x00,0x00,0x07,0x9c,0x00,0x00,0x43,0x86,0x68,0x65,0x61,0x64, @@ -1223,8 +1223,8 @@ read_only global U8 df_g_icon_font_bytes__data[] = 0x00,0x01,0x04,0x40,0x88,0x63,0x54,0x58,0xb9,0x00,0x03,0x00,0x00,0x44,0x59,0x59,0x59,0x59,0x59,0xb3,0x10,0x06,0x01,0x0e,0x2a,0xb8,0x01,0xff,0x85,0xb0,0x04,0x8d,0xb1,0x02,0x00,0x44,0xb3,0x05,0x64,0x06,0x00,0x44,0x44,0x00, }; -read_only global String8 df_g_icon_font_bytes = {df_g_icon_font_bytes__data, sizeof(df_g_icon_font_bytes__data)}; -read_only global U8 df_g_default_main_font_bytes__data[] = +read_only global String8 rd_icon_font_bytes = {rd_icon_font_bytes__data, sizeof(rd_icon_font_bytes__data)}; +read_only global U8 rd_default_main_font_bytes__data[] = { 0x00,0x01,0x00,0x00,0x00,0x13,0x01,0x00,0x00,0x04,0x00,0x30,0x44,0x53,0x49,0x47,0x00,0x00,0x00,0x01,0x00,0x02,0x6b,0x84,0x00,0x00,0x00,0x08,0x47,0x44,0x45,0x46,0x18,0x60,0x18,0x61,0x00,0x00,0x01,0x3c,0x00,0x00,0x00,0x48,0x47,0x50,0x4f,0x53,0x15,0x2a,0x60,0x11,0x00,0x00,0x01,0x84,0x00,0x00,0x8b,0xa0,0x47,0x53,0x55,0x42, 0xc8,0x26,0xca,0x04,0x00,0x00,0x8d,0x24,0x00,0x00,0x02,0x96,0x4f,0x53,0x2f,0x32,0xb8,0xa3,0x29,0xc5,0x00,0x00,0x8f,0xbc,0x00,0x00,0x00,0x60,0x63,0x6d,0x61,0x70,0x11,0xca,0x4e,0x34,0x00,0x00,0x90,0x1c,0x00,0x00,0x06,0xd6,0x63,0x76,0x74,0x20,0x07,0x19,0x19,0xc9,0x00,0x02,0x61,0xe4,0x00,0x00,0x00,0x26,0x66,0x70,0x67,0x6d, @@ -3707,8 +3707,8 @@ read_only global U8 df_g_default_main_font_bytes__data[] = 0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00, }; -read_only global String8 df_g_default_main_font_bytes = {df_g_default_main_font_bytes__data, sizeof(df_g_default_main_font_bytes__data)}; -read_only global U8 df_g_default_code_font_bytes__data[] = +read_only global String8 rd_default_main_font_bytes = {rd_default_main_font_bytes__data, sizeof(rd_default_main_font_bytes__data)}; +read_only global U8 rd_default_code_font_bytes__data[] = { 0x00,0x01,0x00,0x00,0x00,0x10,0x01,0x00,0x00,0x04,0x00,0x00,0x46,0x46,0x54,0x4d,0x51,0x9f,0x15,0xb9,0x00,0x01,0xa6,0x6c,0x00,0x00,0x00,0x1c,0x47,0x44,0x45,0x46,0x02,0xd0,0x00,0x24,0x00,0x01,0xa6,0x44,0x00,0x00,0x00,0x28,0x4f,0x53,0x2f,0x32,0xf9,0x20,0x77,0x38,0x00,0x00,0x01,0x88,0x00,0x00,0x00,0x60,0x63,0x6d,0x61,0x70, 0x56,0x8d,0x3a,0x45,0x00,0x00,0x07,0x34,0x00,0x00,0x06,0xd6,0x63,0x76,0x74,0x20,0x4d,0x16,0x5e,0xb5,0x00,0x00,0x19,0x80,0x00,0x00,0x02,0x3c,0x66,0x70,0x67,0x6d,0x73,0xd3,0x23,0xb0,0x00,0x00,0x0e,0x0c,0x00,0x00,0x07,0x05,0x67,0x61,0x73,0x70,0x00,0x18,0x00,0x09,0x00,0x01,0xa6,0x34,0x00,0x00,0x00,0x10,0x67,0x6c,0x79,0x66, @@ -5403,8 +5403,8 @@ read_only global U8 df_g_default_code_font_bytes__data[] = 0x00,0x00,0x00,0x00,0xca,0x9f,0x1d,0x63, }; -read_only global String8 df_g_default_code_font_bytes = {df_g_default_code_font_bytes__data, sizeof(df_g_default_code_font_bytes__data)}; -read_only global U8 df_g_icon_file_bytes__data[] = +read_only global String8 rd_default_code_font_bytes = {rd_default_code_font_bytes__data, sizeof(rd_default_code_font_bytes__data)}; +read_only global U8 rd_icon_file_bytes__data[] = { 0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x02,0x1e,0x00,0x00,0x16,0x00,0x00,0x00,0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x08,0x06,0x00,0x00,0x00,0x5c,0x72,0xa8,0x66,0x00,0x00,0x1d,0xc9,0x49,0x44,0x41,0x54,0x78, 0x9c,0xed,0xdd,0x7b,0x7c,0x14,0xe5,0xbd,0xc7,0xf1,0xcf,0x6e,0xb2,0x9b,0x04,0x12,0x20,0x10,0xae,0xe2,0x25,0x52,0x06,0x05,0xe5,0x12,0x14,0x6f,0xc7,0x56,0x99,0x5a,0xd4,0xaa,0xd5,0xda,0x8b,0xb7,0xa2,0x55,0x4f,0x6d,0x6b,0xab,0xb5,0xf6,0x72,0x7a,0xb1,0xb5,0x1e,0x41,0xce,0xd1,0xb6,0x5a,0x4f,0xeb,0xa9,0x56,0x8b,0x37,0xb4,0x5a, @@ -5529,8 +5529,8 @@ read_only global U8 df_g_icon_file_bytes__data[] = 0xd5,0x1b,0xff,0x0f,0x5c,0x56,0xd9,0x0b,0x64,0x90,0x3b,0x82,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82, }; -read_only global String8 df_g_icon_file_bytes = {df_g_icon_file_bytes__data, sizeof(df_g_icon_file_bytes__data)}; +read_only global String8 rd_icon_file_bytes = {rd_icon_file_bytes__data, sizeof(rd_icon_file_bytes__data)}; C_LINKAGE_END -#endif // DBG_FRONTEND_META_H +#endif // RADDBG_META_H diff --git a/src/dbg_frontend/dbg_frontend.mdesk b/src/raddbg/raddbg.mdesk similarity index 94% rename from src/dbg_frontend/dbg_frontend.mdesk rename to src/raddbg/raddbg.mdesk index cceb4bbd..d408a4ae 100644 --- a/src/dbg_frontend/dbg_frontend.mdesk +++ b/src/raddbg/raddbg.mdesk @@ -4,17 +4,17 @@ //////////////////////////////// //~ rjf: Embedded Data -@embed_file df_g_icon_font_bytes: "../data/icons.ttf" -@embed_file df_g_default_main_font_bytes: "../data/Roboto-Regular.ttf" -@embed_file df_g_default_code_font_bytes: "../data/liberation-mono.ttf" -//@embed_file df_g_default_code_font_bytes: "../data/Inconsolata-Regular.ttf" -@embed_file df_g_icon_file_bytes: "../data/logo.ico" +@embed_file rd_icon_font_bytes: "../data/icons.ttf" +@embed_file rd_default_main_font_bytes: "../data/Roboto-Regular.ttf" +@embed_file rd_default_code_font_bytes: "../data/liberation-mono.ttf" +//@embed_file rd_default_code_font_bytes: "../data/Inconsolata-Regular.ttf" +@embed_file rd_icon_file_bytes: "../data/logo.ico" //////////////////////////////// //~ rjf: Config Sources @table(string, name, load_cmd, write_cmd, apply_cmd) -DF_CfgSrcTable: +RD_CfgSrcTable: { {"user" User OpenUser WriteUserData ApplyUserData } {"project" Project OpenProject WriteProjectData ApplyProjectData } @@ -22,30 +22,30 @@ DF_CfgSrcTable: {"transient" Transient Null Null Null } } -@enum DF_CfgSrc: +@enum RD_CfgSrc: { - @expand(DF_CfgSrcTable a) `$(a.name)`, + @expand(RD_CfgSrcTable a) `$(a.name)`, COUNT, } -@data(String8) d_cfg_src_string_table: +@data(String8) rd_cfg_src_string_table: { - @expand(DF_CfgSrcTable a) `str8_lit_comp("$(a.string)")`, + @expand(RD_CfgSrcTable a) `str8_lit_comp("$(a.string)")`, } -@data(DF_CmdKind) d_cfg_src_load_cmd_kind_table: +@data(RD_CmdKind) rd_cfg_src_load_cmd_kind_table: { - @expand(DF_CfgSrcTable a) `DF_CmdKind_$(a.load_cmd)`, + @expand(RD_CfgSrcTable a) `RD_CmdKind_$(a.load_cmd)`, } -@data(DF_CmdKind) d_cfg_src_write_cmd_kind_table: +@data(RD_CmdKind) rd_cfg_src_write_cmd_kind_table: { - @expand(DF_CfgSrcTable a) `DF_CmdKind_$(a.write_cmd)`, + @expand(RD_CfgSrcTable a) `RD_CmdKind_$(a.write_cmd)`, } -@data(DF_CmdKind) d_cfg_src_apply_cmd_kind_table: +@data(RD_CmdKind) rd_cfg_src_apply_cmd_kind_table: { - @expand(DF_CfgSrcTable a) `DF_CmdKind_$(a.apply_cmd)`; + @expand(RD_CfgSrcTable a) `RD_CmdKind_$(a.apply_cmd)`; } //////////////////////////////// @@ -58,7 +58,7 @@ DF_CfgSrcTable: // operations________ names lt sz // /..................\ /...\ | | // dl fz ed rn en cn dp nc np ul iz -DF_EntityKindTable: +RD_EntityKindTable: { {Nil nil nils 0 0 0 0 0 0 0 0 0 0 0 "Label" Null "Nil" } {Root root roots 0 0 0 0 0 0 0 0 0 0 0 "Label" Null "Root" } @@ -120,55 +120,55 @@ DF_EntityKindTable: {ConversionFail conversion_fail conversion_fails 0 0 0 1 0 0 0 0 0 0 0 "Label" Null "Conversion Failure" } } -@enum DF_EntityKind: +@enum RD_EntityKind: { - @expand(DF_EntityKindTable a) `$(a.name)`, + @expand(RD_EntityKindTable a) `$(a.name)`, COUNT, } @data(String8) d_entity_kind_display_string_table: { - @expand(DF_EntityKindTable a) `str8_lit_comp("$(a.display_string)")`, + @expand(RD_EntityKindTable a) `str8_lit_comp("$(a.display_string)")`, } @data(String8) d_entity_kind_name_lower_table: { - @expand(DF_EntityKindTable a) `str8_lit_comp("$(a.name_lower)")`, + @expand(RD_EntityKindTable a) `str8_lit_comp("$(a.name_lower)")`, } @data(String8) d_entity_kind_name_lower_plural_table: { - @expand(DF_EntityKindTable a) `str8_lit_comp("$(a.name_lower_plural)")`, + @expand(RD_EntityKindTable a) `str8_lit_comp("$(a.name_lower_plural)")`, } @data(String8) d_entity_kind_name_label_table: { - @expand(DF_EntityKindTable a) `str8_lit_comp("$(a.name_label)")`, + @expand(RD_EntityKindTable a) `str8_lit_comp("$(a.name_label)")`, } -@data(DF_EntityKindFlags) d_entity_kind_flags_table: +@data(RD_EntityKindFlags) rd_entity_kind_flags_table: { - @expand(DF_EntityKindTable a) `($(a.op_delete)*DF_EntityKindFlag_CanDelete) | ($(a.op_freeze)*DF_EntityKindFlag_CanFreeze) | ($(a.op_edit)*DF_EntityKindFlag_CanEdit) | ($(a.op_rename)*DF_EntityKindFlag_CanRename) | ($(a.op_enable)*DF_EntityKindFlag_CanEnable) | ($(a.op_cond)*DF_EntityKindFlag_CanCondition) | ($(a.op_dup)*DF_EntityKindFlag_CanDuplicate) | ($(a.name_is_code)*DF_EntityKindFlag_NameIsCode) | ($(a.name_is_path)*DF_EntityKindFlag_NameIsPath) | ($(a.user_lifetime)*DF_EntityKindFlag_UserDefinedLifetime) | ($(a.is_serialized)*DF_EntityKindFlag_IsSerializedToConfig)`, + @expand(RD_EntityKindTable a) `($(a.op_delete)*RD_EntityKindFlag_CanDelete) | ($(a.op_freeze)*RD_EntityKindFlag_CanFreeze) | ($(a.op_edit)*RD_EntityKindFlag_CanEdit) | ($(a.op_rename)*RD_EntityKindFlag_CanRename) | ($(a.op_enable)*RD_EntityKindFlag_CanEnable) | ($(a.op_cond)*RD_EntityKindFlag_CanCondition) | ($(a.op_dup)*RD_EntityKindFlag_CanDuplicate) | ($(a.name_is_code)*RD_EntityKindFlag_NameIsCode) | ($(a.name_is_path)*RD_EntityKindFlag_NameIsPath) | ($(a.user_lifetime)*RD_EntityKindFlag_UserDefinedLifetime) | ($(a.is_serialized)*RD_EntityKindFlag_IsSerializedToConfig)`, } //////////////////////////////// //~ rjf: Registers Type Table @table(c_type name_lower name) -DF_RegTable: +RD_RegTable: { // rjf: entity slots {CTRL_Handle machine Machine } {CTRL_Handle module Module } {CTRL_Handle process Process } {CTRL_Handle thread Thread } - {D_Handle window Window } - {D_Handle panel Panel } - {D_Handle view View } - {D_Handle prev_view PrevView } - {D_Handle dst_panel DstPanel } - {D_Handle entity Entity } - {D_HandleList entity_list EntityList } + {RD_Handle window Window } + {RD_Handle panel Panel } + {RD_Handle view View } + {RD_Handle prev_view PrevView } + {RD_Handle dst_panel DstPanel } + {RD_Handle entity Entity } + {RD_HandleList entity_list EntityList } // rjf: frame selection {U64 unwind_count UnwindCount } @@ -197,28 +197,28 @@ DF_RegTable: {`OS_Event *` os_event OSEvent } } -@enum DF_RegSlot: +@enum RD_RegSlot: { Null, - @expand(DF_RegTable a) `$(a.name)`, + @expand(RD_RegTable a) `$(a.name)`, COUNT, } -@struct DF_Regs: +@struct RD_Regs: { - @expand(DF_RegTable a) `$(a.c_type) $(a.name_lower)` + @expand(RD_RegTable a) `$(a.c_type) $(a.name_lower)` } -@data(Rng1U64) df_reg_slot_range_table: +@data(Rng1U64) rd_reg_slot_range_table: { `{0}`, - @expand(DF_RegTable a) `{OffsetOf(DF_Regs, $(a.name_lower)), OffsetOf(DF_Regs, $(a.name_lower)) + sizeof($(a.c_type))}` + @expand(RD_RegTable a) `{OffsetOf(RD_Regs, $(a.name_lower)), OffsetOf(RD_Regs, $(a.name_lower)) + sizeof($(a.c_type))}` } @gen { - `#define df_regs_lit_init_top \\` - @expand(DF_RegTable a) `.$(a.name_lower) = df_regs()->$(a.name_lower),\\` + `#define rd_regs_lit_init_top \\` + @expand(RD_RegTable a) `.$(a.name_lower) = rd_regs()->$(a.name_lower),\\` ``; } @@ -228,7 +228,7 @@ DF_RegTable: @table(name ui_vis ipc_docs_vis q_slot q_view q_ent_kind q_allow_files q_allow_folders q_keep_oi q_select_oi q_is_code q_required canonical_icon string display_name desc search_tags ) // / | | | \___ _____________________________________/ | | | | | // / | | | \ / | | | | | -DF_CmdTable: // | | | | | | | | | | +RD_CmdTable: // | | | | | | | | | | { //- rjf: exiting {Exit 1 1 Null null Nil 0 0 0 0 0 0 X "exit" "Exit" "Exits the debugger." "quit,close,abort" } @@ -500,47 +500,47 @@ DF_CmdTable: // | | | | {LogMarker 1 1 Null null Nil 0 0 0 0 0 0 Null "log_marker" "Log Marker" "Logs a marker in the application log, to denote specific points in time within the log." "" } } -@enum DF_CmdKind: +@enum RD_CmdKind: { `Null`, @expand(D_CmdTable a) `$(a.name)`, - @expand(DF_CmdTable, a) `$(a.name)`, + @expand(RD_CmdTable, a) `$(a.name)`, COUNT, } -@struct DF_Query: +@struct RD_Query: { - `DF_QueryFlags flags`; - `DF_RegSlot slot`; + `RD_QueryFlags flags`; + `RD_RegSlot slot`; `String8 view_name`; - `DF_EntityKind entity_kind`; + `RD_EntityKind entity_kind`; } -@struct DF_CmdKindInfo: +@struct RD_CmdKindInfo: { `String8 string`; `String8 description`; `String8 search_tags`; `String8 display_name`; - `DF_IconKind icon_kind`; - `DF_CmdKindFlags flags`; - `DF_Query query`; + `RD_IconKind icon_kind`; + `RD_CmdKindFlags flags`; + `RD_Query query`; }; -@data(DF_CmdKindInfo) @c_file df_cmd_kind_info_table: +@data(RD_CmdKindInfo) @c_file rd_cmd_kind_info_table: { `{0}`, @expand(D_CmdTable, a) - ```{ str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.desc)"), str8_lit_comp("$(a.search_tags)"), str8_lit_comp("$(a.display_name)"), DF_IconKind_$(a.canonical_icon), (DF_CmdKindFlag_ListInUI*$(a.ui_vis))|(DF_CmdKindFlag_ListInIPCDocs*$(a.ipc_docs_vis)), {(DF_QueryFlag_AllowFiles*$(a.q_allow_files))|(DF_QueryFlag_AllowFolders*$(a.q_allow_folders))|(DF_QueryFlag_CodeInput*$(a.q_is_code))|(DF_QueryFlag_KeepOldInput*$(a.q_keep_oi))|(DF_QueryFlag_SelectOldInput*$(a.q_select_oi))|(DF_QueryFlag_Required*$(a.q_required)), DF_RegSlot_$(a.q_slot), str8_lit_comp("$(a.q_view != 'null' -> a.q_view)"), DF_EntityKind_$(a.q_ent_kind)}}```; - @expand(DF_CmdTable, a) - ```{ str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.desc)"), str8_lit_comp("$(a.search_tags)"), str8_lit_comp("$(a.display_name)"), DF_IconKind_$(a.canonical_icon), (DF_CmdKindFlag_ListInUI*$(a.ui_vis))|(DF_CmdKindFlag_ListInIPCDocs*$(a.ipc_docs_vis)), {(DF_QueryFlag_AllowFiles*$(a.q_allow_files))|(DF_QueryFlag_AllowFolders*$(a.q_allow_folders))|(DF_QueryFlag_CodeInput*$(a.q_is_code))|(DF_QueryFlag_KeepOldInput*$(a.q_keep_oi))|(DF_QueryFlag_SelectOldInput*$(a.q_select_oi))|(DF_QueryFlag_Required*$(a.q_required)), DF_RegSlot_$(a.q_slot), str8_lit_comp("$(a.q_view != 'null' -> a.q_view)"), DF_EntityKind_$(a.q_ent_kind)}}```; + ```{ str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.desc)"), str8_lit_comp("$(a.search_tags)"), str8_lit_comp("$(a.display_name)"), RD_IconKind_$(a.canonical_icon), (RD_CmdKindFlag_ListInUI*$(a.ui_vis))|(RD_CmdKindFlag_ListInIPCDocs*$(a.ipc_docs_vis)), {(RD_QueryFlag_AllowFiles*$(a.q_allow_files))|(RD_QueryFlag_AllowFolders*$(a.q_allow_folders))|(RD_QueryFlag_CodeInput*$(a.q_is_code))|(RD_QueryFlag_KeepOldInput*$(a.q_keep_oi))|(RD_QueryFlag_SelectOldInput*$(a.q_select_oi))|(RD_QueryFlag_Required*$(a.q_required)), RD_RegSlot_$(a.q_slot), str8_lit_comp("$(a.q_view != 'null' -> a.q_view)"), RD_EntityKind_$(a.q_ent_kind)}}```; + @expand(RD_CmdTable, a) + ```{ str8_lit_comp("$(a.string)"), str8_lit_comp("$(a.desc)"), str8_lit_comp("$(a.search_tags)"), str8_lit_comp("$(a.display_name)"), RD_IconKind_$(a.canonical_icon), (RD_CmdKindFlag_ListInUI*$(a.ui_vis))|(RD_CmdKindFlag_ListInIPCDocs*$(a.ipc_docs_vis)), {(RD_QueryFlag_AllowFiles*$(a.q_allow_files))|(RD_QueryFlag_AllowFolders*$(a.q_allow_folders))|(RD_QueryFlag_CodeInput*$(a.q_is_code))|(RD_QueryFlag_KeepOldInput*$(a.q_keep_oi))|(RD_QueryFlag_SelectOldInput*$(a.q_select_oi))|(RD_QueryFlag_Required*$(a.q_required)), RD_RegSlot_$(a.q_slot), str8_lit_comp("$(a.q_view != 'null' -> a.q_view)"), RD_EntityKind_$(a.q_ent_kind)}}```; } //////////////////////////////// //~ rjf: Default Bindings @table(name key ctrl shift alt) -DF_DefaultBindingTable: +RD_DefaultBindingTable: { //- rjf: low-level target control operations { "kill_all" F5 0 shift 0 } @@ -703,16 +703,16 @@ DF_DefaultBindingTable: { "log_marker" M ctrl shift alt } } -@data(DF_StringBindingPair) df_g_default_binding_table: +@data(RD_StringBindingPair) rd_default_binding_table: { - @expand(DF_DefaultBindingTable a) ```{str8_lit_comp("$(a.name)"), {OS_Key_$(a.key), 0 $(a.ctrl != 0 -> `|OS_EventFlag_Ctrl`) $(a.shift != 0 -> `|OS_EventFlag_Shift`) $(a.alt != 0 -> `|OS_EventFlag_Alt`)}}```; + @expand(RD_DefaultBindingTable a) ```{str8_lit_comp("$(a.name)"), {OS_Key_$(a.key), 0 $(a.ctrl != 0 -> `|OS_EventFlag_Ctrl`) $(a.shift != 0 -> `|OS_EventFlag_Shift`) $(a.alt != 0 -> `|OS_EventFlag_Alt`)}}```; } //////////////////////////////// //~ rjf: Binding Version Remap Table @table(old_name new_name) -DF_BindingVersionRemapTable: +RD_BindingVersionRemapTable: { {"commands" "run_command"} {"load_user" "open_user"} @@ -723,21 +723,21 @@ DF_BindingVersionRemapTable: {"function_breakpoint" "add_function_breakpoint"} } -@data(String8) df_g_binding_version_remap_old_name_table: +@data(String8) rd_binding_version_remap_old_name_table: { - @expand(DF_BindingVersionRemapTable a) `str8_lit_comp("$(a.old_name)")` + @expand(RD_BindingVersionRemapTable a) `str8_lit_comp("$(a.old_name)")` } -@data(String8) df_g_binding_version_remap_new_name_table: +@data(String8) rd_binding_version_remap_new_name_table: { - @expand(DF_BindingVersionRemapTable a) `str8_lit_comp("$(a.new_name)")` + @expand(RD_BindingVersionRemapTable a) `str8_lit_comp("$(a.new_name)")` } //////////////////////////////// //~ rjf: Icons @table(name, text) -DF_IconTable: +RD_IconTable: { (Null "") (FolderOpenOutline "b") @@ -810,22 +810,22 @@ DF_IconTable: (Dot "c") } -@enum DF_IconKind: +@enum RD_IconKind: { - @expand(DF_IconTable a) `$(a.name)`, + @expand(RD_IconTable a) `$(a.name)`, COUNT, } -@data(String8) df_g_icon_kind_text_table: +@data(String8) rd_icon_kind_text_table: { - @expand(DF_IconTable a) `str8_lit_comp("$(a.text)")`; + @expand(RD_IconTable a) `str8_lit_comp("$(a.text)")`; } //////////////////////////////// //~ rjf: Built-In View Rules @table(name name_lower display_name params_schema icon can_filter filter_is_code typing_automatically_filters show_in_docs description) -DF_ViewRuleTable: +RD_ViewRuleTable: { //- rjf: basics { Empty empty "" "" Null 0 0 0 0 "" } @@ -876,34 +876,34 @@ DF_ViewRuleTable: { Geo3D geo3d "Geometry (3D)" "x:{'count':expr, 'vtx':expr, 'vtx_size':expr}" Binoculars 0 0 0 1 "Visualizes memory as 3D geometry." } } -@enum DF_ViewRuleKind: +@enum RD_ViewRuleKind: { Null, - @expand(DF_ViewRuleTable a) `$(a.name)`, + @expand(RD_ViewRuleTable a) `$(a.name)`, COUNT } -@struct DF_ViewRuleInfo: +@struct RD_ViewRuleInfo: { `String8 string`; `String8 description`; `String8 display_name`; `String8 params_schema`; - `DF_IconKind icon_kind`; - `DF_ViewRuleInfoFlags flags`; - `DF_ViewRuleUIFunctionType *ui`; + `RD_IconKind icon_kind`; + `RD_ViewRuleInfoFlags flags`; + `RD_ViewRuleUIFunctionType *ui`; }; /* @gen { - @expand(DF_ViewRuleTable a) `DF_VIEW_RULE_UI_FUNCTION_DEF($(a.name_lower));` + @expand(RD_ViewRuleTable a) `RD_VIEW_RULE_UI_FUNCTION_DEF($(a.name_lower));` } -@data(DF_ViewRuleInfo) df_view_rule_kind_info_table: +@data(RD_ViewRuleInfo) rd_view_rule_kind_info_table: { `{0}`, - @expand(DF_ViewRuleTable a) `{str8_lit_comp("$(a.name_lower)"), str8_lit_comp("$(a.description)"), str8_lit_comp("$(a.display_name)"), str8_lit_comp("$(a.params_schema)"), DF_IconKind_$(a.icon), (DF_ViewRuleInfoFlag_ShowInDocs*$(a.show_in_docs)|DF_ViewRuleInfoFlag_CanFilter*$(a.can_filter)|DF_ViewRuleInfoFlag_FilterIsCode*$(a.filter_is_code)|DF_ViewRuleInfoFlag_TypingAutomaticallyFilters*$(a.typing_automatically_filters)), DF_VIEW_RULE_UI_FUNCTION_NAME($(a.name_lower))}`, + @expand(RD_ViewRuleTable a) `{str8_lit_comp("$(a.name_lower)"), str8_lit_comp("$(a.description)"), str8_lit_comp("$(a.display_name)"), str8_lit_comp("$(a.params_schema)"), RD_IconKind_$(a.icon), (RD_ViewRuleInfoFlag_ShowInDocs*$(a.show_in_docs)|RD_ViewRuleInfoFlag_CanFilter*$(a.can_filter)|RD_ViewRuleInfoFlag_FilterIsCode*$(a.filter_is_code)|RD_ViewRuleInfoFlag_TypingAutomaticallyFilters*$(a.typing_automatically_filters)), RD_VIEW_RULE_UI_FUNCTION_NAME($(a.name_lower))}`, } */ @@ -911,7 +911,7 @@ DF_ViewRuleTable: //~ rjf: Gfx Layer View Kinds @table(name name_lower display_string icon parameterized_by_entity project_specific can_serialize can_filter filter_is_code typing_automatically_filters inc_in_docs docs_desc) -DF_ViewTable: +RD_ViewTable: { //- rjf: basics { Null "null" "" Null 0 0 0 0 0 0 0 "" } @@ -964,35 +964,35 @@ DF_ViewTable: { Settings "settings" "Settings" Gear 0 0 1 1 0 1 1 "An interface to modify general settings for the debugger's appearance and behavior." } } -@enum DF_ViewKind: +@enum RD_ViewKind: { - @expand(DF_ViewTable a) `$(a.name)`, + @expand(RD_ViewTable a) `$(a.name)`, COUNT, } @gen { - @expand(DF_ViewTable a) `DF_VIEW_SETUP_FUNCTION_DEF($(a.name_lower));`; - @expand(DF_ViewTable a) `DF_VIEW_CMD_FUNCTION_DEF($(a.name_lower));`; - @expand(DF_ViewTable a) `DF_VIEW_UI_FUNCTION_DEF($(a.name_lower));`; + @expand(RD_ViewTable a) `RD_VIEW_SETUP_FUNCTION_DEF($(a.name_lower));`; + @expand(RD_ViewTable a) `RD_VIEW_CMD_FUNCTION_DEF($(a.name_lower));`; + @expand(RD_ViewTable a) `RD_VIEW_UI_FUNCTION_DEF($(a.name_lower));`; } -@data(String8) df_view_kind_name_lower_table: +@data(String8) rd_view_kind_name_lower_table: { - @expand(DF_ViewTable a) `str8_lit_comp("$(a.name_lower)")` + @expand(RD_ViewTable a) `str8_lit_comp("$(a.name_lower)")` } -@data(DF_ViewSpecInfo) df_g_gfx_view_kind_spec_info_table: +@data(RD_ViewSpecInfo) rd_gfx_view_kind_spec_info_table: { - @expand(DF_ViewTable a) ```{(0|$(a.parameterized_by_entity)*DF_ViewSpecFlag_ParameterizedByEntity|$(a.project_specific)*DF_ViewSpecFlag_ProjectSpecific|$(a.can_serialize)*DF_ViewSpecFlag_CanSerialize|$(a.can_filter)*DF_ViewSpecFlag_CanFilter|$(a.filter_is_code)*DF_ViewSpecFlag_FilterIsCode|$(a.typing_automatically_filters)*DF_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("$(a.name_lower)"), str8_lit_comp("$(a.display_string)"), DF_IconKind_$(a.icon), DF_VIEW_SETUP_FUNCTION_NAME($(a.name_lower)), DF_VIEW_CMD_FUNCTION_NAME($(a.name_lower)), DF_VIEW_UI_FUNCTION_NAME($(a.name_lower))}```; + @expand(RD_ViewTable a) ```{(0|$(a.parameterized_by_entity)*RD_ViewSpecFlag_ParameterizedByEntity|$(a.project_specific)*RD_ViewSpecFlag_ProjectSpecific|$(a.can_serialize)*RD_ViewSpecFlag_CanSerialize|$(a.can_filter)*RD_ViewSpecFlag_CanFilter|$(a.filter_is_code)*RD_ViewSpecFlag_FilterIsCode|$(a.typing_automatically_filters)*RD_ViewSpecFlag_TypingAutomaticallyFilters), str8_lit_comp("$(a.name_lower)"), str8_lit_comp("$(a.display_string)"), RD_IconKind_$(a.icon), RD_VIEW_SETUP_FUNCTION_NAME($(a.name_lower)), RD_VIEW_CMD_FUNCTION_NAME($(a.name_lower)), RD_VIEW_UI_FUNCTION_NAME($(a.name_lower))}```; } //////////////////////////////// //~ rjf: Built-In Debug Engine Kind -> Icon Kind Table -@data(DF_IconKind) df_entity_kind_icon_kind_table: +@data(RD_IconKind) rd_entity_kind_icon_kind_table: { - @expand(DF_EntityKindTable a) `DF_IconKind_$(a.icon_kind)`, + @expand(RD_EntityKindTable a) `RD_IconKind_$(a.icon_kind)`, } //////////////////////////////// @@ -1001,7 +1001,7 @@ DF_ViewTable: // NOTE(rjf): see @view_rule_info @table(string vr ls ru vu) -DF_ViewRuleTable: +RD_ViewRuleTable: { {"array" - - - - } {"list" x - - - } @@ -1024,27 +1024,25 @@ DF_ViewRuleTable: @gen { ``; - @expand(DF_ViewRuleTable a) - `$(a.vr == "x" -> "DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(" .. a.name_lower .. ");")`; - @expand(DF_ViewRuleTable a) - `$(a.ls == "x" -> "DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(" .. a.name_lower .. ");")`; - @expand(DF_ViewRuleTable a) - `$(a.ru == "x" -> "DF_VIEW_RULE_ROW_UI_FUNCTION_DEF(" .. a.name_lower .. ");")`; - @expand(DF_ViewRuleTable a) - `$(a.bu == "x" -> "DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(" .. a.name_lower .. ");")`; + @expand(RD_ViewRuleTable a) + `$(a.vr == "x" -> "RD_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(" .. a.name_lower .. ");")`; + @expand(RD_ViewRuleTable a) + `$(a.ls == "x" -> "RD_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(" .. a.name_lower .. ");")`; + @expand(RD_ViewRuleTable a) + `$(a.ru == "x" -> "RD_VIEW_RULE_ROW_UI_FUNCTION_DEF(" .. a.name_lower .. ");")`; } -@data(DF_ViewRuleSpecInfo) @c_file df_g_gfx_view_rule_spec_info_table: +@data(RD_ViewRuleSpecInfo) @c_file rd_gfx_view_rule_spec_info_table: { - @expand(DF_ViewRuleTable a) - ```{ str8_lit_comp("$(a.string)"), (DF_ViewRuleSpecInfoFlag_VizRowProd*$(a.vr == "x"))|(DF_ViewRuleSpecInfoFlag_LineStringize*$(a.ls == "x"))|(DF_ViewRuleSpecInfoFlag_RowUI*$(a.ru == "x"))|(DF_ViewRuleSpecInfoFlag_ViewUI*$(a.vu == "x")), $(a.vr == "x" -> "DF_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME("..a.name_lower..")") $(a.vr != "x" -> 0), $(a.ls == "x" -> "DF_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME("..a.name_lower..")") $(a.ls != "x" -> 0), $(a.ru == "x" -> "DF_VIEW_RULE_ROW_UI_FUNCTION_NAME("..a.name_lower..")") $(a.ru != "x" -> 0) }```; + @expand(RD_ViewRuleTable a) + ```{ str8_lit_comp("$(a.string)"), (RD_ViewRuleSpecInfoFlag_VizRowProd*$(a.vr == "x"))|(RD_ViewRuleSpecInfoFlag_LineStringize*$(a.ls == "x"))|(RD_ViewRuleSpecInfoFlag_RowUI*$(a.ru == "x"))|(RD_ViewRuleSpecInfoFlag_ViewUI*$(a.vu == "x")), $(a.vr == "x" -> "RD_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME("..a.name_lower..")") $(a.vr != "x" -> 0), $(a.ls == "x" -> "RD_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME("..a.name_lower..")") $(a.ls != "x" -> 0), $(a.ru == "x" -> "RD_VIEW_RULE_ROW_UI_FUNCTION_NAME("..a.name_lower..")") $(a.ru != "x" -> 0) }```; } //////////////////////////////// //~ rjf: Theme Tables @table(name_upper name_lower display_string) -DF_ThemePresetTable: +RD_ThemePresetTable: { { DefaultDark default_dark "Default (Dark)" } { DefaultLight default_light "Default (Light)" } @@ -1058,7 +1056,7 @@ DF_ThemePresetTable: } @table(name display_name name_lower default_dark default_light vs_dark vs_light solarized_dark solarized_light handmade_hero four_coder far_manager desc) -DF_ThemeColorTable: +RD_ThemeColorTable: { {Null "Null" null 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff 0xff00ffff ""} @@ -1152,7 +1150,7 @@ DF_ThemeColorTable: } @table(old_name new_name) -DF_ThemeColorVersionRemapTable: +RD_ThemeColorVersionRemapTable: { {plain_text text} {plain_background base_background} @@ -1178,67 +1176,67 @@ DF_ThemeColorVersionRemapTable: {action_background neutral_pop_button_background} } -@enum DF_ThemeColor: +@enum RD_ThemeColor: { - @expand(DF_ThemeColorTable a) `$(a.name)`, + @expand(RD_ThemeColorTable a) `$(a.name)`, COUNT, } -@enum DF_ThemePreset: +@enum RD_ThemePreset: { - @expand(DF_ThemePresetTable a) `$(a.name)`, + @expand(RD_ThemePresetTable a) `$(a.name)`, COUNT, } -@data(String8) df_g_theme_preset_display_string_table: +@data(String8) rd_theme_preset_display_string_table: { - @expand(DF_ThemePresetTable a) `str8_lit_comp("$(a.display_string)")`, + @expand(RD_ThemePresetTable a) `str8_lit_comp("$(a.display_string)")`, } -@data(String8) df_g_theme_preset_code_string_table: +@data(String8) rd_theme_preset_code_string_table: { - @expand(DF_ThemePresetTable a) `str8_lit_comp("$(a.name_lower)")`, + @expand(RD_ThemePresetTable a) `str8_lit_comp("$(a.name_lower)")`, } -@data(String8) df_g_theme_color_version_remap_old_name_table: +@data(String8) rd_theme_color_version_remap_old_name_table: { - @expand(DF_ThemeColorVersionRemapTable a) `str8_lit_comp("$(a.old_name)")` + @expand(RD_ThemeColorVersionRemapTable a) `str8_lit_comp("$(a.old_name)")` } -@data(String8) df_g_theme_color_version_remap_new_name_table: +@data(String8) rd_theme_color_version_remap_new_name_table: { - @expand(DF_ThemeColorVersionRemapTable a) `str8_lit_comp("$(a.new_name)")` + @expand(RD_ThemeColorVersionRemapTable a) `str8_lit_comp("$(a.new_name)")` } -@data(Vec4F32) df_g_theme_preset_colors__default_dark: {@expand(DF_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.default_dark))`} -@data(Vec4F32) df_g_theme_preset_colors__default_light: {@expand(DF_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.default_light))`} -@data(Vec4F32) df_g_theme_preset_colors__vs_dark: {@expand(DF_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.vs_dark))`} -@data(Vec4F32) df_g_theme_preset_colors__vs_light: {@expand(DF_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.vs_light))`} -@data(Vec4F32) df_g_theme_preset_colors__solarized_dark: {@expand(DF_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.solarized_dark))`,} -@data(Vec4F32) df_g_theme_preset_colors__solarized_light:{@expand(DF_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.solarized_light))`,} -@data(Vec4F32) df_g_theme_preset_colors__handmade_hero: {@expand(DF_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.handmade_hero))`,} -@data(Vec4F32) df_g_theme_preset_colors__four_coder: {@expand(DF_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.four_coder))`,} -@data(Vec4F32) df_g_theme_preset_colors__far_manager: {@expand(DF_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.far_manager))`;} -@data(`Vec4F32*`) df_g_theme_preset_colors_table: +@data(Vec4F32) rd_theme_preset_colors__default_dark: {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.default_dark))`} +@data(Vec4F32) rd_theme_preset_colors__default_light: {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.default_light))`} +@data(Vec4F32) rd_theme_preset_colors__vs_dark: {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.vs_dark))`} +@data(Vec4F32) rd_theme_preset_colors__vs_light: {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.vs_light))`} +@data(Vec4F32) rd_theme_preset_colors__solarized_dark: {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.solarized_dark))`,} +@data(Vec4F32) rd_theme_preset_colors__solarized_light:{@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.solarized_light))`,} +@data(Vec4F32) rd_theme_preset_colors__handmade_hero: {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.handmade_hero))`,} +@data(Vec4F32) rd_theme_preset_colors__four_coder: {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.four_coder))`,} +@data(Vec4F32) rd_theme_preset_colors__far_manager: {@expand(RD_ThemeColorTable a) `rgba_from_u32_lit_comp($(a.far_manager))`;} +@data(`Vec4F32*`) rd_theme_preset_colors_table: { - @expand(DF_ThemePresetTable a) `df_g_theme_preset_colors__$(a.name_lower)`, + @expand(RD_ThemePresetTable a) `rd_theme_preset_colors__$(a.name_lower)`, } -@data(String8) df_g_theme_color_display_string_table: +@data(String8) rd_theme_color_display_string_table: { - @expand(DF_ThemeColorTable a) `str8_lit_comp("$(a.display_name)")` + @expand(RD_ThemeColorTable a) `str8_lit_comp("$(a.display_name)")` } -@data(String8) df_g_theme_color_cfg_string_table: +@data(String8) rd_theme_color_cfg_string_table: { - @expand(DF_ThemeColorTable a) `str8_lit_comp("$(a.name_lower)")` + @expand(RD_ThemeColorTable a) `str8_lit_comp("$(a.name_lower)")` } //////////////////////////////// //~ rjf: Settings @table(name name_lower display_string default_per_window default_s32 s32_min s32_max) -DF_SettingTable: +RD_SettingTable: { {HoverAnimations hover_animations "Hover Animations" 0 1 0 1 } {PressAnimations press_animations "Press Animations" 0 1 0 1 } @@ -1261,35 +1259,35 @@ DF_SettingTable: {HintCodeText hint_code_text "Hint Code Text" 1 1 0 1 } } -@enum DF_SettingCode: +@enum RD_SettingCode: { - @expand(DF_SettingTable a) `$(a.name)`, + @expand(RD_SettingTable a) `$(a.name)`, COUNT } -@data(String8) df_g_setting_code_display_string_table: +@data(String8) rd_setting_code_display_string_table: { - @expand(DF_SettingTable a) `str8_lit_comp("$(a.display_string)")` + @expand(RD_SettingTable a) `str8_lit_comp("$(a.display_string)")` } -@data(String8) df_g_setting_code_lower_string_table: +@data(String8) rd_setting_code_lower_string_table: { - @expand(DF_SettingTable a) `str8_lit_comp("$(a.name_lower)")` + @expand(RD_SettingTable a) `str8_lit_comp("$(a.name_lower)")` } -@data(B8) df_g_setting_code_default_is_per_window_table: +@data(B8) rd_setting_code_default_is_per_window_table: { - @expand(DF_SettingTable a) `$(a.default_per_window)` + @expand(RD_SettingTable a) `$(a.default_per_window)` } -@data(DF_SettingVal) df_g_setting_code_default_val_table: +@data(RD_SettingVal) rd_setting_code_default_val_table: { - @expand(DF_SettingTable a) `{1, $(a.default_s32)}` + @expand(RD_SettingTable a) `{1, $(a.default_s32)}` } -@data(Rng1S32) df_g_setting_code_s32_range_table: +@data(Rng1S32) rd_setting_code_s32_range_table: { - @expand(DF_SettingTable a) `{$(a.s32_min), $(a.s32_max)}` + @expand(RD_SettingTable a) `{$(a.s32_min), $(a.s32_max)}` } //////////////////////////////// @@ -1373,7 +1371,7 @@ raddbg_readme: @p "A list of debugger interfaces, which can occupy tabs, are below:"; @unordered_list { - @expand(DF_ViewTable a) @p "$(a.inc_in_docs -> '`'..a.display_string..'` '..a.docs_desc)"; + @expand(RD_ViewTable a) @p "$(a.inc_in_docs -> '`'..a.display_string..'` '..a.docs_desc)"; } @subtitle "Commands"; diff --git a/src/dbg_frontend/dbg_frontend_core.c b/src/raddbg/raddbg_core.c similarity index 67% rename from src/dbg_frontend/dbg_frontend_core.c rename to src/raddbg/raddbg_core.c index fc67768a..ace9ae43 100644 --- a/src/dbg_frontend/dbg_frontend_core.c +++ b/src/raddbg/raddbg_core.c @@ -7,46 +7,46 @@ //////////////////////////////// //~ rjf: Generated Code -#include "generated/dbg_frontend.meta.c" +#include "generated/raddbg.meta.c" //////////////////////////////// //~ rjf: Handles -internal D_Handle -d_handle_zero(void) +internal RD_Handle +rd_handle_zero(void) { - D_Handle result = {0}; + RD_Handle result = {0}; return result; } internal B32 -d_handle_match(D_Handle a, D_Handle b) +rd_handle_match(RD_Handle a, RD_Handle b) { return (a.u64[0] == b.u64[0] && a.u64[1] == b.u64[1]); } internal void -d_handle_list_push_node(D_HandleList *list, D_HandleNode *node) +rd_handle_list_push_node(RD_HandleList *list, RD_HandleNode *node) { DLLPushBack(list->first, list->last, node); list->count += 1; } internal void -d_handle_list_push(Arena *arena, D_HandleList *list, D_Handle handle) +rd_handle_list_push(Arena *arena, RD_HandleList *list, RD_Handle handle) { - D_HandleNode *n = push_array(arena, D_HandleNode, 1); + RD_HandleNode *n = push_array(arena, RD_HandleNode, 1); n->handle = handle; - d_handle_list_push_node(list, n); + rd_handle_list_push_node(list, n); } -internal D_HandleList -d_handle_list_copy(Arena *arena, D_HandleList list) +internal RD_HandleList +rd_handle_list_copy(Arena *arena, RD_HandleList list) { - D_HandleList result = {0}; - for(D_HandleNode *n = list.first; n != 0; n = n->next) + RD_HandleList result = {0}; + for(RD_HandleNode *n = list.first; n != 0; n = n->next) { - d_handle_list_push(arena, &result, n->handle); + rd_handle_list_push(arena, &result, n->handle); } return result; } @@ -55,12 +55,12 @@ d_handle_list_copy(Arena *arena, D_HandleList list) //~ rjf: Config Type Functions internal void -d_cfg_table_push_unparsed_string(Arena *arena, D_CfgTable *table, String8 string, DF_CfgSrc source) +rd_cfg_table_push_unparsed_string(Arena *arena, RD_CfgTable *table, String8 string, RD_CfgSrc source) { if(table->slot_count == 0) { table->slot_count = 64; - table->slots = push_array(arena, D_CfgSlot, table->slot_count); + table->slots = push_array(arena, RD_CfgSlot, table->slot_count); } MD_TokenizeResult tokenize = md_tokenize_from_text(arena, string); MD_ParseResult parse = md_parse_from_text_tokens(arena, str8_lit(""), string, tokenize.tokens); @@ -70,11 +70,11 @@ d_cfg_table_push_unparsed_string(Arena *arena, D_CfgTable *table, String8 string String8 string = str8(tln->string.str, tln->string.size); U64 hash = d_hash_from_string__case_insensitive(string); U64 slot_idx = hash % table->slot_count; - D_CfgSlot *slot = &table->slots[slot_idx]; + RD_CfgSlot *slot = &table->slots[slot_idx]; // rjf: find existing value for this string - D_CfgVal *val = 0; - for(D_CfgVal *v = slot->first; v != 0; v = v->hash_next) + RD_CfgVal *val = 0; + for(RD_CfgVal *v = slot->first; v != 0; v = v->hash_next) { if(str8_match(v->string, string, StringMatchFlag_CaseInsensitive)) { @@ -86,7 +86,7 @@ d_cfg_table_push_unparsed_string(Arena *arena, D_CfgTable *table, String8 string // rjf: create new value if needed if(val == 0) { - val = push_array(arena, D_CfgVal, 1); + val = push_array(arena, RD_CfgVal, 1); val->string = push_str8_copy(arena, string); val->insertion_stamp = table->insertion_stamp_counter; SLLStackPush_N(slot->first, val, hash_next); @@ -95,23 +95,23 @@ d_cfg_table_push_unparsed_string(Arena *arena, D_CfgTable *table, String8 string } // rjf: create new node within this value - D_CfgTree *tree = push_array(arena, D_CfgTree, 1); + RD_CfgTree *tree = push_array(arena, RD_CfgTree, 1); SLLQueuePush_NZ(&d_nil_cfg_tree, val->first, val->last, tree, next); tree->source = source; tree->root = md_tree_copy(arena, tln); } } -internal D_CfgVal * -d_cfg_val_from_string(D_CfgTable *table, String8 string) +internal RD_CfgVal * +rd_cfg_val_from_string(RD_CfgTable *table, String8 string) { - D_CfgVal *result = &d_nil_cfg_val; + RD_CfgVal *result = &d_nil_cfg_val; if(table->slot_count != 0) { U64 hash = d_hash_from_string__case_insensitive(string); U64 slot_idx = hash % table->slot_count; - D_CfgSlot *slot = &table->slots[slot_idx]; - for(D_CfgVal *val = slot->first; val != 0; val = val->hash_next) + RD_CfgSlot *slot = &table->slots[slot_idx]; + for(RD_CfgVal *val = slot->first; val != 0; val = val->hash_next) { if(str8_match(val->string, string, StringMatchFlag_CaseInsensitive)) { @@ -127,26 +127,26 @@ d_cfg_val_from_string(D_CfgTable *table, String8 string) //~ rjf: Registers Type Functions internal void -df_regs_copy_contents(Arena *arena, DF_Regs *dst, DF_Regs *src) +rd_regs_copy_contents(Arena *arena, RD_Regs *dst, RD_Regs *src) { MemoryCopyStruct(dst, src); - dst->entity_list = d_handle_list_copy(arena, src->entity_list); + dst->entity_list = rd_handle_list_copy(arena, src->entity_list); dst->file_path = push_str8_copy(arena, src->file_path); dst->lines = d_line_list_copy(arena, &src->lines); dst->dbgi_key = di_key_copy(arena, &src->dbgi_key); dst->string = push_str8_copy(arena, src->string); dst->params_tree = md_tree_copy(arena, src->params_tree); - if(dst->entity_list.count == 0 && !d_handle_match(d_handle_zero(), dst->entity)) + if(dst->entity_list.count == 0 && !rd_handle_match(rd_handle_zero(), dst->entity)) { - d_handle_list_push(arena, &dst->entity_list, dst->entity); + rd_handle_list_push(arena, &dst->entity_list, dst->entity); } } -internal DF_Regs * -df_regs_copy(Arena *arena, DF_Regs *src) +internal RD_Regs * +rd_regs_copy(Arena *arena, RD_Regs *src) { - DF_Regs *dst = push_array(arena, DF_Regs, 1); - df_regs_copy_contents(arena, dst, src); + RD_Regs *dst = push_array(arena, RD_Regs, 1); + rd_regs_copy_contents(arena, dst, src); return dst; } @@ -154,11 +154,11 @@ df_regs_copy(Arena *arena, DF_Regs *src) //~ rjf: Commands Type Functions internal void -df_cmd_list_push_new(Arena *arena, DF_CmdList *cmds, String8 name, DF_Regs *regs) +rd_cmd_list_push_new(Arena *arena, RD_CmdList *cmds, String8 name, RD_Regs *regs) { - DF_CmdNode *n = push_array(arena, DF_CmdNode, 1); + RD_CmdNode *n = push_array(arena, RD_CmdNode, 1); n->cmd.name = push_str8_copy(arena, name); - n->cmd.regs = df_regs_copy(arena, regs); + n->cmd.regs = rd_regs_copy(arena, regs); DLLPushBack(cmds->first, cmds->last, n); cmds->count += 1; } @@ -169,7 +169,7 @@ df_cmd_list_push_new(Arena *arena, DF_CmdList *cmds, String8 name, DF_Regs *regs //- rjf: nil internal B32 -df_entity_is_nil(DF_Entity *entity) +rd_entity_is_nil(RD_Entity *entity) { return (entity == 0 || entity == &d_nil_entity); } @@ -177,62 +177,62 @@ df_entity_is_nil(DF_Entity *entity) //- rjf: handle <-> entity conversions internal U64 -df_index_from_entity(DF_Entity *entity) +rd_index_from_entity(RD_Entity *entity) { - return (U64)(entity - df_state->entities_base); + return (U64)(entity - rd_state->entities_base); } -internal D_Handle -df_handle_from_entity(DF_Entity *entity) +internal RD_Handle +rd_handle_from_entity(RD_Entity *entity) { - D_Handle handle = d_handle_zero(); - if(!df_entity_is_nil(entity)) + RD_Handle handle = rd_handle_zero(); + if(!rd_entity_is_nil(entity)) { - handle.u64[0] = df_index_from_entity(entity); + handle.u64[0] = rd_index_from_entity(entity); handle.u64[1] = entity->gen; } return handle; } -internal DF_Entity * -df_entity_from_handle(D_Handle handle) +internal RD_Entity * +rd_entity_from_handle(RD_Handle handle) { - DF_Entity *result = df_state->entities_base + handle.u64[0]; - if(handle.u64[0] >= df_state->entities_count || result->gen != handle.u64[1]) + RD_Entity *result = rd_state->entities_base + handle.u64[0]; + if(handle.u64[0] >= rd_state->entities_count || result->gen != handle.u64[1]) { result = &d_nil_entity; } return result; } -internal D_HandleList -df_handle_list_from_entity_list(Arena *arena, DF_EntityList entities) +internal RD_HandleList +rd_handle_list_from_entity_list(Arena *arena, RD_EntityList entities) { - D_HandleList result = {0}; - for(DF_EntityNode *n = entities.first; n != 0; n = n->next) + RD_HandleList result = {0}; + for(RD_EntityNode *n = entities.first; n != 0; n = n->next) { - D_Handle handle = df_handle_from_entity(n->entity); - d_handle_list_push(arena, &result, handle); + RD_Handle handle = rd_handle_from_entity(n->entity); + rd_handle_list_push(arena, &result, handle); } return result; } //- rjf: entity recursion iterators -internal DF_EntityRec -df_entity_rec_depth_first(DF_Entity *entity, DF_Entity *subtree_root, U64 sib_off, U64 child_off) +internal RD_EntityRec +rd_entity_rec_depth_first(RD_Entity *entity, RD_Entity *subtree_root, U64 sib_off, U64 child_off) { - DF_EntityRec result = {0}; - if(!df_entity_is_nil(*MemberFromOffset(DF_Entity **, entity, child_off))) + RD_EntityRec result = {0}; + if(!rd_entity_is_nil(*MemberFromOffset(RD_Entity **, entity, child_off))) { - result.next = *MemberFromOffset(DF_Entity **, entity, child_off); + result.next = *MemberFromOffset(RD_Entity **, entity, child_off); result.push_count = 1; } - else for(DF_Entity *parent = entity; parent != subtree_root && !df_entity_is_nil(parent); parent = parent->parent) + else for(RD_Entity *parent = entity; parent != subtree_root && !rd_entity_is_nil(parent); parent = parent->parent) { - if(parent != subtree_root && !df_entity_is_nil(*MemberFromOffset(DF_Entity **, parent, sib_off))) + if(parent != subtree_root && !rd_entity_is_nil(*MemberFromOffset(RD_Entity **, parent, sib_off))) { - result.next = *MemberFromOffset(DF_Entity **, parent, sib_off); + result.next = *MemberFromOffset(RD_Entity **, parent, sib_off); break; } result.pop_count += 1; @@ -242,11 +242,11 @@ df_entity_rec_depth_first(DF_Entity *entity, DF_Entity *subtree_root, U64 sib_of //- rjf: ancestor/child introspection -internal DF_Entity * -df_entity_child_from_kind(DF_Entity *entity, DF_EntityKind kind) +internal RD_Entity * +rd_entity_child_from_kind(RD_Entity *entity, RD_EntityKind kind) { - DF_Entity *result = &d_nil_entity; - for(DF_Entity *child = entity->first; !df_entity_is_nil(child); child = child->next) + RD_Entity *result = &d_nil_entity; + for(RD_Entity *child = entity->first; !rd_entity_is_nil(child); child = child->next) { if(child->kind == kind) { @@ -257,11 +257,11 @@ df_entity_child_from_kind(DF_Entity *entity, DF_EntityKind kind) return result; } -internal DF_Entity * -df_entity_ancestor_from_kind(DF_Entity *entity, DF_EntityKind kind) +internal RD_Entity * +rd_entity_ancestor_from_kind(RD_Entity *entity, RD_EntityKind kind) { - DF_Entity *result = &d_nil_entity; - for(DF_Entity *p = entity->parent; !df_entity_is_nil(p); p = p->parent) + RD_Entity *result = &d_nil_entity; + for(RD_Entity *p = entity->parent; !rd_entity_is_nil(p); p = p->parent) { if(p->kind == kind) { @@ -272,25 +272,25 @@ df_entity_ancestor_from_kind(DF_Entity *entity, DF_EntityKind kind) return result; } -internal DF_EntityList -df_push_entity_child_list_with_kind(Arena *arena, DF_Entity *entity, DF_EntityKind kind) +internal RD_EntityList +rd_push_entity_child_list_with_kind(Arena *arena, RD_Entity *entity, RD_EntityKind kind) { - DF_EntityList result = {0}; - for(DF_Entity *child = entity->first; !df_entity_is_nil(child); child = child->next) + RD_EntityList result = {0}; + for(RD_Entity *child = entity->first; !rd_entity_is_nil(child); child = child->next) { if(child->kind == kind) { - df_entity_list_push(arena, &result, child); + rd_entity_list_push(arena, &result, child); } } return result; } -internal DF_Entity * -df_entity_child_from_string_and_kind(DF_Entity *parent, String8 string, DF_EntityKind kind) +internal RD_Entity * +rd_entity_child_from_string_and_kind(RD_Entity *parent, String8 string, RD_EntityKind kind) { - DF_Entity *result = &d_nil_entity; - for(DF_Entity *child = parent->first; !df_entity_is_nil(child); child = child->next) + RD_Entity *result = &d_nil_entity; + for(RD_Entity *child = parent->first; !rd_entity_is_nil(child); child = child->next) { if(str8_match(child->string, string, 0) && child->kind == kind) { @@ -304,22 +304,22 @@ df_entity_child_from_string_and_kind(DF_Entity *parent, String8 string, DF_Entit //- rjf: entity list building internal void -df_entity_list_push(Arena *arena, DF_EntityList *list, DF_Entity *entity) +rd_entity_list_push(Arena *arena, RD_EntityList *list, RD_Entity *entity) { - DF_EntityNode *n = push_array(arena, DF_EntityNode, 1); + RD_EntityNode *n = push_array(arena, RD_EntityNode, 1); n->entity = entity; SLLQueuePush(list->first, list->last, n); list->count += 1; } -internal DF_EntityArray -df_entity_array_from_list(Arena *arena, DF_EntityList *list) +internal RD_EntityArray +rd_entity_array_from_list(Arena *arena, RD_EntityList *list) { - DF_EntityArray result = {0}; + RD_EntityArray result = {0}; result.count = list->count; - result.v = push_array(arena, DF_Entity *, result.count); + result.v = push_array(arena, RD_Entity *, result.count); U64 idx = 0; - for(DF_EntityNode *n = list->first; n != 0; n = n->next, idx += 1) + for(RD_EntityNode *n = list->first; n != 0; n = n->next, idx += 1) { result.v[idx] = n->entity; } @@ -328,27 +328,27 @@ df_entity_array_from_list(Arena *arena, DF_EntityList *list) //- rjf: entity fuzzy list building -internal DF_EntityFuzzyItemArray -df_entity_fuzzy_item_array_from_entity_list_needle(Arena *arena, DF_EntityList *list, String8 needle) +internal RD_EntityFuzzyItemArray +rd_entity_fuzzy_item_array_from_entity_list_needle(Arena *arena, RD_EntityList *list, String8 needle) { Temp scratch = scratch_begin(&arena, 1); - DF_EntityArray array = df_entity_array_from_list(scratch.arena, list); - DF_EntityFuzzyItemArray result = df_entity_fuzzy_item_array_from_entity_array_needle(arena, &array, needle); + RD_EntityArray array = rd_entity_array_from_list(scratch.arena, list); + RD_EntityFuzzyItemArray result = rd_entity_fuzzy_item_array_from_entity_array_needle(arena, &array, needle); return result; } -internal DF_EntityFuzzyItemArray -df_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, DF_EntityArray *array, String8 needle) +internal RD_EntityFuzzyItemArray +rd_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, RD_EntityArray *array, String8 needle) { Temp scratch = scratch_begin(&arena, 1); - DF_EntityFuzzyItemArray result = {0}; + RD_EntityFuzzyItemArray result = {0}; result.count = array->count; - result.v = push_array(arena, DF_EntityFuzzyItem, result.count); + result.v = push_array(arena, RD_EntityFuzzyItem, result.count); U64 result_idx = 0; for(U64 src_idx = 0; src_idx < array->count; src_idx += 1) { - DF_Entity *entity = array->v[src_idx]; - String8 display_string = df_display_string_from_entity(scratch.arena, entity); + RD_Entity *entity = array->v[src_idx]; + String8 display_string = rd_display_string_from_entity(scratch.arena, entity); FuzzyMatchRangeList matches = fuzzy_match_find(arena, needle, display_string); if(matches.count >= matches.needle_part_count) { @@ -358,7 +358,7 @@ df_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, DF_EntityArray } else { - String8 search_tags = df_search_tags_from_entity(scratch.arena, entity); + String8 search_tags = rd_search_tags_from_entity(scratch.arena, entity); if(search_tags.size != 0) { FuzzyMatchRangeList tag_matches = fuzzy_match_find(scratch.arena, needle, search_tags); @@ -379,15 +379,15 @@ df_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, DF_EntityArray //- rjf: full path building, from file/folder entities internal String8 -df_full_path_from_entity(Arena *arena, DF_Entity *entity) +rd_full_path_from_entity(Arena *arena, RD_Entity *entity) { String8 string = {0}; { Temp scratch = scratch_begin(&arena, 1); String8List strs = {0}; - for(DF_Entity *e = entity; !df_entity_is_nil(e); e = e->parent) + for(RD_Entity *e = entity; !rd_entity_is_nil(e); e = e->parent) { - if(e->kind == DF_EntityKind_File) + if(e->kind == RD_EntityKind_File) { str8_list_push_front(scratch.arena, &strs, e->string); } @@ -403,7 +403,7 @@ df_full_path_from_entity(Arena *arena, DF_Entity *entity) //- rjf: display string entities, for referencing entities in ui internal String8 -df_display_string_from_entity(Arena *arena, DF_Entity *entity) +rd_display_string_from_entity(Arena *arena, RD_Entity *entity) { String8 result = {0}; switch(entity->kind) @@ -421,7 +421,7 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) } }break; - case DF_EntityKind_Target: + case RD_EntityKind_Target: { if(entity->string.size != 0) { @@ -429,12 +429,12 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) } else { - DF_Entity *exe = df_entity_child_from_kind(entity, DF_EntityKind_Executable); + RD_Entity *exe = rd_entity_child_from_kind(entity, RD_EntityKind_Executable); result = push_str8_copy(arena, exe->string); } }break; - case DF_EntityKind_Breakpoint: + case RD_EntityKind_Breakpoint: { if(entity->string.size != 0) { @@ -442,12 +442,12 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) } else { - DF_Entity *loc = df_entity_child_from_kind(entity, DF_EntityKind_Location); - if(loc->flags & DF_EntityFlag_HasTextPoint) + RD_Entity *loc = rd_entity_child_from_kind(entity, RD_EntityKind_Location); + if(loc->flags & RD_EntityFlag_HasTextPoint) { result = push_str8f(arena, "%S:%I64d:%I64d", str8_skip_last_slash(loc->string), loc->text_point.line, loc->text_point.column); } - else if(loc->flags & DF_EntityFlag_HasVAddr) + else if(loc->flags & RD_EntityFlag_HasVAddr) { result = str8_from_u64(arena, loc->vaddr, 16, 16, 0); } @@ -458,9 +458,9 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) } }break; - case DF_EntityKind_Process: + case RD_EntityKind_Process: { - DF_Entity *main_mod_child = df_entity_child_from_kind(entity, DF_EntityKind_Module); + RD_Entity *main_mod_child = rd_entity_child_from_kind(entity, RD_EntityKind_Module); String8 main_mod_name = str8_skip_last_slash(main_mod_child->string); result = push_str8f(arena, "%S%s%sPID: %i%s", main_mod_name, @@ -470,13 +470,13 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) main_mod_name.size != 0 ? ")" : ""); }break; - case DF_EntityKind_Thread: + case RD_EntityKind_Thread: { String8 name = entity->string; if(name.size == 0) { - DF_Entity *process = df_entity_ancestor_from_kind(entity, DF_EntityKind_Process); - DF_Entity *first_thread = df_entity_child_from_kind(process, DF_EntityKind_Thread); + RD_Entity *process = rd_entity_ancestor_from_kind(entity, RD_EntityKind_Process); + RD_Entity *first_thread = rd_entity_child_from_kind(process, RD_EntityKind_Thread); if(first_thread == entity) { name = str8_lit("Main Thread"); @@ -490,12 +490,12 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) name.size != 0 ? ")" : ""); }break; - case DF_EntityKind_Module: + case RD_EntityKind_Module: { result = push_str8_copy(arena, str8_skip_last_slash(entity->string)); }break; - case DF_EntityKind_RecentProject: + case RD_EntityKind_RecentProject: { result = push_str8_copy(arena, str8_skip_last_slash(entity->string)); }break; @@ -506,10 +506,10 @@ df_display_string_from_entity(Arena *arena, DF_Entity *entity) //- rjf: extra search tag strings for fuzzy filtering entities internal String8 -df_search_tags_from_entity(Arena *arena, DF_Entity *entity) +rd_search_tags_from_entity(Arena *arena, RD_Entity *entity) { String8 result = {0}; - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == RD_EntityKind_Thread) { Temp scratch = scratch_begin(&arena, 1); CTRL_Entity *entity_ctrl = ctrl_entity_from_handle(d_state->ctrl_entity_store, entity->ctrl_handle); @@ -540,10 +540,10 @@ df_search_tags_from_entity(Arena *arena, DF_Entity *entity) //- rjf: entity -> color operations internal Vec4F32 -df_hsva_from_entity(DF_Entity *entity) +rd_hsva_from_entity(RD_Entity *entity) { Vec4F32 result = {0}; - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & RD_EntityFlag_HasColor) { result = entity->color_hsva; } @@ -551,10 +551,10 @@ df_hsva_from_entity(DF_Entity *entity) } internal Vec4F32 -df_rgba_from_entity(DF_Entity *entity) +rd_rgba_from_entity(RD_Entity *entity) { Vec4F32 result = {0}; - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & RD_EntityFlag_HasColor) { Vec3F32 hsv = v3f32(entity->color_hsva.x, entity->color_hsva.y, entity->color_hsva.z); Vec3F32 rgb = rgb_from_hsv(hsv); @@ -566,15 +566,15 @@ df_rgba_from_entity(DF_Entity *entity) //- rjf: entity -> expansion tree keys internal EV_Key -df_ev_key_from_entity(DF_Entity *entity) +rd_ev_key_from_entity(RD_Entity *entity) { - EV_Key parent_key = df_parent_ev_key_from_entity(entity); + EV_Key parent_key = rd_parent_ev_key_from_entity(entity); EV_Key key = ev_key_make(ev_hash_from_key(parent_key), (U64)entity); return key; } internal EV_Key -df_parent_ev_key_from_entity(DF_Entity *entity) +rd_parent_ev_key_from_entity(RD_Entity *entity) { EV_Key parent_key = ev_key_make(5381, (U64)entity); return parent_key; @@ -582,20 +582,20 @@ df_parent_ev_key_from_entity(DF_Entity *entity) //- rjf: entity -> evaluation -internal DF_EntityEval * -df_eval_from_entity(Arena *arena, DF_Entity *entity) +internal RD_EntityEval * +rd_eval_from_entity(Arena *arena, RD_Entity *entity) { - DF_EntityEval *eval = push_array(arena, DF_EntityEval, 1); + RD_EntityEval *eval = push_array(arena, RD_EntityEval, 1); { - DF_Entity *loc = df_entity_child_from_kind(entity, DF_EntityKind_Location); - DF_Entity *cnd = df_entity_child_from_kind(entity, DF_EntityKind_Condition); + RD_Entity *loc = rd_entity_child_from_kind(entity, RD_EntityKind_Location); + RD_Entity *cnd = rd_entity_child_from_kind(entity, RD_EntityKind_Condition); String8 label_string = push_str8_copy(arena, entity->string); String8 loc_string = {0}; - if(loc->flags & DF_EntityFlag_HasTextPoint) + if(loc->flags & RD_EntityFlag_HasTextPoint) { loc_string = push_str8f(arena, "%S:%I64u:%I64u", loc->string, loc->text_point.line, loc->text_point.column); } - else if(loc->flags & DF_EntityFlag_HasVAddr) + else if(loc->flags & RD_EntityFlag_HasVAddr) { loc_string = push_str8f(arena, "0x%I64x", loc->vaddr); } @@ -613,29 +613,29 @@ df_eval_from_entity(Arena *arena, DF_Entity *entity) //~ rjf: View Type Functions internal B32 -df_view_is_nil(DF_View *view) +rd_view_is_nil(RD_View *view) { - return (view == 0 || view == &df_nil_view); + return (view == 0 || view == &rd_nil_view); } internal B32 -df_view_is_project_filtered(DF_View *view) +rd_view_is_project_filtered(RD_View *view) { B32 result = 0; String8 view_project = view->project_path; if(view_project.size != 0) { - String8 current_project = df_cfg_path_from_src(DF_CfgSrc_Project); + String8 current_project = rd_cfg_path_from_src(RD_CfgSrc_Project); result = !path_match_normalized(view_project, current_project); } return result; } -internal D_Handle -df_handle_from_view(DF_View *view) +internal RD_Handle +rd_handle_from_view(RD_View *view) { - D_Handle handle = d_handle_zero(); - if(!df_view_is_nil(view)) + RD_Handle handle = rd_handle_zero(); + if(!rd_view_is_nil(view)) { handle.u64[0] = (U64)view; handle.u64[1] = view->generation; @@ -643,13 +643,13 @@ df_handle_from_view(DF_View *view) return handle; } -internal DF_View * -df_view_from_handle(D_Handle handle) +internal RD_View * +rd_view_from_handle(RD_Handle handle) { - DF_View *result = (DF_View *)handle.u64[0]; - if(df_view_is_nil(result) || result->generation != handle.u64[1]) + RD_View *result = (RD_View *)handle.u64[0]; + if(rd_view_is_nil(result) || result->generation != handle.u64[1]) { - result = &df_nil_view; + result = &rd_nil_view; } return result; } @@ -657,15 +657,15 @@ df_view_from_handle(D_Handle handle) //////////////////////////////// //~ rjf: View Spec Type Functions -internal DF_ViewKind -df_view_kind_from_string(String8 string) +internal RD_ViewKind +rd_view_kind_from_string(String8 string) { - DF_ViewKind result = DF_ViewKind_Null; - for(U64 idx = 0; idx < ArrayCount(df_g_gfx_view_kind_spec_info_table); idx += 1) + RD_ViewKind result = RD_ViewKind_Null; + for(U64 idx = 0; idx < ArrayCount(rd_gfx_view_kind_spec_info_table); idx += 1) { - if(str8_match(string, df_g_gfx_view_kind_spec_info_table[idx].name, StringMatchFlag_CaseInsensitive)) + if(str8_match(string, rd_gfx_view_kind_spec_info_table[idx].name, StringMatchFlag_CaseInsensitive)) { - result = (DF_ViewKind)idx; + result = (RD_ViewKind)idx; break; } } @@ -678,33 +678,33 @@ df_view_kind_from_string(String8 string) //- rjf: basic type functions internal B32 -df_panel_is_nil(DF_Panel *panel) +rd_panel_is_nil(RD_Panel *panel) { - return panel == 0 || panel == &df_nil_panel; + return panel == 0 || panel == &rd_nil_panel; } -internal D_Handle -df_handle_from_panel(DF_Panel *panel) +internal RD_Handle +rd_handle_from_panel(RD_Panel *panel) { - D_Handle h = {0}; + RD_Handle h = {0}; h.u64[0] = (U64)panel; h.u64[1] = panel->generation; return h; } -internal DF_Panel * -df_panel_from_handle(D_Handle handle) +internal RD_Panel * +rd_panel_from_handle(RD_Handle handle) { - DF_Panel *panel = (DF_Panel *)handle.u64[0]; + RD_Panel *panel = (RD_Panel *)handle.u64[0]; if(panel == 0 || panel->generation != handle.u64[1]) { - panel = &df_nil_panel; + panel = &rd_nil_panel; } return panel; } internal UI_Key -df_ui_key_from_panel(DF_Panel *panel) +rd_ui_key_from_panel(RD_Panel *panel) { UI_Key panel_key = ui_key_from_stringf(ui_key_zero(), "panel_window_%p", panel); return panel_key; @@ -713,45 +713,45 @@ df_ui_key_from_panel(DF_Panel *panel) //- rjf: tree construction internal void -df_panel_insert(DF_Panel *parent, DF_Panel *prev_child, DF_Panel *new_child) +rd_panel_insert(RD_Panel *parent, RD_Panel *prev_child, RD_Panel *new_child) { - DLLInsert_NPZ(&df_nil_panel, parent->first, parent->last, prev_child, new_child, next, prev); + DLLInsert_NPZ(&rd_nil_panel, parent->first, parent->last, prev_child, new_child, next, prev); parent->child_count += 1; new_child->parent = parent; } internal void -df_panel_remove(DF_Panel *parent, DF_Panel *child) +rd_panel_remove(RD_Panel *parent, RD_Panel *child) { - DLLRemove_NPZ(&df_nil_panel, parent->first, parent->last, child, next, prev); - child->next = child->prev = child->parent = &df_nil_panel; + DLLRemove_NPZ(&rd_nil_panel, parent->first, parent->last, child, next, prev); + child->next = child->prev = child->parent = &rd_nil_panel; parent->child_count -= 1; } //- rjf: tree walk -internal DF_PanelRec -df_panel_rec_df(DF_Panel *panel, U64 sib_off, U64 child_off) +internal RD_PanelRec +rd_panel_rec_depth_first(RD_Panel *panel, U64 sib_off, U64 child_off) { - DF_PanelRec rec = {0}; - if(!df_panel_is_nil(*MemberFromOffset(DF_Panel **, panel, child_off))) + RD_PanelRec rec = {0}; + if(!rd_panel_is_nil(*MemberFromOffset(RD_Panel **, panel, child_off))) { - rec.next = *MemberFromOffset(DF_Panel **, panel, child_off); + rec.next = *MemberFromOffset(RD_Panel **, panel, child_off); rec.push_count = 1; } - else if(!df_panel_is_nil(*MemberFromOffset(DF_Panel **, panel, sib_off))) + else if(!rd_panel_is_nil(*MemberFromOffset(RD_Panel **, panel, sib_off))) { - rec.next = *MemberFromOffset(DF_Panel **, panel, sib_off); + rec.next = *MemberFromOffset(RD_Panel **, panel, sib_off); } else { - DF_Panel *uncle = &df_nil_panel; - for(DF_Panel *p = panel->parent; !df_panel_is_nil(p); p = p->parent) + RD_Panel *uncle = &rd_nil_panel; + for(RD_Panel *p = panel->parent; !rd_panel_is_nil(p); p = p->parent) { rec.pop_count += 1; - if(!df_panel_is_nil(*MemberFromOffset(DF_Panel **, p, sib_off))) + if(!rd_panel_is_nil(*MemberFromOffset(RD_Panel **, p, sib_off))) { - uncle = *MemberFromOffset(DF_Panel **, p, sib_off); + uncle = *MemberFromOffset(RD_Panel **, p, sib_off); break; } } @@ -763,15 +763,15 @@ df_panel_rec_df(DF_Panel *panel, U64 sib_off, U64 child_off) //- rjf: panel -> rect calculations internal Rng2F32 -df_target_rect_from_panel_child(Rng2F32 parent_rect, DF_Panel *parent, DF_Panel *panel) +rd_target_rect_from_panel_child(Rng2F32 parent_rect, RD_Panel *parent, RD_Panel *panel) { Rng2F32 rect = parent_rect; - if(!df_panel_is_nil(parent)) + if(!rd_panel_is_nil(parent)) { Vec2F32 parent_rect_size = dim_2f32(parent_rect); Axis2 axis = parent->split_axis; rect.p1.v[axis] = rect.p0.v[axis]; - for(DF_Panel *child = parent->first; !df_panel_is_nil(child); child = child->next) + for(RD_Panel *child = parent->first; !rd_panel_is_nil(child); child = child->next) { rect.p1.v[axis] += parent_rect_size.v[axis] * child->pct_of_parent; if(child == panel) @@ -791,22 +791,22 @@ df_target_rect_from_panel_child(Rng2F32 parent_rect, DF_Panel *parent, DF_Panel } internal Rng2F32 -df_target_rect_from_panel(Rng2F32 root_rect, DF_Panel *root, DF_Panel *panel) +rd_target_rect_from_panel(Rng2F32 root_rect, RD_Panel *root, RD_Panel *panel) { Temp scratch = scratch_begin(0, 0); // rjf: count ancestors U64 ancestor_count = 0; - for(DF_Panel *p = panel->parent; !df_panel_is_nil(p); p = p->parent) + for(RD_Panel *p = panel->parent; !rd_panel_is_nil(p); p = p->parent) { ancestor_count += 1; } // rjf: gather ancestors - DF_Panel **ancestors = push_array(scratch.arena, DF_Panel *, ancestor_count); + RD_Panel **ancestors = push_array(scratch.arena, RD_Panel *, ancestor_count); { U64 ancestor_idx = 0; - for(DF_Panel *p = panel->parent; !df_panel_is_nil(p); p = p->parent) + for(RD_Panel *p = panel->parent; !rd_panel_is_nil(p); p = p->parent) { ancestors[ancestor_idx] = p; ancestor_idx += 1; @@ -819,16 +819,16 @@ df_target_rect_from_panel(Rng2F32 root_rect, DF_Panel *root, DF_Panel *panel) 0 <= ancestor_idx && ancestor_idx < ancestor_count; ancestor_idx -= 1) { - DF_Panel *ancestor = ancestors[ancestor_idx]; - DF_Panel *parent = ancestor->parent; - if(!df_panel_is_nil(parent)) + RD_Panel *ancestor = ancestors[ancestor_idx]; + RD_Panel *parent = ancestor->parent; + if(!rd_panel_is_nil(parent)) { - parent_rect = df_target_rect_from_panel_child(parent_rect, parent, ancestor); + parent_rect = rd_target_rect_from_panel_child(parent_rect, parent, ancestor); } } // rjf: calculate final rect - Rng2F32 rect = df_target_rect_from_panel_child(parent_rect, panel->parent, panel); + Rng2F32 rect = rd_target_rect_from_panel_child(parent_rect, panel->parent, panel); scratch_end(scratch); return rect; @@ -837,81 +837,81 @@ df_target_rect_from_panel(Rng2F32 root_rect, DF_Panel *root, DF_Panel *panel) //- rjf: view ownership insertion/removal internal void -df_panel_insert_tab_view(DF_Panel *panel, DF_View *prev_view, DF_View *view) +rd_panel_insert_tab_view(RD_Panel *panel, RD_View *prev_view, RD_View *view) { - DLLInsert_NPZ(&df_nil_view, panel->first_tab_view, panel->last_tab_view, prev_view, view, order_next, order_prev); + DLLInsert_NPZ(&rd_nil_view, panel->first_tab_view, panel->last_tab_view, prev_view, view, order_next, order_prev); panel->tab_view_count += 1; - if(!df_view_is_project_filtered(view)) + if(!rd_view_is_project_filtered(view)) { - panel->selected_tab_view = df_handle_from_view(view); + panel->selected_tab_view = rd_handle_from_view(view); } } internal void -df_panel_remove_tab_view(DF_Panel *panel, DF_View *view) +rd_panel_remove_tab_view(RD_Panel *panel, RD_View *view) { - if(df_view_from_handle(panel->selected_tab_view) == view) + if(rd_view_from_handle(panel->selected_tab_view) == view) { - panel->selected_tab_view = d_handle_zero(); - if(d_handle_match(d_handle_zero(), panel->selected_tab_view)) + panel->selected_tab_view = rd_handle_zero(); + if(rd_handle_match(rd_handle_zero(), panel->selected_tab_view)) { - for(DF_View *v = view->order_next; !df_view_is_nil(v); v = v->order_next) + for(RD_View *v = view->order_next; !rd_view_is_nil(v); v = v->order_next) { - if(!df_view_is_project_filtered(v)) + if(!rd_view_is_project_filtered(v)) { - panel->selected_tab_view = df_handle_from_view(v); + panel->selected_tab_view = rd_handle_from_view(v); break; } } } - if(d_handle_match(d_handle_zero(), panel->selected_tab_view)) + if(rd_handle_match(rd_handle_zero(), panel->selected_tab_view)) { - for(DF_View *v = view->order_prev; !df_view_is_nil(v); v = v->order_prev) + for(RD_View *v = view->order_prev; !rd_view_is_nil(v); v = v->order_prev) { - if(!df_view_is_project_filtered(v)) + if(!rd_view_is_project_filtered(v)) { - panel->selected_tab_view = df_handle_from_view(v); + panel->selected_tab_view = rd_handle_from_view(v); break; } } } } - DLLRemove_NPZ(&df_nil_view, panel->first_tab_view, panel->last_tab_view, view, order_next, order_prev); + DLLRemove_NPZ(&rd_nil_view, panel->first_tab_view, panel->last_tab_view, view, order_next, order_prev); panel->tab_view_count -= 1; } -internal DF_View * -df_selected_tab_from_panel(DF_Panel *panel) +internal RD_View * +rd_selected_tab_from_panel(RD_Panel *panel) { - DF_View *view = df_view_from_handle(panel->selected_tab_view); - if(df_view_is_project_filtered(view)) + RD_View *view = rd_view_from_handle(panel->selected_tab_view); + if(rd_view_is_project_filtered(view)) { - view = &df_nil_view; + view = &rd_nil_view; } return view; } //- rjf: icons & display strings -internal DF_IconKind -df_icon_kind_from_view(DF_View *view) +internal RD_IconKind +rd_icon_kind_from_view(RD_View *view) { - DF_IconKind result = view->spec->info.icon_kind; + RD_IconKind result = view->spec->info.icon_kind; return result; } internal DR_FancyStringList -df_title_fstrs_from_view(Arena *arena, DF_View *view, Vec4F32 primary_color, Vec4F32 secondary_color, F32 size) +rd_title_fstrs_from_view(Arena *arena, RD_View *view, Vec4F32 primary_color, Vec4F32 secondary_color, F32 size) { DR_FancyStringList result = {0}; Temp scratch = scratch_begin(&arena, 1); String8 query = str8(view->query_buffer, view->query_string_size); - String8 file_path = d_file_path_from_eval_string(scratch.arena, query); + String8 file_path = rd_file_path_from_eval_string(scratch.arena, query); if(file_path.size != 0) { DR_FancyString fstr = { - df_font_from_slot(DF_FontSlot_Main), + rd_font_from_slot(RD_FontSlot_Main), push_str8_copy(arena, str8_skip_last_slash(file_path)), primary_color, size, @@ -922,7 +922,7 @@ df_title_fstrs_from_view(Arena *arena, DF_View *view, Vec4F32 primary_color, Vec { DR_FancyString fstr1 = { - df_font_from_slot(DF_FontSlot_Main), + rd_font_from_slot(RD_FontSlot_Main), view->spec->info.display_string, primary_color, size, @@ -932,7 +932,7 @@ df_title_fstrs_from_view(Arena *arena, DF_View *view, Vec4F32 primary_color, Vec { DR_FancyString fstr2 = { - df_font_from_slot(DF_FontSlot_Code), + rd_font_from_slot(RD_FontSlot_Code), str8_lit(" "), primary_color, size, @@ -940,7 +940,7 @@ df_title_fstrs_from_view(Arena *arena, DF_View *view, Vec4F32 primary_color, Vec dr_fancy_string_list_push(arena, &result, &fstr2); DR_FancyString fstr3 = { - df_font_from_slot(DF_FontSlot_Code), + rd_font_from_slot(RD_FontSlot_Code), push_str8_copy(arena, query), secondary_color, size*0.8f, @@ -955,10 +955,10 @@ df_title_fstrs_from_view(Arena *arena, DF_View *view, Vec4F32 primary_color, Vec //////////////////////////////// //~ rjf: Window Type Functions -internal D_Handle -df_handle_from_window(DF_Window *window) +internal RD_Handle +rd_handle_from_window(RD_Window *window) { - D_Handle handle = {0}; + RD_Handle handle = {0}; if(window != 0) { handle.u64[0] = (U64)window; @@ -967,10 +967,10 @@ df_handle_from_window(DF_Window *window) return handle; } -internal DF_Window * -df_window_from_handle(D_Handle handle) +internal RD_Window * +rd_window_from_handle(RD_Handle handle) { - DF_Window *window = (DF_Window *)handle.u64[0]; + RD_Window *window = (RD_Window *)handle.u64[0]; if(window != 0 && window->gen != handle.u64[1]) { window = 0; @@ -982,17 +982,17 @@ df_window_from_handle(D_Handle handle) //~ rjf: Command Parameters From Context internal B32 -df_prefer_dasm_from_window(DF_Window *window) +rd_prefer_dasm_from_window(RD_Window *window) { - DF_Panel *panel = window->focused_panel; - DF_View *view = df_selected_tab_from_panel(panel); - DF_ViewKind view_kind = df_view_kind_from_string(view->spec->info.name); + RD_Panel *panel = window->focused_panel; + RD_View *view = rd_selected_tab_from_panel(panel); + RD_ViewKind view_kind = rd_view_kind_from_string(view->spec->info.name); B32 result = 0; - if(view_kind == DF_ViewKind_Disasm) + if(view_kind == RD_ViewKind_Disasm) { result = 1; } - else if(view_kind == DF_ViewKind_Text) + else if(view_kind == RD_ViewKind_Text) { result = 0; } @@ -1000,15 +1000,15 @@ df_prefer_dasm_from_window(DF_Window *window) { B32 has_src = 0; B32 has_dasm = 0; - for(DF_Panel *p = window->root_panel; !df_panel_is_nil(p); p = df_panel_rec_df_pre(p).next) + for(RD_Panel *p = window->root_panel; !rd_panel_is_nil(p); p = rd_panel_rec_depth_first_pre(p).next) { - DF_View *p_view = df_selected_tab_from_panel(p); - DF_ViewKind p_view_kind = df_view_kind_from_string(p_view->spec->info.name); - if(p_view_kind == DF_ViewKind_Text) + RD_View *p_view = rd_selected_tab_from_panel(p); + RD_ViewKind p_view_kind = rd_view_kind_from_string(p_view->spec->info.name); + if(p_view_kind == RD_ViewKind_Text) { has_src = 1; } - if(p_view_kind == DF_ViewKind_Disasm) + if(p_view_kind == RD_ViewKind_Disasm) { has_dasm = 1; } @@ -1019,116 +1019,70 @@ df_prefer_dasm_from_window(DF_Window *window) return result; } -#if 0 // TODO(rjf): @msgs - -internal D_CmdParams -df_cmd_params_from_window(DF_Window *window) -{ - D_CmdParams p = d_cmd_params_zero(); - p.window = df_handle_from_window(window); - p.panel = df_handle_from_panel(window->focused_panel); - p.view = df_handle_from_view(df_selected_tab_from_panel(window->focused_panel)); - p.prefer_dasm = df_prefer_dasm_from_window(window); - p.entity = df_regs()->thread; - p.unwind_index = df_regs()->unwind_count; - p.inline_depth = df_regs()->inline_depth; - return p; -} - -internal D_CmdParams -df_cmd_params_from_panel(DF_Window *window, DF_Panel *panel) -{ - D_CmdParams p = d_cmd_params_zero(); - p.window = df_handle_from_window(window); - p.panel = df_handle_from_panel(panel); - p.view = df_handle_from_view(df_selected_tab_from_panel(panel)); - p.prefer_dasm = df_prefer_dasm_from_window(window); - p.entity = df_regs()->thread; - p.unwind_index = df_regs()->unwind_count; - p.inline_depth = df_regs()->inline_depth; - return p; -} - -internal D_CmdParams -df_cmd_params_from_view(DF_Window *window, DF_Panel *panel, DF_View *view) -{ - D_CmdParams p = d_cmd_params_zero(); - p.window = df_handle_from_window(window); - p.panel = df_handle_from_panel(panel); - p.view = df_handle_from_view(view); - p.prefer_dasm = df_prefer_dasm_from_window(window); - p.entity = df_regs()->thread; - p.unwind_index = df_regs()->unwind_count; - p.inline_depth = df_regs()->inline_depth; - return p; -} - -#endif - //////////////////////////////// //~ rjf: Global Cross-Window UI Interaction State Functions internal B32 -df_drag_is_active(void) +rd_drag_is_active(void) { - return ((df_state->drag_drop_state == DF_DragDropState_Dragging) || - (df_state->drag_drop_state == DF_DragDropState_Dropping)); + return ((rd_state->drag_drop_state == RD_DragDropState_Dragging) || + (rd_state->drag_drop_state == RD_DragDropState_Dropping)); } internal void -df_drag_begin(DF_DragDropPayload *payload) +rd_drag_begin(RD_DragDropPayload *payload) { - if(!df_drag_is_active()) + if(!rd_drag_is_active()) { - df_state->drag_drop_state = DF_DragDropState_Dragging; - MemoryCopyStruct(&df_drag_drop_payload, payload); + rd_state->drag_drop_state = RD_DragDropState_Dragging; + MemoryCopyStruct(&rd_drag_drop_payload, payload); } } internal B32 -df_drag_drop(DF_DragDropPayload *out_payload) +rd_drag_drop(RD_DragDropPayload *out_payload) { B32 result = 0; - if(df_state->drag_drop_state == DF_DragDropState_Dropping) + if(rd_state->drag_drop_state == RD_DragDropState_Dropping) { result = 1; - df_state->drag_drop_state = DF_DragDropState_Null; - MemoryCopyStruct(out_payload, &df_drag_drop_payload); - MemoryZeroStruct(&df_drag_drop_payload); + rd_state->drag_drop_state = RD_DragDropState_Null; + MemoryCopyStruct(out_payload, &rd_drag_drop_payload); + MemoryZeroStruct(&rd_drag_drop_payload); } return result; } internal void -df_drag_kill(void) +rd_drag_kill(void) { - df_state->drag_drop_state = DF_DragDropState_Null; - MemoryZeroStruct(&df_drag_drop_payload); + rd_state->drag_drop_state = RD_DragDropState_Null; + MemoryZeroStruct(&rd_drag_drop_payload); } internal void -df_queue_drag_drop(void) +rd_queue_drag_drop(void) { - df_state->drag_drop_state = DF_DragDropState_Dropping; + rd_state->drag_drop_state = RD_DragDropState_Dropping; } internal void -df_set_hover_regs(void) +rd_set_hover_regs(void) { - df_state->next_hover_regs = df_regs_copy(df_frame_arena(), df_regs()); + rd_state->next_hover_regs = rd_regs_copy(rd_frame_arena(), rd_regs()); } -internal DF_Regs * -df_get_hover_regs(void) +internal RD_Regs * +rd_get_hover_regs(void) { - return df_state->hover_regs; + return rd_state->hover_regs; } //////////////////////////////// //~ rjf: Name Allocation internal U64 -df_name_bucket_idx_from_string_size(U64 size) +rd_name_bucket_idx_from_string_size(U64 size) { U64 size_rounded = u64_up_to_pow2(size+1); size_rounded = ClampBot((1<<4), size_rounded); @@ -1142,16 +1096,16 @@ df_name_bucket_idx_from_string_size(U64 size) case 1<<8: {bucket_idx = 4;}break; case 1<<9: {bucket_idx = 5;}break; case 1<<10:{bucket_idx = 6;}break; - default:{bucket_idx = ArrayCount(df_state->free_name_chunks)-1;}break; + default:{bucket_idx = ArrayCount(rd_state->free_name_chunks)-1;}break; } return bucket_idx; } internal String8 -df_name_alloc(String8 string) +rd_name_alloc(String8 string) { if(string.size == 0) {return str8_zero();} - U64 bucket_idx = df_name_bucket_idx_from_string_size(string.size); + U64 bucket_idx = rd_name_bucket_idx_from_string_size(string.size); // rjf: loop -> find node, allocate if not there // @@ -1164,16 +1118,16 @@ df_name_alloc(String8 string) D_NameChunkNode *node = 0; for(;node == 0;) { - node = df_state->free_name_chunks[bucket_idx]; + node = rd_state->free_name_chunks[bucket_idx]; // rjf: pull from bucket free list if(node != 0) { - if(bucket_idx == ArrayCount(df_state->free_name_chunks)-1) + if(bucket_idx == ArrayCount(rd_state->free_name_chunks)-1) { node = 0; D_NameChunkNode *prev = 0; - for(D_NameChunkNode *n = df_state->free_name_chunks[bucket_idx]; + for(D_NameChunkNode *n = rd_state->free_name_chunks[bucket_idx]; n != 0; prev = n, n = n->next) { @@ -1181,7 +1135,7 @@ df_name_alloc(String8 string) { if(prev == 0) { - df_state->free_name_chunks[bucket_idx] = n->next; + rd_state->free_name_chunks[bucket_idx] = n->next; } else { @@ -1194,7 +1148,7 @@ df_name_alloc(String8 string) } else { - SLLStackPop(df_state->free_name_chunks[bucket_idx]); + SLLStackPop(rd_state->free_name_chunks[bucket_idx]); } } @@ -1202,7 +1156,7 @@ df_name_alloc(String8 string) if(node == 0) { U64 chunk_size = 0; - if(bucket_idx < ArrayCount(df_state->free_name_chunks)-1) + if(bucket_idx < ArrayCount(rd_state->free_name_chunks)-1) { chunk_size = 1<<(bucket_idx+4); } @@ -1210,9 +1164,9 @@ df_name_alloc(String8 string) { chunk_size = u64_up_to_pow2(string.size); } - U8 *chunk_memory = push_array(df_state->arena, U8, chunk_size); + U8 *chunk_memory = push_array(rd_state->arena, U8, chunk_size); D_NameChunkNode *chunk = (D_NameChunkNode *)chunk_memory; - SLLStackPush(df_state->free_name_chunks[bucket_idx], chunk); + SLLStackPush(rd_state->free_name_chunks[bucket_idx], chunk); } } @@ -1223,13 +1177,13 @@ df_name_alloc(String8 string) } internal void -df_name_release(String8 string) +rd_name_release(String8 string) { if(string.size == 0) {return;} - U64 bucket_idx = df_name_bucket_idx_from_string_size(string.size); + U64 bucket_idx = rd_name_bucket_idx_from_string_size(string.size); D_NameChunkNode *node = (D_NameChunkNode *)string.str; node->size = u64_up_to_pow2(string.size); - SLLStackPush(df_state->free_name_chunks[bucket_idx], node); + SLLStackPush(rd_state->free_name_chunks[bucket_idx], node); } //////////////////////////////// @@ -1237,27 +1191,27 @@ df_name_release(String8 string) //- rjf: entity allocation + tree forming -internal DF_Entity * -df_entity_alloc(DF_Entity *parent, DF_EntityKind kind) +internal RD_Entity * +rd_entity_alloc(RD_Entity *parent, RD_EntityKind kind) { - B32 user_defined_lifetime = !!(d_entity_kind_flags_table[kind] & DF_EntityKindFlag_UserDefinedLifetime); + B32 user_defined_lifetime = !!(rd_entity_kind_flags_table[kind] & RD_EntityKindFlag_UserDefinedLifetime); U64 free_list_idx = !!user_defined_lifetime; - if(df_entity_is_nil(parent)) { parent = df_state->entities_root; } + if(rd_entity_is_nil(parent)) { parent = rd_state->entities_root; } // rjf: empty free list -> push new - if(!df_state->entities_free[free_list_idx]) + if(!rd_state->entities_free[free_list_idx]) { - DF_Entity *entity = push_array(df_state->entities_arena, DF_Entity, 1); - df_state->entities_count += 1; - df_state->entities_free_count += 1; - SLLStackPush(df_state->entities_free[free_list_idx], entity); + RD_Entity *entity = push_array(rd_state->entities_arena, RD_Entity, 1); + rd_state->entities_count += 1; + rd_state->entities_free_count += 1; + SLLStackPush(rd_state->entities_free[free_list_idx], entity); } // rjf: pop new entity off free-list - DF_Entity *entity = df_state->entities_free[free_list_idx]; - SLLStackPop(df_state->entities_free[free_list_idx]); - df_state->entities_free_count -= 1; - df_state->entities_active_count += 1; + RD_Entity *entity = rd_state->entities_free[free_list_idx]; + SLLStackPop(rd_state->entities_free[free_list_idx]); + rd_state->entities_free_count -= 1; + rd_state->entities_active_count += 1; // rjf: zero entity { @@ -1271,9 +1225,9 @@ df_entity_alloc(DF_Entity *parent, DF_EntityKind kind) entity->parent = parent; // rjf: stitch up parent links - if(df_entity_is_nil(parent)) + if(rd_entity_is_nil(parent)) { - df_state->entities_root = entity; + rd_state->entities_root = entity; } else { @@ -1282,8 +1236,8 @@ df_entity_alloc(DF_Entity *parent, DF_EntityKind kind) // rjf: fill out metadata entity->kind = kind; - df_state->entities_id_gen += 1; - entity->id = df_state->entities_id_gen; + rd_state->entities_id_gen += 1; + entity->id = rd_state->entities_id_gen; entity->gen += 1; entity->alloc_time_us = os_now_microseconds(); entity->params_root = &md_nil_node; @@ -1295,7 +1249,7 @@ df_entity_alloc(DF_Entity *parent, DF_EntityKind kind) } // rjf: dirtify caches - df_state->kind_alloc_gens[kind] += 1; + rd_state->kind_alloc_gens[kind] += 1; // rjf: log LogInfoNamedBlockF("new_entity") @@ -1308,35 +1262,35 @@ df_entity_alloc(DF_Entity *parent, DF_EntityKind kind) } internal void -df_entity_mark_for_deletion(DF_Entity *entity) +rd_entity_mark_for_deletion(RD_Entity *entity) { - if(!df_entity_is_nil(entity)) + if(!rd_entity_is_nil(entity)) { - entity->flags |= DF_EntityFlag_MarkedForDeletion; + entity->flags |= RD_EntityFlag_MarkedForDeletion; } } internal void -df_entity_release(DF_Entity *entity) +rd_entity_release(RD_Entity *entity) { Temp scratch = scratch_begin(0, 0); // rjf: unpack - U64 free_list_idx = !!(d_entity_kind_flags_table[entity->kind] & DF_EntityKindFlag_UserDefinedLifetime); + U64 free_list_idx = !!(rd_entity_kind_flags_table[entity->kind] & RD_EntityKindFlag_UserDefinedLifetime); // rjf: release whole tree typedef struct Task Task; struct Task { Task *next; - DF_Entity *e; + RD_Entity *e; }; Task start_task = {0, entity}; Task *first_task = &start_task; Task *last_task = &start_task; for(Task *task = first_task; task != 0; task = task->next) { - for(DF_Entity *child = task->e->first; !df_entity_is_nil(child); child = child->next) + for(RD_Entity *child = task->e->first; !rd_entity_is_nil(child); child = child->next) { Task *t = push_array(scratch.arena, Task, 1); t->e = child; @@ -1344,178 +1298,178 @@ df_entity_release(DF_Entity *entity) } LogInfoNamedBlockF("end_entity") { - String8 name = df_display_string_from_entity(scratch.arena, task->e); + String8 name = rd_display_string_from_entity(scratch.arena, task->e); log_infof("kind: \"%S\"\n", d_entity_kind_display_string_table[task->e->kind]); log_infof("id: $0x%I64x\n", task->e->id); log_infof("display_string: \"%S\"\n", name); } - SLLStackPush(df_state->entities_free[free_list_idx], task->e); - df_state->entities_free_count += 1; - df_state->entities_active_count -= 1; + SLLStackPush(rd_state->entities_free[free_list_idx], task->e); + rd_state->entities_free_count += 1; + rd_state->entities_active_count -= 1; task->e->gen += 1; if(task->e->string.size != 0) { - df_name_release(task->e->string); + rd_name_release(task->e->string); } if(task->e->params_arena != 0) { arena_release(task->e->params_arena); } - df_state->kind_alloc_gens[task->e->kind] += 1; + rd_state->kind_alloc_gens[task->e->kind] += 1; } scratch_end(scratch); } internal void -df_entity_change_parent(DF_Entity *entity, DF_Entity *old_parent, DF_Entity *new_parent, DF_Entity *prev_child) +rd_entity_change_parent(RD_Entity *entity, RD_Entity *old_parent, RD_Entity *new_parent, RD_Entity *prev_child) { Assert(entity->parent == old_parent); - Assert(prev_child->parent == old_parent || df_entity_is_nil(prev_child)); + Assert(prev_child->parent == old_parent || rd_entity_is_nil(prev_child)); // rjf: fix up links - if(!df_entity_is_nil(old_parent)) + if(!rd_entity_is_nil(old_parent)) { DLLRemove_NPZ(&d_nil_entity, old_parent->first, old_parent->last, entity, next, prev); } - if(!df_entity_is_nil(new_parent)) + if(!rd_entity_is_nil(new_parent)) { DLLInsert_NPZ(&d_nil_entity, new_parent->first, new_parent->last, prev_child, entity, next, prev); } entity->parent = new_parent; // rjf: notify - df_state->kind_alloc_gens[entity->kind] += 1; + rd_state->kind_alloc_gens[entity->kind] += 1; } //- rjf: entity simple equipment internal void -df_entity_equip_txt_pt(DF_Entity *entity, TxtPt point) +rd_entity_equip_txt_pt(RD_Entity *entity, TxtPt point) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->text_point = point; - entity->flags |= DF_EntityFlag_HasTextPoint; + entity->flags |= RD_EntityFlag_HasTextPoint; } internal void -df_entity_equip_entity_handle(DF_Entity *entity, D_Handle handle) +rd_entity_equip_entity_handle(RD_Entity *entity, RD_Handle handle) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->entity_handle = handle; - entity->flags |= DF_EntityFlag_HasEntityHandle; + entity->flags |= RD_EntityFlag_HasEntityHandle; } internal void -df_entity_equip_disabled(DF_Entity *entity, B32 value) +rd_entity_equip_disabled(RD_Entity *entity, B32 value) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->disabled = value; } internal void -df_entity_equip_u64(DF_Entity *entity, U64 u64) +rd_entity_equip_u64(RD_Entity *entity, U64 u64) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->u64 = u64; - entity->flags |= DF_EntityFlag_HasU64; + entity->flags |= RD_EntityFlag_HasU64; } internal void -df_entity_equip_color_rgba(DF_Entity *entity, Vec4F32 rgba) +rd_entity_equip_color_rgba(RD_Entity *entity, Vec4F32 rgba) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); Vec3F32 rgb = v3f32(rgba.x, rgba.y, rgba.z); Vec3F32 hsv = hsv_from_rgb(rgb); Vec4F32 hsva = v4f32(hsv.x, hsv.y, hsv.z, rgba.w); - df_entity_equip_color_hsva(entity, hsva); + rd_entity_equip_color_hsva(entity, hsva); } internal void -df_entity_equip_color_hsva(DF_Entity *entity, Vec4F32 hsva) +rd_entity_equip_color_hsva(RD_Entity *entity, Vec4F32 hsva) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->color_hsva = hsva; - entity->flags |= DF_EntityFlag_HasColor; + entity->flags |= RD_EntityFlag_HasColor; } internal void -df_entity_equip_cfg_src(DF_Entity *entity, DF_CfgSrc cfg_src) +rd_entity_equip_cfg_src(RD_Entity *entity, RD_CfgSrc cfg_src) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->cfg_src = cfg_src; } internal void -df_entity_equip_timestamp(DF_Entity *entity, U64 timestamp) +rd_entity_equip_timestamp(RD_Entity *entity, U64 timestamp) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->timestamp = timestamp; } //- rjf: control layer correllation equipment internal void -df_entity_equip_ctrl_handle(DF_Entity *entity, CTRL_Handle handle) +rd_entity_equip_ctrl_handle(RD_Entity *entity, CTRL_Handle handle) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->ctrl_handle = handle; - entity->flags |= DF_EntityFlag_HasCtrlHandle; + entity->flags |= RD_EntityFlag_HasCtrlHandle; } internal void -df_entity_equip_arch(DF_Entity *entity, Arch arch) +rd_entity_equip_arch(RD_Entity *entity, Arch arch) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->arch = arch; - entity->flags |= DF_EntityFlag_HasArch; + entity->flags |= RD_EntityFlag_HasArch; } internal void -df_entity_equip_ctrl_id(DF_Entity *entity, U32 id) +rd_entity_equip_ctrl_id(RD_Entity *entity, U32 id) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->ctrl_id = id; - entity->flags |= DF_EntityFlag_HasCtrlID; + entity->flags |= RD_EntityFlag_HasCtrlID; } internal void -df_entity_equip_stack_base(DF_Entity *entity, U64 stack_base) +rd_entity_equip_stack_base(RD_Entity *entity, U64 stack_base) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->stack_base = stack_base; - entity->flags |= DF_EntityFlag_HasStackBase; + entity->flags |= RD_EntityFlag_HasStackBase; } internal void -df_entity_equip_vaddr_rng(DF_Entity *entity, Rng1U64 range) +rd_entity_equip_vaddr_rng(RD_Entity *entity, Rng1U64 range) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->vaddr_rng = range; - entity->flags |= DF_EntityFlag_HasVAddrRng; + entity->flags |= RD_EntityFlag_HasVAddrRng; } internal void -df_entity_equip_vaddr(DF_Entity *entity, U64 vaddr) +rd_entity_equip_vaddr(RD_Entity *entity, U64 vaddr) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); entity->vaddr = vaddr; - entity->flags |= DF_EntityFlag_HasVAddr; + entity->flags |= RD_EntityFlag_HasVAddr; } //- rjf: name equipment internal void -df_entity_equip_name(DF_Entity *entity, String8 name) +rd_entity_equip_name(RD_Entity *entity, String8 name) { - df_require_entity_nonnil(entity, return); + rd_require_entity_nonnil(entity, return); if(entity->string.size != 0) { - df_name_release(entity->string); + rd_name_release(entity->string); } if(name.size != 0) { - entity->string = df_name_alloc(name); + entity->string = rd_name_alloc(name); } else { @@ -1526,7 +1480,7 @@ df_entity_equip_name(DF_Entity *entity, String8 name) //- rjf: file path map override lookups internal String8List -d_possible_overrides_from_file_path(Arena *arena, String8 file_path) +rd_possible_overrides_from_file_path(Arena *arena, String8 file_path) { // NOTE(rjf): This path, given some target file path, scans all file path map // overrides, and collects the set of file paths which could've redirected @@ -1546,13 +1500,13 @@ d_possible_overrides_from_file_path(Arena *arena, String8 file_path) PathStyle pth_style = PathStyle_Relative; String8List pth_parts = path_normalized_list_from_string(scratch.arena, file_path, &pth_style); { - DF_EntityList links = d_query_cached_entity_list_with_kind(DF_EntityKind_FilePathMap); - for(DF_EntityNode *n = links.first; n != 0; n = n->next) + RD_EntityList links = d_query_cached_entity_list_with_kind(RD_EntityKind_FilePathMap); + for(RD_EntityNode *n = links.first; n != 0; n = n->next) { //- rjf: unpack link - DF_Entity *link = n->entity; - DF_Entity *src = df_entity_child_from_kind(link, DF_EntityKind_Source); - DF_Entity *dst = df_entity_child_from_kind(link, DF_EntityKind_Dest); + RD_Entity *link = n->entity; + RD_Entity *src = rd_entity_child_from_kind(link, RD_EntityKind_Source); + RD_Entity *dst = rd_entity_child_from_kind(link, RD_EntityKind_Dest); PathStyle src_style = PathStyle_Relative; PathStyle dst_style = PathStyle_Relative; String8List src_parts = path_normalized_list_from_string(scratch.arena, src->string, &src_style); @@ -1600,37 +1554,37 @@ d_possible_overrides_from_file_path(Arena *arena, String8 file_path) //- rjf: top-level state queries -internal DF_Entity * -df_entity_root(void) +internal RD_Entity * +rd_entity_root(void) { - return df_state->entities_root; + return rd_state->entities_root; } -internal DF_EntityList -df_push_entity_list_with_kind(Arena *arena, DF_EntityKind kind) +internal RD_EntityList +rd_push_entity_list_with_kind(Arena *arena, RD_EntityKind kind) { ProfBeginFunction(); - DF_EntityList result = {0}; - for(DF_Entity *entity = df_state->entities_root; - !df_entity_is_nil(entity); - entity = df_entity_rec_depth_first_pre(entity, &d_nil_entity).next) + RD_EntityList result = {0}; + for(RD_Entity *entity = rd_state->entities_root; + !rd_entity_is_nil(entity); + entity = rd_entity_rec_depth_first_pre(entity, &d_nil_entity).next) { if(entity->kind == kind) { - df_entity_list_push(arena, &result, entity); + rd_entity_list_push(arena, &result, entity); } } ProfEnd(); return result; } -internal DF_Entity * -df_entity_from_id(DF_EntityID id) +internal RD_Entity * +rd_entity_from_id(RD_EntityID id) { - DF_Entity *result = &d_nil_entity; - for(DF_Entity *e = df_entity_root(); - !df_entity_is_nil(e); - e = df_entity_rec_depth_first_pre(e, &d_nil_entity).next) + RD_Entity *result = &d_nil_entity; + for(RD_Entity *e = rd_entity_root(); + !rd_entity_is_nil(e); + e = rd_entity_rec_depth_first_pre(e, &d_nil_entity).next) { if(e->id == id) { @@ -1641,39 +1595,39 @@ df_entity_from_id(DF_EntityID id) return result; } -internal DF_Entity * -df_machine_entity_from_machine_id(CTRL_MachineID machine_id) +internal RD_Entity * +rd_machine_entity_from_machine_id(CTRL_MachineID machine_id) { - DF_Entity *result = &d_nil_entity; - for(DF_Entity *e = df_entity_root(); - !df_entity_is_nil(e); - e = df_entity_rec_depth_first_pre(e, &d_nil_entity).next) + RD_Entity *result = &d_nil_entity; + for(RD_Entity *e = rd_entity_root(); + !rd_entity_is_nil(e); + e = rd_entity_rec_depth_first_pre(e, &d_nil_entity).next) { - if(e->kind == DF_EntityKind_Machine && e->ctrl_handle.machine_id == machine_id) + if(e->kind == RD_EntityKind_Machine && e->ctrl_handle.machine_id == machine_id) { result = e; break; } } - if(df_entity_is_nil(result)) + if(rd_entity_is_nil(result)) { - result = df_entity_alloc(df_entity_root(), DF_EntityKind_Machine); - df_entity_equip_ctrl_handle(result, ctrl_handle_make(machine_id, dmn_handle_zero())); + result = rd_entity_alloc(rd_entity_root(), RD_EntityKind_Machine); + rd_entity_equip_ctrl_handle(result, ctrl_handle_make(machine_id, dmn_handle_zero())); } return result; } -internal DF_Entity * -df_entity_from_ctrl_handle(CTRL_Handle handle) +internal RD_Entity * +rd_entity_from_ctrl_handle(CTRL_Handle handle) { - DF_Entity *result = &d_nil_entity; + RD_Entity *result = &d_nil_entity; if(handle.machine_id != 0 || handle.dmn_handle.u64[0] != 0) { - for(DF_Entity *e = df_entity_root(); - !df_entity_is_nil(e); - e = df_entity_rec_depth_first_pre(e, &d_nil_entity).next) + for(RD_Entity *e = rd_entity_root(); + !rd_entity_is_nil(e); + e = rd_entity_rec_depth_first_pre(e, &d_nil_entity).next) { - if(e->flags & DF_EntityFlag_HasCtrlHandle && + if(e->flags & RD_EntityFlag_HasCtrlHandle && ctrl_handle_match(e->ctrl_handle, handle)) { result = e; @@ -1684,18 +1638,18 @@ df_entity_from_ctrl_handle(CTRL_Handle handle) return result; } -internal DF_Entity * -df_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id) +internal RD_Entity * +rd_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id) { - DF_Entity *result = &d_nil_entity; + RD_Entity *result = &d_nil_entity; if(id != 0) { - for(DF_Entity *e = df_entity_root(); - !df_entity_is_nil(e); - e = df_entity_rec_depth_first_pre(e, &d_nil_entity).next) + for(RD_Entity *e = rd_entity_root(); + !rd_entity_is_nil(e); + e = rd_entity_rec_depth_first_pre(e, &d_nil_entity).next) { - if(e->flags & DF_EntityFlag_HasCtrlHandle && - e->flags & DF_EntityFlag_HasCtrlID && + if(e->flags & RD_EntityFlag_HasCtrlHandle && + e->flags & RD_EntityFlag_HasCtrlID && e->ctrl_handle.machine_id == machine_id && e->ctrl_id == id) { @@ -1707,12 +1661,12 @@ df_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id) return result; } -internal DF_Entity * -df_entity_from_name_and_kind(String8 string, DF_EntityKind kind) +internal RD_Entity * +rd_entity_from_name_and_kind(String8 string, RD_EntityKind kind) { - DF_Entity *result = &d_nil_entity; - DF_EntityList all_of_this_kind = d_query_cached_entity_list_with_kind(kind); - for(DF_EntityNode *n = all_of_this_kind.first; n != 0; n = n->next) + RD_Entity *result = &d_nil_entity; + RD_EntityList all_of_this_kind = d_query_cached_entity_list_with_kind(kind); + for(RD_EntityNode *n = all_of_this_kind.first; n != 0; n = n->next) { if(str8_match(n->entity->string, string, 0)) { @@ -1729,7 +1683,7 @@ df_entity_from_name_and_kind(String8 string, DF_EntityKind kind) //- rjf: ctrl entity <-> eval space internal CTRL_Entity * -d_ctrl_entity_from_eval_space(E_Space space) +rd_ctrl_entity_from_eval_space(E_Space space) { CTRL_Entity *entity = &ctrl_entity_nil; // TODO(rjf): @msgs @@ -1737,7 +1691,7 @@ d_ctrl_entity_from_eval_space(E_Space space) } internal E_Space -d_eval_space_from_ctrl_entity(CTRL_Entity *entity) +rd_eval_space_from_ctrl_entity(CTRL_Entity *entity) { E_Space space = {0}; // TODO(rjf): @msgs @@ -1746,19 +1700,19 @@ d_eval_space_from_ctrl_entity(CTRL_Entity *entity) //- rjf: entity <-> eval space -internal DF_Entity * -d_entity_from_eval_space(E_Space space) +internal RD_Entity * +rd_entity_from_eval_space(E_Space space) { - DF_Entity *entity = &d_nil_entity; + RD_Entity *entity = &d_nil_entity; if(space.u64_0 != 0) { - entity = (DF_Entity *)space.u64_0; + entity = (RD_Entity *)space.u64_0; } return entity; } internal E_Space -d_eval_space_from_entity(DF_Entity *entity) +rd_eval_space_from_entity(RD_Entity *entity) { E_Space space = {0}; space.u64_0 = (U64)entity; @@ -1768,7 +1722,7 @@ d_eval_space_from_entity(DF_Entity *entity) //- rjf: eval space reads/writes internal B32 -d_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) +rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) { B32 result = 0; switch(space.kind) @@ -1777,22 +1731,22 @@ d_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) { }break; - case DF_EvalSpaceKind_CtrlEntity: + case RD_EvalSpaceKind_CtrlEntity: { }break; - case DF_EvalSpaceKind_CfgEntity: + case RD_EvalSpaceKind_CfgEntity: { }break; } #if 0 // TODO(rjf): @msgs - DF_Entity *entity = d_entity_from_eval_space(space); + RD_Entity *entity = rd_entity_from_eval_space(space); switch(entity->kind) { //- rjf: nil-space -> fall back to file system - case DF_EntityKind_Nil: + case RD_EntityKind_Nil: { U128 key = space.u128; U128 hash = hs_hash_from_key(key, 0); @@ -1816,7 +1770,7 @@ d_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) Temp scratch = scratch_begin(0, 0); arena_push(scratch.arena, 0, 64); U64 pos_min = arena_pos(scratch.arena); - DF_EntityEval *eval = df_eval_from_entity(scratch.arena, entity); + RD_EntityEval *eval = rd_eval_from_entity(scratch.arena, entity); U64 pos_opl = arena_pos(scratch.arena); Rng1U64 legal_range = r1u64(0, pos_opl-pos_min); if(contains_1u64(legal_range, range.min)) @@ -1834,7 +1788,7 @@ d_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) }break; //- rjf: process -> reading process memory - case DF_EntityKind_Process: + case RD_EntityKind_Process: { Temp scratch = scratch_begin(0, 0); CTRL_ProcessMemorySlice slice = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, entity->ctrl_handle, range, d_state->frame_eval_memread_endt_us); @@ -1848,7 +1802,7 @@ d_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) }break; //- rjf: thread -> reading from thread register block - case DF_EntityKind_Thread: + case RD_EntityKind_Thread: { Temp scratch = scratch_begin(0, 0); CTRL_Unwind unwind = d_query_cached_unwind_from_thread(entity); @@ -1871,56 +1825,56 @@ d_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range) } internal B32 -d_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range) +rd_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range) { B32 result = 0; #if 0 // TODO(rjf): @msgs - DF_Entity *entity = d_entity_from_eval_space(space); + RD_Entity *entity = rd_entity_from_eval_space(space); switch(entity->kind) { //- rjf: default -> making commits to entity evaluation default: { Temp scratch = scratch_begin(0, 0); - DF_EntityEval *eval = df_eval_from_entity(scratch.arena, entity); + RD_EntityEval *eval = rd_eval_from_entity(scratch.arena, entity); U64 range_dim = dim_1u64(range); - if(range.min == OffsetOf(DF_EntityEval, enabled) && + if(range.min == OffsetOf(RD_EntityEval, enabled) && range_dim >= 1) { result = 1; B32 new_enabled = !!((U8 *)in)[0]; - df_entity_equip_disabled(entity, !new_enabled); + rd_entity_equip_disabled(entity, !new_enabled); } else if(range.min == eval->label_off && range_dim >= 1) { result = 1; String8 new_name = str8_cstring_capped((U8 *)in, (U8 *)in+range_dim); - df_entity_equip_name(entity, new_name); + rd_entity_equip_name(entity, new_name); } else if(range.min == eval->condition_off && range_dim >= 1) { result = 1; - DF_Entity *condition = df_entity_child_from_kind(entity, DF_EntityKind_Condition); - if(df_entity_is_nil(condition)) + RD_Entity *condition = rd_entity_child_from_kind(entity, RD_EntityKind_Condition); + if(rd_entity_is_nil(condition)) { - condition = df_entity_alloc(entity, DF_EntityKind_Condition); + condition = rd_entity_alloc(entity, RD_EntityKind_Condition); } String8 new_name = str8_cstring_capped((U8 *)in, (U8 *)in+range_dim); - df_entity_equip_name(condition, new_name); + rd_entity_equip_name(condition, new_name); } scratch_end(scratch); }break; //- rjf: process -> commit to process memory - case DF_EntityKind_Process: + case RD_EntityKind_Process: { result = ctrl_process_write(entity->ctrl_handle, range, in); }break; //- rjf: thread -> commit to thread's register block - case DF_EntityKind_Thread: + case RD_EntityKind_Thread: { CTRL_Unwind unwind = d_query_cached_unwind_from_thread(entity); U64 frame_idx = 0; @@ -1947,23 +1901,23 @@ d_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range) //- rjf: asynchronous streamed reads -> hashes from spaces internal U128 -d_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated) +rd_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated) { U128 result = {0}; #if 0 // TODO(rjf): @msgs - DF_Entity *entity = d_entity_from_eval_space(space); + RD_Entity *entity = rd_entity_from_eval_space(space); switch(entity->kind) { default:{}break; //- rjf: nil space -> filesystem key encoded inside of `space` - case DF_EntityKind_Nil: + case RD_EntityKind_Nil: { result = space.u128; }break; //- rjf: process space -> query - case DF_EntityKind_Process: + case RD_EntityKind_Process: { result = ctrl_hash_store_key_from_process_vaddr_range(entity->ctrl_handle, range, zero_terminated); }break; @@ -1975,18 +1929,18 @@ d_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated) //- rjf: space -> entire range internal Rng1U64 -d_whole_range_from_eval_space(E_Space space) +rd_whole_range_from_eval_space(E_Space space) { // TODO(rjf): @msgs Rng1U64 result = r1u64(0, 0); #if 0 - DF_Entity *entity = d_entity_from_eval_space(space); + RD_Entity *entity = rd_entity_from_eval_space(space); switch(entity->kind) { default:{}break; //- rjf: nil space -> filesystem key encoded inside of `space` - case DF_EntityKind_Nil: + case RD_EntityKind_Nil: { HS_Scope *scope = hs_scope_open(); U128 hash = {0}; @@ -2002,7 +1956,7 @@ d_whole_range_from_eval_space(E_Space space) result = r1u64(0, data.size); hs_scope_close(scope); }break; - case DF_EntityKind_Process: + case RD_EntityKind_Process: { result = r1u64(0, 0x7FFFFFFFFFFFull); }break; @@ -2017,7 +1971,7 @@ d_whole_range_from_eval_space(E_Space space) //- rjf: writing values back to child processes internal B32 -d_commit_eval_value_string(E_Eval dst_eval, String8 string) +rd_commit_eval_value_string(E_Eval dst_eval, String8 string) { B32 result = 0; if(dst_eval.mode == E_Mode_Offset) @@ -2086,7 +2040,7 @@ d_commit_eval_value_string(E_Eval dst_eval, String8 string) //- rjf: view rule config tree info extraction internal U64 -d_base_offset_from_eval(E_Eval eval) +rd_base_offset_from_eval(E_Eval eval) { if(e_type_kind_is_pointer_or_ref(e_type_kind_from_key(eval.type_key))) { @@ -2096,7 +2050,7 @@ d_base_offset_from_eval(E_Eval eval) } internal E_Value -d_value_from_params_key(MD_Node *params, String8 key) +rd_value_from_params_key(MD_Node *params, String8 key) { Temp scratch = scratch_begin(0, 0); MD_Node *key_node = md_child_from_string(params, key, 0); @@ -2108,10 +2062,10 @@ d_value_from_params_key(MD_Node *params, String8 key) } internal Rng1U64 -d_range_from_eval_params(E_Eval eval, MD_Node *params) +rd_range_from_eval_params(E_Eval eval, MD_Node *params) { Temp scratch = scratch_begin(0, 0); - U64 size = d_value_from_params_key(params, str8_lit("size")).u64; + U64 size = rd_value_from_params_key(params, str8_lit("size")).u64; E_TypeKey type_key = e_type_unwrap(eval.type_key); E_TypeKind type_kind = e_type_kind_from_key(type_key); E_TypeKey direct_type_key = e_type_unwrap(e_type_direct_from_key(eval.type_key)); @@ -2135,14 +2089,14 @@ d_range_from_eval_params(E_Eval eval, MD_Node *params) size = 16384; } Rng1U64 result = {0}; - result.min = d_base_offset_from_eval(eval); + result.min = rd_base_offset_from_eval(eval); result.max = result.min + size; scratch_end(scratch); return result; } internal TXT_LangKind -d_lang_kind_from_eval_params(E_Eval eval, MD_Node *params) +rd_lang_kind_from_eval_params(E_Eval eval, MD_Node *params) { TXT_LangKind lang_kind = TXT_LangKind_Null; if(eval.expr->kind == E_ExprKind_LeafFilePath) @@ -2159,7 +2113,7 @@ d_lang_kind_from_eval_params(E_Eval eval, MD_Node *params) } internal Arch -d_arch_from_eval_params(E_Eval eval, MD_Node *params) +rd_arch_from_eval_params(E_Eval eval, MD_Node *params) { Arch arch = Arch_Null; MD_Node *arch_node = md_child_from_string(params, str8_lit("arch"), 0); @@ -2172,18 +2126,18 @@ d_arch_from_eval_params(E_Eval eval, MD_Node *params) } internal Vec2S32 -d_dim2s32_from_eval_params(E_Eval eval, MD_Node *params) +rd_dim2s32_from_eval_params(E_Eval eval, MD_Node *params) { Vec2S32 dim = v2s32(1, 1); { - dim.x = d_value_from_params_key(params, str8_lit("w")).s32; - dim.y = d_value_from_params_key(params, str8_lit("h")).s32; + dim.x = rd_value_from_params_key(params, str8_lit("w")).s32; + dim.y = rd_value_from_params_key(params, str8_lit("h")).s32; } return dim; } internal R_Tex2DFormat -d_tex2dformat_from_eval_params(E_Eval eval, MD_Node *params) +rd_tex2dformat_from_eval_params(E_Eval eval, MD_Node *params) { R_Tex2DFormat result = R_Tex2DFormat_RGBA8; { @@ -2202,21 +2156,21 @@ d_tex2dformat_from_eval_params(E_Eval eval, MD_Node *params) //- rjf: eval -> entity -internal DF_Entity * -d_entity_from_eval_string(String8 string) +internal RD_Entity * +rd_entity_from_eval_string(String8 string) { - DF_Entity *entity = &d_nil_entity; + RD_Entity *entity = &d_nil_entity; { Temp scratch = scratch_begin(0, 0); E_Eval eval = e_eval_from_string(scratch.arena, string); - entity = d_entity_from_eval_space(eval.space); + entity = rd_entity_from_eval_space(eval.space); scratch_end(scratch); } return entity; } internal String8 -d_eval_string_from_entity(Arena *arena, DF_Entity *entity) +rd_eval_string_from_entity(Arena *arena, RD_Entity *entity) { String8 eval_string = push_str8f(arena, "macro:`$%I64u`", entity->id); return eval_string; @@ -2225,7 +2179,7 @@ d_eval_string_from_entity(Arena *arena, DF_Entity *entity) //- rjf: eval <-> file path internal String8 -d_file_path_from_eval_string(Arena *arena, String8 string) +rd_file_path_from_eval_string(Arena *arena, String8 string) { String8 result = {0}; { @@ -2241,7 +2195,7 @@ d_file_path_from_eval_string(Arena *arena, String8 string) } internal String8 -d_eval_string_from_file_path(Arena *arena, String8 string) +rd_eval_string_from_file_path(Arena *arena, String8 string) { Temp scratch = scratch_begin(&arena, 1); String8 string_escaped = escaped_from_raw_str8(scratch.arena, string); @@ -2253,10 +2207,10 @@ d_eval_string_from_file_path(Arena *arena, String8 string) //////////////////////////////// //~ rjf: View Rule Kind Functions -internal DF_ViewRuleInfo * -df_view_rule_info_from_string(String8 string) +internal RD_ViewRuleInfo * +rd_view_rule_info_from_string(String8 string) { - DF_ViewRuleInfo *info = &df_nil_view_rule_info; + RD_ViewRuleInfo *info = &rd_nil_view_rule_info; { // TODO(rjf) } @@ -2267,28 +2221,28 @@ df_view_rule_info_from_string(String8 string) //~ rjf: View Spec State Functions internal void -df_register_view_specs(DF_ViewSpecInfoArray specs) +rd_register_view_specs(RD_ViewSpecInfoArray specs) { for(U64 idx = 0; idx < specs.count; idx += 1) { - DF_ViewSpecInfo *src_info = &specs.v[idx]; + RD_ViewSpecInfo *src_info = &specs.v[idx]; U64 hash = d_hash_from_string(src_info->name); - U64 slot_idx = hash%df_state->view_spec_table_size; - DF_ViewSpec *spec = push_array(df_state->arena, DF_ViewSpec, 1); - SLLStackPush_N(df_state->view_spec_table[slot_idx], spec, hash_next); + U64 slot_idx = hash%rd_state->view_spec_table_size; + RD_ViewSpec *spec = push_array(rd_state->arena, RD_ViewSpec, 1); + SLLStackPush_N(rd_state->view_spec_table[slot_idx], spec, hash_next); MemoryCopyStruct(&spec->info, src_info); - spec->info.name = push_str8_copy(df_state->arena, spec->info.name); - spec->info.display_string = push_str8_copy(df_state->arena, spec->info.display_string); + spec->info.name = push_str8_copy(rd_state->arena, spec->info.name); + spec->info.display_string = push_str8_copy(rd_state->arena, spec->info.display_string); } } -internal DF_ViewSpec * -df_view_spec_from_string(String8 string) +internal RD_ViewSpec * +rd_view_spec_from_string(String8 string) { - DF_ViewSpec *spec = &df_nil_view_spec; + RD_ViewSpec *spec = &rd_nil_view_spec; U64 hash = d_hash_from_string(string); - U64 slot_idx = hash%df_state->view_spec_table_size; - for(DF_ViewSpec *s = df_state->view_spec_table[slot_idx]; + U64 slot_idx = hash%rd_state->view_spec_table_size; + for(RD_ViewSpec *s = rd_state->view_spec_table[slot_idx]; s != 0; s = s->hash_next) { @@ -2301,10 +2255,10 @@ df_view_spec_from_string(String8 string) return spec; } -internal DF_ViewSpec * -df_view_spec_from_kind(DF_ViewKind kind) +internal RD_ViewSpec * +rd_view_spec_from_kind(RD_ViewKind kind) { - DF_ViewSpec *spec = df_view_spec_from_string(df_g_gfx_view_kind_spec_info_table[kind].name); + RD_ViewSpec *spec = rd_view_spec_from_string(rd_gfx_view_kind_spec_info_table[kind].name); return spec; } @@ -2312,12 +2266,12 @@ df_view_spec_from_kind(DF_ViewKind kind) //~ rjf: View Rule Spec State Functions internal void -df_register_view_rule_specs(DF_ViewRuleSpecInfoArray specs) +rd_register_view_rule_specs(RD_ViewRuleSpecInfoArray specs) { for(U64 idx = 0; idx < specs.count; idx += 1) { // rjf: extract info from array slot - DF_ViewRuleSpecInfo *info = &specs.v[idx]; + RD_ViewRuleSpecInfo *info = &specs.v[idx]; // rjf: skip empties if(info->string.size == 0) @@ -2327,27 +2281,27 @@ df_register_view_rule_specs(DF_ViewRuleSpecInfoArray specs) // rjf: determine hash/slot U64 hash = d_hash_from_string(info->string); - U64 slot_idx = hash%df_state->view_rule_spec_table_size; + U64 slot_idx = hash%rd_state->view_rule_spec_table_size; // rjf: allocate node & push - DF_ViewRuleSpec *spec = push_array(df_state->arena, DF_ViewRuleSpec, 1); - SLLStackPush_N(df_state->view_rule_spec_table[slot_idx], spec, hash_next); + RD_ViewRuleSpec *spec = push_array(rd_state->arena, RD_ViewRuleSpec, 1); + SLLStackPush_N(rd_state->view_rule_spec_table[slot_idx], spec, hash_next); // rjf: fill node - DF_ViewRuleSpecInfo *info_copy = &spec->info; + RD_ViewRuleSpecInfo *info_copy = &spec->info; MemoryCopyStruct(info_copy, info); - info_copy->string = push_str8_copy(df_state->arena, info->string); + info_copy->string = push_str8_copy(rd_state->arena, info->string); } } -internal DF_ViewRuleSpec * -df_view_rule_spec_from_string(String8 string) +internal RD_ViewRuleSpec * +rd_view_rule_spec_from_string(String8 string) { - DF_ViewRuleSpec *spec = &df_nil_view_rule_spec; + RD_ViewRuleSpec *spec = &rd_nil_view_rule_spec; { U64 hash = d_hash_from_string(string); - U64 slot_idx = hash%df_state->view_rule_spec_table_size; - for(DF_ViewRuleSpec *s = df_state->view_rule_spec_table[slot_idx]; s != 0; s = s->hash_next) + U64 slot_idx = hash%rd_state->view_rule_spec_table_size; + for(RD_ViewRuleSpec *s = rd_state->view_rule_spec_table[slot_idx]; s != 0; s = s->hash_next) { if(str8_match(string, s->info.string, 0)) { @@ -2364,30 +2318,30 @@ df_view_rule_spec_from_string(String8 string) //- rjf: allocation/releasing -internal DF_View * -df_view_alloc(void) +internal RD_View * +rd_view_alloc(void) { // rjf: allocate - DF_View *view = df_state->free_view; + RD_View *view = rd_state->free_view; { - if(!df_view_is_nil(view)) + if(!rd_view_is_nil(view)) { - df_state->free_view_count -= 1; - SLLStackPop_N(df_state->free_view, alloc_next); + rd_state->free_view_count -= 1; + SLLStackPop_N(rd_state->free_view, alloc_next); U64 generation = view->generation; MemoryZeroStruct(view); view->generation = generation; } else { - view = push_array(df_state->arena, DF_View, 1); + view = push_array(rd_state->arena, RD_View, 1); } view->generation += 1; } // rjf: initialize view->arena = arena_alloc(); - view->spec = &df_nil_view_spec; + view->spec = &rd_nil_view_spec; view->project_path_arena = arena_alloc(); view->project_path = str8_zero(); for(U64 idx = 0; idx < ArrayCount(view->params_arenas); idx += 1) @@ -2397,25 +2351,25 @@ df_view_alloc(void) } view->query_cursor = view->query_mark = txt_pt(1, 1); view->query_string_size = 0; - df_state->allocated_view_count += 1; - DLLPushBack_NPZ(&df_nil_view, df_state->first_view, df_state->last_view, view, alloc_next, alloc_prev); + rd_state->allocated_view_count += 1; + DLLPushBack_NPZ(&rd_nil_view, rd_state->first_view, rd_state->last_view, view, alloc_next, alloc_prev); return view; } internal void -df_view_release(DF_View *view) +rd_view_release(RD_View *view) { - DLLRemove_NPZ(&df_nil_view, df_state->first_view, df_state->last_view, view, alloc_next, alloc_prev); - SLLStackPush_N(df_state->free_view, view, alloc_next); - for(DF_View *tchild = view->first_transient, *next = 0; !df_view_is_nil(tchild); tchild = next) + DLLRemove_NPZ(&rd_nil_view, rd_state->first_view, rd_state->last_view, view, alloc_next, alloc_prev); + SLLStackPush_N(rd_state->free_view, view, alloc_next); + for(RD_View *tchild = view->first_transient, *next = 0; !rd_view_is_nil(tchild); tchild = next) { next = tchild->order_next; - df_view_release(tchild); + rd_view_release(tchild); } - view->first_transient = view->last_transient = &df_nil_view; + view->first_transient = view->last_transient = &rd_nil_view; view->transient_view_slots_count = 0; view->transient_view_slots = 0; - for(DF_ArenaExt *ext = view->first_arena_ext; ext != 0; ext = ext->next) + for(RD_ArenaExt *ext = view->first_arena_ext; ext != 0; ext = ext->next) { arena_release(ext->arena); } @@ -2427,14 +2381,14 @@ df_view_release(DF_View *view) } arena_release(view->arena); view->generation += 1; - df_state->allocated_view_count -= 1; - df_state->free_view_count += 1; + rd_state->allocated_view_count -= 1; + rd_state->free_view_count += 1; } //- rjf: equipment internal void -df_view_equip_spec(DF_View *view, DF_ViewSpec *spec, String8 query, MD_Node *params) +rd_view_equip_spec(RD_View *view, RD_ViewSpec *spec, String8 query, MD_Node *params) { // rjf: fill params tree for(U64 idx = 0; idx < ArrayCount(view->params_arenas); idx += 1) @@ -2445,21 +2399,21 @@ df_view_equip_spec(DF_View *view, DF_ViewSpec *spec, String8 query, MD_Node *par view->params_write_gen = view->params_read_gen = 0; // rjf: fill query buffer - df_view_equip_query(view, query); + rd_view_equip_query(view, query); // rjf: initialize state for new view spec - DF_ViewSetupFunctionType *view_setup = spec->info.setup_hook; + RD_ViewSetupFunctionType *view_setup = spec->info.setup_hook; { - for(DF_ArenaExt *ext = view->first_arena_ext; ext != 0; ext = ext->next) + for(RD_ArenaExt *ext = view->first_arena_ext; ext != 0; ext = ext->next) { arena_release(ext->arena); } - for(DF_View *tchild = view->first_transient, *next = 0; !df_view_is_nil(tchild); tchild = next) + for(RD_View *tchild = view->first_transient, *next = 0; !rd_view_is_nil(tchild); tchild = next) { next = tchild->order_next; - df_view_release(tchild); + rd_view_release(tchild); } - view->first_transient = view->last_transient = &df_nil_view; + view->first_transient = view->last_transient = &rd_nil_view; view->first_arena_ext = view->last_arena_ext = 0; view->transient_view_slots_count = 0; view->transient_view_slots = 0; @@ -2468,10 +2422,10 @@ df_view_equip_spec(DF_View *view, DF_ViewSpec *spec, String8 query, MD_Node *par } MemoryZeroStruct(&view->scroll_pos); view->spec = spec; - if(spec->info.flags & DF_ViewSpecFlag_ProjectSpecific) + if(spec->info.flags & RD_ViewSpecFlag_ProjectSpecific) { arena_clear(view->project_path_arena); - view->project_path = push_str8_copy(view->project_path_arena, df_cfg_path_from_src(DF_CfgSrc_Project)); + view->project_path = push_str8_copy(view->project_path_arena, rd_cfg_path_from_src(RD_CfgSrc_Project)); } else { @@ -2483,7 +2437,7 @@ df_view_equip_spec(DF_View *view, DF_ViewSpec *spec, String8 query, MD_Node *par } internal void -df_view_equip_query(DF_View *view, String8 query) +rd_view_equip_query(RD_View *view, String8 query) { view->query_string_size = Min(sizeof(view->query_buffer), query.size); MemoryCopy(view->query_buffer, query.str, view->query_string_size); @@ -2491,7 +2445,7 @@ df_view_equip_query(DF_View *view, String8 query) } internal void -df_view_equip_loading_info(DF_View *view, B32 is_loading, U64 progress_v, U64 progress_target) +rd_view_equip_loading_info(RD_View *view, B32 is_loading, U64 progress_v, U64 progress_target) { view->loading_t_target = (F32)!!is_loading; view->loading_progress_v = progress_v; @@ -2501,7 +2455,7 @@ df_view_equip_loading_info(DF_View *view, B32 is_loading, U64 progress_v, U64 pr //- rjf: user state extensions internal void * -df_view_get_or_push_user_state(DF_View *view, U64 size) +rd_view_get_or_push_user_state(RD_View *view, U64 size) { void *result = view->user_data; if(result == 0) @@ -2512,9 +2466,9 @@ df_view_get_or_push_user_state(DF_View *view, U64 size) } internal Arena * -df_view_push_arena_ext(DF_View *view) +rd_view_push_arena_ext(RD_View *view) { - DF_ArenaExt *ext = push_array(view->arena, DF_ArenaExt, 1); + RD_ArenaExt *ext = push_array(view->arena, RD_ArenaExt, 1); ext->arena = arena_alloc(); SLLQueuePush(view->first_arena_ext, view->last_arena_ext, ext); return ext->arena; @@ -2523,7 +2477,7 @@ df_view_push_arena_ext(DF_View *view) //- rjf: param saving internal void -df_view_store_param(DF_View *view, String8 key, String8 value) +rd_view_store_param(RD_View *view, String8 key, String8 value) { B32 new_copy = 0; if(view->params_write_gen == view->params_read_gen) @@ -2562,13 +2516,13 @@ df_view_store_param(DF_View *view, String8 key, String8 value) } internal void -df_view_store_paramf(DF_View *view, String8 key, char *fmt, ...) +rd_view_store_paramf(RD_View *view, String8 key, char *fmt, ...) { Temp scratch = scratch_begin(0, 0); va_list args; va_start(args, fmt); String8 string = push_str8fv(scratch.arena, fmt, args); - df_view_store_param(view, key, string); + rd_view_store_param(view, key, string); va_end(args); scratch_end(scratch); } @@ -2576,24 +2530,24 @@ df_view_store_paramf(DF_View *view, String8 key, char *fmt, ...) //////////////////////////////// //~ rjf: Expand-Keyed Transient View Functions -internal DF_TransientViewNode * -df_transient_view_node_from_ev_key(DF_View *owner_view, EV_Key key) +internal RD_TransientViewNode * +rd_transient_view_node_from_ev_key(RD_View *owner_view, EV_Key key) { if(owner_view->transient_view_slots_count == 0) { owner_view->transient_view_slots_count = 256; - owner_view->transient_view_slots = push_array(owner_view->arena, DF_TransientViewSlot, owner_view->transient_view_slots_count); + owner_view->transient_view_slots = push_array(owner_view->arena, RD_TransientViewSlot, owner_view->transient_view_slots_count); } U64 hash = ev_hash_from_key(key); U64 slot_idx = hash%owner_view->transient_view_slots_count; - DF_TransientViewSlot *slot = &owner_view->transient_view_slots[slot_idx]; - DF_TransientViewNode *node = 0; - for(DF_TransientViewNode *n = slot->first; n != 0; n = n->next) + RD_TransientViewSlot *slot = &owner_view->transient_view_slots[slot_idx]; + RD_TransientViewNode *node = 0; + for(RD_TransientViewNode *n = slot->first; n != 0; n = n->next) { if(ev_key_match(n->key, key)) { node = n; - n->last_frame_index_touched = df_state->frame_index; + n->last_frame_index_touched = rd_state->frame_index; break; } } @@ -2601,16 +2555,16 @@ df_transient_view_node_from_ev_key(DF_View *owner_view, EV_Key key) { if(!owner_view->free_transient_view_node) { - owner_view->free_transient_view_node = push_array(df_state->arena, DF_TransientViewNode, 1); + owner_view->free_transient_view_node = push_array(rd_state->arena, RD_TransientViewNode, 1); } node = owner_view->free_transient_view_node; SLLStackPop(owner_view->free_transient_view_node); DLLPushBack(slot->first, slot->last, node); node->key = key; - node->view = df_view_alloc(); + node->view = rd_view_alloc(); node->initial_params_arena = arena_alloc(); - node->first_frame_index_touched = node->last_frame_index_touched = df_state->frame_index; - DLLPushBack_NPZ(&df_nil_view, owner_view->first_transient, owner_view->last_transient, node->view, order_next, order_prev); + node->first_frame_index_touched = node->last_frame_index_touched = rd_state->frame_index; + DLLPushBack_NPZ(&rd_nil_view, owner_view->first_transient, owner_view->last_transient, node->view, order_next, order_prev); } return node; } @@ -2618,11 +2572,11 @@ df_transient_view_node_from_ev_key(DF_View *owner_view, EV_Key key) //////////////////////////////// //~ rjf: Panel State Functions -internal DF_Panel * -df_panel_alloc(DF_Window *ws) +internal RD_Panel * +rd_panel_alloc(RD_Window *ws) { - DF_Panel *panel = ws->free_panel; - if(!df_panel_is_nil(panel)) + RD_Panel *panel = ws->free_panel; + if(!rd_panel_is_nil(panel)) { SLLStackPop(ws->free_panel); U64 generation = panel->generation; @@ -2631,53 +2585,53 @@ df_panel_alloc(DF_Window *ws) } else { - panel = push_array(ws->arena, DF_Panel, 1); + panel = push_array(ws->arena, RD_Panel, 1); } - panel->first = panel->last = panel->next = panel->prev = panel->parent = &df_nil_panel; - panel->first_tab_view = panel->last_tab_view = &df_nil_view; + panel->first = panel->last = panel->next = panel->prev = panel->parent = &rd_nil_panel; + panel->first_tab_view = panel->last_tab_view = &rd_nil_view; panel->generation += 1; MemoryZeroStruct(&panel->animated_rect_pct); return panel; } internal void -df_panel_release(DF_Window *ws, DF_Panel *panel) +rd_panel_release(RD_Window *ws, RD_Panel *panel) { - df_panel_release_all_views(panel); + rd_panel_release_all_views(panel); SLLStackPush(ws->free_panel, panel); panel->generation += 1; } internal void -df_panel_release_all_views(DF_Panel *panel) +rd_panel_release_all_views(RD_Panel *panel) { - for(DF_View *view = panel->first_tab_view, *next = 0; !df_view_is_nil(view); view = next) + for(RD_View *view = panel->first_tab_view, *next = 0; !rd_view_is_nil(view); view = next) { next = view->order_next; - df_view_release(view); + rd_view_release(view); } - panel->first_tab_view = panel->last_tab_view = &df_nil_view; - panel->selected_tab_view = d_handle_zero(); + panel->first_tab_view = panel->last_tab_view = &rd_nil_view; + panel->selected_tab_view = rd_handle_zero(); panel->tab_view_count = 0; } //////////////////////////////// //~ rjf: Window State Functions -internal DF_Window * -df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src) +internal RD_Window * +rd_window_open(Vec2F32 size, OS_Handle preferred_monitor, RD_CfgSrc cfg_src) { - DF_Window *window = df_state->free_window; + RD_Window *window = rd_state->free_window; if(window != 0) { - SLLStackPop(df_state->free_window); + SLLStackPop(rd_state->free_window); U64 gen = window->gen; MemoryZeroStruct(window); window->gen = gen; } else { - window = push_array(df_state->arena, DF_Window, 1); + window = push_array(rd_state->arena, RD_Window, 1); } window->gen += 1; window->frames_alive = 0; @@ -2692,17 +2646,17 @@ df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src) window->code_ctx_menu_arena = arena_alloc(); window->hover_eval_arena = arena_alloc(); window->autocomp_lister_params_arena = arena_alloc(); - window->free_panel = &df_nil_panel; - window->root_panel = df_panel_alloc(window); + window->free_panel = &rd_nil_panel; + window->root_panel = rd_panel_alloc(window); window->focused_panel = window->root_panel; window->query_cmd_arena = arena_alloc(); - window->query_view_stack_top = &df_nil_view; + window->query_view_stack_top = &rd_nil_view; window->last_dpi = os_dpi_from_window(window->os); - for(EachEnumVal(DF_SettingCode, code)) + for(EachEnumVal(RD_SettingCode, code)) { - if(df_g_setting_code_default_is_per_window_table[code]) + if(rd_setting_code_default_is_per_window_table[code]) { - window->setting_vals[code] = df_g_setting_code_default_val_table[code]; + window->setting_vals[code] = rd_setting_code_default_val_table[code]; } } OS_Handle zero_monitor = {0}; @@ -2710,57 +2664,57 @@ df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src) { os_window_set_monitor(window->os, preferred_monitor); } - if(df_state->first_window == 0) DF_RegsScope(.window = df_handle_from_window(window)) + if(rd_state->first_window == 0) RD_RegsScope(.window = rd_handle_from_window(window)) { - DF_FontSlot english_font_slots[] = {DF_FontSlot_Main, DF_FontSlot_Code}; - DF_FontSlot icon_font_slot = DF_FontSlot_Icons; + RD_FontSlot english_font_slots[] = {RD_FontSlot_Main, RD_FontSlot_Code}; + RD_FontSlot icon_font_slot = RD_FontSlot_Icons; for(U64 idx = 0; idx < ArrayCount(english_font_slots); idx += 1) { Temp scratch = scratch_begin(0, 0); - DF_FontSlot slot = english_font_slots[idx]; + RD_FontSlot slot = english_font_slots[idx]; String8 sample_text = str8_lit("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890~!@#$%^&*()-_+=[{]}\\|;:'\",<.>/?"); fnt_push_run_from_string(scratch.arena, - df_font_from_slot(slot), - df_font_size_from_slot(DF_FontSlot_Code), + rd_font_from_slot(slot), + rd_font_size_from_slot(RD_FontSlot_Code), 0, 0, 0, sample_text); fnt_push_run_from_string(scratch.arena, - df_font_from_slot(slot), - df_font_size_from_slot(DF_FontSlot_Main), + rd_font_from_slot(slot), + rd_font_size_from_slot(RD_FontSlot_Main), 0, 0, 0, sample_text); scratch_end(scratch); } - for(DF_IconKind icon_kind = DF_IconKind_Null; icon_kind < DF_IconKind_COUNT; icon_kind = (DF_IconKind)(icon_kind+1)) + for(RD_IconKind icon_kind = RD_IconKind_Null; icon_kind < RD_IconKind_COUNT; icon_kind = (RD_IconKind)(icon_kind+1)) { Temp scratch = scratch_begin(0, 0); fnt_push_run_from_string(scratch.arena, - df_font_from_slot(icon_font_slot), - df_font_size_from_slot(icon_font_slot), + rd_font_from_slot(icon_font_slot), + rd_font_size_from_slot(icon_font_slot), 0, 0, FNT_RasterFlag_Smooth, - df_g_icon_kind_text_table[icon_kind]); + rd_icon_kind_text_table[icon_kind]); fnt_push_run_from_string(scratch.arena, - df_font_from_slot(icon_font_slot), - df_font_size_from_slot(DF_FontSlot_Main), + rd_font_from_slot(icon_font_slot), + rd_font_size_from_slot(RD_FontSlot_Main), 0, 0, FNT_RasterFlag_Smooth, - df_g_icon_kind_text_table[icon_kind]); + rd_icon_kind_text_table[icon_kind]); fnt_push_run_from_string(scratch.arena, - df_font_from_slot(icon_font_slot), - df_font_size_from_slot(DF_FontSlot_Code), + rd_font_from_slot(icon_font_slot), + rd_font_size_from_slot(RD_FontSlot_Code), 0, 0, FNT_RasterFlag_Smooth, - df_g_icon_kind_text_table[icon_kind]); + rd_icon_kind_text_table[icon_kind]); scratch_end(scratch); } } - DLLPushBack(df_state->first_window, df_state->last_window, window); + DLLPushBack(rd_state->first_window, rd_state->last_window, window); return window; } -internal DF_Window * -df_window_from_os_handle(OS_Handle os) +internal RD_Window * +rd_window_from_os_handle(OS_Handle os) { - DF_Window *result = 0; - for(DF_Window *w = df_state->first_window; w != 0; w = w->next) + RD_Window *result = 0; + for(RD_Window *w = rd_state->first_window; w != 0; w = w->next) { if(os_handle_match(w->os, os)) { @@ -2776,7 +2730,7 @@ df_window_from_os_handle(OS_Handle os) #endif internal void -df_window_frame(DF_Window *ws) +rd_window_frame(RD_Window *ws) { ProfBeginFunction(); @@ -2784,12 +2738,12 @@ df_window_frame(DF_Window *ws) //- rjf: unpack context // B32 window_is_focused = os_window_is_focused(ws->os) || ws->window_temporarily_focused_ipc; - B32 confirm_open = df_state->confirm_active; - B32 query_is_open = !df_view_is_nil(ws->query_view_stack_top); + B32 confirm_open = rd_state->confirm_active; + B32 query_is_open = !rd_view_is_nil(ws->query_view_stack_top); B32 hover_eval_is_open = (!confirm_open && ws->hover_eval_string.size != 0 && ws->hover_eval_first_frame_idx+20 < ws->hover_eval_last_frame_idx && - df_state->frame_index-ws->hover_eval_last_frame_idx < 20); + rd_state->frame_index-ws->hover_eval_last_frame_idx < 20); if(!window_is_focused || confirm_open) { ws->menu_bar_key_held = 0; @@ -2800,21 +2754,21 @@ df_window_frame(DF_Window *ws) ////////////////////////////// //- rjf: auto-close tabs which have parameter entities that've been deleted // - for(DF_Panel *panel = ws->root_panel; - !df_panel_is_nil(panel); - panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; + !rd_panel_is_nil(panel); + panel = rd_panel_rec_depth_first_pre(panel).next) { - for(DF_View *view = panel->first_tab_view; - !df_view_is_nil(view); + for(RD_View *view = panel->first_tab_view; + !rd_view_is_nil(view); view = view->order_next) { - DF_Entity *entity = d_entity_from_eval_string(str8(view->query_buffer, view->query_string_size)); - if(entity->flags & DF_EntityFlag_MarkedForDeletion || - (df_entity_is_nil(entity) && view->spec->info.flags & DF_ViewSpecFlag_ParameterizedByEntity)) + RD_Entity *entity = rd_entity_from_eval_string(str8(view->query_buffer, view->query_string_size)); + if(entity->flags & RD_EntityFlag_MarkedForDeletion || + (rd_entity_is_nil(entity) && view->spec->info.flags & RD_ViewSpecFlag_ParameterizedByEntity)) { - df_cmd(DF_CmdKind_CloseTab, - .panel = df_handle_from_panel(panel), - .view = df_handle_from_view(view)); + rd_cmd(RD_CmdKind_CloseTab, + .panel = rd_handle_from_panel(panel), + .view = rd_handle_from_view(view)); } } } @@ -2823,32 +2777,32 @@ df_window_frame(DF_Window *ws) //- rjf: panels with no selected tabs? -> select. // panels with selected tabs? -> ensure they have active tabs. // - for(DF_Panel *panel = ws->root_panel; - !df_panel_is_nil(panel); - panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; + !rd_panel_is_nil(panel); + panel = rd_panel_rec_depth_first_pre(panel).next) { - if(!df_panel_is_nil(panel->first)) + if(!rd_panel_is_nil(panel->first)) { continue; } - DF_View *view = df_selected_tab_from_panel(panel); - if(df_view_is_nil(view)) + RD_View *view = rd_selected_tab_from_panel(panel); + if(rd_view_is_nil(view)) { - for(DF_View *tab = panel->first_tab_view; !df_view_is_nil(tab); tab = tab->order_next) + for(RD_View *tab = panel->first_tab_view; !rd_view_is_nil(tab); tab = tab->order_next) { - if(!df_view_is_project_filtered(tab)) + if(!rd_view_is_project_filtered(tab)) { - panel->selected_tab_view = df_handle_from_view(tab); + panel->selected_tab_view = rd_handle_from_view(tab); break; } } } - if(!df_view_is_nil(view)) + if(!rd_view_is_nil(view)) { B32 found = 0; - for(DF_View *tab = panel->first_tab_view; !df_view_is_nil(tab); tab = tab->order_next) + for(RD_View *tab = panel->first_tab_view; !rd_view_is_nil(tab); tab = tab->order_next) { - if(df_view_is_project_filtered(tab)) {continue;} + if(rd_view_is_project_filtered(tab)) {continue;} if(tab == view) { found = 1; @@ -2856,7 +2810,7 @@ df_window_frame(DF_Window *ws) } if(!found) { - panel->selected_tab_view = d_handle_zero(); + panel->selected_tab_view = rd_handle_zero(); } } } @@ -2864,34 +2818,34 @@ df_window_frame(DF_Window *ws) ////////////////////////////// //- rjf: fill panel/view interaction registers // - df_regs()->panel = df_handle_from_panel(ws->focused_panel); - df_regs()->view = ws->focused_panel->selected_tab_view; + rd_regs()->panel = rd_handle_from_panel(ws->focused_panel); + rd_regs()->view = ws->focused_panel->selected_tab_view; ////////////////////////////// //- rjf: process view-level commands on leaf panels // ProfScope("dispatch view-level commands") { - for(DF_Panel *panel = ws->root_panel; - !df_panel_is_nil(panel); - panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; + !rd_panel_is_nil(panel); + panel = rd_panel_rec_depth_first_pre(panel).next) { - if(!df_panel_is_nil(panel->first)) + if(!rd_panel_is_nil(panel->first)) { continue; } - DF_View *view = df_selected_tab_from_panel(panel); - if(!df_view_is_nil(view)) + RD_View *view = rd_selected_tab_from_panel(panel); + if(!rd_view_is_nil(view)) { - df_push_regs(); - df_regs()->panel = df_handle_from_panel(panel); - df_regs()->view = df_handle_from_view(view); - DF_ViewCmdFunctionType *do_view_cmds_function = view->spec->info.cmd_hook; + rd_push_regs(); + rd_regs()->panel = rd_handle_from_panel(panel); + rd_regs()->view = rd_handle_from_view(view); + RD_ViewCmdFunctionType *do_view_cmds_function = view->spec->info.cmd_hook; do_view_cmds_function(view, view->params_roots[view->params_read_gen%ArrayCount(view->params_roots)], str8(view->query_buffer, view->query_string_size)); - DF_Regs *view_regs = df_pop_regs(); + RD_Regs *view_regs = rd_pop_regs(); if(panel == ws->focused_panel) { - MemoryCopyStruct(df_regs(), view_regs); + MemoryCopyStruct(rd_regs(), view_regs); } } } @@ -2901,64 +2855,64 @@ df_window_frame(DF_Window *ws) //- rjf: compute ui palettes from theme // { - DF_Theme *current = &df_state->cfg_theme; - for(EachEnumVal(DF_PaletteCode, code)) + RD_Theme *current = &rd_state->cfg_theme; + for(EachEnumVal(RD_PaletteCode, code)) { ws->cfg_palettes[code].null = v4f32(1, 0, 1, 1); - ws->cfg_palettes[code].cursor = current->colors[DF_ThemeColor_Cursor]; - ws->cfg_palettes[code].selection = current->colors[DF_ThemeColor_SelectionOverlay]; + ws->cfg_palettes[code].cursor = current->colors[RD_ThemeColor_Cursor]; + ws->cfg_palettes[code].selection = current->colors[RD_ThemeColor_SelectionOverlay]; } - ws->cfg_palettes[DF_PaletteCode_Base].background = current->colors[DF_ThemeColor_BaseBackground]; - ws->cfg_palettes[DF_PaletteCode_Base].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_Base].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_Base].border = current->colors[DF_ThemeColor_BaseBorder]; - ws->cfg_palettes[DF_PaletteCode_MenuBar].background = current->colors[DF_ThemeColor_MenuBarBackground]; - ws->cfg_palettes[DF_PaletteCode_MenuBar].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_MenuBar].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_MenuBar].border = current->colors[DF_ThemeColor_MenuBarBorder]; - ws->cfg_palettes[DF_PaletteCode_Floating].background = current->colors[DF_ThemeColor_FloatingBackground]; - ws->cfg_palettes[DF_PaletteCode_Floating].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_Floating].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_Floating].border = current->colors[DF_ThemeColor_FloatingBorder]; - ws->cfg_palettes[DF_PaletteCode_ImplicitButton].background = current->colors[DF_ThemeColor_ImplicitButtonBackground]; - ws->cfg_palettes[DF_PaletteCode_ImplicitButton].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_ImplicitButton].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_ImplicitButton].border = current->colors[DF_ThemeColor_ImplicitButtonBorder]; - ws->cfg_palettes[DF_PaletteCode_PlainButton].background = current->colors[DF_ThemeColor_PlainButtonBackground]; - ws->cfg_palettes[DF_PaletteCode_PlainButton].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_PlainButton].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_PlainButton].border = current->colors[DF_ThemeColor_PlainButtonBorder]; - ws->cfg_palettes[DF_PaletteCode_PositivePopButton].background = current->colors[DF_ThemeColor_PositivePopButtonBackground]; - ws->cfg_palettes[DF_PaletteCode_PositivePopButton].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_PositivePopButton].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_PositivePopButton].border = current->colors[DF_ThemeColor_PositivePopButtonBorder]; - ws->cfg_palettes[DF_PaletteCode_NegativePopButton].background = current->colors[DF_ThemeColor_NegativePopButtonBackground]; - ws->cfg_palettes[DF_PaletteCode_NegativePopButton].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_NegativePopButton].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_NegativePopButton].border = current->colors[DF_ThemeColor_NegativePopButtonBorder]; - ws->cfg_palettes[DF_PaletteCode_NeutralPopButton].background = current->colors[DF_ThemeColor_NeutralPopButtonBackground]; - ws->cfg_palettes[DF_PaletteCode_NeutralPopButton].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_NeutralPopButton].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_NeutralPopButton].border = current->colors[DF_ThemeColor_NeutralPopButtonBorder]; - ws->cfg_palettes[DF_PaletteCode_ScrollBarButton].background = current->colors[DF_ThemeColor_ScrollBarButtonBackground]; - ws->cfg_palettes[DF_PaletteCode_ScrollBarButton].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_ScrollBarButton].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_ScrollBarButton].border = current->colors[DF_ThemeColor_ScrollBarButtonBorder]; - ws->cfg_palettes[DF_PaletteCode_Tab].background = current->colors[DF_ThemeColor_TabBackground]; - ws->cfg_palettes[DF_PaletteCode_Tab].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_Tab].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_Tab].border = current->colors[DF_ThemeColor_TabBorder]; - ws->cfg_palettes[DF_PaletteCode_TabInactive].background = current->colors[DF_ThemeColor_TabBackgroundInactive]; - ws->cfg_palettes[DF_PaletteCode_TabInactive].text = current->colors[DF_ThemeColor_Text]; - ws->cfg_palettes[DF_PaletteCode_TabInactive].text_weak = current->colors[DF_ThemeColor_TextWeak]; - ws->cfg_palettes[DF_PaletteCode_TabInactive].border = current->colors[DF_ThemeColor_TabBorderInactive]; - ws->cfg_palettes[DF_PaletteCode_DropSiteOverlay].background = current->colors[DF_ThemeColor_DropSiteOverlay]; - ws->cfg_palettes[DF_PaletteCode_DropSiteOverlay].text = current->colors[DF_ThemeColor_DropSiteOverlay]; - ws->cfg_palettes[DF_PaletteCode_DropSiteOverlay].text_weak = current->colors[DF_ThemeColor_DropSiteOverlay]; - ws->cfg_palettes[DF_PaletteCode_DropSiteOverlay].border = current->colors[DF_ThemeColor_DropSiteOverlay]; - if(df_setting_val_from_code(DF_SettingCode_OpaqueBackgrounds).s32) + ws->cfg_palettes[RD_PaletteCode_Base].background = current->colors[RD_ThemeColor_BaseBackground]; + ws->cfg_palettes[RD_PaletteCode_Base].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_Base].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_Base].border = current->colors[RD_ThemeColor_BaseBorder]; + ws->cfg_palettes[RD_PaletteCode_MenuBar].background = current->colors[RD_ThemeColor_MenuBarBackground]; + ws->cfg_palettes[RD_PaletteCode_MenuBar].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_MenuBar].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_MenuBar].border = current->colors[RD_ThemeColor_MenuBarBorder]; + ws->cfg_palettes[RD_PaletteCode_Floating].background = current->colors[RD_ThemeColor_FloatingBackground]; + ws->cfg_palettes[RD_PaletteCode_Floating].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_Floating].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_Floating].border = current->colors[RD_ThemeColor_FloatingBorder]; + ws->cfg_palettes[RD_PaletteCode_ImplicitButton].background = current->colors[RD_ThemeColor_ImplicitButtonBackground]; + ws->cfg_palettes[RD_PaletteCode_ImplicitButton].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_ImplicitButton].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_ImplicitButton].border = current->colors[RD_ThemeColor_ImplicitButtonBorder]; + ws->cfg_palettes[RD_PaletteCode_PlainButton].background = current->colors[RD_ThemeColor_PlainButtonBackground]; + ws->cfg_palettes[RD_PaletteCode_PlainButton].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_PlainButton].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_PlainButton].border = current->colors[RD_ThemeColor_PlainButtonBorder]; + ws->cfg_palettes[RD_PaletteCode_PositivePopButton].background = current->colors[RD_ThemeColor_PositivePopButtonBackground]; + ws->cfg_palettes[RD_PaletteCode_PositivePopButton].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_PositivePopButton].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_PositivePopButton].border = current->colors[RD_ThemeColor_PositivePopButtonBorder]; + ws->cfg_palettes[RD_PaletteCode_NegativePopButton].background = current->colors[RD_ThemeColor_NegativePopButtonBackground]; + ws->cfg_palettes[RD_PaletteCode_NegativePopButton].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_NegativePopButton].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_NegativePopButton].border = current->colors[RD_ThemeColor_NegativePopButtonBorder]; + ws->cfg_palettes[RD_PaletteCode_NeutralPopButton].background = current->colors[RD_ThemeColor_NeutralPopButtonBackground]; + ws->cfg_palettes[RD_PaletteCode_NeutralPopButton].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_NeutralPopButton].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_NeutralPopButton].border = current->colors[RD_ThemeColor_NeutralPopButtonBorder]; + ws->cfg_palettes[RD_PaletteCode_ScrollBarButton].background = current->colors[RD_ThemeColor_ScrollBarButtonBackground]; + ws->cfg_palettes[RD_PaletteCode_ScrollBarButton].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_ScrollBarButton].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_ScrollBarButton].border = current->colors[RD_ThemeColor_ScrollBarButtonBorder]; + ws->cfg_palettes[RD_PaletteCode_Tab].background = current->colors[RD_ThemeColor_TabBackground]; + ws->cfg_palettes[RD_PaletteCode_Tab].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_Tab].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_Tab].border = current->colors[RD_ThemeColor_TabBorder]; + ws->cfg_palettes[RD_PaletteCode_TabInactive].background = current->colors[RD_ThemeColor_TabBackgroundInactive]; + ws->cfg_palettes[RD_PaletteCode_TabInactive].text = current->colors[RD_ThemeColor_Text]; + ws->cfg_palettes[RD_PaletteCode_TabInactive].text_weak = current->colors[RD_ThemeColor_TextWeak]; + ws->cfg_palettes[RD_PaletteCode_TabInactive].border = current->colors[RD_ThemeColor_TabBorderInactive]; + ws->cfg_palettes[RD_PaletteCode_DropSiteOverlay].background = current->colors[RD_ThemeColor_DropSiteOverlay]; + ws->cfg_palettes[RD_PaletteCode_DropSiteOverlay].text = current->colors[RD_ThemeColor_DropSiteOverlay]; + ws->cfg_palettes[RD_PaletteCode_DropSiteOverlay].text_weak = current->colors[RD_ThemeColor_DropSiteOverlay]; + ws->cfg_palettes[RD_PaletteCode_DropSiteOverlay].border = current->colors[RD_ThemeColor_DropSiteOverlay]; + if(rd_setting_val_from_code(RD_SettingCode_OpaqueBackgrounds).s32) { - for(EachEnumVal(DF_PaletteCode, code)) + for(EachEnumVal(RD_PaletteCode, code)) { if(ws->cfg_palettes[code].background.x != 0 || ws->cfg_palettes[code].background.y != 0 || @@ -2982,57 +2936,57 @@ df_window_frame(DF_Window *ws) // { // rjf: gather font info - FNT_Tag main_font = df_font_from_slot(DF_FontSlot_Main); - F32 main_font_size = df_font_size_from_slot(DF_FontSlot_Main); - FNT_Tag icon_font = df_font_from_slot(DF_FontSlot_Icons); + FNT_Tag main_font = rd_font_from_slot(RD_FontSlot_Main); + F32 main_font_size = rd_font_size_from_slot(RD_FontSlot_Main); + FNT_Tag icon_font = rd_font_from_slot(RD_FontSlot_Icons); // rjf: build icon info UI_IconInfo icon_info = {0}; { icon_info.icon_font = icon_font; - icon_info.icon_kind_text_map[UI_IconKind_RightArrow] = df_g_icon_kind_text_table[DF_IconKind_RightScroll]; - icon_info.icon_kind_text_map[UI_IconKind_DownArrow] = df_g_icon_kind_text_table[DF_IconKind_DownScroll]; - icon_info.icon_kind_text_map[UI_IconKind_LeftArrow] = df_g_icon_kind_text_table[DF_IconKind_LeftScroll]; - icon_info.icon_kind_text_map[UI_IconKind_UpArrow] = df_g_icon_kind_text_table[DF_IconKind_UpScroll]; - icon_info.icon_kind_text_map[UI_IconKind_RightCaret] = df_g_icon_kind_text_table[DF_IconKind_RightCaret]; - icon_info.icon_kind_text_map[UI_IconKind_DownCaret] = df_g_icon_kind_text_table[DF_IconKind_DownCaret]; - icon_info.icon_kind_text_map[UI_IconKind_LeftCaret] = df_g_icon_kind_text_table[DF_IconKind_LeftCaret]; - icon_info.icon_kind_text_map[UI_IconKind_UpCaret] = df_g_icon_kind_text_table[DF_IconKind_UpCaret]; - icon_info.icon_kind_text_map[UI_IconKind_CheckHollow] = df_g_icon_kind_text_table[DF_IconKind_CheckHollow]; - icon_info.icon_kind_text_map[UI_IconKind_CheckFilled] = df_g_icon_kind_text_table[DF_IconKind_CheckFilled]; + icon_info.icon_kind_text_map[UI_IconKind_RightArrow] = rd_icon_kind_text_table[RD_IconKind_RightScroll]; + icon_info.icon_kind_text_map[UI_IconKind_DownArrow] = rd_icon_kind_text_table[RD_IconKind_DownScroll]; + icon_info.icon_kind_text_map[UI_IconKind_LeftArrow] = rd_icon_kind_text_table[RD_IconKind_LeftScroll]; + icon_info.icon_kind_text_map[UI_IconKind_UpArrow] = rd_icon_kind_text_table[RD_IconKind_UpScroll]; + icon_info.icon_kind_text_map[UI_IconKind_RightCaret] = rd_icon_kind_text_table[RD_IconKind_RightCaret]; + icon_info.icon_kind_text_map[UI_IconKind_DownCaret] = rd_icon_kind_text_table[RD_IconKind_DownCaret]; + icon_info.icon_kind_text_map[UI_IconKind_LeftCaret] = rd_icon_kind_text_table[RD_IconKind_LeftCaret]; + icon_info.icon_kind_text_map[UI_IconKind_UpCaret] = rd_icon_kind_text_table[RD_IconKind_UpCaret]; + icon_info.icon_kind_text_map[UI_IconKind_CheckHollow] = rd_icon_kind_text_table[RD_IconKind_CheckHollow]; + icon_info.icon_kind_text_map[UI_IconKind_CheckFilled] = rd_icon_kind_text_table[RD_IconKind_CheckFilled]; } // rjf: build widget palette info UI_WidgetPaletteInfo widget_palette_info = {0}; { - widget_palette_info.tooltip_palette = df_palette_from_code(DF_PaletteCode_Floating); - widget_palette_info.ctx_menu_palette = df_palette_from_code(DF_PaletteCode_Floating); - widget_palette_info.scrollbar_palette = df_palette_from_code(DF_PaletteCode_ScrollBarButton); + widget_palette_info.tooltip_palette = rd_palette_from_code(RD_PaletteCode_Floating); + widget_palette_info.ctx_menu_palette = rd_palette_from_code(RD_PaletteCode_Floating); + widget_palette_info.scrollbar_palette = rd_palette_from_code(RD_PaletteCode_ScrollBarButton); } // rjf: build animation info UI_AnimationInfo animation_info = {0}; { - if(df_setting_val_from_code(DF_SettingCode_HoverAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_HotAnimations;} - if(df_setting_val_from_code(DF_SettingCode_PressAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_ActiveAnimations;} - if(df_setting_val_from_code(DF_SettingCode_FocusAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_FocusAnimations;} - if(df_setting_val_from_code(DF_SettingCode_TooltipAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_TooltipAnimations;} - if(df_setting_val_from_code(DF_SettingCode_MenuAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_ContextMenuAnimations;} - if(df_setting_val_from_code(DF_SettingCode_ScrollingAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_ScrollingAnimations;} + if(rd_setting_val_from_code(RD_SettingCode_HoverAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_HotAnimations;} + if(rd_setting_val_from_code(RD_SettingCode_PressAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_ActiveAnimations;} + if(rd_setting_val_from_code(RD_SettingCode_FocusAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_FocusAnimations;} + if(rd_setting_val_from_code(RD_SettingCode_TooltipAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_TooltipAnimations;} + if(rd_setting_val_from_code(RD_SettingCode_MenuAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_ContextMenuAnimations;} + if(rd_setting_val_from_code(RD_SettingCode_ScrollingAnimations).s32) {animation_info.flags |= UI_AnimationInfoFlag_ScrollingAnimations;} } // rjf: begin & push initial stack values - ui_begin_build(ws->os, &ws->ui_events, &icon_info, &widget_palette_info, &animation_info, df_state->frame_dt, df_state->frame_dt); + ui_begin_build(ws->os, &ws->ui_events, &icon_info, &widget_palette_info, &animation_info, rd_state->frame_dt, rd_state->frame_dt); ui_push_font(main_font); ui_push_font_size(main_font_size); ui_push_text_padding(main_font_size*0.3f); ui_push_pref_width(ui_em(20.f, 1)); ui_push_pref_height(ui_em(2.75f, 1.f)); - ui_push_palette(df_palette_from_code(DF_PaletteCode_Base)); + ui_push_palette(rd_palette_from_code(RD_PaletteCode_Base)); ui_push_blur_size(10.f); FNT_RasterFlags text_raster_flags = 0; - if(df_setting_val_from_code(DF_SettingCode_SmoothUIText).s32) {text_raster_flags |= FNT_RasterFlag_Smooth;} - if(df_setting_val_from_code(DF_SettingCode_HintUIText).s32) {text_raster_flags |= FNT_RasterFlag_Hinted;} + if(rd_setting_val_from_code(RD_SettingCode_SmoothUIText).s32) {text_raster_flags |= FNT_RasterFlag_Smooth;} + if(rd_setting_val_from_code(RD_SettingCode_HintUIText).s32) {text_raster_flags |= FNT_RasterFlag_Hinted;} ui_push_text_raster_flags(text_raster_flags); } @@ -3063,22 +3017,22 @@ df_window_frame(DF_Window *ws) //////////////////////////// //- rjf: drag/drop visualization tooltips // - B32 drag_active = df_drag_is_active(); + B32 drag_active = rd_drag_is_active(); if(drag_active && window_is_focused) { Temp scratch = scratch_begin(0, 0); - DF_DragDropPayload *payload = &df_drag_drop_payload; - DF_Panel *panel = df_panel_from_handle(payload->panel); - DF_Entity *entity = df_entity_from_handle(payload->entity); - DF_View *view = df_view_from_handle(payload->view); + RD_DragDropPayload *payload = &rd_drag_drop_payload; + RD_Panel *panel = rd_panel_from_handle(payload->panel); + RD_Entity *entity = rd_entity_from_handle(payload->entity); + RD_View *view = rd_view_from_handle(payload->view); { //- rjf: tab dragging - if(!df_view_is_nil(view)) + if(!rd_view_is_nil(view)) { UI_Size main_width = ui_top_pref_width(); UI_Size main_height = ui_top_pref_height(); UI_TextAlign main_text_align = ui_top_text_alignment(); - DF_Palette(DF_PaletteCode_Tab) + RD_Palette(RD_PaletteCode_Tab) UI_Tooltip UI_PrefWidth(main_width) UI_PrefHeight(main_height) @@ -3092,13 +3046,13 @@ df_window_frame(DF_Window *ws) { UI_Row { - DF_IconKind icon_kind = df_icon_kind_from_view(view); - DR_FancyStringList fstrs = df_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + RD_IconKind icon_kind = rd_icon_kind_from_view(view); + DR_FancyStringList fstrs = rd_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) UI_PrefWidth(ui_em(2.5f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - ui_label(df_g_icon_kind_text_table[icon_kind]); + ui_label(rd_icon_kind_text_table[icon_kind]); UI_PrefWidth(ui_text_dim(10, 1)) { UI_Box *name_box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); @@ -3111,8 +3065,8 @@ df_window_frame(DF_Window *ws) UI_Box *view_preview_container = ui_build_box_from_stringf(UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawBackground|UI_BoxFlag_Clip, "###view_preview_container"); UI_Parent(view_preview_container) UI_Focus(UI_FocusKind_Off) UI_WidthFill { - DF_ViewSpec *view_spec = view->spec; - DF_ViewUIFunctionType *build_view_ui_function = view_spec->info.ui_hook; + RD_ViewSpec *view_spec = view->spec; + RD_ViewUIFunctionType *build_view_ui_function = view_spec->info.ui_hook; build_view_ui_function(view, view->params_roots[view->params_read_gen%ArrayCount(view->params_roots)], str8(view->query_buffer, view->query_string_size), view_preview_container->rect); } } @@ -3120,17 +3074,17 @@ df_window_frame(DF_Window *ws) } //- rjf: entity dragging - else if(!df_entity_is_nil(entity)) UI_Tooltip + else if(!rd_entity_is_nil(entity)) UI_Tooltip { ui_set_next_pref_width(ui_children_sum(1)); UI_Row UI_HeightFill { - String8 display_name = df_display_string_from_entity(scratch.arena, entity); - DF_IconKind icon_kind = df_entity_kind_icon_kind_table[entity->kind]; - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + String8 display_name = rd_display_string_from_entity(scratch.arena, entity); + RD_IconKind icon_kind = rd_entity_kind_icon_kind_table[entity->kind]; + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - ui_label(df_g_icon_kind_text_table[icon_kind]); + ui_label(rd_icon_kind_text_table[icon_kind]); ui_label(display_name); } } @@ -3141,7 +3095,7 @@ df_window_frame(DF_Window *ws) //////////////////////////// //- rjf: developer menu // - if(ws->dev_menu_is_open) DF_Font(DF_FontSlot_Code) + if(ws->dev_menu_is_open) RD_Font(RD_FontSlot_Code) { ui_set_next_flags(UI_BoxFlag_ViewScrollY|UI_BoxFlag_AllowOverflowY|UI_BoxFlag_ViewClamp); UI_PaneF(r2f32p(30, 30, 30+ui_top_font_size()*100, ui_top_font_size()*150), "###dev_ctx_menu") @@ -3149,7 +3103,7 @@ df_window_frame(DF_Window *ws) //- rjf: toggles for(U64 idx = 0; idx < ArrayCount(DEV_toggle_table); idx += 1) { - if(ui_clicked(df_icon_button(*DEV_toggle_table[idx].value_ptr ? DF_IconKind_CheckFilled : DF_IconKind_CheckHollow, 0, DEV_toggle_table[idx].name))) + if(ui_clicked(rd_icon_button(*DEV_toggle_table[idx].value_ptr ? RD_IconKind_CheckFilled : RD_IconKind_CheckHollow, 0, DEV_toggle_table[idx].name))) { *DEV_toggle_table[idx].value_ptr ^= 1; } @@ -3159,7 +3113,7 @@ df_window_frame(DF_Window *ws) //- rjf: draw current interaction regs { - DF_Regs *regs = df_regs(); + RD_Regs *regs = rd_regs(); #define Handle(name) ui_labelf("%s: [0x%I64x, 0x%I64x]", #name, (regs->name).u64[0], (regs->name).u64[1]) Handle(window); Handle(panel); @@ -3179,7 +3133,7 @@ df_window_frame(DF_Window *ws) ui_divider(ui_em(1.f, 1.f)); //- rjf: draw per-window stats - for(DF_Window *window = df_state->first_window; window != 0; window = window->next) + for(RD_Window *window = rd_state->first_window; window != 0; window = window->next) { // rjf: calc ui hash chain length F64 avg_ui_hash_chain_length = 0; @@ -3201,7 +3155,7 @@ df_window_frame(DF_Window *ws) } avg_ui_hash_chain_length = chain_length_sum / chain_count; } - ui_labelf("Target Hz: %.2f", 1.f/df_state->frame_dt); + ui_labelf("Target Hz: %.2f", 1.f/rd_state->frame_dt); ui_labelf("Ctrl Run Index: %I64u", ctrl_run_gen()); ui_labelf("Ctrl Mem Gen Index: %I64u", ctrl_mem_gen()); ui_labelf("Window %p", window); @@ -3224,18 +3178,18 @@ df_window_frame(DF_Window *ws) ui_divider(ui_em(1.f, 1.f)); //- rjf: draw entity tree - DF_EntityRec rec = {0}; + RD_EntityRec rec = {0}; S32 indent = 0; UI_PrefWidth(ui_text_dim(10, 1)) ui_labelf("Entity Tree:"); - for(DF_Entity *e = df_entity_root(); !df_entity_is_nil(e); e = rec.next) + for(RD_Entity *e = rd_entity_root(); !rd_entity_is_nil(e); e = rec.next) { ui_set_next_pref_width(ui_children_sum(1)); ui_set_next_pref_height(ui_children_sum(1)); UI_Row { ui_spacer(ui_em(2.f*indent, 1.f)); - DF_Entity *dst = df_entity_from_handle(e->entity_handle); - if(!df_entity_is_nil(dst)) + RD_Entity *dst = rd_entity_from_handle(e->entity_handle); + if(!rd_entity_is_nil(dst)) { ui_labelf("[link] %S -> %S", e->string, dst->string); } @@ -3244,7 +3198,7 @@ df_window_frame(DF_Window *ws) ui_labelf("%S: %S", d_entity_kind_display_string_table[e->kind], e->string); } } - rec = df_entity_rec_depth_first_pre(e, df_entity_root()); + rec = rd_entity_rec_depth_first_pre(e, rd_entity_root()); indent += rec.push_count; indent -= rec.pop_count; } @@ -3254,30 +3208,30 @@ df_window_frame(DF_Window *ws) //////////////////////////// //- rjf: universal ctx menus // - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) { Temp scratch = scratch_begin(0, 0); //- rjf: auto-close entity ctx menu - if(ui_ctx_menu_is_open(df_state->entity_ctx_menu_key)) + if(ui_ctx_menu_is_open(rd_state->entity_ctx_menu_key)) { - DF_Entity *entity = df_entity_from_handle(ws->entity_ctx_menu_entity); - if(df_entity_is_nil(entity)) + RD_Entity *entity = rd_entity_from_handle(ws->entity_ctx_menu_entity); + if(rd_entity_is_nil(entity)) { ui_ctx_menu_close(); } } //- rjf: code ctx menu - UI_CtxMenu(df_state->code_ctx_menu_key) + UI_CtxMenu(rd_state->code_ctx_menu_key) UI_PrefWidth(ui_em(40.f, 1.f)) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) { TXT_Scope *txt_scope = txt_scope_open(); HS_Scope *hs_scope = hs_scope_open(); TxtRng range = ws->code_ctx_menu_range; D_LineList lines = ws->code_ctx_menu_lines; - if(!txt_pt_match(range.min, range.max) && ui_clicked(df_cmd_spec_button(df_cmd_kind_info_table[DF_CmdKind_Copy].string))) + if(!txt_pt_match(range.min, range.max) && ui_clicked(rd_cmd_spec_button(rd_cmd_kind_info_table[RD_CmdKind_Copy].string))) { U128 hash = {0}; TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, ws->code_ctx_menu_text_key, ws->code_ctx_menu_lang_kind, &hash); @@ -3286,9 +3240,9 @@ df_window_frame(DF_Window *ws) os_set_clipboard_text(copy_data); ui_ctx_menu_close(); } - if(range.min.line == range.max.line && ui_clicked(df_icon_buttonf(DF_IconKind_RightArrow, 0, "Set Next Statement"))) + if(range.min.line == range.max.line && ui_clicked(rd_icon_buttonf(RD_IconKind_RightArrow, 0, "Set Next Statement"))) { - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); U64 new_rip_vaddr = ws->code_ctx_menu_vaddr; if(ws->code_ctx_menu_file_path.size != 0) { @@ -3303,22 +3257,22 @@ df_window_frame(DF_Window *ws) } } } - df_cmd(DF_CmdKind_SetThreadIP, .vaddr = new_rip_vaddr); + rd_cmd(RD_CmdKind_SetThreadIP, .vaddr = new_rip_vaddr); ui_ctx_menu_close(); } - if(range.min.line == range.max.line && ui_clicked(df_icon_buttonf(DF_IconKind_Play, 0, "Run To Line"))) + if(range.min.line == range.max.line && ui_clicked(rd_icon_buttonf(RD_IconKind_Play, 0, "Run To Line"))) { if(ws->code_ctx_menu_file_path.size != 0) { - df_cmd(DF_CmdKind_RunToLine, .file_path = ws->code_ctx_menu_file_path, .cursor = range.min); + rd_cmd(RD_CmdKind_RunToLine, .file_path = ws->code_ctx_menu_file_path, .cursor = range.min); } else { - df_cmd(DF_CmdKind_RunToAddress, .vaddr = ws->code_ctx_menu_vaddr); + rd_cmd(RD_CmdKind_RunToAddress, .vaddr = ws->code_ctx_menu_vaddr); } ui_ctx_menu_close(); } - if(range.min.line == range.max.line && ui_clicked(df_icon_buttonf(DF_IconKind_Null, 0, "Go To Name"))) + if(range.min.line == range.max.line && ui_clicked(rd_icon_buttonf(RD_IconKind_Null, 0, "Go To Name"))) { U128 hash = {0}; TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, ws->code_ctx_menu_text_key, ws->code_ctx_menu_lang_kind, &hash); @@ -3333,18 +3287,18 @@ df_window_frame(DF_Window *ws) expr_off_range = txt_expr_off_range_from_info_data_pt(&info, data, range.min); } String8 expr = str8_substr(data, expr_off_range); - df_cmd(DF_CmdKind_GoToName, .string = expr); + rd_cmd(RD_CmdKind_GoToName, .string = expr); ui_ctx_menu_close(); } - if(range.min.line == range.max.line && ui_clicked(df_icon_buttonf(DF_IconKind_CircleFilled, 0, "Toggle Breakpoint"))) + if(range.min.line == range.max.line && ui_clicked(rd_icon_buttonf(RD_IconKind_CircleFilled, 0, "Toggle Breakpoint"))) { - df_cmd(DF_CmdKind_ToggleBreakpoint, + rd_cmd(RD_CmdKind_ToggleBreakpoint, .file_path = ws->code_ctx_menu_file_path, .cursor = range.min, .vaddr = ws->code_ctx_menu_vaddr); ui_ctx_menu_close(); } - if(range.min.line == range.max.line && ui_clicked(df_icon_buttonf(DF_IconKind_Binoculars, 0, "Toggle Watch Expression"))) + if(range.min.line == range.max.line && ui_clicked(rd_icon_buttonf(RD_IconKind_Binoculars, 0, "Toggle Watch Expression"))) { U128 hash = {0}; TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, ws->code_ctx_menu_text_key, ws->code_ctx_menu_lang_kind, &hash); @@ -3359,22 +3313,22 @@ df_window_frame(DF_Window *ws) expr_off_range = txt_expr_off_range_from_info_data_pt(&info, data, range.min); } String8 expr = str8_substr(data, expr_off_range); - df_cmd(DF_CmdKind_ToggleWatchExpression, .string = expr); + rd_cmd(RD_CmdKind_ToggleWatchExpression, .string = expr); ui_ctx_menu_close(); } - if(ws->code_ctx_menu_file_path.size == 0 && range.min.line == range.max.line && ui_clicked(df_icon_buttonf(DF_IconKind_FileOutline, 0, "Go To Source"))) + if(ws->code_ctx_menu_file_path.size == 0 && range.min.line == range.max.line && ui_clicked(rd_icon_buttonf(RD_IconKind_FileOutline, 0, "Go To Source"))) { if(lines.first != 0) { - df_cmd(DF_CmdKind_FindCodeLocation, + rd_cmd(RD_CmdKind_FindCodeLocation, .file_path = lines.first->v.file_path, .cursor = lines.first->v.pt); } ui_ctx_menu_close(); } - if(ws->code_ctx_menu_file_path.size != 0 && range.min.line == range.max.line && ui_clicked(df_icon_buttonf(DF_IconKind_FileOutline, 0, "Go To Disassembly"))) + if(ws->code_ctx_menu_file_path.size != 0 && range.min.line == range.max.line && ui_clicked(rd_icon_buttonf(RD_IconKind_FileOutline, 0, "Go To Disassembly"))) { - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); U64 vaddr = 0; for(D_LineNode *n = lines.first; n != 0; n = n->next) { @@ -3386,7 +3340,7 @@ df_window_frame(DF_Window *ws) break; } } - df_cmd(DF_CmdKind_FindCodeLocation, .vaddr = vaddr); + rd_cmd(RD_CmdKind_FindCodeLocation, .vaddr = vaddr); ui_ctx_menu_close(); } hs_scope_close(hs_scope); @@ -3394,197 +3348,197 @@ df_window_frame(DF_Window *ws) } //- rjf: entity menu - UI_CtxMenu(df_state->entity_ctx_menu_key) + UI_CtxMenu(rd_state->entity_ctx_menu_key) UI_PrefWidth(ui_em(40.f, 1.f)) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) { - DF_Entity *entity = df_entity_from_handle(ws->entity_ctx_menu_entity); + RD_Entity *entity = rd_entity_from_handle(ws->entity_ctx_menu_entity); CTRL_Entity *entity_ctrl = ctrl_entity_from_handle(d_state->ctrl_entity_store, entity->ctrl_handle); - DF_IconKind entity_icon = df_entity_kind_icon_kind_table[entity->kind]; - DF_EntityKindFlags kind_flags = d_entity_kind_flags_table[entity->kind]; - String8 display_name = df_display_string_from_entity(scratch.arena, entity); + RD_IconKind entity_icon = rd_entity_kind_icon_kind_table[entity->kind]; + RD_EntityKindFlags kind_flags = rd_entity_kind_flags_table[entity->kind]; + String8 display_name = rd_display_string_from_entity(scratch.arena, entity); // rjf: title UI_Row { ui_spacer(ui_em(1.f, 1.f)); - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) UI_PrefWidth(ui_em(2.f, 1.f)) UI_PrefHeight(ui_pct(1, 0)) UI_TextAlignment(UI_TextAlign_Center) UI_Flags(UI_BoxFlag_DrawTextWeak) - ui_label(df_g_icon_kind_text_table[entity_icon]); + ui_label(rd_icon_kind_text_table[entity_icon]); UI_PrefWidth(ui_text_dim(10, 1)) UI_Flags(UI_BoxFlag_DrawTextWeak) ui_label(d_entity_kind_display_string_table[entity->kind]); { UI_Palette *palette = ui_top_palette(); - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & RD_EntityFlag_HasColor) { - palette = ui_build_palette(ui_top_palette(), .text = df_rgba_from_entity(entity)); + palette = ui_build_palette(ui_top_palette(), .text = rd_rgba_from_entity(entity)); } UI_Palette(palette) UI_PrefWidth(ui_text_dim(10, 1)) - DF_Font((kind_flags & DF_EntityKindFlag_NameIsCode) ? DF_FontSlot_Code : DF_FontSlot_Main) + RD_Font((kind_flags & RD_EntityKindFlag_NameIsCode) ? RD_FontSlot_Code : RD_FontSlot_Main) ui_label(display_name); } } - DF_Palette(DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); + RD_Palette(RD_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); // rjf: name editor - if(kind_flags & DF_EntityKindFlag_CanRename) UI_TextPadding(ui_top_font_size()*1.5f) + if(kind_flags & RD_EntityKindFlag_CanRename) UI_TextPadding(ui_top_font_size()*1.5f) { - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, entity->string, "%S###entity_name_edit_%p", d_entity_kind_name_label_table[entity->kind], entity); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, entity->string, "%S###entity_name_edit_%p", d_entity_kind_name_label_table[entity->kind], entity); if(ui_committed(sig)) { - df_cmd(DF_CmdKind_NameEntity, - .entity = df_handle_from_entity(entity), + rd_cmd(RD_CmdKind_NameEntity, + .entity = rd_handle_from_entity(entity), .string = str8(ws->entity_ctx_menu_input_buffer, ws->entity_ctx_menu_input_size)); } } // rjf: condition editor - if(kind_flags & DF_EntityKindFlag_CanCondition) - DF_Font(DF_FontSlot_Code) + if(kind_flags & RD_EntityKindFlag_CanCondition) + RD_Font(RD_FontSlot_Code) UI_TextPadding(ui_top_font_size()*1.5f) { - DF_Entity *condition = df_entity_child_from_kind(entity, DF_EntityKind_Condition); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border|DF_LineEditFlag_CodeContents, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, condition->string, "Condition###entity_cond_edit_%p", entity); + RD_Entity *condition = rd_entity_child_from_kind(entity, RD_EntityKind_Condition); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border|RD_LineEditFlag_CodeContents, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, condition->string, "Condition###entity_cond_edit_%p", entity); if(ui_committed(sig)) { String8 new_string = str8(ws->entity_ctx_menu_input_buffer, ws->entity_ctx_menu_input_size); if(new_string.size != 0) { - if(df_entity_is_nil(condition)) + if(rd_entity_is_nil(condition)) { - condition = df_entity_alloc(entity, DF_EntityKind_Condition); + condition = rd_entity_alloc(entity, RD_EntityKind_Condition); } - df_cmd(DF_CmdKind_NameEntity, .entity = df_handle_from_entity(condition), .string = new_string); + rd_cmd(RD_CmdKind_NameEntity, .entity = rd_handle_from_entity(condition), .string = new_string); } - else if(!df_entity_is_nil(condition)) + else if(!rd_entity_is_nil(condition)) { - df_entity_mark_for_deletion(condition); + rd_entity_mark_for_deletion(condition); } } } // rjf: exe editor - if(entity->kind == DF_EntityKind_Target) UI_TextPadding(ui_top_font_size()*1.5f) + if(entity->kind == RD_EntityKind_Target) UI_TextPadding(ui_top_font_size()*1.5f) { - DF_Entity *exe = df_entity_child_from_kind(entity, DF_EntityKind_Executable); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, exe->string, "Executable###entity_exe_edit_%p", entity); + RD_Entity *exe = rd_entity_child_from_kind(entity, RD_EntityKind_Executable); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, exe->string, "Executable###entity_exe_edit_%p", entity); if(ui_committed(sig)) { String8 new_string = str8(ws->entity_ctx_menu_input_buffer, ws->entity_ctx_menu_input_size); if(new_string.size != 0) { - if(df_entity_is_nil(exe)) + if(rd_entity_is_nil(exe)) { - exe = df_entity_alloc(entity, DF_EntityKind_Executable); + exe = rd_entity_alloc(entity, RD_EntityKind_Executable); } - df_cmd(DF_CmdKind_NameEntity, .entity = df_handle_from_entity(exe), .string = new_string); + rd_cmd(RD_CmdKind_NameEntity, .entity = rd_handle_from_entity(exe), .string = new_string); } - else if(!df_entity_is_nil(exe)) + else if(!rd_entity_is_nil(exe)) { - df_entity_mark_for_deletion(exe); + rd_entity_mark_for_deletion(exe); } } } // rjf: arguments editors - if(entity->kind == DF_EntityKind_Target) UI_TextPadding(ui_top_font_size()*1.5f) + if(entity->kind == RD_EntityKind_Target) UI_TextPadding(ui_top_font_size()*1.5f) { - DF_Entity *args = df_entity_child_from_kind(entity, DF_EntityKind_Arguments); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, args->string, "Arguments###entity_args_edit_%p", entity); + RD_Entity *args = rd_entity_child_from_kind(entity, RD_EntityKind_Arguments); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &ws->entity_ctx_menu_input_cursor, &ws->entity_ctx_menu_input_mark, ws->entity_ctx_menu_input_buffer, sizeof(ws->entity_ctx_menu_input_buffer), &ws->entity_ctx_menu_input_size, 0, args->string, "Arguments###entity_args_edit_%p", entity); if(ui_committed(sig)) { String8 new_string = str8(ws->entity_ctx_menu_input_buffer, ws->entity_ctx_menu_input_size); if(new_string.size != 0) { - if(df_entity_is_nil(args)) + if(rd_entity_is_nil(args)) { - args = df_entity_alloc(entity, DF_EntityKind_Arguments); + args = rd_entity_alloc(entity, RD_EntityKind_Arguments); } - df_cmd(DF_CmdKind_NameEntity, .entity = df_handle_from_entity(args), .string = new_string); + rd_cmd(RD_CmdKind_NameEntity, .entity = rd_handle_from_entity(args), .string = new_string); } - else if(!df_entity_is_nil(args)) + else if(!rd_entity_is_nil(args)) { - df_entity_mark_for_deletion(args); + rd_entity_mark_for_deletion(args); } } } // rjf: copy name - if(ui_clicked(df_icon_buttonf(DF_IconKind_Clipboard, 0, "Copy Name"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Clipboard, 0, "Copy Name"))) { os_set_clipboard_text(display_name); ui_ctx_menu_close(); } // rjf: is command line only? -> make permanent - if(entity->cfg_src == DF_CfgSrc_CommandLine && ui_clicked(df_icon_buttonf(DF_IconKind_Save, 0, "Save To Project"))) + if(entity->cfg_src == RD_CfgSrc_CommandLine && ui_clicked(rd_icon_buttonf(RD_IconKind_Save, 0, "Save To Project"))) { - df_entity_equip_cfg_src(entity, DF_CfgSrc_Project); + rd_entity_equip_cfg_src(entity, RD_CfgSrc_Project); } // rjf: duplicate - if(kind_flags & DF_EntityKindFlag_CanDuplicate && ui_clicked(df_icon_buttonf(DF_IconKind_XSplit, 0, "Duplicate"))) + if(kind_flags & RD_EntityKindFlag_CanDuplicate && ui_clicked(rd_icon_buttonf(RD_IconKind_XSplit, 0, "Duplicate"))) { - df_cmd(DF_CmdKind_DuplicateEntity, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_DuplicateEntity, .entity = rd_handle_from_entity(entity)); ui_ctx_menu_close(); } // rjf: edit - if(kind_flags & DF_EntityKindFlag_CanEdit && ui_clicked(df_icon_buttonf(DF_IconKind_Pencil, 0, "Edit"))) + if(kind_flags & RD_EntityKindFlag_CanEdit && ui_clicked(rd_icon_buttonf(RD_IconKind_Pencil, 0, "Edit"))) { - df_cmd(DF_CmdKind_EditEntity, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_EditEntity, .entity = rd_handle_from_entity(entity)); ui_ctx_menu_close(); } // rjf: deletion - if(kind_flags & DF_EntityKindFlag_CanDelete && ui_clicked(df_icon_buttonf(DF_IconKind_Trash, 0, "Delete"))) + if(kind_flags & RD_EntityKindFlag_CanDelete && ui_clicked(rd_icon_buttonf(RD_IconKind_Trash, 0, "Delete"))) { - df_cmd(DF_CmdKind_RemoveEntity, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_RemoveEntity, .entity = rd_handle_from_entity(entity)); ui_ctx_menu_close(); } // rjf: enabling - if(kind_flags & DF_EntityKindFlag_CanEnable) + if(kind_flags & RD_EntityKindFlag_CanEnable) { B32 is_enabled = !entity->disabled; - if(!is_enabled && ui_clicked(df_icon_buttonf(DF_IconKind_CheckHollow, 0, "Enable###enabler"))) + if(!is_enabled && ui_clicked(rd_icon_buttonf(RD_IconKind_CheckHollow, 0, "Enable###enabler"))) { - df_cmd(DF_CmdKind_EnableEntity, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_EnableEntity, .entity = rd_handle_from_entity(entity)); } - if(is_enabled && ui_clicked(df_icon_buttonf(DF_IconKind_CheckFilled, 0, "Disable###enabler"))) + if(is_enabled && ui_clicked(rd_icon_buttonf(RD_IconKind_CheckFilled, 0, "Disable###enabler"))) { - df_cmd(DF_CmdKind_DisableEntity, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_DisableEntity, .entity = rd_handle_from_entity(entity)); } } // rjf: freezing - if(kind_flags & DF_EntityKindFlag_CanFreeze) + if(kind_flags & RD_EntityKindFlag_CanFreeze) { B32 is_frozen = ctrl_entity_tree_is_frozen(entity_ctrl); - ui_set_next_palette(df_palette_from_code(is_frozen ? DF_PaletteCode_NegativePopButton : DF_PaletteCode_PositivePopButton)); - if(is_frozen && ui_clicked(df_icon_buttonf(DF_IconKind_Locked, 0, "Thaw###freeze_thaw"))) + ui_set_next_palette(rd_palette_from_code(is_frozen ? RD_PaletteCode_NegativePopButton : RD_PaletteCode_PositivePopButton)); + if(is_frozen && ui_clicked(rd_icon_buttonf(RD_IconKind_Locked, 0, "Thaw###freeze_thaw"))) { - df_cmd(DF_CmdKind_ThawEntity, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_ThawEntity, .entity = rd_handle_from_entity(entity)); } - if(!is_frozen && ui_clicked(df_icon_buttonf(DF_IconKind_Unlocked, 0, "Freeze###freeze_thaw"))) + if(!is_frozen && ui_clicked(rd_icon_buttonf(RD_IconKind_Unlocked, 0, "Freeze###freeze_thaw"))) { - df_cmd(DF_CmdKind_FreezeEntity, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_FreezeEntity, .entity = rd_handle_from_entity(entity)); } } // rjf: go-to-location { - DF_Entity *loc = df_entity_child_from_kind(entity, DF_EntityKind_Location); - if(!df_entity_is_nil(loc) && ui_clicked(df_icon_buttonf(DF_IconKind_FileOutline, 0, "Go To Location"))) + RD_Entity *loc = rd_entity_child_from_kind(entity, RD_EntityKind_Location); + if(!rd_entity_is_nil(loc) && ui_clicked(rd_icon_buttonf(RD_IconKind_FileOutline, 0, "Go To Location"))) { - df_cmd(DF_CmdKind_FindCodeLocation, + rd_cmd(RD_CmdKind_FindCodeLocation, .file_path = loc->string, .cursor = loc->text_point, .vaddr = loc->vaddr); @@ -3599,25 +3553,25 @@ df_window_frame(DF_Window *ws) { }break; - case DF_EntityKind_Process: - case DF_EntityKind_Thread: + case RD_EntityKind_Process: + case RD_EntityKind_Thread: { - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == RD_EntityKind_Thread) { CTRL_Entity *entity_ctrl = ctrl_entity_from_handle(d_state->ctrl_entity_store, entity->ctrl_handle); - B32 is_selected = ctrl_handle_match(df_base_regs()->thread, entity_ctrl->handle); + B32 is_selected = ctrl_handle_match(rd_base_regs()->thread, entity_ctrl->handle); if(is_selected) { - df_icon_buttonf(DF_IconKind_Thread, 0, "[Selected]###select_entity"); + rd_icon_buttonf(RD_IconKind_Thread, 0, "[Selected]###select_entity"); } - else if(ui_clicked(df_icon_buttonf(DF_IconKind_Thread, 0, "Select###select_entity"))) + else if(ui_clicked(rd_icon_buttonf(RD_IconKind_Thread, 0, "Select###select_entity"))) { - df_cmd(DF_CmdKind_SelectThread, .thread = entity_ctrl->handle); + rd_cmd(RD_CmdKind_SelectThread, .thread = entity_ctrl->handle); ui_ctx_menu_close(); } } - if(ui_clicked(df_icon_buttonf(DF_IconKind_Clipboard, 0, "Copy ID"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Clipboard, 0, "Copy ID"))) { U32 ctrl_id = entity->ctrl_id; String8 string = push_str8f(scratch.arena, "%i", (int)ctrl_id); @@ -3625,9 +3579,9 @@ df_window_frame(DF_Window *ws) ui_ctx_menu_close(); } - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == RD_EntityKind_Thread) { - if(ui_clicked(df_icon_buttonf(DF_IconKind_Clipboard, 0, "Copy Instruction Pointer Address"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Clipboard, 0, "Copy Instruction Pointer Address"))) { CTRL_Entity *entity_ctrl = ctrl_entity_from_handle(d_state->ctrl_entity_store, entity->ctrl_handle); U64 rip = d_query_cached_rip_from_thread(entity_ctrl); @@ -3637,9 +3591,9 @@ df_window_frame(DF_Window *ws) } } - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == RD_EntityKind_Thread) { - if(ui_clicked(df_icon_buttonf(DF_IconKind_Clipboard, 0, "Copy Call Stack"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Clipboard, 0, "Copy Call Stack"))) { DI_Scope *di_scope = di_scope_open(); CTRL_Entity *entity_ctrl = ctrl_entity_from_handle(d_state->ctrl_entity_store, entity->ctrl_handle); @@ -3687,19 +3641,19 @@ df_window_frame(DF_Window *ws) } } - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == RD_EntityKind_Thread) { - if(ui_clicked(df_icon_buttonf(DF_IconKind_FileOutline, 0, "Find"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_FileOutline, 0, "Find"))) { - df_cmd(DF_CmdKind_FindThread, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_FindThread, .entity = rd_handle_from_entity(entity)); ui_ctx_menu_close(); } } }break; - case DF_EntityKind_Module: + case RD_EntityKind_Module: { - UI_Signal copy_full_path_sig = df_icon_buttonf(DF_IconKind_Clipboard, 0, "Copy Full Path"); + UI_Signal copy_full_path_sig = rd_icon_buttonf(RD_IconKind_Clipboard, 0, "Copy Full Path"); if(ui_clicked(copy_full_path_sig)) { String8 string = entity->string; @@ -3711,14 +3665,14 @@ df_window_frame(DF_Window *ws) String8 string = entity->string; ui_label(string); } - if(ui_clicked(df_icon_buttonf(DF_IconKind_Clipboard, 0, "Copy Base Address"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Clipboard, 0, "Copy Base Address"))) { Rng1U64 vaddr_rng = entity->vaddr_rng; String8 string = push_str8f(scratch.arena, "0x%I64x", vaddr_rng.min); os_set_clipboard_text(string); ui_ctx_menu_close(); } - if(ui_clicked(df_icon_buttonf(DF_IconKind_Clipboard, 0, "Copy Address Range Size"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Clipboard, 0, "Copy Address Range Size"))) { Rng1U64 vaddr_rng = entity->vaddr_rng; String8 string = push_str8f(scratch.arena, "0x%I64x", dim_1u64(vaddr_rng)); @@ -3727,26 +3681,26 @@ df_window_frame(DF_Window *ws) } }break; - case DF_EntityKind_Target: + case RD_EntityKind_Target: { - if(ui_clicked(df_icon_buttonf(DF_IconKind_Play, 0, "Launch And Run"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Play, 0, "Launch And Run"))) { - df_cmd(DF_CmdKind_LaunchAndRun, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_LaunchAndRun, .entity = rd_handle_from_entity(entity)); ui_ctx_menu_close(); } - if(ui_clicked(df_icon_buttonf(DF_IconKind_PlayStepForward, 0, "Launch And Initialize"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_PlayStepForward, 0, "Launch And Initialize"))) { - df_cmd(DF_CmdKind_LaunchAndInit, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_LaunchAndInit, .entity = rd_handle_from_entity(entity)); ui_ctx_menu_close(); } }break; } - DF_Palette(DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); + RD_Palette(RD_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); // rjf: color editor { - B32 entity_has_color = entity->flags & DF_EntityFlag_HasColor; + B32 entity_has_color = entity->flags & RD_EntityFlag_HasColor; if(entity_has_color) { UI_Padding(ui_em(1.5f, 1.f)) @@ -3803,54 +3757,54 @@ df_window_frame(DF_Window *ws) } UI_Row UI_Padding(ui_pct(1, 0)) UI_PrefWidth(ui_em(16.f, 1.f)) UI_CornerRadius(8.f) UI_TextAlignment(UI_TextAlign_Center) - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) { - if(ui_clicked(df_icon_buttonf(DF_IconKind_Trash, 0, "Remove Color###color_toggle"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Trash, 0, "Remove Color###color_toggle"))) { - entity->flags &= ~DF_EntityFlag_HasColor; + entity->flags &= ~RD_EntityFlag_HasColor; } } ui_spacer(ui_em(1.5f, 1.f)); } - if(!entity_has_color && ui_clicked(df_icon_buttonf(DF_IconKind_Palette, 0, "Apply Color###color_toggle"))) + if(!entity_has_color && ui_clicked(rd_icon_buttonf(RD_IconKind_Palette, 0, "Apply Color###color_toggle"))) { - df_entity_equip_color_rgba(entity, v4f32(1, 1, 1, 1)); + rd_entity_equip_color_rgba(entity, v4f32(1, 1, 1, 1)); } } } //- rjf: auto-close tab ctx menu - if(ui_ctx_menu_is_open(df_state->tab_ctx_menu_key)) + if(ui_ctx_menu_is_open(rd_state->tab_ctx_menu_key)) { - DF_View *tab = df_view_from_handle(ws->tab_ctx_menu_view); - if(df_view_is_nil(tab)) + RD_View *tab = rd_view_from_handle(ws->tab_ctx_menu_view); + if(rd_view_is_nil(tab)) { ui_ctx_menu_close(); } } //- rjf: tab menu - UI_CtxMenu(df_state->tab_ctx_menu_key) UI_PrefWidth(ui_em(40.f, 1.f)) UI_CornerRadius(0) - DF_Palette(DF_PaletteCode_ImplicitButton) + UI_CtxMenu(rd_state->tab_ctx_menu_key) UI_PrefWidth(ui_em(40.f, 1.f)) UI_CornerRadius(0) + RD_Palette(RD_PaletteCode_ImplicitButton) { - DF_Panel *panel = df_panel_from_handle(ws->tab_ctx_menu_panel); - DF_View *view = df_view_from_handle(ws->tab_ctx_menu_view); - DF_IconKind view_icon = df_icon_kind_from_view(view); - DR_FancyStringList fstrs = df_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); - String8 file_path = d_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); + RD_Panel *panel = rd_panel_from_handle(ws->tab_ctx_menu_panel); + RD_View *view = rd_view_from_handle(ws->tab_ctx_menu_view); + RD_IconKind view_icon = rd_icon_kind_from_view(view); + DR_FancyStringList fstrs = rd_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); + String8 file_path = rd_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); // rjf: title UI_Row { ui_spacer(ui_em(1.f, 1.f)); - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) UI_PrefWidth(ui_em(2.f, 1.f)) UI_PrefHeight(ui_pct(1, 0)) UI_TextAlignment(UI_TextAlign_Center) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - ui_label(df_g_icon_kind_text_table[view_icon]); + ui_label(rd_icon_kind_text_table[view_icon]); UI_PrefWidth(ui_text_dim(10, 1)) { UI_Box *name_box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); @@ -3858,10 +3812,10 @@ df_window_frame(DF_Window *ws) } } - DF_Palette(DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); + RD_Palette(RD_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); // rjf: copy name - if(ui_clicked(df_icon_buttonf(DF_IconKind_Clipboard, 0, "Copy Name"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Clipboard, 0, "Copy Name"))) { os_set_clipboard_text(dr_string_from_fancy_string_list(scratch.arena, &fstrs)); ui_ctx_menu_close(); @@ -3870,7 +3824,7 @@ df_window_frame(DF_Window *ws) // rjf: copy full path if(file_path.size != 0) { - UI_Signal copy_full_path_sig = df_icon_buttonf(DF_IconKind_Clipboard, 0, "Copy Full Path"); + UI_Signal copy_full_path_sig = rd_icon_buttonf(RD_IconKind_Clipboard, 0, "Copy Full Path"); String8 full_path = path_normalized_from_string(scratch.arena, file_path); if(ui_clicked(copy_full_path_sig)) { @@ -3886,7 +3840,7 @@ df_window_frame(DF_Window *ws) // rjf: show in explorer if(file_path.size != 0) { - UI_Signal sig = df_icon_buttonf(DF_IconKind_FolderClosedFilled, 0, "Show In Explorer"); + UI_Signal sig = rd_icon_buttonf(RD_IconKind_FolderClosedFilled, 0, "Show In Explorer"); if(ui_clicked(sig)) { String8 full_path = path_normalized_from_string(scratch.arena, file_path); @@ -3896,29 +3850,29 @@ df_window_frame(DF_Window *ws) } // rjf: filter controls - if(view->spec->info.flags & DF_ViewSpecFlag_CanFilter) + if(view->spec->info.flags & RD_ViewSpecFlag_CanFilter) { - if(ui_clicked(df_cmd_spec_button(df_cmd_kind_info_table[DF_CmdKind_Filter].display_name))) + if(ui_clicked(rd_cmd_spec_button(rd_cmd_kind_info_table[RD_CmdKind_Filter].display_name))) { - df_cmd(DF_CmdKind_Filter, .view = df_handle_from_view(view)); + rd_cmd(RD_CmdKind_Filter, .view = rd_handle_from_view(view)); ui_ctx_menu_close(); } - if(ui_clicked(df_cmd_spec_button(df_cmd_kind_info_table[DF_CmdKind_ClearFilter].display_name))) + if(ui_clicked(rd_cmd_spec_button(rd_cmd_kind_info_table[RD_CmdKind_ClearFilter].display_name))) { - df_cmd(DF_CmdKind_ClearFilter, .view = df_handle_from_view(view)); + rd_cmd(RD_CmdKind_ClearFilter, .view = rd_handle_from_view(view)); ui_ctx_menu_close(); } } // rjf: close tab - if(ui_clicked(df_icon_buttonf(DF_IconKind_X, 0, "Close Tab"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_X, 0, "Close Tab"))) { - df_cmd(DF_CmdKind_CloseTab, .panel = df_handle_from_panel(panel), .view = df_handle_from_view(view)); + rd_cmd(RD_CmdKind_CloseTab, .panel = rd_handle_from_panel(panel), .view = rd_handle_from_view(view)); ui_ctx_menu_close(); } // rjf: param tree editing - UI_TextPadding(ui_top_font_size()*1.5f) DF_Font(DF_FontSlot_Code) + UI_TextPadding(ui_top_font_size()*1.5f) RD_Font(RD_FontSlot_Code) { Temp scratch = scratch_begin(0, 0); D_ViewRuleSpec *core_vr_spec = d_view_rule_spec_from_string(view->spec->info.name); @@ -3930,7 +3884,7 @@ df_window_frame(DF_Window *ws) { if(!md_node_is_nil(schema_root->first)) { - DF_Palette(DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); + RD_Palette(RD_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); } for(MD_EachNode(key, schema_root->first)) { @@ -3940,11 +3894,11 @@ df_window_frame(DF_Window *ws) MD_Node *param_tree = md_child_from_string(params, key->string, 0); String8 pre_edit_value = md_string_from_children(scratch.arena, param_tree); UI_PrefWidth(ui_em(10.f, 1.f)) ui_label(key->string); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border|DF_LineEditFlag_CodeContents, 0, 0, &ws->tab_ctx_menu_input_cursor, &ws->tab_ctx_menu_input_mark, ws->tab_ctx_menu_input_buffer, sizeof(ws->tab_ctx_menu_input_buffer), &ws->tab_ctx_menu_input_size, 0, pre_edit_value, "%S##view_param", key->string); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border|RD_LineEditFlag_CodeContents, 0, 0, &ws->tab_ctx_menu_input_cursor, &ws->tab_ctx_menu_input_mark, ws->tab_ctx_menu_input_buffer, sizeof(ws->tab_ctx_menu_input_buffer), &ws->tab_ctx_menu_input_size, 0, pre_edit_value, "%S##view_param", key->string); if(ui_committed(sig)) { String8 new_string = str8(ws->tab_ctx_menu_input_buffer, ws->tab_ctx_menu_input_size); - df_view_store_param(view, key->string, new_string); + rd_view_store_param(view, key->string, new_string); } } } @@ -3961,16 +3915,16 @@ df_window_frame(DF_Window *ws) //- rjf: confirmation popup // { - if(df_state->confirm_t > 0.005f) UI_TextAlignment(UI_TextAlign_Center) UI_Focus(df_state->confirm_active ? UI_FocusKind_Root : UI_FocusKind_Off) + if(rd_state->confirm_t > 0.005f) UI_TextAlignment(UI_TextAlign_Center) UI_Focus(rd_state->confirm_active ? UI_FocusKind_Root : UI_FocusKind_Off) { Vec2F32 window_dim = dim_2f32(window_rect); UI_Box *bg_box = &ui_g_nil_box; - UI_Palette *palette = ui_build_palette(df_palette_from_code(DF_PaletteCode_Floating)); - palette->background.w *= df_state->confirm_t; + UI_Palette *palette = ui_build_palette(rd_palette_from_code(RD_PaletteCode_Floating)); + palette->background.w *= rd_state->confirm_t; UI_Rect(window_rect) UI_ChildLayoutAxis(Axis2_X) UI_Focus(UI_FocusKind_On) - UI_BlurSize(10*df_state->confirm_t) + UI_BlurSize(10*rd_state->confirm_t) UI_Palette(palette) { bg_box = ui_build_box_from_stringf(UI_BoxFlag_FixedSize| @@ -3982,28 +3936,28 @@ df_window_frame(DF_Window *ws) UI_BoxFlag_DrawBackgroundBlur| UI_BoxFlag_DrawBackground, "###confirm_popup_%p", ws); } - if(df_state->confirm_active) UI_Parent(bg_box) UI_Transparency(1-df_state->confirm_t) + if(rd_state->confirm_active) UI_Parent(bg_box) UI_Transparency(1-rd_state->confirm_t) { ui_ctx_menu_close(); UI_WidthFill UI_PrefHeight(ui_children_sum(1.f)) UI_Column UI_Padding(ui_pct(1, 0)) { - UI_TextRasterFlags(df_raster_flags_from_slot(DF_FontSlot_Main)) UI_FontSize(ui_top_font_size()*2.f) UI_PrefHeight(ui_em(3.f, 1.f)) ui_label(df_state->confirm_title); - UI_PrefHeight(ui_em(3.f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(df_state->confirm_desc); + UI_TextRasterFlags(rd_raster_flags_from_slot(RD_FontSlot_Main)) UI_FontSize(ui_top_font_size()*2.f) UI_PrefHeight(ui_em(3.f, 1.f)) ui_label(rd_state->confirm_title); + UI_PrefHeight(ui_em(3.f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(rd_state->confirm_desc); ui_spacer(ui_em(1.5f, 1.f)); UI_Row UI_Padding(ui_pct(1.f, 0.f)) UI_WidthFill UI_PrefHeight(ui_em(5.f, 1.f)) { UI_CornerRadius00(ui_top_font_size()*0.25f) UI_CornerRadius01(ui_top_font_size()*0.25f) - DF_Palette(DF_PaletteCode_NeutralPopButton) + RD_Palette(RD_PaletteCode_NeutralPopButton) if(ui_clicked(ui_buttonf("OK")) || (ui_key_match(bg_box->default_nav_focus_hot_key, ui_key_zero()) && ui_slot_press(UI_EventActionSlot_Accept))) { - df_cmd(DF_CmdKind_ConfirmAccept); + rd_cmd(RD_CmdKind_ConfirmAccept); } UI_CornerRadius10(ui_top_font_size()*0.25f) UI_CornerRadius11(ui_top_font_size()*0.25f) if(ui_clicked(ui_buttonf("Cancel")) || ui_slot_press(UI_EventActionSlot_Cancel)) { - df_cmd(DF_CmdKind_ConfirmCancel); + rd_cmd(RD_CmdKind_ConfirmCancel); } } ui_spacer(ui_em(3.f, 1.f)); @@ -4017,7 +3971,7 @@ df_window_frame(DF_Window *ws) //- rjf: build auto-complete lister // ProfScope("build autocomplete lister") - if(!ws->autocomp_force_closed && !ui_key_match(ws->autocomp_root_key, ui_key_zero()) && ws->autocomp_last_frame_idx+1 >= df_state->frame_index) + if(!ws->autocomp_force_closed && !ui_key_match(ws->autocomp_root_key, ui_key_zero()) && ws->autocomp_last_frame_idx+1 >= rd_state->frame_index) { String8 query = str8(ws->autocomp_lister_query_buffer, ws->autocomp_lister_query_size); UI_Box *autocomp_root_box = ui_box_from_key(ws->autocomp_root_key); @@ -4026,24 +3980,24 @@ df_window_frame(DF_Window *ws) Temp scratch = scratch_begin(0, 0); //- rjf: unpack lister params - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_base_regs()->thread); - U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, df_base_regs()->unwind_count); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_base_regs()->thread); + U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, rd_base_regs()->unwind_count); CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); CTRL_Entity *module = ctrl_module_from_process_vaddr(process, thread_rip_vaddr); U64 thread_rip_voff = ctrl_voff_from_vaddr(module, thread_rip_vaddr); DI_Key dbgi_key = ctrl_dbgi_key_from_module(module); //- rjf: gather lister items - DF_AutoCompListerItemChunkList item_list = {0}; + RD_AutoCompListerItemChunkList item_list = {0}; { //- rjf: gather locals - if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_Locals) + if(ws->autocomp_lister_params.flags & RD_AutoCompListerFlag_Locals) { E_String2NumMap *locals_map = d_query_cached_locals_map_from_dbgi_key_voff(&dbgi_key, thread_rip_voff); E_String2NumMap *member_map = d_query_cached_member_map_from_dbgi_key_voff(&dbgi_key, thread_rip_voff); for(E_String2NumMapNode *n = locals_map->first; n != 0; n = n->order_next) { - DF_AutoCompListerItem item = {0}; + RD_AutoCompListerItem item = {0}; { item.string = n->string; item.kind_string = str8_lit("Local"); @@ -4051,12 +4005,12 @@ df_window_frame(DF_Window *ws) } if(query.size == 0 || item.matches.count != 0) { - df_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); + rd_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); } } for(E_String2NumMapNode *n = member_map->first; n != 0; n = n->order_next) { - DF_AutoCompListerItem item = {0}; + RD_AutoCompListerItem item = {0}; { item.string = n->string; item.kind_string = str8_lit("Local (Member)"); @@ -4064,13 +4018,13 @@ df_window_frame(DF_Window *ws) } if(query.size == 0 || item.matches.count != 0) { - df_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); + rd_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); } } } //- rjf: gather registers - if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_Registers) + if(ws->autocomp_lister_params.flags & RD_AutoCompListerFlag_Registers) { Arch arch = thread->arch; U64 reg_names_count = regs_reg_code_count_from_arch(arch); @@ -4081,7 +4035,7 @@ df_window_frame(DF_Window *ws) { if(reg_names[idx].size != 0) { - DF_AutoCompListerItem item = {0}; + RD_AutoCompListerItem item = {0}; { item.string = reg_names[idx]; item.kind_string = str8_lit("Register"); @@ -4089,7 +4043,7 @@ df_window_frame(DF_Window *ws) } if(query.size == 0 || item.matches.count != 0) { - df_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); + rd_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); } } } @@ -4097,7 +4051,7 @@ df_window_frame(DF_Window *ws) { if(alias_names[idx].size != 0) { - DF_AutoCompListerItem item = {0}; + RD_AutoCompListerItem item = {0}; { item.string = alias_names[idx]; item.kind_string = str8_lit("Reg. Alias"); @@ -4105,20 +4059,20 @@ df_window_frame(DF_Window *ws) } if(query.size == 0 || item.matches.count != 0) { - df_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); + rd_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); } } } } //- rjf: gather view rules - if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_ViewRules) + if(ws->autocomp_lister_params.flags & RD_AutoCompListerFlag_ViewRules) { for(U64 slot_idx = 0; slot_idx < d_state->view_rule_spec_table_size; slot_idx += 1) { for(D_ViewRuleSpec *spec = d_state->view_rule_spec_table[slot_idx]; spec != 0 && spec != &d_nil_core_view_rule_spec; spec = spec->hash_next) { - DF_AutoCompListerItem item = {0}; + RD_AutoCompListerItem item = {0}; { item.string = spec->info.string; item.kind_string = str8_lit("View Rule"); @@ -4126,24 +4080,24 @@ df_window_frame(DF_Window *ws) } if(query.size == 0 || item.matches.count != 0) { - df_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); + rd_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); } } } } //- rjf: gather members - if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_Members) + if(ws->autocomp_lister_params.flags & RD_AutoCompListerFlag_Members) { } //- rjf: gather languages - if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_Languages) + if(ws->autocomp_lister_params.flags & RD_AutoCompListerFlag_Languages) { for(EachNonZeroEnumVal(TXT_LangKind, lang)) { - DF_AutoCompListerItem item = {0}; + RD_AutoCompListerItem item = {0}; { item.string = txt_extension_from_lang_kind(lang); item.kind_string = str8_lit("Language"); @@ -4151,17 +4105,17 @@ df_window_frame(DF_Window *ws) } if(item.string.size != 0 && (query.size == 0 || item.matches.count != 0)) { - df_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); + rd_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); } } } //- rjf: gather architectures - if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_Architectures) + if(ws->autocomp_lister_params.flags & RD_AutoCompListerFlag_Architectures) { for(EachNonZeroEnumVal(Arch, arch)) { - DF_AutoCompListerItem item = {0}; + RD_AutoCompListerItem item = {0}; { item.string = string_from_arch(arch); item.kind_string = str8_lit("Arch"); @@ -4169,17 +4123,17 @@ df_window_frame(DF_Window *ws) } if(query.size == 0 || item.matches.count != 0) { - df_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); + rd_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); } } } //- rjf: gather tex2dformats - if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_Tex2DFormats) + if(ws->autocomp_lister_params.flags & RD_AutoCompListerFlag_Tex2DFormats) { for(EachEnumVal(R_Tex2DFormat, fmt)) { - DF_AutoCompListerItem item = {0}; + RD_AutoCompListerItem item = {0}; { item.string = lower_from_str8(scratch.arena, r_tex2d_format_display_string_table[fmt]); item.kind_string = str8_lit("Format"); @@ -4187,18 +4141,18 @@ df_window_frame(DF_Window *ws) } if(query.size == 0 || item.matches.count != 0) { - df_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); + rd_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); } } } //- rjf: gather view rule params - if(ws->autocomp_lister_params.flags & DF_AutoCompListerFlag_ViewRuleParams) + if(ws->autocomp_lister_params.flags & RD_AutoCompListerFlag_ViewRuleParams) { for(String8Node *n = ws->autocomp_lister_params.strings.first; n != 0; n = n->next) { String8 string = n->string; - DF_AutoCompListerItem item = {0}; + RD_AutoCompListerItem item = {0}; { item.string = string; item.kind_string = str8_lit("Parameter"); @@ -4206,25 +4160,25 @@ df_window_frame(DF_Window *ws) } if(query.size == 0 || item.matches.count != 0) { - df_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); + rd_autocomp_lister_item_chunk_list_push(scratch.arena, &item_list, 256, &item); } } } } //- rjf: lister item list -> sorted array - DF_AutoCompListerItemArray item_array = df_autocomp_lister_item_array_from_chunk_list(scratch.arena, &item_list); - df_autocomp_lister_item_array_sort__in_place(&item_array); + RD_AutoCompListerItemArray item_array = rd_autocomp_lister_item_array_from_chunk_list(scratch.arena, &item_list); + rd_autocomp_lister_item_array_sort__in_place(&item_array); //- rjf: animate { // rjf: animate target # of rows { - F32 rate = df_setting_val_from_code(DF_SettingCode_MenuAnimations).s32 ? (1 - pow_f32(2, (-60.f * df_state->frame_dt))) : 1.f; + F32 rate = rd_setting_val_from_code(RD_SettingCode_MenuAnimations).s32 ? (1 - pow_f32(2, (-60.f * rd_state->frame_dt))) : 1.f; F32 target = Min((F32)item_array.count, 16.f); if(abs_f32(target - ws->autocomp_num_visible_rows_t) > 0.01f) { - df_request_frame(); + rd_request_frame(); } ws->autocomp_num_visible_rows_t += (target - ws->autocomp_num_visible_rows_t) * rate; if(abs_f32(target - ws->autocomp_num_visible_rows_t) <= 0.02f) @@ -4235,7 +4189,7 @@ df_window_frame(DF_Window *ws) // rjf: animate open { - F32 rate = df_setting_val_from_code(DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * df_state->frame_dt)) : 1.f; + F32 rate = rd_setting_val_from_code(RD_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * rd_state->frame_dt)) : 1.f; F32 diff = 1.f-ws->autocomp_open_t; ws->autocomp_open_t += diff*rate; if(abs_f32(diff) < 0.05f) @@ -4244,7 +4198,7 @@ df_window_frame(DF_Window *ws) } else { - df_request_frame(); + rd_request_frame(); } } } @@ -4264,7 +4218,7 @@ df_window_frame(DF_Window *ws) UI_Focus(UI_FocusKind_On) UI_Squish(0.25f-0.25f*ws->autocomp_open_t) UI_Transparency(1.f-ws->autocomp_open_t) - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) { autocomp_box = ui_build_box_from_stringf(UI_BoxFlag_DefaultFocusNavY| UI_BoxFlag_Clickable| @@ -4285,15 +4239,15 @@ df_window_frame(DF_Window *ws) UI_Parent(autocomp_box) UI_WidthFill UI_PrefHeight(ui_px(row_height_px, 1.f)) - DF_Font(DF_FontSlot_Code) + RD_Font(RD_FontSlot_Code) UI_HoverCursor(OS_Cursor_HandPoint) UI_Focus(UI_FocusKind_Null) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) UI_Padding(ui_em(1.f, 1.f)) { for(U64 idx = 0; idx < item_array.count; idx += 1) { - DF_AutoCompListerItem *item = &item_array.v[idx]; + RD_AutoCompListerItem *item = &item_array.v[idx]; UI_Box *item_box = ui_build_box_from_stringf(UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawHotEffects|UI_BoxFlag_DrawActiveEffects|UI_BoxFlag_MouseClickable, "autocomp_%I64x", idx); UI_Parent(item_box) UI_Padding(ui_em(1.f, 1.f)) { @@ -4302,7 +4256,7 @@ df_window_frame(DF_Window *ws) UI_Box *box = ui_label(item->string).box; ui_box_equip_fuzzy_match_ranges(box, &item->matches); } - DF_Font(DF_FontSlot_Main) + RD_Font(RD_FontSlot_Main) UI_PrefWidth(ui_text_dim(10, 1)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(item->kind_string); @@ -4345,7 +4299,7 @@ df_window_frame(DF_Window *ws) os_window_push_custom_edges(ws->os, window_edge_px); os_window_push_custom_title_bar(ws->os, dim_2f32(top_bar_rect).y); ui_set_next_flags(UI_BoxFlag_DefaultFocusNav|UI_BoxFlag_DisableFocusOverlay); - DF_Palette(DF_PaletteCode_MenuBar) + RD_Palette(RD_PaletteCode_MenuBar) UI_Focus((ws->menu_bar_focused && window_is_focused && !ui_any_ctx_menu_is_open() && !ws->hover_eval_focused) ? UI_FocusKind_On : UI_FocusKind_Null) UI_Pane(top_bar_rect, str8_lit("###top_bar")) UI_WidthFill UI_Row @@ -4366,7 +4320,7 @@ df_window_frame(DF_Window *ws) UI_Padding(ui_em(0.4f, 1.f)) UI_HeightFill { - R_Handle texture = df_state->icon_texture; + R_Handle texture = rd_state->icon_texture; Vec2S32 texture_dim = r_size_from_tex2d(texture); ui_image(texture, R_Tex2DSampleKind_Linear, r2f32p(0, 0, texture_dim.x, texture_dim.y), v4f32(1, 1, 1, 1), 0, str8_lit("")); } @@ -4378,18 +4332,18 @@ df_window_frame(DF_Window *ws) { // rjf: file menu UI_Key file_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_file_menu_key_")); - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) UI_CtxMenu(file_menu_key) UI_PrefWidth(ui_em(50.f, 1.f)) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) { String8 cmds[] = { - df_cmd_kind_info_table[DF_CmdKind_Open].string, - df_cmd_kind_info_table[DF_CmdKind_OpenUser].string, - df_cmd_kind_info_table[DF_CmdKind_OpenProject].string, - df_cmd_kind_info_table[DF_CmdKind_OpenRecentProject].string, - df_cmd_kind_info_table[DF_CmdKind_Exit].string, + rd_cmd_kind_info_table[RD_CmdKind_Open].string, + rd_cmd_kind_info_table[RD_CmdKind_OpenUser].string, + rd_cmd_kind_info_table[RD_CmdKind_OpenProject].string, + rd_cmd_kind_info_table[RD_CmdKind_OpenRecentProject].string, + rd_cmd_kind_info_table[RD_CmdKind_Exit].string, }; U32 codepoints[] = { @@ -4400,21 +4354,21 @@ df_window_frame(DF_Window *ws) 'x', }; Assert(ArrayCount(codepoints) == ArrayCount(cmds)); - df_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); + rd_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); } // rjf: window menu UI_Key window_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_window_menu_key_")); - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) UI_CtxMenu(window_menu_key) UI_PrefWidth(ui_em(50.f, 1.f)) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) { String8 cmds[] = { - df_cmd_kind_info_table[DF_CmdKind_OpenWindow].string, - df_cmd_kind_info_table[DF_CmdKind_CloseWindow].string, - df_cmd_kind_info_table[DF_CmdKind_ToggleFullscreen].string, + rd_cmd_kind_info_table[RD_CmdKind_OpenWindow].string, + rd_cmd_kind_info_table[RD_CmdKind_CloseWindow].string, + rd_cmd_kind_info_table[RD_CmdKind_ToggleFullscreen].string, }; U32 codepoints[] = { @@ -4423,31 +4377,31 @@ df_window_frame(DF_Window *ws) 'f', }; Assert(ArrayCount(codepoints) == ArrayCount(cmds)); - df_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); + rd_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); } // rjf: panel menu UI_Key panel_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_panel_menu_key_")); - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) UI_CtxMenu(panel_menu_key) UI_PrefWidth(ui_em(50.f, 1.f)) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) { String8 cmds[] = { - df_cmd_kind_info_table[DF_CmdKind_NewPanelRight].string, - df_cmd_kind_info_table[DF_CmdKind_NewPanelDown].string, - df_cmd_kind_info_table[DF_CmdKind_ClosePanel].string, - df_cmd_kind_info_table[DF_CmdKind_RotatePanelColumns].string, - df_cmd_kind_info_table[DF_CmdKind_NextPanel].string, - df_cmd_kind_info_table[DF_CmdKind_PrevPanel].string, - df_cmd_kind_info_table[DF_CmdKind_CloseTab].string, - df_cmd_kind_info_table[DF_CmdKind_NextTab].string, - df_cmd_kind_info_table[DF_CmdKind_PrevTab].string, - df_cmd_kind_info_table[DF_CmdKind_TabBarTop].string, - df_cmd_kind_info_table[DF_CmdKind_TabBarBottom].string, - df_cmd_kind_info_table[DF_CmdKind_ResetToDefaultPanels].string, - df_cmd_kind_info_table[DF_CmdKind_ResetToCompactPanels].string, + rd_cmd_kind_info_table[RD_CmdKind_NewPanelRight].string, + rd_cmd_kind_info_table[RD_CmdKind_NewPanelDown].string, + rd_cmd_kind_info_table[RD_CmdKind_ClosePanel].string, + rd_cmd_kind_info_table[RD_CmdKind_RotatePanelColumns].string, + rd_cmd_kind_info_table[RD_CmdKind_NextPanel].string, + rd_cmd_kind_info_table[RD_CmdKind_PrevPanel].string, + rd_cmd_kind_info_table[RD_CmdKind_CloseTab].string, + rd_cmd_kind_info_table[RD_CmdKind_NextTab].string, + rd_cmd_kind_info_table[RD_CmdKind_PrevTab].string, + rd_cmd_kind_info_table[RD_CmdKind_TabBarTop].string, + rd_cmd_kind_info_table[RD_CmdKind_TabBarBottom].string, + rd_cmd_kind_info_table[RD_CmdKind_ResetToDefaultPanels].string, + rd_cmd_kind_info_table[RD_CmdKind_ResetToCompactPanels].string, }; U32 codepoints[] = { @@ -4466,38 +4420,38 @@ df_window_frame(DF_Window *ws) 0, }; Assert(ArrayCount(codepoints) == ArrayCount(cmds)); - df_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); + rd_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); } // rjf: view menu UI_Key view_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_view_menu_key_")); - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) UI_CtxMenu(view_menu_key) UI_PrefWidth(ui_em(50.f, 1.f)) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) { String8 cmds[] = { - df_cmd_kind_info_table[DF_CmdKind_Targets].string, - df_cmd_kind_info_table[DF_CmdKind_Scheduler].string, - df_cmd_kind_info_table[DF_CmdKind_CallStack].string, - df_cmd_kind_info_table[DF_CmdKind_Modules].string, - df_cmd_kind_info_table[DF_CmdKind_Output].string, - df_cmd_kind_info_table[DF_CmdKind_Memory].string, - df_cmd_kind_info_table[DF_CmdKind_Disassembly].string, - df_cmd_kind_info_table[DF_CmdKind_Watch].string, - df_cmd_kind_info_table[DF_CmdKind_Locals].string, - df_cmd_kind_info_table[DF_CmdKind_Registers].string, - df_cmd_kind_info_table[DF_CmdKind_Globals].string, - df_cmd_kind_info_table[DF_CmdKind_ThreadLocals].string, - df_cmd_kind_info_table[DF_CmdKind_Types].string, - df_cmd_kind_info_table[DF_CmdKind_Procedures].string, - df_cmd_kind_info_table[DF_CmdKind_Breakpoints].string, - df_cmd_kind_info_table[DF_CmdKind_WatchPins].string, - df_cmd_kind_info_table[DF_CmdKind_FilePathMap].string, - df_cmd_kind_info_table[DF_CmdKind_Settings].string, - df_cmd_kind_info_table[DF_CmdKind_ExceptionFilters].string, - df_cmd_kind_info_table[DF_CmdKind_GettingStarted].string, + rd_cmd_kind_info_table[RD_CmdKind_Targets].string, + rd_cmd_kind_info_table[RD_CmdKind_Scheduler].string, + rd_cmd_kind_info_table[RD_CmdKind_CallStack].string, + rd_cmd_kind_info_table[RD_CmdKind_Modules].string, + rd_cmd_kind_info_table[RD_CmdKind_Output].string, + rd_cmd_kind_info_table[RD_CmdKind_Memory].string, + rd_cmd_kind_info_table[RD_CmdKind_Disassembly].string, + rd_cmd_kind_info_table[RD_CmdKind_Watch].string, + rd_cmd_kind_info_table[RD_CmdKind_Locals].string, + rd_cmd_kind_info_table[RD_CmdKind_Registers].string, + rd_cmd_kind_info_table[RD_CmdKind_Globals].string, + rd_cmd_kind_info_table[RD_CmdKind_ThreadLocals].string, + rd_cmd_kind_info_table[RD_CmdKind_Types].string, + rd_cmd_kind_info_table[RD_CmdKind_Procedures].string, + rd_cmd_kind_info_table[RD_CmdKind_Breakpoints].string, + rd_cmd_kind_info_table[RD_CmdKind_WatchPins].string, + rd_cmd_kind_info_table[RD_CmdKind_FilePathMap].string, + rd_cmd_kind_info_table[RD_CmdKind_Settings].string, + rd_cmd_kind_info_table[RD_CmdKind_ExceptionFilters].string, + rd_cmd_kind_info_table[RD_CmdKind_GettingStarted].string, }; U32 codepoints[] = { @@ -4523,22 +4477,22 @@ df_window_frame(DF_Window *ws) 0, }; Assert(ArrayCount(codepoints) == ArrayCount(cmds)); - df_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); + rd_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); } // rjf: targets menu UI_Key targets_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_targets_menu_key_")); - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) UI_CtxMenu(targets_menu_key) UI_PrefWidth(ui_em(50.f, 1.f)) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) { Temp scratch = scratch_begin(0, 0); String8 cmds[] = { - df_cmd_kind_info_table[DF_CmdKind_AddTarget].string, - df_cmd_kind_info_table[DF_CmdKind_EditTarget].string, - df_cmd_kind_info_table[DF_CmdKind_RemoveTarget].string, + rd_cmd_kind_info_table[RD_CmdKind_AddTarget].string, + rd_cmd_kind_info_table[RD_CmdKind_EditTarget].string, + rd_cmd_kind_info_table[RD_CmdKind_RemoveTarget].string, }; U32 codepoints[] = { @@ -4547,23 +4501,23 @@ df_window_frame(DF_Window *ws) 'r', }; Assert(ArrayCount(codepoints) == ArrayCount(cmds)); - df_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); - DF_Palette(DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); - DF_EntityList targets_list = d_query_cached_entity_list_with_kind(DF_EntityKind_Target); - for(DF_EntityNode *n = targets_list.first; n != 0; n = n->next) + rd_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); + RD_Palette(RD_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f)); + RD_EntityList targets_list = d_query_cached_entity_list_with_kind(RD_EntityKind_Target); + for(RD_EntityNode *n = targets_list.first; n != 0; n = n->next) { - DF_Entity *target = n->entity; + RD_Entity *target = n->entity; UI_Palette *palette = ui_top_palette(); - if(target->flags & DF_EntityFlag_HasColor) + if(target->flags & RD_EntityFlag_HasColor) { - palette = ui_build_palette(ui_top_palette(), .text = df_rgba_from_entity(target)); + palette = ui_build_palette(ui_top_palette(), .text = rd_rgba_from_entity(target)); } - String8 target_name = df_display_string_from_entity(scratch.arena, target); + String8 target_name = rd_display_string_from_entity(scratch.arena, target); UI_Signal sig = {0}; - UI_Palette(palette) sig = df_icon_buttonf(DF_IconKind_Target, 0, "%S##%p", target_name, target); + UI_Palette(palette) sig = rd_icon_buttonf(RD_IconKind_Target, 0, "%S##%p", target_name, target); if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_EditTarget, .entity = df_handle_from_entity(target)); + rd_cmd(RD_CmdKind_EditTarget, .entity = rd_handle_from_entity(target)); ui_ctx_menu_close(); ws->menu_bar_focused = 0; } @@ -4573,22 +4527,22 @@ df_window_frame(DF_Window *ws) // rjf: ctrl menu UI_Key ctrl_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_ctrl_menu_key_")); - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) UI_CtxMenu(ctrl_menu_key) UI_PrefWidth(ui_em(50.f, 1.f)) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) { String8 cmds[] = { - df_cmd_kind_info_table[D_CmdKind_Run].string, - df_cmd_kind_info_table[D_CmdKind_KillAll].string, - df_cmd_kind_info_table[D_CmdKind_Restart].string, - df_cmd_kind_info_table[D_CmdKind_Halt].string, - df_cmd_kind_info_table[D_CmdKind_SoftHaltRefresh].string, - df_cmd_kind_info_table[D_CmdKind_StepInto].string, - df_cmd_kind_info_table[D_CmdKind_StepOver].string, - df_cmd_kind_info_table[D_CmdKind_StepOut].string, - df_cmd_kind_info_table[D_CmdKind_Attach].string, + rd_cmd_kind_info_table[D_CmdKind_Run].string, + rd_cmd_kind_info_table[D_CmdKind_KillAll].string, + rd_cmd_kind_info_table[D_CmdKind_Restart].string, + rd_cmd_kind_info_table[D_CmdKind_Halt].string, + rd_cmd_kind_info_table[D_CmdKind_SoftHaltRefresh].string, + rd_cmd_kind_info_table[D_CmdKind_StepInto].string, + rd_cmd_kind_info_table[D_CmdKind_StepOver].string, + rd_cmd_kind_info_table[D_CmdKind_StepOut].string, + rd_cmd_kind_info_table[D_CmdKind_Attach].string, }; U32 codepoints[] = { @@ -4603,21 +4557,21 @@ df_window_frame(DF_Window *ws) 'a', }; Assert(ArrayCount(codepoints) == ArrayCount(cmds)); - df_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); + rd_cmd_list_menu_buttons(ArrayCount(cmds), cmds, codepoints); } // rjf: help menu UI_Key help_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_help_menu_key_")); - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) UI_CtxMenu(help_menu_key) UI_PrefWidth(ui_em(50.f, 1.f)) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) { UI_Row UI_TextAlignment(UI_TextAlign_Center) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(str8_lit(BUILD_TITLE_STRING_LITERAL)); UI_PrefHeight(ui_children_sum(1)) UI_Row UI_Padding(ui_pct(1, 0)) { - R_Handle texture = df_state->icon_texture; + R_Handle texture = rd_state->icon_texture; Vec2S32 texture_dim = r_size_from_tex2d(texture); UI_PrefWidth(ui_px(ui_top_font_size()*10.f, 1.f)) UI_PrefHeight(ui_px(ui_top_font_size()*10.f, 1.f)) @@ -4632,7 +4586,7 @@ df_window_frame(DF_Window *ws) ui_labelf("Search for commands by pressing "); UI_Flags(UI_BoxFlag_DrawBorder) UI_TextAlignment(UI_TextAlign_Center) - df_cmd_binding_buttons(df_cmd_kind_info_table[DF_CmdKind_RunCommand].string); + rd_cmd_binding_buttons(rd_cmd_kind_info_table[RD_CmdKind_RunCommand].string); } ui_spacer(ui_em(0.25f, 1.f)); UI_Row UI_TextAlignment(UI_TextAlign_Center) ui_label(str8_lit("Submit issues to the GitHub at:")); @@ -4723,7 +4677,7 @@ df_window_frame(DF_Window *ws) { ui_set_next_flags(UI_BoxFlag_DrawTextFastpathCodepoint); } - UI_Signal sig = df_menu_bar_button(items[idx].name); + UI_Signal sig = rd_menu_bar_button(items[idx].name); os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect); if(menu_open) { @@ -4751,13 +4705,13 @@ df_window_frame(DF_Window *ws) // rjf: conversion task visualization UI_PrefWidth(ui_text_dim(10, 1)) UI_HeightFill - DF_Palette(DF_PaletteCode_NeutralPopButton) + RD_Palette(RD_PaletteCode_NeutralPopButton) { Temp scratch = scratch_begin(0, 0); - DF_EntityList tasks = d_query_cached_entity_list_with_kind(DF_EntityKind_ConversionTask); - for(DF_EntityNode *n = tasks.first; n != 0; n = n->next) + RD_EntityList tasks = d_query_cached_entity_list_with_kind(RD_EntityKind_ConversionTask); + for(RD_EntityNode *n = tasks.first; n != 0; n = n->next) { - DF_Entity *task = n->entity; + RD_Entity *task = n->entity; if(task->alloc_time_us + 500000 < os_now_microseconds()) { String8 rdi_path = task->string; @@ -4781,15 +4735,15 @@ df_window_frame(DF_Window *ws) //- rjf: center column UI_PrefWidth(ui_children_sum(1.f)) UI_Row UI_PrefWidth(ui_em(2.25f, 1)) - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) UI_FontSize(ui_top_font_size()*0.85f) { Temp scratch = scratch_begin(0, 0); - DF_EntityList targets = d_push_active_target_list(scratch.arena); - DF_EntityList processes = d_query_cached_entity_list_with_kind(DF_EntityKind_Process); + RD_EntityList targets = d_push_active_target_list(scratch.arena); + RD_EntityList processes = d_query_cached_entity_list_with_kind(RD_EntityKind_Process); B32 have_targets = targets.count != 0; B32 can_send_signal = !d_ctrl_targets_running(); - B32 can_play = (have_targets && (can_send_signal || d_ctrl_last_run_frame_idx()+4 > df_state->frame_index)); + B32 can_play = (have_targets && (can_send_signal || d_ctrl_last_run_frame_idx()+4 > rd_state->frame_index)); B32 can_pause = (!can_send_signal); B32 can_stop = (processes.count != 0); B32 can_step = (processes.count != 0 && can_send_signal); @@ -4798,22 +4752,22 @@ df_window_frame(DF_Window *ws) if(can_play || !have_targets || processes.count == 0) UI_TextAlignment(UI_TextAlign_Center) UI_Flags((can_play ? 0 : UI_BoxFlag_Disabled)) - UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextPositive))) + UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextPositive))) { - UI_Signal sig = ui_button(df_g_icon_kind_text_table[DF_IconKind_Play]); + UI_Signal sig = ui_button(rd_icon_kind_text_table[RD_IconKind_Play]); os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect); if(ui_hovering(sig) && !can_play) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Disabled: %s", have_targets ? "Targets are currently running" : "No active targets exist"); } if(ui_hovering(sig) && can_play) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) { if(can_stop) { @@ -4822,9 +4776,9 @@ df_window_frame(DF_Window *ws) else { ui_labelf("Launch all active targets:"); - for(DF_EntityNode *n = targets.first; n != 0; n = n->next) + for(RD_EntityNode *n = targets.first; n != 0; n = n->next) { - String8 target_display_name = df_display_string_from_entity(scratch.arena, n->entity); + String8 target_display_name = rd_display_string_from_entity(scratch.arena, n->entity); ui_label(target_display_name); } } @@ -4832,31 +4786,31 @@ df_window_frame(DF_Window *ws) } if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_Run); + rd_cmd(RD_CmdKind_Run); } } //- rjf: restart button else UI_TextAlignment(UI_TextAlign_Center) - UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextPositive))) + UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextPositive))) { - UI_Signal sig = ui_button(df_g_icon_kind_text_table[DF_IconKind_Redo]); + UI_Signal sig = ui_button(rd_icon_kind_text_table[RD_IconKind_Redo]); os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect); if(ui_hovering(sig)) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) { ui_labelf("Restart all running targets:"); { - for(DF_EntityNode *n = processes.first; n != 0; n = n->next) + for(RD_EntityNode *n = processes.first; n != 0; n = n->next) { - DF_Entity *process = n->entity; - DF_Entity *target = df_entity_from_handle(process->entity_handle); - if(!df_entity_is_nil(target)) + RD_Entity *process = n->entity; + RD_Entity *target = rd_entity_from_handle(process->entity_handle); + if(!rd_entity_is_nil(target)) { - String8 target_display_name = df_display_string_from_entity(scratch.arena, target); + String8 target_display_name = rd_display_string_from_entity(scratch.arena, target); ui_label(target_display_name); } } @@ -4865,158 +4819,158 @@ df_window_frame(DF_Window *ws) } if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_Restart); + rd_cmd(RD_CmdKind_Restart); } } //- rjf: pause button UI_TextAlignment(UI_TextAlign_Center) UI_Flags(can_pause ? 0 : UI_BoxFlag_Disabled) - UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextNeutral))) + UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNeutral))) { - UI_Signal sig = ui_button(df_g_icon_kind_text_table[DF_IconKind_Pause]); + UI_Signal sig = ui_button(rd_icon_kind_text_table[RD_IconKind_Pause]); os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect); if(ui_hovering(sig) && !can_pause) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Disabled: Already halted"); } if(ui_hovering(sig) && can_pause) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Halt all target processes"); } if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_Halt); + rd_cmd(RD_CmdKind_Halt); } } //- rjf: stop button UI_TextAlignment(UI_TextAlign_Center) UI_Flags(can_stop ? 0 : UI_BoxFlag_Disabled) - UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextNegative))) + UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative))) { UI_Signal sig = {0}; { - sig = ui_button(df_g_icon_kind_text_table[DF_IconKind_Stop]); + sig = ui_button(rd_icon_kind_text_table[RD_IconKind_Stop]); os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect); } if(ui_hovering(sig) && !can_stop) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Disabled: No processes are running"); } if(ui_hovering(sig) && can_stop) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Kill all target processes"); } if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_Kill); + rd_cmd(RD_CmdKind_Kill); } } //- rjf: step over button UI_TextAlignment(UI_TextAlign_Center) UI_Flags(can_step ? 0 : UI_BoxFlag_Disabled) { - UI_Signal sig = ui_button(df_g_icon_kind_text_table[DF_IconKind_StepOver]); + UI_Signal sig = ui_button(rd_icon_kind_text_table[RD_IconKind_StepOver]); os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect); if(ui_hovering(sig) && !can_step && can_pause) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Disabled: Running"); } if(ui_hovering(sig) && !can_step && !can_stop) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Disabled: No processes are running"); } if(ui_hovering(sig) && can_step) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Step Over"); } if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_StepOver); + rd_cmd(RD_CmdKind_StepOver); } } //- rjf: step into button UI_TextAlignment(UI_TextAlign_Center) UI_Flags(can_step ? 0 : UI_BoxFlag_Disabled) { - UI_Signal sig = ui_button(df_g_icon_kind_text_table[DF_IconKind_StepInto]); + UI_Signal sig = ui_button(rd_icon_kind_text_table[RD_IconKind_StepInto]); os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect); if(ui_hovering(sig) && !can_step && can_pause) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Disabled: Running"); } if(ui_hovering(sig) && !can_step && !can_stop) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Disabled: No processes are running"); } if(ui_hovering(sig) && can_step) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Step Into"); } if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_StepInto); + rd_cmd(RD_CmdKind_StepInto); } } //- rjf: step out button UI_TextAlignment(UI_TextAlign_Center) UI_Flags(can_step ? 0 : UI_BoxFlag_Disabled) { - UI_Signal sig = ui_button(df_g_icon_kind_text_table[DF_IconKind_StepOut]); + UI_Signal sig = ui_button(rd_icon_kind_text_table[RD_IconKind_StepOut]); os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect); if(ui_hovering(sig) && !can_step && can_pause) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Disabled: Running"); } if(ui_hovering(sig) && !can_step && !can_stop) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Disabled: No processes are running"); } if(ui_hovering(sig) && can_step) { UI_Tooltip - DF_Font(DF_FontSlot_Main) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + RD_Font(RD_FontSlot_Main) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) ui_labelf("Step Out"); } if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_StepOut); + rd_cmd(RD_CmdKind_StepOut); } } @@ -5031,7 +4985,7 @@ df_window_frame(DF_Window *ws) ui_spacer(ui_pct(1, 0)); // rjf: loaded user viz - if(do_user_prof) DF_Palette(DF_PaletteCode_NeutralPopButton) + if(do_user_prof) RD_Palette(RD_PaletteCode_NeutralPopButton) { ui_set_next_pref_width(ui_children_sum(1)); ui_set_next_child_layout_axis(Axis2_X); @@ -5045,17 +4999,17 @@ df_window_frame(DF_Window *ws) os_window_push_custom_title_bar_client_area(ws->os, user_box->rect); UI_Parent(user_box) UI_PrefWidth(ui_text_dim(10, 0)) UI_TextAlignment(UI_TextAlign_Center) { - String8 user_path = df_cfg_path_from_src(DF_CfgSrc_User); + String8 user_path = rd_cfg_path_from_src(RD_CfgSrc_User); user_path = str8_chop_last_dot(user_path); - DF_Font(DF_FontSlot_Icons) - UI_TextRasterFlags(df_raster_flags_from_slot(DF_FontSlot_Icons)) - ui_label(df_g_icon_kind_text_table[DF_IconKind_Person]); + RD_Font(RD_FontSlot_Icons) + UI_TextRasterFlags(rd_raster_flags_from_slot(RD_FontSlot_Icons)) + ui_label(rd_icon_kind_text_table[RD_IconKind_Person]); ui_label(str8_skip_last_slash(user_path)); } UI_Signal user_sig = ui_signal_from_box(user_box); if(ui_clicked(user_sig)) { - df_cmd(DF_CmdKind_RunCommand, .string = df_cmd_kind_info_table[DF_CmdKind_OpenUser].string); + rd_cmd(RD_CmdKind_RunCommand, .string = rd_cmd_kind_info_table[RD_CmdKind_OpenUser].string); } } @@ -5065,7 +5019,7 @@ df_window_frame(DF_Window *ws) } // rjf: loaded project viz - if(do_user_prof) DF_Palette(DF_PaletteCode_NeutralPopButton) + if(do_user_prof) RD_Palette(RD_PaletteCode_NeutralPopButton) { ui_set_next_pref_width(ui_children_sum(1)); ui_set_next_child_layout_axis(Axis2_X); @@ -5079,16 +5033,16 @@ df_window_frame(DF_Window *ws) os_window_push_custom_title_bar_client_area(ws->os, prof_box->rect); UI_Parent(prof_box) UI_PrefWidth(ui_text_dim(10, 0)) UI_TextAlignment(UI_TextAlign_Center) { - String8 prof_path = df_cfg_path_from_src(DF_CfgSrc_Project); + String8 prof_path = rd_cfg_path_from_src(RD_CfgSrc_Project); prof_path = str8_chop_last_dot(prof_path); - DF_Font(DF_FontSlot_Icons) - ui_label(df_g_icon_kind_text_table[DF_IconKind_Briefcase]); + RD_Font(RD_FontSlot_Icons) + ui_label(rd_icon_kind_text_table[RD_IconKind_Briefcase]); ui_label(str8_skip_last_slash(prof_path)); } UI_Signal prof_sig = ui_signal_from_box(prof_box); if(ui_clicked(prof_sig)) { - df_cmd(DF_CmdKind_RunCommand, .string = df_cmd_kind_info_table[DF_CmdKind_OpenProject].string); + rd_cmd(RD_CmdKind_RunCommand, .string = rd_cmd_kind_info_table[RD_CmdKind_OpenProject].string); } } @@ -5106,13 +5060,13 @@ df_window_frame(DF_Window *ws) F32 button_dim = floor_f32(bar_dim.y); UI_PrefWidth(ui_px(button_dim, 1.f)) { - min_sig = df_icon_buttonf(DF_IconKind_Minus, 0, "##minimize"); - max_sig = df_icon_buttonf(DF_IconKind_Window, 0, "##maximize"); + min_sig = rd_icon_buttonf(RD_IconKind_Minus, 0, "##minimize"); + max_sig = rd_icon_buttonf(RD_IconKind_Window, 0, "##maximize"); } UI_PrefWidth(ui_px(button_dim, 1.f)) - DF_Palette(DF_PaletteCode_NegativePopButton) + RD_Palette(RD_PaletteCode_NegativePopButton) { - cls_sig = df_icon_buttonf(DF_IconKind_X, 0, "##close"); + cls_sig = rd_icon_buttonf(RD_IconKind_X, 0, "##close"); } if(ui_clicked(min_sig)) { @@ -5124,7 +5078,7 @@ df_window_frame(DF_Window *ws) } if(ui_clicked(cls_sig)) { - df_cmd(DF_CmdKind_CloseWindow, .window = df_handle_from_window(ws)); + rd_cmd(RD_CmdKind_CloseWindow, .window = rd_handle_from_window(ws)); } os_window_push_custom_title_bar_client_area(ws->os, min_sig.box->rect); os_window_push_custom_title_bar_client_area(ws->os, max_sig.box->rect); @@ -5139,11 +5093,11 @@ df_window_frame(DF_Window *ws) // ProfScope("build bottom bar") { - B32 is_running = d_ctrl_targets_running() && d_ctrl_last_run_frame_idx() < df_state->frame_index; + B32 is_running = d_ctrl_targets_running() && d_ctrl_last_run_frame_idx() < rd_state->frame_index; CTRL_Event stop_event = d_ctrl_last_stop_event(); - UI_Palette *positive_scheme = df_palette_from_code(DF_PaletteCode_PositivePopButton); - UI_Palette *running_scheme = df_palette_from_code(DF_PaletteCode_NeutralPopButton); - UI_Palette *negative_scheme = df_palette_from_code(DF_PaletteCode_NegativePopButton); + UI_Palette *positive_scheme = rd_palette_from_code(RD_PaletteCode_PositivePopButton); + UI_Palette *running_scheme = rd_palette_from_code(RD_PaletteCode_NeutralPopButton); + UI_Palette *negative_scheme = rd_palette_from_code(RD_PaletteCode_NegativePopButton); UI_Palette *palette = running_scheme; if(!is_running) { @@ -5184,7 +5138,7 @@ df_window_frame(DF_Window *ws) // rjf: developer frame-time indicator if(DEV_updating_indicator) { - F32 animation_t = pow_f32(sin_f32(df_state->time_in_seconds/2.f), 2.f); + F32 animation_t = pow_f32(sin_f32(rd_state->time_in_seconds/2.f), 2.f); ui_spacer(ui_em(0.3f, 1.f)); ui_spacer(ui_em(1.5f*animation_t, 1.f)); UI_PrefWidth(ui_text_dim(10, 1)) ui_labelf("*"); @@ -5200,21 +5154,21 @@ df_window_frame(DF_Window *ws) else { Temp scratch = scratch_begin(0, 0); - DF_IconKind icon = DF_IconKind_Null; + RD_IconKind icon = RD_IconKind_Null; String8 explanation = str8_lit("Not running"); { - String8 stop_explanation = df_stop_explanation_string_icon_from_ctrl_event(scratch.arena, &stop_event, &icon); + String8 stop_explanation = rd_stop_explanation_string_icon_from_ctrl_event(scratch.arena, &stop_event, &icon); if(stop_explanation.size != 0) { explanation = stop_explanation; } } - if(icon != DF_IconKind_Null) + if(icon != RD_IconKind_Null) { UI_PrefWidth(ui_em(2.25f, 1.f)) - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) - ui_label(df_g_icon_kind_text_table[icon]); + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) + ui_label(rd_icon_kind_text_table[icon]); } UI_PrefWidth(ui_text_dim(10, 1)) ui_label(explanation); scratch_end(scratch); @@ -5224,22 +5178,22 @@ df_window_frame(DF_Window *ws) ui_spacer(ui_pct(1, 0)); // rjf: bind change visualization - if(df_state->bind_change_active) + if(rd_state->bind_change_active) { - DF_CmdKindInfo *info = df_cmd_kind_info_from_string(df_state->bind_change_cmd_name); + RD_CmdKindInfo *info = rd_cmd_kind_info_from_string(rd_state->bind_change_cmd_name); UI_PrefWidth(ui_text_dim(10, 1)) UI_Flags(UI_BoxFlag_DrawBackground) UI_TextAlignment(UI_TextAlign_Center) UI_CornerRadius(4) - DF_Palette(DF_PaletteCode_NeutralPopButton) + RD_Palette(RD_PaletteCode_NeutralPopButton) ui_labelf("Currently rebinding \"%S\" hotkey", info->display_name); } // rjf: error visualization else if(ws->error_t >= 0.01f) { - ws->error_t -= df_state->frame_dt/8.f; - df_request_frame(); + ws->error_t -= rd_state->frame_dt/8.f; + rd_request_frame(); String8 error_string = str8(ws->error_buffer, ws->error_string_size); if(error_string.size != 0) { @@ -5249,10 +5203,10 @@ df_window_frame(DF_Window *ws) UI_PrefWidth(ui_text_dim(10, 1)) UI_TextAlignment(UI_TextAlign_Center) { - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) - ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]); - df_label(error_string); + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) + ui_label(rd_icon_kind_text_table[RD_IconKind_WarningBig]); + rd_label(error_string); } } } @@ -5264,33 +5218,33 @@ df_window_frame(DF_Window *ws) // if(ws->query_cmd_name.size != 0) { - DF_CmdKindInfo *cmd_kind_info = df_cmd_kind_info_from_string(ws->query_cmd_name); - DF_RegSlot missing_slot = cmd_kind_info->query.slot; + RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(ws->query_cmd_name); + RD_RegSlot missing_slot = cmd_kind_info->query.slot; String8 query_view_name = cmd_kind_info->query.view_name; if(query_view_name.size == 0) { switch(missing_slot) { default:{}break; - case DF_RegSlot_Entity:{query_view_name = df_view_kind_name_lower_table[DF_ViewKind_EntityLister];}break; - case DF_RegSlot_EntityList:{query_view_name = df_view_kind_name_lower_table[DF_ViewKind_EntityLister];}break; - case DF_RegSlot_FilePath:{query_view_name = df_view_kind_name_lower_table[DF_ViewKind_FileSystem];}break; - case DF_RegSlot_PID:{query_view_name = df_view_kind_name_lower_table[DF_ViewKind_SystemProcesses];}break; + case RD_RegSlot_Entity:{query_view_name = rd_view_kind_name_lower_table[RD_ViewKind_EntityLister];}break; + case RD_RegSlot_EntityList:{query_view_name = rd_view_kind_name_lower_table[RD_ViewKind_EntityLister];}break; + case RD_RegSlot_FilePath:{query_view_name = rd_view_kind_name_lower_table[RD_ViewKind_FileSystem];}break; + case RD_RegSlot_PID:{query_view_name = rd_view_kind_name_lower_table[RD_ViewKind_SystemProcesses];}break; } } - DF_ViewSpec *view_spec = df_view_spec_from_string(query_view_name); + RD_ViewSpec *view_spec = rd_view_spec_from_string(query_view_name); if(ws->query_view_stack_top->spec != view_spec || - df_view_is_nil(ws->query_view_stack_top)) + rd_view_is_nil(ws->query_view_stack_top)) { Temp scratch = scratch_begin(0, 0); // rjf: clear existing query stack - for(DF_View *query_view = ws->query_view_stack_top, *next = 0; - !df_view_is_nil(query_view); + for(RD_View *query_view = ws->query_view_stack_top, *next = 0; + !rd_view_is_nil(query_view); query_view = next) { next = query_view->order_next; - df_view_release(query_view); + rd_view_release(query_view); } // rjf: determine default query @@ -5298,27 +5252,27 @@ df_window_frame(DF_Window *ws) switch(missing_slot) { default: - if(cmd_kind_info->query.flags & DF_QueryFlag_KeepOldInput) + if(cmd_kind_info->query.flags & RD_QueryFlag_KeepOldInput) { - default_query = df_push_search_string(scratch.arena); + default_query = rd_push_search_string(scratch.arena); }break; - case DF_RegSlot_FilePath: + case RD_RegSlot_FilePath: { - default_query = path_normalized_from_string(scratch.arena, df_state->current_path); + default_query = path_normalized_from_string(scratch.arena, rd_state->current_path); default_query = push_str8f(scratch.arena, "%S/", default_query); }break; } // rjf: construct & push new view - DF_View *view = df_view_alloc(); - df_view_equip_spec(view, view_spec, default_query, &md_nil_node); - if(cmd_kind_info->query.flags & DF_QueryFlag_SelectOldInput) + RD_View *view = rd_view_alloc(); + rd_view_equip_spec(view, view_spec, default_query, &md_nil_node); + if(cmd_kind_info->query.flags & RD_QueryFlag_SelectOldInput) { view->query_mark = txt_pt(1, 1); } ws->query_view_stack_top = view; ws->query_view_selected = 1; - view->order_next = &df_nil_view; + view->order_next = &rd_nil_view; scratch_end(scratch); } @@ -5328,7 +5282,7 @@ df_window_frame(DF_Window *ws) //- rjf: animate query info // { - F32 rate = df_setting_val_from_code(DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * df_state->frame_dt)) : 1.f; + F32 rate = rd_setting_val_from_code(RD_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * rd_state->frame_dt)) : 1.f; // rjf: animate query view selection transition { @@ -5336,7 +5290,7 @@ df_window_frame(DF_Window *ws) F32 diff = abs_f32(target - ws->query_view_selected_t); if(diff > 0.005f) { - df_request_frame(); + rd_request_frame(); if(diff < 0.005f) { ws->query_view_selected_t = target; @@ -5347,11 +5301,11 @@ df_window_frame(DF_Window *ws) // rjf: animate query view open/close transition { - F32 query_view_t_target = !df_view_is_nil(ws->query_view_stack_top); + F32 query_view_t_target = !rd_view_is_nil(ws->query_view_stack_top); F32 diff = abs_f32(query_view_t_target - ws->query_view_t); if(diff > 0.005f) { - df_request_frame(); + rd_request_frame(); } if(diff < 0.005f) { @@ -5364,14 +5318,14 @@ df_window_frame(DF_Window *ws) //////////////////////////// //- rjf: build query // - if(!df_view_is_nil(ws->query_view_stack_top)) + if(!rd_view_is_nil(ws->query_view_stack_top)) UI_Focus((window_is_focused && !ui_any_ctx_menu_is_open() && !ws->menu_bar_focused && ws->query_view_selected) ? UI_FocusKind_On : UI_FocusKind_Off) - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) { - DF_View *view = ws->query_view_stack_top; + RD_View *view = ws->query_view_stack_top; String8 query_cmd_name = ws->query_cmd_name; - DF_CmdKindInfo *query_cmd_info = df_cmd_kind_info_from_string(query_cmd_name); - DF_Query *query = &query_cmd_info->query; + RD_CmdKindInfo *query_cmd_info = rd_cmd_kind_info_from_string(query_cmd_name); + RD_Query *query = &query_cmd_info->query; //- rjf: calculate rectangles Vec2F32 window_center = center_2f32(window_rect); @@ -5382,7 +5336,7 @@ df_window_frame(DF_Window *ws) window_rect.y0 + query_container_margin, window_center.x + query_container_width/2 - (1-ws->query_view_t)*query_container_width/4, window_rect.y1 - query_container_margin); - if(ws->query_view_stack_top->spec == &df_nil_view_spec) + if(ws->query_view_stack_top->spec == &rd_nil_view_spec) { query_container_rect.y1 = query_container_rect.y0 + query_line_edit_height; } @@ -5424,18 +5378,18 @@ df_window_frame(DF_Window *ws) { UI_PrefWidth(ui_text_dim(0.f, 1.f)) UI_Padding(ui_em(1.f, 1.f)) { - DF_IconKind icon_kind = query_cmd_info->icon_kind; - if(icon_kind != DF_IconKind_Null) + RD_IconKind icon_kind = query_cmd_info->icon_kind; + if(icon_kind != RD_IconKind_Null) { - DF_Font(DF_FontSlot_Icons) ui_label(df_g_icon_kind_text_table[icon_kind]); + RD_Font(RD_FontSlot_Icons) ui_label(rd_icon_kind_text_table[icon_kind]); } ui_labelf("%S", query_cmd_info->display_name); } - DF_Font((query->flags & DF_QueryFlag_CodeInput) ? DF_FontSlot_Code : DF_FontSlot_Main) + RD_Font((query->flags & RD_QueryFlag_CodeInput) ? RD_FontSlot_Code : RD_FontSlot_Main) UI_TextPadding(ui_top_font_size()*0.5f) { - UI_Signal sig = df_line_edit(DF_LineEditFlag_Border| - (DF_LineEditFlag_CodeContents * !!(query->flags & DF_QueryFlag_CodeInput)), + UI_Signal sig = rd_line_edit(RD_LineEditFlag_Border| + (RD_LineEditFlag_CodeContents * !!(query->flags & RD_QueryFlag_CodeInput)), 0, 0, &view->query_cursor, @@ -5451,16 +5405,16 @@ df_window_frame(DF_Window *ws) ws->query_view_selected = 1; } } - UI_PrefWidth(ui_em(5.f, 1.f)) UI_Focus(UI_FocusKind_Off) DF_Palette(DF_PaletteCode_PositivePopButton) + UI_PrefWidth(ui_em(5.f, 1.f)) UI_Focus(UI_FocusKind_Off) RD_Palette(RD_PaletteCode_PositivePopButton) { - if(ui_clicked(df_icon_buttonf(DF_IconKind_RightArrow, 0, "##complete_query"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_RightArrow, 0, "##complete_query"))) { query_completed = 1; } } - UI_PrefWidth(ui_em(3.f, 1.f)) UI_Focus(UI_FocusKind_Off) DF_Palette(DF_PaletteCode_PlainButton) + UI_PrefWidth(ui_em(3.f, 1.f)) UI_Focus(UI_FocusKind_Off) RD_Palette(RD_PaletteCode_PlainButton) { - if(ui_clicked(df_icon_buttonf(DF_IconKind_X, 0, "##cancel_query"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_X, 0, "##cancel_query"))) { query_cancelled = 1; } @@ -5471,8 +5425,8 @@ df_window_frame(DF_Window *ws) //- rjf: build query view UI_Parent(query_container_box) UI_WidthFill UI_Focus(UI_FocusKind_Null) { - DF_ViewSpec *view_spec = view->spec; - DF_ViewUIFunctionType *build_view_ui_function = view_spec->info.ui_hook; + RD_ViewSpec *view_spec = view->spec; + RD_ViewUIFunctionType *build_view_ui_function = view_spec->info.ui_hook; build_view_ui_function(view, view->params_roots[view->params_read_gen%ArrayCount(view->params_roots)], str8(view->query_buffer, view->query_string_size), query_container_content_rect); } @@ -5480,16 +5434,16 @@ df_window_frame(DF_Window *ws) if(((ui_is_focus_active() || (window_is_focused && !ui_any_ctx_menu_is_open() && !ws->menu_bar_focused && !ws->query_view_selected)) && ui_slot_press(UI_EventActionSlot_Cancel)) || query_cancelled) { - df_cmd(DF_CmdKind_CancelQuery); + rd_cmd(RD_CmdKind_CancelQuery); } if((ui_is_focus_active() && ui_slot_press(UI_EventActionSlot_Accept)) || query_completed) { Temp scratch = scratch_begin(0, 0); - DF_View *view = ws->query_view_stack_top; - DF_RegsScope() + RD_View *view = ws->query_view_stack_top; + RD_RegsScope() { - df_regs_fill_slot_from_string(query->slot, str8(view->query_buffer, view->query_string_size)); - df_cmd(DF_CmdKind_CompleteQuery); + rd_regs_fill_slot_from_string(query->slot, str8(view->query_buffer, view->query_string_size)); + rd_cmd(RD_CmdKind_CompleteQuery); } scratch_end(scratch); } @@ -5504,7 +5458,7 @@ df_window_frame(DF_Window *ws) } //- rjf: build darkening overlay for rest of screen - UI_Palette(ui_build_palette(0, .background = mix_4f32(df_rgba_from_theme_color(DF_ThemeColor_InactivePanelOverlay), v4f32(0, 0, 0, 0), 1-ws->query_view_selected_t))) + UI_Palette(ui_build_palette(0, .background = mix_4f32(rd_rgba_from_theme_color(RD_ThemeColor_InactivePanelOverlay), v4f32(0, 0, 0, 0), 1-ws->query_view_selected_t))) UI_Rect(window_rect) { ui_build_box_from_key(UI_BoxFlag_DrawBackground, ui_key_zero()); @@ -5525,20 +5479,20 @@ df_window_frame(DF_Window *ws) // rjf: disable hover eval if hovered view is actively scrolling if(hover_eval_is_open) { - for(DF_Panel *panel = ws->root_panel; - !df_panel_is_nil(panel); - panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; + !rd_panel_is_nil(panel); + panel = rd_panel_rec_depth_first_pre(panel).next) { - if(!df_panel_is_nil(panel->first)) { continue; } - Rng2F32 panel_rect = df_target_rect_from_panel(content_rect, ws->root_panel, panel); - DF_View *view = df_selected_tab_from_panel(panel); - if(!df_view_is_nil(view) && + if(!rd_panel_is_nil(panel->first)) { continue; } + Rng2F32 panel_rect = rd_target_rect_from_panel(content_rect, ws->root_panel, panel); + RD_View *view = rd_selected_tab_from_panel(panel); + if(!rd_view_is_nil(view) && contains_2f32(panel_rect, ui_mouse()) && (abs_f32(view->scroll_pos.x.off) > 0.01f || abs_f32(view->scroll_pos.y.off) > 0.01f)) { build_hover_eval = 0; - ws->hover_eval_first_frame_idx = df_state->frame_index; + ws->hover_eval_first_frame_idx = rd_state->frame_index; } } } @@ -5551,9 +5505,9 @@ df_window_frame(DF_Window *ws) } // rjf: reset animation, but request frames if we're waiting to open - if(ws->hover_eval_string.size != 0 && !hover_eval_is_open && ws->hover_eval_last_frame_idx < ws->hover_eval_first_frame_idx+20 && df_state->frame_index-ws->hover_eval_last_frame_idx < 50) + if(ws->hover_eval_string.size != 0 && !hover_eval_is_open && ws->hover_eval_last_frame_idx < ws->hover_eval_first_frame_idx+20 && rd_state->frame_index-ws->hover_eval_last_frame_idx < 50) { - df_request_frame(); + rd_request_frame(); ws->hover_eval_num_visible_rows_t = 0; ws->hover_eval_open_t = 0; } @@ -5566,9 +5520,9 @@ df_window_frame(DF_Window *ws) // rjf: build hover eval if(build_hover_eval && ws->hover_eval_string.size != 0 && hover_eval_is_open) - DF_Font(DF_FontSlot_Code) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) - DF_Palette(DF_PaletteCode_Floating) + RD_Font(RD_FontSlot_Code) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) + RD_Palette(RD_PaletteCode_Floating) { Temp scratch = scratch_begin(0, 0); DI_Scope *scope = di_scope_open(); @@ -5582,27 +5536,27 @@ df_window_frame(DF_Window *ws) { //- rjf: eval -> viz artifacts F32 row_height = floor_f32(ui_top_font_size()*2.8f); - D_CfgTable cfg_table = {0}; + RD_CfgTable cfg_table = {0}; U64 expr_hash = d_hash_from_string(expr); String8 ev_view_key_string = push_str8f(scratch.arena, "eval_hover_%I64x", expr_hash); - EV_View *ev_view = df_ev_view_from_key(d_hash_from_string(ev_view_key_string)); + EV_View *ev_view = rd_ev_view_from_key(d_hash_from_string(ev_view_key_string)); EV_Key parent_key = ev_key_make(5381, 1); EV_Key key = ev_key_make(ev_hash_from_key(parent_key), 1); EV_BlockList viz_blocks = ev_block_list_from_view_expr_keys(scratch.arena, ev_view, &top_level_view_rules, expr, parent_key, key); - DF_Entity *entity = d_entity_from_eval_space(eval.space); - U32 default_radix = (entity->kind == DF_EntityKind_Thread ? 16 : 10); + RD_Entity *entity = rd_entity_from_eval_space(eval.space); + U32 default_radix = (entity->kind == RD_EntityKind_Thread ? 16 : 10); EV_WindowedRowList viz_rows = ev_windowed_row_list_from_block_list(scratch.arena, ev_view, r1s64(0, 50), &viz_blocks); //- rjf: animate { // rjf: animate height { - F32 fish_rate = df_setting_val_from_code(DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * df_state->frame_dt)) : 1.f; + F32 fish_rate = rd_setting_val_from_code(RD_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * rd_state->frame_dt)) : 1.f; F32 hover_eval_container_height_target = row_height * Min(30, viz_blocks.total_visual_row_count); ws->hover_eval_num_visible_rows_t += (hover_eval_container_height_target - ws->hover_eval_num_visible_rows_t) * fish_rate; if(abs_f32(hover_eval_container_height_target - ws->hover_eval_num_visible_rows_t) > 0.5f) { - df_request_frame(); + rd_request_frame(); } else { @@ -5612,7 +5566,7 @@ df_window_frame(DF_Window *ws) // rjf: animate open { - F32 fish_rate = df_setting_val_from_code(DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * df_state->frame_dt)) : 1.f; + F32 fish_rate = rd_setting_val_from_code(RD_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-60.f * rd_state->frame_dt)) : 1.f; F32 diff = 1.f - ws->hover_eval_open_t; ws->hover_eval_open_t += diff*fish_rate; if(abs_f32(diff) < 0.01f) @@ -5621,7 +5575,7 @@ df_window_frame(DF_Window *ws) } else { - df_request_frame(); + rd_request_frame(); } } } @@ -5635,7 +5589,7 @@ df_window_frame(DF_Window *ws) EV_Row *row = viz_rows.first; E_Eval row_eval = e_eval_from_expr(scratch.arena, row->expr); String8 row_expr_string = ev_expr_string_from_row(scratch.arena, row); - String8 row_display_value = df_value_string_from_eval(scratch.arena, EV_StringFlag_ReadOnlyDisplayRules, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->view_rules); + String8 row_display_value = rd_value_string_from_eval(scratch.arena, EV_StringFlag_ReadOnlyDisplayRules, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->view_rules); expr_column_width_px = fnt_dim_from_tag_size_string(ui_top_font(), ui_top_font_size(), 0, 0, row_expr_string).x + ui_top_font_size()*5.f; value_column_width_px = fnt_dim_from_tag_size_string(ui_top_font(), ui_top_font_size(), 0, 0, row_display_value).x + ui_top_font_size()*5.f; F32 total_dim_px = (expr_column_width_px + value_column_width_px); @@ -5683,8 +5637,8 @@ df_window_frame(DF_Window *ws) //- rjf: unpack row E_Eval row_eval = e_eval_from_expr(scratch.arena, row->expr); String8 row_expr_string = ev_expr_string_from_row(scratch.arena, row); - String8 row_edit_value = df_value_string_from_eval(scratch.arena, 0, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->view_rules); - String8 row_display_value = df_value_string_from_eval(scratch.arena, EV_StringFlag_ReadOnlyDisplayRules, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->view_rules); + String8 row_edit_value = rd_value_string_from_eval(scratch.arena, 0, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->view_rules); + String8 row_display_value = rd_value_string_from_eval(scratch.arena, EV_StringFlag_ReadOnlyDisplayRules, default_radix, ui_top_font(), ui_top_font_size(), 500.f, row_eval, row->member, row->view_rules); B32 row_is_editable = ev_row_is_editable(row); B32 row_is_expandable = ev_row_is_expandable(row); @@ -5696,8 +5650,8 @@ df_window_frame(DF_Window *ws) default:{}break; case E_Mode_Offset: { - DF_Entity *space_entity = d_entity_from_eval_space(row_eval.space); - if(space_entity->kind == DF_EntityKind_Process) + RD_Entity *space_entity = rd_entity_from_eval_space(row_eval.space); + if(space_entity->kind == RD_EntityKind_Process) { U64 size = e_type_byte_size_from_key(row_eval.type_key); size = Min(size, 64); @@ -5742,24 +5696,24 @@ df_window_frame(DF_Window *ws) { UI_PrefWidth(ui_em(1.5f, 1)) UI_Flags(UI_BoxFlag_DrawTextWeak) - DF_Font(DF_FontSlot_Icons) - ui_label(df_g_icon_kind_text_table[DF_IconKind_Dot]); + RD_Font(RD_FontSlot_Icons) + ui_label(rd_icon_kind_text_table[RD_IconKind_Dot]); } - UI_WidthFill UI_TextRasterFlags(df_raster_flags_from_slot(DF_FontSlot_Code)) + UI_WidthFill UI_TextRasterFlags(rd_raster_flags_from_slot(RD_FontSlot_Code)) { - UI_PrefWidth(ui_px(expr_column_width_px, 1.f)) df_code_label(1.f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), row_expr_string); + UI_PrefWidth(ui_px(expr_column_width_px, 1.f)) rd_code_label(1.f, 1, rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault), row_expr_string); ui_spacer(ui_em(1.5f, 1.f)); if(row_is_editable) { if(row_is_fresh) { - Vec4F32 rgba = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay); + Vec4F32 rgba = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlay); ui_set_next_palette(ui_build_palette(ui_top_palette(), .background = rgba)); } - UI_Signal sig = df_line_editf(DF_LineEditFlag_CodeContents| - DF_LineEditFlag_DisplayStringIsCode| - DF_LineEditFlag_PreferDisplayString| - DF_LineEditFlag_Border, + UI_Signal sig = rd_line_editf(RD_LineEditFlag_CodeContents| + RD_LineEditFlag_DisplayStringIsCode| + RD_LineEditFlag_PreferDisplayString| + RD_LineEditFlag_Border, 0, 0, &ws->hover_eval_txt_cursor, &ws->hover_eval_txt_mark, ws->hover_eval_txt_buffer, sizeof(ws->hover_eval_txt_buffer), &ws->hover_eval_txt_size, 0, row_edit_value, "%S###val_%I64x", row_display_value, row_hash); if(ui_pressed(sig)) { @@ -5768,7 +5722,7 @@ df_window_frame(DF_Window *ws) if(ui_committed(sig)) { String8 commit_string = str8(ws->hover_eval_txt_buffer, ws->hover_eval_txt_size); - B32 success = d_commit_eval_value_string(row_eval, commit_string); + B32 success = rd_commit_eval_value_string(row_eval, commit_string); if(success == 0) { log_user_error(str8_lit("Could not commit value successfully.")); @@ -5779,11 +5733,11 @@ df_window_frame(DF_Window *ws) { if(row_is_fresh) { - Vec4F32 rgba = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay); + Vec4F32 rgba = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlay); ui_set_next_palette(ui_build_palette(ui_top_palette(), .background = rgba)); ui_set_next_flags(UI_BoxFlag_DrawBackground); } - df_code_label(1.f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), row_display_value); + rd_code_label(1.f, 1, rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault), row_display_value); } } if(row == viz_rows.first) @@ -5794,14 +5748,14 @@ df_window_frame(DF_Window *ws) UI_CornerRadius10(0) UI_CornerRadius11(0) { - UI_Signal watch_sig = df_icon_buttonf(DF_IconKind_List, 0, "###watch_hover_eval"); - if(ui_hovering(watch_sig)) UI_Tooltip DF_Font(DF_FontSlot_Main) UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + UI_Signal watch_sig = rd_icon_buttonf(RD_IconKind_List, 0, "###watch_hover_eval"); + if(ui_hovering(watch_sig)) UI_Tooltip RD_Font(RD_FontSlot_Main) UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) { ui_labelf("Add the hovered expression to an opened watch view."); } if(ui_clicked(watch_sig)) { - df_cmd(DF_CmdKind_ToggleWatchExpression, .string = expr); + rd_cmd(RD_CmdKind_ToggleWatchExpression, .string = expr); } } if(ws->hover_eval_file_path.size != 0 || ws->hover_eval_vaddr != 0) @@ -5809,8 +5763,8 @@ df_window_frame(DF_Window *ws) UI_CornerRadius10(corner_radius) UI_CornerRadius11(corner_radius) { - UI_Signal pin_sig = df_icon_buttonf(DF_IconKind_Pin, 0, "###pin_hover_eval"); - if(ui_hovering(pin_sig)) UI_Tooltip DF_Font(DF_FontSlot_Main) UI_FontSize(df_font_size_from_slot(DF_FontSlot_Main)) + UI_Signal pin_sig = rd_icon_buttonf(RD_IconKind_Pin, 0, "###pin_hover_eval"); + if(ui_hovering(pin_sig)) UI_Tooltip RD_Font(RD_FontSlot_Main) UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Main)) UI_CornerRadius00(0) UI_CornerRadius01(0) UI_CornerRadius10(0) @@ -5820,7 +5774,7 @@ df_window_frame(DF_Window *ws) } if(ui_clicked(pin_sig)) { - df_cmd(DF_CmdKind_ToggleWatchPin, + rd_cmd(RD_CmdKind_ToggleWatchPin, .file_path = ws->hover_eval_file_path, .cursor = ws->hover_eval_file_pt, .vaddr = ws->hover_eval_vaddr, @@ -5838,11 +5792,11 @@ df_window_frame(DF_Window *ws) UI_Signal hover_eval_sig = ui_signal_from_box(hover_eval_box); if(ui_mouse_over(hover_eval_sig)) { - ws->hover_eval_last_frame_idx = df_state->frame_index; + ws->hover_eval_last_frame_idx = rd_state->frame_index; } - else if(ws->hover_eval_last_frame_idx+2 < df_state->frame_index) + else if(ws->hover_eval_last_frame_idx+2 < rd_state->frame_index) { - df_request_frame(); + rd_request_frame(); } if(ui_pressed(hover_eval_sig)) { @@ -5861,14 +5815,14 @@ df_window_frame(DF_Window *ws) // B32 is_changing_panel_boundaries = 0; ProfScope("non-leaf panel UI") - for(DF_Panel *panel = ws->root_panel; - !df_panel_is_nil(panel); - panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; + !rd_panel_is_nil(panel); + panel = rd_panel_rec_depth_first_pre(panel).next) { ////////////////////////// //- rjf: continue on leaf panels // - if(df_panel_is_nil(panel->first)) + if(rd_panel_is_nil(panel->first)) { continue; } @@ -5877,14 +5831,14 @@ df_window_frame(DF_Window *ws) //- rjf: grab info // Axis2 split_axis = panel->split_axis; - Rng2F32 panel_rect = df_target_rect_from_panel(content_rect, ws->root_panel, panel); + Rng2F32 panel_rect = rd_target_rect_from_panel(content_rect, ws->root_panel, panel); ////////////////////////// //- rjf: boundary tab-drag/drop sites // { - DF_View *drag_view = df_view_from_handle(df_drag_drop_payload.view); - if(df_drag_is_active() && !df_view_is_nil(drag_view)) + RD_View *drag_view = rd_view_from_handle(rd_drag_drop_payload.view); + if(rd_drag_is_active() && !rd_view_is_nil(drag_view)) { //- rjf: params F32 drop_site_major_dim_px = ceil_f32(ui_top_font_size()*7.f); @@ -5926,7 +5880,7 @@ df_window_frame(DF_Window *ws) ui_set_next_child_layout_axis(axis2_flip(axis)); if(ui_key_match(key, ui_drop_hot_key())) { - ui_set_next_palette(ui_build_palette(ui_top_palette(), .border = df_rgba_from_theme_color(DF_ThemeColor_Hover))); + ui_set_next_palette(ui_build_palette(ui_top_palette(), .border = rd_rgba_from_theme_color(RD_ThemeColor_Hover))); } site_box_viz = ui_build_box_from_key(UI_BoxFlag_DrawBackground| UI_BoxFlag_DrawBorder| @@ -5953,24 +5907,24 @@ df_window_frame(DF_Window *ws) future_split_rect.p1.v[axis] += drop_site_major_dim_px; future_split_rect.p0.v[axis2_flip(axis)] = panel_rect.p0.v[axis2_flip(axis)]; future_split_rect.p1.v[axis2_flip(axis)] = panel_rect.p1.v[axis2_flip(axis)]; - UI_Rect(future_split_rect) DF_Palette(DF_PaletteCode_DropSiteOverlay) + UI_Rect(future_split_rect) RD_Palette(RD_PaletteCode_DropSiteOverlay) { ui_build_box_from_key(UI_BoxFlag_DrawBackground, ui_key_zero()); } } // rjf: drop - DF_DragDropPayload payload = {0}; - if(ui_key_match(site_box->key, ui_drop_hot_key()) && df_drag_drop(&payload)) + RD_DragDropPayload payload = {0}; + if(ui_key_match(site_box->key, ui_drop_hot_key()) && rd_drag_drop(&payload)) { Dir2 dir = (axis == Axis2_Y ? (side == Side_Min ? Dir2_Up : Dir2_Down) : axis == Axis2_X ? (side == Side_Min ? Dir2_Left : Dir2_Right) : Dir2_Invalid); if(dir != Dir2_Invalid) { - DF_Panel *split_panel = panel; - df_cmd(DF_CmdKind_SplitPanel, - .dst_panel = df_handle_from_panel(split_panel), + RD_Panel *split_panel = panel; + rd_cmd(RD_CmdKind_SplitPanel, + .dst_panel = rd_handle_from_panel(split_panel), .panel = payload.panel, .view = payload.view, .dir2 = dir); @@ -5981,10 +5935,10 @@ df_window_frame(DF_Window *ws) //- rjf: iterate all children, build boundary drop sites Axis2 split_axis = panel->split_axis; - UI_CornerRadius(corner_radius) for(DF_Panel *child = panel->first;; child = child->next) + UI_CornerRadius(corner_radius) for(RD_Panel *child = panel->first;; child = child->next) { // rjf: form rect - Rng2F32 child_rect = df_target_rect_from_panel_child(panel_rect, panel, child); + Rng2F32 child_rect = rd_target_rect_from_panel_child(panel_rect, panel, child); Vec2F32 child_rect_center = center_2f32(child_rect); UI_Key key = ui_key_from_stringf(ui_key_zero(), "drop_boundary_%p_%p", panel, child); Rng2F32 site_rect = r2f32(child_rect_center, child_rect_center); @@ -6010,7 +5964,7 @@ df_window_frame(DF_Window *ws) ui_set_next_child_layout_axis(axis2_flip(split_axis)); if(ui_key_match(key, ui_drop_hot_key())) { - ui_set_next_palette(ui_build_palette(ui_top_palette(), .border = df_rgba_from_theme_color(DF_ThemeColor_Hover))); + ui_set_next_palette(ui_build_palette(ui_top_palette(), .border = rd_rgba_from_theme_color(RD_ThemeColor_Hover))); } site_box_viz = ui_build_box_from_key(UI_BoxFlag_DrawBackground| UI_BoxFlag_DrawBorder| @@ -6037,32 +5991,32 @@ df_window_frame(DF_Window *ws) future_split_rect.p1.v[split_axis] += drop_site_major_dim_px; future_split_rect.p0.v[axis2_flip(split_axis)] = child_rect.p0.v[axis2_flip(split_axis)]; future_split_rect.p1.v[axis2_flip(split_axis)] = child_rect.p1.v[axis2_flip(split_axis)]; - UI_Rect(future_split_rect) DF_Palette(DF_PaletteCode_DropSiteOverlay) + UI_Rect(future_split_rect) RD_Palette(RD_PaletteCode_DropSiteOverlay) { ui_build_box_from_key(UI_BoxFlag_DrawBackground, ui_key_zero()); } } // rjf: drop - DF_DragDropPayload payload = {0}; - if(ui_key_match(site_box->key, ui_drop_hot_key()) && df_drag_drop(&payload)) + RD_DragDropPayload payload = {0}; + if(ui_key_match(site_box->key, ui_drop_hot_key()) && rd_drag_drop(&payload)) { Dir2 dir = (panel->split_axis == Axis2_X ? Dir2_Left : Dir2_Up); - DF_Panel *split_panel = child; - if(df_panel_is_nil(split_panel)) + RD_Panel *split_panel = child; + if(rd_panel_is_nil(split_panel)) { split_panel = panel->last; dir = (panel->split_axis == Axis2_X ? Dir2_Right : Dir2_Down); } - df_cmd(DF_CmdKind_SplitPanel, - .dst_panel = df_handle_from_panel(split_panel), + rd_cmd(RD_CmdKind_SplitPanel, + .dst_panel = rd_handle_from_panel(split_panel), .panel = payload.panel, .view = payload.view, .dir2 = dir); } // rjf: exit on opl child - if(df_panel_is_nil(child)) + if(rd_panel_is_nil(child)) { break; } @@ -6073,12 +6027,12 @@ df_window_frame(DF_Window *ws) ////////////////////////// //- rjf: do UI for drag boundaries between all children // - for(DF_Panel *child = panel->first; !df_panel_is_nil(child) && !df_panel_is_nil(child->next); child = child->next) + for(RD_Panel *child = panel->first; !rd_panel_is_nil(child) && !rd_panel_is_nil(child->next); child = child->next) { - DF_Panel *min_child = child; - DF_Panel *max_child = min_child->next; - Rng2F32 min_child_rect = df_target_rect_from_panel_child(panel_rect, panel, min_child); - Rng2F32 max_child_rect = df_target_rect_from_panel_child(panel_rect, panel, max_child); + RD_Panel *min_child = child; + RD_Panel *max_child = min_child->next; + Rng2F32 min_child_rect = rd_target_rect_from_panel_child(panel_rect, panel, min_child); + Rng2F32 max_child_rect = rd_target_rect_from_panel_child(panel_rect, panel, max_child); Rng2F32 boundary_rect = {0}; { boundary_rect.p0.v[split_axis] = min_child_rect.p1.v[split_axis] - ui_top_font_size()/3; @@ -6140,11 +6094,11 @@ df_window_frame(DF_Window *ws) //- rjf: animate panels // { - F32 rate = df_setting_val_from_code(DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-50.f * df_state->frame_dt)) : 1.f; + F32 rate = rd_setting_val_from_code(RD_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-50.f * rd_state->frame_dt)) : 1.f; Vec2F32 content_rect_dim = dim_2f32(content_rect); - for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next) { - Rng2F32 target_rect_px = df_target_rect_from_panel(content_rect, ws->root_panel, panel); + Rng2F32 target_rect_px = rd_target_rect_from_panel(content_rect, ws->root_panel, panel); Rng2F32 target_rect_pct = r2f32p(target_rect_px.x0/content_rect_dim.x, target_rect_px.y0/content_rect_dim.y, target_rect_px.x1/content_rect_dim.x, @@ -6154,7 +6108,7 @@ df_window_frame(DF_Window *ws) abs_f32(target_rect_pct.x1 - panel->animated_rect_pct.x1) > 0.005f || abs_f32(target_rect_pct.y1 - panel->animated_rect_pct.y1) > 0.005f) { - df_request_frame(); + rd_request_frame(); } panel->animated_rect_pct.x0 += rate * (target_rect_pct.x0 - panel->animated_rect_pct.x0); panel->animated_rect_pct.y0 += rate * (target_rect_pct.y0 - panel->animated_rect_pct.y0); @@ -6171,11 +6125,11 @@ df_window_frame(DF_Window *ws) //- rjf: panel leaf UI // ProfScope("leaf panel UI") - for(DF_Panel *panel = ws->root_panel; - !df_panel_is_nil(panel); - panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; + !rd_panel_is_nil(panel); + panel = rd_panel_rec_depth_first_pre(panel).next) { - if(!df_panel_is_nil(panel->first)) {continue;} + if(!rd_panel_is_nil(panel->first)) {continue;} B32 panel_is_focused = (window_is_focused && !ws->menu_bar_focused && (!query_is_open || !ws->query_view_selected) && @@ -6210,7 +6164,7 @@ df_window_frame(DF_Window *ws) content_rect.y1 = panel_rect.y1 - tab_bar_vheight; } { - DF_View *tab = df_selected_tab_from_panel(panel); + RD_View *tab = rd_selected_tab_from_panel(panel); if(tab->is_filtering_t > 0.01f) { filter_rect.x0 = content_rect.x0; @@ -6225,8 +6179,8 @@ df_window_frame(DF_Window *ws) //- rjf: build combined split+movetab drag/drop sites // { - DF_View *view = df_view_from_handle(df_drag_drop_payload.view); - if(df_drag_is_active() && !df_view_is_nil(view) && contains_2f32(panel_rect, ui_mouse())) + RD_View *view = rd_view_from_handle(rd_drag_drop_payload.view); + if(rd_drag_is_active() && !rd_view_is_nil(view) && contains_2f32(panel_rect, ui_mouse())) { F32 drop_site_dim_px = ceil_f32(ui_top_font_size()*7.f); Vec2F32 drop_site_half_dim = v2f32(drop_site_dim_px/2, drop_site_dim_px/2); @@ -6308,7 +6262,7 @@ df_window_frame(DF_Window *ws) ui_set_next_child_layout_axis(axis2_flip(split_axis)); if(ui_key_match(key, ui_drop_hot_key())) { - ui_set_next_palette(ui_build_palette(ui_top_palette(), .border = df_rgba_from_theme_color(DF_ThemeColor_Hover))); + ui_set_next_palette(ui_build_palette(ui_top_palette(), .border = rd_rgba_from_theme_color(RD_ThemeColor_Hover))); } site_box_viz = ui_build_box_from_key(UI_BoxFlag_DrawBackground| UI_BoxFlag_DrawBorder| @@ -6323,10 +6277,10 @@ df_window_frame(DF_Window *ws) UI_Box *row_or_column = ui_build_box_from_key(0, ui_key_zero()); UI_Parent(row_or_column) UI_Padding(ui_px(padding, 1.f)) { if(split_side == Side_Min) { ui_set_next_flags(UI_BoxFlag_DrawBackground); } - DF_Palette(DF_PaletteCode_DropSiteOverlay) ui_build_box_from_key(UI_BoxFlag_DrawBorder, ui_key_zero()); + RD_Palette(RD_PaletteCode_DropSiteOverlay) ui_build_box_from_key(UI_BoxFlag_DrawBorder, ui_key_zero()); ui_spacer(ui_px(padding, 1.f)); if(split_side == Side_Max) { ui_set_next_flags(UI_BoxFlag_DrawBackground); } - DF_Palette(DF_PaletteCode_DropSiteOverlay) ui_build_box_from_key(UI_BoxFlag_DrawBorder, ui_key_zero()); + RD_Palette(RD_PaletteCode_DropSiteOverlay) ui_build_box_from_key(UI_BoxFlag_DrawBorder, ui_key_zero()); } } } @@ -6336,31 +6290,31 @@ df_window_frame(DF_Window *ws) { ui_set_next_child_layout_axis(split_axis); UI_Box *row_or_column = ui_build_box_from_key(0, ui_key_zero()); - UI_Parent(row_or_column) UI_Padding(ui_px(padding, 1.f)) DF_Palette(DF_PaletteCode_DropSiteOverlay) + UI_Parent(row_or_column) UI_Padding(ui_px(padding, 1.f)) RD_Palette(RD_PaletteCode_DropSiteOverlay) { ui_build_box_from_key(UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawBackground, ui_key_zero()); } } } } - DF_DragDropPayload payload = {0}; - if(ui_key_match(site_box->key, ui_drop_hot_key()) && df_drag_drop(&payload)) + RD_DragDropPayload payload = {0}; + if(ui_key_match(site_box->key, ui_drop_hot_key()) && rd_drag_drop(&payload)) { if(dir != Dir2_Invalid) { - df_cmd(DF_CmdKind_SplitPanel, - .dst_panel = df_handle_from_panel(panel), + rd_cmd(RD_CmdKind_SplitPanel, + .dst_panel = rd_handle_from_panel(panel), .panel = payload.panel, .view = payload.view, .dir2 = dir); } else { - df_cmd(DF_CmdKind_MoveTab, - .dst_panel = df_handle_from_panel(panel), + rd_cmd(RD_CmdKind_MoveTab, + .dst_panel = rd_handle_from_panel(panel), .panel = payload.panel, .view = payload.view, - .prev_view = df_handle_from_view(panel->last_tab_view)); + .prev_view = rd_handle_from_view(panel->last_tab_view)); } } } @@ -6377,7 +6331,7 @@ df_window_frame(DF_Window *ws) Vec2F32 panel_center = center_2f32(panel_rect); future_split_rect.v[side_flip(split_side)].v[split_axis] = panel_center.v[split_axis]; } - UI_Rect(future_split_rect) DF_Palette(DF_PaletteCode_DropSiteOverlay) + UI_Rect(future_split_rect) RD_Palette(RD_PaletteCode_DropSiteOverlay) { ui_build_box_from_key(UI_BoxFlag_DrawBackground, ui_key_zero()); } @@ -6390,7 +6344,7 @@ df_window_frame(DF_Window *ws) //- rjf: build catch-all panel drop-site // B32 catchall_drop_site_hovered = 0; - if(df_drag_is_active() && ui_key_match(ui_key_zero(), ui_drop_hot_key())) + if(rd_drag_is_active() && ui_key_match(ui_key_zero(), ui_drop_hot_key())) { UI_Rect(panel_rect) { @@ -6405,12 +6359,12 @@ df_window_frame(DF_Window *ws) //- rjf: build filtering box // { - DF_View *view = df_selected_tab_from_panel(panel); + RD_View *view = rd_selected_tab_from_panel(panel); UI_Focus(UI_FocusKind_On) { if(view->is_filtering && ui_is_focus_active() && ui_slot_press(UI_EventActionSlot_Accept)) { - df_cmd(DF_CmdKind_ApplyFilter, .view = df_handle_from_view(view)); + rd_cmd(RD_CmdKind_ApplyFilter, .view = rd_handle_from_view(view)); } if(view->is_filtering || view->is_filtering_t > 0.01f) { @@ -6424,19 +6378,19 @@ df_window_frame(DF_Window *ws) { UI_PrefWidth(ui_em(3.f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) UI_TextAlignment(UI_TextAlign_Center) - ui_label(df_g_icon_kind_text_table[DF_IconKind_Find]); + ui_label(rd_icon_kind_text_table[RD_IconKind_Find]); UI_PrefWidth(ui_text_dim(10, 1)) { ui_label(str8_lit("Filter")); } ui_spacer(ui_em(0.5f, 1.f)); - DF_Font(view->spec->info.flags & DF_ViewSpecFlag_FilterIsCode ? DF_FontSlot_Code : DF_FontSlot_Main) + RD_Font(view->spec->info.flags & RD_ViewSpecFlag_FilterIsCode ? RD_FontSlot_Code : RD_FontSlot_Main) UI_Focus(view->is_filtering ? UI_FocusKind_On : UI_FocusKind_Off) UI_TextPadding(ui_top_font_size()*0.5f) { - UI_Signal sig = df_line_edit(DF_LineEditFlag_CodeContents*!!(view->spec->info.flags & DF_ViewSpecFlag_FilterIsCode), + UI_Signal sig = rd_line_edit(RD_LineEditFlag_CodeContents*!!(view->spec->info.flags & RD_ViewSpecFlag_FilterIsCode), 0, 0, &view->query_cursor, @@ -6449,7 +6403,7 @@ df_window_frame(DF_Window *ws) str8_lit("###filter_text_input")); if(ui_pressed(sig)) { - df_cmd(DF_CmdKind_FocusPanel, .panel = df_handle_from_panel(panel)); + rd_cmd(RD_CmdKind_FocusPanel, .panel = rd_handle_from_panel(panel)); } } } @@ -6462,7 +6416,7 @@ df_window_frame(DF_Window *ws) // if(panel != ws->focused_panel) { - UI_Palette(ui_build_palette(0, .background = df_rgba_from_theme_color(DF_ThemeColor_InactivePanelOverlay))) + UI_Palette(ui_build_palette(0, .background = rd_rgba_from_theme_color(RD_ThemeColor_InactivePanelOverlay))) UI_Rect(content_rect) { ui_build_box_from_key(UI_BoxFlag_DrawBackground, ui_key_zero()); @@ -6475,7 +6429,7 @@ df_window_frame(DF_Window *ws) UI_Box *panel_box = &ui_g_nil_box; UI_Rect(content_rect) UI_ChildLayoutAxis(Axis2_Y) UI_CornerRadius(0) UI_Focus(UI_FocusKind_On) { - UI_Key panel_key = df_ui_key_from_panel(panel); + UI_Key panel_key = rd_ui_key_from_panel(panel); panel_box = ui_build_box_from_key(UI_BoxFlag_MouseClickable| UI_BoxFlag_Clip| UI_BoxFlag_DrawBorder| @@ -6490,8 +6444,8 @@ df_window_frame(DF_Window *ws) // UI_Parent(panel_box) { - DF_View *view = df_selected_tab_from_panel(panel); - df_loading_overlay(panel_rect, view->loading_t, view->loading_progress_v, view->loading_progress_v_target); + RD_View *view = rd_selected_tab_from_panel(panel); + rd_loading_overlay(panel_rect, view->loading_t, view->loading_progress_v, view->loading_progress_v_target); } ////////////////////////// @@ -6502,12 +6456,12 @@ df_window_frame(DF_Window *ws) UI_WidthFill { //- rjf: push interaction registers, fill with per-view states - df_push_regs(); + rd_push_regs(); { - DF_View *view = df_selected_tab_from_panel(panel); - df_regs()->panel = df_handle_from_panel(panel); - df_regs()->view = df_handle_from_view(view); - df_regs()->file_path = d_file_path_from_eval_string(df_frame_arena(), str8(view->query_buffer, view->query_string_size)); + RD_View *view = rd_selected_tab_from_panel(panel); + rd_regs()->panel = rd_handle_from_panel(panel); + rd_regs()->view = rd_handle_from_view(view); + rd_regs()->file_path = rd_file_path_from_eval_string(rd_frame_arena(), str8(view->query_buffer, view->query_string_size)); } //- rjf: build view container @@ -6520,24 +6474,24 @@ df_window_frame(DF_Window *ws) } //- rjf: build empty view - UI_Parent(view_container_box) if(df_view_is_nil(df_selected_tab_from_panel(panel))) + UI_Parent(view_container_box) if(rd_view_is_nil(rd_selected_tab_from_panel(panel))) { - DF_VIEW_UI_FUNCTION_NAME(empty)(&df_nil_view, &md_nil_node, str8_zero(), content_rect); + RD_VIEW_UI_FUNCTION_NAME(empty)(&rd_nil_view, &md_nil_node, str8_zero(), content_rect); } //- rjf: build tab view - UI_Parent(view_container_box) if(!df_view_is_nil(df_selected_tab_from_panel(panel))) + UI_Parent(view_container_box) if(!rd_view_is_nil(rd_selected_tab_from_panel(panel))) { - DF_View *view = df_selected_tab_from_panel(panel); - DF_ViewUIFunctionType *build_view_ui_function = view->spec->info.ui_hook; + RD_View *view = rd_selected_tab_from_panel(panel); + RD_ViewUIFunctionType *build_view_ui_function = view->spec->info.ui_hook; build_view_ui_function(view, view->params_roots[view->params_read_gen%ArrayCount(view->params_roots)], str8(view->query_buffer, view->query_string_size), content_rect); } //- rjf: pop interaction registers; commit if this is the selected view - DF_Regs *view_regs = df_pop_regs(); + RD_Regs *view_regs = rd_pop_regs(); if(ws->focused_panel == panel) { - MemoryCopyStruct(df_regs(), view_regs); + MemoryCopyStruct(rd_regs(), view_regs); } } @@ -6546,28 +6500,28 @@ df_window_frame(DF_Window *ws) // UI_Focus(UI_FocusKind_On) { - DF_View *view = df_selected_tab_from_panel(panel); - if(ui_is_focus_active() && view->spec->info.flags & DF_ViewSpecFlag_TypingAutomaticallyFilters && !view->is_filtering) + RD_View *view = rd_selected_tab_from_panel(panel); + if(ui_is_focus_active() && view->spec->info.flags & RD_ViewSpecFlag_TypingAutomaticallyFilters && !view->is_filtering) { for(UI_Event *evt = 0; ui_next_event(&evt);) { if(evt->flags & UI_EventFlag_Paste) { ui_eat_event(evt); - df_cmd(DF_CmdKind_Filter); - df_cmd(DF_CmdKind_Paste); + rd_cmd(RD_CmdKind_Filter); + rd_cmd(RD_CmdKind_Paste); } else if(evt->string.size != 0 && evt->kind == UI_EventKind_Text) { ui_eat_event(evt); - df_cmd(DF_CmdKind_Filter); - df_cmd(DF_CmdKind_InsertText, .string = evt->string); + rd_cmd(RD_CmdKind_Filter); + rd_cmd(RD_CmdKind_InsertText, .string = evt->string); } } } - if(view->spec->info.flags & DF_ViewSpecFlag_CanFilter && (view->query_string_size != 0 || view->is_filtering) && ui_is_focus_active() && ui_slot_press(UI_EventActionSlot_Cancel)) + if(view->spec->info.flags & RD_ViewSpecFlag_CanFilter && (view->query_string_size != 0 || view->is_filtering) && ui_is_focus_active() && ui_slot_press(UI_EventActionSlot_Cancel)) { - df_cmd(DF_CmdKind_ClearFilter, .view = df_handle_from_view(view)); + rd_cmd(RD_CmdKind_ClearFilter, .view = rd_handle_from_view(view)); } } @@ -6577,7 +6531,7 @@ df_window_frame(DF_Window *ws) UI_Signal panel_sig = ui_signal_from_box(panel_box); if(ui_pressed(panel_sig)) { - df_cmd(DF_CmdKind_FocusPanel, .panel = df_handle_from_panel(panel)); + rd_cmd(RD_CmdKind_FocusPanel, .panel = rd_handle_from_panel(panel)); } ////////////////////////// @@ -6592,11 +6546,11 @@ df_window_frame(DF_Window *ws) struct DropSite { F32 p; - DF_View *prev_view; + RD_View *prev_view; }; // rjf: prep output data - DF_View *next_selected_tab_view = df_selected_tab_from_panel(panel); + RD_View *next_selected_tab_view = rd_selected_tab_from_panel(panel); UI_Box *tab_bar_box = &ui_g_nil_box; U64 drop_site_count = panel->tab_view_count+1; DropSite *drop_sites = push_array(scratch.arena, DropSite, drop_site_count); @@ -6628,28 +6582,28 @@ df_window_frame(DF_Window *ws) UI_CornerRadius01(panel->tab_side == Side_Min ? 0 : corner_radius) UI_CornerRadius10(panel->tab_side == Side_Min ? corner_radius : 0) UI_CornerRadius11(panel->tab_side == Side_Min ? 0 : corner_radius) - for(DF_View *view = panel->first_tab_view;; view = view->order_next, view_idx += 1) + for(RD_View *view = panel->first_tab_view;; view = view->order_next, view_idx += 1) { temp_end(scratch); - if(df_view_is_project_filtered(view)) { continue; } + if(rd_view_is_project_filtered(view)) { continue; } // rjf: if before this tab is the prev-view of the current tab drag, // draw empty space - if(df_drag_is_active() && catchall_drop_site_hovered) + if(rd_drag_is_active() && catchall_drop_site_hovered) { - DF_Panel *dst_panel = df_panel_from_handle(df_last_drag_drop_panel); - DF_View *drag_view = df_view_from_handle(df_drag_drop_payload.view); - DF_View *dst_prev_view = df_view_from_handle(df_last_drag_drop_prev_tab); + RD_Panel *dst_panel = rd_panel_from_handle(rd_last_drag_drop_panel); + RD_View *drag_view = rd_view_from_handle(rd_drag_drop_payload.view); + RD_View *dst_prev_view = rd_view_from_handle(rd_last_drag_drop_prev_tab); if(dst_panel == panel && - ((!df_view_is_nil(view) && dst_prev_view == view->order_prev && drag_view != view && drag_view != view->order_prev) || - (df_view_is_nil(view) && dst_prev_view == panel->last_tab_view && drag_view != panel->last_tab_view))) + ((!rd_view_is_nil(view) && dst_prev_view == view->order_prev && drag_view != view && drag_view != view->order_prev) || + (rd_view_is_nil(view) && dst_prev_view == panel->last_tab_view && drag_view != panel->last_tab_view))) { UI_PrefWidth(ui_em(9.f, 0.2f)) UI_Column { ui_spacer(ui_em(0.2f, 1.f)); UI_CornerRadius00(corner_radius) UI_CornerRadius10(corner_radius) - DF_Palette(DF_PaletteCode_DropSiteOverlay) + RD_Palette(RD_PaletteCode_DropSiteOverlay) { ui_build_box_from_key(UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawBorder, ui_key_zero()); } @@ -6658,22 +6612,22 @@ df_window_frame(DF_Window *ws) } // rjf: end on nil view - if(df_view_is_nil(view)) + if(rd_view_is_nil(view)) { break; } // rjf: gather info for this tab - B32 view_is_selected = (view == df_selected_tab_from_panel(panel)); - DF_IconKind icon_kind = df_icon_kind_from_view(view); - DR_FancyStringList title_fstrs = df_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); + B32 view_is_selected = (view == rd_selected_tab_from_panel(panel)); + RD_IconKind icon_kind = rd_icon_kind_from_view(view); + DR_FancyStringList title_fstrs = rd_title_fstrs_from_view(scratch.arena, view, ui_top_palette()->text, ui_top_palette()->text_weak, ui_top_font_size()); // rjf: begin vertical region for this tab ui_set_next_child_layout_axis(Axis2_Y); UI_Box *tab_column_box = ui_build_box_from_stringf(!is_changing_panel_boundaries*UI_BoxFlag_AnimatePosX, "tab_column_%p", view); // rjf: build tab container box - UI_Parent(tab_column_box) UI_PrefHeight(ui_px(tab_bar_vheight, 1)) DF_Palette(view_is_selected ? DF_PaletteCode_Tab : DF_PaletteCode_TabInactive) + UI_Parent(tab_column_box) UI_PrefHeight(ui_px(tab_bar_vheight, 1)) RD_Palette(view_is_selected ? RD_PaletteCode_Tab : RD_PaletteCode_TabInactive) { if(panel->tab_side == Side_Max) { @@ -6697,13 +6651,13 @@ df_window_frame(DF_Window *ws) UI_WidthFill UI_Row { ui_spacer(ui_em(0.5f, 1.f)); - if(icon_kind != DF_IconKind_Null) + if(icon_kind != RD_IconKind_Null) { UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) UI_TextAlignment(UI_TextAlign_Center) UI_PrefWidth(ui_em(1.75f, 1.f)) - ui_label(df_g_icon_kind_text_table[icon_kind]); + ui_label(rd_icon_kind_text_table[icon_kind]); } UI_PrefWidth(ui_text_dim(10, 0)) { @@ -6712,8 +6666,8 @@ df_window_frame(DF_Window *ws) } } UI_PrefWidth(ui_em(2.35f, 1.f)) UI_TextAlignment(UI_TextAlign_Center) - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)*0.75f) + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)*0.75f) UI_Flags(UI_BoxFlag_DrawTextWeak) UI_CornerRadius00(0) UI_CornerRadius01(0) @@ -6721,10 +6675,10 @@ df_window_frame(DF_Window *ws) UI_Palette *palette = ui_build_palette(ui_top_palette()); palette->background = v4f32(0, 0, 0, 0); ui_set_next_palette(palette); - UI_Signal sig = ui_buttonf("%S###close_view_%p", df_g_icon_kind_text_table[DF_IconKind_X], view); + UI_Signal sig = ui_buttonf("%S###close_view_%p", rd_icon_kind_text_table[RD_IconKind_X], view); if(ui_clicked(sig) || ui_middle_clicked(sig)) { - df_cmd(DF_CmdKind_CloseTab, .panel = df_handle_from_panel(panel), .view = df_handle_from_view(view)); + rd_cmd(RD_CmdKind_CloseTab, .panel = rd_handle_from_panel(panel), .view = rd_handle_from_view(view)); } } } @@ -6735,27 +6689,27 @@ df_window_frame(DF_Window *ws) if(ui_pressed(sig)) { next_selected_tab_view = view; - df_cmd(DF_CmdKind_FocusPanel, .panel = df_handle_from_panel(panel)); + rd_cmd(RD_CmdKind_FocusPanel, .panel = rd_handle_from_panel(panel)); } - else if(ui_dragging(sig) && !df_drag_is_active() && length_2f32(ui_drag_delta()) > 10.f) + else if(ui_dragging(sig) && !rd_drag_is_active() && length_2f32(ui_drag_delta()) > 10.f) { - DF_DragDropPayload payload = {0}; + RD_DragDropPayload payload = {0}; { payload.key = sig.box->key; - payload.panel = df_handle_from_panel(panel); - payload.view = df_handle_from_view(view); + payload.panel = rd_handle_from_panel(panel); + payload.view = rd_handle_from_view(view); } - df_drag_begin(&payload); + rd_drag_begin(&payload); } else if(ui_right_clicked(sig)) { - ui_ctx_menu_open(df_state->tab_ctx_menu_key, sig.box->key, v2f32(0, sig.box->rect.y1 - sig.box->rect.y0)); - ws->tab_ctx_menu_panel = df_handle_from_panel(panel); - ws->tab_ctx_menu_view = df_handle_from_view(view); + ui_ctx_menu_open(rd_state->tab_ctx_menu_key, sig.box->key, v2f32(0, sig.box->rect.y1 - sig.box->rect.y0)); + ws->tab_ctx_menu_panel = rd_handle_from_panel(panel); + ws->tab_ctx_menu_view = rd_handle_from_view(view); } else if(ui_middle_clicked(sig)) { - df_cmd(DF_CmdKind_CloseTab, .panel = df_handle_from_panel(panel), .view = df_handle_from_view(view)); + rd_cmd(RD_CmdKind_CloseTab, .panel = rd_handle_from_panel(panel), .view = rd_handle_from_view(view)); } } } @@ -6789,11 +6743,11 @@ df_window_frame(DF_Window *ws) UI_CornerRadius10(panel->tab_side == Side_Min ? corner_radius : 0) UI_CornerRadius01(panel->tab_side == Side_Max ? corner_radius : 0) UI_CornerRadius11(panel->tab_side == Side_Max ? corner_radius : 0) - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) UI_FontSize(ui_top_font_size()) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_HoverCursor(OS_Cursor_HandPoint) - DF_Palette(DF_PaletteCode_ImplicitButton) + RD_Palette(RD_PaletteCode_ImplicitButton) { UI_Box *add_new_box = ui_build_box_from_stringf(UI_BoxFlag_DrawBackground| UI_BoxFlag_DrawText| @@ -6803,12 +6757,12 @@ df_window_frame(DF_Window *ws) UI_BoxFlag_Clickable| UI_BoxFlag_DisableTextTrunc, "%S##add_new_tab_button_%p", - df_g_icon_kind_text_table[DF_IconKind_Add], + rd_icon_kind_text_table[RD_IconKind_Add], panel); UI_Signal sig = ui_signal_from_box(add_new_box); if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_FocusPanel, .panel = df_handle_from_panel(panel)); + rd_cmd(RD_CmdKind_FocusPanel, .panel = rd_handle_from_panel(panel)); UI_Key view_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_view_menu_key_")); ui_ctx_menu_open(view_menu_key, add_new_box->key, v2f32(0, tab_bar_vheight)); } @@ -6830,8 +6784,8 @@ df_window_frame(DF_Window *ws) // rjf: more precise drop-sites on tab bar { Vec2F32 mouse = ui_mouse(); - DF_View *view = df_view_from_handle(df_drag_drop_payload.view); - if(df_drag_is_active() && window_is_focused && contains_2f32(panel_rect, mouse) && !df_view_is_nil(view)) + RD_View *view = rd_view_from_handle(rd_drag_drop_payload.view); + if(rd_drag_is_active() && window_is_focused && contains_2f32(panel_rect, mouse) && !rd_view_is_nil(view)) { // rjf: mouse => hovered drop site F32 min_distance = 0; @@ -6852,34 +6806,34 @@ df_window_frame(DF_Window *ws) // rjf: store closest prev-view if(active_drop_site != 0) { - df_last_drag_drop_prev_tab = df_handle_from_view(active_drop_site->prev_view); + rd_last_drag_drop_prev_tab = rd_handle_from_view(active_drop_site->prev_view); } else { - df_last_drag_drop_prev_tab = d_handle_zero(); + rd_last_drag_drop_prev_tab = rd_handle_zero(); } // rjf: vis - DF_Panel *drag_panel = df_panel_from_handle(df_drag_drop_payload.panel); - if(!df_view_is_nil(view) && active_drop_site != 0) + RD_Panel *drag_panel = rd_panel_from_handle(rd_drag_drop_payload.panel); + if(!rd_view_is_nil(view) && active_drop_site != 0) { - DF_Palette(DF_PaletteCode_DropSiteOverlay) UI_Rect(tab_bar_rect) + RD_Palette(RD_PaletteCode_DropSiteOverlay) UI_Rect(tab_bar_rect) ui_build_box_from_key(UI_BoxFlag_DrawBackground, ui_key_zero()); } // rjf: drop - DF_DragDropPayload payload = df_drag_drop_payload; - if(catchall_drop_site_hovered && (active_drop_site != 0 && df_drag_drop(&payload))) + RD_DragDropPayload payload = rd_drag_drop_payload; + if(catchall_drop_site_hovered && (active_drop_site != 0 && rd_drag_drop(&payload))) { - DF_View *view = df_view_from_handle(payload.view); - DF_Panel *src_panel = df_panel_from_handle(payload.panel); - if(!df_panel_is_nil(panel) && !df_view_is_nil(view)) + RD_View *view = rd_view_from_handle(payload.view); + RD_Panel *src_panel = rd_panel_from_handle(payload.panel); + if(!rd_panel_is_nil(panel) && !rd_view_is_nil(view)) { - df_cmd(DF_CmdKind_MoveTab, - .panel = df_handle_from_panel(src_panel), - .dst_panel = df_handle_from_panel(panel), - .view = df_handle_from_view(view), - .prev_view = df_handle_from_view(active_drop_site->prev_view)); + rd_cmd(RD_CmdKind_MoveTab, + .panel = rd_handle_from_panel(src_panel), + .dst_panel = rd_handle_from_panel(panel), + .view = rd_handle_from_view(view), + .prev_view = rd_handle_from_view(active_drop_site->prev_view)); } } } @@ -6887,7 +6841,7 @@ df_window_frame(DF_Window *ws) // rjf: apply tab change { - panel->selected_tab_view = df_handle_from_view(next_selected_tab_view); + panel->selected_tab_view = rd_handle_from_view(next_selected_tab_view); } scratch_end(scratch); @@ -6898,14 +6852,14 @@ df_window_frame(DF_Window *ws) // if(catchall_drop_site_hovered) { - df_last_drag_drop_panel = df_handle_from_panel(panel); + rd_last_drag_drop_panel = rd_handle_from_panel(panel); - DF_DragDropPayload *payload = &df_drag_drop_payload; - DF_View *dragged_view = df_view_from_handle(payload->view); + RD_DragDropPayload *payload = &rd_drag_drop_payload; + RD_View *dragged_view = rd_view_from_handle(payload->view); B32 view_is_in_panel = 0; - for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->order_next) + for(RD_View *view = panel->first_tab_view; !rd_view_is_nil(view); view = view->order_next) { - if(df_view_is_project_filtered(view)) { continue; } + if(rd_view_is_project_filtered(view)) { continue; } if(view == dragged_view) { view_is_in_panel = 1; @@ -6917,36 +6871,36 @@ df_window_frame(DF_Window *ws) { // rjf: vis { - DF_Palette(DF_PaletteCode_DropSiteOverlay) UI_Rect(content_rect) + RD_Palette(RD_PaletteCode_DropSiteOverlay) UI_Rect(content_rect) ui_build_box_from_key(UI_BoxFlag_DrawBackground, ui_key_zero()); } // rjf: drop { - DF_DragDropPayload payload = {0}; - if(df_drag_drop(&payload)) + RD_DragDropPayload payload = {0}; + if(rd_drag_drop(&payload)) { - DF_Panel *src_panel = df_panel_from_handle(payload.panel); - DF_View *view = df_view_from_handle(payload.view); - DF_Entity *entity = df_entity_from_handle(payload.entity); + RD_Panel *src_panel = rd_panel_from_handle(payload.panel); + RD_View *view = rd_view_from_handle(payload.view); + RD_Entity *entity = rd_entity_from_handle(payload.entity); // rjf: view drop - if(!df_view_is_nil(view)) + if(!rd_view_is_nil(view)) { - df_cmd(DF_CmdKind_MoveTab, - .prev_view = df_handle_from_view(panel->last_tab_view), - .panel = df_handle_from_panel(src_panel), - .dst_panel = df_handle_from_panel(panel), - .view = df_handle_from_view(view)); + rd_cmd(RD_CmdKind_MoveTab, + .prev_view = rd_handle_from_view(panel->last_tab_view), + .panel = rd_handle_from_panel(src_panel), + .dst_panel = rd_handle_from_panel(panel), + .view = rd_handle_from_view(view)); } // rjf: entity drop - if(!df_entity_is_nil(entity)) + if(!rd_entity_is_nil(entity)) { - df_cmd(DF_CmdKind_SpawnEntityView, - .panel = df_handle_from_panel(panel), + rd_cmd(RD_CmdKind_SpawnEntityView, + .panel = rd_handle_from_panel(panel), .cursor = payload.text_point, - .entity = df_handle_from_entity(entity)); + .entity = rd_handle_from_entity(entity)); } } } @@ -6963,7 +6917,7 @@ df_window_frame(DF_Window *ws) for(String8Node *n = evt->paths.first; n != 0; n = n->next) { Temp scratch = scratch_begin(0, 0); - df_cmd(DF_CmdKind_Open, .file_path = path_normalized_from_string(scratch.arena, n->string)); + rd_cmd(RD_CmdKind_Open, .file_path = path_normalized_from_string(scratch.arena, n->string)); scratch_end(scratch); } ui_eat_event(evt); @@ -6981,18 +6935,18 @@ df_window_frame(DF_Window *ws) struct Task { Task *next; - DF_Panel *panel; - DF_View *list_first; - DF_View *transient_owner; + RD_Panel *panel; + RD_View *list_first; + RD_View *transient_owner; }; - Task start_task = {0, &df_nil_panel, ws->query_view_stack_top}; + Task start_task = {0, &rd_nil_panel, ws->query_view_stack_top}; Task *first_task = &start_task; Task *last_task = first_task; - F32 rate = 1 - pow_f32(2, (-10.f * df_state->frame_dt)); - F32 fast_rate = 1 - pow_f32(2, (-40.f * df_state->frame_dt)); - for(DF_Panel *panel = ws->root_panel; - !df_panel_is_nil(panel); - panel = df_panel_rec_df_pre(panel).next) + F32 rate = 1 - pow_f32(2, (-10.f * rd_state->frame_dt)); + F32 fast_rate = 1 - pow_f32(2, (-40.f * rd_state->frame_dt)); + for(RD_Panel *panel = ws->root_panel; + !rd_panel_is_nil(panel); + panel = rd_panel_rec_depth_first_pre(panel).next) { Task *t = push_array(scratch.arena, Task, 1); SLLQueuePush(first_task, last_task, t); @@ -7001,10 +6955,10 @@ df_window_frame(DF_Window *ws) } for(Task *t = first_task; t != 0; t = t->next) { - DF_View *list_first = t->list_first; - for(DF_View *view = list_first; !df_view_is_nil(view); view = view->order_next) + RD_View *list_first = t->list_first; + for(RD_View *view = list_first; !rd_view_is_nil(view); view = view->order_next) { - if(!df_view_is_nil(view->first_transient)) + if(!rd_view_is_nil(view->first_transient)) { Task *task = push_array(scratch.arena, Task, 1); SLLQueuePush(first_task, last_task, task); @@ -7019,18 +6973,18 @@ df_window_frame(DF_Window *ws) abs_f32(view->scroll_pos.y.off) > 0.01f || abs_f32(view->is_filtering_t - (F32)!!view->is_filtering)) { - df_request_frame(); + rd_request_frame(); } - if(view->loading_t_target != 0 && (view == df_selected_tab_from_panel(t->panel) || - t->transient_owner == df_selected_tab_from_panel(t->panel))) + if(view->loading_t_target != 0 && (view == rd_selected_tab_from_panel(t->panel) || + t->transient_owner == rd_selected_tab_from_panel(t->panel))) { - df_request_frame(); + rd_request_frame(); } } view->loading_t += (view->loading_t_target - view->loading_t) * rate; view->is_filtering_t += ((F32)!!view->is_filtering - view->is_filtering_t) * fast_rate; - view->scroll_pos.x.off -= view->scroll_pos.x.off * (df_setting_val_from_code(DF_SettingCode_ScrollingAnimations).s32 ? fast_rate : 1.f); - view->scroll_pos.y.off -= view->scroll_pos.y.off * (df_setting_val_from_code(DF_SettingCode_ScrollingAnimations).s32 ? fast_rate : 1.f); + view->scroll_pos.x.off -= view->scroll_pos.x.off * (rd_setting_val_from_code(RD_SettingCode_ScrollingAnimations).s32 ? fast_rate : 1.f); + view->scroll_pos.y.off -= view->scroll_pos.y.off * (rd_setting_val_from_code(RD_SettingCode_ScrollingAnimations).s32 ? fast_rate : 1.f); if(abs_f32(view->scroll_pos.x.off) < 0.01f) { view->scroll_pos.x.off = 0; @@ -7043,8 +6997,8 @@ df_window_frame(DF_Window *ws) { view->is_filtering_t = (F32)!!view->is_filtering; } - if(view == df_selected_tab_from_panel(t->panel) || - t->transient_owner == df_selected_tab_from_panel(t->panel)) + if(view == rd_selected_tab_from_panel(t->panel) || + t->transient_owner == rd_selected_tab_from_panel(t->panel)) { view->loading_t_target = 0; } @@ -7056,9 +7010,9 @@ df_window_frame(DF_Window *ws) //////////////////////////// //- rjf: drag/drop cancelling // - if(df_drag_is_active() && ui_slot_press(UI_EventActionSlot_Cancel)) + if(rd_drag_is_active() && ui_slot_press(UI_EventActionSlot_Cancel)) { - df_drag_kill(); + rd_drag_kill(); ui_kill_action(); } @@ -7072,11 +7026,11 @@ df_window_frame(DF_Window *ws) ui_eat_event(evt); if(evt->delta_2f32.y < 0) { - df_cmd(DF_CmdKind_IncUIFontScale, .window = df_handle_from_window(ws)); + rd_cmd(RD_CmdKind_IncUIFontScale, .window = rd_handle_from_window(ws)); } else if(evt->delta_2f32.y > 0) { - df_cmd(DF_CmdKind_DecUIFontScale, .window = df_handle_from_window(ws)); + rd_cmd(RD_CmdKind_DecUIFontScale, .window = rd_handle_from_window(ws)); } } } @@ -7114,7 +7068,7 @@ df_window_frame(DF_Window *ws) ////////////////////////////// //- rjf: attach autocomp box to root, or hide if it has not been renewed // - if(!ui_box_is_nil(autocomp_box) && ws->autocomp_last_frame_idx+1 >= df_state->frame_index+1) + if(!ui_box_is_nil(autocomp_box) && ws->autocomp_last_frame_idx+1 >= rd_state->frame_index+1) { UI_Box *autocomp_root_box = ui_box_from_key(ws->autocomp_root_key); if(!ui_box_is_nil(autocomp_root_box)) @@ -7132,7 +7086,7 @@ df_window_frame(DF_Window *ws) } } } - else if(!ui_box_is_nil(autocomp_box) && ws->autocomp_last_frame_idx+1 < df_state->frame_index+1) + else if(!ui_box_is_nil(autocomp_box) && ws->autocomp_last_frame_idx+1 < rd_state->frame_index+1) { UI_Box *autocomp_root_box = ui_box_from_key(ws->autocomp_root_key); if(!ui_box_is_nil(autocomp_root_box)) @@ -7151,7 +7105,7 @@ df_window_frame(DF_Window *ws) { MemoryZeroStruct(&ws->hover_eval_string); arena_clear(ws->hover_eval_arena); - df_request_frame(); + rd_request_frame(); } ////////////////////////////// @@ -7159,7 +7113,7 @@ df_window_frame(DF_Window *ws) // if(ui_animating_from_state(ws->ui)) { - df_request_frame(); + rd_request_frame(); } ////////////////////////////// @@ -7188,13 +7142,13 @@ df_window_frame(DF_Window *ws) //- rjf: draw background color { - Vec4F32 bg_color = df_rgba_from_theme_color(DF_ThemeColor_BaseBackground); + Vec4F32 bg_color = rd_rgba_from_theme_color(RD_ThemeColor_BaseBackground); dr_rect(os_client_rect_from_window(ws->os), bg_color, 0, 0, 0); } //- rjf: draw window border { - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_BaseBorder); + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_BaseBorder); dr_rect(os_client_rect_from_window(ws->os), color, 0, 1.f, 0.5f); } @@ -7240,12 +7194,12 @@ df_window_frame(DF_Window *ws) if(box->flags & UI_BoxFlag_DrawDropShadow) { Rng2F32 drop_shadow_rect = shift_2f32(pad_2f32(box->rect, 8), v2f32(4, 4)); - Vec4F32 drop_shadow_color = df_rgba_from_theme_color(DF_ThemeColor_DropShadow); + Vec4F32 drop_shadow_color = rd_rgba_from_theme_color(RD_ThemeColor_DropShadow); dr_rect(drop_shadow_rect, drop_shadow_color, 0.8f, 0, 8.f); } // rjf: blur background - if(box->flags & UI_BoxFlag_DrawBackgroundBlur && df_setting_val_from_code(DF_SettingCode_BackgroundBlur).s32) + if(box->flags & UI_BoxFlag_DrawBackgroundBlur && rd_setting_val_from_code(RD_SettingCode_BackgroundBlur).s32) { R_PassParams_Blur *params = dr_blur(box->rect, box->blur_size*(1-box->transparency), 0); MemoryCopyArray(params->corner_radii, box->corner_radii); @@ -7273,7 +7227,7 @@ df_window_frame(DF_Window *ws) // rjf: brighten { R_Rect2DInst *inst = dr_rect(box->rect, v4f32(0, 0, 0, 0), 0, 0, 1.f); - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Hover); + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_Hover); color.w *= t*0.2f; inst->colors[Corner_00] = color; inst->colors[Corner_01] = color; @@ -7303,7 +7257,7 @@ df_window_frame(DF_Window *ws) // rjf: active effect extension if(box->flags & UI_BoxFlag_DrawActiveEffects) { - Vec4F32 shadow_color = df_rgba_from_theme_color(DF_ThemeColor_Hover); + Vec4F32 shadow_color = rd_rgba_from_theme_color(RD_ThemeColor_Hover); shadow_color.x *= 0.3f; shadow_color.y *= 0.3f; shadow_color.z *= 0.3f; @@ -7371,7 +7325,7 @@ df_window_frame(DF_Window *ws) dr_truncated_fancy_run_list(text_position, &box->display_string_runs, max_x, ellipses_run); if(box->flags & UI_BoxFlag_HasFuzzyMatchRanges) { - Vec4F32 match_color = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay); + Vec4F32 match_color = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlay); dr_truncated_fancy_run_fuzzy_matches(text_position, &box->display_string_runs, max_x, &box->fuzzy_match_ranges, match_color); } } @@ -7467,7 +7421,7 @@ df_window_frame(DF_Window *ws) // rjf: hover effect if(b->flags & UI_BoxFlag_DrawHotEffects) { - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Hover); + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_Hover); color.w *= b->hot_t; R_Rect2DInst *inst = dr_rect(pad_2f32(b->rect, 1), color, 0, 1.f, 1.f); MemoryCopyArray(inst->corner_radii, b->corner_radii); @@ -7507,7 +7461,7 @@ df_window_frame(DF_Window *ws) // rjf: draw focus overlay if(b->flags & UI_BoxFlag_Clickable && !(b->flags & UI_BoxFlag_DisableFocusOverlay) && b->focus_hot_t > 0.01f) { - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Focus); + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_Focus); color.w *= 0.2f*b->focus_hot_t; R_Rect2DInst *inst = dr_rect(b->rect, color, 0, 0, 1.f); MemoryCopyArray(inst->corner_radii, b->corner_radii); @@ -7516,7 +7470,7 @@ df_window_frame(DF_Window *ws) // rjf: draw focus border if(b->flags & UI_BoxFlag_Clickable && !(b->flags & UI_BoxFlag_DisableFocusBorder) && b->focus_active_t > 0.01f) { - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Focus); + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_Focus); color.w *= b->focus_active_t; R_Rect2DInst *inst = dr_rect(pad_2f32(b->rect, 0.f), color, 0, 1.f, 1.f); MemoryCopyArray(inst->corner_radii, b->corner_radii); @@ -7525,7 +7479,7 @@ df_window_frame(DF_Window *ws) // rjf: disabled overlay if(b->disabled_t >= 0.005f) { - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_DisabledOverlay); + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_DisabledOverlay); color.w *= b->disabled_t; R_Rect2DInst *inst = dr_rect(b->rect, color, 0, 0, 1); MemoryCopyArray(inst->corner_radii, b->corner_radii); @@ -7572,7 +7526,7 @@ df_window_frame(DF_Window *ws) //- rjf: draw border/overlay color to signify error if(ws->error_t > 0.01f) { - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_NegativePopButtonBackground); + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_NegativePopButtonBackground); color.w *= ws->error_t; Rng2F32 rect = os_client_rect_from_window(ws->os); dr_rect(pad_2f32(rect, 24.f), color, 0, 16.f, 12.f); @@ -7585,9 +7539,9 @@ df_window_frame(DF_Window *ws) #if 1 Vec2F32 p = add_2f32(os_mouse_from_window(ws->os), v2f32(30, 0)); dr_rect(os_client_rect_from_window(ws->os), v4f32(0, 0, 0, 0.9f), 0, 0, 0); - FNT_Run trailer_run = fnt_push_run_from_string(scratch.arena, df_font_from_slot(DF_FontSlot_Main), 16.f, 0, 0, 0, str8_lit("...")); + FNT_Run trailer_run = fnt_push_run_from_string(scratch.arena, rd_font_from_slot(RD_FontSlot_Main), 16.f, 0, 0, 0, str8_lit("...")); DR_FancyStringList strs = {0}; - DR_FancyString str = {df_font_from_slot(DF_FontSlot_Main), str8_lit("Shift + F5"), v4f32(1, 1, 1, 1), 72.f, 0.f}; + DR_FancyString str = {rd_font_from_slot(RD_FontSlot_Main), str8_lit("Shift + F5"), v4f32(1, 1, 1, 1), 72.f, 0.f}; dr_fancy_string_list_push(scratch.arena, &strs, &str); DR_FancyRunList runs = dr_fancy_run_list_from_fancy_string_list(scratch.arena, 0, FNT_RasterFlag_Smooth, &strs); dr_truncated_fancy_run_list(p, &runs, 1000000.f, trailer_run); @@ -7597,18 +7551,18 @@ df_window_frame(DF_Window *ws) Vec2F32 p = add_2f32(os_mouse_from_window(ws->os), v2f32(30, 0)); dr_rect(os_client_rect_from_window(ws->os), v4f32(0, 0, 0, 0.4f), 0, 0, 0); DR_FancyStringList strs = {0}; - DR_FancyString str1 = {df_font_from_slot(DF_FontSlot_Main), str8_lit("T"), v4f32(1, 1, 1, 1), 16.f, 4.f}; + DR_FancyString str1 = {rd_font_from_slot(RD_FontSlot_Main), str8_lit("T"), v4f32(1, 1, 1, 1), 16.f, 4.f}; dr_fancy_string_list_push(scratch.arena, &strs, &str1); - DR_FancyString str2 = {df_font_from_slot(DF_FontSlot_Main), str8_lit("his is a test of some "), v4f32(1, 0.5f, 0.5f, 1), 14.f, 0.f}; + DR_FancyString str2 = {rd_font_from_slot(RD_FontSlot_Main), str8_lit("his is a test of some "), v4f32(1, 0.5f, 0.5f, 1), 14.f, 0.f}; dr_fancy_string_list_push(scratch.arena, &strs, &str2); - DR_FancyString str3 = {df_font_from_slot(DF_FontSlot_Code), str8_lit("very fancy text!"), v4f32(1, 0.8f, 0.4f, 1), 18.f, 4.f, 4.f}; + DR_FancyString str3 = {rd_font_from_slot(RD_FontSlot_Code), str8_lit("very fancy text!"), v4f32(1, 0.8f, 0.4f, 1), 18.f, 4.f, 4.f}; dr_fancy_string_list_push(scratch.arena, &strs, &str3); DR_FancyRunList runs = dr_fancy_run_list_from_fancy_string_list(scratch.arena, 0, 0, &strs); - FNT_Run trailer_run = fnt_push_run_from_string(scratch.arena, df_font_from_slot(DF_FontSlot_Main), 16.f, 0, 0, 0, str8_lit("...")); - F32 limit = 500.f + sin_f32(df_state->time_in_seconds/10.f)*200.f; + FNT_Run trailer_run = fnt_push_run_from_string(scratch.arena, rd_font_from_slot(RD_FontSlot_Main), 16.f, 0, 0, 0, str8_lit("...")); + F32 limit = 500.f + sin_f32(rd_state->time_in_seconds/10.f)*200.f; dr_truncated_fancy_run_list(p, &runs, limit, trailer_run); dr_rect(r2f32p(p.x+limit, 0, p.x+limit+2.f, 1000), v4f32(1, 0, 0, 1), 0, 0, 0); - df_request_frame(); + rd_request_frame(); #endif } @@ -7631,12 +7585,12 @@ df_window_frame(DF_Window *ws) //~ rjf: Eval Visualization internal EV_View * -df_ev_view_from_key(U64 key) +rd_ev_view_from_key(U64 key) { - U64 slot_idx = key % df_state->eval_viz_view_cache_slots_count; - DF_EvalVizViewCacheNode *node = 0; - DF_EvalVizViewCacheSlot *slot = &df_state->eval_viz_view_cache_slots[slot_idx]; - for(DF_EvalVizViewCacheNode *n = slot->first; n != 0; n = n->next) + U64 slot_idx = key % rd_state->eval_viz_view_cache_slots_count; + RD_EvalVizViewCacheNode *node = 0; + RD_EvalVizViewCacheSlot *slot = &rd_state->eval_viz_view_cache_slots[slot_idx]; + for(RD_EvalVizViewCacheNode *n = slot->first; n != 0; n = n->next) { if(n->key == key) { @@ -7646,14 +7600,14 @@ df_ev_view_from_key(U64 key) } if(node == 0) { - node = df_state->eval_viz_view_cache_node_free; + node = rd_state->eval_viz_view_cache_node_free; if(node) { - SLLStackPop(df_state->eval_viz_view_cache_node_free); + SLLStackPop(rd_state->eval_viz_view_cache_node_free); } else { - node = push_array(df_state->arena, DF_EvalVizViewCacheNode, 1); + node = push_array(rd_state->arena, RD_EvalVizViewCacheNode, 1); } DLLPushBack(slot->first, slot->last, node); node->key = key; @@ -7663,7 +7617,7 @@ df_ev_view_from_key(U64 key) } internal F32 -df_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, S32 depth, E_Eval eval, E_Member *member, EV_ViewRuleList *view_rules, String8List *out) +rd_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, S32 depth, E_Eval eval, E_Member *member, EV_ViewRuleList *view_rules, String8List *out) { ProfBeginFunction(); Temp scratch = scratch_begin(&arena, 1); @@ -7729,7 +7683,7 @@ df_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 defaul E_Eval value_eval = e_value_eval_from_eval(eval); B32 ptee_has_content = (direct_type_kind != E_TypeKind_Null && direct_type_kind != E_TypeKind_Void); B32 ptee_has_string = (E_TypeKind_Char8 <= direct_type_kind && direct_type_kind <= E_TypeKind_UChar32); - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); String8 symbol_name = d_symbol_name_from_process_vaddr(arena, process, value_eval.value.u64, 1); @@ -7799,7 +7753,7 @@ df_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 defaul { E_Expr *deref_expr = e_expr_ref_deref(scratch.arena, eval.expr); E_Eval deref_eval = e_eval_from_expr(scratch.arena, deref_expr); - space_taken += df_append_value_strings_from_eval(arena, flags, radix, font, font_size, max_size-space_taken, depth+1, deref_eval, 0, view_rules, out); + space_taken += rd_append_value_strings_from_eval(arena, flags, radix, font, font_size, max_size-space_taken, depth+1, deref_eval, 0, view_rules, out); } else { @@ -7909,7 +7863,7 @@ df_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 defaul { E_Expr *element_expr = e_expr_ref_array_index(scratch.arena, eval.expr, idx); E_Eval element_eval = e_eval_from_expr(scratch.arena, element_expr); - space_taken += df_append_value_strings_from_eval(arena, flags, radix, font, font_size, max_size-space_taken, depth+1, element_eval, 0, view_rules, out); + space_taken += rd_append_value_strings_from_eval(arena, flags, radix, font, font_size, max_size-space_taken, depth+1, element_eval, 0, view_rules, out); if(idx+1 < array_count) { String8 comma = str8_lit(", "); @@ -7964,7 +7918,7 @@ df_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 defaul E_Member *mem = &data_members.v[member_idx]; E_Expr *dot_expr = e_expr_ref_member_access(scratch.arena, eval.expr, mem->name); E_Eval dot_eval = e_eval_from_expr(scratch.arena, dot_expr); - space_taken += df_append_value_strings_from_eval(arena, flags, radix, font, font_size, max_size-space_taken, depth+1, dot_eval, 0, view_rules, out); + space_taken += rd_append_value_strings_from_eval(arena, flags, radix, font, font_size, max_size-space_taken, depth+1, dot_eval, 0, view_rules, out); if(member_idx+1 < data_members.count) { String8 comma = str8_lit(", "); @@ -8001,11 +7955,11 @@ df_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 defaul } internal String8 -df_value_string_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval, E_Member *member, EV_ViewRuleList *view_rules) +rd_value_string_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval, E_Member *member, EV_ViewRuleList *view_rules) { Temp scratch = scratch_begin(&arena, 1); String8List strs = {0}; - df_append_value_strings_from_eval(scratch.arena, flags, default_radix, font, font_size, max_size, 0, eval, member, view_rules, &strs); + rd_append_value_strings_from_eval(scratch.arena, flags, default_radix, font, font_size, max_size, 0, eval, member, view_rules, &strs); String8 result = str8_list_join(arena, &strs, 0); scratch_end(scratch); return result; @@ -8015,10 +7969,10 @@ df_value_string_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, //~ rjf: Hover Eval internal void -df_set_hover_eval(Vec2F32 pos, String8 file_path, TxtPt pt, U64 vaddr, String8 string) +rd_set_hover_eval(Vec2F32 pos, String8 file_path, TxtPt pt, U64 vaddr, String8 string) { - DF_Window *window = df_window_from_handle(df_regs()->window); - if(window->hover_eval_last_frame_idx+1 < df_state->frame_index && + RD_Window *window = rd_window_from_handle(rd_regs()->window); + if(window->hover_eval_last_frame_idx+1 < rd_state->frame_index && ui_key_match(ui_active_key(UI_MouseButtonKind_Left), ui_key_zero()) && ui_key_match(ui_active_key(UI_MouseButtonKind_Middle), ui_key_zero()) && ui_key_match(ui_active_key(UI_MouseButtonKind_Right), ui_key_zero())) @@ -8026,7 +7980,7 @@ df_set_hover_eval(Vec2F32 pos, String8 file_path, TxtPt pt, U64 vaddr, String8 s B32 is_new_string = !str8_match(window->hover_eval_string, string, 0); if(is_new_string) { - window->hover_eval_first_frame_idx = window->hover_eval_last_frame_idx = df_state->frame_index; + window->hover_eval_first_frame_idx = window->hover_eval_last_frame_idx = rd_state->frame_index; arena_clear(window->hover_eval_arena); window->hover_eval_string = push_str8_copy(window->hover_eval_arena, string); window->hover_eval_file_path = push_str8_copy(window->hover_eval_arena, file_path); @@ -8035,7 +7989,7 @@ df_set_hover_eval(Vec2F32 pos, String8 file_path, TxtPt pt, U64 vaddr, String8 s window->hover_eval_focused = 0; } window->hover_eval_spawn_pos = pos; - window->hover_eval_last_frame_idx = df_state->frame_index; + window->hover_eval_last_frame_idx = rd_state->frame_index; } } @@ -8043,15 +7997,15 @@ df_set_hover_eval(Vec2F32 pos, String8 file_path, TxtPt pt, U64 vaddr, String8 s //~ rjf: Auto-Complete Lister internal void -df_autocomp_lister_item_chunk_list_push(Arena *arena, DF_AutoCompListerItemChunkList *list, U64 cap, DF_AutoCompListerItem *item) +rd_autocomp_lister_item_chunk_list_push(Arena *arena, RD_AutoCompListerItemChunkList *list, U64 cap, RD_AutoCompListerItem *item) { - DF_AutoCompListerItemChunkNode *n = list->last; + RD_AutoCompListerItemChunkNode *n = list->last; if(n == 0 || n->count >= n->cap) { - n = push_array(arena, DF_AutoCompListerItemChunkNode, 1); + n = push_array(arena, RD_AutoCompListerItemChunkNode, 1); SLLQueuePush(list->first, list->last, n); n->cap = cap; - n->v = push_array_no_zero(arena, DF_AutoCompListerItem, n->cap); + n->v = push_array_no_zero(arena, RD_AutoCompListerItem, n->cap); list->chunk_count += 1; } MemoryCopyStruct(&n->v[n->count], item); @@ -8059,23 +8013,23 @@ df_autocomp_lister_item_chunk_list_push(Arena *arena, DF_AutoCompListerItemChunk list->total_count += 1; } -internal DF_AutoCompListerItemArray -df_autocomp_lister_item_array_from_chunk_list(Arena *arena, DF_AutoCompListerItemChunkList *list) +internal RD_AutoCompListerItemArray +rd_autocomp_lister_item_array_from_chunk_list(Arena *arena, RD_AutoCompListerItemChunkList *list) { - DF_AutoCompListerItemArray array = {0}; + RD_AutoCompListerItemArray array = {0}; array.count = list->total_count; - array.v = push_array_no_zero(arena, DF_AutoCompListerItem, array.count); + array.v = push_array_no_zero(arena, RD_AutoCompListerItem, array.count); U64 idx = 0; - for(DF_AutoCompListerItemChunkNode *n = list->first; n != 0; n = n->next) + for(RD_AutoCompListerItemChunkNode *n = list->first; n != 0; n = n->next) { - MemoryCopy(array.v+idx, n->v, sizeof(DF_AutoCompListerItem)*n->count); + MemoryCopy(array.v+idx, n->v, sizeof(RD_AutoCompListerItem)*n->count); idx += n->count; } return array; } internal int -df_autocomp_lister_item_qsort_compare(DF_AutoCompListerItem *a, DF_AutoCompListerItem *b) +rd_autocomp_lister_item_qsort_compare(RD_AutoCompListerItem *a, RD_AutoCompListerItem *b) { int result = 0; if(a->matches.count > b->matches.count) @@ -8094,13 +8048,13 @@ df_autocomp_lister_item_qsort_compare(DF_AutoCompListerItem *a, DF_AutoCompListe } internal void -df_autocomp_lister_item_array_sort__in_place(DF_AutoCompListerItemArray *array) +rd_autocomp_lister_item_array_sort__in_place(RD_AutoCompListerItemArray *array) { - quick_sort(array->v, array->count, sizeof(array->v[0]), df_autocomp_lister_item_qsort_compare); + quick_sort(array->v, array->count, sizeof(array->v[0]), rd_autocomp_lister_item_qsort_compare); } internal String8 -df_autocomp_query_word_from_input_string_off(String8 input, U64 cursor_off) +rd_autocomp_query_word_from_input_string_off(String8 input, U64 cursor_off) { U64 word_start_off = 0; for(U64 off = 0; off < input.size && off < cursor_off; off += 1) @@ -8114,10 +8068,10 @@ df_autocomp_query_word_from_input_string_off(String8 input, U64 cursor_off) return query; } -internal DF_AutoCompListerParams -df_view_rule_autocomp_lister_params_from_input_cursor(Arena *arena, String8 string, U64 cursor_off) +internal RD_AutoCompListerParams +rd_view_rule_autocomp_lister_params_from_input_cursor(Arena *arena, String8 string, U64 cursor_off) { - DF_AutoCompListerParams params = {0}; + RD_AutoCompListerParams params = {0}; { Temp scratch = scratch_begin(&arena, 1); @@ -8225,15 +8179,15 @@ df_view_rule_autocomp_lister_params_from_input_cursor(Arena *arena, String8 stri for(MD_EachNode(child, schema_node->first)) { if(0){} - else if(str8_match(child->string, str8_lit("expr"), StringMatchFlag_CaseInsensitive)) {params.flags |= DF_AutoCompListerFlag_Locals;} - else if(str8_match(child->string, str8_lit("member"), StringMatchFlag_CaseInsensitive)) {params.flags |= DF_AutoCompListerFlag_Members;} - else if(str8_match(child->string, str8_lit("lang"), StringMatchFlag_CaseInsensitive)) {params.flags |= DF_AutoCompListerFlag_Languages;} - else if(str8_match(child->string, str8_lit("arch"), StringMatchFlag_CaseInsensitive)) {params.flags |= DF_AutoCompListerFlag_Architectures;} - else if(str8_match(child->string, str8_lit("tex2dformat"), StringMatchFlag_CaseInsensitive)) {params.flags |= DF_AutoCompListerFlag_Tex2DFormats;} + else if(str8_match(child->string, str8_lit("expr"), StringMatchFlag_CaseInsensitive)) {params.flags |= RD_AutoCompListerFlag_Locals;} + else if(str8_match(child->string, str8_lit("member"), StringMatchFlag_CaseInsensitive)) {params.flags |= RD_AutoCompListerFlag_Members;} + else if(str8_match(child->string, str8_lit("lang"), StringMatchFlag_CaseInsensitive)) {params.flags |= RD_AutoCompListerFlag_Languages;} + else if(str8_match(child->string, str8_lit("arch"), StringMatchFlag_CaseInsensitive)) {params.flags |= RD_AutoCompListerFlag_Architectures;} + else if(str8_match(child->string, str8_lit("tex2dformat"), StringMatchFlag_CaseInsensitive)) {params.flags |= RD_AutoCompListerFlag_Tex2DFormats;} else if(child->flags & (MD_NodeFlag_StringSingleQuote|MD_NodeFlag_StringDoubleQuote|MD_NodeFlag_StringTick)) { str8_list_push(arena, ¶ms.strings, child->string); - params.flags |= DF_AutoCompListerFlag_ViewRuleParams; + params.flags |= RD_AutoCompListerFlag_ViewRuleParams; } } break; @@ -8257,10 +8211,10 @@ df_view_rule_autocomp_lister_params_from_input_cursor(Arena *arena, String8 stri } internal void -df_set_autocomp_lister_query(UI_Key root_key, DF_AutoCompListerParams *params, String8 input, U64 cursor_off) +rd_set_autocomp_lister_query(UI_Key root_key, RD_AutoCompListerParams *params, String8 input, U64 cursor_off) { - DF_Window *window = df_window_from_handle(df_regs()->window); - String8 query = df_autocomp_query_word_from_input_string_off(input, cursor_off); + RD_Window *window = rd_window_from_handle(rd_regs()->window); + String8 query = rd_autocomp_query_word_from_input_string_off(input, cursor_off); String8 current_query = str8(window->autocomp_lister_query_buffer, window->autocomp_lister_query_size); if(cursor_off != window->autocomp_cursor_off) { @@ -8277,7 +8231,7 @@ df_set_autocomp_lister_query(UI_Key root_key, DF_AutoCompListerParams *params, S window->autocomp_num_visible_rows_t = 0; window->autocomp_open_t = 0; } - if(window->autocomp_last_frame_idx+1 < df_state->frame_index) + if(window->autocomp_last_frame_idx+1 < rd_state->frame_index) { window->autocomp_force_closed = 0; window->autocomp_num_visible_rows_t = 0; @@ -8289,23 +8243,23 @@ df_set_autocomp_lister_query(UI_Key root_key, DF_AutoCompListerParams *params, S window->autocomp_lister_params.strings = str8_list_copy(window->autocomp_lister_params_arena, &window->autocomp_lister_params.strings); window->autocomp_lister_query_size = Min(query.size, sizeof(window->autocomp_lister_query_buffer)); MemoryCopy(window->autocomp_lister_query_buffer, query.str, window->autocomp_lister_query_size); - window->autocomp_last_frame_idx = df_state->frame_index; + window->autocomp_last_frame_idx = rd_state->frame_index; } //////////////////////////////// //~ rjf: Search Strings internal void -df_set_search_string(String8 string) +rd_set_search_string(String8 string) { - arena_clear(df_state->string_search_arena); - df_state->string_search_string = push_str8_copy(df_state->string_search_arena, string); + arena_clear(rd_state->string_search_arena); + rd_state->string_search_string = push_str8_copy(rd_state->string_search_arena, string); } internal String8 -df_push_search_string(Arena *arena) +rd_push_search_string(Arena *arena) { - String8 result = push_str8_copy(arena, df_state->string_search_string); + String8 result = push_str8_copy(arena, rd_state->string_search_string); return result; } @@ -8315,7 +8269,7 @@ df_push_search_string(Arena *arena) //- rjf: keybindings internal OS_Key -df_os_key_from_cfg_string(String8 string) +rd_os_key_from_cfg_string(String8 string) { OS_Key result = OS_Key_Null; { @@ -8332,25 +8286,25 @@ df_os_key_from_cfg_string(String8 string) } internal void -df_clear_bindings(void) +rd_clear_bindings(void) { - arena_clear(df_state->key_map_arena); - df_state->key_map_table_size = 1024; - df_state->key_map_table = push_array(df_state->key_map_arena, DF_KeyMapSlot, df_state->key_map_table_size); - df_state->key_map_total_count = 0; + arena_clear(rd_state->key_map_arena); + rd_state->key_map_table_size = 1024; + rd_state->key_map_table = push_array(rd_state->key_map_arena, RD_KeyMapSlot, rd_state->key_map_table_size); + rd_state->key_map_total_count = 0; } -internal DF_BindingList -df_bindings_from_name(Arena *arena, String8 name) +internal RD_BindingList +rd_bindings_from_name(Arena *arena, String8 name) { - DF_BindingList result = {0}; + RD_BindingList result = {0}; U64 hash = d_hash_from_string(name); - U64 slot = hash%df_state->key_map_table_size; - for(DF_KeyMapNode *n = df_state->key_map_table[slot].first; n != 0; n = n->hash_next) + U64 slot = hash%rd_state->key_map_table_size; + for(RD_KeyMapNode *n = rd_state->key_map_table[slot].first; n != 0; n = n->hash_next) { if(str8_match(n->name, name, 0)) { - DF_BindingNode *node = push_array(arena, DF_BindingNode, 1); + RD_BindingNode *node = push_array(arena, RD_BindingNode, 1); node->binding = n->binding; SLLQueuePush(result.first, result.last, node); result.count += 1; @@ -8360,14 +8314,14 @@ df_bindings_from_name(Arena *arena, String8 name) } internal void -df_bind_name(String8 name, DF_Binding binding) +rd_bind_name(String8 name, RD_Binding binding) { if(binding.key != OS_Key_Null) { U64 hash = d_hash_from_string(name); - U64 slot = hash%df_state->key_map_table_size; - DF_KeyMapNode *existing_node = 0; - for(DF_KeyMapNode *n = df_state->key_map_table[slot].first; n != 0; n = n->hash_next) + U64 slot = hash%rd_state->key_map_table_size; + RD_KeyMapNode *existing_node = 0; + for(RD_KeyMapNode *n = rd_state->key_map_table[slot].first; n != 0; n = n->hash_next) { if(str8_match(n->name, name, 0) && n->binding.key == binding.key && n->binding.flags == binding.flags) { @@ -8377,48 +8331,48 @@ df_bind_name(String8 name, DF_Binding binding) } if(existing_node == 0) { - DF_KeyMapNode *n = df_state->free_key_map_node; + RD_KeyMapNode *n = rd_state->free_key_map_node; if(n == 0) { - n = push_array(df_state->arena, DF_KeyMapNode, 1); + n = push_array(rd_state->arena, RD_KeyMapNode, 1); } else { - df_state->free_key_map_node = df_state->free_key_map_node->hash_next; + rd_state->free_key_map_node = rd_state->free_key_map_node->hash_next; } - n->name = push_str8_copy(df_state->arena, name); + n->name = push_str8_copy(rd_state->arena, name); n->binding = binding; - DLLPushBack_NP(df_state->key_map_table[slot].first, df_state->key_map_table[slot].last, n, hash_next, hash_prev); - df_state->key_map_total_count += 1; + DLLPushBack_NP(rd_state->key_map_table[slot].first, rd_state->key_map_table[slot].last, n, hash_next, hash_prev); + rd_state->key_map_total_count += 1; } } } internal void -df_unbind_name(String8 name, DF_Binding binding) +rd_unbind_name(String8 name, RD_Binding binding) { U64 hash = d_hash_from_string(name); - U64 slot = hash%df_state->key_map_table_size; - for(DF_KeyMapNode *n = df_state->key_map_table[slot].first, *next = 0; n != 0; n = next) + U64 slot = hash%rd_state->key_map_table_size; + for(RD_KeyMapNode *n = rd_state->key_map_table[slot].first, *next = 0; n != 0; n = next) { next = n->hash_next; if(str8_match(n->name, name, 0) && n->binding.key == binding.key && n->binding.flags == binding.flags) { - DLLRemove_NP(df_state->key_map_table[slot].first, df_state->key_map_table[slot].last, n, hash_next, hash_prev); - n->hash_next = df_state->free_key_map_node; - df_state->free_key_map_node = n; - df_state->key_map_total_count -= 1; + DLLRemove_NP(rd_state->key_map_table[slot].first, rd_state->key_map_table[slot].last, n, hash_next, hash_prev); + n->hash_next = rd_state->free_key_map_node; + rd_state->free_key_map_node = n; + rd_state->key_map_total_count -= 1; } } } internal String8List -df_cmd_name_list_from_binding(Arena *arena, DF_Binding binding) +rd_cmd_name_list_from_binding(Arena *arena, RD_Binding binding) { String8List result = {0}; - for(U64 idx = 0; idx < df_state->key_map_table_size; idx += 1) + for(U64 idx = 0; idx < rd_state->key_map_table_size; idx += 1) { - for(DF_KeyMapNode *n = df_state->key_map_table[idx].first; n != 0; n = n->hash_next) + for(RD_KeyMapNode *n = rd_state->key_map_table[idx].first; n != 0; n = n->hash_next) { if(n->binding.key == binding.key && n->binding.flags == binding.flags) { @@ -8432,24 +8386,24 @@ df_cmd_name_list_from_binding(Arena *arena, DF_Binding binding) //- rjf: colors internal Vec4F32 -df_rgba_from_theme_color(DF_ThemeColor color) +rd_rgba_from_theme_color(RD_ThemeColor color) { - return df_state->cfg_theme.colors[color]; + return rd_state->cfg_theme.colors[color]; } -internal DF_ThemeColor -df_theme_color_from_txt_token_kind(TXT_TokenKind kind) +internal RD_ThemeColor +rd_theme_color_from_txt_token_kind(TXT_TokenKind kind) { - DF_ThemeColor color = DF_ThemeColor_CodeDefault; + RD_ThemeColor color = RD_ThemeColor_CodeDefault; switch(kind) { default:break; - case TXT_TokenKind_Keyword:{color = DF_ThemeColor_CodeKeyword;}break; - case TXT_TokenKind_Numeric:{color = DF_ThemeColor_CodeNumeric;}break; - case TXT_TokenKind_String: {color = DF_ThemeColor_CodeString;}break; - case TXT_TokenKind_Meta: {color = DF_ThemeColor_CodeMeta;}break; - case TXT_TokenKind_Comment:{color = DF_ThemeColor_CodeComment;}break; - case TXT_TokenKind_Symbol: {color = DF_ThemeColor_CodeDelimiterOperator;}break; + case TXT_TokenKind_Keyword:{color = RD_ThemeColor_CodeKeyword;}break; + case TXT_TokenKind_Numeric:{color = RD_ThemeColor_CodeNumeric;}break; + case TXT_TokenKind_String: {color = RD_ThemeColor_CodeString;}break; + case TXT_TokenKind_Meta: {color = RD_ThemeColor_CodeMeta;}break; + case TXT_TokenKind_Comment:{color = RD_ThemeColor_CodeComment;}break; + case TXT_TokenKind_Symbol: {color = RD_ThemeColor_CodeDelimiterOperator;}break; } return color; } @@ -8457,9 +8411,9 @@ df_theme_color_from_txt_token_kind(TXT_TokenKind kind) //- rjf: code -> palette internal UI_Palette * -df_palette_from_code(DF_PaletteCode code) +rd_palette_from_code(RD_PaletteCode code) { - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Window *window = rd_window_from_handle(rd_regs()->window); UI_Palette *result = &window->cfg_palettes[code]; return result; } @@ -8467,17 +8421,17 @@ df_palette_from_code(DF_PaletteCode code) //- rjf: fonts/sizes internal FNT_Tag -df_font_from_slot(DF_FontSlot slot) +rd_font_from_slot(RD_FontSlot slot) { - FNT_Tag result = df_state->cfg_font_tags[slot]; + FNT_Tag result = rd_state->cfg_font_tags[slot]; return result; } internal F32 -df_font_size_from_slot(DF_FontSlot slot) +rd_font_size_from_slot(RD_FontSlot slot) { F32 result = 0; - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); F32 dpi = os_dpi_from_window(ws->os); if(dpi != ws->last_dpi) { @@ -8486,8 +8440,8 @@ df_font_size_from_slot(DF_FontSlot slot) ws->last_dpi = dpi; S32 *pt_sizes[] = { - &ws->setting_vals[DF_SettingCode_MainFontSize].s32, - &ws->setting_vals[DF_SettingCode_CodeFontSize].s32, + &ws->setting_vals[RD_SettingCode_MainFontSize].s32, + &ws->setting_vals[RD_SettingCode_CodeFontSize].s32, }; for(U64 idx = 0; idx < ArrayCount(pt_sizes); idx += 1) { @@ -8498,52 +8452,52 @@ df_font_size_from_slot(DF_FontSlot slot) } switch(slot) { - case DF_FontSlot_Code: + case RD_FontSlot_Code: { - result = (F32)ws->setting_vals[DF_SettingCode_CodeFontSize].s32; + result = (F32)ws->setting_vals[RD_SettingCode_CodeFontSize].s32; }break; default: - case DF_FontSlot_Main: - case DF_FontSlot_Icons: + case RD_FontSlot_Main: + case RD_FontSlot_Icons: { - result = (F32)ws->setting_vals[DF_SettingCode_MainFontSize].s32; + result = (F32)ws->setting_vals[RD_SettingCode_MainFontSize].s32; }break; } return result; } internal FNT_RasterFlags -df_raster_flags_from_slot(DF_FontSlot slot) +rd_raster_flags_from_slot(RD_FontSlot slot) { FNT_RasterFlags flags = FNT_RasterFlag_Smooth|FNT_RasterFlag_Hinted; switch(slot) { default:{}break; - case DF_FontSlot_Icons:{flags = FNT_RasterFlag_Smooth;}break; - case DF_FontSlot_Main: {flags = (!!df_setting_val_from_code(DF_SettingCode_SmoothUIText).s32*FNT_RasterFlag_Smooth)|(!!df_setting_val_from_code(DF_SettingCode_HintUIText).s32*FNT_RasterFlag_Hinted);}break; - case DF_FontSlot_Code: {flags = (!!df_setting_val_from_code(DF_SettingCode_SmoothCodeText).s32*FNT_RasterFlag_Smooth)|(!!df_setting_val_from_code(DF_SettingCode_HintCodeText).s32*FNT_RasterFlag_Hinted);}break; + case RD_FontSlot_Icons:{flags = FNT_RasterFlag_Smooth;}break; + case RD_FontSlot_Main: {flags = (!!rd_setting_val_from_code(RD_SettingCode_SmoothUIText).s32*FNT_RasterFlag_Smooth)|(!!rd_setting_val_from_code(RD_SettingCode_HintUIText).s32*FNT_RasterFlag_Hinted);}break; + case RD_FontSlot_Code: {flags = (!!rd_setting_val_from_code(RD_SettingCode_SmoothCodeText).s32*FNT_RasterFlag_Smooth)|(!!rd_setting_val_from_code(RD_SettingCode_HintCodeText).s32*FNT_RasterFlag_Hinted);}break; } return flags; } //- rjf: settings -internal DF_SettingVal -df_setting_val_from_code(DF_SettingCode code) +internal RD_SettingVal +rd_setting_val_from_code(RD_SettingCode code) { - DF_Window *window = df_window_from_handle(df_regs()->window); - DF_SettingVal result = {0}; + RD_Window *window = rd_window_from_handle(rd_regs()->window); + RD_SettingVal result = {0}; if(window != 0) { result = window->setting_vals[code]; } if(result.set == 0) { - for(EachEnumVal(DF_CfgSrc, src)) + for(EachEnumVal(RD_CfgSrc, src)) { - if(df_state->cfg_setting_vals[src][code].set) + if(rd_state->cfg_setting_vals[src][code].set) { - result = df_state->cfg_setting_vals[src][code]; + result = rd_state->cfg_setting_vals[src][code]; break; } } @@ -8554,13 +8508,13 @@ df_setting_val_from_code(DF_SettingCode code) //- rjf: config serialization internal int -df_qsort_compare__cfg_string_bindings(DF_StringBindingPair *a, DF_StringBindingPair *b) +rd_qsort_compare__cfg_string_bindings(RD_StringBindingPair *a, RD_StringBindingPair *b) { return strncmp((char *)a->string.str, (char *)b->string.str, Min(a->string.size, b->string.size)); } internal String8List -df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) +rd_cfg_strings_from_gfx(Arena *arena, String8 root_path, RD_CfgSrc source) { ProfBeginFunction(); local_persist char *spaces = " "; @@ -8569,18 +8523,18 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) //- rjf: write all entities { - for(EachEnumVal(DF_EntityKind, k)) + for(EachEnumVal(RD_EntityKind, k)) { - DF_EntityKindFlags k_flags = d_entity_kind_flags_table[k]; - if(!(k_flags & DF_EntityKindFlag_IsSerializedToConfig)) + RD_EntityKindFlags k_flags = rd_entity_kind_flags_table[k]; + if(!(k_flags & RD_EntityKindFlag_IsSerializedToConfig)) { continue; } B32 first = 1; - DF_EntityList entities = d_query_cached_entity_list_with_kind(k); - for(DF_EntityNode *n = entities.first; n != 0; n = n->next) + RD_EntityList entities = d_query_cached_entity_list_with_kind(k); + for(RD_EntityNode *n = entities.first; n != 0; n = n->next) { - DF_Entity *entity = n->entity; + RD_Entity *entity = n->entity; if(entity->cfg_src != source) { continue; @@ -8594,12 +8548,12 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) (int)Max(0, 79 - (title_name.size + 5)), slashes); } - DF_EntityRec rec = {0}; + RD_EntityRec rec = {0}; S64 depth = 0; - for(DF_Entity *e = entity; !df_entity_is_nil(e); e = rec.next) + for(RD_Entity *e = entity; !rd_entity_is_nil(e); e = rec.next) { //- rjf: get next iteration - rec = df_entity_rec_depth_first_pre(e, entity); + rec = rd_entity_rec_depth_first_pre(e, entity); //- rjf: unpack entity info typedef U32 EntityInfoFlags; @@ -8613,7 +8567,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) EntityInfoFlag_HasChildren = (1<<5), }; String8 entity_name_escaped = e->string; - if(d_entity_kind_flags_table[e->kind] & DF_EntityKindFlag_NameIsPath) + if(rd_entity_kind_flags_table[e->kind] & RD_EntityKindFlag_NameIsPath) { Temp scratch = scratch_begin(&arena, 1); String8 path_normalized = path_normalized_from_string(scratch.arena, e->string); @@ -8627,10 +8581,10 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) EntityInfoFlags info_flags = 0; if(entity_name_escaped.size != 0) { info_flags |= EntityInfoFlag_HasName; } if(!!e->disabled) { info_flags |= EntityInfoFlag_HasDisabled; } - if(e->flags & DF_EntityFlag_HasTextPoint) { info_flags |= EntityInfoFlag_HasTxtPt; } - if(e->flags & DF_EntityFlag_HasVAddr) { info_flags |= EntityInfoFlag_HasVAddr; } - if(e->flags & DF_EntityFlag_HasColor) { info_flags |= EntityInfoFlag_HasColor; } - if(!df_entity_is_nil(e->first)) { info_flags |= EntityInfoFlag_HasChildren; } + if(e->flags & RD_EntityFlag_HasTextPoint) { info_flags |= EntityInfoFlag_HasTxtPt; } + if(e->flags & RD_EntityFlag_HasVAddr) { info_flags |= EntityInfoFlag_HasVAddr; } + if(e->flags & RD_EntityFlag_HasColor) { info_flags |= EntityInfoFlag_HasColor; } + if(!rd_entity_is_nil(e->first)) { info_flags |= EntityInfoFlag_HasChildren; } //- rjf: write entity info B32 opened_brace = 0; @@ -8653,18 +8607,18 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) { str8_list_pushf(arena, &strs, "disabled: 1\n"); } - if(e->flags & DF_EntityFlag_HasColor) + if(e->flags & RD_EntityFlag_HasColor) { - Vec4F32 hsva = df_hsva_from_entity(e); + Vec4F32 hsva = rd_hsva_from_entity(e); Vec4F32 rgba = rgba_from_hsva(hsva); U32 rgba_hex = u32_from_rgba(rgba); str8_list_pushf(arena, &strs, "color: 0x%x\n", rgba_hex); } - if(e->flags & DF_EntityFlag_HasTextPoint) + if(e->flags & RD_EntityFlag_HasTextPoint) { str8_list_pushf(arena, &strs, "line: %I64d\n", e->text_point.line); } - if(e->flags & DF_EntityFlag_HasVAddr) + if(e->flags & RD_EntityFlag_HasVAddr) { str8_list_pushf(arena, &strs, "vaddr: (0x%I64x)\n", e->vaddr); } @@ -8700,7 +8654,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) } // rjf: separate top-level entities with extra newline - if(df_entity_is_nil(rec.next) && (rec.pop_count != 0 || n->next == 0)) + if(rd_entity_is_nil(rec.next) && (rec.pop_count != 0 || n->next == 0)) { str8_list_pushf(arena, &strs, "\n"); } @@ -8710,7 +8664,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) } //- rjf: write exception code filters - if(source == DF_CfgSrc_Project) + if(source == RD_CfgSrc_Project) { str8_list_push(arena, &strs, str8_lit("/// exception code filters ////////////////////////////////////////////////////\n")); str8_list_push(arena, &strs, str8_lit("\n")); @@ -8721,7 +8675,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) k = (CTRL_ExceptionCodeKind)(k+1)) { String8 name = ctrl_exception_code_kind_lowercase_code_string_table[k]; - B32 value = !!(df_state->ctrl_exception_code_filters[k/64] & (1ull<<(k%64))); + B32 value = !!(rd_state->ctrl_exception_code_filters[k/64] & (1ull<<(k%64))); str8_list_pushf(arena, &strs, " %S: %i\n", name, value); } str8_list_push(arena, &strs, str8_lit("}\n\n")); @@ -8730,7 +8684,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) //- rjf: serialize windows { B32 first = 1; - for(DF_Window *window = df_state->first_window; window != 0; window = window->next) + for(RD_Window *window = rd_state->first_window; window != 0; window = window->next) { if(window->cfg_src != source) { @@ -8744,7 +8698,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) } OS_Handle monitor = os_monitor_from_window(window->os); String8 monitor_name = os_name_from_monitor(arena, monitor); - DF_Panel *root_panel = window->root_panel; + RD_Panel *root_panel = window->root_panel; Rng2F32 rect = os_rect_from_window(window->os); Vec2F32 size = dim_2f32(rect); str8_list_push (arena, &strs, str8_lit("window:\n")); @@ -8756,24 +8710,24 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) str8_list_pushf(arena, &strs, " monitor: \"%S\"\n", monitor_name); str8_list_pushf(arena, &strs, " size: (%i %i)\n", (int)size.x, (int)size.y); str8_list_pushf(arena, &strs, " dpi: %f\n", os_dpi_from_window(window->os)); - for(EachEnumVal(DF_SettingCode, code)) + for(EachEnumVal(RD_SettingCode, code)) { - DF_SettingVal current = window->setting_vals[code]; + RD_SettingVal current = window->setting_vals[code]; if(current.set) { - str8_list_pushf(arena, &strs, " %S: %i\n", df_g_setting_code_lower_string_table[code], current.s32); + str8_list_pushf(arena, &strs, " %S: %i\n", rd_setting_code_lower_string_table[code], current.s32); } } { - DF_PanelRec rec = {0}; + RD_PanelRec rec = {0}; S32 indentation = 2; String8 indent_str = str8_lit(" "); str8_list_pushf(arena, &strs, " panels:\n"); str8_list_pushf(arena, &strs, " {\n"); - for(DF_Panel *p = root_panel; !df_panel_is_nil(p); p = rec.next) + for(RD_Panel *p = root_panel; !rd_panel_is_nil(p); p = rec.next) { // rjf: get recursion - rec = df_panel_rec_df_pre(p); + rec = rd_panel_rec_depth_first_pre(p); // rjf: non-root needs pct node if(p != root_panel) @@ -8811,12 +8765,12 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) } // rjf: views - for(DF_View *view = p->first_tab_view; !df_view_is_nil(view); view = view->order_next) + for(RD_View *view = p->first_tab_view; !rd_view_is_nil(view); view = view->order_next) { String8 view_string = view->spec->info.name; // rjf: serialize views which can be serialized - if(view->spec->info.flags & DF_ViewSpecFlag_CanSerialize) + if(view->spec->info.flags & RD_ViewSpecFlag_CanSerialize) { str8_list_pushf(arena, &strs, "%.*s", indentation*2, indent_str.str); @@ -8825,7 +8779,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) // rjf: serialize view parameterizations str8_list_push(arena, &strs, str8_lit(": {")); - if(view == df_selected_tab_from_panel(p)) + if(view == rd_selected_tab_from_panel(p)) { str8_list_push(arena, &strs, str8_lit("selected ")); } @@ -8844,7 +8798,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) Temp scratch = scratch_begin(&arena, 1); String8 query_raw = str8(view->query_buffer, view->query_string_size); { - String8 query_file_path = d_file_path_from_eval_string(scratch.arena, query_raw); + String8 query_file_path = rd_file_path_from_eval_string(scratch.arena, query_raw); if(query_file_path.size != 0) { query_file_path = path_relative_dst_from_absolute_dst_src(scratch.arena, query_file_path, root_path); @@ -8919,7 +8873,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) for(S32 pop_idx = 0; pop_idx < rec.pop_count; pop_idx += 1) { indentation -= 1; - if(pop_idx == rec.pop_count-1 && rec.next == &df_nil_panel) + if(pop_idx == rec.pop_count-1 && rec.next == &rd_nil_panel) { break; } @@ -8934,27 +8888,27 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) } //- rjf: serialize keybindings - if(source == DF_CfgSrc_User) + if(source == RD_CfgSrc_User) { Temp scratch = scratch_begin(&arena, 1); String8 indent_str = str8_lit(" "); U64 string_binding_pair_count = 0; - DF_StringBindingPair *string_binding_pairs = push_array(scratch.arena, DF_StringBindingPair, df_state->key_map_total_count); + RD_StringBindingPair *string_binding_pairs = push_array(scratch.arena, RD_StringBindingPair, rd_state->key_map_total_count); for(U64 idx = 0; - idx < df_state->key_map_table_size && string_binding_pair_count < df_state->key_map_total_count; + idx < rd_state->key_map_table_size && string_binding_pair_count < rd_state->key_map_total_count; idx += 1) { - for(DF_KeyMapNode *n = df_state->key_map_table[idx].first; - n != 0 && string_binding_pair_count < df_state->key_map_total_count; + for(RD_KeyMapNode *n = rd_state->key_map_table[idx].first; + n != 0 && string_binding_pair_count < rd_state->key_map_total_count; n = n->hash_next) { - DF_StringBindingPair *pair = string_binding_pairs + string_binding_pair_count; + RD_StringBindingPair *pair = string_binding_pairs + string_binding_pair_count; pair->string = n->name; pair->binding = n->binding; string_binding_pair_count += 1; } } - quick_sort(string_binding_pairs, string_binding_pair_count, sizeof(DF_StringBindingPair), df_qsort_compare__cfg_string_bindings); + quick_sort(string_binding_pairs, string_binding_pair_count, sizeof(RD_StringBindingPair), rd_qsort_compare__cfg_string_bindings); if(string_binding_pair_count != 0) { str8_list_push(arena, &strs, str8_lit("/// keybindings ///////////////////////////////////////////////////////////////\n")); @@ -8963,7 +8917,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) str8_list_push(arena, &strs, str8_lit("{\n")); for(U64 idx = 0; idx < string_binding_pair_count; idx += 1) { - DF_StringBindingPair *pair = string_binding_pairs + idx; + RD_StringBindingPair *pair = string_binding_pairs + idx; String8List event_flags_strings = os_string_list_from_event_flags(scratch.arena, pair->binding.flags); StringJoin join = {str8_lit(""), str8_lit(" "), str8_lit("")}; String8 event_flags_string = str8_list_join(scratch.arena, &event_flags_strings, &join); @@ -8988,18 +8942,18 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) } //- rjf: serialize theme colors - if(source == DF_CfgSrc_User) + if(source == RD_CfgSrc_User) { // rjf: determine if this theme matches an existing preset B32 is_preset = 0; - DF_ThemePreset matching_preset = DF_ThemePreset_DefaultDark; + RD_ThemePreset matching_preset = RD_ThemePreset_DefaultDark; { - for(DF_ThemePreset p = (DF_ThemePreset)0; p < DF_ThemePreset_COUNT; p = (DF_ThemePreset)(p+1)) + for(RD_ThemePreset p = (RD_ThemePreset)0; p < RD_ThemePreset_COUNT; p = (RD_ThemePreset)(p+1)) { B32 matches_this_preset = 1; - for(DF_ThemeColor c = (DF_ThemeColor)(DF_ThemeColor_Null+1); c < DF_ThemeColor_COUNT; c = (DF_ThemeColor)(c+1)) + for(RD_ThemeColor c = (RD_ThemeColor)(RD_ThemeColor_Null+1); c < RD_ThemeColor_COUNT; c = (RD_ThemeColor)(c+1)) { - if(!MemoryMatchStruct(&df_state->cfg_theme_target.colors[c], &df_g_theme_preset_colors_table[p][c])) + if(!MemoryMatchStruct(&rd_state->cfg_theme_target.colors[c], &rd_theme_preset_colors_table[p][c])) { matches_this_preset = 0; break; @@ -9022,7 +8976,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) // rjf: serialize preset theme if(is_preset) { - str8_list_pushf(arena, &strs, "color_preset: \"%S\"\n\n", df_g_theme_preset_code_string_table[matching_preset]); + str8_list_pushf(arena, &strs, "color_preset: \"%S\"\n\n", rd_theme_preset_code_string_table[matching_preset]); } // rjf: serialize non-preset theme @@ -9030,12 +8984,12 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) { str8_list_push(arena, &strs, str8_lit("colors:\n")); str8_list_push(arena, &strs, str8_lit("{\n")); - for(DF_ThemeColor color = (DF_ThemeColor)(DF_ThemeColor_Null+1); - color < DF_ThemeColor_COUNT; - color = (DF_ThemeColor)(color+1)) + for(RD_ThemeColor color = (RD_ThemeColor)(RD_ThemeColor_Null+1); + color < RD_ThemeColor_COUNT; + color = (RD_ThemeColor)(color+1)) { - String8 color_name = df_g_theme_color_cfg_string_table[color]; - Vec4F32 color_rgba = df_state->cfg_theme_target.colors[color]; + String8 color_name = rd_theme_color_cfg_string_table[color]; + Vec4F32 color_rgba = rd_state->cfg_theme_target.colors[color]; String8 color_hex = hex_string_from_rgba_4f32(arena, color_rgba); str8_list_pushf(arena, &strs, " %S:%.*s0x%S\n", color_name, @@ -9047,10 +9001,10 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) } //- rjf: serialize fonts - if(source == DF_CfgSrc_User) + if(source == RD_CfgSrc_User) { - String8 code_font_path_escaped = escaped_from_raw_str8(arena, df_state->cfg_code_font_path); - String8 main_font_path_escaped = escaped_from_raw_str8(arena, df_state->cfg_main_font_path); + String8 code_font_path_escaped = escaped_from_raw_str8(arena, rd_state->cfg_code_font_path); + String8 main_font_path_escaped = escaped_from_raw_str8(arena, rd_state->cfg_main_font_path); str8_list_push(arena, &strs, str8_lit("/// fonts /////////////////////////////////////////////////////////////////////\n")); str8_list_push(arena, &strs, str8_lit("\n")); str8_list_pushf(arena, &strs, "code_font: \"%S\"\n", code_font_path_escaped); @@ -9061,13 +9015,13 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) //- rjf: serialize global settings { B32 first = 1; - for(EachEnumVal(DF_SettingCode, code)) + for(EachEnumVal(RD_SettingCode, code)) { - if(df_g_setting_code_default_is_per_window_table[code]) + if(rd_setting_code_default_is_per_window_table[code]) { continue; } - DF_SettingVal current = df_state->cfg_setting_vals[source][code]; + RD_SettingVal current = rd_state->cfg_setting_vals[source][code]; if(current.set) { if(first) @@ -9076,7 +9030,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) str8_list_push(arena, &strs, str8_lit("/// global settings ///////////////////////////////////////////////////////////\n")); str8_list_push(arena, &strs, str8_lit("\n")); } - str8_list_pushf(arena, &strs, "%S: %i\n", df_g_setting_code_lower_string_table[code], current.s32); + str8_list_pushf(arena, &strs, "%S: %i\n", rd_setting_code_lower_string_table[code], current.s32); } } if(!first) @@ -9093,7 +9047,7 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source) //~ rjf: Process Control Info Stringification internal String8 -df_string_from_exception_code(U32 code) +rd_string_from_exception_code(U32 code) { String8 string = {0}; for(EachNonZeroEnumVal(CTRL_ExceptionCodeKind, k)) @@ -9108,18 +9062,18 @@ df_string_from_exception_code(U32 code) } internal String8 -df_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, DF_IconKind *icon_out) +rd_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, RD_IconKind *icon_out) { - DF_IconKind icon = DF_IconKind_Null; + RD_IconKind icon = RD_IconKind_Null; String8 explanation = {0}; Temp scratch = scratch_begin(&arena, 1); - DF_Entity *thread = df_entity_from_ctrl_handle(event->entity); - String8 thread_display_string = df_display_string_from_entity(scratch.arena, thread); + RD_Entity *thread = rd_entity_from_ctrl_handle(event->entity); + String8 thread_display_string = rd_display_string_from_entity(scratch.arena, thread); String8 process_thread_string = thread_display_string; - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - if(process->kind == DF_EntityKind_Process) + RD_Entity *process = rd_entity_ancestor_from_kind(thread, RD_EntityKind_Process); + if(process->kind == RD_EntityKind_Process) { - String8 process_display_string = df_display_string_from_entity(scratch.arena, process); + String8 process_display_string = rd_display_string_from_entity(scratch.arena, process); process_thread_string = push_str8f(scratch.arena, "%S: %S", process_display_string, thread_display_string); } switch(event->kind) @@ -9131,7 +9085,7 @@ df_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, default:{}break; case CTRL_EventCause_Finished: { - if(!df_entity_is_nil(thread)) + if(!rd_entity_is_nil(thread)) { explanation = push_str8f(arena, "%S completed step", process_thread_string); } @@ -9142,22 +9096,22 @@ df_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, }break; case CTRL_EventCause_UserBreakpoint: { - if(!df_entity_is_nil(thread)) + if(!rd_entity_is_nil(thread)) { - icon = DF_IconKind_CircleFilled; + icon = RD_IconKind_CircleFilled; explanation = push_str8f(arena, "%S hit a breakpoint", process_thread_string); } }break; case CTRL_EventCause_InterruptedByException: { - if(!df_entity_is_nil(thread)) + if(!rd_entity_is_nil(thread)) { - icon = DF_IconKind_WarningBig; + icon = RD_IconKind_WarningBig; switch(event->exception_kind) { default: { - String8 exception_code_string = df_string_from_exception_code(event->exception_code); + String8 exception_code_string = rd_string_from_exception_code(event->exception_code); explanation = push_str8f(arena, "Exception thrown by %S - 0x%x%s%S", process_thread_string, event->exception_code, exception_code_string.size > 0 ? ": " : "", exception_code_string); }break; case CTRL_ExceptionKind_CppThrow: @@ -9189,18 +9143,18 @@ df_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, } else { - icon = DF_IconKind_Pause; + icon = RD_IconKind_Pause; explanation = str8_lit("Interrupted"); } }break; case CTRL_EventCause_InterruptedByTrap: { - icon = DF_IconKind_WarningBig; + icon = RD_IconKind_WarningBig; explanation = push_str8f(arena, "%S interrupted by trap - 0x%x", process_thread_string, event->exception_code); }break; case CTRL_EventCause_InterruptedByHalt: { - icon = DF_IconKind_Pause; + icon = RD_IconKind_Pause; explanation = str8_lit("Halted"); }break; } @@ -9218,9 +9172,9 @@ df_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, //~ rjf: Continuous Frame Requests internal void -df_request_frame(void) +rd_request_frame(void) { - df_state->num_frames_requested = 4; + rd_state->num_frames_requested = 4; } //////////////////////////////// @@ -9229,69 +9183,69 @@ df_request_frame(void) //- rjf: per-frame arena internal Arena * -df_frame_arena(void) +rd_frame_arena(void) { - return df_state->frame_arenas[df_state->frame_index%ArrayCount(df_state->frame_arenas)]; + return rd_state->frame_arenas[rd_state->frame_index%ArrayCount(rd_state->frame_arenas)]; } //- rjf: config paths internal String8 -df_cfg_path_from_src(DF_CfgSrc src) +rd_cfg_path_from_src(RD_CfgSrc src) { - return df_state->cfg_paths[src]; + return rd_state->cfg_paths[src]; } //- rjf: entity cache queries -internal DF_EntityList -d_query_cached_entity_list_with_kind(DF_EntityKind kind) +internal RD_EntityList +d_query_cached_entity_list_with_kind(RD_EntityKind kind) { ProfBeginFunction(); - D_EntityListCache *cache = &df_state->kind_caches[kind]; + D_EntityListCache *cache = &rd_state->kind_caches[kind]; // rjf: build cached list if we're out-of-date - if(cache->alloc_gen != df_state->kind_alloc_gens[kind]) + if(cache->alloc_gen != rd_state->kind_alloc_gens[kind]) { - cache->alloc_gen = df_state->kind_alloc_gens[kind]; + cache->alloc_gen = rd_state->kind_alloc_gens[kind]; if(cache->arena == 0) { cache->arena = arena_alloc(); } arena_clear(cache->arena); - cache->list = df_push_entity_list_with_kind(cache->arena, kind); + cache->list = rd_push_entity_list_with_kind(cache->arena, kind); } // rjf: grab & return cached list - DF_EntityList result = cache->list; + RD_EntityList result = cache->list; ProfEnd(); return result; } -internal DF_EntityList +internal RD_EntityList d_push_active_target_list(Arena *arena) { - DF_EntityList active_targets = {0}; - DF_EntityList all_targets = d_query_cached_entity_list_with_kind(DF_EntityKind_Target); - for(DF_EntityNode *n = all_targets.first; n != 0; n = n->next) + RD_EntityList active_targets = {0}; + RD_EntityList all_targets = d_query_cached_entity_list_with_kind(RD_EntityKind_Target); + for(RD_EntityNode *n = all_targets.first; n != 0; n = n->next) { if(!n->entity->disabled) { - df_entity_list_push(arena, &active_targets, n->entity); + rd_entity_list_push(arena, &active_targets, n->entity); } } return active_targets; } -internal DF_Entity * -d_entity_from_ev_key_and_kind(EV_Key key, DF_EntityKind kind) +internal RD_Entity * +d_entity_from_ev_key_and_kind(EV_Key key, RD_EntityKind kind) { - DF_Entity *result = &d_nil_entity; - DF_EntityList list = d_query_cached_entity_list_with_kind(kind); - for(DF_EntityNode *n = list.first; n != 0; n = n->next) + RD_Entity *result = &d_nil_entity; + RD_EntityList list = d_query_cached_entity_list_with_kind(kind); + for(RD_EntityNode *n = list.first; n != 0; n = n->next) { - DF_Entity *entity = n->entity; - if(ev_key_match(df_ev_key_from_entity(entity), key)) + RD_Entity *entity = n->entity; + if(ev_key_match(rd_ev_key_from_entity(entity), key)) { result = entity; break; @@ -9302,85 +9256,85 @@ d_entity_from_ev_key_and_kind(EV_Key key, DF_EntityKind kind) //- rjf: config state -internal D_CfgTable * -df_cfg_table(void) +internal RD_CfgTable * +rd_cfg_table(void) { - return &df_state->cfg_table; + return &rd_state->cfg_table; } //////////////////////////////// //~ rjf: Registers -internal DF_Regs * -df_regs(void) +internal RD_Regs * +rd_regs(void) { - DF_Regs *regs = &df_state->top_regs->v; + RD_Regs *regs = &rd_state->top_regs->v; return regs; } -internal DF_Regs * -df_base_regs(void) +internal RD_Regs * +rd_base_regs(void) { - DF_Regs *regs = &df_state->base_regs.v; + RD_Regs *regs = &rd_state->base_regs.v; return regs; } -internal DF_Regs * -df_push_regs_(DF_Regs *regs) +internal RD_Regs * +rd_push_regs_(RD_Regs *regs) { - DF_RegsNode *n = push_array(df_frame_arena(), DF_RegsNode, 1); - df_regs_copy_contents(df_frame_arena(), &n->v, regs); - SLLStackPush(df_state->top_regs, n); + RD_RegsNode *n = push_array(rd_frame_arena(), RD_RegsNode, 1); + rd_regs_copy_contents(rd_frame_arena(), &n->v, regs); + SLLStackPush(rd_state->top_regs, n); return &n->v; } -internal DF_Regs * -df_pop_regs(void) +internal RD_Regs * +rd_pop_regs(void) { - DF_Regs *regs = &df_state->top_regs->v; - SLLStackPop(df_state->top_regs); - if(df_state->top_regs == 0) + RD_Regs *regs = &rd_state->top_regs->v; + SLLStackPop(rd_state->top_regs); + if(rd_state->top_regs == 0) { - df_state->top_regs = &df_state->base_regs; + rd_state->top_regs = &rd_state->base_regs; } return regs; } internal void -df_regs_fill_slot_from_string(DF_RegSlot slot, String8 string) +rd_regs_fill_slot_from_string(RD_RegSlot slot, String8 string) { String8 error = {0}; switch(slot) { default: - case DF_RegSlot_String: + case RD_RegSlot_String: { - df_regs()->string = push_str8_copy(df_frame_arena(), string); + rd_regs()->string = push_str8_copy(rd_frame_arena(), string); }break; - case DF_RegSlot_FilePath: + case RD_RegSlot_FilePath: { String8TxtPtPair pair = str8_txt_pt_pair_from_string(string); - df_regs()->file_path = push_str8_copy(df_frame_arena(), pair.string); - df_regs()->cursor = pair.pt; + rd_regs()->file_path = push_str8_copy(rd_frame_arena(), pair.string); + rd_regs()->cursor = pair.pt; }break; - case DF_RegSlot_Cursor: + case RD_RegSlot_Cursor: { U64 v = 0; if(try_u64_from_str8_c_rules(string, &v)) { - df_regs()->cursor.column = 1; - df_regs()->cursor.line = v; + rd_regs()->cursor.column = 1; + rd_regs()->cursor.line = v; } else { log_user_error(str8_lit("Couldn't interpret as a line number.")); } }break; - case DF_RegSlot_Vaddr: goto use_numeric_eval; - case DF_RegSlot_Voff: goto use_numeric_eval; - case DF_RegSlot_UnwindCount: goto use_numeric_eval; - case DF_RegSlot_InlineDepth: goto use_numeric_eval; - case DF_RegSlot_PID: goto use_numeric_eval; + case RD_RegSlot_Vaddr: goto use_numeric_eval; + case RD_RegSlot_Voff: goto use_numeric_eval; + case RD_RegSlot_UnwindCount: goto use_numeric_eval; + case RD_RegSlot_InlineDepth: goto use_numeric_eval; + case RD_RegSlot_PID: goto use_numeric_eval; use_numeric_eval: { Temp scratch = scratch_begin(0, 0); @@ -9398,25 +9352,25 @@ df_regs_fill_slot_from_string(DF_RegSlot slot, String8 string) switch(slot) { default:{}break; - case DF_RegSlot_Vaddr: + case RD_RegSlot_Vaddr: { - df_regs()->vaddr = u64; + rd_regs()->vaddr = u64; }break; - case DF_RegSlot_Voff: + case RD_RegSlot_Voff: { - df_regs()->voff = u64; + rd_regs()->voff = u64; }break; - case DF_RegSlot_UnwindCount: + case RD_RegSlot_UnwindCount: { - df_regs()->unwind_count = u64; + rd_regs()->unwind_count = u64; }break; - case DF_RegSlot_InlineDepth: + case RD_RegSlot_InlineDepth: { - df_regs()->inline_depth = u64; + rd_regs()->inline_depth = u64; }break; - case DF_RegSlot_PID: + case RD_RegSlot_PID: { - df_regs()->pid = u64; + rd_regs()->pid = u64; }break; } } @@ -9435,7 +9389,7 @@ df_regs_fill_slot_from_string(DF_RegSlot slot, String8 string) // TODO(rjf): @msgs temporary glue #if 0 internal D_CmdSpec * -df_cmd_spec_from_kind(DF_CmdKind kind) +rd_cmd_spec_from_kind(RD_CmdKind kind) { String8 string = df_cmd_kind_spec_info_table[kind].string; D_CmdSpec *result = d_cmd_spec_from_string(string); @@ -9443,15 +9397,15 @@ df_cmd_spec_from_kind(DF_CmdKind kind) } #endif -internal DF_CmdKind -df_cmd_kind_from_string(String8 string) +internal RD_CmdKind +rd_cmd_kind_from_string(String8 string) { - DF_CmdKind result = DF_CmdKind_Null; - for(U64 idx = 0; idx < ArrayCount(df_cmd_kind_info_table); idx += 1) + RD_CmdKind result = RD_CmdKind_Null; + for(U64 idx = 0; idx < ArrayCount(rd_cmd_kind_info_table); idx += 1) { - if(str8_match(string, df_cmd_kind_info_table[idx].string, 0)) + if(str8_match(string, rd_cmd_kind_info_table[idx].string, 0)) { - result = (DF_CmdKind)idx; + result = (RD_CmdKind)idx; break; } } @@ -9460,16 +9414,16 @@ df_cmd_kind_from_string(String8 string) //- rjf: name -> info -internal DF_CmdKindInfo * -df_cmd_kind_info_from_string(String8 string) +internal RD_CmdKindInfo * +rd_cmd_kind_info_from_string(String8 string) { - DF_CmdKindInfo *info = &df_nil_cmd_kind_info; + RD_CmdKindInfo *info = &rd_nil_cmd_kind_info; { // TODO(rjf): extend this by looking up into dynamically-registered commands by views - DF_CmdKind kind = df_cmd_kind_from_string(string); - if(kind != DF_CmdKind_Null) + RD_CmdKind kind = rd_cmd_kind_from_string(string); + if(kind != RD_CmdKind_Null) { - info = &df_cmd_kind_info_table[kind]; + info = &rd_cmd_kind_info_table[kind]; } } return info; @@ -9478,20 +9432,20 @@ df_cmd_kind_info_from_string(String8 string) //- rjf: pushing internal void -df_push_cmd(String8 name, DF_Regs *regs) +rd_push_cmd(String8 name, RD_Regs *regs) { - df_cmd_list_push_new(df_state->cmds_arena, &df_state->cmds, name, regs); + rd_cmd_list_push_new(rd_state->cmds_arena, &rd_state->cmds, name, regs); } //- rjf: iterating internal B32 -df_next_cmd(DF_Cmd **cmd) +rd_next_cmd(RD_Cmd **cmd) { - DF_CmdNode *start_node = df_state->cmds.first; + RD_CmdNode *start_node = rd_state->cmds.first; if(cmd[0] != 0) { - start_node = CastFromMember(DF_CmdNode, cmd, cmd[0]); + start_node = CastFromMember(RD_CmdNode, cmd, cmd[0]); start_node = start_node->next; } cmd[0] = 0; @@ -9513,70 +9467,70 @@ df_next_cmd(DF_Cmd **cmd) #endif internal void -df_init(CmdLine *cmdln) +rd_init(CmdLine *cmdln) { ProfBeginFunction(); Arena *arena = arena_alloc(); - df_state = push_array(arena, DF_State, 1); - df_state->arena = arena; - for(U64 idx = 0; idx < ArrayCount(df_state->frame_arenas); idx += 1) + rd_state = push_array(arena, RD_State, 1); + rd_state->arena = arena; + for(U64 idx = 0; idx < ArrayCount(rd_state->frame_arenas); idx += 1) { - df_state->frame_arenas[idx] = arena_alloc(); + rd_state->frame_arenas[idx] = arena_alloc(); } - df_state->log = log_alloc(); - log_select(df_state->log); + rd_state->log = log_alloc(); + log_select(rd_state->log); { Temp scratch = scratch_begin(0, 0); String8 user_program_data_path = os_get_process_info()->user_program_data_path; String8 user_data_folder = push_str8f(scratch.arena, "%S/raddbg/logs", user_program_data_path); - df_state->log_path = push_str8f(df_state->arena, "%S/ui_thread.raddbg_log", user_data_folder); + rd_state->log_path = push_str8f(rd_state->arena, "%S/ui_thread.raddbg_log", user_data_folder); os_make_directory(user_data_folder); - os_write_data_to_file_path(df_state->log_path, str8_zero()); + os_write_data_to_file_path(rd_state->log_path, str8_zero()); scratch_end(scratch); } - df_state->num_frames_requested = 2; - df_state->seconds_until_autosave = 0.5f; - df_state->cmds_arena = arena_alloc(); - df_state->entities_arena = arena_alloc(.reserve_size = GB(64), .commit_size = KB(64)); - df_state->entities_root = &d_nil_entity; - df_state->entities_base = push_array(df_state->entities_arena, DF_Entity, 0); - df_state->entities_count = 0; - df_state->entities_root = df_entity_alloc(&d_nil_entity, DF_EntityKind_Root); - df_state->key_map_arena = arena_alloc(); - df_state->confirm_arena = arena_alloc(); - df_state->view_spec_table_size = 256; - df_state->view_spec_table = push_array(arena, DF_ViewSpec *, df_state->view_spec_table_size); - df_state->view_rule_spec_table_size = 1024; - df_state->view_rule_spec_table = push_array(arena, DF_ViewRuleSpec *, d_state->view_rule_spec_table_size); - df_state->code_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_code_ctx_menu_")); - df_state->entity_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_entity_ctx_menu_")); - df_state->tab_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_tab_ctx_menu_")); - df_state->string_search_arena = arena_alloc(); - df_state->eval_viz_view_cache_slots_count = 1024; - df_state->eval_viz_view_cache_slots = push_array(arena, DF_EvalVizViewCacheSlot, df_state->eval_viz_view_cache_slots_count); - df_state->cfg_main_font_path_arena = arena_alloc(); - df_state->cfg_code_font_path_arena = arena_alloc(); - df_state->bind_change_arena = arena_alloc(); - df_state->top_regs = &df_state->base_regs; - df_clear_bindings(); + rd_state->num_frames_requested = 2; + rd_state->seconds_until_autosave = 0.5f; + rd_state->cmds_arena = arena_alloc(); + rd_state->entities_arena = arena_alloc(.reserve_size = GB(64), .commit_size = KB(64)); + rd_state->entities_root = &d_nil_entity; + rd_state->entities_base = push_array(rd_state->entities_arena, RD_Entity, 0); + rd_state->entities_count = 0; + rd_state->entities_root = rd_entity_alloc(&d_nil_entity, RD_EntityKind_Root); + rd_state->key_map_arena = arena_alloc(); + rd_state->confirm_arena = arena_alloc(); + rd_state->view_spec_table_size = 256; + rd_state->view_spec_table = push_array(arena, RD_ViewSpec *, rd_state->view_spec_table_size); + rd_state->view_rule_spec_table_size = 1024; + rd_state->view_rule_spec_table = push_array(arena, RD_ViewRuleSpec *, d_state->view_rule_spec_table_size); + rd_state->code_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_code_ctx_menu_")); + rd_state->entity_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_entity_ctx_menu_")); + rd_state->tab_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_tab_ctx_menu_")); + rd_state->string_search_arena = arena_alloc(); + rd_state->eval_viz_view_cache_slots_count = 1024; + rd_state->eval_viz_view_cache_slots = push_array(arena, RD_EvalVizViewCacheSlot, rd_state->eval_viz_view_cache_slots_count); + rd_state->cfg_main_font_path_arena = arena_alloc(); + rd_state->cfg_code_font_path_arena = arena_alloc(); + rd_state->bind_change_arena = arena_alloc(); + rd_state->top_regs = &rd_state->base_regs; + rd_clear_bindings(); // rjf: set up initial entities { - DF_Entity *local_machine = df_entity_alloc(df_state->entities_root, DF_EntityKind_Machine); - df_entity_equip_ctrl_handle(local_machine, ctrl_handle_make(CTRL_MachineID_Local, dmn_handle_zero())); - df_entity_equip_name(local_machine, str8_lit("This PC")); + RD_Entity *local_machine = rd_entity_alloc(rd_state->entities_root, RD_EntityKind_Machine); + rd_entity_equip_ctrl_handle(local_machine, ctrl_handle_make(CTRL_MachineID_Local, dmn_handle_zero())); + rd_entity_equip_name(local_machine, str8_lit("This PC")); } // rjf: register gfx layer views { - DF_ViewSpecInfoArray array = {df_g_gfx_view_kind_spec_info_table, ArrayCount(df_g_gfx_view_kind_spec_info_table)}; - df_register_view_specs(array); + RD_ViewSpecInfoArray array = {rd_gfx_view_kind_spec_info_table, ArrayCount(rd_gfx_view_kind_spec_info_table)}; + rd_register_view_specs(array); } // rjf: register gfx layer view rules { - DF_ViewRuleSpecInfoArray array = {df_g_gfx_view_rule_spec_info_table, ArrayCount(df_g_gfx_view_rule_spec_info_table)}; - df_register_view_rule_specs(array); + RD_ViewRuleSpecInfoArray array = {rd_gfx_view_rule_spec_info_table, ArrayCount(rd_gfx_view_rule_spec_info_table)}; + rd_register_view_rule_specs(array); } // rjf: set up user / project paths @@ -9605,15 +9559,15 @@ df_init(CmdLine *cmdln) } // rjf: set up config path state - String8 cfg_src_paths[DF_CfgSrc_COUNT] = {user_cfg_path, project_cfg_path}; - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + String8 cfg_src_paths[RD_CfgSrc_COUNT] = {user_cfg_path, project_cfg_path}; + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { - df_state->cfg_path_arenas[src] = arena_alloc(); - df_cmd(d_cfg_src_load_cmd_kind_table[src], .file_path = path_normalized_from_string(scratch.arena, cfg_src_paths[src])); + rd_state->cfg_path_arenas[src] = arena_alloc(); + rd_cmd(rd_cfg_src_load_cmd_kind_table[src], .file_path = path_normalized_from_string(scratch.arena, cfg_src_paths[src])); } // rjf: set up config table arena - df_state->cfg_arena = arena_alloc(); + rd_state->cfg_arena = arena_alloc(); scratch_end(scratch); } @@ -9622,14 +9576,14 @@ df_init(CmdLine *cmdln) { if(ctrl_exception_code_kind_default_enable_table[k]) { - df_state->ctrl_exception_code_filters[k/64] |= 1ull<<(k%64); + rd_state->ctrl_exception_code_filters[k/64] |= 1ull<<(k%64); } } // rjf: unpack icon image data { Temp scratch = scratch_begin(0, 0); - String8 data = df_g_icon_file_bytes; + String8 data = rd_icon_file_bytes; U8 *ptr = data.str; U8 *opl = ptr+data.size; @@ -9685,7 +9639,7 @@ df_init(CmdLine *cmdln) } // rjf: upload to gpu texture - df_state->icon_texture = r_tex2d_alloc(R_ResourceKind_Static, image_dim, R_Tex2DFormat_RGBA8, image_data); + rd_state->icon_texture = r_tex2d_alloc(R_ResourceKind_Static, image_dim, R_Tex2DFormat_RGBA8, image_data); // rjf: release stbi_image_free(image_data); @@ -9697,8 +9651,8 @@ df_init(CmdLine *cmdln) Temp scratch = scratch_begin(0, 0); String8 current_path = os_get_current_path(scratch.arena); String8 current_path_with_slash = push_str8f(scratch.arena, "%S/", current_path); - df_state->current_path_arena = arena_alloc(); - df_state->current_path = push_str8_copy(df_state->current_path_arena, current_path_with_slash); + rd_state->current_path_arena = arena_alloc(); + rd_state->current_path = push_str8_copy(rd_state->current_path_arena, current_path_with_slash); scratch_end(scratch); } @@ -9706,7 +9660,7 @@ df_init(CmdLine *cmdln) } internal void -df_frame(void) +rd_frame(void) { Temp scratch = scratch_begin(0, 0); DI_Scope *di_scope = di_scope_open(); @@ -9716,17 +9670,17 @@ df_frame(void) ////////////////////////////// //- rjf: do per-frame resets // - arena_clear(df_frame_arena()); - df_state->top_regs = &df_state->base_regs; - df_regs_copy_contents(df_frame_arena(), &df_state->top_regs->v, &df_state->top_regs->v); - if(df_state->next_hover_regs != 0) + arena_clear(rd_frame_arena()); + rd_state->top_regs = &rd_state->base_regs; + rd_regs_copy_contents(rd_frame_arena(), &rd_state->top_regs->v, &rd_state->top_regs->v); + if(rd_state->next_hover_regs != 0) { - df_state->hover_regs = df_regs_copy(df_frame_arena(), df_state->next_hover_regs); - df_state->next_hover_regs = 0; + rd_state->hover_regs = rd_regs_copy(rd_frame_arena(), rd_state->next_hover_regs); + rd_state->next_hover_regs = 0; } else { - df_state->hover_regs = push_array(df_frame_arena(), DF_Regs, 1); + rd_state->hover_regs = push_array(rd_frame_arena(), RD_Regs, 1); } ////////////////////////////// @@ -9735,7 +9689,7 @@ df_frame(void) OS_EventList events = {0}; if(depth == 0) DeferLoop(depth += 1, depth -= 1) { - events = os_get_events(scratch.arena, df_state->num_frames_requested == 0); + events = os_get_events(scratch.arena, rd_state->num_frames_requested == 0); } ////////////////////////////// @@ -9743,14 +9697,14 @@ df_frame(void) // // TODO(rjf): maximize target, given all windows and their monitors F32 target_hz = os_get_gfx_info()->default_refresh_rate; - if(df_state->frame_index > 32) + if(rd_state->frame_index > 32) { // rjf: calculate average frame time out of the last N - U64 num_frames_in_history = Min(ArrayCount(df_state->frame_time_us_history), df_state->frame_index); + U64 num_frames_in_history = Min(ArrayCount(rd_state->frame_time_us_history), rd_state->frame_index); U64 frame_time_history_sum_us = 0; for(U64 idx = 0; idx < num_frames_in_history; idx += 1) { - frame_time_history_sum_us += df_state->frame_time_us_history[idx]; + frame_time_history_sum_us += rd_state->frame_time_us_history[idx]; } U64 frame_time_history_avg_us = frame_time_history_sum_us/num_frames_in_history; @@ -9779,7 +9733,7 @@ df_frame(void) ////////////////////////////// //- rjf: target Hz -> delta time // - df_state->frame_dt = 1.f/target_hz; + rd_state->frame_dt = 1.f/target_hz; ////////////////////////////// //- rjf: begin measuring actual per-frame work @@ -9789,19 +9743,19 @@ df_frame(void) ////////////////////////////// //- rjf: bind change // - if(!df_state->confirm_active && df_state->bind_change_active) + if(!rd_state->confirm_active && rd_state->bind_change_active) { if(os_key_press(&events, os_handle_zero(), 0, OS_Key_Esc)) { - df_request_frame(); - df_state->bind_change_active = 0; + rd_request_frame(); + rd_state->bind_change_active = 0; } if(os_key_press(&events, os_handle_zero(), 0, OS_Key_Delete)) { - df_request_frame(); - df_unbind_name(df_state->bind_change_cmd_name, df_state->bind_change_binding); - df_state->bind_change_active = 0; - df_cmd(d_cfg_src_write_cmd_kind_table[DF_CfgSrc_User]); + rd_request_frame(); + rd_unbind_name(rd_state->bind_change_cmd_name, rd_state->bind_change_binding); + rd_state->bind_change_active = 0; + rd_cmd(rd_cfg_src_write_cmd_kind_table[RD_CfgSrc_User]); } for(OS_Event *event = events.first, *next = 0; event != 0; event = next) { @@ -9817,19 +9771,19 @@ df_frame(void) event->key != OS_Key_Alt && event->key != OS_Key_Shift) { - df_state->bind_change_active = 0; - DF_Binding binding = zero_struct; + rd_state->bind_change_active = 0; + RD_Binding binding = zero_struct; { binding.key = event->key; binding.flags = event->flags; } - df_unbind_name(df_state->bind_change_cmd_name, df_state->bind_change_binding); - df_bind_name(df_state->bind_change_cmd_name, binding); + rd_unbind_name(rd_state->bind_change_cmd_name, rd_state->bind_change_binding); + rd_bind_name(rd_state->bind_change_cmd_name, binding); U32 codepoint = os_codepoint_from_event_flags_and_key(event->flags, event->key); os_text(&events, os_handle_zero(), codepoint); os_eat_event(&events, event); - df_cmd(d_cfg_src_write_cmd_kind_table[DF_CfgSrc_User]); - df_request_frame(); + rd_cmd(rd_cfg_src_write_cmd_kind_table[RD_CfgSrc_User]); + rd_request_frame(); break; } } @@ -9842,15 +9796,15 @@ df_frame(void) for(OS_Event *event = events.first, *next = 0; event != 0; event = next) - DF_RegsScope() + RD_RegsScope() { next = event->next; - DF_Window *window = df_window_from_os_handle(event->window); - if(window != 0 && window != df_window_from_handle(df_regs()->window)) + RD_Window *window = rd_window_from_os_handle(event->window); + if(window != 0 && window != rd_window_from_handle(rd_regs()->window)) { - df_regs()->window = df_handle_from_window(window); - df_regs()->panel = df_handle_from_panel(window->focused_panel); - df_regs()->view = window->focused_panel->selected_tab_view; + rd_regs()->window = rd_handle_from_window(window); + rd_regs()->panel = rd_handle_from_panel(window->focused_panel); + rd_regs()->view = window->focused_panel->selected_tab_view; } B32 take = 0; @@ -9858,7 +9812,7 @@ df_frame(void) if(!take && event->kind == OS_EventKind_WindowClose && window != 0) { take = 1; - df_cmd(DF_CmdKind_CloseWindow, .window = df_handle_from_window(window)); + rd_cmd(RD_CmdKind_CloseWindow, .window = rd_handle_from_window(window)); } //- rjf: try menu bar operations @@ -9866,7 +9820,7 @@ df_frame(void) if(!take && event->kind == OS_EventKind_Press && event->key == OS_Key_Alt && event->flags == 0 && event->is_repeat == 0) { take = 1; - df_request_frame(); + rd_request_frame(); window->menu_bar_focused_on_press = window->menu_bar_focused; window->menu_bar_key_held = 1; window->menu_bar_focus_press_started = 1; @@ -9874,26 +9828,26 @@ df_frame(void) if(!take && event->kind == OS_EventKind_Release && event->key == OS_Key_Alt && event->flags == 0 && event->is_repeat == 0) { take = 1; - df_request_frame(); + rd_request_frame(); window->menu_bar_key_held = 0; } if(window->menu_bar_focused && event->kind == OS_EventKind_Press && event->key == OS_Key_Alt && event->flags == 0 && event->is_repeat == 0) { take = 1; - df_request_frame(); + rd_request_frame(); window->menu_bar_focused = 0; } else if(window->menu_bar_focus_press_started && !window->menu_bar_focused && event->kind == OS_EventKind_Release && event->flags == 0 && event->key == OS_Key_Alt && event->is_repeat == 0) { take = 1; - df_request_frame(); + rd_request_frame(); window->menu_bar_focused = !window->menu_bar_focused_on_press; window->menu_bar_focus_press_started = 0; } else if(event->kind == OS_EventKind_Press && event->key == OS_Key_Esc && window->menu_bar_focused && !ui_any_ctx_menu_is_open()) { take = 1; - df_request_frame(); + rd_request_frame(); window->menu_bar_focused = 0; } } @@ -9901,11 +9855,11 @@ df_frame(void) //- rjf: try hotkey presses if(!take && event->kind == OS_EventKind_Press) { - DF_Binding binding = {event->key, event->flags}; - String8List spec_candidates = df_cmd_name_list_from_binding(scratch.arena, binding); + RD_Binding binding = {event->key, event->flags}; + String8List spec_candidates = rd_cmd_name_list_from_binding(scratch.arena, binding); if(spec_candidates.first != 0) { - df_cmd(DF_CmdKind_RunCommand, .string = spec_candidates.first->string); + rd_cmd(RD_CmdKind_RunCommand, .string = spec_candidates.first->string); U32 hit_char = os_codepoint_from_event_flags_and_key(event->flags, event->key); take = 1; if(event->flags & OS_EventFlag_Alt) @@ -9917,7 +9871,7 @@ df_frame(void) { window->menu_bar_focus_press_started = 0; } - df_request_frame(); + rd_request_frame(); } //- rjf: try text events @@ -9925,8 +9879,8 @@ df_frame(void) { String32 insertion32 = str32(&event->character, 1); String8 insertion8 = str8_from_32(scratch.arena, insertion32); - df_cmd(DF_CmdKind_InsertText, .string = insertion8); - df_request_frame(); + rd_cmd(RD_CmdKind_InsertText, .string = insertion8); + rd_request_frame(); take = 1; if(event->flags & OS_EventFlag_Alt) { @@ -9938,7 +9892,7 @@ df_frame(void) if(!take) { take = 1; - df_cmd(DF_CmdKind_OSEvent, .os_event = event); + rd_cmd(RD_CmdKind_OSEvent, .os_event = event); } //- rjf: take @@ -9952,10 +9906,10 @@ df_frame(void) ////////////////////////////// //- rjf: unpack eval-dependent info // - CTRL_Entity *process = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->process); - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *process = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->process); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); Arch arch = thread->arch; - U64 unwind_count = df_regs()->unwind_count; + U64 unwind_count = rd_regs()->unwind_count; U64 rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count); CTRL_Unwind unwind = d_query_cached_unwind_from_thread(thread); CTRL_Entity *module = ctrl_module_from_process_vaddr(process, rip_vaddr); @@ -9977,7 +9931,7 @@ df_frame(void) eval_modules[eval_module_idx].arch = m->arch; eval_modules[eval_module_idx].rdi = di_rdi_from_key(di_scope, &dbgi_key, 0); eval_modules[eval_module_idx].vaddr_range = m->vaddr_range; - eval_modules[eval_module_idx].space = d_eval_space_from_ctrl_entity(ctrl_entity_ancestor_from_kind(m, CTRL_EntityKind_Process)); + eval_modules[eval_module_idx].space = rd_eval_space_from_ctrl_entity(ctrl_entity_ancestor_from_kind(m, CTRL_EntityKind_Process)); if(module == m) { eval_modules_primary = &eval_modules[eval_module_idx]; @@ -10027,7 +9981,7 @@ df_frame(void) E_ParseCtx *ctx = parse_ctx; ctx->ip_vaddr = rip_vaddr; ctx->ip_voff = rip_voff; - ctx->ip_thread_space = d_eval_space_from_ctrl_entity(thread); + ctx->ip_thread_space = rd_eval_space_from_ctrl_entity(thread); ctx->modules = eval_modules; ctx->modules_count = eval_modules_count; ctx->primary_module = eval_modules_primary; @@ -10082,20 +10036,20 @@ df_frame(void) .name = str8_lit("Entity"), .members = entity_members_array.v, .count = entity_members_array.count); - DF_EntityKind evallable_kinds[] = + RD_EntityKind evallable_kinds[] = { - DF_EntityKind_Breakpoint, - DF_EntityKind_WatchPin, - DF_EntityKind_Target, + RD_EntityKind_Breakpoint, + RD_EntityKind_WatchPin, + RD_EntityKind_Target, }; for(U64 idx = 0; idx < ArrayCount(evallable_kinds); idx += 1) { - DF_EntityList entities = d_query_cached_entity_list_with_kind(evallable_kinds[idx]); - for(DF_EntityNode *n = entities.first; n != 0; n = n->next) + RD_EntityList entities = d_query_cached_entity_list_with_kind(evallable_kinds[idx]); + for(RD_EntityNode *n = entities.first; n != 0; n = n->next) { - DF_Entity *entity = n->entity; + RD_Entity *entity = n->entity; E_Expr *expr = e_push_expr(scratch.arena, E_ExprKind_LeafOffset, 0); - expr->space = d_eval_space_from_entity(entity); + expr->space = rd_eval_space_from_entity(entity); expr->mode = E_Mode_Offset; expr->type_key = entity_type; e_string2expr_map_insert(scratch.arena, ctx->macro_map, push_str8f(scratch.arena, "$%I64u", entity->id), expr); @@ -10108,10 +10062,10 @@ df_frame(void) } //- rjf: add macros for all watches which define identifiers - DF_EntityList watches = d_query_cached_entity_list_with_kind(DF_EntityKind_Watch); - for(DF_EntityNode *n = watches.first; n != 0; n = n->next) + RD_EntityList watches = d_query_cached_entity_list_with_kind(RD_EntityKind_Watch); + for(RD_EntityNode *n = watches.first; n != 0; n = n->next) { - DF_Entity *watch = n->entity; + RD_Entity *watch = n->entity; String8 expr = watch->string; E_TokenArray tokens = e_token_array_from_text(scratch.arena, expr); E_Parse parse = e_parse_expr_from_text_tokens(scratch.arena, expr, &tokens); @@ -10129,11 +10083,11 @@ df_frame(void) E_InterpretCtx *interpret_ctx = push_array(scratch.arena, E_InterpretCtx, 1); { E_InterpretCtx *ctx = interpret_ctx; - ctx->space_read = d_eval_space_read; - ctx->space_write = d_eval_space_write; + ctx->space_read = rd_eval_space_read; + ctx->space_write = rd_eval_space_write; ctx->primary_space = eval_modules_primary->space; ctx->reg_arch = eval_modules_primary->arch; - ctx->reg_space = d_eval_space_from_ctrl_entity(thread); + ctx->reg_space = rd_eval_space_from_ctrl_entity(thread); ctx->reg_unwind_count = unwind_count; ctx->module_base = push_array(scratch.arena, U64, 1); ctx->module_base[0] = module->vaddr_range.min; @@ -10155,12 +10109,12 @@ df_frame(void) //- rjf: autosave if needed // { - df_state->seconds_until_autosave -= df_state->frame_dt; - if(df_state->seconds_until_autosave <= 0.f) + rd_state->seconds_until_autosave -= rd_state->frame_dt; + if(rd_state->seconds_until_autosave <= 0.f) { - df_cmd(DF_CmdKind_WriteUserData); - df_cmd(DF_CmdKind_WriteProjectData); - df_state->seconds_until_autosave = 5.f; + rd_cmd(RD_CmdKind_WriteUserData); + rd_cmd(RD_CmdKind_WriteProjectData); + rd_state->seconds_until_autosave = 5.f; } } @@ -10169,18 +10123,18 @@ df_frame(void) // B32 panel_reset_done = 0; { - for(DF_Cmd *cmd = 0; df_next_cmd(&cmd);) DF_RegsScope() + for(RD_Cmd *cmd = 0; rd_next_cmd(&cmd);) RD_RegsScope() { // rjf: unpack command - DF_CmdKind kind = df_cmd_kind_from_string(cmd->name); - df_regs_copy_contents(df_frame_arena(), df_regs(), cmd->regs); + RD_CmdKind kind = rd_cmd_kind_from_string(cmd->name); + rd_regs_copy_contents(rd_frame_arena(), rd_regs(), cmd->regs); // rjf: request frame - df_request_frame(); + rd_request_frame(); // rjf: process command Dir2 split_dir = Dir2_Invalid; - DF_Panel *split_panel = &df_nil_panel; + RD_Panel *split_panel = &rd_nil_panel; U64 panel_sib_off = 0; U64 panel_child_off = 0; Vec2S32 panel_change_dir = {0}; @@ -10193,69 +10147,69 @@ df_frame(void) if(D_CmdKind_Null < (D_CmdKind)kind && (D_CmdKind)kind < D_CmdKind_COUNT) { D_CmdParams params = {0}; - params.machine = df_regs()->machine; - params.thread = df_regs()->thread; + params.machine = rd_regs()->machine; + params.thread = rd_regs()->thread; // TODO(rjf): @msgs params.entity = ???; // TODO(rjf): @msgs params.processes = ???; - params.file_path = df_regs()->file_path; - params.cursor = df_regs()->cursor; - params.vaddr = df_regs()->vaddr; - params.prefer_disasm = df_regs()->prefer_disasm; - params.pid = df_regs()->pid; + params.file_path = rd_regs()->file_path; + params.cursor = rd_regs()->cursor; + params.vaddr = rd_regs()->vaddr; + params.prefer_disasm = rd_regs()->prefer_disasm; + params.pid = rd_regs()->pid; // TODO(rjf): @msgs params.targets = ???; // TODO(rjf): @msgs #if 0 - params.window = df_regs()->window; - params.panel = df_regs()->panel; - params.dest_panel = df_regs()->dst_panel; - params.prev_view = df_regs()->prev_view; - params.view = df_regs()->view; - params.entity = df_regs()->entity; - params.entity_list = df_regs()->entity_list; - params.string = df_regs()->string; - params.file_path = df_regs()->file_path; - params.text_point = df_regs()->cursor; - params.params_tree = df_regs()->params_tree; - params.vaddr = df_regs()->vaddr; - params.voff = df_regs()->voff; - params.id = df_regs()->pid; - params.prefer_dasm = df_regs()->prefer_disasm; - params.force_confirm = df_regs()->force_confirm; - params.dir2 = df_regs()->dir2; - params.unwind_index = df_regs()->unwind_count; - params.inline_depth = df_regs()->inline_depth; + params.window = rd_regs()->window; + params.panel = rd_regs()->panel; + params.dest_panel = rd_regs()->dst_panel; + params.prev_view = rd_regs()->prev_view; + params.view = rd_regs()->view; + params.entity = rd_regs()->entity; + params.entity_list = rd_regs()->entity_list; + params.string = rd_regs()->string; + params.file_path = rd_regs()->file_path; + params.text_point = rd_regs()->cursor; + params.params_tree = rd_regs()->params_tree; + params.vaddr = rd_regs()->vaddr; + params.voff = rd_regs()->voff; + params.id = rd_regs()->pid; + params.prefer_dasm = rd_regs()->prefer_disasm; + params.force_confirm = rd_regs()->force_confirm; + params.dir2 = rd_regs()->dir2; + params.unwind_index = rd_regs()->unwind_count; + params.inline_depth = rd_regs()->inline_depth; #endif d_push_cmd((D_CmdKind)kind, ¶ms); } // rjf: try to open tabs for "view driver" commands - DF_ViewSpec *view_spec = df_view_spec_from_string(cmd->name); - if(view_spec != &df_nil_view_spec) + RD_ViewSpec *view_spec = rd_view_spec_from_string(cmd->name); + if(view_spec != &rd_nil_view_spec) { - df_cmd(DF_CmdKind_OpenTab, .string = cmd->name); + rd_cmd(RD_CmdKind_OpenTab, .string = cmd->name); } }break; //- rjf: command fast path - case DF_CmdKind_RunCommand: + case RD_CmdKind_RunCommand: { - DF_CmdKindInfo *info = df_cmd_kind_info_from_string(cmd->regs->string); + RD_CmdKindInfo *info = rd_cmd_kind_info_from_string(cmd->regs->string); // rjf: command simply executes - just no-op in this layer - if(!(info->query.flags & DF_QueryFlag_Required)) + if(!(info->query.flags & RD_QueryFlag_Required)) { - df_push_cmd(cmd->regs->string, df_regs()); + rd_push_cmd(cmd->regs->string, rd_regs()); } // rjf: command has required query -> prep query else { - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Window *window = rd_window_from_handle(rd_regs()->window); if(window != 0) { arena_clear(window->query_cmd_arena); window->query_cmd_name = push_str8_copy(window->query_cmd_arena, cmd->regs->string); - window->query_cmd_regs = df_regs_copy(window->query_cmd_arena, df_regs()); + window->query_cmd_regs = rd_regs_copy(window->query_cmd_arena, rd_regs()); MemoryZeroArray(window->query_cmd_regs_mask); window->query_view_selected = 1; } @@ -10263,60 +10217,60 @@ df_frame(void) }break; //- rjf: exiting - case DF_CmdKind_Exit: + case RD_CmdKind_Exit: { // rjf: if control processes are live, but this is not force-confirmed, then // get confirmation from user CTRL_EntityList processes = ctrl_entity_list_from_kind(d_state->ctrl_entity_store, CTRL_EntityKind_Process); UI_Key key = ui_key_from_string(ui_key_zero(), str8_lit("lossy_exit_confirmation")); - if(processes.count != 0 && !df_regs()->force_confirm && !ui_key_match(df_state->confirm_key, key)) + if(processes.count != 0 && !rd_regs()->force_confirm && !ui_key_match(rd_state->confirm_key, key)) { - df_state->confirm_key = key; - df_state->confirm_active = 1; - arena_clear(df_state->confirm_arena); - MemoryZeroStruct(&df_state->confirm_cmds); - df_state->confirm_title = push_str8f(df_state->confirm_arena, "Are you sure you want to exit?"); - df_state->confirm_desc = push_str8f(df_state->confirm_arena, "The debugger is still attached to %slive process%s.", + rd_state->confirm_key = key; + rd_state->confirm_active = 1; + arena_clear(rd_state->confirm_arena); + MemoryZeroStruct(&rd_state->confirm_cmds); + rd_state->confirm_title = push_str8f(rd_state->confirm_arena, "Are you sure you want to exit?"); + rd_state->confirm_desc = push_str8f(rd_state->confirm_arena, "The debugger is still attached to %slive process%s.", processes.count == 1 ? "a " : "", processes.count == 1 ? "" : "es"); - DF_Regs *regs = df_regs_copy(df_frame_arena(), df_regs()); + RD_Regs *regs = rd_regs_copy(rd_frame_arena(), rd_regs()); regs->force_confirm = 1; - df_cmd_list_push_new(df_state->confirm_arena, &df_state->confirm_cmds, df_cmd_kind_info_table[DF_CmdKind_Exit].string, regs); + rd_cmd_list_push_new(rd_state->confirm_arena, &rd_state->confirm_cmds, rd_cmd_kind_info_table[RD_CmdKind_Exit].string, regs); } // rjf: otherwise, actually exit else { - df_cmd(DF_CmdKind_WriteUserData); - df_cmd(DF_CmdKind_WriteProjectData); - df_state->quit = 1; + rd_cmd(RD_CmdKind_WriteUserData); + rd_cmd(RD_CmdKind_WriteProjectData); + rd_state->quit = 1; } }break; //- rjf: windows - case DF_CmdKind_OpenWindow: + case RD_CmdKind_OpenWindow: { - DF_Window *originating_window = df_window_from_handle(df_regs()->window); + RD_Window *originating_window = rd_window_from_handle(rd_regs()->window); if(originating_window == 0) { - originating_window = df_state->first_window; + originating_window = rd_state->first_window; } OS_Handle preferred_monitor = {0}; - DF_Window *new_ws = df_window_open(v2f32(1280, 720), preferred_monitor, DF_CfgSrc_User); + RD_Window *new_ws = rd_window_open(v2f32(1280, 720), preferred_monitor, RD_CfgSrc_User); if(originating_window) { - MemoryCopy(new_ws->setting_vals, originating_window->setting_vals, sizeof(DF_SettingVal)*DF_SettingCode_COUNT); + MemoryCopy(new_ws->setting_vals, originating_window->setting_vals, sizeof(RD_SettingVal)*RD_SettingCode_COUNT); } }break; - case DF_CmdKind_CloseWindow: + case RD_CmdKind_CloseWindow: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); if(ws != 0) { // rjf: is this the last window? -> exit - if(df_state->first_window == df_state->last_window && df_state->first_window == ws) + if(rd_state->first_window == rd_state->last_window && rd_state->first_window == ws) { - df_cmd(DF_CmdKind_Exit); + rd_cmd(RD_CmdKind_Exit); } // rjf: not the last window? -> just release this window @@ -10324,13 +10278,13 @@ df_frame(void) { // NOTE(rjf): we need to explicitly release all panel views, because views // are a global concept and otherwise would leak. - for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next) { - df_panel_release_all_views(panel); + rd_panel_release_all_views(panel); } ui_state_release(ws->ui); - DLLRemove(df_state->first_window, df_state->last_window, ws); + DLLRemove(rd_state->first_window, rd_state->last_window, ws); r_window_unequip(ws->os, ws->r); os_window_close(ws->os); arena_release(ws->query_cmd_arena); @@ -10338,14 +10292,14 @@ df_frame(void) arena_release(ws->hover_eval_arena); arena_release(ws->autocomp_lister_params_arena); arena_release(ws->arena); - SLLStackPush(df_state->free_window, ws); + SLLStackPush(rd_state->free_window, ws); ws->gen += 1; } } }break; - case DF_CmdKind_ToggleFullscreen: + case RD_CmdKind_ToggleFullscreen: { - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Window *window = rd_window_from_handle(rd_regs()->window); if(window != 0) { os_window_set_fullscreen(window->os, !os_window_is_fullscreen(window->os)); @@ -10353,41 +10307,41 @@ df_frame(void) }break; //- rjf: confirmations - case DF_CmdKind_ConfirmAccept: + case RD_CmdKind_ConfirmAccept: { - df_state->confirm_active = 0; - df_state->confirm_key = ui_key_zero(); - for(DF_CmdNode *n = df_state->confirm_cmds.first; n != 0; n = n->next) + rd_state->confirm_active = 0; + rd_state->confirm_key = ui_key_zero(); + for(RD_CmdNode *n = rd_state->confirm_cmds.first; n != 0; n = n->next) { - df_push_cmd(n->cmd.name, n->cmd.regs); + rd_push_cmd(n->cmd.name, n->cmd.regs); } }break; - case DF_CmdKind_ConfirmCancel: + case RD_CmdKind_ConfirmCancel: { - df_state->confirm_active = 0; - df_state->confirm_key = ui_key_zero(); + rd_state->confirm_active = 0; + rd_state->confirm_key = ui_key_zero(); }break; //- rjf: config path saving/loading/applying - case DF_CmdKind_OpenRecentProject: + case RD_CmdKind_OpenRecentProject: { - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); - if(entity->kind == DF_EntityKind_RecentProject) + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); + if(entity->kind == RD_EntityKind_RecentProject) { - df_cmd(DF_CmdKind_OpenProject, .file_path = entity->string); + rd_cmd(RD_CmdKind_OpenProject, .file_path = entity->string); } }break; - case DF_CmdKind_OpenUser: - case DF_CmdKind_OpenProject: + case RD_CmdKind_OpenUser: + case RD_CmdKind_OpenProject: { - B32 load_cfg[DF_CfgSrc_COUNT] = {0}; - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + B32 load_cfg[RD_CfgSrc_COUNT] = {0}; + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { - load_cfg[src] = (kind == d_cfg_src_load_cmd_kind_table[src]); + load_cfg[src] = (kind == rd_cfg_src_load_cmd_kind_table[src]); } //- rjf: normalize path - String8 new_path = path_normalized_from_string(scratch.arena, df_regs()->file_path); + String8 new_path = path_normalized_from_string(scratch.arena, rd_regs()->file_path); //- rjf: path -> data FileProperties props = {0}; @@ -10409,35 +10363,35 @@ df_frame(void) //- rjf: set new config paths if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { if(load_cfg[src]) { - arena_clear(df_state->cfg_path_arenas[src]); - df_state->cfg_paths[src] = push_str8_copy(df_state->cfg_path_arenas[src], new_path); + arena_clear(rd_state->cfg_path_arenas[src]); + rd_state->cfg_paths[src] = push_str8_copy(rd_state->cfg_path_arenas[src], new_path); } } } //- rjf: get config file properties - FileProperties cfg_props[DF_CfgSrc_COUNT] = {0}; + FileProperties cfg_props[RD_CfgSrc_COUNT] = {0}; if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { - String8 path = df_cfg_path_from_src(src); + String8 path = rd_cfg_path_from_src(src); cfg_props[src] = os_properties_from_file_path(path); } } //- rjf: load files - String8 cfg_data[DF_CfgSrc_COUNT] = {0}; - U64 cfg_timestamps[DF_CfgSrc_COUNT] = {0}; + String8 cfg_data[RD_CfgSrc_COUNT] = {0}; + U64 cfg_timestamps[RD_CfgSrc_COUNT] = {0}; if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { - String8 path = df_cfg_path_from_src(src); + String8 path = rd_cfg_path_from_src(src); OS_Handle file = os_file_open(OS_AccessFlag_ShareRead|OS_AccessFlag_Read, path); FileProperties props = os_properties_from_file(file); String8 data = os_string_from_file_range(scratch.arena, file, r1u64(0, props.size)); @@ -10451,23 +10405,23 @@ df_frame(void) } //- rjf: determine if we need to save config - B32 cfg_save[DF_CfgSrc_COUNT] = {0}; + B32 cfg_save[RD_CfgSrc_COUNT] = {0}; if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { cfg_save[src] = (load_cfg[src] && cfg_props[src].created == 0); } } //- rjf: determine if we need to reload config - B32 cfg_load[DF_CfgSrc_COUNT] = {0}; + B32 cfg_load[RD_CfgSrc_COUNT] = {0}; B32 cfg_load_any = 0; if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { - cfg_load[src] = (load_cfg[src] && ((cfg_save[src] == 0 && df_state->cfg_cached_timestamp[src] != cfg_timestamps[src]) || cfg_props[src].created == 0)); + cfg_load[src] = (load_cfg[src] && ((cfg_save[src] == 0 && rd_state->cfg_cached_timestamp[src] != cfg_timestamps[src]) || cfg_props[src].created == 0)); cfg_load_any = cfg_load_any || cfg_load[src]; } } @@ -10475,11 +10429,11 @@ df_frame(void) //- rjf: load => build new config table if(cfg_load_any) { - arena_clear(df_state->cfg_arena); - MemoryZeroStruct(&df_state->cfg_table); - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + arena_clear(rd_state->cfg_arena); + MemoryZeroStruct(&rd_state->cfg_table); + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { - d_cfg_table_push_unparsed_string(df_state->cfg_arena, &df_state->cfg_table, cfg_data[src], src); + rd_cfg_table_push_unparsed_string(rd_state->cfg_arena, &rd_state->cfg_table, cfg_data[src], src); } } @@ -10490,13 +10444,13 @@ df_frame(void) // if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { if(cfg_load[src]) { - DF_CmdKind cmd_kind = d_cfg_src_apply_cmd_kind_table[src]; - df_cmd(cmd_kind); - df_state->cfg_cached_timestamp[src] = cfg_timestamps[src]; + RD_CmdKind cmd_kind = rd_cfg_src_apply_cmd_kind_table[src]; + rd_cmd(cmd_kind); + rd_state->cfg_cached_timestamp[src] = cfg_timestamps[src]; } } } @@ -10504,12 +10458,12 @@ df_frame(void) //- rjf: save => dispatch write if(file_is_okay) { - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { if(cfg_save[src]) { - DF_CmdKind cmd_kind = d_cfg_src_write_cmd_kind_table[src]; - df_cmd(cmd_kind); + RD_CmdKind cmd_kind = rd_cfg_src_write_cmd_kind_table[src]; + rd_cmd(cmd_kind); } } } @@ -10522,17 +10476,17 @@ df_frame(void) }break; //- rjf: loading/applying stateful config changes - case DF_CmdKind_ApplyUserData: - case DF_CmdKind_ApplyProjectData: + case RD_CmdKind_ApplyUserData: + case RD_CmdKind_ApplyProjectData: { - D_CfgTable *table = df_cfg_table(); + RD_CfgTable *table = rd_cfg_table(); OS_HandleArray monitors = os_push_monitors_array(scratch.arena); //- rjf: get config source - DF_CfgSrc src = DF_CfgSrc_User; - for(DF_CfgSrc s = (DF_CfgSrc)0; s < DF_CfgSrc_COUNT; s = (DF_CfgSrc)(s+1)) + RD_CfgSrc src = RD_CfgSrc_User; + for(RD_CfgSrc s = (RD_CfgSrc)0; s < RD_CfgSrc_COUNT; s = (RD_CfgSrc)(s+1)) { - if(kind == d_cfg_src_apply_cmd_kind_table[s]) + if(kind == rd_cfg_src_apply_cmd_kind_table[s]) { src = s; break; @@ -10540,15 +10494,15 @@ df_frame(void) } //- rjf: get paths - String8 cfg_path = df_cfg_path_from_src(src); + String8 cfg_path = rd_cfg_path_from_src(src); String8 cfg_folder = str8_chop_last_slash(cfg_path); //- rjf: keep track of recent projects - if(src == DF_CfgSrc_Project) + if(src == RD_CfgSrc_Project) { - DF_EntityList recent_projects = d_query_cached_entity_list_with_kind(DF_EntityKind_RecentProject); - DF_Entity *recent_project = &d_nil_entity; - for(DF_EntityNode *n = recent_projects.first; n != 0; n = n->next) + RD_EntityList recent_projects = d_query_cached_entity_list_with_kind(RD_EntityKind_RecentProject); + RD_Entity *recent_project = &d_nil_entity; + for(RD_EntityNode *n = recent_projects.first; n != 0; n = n->next) { if(path_match_normalized(cfg_path, n->entity->string)) { @@ -10556,27 +10510,27 @@ df_frame(void) break; } } - if(df_entity_is_nil(recent_project)) + if(rd_entity_is_nil(recent_project)) { - recent_project = df_entity_alloc(df_entity_root(), DF_EntityKind_RecentProject); - df_entity_equip_name(recent_project, path_normalized_from_string(scratch.arena, cfg_path)); - df_entity_equip_cfg_src(recent_project, DF_CfgSrc_User); + recent_project = rd_entity_alloc(rd_entity_root(), RD_EntityKind_RecentProject); + rd_entity_equip_name(recent_project, path_normalized_from_string(scratch.arena, cfg_path)); + rd_entity_equip_cfg_src(recent_project, RD_CfgSrc_User); } } //- rjf: eliminate all existing entities which are derived from config { - for(EachEnumVal(DF_EntityKind, k)) + for(EachEnumVal(RD_EntityKind, k)) { - DF_EntityKindFlags k_flags = d_entity_kind_flags_table[k]; - if(k_flags & DF_EntityKindFlag_IsSerializedToConfig) + RD_EntityKindFlags k_flags = rd_entity_kind_flags_table[k]; + if(k_flags & RD_EntityKindFlag_IsSerializedToConfig) { - DF_EntityList entities = d_query_cached_entity_list_with_kind(k); - for(DF_EntityNode *n = entities.first; n != 0; n = n->next) + RD_EntityList entities = d_query_cached_entity_list_with_kind(k); + for(RD_EntityNode *n = entities.first; n != 0; n = n->next) { if(n->entity->cfg_src == src) { - df_entity_mark_for_deletion(n->entity); + rd_entity_mark_for_deletion(n->entity); } } } @@ -10585,13 +10539,13 @@ df_frame(void) //- rjf: apply all entities { - for(EachEnumVal(DF_EntityKind, k)) + for(EachEnumVal(RD_EntityKind, k)) { - DF_EntityKindFlags k_flags = d_entity_kind_flags_table[k]; - if(k_flags & DF_EntityKindFlag_IsSerializedToConfig) + RD_EntityKindFlags k_flags = rd_entity_kind_flags_table[k]; + if(k_flags & RD_EntityKindFlag_IsSerializedToConfig) { - D_CfgVal *k_val = d_cfg_val_from_string(table, d_entity_kind_name_lower_table[k]); - for(D_CfgTree *k_tree = k_val->first; + RD_CfgVal *k_val = rd_cfg_val_from_string(table, d_entity_kind_name_lower_table[k]); + for(RD_CfgTree *k_tree = k_val->first; k_tree != &d_nil_cfg_tree; k_tree = k_tree->next) { @@ -10599,15 +10553,15 @@ df_frame(void) { continue; } - DF_Entity *entity = df_entity_alloc(df_entity_root(), k); - df_entity_equip_cfg_src(entity, k_tree->source); + RD_Entity *entity = rd_entity_alloc(rd_entity_root(), k); + rd_entity_equip_cfg_src(entity, k_tree->source); // rjf: iterate config tree typedef struct Task Task; struct Task { Task *next; - DF_Entity *entity; + RD_Entity *entity; MD_Node *n; }; Task start_task = {0, entity, k_tree->root}; @@ -10622,26 +10576,26 @@ df_frame(void) if(child->flags & MD_NodeFlag_StringLiteral && child->first == &md_nil_node) { String8 string = raw_from_escaped_str8(scratch.arena, child->string); - if(d_entity_kind_flags_table[t->entity->kind] & DF_EntityKindFlag_NameIsPath) + if(rd_entity_kind_flags_table[t->entity->kind] & RD_EntityKindFlag_NameIsPath) { string = path_absolute_dst_from_relative_dst_src(scratch.arena, string, cfg_folder); } - df_entity_equip_name(t->entity, string); + rd_entity_equip_name(t->entity, string); } // rjf: standalone string literals under an entity, with a numeric child -> name & text location if(child->flags & MD_NodeFlag_StringLiteral && child->first->flags & MD_NodeFlag_Numeric && child->first->first == &md_nil_node) { String8 string = raw_from_escaped_str8(scratch.arena, child->string); - if(d_entity_kind_flags_table[t->entity->kind] & DF_EntityKindFlag_NameIsPath) + if(rd_entity_kind_flags_table[t->entity->kind] & RD_EntityKindFlag_NameIsPath) { string = path_absolute_dst_from_relative_dst_src(scratch.arena, string, cfg_folder); } - df_entity_equip_name(t->entity, string); + rd_entity_equip_name(t->entity, string); S64 line = 0; try_s64_from_str8_c_rules(child->first->string, &line); TxtPt pt = txt_pt(line, 1); - df_entity_equip_txt_pt(t->entity, pt); + rd_entity_equip_txt_pt(t->entity, pt); } // rjf: standalone hex literals under an entity -> vaddr @@ -10649,7 +10603,7 @@ df_frame(void) { U64 vaddr = 0; try_u64_from_str8_c_rules(child->string, &vaddr); - df_entity_equip_vaddr(t->entity, vaddr); + rd_entity_equip_vaddr(t->entity, vaddr); } // rjf: specifically named entity equipment @@ -10658,21 +10612,21 @@ df_frame(void) child->first != &md_nil_node) { String8 string = raw_from_escaped_str8(scratch.arena, child->first->string); - if(d_entity_kind_flags_table[t->entity->kind] & DF_EntityKindFlag_NameIsPath) + if(rd_entity_kind_flags_table[t->entity->kind] & RD_EntityKindFlag_NameIsPath) { string = path_absolute_dst_from_relative_dst_src(scratch.arena, string, cfg_folder); } - df_entity_equip_name(t->entity, string); + rd_entity_equip_name(t->entity, string); } if((str8_match(child->string, str8_lit("active"), StringMatchFlag_CaseInsensitive) || str8_match(child->string, str8_lit("enabled"), StringMatchFlag_CaseInsensitive)) && child->first != &md_nil_node) { - df_entity_equip_disabled(t->entity, !str8_match(child->first->string, str8_lit("1"), 0)); + rd_entity_equip_disabled(t->entity, !str8_match(child->first->string, str8_lit("1"), 0)); } if(str8_match(child->string, str8_lit("disabled"), StringMatchFlag_CaseInsensitive) && child->first != &md_nil_node) { - df_entity_equip_disabled(t->entity, str8_match(child->first->string, str8_lit("1"), 0)); + rd_entity_equip_disabled(t->entity, str8_match(child->first->string, str8_lit("1"), 0)); } if(str8_match(child->string, str8_lit("hsva"), StringMatchFlag_CaseInsensitive) && child->first != &md_nil_node) { @@ -10681,20 +10635,20 @@ df_frame(void) hsva.y = (F32)f64_from_str8(child->first->next->string); hsva.z = (F32)f64_from_str8(child->first->next->next->string); hsva.w = (F32)f64_from_str8(child->first->next->next->next->string); - df_entity_equip_color_hsva(t->entity, hsva); + rd_entity_equip_color_hsva(t->entity, hsva); } if(str8_match(child->string, str8_lit("color"), StringMatchFlag_CaseInsensitive) && child->first != &md_nil_node) { Vec4F32 rgba = rgba_from_hex_string_4f32(child->first->string); Vec4F32 hsva = hsva_from_rgba(rgba); - df_entity_equip_color_hsva(t->entity, hsva); + rd_entity_equip_color_hsva(t->entity, hsva); } if(str8_match(child->string, str8_lit("line"), StringMatchFlag_CaseInsensitive) && child->first != &md_nil_node) { S64 line = 0; try_s64_from_str8_c_rules(child->first->string, &line); TxtPt pt = txt_pt(line, 1); - df_entity_equip_txt_pt(t->entity, pt); + rd_entity_equip_txt_pt(t->entity, pt); } if((str8_match(child->string, str8_lit("vaddr"), StringMatchFlag_CaseInsensitive) || str8_match(child->string, str8_lit("addr"), StringMatchFlag_CaseInsensitive)) && @@ -10702,20 +10656,20 @@ df_frame(void) { U64 vaddr = 0; try_u64_from_str8_c_rules(child->first->string, &vaddr); - df_entity_equip_vaddr(t->entity, vaddr); + rd_entity_equip_vaddr(t->entity, vaddr); } // rjf: sub-entity -> create new task - DF_EntityKind sub_entity_kind = DF_EntityKind_Nil; - for(EachEnumVal(DF_EntityKind, k2)) + RD_EntityKind sub_entity_kind = RD_EntityKind_Nil; + for(EachEnumVal(RD_EntityKind, k2)) { if(child->flags & MD_NodeFlag_Identifier && child->first != &md_nil_node && (str8_match(child->string, d_entity_kind_name_lower_table[k2], StringMatchFlag_CaseInsensitive) || - (k2 == DF_EntityKind_Executable && str8_match(child->string, str8_lit("exe"), StringMatchFlag_CaseInsensitive)))) + (k2 == RD_EntityKind_Executable && str8_match(child->string, str8_lit("exe"), StringMatchFlag_CaseInsensitive)))) { Task *task = push_array(scratch.arena, Task, 1); task->next = t->next; - task->entity = df_entity_alloc(t->entity, k2); + task->entity = rd_entity_alloc(t->entity, k2); task->n = child; t->next = task; break; @@ -10729,8 +10683,8 @@ df_frame(void) } //- rjf: apply exception code filters - D_CfgVal *filter_tables = d_cfg_val_from_string(table, str8_lit("exception_code_filters")); - for(D_CfgTree *table = filter_tables->first; + RD_CfgVal *filter_tables = rd_cfg_val_from_string(table, str8_lit("exception_code_filters")); + for(RD_CfgTree *table = filter_tables->first; table != &d_nil_cfg_tree; table = table->next) { @@ -10756,11 +10710,11 @@ df_frame(void) { if(val) { - df_state->ctrl_exception_code_filters[kind/64] |= (1ull<<(kind%64)); + rd_state->ctrl_exception_code_filters[kind/64] |= (1ull<<(kind%64)); } else { - df_state->ctrl_exception_code_filters[kind/64] &= ~(1ull<<(kind%64)); + rd_state->ctrl_exception_code_filters[kind/64] &= ~(1ull<<(kind%64)); } } } @@ -10768,64 +10722,64 @@ df_frame(void) } //- rjf: eliminate all windows - for(DF_Window *window = df_state->first_window; window != 0; window = window->next) + for(RD_Window *window = rd_state->first_window; window != 0; window = window->next) { if(window->cfg_src != src) { continue; } - df_cmd(DF_CmdKind_CloseWindow, .window = df_handle_from_window(window)); + rd_cmd(RD_CmdKind_CloseWindow, .window = rd_handle_from_window(window)); } //- rjf: apply fonts { - FNT_Tag defaults[DF_FontSlot_COUNT] = + FNT_Tag defaults[RD_FontSlot_COUNT] = { - fnt_tag_from_static_data_string(&df_g_default_main_font_bytes), - fnt_tag_from_static_data_string(&df_g_default_code_font_bytes), - fnt_tag_from_static_data_string(&df_g_icon_font_bytes), + fnt_tag_from_static_data_string(&rd_default_main_font_bytes), + fnt_tag_from_static_data_string(&rd_default_code_font_bytes), + fnt_tag_from_static_data_string(&rd_icon_font_bytes), }; - MemoryZeroArray(df_state->cfg_font_tags); + MemoryZeroArray(rd_state->cfg_font_tags); { - D_CfgVal *code_font_val = d_cfg_val_from_string(table, str8_lit("code_font")); - D_CfgVal *main_font_val = d_cfg_val_from_string(table, str8_lit("main_font")); + RD_CfgVal *code_font_val = rd_cfg_val_from_string(table, str8_lit("code_font")); + RD_CfgVal *main_font_val = rd_cfg_val_from_string(table, str8_lit("main_font")); MD_Node *code_font_node = code_font_val->last->root; MD_Node *main_font_node = main_font_val->last->root; String8 code_font_relative_path = code_font_node->first->string; String8 main_font_relative_path = main_font_node->first->string; if(!md_node_is_nil(code_font_node)) { - arena_clear(df_state->cfg_code_font_path_arena); - df_state->cfg_code_font_path = push_str8_copy(df_state->cfg_code_font_path_arena, code_font_relative_path); + arena_clear(rd_state->cfg_code_font_path_arena); + rd_state->cfg_code_font_path = push_str8_copy(rd_state->cfg_code_font_path_arena, code_font_relative_path); } if(!md_node_is_nil(main_font_node)) { - arena_clear(df_state->cfg_main_font_path_arena); - df_state->cfg_main_font_path = push_str8_copy(df_state->cfg_main_font_path_arena, main_font_relative_path); + arena_clear(rd_state->cfg_main_font_path_arena); + rd_state->cfg_main_font_path = push_str8_copy(rd_state->cfg_main_font_path_arena, main_font_relative_path); } String8 code_font_path = path_absolute_dst_from_relative_dst_src(scratch.arena, code_font_relative_path, cfg_folder); String8 main_font_path = path_absolute_dst_from_relative_dst_src(scratch.arena, main_font_relative_path, cfg_folder); if(os_file_path_exists(code_font_path) && !md_node_is_nil(code_font_node) && code_font_relative_path.size != 0) { - df_state->cfg_font_tags[DF_FontSlot_Code] = fnt_tag_from_path(code_font_path); + rd_state->cfg_font_tags[RD_FontSlot_Code] = fnt_tag_from_path(code_font_path); } if(os_file_path_exists(main_font_path) && !md_node_is_nil(main_font_node) && main_font_relative_path.size != 0) { - df_state->cfg_font_tags[DF_FontSlot_Main] = fnt_tag_from_path(main_font_path); + rd_state->cfg_font_tags[RD_FontSlot_Main] = fnt_tag_from_path(main_font_path); } } - for(DF_FontSlot slot = (DF_FontSlot)0; slot < DF_FontSlot_COUNT; slot = (DF_FontSlot)(slot+1)) + for(RD_FontSlot slot = (RD_FontSlot)0; slot < RD_FontSlot_COUNT; slot = (RD_FontSlot)(slot+1)) { - if(fnt_tag_match(fnt_tag_zero(), df_state->cfg_font_tags[slot])) + if(fnt_tag_match(fnt_tag_zero(), rd_state->cfg_font_tags[slot])) { - df_state->cfg_font_tags[slot] = defaults[slot]; + rd_state->cfg_font_tags[slot] = defaults[slot]; } } } //- rjf: build windows & panel layouts - D_CfgVal *windows = d_cfg_val_from_string(table, str8_lit("window")); - for(D_CfgTree *window_tree = windows->first; + RD_CfgVal *windows = rd_cfg_val_from_string(table, str8_lit("window")); + for(RD_CfgTree *window_tree = windows->first; window_tree != &d_nil_cfg_tree; window_tree = window_tree->next) { @@ -10842,7 +10796,7 @@ df_frame(void) OS_Handle preferred_monitor = os_primary_monitor(); Vec2F32 size = {0}; F32 dpi = 0.f; - DF_SettingVal setting_vals[DF_SettingCode_COUNT] = {0}; + RD_SettingVal setting_vals[RD_SettingCode_COUNT] = {0}; { for(MD_EachNode(n, window_tree->root->first)) { @@ -10903,35 +10857,35 @@ df_frame(void) MD_Node *dpi_node = md_child_from_string(window_tree->root, str8_lit("dpi"), 0); String8 dpi_string = md_string_from_children(scratch.arena, dpi_node); dpi = f64_from_str8(dpi_string); - for(EachEnumVal(DF_SettingCode, code)) + for(EachEnumVal(RD_SettingCode, code)) { - MD_Node *code_node = md_child_from_string(window_tree->root, df_g_setting_code_lower_string_table[code], 0); + MD_Node *code_node = md_child_from_string(window_tree->root, rd_setting_code_lower_string_table[code], 0); if(!md_node_is_nil(code_node)) { S64 val_s64 = 0; try_s64_from_str8_c_rules(code_node->first->string, &val_s64); setting_vals[code].set = 1; setting_vals[code].s32 = (S32)val_s64; - setting_vals[code].s32 = clamp_1s32(df_g_setting_code_s32_range_table[code], setting_vals[code].s32); + setting_vals[code].s32 = clamp_1s32(rd_setting_code_s32_range_table[code], setting_vals[code].s32); } } } // rjf: open window - DF_Window *ws = df_window_open(size, preferred_monitor, window_tree->source); + RD_Window *ws = rd_window_open(size, preferred_monitor, window_tree->source); if(dpi != 0.f) { ws->last_dpi = dpi; } - for(EachEnumVal(DF_SettingCode, code)) + for(EachEnumVal(RD_SettingCode, code)) { - if(setting_vals[code].set == 0 && df_g_setting_code_default_is_per_window_table[code]) + if(setting_vals[code].set == 0 && rd_setting_code_default_is_per_window_table[code]) { - setting_vals[code] = df_g_setting_code_default_val_table[code]; + setting_vals[code] = rd_setting_code_default_val_table[code]; } } MemoryCopy(ws->setting_vals, setting_vals, sizeof(setting_vals[0])*ArrayCount(setting_vals)); // rjf: build panel tree MD_Node *panel_tree = md_child_from_string(window_tree->root, str8_lit("panels"), 0); - DF_Panel *panel_parent = ws->root_panel; + RD_Panel *panel_parent = ws->root_panel; panel_parent->split_axis = top_level_split_axis; MD_NodeRec rec = {0}; for(MD_Node *n = panel_tree, *next = &md_nil_node; @@ -10942,7 +10896,7 @@ df_frame(void) next = n->next; // rjf: grab root panel - DF_Panel *panel = &df_nil_panel; + RD_Panel *panel = &rd_nil_panel; if(n == panel_tree) { panel = ws->root_panel; @@ -10953,14 +10907,14 @@ df_frame(void) // pct of parent if(n->flags & MD_NodeFlag_Numeric) { - panel = df_panel_alloc(ws); - df_panel_insert(panel_parent, panel_parent->last, panel); + panel = rd_panel_alloc(ws); + rd_panel_insert(panel_parent, panel_parent->last, panel); panel->split_axis = axis2_flip(panel_parent->split_axis); panel->pct_of_parent = (F32)f64_from_str8(n->string); } // rjf: do general per-panel work - if(!df_panel_is_nil(panel)) + if(!rd_panel_is_nil(panel)) { // rjf: determine if this panel has panel children B32 has_panel_children = 0; @@ -10983,23 +10937,23 @@ df_frame(void) } // rjf: apply panel views/tabs/commands - DF_View *selected_view = &df_nil_view; + RD_View *selected_view = &rd_nil_view; for(MD_EachNode(op, n->first)) { - DF_ViewSpec *view_spec = df_view_spec_from_string(op->string); - if(view_spec == &df_nil_view_spec || has_panel_children != 0) + RD_ViewSpec *view_spec = rd_view_spec_from_string(op->string); + if(view_spec == &rd_nil_view_spec || has_panel_children != 0) { continue; } // rjf: allocate view & apply view-specific parameterizations - DF_View *view = &df_nil_view; + RD_View *view = &rd_nil_view; B32 view_is_selected = 0; - DF_ViewSpecFlags view_spec_flags = view_spec->info.flags; - if(view_spec_flags & DF_ViewSpecFlag_CanSerialize) + RD_ViewSpecFlags view_spec_flags = view_spec->info.flags; + if(view_spec_flags & RD_ViewSpecFlag_CanSerialize) { // rjf: allocate view - view = df_view_alloc(); + view = rd_view_alloc(); // rjf: check if this view is selected view_is_selected = !md_node_is_nil(md_child_from_string(op, str8_lit("selected"), 0)); @@ -11023,7 +10977,7 @@ df_frame(void) // rjf: convert file queries from relative to absolute { - String8 query_file_path = d_file_path_from_eval_string(scratch.arena, view_query); + String8 query_file_path = rd_file_path_from_eval_string(scratch.arena, view_query); if(query_file_path.size != 0) { query_file_path = path_absolute_dst_from_relative_dst_src(scratch.arena, query_file_path, cfg_folder); @@ -11032,7 +10986,7 @@ df_frame(void) } // rjf: set up view - df_view_equip_spec(view, view_spec, view_query, op); + rd_view_equip_spec(view, view_spec, view_query, op); if(project_path.size != 0) { arena_clear(view->project_path_arena); @@ -11041,9 +10995,9 @@ df_frame(void) } // rjf: insert - if(!df_view_is_nil(view)) + if(!rd_view_is_nil(view)) { - df_panel_insert_tab_view(panel, panel->last_tab_view, view); + rd_panel_insert_tab_view(panel, panel->last_tab_view, view); if(view_is_selected) { selected_view = view; @@ -11052,9 +11006,9 @@ df_frame(void) } // rjf: select selected view - if(!df_view_is_nil(selected_view)) + if(!rd_view_is_nil(selected_view)) { - panel->selected_tab_view = df_handle_from_view(selected_view); + panel->selected_tab_view = rd_handle_from_view(selected_view); } // rjf: recurse from this panel @@ -11090,14 +11044,14 @@ df_frame(void) // rjf: focus the biggest panel { - DF_Panel *best_leaf_panel = &df_nil_panel; + RD_Panel *best_leaf_panel = &rd_nil_panel; F32 best_leaf_panel_area = 0; Rng2F32 root_rect = r2f32p(0, 0, 1000, 1000); // NOTE(rjf): we can assume any size - just need proportions. - for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next) { - if(df_panel_is_nil(panel->first)) + if(rd_panel_is_nil(panel->first)) { - Rng2F32 rect = df_target_rect_from_panel(root_rect, ws->root_panel, panel); + Rng2F32 rect = rd_target_rect_from_panel(root_rect, ws->root_panel, panel); Vec2F32 dim = dim_2f32(rect); F32 area = dim.x*dim.y; if(best_leaf_panel_area == 0 || area > best_leaf_panel_area) @@ -11112,12 +11066,12 @@ df_frame(void) } //- rjf: apply keybindings - if(src == DF_CfgSrc_User) + if(src == RD_CfgSrc_User) { - df_clear_bindings(); + rd_clear_bindings(); } - D_CfgVal *keybindings = d_cfg_val_from_string(table, str8_lit("keybindings")); - for(D_CfgTree *keybinding_set = keybindings->first; + RD_CfgVal *keybindings = rd_cfg_val_from_string(table, str8_lit("keybindings")); + for(RD_CfgTree *keybinding_set = keybindings->first; keybinding_set != &d_nil_cfg_tree; keybinding_set = keybinding_set->next) { @@ -11144,7 +11098,7 @@ df_frame(void) } else { - OS_Key k = df_os_key_from_cfg_string(child->string); + OS_Key k = rd_os_key_from_cfg_string(child->string); if(k != OS_Key_Null) { key = k; @@ -11152,11 +11106,11 @@ df_frame(void) else { cmd_name = child->string; - for(U64 idx = 0; idx < ArrayCount(df_g_binding_version_remap_old_name_table); idx += 1) + for(U64 idx = 0; idx < ArrayCount(rd_binding_version_remap_old_name_table); idx += 1) { - if(str8_match(df_g_binding_version_remap_old_name_table[idx], child->string, StringMatchFlag_CaseInsensitive)) + if(str8_match(rd_binding_version_remap_old_name_table[idx], child->string, StringMatchFlag_CaseInsensitive)) { - String8 new_name = df_g_binding_version_remap_new_name_table[idx]; + String8 new_name = rd_binding_version_remap_new_name_table[idx]; cmd_name = new_name; } } @@ -11169,27 +11123,27 @@ df_frame(void) if(!md_node_is_nil(ctrl_node)) { flags |= OS_EventFlag_Ctrl; } if(!md_node_is_nil(shift_node)) { flags |= OS_EventFlag_Shift; } if(!md_node_is_nil(alt_node)) { flags |= OS_EventFlag_Alt; } - DF_Binding binding = {key, flags}; - df_bind_name(cmd_name, binding); + RD_Binding binding = {key, flags}; + rd_bind_name(cmd_name, binding); } } } //- rjf: reset theme to default - MemoryCopy(df_state->cfg_theme_target.colors, df_g_theme_preset_colors__default_dark, sizeof(df_g_theme_preset_colors__default_dark)); - MemoryCopy(df_state->cfg_theme.colors, df_g_theme_preset_colors__default_dark, sizeof(df_g_theme_preset_colors__default_dark)); + MemoryCopy(rd_state->cfg_theme_target.colors, rd_theme_preset_colors__default_dark, sizeof(rd_theme_preset_colors__default_dark)); + MemoryCopy(rd_state->cfg_theme.colors, rd_theme_preset_colors__default_dark, sizeof(rd_theme_preset_colors__default_dark)); //- rjf: apply theme presets - D_CfgVal *color_preset = d_cfg_val_from_string(table, str8_lit("color_preset")); + RD_CfgVal *color_preset = rd_cfg_val_from_string(table, str8_lit("color_preset")); B32 preset_applied = 0; if(color_preset != &d_nil_cfg_val) { String8 color_preset_name = color_preset->last->root->first->string; - DF_ThemePreset preset = (DF_ThemePreset)0; + RD_ThemePreset preset = (RD_ThemePreset)0; B32 found_preset = 0; - for(DF_ThemePreset p = (DF_ThemePreset)0; p < DF_ThemePreset_COUNT; p = (DF_ThemePreset)(p+1)) + for(RD_ThemePreset p = (RD_ThemePreset)0; p < RD_ThemePreset_COUNT; p = (RD_ThemePreset)(p+1)) { - if(str8_match(color_preset_name, df_g_theme_preset_code_string_table[p], StringMatchFlag_CaseInsensitive)) + if(str8_match(color_preset_name, rd_theme_preset_code_string_table[p], StringMatchFlag_CaseInsensitive)) { found_preset = 1; preset = p; @@ -11199,15 +11153,15 @@ df_frame(void) if(found_preset) { preset_applied = 1; - MemoryCopy(df_state->cfg_theme_target.colors, df_g_theme_preset_colors_table[preset], sizeof(df_g_theme_preset_colors__default_dark)); - MemoryCopy(df_state->cfg_theme.colors, df_g_theme_preset_colors_table[preset], sizeof(df_g_theme_preset_colors__default_dark)); + MemoryCopy(rd_state->cfg_theme_target.colors, rd_theme_preset_colors_table[preset], sizeof(rd_theme_preset_colors__default_dark)); + MemoryCopy(rd_state->cfg_theme.colors, rd_theme_preset_colors_table[preset], sizeof(rd_theme_preset_colors__default_dark)); } } //- rjf: apply individual theme colors - B8 theme_color_hit[DF_ThemeColor_COUNT] = {0}; - D_CfgVal *colors = d_cfg_val_from_string(table, str8_lit("colors")); - for(D_CfgTree *colors_set = colors->first; + B8 theme_color_hit[RD_ThemeColor_COUNT] = {0}; + RD_CfgVal *colors = rd_cfg_val_from_string(table, str8_lit("colors")); + for(RD_CfgTree *colors_set = colors->first; colors_set != &d_nil_cfg_tree; colors_set = colors_set->next) { @@ -11216,26 +11170,26 @@ df_frame(void) String8 saved_color_name = color->string; String8List candidate_color_names = {0}; str8_list_push(scratch.arena, &candidate_color_names, saved_color_name); - for(U64 idx = 0; idx < ArrayCount(df_g_theme_color_version_remap_old_name_table); idx += 1) + for(U64 idx = 0; idx < ArrayCount(rd_theme_color_version_remap_old_name_table); idx += 1) { - if(str8_match(df_g_theme_color_version_remap_old_name_table[idx], saved_color_name, StringMatchFlag_CaseInsensitive)) + if(str8_match(rd_theme_color_version_remap_old_name_table[idx], saved_color_name, StringMatchFlag_CaseInsensitive)) { - str8_list_push(scratch.arena, &candidate_color_names, df_g_theme_color_version_remap_new_name_table[idx]); + str8_list_push(scratch.arena, &candidate_color_names, rd_theme_color_version_remap_new_name_table[idx]); } } for(String8Node *name_n = candidate_color_names.first; name_n != 0; name_n = name_n->next) { String8 name = name_n->string; - DF_ThemeColor color_code = DF_ThemeColor_Null; - for(DF_ThemeColor c = DF_ThemeColor_Null; c < DF_ThemeColor_COUNT; c = (DF_ThemeColor)(c+1)) + RD_ThemeColor color_code = RD_ThemeColor_Null; + for(RD_ThemeColor c = RD_ThemeColor_Null; c < RD_ThemeColor_COUNT; c = (RD_ThemeColor)(c+1)) { - if(str8_match(df_g_theme_color_cfg_string_table[c], name, StringMatchFlag_CaseInsensitive)) + if(str8_match(rd_theme_color_cfg_string_table[c], name, StringMatchFlag_CaseInsensitive)) { color_code = c; break; } } - if(color_code != DF_ThemeColor_Null) + if(color_code != RD_ThemeColor_Null) { theme_color_hit[color_code] = 1; MD_Node *hex_cfg = color->first; @@ -11243,10 +11197,10 @@ df_frame(void) U64 hex_val = 0; try_u64_from_str8_c_rules(hex_string, &hex_val); Vec4F32 color_rgba = rgba_from_u32((U32)hex_val); - df_state->cfg_theme_target.colors[color_code] = color_rgba; - if(df_state->frame_index <= 2) + rd_state->cfg_theme_target.colors[color_code] = color_rgba; + if(rd_state->frame_index <= 2) { - df_state->cfg_theme.colors[color_code] = color_rgba; + rd_state->cfg_theme.colors[color_code] = color_rgba; } } } @@ -11256,12 +11210,12 @@ df_frame(void) //- rjf: no preset -> autofill all missing colors from the preset with the most similar background if(!preset_applied) { - DF_ThemePreset closest_preset = DF_ThemePreset_DefaultDark; + RD_ThemePreset closest_preset = RD_ThemePreset_DefaultDark; F32 closest_preset_bg_distance = 100000000; - for(DF_ThemePreset p = (DF_ThemePreset)0; p < DF_ThemePreset_COUNT; p = (DF_ThemePreset)(p+1)) + for(RD_ThemePreset p = (RD_ThemePreset)0; p < RD_ThemePreset_COUNT; p = (RD_ThemePreset)(p+1)) { - Vec4F32 cfg_bg = df_state->cfg_theme_target.colors[DF_ThemeColor_BaseBackground]; - Vec4F32 pre_bg = df_g_theme_preset_colors_table[p][DF_ThemeColor_BaseBackground]; + Vec4F32 cfg_bg = rd_state->cfg_theme_target.colors[RD_ThemeColor_BaseBackground]; + Vec4F32 pre_bg = rd_theme_preset_colors_table[p][RD_ThemeColor_BaseBackground]; Vec4F32 diff = sub_4f32(cfg_bg, pre_bg); Vec3F32 diff3 = diff.xyz; F32 distance = length_3f32(diff3); @@ -11271,13 +11225,13 @@ df_frame(void) closest_preset_bg_distance = distance; } } - for(DF_ThemeColor c = (DF_ThemeColor)(DF_ThemeColor_Null+1); - c < DF_ThemeColor_COUNT; - c = (DF_ThemeColor)(c+1)) + for(RD_ThemeColor c = (RD_ThemeColor)(RD_ThemeColor_Null+1); + c < RD_ThemeColor_COUNT; + c = (RD_ThemeColor)(c+1)) { if(!theme_color_hit[c]) { - df_state->cfg_theme_target.colors[c] = df_state->cfg_theme.colors[c] = df_g_theme_preset_colors_table[closest_preset][c]; + rd_state->cfg_theme_target.colors[c] = rd_state->cfg_theme.colors[c] = rd_theme_preset_colors_table[closest_preset][c]; } } } @@ -11286,9 +11240,9 @@ df_frame(void) { B32 all_colors_are_zero = 1; Vec4F32 zero_color = {0}; - for(DF_ThemeColor c = (DF_ThemeColor)(DF_ThemeColor_Null+1); c < DF_ThemeColor_COUNT; c = (DF_ThemeColor)(c+1)) + for(RD_ThemeColor c = (RD_ThemeColor)(RD_ThemeColor_Null+1); c < RD_ThemeColor_COUNT; c = (RD_ThemeColor)(c+1)) { - if(!MemoryMatchStruct(&df_state->cfg_theme_target.colors[c], &zero_color)) + if(!MemoryMatchStruct(&rd_state->cfg_theme_target.colors[c], &zero_color)) { all_colors_are_zero = 0; break; @@ -11296,73 +11250,73 @@ df_frame(void) } if(all_colors_are_zero) { - MemoryCopy(df_state->cfg_theme_target.colors, df_g_theme_preset_colors__default_dark, sizeof(df_g_theme_preset_colors__default_dark)); - MemoryCopy(df_state->cfg_theme.colors, df_g_theme_preset_colors__default_dark, sizeof(df_g_theme_preset_colors__default_dark)); + MemoryCopy(rd_state->cfg_theme_target.colors, rd_theme_preset_colors__default_dark, sizeof(rd_theme_preset_colors__default_dark)); + MemoryCopy(rd_state->cfg_theme.colors, rd_theme_preset_colors__default_dark, sizeof(rd_theme_preset_colors__default_dark)); } } //- rjf: apply settings - B8 setting_codes_hit[DF_SettingCode_COUNT] = {0}; - MemoryZero(&df_state->cfg_setting_vals[src][0], sizeof(DF_SettingVal)*DF_SettingCode_COUNT); - for(EachEnumVal(DF_SettingCode, code)) + B8 setting_codes_hit[RD_SettingCode_COUNT] = {0}; + MemoryZero(&rd_state->cfg_setting_vals[src][0], sizeof(RD_SettingVal)*RD_SettingCode_COUNT); + for(EachEnumVal(RD_SettingCode, code)) { - String8 name = df_g_setting_code_lower_string_table[code]; - D_CfgVal *code_cfg_val = d_cfg_val_from_string(table, name); - D_CfgTree *code_tree = code_cfg_val->last; + String8 name = rd_setting_code_lower_string_table[code]; + RD_CfgVal *code_cfg_val = rd_cfg_val_from_string(table, name); + RD_CfgTree *code_tree = code_cfg_val->last; if(code_tree->source == src) { MD_Node *val_node = code_tree->root->first; S64 val = 0; if(try_s64_from_str8_c_rules(val_node->string, &val)) { - df_state->cfg_setting_vals[src][code].set = 1; - df_state->cfg_setting_vals[src][code].s32 = (S32)val; + rd_state->cfg_setting_vals[src][code].set = 1; + rd_state->cfg_setting_vals[src][code].s32 = (S32)val; } setting_codes_hit[code] = !md_node_is_nil(val_node); } } //- rjf: if config applied 0 settings, we need to do some sensible default - if(src == DF_CfgSrc_User) + if(src == RD_CfgSrc_User) { - for(EachEnumVal(DF_SettingCode, code)) + for(EachEnumVal(RD_SettingCode, code)) { if(!setting_codes_hit[code]) { - df_state->cfg_setting_vals[src][code] = df_g_setting_code_default_val_table[code]; + rd_state->cfg_setting_vals[src][code] = rd_setting_code_default_val_table[code]; } } } //- rjf: if config opened 0 windows, we need to do some sensible default - if(src == DF_CfgSrc_User && windows->first == &d_nil_cfg_tree) + if(src == RD_CfgSrc_User && windows->first == &d_nil_cfg_tree) { OS_Handle preferred_monitor = os_primary_monitor(); Vec2F32 monitor_dim = os_dim_from_monitor(preferred_monitor); Vec2F32 window_dim = v2f32(monitor_dim.x*4/5, monitor_dim.y*4/5); - DF_Window *ws = df_window_open(window_dim, preferred_monitor, DF_CfgSrc_User); + RD_Window *ws = rd_window_open(window_dim, preferred_monitor, RD_CfgSrc_User); if(monitor_dim.x < 1920) { - df_cmd(DF_CmdKind_ResetToCompactPanels); + rd_cmd(RD_CmdKind_ResetToCompactPanels); } else { - df_cmd(DF_CmdKind_ResetToDefaultPanels); + rd_cmd(RD_CmdKind_ResetToDefaultPanels); } } //- rjf: if config bound 0 keys, we need to do some sensible default - if(src == DF_CfgSrc_User && df_state->key_map_total_count == 0) + if(src == RD_CfgSrc_User && rd_state->key_map_total_count == 0) { - for(U64 idx = 0; idx < ArrayCount(df_g_default_binding_table); idx += 1) + for(U64 idx = 0; idx < ArrayCount(rd_default_binding_table); idx += 1) { - DF_StringBindingPair *pair = &df_g_default_binding_table[idx]; - df_bind_name(pair->string, pair->binding); + RD_StringBindingPair *pair = &rd_default_binding_table[idx]; + rd_bind_name(pair->string, pair->binding); } } //- rjf: always ensure that the meta controls have bindings - if(src == DF_CfgSrc_User) + if(src == RD_CfgSrc_User) { struct { @@ -11371,134 +11325,134 @@ df_frame(void) } meta_ctrls[] = { - { df_cmd_kind_info_table[DF_CmdKind_Edit].string, OS_Key_F2 }, - { df_cmd_kind_info_table[DF_CmdKind_Accept].string, OS_Key_Return }, - { df_cmd_kind_info_table[DF_CmdKind_Cancel].string, OS_Key_Esc }, + { rd_cmd_kind_info_table[RD_CmdKind_Edit].string, OS_Key_F2 }, + { rd_cmd_kind_info_table[RD_CmdKind_Accept].string, OS_Key_Return }, + { rd_cmd_kind_info_table[RD_CmdKind_Cancel].string, OS_Key_Esc }, }; for(U64 idx = 0; idx < ArrayCount(meta_ctrls); idx += 1) { - DF_BindingList bindings = df_bindings_from_name(scratch.arena, meta_ctrls[idx].name); + RD_BindingList bindings = rd_bindings_from_name(scratch.arena, meta_ctrls[idx].name); if(bindings.count == 0) { - DF_Binding binding = {meta_ctrls[idx].fallback_key, 0}; - df_bind_name(meta_ctrls[idx].name, binding); + RD_Binding binding = {meta_ctrls[idx].fallback_key, 0}; + rd_bind_name(meta_ctrls[idx].name, binding); } } } }break; //- rjf: writing config changes - case DF_CmdKind_WriteUserData: - case DF_CmdKind_WriteProjectData: + case RD_CmdKind_WriteUserData: + case RD_CmdKind_WriteProjectData: { - DF_CfgSrc src = DF_CfgSrc_User; - for(DF_CfgSrc s = (DF_CfgSrc)0; s < DF_CfgSrc_COUNT; s = (DF_CfgSrc)(s+1)) + RD_CfgSrc src = RD_CfgSrc_User; + for(RD_CfgSrc s = (RD_CfgSrc)0; s < RD_CfgSrc_COUNT; s = (RD_CfgSrc)(s+1)) { - if(kind == d_cfg_src_write_cmd_kind_table[s]) + if(kind == rd_cfg_src_write_cmd_kind_table[s]) { src = s; break; } } - String8 path = df_cfg_path_from_src(src); - String8List df_strs = df_cfg_strings_from_gfx(scratch.arena, path, src); - String8 header = push_str8f(scratch.arena, "// raddbg %s file\n\n", d_cfg_src_string_table[src].str); + String8 path = rd_cfg_path_from_src(src); + String8List rd_strs = rd_cfg_strings_from_gfx(scratch.arena, path, src); + String8 header = push_str8f(scratch.arena, "// raddbg %s file\n\n", rd_cfg_src_string_table[src].str); String8List strs = {0}; str8_list_push(scratch.arena, &strs, header); - str8_list_concat_in_place(&strs, &df_strs); + str8_list_concat_in_place(&strs, &rd_strs); String8 data = str8_list_join(scratch.arena, &strs, 0); String8 data_indented = indented_from_string(scratch.arena, data); os_write_data_to_file_path(path, data_indented); }break; //- rjf: code navigation - case DF_CmdKind_FindTextForward: - case DF_CmdKind_FindTextBackward: + case RD_CmdKind_FindTextForward: + case RD_CmdKind_FindTextBackward: { - df_set_search_string(df_regs()->string); + rd_set_search_string(rd_regs()->string); }break; //- rjf: find next and find prev - case DF_CmdKind_FindNext: + case RD_CmdKind_FindNext: { - df_cmd(DF_CmdKind_FindTextForward, .string = df_push_search_string(scratch.arena)); + rd_cmd(RD_CmdKind_FindTextForward, .string = rd_push_search_string(scratch.arena)); }break; - case DF_CmdKind_FindPrev: + case RD_CmdKind_FindPrev: { - df_cmd(DF_CmdKind_FindTextBackward, .string = df_push_search_string(scratch.arena)); + rd_cmd(RD_CmdKind_FindTextBackward, .string = rd_push_search_string(scratch.arena)); }break; //- rjf: font sizes - case DF_CmdKind_IncUIFontScale: + case RD_CmdKind_IncUIFontScale: { - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Window *window = rd_window_from_handle(rd_regs()->window); if(window != 0) { - window->setting_vals[DF_SettingCode_MainFontSize].set = 1; - window->setting_vals[DF_SettingCode_MainFontSize].s32 += 1; - window->setting_vals[DF_SettingCode_MainFontSize].s32 = clamp_1s32(df_g_setting_code_s32_range_table[DF_SettingCode_MainFontSize], window->setting_vals[DF_SettingCode_MainFontSize].s32); + window->setting_vals[RD_SettingCode_MainFontSize].set = 1; + window->setting_vals[RD_SettingCode_MainFontSize].s32 += 1; + window->setting_vals[RD_SettingCode_MainFontSize].s32 = clamp_1s32(rd_setting_code_s32_range_table[RD_SettingCode_MainFontSize], window->setting_vals[RD_SettingCode_MainFontSize].s32); } }break; - case DF_CmdKind_DecUIFontScale: + case RD_CmdKind_DecUIFontScale: { - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Window *window = rd_window_from_handle(rd_regs()->window); if(window != 0) { - window->setting_vals[DF_SettingCode_MainFontSize].set = 1; - window->setting_vals[DF_SettingCode_MainFontSize].s32 -= 1; - window->setting_vals[DF_SettingCode_MainFontSize].s32 = clamp_1s32(df_g_setting_code_s32_range_table[DF_SettingCode_MainFontSize], window->setting_vals[DF_SettingCode_MainFontSize].s32); + window->setting_vals[RD_SettingCode_MainFontSize].set = 1; + window->setting_vals[RD_SettingCode_MainFontSize].s32 -= 1; + window->setting_vals[RD_SettingCode_MainFontSize].s32 = clamp_1s32(rd_setting_code_s32_range_table[RD_SettingCode_MainFontSize], window->setting_vals[RD_SettingCode_MainFontSize].s32); } }break; - case DF_CmdKind_IncCodeFontScale: + case RD_CmdKind_IncCodeFontScale: { - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Window *window = rd_window_from_handle(rd_regs()->window); if(window != 0) { - window->setting_vals[DF_SettingCode_CodeFontSize].set = 1; - window->setting_vals[DF_SettingCode_CodeFontSize].s32 += 1; - window->setting_vals[DF_SettingCode_CodeFontSize].s32 = clamp_1s32(df_g_setting_code_s32_range_table[DF_SettingCode_CodeFontSize], window->setting_vals[DF_SettingCode_CodeFontSize].s32); + window->setting_vals[RD_SettingCode_CodeFontSize].set = 1; + window->setting_vals[RD_SettingCode_CodeFontSize].s32 += 1; + window->setting_vals[RD_SettingCode_CodeFontSize].s32 = clamp_1s32(rd_setting_code_s32_range_table[RD_SettingCode_CodeFontSize], window->setting_vals[RD_SettingCode_CodeFontSize].s32); } }break; - case DF_CmdKind_DecCodeFontScale: + case RD_CmdKind_DecCodeFontScale: { - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Window *window = rd_window_from_handle(rd_regs()->window); if(window != 0) { - window->setting_vals[DF_SettingCode_CodeFontSize].set = 1; - window->setting_vals[DF_SettingCode_CodeFontSize].s32 -= 1; - window->setting_vals[DF_SettingCode_CodeFontSize].s32 = clamp_1s32(df_g_setting_code_s32_range_table[DF_SettingCode_CodeFontSize], window->setting_vals[DF_SettingCode_CodeFontSize].s32); + window->setting_vals[RD_SettingCode_CodeFontSize].set = 1; + window->setting_vals[RD_SettingCode_CodeFontSize].s32 -= 1; + window->setting_vals[RD_SettingCode_CodeFontSize].s32 = clamp_1s32(rd_setting_code_s32_range_table[RD_SettingCode_CodeFontSize], window->setting_vals[RD_SettingCode_CodeFontSize].s32); } }break; //- rjf: panel creation - case DF_CmdKind_NewPanelLeft: {split_dir = Dir2_Left;}goto split; - case DF_CmdKind_NewPanelUp: {split_dir = Dir2_Up;}goto split; - case DF_CmdKind_NewPanelRight:{split_dir = Dir2_Right;}goto split; - case DF_CmdKind_NewPanelDown: {split_dir = Dir2_Down;}goto split; - case DF_CmdKind_SplitPanel: + case RD_CmdKind_NewPanelLeft: {split_dir = Dir2_Left;}goto split; + case RD_CmdKind_NewPanelUp: {split_dir = Dir2_Up;}goto split; + case RD_CmdKind_NewPanelRight:{split_dir = Dir2_Right;}goto split; + case RD_CmdKind_NewPanelDown: {split_dir = Dir2_Down;}goto split; + case RD_CmdKind_SplitPanel: { - split_dir = df_regs()->dir2; - split_panel = df_panel_from_handle(df_regs()->dst_panel); + split_dir = rd_regs()->dir2; + split_panel = rd_panel_from_handle(rd_regs()->dst_panel); }goto split; split:; if(split_dir != Dir2_Invalid) { - DF_Window *ws = df_window_from_handle(df_regs()->window); - if(df_panel_is_nil(split_panel)) + RD_Window *ws = rd_window_from_handle(rd_regs()->window); + if(rd_panel_is_nil(split_panel)) { split_panel = ws->focused_panel; } - DF_Panel *new_panel = &df_nil_panel; + RD_Panel *new_panel = &rd_nil_panel; Axis2 split_axis = axis2_from_dir2(split_dir); Side split_side = side_from_dir2(split_dir); - DF_Panel *panel = split_panel; - DF_Panel *parent = panel->parent; - if(!df_panel_is_nil(parent) && parent->split_axis == split_axis) + RD_Panel *panel = split_panel; + RD_Panel *parent = panel->parent; + if(!rd_panel_is_nil(parent) && parent->split_axis == split_axis) { - DF_Panel *next = df_panel_alloc(ws); - df_panel_insert(parent, split_side == Side_Max ? panel : panel->prev, next); + RD_Panel *next = rd_panel_alloc(ws); + rd_panel_insert(parent, split_side == Side_Max ? panel : panel->prev, next); next->pct_of_parent = 1.f/parent->child_count; - for(DF_Panel *child = parent->first; !df_panel_is_nil(child); child = child->next) + for(RD_Panel *child = parent->first; !rd_panel_is_nil(child); child = child->next) { if(child != next) { @@ -11510,57 +11464,57 @@ df_frame(void) } else { - DF_Panel *pre_prev = panel->prev; - DF_Panel *pre_parent = parent; - DF_Panel *new_parent = df_panel_alloc(ws); + RD_Panel *pre_prev = panel->prev; + RD_Panel *pre_parent = parent; + RD_Panel *new_parent = rd_panel_alloc(ws); new_parent->pct_of_parent = panel->pct_of_parent; - if(!df_panel_is_nil(pre_parent)) + if(!rd_panel_is_nil(pre_parent)) { - df_panel_remove(pre_parent, panel); - df_panel_insert(pre_parent, pre_prev, new_parent); + rd_panel_remove(pre_parent, panel); + rd_panel_insert(pre_parent, pre_prev, new_parent); } else { ws->root_panel = new_parent; } - DF_Panel *left = panel; - DF_Panel *right = df_panel_alloc(ws); + RD_Panel *left = panel; + RD_Panel *right = rd_panel_alloc(ws); new_panel = right; if(split_side == Side_Min) { - Swap(DF_Panel *, left, right); + Swap(RD_Panel *, left, right); } - df_panel_insert(new_parent, &df_nil_panel, left); - df_panel_insert(new_parent, left, right); + rd_panel_insert(new_parent, &rd_nil_panel, left); + rd_panel_insert(new_parent, left, right); new_parent->split_axis = split_axis; left->pct_of_parent = 0.5f; right->pct_of_parent = 0.5f; ws->focused_panel = new_panel; } - if(!df_panel_is_nil(new_panel->prev)) + if(!rd_panel_is_nil(new_panel->prev)) { Rng2F32 prev_rect_pct = new_panel->prev->animated_rect_pct; new_panel->animated_rect_pct = prev_rect_pct; new_panel->animated_rect_pct.p0.v[split_axis] = new_panel->animated_rect_pct.p1.v[split_axis]; } - if(!df_panel_is_nil(new_panel->next)) + if(!rd_panel_is_nil(new_panel->next)) { Rng2F32 next_rect_pct = new_panel->next->animated_rect_pct; new_panel->animated_rect_pct = next_rect_pct; new_panel->animated_rect_pct.p1.v[split_axis] = new_panel->animated_rect_pct.p0.v[split_axis]; } - DF_Panel *move_tab_panel = df_panel_from_handle(df_regs()->panel); - DF_View *move_tab = df_view_from_handle(df_regs()->view); - if(!df_panel_is_nil(new_panel) && !df_view_is_nil(move_tab) && !df_panel_is_nil(move_tab_panel) && - kind == DF_CmdKind_SplitPanel) + RD_Panel *move_tab_panel = rd_panel_from_handle(rd_regs()->panel); + RD_View *move_tab = rd_view_from_handle(rd_regs()->view); + if(!rd_panel_is_nil(new_panel) && !rd_view_is_nil(move_tab) && !rd_panel_is_nil(move_tab_panel) && + kind == RD_CmdKind_SplitPanel) { - df_panel_remove_tab_view(move_tab_panel, move_tab); - df_panel_insert_tab_view(new_panel, new_panel->last_tab_view, move_tab); - new_panel->selected_tab_view = df_handle_from_view(move_tab); + rd_panel_remove_tab_view(move_tab_panel, move_tab); + rd_panel_insert_tab_view(new_panel, new_panel->last_tab_view, move_tab); + new_panel->selected_tab_view = rd_handle_from_view(move_tab); B32 move_tab_panel_is_empty = 1; - for(DF_View *v = move_tab_panel->first_tab_view; !df_view_is_nil(v); v = v->order_next) + for(RD_View *v = move_tab_panel->first_tab_view; !rd_view_is_nil(v); v = v->order_next) { - if(!df_view_is_project_filtered(v)) + if(!rd_view_is_project_filtered(v)) { move_tab_panel_is_empty = 0; break; @@ -11569,18 +11523,18 @@ df_frame(void) if(move_tab_panel_is_empty && move_tab_panel != ws->root_panel && move_tab_panel != new_panel->prev && move_tab_panel != new_panel->next) { - df_cmd(DF_CmdKind_ClosePanel, .panel = df_handle_from_panel(move_tab_panel)); + rd_cmd(RD_CmdKind_ClosePanel, .panel = rd_handle_from_panel(move_tab_panel)); } } }break; //- rjf: panel rotation - case DF_CmdKind_RotatePanelColumns: + case RD_CmdKind_RotatePanelColumns: { - DF_Window *ws = df_window_from_handle(df_regs()->window); - DF_Panel *panel = ws->focused_panel; - DF_Panel *parent = &df_nil_panel; - for(DF_Panel *p = panel->parent; !df_panel_is_nil(p); p = p->parent) + RD_Window *ws = rd_window_from_handle(rd_regs()->window); + RD_Panel *panel = ws->focused_panel; + RD_Panel *parent = &rd_nil_panel; + for(RD_Panel *p = panel->parent; !rd_panel_is_nil(p); p = p->parent) { if(p->split_axis == Axis2_X) { @@ -11588,45 +11542,45 @@ df_frame(void) break; } } - if(!df_panel_is_nil(parent) && parent->child_count > 1) + if(!rd_panel_is_nil(parent) && parent->child_count > 1) { - DF_Panel *old_first = parent->first; - DF_Panel *new_first = parent->first->next; - old_first->next = &df_nil_panel; + RD_Panel *old_first = parent->first; + RD_Panel *new_first = parent->first->next; + old_first->next = &rd_nil_panel; old_first->prev = parent->last; parent->last->next = old_first; - new_first->prev = &df_nil_panel; + new_first->prev = &rd_nil_panel; parent->first = new_first; parent->last = old_first; } }break; //- rjf: panel focusing - case DF_CmdKind_NextPanel: panel_sib_off = OffsetOf(DF_Panel, next); panel_child_off = OffsetOf(DF_Panel, first); goto cycle; - case DF_CmdKind_PrevPanel: panel_sib_off = OffsetOf(DF_Panel, prev); panel_child_off = OffsetOf(DF_Panel, last); goto cycle; + case RD_CmdKind_NextPanel: panel_sib_off = OffsetOf(RD_Panel, next); panel_child_off = OffsetOf(RD_Panel, first); goto cycle; + case RD_CmdKind_PrevPanel: panel_sib_off = OffsetOf(RD_Panel, prev); panel_child_off = OffsetOf(RD_Panel, last); goto cycle; cycle:; { - DF_Window *ws = df_window_from_handle(df_regs()->window); - for(DF_Panel *panel = ws->focused_panel; !df_panel_is_nil(panel);) + RD_Window *ws = rd_window_from_handle(rd_regs()->window); + for(RD_Panel *panel = ws->focused_panel; !rd_panel_is_nil(panel);) { - DF_PanelRec rec = df_panel_rec_df(panel, panel_sib_off, panel_child_off); + RD_PanelRec rec = rd_panel_rec_depth_first(panel, panel_sib_off, panel_child_off); panel = rec.next; - if(df_panel_is_nil(panel)) + if(rd_panel_is_nil(panel)) { panel = ws->root_panel; } - if(df_panel_is_nil(panel->first)) + if(rd_panel_is_nil(panel->first)) { - df_cmd(DF_CmdKind_FocusPanel, .panel = df_handle_from_panel(panel)); + rd_cmd(RD_CmdKind_FocusPanel, .panel = rd_handle_from_panel(panel)); break; } } }break; - case DF_CmdKind_FocusPanel: + case RD_CmdKind_FocusPanel: { - DF_Window *ws = df_window_from_handle(df_regs()->window); - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); - if(!df_panel_is_nil(panel)) + RD_Window *ws = rd_window_from_handle(rd_regs()->window); + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); + if(!rd_panel_is_nil(panel)) { ws->focused_panel = panel; ws->menu_bar_focused = 0; @@ -11635,71 +11589,71 @@ df_frame(void) }break; //- rjf: directional panel focus changing - case DF_CmdKind_FocusPanelRight: panel_change_dir = v2s32(+1, +0); goto focus_panel_dir; - case DF_CmdKind_FocusPanelLeft: panel_change_dir = v2s32(-1, +0); goto focus_panel_dir; - case DF_CmdKind_FocusPanelUp: panel_change_dir = v2s32(+0, -1); goto focus_panel_dir; - case DF_CmdKind_FocusPanelDown: panel_change_dir = v2s32(+0, +1); goto focus_panel_dir; + case RD_CmdKind_FocusPanelRight: panel_change_dir = v2s32(+1, +0); goto focus_panel_dir; + case RD_CmdKind_FocusPanelLeft: panel_change_dir = v2s32(-1, +0); goto focus_panel_dir; + case RD_CmdKind_FocusPanelUp: panel_change_dir = v2s32(+0, -1); goto focus_panel_dir; + case RD_CmdKind_FocusPanelDown: panel_change_dir = v2s32(+0, +1); goto focus_panel_dir; focus_panel_dir:; { - DF_Window *ws = df_window_from_handle(df_regs()->window); - DF_Panel *src_panel = ws->focused_panel; - Rng2F32 src_panel_rect = df_target_rect_from_panel(r2f32(v2f32(0, 0), v2f32(1000, 1000)), ws->root_panel, src_panel); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); + RD_Panel *src_panel = ws->focused_panel; + Rng2F32 src_panel_rect = rd_target_rect_from_panel(r2f32(v2f32(0, 0), v2f32(1000, 1000)), ws->root_panel, src_panel); Vec2F32 src_panel_center = center_2f32(src_panel_rect); Vec2F32 src_panel_half_dim = scale_2f32(dim_2f32(src_panel_rect), 0.5f); Vec2F32 travel_dim = add_2f32(src_panel_half_dim, v2f32(10.f, 10.f)); Vec2F32 travel_dst = add_2f32(src_panel_center, mul_2f32(travel_dim, v2f32((F32)panel_change_dir.x, (F32)panel_change_dir.y))); - DF_Panel *dst_root = &df_nil_panel; - for(DF_Panel *p = ws->root_panel; !df_panel_is_nil(p); p = df_panel_rec_df_pre(p).next) + RD_Panel *dst_root = &rd_nil_panel; + for(RD_Panel *p = ws->root_panel; !rd_panel_is_nil(p); p = rd_panel_rec_depth_first_pre(p).next) { - if(p == src_panel || !df_panel_is_nil(p->first)) + if(p == src_panel || !rd_panel_is_nil(p->first)) { continue; } - Rng2F32 p_rect = df_target_rect_from_panel(r2f32(v2f32(0, 0), v2f32(1000, 1000)), ws->root_panel, p); + Rng2F32 p_rect = rd_target_rect_from_panel(r2f32(v2f32(0, 0), v2f32(1000, 1000)), ws->root_panel, p); if(contains_2f32(p_rect, travel_dst)) { dst_root = p; break; } } - if(!df_panel_is_nil(dst_root)) + if(!rd_panel_is_nil(dst_root)) { - DF_Panel *dst_panel = &df_nil_panel; - for(DF_Panel *p = dst_root; !df_panel_is_nil(p); p = df_panel_rec_df_pre(p).next) + RD_Panel *dst_panel = &rd_nil_panel; + for(RD_Panel *p = dst_root; !rd_panel_is_nil(p); p = rd_panel_rec_depth_first_pre(p).next) { - if(df_panel_is_nil(p->first) && p != src_panel) + if(rd_panel_is_nil(p->first) && p != src_panel) { dst_panel = p; break; } } - df_cmd(DF_CmdKind_FocusPanel, .panel = df_handle_from_panel(dst_panel)); + rd_cmd(RD_CmdKind_FocusPanel, .panel = rd_handle_from_panel(dst_panel)); } }break; //- rjf: undo/redo - case DF_CmdKind_Undo:{}break; - case DF_CmdKind_Redo:{}break; + case RD_CmdKind_Undo:{}break; + case RD_CmdKind_Redo:{}break; //- rjf: focus history - case DF_CmdKind_GoBack:{}break; - case DF_CmdKind_GoForward:{}break; + case RD_CmdKind_GoBack:{}break; + case RD_CmdKind_GoForward:{}break; //- rjf: files - case DF_CmdKind_SetCurrentPath: + case RD_CmdKind_SetCurrentPath: { - arena_clear(df_state->current_path_arena); - df_state->current_path = push_str8_copy(df_state->current_path_arena, df_regs()->file_path); + arena_clear(rd_state->current_path_arena); + rd_state->current_path = push_str8_copy(rd_state->current_path_arena, rd_regs()->file_path); }break; //- rjf: override file links - case DF_CmdKind_SetFileOverrideLinkSrc: - case DF_CmdKind_SetFileOverrideLinkDst: + case RD_CmdKind_SetFileOverrideLinkSrc: + case RD_CmdKind_SetFileOverrideLinkDst: { #if 0 // TODO(rjf): @msgs // rjf: unpack args - DF_Entity *map = df_entity_from_handle(df_regs()->entity); - String8 path = path_normalized_from_string(scratch.arena, df_regs()->file_path); + RD_Entity *map = rd_entity_from_handle(rd_regs()->entity); + String8 path = path_normalized_from_string(scratch.arena, rd_regs()->file_path); String8 path_folder = str8_chop_last_slash(path); String8 path_file = str8_skip_last_slash(path); @@ -11707,42 +11661,42 @@ df_frame(void) switch(kind) { default:{}break; - case DF_CmdKind_SetFileOverrideLinkSrc: + case RD_CmdKind_SetFileOverrideLinkSrc: { - DF_Entity *map_parent = (df_regs()->file_path.size != 0) ? d_entity_from_path(path_folder, D_EntityFromPathFlag_OpenAsNeeded|D_EntityFromPathFlag_OpenMissing) : df_entity_root(); - if(df_entity_is_nil(map)) + RD_Entity *map_parent = (rd_regs()->file_path.size != 0) ? d_entity_from_path(path_folder, D_EntityFromPathFlag_OpenAsNeeded|D_EntityFromPathFlag_OpenMissing) : rd_entity_root(); + if(rd_entity_is_nil(map)) { - map = df_entity_alloc(map_parent, DF_EntityKind_FilePathMap); + map = rd_entity_alloc(map_parent, RD_EntityKind_FilePathMap); } else { - df_entity_change_parent(map, map->parent, map_parent, &d_nil_entity); + rd_entity_change_parent(map, map->parent, map_parent, &d_nil_entity); } - df_entity_equip_name(map, path_file); + rd_entity_equip_name(map, path_file); }break; - case DF_CmdKind_SetFileOverrideLinkDst: + case RD_CmdKind_SetFileOverrideLinkDst: { - if(df_entity_is_nil(map)) + if(rd_entity_is_nil(map)) { - map = df_entity_alloc(df_entity_root(), DF_EntityKind_FilePathMap); + map = rd_entity_alloc(rd_entity_root(), RD_EntityKind_FilePathMap); } - DF_Entity *map_dst_entity = &d_nil_entity; - if(df_regs()->file_path.size != 0) + RD_Entity *map_dst_entity = &d_nil_entity; + if(rd_regs()->file_path.size != 0) { map_dst_entity = d_entity_from_path(path, D_EntityFromPathFlag_All); } - df_entity_equip_entity_handle(map, df_handle_from_entity(map_dst_entity)); + rd_entity_equip_entity_handle(map, rd_handle_from_entity(map_dst_entity)); }break; } // rjf: empty src/dest -> delete - if(!df_entity_is_nil(map) && map->string.size == 0 && df_entity_is_nil(df_entity_from_handle(map->entity_handle))) + if(!rd_entity_is_nil(map) && map->string.size == 0 && rd_entity_is_nil(rd_entity_from_handle(map->entity_handle))) { - df_entity_mark_for_deletion(map); + rd_entity_mark_for_deletion(map); } #endif }break; - case DF_CmdKind_SetFileReplacementPath: + case RD_CmdKind_SetFileReplacementPath: { // NOTE(rjf): // @@ -11759,24 +11713,24 @@ df_frame(void) // -> override C:/foo/bar/baz.c -> D:/1/2/3.c //- rjf: unpack - String8 src_path = df_regs()->string; - String8 dst_path = df_regs()->file_path; + String8 src_path = rd_regs()->string; + String8 dst_path = rd_regs()->file_path; #if 0 // TODO(rjf): @msgs //- rjf: grab src file & chosen replacement - DF_Entity *file = df_entity_from_handle(params.entity); - DF_Entity *replacement = d_entity_from_path(params.file_path, D_EntityFromPathFlag_OpenAsNeeded|D_EntityFromPathFlag_OpenMissing); + RD_Entity *file = rd_entity_from_handle(params.entity); + RD_Entity *replacement = d_entity_from_path(params.file_path, D_EntityFromPathFlag_OpenAsNeeded|D_EntityFromPathFlag_OpenMissing); //- rjf: find - DF_Entity *first_diff_src = file; - DF_Entity *first_diff_dst = replacement; - for(;!df_entity_is_nil(first_diff_src) && !df_entity_is_nil(first_diff_dst);) + RD_Entity *first_diff_src = file; + RD_Entity *first_diff_dst = replacement; + for(;!rd_entity_is_nil(first_diff_src) && !rd_entity_is_nil(first_diff_dst);) { if(!str8_match(first_diff_src->string, first_diff_dst->string, StringMatchFlag_CaseInsensitive) || - first_diff_src->parent->kind != DF_EntityKind_File || - first_diff_src->parent->parent->kind != DF_EntityKind_File || - first_diff_dst->parent->kind != DF_EntityKind_File || - first_diff_dst->parent->parent->kind != DF_EntityKind_File) + first_diff_src->parent->kind != RD_EntityKind_File || + first_diff_src->parent->parent->kind != RD_EntityKind_File || + first_diff_dst->parent->kind != RD_EntityKind_File || + first_diff_dst->parent->parent->kind != RD_EntityKind_File) { break; } @@ -11785,32 +11739,32 @@ df_frame(void) } //- rjf: override first different - if(!df_entity_is_nil(first_diff_src) && !df_entity_is_nil(first_diff_dst)) + if(!rd_entity_is_nil(first_diff_src) && !rd_entity_is_nil(first_diff_dst)) { - DF_Entity *link = df_entity_child_from_string_and_kind(first_diff_src->parent, first_diff_src->name, DF_EntityKind_FilePathMap); - if(df_entity_is_nil(link)) + RD_Entity *link = rd_entity_child_from_string_and_kind(first_diff_src->parent, first_diff_src->name, RD_EntityKind_FilePathMap); + if(rd_entity_is_nil(link)) { - link = df_entity_alloc(first_diff_src->parent, DF_EntityKind_FilePathMap); - df_entity_equip_name(link, first_diff_src->name); + link = rd_entity_alloc(first_diff_src->parent, RD_EntityKind_FilePathMap); + rd_entity_equip_name(link, first_diff_src->name); } - df_entity_equip_entity_handle(link, df_handle_from_entity(first_diff_dst)); + rd_entity_equip_entity_handle(link, rd_handle_from_entity(first_diff_dst)); } #endif }break; //- rjf: auto view rules - case DF_CmdKind_SetAutoViewRuleType: - case DF_CmdKind_SetAutoViewRuleViewRule: + case RD_CmdKind_SetAutoViewRuleType: + case RD_CmdKind_SetAutoViewRuleViewRule: { }break; //- rjf: panel removal - case DF_CmdKind_ClosePanel: + case RD_CmdKind_ClosePanel: { - DF_Window *ws = df_window_from_handle(df_regs()->window); - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); - DF_Panel *parent = panel->parent; - if(!df_panel_is_nil(parent)) + RD_Window *ws = rd_window_from_handle(rd_regs()->window); + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); + RD_Panel *parent = panel->parent; + if(!rd_panel_is_nil(parent)) { Axis2 split_axis = parent->split_axis; @@ -11818,35 +11772,35 @@ df_frame(void) // we should just remove both children. if(parent->child_count == 2) { - DF_Panel *discard_child = panel; - DF_Panel *keep_child = panel == parent->first ? parent->last : parent->first; - DF_Panel *grandparent = parent->parent; - DF_Panel *parent_prev = parent->prev; + RD_Panel *discard_child = panel; + RD_Panel *keep_child = panel == parent->first ? parent->last : parent->first; + RD_Panel *grandparent = parent->parent; + RD_Panel *parent_prev = parent->prev; F32 pct_of_parent = parent->pct_of_parent; // rjf: unhook kept child - df_panel_remove(parent, keep_child); + rd_panel_remove(parent, keep_child); // rjf: unhook this subtree - if(!df_panel_is_nil(grandparent)) + if(!rd_panel_is_nil(grandparent)) { - df_panel_remove(grandparent, parent); + rd_panel_remove(grandparent, parent); } // rjf: release the things we should discard { - df_panel_release(ws, parent); - df_panel_release(ws, discard_child); + rd_panel_release(ws, parent); + rd_panel_release(ws, discard_child); } // rjf: re-hook our kept child into the overall tree - if(df_panel_is_nil(grandparent)) + if(rd_panel_is_nil(grandparent)) { ws->root_panel = keep_child; } else { - df_panel_insert(grandparent, parent_prev, keep_child); + rd_panel_insert(grandparent, parent_prev, keep_child); } keep_child->pct_of_parent = pct_of_parent; @@ -11854,42 +11808,42 @@ df_frame(void) if(ws->focused_panel == discard_child) { ws->focused_panel = keep_child; - for(DF_Panel *grandchild = ws->focused_panel; !df_panel_is_nil(grandchild); grandchild = grandchild->first) + for(RD_Panel *grandchild = ws->focused_panel; !rd_panel_is_nil(grandchild); grandchild = grandchild->first) { ws->focused_panel = grandchild; } } // rjf: keep-child split-axis == grandparent split-axis? bubble keep-child up into grandparent's children - if(!df_panel_is_nil(grandparent) && grandparent->split_axis == keep_child->split_axis && !df_panel_is_nil(keep_child->first)) + if(!rd_panel_is_nil(grandparent) && grandparent->split_axis == keep_child->split_axis && !rd_panel_is_nil(keep_child->first)) { - df_panel_remove(grandparent, keep_child); - DF_Panel *prev = parent_prev; - for(DF_Panel *child = keep_child->first, *next = 0; !df_panel_is_nil(child); child = next) + rd_panel_remove(grandparent, keep_child); + RD_Panel *prev = parent_prev; + for(RD_Panel *child = keep_child->first, *next = 0; !rd_panel_is_nil(child); child = next) { next = child->next; - df_panel_remove(keep_child, child); - df_panel_insert(grandparent, prev, child); + rd_panel_remove(keep_child, child); + rd_panel_insert(grandparent, prev, child); prev = child; child->pct_of_parent *= keep_child->pct_of_parent; } - df_panel_release(ws, keep_child); + rd_panel_release(ws, keep_child); } } // NOTE(rjf): Otherwise we can just remove this child. else { - DF_Panel *next = &df_nil_panel; + RD_Panel *next = &rd_nil_panel; F32 removed_size_pct = panel->pct_of_parent; - if(df_panel_is_nil(next)) { next = panel->prev; } - if(df_panel_is_nil(next)) { next = panel->next; } - df_panel_remove(parent, panel); - df_panel_release(ws, panel); + if(rd_panel_is_nil(next)) { next = panel->prev; } + if(rd_panel_is_nil(next)) { next = panel->next; } + rd_panel_remove(parent, panel); + rd_panel_release(ws, panel); if(ws->focused_panel == panel) { ws->focused_panel = next; } - for(DF_Panel *child = parent->first; !df_panel_is_nil(child); child = child->next) + for(RD_Panel *child = parent->first; !rd_panel_is_nil(child); child = child->next) { child->pct_of_parent /= 1.f-removed_size_pct; } @@ -11898,111 +11852,111 @@ df_frame(void) }break; //- rjf: panel tab controls - case DF_CmdKind_NextTab: + case RD_CmdKind_NextTab: { - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); - DF_View *view = df_selected_tab_from_panel(panel); - DF_View *next_view = view; - for(DF_View *v = view; !df_view_is_nil(v); v = df_view_is_nil(v->order_next) ? panel->first_tab_view : v->order_next) + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); + RD_View *view = rd_selected_tab_from_panel(panel); + RD_View *next_view = view; + for(RD_View *v = view; !rd_view_is_nil(v); v = rd_view_is_nil(v->order_next) ? panel->first_tab_view : v->order_next) { - if(!df_view_is_project_filtered(v) && v != view) + if(!rd_view_is_project_filtered(v) && v != view) { next_view = v; break; } } view = next_view; - panel->selected_tab_view = df_handle_from_view(view); + panel->selected_tab_view = rd_handle_from_view(view); }break; - case DF_CmdKind_PrevTab: + case RD_CmdKind_PrevTab: { - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); - DF_View *view = df_selected_tab_from_panel(panel); - DF_View *next_view = view; - for(DF_View *v = view; !df_view_is_nil(v); v = df_view_is_nil(v->order_prev) ? panel->last_tab_view : v->order_prev) + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); + RD_View *view = rd_selected_tab_from_panel(panel); + RD_View *next_view = view; + for(RD_View *v = view; !rd_view_is_nil(v); v = rd_view_is_nil(v->order_prev) ? panel->last_tab_view : v->order_prev) { - if(!df_view_is_project_filtered(v) && v != view) + if(!rd_view_is_project_filtered(v) && v != view) { next_view = v; break; } } view = next_view; - panel->selected_tab_view = df_handle_from_view(view); + panel->selected_tab_view = rd_handle_from_view(view); }break; - case DF_CmdKind_MoveTabRight: - case DF_CmdKind_MoveTabLeft: + case RD_CmdKind_MoveTabRight: + case RD_CmdKind_MoveTabLeft: { - DF_Window *ws = df_window_from_handle(df_regs()->window); - DF_Panel *panel = ws->focused_panel; - DF_View *view = df_selected_tab_from_panel(panel); - DF_View *prev_view = (kind == DF_CmdKind_MoveTabRight ? view->order_next : view->order_prev->order_prev); - if(!df_view_is_nil(prev_view) || kind == DF_CmdKind_MoveTabLeft) + RD_Window *ws = rd_window_from_handle(rd_regs()->window); + RD_Panel *panel = ws->focused_panel; + RD_View *view = rd_selected_tab_from_panel(panel); + RD_View *prev_view = (kind == RD_CmdKind_MoveTabRight ? view->order_next : view->order_prev->order_prev); + if(!rd_view_is_nil(prev_view) || kind == RD_CmdKind_MoveTabLeft) { - df_cmd(DF_CmdKind_MoveTab, - .panel = df_handle_from_panel(panel), - .dst_panel = df_handle_from_panel(panel), - .view = df_handle_from_view(view), - .prev_view = df_handle_from_view(prev_view)); + rd_cmd(RD_CmdKind_MoveTab, + .panel = rd_handle_from_panel(panel), + .dst_panel = rd_handle_from_panel(panel), + .view = rd_handle_from_view(view), + .prev_view = rd_handle_from_view(prev_view)); } }break; - case DF_CmdKind_OpenTab: + case RD_CmdKind_OpenTab: { - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); - DF_ViewSpec *spec = df_view_spec_from_string(df_regs()->string); - DF_Entity *entity = &d_nil_entity; - if(spec->info.flags & DF_ViewSpecFlag_ParameterizedByEntity) + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); + RD_ViewSpec *spec = rd_view_spec_from_string(rd_regs()->string); + RD_Entity *entity = &d_nil_entity; + if(spec->info.flags & RD_ViewSpecFlag_ParameterizedByEntity) { - entity = df_entity_from_handle(df_regs()->entity); + entity = rd_entity_from_handle(rd_regs()->entity); } - if(!df_panel_is_nil(panel) && spec != &df_nil_view_spec) + if(!rd_panel_is_nil(panel) && spec != &rd_nil_view_spec) { - DF_View *view = df_view_alloc(); + RD_View *view = rd_view_alloc(); String8 query = {0}; - if(!df_entity_is_nil(entity)) + if(!rd_entity_is_nil(entity)) { - query = d_eval_string_from_entity(scratch.arena, entity); + query = rd_eval_string_from_entity(scratch.arena, entity); } - else if(df_regs()->file_path.size != 0) + else if(rd_regs()->file_path.size != 0) { - query = d_eval_string_from_file_path(scratch.arena, df_regs()->file_path); + query = rd_eval_string_from_file_path(scratch.arena, rd_regs()->file_path); } - else if(df_regs()->string.size != 0) + else if(rd_regs()->string.size != 0) { - query = df_regs()->string; + query = rd_regs()->string; } - df_view_equip_spec(view, spec, query, df_regs()->params_tree); - df_panel_insert_tab_view(panel, panel->last_tab_view, view); + rd_view_equip_spec(view, spec, query, rd_regs()->params_tree); + rd_panel_insert_tab_view(panel, panel->last_tab_view, view); } }break; - case DF_CmdKind_CloseTab: + case RD_CmdKind_CloseTab: { - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); - DF_View *view = df_view_from_handle(df_regs()->view); - if(!df_view_is_nil(view)) + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); + RD_View *view = rd_view_from_handle(rd_regs()->view); + if(!rd_view_is_nil(view)) { - df_panel_remove_tab_view(panel, view); - df_view_release(view); + rd_panel_remove_tab_view(panel, view); + rd_view_release(view); } }break; - case DF_CmdKind_MoveTab: + case RD_CmdKind_MoveTab: { - DF_Window *ws = df_window_from_handle(df_regs()->window); - DF_Panel *src_panel = df_panel_from_handle(df_regs()->panel); - DF_View *view = df_view_from_handle(df_regs()->view); - DF_Panel *dst_panel = df_panel_from_handle(df_regs()->dst_panel); - DF_View *prev_view = df_view_from_handle(df_regs()->prev_view); - if(!df_panel_is_nil(src_panel) && - !df_panel_is_nil(dst_panel) && + RD_Window *ws = rd_window_from_handle(rd_regs()->window); + RD_Panel *src_panel = rd_panel_from_handle(rd_regs()->panel); + RD_View *view = rd_view_from_handle(rd_regs()->view); + RD_Panel *dst_panel = rd_panel_from_handle(rd_regs()->dst_panel); + RD_View *prev_view = rd_view_from_handle(rd_regs()->prev_view); + if(!rd_panel_is_nil(src_panel) && + !rd_panel_is_nil(dst_panel) && prev_view != view) { - df_panel_remove_tab_view(src_panel, view); - df_panel_insert_tab_view(dst_panel, prev_view, view); + rd_panel_remove_tab_view(src_panel, view); + rd_panel_insert_tab_view(dst_panel, prev_view, view); ws->focused_panel = dst_panel; B32 src_panel_is_empty = 1; - for(DF_View *v = src_panel->first_tab_view; !df_view_is_nil(v); v = v->order_next) + for(RD_View *v = src_panel->first_tab_view; !rd_view_is_nil(v); v = v->order_next) { - if(!df_view_is_project_filtered(v)) + if(!rd_view_is_project_filtered(v)) { src_panel_is_empty = 0; break; @@ -12010,49 +11964,49 @@ df_frame(void) } if(src_panel_is_empty && src_panel != ws->root_panel) { - df_cmd(DF_CmdKind_ClosePanel, .panel = df_handle_from_panel(src_panel)); + rd_cmd(RD_CmdKind_ClosePanel, .panel = rd_handle_from_panel(src_panel)); } } }break; - case DF_CmdKind_TabBarTop: + case RD_CmdKind_TabBarTop: { - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); panel->tab_side = Side_Min; }break; - case DF_CmdKind_TabBarBottom: + case RD_CmdKind_TabBarBottom: { - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); panel->tab_side = Side_Max; }break; //- rjf: files - case DF_CmdKind_Open: + case RD_CmdKind_Open: { - DF_Window *ws = df_window_from_handle(df_regs()->window); - String8 path = df_regs()->file_path; + RD_Window *ws = rd_window_from_handle(rd_regs()->window); + String8 path = rd_regs()->file_path; FileProperties props = os_properties_from_file_path(path); if(props.created != 0) { - df_cmd(DF_CmdKind_PendingFile); + rd_cmd(RD_CmdKind_PendingFile); } else { log_user_errorf("Couldn't open file at \"%S\".", path); } }break; - case DF_CmdKind_Switch: + case RD_CmdKind_Switch: { // TODO(rjf): @msgs #if 0 B32 already_opened = 0; - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); - for(DF_View *v = panel->first_tab_view; !df_view_is_nil(v); v = v->next) + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); + for(RD_View *v = panel->first_tab_view; !rd_view_is_nil(v); v = v->next) { - if(df_view_is_project_filtered(v)) { continue; } - DF_Entity *v_param_entity = df_entity_from_handle(v->params_entity); - if(v_param_entity == df_entity_from_handle(df_regs()->entity)) + if(rd_view_is_project_filtered(v)) { continue; } + RD_Entity *v_param_entity = rd_entity_from_handle(v->params_entity); + if(v_param_entity == rd_entity_from_handle(rd_regs()->entity)) { - panel->selected_tab_view = df_handle_from_view(v); + panel->selected_tab_view = rd_handle_from_view(v); already_opened = 1; break; } @@ -12060,21 +12014,21 @@ df_frame(void) if(already_opened == 0) { D_CmdParams p = params; - p.window = df_handle_from_window(ws); - p.panel = df_handle_from_panel(ws->focused_panel); - p.entity = df_regs()->entity; + p.window = rd_handle_from_window(ws); + p.panel = rd_handle_from_panel(ws->focused_panel); + p.entity = rd_regs()->entity; d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_PendingFile)); } #endif }break; - case DF_CmdKind_SwitchToPartnerFile: + case RD_CmdKind_SwitchToPartnerFile: { - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); - DF_View *view = df_selected_tab_from_panel(panel); - DF_ViewKind view_kind = df_view_kind_from_string(view->spec->info.name); - if(view_kind == DF_ViewKind_Text) + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); + RD_View *view = rd_selected_tab_from_panel(panel); + RD_ViewKind view_kind = rd_view_kind_from_string(view->spec->info.name); + if(view_kind == RD_ViewKind_Text) { - String8 file_path = d_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); + String8 file_path = rd_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); String8 file_full_path = path_normalized_from_string(scratch.arena, file_path); String8 file_folder = str8_chop_last_slash(file_full_path); String8 file_name = str8_skip_last_slash(str8_chop_last_dot(file_full_path)); @@ -12100,7 +12054,7 @@ df_frame(void) { // TODO(rjf): //D_CmdParams p = df_cmd_params_from_panel(ws, panel); - //p.entity = df_handle_from_entity(candidate); + //p.entity = rd_handle_from_entity(candidate); //d_cmd_list_push(arena, cmds, &p, d_cmd_spec_from_kind(D_CmdKind_Switch)); break; } @@ -12110,11 +12064,11 @@ df_frame(void) }break; //- rjf: panel built-in layout builds - case DF_CmdKind_ResetToDefaultPanels: - case DF_CmdKind_ResetToCompactPanels: + case RD_CmdKind_ResetToDefaultPanels: + case RD_CmdKind_ResetToCompactPanels: { panel_reset_done = 1; - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); typedef enum Layout { @@ -12126,174 +12080,174 @@ df_frame(void) switch(kind) { default:{}break; - case DF_CmdKind_ResetToDefaultPanels:{layout = Layout_Default;}break; - case DF_CmdKind_ResetToCompactPanels:{layout = Layout_Compact;}break; + case RD_CmdKind_ResetToDefaultPanels:{layout = Layout_Default;}break; + case RD_CmdKind_ResetToCompactPanels:{layout = Layout_Compact;}break; } //- rjf: gather all panels in the panel tree - remove & gather views // we'd like to keep in the next layout - D_HandleList panels_to_close = {0}; - D_HandleList views_to_close = {0}; - DF_View *watch = &df_nil_view; - DF_View *locals = &df_nil_view; - DF_View *regs = &df_nil_view; - DF_View *globals = &df_nil_view; - DF_View *tlocals = &df_nil_view; - DF_View *types = &df_nil_view; - DF_View *procs = &df_nil_view; - DF_View *callstack = &df_nil_view; - DF_View *breakpoints = &df_nil_view; - DF_View *watch_pins = &df_nil_view; - DF_View *output = &df_nil_view; - DF_View *targets = &df_nil_view; - DF_View *scheduler = &df_nil_view; - DF_View *modules = &df_nil_view; - DF_View *disasm = &df_nil_view; - DF_View *memory = &df_nil_view; - DF_View *getting_started = &df_nil_view; - D_HandleList code_views = {0}; - for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) + RD_HandleList panels_to_close = {0}; + RD_HandleList views_to_close = {0}; + RD_View *watch = &rd_nil_view; + RD_View *locals = &rd_nil_view; + RD_View *regs = &rd_nil_view; + RD_View *globals = &rd_nil_view; + RD_View *tlocals = &rd_nil_view; + RD_View *types = &rd_nil_view; + RD_View *procs = &rd_nil_view; + RD_View *callstack = &rd_nil_view; + RD_View *breakpoints = &rd_nil_view; + RD_View *watch_pins = &rd_nil_view; + RD_View *output = &rd_nil_view; + RD_View *targets = &rd_nil_view; + RD_View *scheduler = &rd_nil_view; + RD_View *modules = &rd_nil_view; + RD_View *disasm = &rd_nil_view; + RD_View *memory = &rd_nil_view; + RD_View *getting_started = &rd_nil_view; + RD_HandleList code_views = {0}; + for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next) { - D_Handle handle = df_handle_from_panel(panel); - d_handle_list_push(scratch.arena, &panels_to_close, handle); - for(DF_View *view = panel->first_tab_view, *next = 0; !df_view_is_nil(view); view = next) + RD_Handle handle = rd_handle_from_panel(panel); + rd_handle_list_push(scratch.arena, &panels_to_close, handle); + for(RD_View *view = panel->first_tab_view, *next = 0; !rd_view_is_nil(view); view = next) { next = view->order_next; - DF_ViewKind view_kind = df_view_kind_from_string(view->spec->info.name); + RD_ViewKind view_kind = rd_view_kind_from_string(view->spec->info.name); B32 needs_delete = 1; switch(view_kind) { default:{}break; - case DF_ViewKind_Watch: {if(df_view_is_nil(watch)) { needs_delete = 0; watch = view;} }break; - case DF_ViewKind_Locals: {if(df_view_is_nil(locals)) { needs_delete = 0; locals = view;} }break; - case DF_ViewKind_Registers: {if(df_view_is_nil(regs)) { needs_delete = 0; regs = view;} }break; - case DF_ViewKind_Globals: {if(df_view_is_nil(globals)) { needs_delete = 0; globals = view;} }break; - case DF_ViewKind_ThreadLocals: {if(df_view_is_nil(tlocals)) { needs_delete = 0; tlocals = view;} }break; - case DF_ViewKind_Types: {if(df_view_is_nil(types)) { needs_delete = 0; types = view;} }break; - case DF_ViewKind_Procedures: {if(df_view_is_nil(procs)) { needs_delete = 0; procs = view;} }break; - case DF_ViewKind_CallStack: {if(df_view_is_nil(callstack)) { needs_delete = 0; callstack = view;} }break; - case DF_ViewKind_Breakpoints: {if(df_view_is_nil(breakpoints)) { needs_delete = 0; breakpoints = view;} }break; - case DF_ViewKind_WatchPins: {if(df_view_is_nil(watch_pins)) { needs_delete = 0; watch_pins = view;} }break; - case DF_ViewKind_Output: {if(df_view_is_nil(output)) { needs_delete = 0; output = view;} }break; - case DF_ViewKind_Targets: {if(df_view_is_nil(targets)) { needs_delete = 0; targets = view;} }break; - case DF_ViewKind_Scheduler: {if(df_view_is_nil(scheduler)) { needs_delete = 0; scheduler = view;} }break; - case DF_ViewKind_Modules: {if(df_view_is_nil(modules)) { needs_delete = 0; modules = view;} }break; - case DF_ViewKind_Disasm: {if(df_view_is_nil(disasm)) { needs_delete = 0; disasm = view;} }break; - case DF_ViewKind_Memory: {if(df_view_is_nil(memory)) { needs_delete = 0; memory = view;} }break; - case DF_ViewKind_GettingStarted:{if(df_view_is_nil(getting_started)) { needs_delete = 0; getting_started = view;} }break; - case DF_ViewKind_Text: + case RD_ViewKind_Watch: {if(rd_view_is_nil(watch)) { needs_delete = 0; watch = view;} }break; + case RD_ViewKind_Locals: {if(rd_view_is_nil(locals)) { needs_delete = 0; locals = view;} }break; + case RD_ViewKind_Registers: {if(rd_view_is_nil(regs)) { needs_delete = 0; regs = view;} }break; + case RD_ViewKind_Globals: {if(rd_view_is_nil(globals)) { needs_delete = 0; globals = view;} }break; + case RD_ViewKind_ThreadLocals: {if(rd_view_is_nil(tlocals)) { needs_delete = 0; tlocals = view;} }break; + case RD_ViewKind_Types: {if(rd_view_is_nil(types)) { needs_delete = 0; types = view;} }break; + case RD_ViewKind_Procedures: {if(rd_view_is_nil(procs)) { needs_delete = 0; procs = view;} }break; + case RD_ViewKind_CallStack: {if(rd_view_is_nil(callstack)) { needs_delete = 0; callstack = view;} }break; + case RD_ViewKind_Breakpoints: {if(rd_view_is_nil(breakpoints)) { needs_delete = 0; breakpoints = view;} }break; + case RD_ViewKind_WatchPins: {if(rd_view_is_nil(watch_pins)) { needs_delete = 0; watch_pins = view;} }break; + case RD_ViewKind_Output: {if(rd_view_is_nil(output)) { needs_delete = 0; output = view;} }break; + case RD_ViewKind_Targets: {if(rd_view_is_nil(targets)) { needs_delete = 0; targets = view;} }break; + case RD_ViewKind_Scheduler: {if(rd_view_is_nil(scheduler)) { needs_delete = 0; scheduler = view;} }break; + case RD_ViewKind_Modules: {if(rd_view_is_nil(modules)) { needs_delete = 0; modules = view;} }break; + case RD_ViewKind_Disasm: {if(rd_view_is_nil(disasm)) { needs_delete = 0; disasm = view;} }break; + case RD_ViewKind_Memory: {if(rd_view_is_nil(memory)) { needs_delete = 0; memory = view;} }break; + case RD_ViewKind_GettingStarted:{if(rd_view_is_nil(getting_started)) { needs_delete = 0; getting_started = view;} }break; + case RD_ViewKind_Text: { needs_delete = 0; - d_handle_list_push(scratch.arena, &code_views, df_handle_from_view(view)); + rd_handle_list_push(scratch.arena, &code_views, rd_handle_from_view(view)); }break; } if(!needs_delete) { - df_panel_remove_tab_view(panel, view); + rd_panel_remove_tab_view(panel, view); } } } //- rjf: close all panels/views - for(D_HandleNode *n = panels_to_close.first; n != 0; n = n->next) + for(RD_HandleNode *n = panels_to_close.first; n != 0; n = n->next) { - DF_Panel *panel = df_panel_from_handle(n->handle); + RD_Panel *panel = rd_panel_from_handle(n->handle); if(panel != ws->root_panel) { - df_panel_release(ws, panel); + rd_panel_release(ws, panel); } else { - df_panel_release_all_views(panel); - panel->first = panel->last = &df_nil_panel; + rd_panel_release_all_views(panel); + panel->first = panel->last = &rd_nil_panel; } } //- rjf: allocate any missing views - if(df_view_is_nil(watch)) + if(rd_view_is_nil(watch)) { - watch = df_view_alloc(); - df_view_equip_spec(watch, df_view_spec_from_kind(DF_ViewKind_Watch), str8_zero(), &md_nil_node); + watch = rd_view_alloc(); + rd_view_equip_spec(watch, rd_view_spec_from_kind(RD_ViewKind_Watch), str8_zero(), &md_nil_node); } - if(layout == Layout_Default && df_view_is_nil(locals)) + if(layout == Layout_Default && rd_view_is_nil(locals)) { - locals = df_view_alloc(); - df_view_equip_spec(locals, df_view_spec_from_kind(DF_ViewKind_Locals), str8_zero(), &md_nil_node); + locals = rd_view_alloc(); + rd_view_equip_spec(locals, rd_view_spec_from_kind(RD_ViewKind_Locals), str8_zero(), &md_nil_node); } - if(layout == Layout_Default && df_view_is_nil(regs)) + if(layout == Layout_Default && rd_view_is_nil(regs)) { - regs = df_view_alloc(); - df_view_equip_spec(regs, df_view_spec_from_kind(DF_ViewKind_Registers), str8_zero(), &md_nil_node); + regs = rd_view_alloc(); + rd_view_equip_spec(regs, rd_view_spec_from_kind(RD_ViewKind_Registers), str8_zero(), &md_nil_node); } - if(layout == Layout_Default && df_view_is_nil(globals)) + if(layout == Layout_Default && rd_view_is_nil(globals)) { - globals = df_view_alloc(); - df_view_equip_spec(globals, df_view_spec_from_kind(DF_ViewKind_Globals), str8_zero(), &md_nil_node); + globals = rd_view_alloc(); + rd_view_equip_spec(globals, rd_view_spec_from_kind(RD_ViewKind_Globals), str8_zero(), &md_nil_node); } - if(layout == Layout_Default && df_view_is_nil(tlocals)) + if(layout == Layout_Default && rd_view_is_nil(tlocals)) { - tlocals = df_view_alloc(); - df_view_equip_spec(tlocals, df_view_spec_from_kind(DF_ViewKind_ThreadLocals), str8_zero(), &md_nil_node); + tlocals = rd_view_alloc(); + rd_view_equip_spec(tlocals, rd_view_spec_from_kind(RD_ViewKind_ThreadLocals), str8_zero(), &md_nil_node); } - if(df_view_is_nil(types)) + if(rd_view_is_nil(types)) { - types = df_view_alloc(); - df_view_equip_spec(types, df_view_spec_from_kind(DF_ViewKind_Types), str8_zero(), &md_nil_node); + types = rd_view_alloc(); + rd_view_equip_spec(types, rd_view_spec_from_kind(RD_ViewKind_Types), str8_zero(), &md_nil_node); } - if(layout == Layout_Default && df_view_is_nil(procs)) + if(layout == Layout_Default && rd_view_is_nil(procs)) { - procs = df_view_alloc(); - df_view_equip_spec(procs, df_view_spec_from_kind(DF_ViewKind_Procedures), str8_zero(), &md_nil_node); + procs = rd_view_alloc(); + rd_view_equip_spec(procs, rd_view_spec_from_kind(RD_ViewKind_Procedures), str8_zero(), &md_nil_node); } - if(df_view_is_nil(callstack)) + if(rd_view_is_nil(callstack)) { - callstack = df_view_alloc(); - df_view_equip_spec(callstack, df_view_spec_from_kind(DF_ViewKind_CallStack), str8_zero(), &md_nil_node); + callstack = rd_view_alloc(); + rd_view_equip_spec(callstack, rd_view_spec_from_kind(RD_ViewKind_CallStack), str8_zero(), &md_nil_node); } - if(df_view_is_nil(breakpoints)) + if(rd_view_is_nil(breakpoints)) { - breakpoints = df_view_alloc(); - df_view_equip_spec(breakpoints, df_view_spec_from_kind(DF_ViewKind_Breakpoints), str8_zero(), &md_nil_node); + breakpoints = rd_view_alloc(); + rd_view_equip_spec(breakpoints, rd_view_spec_from_kind(RD_ViewKind_Breakpoints), str8_zero(), &md_nil_node); } - if(layout == Layout_Default && df_view_is_nil(watch_pins)) + if(layout == Layout_Default && rd_view_is_nil(watch_pins)) { - watch_pins = df_view_alloc(); - df_view_equip_spec(watch_pins, df_view_spec_from_kind(DF_ViewKind_WatchPins), str8_zero(), &md_nil_node); + watch_pins = rd_view_alloc(); + rd_view_equip_spec(watch_pins, rd_view_spec_from_kind(RD_ViewKind_WatchPins), str8_zero(), &md_nil_node); } - if(df_view_is_nil(output)) + if(rd_view_is_nil(output)) { - output = df_view_alloc(); - df_view_equip_spec(output, df_view_spec_from_kind(DF_ViewKind_Output), str8_zero(), &md_nil_node); + output = rd_view_alloc(); + rd_view_equip_spec(output, rd_view_spec_from_kind(RD_ViewKind_Output), str8_zero(), &md_nil_node); } - if(df_view_is_nil(targets)) + if(rd_view_is_nil(targets)) { - targets = df_view_alloc(); - df_view_equip_spec(targets, df_view_spec_from_kind(DF_ViewKind_Targets), str8_zero(), &md_nil_node); + targets = rd_view_alloc(); + rd_view_equip_spec(targets, rd_view_spec_from_kind(RD_ViewKind_Targets), str8_zero(), &md_nil_node); } - if(df_view_is_nil(scheduler)) + if(rd_view_is_nil(scheduler)) { - scheduler = df_view_alloc(); - df_view_equip_spec(scheduler, df_view_spec_from_kind(DF_ViewKind_Scheduler), str8_zero(), &md_nil_node); + scheduler = rd_view_alloc(); + rd_view_equip_spec(scheduler, rd_view_spec_from_kind(RD_ViewKind_Scheduler), str8_zero(), &md_nil_node); } - if(df_view_is_nil(modules)) + if(rd_view_is_nil(modules)) { - modules = df_view_alloc(); - df_view_equip_spec(modules, df_view_spec_from_kind(DF_ViewKind_Modules), str8_zero(), &md_nil_node); + modules = rd_view_alloc(); + rd_view_equip_spec(modules, rd_view_spec_from_kind(RD_ViewKind_Modules), str8_zero(), &md_nil_node); } - if(df_view_is_nil(disasm)) + if(rd_view_is_nil(disasm)) { - disasm = df_view_alloc(); - df_view_equip_spec(disasm, df_view_spec_from_kind(DF_ViewKind_Disasm), str8_zero(), &md_nil_node); + disasm = rd_view_alloc(); + rd_view_equip_spec(disasm, rd_view_spec_from_kind(RD_ViewKind_Disasm), str8_zero(), &md_nil_node); } - if(layout == Layout_Default && df_view_is_nil(memory)) + if(layout == Layout_Default && rd_view_is_nil(memory)) { - memory = df_view_alloc(); - df_view_equip_spec(memory, df_view_spec_from_kind(DF_ViewKind_Memory), str8_zero(), &md_nil_node); + memory = rd_view_alloc(); + rd_view_equip_spec(memory, rd_view_spec_from_kind(RD_ViewKind_Memory), str8_zero(), &md_nil_node); } - if(code_views.count == 0 && df_view_is_nil(getting_started)) + if(code_views.count == 0 && rd_view_is_nil(getting_started)) { - getting_started = df_view_alloc(); - df_view_equip_spec(getting_started, df_view_spec_from_kind(DF_ViewKind_GettingStarted), str8_zero(), &md_nil_node); + getting_started = rd_view_alloc(); + rd_view_equip_spec(getting_started, rd_view_spec_from_kind(RD_ViewKind_GettingStarted), str8_zero(), &md_nil_node); } //- rjf: apply layout @@ -12304,94 +12258,94 @@ df_frame(void) { // rjf: root split ws->root_panel->split_axis = Axis2_X; - DF_Panel *root_0 = df_panel_alloc(ws); - DF_Panel *root_1 = df_panel_alloc(ws); - df_panel_insert(ws->root_panel, ws->root_panel->last, root_0); - df_panel_insert(ws->root_panel, ws->root_panel->last, root_1); + RD_Panel *root_0 = rd_panel_alloc(ws); + RD_Panel *root_1 = rd_panel_alloc(ws); + rd_panel_insert(ws->root_panel, ws->root_panel->last, root_0); + rd_panel_insert(ws->root_panel, ws->root_panel->last, root_1); root_0->pct_of_parent = 0.85f; root_1->pct_of_parent = 0.15f; // rjf: root_0 split root_0->split_axis = Axis2_Y; - DF_Panel *root_0_0 = df_panel_alloc(ws); - DF_Panel *root_0_1 = df_panel_alloc(ws); - df_panel_insert(root_0, root_0->last, root_0_0); - df_panel_insert(root_0, root_0->last, root_0_1); + RD_Panel *root_0_0 = rd_panel_alloc(ws); + RD_Panel *root_0_1 = rd_panel_alloc(ws); + rd_panel_insert(root_0, root_0->last, root_0_0); + rd_panel_insert(root_0, root_0->last, root_0_1); root_0_0->pct_of_parent = 0.80f; root_0_1->pct_of_parent = 0.20f; // rjf: root_1 split root_1->split_axis = Axis2_Y; - DF_Panel *root_1_0 = df_panel_alloc(ws); - DF_Panel *root_1_1 = df_panel_alloc(ws); - df_panel_insert(root_1, root_1->last, root_1_0); - df_panel_insert(root_1, root_1->last, root_1_1); + RD_Panel *root_1_0 = rd_panel_alloc(ws); + RD_Panel *root_1_1 = rd_panel_alloc(ws); + rd_panel_insert(root_1, root_1->last, root_1_0); + rd_panel_insert(root_1, root_1->last, root_1_1); root_1_0->pct_of_parent = 0.50f; root_1_1->pct_of_parent = 0.50f; - df_panel_insert_tab_view(root_1_0, root_1_0->last_tab_view, targets); - df_panel_insert_tab_view(root_1_1, root_1_1->last_tab_view, scheduler); - root_1_0->selected_tab_view = df_handle_from_view(targets); - root_1_1->selected_tab_view = df_handle_from_view(scheduler); + rd_panel_insert_tab_view(root_1_0, root_1_0->last_tab_view, targets); + rd_panel_insert_tab_view(root_1_1, root_1_1->last_tab_view, scheduler); + root_1_0->selected_tab_view = rd_handle_from_view(targets); + root_1_1->selected_tab_view = rd_handle_from_view(scheduler); root_1_1->tab_side = Side_Max; // rjf: root_0_0 split root_0_0->split_axis = Axis2_X; - DF_Panel *root_0_0_0 = df_panel_alloc(ws); - DF_Panel *root_0_0_1 = df_panel_alloc(ws); - df_panel_insert(root_0_0, root_0_0->last, root_0_0_0); - df_panel_insert(root_0_0, root_0_0->last, root_0_0_1); + RD_Panel *root_0_0_0 = rd_panel_alloc(ws); + RD_Panel *root_0_0_1 = rd_panel_alloc(ws); + rd_panel_insert(root_0_0, root_0_0->last, root_0_0_0); + rd_panel_insert(root_0_0, root_0_0->last, root_0_0_1); root_0_0_0->pct_of_parent = 0.25f; root_0_0_1->pct_of_parent = 0.75f; // rjf: root_0_0_0 split root_0_0_0->split_axis = Axis2_Y; - DF_Panel *root_0_0_0_0 = df_panel_alloc(ws); - DF_Panel *root_0_0_0_1 = df_panel_alloc(ws); - df_panel_insert(root_0_0_0, root_0_0_0->last, root_0_0_0_0); - df_panel_insert(root_0_0_0, root_0_0_0->last, root_0_0_0_1); + RD_Panel *root_0_0_0_0 = rd_panel_alloc(ws); + RD_Panel *root_0_0_0_1 = rd_panel_alloc(ws); + rd_panel_insert(root_0_0_0, root_0_0_0->last, root_0_0_0_0); + rd_panel_insert(root_0_0_0, root_0_0_0->last, root_0_0_0_1); root_0_0_0_0->pct_of_parent = 0.5f; root_0_0_0_1->pct_of_parent = 0.5f; - df_panel_insert_tab_view(root_0_0_0_0, root_0_0_0_0->last_tab_view, disasm); - root_0_0_0_0->selected_tab_view = df_handle_from_view(disasm); - df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, breakpoints); - df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, watch_pins); - df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, output); - df_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, memory); - root_0_0_0_1->selected_tab_view = df_handle_from_view(output); + rd_panel_insert_tab_view(root_0_0_0_0, root_0_0_0_0->last_tab_view, disasm); + root_0_0_0_0->selected_tab_view = rd_handle_from_view(disasm); + rd_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, breakpoints); + rd_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, watch_pins); + rd_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, output); + rd_panel_insert_tab_view(root_0_0_0_1, root_0_0_0_1->last_tab_view, memory); + root_0_0_0_1->selected_tab_view = rd_handle_from_view(output); // rjf: root_0_1 split root_0_1->split_axis = Axis2_X; - DF_Panel *root_0_1_0 = df_panel_alloc(ws); - DF_Panel *root_0_1_1 = df_panel_alloc(ws); - df_panel_insert(root_0_1, root_0_1->last, root_0_1_0); - df_panel_insert(root_0_1, root_0_1->last, root_0_1_1); + RD_Panel *root_0_1_0 = rd_panel_alloc(ws); + RD_Panel *root_0_1_1 = rd_panel_alloc(ws); + rd_panel_insert(root_0_1, root_0_1->last, root_0_1_0); + rd_panel_insert(root_0_1, root_0_1->last, root_0_1_1); root_0_1_0->pct_of_parent = 0.60f; root_0_1_1->pct_of_parent = 0.40f; - df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, watch); - df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, locals); - df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, regs); - df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, globals); - df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, tlocals); - df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, types); - df_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, procs); - root_0_1_0->selected_tab_view = df_handle_from_view(watch); + rd_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, watch); + rd_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, locals); + rd_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, regs); + rd_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, globals); + rd_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, tlocals); + rd_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, types); + rd_panel_insert_tab_view(root_0_1_0, root_0_1_0->last_tab_view, procs); + root_0_1_0->selected_tab_view = rd_handle_from_view(watch); root_0_1_0->tab_side = Side_Max; - df_panel_insert_tab_view(root_0_1_1, root_0_1_1->last_tab_view, callstack); - df_panel_insert_tab_view(root_0_1_1, root_0_1_1->last_tab_view, modules); - root_0_1_1->selected_tab_view = df_handle_from_view(callstack); + rd_panel_insert_tab_view(root_0_1_1, root_0_1_1->last_tab_view, callstack); + rd_panel_insert_tab_view(root_0_1_1, root_0_1_1->last_tab_view, modules); + root_0_1_1->selected_tab_view = rd_handle_from_view(callstack); root_0_1_1->tab_side = Side_Max; // rjf: fill main panel with getting started, OR all collected code views - if(!df_view_is_nil(getting_started)) + if(!rd_view_is_nil(getting_started)) { - df_panel_insert_tab_view(root_0_0_1, root_0_0_1->last_tab_view, getting_started); + rd_panel_insert_tab_view(root_0_0_1, root_0_0_1->last_tab_view, getting_started); } - for(D_HandleNode *n = code_views.first; n != 0; n = n->next) + for(RD_HandleNode *n = code_views.first; n != 0; n = n->next) { - DF_View *view = df_view_from_handle(n->handle); - if(!df_view_is_nil(view)) + RD_View *view = rd_view_from_handle(n->handle); + if(!rd_view_is_nil(view)) { - df_panel_insert_tab_view(root_0_0_1, root_0_0_1->last_tab_view, view); + rd_panel_insert_tab_view(root_0_0_1, root_0_0_1->last_tab_view, view); } } @@ -12404,61 +12358,61 @@ df_frame(void) { // rjf: root split ws->root_panel->split_axis = Axis2_X; - DF_Panel *root_0 = df_panel_alloc(ws); - DF_Panel *root_1 = df_panel_alloc(ws); - df_panel_insert(ws->root_panel, ws->root_panel->last, root_0); - df_panel_insert(ws->root_panel, ws->root_panel->last, root_1); + RD_Panel *root_0 = rd_panel_alloc(ws); + RD_Panel *root_1 = rd_panel_alloc(ws); + rd_panel_insert(ws->root_panel, ws->root_panel->last, root_0); + rd_panel_insert(ws->root_panel, ws->root_panel->last, root_1); root_0->pct_of_parent = 0.25f; root_1->pct_of_parent = 0.75f; // rjf: root_0 split root_0->split_axis = Axis2_Y; - DF_Panel *root_0_0 = df_panel_alloc(ws); + RD_Panel *root_0_0 = rd_panel_alloc(ws); { - if(!df_view_is_nil(watch)) { df_panel_insert_tab_view(root_0_0, root_0_0->last_tab_view, watch); } - if(!df_view_is_nil(types)) { df_panel_insert_tab_view(root_0_0, root_0_0->last_tab_view, types); } - root_0_0->selected_tab_view = df_handle_from_view(watch); + if(!rd_view_is_nil(watch)) { rd_panel_insert_tab_view(root_0_0, root_0_0->last_tab_view, watch); } + if(!rd_view_is_nil(types)) { rd_panel_insert_tab_view(root_0_0, root_0_0->last_tab_view, types); } + root_0_0->selected_tab_view = rd_handle_from_view(watch); } - DF_Panel *root_0_1 = df_panel_alloc(ws); + RD_Panel *root_0_1 = rd_panel_alloc(ws); { - if(!df_view_is_nil(scheduler)) { df_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, scheduler); } - if(!df_view_is_nil(targets)) { df_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, targets); } - if(!df_view_is_nil(breakpoints)) { df_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, breakpoints); } - if(!df_view_is_nil(watch_pins)) { df_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, watch_pins); } - root_0_1->selected_tab_view = df_handle_from_view(scheduler); + if(!rd_view_is_nil(scheduler)) { rd_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, scheduler); } + if(!rd_view_is_nil(targets)) { rd_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, targets); } + if(!rd_view_is_nil(breakpoints)) { rd_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, breakpoints); } + if(!rd_view_is_nil(watch_pins)) { rd_panel_insert_tab_view(root_0_1, root_0_1->last_tab_view, watch_pins); } + root_0_1->selected_tab_view = rd_handle_from_view(scheduler); } - DF_Panel *root_0_2 = df_panel_alloc(ws); + RD_Panel *root_0_2 = rd_panel_alloc(ws); { - if(!df_view_is_nil(disasm)) { df_panel_insert_tab_view(root_0_2, root_0_2->last_tab_view, disasm); } - if(!df_view_is_nil(output)) { df_panel_insert_tab_view(root_0_2, root_0_2->last_tab_view, output); } - root_0_2->selected_tab_view = df_handle_from_view(disasm); + if(!rd_view_is_nil(disasm)) { rd_panel_insert_tab_view(root_0_2, root_0_2->last_tab_view, disasm); } + if(!rd_view_is_nil(output)) { rd_panel_insert_tab_view(root_0_2, root_0_2->last_tab_view, output); } + root_0_2->selected_tab_view = rd_handle_from_view(disasm); } - DF_Panel *root_0_3 = df_panel_alloc(ws); + RD_Panel *root_0_3 = rd_panel_alloc(ws); { - if(!df_view_is_nil(callstack)) { df_panel_insert_tab_view(root_0_3, root_0_3->last_tab_view, callstack); } - if(!df_view_is_nil(modules)) { df_panel_insert_tab_view(root_0_3, root_0_3->last_tab_view, modules); } - root_0_3->selected_tab_view = df_handle_from_view(callstack); + if(!rd_view_is_nil(callstack)) { rd_panel_insert_tab_view(root_0_3, root_0_3->last_tab_view, callstack); } + if(!rd_view_is_nil(modules)) { rd_panel_insert_tab_view(root_0_3, root_0_3->last_tab_view, modules); } + root_0_3->selected_tab_view = rd_handle_from_view(callstack); } - df_panel_insert(root_0, root_0->last, root_0_0); - df_panel_insert(root_0, root_0->last, root_0_1); - df_panel_insert(root_0, root_0->last, root_0_2); - df_panel_insert(root_0, root_0->last, root_0_3); + rd_panel_insert(root_0, root_0->last, root_0_0); + rd_panel_insert(root_0, root_0->last, root_0_1); + rd_panel_insert(root_0, root_0->last, root_0_2); + rd_panel_insert(root_0, root_0->last, root_0_3); root_0_0->pct_of_parent = 0.25f; root_0_1->pct_of_parent = 0.25f; root_0_2->pct_of_parent = 0.25f; root_0_3->pct_of_parent = 0.25f; // rjf: fill main panel with getting started, OR all collected code views - if(!df_view_is_nil(getting_started)) + if(!rd_view_is_nil(getting_started)) { - df_panel_insert_tab_view(root_1, root_1->last_tab_view, getting_started); + rd_panel_insert_tab_view(root_1, root_1->last_tab_view, getting_started); } - for(D_HandleNode *n = code_views.first; n != 0; n = n->next) + for(RD_HandleNode *n = code_views.first; n != 0; n = n->next) { - DF_View *view = df_view_from_handle(n->handle); - if(!df_view_is_nil(view)) + RD_View *view = rd_view_from_handle(n->handle); + if(!rd_view_is_nil(view)) { - df_panel_insert_tab_view(root_1, root_1->last_tab_view, view); + rd_panel_insert_tab_view(root_1, root_1->last_tab_view, view); } } @@ -12468,22 +12422,22 @@ df_frame(void) } // rjf: dispatch cfg saves - for(DF_CfgSrc src = (DF_CfgSrc)0; src < DF_CfgSrc_COUNT; src = (DF_CfgSrc)(src+1)) + for(RD_CfgSrc src = (RD_CfgSrc)0; src < RD_CfgSrc_COUNT; src = (RD_CfgSrc)(src+1)) { - DF_CmdKind write_cmd = d_cfg_src_write_cmd_kind_table[src]; - df_cmd(write_cmd, .file_path = df_cfg_path_from_src(src)); + RD_CmdKind write_cmd = rd_cfg_src_write_cmd_kind_table[src]; + rd_cmd(write_cmd, .file_path = rd_cfg_path_from_src(src)); } }break; //- rjf: thread finding - case DF_CmdKind_FindThread: - for(DF_Window *ws = df_state->first_window; ws != 0; ws = ws->next) + case RD_CmdKind_FindThread: + for(RD_Window *ws = rd_state->first_window; ws != 0; ws = ws->next) { DI_Scope *scope = di_scope_open(); - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); - U64 unwind_index = df_regs()->unwind_count; - U64 inline_depth = df_regs()->inline_depth; + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); + U64 unwind_index = rd_regs()->unwind_count; + U64 inline_depth = rd_regs()->inline_depth; if(thread->kind == CTRL_EntityKind_Thread) { // rjf: grab rip @@ -12518,7 +12472,7 @@ df_frame(void) B32 has_dbg_info = has_module && !dbgi_missing; if(!dbgi_pending && (has_line_info || has_module)) { - df_cmd(DF_CmdKind_FindCodeLocation, + rd_cmd(RD_CmdKind_FindCodeLocation, .file_path = line.file_path, .cursor = line.pt, .process = process->handle, @@ -12531,7 +12485,7 @@ df_frame(void) // rjf: snap to resolved address w/o line info if(!missing_rip && !dbgi_pending && !has_line_info && !has_module) { - df_cmd(DF_CmdKind_FindCodeLocation, + rd_cmd(RD_CmdKind_FindCodeLocation, .process = process->handle, .module = module->handle, .voff = rip_voff, @@ -12543,25 +12497,25 @@ df_frame(void) // rjf: retry on stopped, pending debug info if(!d_ctrl_targets_running() && (dbgi_pending || missing_rip)) { - df_cmd(DF_CmdKind_FindThread, .thread = thread->handle); + rd_cmd(RD_CmdKind_FindThread, .thread = thread->handle); } } di_scope_close(scope); }break; - case DF_CmdKind_FindSelectedThread: - for(DF_Window *ws = df_state->first_window; ws != 0; ws = ws->next) + case RD_CmdKind_FindSelectedThread: + for(RD_Window *ws = rd_state->first_window; ws != 0; ws = ws->next) { - CTRL_Entity *selected_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_base_regs()->thread); - df_cmd(DF_CmdKind_FindThread, + CTRL_Entity *selected_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_base_regs()->thread); + rd_cmd(RD_CmdKind_FindThread, .thread = selected_thread->handle, - .unwind_count = df_base_regs()->unwind_count, - .inline_depth = df_base_regs()->inline_depth); + .unwind_count = rd_base_regs()->unwind_count, + .inline_depth = rd_base_regs()->inline_depth); }break; //- rjf: name finding - case DF_CmdKind_GoToName: + case RD_CmdKind_GoToName: { - String8 name = df_regs()->string; + String8 name = rd_regs()->string; if(name.size != 0) { B32 name_resolved = 0; @@ -12587,10 +12541,10 @@ df_frame(void) // rjf: try to resolve name as a file #if 0 // TODO(rjf): @msgs - DF_Entity *file = &d_nil_entity; + RD_Entity *file = &d_nil_entity; if(name_resolved == 0) { - DF_Entity *src_entity = df_entity_from_handle(df_regs()->entity); + RD_Entity *src_entity = rd_entity_from_handle(rd_regs()->entity); String8 file_part_of_name = name; U64 quote_pos = str8_find_needle(name, 0, str8_lit("\""), 0); if(quote_pos < name.size) @@ -12609,32 +12563,32 @@ df_frame(void) if(folders.node_count != 0) { String8 first_folder_name = folders.first->string; - DF_Entity *root_folder = &d_nil_entity; + RD_Entity *root_folder = &d_nil_entity; // rjf: try to find root folder as if it's an absolute path - if(df_entity_is_nil(root_folder)) + if(rd_entity_is_nil(root_folder)) { root_folder = d_entity_from_path(first_folder_name, D_EntityFromPathFlag_OpenAsNeeded); } // rjf: try to find root folder as if it's a path we've already loaded - if(df_entity_is_nil(root_folder)) + if(rd_entity_is_nil(root_folder)) { - root_folder = df_entity_from_name_and_kind(first_folder_name, DF_EntityKind_File); + root_folder = rd_entity_from_name_and_kind(first_folder_name, RD_EntityKind_File); } // rjf: try to find root folder as if it's inside of a path we've already loaded - if(df_entity_is_nil(root_folder)) + if(rd_entity_is_nil(root_folder)) { - DF_EntityList all_files = d_query_cached_entity_list_with_kind(DF_EntityKind_File); - for(DF_EntityNode *n = all_files.first; n != 0; n = n->next) + RD_EntityList all_files = d_query_cached_entity_list_with_kind(RD_EntityKind_File); + for(RD_EntityNode *n = all_files.first; n != 0; n = n->next) { - if(n->entity->flags & DF_EntityFlag_IsFolder) + if(n->entity->flags & RD_EntityFlag_IsFolder) { - String8 n_entity_path = df_full_path_from_entity(scratch.arena, n->entity); + String8 n_entity_path = rd_full_path_from_entity(scratch.arena, n->entity); String8 estimated_full_path = push_str8f(scratch.arena, "%S/%S", n_entity_path, first_folder_name); root_folder = d_entity_from_path(estimated_full_path, D_EntityFromPathFlag_OpenAsNeeded); - if(!df_entity_is_nil(root_folder)) + if(!rd_entity_is_nil(root_folder)) { break; } @@ -12643,9 +12597,9 @@ df_frame(void) } // rjf: has root folder -> descend downwards - if(!df_entity_is_nil(root_folder)) + if(!rd_entity_is_nil(root_folder)) { - String8 root_folder_path = df_full_path_from_entity(scratch.arena, root_folder); + String8 root_folder_path = rd_full_path_from_entity(scratch.arena, root_folder); String8List full_file_path_parts = {0}; str8_list_push(scratch.arena, &full_file_path_parts, root_folder_path); for(String8Node *n = folders.first->next; n != 0; n = n->next) @@ -12661,19 +12615,19 @@ df_frame(void) } // rjf: no folders specified => just try the local folder, then try globally - else if(src_entity->kind == DF_EntityKind_File) + else if(src_entity->kind == RD_EntityKind_File) { - file = df_entity_from_name_and_kind(file_name, DF_EntityKind_File); - if(df_entity_is_nil(file)) + file = rd_entity_from_name_and_kind(file_name, RD_EntityKind_File); + if(rd_entity_is_nil(file)) { - String8 src_entity_full_path = df_full_path_from_entity(scratch.arena, src_entity); + String8 src_entity_full_path = rd_full_path_from_entity(scratch.arena, src_entity); String8 src_entity_folder = str8_chop_last_slash(src_entity_full_path); String8 estimated_full_path = push_str8f(scratch.arena, "%S/%S", src_entity_folder, file_name); file = d_entity_from_path(estimated_full_path, D_EntityFromPathFlag_All); } } } - name_resolved = !df_entity_is_nil(file) && !(file->flags & DF_EntityFlag_IsMissing) && !(file->flags & DF_EntityFlag_IsFolder); + name_resolved = !rd_entity_is_nil(file) && !(file->flags & RD_EntityFlag_IsMissing) && !(file->flags & RD_EntityFlag_IsFolder); } #endif @@ -12701,7 +12655,7 @@ df_frame(void) vaddr = module->vaddr_range.min + lines.first->v.voff_range.min; } } - df_cmd(DF_CmdKind_FindCodeLocation, + rd_cmd(RD_CmdKind_FindCodeLocation, .file_path = lines.first->v.file_path, .cursor = lines.first->v.pt, .process = process->handle, @@ -12712,42 +12666,42 @@ df_frame(void) // rjf: name resolved to a file #if 0 // TODO(rjf): @msgs - if(name_resolved != 0 && !df_entity_is_nil(file)) + if(name_resolved != 0 && !rd_entity_is_nil(file)) { - String8 path = df_full_path_from_entity(scratch.arena, file); + String8 path = rd_full_path_from_entity(scratch.arena, file); D_CmdParams p = *params; p.file_path = path; p.text_point = txt_pt(1, 1); - df_push_cmd(df_cmd_spec_from_kind(DF_CmdKind_FindCodeLocation), &p); + rd_push_cmd(rd_cmd_spec_from_kind(RD_CmdKind_FindCodeLocation), &p); } #endif } }break; //- rjf: editors - case DF_CmdKind_EditEntity: + case RD_CmdKind_EditEntity: { #if 0 // TODO(rjf): @msgs - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); switch(entity->kind) { default: break; - case DF_EntityKind_Target: + case RD_EntityKind_Target: { - df_push_cmd(df_cmd_spec_from_kind(DF_CmdKind_EditTarget), params); + rd_push_cmd(rd_cmd_spec_from_kind(RD_CmdKind_EditTarget), params); }break; } #endif }break; //- rjf: targets - case DF_CmdKind_EditTarget: + case RD_CmdKind_EditTarget: { #if 0 // TODO(rjf): @msgs - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); - if(!df_entity_is_nil(entity) && entity->kind == DF_EntityKind_Target) + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); + if(!rd_entity_is_nil(entity) && entity->kind == RD_EntityKind_Target) { - df_push_cmd(df_cmd_spec_from_kind(DF_CmdKind_Target), params); + rd_push_cmd(rd_cmd_spec_from_kind(RD_CmdKind_Target), params); } else { @@ -12757,45 +12711,45 @@ df_frame(void) }break; //- rjf: catchall general entity activation paths (drag/drop, clicking) - case DF_CmdKind_EntityRefFastPath: + case RD_CmdKind_EntityRefFastPath: { - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); switch(entity->kind) { default: { - df_cmd(DF_CmdKind_SpawnEntityView, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_SpawnEntityView, .entity = rd_handle_from_entity(entity)); }break; - case DF_EntityKind_Thread: + case RD_EntityKind_Thread: { - df_cmd(DF_CmdKind_SelectThread, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_SelectThread, .entity = rd_handle_from_entity(entity)); }break; - case DF_EntityKind_Target: + case RD_EntityKind_Target: { - df_cmd(DF_CmdKind_SelectTarget, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_SelectTarget, .entity = rd_handle_from_entity(entity)); }break; } }break; - case DF_CmdKind_SpawnEntityView: + case RD_CmdKind_SpawnEntityView: { #if 0 // TODO(rjf): @msgs - DF_Window *ws = df_window_from_handle(df_regs()->window); - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); switch(entity->kind) { default:{}break; - case DF_EntityKind_Target: + case RD_EntityKind_Target: { D_CmdParams params = df_cmd_params_from_panel(ws, panel); - params.entity = df_handle_from_entity(entity); - df_push_cmd(df_cmd_spec_from_kind(DF_CmdKind_EditTarget), ¶ms); + params.entity = rd_handle_from_entity(entity); + rd_push_cmd(rd_cmd_spec_from_kind(RD_CmdKind_EditTarget), ¶ms); }break; } #endif }break; - case DF_CmdKind_FindCodeLocation: + case RD_CmdKind_FindCodeLocation: { // NOTE(rjf): This command is where a lot of high-level flow things // in the debugger come together. It's that codepath that runs any @@ -12838,7 +12792,7 @@ df_frame(void) // the biggest empty panel. // 4. If there is no empty panel, then we will pick the biggest // panel. - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); // rjf: grab things to find. path * point, process * address, etc. String8 file_path = {0}; @@ -12847,11 +12801,11 @@ df_frame(void) CTRL_Entity *process = &ctrl_entity_nil; U64 vaddr = 0; { - file_path = df_regs()->file_path; - point = df_regs()->cursor; - thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); - process = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->process); - vaddr = df_regs()->vaddr; + file_path = rd_regs()->file_path; + point = rd_regs()->cursor; + thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); + process = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->process); + vaddr = rd_regs()->vaddr; } // rjf: given a src code location, if no vaddr is specified, @@ -12869,25 +12823,25 @@ df_frame(void) } // rjf: first, try to find panel/view pair that already has the src file open - DF_Panel *panel_w_this_src_code = &df_nil_panel; - DF_View *view_w_this_src_code = &df_nil_view; - for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) + RD_Panel *panel_w_this_src_code = &rd_nil_panel; + RD_View *view_w_this_src_code = &rd_nil_view; + for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next) { - if(!df_panel_is_nil(panel->first)) + if(!rd_panel_is_nil(panel->first)) { continue; } - for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->order_next) + for(RD_View *view = panel->first_tab_view; !rd_view_is_nil(view); view = view->order_next) { - if(df_view_is_project_filtered(view)) { continue; } - String8 view_file_path = d_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); - DF_ViewKind view_kind = df_view_kind_from_string(view->spec->info.name); - if((view_kind == DF_ViewKind_Text || view_kind == DF_ViewKind_PendingFile) && + if(rd_view_is_project_filtered(view)) { continue; } + String8 view_file_path = rd_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); + RD_ViewKind view_kind = rd_view_kind_from_string(view->spec->info.name); + if((view_kind == RD_ViewKind_Text || view_kind == RD_ViewKind_PendingFile) && path_match_normalized(view_file_path, file_path)) { panel_w_this_src_code = panel; view_w_this_src_code = view; - if(view == df_selected_tab_from_panel(panel)) + if(view == rd_selected_tab_from_panel(panel)) { break; } @@ -12896,18 +12850,18 @@ df_frame(void) } // rjf: find a panel that already has *any* code open - DF_Panel *panel_w_any_src_code = &df_nil_panel; - for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) + RD_Panel *panel_w_any_src_code = &rd_nil_panel; + for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next) { - if(!df_panel_is_nil(panel->first)) + if(!rd_panel_is_nil(panel->first)) { continue; } - for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->order_next) + for(RD_View *view = panel->first_tab_view; !rd_view_is_nil(view); view = view->order_next) { - if(df_view_is_project_filtered(view)) { continue; } - DF_ViewKind view_kind = df_view_kind_from_string(view->spec->info.name); - if(view_kind == DF_ViewKind_Text) + if(rd_view_is_project_filtered(view)) { continue; } + RD_ViewKind view_kind = rd_view_kind_from_string(view->spec->info.name); + if(view_kind == RD_ViewKind_Text) { panel_w_any_src_code = panel; break; @@ -12916,23 +12870,23 @@ df_frame(void) } // rjf: try to find panel/view pair that has disassembly open - DF_Panel *panel_w_disasm = &df_nil_panel; - DF_View *view_w_disasm = &df_nil_view; - for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) + RD_Panel *panel_w_disasm = &rd_nil_panel; + RD_View *view_w_disasm = &rd_nil_view; + for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next) { - if(!df_panel_is_nil(panel->first)) + if(!rd_panel_is_nil(panel->first)) { continue; } - for(DF_View *view = panel->first_tab_view; !df_view_is_nil(view); view = view->order_next) + for(RD_View *view = panel->first_tab_view; !rd_view_is_nil(view); view = view->order_next) { - if(df_view_is_project_filtered(view)) { continue; } - DF_ViewKind view_kind = df_view_kind_from_string(view->spec->info.name); - if(view_kind == DF_ViewKind_Disasm && view->query_string_size == 0) + if(rd_view_is_project_filtered(view)) { continue; } + RD_ViewKind view_kind = rd_view_kind_from_string(view->spec->info.name); + if(view_kind == RD_ViewKind_Disasm && view->query_string_size == 0) { panel_w_disasm = panel; view_w_disasm = view; - if(view == df_selected_tab_from_panel(panel)) + if(view == rd_selected_tab_from_panel(panel)) { break; } @@ -12941,17 +12895,17 @@ df_frame(void) } // rjf: find the biggest panel - DF_Panel *biggest_panel = &df_nil_panel; + RD_Panel *biggest_panel = &rd_nil_panel; { Rng2F32 root_rect = os_client_rect_from_window(ws->os); F32 best_panel_area = 0; - for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next) { - if(!df_panel_is_nil(panel->first)) + if(!rd_panel_is_nil(panel->first)) { continue; } - Rng2F32 panel_rect = df_target_rect_from_panel(root_rect, ws->root_panel, panel); + Rng2F32 panel_rect = rd_target_rect_from_panel(root_rect, ws->root_panel, panel); Vec2F32 panel_rect_dim = dim_2f32(panel_rect); F32 area = panel_rect_dim.x * panel_rect_dim.y; if((best_panel_area == 0 || area > best_panel_area)) @@ -12963,23 +12917,23 @@ df_frame(void) } // rjf: find the biggest empty panel - DF_Panel *biggest_empty_panel = &df_nil_panel; + RD_Panel *biggest_empty_panel = &rd_nil_panel; { Rng2F32 root_rect = os_client_rect_from_window(ws->os); F32 best_panel_area = 0; - for(DF_Panel *panel = ws->root_panel; !df_panel_is_nil(panel); panel = df_panel_rec_df_pre(panel).next) + for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next) { - if(!df_panel_is_nil(panel->first)) + if(!rd_panel_is_nil(panel->first)) { continue; } - Rng2F32 panel_rect = df_target_rect_from_panel(root_rect, ws->root_panel, panel); + Rng2F32 panel_rect = rd_target_rect_from_panel(root_rect, ws->root_panel, panel); Vec2F32 panel_rect_dim = dim_2f32(panel_rect); F32 area = panel_rect_dim.x * panel_rect_dim.y; B32 panel_is_empty = 1; - for(DF_View *v = panel->first_tab_view; !df_view_is_nil(v); v = v->order_next) + for(RD_View *v = panel->first_tab_view; !rd_view_is_nil(v); v = v->order_next) { - if(!df_view_is_project_filtered(v)) + if(!rd_view_is_project_filtered(v)) { panel_is_empty = 0; break; @@ -12995,43 +12949,43 @@ df_frame(void) // rjf: given the above, find source code location. B32 disasm_view_prioritized = 0; - DF_Panel *panel_used_for_src_code = &df_nil_panel; + RD_Panel *panel_used_for_src_code = &rd_nil_panel; if(file_path.size != 0) { // rjf: determine which panel we will use to find the code loc - DF_Panel *dst_panel = &df_nil_panel; + RD_Panel *dst_panel = &rd_nil_panel; { - if(df_panel_is_nil(dst_panel)) { dst_panel = panel_w_this_src_code; } - if(df_panel_is_nil(dst_panel)) { dst_panel = panel_w_any_src_code; } - if(df_panel_is_nil(dst_panel)) { dst_panel = biggest_empty_panel; } - if(df_panel_is_nil(dst_panel)) { dst_panel = biggest_panel; } + if(rd_panel_is_nil(dst_panel)) { dst_panel = panel_w_this_src_code; } + if(rd_panel_is_nil(dst_panel)) { dst_panel = panel_w_any_src_code; } + if(rd_panel_is_nil(dst_panel)) { dst_panel = biggest_empty_panel; } + if(rd_panel_is_nil(dst_panel)) { dst_panel = biggest_panel; } } // rjf: construct new view if needed - DF_View *dst_view = view_w_this_src_code; - if(!df_panel_is_nil(dst_panel) && df_view_is_nil(view_w_this_src_code)) + RD_View *dst_view = view_w_this_src_code; + if(!rd_panel_is_nil(dst_panel) && rd_view_is_nil(view_w_this_src_code)) { - DF_View *view = df_view_alloc(); - String8 file_path_query = d_eval_string_from_file_path(scratch.arena, file_path); - df_view_equip_spec(view, df_view_spec_from_kind(DF_ViewKind_Text), file_path_query, &md_nil_node); - df_panel_insert_tab_view(dst_panel, dst_panel->last_tab_view, view); + RD_View *view = rd_view_alloc(); + String8 file_path_query = rd_eval_string_from_file_path(scratch.arena, file_path); + rd_view_equip_spec(view, rd_view_spec_from_kind(RD_ViewKind_Text), file_path_query, &md_nil_node); + rd_panel_insert_tab_view(dst_panel, dst_panel->last_tab_view, view); dst_view = view; } // rjf: determine if we need a contain or center - DF_CmdKind cursor_snap_kind = DF_CmdKind_CenterCursor; - if(!df_panel_is_nil(dst_panel) && dst_view == view_w_this_src_code && df_selected_tab_from_panel(dst_panel) == dst_view) + RD_CmdKind cursor_snap_kind = RD_CmdKind_CenterCursor; + if(!rd_panel_is_nil(dst_panel) && dst_view == view_w_this_src_code && rd_selected_tab_from_panel(dst_panel) == dst_view) { - cursor_snap_kind = DF_CmdKind_ContainCursor; + cursor_snap_kind = RD_CmdKind_ContainCursor; } // rjf: move cursor & snap-to-cursor - if(!df_panel_is_nil(dst_panel)) + if(!rd_panel_is_nil(dst_panel)) { - disasm_view_prioritized = (df_selected_tab_from_panel(dst_panel) == view_w_disasm); - dst_panel->selected_tab_view = df_handle_from_view(dst_view); - df_cmd(DF_CmdKind_GoToLine, .cursor = point); - df_cmd(cursor_snap_kind); + disasm_view_prioritized = (rd_selected_tab_from_panel(dst_panel) == view_w_disasm); + dst_panel->selected_tab_view = rd_handle_from_view(dst_view); + rd_cmd(RD_CmdKind_GoToLine, .cursor = point); + rd_cmd(cursor_snap_kind); panel_used_for_src_code = dst_panel; } } @@ -13041,99 +12995,99 @@ df_frame(void) { // rjf: determine which panel we will use to find the disasm loc - // we *cannot* use the same panel we used for source code, if any. - DF_Panel *dst_panel = &df_nil_panel; + RD_Panel *dst_panel = &rd_nil_panel; { - if(df_panel_is_nil(dst_panel)) { dst_panel = panel_w_disasm; } - if(df_panel_is_nil(panel_used_for_src_code) && df_panel_is_nil(dst_panel)) { dst_panel = biggest_empty_panel; } - if(df_panel_is_nil(panel_used_for_src_code) && df_panel_is_nil(dst_panel)) { dst_panel = biggest_panel; } + if(rd_panel_is_nil(dst_panel)) { dst_panel = panel_w_disasm; } + if(rd_panel_is_nil(panel_used_for_src_code) && rd_panel_is_nil(dst_panel)) { dst_panel = biggest_empty_panel; } + if(rd_panel_is_nil(panel_used_for_src_code) && rd_panel_is_nil(dst_panel)) { dst_panel = biggest_panel; } if(dst_panel == panel_used_for_src_code && !disasm_view_prioritized) { - dst_panel = &df_nil_panel; + dst_panel = &rd_nil_panel; } } // rjf: construct new view if needed - DF_View *dst_view = view_w_disasm; - if(!df_panel_is_nil(dst_panel) && df_view_is_nil(view_w_disasm)) + RD_View *dst_view = view_w_disasm; + if(!rd_panel_is_nil(dst_panel) && rd_view_is_nil(view_w_disasm)) { - DF_View *view = df_view_alloc(); - df_view_equip_spec(view, df_view_spec_from_kind(DF_ViewKind_Disasm), str8_zero(), &md_nil_node); - df_panel_insert_tab_view(dst_panel, dst_panel->last_tab_view, view); + RD_View *view = rd_view_alloc(); + rd_view_equip_spec(view, rd_view_spec_from_kind(RD_ViewKind_Disasm), str8_zero(), &md_nil_node); + rd_panel_insert_tab_view(dst_panel, dst_panel->last_tab_view, view); dst_view = view; } // rjf: determine if we need a contain or center - DF_CmdKind cursor_snap_kind = DF_CmdKind_CenterCursor; - if(dst_view == view_w_disasm && df_selected_tab_from_panel(dst_panel) == dst_view) + RD_CmdKind cursor_snap_kind = RD_CmdKind_CenterCursor; + if(dst_view == view_w_disasm && rd_selected_tab_from_panel(dst_panel) == dst_view) { - cursor_snap_kind = DF_CmdKind_ContainCursor; + cursor_snap_kind = RD_CmdKind_ContainCursor; } // rjf: move cursor & snap-to-cursor - if(!df_panel_is_nil(dst_panel)) + if(!rd_panel_is_nil(dst_panel)) { - dst_panel->selected_tab_view = df_handle_from_view(dst_view); - df_cmd(DF_CmdKind_GoToAddress, .process = process->handle, .vaddr = vaddr); - df_cmd(cursor_snap_kind); + dst_panel->selected_tab_view = rd_handle_from_view(dst_view); + rd_cmd(RD_CmdKind_GoToAddress, .process = process->handle, .vaddr = vaddr); + rd_cmd(cursor_snap_kind); } } }break; //- rjf: filtering - case DF_CmdKind_Filter: + case RD_CmdKind_Filter: { - DF_View *view = df_view_from_handle(df_regs()->view); - DF_Panel *panel = df_panel_from_handle(df_regs()->panel); + RD_View *view = rd_view_from_handle(rd_regs()->view); + RD_Panel *panel = rd_panel_from_handle(rd_regs()->panel); B32 view_is_tab = 0; - for(DF_View *tab = panel->first_tab_view; !df_view_is_nil(tab); tab = tab->order_next) + for(RD_View *tab = panel->first_tab_view; !rd_view_is_nil(tab); tab = tab->order_next) { - if(df_view_is_project_filtered(tab)) { continue; } + if(rd_view_is_project_filtered(tab)) { continue; } if(tab == view) { view_is_tab = 1; break; } } - if(view_is_tab && view->spec->info.flags & DF_ViewSpecFlag_CanFilter) + if(view_is_tab && view->spec->info.flags & RD_ViewSpecFlag_CanFilter) { view->is_filtering ^= 1; view->query_cursor = txt_pt(1, 1+(S64)view->query_string_size); view->query_mark = txt_pt(1, 1); } }break; - case DF_CmdKind_ClearFilter: + case RD_CmdKind_ClearFilter: { - DF_View *view = df_view_from_handle(df_regs()->view); - if(!df_view_is_nil(view)) + RD_View *view = rd_view_from_handle(rd_regs()->view); + if(!rd_view_is_nil(view)) { view->query_string_size = 0; view->is_filtering = 0; view->query_cursor = view->query_mark = txt_pt(1, 1); } }break; - case DF_CmdKind_ApplyFilter: + case RD_CmdKind_ApplyFilter: { - DF_View *view = df_view_from_handle(df_regs()->view); - if(!df_view_is_nil(view)) + RD_View *view = rd_view_from_handle(rd_regs()->view); + if(!rd_view_is_nil(view)) { view->is_filtering = 0; } }break; //- rjf: query completion - case DF_CmdKind_CompleteQuery: + case RD_CmdKind_CompleteQuery: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); String8 query_cmd_name = ws->query_cmd_name; - DF_CmdKindInfo *info = df_cmd_kind_info_from_string(query_cmd_name); - DF_RegSlot slot = info->query.slot; + RD_CmdKindInfo *info = rd_cmd_kind_info_from_string(query_cmd_name); + RD_RegSlot slot = info->query.slot; // rjf: compound command parameters - if(slot != DF_RegSlot_Null && !(ws->query_cmd_regs_mask[slot/64] & (1ull<<(slot%64)))) + if(slot != RD_RegSlot_Null && !(ws->query_cmd_regs_mask[slot/64] & (1ull<<(slot%64)))) { - DF_Regs *regs_copy = df_regs_copy(ws->query_cmd_arena, df_regs()); - Rng1U64 offset_range_in_regs = df_reg_slot_range_table[slot]; + RD_Regs *regs_copy = rd_regs_copy(ws->query_cmd_arena, rd_regs()); + Rng1U64 offset_range_in_regs = rd_reg_slot_range_table[slot]; MemoryCopy((U8 *)(ws->query_cmd_regs) + offset_range_in_regs.min, (U8 *)(regs_copy) + offset_range_in_regs.min, dim_1u64(offset_range_in_regs)); @@ -13142,105 +13096,105 @@ df_frame(void) // rjf: determine if command is ready to run B32 command_ready = 1; - if(slot != DF_RegSlot_Null && !(ws->query_cmd_regs_mask[slot/64] & (1ull<<(slot%64)))) + if(slot != RD_RegSlot_Null && !(ws->query_cmd_regs_mask[slot/64] & (1ull<<(slot%64)))) { command_ready = 0; } // rjf: end this query - if(!(info->query.flags & DF_QueryFlag_KeepOldInput)) + if(!(info->query.flags & RD_QueryFlag_KeepOldInput)) { - df_cmd(DF_CmdKind_CancelQuery); + rd_cmd(RD_CmdKind_CancelQuery); } // rjf: push command if possible if(command_ready) { - df_push_cmd(ws->query_cmd_name, ws->query_cmd_regs); + rd_push_cmd(ws->query_cmd_name, ws->query_cmd_regs); } }break; - case DF_CmdKind_CancelQuery: + case RD_CmdKind_CancelQuery: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); arena_clear(ws->query_cmd_arena); MemoryZeroStruct(&ws->query_cmd_name); ws->query_cmd_regs = 0; MemoryZeroArray(ws->query_cmd_regs_mask); - for(DF_View *v = ws->query_view_stack_top, *next = 0; !df_view_is_nil(v); v = next) + for(RD_View *v = ws->query_view_stack_top, *next = 0; !rd_view_is_nil(v); v = next) { next = v->order_next; - df_view_release(v); + rd_view_release(v); } - ws->query_view_stack_top = &df_nil_view; + ws->query_view_stack_top = &rd_nil_view; }break; //- rjf: developer commands - case DF_CmdKind_ToggleDevMenu: + case RD_CmdKind_ToggleDevMenu: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); ws->dev_menu_is_open ^= 1; }break; //- rjf: general entity operations - case DF_CmdKind_EnableEntity: - case DF_CmdKind_EnableBreakpoint: - case DF_CmdKind_EnableTarget: + case RD_CmdKind_EnableEntity: + case RD_CmdKind_EnableBreakpoint: + case RD_CmdKind_EnableTarget: { - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); - df_entity_equip_disabled(entity, 0); + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); + rd_entity_equip_disabled(entity, 0); }break; - case DF_CmdKind_DisableEntity: - case DF_CmdKind_DisableBreakpoint: - case DF_CmdKind_DisableTarget: + case RD_CmdKind_DisableEntity: + case RD_CmdKind_DisableBreakpoint: + case RD_CmdKind_DisableTarget: { - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); - df_entity_equip_disabled(entity, 1); + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); + rd_entity_equip_disabled(entity, 1); }break; - case DF_CmdKind_RemoveEntity: - case DF_CmdKind_RemoveBreakpoint: - case DF_CmdKind_RemoveTarget: + case RD_CmdKind_RemoveEntity: + case RD_CmdKind_RemoveBreakpoint: + case RD_CmdKind_RemoveTarget: { - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); - DF_EntityKindFlags kind_flags = d_entity_kind_flags_table[entity->kind]; - if(kind_flags & DF_EntityKindFlag_CanDelete) + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); + RD_EntityKindFlags kind_flags = rd_entity_kind_flags_table[entity->kind]; + if(kind_flags & RD_EntityKindFlag_CanDelete) { - df_entity_mark_for_deletion(entity); + rd_entity_mark_for_deletion(entity); } }break; - case DF_CmdKind_NameEntity: + case RD_CmdKind_NameEntity: { - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); - String8 string = df_regs()->string; - df_entity_equip_name(entity, string); + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); + String8 string = rd_regs()->string; + rd_entity_equip_name(entity, string); }break; - case DF_CmdKind_DuplicateEntity: + case RD_CmdKind_DuplicateEntity: { - DF_Entity *src = df_entity_from_handle(df_regs()->entity); - if(!df_entity_is_nil(src)) + RD_Entity *src = rd_entity_from_handle(rd_regs()->entity); + if(!rd_entity_is_nil(src)) { typedef struct Task Task; struct Task { Task *next; - DF_Entity *src_n; - DF_Entity *dst_parent; + RD_Entity *src_n; + RD_Entity *dst_parent; }; Task starter_task = {0, src, src->parent}; Task *first_task = &starter_task; Task *last_task = &starter_task; for(Task *task = first_task; task != 0; task = task->next) { - DF_Entity *src_n = task->src_n; - DF_Entity *dst_n = df_entity_alloc(task->dst_parent, task->src_n->kind); - if(src_n->flags & DF_EntityFlag_HasTextPoint) {df_entity_equip_txt_pt(dst_n, src_n->text_point);} - if(src_n->flags & DF_EntityFlag_HasU64) {df_entity_equip_u64(dst_n, src_n->u64);} - if(src_n->flags & DF_EntityFlag_HasColor) {df_entity_equip_color_hsva(dst_n, df_hsva_from_entity(src_n));} - if(src_n->flags & DF_EntityFlag_HasVAddrRng) {df_entity_equip_vaddr_rng(dst_n, src_n->vaddr_rng);} - if(src_n->flags & DF_EntityFlag_HasVAddr) {df_entity_equip_vaddr(dst_n, src_n->vaddr);} - if(src_n->disabled) {df_entity_equip_disabled(dst_n, 1);} - if(src_n->string.size != 0) {df_entity_equip_name(dst_n, src_n->string);} + RD_Entity *src_n = task->src_n; + RD_Entity *dst_n = rd_entity_alloc(task->dst_parent, task->src_n->kind); + if(src_n->flags & RD_EntityFlag_HasTextPoint) {rd_entity_equip_txt_pt(dst_n, src_n->text_point);} + if(src_n->flags & RD_EntityFlag_HasU64) {rd_entity_equip_u64(dst_n, src_n->u64);} + if(src_n->flags & RD_EntityFlag_HasColor) {rd_entity_equip_color_hsva(dst_n, rd_hsva_from_entity(src_n));} + if(src_n->flags & RD_EntityFlag_HasVAddrRng) {rd_entity_equip_vaddr_rng(dst_n, src_n->vaddr_rng);} + if(src_n->flags & RD_EntityFlag_HasVAddr) {rd_entity_equip_vaddr(dst_n, src_n->vaddr);} + if(src_n->disabled) {rd_entity_equip_disabled(dst_n, 1);} + if(src_n->string.size != 0) {rd_entity_equip_name(dst_n, src_n->string);} dst_n->cfg_src = src_n->cfg_src; - for(DF_Entity *src_child = task->src_n->first; !df_entity_is_nil(src_child); src_child = src_child->next) + for(RD_Entity *src_child = task->src_n->first; !rd_entity_is_nil(src_child); src_child = src_child->next) { Task *child_task = push_array(scratch.arena, Task, 1); child_task->src_n = src_child; @@ -13250,51 +13204,51 @@ df_frame(void) } } }break; - case DF_CmdKind_RelocateEntity: + case RD_CmdKind_RelocateEntity: { - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); - DF_Entity *location = df_entity_child_from_kind(entity, DF_EntityKind_Location); - if(df_entity_is_nil(location)) + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); + RD_Entity *location = rd_entity_child_from_kind(entity, RD_EntityKind_Location); + if(rd_entity_is_nil(location)) { - location = df_entity_alloc(entity, DF_EntityKind_Location); + location = rd_entity_alloc(entity, RD_EntityKind_Location); } - location->flags &= ~DF_EntityFlag_HasTextPoint; - location->flags &= ~DF_EntityFlag_HasVAddr; - if(df_regs()->cursor.line != 0) + location->flags &= ~RD_EntityFlag_HasTextPoint; + location->flags &= ~RD_EntityFlag_HasVAddr; + if(rd_regs()->cursor.line != 0) { - df_entity_equip_txt_pt(location, df_regs()->cursor); + rd_entity_equip_txt_pt(location, rd_regs()->cursor); } - if(df_regs()->vaddr != 0) + if(rd_regs()->vaddr != 0) { - df_entity_equip_vaddr(location, df_regs()->vaddr); + rd_entity_equip_vaddr(location, rd_regs()->vaddr); } - if(df_regs()->file_path.size != 0) + if(rd_regs()->file_path.size != 0) { - df_entity_equip_name(location, df_regs()->file_path); + rd_entity_equip_name(location, rd_regs()->file_path); } }break; //- rjf: breakpoints - case DF_CmdKind_AddBreakpoint: - case DF_CmdKind_ToggleBreakpoint: + case RD_CmdKind_AddBreakpoint: + case RD_CmdKind_ToggleBreakpoint: { - String8 file_path = df_regs()->file_path; - TxtPt pt = df_regs()->cursor; - String8 string = df_regs()->string; - U64 vaddr = df_regs()->vaddr; + String8 file_path = rd_regs()->file_path; + TxtPt pt = rd_regs()->cursor; + String8 string = rd_regs()->string; + U64 vaddr = rd_regs()->vaddr; B32 removed_already_existing = 0; - if(kind == DF_CmdKind_ToggleBreakpoint) + if(kind == RD_CmdKind_ToggleBreakpoint) { - DF_EntityList bps = d_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - for(DF_EntityNode *n = bps.first; n != 0; n = n->next) + RD_EntityList bps = d_query_cached_entity_list_with_kind(RD_EntityKind_Breakpoint); + for(RD_EntityNode *n = bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(bp, DF_EntityKind_Location); - if((loc->flags & DF_EntityFlag_HasTextPoint && path_match_normalized(loc->string, file_path) && loc->text_point.line == pt.line) || - (loc->flags & DF_EntityFlag_HasVAddr && loc->vaddr == vaddr) || - (!(loc->flags & DF_EntityFlag_HasTextPoint) && str8_match(loc->string, string, 0))) + RD_Entity *bp = n->entity; + RD_Entity *loc = rd_entity_child_from_kind(bp, RD_EntityKind_Location); + if((loc->flags & RD_EntityFlag_HasTextPoint && path_match_normalized(loc->string, file_path) && loc->text_point.line == pt.line) || + (loc->flags & RD_EntityFlag_HasVAddr && loc->vaddr == vaddr) || + (!(loc->flags & RD_EntityFlag_HasTextPoint) && str8_match(loc->string, string, 0))) { - df_entity_mark_for_deletion(bp); + rd_entity_mark_for_deletion(bp); removed_already_existing = 1; break; } @@ -13302,51 +13256,51 @@ df_frame(void) } if(!removed_already_existing) { - DF_Entity *bp = df_entity_alloc(df_entity_root(), DF_EntityKind_Breakpoint); - df_entity_equip_cfg_src(bp, DF_CfgSrc_Project); - DF_Entity *loc = df_entity_alloc(bp, DF_EntityKind_Location); + RD_Entity *bp = rd_entity_alloc(rd_entity_root(), RD_EntityKind_Breakpoint); + rd_entity_equip_cfg_src(bp, RD_CfgSrc_Project); + RD_Entity *loc = rd_entity_alloc(bp, RD_EntityKind_Location); if(file_path.size != 0 && pt.line != 0) { - df_entity_equip_name(loc, file_path); - df_entity_equip_txt_pt(loc, pt); + rd_entity_equip_name(loc, file_path); + rd_entity_equip_txt_pt(loc, pt); } else if(string.size != 0) { - df_entity_equip_name(loc, string); + rd_entity_equip_name(loc, string); } else if(vaddr != 0) { - df_entity_equip_vaddr(loc, vaddr); + rd_entity_equip_vaddr(loc, vaddr); } } }break; - case DF_CmdKind_AddAddressBreakpoint: - case DF_CmdKind_AddFunctionBreakpoint: + case RD_CmdKind_AddAddressBreakpoint: + case RD_CmdKind_AddFunctionBreakpoint: { - df_cmd(DF_CmdKind_AddBreakpoint); + rd_cmd(RD_CmdKind_AddBreakpoint); }break; //- rjf: watch pins - case DF_CmdKind_AddWatchPin: - case DF_CmdKind_ToggleWatchPin: + case RD_CmdKind_AddWatchPin: + case RD_CmdKind_ToggleWatchPin: { - String8 file_path = df_regs()->file_path; - TxtPt pt = df_regs()->cursor; - String8 string = df_regs()->string; - U64 vaddr = df_regs()->vaddr; + String8 file_path = rd_regs()->file_path; + TxtPt pt = rd_regs()->cursor; + String8 string = rd_regs()->string; + U64 vaddr = rd_regs()->vaddr; B32 removed_already_existing = 0; - if(kind == DF_CmdKind_ToggleWatchPin) + if(kind == RD_CmdKind_ToggleWatchPin) { - DF_EntityList wps = d_query_cached_entity_list_with_kind(DF_EntityKind_WatchPin); - for(DF_EntityNode *n = wps.first; n != 0; n = n->next) + RD_EntityList wps = d_query_cached_entity_list_with_kind(RD_EntityKind_WatchPin); + for(RD_EntityNode *n = wps.first; n != 0; n = n->next) { - DF_Entity *wp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(wp, DF_EntityKind_Location); - if((loc->flags & DF_EntityFlag_HasTextPoint && path_match_normalized(loc->string, file_path) && loc->text_point.line == pt.line) || - (loc->flags & DF_EntityFlag_HasVAddr && loc->vaddr == vaddr) || - (!(loc->flags & DF_EntityFlag_HasTextPoint) && str8_match(loc->string, string, 0))) + RD_Entity *wp = n->entity; + RD_Entity *loc = rd_entity_child_from_kind(wp, RD_EntityKind_Location); + if((loc->flags & RD_EntityFlag_HasTextPoint && path_match_normalized(loc->string, file_path) && loc->text_point.line == pt.line) || + (loc->flags & RD_EntityFlag_HasVAddr && loc->vaddr == vaddr) || + (!(loc->flags & RD_EntityFlag_HasTextPoint) && str8_match(loc->string, string, 0))) { - df_entity_mark_for_deletion(wp); + rd_entity_mark_for_deletion(wp); removed_already_existing = 1; break; } @@ -13354,68 +13308,68 @@ df_frame(void) } if(!removed_already_existing) { - DF_Entity *wp = df_entity_alloc(df_entity_root(), DF_EntityKind_WatchPin); - df_entity_equip_name(wp, string); - df_entity_equip_cfg_src(wp, DF_CfgSrc_Project); - DF_Entity *loc = df_entity_alloc(wp, DF_EntityKind_Location); + RD_Entity *wp = rd_entity_alloc(rd_entity_root(), RD_EntityKind_WatchPin); + rd_entity_equip_name(wp, string); + rd_entity_equip_cfg_src(wp, RD_CfgSrc_Project); + RD_Entity *loc = rd_entity_alloc(wp, RD_EntityKind_Location); if(file_path.size != 0 && pt.line != 0) { - df_entity_equip_name(loc, file_path); - df_entity_equip_txt_pt(loc, pt); + rd_entity_equip_name(loc, file_path); + rd_entity_equip_txt_pt(loc, pt); } else if(vaddr != 0) { - df_entity_equip_vaddr(loc, vaddr); + rd_entity_equip_vaddr(loc, vaddr); } } }break; //- rjf: watches - case DF_CmdKind_ToggleWatchExpression: - if(df_regs()->string.size != 0) + case RD_CmdKind_ToggleWatchExpression: + if(rd_regs()->string.size != 0) { - DF_Entity *existing_watch = df_entity_from_name_and_kind(df_regs()->string, DF_EntityKind_Watch); - if(df_entity_is_nil(existing_watch)) + RD_Entity *existing_watch = rd_entity_from_name_and_kind(rd_regs()->string, RD_EntityKind_Watch); + if(rd_entity_is_nil(existing_watch)) { - DF_Entity *watch = &d_nil_entity; - watch = df_entity_alloc(df_entity_root(), DF_EntityKind_Watch); - df_entity_equip_cfg_src(watch, DF_CfgSrc_Project); - df_entity_equip_name(watch, df_regs()->string); + RD_Entity *watch = &d_nil_entity; + watch = rd_entity_alloc(rd_entity_root(), RD_EntityKind_Watch); + rd_entity_equip_cfg_src(watch, RD_CfgSrc_Project); + rd_entity_equip_name(watch, rd_regs()->string); } else { - df_entity_mark_for_deletion(existing_watch); + rd_entity_mark_for_deletion(existing_watch); } }break; //- rjf: cursor operations #if 0 // TODO(rjf): @msgs these should no longer be necessary; "at cursor" -> just run the command with whatever the registers have - case DF_CmdKind_ToggleBreakpointAtCursor: + case RD_CmdKind_ToggleBreakpointAtCursor: { - D_Regs *regs = df_regs(); + D_Regs *regs = rd_regs(); D_CmdParams p = d_cmd_params_zero(); p.file_path = regs->file_path; p.text_point = regs->cursor; p.vaddr = regs->vaddr_range.min; - df_push_cmd(df_cmd_spec_from_kind(DF_CmdKind_ToggleBreakpoint), &p); + rd_push_cmd(rd_cmd_spec_from_kind(RD_CmdKind_ToggleBreakpoint), &p); }break; - case DF_CmdKind_ToggleWatchPinAtCursor: + case RD_CmdKind_ToggleWatchPinAtCursor: { - D_Regs *regs = df_regs(); + D_Regs *regs = rd_regs(); D_CmdParams p = d_cmd_params_zero(); p.file_path = regs->file_path; p.text_point = regs->cursor; p.vaddr = regs->vaddr_range.min; - p.string = df_regs()->string; - df_push_cmd(df_cmd_spec_from_kind(DF_CmdKind_ToggleWatchPin), &p); + p.string = rd_regs()->string; + rd_push_cmd(rd_cmd_spec_from_kind(RD_CmdKind_ToggleWatchPin), &p); }break; #endif - case DF_CmdKind_GoToNameAtCursor: - case DF_CmdKind_ToggleWatchExpressionAtCursor: + case RD_CmdKind_GoToNameAtCursor: + case RD_CmdKind_ToggleWatchExpressionAtCursor: { HS_Scope *hs_scope = hs_scope_open(); TXT_Scope *txt_scope = txt_scope_open(); - DF_Regs *regs = df_regs(); + RD_Regs *regs = rd_regs(); U128 text_key = regs->text_key; TXT_LangKind lang_kind = regs->lang_kind; TxtRng range = txt_rng(regs->cursor, regs->mark); @@ -13432,32 +13386,32 @@ df_frame(void) expr_off_range = txt_expr_off_range_from_info_data_pt(&info, data, range.min); } String8 expr = str8_substr(data, expr_off_range); - df_cmd((kind == DF_CmdKind_GoToNameAtCursor ? DF_CmdKind_GoToName : - kind == DF_CmdKind_ToggleWatchExpressionAtCursor ? DF_CmdKind_ToggleWatchExpression : - DF_CmdKind_GoToName), + rd_cmd((kind == RD_CmdKind_GoToNameAtCursor ? RD_CmdKind_GoToName : + kind == RD_CmdKind_ToggleWatchExpressionAtCursor ? RD_CmdKind_ToggleWatchExpression : + RD_CmdKind_GoToName), .string = expr); txt_scope_close(txt_scope); hs_scope_close(hs_scope); }break; - case DF_CmdKind_RunToCursor: + case RD_CmdKind_RunToCursor: { - if(df_regs()->file_path.size != 0) + if(rd_regs()->file_path.size != 0) { - df_cmd(DF_CmdKind_RunToLine); + rd_cmd(RD_CmdKind_RunToLine); } else { - df_cmd(DF_CmdKind_RunToAddress); + rd_cmd(RD_CmdKind_RunToAddress); } }break; - case DF_CmdKind_SetNextStatement: + case RD_CmdKind_SetNextStatement: { - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); - String8 file_path = df_regs()->file_path; - U64 new_rip_vaddr = df_regs()->vaddr_range.min; + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); + String8 file_path = rd_regs()->file_path; + U64 new_rip_vaddr = rd_regs()->vaddr_range.min; if(file_path.size != 0) { - D_LineList *lines = &df_regs()->lines; + D_LineList *lines = &rd_regs()->lines; for(D_LineNode *n = lines->first; n != 0; n = n->next) { CTRL_EntityList modules = ctrl_modules_from_dbgi_key(scratch.arena, d_state->ctrl_entity_store, &n->v.dbgi_key); @@ -13473,46 +13427,46 @@ df_frame(void) }break; //- rjf: targets - case DF_CmdKind_AddTarget: + case RD_CmdKind_AddTarget: { // rjf: build target - DF_Entity *entity = &d_nil_entity; - entity = df_entity_alloc(df_entity_root(), DF_EntityKind_Target); - df_entity_equip_disabled(entity, 1); - df_entity_equip_cfg_src(entity, DF_CfgSrc_Project); - DF_Entity *exe = df_entity_alloc(entity, DF_EntityKind_Executable); - df_entity_equip_name(exe, df_regs()->file_path); - String8 working_dir = str8_chop_last_slash(df_regs()->file_path); + RD_Entity *entity = &d_nil_entity; + entity = rd_entity_alloc(rd_entity_root(), RD_EntityKind_Target); + rd_entity_equip_disabled(entity, 1); + rd_entity_equip_cfg_src(entity, RD_CfgSrc_Project); + RD_Entity *exe = rd_entity_alloc(entity, RD_EntityKind_Executable); + rd_entity_equip_name(exe, rd_regs()->file_path); + String8 working_dir = str8_chop_last_slash(rd_regs()->file_path); if(working_dir.size != 0) { String8 working_dir_path = push_str8f(scratch.arena, "%S/", working_dir); - DF_Entity *execution_path = df_entity_alloc(entity, DF_EntityKind_WorkingDirectory); - df_entity_equip_name(execution_path, working_dir_path); + RD_Entity *execution_path = rd_entity_alloc(entity, RD_EntityKind_WorkingDirectory); + rd_entity_equip_name(execution_path, working_dir_path); } - df_cmd(DF_CmdKind_EditTarget, .entity = df_handle_from_entity(entity)); - df_cmd(DF_CmdKind_SelectTarget, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_EditTarget, .entity = rd_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_SelectTarget, .entity = rd_handle_from_entity(entity)); }break; - case DF_CmdKind_SelectTarget: + case RD_CmdKind_SelectTarget: { - DF_Entity *entity = df_entity_from_handle(df_regs()->entity); - if(entity->kind == DF_EntityKind_Target) + RD_Entity *entity = rd_entity_from_handle(rd_regs()->entity); + if(entity->kind == RD_EntityKind_Target) { - DF_EntityList all_targets = d_query_cached_entity_list_with_kind(DF_EntityKind_Target); + RD_EntityList all_targets = d_query_cached_entity_list_with_kind(RD_EntityKind_Target); B32 is_selected = !entity->disabled; - for(DF_EntityNode *n = all_targets.first; n != 0; n = n->next) + for(RD_EntityNode *n = all_targets.first; n != 0; n = n->next) { - DF_Entity *target = n->entity; - df_entity_equip_disabled(target, 1); + RD_Entity *target = n->entity; + rd_entity_equip_disabled(target, 1); } if(!is_selected) { - df_entity_equip_disabled(entity, 0); + rd_entity_equip_disabled(entity, 0); } } }break; //- rjf: jit-debugger registration - case DF_CmdKind_RegisterAsJITDebugger: + case RD_CmdKind_RegisterAsJITDebugger: { #if OS_WINDOWS char filename_cstr[MAX_PATH] = {0}; @@ -13549,16 +13503,16 @@ df_frame(void) }break; //- rjf: developer commands - case DF_CmdKind_LogMarker: + case RD_CmdKind_LogMarker: { log_infof("\"#MARKER\""); }break; //- rjf: os event passthrough - case DF_CmdKind_OSEvent: + case RD_CmdKind_OSEvent: { - OS_Event *os_event = df_regs()->os_event; - DF_Window *ws = df_window_from_os_handle(os_event->window); + OS_Event *os_event = rd_regs()->os_event; + RD_Window *ws = rd_window_from_os_handle(os_event->window); if(os_event != 0 && ws != 0) { UI_Event ui_event = zero_struct; @@ -13588,50 +13542,50 @@ df_frame(void) }break; //- rjf: debug control context management operations - case DF_CmdKind_SelectThread: + case RD_CmdKind_SelectThread: { - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); CTRL_Entity *module = ctrl_module_from_process_vaddr(process, ctrl_query_cached_rip_from_thread(d_state->ctrl_entity_store, thread->handle)); CTRL_Entity *machine = ctrl_entity_ancestor_from_kind(process, CTRL_EntityKind_Machine); - df_state->base_regs.v.unwind_count = 0; - df_state->base_regs.v.inline_depth = 0; - df_state->base_regs.v.thread = thread->handle; - df_state->base_regs.v.module = module->handle; - df_state->base_regs.v.process = process->handle; - df_state->base_regs.v.machine = machine->handle; - df_cmd(DF_CmdKind_FindThread, .thread = thread->handle); + rd_state->base_regs.v.unwind_count = 0; + rd_state->base_regs.v.inline_depth = 0; + rd_state->base_regs.v.thread = thread->handle; + rd_state->base_regs.v.module = module->handle; + rd_state->base_regs.v.process = process->handle; + rd_state->base_regs.v.machine = machine->handle; + rd_cmd(RD_CmdKind_FindThread, .thread = thread->handle); }break; - case DF_CmdKind_SelectUnwind: + case RD_CmdKind_SelectUnwind: { DI_Scope *di_scope = di_scope_open(); - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_base_regs()->thread); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_base_regs()->thread); CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); CTRL_Unwind base_unwind = d_query_cached_unwind_from_thread(thread); D_Unwind rich_unwind = d_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); - if(df_regs()->unwind_count < rich_unwind.frames.concrete_frame_count) + if(rd_regs()->unwind_count < rich_unwind.frames.concrete_frame_count) { - D_UnwindFrame *frame = &rich_unwind.frames.v[df_regs()->unwind_count]; - df_state->base_regs.v.unwind_count = df_regs()->unwind_count; - df_state->base_regs.v.inline_depth = 0; - if(df_regs()->inline_depth <= frame->inline_frame_count) + D_UnwindFrame *frame = &rich_unwind.frames.v[rd_regs()->unwind_count]; + rd_state->base_regs.v.unwind_count = rd_regs()->unwind_count; + rd_state->base_regs.v.inline_depth = 0; + if(rd_regs()->inline_depth <= frame->inline_frame_count) { - df_state->base_regs.v.inline_depth = df_regs()->inline_depth; + rd_state->base_regs.v.inline_depth = rd_regs()->inline_depth; } } - df_cmd(DF_CmdKind_FindThread, .thread = thread->handle); + rd_cmd(RD_CmdKind_FindThread, .thread = thread->handle); di_scope_close(di_scope); }break; - case DF_CmdKind_UpOneFrame: - case DF_CmdKind_DownOneFrame: + case RD_CmdKind_UpOneFrame: + case RD_CmdKind_DownOneFrame: { DI_Scope *di_scope = di_scope_open(); - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_base_regs()->thread); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_base_regs()->thread); CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); CTRL_Unwind base_unwind = d_query_cached_unwind_from_thread(thread); D_Unwind rich_unwind = d_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); - U64 crnt_unwind_idx = df_state->base_regs.v.unwind_count; - U64 crnt_inline_dpt = df_state->base_regs.v.inline_depth; + U64 crnt_unwind_idx = rd_state->base_regs.v.unwind_count; + U64 crnt_inline_dpt = rd_state->base_regs.v.inline_depth; U64 next_unwind_idx = crnt_unwind_idx; U64 next_inline_dpt = crnt_inline_dpt; if(crnt_unwind_idx < rich_unwind.frames.concrete_frame_count) @@ -13640,7 +13594,7 @@ df_frame(void) switch(kind) { default:{}break; - case DF_CmdKind_UpOneFrame: + case RD_CmdKind_UpOneFrame: { if(crnt_inline_dpt < f->inline_frame_count) { @@ -13652,7 +13606,7 @@ df_frame(void) next_inline_dpt = 0; } }break; - case DF_CmdKind_DownOneFrame: + case RD_CmdKind_DownOneFrame: { if(crnt_inline_dpt > 0) { @@ -13666,32 +13620,32 @@ df_frame(void) }break; } } - df_cmd(DF_CmdKind_SelectUnwind, + rd_cmd(RD_CmdKind_SelectUnwind, .unwind_count = next_unwind_idx, .inline_depth = next_inline_dpt); di_scope_close(di_scope); }break; //- rjf: meta controls - case DF_CmdKind_Edit: + case RD_CmdKind_Edit: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Press; evt.slot = UI_EventActionSlot_Edit; ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_Accept: + case RD_CmdKind_Accept: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Press; evt.slot = UI_EventActionSlot_Accept; ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_Cancel: + case RD_CmdKind_Cancel: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Press; evt.slot = UI_EventActionSlot_Cancel; @@ -13704,9 +13658,9 @@ df_frame(void) // can be used by the UI build phase for navigation and stuff, as well // as builder codepaths that want to use these controls to modify text. // - case DF_CmdKind_MoveLeft: + case RD_CmdKind_MoveLeft: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_PickSelectSide|UI_EventFlag_ZeroDeltaOnSelect|UI_EventFlag_ExplicitDirectional; @@ -13714,9 +13668,9 @@ df_frame(void) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveRight: + case RD_CmdKind_MoveRight: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_PickSelectSide|UI_EventFlag_ZeroDeltaOnSelect|UI_EventFlag_ExplicitDirectional; @@ -13724,9 +13678,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveUp: + case RD_CmdKind_MoveUp: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_ExplicitDirectional; @@ -13734,9 +13688,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveDown: + case RD_CmdKind_MoveDown: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_ExplicitDirectional; @@ -13744,9 +13698,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveLeftSelect: + case RD_CmdKind_MoveLeftSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional; @@ -13754,9 +13708,9 @@ df_frame(void) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveRightSelect: + case RD_CmdKind_MoveRightSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional; @@ -13764,9 +13718,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveUpSelect: + case RD_CmdKind_MoveUpSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional; @@ -13774,9 +13728,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveDownSelect: + case RD_CmdKind_MoveDownSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional; @@ -13784,9 +13738,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveLeftChunk: + case RD_CmdKind_MoveLeftChunk: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_ExplicitDirectional; @@ -13794,9 +13748,9 @@ df_frame(void) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveRightChunk: + case RD_CmdKind_MoveRightChunk: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_ExplicitDirectional; @@ -13804,9 +13758,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveUpChunk: + case RD_CmdKind_MoveUpChunk: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_ExplicitDirectional; @@ -13814,9 +13768,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveDownChunk: + case RD_CmdKind_MoveDownChunk: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_ExplicitDirectional; @@ -13824,45 +13778,45 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveUpPage: + case RD_CmdKind_MoveUpPage: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.delta_unit = UI_EventDeltaUnit_Page; evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveDownPage: + case RD_CmdKind_MoveDownPage: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.delta_unit = UI_EventDeltaUnit_Page; evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveUpWhole: + case RD_CmdKind_MoveUpWhole: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.delta_unit = UI_EventDeltaUnit_Whole; evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveDownWhole: + case RD_CmdKind_MoveDownWhole: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.delta_unit = UI_EventDeltaUnit_Whole; evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveLeftChunkSelect: + case RD_CmdKind_MoveLeftChunkSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional; @@ -13870,9 +13824,9 @@ df_frame(void) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveRightChunkSelect: + case RD_CmdKind_MoveRightChunkSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional; @@ -13880,9 +13834,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveUpChunkSelect: + case RD_CmdKind_MoveUpChunkSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional; @@ -13890,9 +13844,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveDownChunkSelect: + case RD_CmdKind_MoveDownChunkSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark|UI_EventFlag_ExplicitDirectional; @@ -13900,9 +13854,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveUpPageSelect: + case RD_CmdKind_MoveUpPageSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark; @@ -13910,9 +13864,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveDownPageSelect: + case RD_CmdKind_MoveDownPageSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark; @@ -13920,9 +13874,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveUpWholeSelect: + case RD_CmdKind_MoveUpWholeSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark; @@ -13930,9 +13884,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveDownWholeSelect: + case RD_CmdKind_MoveDownWholeSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark; @@ -13940,9 +13894,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveUpReorder: + case RD_CmdKind_MoveUpReorder: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_Reorder; @@ -13950,9 +13904,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, -1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveDownReorder: + case RD_CmdKind_MoveDownReorder: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_Reorder; @@ -13960,27 +13914,27 @@ df_frame(void) evt.delta_2s32 = v2s32(+0, +1); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveHome: + case RD_CmdKind_MoveHome: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.delta_unit = UI_EventDeltaUnit_Line; evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveEnd: + case RD_CmdKind_MoveEnd: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.delta_unit = UI_EventDeltaUnit_Line; evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveHomeSelect: + case RD_CmdKind_MoveHomeSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark; @@ -13988,9 +13942,9 @@ df_frame(void) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_MoveEndSelect: + case RD_CmdKind_MoveEndSelect: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Navigate; evt.flags = UI_EventFlag_KeepMark; @@ -13998,9 +13952,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_SelectAll: + case RD_CmdKind_SelectAll: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt1 = zero_struct; evt1.kind = UI_EventKind_Navigate; evt1.delta_unit = UI_EventDeltaUnit_Whole; @@ -14013,9 +13967,9 @@ df_frame(void) evt2.delta_2s32 = v2s32(+1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt2); }break; - case DF_CmdKind_DeleteSingle: + case RD_CmdKind_DeleteSingle: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; evt.flags = UI_EventFlag_Delete; @@ -14023,9 +13977,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_DeleteChunk: + case RD_CmdKind_DeleteChunk: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; evt.flags = UI_EventFlag_Delete; @@ -14033,9 +13987,9 @@ df_frame(void) evt.delta_2s32 = v2s32(+1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_BackspaceSingle: + case RD_CmdKind_BackspaceSingle: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; evt.flags = UI_EventFlag_Delete|UI_EventFlag_ZeroDeltaOnSelect; @@ -14043,9 +13997,9 @@ df_frame(void) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_BackspaceChunk: + case RD_CmdKind_BackspaceChunk: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; evt.flags = UI_EventFlag_Delete; @@ -14053,36 +14007,36 @@ df_frame(void) evt.delta_2s32 = v2s32(-1, +0); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_Copy: + case RD_CmdKind_Copy: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; evt.flags = UI_EventFlag_Copy|UI_EventFlag_KeepMark; ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_Cut: + case RD_CmdKind_Cut: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Edit; evt.flags = UI_EventFlag_Copy|UI_EventFlag_Delete; ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_Paste: + case RD_CmdKind_Paste: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Text; evt.string = os_get_clipboard_text(scratch.arena); ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; - case DF_CmdKind_InsertText: + case RD_CmdKind_InsertText: { - DF_Window *ws = df_window_from_handle(df_regs()->window); + RD_Window *ws = rd_window_from_handle(rd_regs()->window); UI_Event evt = zero_struct; evt.kind = UI_EventKind_Text; - evt.string = df_regs()->string; + evt.string = rd_regs()->string; ui_event_list_push(scratch.arena, &ws->ui_events, &evt); }break; } @@ -14093,8 +14047,8 @@ df_frame(void) //- rjf: clear commands // { - arena_clear(df_state->cmds_arena); - MemoryZeroStruct(&df_state->cmds); + arena_clear(rd_state->cmds_arena); + MemoryZeroStruct(&rd_state->cmds); } ////////////////////////////// @@ -14102,17 +14056,17 @@ df_frame(void) // D_TargetArray targets = {0}; { - DF_EntityList target_entities = d_query_cached_entity_list_with_kind(DF_EntityKind_Target); + RD_EntityList target_entities = d_query_cached_entity_list_with_kind(RD_EntityKind_Target); targets.count = target_entities.count; targets.v = push_array(scratch.arena, D_Target, targets.count); U64 idx = 0; - for(DF_EntityNode *n = target_entities.first; n != 0; n = n->next, idx += 1) + for(RD_EntityNode *n = target_entities.first; n != 0; n = n->next, idx += 1) { - DF_Entity *src_target = n->entity; - DF_Entity *src_target_exe = df_entity_child_from_kind(src_target, DF_EntityKind_Executable); - DF_Entity *src_target_args = df_entity_child_from_kind(src_target, DF_EntityKind_Arguments); - DF_Entity *src_target_wdir = df_entity_child_from_kind(src_target, DF_EntityKind_WorkingDirectory); - DF_Entity *src_target_entry = df_entity_child_from_kind(src_target, DF_EntityKind_EntryPoint); + RD_Entity *src_target = n->entity; + RD_Entity *src_target_exe = rd_entity_child_from_kind(src_target, RD_EntityKind_Executable); + RD_Entity *src_target_args = rd_entity_child_from_kind(src_target, RD_EntityKind_Arguments); + RD_Entity *src_target_wdir = rd_entity_child_from_kind(src_target, RD_EntityKind_WorkingDirectory); + RD_Entity *src_target_entry = rd_entity_child_from_kind(src_target, RD_EntityKind_EntryPoint); D_Target *dst_target = &targets.v[idx]; dst_target->exe = src_target_exe->string; dst_target->args = src_target_args->string; @@ -14126,20 +14080,20 @@ df_frame(void) // D_BreakpointArray breakpoints = {0}; { - DF_EntityList bp_entities = d_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); + RD_EntityList bp_entities = d_query_cached_entity_list_with_kind(RD_EntityKind_Breakpoint); breakpoints.count = bp_entities.count; breakpoints.v = push_array(scratch.arena, D_Breakpoint, breakpoints.count); U64 idx = 0; - for(DF_EntityNode *n = bp_entities.first; n != 0; n = n->next) + for(RD_EntityNode *n = bp_entities.first; n != 0; n = n->next) { - DF_Entity *src_bp = n->entity; + RD_Entity *src_bp = n->entity; if(src_bp->disabled) { breakpoints.count -= 1; continue; } - DF_Entity *src_bp_loc = df_entity_child_from_kind(src_bp, DF_EntityKind_Location); - DF_Entity *src_bp_cnd = df_entity_child_from_kind(src_bp, DF_EntityKind_Condition); + RD_Entity *src_bp_loc = rd_entity_child_from_kind(src_bp, RD_EntityKind_Location); + RD_Entity *src_bp_cnd = rd_entity_child_from_kind(src_bp, RD_EntityKind_Condition); D_Breakpoint *dst_bp = &breakpoints.v[idx]; dst_bp->file_path = src_bp_loc->string; dst_bp->pt = src_bp_loc->text_point; @@ -14174,9 +14128,9 @@ df_frame(void) ////////////////////////////// //- rjf: no selected thread? -> try to snap to any existing thread // - if(ctrl_entity_from_handle(d_state->ctrl_entity_store, df_base_regs()->thread) == &ctrl_entity_nil) + if(ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_base_regs()->thread) == &ctrl_entity_nil) { - CTRL_Entity *process = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_base_regs()->process); + CTRL_Entity *process = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_base_regs()->process); if(process == &ctrl_entity_nil) { CTRL_EntityList all_processes = ctrl_entity_list_from_kind(d_state->ctrl_entity_store, CTRL_EntityKind_Process); @@ -14188,7 +14142,7 @@ df_frame(void) CTRL_Entity *new_thread = ctrl_entity_child_from_kind(process, CTRL_EntityKind_Thread); if(new_thread != &ctrl_entity_nil) { - df_cmd(DF_CmdKind_SelectThread, .thread = new_thread->handle); + rd_cmd(RD_CmdKind_SelectThread, .thread = new_thread->handle); } } @@ -14213,25 +14167,25 @@ df_frame(void) // rjf: valid stop thread? -> select & snap if(thread != &ctrl_entity_nil) { - df_cmd(DF_CmdKind_SelectThread, .thread = thread->handle); - df_cmd(DF_CmdKind_FindThread, .thread = thread->handle); + rd_cmd(RD_CmdKind_SelectThread, .thread = thread->handle); + rd_cmd(RD_CmdKind_FindThread, .thread = thread->handle); } // rjf: no stop-causing thread, but have selected thread? -> snap to selected - CTRL_Entity *selected_thread = &ctrl_entity_nil; // TODO(rjf): ctrl_entity_from_handle(d_state->ctrl_entity_store, df_base_regs()->thread); + CTRL_Entity *selected_thread = &ctrl_entity_nil; // TODO(rjf): ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_base_regs()->thread); if(thread == &ctrl_entity_nil && selected_thread != &ctrl_entity_nil) { - df_cmd(DF_CmdKind_FindThread); + rd_cmd(RD_CmdKind_FindThread); } // rjf: increment breakpoint hit counts if(evt->cause == D_EventCause_UserBreakpoint) { - DF_EntityList user_bps = d_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - for(DF_EntityNode *n = user_bps.first; n != 0; n = n->next) + RD_EntityList user_bps = d_query_cached_entity_list_with_kind(RD_EntityKind_Breakpoint); + for(RD_EntityNode *n = user_bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(bp, DF_EntityKind_Location); + RD_Entity *bp = n->entity; + RD_Entity *loc = rd_entity_child_from_kind(bp, RD_EntityKind_Location); D_LineList loc_lines = d_lines_from_file_path_line_num(scratch.arena, loc->string, loc->text_point.line); if(loc_lines.first != 0) { @@ -14244,7 +14198,7 @@ df_frame(void) } } } - else if(loc->flags & DF_EntityFlag_HasVAddr && vaddr == loc->vaddr) + else if(loc->flags & RD_EntityFlag_HasVAddr && vaddr == loc->vaddr) { bp->u64 += 1; } @@ -14266,12 +14220,12 @@ df_frame(void) //- rjf: animate confirmation // { - F32 rate = df_setting_val_from_code(DF_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-10.f * df_state->frame_dt)) : 1.f; - B32 confirm_open = df_state->confirm_active; - df_state->confirm_t += rate * ((F32)!!confirm_open-df_state->confirm_t); - if(abs_f32(df_state->confirm_t - (F32)!!confirm_open) > 0.005f) + F32 rate = rd_setting_val_from_code(RD_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-10.f * rd_state->frame_dt)) : 1.f; + B32 confirm_open = rd_state->confirm_active; + rd_state->confirm_t += rate * ((F32)!!confirm_open-rd_state->confirm_t); + if(abs_f32(rd_state->confirm_t - (F32)!!confirm_open) > 0.005f) { - df_request_frame(); + rd_request_frame(); } } @@ -14279,19 +14233,19 @@ df_frame(void) //- rjf: animate theme // { - DF_Theme *current = &df_state->cfg_theme; - DF_Theme *target = &df_state->cfg_theme_target; - F32 rate = 1 - pow_f32(2, (-50.f * df_state->frame_dt)); - for(DF_ThemeColor color = DF_ThemeColor_Null; - color < DF_ThemeColor_COUNT; - color = (DF_ThemeColor)(color+1)) + RD_Theme *current = &rd_state->cfg_theme; + RD_Theme *target = &rd_state->cfg_theme_target; + F32 rate = 1 - pow_f32(2, (-50.f * rd_state->frame_dt)); + for(RD_ThemeColor color = RD_ThemeColor_Null; + color < RD_ThemeColor_COUNT; + color = (RD_ThemeColor)(color+1)) { if(abs_f32(target->colors[color].x - current->colors[color].x) > 0.01f || abs_f32(target->colors[color].y - current->colors[color].y) > 0.01f || abs_f32(target->colors[color].z - current->colors[color].z) > 0.01f || abs_f32(target->colors[color].w - current->colors[color].w) > 0.01f) { - df_request_frame(); + rd_request_frame(); } current->colors[color].x += (target->colors[color].x - current->colors[color].x) * rate; current->colors[color].y += (target->colors[color].y - current->colors[color].y) * rate; @@ -14304,14 +14258,14 @@ df_frame(void) //- rjf: animate alive-transitions for entities // { - F32 rate = 1.f - pow_f32(2.f, -20.f*df_state->frame_dt); - for(DF_Entity *e = df_entity_root(); !df_entity_is_nil(e); e = df_entity_rec_depth_first_pre(e, df_entity_root()).next) + F32 rate = 1.f - pow_f32(2.f, -20.f*rd_state->frame_dt); + for(RD_Entity *e = rd_entity_root(); !rd_entity_is_nil(e); e = rd_entity_rec_depth_first_pre(e, rd_entity_root()).next) { F32 diff = (1.f - e->alive_t); e->alive_t += diff * rate; if(diff >= 0.01f) { - df_request_frame(); + rd_request_frame(); } } } @@ -14321,14 +14275,14 @@ df_frame(void) // if(ProfIsCapturing() || DEV_telemetry_capture) { - df_request_frame(); + rd_request_frame(); } ////////////////////////////// //- rjf: commit params changes for all views // { - for(DF_View *v = df_state->first_view; !df_view_is_nil(v); v = v->alloc_next) + for(RD_View *v = rd_state->first_view; !rd_view_is_nil(v); v = v->alloc_next) { if(v->params_write_gen == v->params_read_gen+1) { @@ -14343,7 +14297,7 @@ df_frame(void) B32 queue_drag_drop = 0; if(queue_drag_drop) { - df_queue_drag_drop(); + rd_queue_drag_drop(); } ////////////////////////////// @@ -14351,21 +14305,21 @@ df_frame(void) // { dr_begin_frame(); - for(DF_Window *w = df_state->first_window; w != 0; w = w->next) + for(RD_Window *w = rd_state->first_window; w != 0; w = w->next) { B32 window_is_focused = os_window_is_focused(w->os); if(window_is_focused) { - df_state->last_focused_window = df_handle_from_window(w); + rd_state->last_focused_window = rd_handle_from_window(w); } - df_push_regs(); - df_regs()->window = df_handle_from_window(w); - df_window_frame(w); + rd_push_regs(); + rd_regs()->window = rd_handle_from_window(w); + rd_window_frame(w); MemoryZeroStruct(&w->ui_events); - DF_Regs *window_regs = df_pop_regs(); - if(df_window_from_handle(df_state->last_focused_window) == w) + RD_Regs *window_regs = rd_pop_regs(); + if(rd_window_from_handle(rd_state->last_focused_window) == w) { - MemoryCopyStruct(df_regs(), window_regs); + MemoryCopyStruct(rd_regs(), window_regs); } } } @@ -14381,18 +14335,18 @@ df_frame(void) ////////////////////////////// //- rjf: end drag/drop if needed // - if(df_state->drag_drop_state == DF_DragDropState_Dropping) + if(rd_state->drag_drop_state == RD_DragDropState_Dropping) { - df_state->drag_drop_state = DF_DragDropState_Null; - MemoryZeroStruct(&df_drag_drop_payload); + rd_state->drag_drop_state = RD_DragDropState_Null; + MemoryZeroStruct(&rd_drag_drop_payload); } ////////////////////////////// //- rjf: clear frame request state // - if(df_state->num_frames_requested > 0) + if(rd_state->num_frames_requested > 0) { - df_state->num_frames_requested -= 1; + rd_state->num_frames_requested -= 1; } ////////////////////////////// @@ -14400,7 +14354,7 @@ df_frame(void) // { r_begin_frame(); - for(DF_Window *w = df_state->first_window; w != 0; w = w->next) + for(RD_Window *w = rd_state->first_window; w != 0; w = w->next) { r_window_begin_frame(w->os, w->r); dr_submit_bucket(w->os, w->r, w->draw_bucket); @@ -14414,17 +14368,17 @@ df_frame(void) // if(depth == 0) { - D_HandleList windows_to_show = {0}; - for(DF_Window *w = df_state->first_window; w != 0; w = w->next) + RD_HandleList windows_to_show = {0}; + for(RD_Window *w = rd_state->first_window; w != 0; w = w->next) { if(w->frames_alive == 1) { - d_handle_list_push(scratch.arena, &windows_to_show, df_handle_from_window(w)); + rd_handle_list_push(scratch.arena, &windows_to_show, rd_handle_from_window(w)); } } - for(D_HandleNode *n = windows_to_show.first; n != 0; n = n->next) + for(RD_HandleNode *n = windows_to_show.first; n != 0; n = n->next) { - DF_Window *window = df_window_from_handle(n->handle); + RD_Window *window = rd_window_from_handle(n->handle); DeferLoop(depth += 1, depth -= 1) os_window_first_paint(window->os); } } @@ -14434,25 +14388,25 @@ df_frame(void) // ProfScope("eliminate deleted entities") { - for(DF_Entity *entity = df_entity_root(), *next = 0; !df_entity_is_nil(entity); entity = next) + for(RD_Entity *entity = rd_entity_root(), *next = 0; !rd_entity_is_nil(entity); entity = next) { - next = df_entity_rec_depth_first_pre(entity, &d_nil_entity).next; - if(entity->flags & DF_EntityFlag_MarkedForDeletion) + next = rd_entity_rec_depth_first_pre(entity, &d_nil_entity).next; + if(entity->flags & RD_EntityFlag_MarkedForDeletion) { - B32 undoable = (d_entity_kind_flags_table[entity->kind] & DF_EntityKindFlag_UserDefinedLifetime); + B32 undoable = (rd_entity_kind_flags_table[entity->kind] & RD_EntityKindFlag_UserDefinedLifetime); // rjf: fixup next entity to iterate to - next = df_entity_rec_depth_first(entity, &d_nil_entity, OffsetOf(DF_Entity, next), OffsetOf(DF_Entity, next)).next; + next = rd_entity_rec_depth_first(entity, &d_nil_entity, OffsetOf(RD_Entity, next), OffsetOf(RD_Entity, next)).next; // rjf: eliminate root entity if we're freeing it - if(entity == df_state->entities_root) + if(entity == rd_state->entities_root) { - df_state->entities_root = &d_nil_entity; + rd_state->entities_root = &d_nil_entity; } // rjf: unhook & release this entity tree - df_entity_change_parent(entity, entity->parent, &d_nil_entity, &d_nil_entity); - df_entity_release(entity); + rd_entity_change_parent(entity, entity->parent, &d_nil_entity, &d_nil_entity); + rd_entity_release(entity); } } } @@ -14462,23 +14416,23 @@ df_frame(void) // U64 end_time_us = os_now_microseconds(); U64 frame_time_us = end_time_us-begin_time_us; - df_state->frame_time_us_history[df_state->frame_index%ArrayCount(df_state->frame_time_us_history)] = frame_time_us; + rd_state->frame_time_us_history[rd_state->frame_index%ArrayCount(rd_state->frame_time_us_history)] = frame_time_us; ////////////////////////////// //- rjf: bump frame time counters // - df_state->frame_index += 1; - df_state->time_in_seconds += df_state->frame_dt; + rd_state->frame_index += 1; + rd_state->time_in_seconds += rd_state->frame_dt; ////////////////////////////// //- rjf: collect logs // { LogScopeResult log = log_scope_end(scratch.arena); - os_append_data_to_file_path(df_state->log_path, log.strings[LogMsgKind_Info]); + os_append_data_to_file_path(rd_state->log_path, log.strings[LogMsgKind_Info]); if(log.strings[LogMsgKind_UserError].size != 0) { - for(DF_Window *w = df_state->first_window; w != 0; w = w->next) + for(RD_Window *w = rd_state->first_window; w != 0; w = w->next) { w->error_string_size = Min(sizeof(w->error_buffer), log.strings[LogMsgKind_UserError].size); MemoryCopy(w->error_buffer, log.strings[LogMsgKind_UserError].str, w->error_string_size); diff --git a/src/raddbg/raddbg_core.h b/src/raddbg/raddbg_core.h new file mode 100644 index 00000000..f5b182f1 --- /dev/null +++ b/src/raddbg/raddbg_core.h @@ -0,0 +1,1549 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#ifndef RADDBG_CORE_H +#define RADDBG_CORE_H + +//////////////////////////////// +//~ rjf: Handles + +typedef struct RD_Handle RD_Handle; +struct RD_Handle +{ + U64 u64[2]; +}; + +typedef struct RD_HandleNode RD_HandleNode; +struct RD_HandleNode +{ + RD_HandleNode *next; + RD_HandleNode *prev; + RD_Handle handle; +}; + +typedef struct RD_HandleList RD_HandleList; +struct RD_HandleList +{ + RD_HandleNode *first; + RD_HandleNode *last; + U64 count; +}; + +//////////////////////////////// +//~ rjf: Entity Kind Flags + +typedef U32 RD_EntityKindFlags; +enum +{ + //- rjf: allowed operations + RD_EntityKindFlag_CanDelete = (1<<0), + RD_EntityKindFlag_CanFreeze = (1<<1), + RD_EntityKindFlag_CanEdit = (1<<2), + RD_EntityKindFlag_CanRename = (1<<3), + RD_EntityKindFlag_CanEnable = (1<<4), + RD_EntityKindFlag_CanCondition = (1<<5), + RD_EntityKindFlag_CanDuplicate = (1<<6), + + //- rjf: name categorization + RD_EntityKindFlag_NameIsCode = (1<<7), + RD_EntityKindFlag_NameIsPath = (1<<8), + + //- rjf: lifetime categorization + RD_EntityKindFlag_UserDefinedLifetime = (1<<9), + + //- rjf: serialization + RD_EntityKindFlag_IsSerializedToConfig = (1<<10), +}; + +//////////////////////////////// +//~ rjf: Entity Flags + +typedef U32 RD_EntityFlags; +enum +{ + //- rjf: allocationless, simple equipment + RD_EntityFlag_HasTextPoint = (1<<0), + RD_EntityFlag_HasEntityHandle = (1<<2), + RD_EntityFlag_HasU64 = (1<<4), + RD_EntityFlag_HasColor = (1<<6), + RD_EntityFlag_DiesOnRunStop = (1<<8), + + //- rjf: ctrl entity equipment + RD_EntityFlag_HasCtrlHandle = (1<<9), + RD_EntityFlag_HasArch = (1<<10), + RD_EntityFlag_HasCtrlID = (1<<11), + RD_EntityFlag_HasStackBase = (1<<12), + RD_EntityFlag_HasTLSRoot = (1<<13), + RD_EntityFlag_HasVAddrRng = (1<<14), + RD_EntityFlag_HasVAddr = (1<<15), + + //- rjf: file properties + RD_EntityFlag_IsFolder = (1<<16), + RD_EntityFlag_IsMissing = (1<<17), + + //- rjf: deletion + RD_EntityFlag_MarkedForDeletion = (1<<31), +}; + +//////////////////////////////// +//~ rjf: Evaluation Spaces + +typedef U64 RD_EvalSpaceKind; +enum +{ + RD_EvalSpaceKind_CtrlEntity = E_SpaceKind_FirstUserDefined, + RD_EvalSpaceKind_CfgEntity, +}; + +//////////////////////////////// +//~ rjf: Binding Types + +typedef struct RD_Binding RD_Binding; +struct RD_Binding +{ + OS_Key key; + OS_EventFlags flags; +}; + +typedef struct RD_BindingNode RD_BindingNode; +struct RD_BindingNode +{ + RD_BindingNode *next; + RD_Binding binding; +}; + +typedef struct RD_BindingList RD_BindingList; +struct RD_BindingList +{ + RD_BindingNode *first; + RD_BindingNode *last; + U64 count; +}; + +typedef struct RD_StringBindingPair RD_StringBindingPair; +struct RD_StringBindingPair +{ + String8 string; + RD_Binding binding; +}; + +//////////////////////////////// +//~ rjf: Key Map Types + +typedef struct RD_KeyMapNode RD_KeyMapNode; +struct RD_KeyMapNode +{ + RD_KeyMapNode *hash_next; + RD_KeyMapNode *hash_prev; + String8 name; + RD_Binding binding; +}; + +typedef struct RD_KeyMapSlot RD_KeyMapSlot; +struct RD_KeyMapSlot +{ + RD_KeyMapNode *first; + RD_KeyMapNode *last; +}; + +//////////////////////////////// +//~ rjf: Setting Types + +typedef struct RD_SettingVal RD_SettingVal; +struct RD_SettingVal +{ + B32 set; + S32 s32; +}; + +//////////////////////////////// +//~ rjf: View Hook Function Types + +typedef struct RD_View RD_View; + +#define RD_VIEW_SETUP_FUNCTION_SIG(name) void name(RD_View *view, MD_Node *params, String8 string) +#define RD_VIEW_SETUP_FUNCTION_NAME(name) rd_view_setup_##name +#define RD_VIEW_SETUP_FUNCTION_DEF(name) internal RD_VIEW_SETUP_FUNCTION_SIG(RD_VIEW_SETUP_FUNCTION_NAME(name)) +typedef RD_VIEW_SETUP_FUNCTION_SIG(RD_ViewSetupFunctionType); + +#define RD_VIEW_CMD_FUNCTION_SIG(name) void name(RD_View *view, MD_Node *params, String8 string) +#define RD_VIEW_CMD_FUNCTION_NAME(name) rd_view_cmds_##name +#define RD_VIEW_CMD_FUNCTION_DEF(name) internal RD_VIEW_CMD_FUNCTION_SIG(RD_VIEW_CMD_FUNCTION_NAME(name)) +typedef RD_VIEW_CMD_FUNCTION_SIG(RD_ViewCmdFunctionType); + +#define RD_VIEW_UI_FUNCTION_SIG(name) void name(RD_View *view, MD_Node *params, String8 string, Rng2F32 rect) +#define RD_VIEW_UI_FUNCTION_NAME(name) rd_view_ui_##name +#define RD_VIEW_UI_FUNCTION_DEF(name) internal RD_VIEW_UI_FUNCTION_SIG(RD_VIEW_UI_FUNCTION_NAME(name)) +typedef RD_VIEW_UI_FUNCTION_SIG(RD_ViewUIFunctionType); + +//////////////////////////////// +//~ rjf: View Rule Info Types + +typedef U32 RD_ViewRuleInfoFlags; +enum +{ + RD_ViewRuleInfoFlag_ShowInDocs = (1<<0), + RD_ViewRuleInfoFlag_CanFilter = (1<<1), + RD_ViewRuleInfoFlag_FilterIsCode = (1<<2), + RD_ViewRuleInfoFlag_TypingAutomaticallyFilters = (1<<3), +}; + +#define RD_VIEW_RULE_UI_FUNCTION_SIG(name) void name(RD_View *view, String8 string, MD_Node *params, Rng2F32 rect) +#define RD_VIEW_RULE_UI_FUNCTION_NAME(name) rd_view_rule_ui_##name +#define RD_VIEW_RULE_UI_FUNCTION_DEF(name) internal RD_VIEW_RULE_UI_FUNCTION_SIG(RD_VIEW_RULE_UI_FUNCTION_NAME(name)) +typedef RD_VIEW_RULE_UI_FUNCTION_SIG(RD_ViewRuleUIFunctionType); + +//////////////////////////////// +//~ rjf: View Specification Types + +#if 1 // TODO(rjf): @msgs +typedef U32 RD_ViewSpecFlags; +enum +{ + RD_ViewSpecFlag_ParameterizedByEntity = (1<<0), + RD_ViewSpecFlag_ProjectSpecific = (1<<1), + RD_ViewSpecFlag_CanSerialize = (1<<2), + RD_ViewSpecFlag_CanFilter = (1<<3), + RD_ViewSpecFlag_FilterIsCode = (1<<4), + RD_ViewSpecFlag_TypingAutomaticallyFilters = (1<<5), +}; + +typedef struct RD_ViewSpecInfo RD_ViewSpecInfo; +struct RD_ViewSpecInfo +{ + RD_ViewSpecFlags flags; + String8 name; + String8 display_string; + U32 icon_kind; + RD_ViewSetupFunctionType *setup_hook; + RD_ViewCmdFunctionType *cmd_hook; + RD_ViewUIFunctionType *ui_hook; +}; + +typedef struct RD_ViewSpec RD_ViewSpec; +struct RD_ViewSpec +{ + RD_ViewSpec *hash_next; + RD_ViewSpecInfo info; +}; + +typedef struct RD_ViewSpecInfoArray RD_ViewSpecInfoArray; +struct RD_ViewSpecInfoArray +{ + RD_ViewSpecInfo *v; + U64 count; +}; + +typedef struct RD_CmdParamSlotViewSpecRuleNode RD_CmdParamSlotViewSpecRuleNode; +struct RD_CmdParamSlotViewSpecRuleNode +{ + RD_CmdParamSlotViewSpecRuleNode *next; + RD_ViewSpec *view_spec; + String8 cmd_name; +}; + +typedef struct RD_CmdParamSlotViewSpecRuleList RD_CmdParamSlotViewSpecRuleList; +struct RD_CmdParamSlotViewSpecRuleList +{ + RD_CmdParamSlotViewSpecRuleNode *first; + RD_CmdParamSlotViewSpecRuleNode *last; + U64 count; +}; +#endif + +//////////////////////////////// +//~ rjf: View Types + +typedef struct RD_ArenaExt RD_ArenaExt; +struct RD_ArenaExt +{ + RD_ArenaExt *next; + Arena *arena; +}; + +typedef struct RD_TransientViewNode RD_TransientViewNode; +struct RD_TransientViewNode +{ + RD_TransientViewNode *next; + RD_TransientViewNode *prev; + EV_Key key; + RD_View *view; + Arena *initial_params_arena; + MD_Node *initial_params; + U64 first_frame_index_touched; + U64 last_frame_index_touched; +}; + +typedef struct RD_TransientViewSlot RD_TransientViewSlot; +struct RD_TransientViewSlot +{ + RD_TransientViewNode *first; + RD_TransientViewNode *last; +}; + +typedef struct RD_View RD_View; +struct RD_View +{ + // rjf: allocation links (for iterating all views) + RD_View *alloc_next; + RD_View *alloc_prev; + + // rjf: ownership links ('owners' can have lists of views) + RD_View *order_next; + RD_View *order_prev; + + // rjf: transient view children + RD_View *first_transient; + RD_View *last_transient; + + // rjf: view specification info + RD_ViewSpec *spec; + + // rjf: allocation info + U64 generation; + + // rjf: loading animation state + F32 loading_t; + F32 loading_t_target; + U64 loading_progress_v; + U64 loading_progress_v_target; + + // rjf: view project (for project-specific/filtered views) + Arena *project_path_arena; + String8 project_path; + + // rjf: view state + UI_ScrollPt2 scroll_pos; + + // rjf: view-lifetime allocation & user data extensions + Arena *arena; + RD_ArenaExt *first_arena_ext; + RD_ArenaExt *last_arena_ext; + U64 transient_view_slots_count; + RD_TransientViewSlot *transient_view_slots; + RD_TransientViewNode *free_transient_view_node; + void *user_data; + + // rjf: filter mode + B32 is_filtering; + F32 is_filtering_t; + + // rjf: params tree state + Arena *params_arenas[2]; + MD_Node *params_roots[2]; + U64 params_write_gen; + U64 params_read_gen; + + // rjf: text query state + TxtPt query_cursor; + TxtPt query_mark; + U64 query_string_size; + U8 query_buffer[KB(4)]; +}; + +//////////////////////////////// +//~ rjf: Panel Types + +typedef struct RD_Panel RD_Panel; +struct RD_Panel +{ + // rjf: tree links/data + RD_Panel *first; + RD_Panel *last; + RD_Panel *next; + RD_Panel *prev; + RD_Panel *parent; + U64 child_count; + + // rjf: allocation data + U64 generation; + + // rjf: split data + Axis2 split_axis; + F32 pct_of_parent; + + // rjf: animated rectangle data + Rng2F32 animated_rect_pct; + + // rjf: tab params + Side tab_side; + + // rjf: stable views (tabs) + RD_View *first_tab_view; + RD_View *last_tab_view; + U64 tab_view_count; + RD_Handle selected_tab_view; +}; + +typedef struct RD_PanelRec RD_PanelRec; +struct RD_PanelRec +{ + RD_Panel *next; + int push_count; + int pop_count; +}; + +//////////////////////////////// +//~ rjf: Drag/Drop Types + +typedef enum RD_DragDropState +{ + RD_DragDropState_Null, + RD_DragDropState_Dragging, + RD_DragDropState_Dropping, + RD_DragDropState_COUNT +} +RD_DragDropState; + +typedef struct RD_DragDropPayload RD_DragDropPayload; +struct RD_DragDropPayload +{ + UI_Key key; + RD_Handle panel; + RD_Handle view; + RD_Handle entity; + TxtPt text_point; +}; + +//////////////////////////////// +//~ rjf: View Rule Spec Types + +typedef U32 RD_ViewRuleSpecInfoFlags; // NOTE(rjf): see @view_rule_info +enum +{ + RD_ViewRuleSpecInfoFlag_VizRowProd = (1<<0), + RD_ViewRuleSpecInfoFlag_LineStringize = (1<<1), + RD_ViewRuleSpecInfoFlag_RowUI = (1<<2), + RD_ViewRuleSpecInfoFlag_ViewUI = (1<<3), +}; + +#define RD_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_SIG(name) void name(void) +#define RD_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(name) rd_view_rule_viz_row_prod__##name +#define RD_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(name) internal RD_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_SIG(RD_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_NAME(name)) + +#define RD_VIEW_RULE_LINE_STRINGIZE_FUNCTION_SIG(name) void name(void) +#define RD_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(name) rd_view_rule_line_stringize__##name +#define RD_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(name) internal RD_VIEW_RULE_LINE_STRINGIZE_FUNCTION_SIG(RD_VIEW_RULE_LINE_STRINGIZE_FUNCTION_NAME(name)) + +#define RD_VIEW_RULE_ROW_UI_FUNCTION_SIG(name) void name(EV_Key key, MD_Node *params, String8 string) +#define RD_VIEW_RULE_ROW_UI_FUNCTION_NAME(name) rd_view_rule_row_ui__##name +#define RD_VIEW_RULE_ROW_UI_FUNCTION_DEF(name) RD_VIEW_RULE_ROW_UI_FUNCTION_SIG(RD_VIEW_RULE_ROW_UI_FUNCTION_NAME(name)) + +typedef RD_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_SIG(RD_ViewRuleVizRowProdHookFunctionType); +typedef RD_VIEW_RULE_LINE_STRINGIZE_FUNCTION_SIG(RD_ViewRuleLineStringizeHookFunctionType); +typedef RD_VIEW_RULE_ROW_UI_FUNCTION_SIG(RD_ViewRuleRowUIFunctionType); + +typedef struct RD_ViewRuleSpecInfo RD_ViewRuleSpecInfo; +struct RD_ViewRuleSpecInfo +{ + String8 string; + RD_ViewRuleSpecInfoFlags flags; + RD_ViewRuleVizRowProdHookFunctionType *viz_row_prod; + RD_ViewRuleLineStringizeHookFunctionType *line_stringize; + RD_ViewRuleRowUIFunctionType *row_ui; +}; + +typedef struct RD_ViewRuleSpecInfoArray RD_ViewRuleSpecInfoArray; +struct RD_ViewRuleSpecInfoArray +{ + RD_ViewRuleSpecInfo *v; + U64 count; +}; + +typedef struct RD_ViewRuleSpec RD_ViewRuleSpec; +struct RD_ViewRuleSpec +{ + RD_ViewRuleSpec *hash_next; + RD_ViewRuleSpecInfo info; +}; + +//////////////////////////////// +//~ rjf: Command Kind Types + +typedef U32 RD_QueryFlags; +enum +{ + RD_QueryFlag_AllowFiles = (1<<0), + RD_QueryFlag_AllowFolders = (1<<1), + RD_QueryFlag_CodeInput = (1<<2), + RD_QueryFlag_KeepOldInput = (1<<3), + RD_QueryFlag_SelectOldInput = (1<<4), + RD_QueryFlag_Required = (1<<5), +}; + +typedef U32 RD_CmdKindFlags; +enum +{ + RD_CmdKindFlag_ListInUI = (1<<0), + RD_CmdKindFlag_ListInIPCDocs = (1<<1), +}; + +//////////////////////////////// +//~ rjf: Generated Code + +#include "generated/raddbg.meta.h" + +//////////////////////////////// +//~ rjf: Config Types + +typedef struct RD_CfgTree RD_CfgTree; +struct RD_CfgTree +{ + RD_CfgTree *next; + RD_CfgSrc source; + MD_Node *root; +}; + +typedef struct RD_CfgVal RD_CfgVal; +struct RD_CfgVal +{ + RD_CfgVal *hash_next; + RD_CfgVal *linear_next; + RD_CfgTree *first; + RD_CfgTree *last; + U64 insertion_stamp; + String8 string; +}; + +typedef struct RD_CfgSlot RD_CfgSlot; +struct RD_CfgSlot +{ + RD_CfgVal *first; +}; + +typedef struct RD_CfgTable RD_CfgTable; +struct RD_CfgTable +{ + U64 slot_count; + RD_CfgSlot *slots; + U64 insertion_stamp_counter; + RD_CfgVal *first_val; + RD_CfgVal *last_val; +}; + +//////////////////////////////// +//~ rjf: Entity Types + +typedef U64 RD_EntityID; + +typedef struct RD_Entity RD_Entity; +struct RD_Entity +{ + // rjf: tree links + RD_Entity *first; + RD_Entity *last; + RD_Entity *next; + RD_Entity *prev; + RD_Entity *parent; + + // rjf: metadata + RD_EntityKind kind; + RD_EntityFlags flags; + RD_EntityID id; + U64 gen; + U64 alloc_time_us; + F32 alive_t; + + // rjf: basic equipment + TxtPt text_point; + RD_Handle entity_handle; + B32 disabled; + U64 u64; + Vec4F32 color_hsva; + RD_CfgSrc cfg_src; + U64 timestamp; + + // rjf: ctrl equipment + CTRL_Handle ctrl_handle; + Arch arch; + U32 ctrl_id; + U64 stack_base; + Rng1U64 vaddr_rng; + U64 vaddr; + + // rjf: string equipment + String8 string; + + // rjf: parameter tree + Arena *params_arena; + MD_Node *params_root; +}; + +typedef struct RD_EntityNode RD_EntityNode; +struct RD_EntityNode +{ + RD_EntityNode *next; + RD_Entity *entity; +}; + +typedef struct RD_EntityList RD_EntityList; +struct RD_EntityList +{ + RD_EntityNode *first; + RD_EntityNode *last; + U64 count; +}; + +typedef struct RD_EntityArray RD_EntityArray; +struct RD_EntityArray +{ + RD_Entity **v; + U64 count; +}; + +typedef struct RD_EntityRec RD_EntityRec; +struct RD_EntityRec +{ + RD_Entity *next; + S32 push_count; + S32 pop_count; +}; + +//////////////////////////////// +//~ rjf: Entity Evaluation Types + +typedef struct RD_EntityEval RD_EntityEval; +struct RD_EntityEval +{ + B64 enabled; + U64 hit_count; + U64 label_off; + U64 location_off; + U64 condition_off; +}; + +//////////////////////////////// +//~ rjf: Entity Fuzzy Listing Types + +typedef struct RD_EntityFuzzyItem RD_EntityFuzzyItem; +struct RD_EntityFuzzyItem +{ + RD_Entity *entity; + FuzzyMatchRangeList matches; +}; + +typedef struct RD_EntityFuzzyItemArray RD_EntityFuzzyItemArray; +struct RD_EntityFuzzyItemArray +{ + RD_EntityFuzzyItem *v; + U64 count; +}; + +//////////////////////////////// +//~ rjf: Command Types + +typedef struct RD_Cmd RD_Cmd; +struct RD_Cmd +{ + String8 name; + RD_Regs *regs; +}; + +typedef struct RD_CmdNode RD_CmdNode; +struct RD_CmdNode +{ + RD_CmdNode *next; + RD_CmdNode *prev; + RD_Cmd cmd; +}; + +typedef struct RD_CmdList RD_CmdList; +struct RD_CmdList +{ + RD_CmdNode *first; + RD_CmdNode *last; + U64 count; +}; + +//////////////////////////////// +//~ rjf: Context Register Types + +typedef struct RD_RegsNode RD_RegsNode; +struct RD_RegsNode +{ + RD_RegsNode *next; + RD_Regs v; +}; + +//////////////////////////////// +//~ rjf: Theme Types + +typedef struct RD_Theme RD_Theme; +struct RD_Theme +{ + Vec4F32 colors[RD_ThemeColor_COUNT]; +}; + +typedef enum RD_FontSlot +{ + RD_FontSlot_Main, + RD_FontSlot_Code, + RD_FontSlot_Icons, + RD_FontSlot_COUNT +} +RD_FontSlot; + +typedef enum RD_PaletteCode +{ + RD_PaletteCode_Base, + RD_PaletteCode_MenuBar, + RD_PaletteCode_Floating, + RD_PaletteCode_ImplicitButton, + RD_PaletteCode_PlainButton, + RD_PaletteCode_PositivePopButton, + RD_PaletteCode_NegativePopButton, + RD_PaletteCode_NeutralPopButton, + RD_PaletteCode_ScrollBarButton, + RD_PaletteCode_Tab, + RD_PaletteCode_TabInactive, + RD_PaletteCode_DropSiteOverlay, + RD_PaletteCode_COUNT +} +RD_PaletteCode; + +//////////////////////////////// +//~ rjf: Auto-Complete Lister Types + +typedef U32 RD_AutoCompListerFlags; +enum +{ + RD_AutoCompListerFlag_Locals = (1<<0), + RD_AutoCompListerFlag_Registers = (1<<1), + RD_AutoCompListerFlag_ViewRules = (1<<2), + RD_AutoCompListerFlag_ViewRuleParams= (1<<3), + RD_AutoCompListerFlag_Members = (1<<4), + RD_AutoCompListerFlag_Languages = (1<<5), + RD_AutoCompListerFlag_Architectures = (1<<6), + RD_AutoCompListerFlag_Tex2DFormats = (1<<7), +}; + +typedef struct RD_AutoCompListerItem RD_AutoCompListerItem; +struct RD_AutoCompListerItem +{ + String8 string; + String8 kind_string; + FuzzyMatchRangeList matches; +}; + +typedef struct RD_AutoCompListerItemChunkNode RD_AutoCompListerItemChunkNode; +struct RD_AutoCompListerItemChunkNode +{ + RD_AutoCompListerItemChunkNode *next; + RD_AutoCompListerItem *v; + U64 count; + U64 cap; +}; + +typedef struct RD_AutoCompListerItemChunkList RD_AutoCompListerItemChunkList; +struct RD_AutoCompListerItemChunkList +{ + RD_AutoCompListerItemChunkNode *first; + RD_AutoCompListerItemChunkNode *last; + U64 chunk_count; + U64 total_count; +}; + +typedef struct RD_AutoCompListerItemArray RD_AutoCompListerItemArray; +struct RD_AutoCompListerItemArray +{ + RD_AutoCompListerItem *v; + U64 count; +}; + +typedef struct RD_AutoCompListerParams RD_AutoCompListerParams; +struct RD_AutoCompListerParams +{ + RD_AutoCompListerFlags flags; + String8List strings; +}; + +//////////////////////////////// +//~ rjf: Per-Window State + +typedef struct RD_Window RD_Window; +struct RD_Window +{ + // rjf: links & metadata + RD_Window *next; + RD_Window *prev; + U64 gen; + U64 frames_alive; + RD_CfgSrc cfg_src; + + // rjf: top-level info & handles + Arena *arena; + OS_Handle os; + R_Handle r; + UI_State *ui; + F32 last_dpi; + B32 window_temporarily_focused_ipc; + + // rjf: config/settings + RD_SettingVal setting_vals[RD_SettingCode_COUNT]; + UI_Palette cfg_palettes[RD_PaletteCode_COUNT]; // derivative from theme + + // rjf: dev interface state + B32 dev_menu_is_open; + + // rjf: menu bar state + B32 menu_bar_focused; + B32 menu_bar_focused_on_press; + B32 menu_bar_key_held; + B32 menu_bar_focus_press_started; + + // rjf: code context menu state + Arena *code_ctx_menu_arena; + String8 code_ctx_menu_file_path; + U128 code_ctx_menu_text_key; + TXT_LangKind code_ctx_menu_lang_kind; + TxtRng code_ctx_menu_range; + U64 code_ctx_menu_vaddr; + D_LineList code_ctx_menu_lines; + + // rjf: entity context menu state + RD_Handle entity_ctx_menu_entity; + U8 entity_ctx_menu_input_buffer[1024]; + U64 entity_ctx_menu_input_size; + TxtPt entity_ctx_menu_input_cursor; + TxtPt entity_ctx_menu_input_mark; + + // rjf: tab context menu state + RD_Handle tab_ctx_menu_panel; + RD_Handle tab_ctx_menu_view; + U8 tab_ctx_menu_input_buffer[1024]; + U64 tab_ctx_menu_input_size; + TxtPt tab_ctx_menu_input_cursor; + TxtPt tab_ctx_menu_input_mark; + + // rjf: autocomplete lister state + U64 autocomp_last_frame_idx; + B32 autocomp_force_closed; + B32 autocomp_query_dirty; + UI_Key autocomp_root_key; + Arena *autocomp_lister_params_arena; + RD_AutoCompListerParams autocomp_lister_params; + U64 autocomp_cursor_off; + U8 autocomp_lister_query_buffer[1024]; + U64 autocomp_lister_query_size; + F32 autocomp_open_t; + F32 autocomp_num_visible_rows_t; + S64 autocomp_cursor_num; + + // rjf: query view stack + Arena *query_cmd_arena; + String8 query_cmd_name; + RD_Regs *query_cmd_regs; + U64 query_cmd_regs_mask[(RD_RegSlot_COUNT + 63) / 64]; + RD_View *query_view_stack_top; + B32 query_view_selected; + F32 query_view_selected_t; + F32 query_view_t; + + // rjf: hover eval stable state + B32 hover_eval_focused; + TxtPt hover_eval_txt_cursor; + TxtPt hover_eval_txt_mark; + U8 hover_eval_txt_buffer[1024]; + U64 hover_eval_txt_size; + Arena *hover_eval_arena; + Vec2F32 hover_eval_spawn_pos; + String8 hover_eval_string; + + // rjf: hover eval timer + U64 hover_eval_first_frame_idx; + U64 hover_eval_last_frame_idx; + + // rjf: hover eval params + String8 hover_eval_file_path; + TxtPt hover_eval_file_pt; + U64 hover_eval_vaddr; + F32 hover_eval_open_t; + F32 hover_eval_num_visible_rows_t; + + // rjf: error state + U8 error_buffer[512]; + U64 error_string_size; + F32 error_t; + + // rjf: panel state + RD_Panel *root_panel; + RD_Panel *free_panel; + RD_Panel *focused_panel; + + // rjf: per-frame ui events state + UI_EventList ui_events; + + // rjf: per-frame drawing state + DR_Bucket *draw_bucket; +}; + +//////////////////////////////// +//~ rjf: Eval Visualization View Cache Types + +typedef struct RD_EvalVizViewCacheNode RD_EvalVizViewCacheNode; +struct RD_EvalVizViewCacheNode +{ + RD_EvalVizViewCacheNode *next; + RD_EvalVizViewCacheNode *prev; + U64 key; + EV_View *v; +}; + +typedef struct RD_EvalVizViewCacheSlot RD_EvalVizViewCacheSlot; +struct RD_EvalVizViewCacheSlot +{ + RD_EvalVizViewCacheNode *first; + RD_EvalVizViewCacheNode *last; +}; + +//////////////////////////////// +//~ rjf: Main Per-Process Graphical State + +typedef struct D_NameChunkNode D_NameChunkNode; +struct D_NameChunkNode +{ + D_NameChunkNode *next; + U64 size; +}; + +typedef struct D_EntityListCache D_EntityListCache; +struct D_EntityListCache +{ + Arena *arena; + U64 alloc_gen; + RD_EntityList list; +}; + +typedef struct RD_State RD_State; +struct RD_State +{ + // rjf: top-level state + Arena *arena; + B32 quit; + F64 time_in_seconds; + Log *log; + String8 log_path; + + // rjf: frame state + F32 frame_dt; + U64 frame_index; + Arena *frame_arenas[2]; + + // rjf: frame time history + U64 frame_time_us_history[64]; + + // rjf: registers stack + RD_RegsNode base_regs; + RD_RegsNode *top_regs; + + // rjf: commands + Arena *cmds_arena; + RD_CmdList cmds; + + // rjf: frame request state + U64 num_frames_requested; + + // rjf: autosave timer + F32 seconds_until_autosave; + + // rjf: name allocator + D_NameChunkNode *free_name_chunks[8]; + + // rjf: entity state + Arena *entities_arena; + RD_Entity *entities_base; + U64 entities_count; + U64 entities_id_gen; + RD_Entity *entities_root; + RD_Entity *entities_free[2]; // [0] -> normal lifetime, not user defined; [1] -> user defined lifetime (& thus undoable) + U64 entities_free_count; + U64 entities_active_count; + + // rjf: entity query caches + U64 kind_alloc_gens[RD_EntityKind_COUNT]; + D_EntityListCache kind_caches[RD_EntityKind_COUNT]; + + // rjf: key map table + Arena *key_map_arena; + U64 key_map_table_size; + RD_KeyMapSlot *key_map_table; + RD_KeyMapNode *free_key_map_node; + U64 key_map_total_count; + + // rjf: bind change + Arena *bind_change_arena; + B32 bind_change_active; + String8 bind_change_cmd_name; + RD_Binding bind_change_binding; + + // rjf: top-level context menu keys + UI_Key code_ctx_menu_key; + UI_Key entity_ctx_menu_key; + UI_Key tab_ctx_menu_key; + + // rjf: confirmation popup state + UI_Key confirm_key; + B32 confirm_active; + F32 confirm_t; + Arena *confirm_arena; + RD_CmdList confirm_cmds; + String8 confirm_title; + String8 confirm_desc; + + // rjf: string search state + Arena *string_search_arena; + String8 string_search_string; + + // rjf: view specs + U64 view_spec_table_size; + RD_ViewSpec **view_spec_table; + + // rjf: view rule specs + U64 view_rule_spec_table_size; + RD_ViewRuleSpec **view_rule_spec_table; + + // rjf: windows + RD_Window *first_window; + RD_Window *last_window; + RD_Window *free_window; + U64 window_count; + B32 last_window_queued_save; + RD_Handle last_focused_window; + + // rjf: eval visualization view cache + U64 eval_viz_view_cache_slots_count; + RD_EvalVizViewCacheSlot *eval_viz_view_cache_slots; + RD_EvalVizViewCacheNode *eval_viz_view_cache_node_free; + + // rjf: view state + RD_View *first_view; + RD_View *last_view; + RD_View *free_view; + U64 free_view_count; + U64 allocated_view_count; + + // rjf: drag/drop state machine + RD_DragDropState drag_drop_state; + + // rjf: rich hover info + RD_Regs *hover_regs; + RD_Regs *next_hover_regs; + + // rjf: config reading state + Arena *cfg_path_arenas[RD_CfgSrc_COUNT]; + String8 cfg_paths[RD_CfgSrc_COUNT]; + U64 cfg_cached_timestamp[RD_CfgSrc_COUNT]; + Arena *cfg_arena; + RD_CfgTable cfg_table; + U64 ctrl_exception_code_filters[(CTRL_ExceptionCodeKind_COUNT+63)/64]; + + // rjf: running theme state + RD_Theme cfg_theme_target; + RD_Theme cfg_theme; + Arena *cfg_main_font_path_arena; + Arena *cfg_code_font_path_arena; + String8 cfg_main_font_path; + String8 cfg_code_font_path; + FNT_Tag cfg_font_tags[RD_FontSlot_COUNT]; // derivative from font paths + + // rjf: global settings + RD_SettingVal cfg_setting_vals[RD_CfgSrc_COUNT][RD_SettingCode_COUNT]; + + // rjf: icon texture + R_Handle icon_texture; + + // rjf: current path + Arena *current_path_arena; + String8 current_path; +}; + +//////////////////////////////// +//~ rjf: Globals + +read_only global RD_CfgTree d_nil_cfg_tree = {&d_nil_cfg_tree, RD_CfgSrc_User, &md_nil_node}; +read_only global RD_CfgVal d_nil_cfg_val = {&d_nil_cfg_val, &d_nil_cfg_val, &d_nil_cfg_tree, &d_nil_cfg_tree}; + +read_only global RD_Entity d_nil_entity = +{ + &d_nil_entity, + &d_nil_entity, + &d_nil_entity, + &d_nil_entity, + &d_nil_entity, +}; + +read_only global RD_CmdKindInfo rd_nil_cmd_kind_info = {0}; + +read_only global RD_ViewRuleInfo rd_nil_view_rule_info = {0}; + +read_only global RD_ViewSpec rd_nil_view_spec = +{ + &rd_nil_view_spec, + { + 0, + {0}, + {0}, + RD_IconKind_Null, + RD_VIEW_SETUP_FUNCTION_NAME(null), + RD_VIEW_CMD_FUNCTION_NAME(null), + RD_VIEW_UI_FUNCTION_NAME(null), + }, +}; + +read_only global RD_ViewRuleSpec rd_nil_view_rule_spec = +{ + &rd_nil_view_rule_spec, +}; + +read_only global RD_View rd_nil_view = +{ + &rd_nil_view, + &rd_nil_view, + &rd_nil_view, + &rd_nil_view, + &rd_nil_view, + &rd_nil_view, + &rd_nil_view_spec, +}; + +read_only global RD_Panel rd_nil_panel = +{ + &rd_nil_panel, + &rd_nil_panel, + &rd_nil_panel, + &rd_nil_panel, + &rd_nil_panel, +}; + +global RD_State *rd_state = 0; +global RD_DragDropPayload rd_drag_drop_payload = {0}; +global RD_Handle rd_last_drag_drop_panel = {0}; +global RD_Handle rd_last_drag_drop_prev_tab = {0}; + +//////////////////////////////// +//~ rjf: Handle Type Pure Functions + +internal RD_Handle rd_handle_zero(void); +internal B32 rd_handle_match(RD_Handle a, RD_Handle b); +internal void rd_handle_list_push_node(RD_HandleList *list, RD_HandleNode *node); +internal void rd_handle_list_push(Arena *arena, RD_HandleList *list, RD_Handle handle); +internal RD_HandleList rd_handle_list_copy(Arena *arena, RD_HandleList list); + +//////////////////////////////// +//~ rjf: Config Type Pure Functions + +internal void rd_cfg_table_push_unparsed_string(Arena *arena, RD_CfgTable *table, String8 string, RD_CfgSrc source); +internal RD_CfgVal *rd_cfg_val_from_string(RD_CfgTable *table, String8 string); + +//////////////////////////////// +//~ rjf: Registers Type Functions + +internal void rd_regs_copy_contents(Arena *arena, RD_Regs *dst, RD_Regs *src); +internal RD_Regs *rd_regs_copy(Arena *arena, RD_Regs *src); + +//////////////////////////////// +//~ rjf: Commands Type Functions + +internal void rd_cmd_list_push_new(Arena *arena, RD_CmdList *cmds, String8 name, RD_Regs *regs); + +//////////////////////////////// +//~ rjf: Entity Type Pure Functions + +//- rjf: nil +internal B32 rd_entity_is_nil(RD_Entity *entity); +#define rd_require_entity_nonnil(entity, if_nil_stmts) do{if(rd_entity_is_nil(entity)){if_nil_stmts;}}while(0) + +//- rjf: handle <-> entity conversions +internal U64 rd_index_from_entity(RD_Entity *entity); +internal RD_Handle rd_handle_from_entity(RD_Entity *entity); +internal RD_Entity *rd_entity_from_handle(RD_Handle handle); +internal RD_HandleList rd_handle_list_from_entity_list(Arena *arena, RD_EntityList entities); + +//- rjf: entity recursion iterators +internal RD_EntityRec rd_entity_rec_depth_first(RD_Entity *entity, RD_Entity *subtree_root, U64 sib_off, U64 child_off); +#define rd_entity_rec_depth_first_pre(entity, subtree_root) rd_entity_rec_depth_first((entity), (subtree_root), OffsetOf(RD_Entity, next), OffsetOf(RD_Entity, first)) +#define rd_entity_rec_depth_first_post(entity, subtree_root) rd_entity_rec_depth_first((entity), (subtree_root), OffsetOf(RD_Entity, prev), OffsetOf(RD_Entity, last)) + +//- rjf: ancestor/child introspection +internal RD_Entity *rd_entity_child_from_kind(RD_Entity *entity, RD_EntityKind kind); +internal RD_Entity *rd_entity_ancestor_from_kind(RD_Entity *entity, RD_EntityKind kind); +internal RD_EntityList rd_push_entity_child_list_with_kind(Arena *arena, RD_Entity *entity, RD_EntityKind kind); +internal RD_Entity *rd_entity_child_from_string_and_kind(RD_Entity *parent, String8 string, RD_EntityKind kind); + +//- rjf: entity list building +internal void rd_entity_list_push(Arena *arena, RD_EntityList *list, RD_Entity *entity); +internal RD_EntityArray rd_entity_array_from_list(Arena *arena, RD_EntityList *list); +#define rd_first_entity_from_list(list) ((list)->first != 0 ? (list)->first->entity : &d_nil_entity) + +//- rjf: entity fuzzy list building +internal RD_EntityFuzzyItemArray rd_entity_fuzzy_item_array_from_entity_list_needle(Arena *arena, RD_EntityList *list, String8 needle); +internal RD_EntityFuzzyItemArray rd_entity_fuzzy_item_array_from_entity_array_needle(Arena *arena, RD_EntityArray *array, String8 needle); + +//- rjf: full path building, from file/folder entities +internal String8 rd_full_path_from_entity(Arena *arena, RD_Entity *entity); + +//- rjf: display string entities, for referencing entities in ui +internal String8 rd_display_string_from_entity(Arena *arena, RD_Entity *entity); + +//- rjf: extra search tag strings for fuzzy filtering entities +internal String8 rd_search_tags_from_entity(Arena *arena, RD_Entity *entity); + +//- rjf: entity -> color operations +internal Vec4F32 rd_hsva_from_entity(RD_Entity *entity); +internal Vec4F32 rd_rgba_from_entity(RD_Entity *entity); + +//- rjf: entity -> expansion tree keys +internal EV_Key rd_ev_key_from_entity(RD_Entity *entity); +internal EV_Key rd_parent_ev_key_from_entity(RD_Entity *entity); + +//- rjf: entity -> evaluation +internal RD_EntityEval *rd_eval_from_entity(Arena *arena, RD_Entity *entity); + +//////////////////////////////// +//~ rjf: View Type Functions + +internal B32 rd_view_is_nil(RD_View *view); +internal B32 rd_view_is_project_filtered(RD_View *view); +internal RD_Handle rd_handle_from_view(RD_View *view); +internal RD_View *rd_view_from_handle(RD_Handle handle); + +//////////////////////////////// +//~ rjf: View Spec Type Functions + +internal RD_ViewKind rd_view_kind_from_string(String8 string); + +//////////////////////////////// +//~ rjf: Panel Type Functions + +//- rjf: basic type functions +internal B32 rd_panel_is_nil(RD_Panel *panel); +internal RD_Handle rd_handle_from_panel(RD_Panel *panel); +internal RD_Panel *rd_panel_from_handle(RD_Handle handle); +internal UI_Key rd_ui_key_from_panel(RD_Panel *panel); + +//- rjf: tree construction +internal void rd_panel_insert(RD_Panel *parent, RD_Panel *prev_child, RD_Panel *new_child); +internal void rd_panel_remove(RD_Panel *parent, RD_Panel *child); + +//- rjf: tree walk +internal RD_PanelRec rd_panel_rec_depth_first(RD_Panel *panel, U64 sib_off, U64 child_off); +#define rd_panel_rec_depth_first_pre(panel) rd_panel_rec_depth_first(panel, OffsetOf(RD_Panel, next), OffsetOf(RD_Panel, first)) +#define rd_panel_rec_depth_first_pre_rev(panel) rd_panel_rec_depth_first(panel, OffsetOf(RD_Panel, prev), OffsetOf(RD_Panel, last)) + +//- rjf: panel -> rect calculations +internal Rng2F32 rd_target_rect_from_panel_child(Rng2F32 parent_rect, RD_Panel *parent, RD_Panel *panel); +internal Rng2F32 rd_target_rect_from_panel(Rng2F32 root_rect, RD_Panel *root, RD_Panel *panel); + +//- rjf: view ownership insertion/removal +internal void rd_panel_insert_tab_view(RD_Panel *panel, RD_View *prev_view, RD_View *view); +internal void rd_panel_remove_tab_view(RD_Panel *panel, RD_View *view); +internal RD_View *rd_selected_tab_from_panel(RD_Panel *panel); + +//- rjf: icons & display strings +internal RD_IconKind rd_icon_kind_from_view(RD_View *view); +internal DR_FancyStringList rd_title_fstrs_from_view(Arena *arena, RD_View *view, Vec4F32 primary_color, Vec4F32 secondary_color, F32 size); + +//////////////////////////////// +//~ rjf: Window Type Functions + +internal RD_Handle rd_handle_from_window(RD_Window *window); +internal RD_Window *rd_window_from_handle(RD_Handle handle); + +//////////////////////////////// +//~ rjf: Command Parameters From Context + +internal B32 rd_prefer_dasm_from_window(RD_Window *window); + +//////////////////////////////// +//~ rjf: Global Cross-Window UI Interaction State Functions + +internal B32 rd_drag_is_active(void); +internal void rd_drag_begin(RD_DragDropPayload *payload); +internal B32 rd_drag_drop(RD_DragDropPayload *out_payload); +internal void rd_drag_kill(void); +internal void rd_queue_drag_drop(void); + +internal void rd_set_hover_regs(void); +internal RD_Regs *rd_get_hover_regs(void); + +//////////////////////////////// +//~ rjf: Name Allocation + +internal U64 rd_name_bucket_idx_from_string_size(U64 size); +internal String8 rd_name_alloc(String8 string); +internal void rd_name_release(String8 string); + +//////////////////////////////// +//~ rjf: Entity Stateful Functions + +//- rjf: entity allocation + tree forming +internal RD_Entity *rd_entity_alloc(RD_Entity *parent, RD_EntityKind kind); +internal void rd_entity_mark_for_deletion(RD_Entity *entity); +internal void rd_entity_release(RD_Entity *entity); +internal void rd_entity_change_parent(RD_Entity *entity, RD_Entity *old_parent, RD_Entity *new_parent, RD_Entity *prev_child); + +//- rjf: entity simple equipment +internal void rd_entity_equip_txt_pt(RD_Entity *entity, TxtPt point); +internal void rd_entity_equip_entity_handle(RD_Entity *entity, RD_Handle handle); +internal void rd_entity_equip_disabled(RD_Entity *entity, B32 b32); +internal void rd_entity_equip_u64(RD_Entity *entity, U64 u64); +internal void rd_entity_equip_color_rgba(RD_Entity *entity, Vec4F32 rgba); +internal void rd_entity_equip_color_hsva(RD_Entity *entity, Vec4F32 hsva); +internal void rd_entity_equip_cfg_src(RD_Entity *entity, RD_CfgSrc cfg_src); +internal void rd_entity_equip_timestamp(RD_Entity *entity, U64 timestamp); + +//- rjf: control layer correllation equipment +internal void rd_entity_equip_ctrl_handle(RD_Entity *entity, CTRL_Handle handle); +internal void rd_entity_equip_arch(RD_Entity *entity, Arch arch); +internal void rd_entity_equip_ctrl_id(RD_Entity *entity, U32 id); +internal void rd_entity_equip_stack_base(RD_Entity *entity, U64 stack_base); +internal void rd_entity_equip_vaddr_rng(RD_Entity *entity, Rng1U64 range); +internal void rd_entity_equip_vaddr(RD_Entity *entity, U64 vaddr); + +//- rjf: name equipment +internal void rd_entity_equip_name(RD_Entity *entity, String8 name); + +//- rjf: file path map override lookups +internal String8List rd_possible_overrides_from_file_path(Arena *arena, String8 file_path); + +//- rjf: top-level state queries +internal RD_Entity *rd_entity_root(void); +internal RD_EntityList rd_push_entity_list_with_kind(Arena *arena, RD_EntityKind kind); +internal RD_Entity *rd_entity_from_id(RD_EntityID id); +internal RD_Entity *rd_machine_entity_from_machine_id(CTRL_MachineID machine_id); +internal RD_Entity *rd_entity_from_ctrl_handle(CTRL_Handle handle); +internal RD_Entity *rd_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id); +internal RD_Entity *rd_entity_from_name_and_kind(String8 string, RD_EntityKind kind); + +//////////////////////////////// +//~ rjf: Evaluation Spaces + +//- rjf: ctrl entity <-> eval space +internal CTRL_Entity *rd_ctrl_entity_from_eval_space(E_Space space); +internal E_Space rd_eval_space_from_ctrl_entity(CTRL_Entity *entity); + +//- rjf: entity <-> eval space +internal RD_Entity *rd_entity_from_eval_space(E_Space space); +internal E_Space rd_eval_space_from_entity(RD_Entity *entity); + +//- rjf: eval space reads/writes +internal B32 rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range); +internal B32 rd_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range); + +//- rjf: asynchronous streamed reads -> hashes from spaces +internal U128 rd_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated); + +//- rjf: space -> entire range +internal Rng1U64 rd_whole_range_from_eval_space(E_Space space); + +//////////////////////////////// +//~ rjf: Evaluation Visualization + +//- rjf: writing values back to child processes +internal B32 rd_commit_eval_value_string(E_Eval dst_eval, String8 string); + +//- rjf: eval / view rule params tree info extraction +internal U64 rd_base_offset_from_eval(E_Eval eval); +internal E_Value rd_value_from_params_key(MD_Node *params, String8 key); +internal Rng1U64 rd_range_from_eval_params(E_Eval eval, MD_Node *params); +internal TXT_LangKind rd_lang_kind_from_eval_params(E_Eval eval, MD_Node *params); +internal Arch rd_arch_from_eval_params(E_Eval eval, MD_Node *params); +internal Vec2S32 rd_dim2s32_from_eval_params(E_Eval eval, MD_Node *params); +internal R_Tex2DFormat rd_tex2dformat_from_eval_params(E_Eval eval, MD_Node *params); + +//- rjf: eval <-> entity +internal RD_Entity *rd_entity_from_eval_string(String8 string); +internal String8 rd_eval_string_from_entity(Arena *arena, RD_Entity *entity); + +//- rjf: eval <-> file path +internal String8 rd_file_path_from_eval_string(Arena *arena, String8 string); +internal String8 rd_eval_string_from_file_path(Arena *arena, String8 string); + +//////////////////////////////// +//~ rjf: View Rule Kind Functions + +internal RD_ViewRuleInfo *rd_view_rule_info_from_string(String8 string); + +//////////////////////////////// +//~ rjf: View Spec State Functions + +internal void rd_register_view_specs(RD_ViewSpecInfoArray specs); +internal RD_ViewSpec *rd_view_spec_from_string(String8 string); +internal RD_ViewSpec *rd_view_spec_from_kind(RD_ViewKind kind); + +//////////////////////////////// +//~ rjf: View Rule Spec State Functions + +internal void rd_register_view_rule_specs(RD_ViewRuleSpecInfoArray specs); +internal RD_ViewRuleSpec *rd_view_rule_spec_from_string(String8 string); + +//////////////////////////////// +//~ rjf: View State Functions + +//- rjf: allocation/releasing +internal RD_View *rd_view_alloc(void); +internal void rd_view_release(RD_View *view); + +//- rjf: equipment +internal void rd_view_equip_spec(RD_View *view, RD_ViewSpec *spec, String8 query, MD_Node *params); +internal void rd_view_equip_query(RD_View *view, String8 query); +internal void rd_view_equip_loading_info(RD_View *view, B32 is_loading, U64 progress_v, U64 progress_target); + +//- rjf: user state extensions +internal void *rd_view_get_or_push_user_state(RD_View *view, U64 size); +internal Arena *rd_view_push_arena_ext(RD_View *view); +#define rd_view_user_state(view, type) (type *)rd_view_get_or_push_user_state((view), sizeof(type)) + +//- rjf: param saving +internal void rd_view_store_param(RD_View *view, String8 key, String8 value); +internal void rd_view_store_paramf(RD_View *view, String8 key, char *fmt, ...); +#define rd_view_store_param_f32(view, key, f32) rd_view_store_paramf((view), (key), "%ff", (f32)) +#define rd_view_store_param_s64(view, key, s64) rd_view_store_paramf((view), (key), "%I64d", (s64)) +#define rd_view_store_param_u64(view, key, u64) rd_view_store_paramf((view), (key), "0x%I64x", (u64)) + +//////////////////////////////// +//~ rjf: Expand-Keyed Transient View Functions + +internal RD_TransientViewNode *rd_transient_view_node_from_ev_key(RD_View *owner_view, EV_Key key); + +//////////////////////////////// +//~ rjf: Panel State Functions + +internal RD_Panel *rd_panel_alloc(RD_Window *ws); +internal void rd_panel_release(RD_Window *ws, RD_Panel *panel); +internal void rd_panel_release_all_views(RD_Panel *panel); + +//////////////////////////////// +//~ rjf: Window State Functions + +internal RD_Window *rd_window_open(Vec2F32 size, OS_Handle preferred_monitor, RD_CfgSrc cfg_src); + +internal RD_Window *rd_window_from_os_handle(OS_Handle os); + +internal void rd_window_frame(RD_Window *ws); + +//////////////////////////////// +//~ rjf: Eval Visualization + +internal EV_View *rd_ev_view_from_key(U64 key); +internal F32 rd_append_value_strings_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, S32 depth, E_Eval eval, E_Member *member, EV_ViewRuleList *view_rules, String8List *out); +internal String8 rd_value_string_from_eval(Arena *arena, EV_StringFlags flags, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size, E_Eval eval, E_Member *member, EV_ViewRuleList *view_rules); + +//////////////////////////////// +//~ rjf: Hover Eval + +internal void rd_set_hover_eval(Vec2F32 pos, String8 file_path, TxtPt pt, U64 vaddr, String8 string); + +//////////////////////////////// +//~ rjf: Auto-Complete Lister + +internal void rd_autocomp_lister_item_chunk_list_push(Arena *arena, RD_AutoCompListerItemChunkList *list, U64 cap, RD_AutoCompListerItem *item); +internal RD_AutoCompListerItemArray rd_autocomp_lister_item_array_from_chunk_list(Arena *arena, RD_AutoCompListerItemChunkList *list); +internal int rd_autocomp_lister_item_qsort_compare(RD_AutoCompListerItem *a, RD_AutoCompListerItem *b); +internal void rd_autocomp_lister_item_array_sort__in_place(RD_AutoCompListerItemArray *array); + +internal String8 rd_autocomp_query_word_from_input_string_off(String8 input, U64 cursor_off); +internal RD_AutoCompListerParams rd_view_rule_autocomp_lister_params_from_input_cursor(Arena *arena, String8 string, U64 cursor_off); +internal void rd_set_autocomp_lister_query(UI_Key root_key, RD_AutoCompListerParams *params, String8 input, U64 cursor_off); + +//////////////////////////////// +//~ rjf: Search Strings + +internal void rd_set_search_string(String8 string); +internal String8 rd_push_search_string(Arena *arena); + +//////////////////////////////// +//~ rjf: Colors, Fonts, Config + +//- rjf: keybindings +internal OS_Key rd_os_key_from_cfg_string(String8 string); +internal void rd_clear_bindings(void); +internal RD_BindingList rd_bindings_from_name(Arena *arena, String8 name); +internal void rd_bind_name(String8 name, RD_Binding binding); +internal void rd_unbind_name(String8 name, RD_Binding binding); +internal String8List rd_cmd_name_list_from_binding(Arena *arena, RD_Binding binding); + +//- rjf: colors +internal Vec4F32 rd_rgba_from_theme_color(RD_ThemeColor color); +internal RD_ThemeColor rd_theme_color_from_txt_token_kind(TXT_TokenKind kind); + +//- rjf: code -> palette +internal UI_Palette *rd_palette_from_code(RD_PaletteCode code); + +//- rjf: fonts/sizes +internal FNT_Tag rd_font_from_slot(RD_FontSlot slot); +internal F32 rd_font_size_from_slot(RD_FontSlot slot); +internal FNT_RasterFlags rd_raster_flags_from_slot(RD_FontSlot slot); + +//- rjf: settings +internal RD_SettingVal rd_setting_val_from_code(RD_SettingCode code); + +//- rjf: config serialization +internal int rd_qsort_compare__cfg_string_bindings(RD_StringBindingPair *a, RD_StringBindingPair *b); +internal String8List rd_cfg_strings_from_gfx(Arena *arena, String8 root_path, RD_CfgSrc source); + +//////////////////////////////// +//~ rjf: Process Control Info Stringification + +internal String8 rd_string_from_exception_code(U32 code); +internal String8 rd_stop_explanation_string_icon_from_ctrl_event(Arena *arena, CTRL_Event *event, RD_IconKind *icon_out); + +//////////////////////////////// +//~ rjf: Continuous Frame Requests + +internal void rd_request_frame(void); + +//////////////////////////////// +//~ rjf: Main State Accessors + +//- rjf: per-frame arena +internal Arena *rd_frame_arena(void); + +//- rjf: config paths +internal String8 rd_cfg_path_from_src(RD_CfgSrc src); + +//- rjf: entity cache queries +internal RD_EntityList d_query_cached_entity_list_with_kind(RD_EntityKind kind); +internal RD_EntityList d_push_active_target_list(Arena *arena); +internal RD_Entity *d_entity_from_ev_key_and_kind(EV_Key key, RD_EntityKind kind); + +//- rjf: config state +internal RD_CfgTable *rd_cfg_table(void); + +//////////////////////////////// +//~ rjf: Registers + +internal RD_Regs *rd_regs(void); +internal RD_Regs *rd_base_regs(void); +internal RD_Regs *rd_push_regs_(RD_Regs *regs); +#define rd_push_regs(...) rd_push_regs_(&(RD_Regs){rd_regs_lit_init_top __VA_ARGS__}) +internal RD_Regs *rd_pop_regs(void); +#define RD_RegsScope(...) DeferLoop(rd_push_regs(__VA_ARGS__), rd_pop_regs()) +internal void rd_regs_fill_slot_from_string(RD_RegSlot slot, String8 string); + +//////////////////////////////// +//~ rjf: Commands + +// TODO(rjf): @msgs temporary glue +#if 0 +internal D_CmdSpec *rd_cmd_spec_from_kind(RD_CmdKind kind); +#endif +internal RD_CmdKind rd_cmd_kind_from_string(String8 string); + +//- rjf: name -> info +internal RD_CmdKindInfo *rd_cmd_kind_info_from_string(String8 string); + +//- rjf: pushing +internal void rd_push_cmd(String8 name, RD_Regs *regs); +#define rd_cmd(kind, ...) rd_push_cmd(rd_cmd_kind_info_table[kind].string, &(RD_Regs){rd_regs_lit_init_top __VA_ARGS__}) + +//- rjf: iterating +internal B32 rd_next_cmd(RD_Cmd **cmd); + +//////////////////////////////// +//~ rjf: Main Layer Top-Level Calls + +internal void rd_init(CmdLine *cmdln); +internal void rd_frame(void); + +#endif // RADDBG_CORE_H diff --git a/src/dbg_frontend/dbg_frontend_view_rules.h b/src/raddbg/raddbg_inc.c similarity index 50% rename from src/dbg_frontend/dbg_frontend_view_rules.h rename to src/raddbg/raddbg_inc.c index bc905380..07842d04 100644 --- a/src/dbg_frontend/dbg_frontend_view_rules.h +++ b/src/raddbg/raddbg_inc.c @@ -1,7 +1,6 @@ // Copyright (c) 2024 Epic Games Tools // Licensed under the MIT license (https://opensource.org/license/mit/) -#ifndef DBG_FRONTEND_VIEW_RULES_H -#define DBG_FRONTEND_VIEW_RULES_H - -#endif // DBG_FRONTEND_VIEW_RULES_H +#include "raddbg_core.c" +#include "raddbg_widgets.c" +#include "raddbg_views.c" diff --git a/src/raddbg/raddbg_inc.h b/src/raddbg/raddbg_inc.h new file mode 100644 index 00000000..46cb0ece --- /dev/null +++ b/src/raddbg/raddbg_inc.h @@ -0,0 +1,11 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#ifndef RADDBG_INC_H +#define RADDBG_INC_H + +#include "raddbg_core.h" +#include "raddbg_widgets.h" +#include "raddbg_views.h" + +#endif // RADDBG_INC_H diff --git a/src/raddbg/raddbg_main.c b/src/raddbg/raddbg_main.c index 91f67a20..f9e7074c 100644 --- a/src/raddbg/raddbg_main.c +++ b/src/raddbg/raddbg_main.c @@ -50,7 +50,7 @@ // [ ] transient view timeout releasing // // [ ] save view column pcts; generalize to being a first-class thing in -// DF_View, e.g. by just having a string -> f32 store +// RD_View, e.g. by just having a string -> f32 store // [ ] decay arrays to pointers in pointer/value comparison // [ ] EVAL LOOKUP RULES -> currently going 0 -> rdis_count, but we need // to prioritize the primary rdi @@ -471,7 +471,7 @@ // "blocks" vs. "canvas" vs. "expansion" - etc. // [x] @cleanup collapse DF_CfgNodes into just being MD trees, find another way // to encode config source - don't need it at every node -// [x] @cleanup in the frontend, we are starting to have to pass down "DF_Window" +// [x] @cleanup in the frontend, we are starting to have to pass down "RD_Window" // everywhere, because of per-window parameters (e.g. font rendering settings). // this is really better solved by implicit thread-local parameters, similar to // interaction registers, so that one window can "pick" all of the implicit @@ -494,7 +494,7 @@ #define GEO_INIT_MANUAL 1 #define FNT_INIT_MANUAL 1 #define D_INIT_MANUAL 1 -#define DF_INIT_MANUAL 1 +#define RD_INIT_MANUAL 1 //////////////////////////////// //~ rjf: Includes @@ -543,7 +543,7 @@ #include "draw/draw.h" #include "ui/ui_inc.h" #include "dbg_engine/dbg_engine_inc.h" -#include "dbg_frontend/dbg_frontend_inc.h" +#include "raddbg/raddbg_inc.h" //- rjf: [c] #include "base/base_inc.c" @@ -583,7 +583,7 @@ #include "draw/draw.c" #include "ui/ui_inc.c" #include "dbg_engine/dbg_engine_inc.c" -#include "dbg_frontend/dbg_frontend_inc.c" +#include "raddbg/raddbg_inc.c" //////////////////////////////// //~ rjf: Top-Level Execution Types @@ -668,8 +668,8 @@ internal CTRL_WAKEUP_FUNCTION_DEF(wakeup_hook_ctrl) internal B32 frame(void) { - df_frame(); - return df_state->quit; + rd_frame(); + return rd_state->quit; } //////////////////////////////// @@ -766,7 +766,7 @@ entry_point(CmdLine *cmd_line) geo_init(); fnt_init(); d_init(); - df_init(cmd_line); + rd_init(cmd_line); } //- rjf: setup initial target from command line args @@ -775,8 +775,8 @@ entry_point(CmdLine *cmd_line) if(args.node_count > 0 && args.first->string.size != 0) { Temp scratch = scratch_begin(0, 0); - DF_Entity *target = df_entity_alloc(df_entity_root(), DF_EntityKind_Target); - df_entity_equip_cfg_src(target, DF_CfgSrc_CommandLine); + RD_Entity *target = rd_entity_alloc(rd_entity_root(), RD_EntityKind_Target); + rd_entity_equip_cfg_src(target, RD_CfgSrc_CommandLine); String8List passthrough_args_list = {0}; for(String8Node *n = args.first->next; n != 0; n = n->next) { @@ -790,14 +790,14 @@ entry_point(CmdLine *cmd_line) if(args.first->string.size != 0) { String8 exe_name = args.first->string; - DF_Entity *exe = df_entity_alloc(target, DF_EntityKind_Executable); + RD_Entity *exe = rd_entity_alloc(target, RD_EntityKind_Executable); PathStyle style = path_style_from_str8(exe_name); if(style == PathStyle_Relative) { exe_name = push_str8f(scratch.arena, "%S/%S", current_path, exe_name); exe_name = path_normalized_from_string(scratch.arena, exe_name); } - df_entity_equip_name(exe, exe_name); + rd_entity_equip_name(exe, exe_name); } // rjf: equip working directory @@ -805,8 +805,8 @@ entry_point(CmdLine *cmd_line) if(path_part_of_arg.size != 0) { String8 path = push_str8f(scratch.arena, "%S/", path_part_of_arg); - DF_Entity *wdir = df_entity_alloc(target, DF_EntityKind_WorkingDirectory); - df_entity_equip_name(wdir, path); + RD_Entity *wdir = rd_entity_alloc(target, RD_EntityKind_WorkingDirectory); + rd_entity_equip_name(wdir, path); } // rjf: equip args @@ -814,8 +814,8 @@ entry_point(CmdLine *cmd_line) String8 args_str = str8_list_join(scratch.arena, &passthrough_args_list, &join); if(args_str.size != 0) { - DF_Entity *args_entity = df_entity_alloc(target, DF_EntityKind_Arguments); - df_entity_equip_name(args_entity, args_str); + RD_Entity *args_entity = rd_entity_alloc(target, RD_EntityKind_Arguments); + rd_entity_equip_name(args_entity, args_str); } scratch_end(scratch); } @@ -868,8 +868,8 @@ entry_point(CmdLine *cmd_line) if(msg.size != 0) { log_infof("ipc_msg: \"%S\"", msg); - DF_Window *dst_window = df_state->first_window; - for(DF_Window *window = dst_window; window != 0; window = window->next) + RD_Window *dst_window = rd_state->first_window; + for(RD_Window *window = dst_window; window != 0; window = window->next) { if(os_window_is_focused(window->os)) { @@ -883,23 +883,23 @@ entry_point(CmdLine *cmd_line) U64 first_space_pos = str8_find_needle(msg, 0, str8_lit(" "), 0); String8 cmd_kind_name_string = str8_prefix(msg, first_space_pos); String8 cmd_args_string = str8_skip_chop_whitespace(str8_skip(msg, first_space_pos)); - DF_CmdKindInfo *cmd_kind_info = df_cmd_kind_info_from_string(cmd_kind_name_string); - if(cmd_kind_info != &df_nil_cmd_kind_info) DF_RegsScope() + RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(cmd_kind_name_string); + if(cmd_kind_info != &rd_nil_cmd_kind_info) RD_RegsScope() { - if(dst_window != df_window_from_handle(df_regs()->window)) + if(dst_window != rd_window_from_handle(rd_regs()->window)) { - df_regs()->window = df_handle_from_window(dst_window); - df_regs()->panel = df_handle_from_panel(dst_window->focused_panel); - df_regs()->view = dst_window->focused_panel->selected_tab_view; + rd_regs()->window = rd_handle_from_window(dst_window); + rd_regs()->panel = rd_handle_from_panel(dst_window->focused_panel); + rd_regs()->view = dst_window->focused_panel->selected_tab_view; } - df_regs_fill_slot_from_string(cmd_kind_info->query.slot, cmd_args_string); - df_push_cmd(cmd_kind_name_string, df_regs()); - df_request_frame(); + rd_regs_fill_slot_from_string(cmd_kind_info->query.slot, cmd_args_string); + rd_push_cmd(cmd_kind_name_string, rd_regs()); + rd_request_frame(); } else { log_user_errorf("\"%S\" is not a command.", cmd_kind_name_string); - df_request_frame(); + rd_request_frame(); } } } @@ -913,21 +913,21 @@ entry_point(CmdLine *cmd_line) if(auto_run) { auto_run = 0; - df_cmd(DF_CmdKind_LaunchAndRun); + rd_cmd(RD_CmdKind_LaunchAndRun); } //- rjf: auto step if(auto_step) { auto_step = 0; - df_cmd(DF_CmdKind_StepInto); + rd_cmd(RD_CmdKind_StepInto); } //- rjf: jit attach if(jit_attach) { jit_attach = 0; - df_cmd(DF_CmdKind_Attach, .pid = jit_pid); + rd_cmd(RD_CmdKind_Attach, .pid = jit_pid); } } } diff --git a/src/dbg_frontend/dbg_frontend_views.c b/src/raddbg/raddbg_views.c similarity index 74% rename from src/dbg_frontend/dbg_frontend_views.c rename to src/raddbg/raddbg_views.c index d30b0c62..94f45072 100644 --- a/src/dbg_frontend/dbg_frontend_views.c +++ b/src/raddbg/raddbg_views.c @@ -5,59 +5,59 @@ //~ rjf: Code Views internal void -df_code_view_init(DF_CodeViewState *cv, DF_View *view) +rd_code_view_init(RD_CodeViewState *cv, RD_View *view) { if(cv->initialized == 0) { cv->initialized = 1; cv->preferred_column = 1; - cv->find_text_arena = df_view_push_arena_ext(view); + cv->find_text_arena = rd_view_push_arena_ext(view); cv->center_cursor = 1; } - df_view_equip_loading_info(view, 1, 0, 0); + rd_view_equip_loading_info(view, 1, 0, 0); view->loading_t = view->loading_t_target = 1.f; } internal void -df_code_view_cmds(DF_View *view, DF_CodeViewState *cv, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key) +rd_code_view_cmds(RD_View *view, RD_CodeViewState *cv, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key) { - for(DF_Cmd *cmd = 0; df_next_cmd(&cmd);) + for(RD_Cmd *cmd = 0; rd_next_cmd(&cmd);) { // rjf: mismatched window/panel => skip - if(!d_handle_match(df_regs()->window, cmd->regs->window) || - !d_handle_match(df_regs()->panel, cmd->regs->panel)) + if(!rd_handle_match(rd_regs()->window, cmd->regs->window) || + !rd_handle_match(rd_regs()->panel, cmd->regs->panel)) { continue; } // rjf: process - DF_CmdKind kind = df_cmd_kind_from_string(cmd->name); + RD_CmdKind kind = rd_cmd_kind_from_string(cmd->name); switch(kind) { default: break; - case DF_CmdKind_GoToLine: + case RD_CmdKind_GoToLine: { cv->goto_line_num = cmd->regs->cursor.line; }break; - case DF_CmdKind_CenterCursor: + case RD_CmdKind_CenterCursor: { cv->center_cursor = 1; }break; - case DF_CmdKind_ContainCursor: + case RD_CmdKind_ContainCursor: { cv->contain_cursor = 1; }break; - case DF_CmdKind_FindTextForward: + case RD_CmdKind_FindTextForward: { arena_clear(cv->find_text_arena); cv->find_text_fwd = push_str8_copy(cv->find_text_arena, cmd->regs->string); }break; - case DF_CmdKind_FindTextBackward: + case RD_CmdKind_FindTextBackward: { arena_clear(cv->find_text_arena); cv->find_text_bwd = push_str8_copy(cv->find_text_arena, cmd->regs->string); }break; - case DF_CmdKind_ToggleWatchExpressionAtMouse: + case RD_CmdKind_ToggleWatchExpressionAtMouse: { cv->watch_expr_at_mouse = 1; }break; @@ -65,8 +65,8 @@ df_code_view_cmds(DF_View *view, DF_CodeViewState *cv, String8 text_data, TXT_Te } } -internal DF_CodeViewBuildResult -df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key) +internal RD_CodeViewBuildResult +rd_code_view_build(Arena *arena, RD_View *view, RD_CodeViewState *cv, RD_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key) { ProfBeginFunction(); Temp scratch = scratch_begin(&arena, 1); @@ -76,9 +76,9 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie ////////////////////////////// //- rjf: extract invariants // - FNT_Tag code_font = df_font_from_slot(DF_FontSlot_Code); - F32 code_font_size = df_font_size_from_slot(DF_FontSlot_Code); - F32 code_tab_size = fnt_column_size_from_tag_size(code_font, code_font_size)*df_setting_val_from_code(DF_SettingCode_TabWidth).s32; + FNT_Tag code_font = rd_font_from_slot(RD_FontSlot_Code); + F32 code_font_size = rd_font_size_from_slot(RD_FontSlot_Code); + F32 code_tab_size = fnt_column_size_from_tag_size(code_font, code_font_size)*rd_setting_val_from_code(RD_SettingCode_TabWidth).s32; FNT_Metrics code_font_metrics = fnt_metrics_from_tag_size(code_font, code_font_size); F32 code_line_height = ceil_f32(fnt_line_height_from_metrics(&code_font_metrics) * 1.5f); F32 big_glyph_advance = fnt_dim_from_tag_size_string(code_font, code_font_size, 0, 0, str8_lit("H")).x; @@ -86,7 +86,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie F32 scroll_bar_dim = floor_f32(ui_top_font_size()*1.5f); Vec2F32 code_area_dim = v2f32(panel_box_dim.x - scroll_bar_dim, panel_box_dim.y - scroll_bar_dim); S64 num_possible_visible_lines = (S64)(code_area_dim.y/code_line_height)+1; - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); ////////////////////////////// @@ -128,7 +128,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie F32 line_num_width_px = big_glyph_advance * (log10(visible_line_num_range.max) + 3); F32 priority_margin_width_px = 0; F32 catchall_margin_width_px = 0; - if(flags & DF_CodeViewBuildFlag_Margins) + if(flags & RD_CodeViewBuildFlag_Margins) { priority_margin_width_px = big_glyph_advance*3.5f; catchall_margin_width_px = big_glyph_advance*3.5f; @@ -142,35 +142,35 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie Side search_query_side = Side_Invalid; B32 search_query_is_active = 0; { - DF_Window *window = df_window_from_handle(df_regs()->window); - DF_CmdKind query_cmd_kind = df_cmd_kind_from_string(window->query_cmd_name); - if(query_cmd_kind == DF_CmdKind_FindTextForward || - query_cmd_kind == DF_CmdKind_FindTextBackward) + RD_Window *window = rd_window_from_handle(rd_regs()->window); + RD_CmdKind query_cmd_kind = rd_cmd_kind_from_string(window->query_cmd_name); + if(query_cmd_kind == RD_CmdKind_FindTextForward || + query_cmd_kind == RD_CmdKind_FindTextBackward) { search_query = str8(window->query_view_stack_top->query_buffer, window->query_view_stack_top->query_string_size); search_query_is_active = 1; - search_query_side = (query_cmd_kind == DF_CmdKind_FindTextForward) ? Side_Max : Side_Min; + search_query_side = (query_cmd_kind == RD_CmdKind_FindTextForward) ? Side_Max : Side_Min; } } ////////////////////////////// //- rjf: prepare code slice info bundle, for the viewable region of text // - DF_CodeSliceParams code_slice_params = {0}; + RD_CodeSliceParams code_slice_params = {0}; { // rjf: fill basics - code_slice_params.flags = DF_CodeSliceFlag_LineNums|DF_CodeSliceFlag_Clickable; - if(flags & DF_CodeViewBuildFlag_Margins) + code_slice_params.flags = RD_CodeSliceFlag_LineNums|RD_CodeSliceFlag_Clickable; + if(flags & RD_CodeViewBuildFlag_Margins) { - code_slice_params.flags |= DF_CodeSliceFlag_PriorityMargin|DF_CodeSliceFlag_CatchallMargin; + code_slice_params.flags |= RD_CodeSliceFlag_PriorityMargin|RD_CodeSliceFlag_CatchallMargin; } code_slice_params.line_num_range = visible_line_num_range; code_slice_params.line_text = push_array(scratch.arena, String8, visible_line_count); code_slice_params.line_ranges = push_array(scratch.arena, Rng1U64, visible_line_count); code_slice_params.line_tokens = push_array(scratch.arena, TXT_TokenArray, visible_line_count); - code_slice_params.line_bps = push_array(scratch.arena, DF_EntityList, visible_line_count); + code_slice_params.line_bps = push_array(scratch.arena, RD_EntityList, visible_line_count); code_slice_params.line_ips = push_array(scratch.arena, CTRL_EntityList, visible_line_count); - code_slice_params.line_pins = push_array(scratch.arena, DF_EntityList, visible_line_count); + code_slice_params.line_pins = push_array(scratch.arena, RD_EntityList, visible_line_count); code_slice_params.line_vaddrs = push_array(scratch.arena, U64, visible_line_count); code_slice_params.line_infos = push_array(scratch.arena, D_LineList, visible_line_count); code_slice_params.font = code_font; @@ -199,16 +199,16 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: find visible breakpoints for source code ProfScope("find visible breakpoints") { - DF_EntityList bps = d_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - for(DF_EntityNode *n = bps.first; n != 0; n = n->next) + RD_EntityList bps = d_query_cached_entity_list_with_kind(RD_EntityKind_Breakpoint); + for(RD_EntityNode *n = bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(bp, DF_EntityKind_Location); - if(path_match_normalized(loc->string, df_regs()->file_path) && + RD_Entity *bp = n->entity; + RD_Entity *loc = rd_entity_child_from_kind(bp, RD_EntityKind_Location); + if(path_match_normalized(loc->string, rd_regs()->file_path) && visible_line_num_range.min <= loc->text_point.line && loc->text_point.line <= visible_line_num_range.max) { U64 slice_line_idx = (loc->text_point.line-visible_line_num_range.min); - df_entity_list_push(scratch.arena, &code_slice_params.line_bps[slice_line_idx], bp); + rd_entity_list_push(scratch.arena, &code_slice_params.line_bps[slice_line_idx], bp); } } } @@ -216,15 +216,15 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: find live threads mapping to source code ProfScope("find live threads mapping to this file") { - String8 file_path = df_regs()->file_path; - CTRL_Entity *selected_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + String8 file_path = rd_regs()->file_path; + CTRL_Entity *selected_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); CTRL_EntityList threads = ctrl_entity_list_from_kind(d_state->ctrl_entity_store, CTRL_EntityKind_Thread); for(CTRL_EntityNode *thread_n = threads.first; thread_n != 0; thread_n = thread_n->next) { CTRL_Entity *thread = thread_n->v; CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); - U64 unwind_count = (thread == selected_thread) ? df_regs()->unwind_count : 0; - U64 inline_depth = (thread == selected_thread) ? df_regs()->inline_depth : 0; + U64 unwind_count = (thread == selected_thread) ? rd_regs()->unwind_count : 0; + U64 inline_depth = (thread == selected_thread) ? rd_regs()->inline_depth : 0; U64 rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count); U64 last_inst_on_unwound_rip_vaddr = rip_vaddr - !!unwind_count; CTRL_Entity *module = ctrl_module_from_process_vaddr(process, last_inst_on_unwound_rip_vaddr); @@ -245,16 +245,16 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: find visible watch pins for source code ProfScope("find visible watch pins") { - DF_EntityList wps = d_query_cached_entity_list_with_kind(DF_EntityKind_WatchPin); - for(DF_EntityNode *n = wps.first; n != 0; n = n->next) + RD_EntityList wps = d_query_cached_entity_list_with_kind(RD_EntityKind_WatchPin); + for(RD_EntityNode *n = wps.first; n != 0; n = n->next) { - DF_Entity *wp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(wp, DF_EntityKind_Location); - if(path_match_normalized(loc->string, df_regs()->file_path) && + RD_Entity *wp = n->entity; + RD_Entity *loc = rd_entity_child_from_kind(wp, RD_EntityKind_Location); + if(path_match_normalized(loc->string, rd_regs()->file_path) && visible_line_num_range.min <= loc->text_point.line && loc->text_point.line <= visible_line_num_range.max) { U64 slice_line_idx = (loc->text_point.line-visible_line_num_range.min); - df_entity_list_push(scratch.arena, &code_slice_params.line_pins[slice_line_idx], wp); + rd_entity_list_push(scratch.arena, &code_slice_params.line_pins[slice_line_idx], wp); } } } @@ -262,7 +262,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: find all src -> dasm info ProfScope("find all src -> dasm info") { - String8 file_path = df_regs()->file_path; + String8 file_path = rd_regs()->file_path; D_LineListArray lines_array = d_lines_array_from_file_path_line_range(scratch.arena, file_path, visible_line_num_range); if(lines_array.count != 0) { @@ -274,12 +274,12 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: find live threads mapping to disasm if(dasm_lines) ProfScope("find live threads mapping to this disassembly") { - CTRL_Entity *selected_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *selected_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); CTRL_EntityList threads = ctrl_entity_list_from_kind(d_state->ctrl_entity_store, CTRL_EntityKind_Thread); for(CTRL_EntityNode *thread_n = threads.first; thread_n != 0; thread_n = thread_n->next) { CTRL_Entity *thread = thread_n->v; - U64 unwind_count = (thread == selected_thread) ? df_regs()->unwind_count : 0; + U64 unwind_count = (thread == selected_thread) ? rd_regs()->unwind_count : 0; U64 rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count); if(ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process) == process && contains_1u64(dasm_vaddr_range, rip_vaddr)) { @@ -297,12 +297,12 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: find breakpoints mapping to this disasm if(dasm_lines) ProfScope("find breakpoints mapping to this disassembly") { - DF_EntityList bps = d_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); - for(DF_EntityNode *n = bps.first; n != 0; n = n->next) + RD_EntityList bps = d_query_cached_entity_list_with_kind(RD_EntityKind_Breakpoint); + for(RD_EntityNode *n = bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - DF_Entity *loc = df_entity_child_from_kind(bp, DF_EntityKind_Location); - if(loc->flags & DF_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, loc->vaddr)) + RD_Entity *bp = n->entity; + RD_Entity *loc = rd_entity_child_from_kind(bp, RD_EntityKind_Location); + if(loc->flags & RD_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, loc->vaddr)) { U64 off = loc->vaddr-dasm_vaddr_range.min; U64 idx = dasm_line_array_idx_from_code_off__linear_scan(dasm_lines, off); @@ -310,7 +310,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie if(contains_1s64(visible_line_num_range, line_num)) { U64 slice_line_idx = (line_num-visible_line_num_range.min); - df_entity_list_push(scratch.arena, &code_slice_params.line_bps[slice_line_idx], bp); + rd_entity_list_push(scratch.arena, &code_slice_params.line_bps[slice_line_idx], bp); } } } @@ -319,12 +319,12 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: find watch pins mapping to this disasm if(dasm_lines) ProfScope("find watch pins mapping to this disassembly") { - DF_EntityList pins = d_query_cached_entity_list_with_kind(DF_EntityKind_WatchPin); - for(DF_EntityNode *n = pins.first; n != 0; n = n->next) + RD_EntityList pins = d_query_cached_entity_list_with_kind(RD_EntityKind_WatchPin); + for(RD_EntityNode *n = pins.first; n != 0; n = n->next) { - DF_Entity *pin = n->entity; - DF_Entity *loc = df_entity_child_from_kind(pin, DF_EntityKind_Location); - if(loc->flags & DF_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, loc->vaddr)) + RD_Entity *pin = n->entity; + RD_Entity *loc = rd_entity_child_from_kind(pin, RD_EntityKind_Location); + if(loc->flags & RD_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, loc->vaddr)) { U64 off = loc->vaddr-dasm_vaddr_range.min; U64 idx = dasm_line_array_idx_from_code_off__linear_scan(dasm_lines, off); @@ -332,7 +332,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie if(contains_1s64(visible_line_num_range, line_num)) { U64 slice_line_idx = (line_num-visible_line_num_range.min); - df_entity_list_push(scratch.arena, &code_slice_params.line_pins[slice_line_idx], pin); + rd_entity_list_push(scratch.arena, &code_slice_params.line_pins[slice_line_idx], pin); } } } @@ -394,7 +394,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie Temp scratch = scratch_begin(0, 0); B32 found = 0; B32 first = 1; - S64 line_num_start = df_regs()->cursor.line; + S64 line_num_start = rd_regs()->cursor.line; S64 line_num_last = (S64)text_info->lines_count; for(S64 line_num = line_num_start;; first = 0) { @@ -404,18 +404,18 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: gather line info String8 line_string = str8_substr(text_data, text_info->lines_ranges[line_num-1]); U64 search_start = 0; - if(df_regs()->cursor.line == line_num && first) + if(rd_regs()->cursor.line == line_num && first) { - search_start = df_regs()->cursor.column; + search_start = rd_regs()->cursor.column; } // rjf: search string U64 needle_pos = str8_find_needle(line_string, search_start, cv->find_text_fwd, StringMatchFlag_CaseInsensitive); if(needle_pos < line_string.size) { - df_regs()->cursor.line = line_num; - df_regs()->cursor.column = needle_pos+1; - df_regs()->mark = df_regs()->cursor; + rd_regs()->cursor.line = line_num; + rd_regs()->cursor.column = needle_pos+1; + rd_regs()->mark = rd_regs()->cursor; found = 1; break; } @@ -447,7 +447,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie Temp scratch = scratch_begin(0, 0); B32 found = 0; B32 first = 1; - S64 line_num_start = df_regs()->cursor.line; + S64 line_num_start = rd_regs()->cursor.line; S64 line_num_last = (S64)text_info->lines_count; for(S64 line_num = line_num_start;; first = 0) { @@ -456,9 +456,9 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: gather line info String8 line_string = str8_substr(text_data, text_info->lines_ranges[line_num-1]); - if(df_regs()->cursor.line == line_num && first) + if(rd_regs()->cursor.line == line_num && first) { - line_string = str8_prefix(line_string, df_regs()->cursor.column-1); + line_string = str8_prefix(line_string, rd_regs()->cursor.column-1); } // rjf: search string @@ -474,9 +474,9 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie } if(next_needle_pos < line_string.size) { - df_regs()->cursor.line = line_num; - df_regs()->cursor.column = next_needle_pos+1; - df_regs()->mark = df_regs()->cursor; + rd_regs()->cursor.line = line_num; + rd_regs()->cursor.column = next_needle_pos+1; + rd_regs()->mark = rd_regs()->cursor; found = 1; break; } @@ -515,7 +515,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie S64 line_num = cv->goto_line_num; cv->goto_line_num = 0; line_num = Clamp(1, line_num, text_info->lines_count); - df_regs()->cursor = df_regs()->mark = txt_pt(line_num, 1); + rd_regs()->cursor = rd_regs()->mark = txt_pt(line_num, 1); cv->center_cursor = !cv->contain_cursor || (line_num < target_visible_line_num_range.min+4 || target_visible_line_num_range.max-4 < line_num); } @@ -527,7 +527,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie { if(ui_is_focus_active() && visible_line_num_range.max >= visible_line_num_range.min) { - snap[Axis2_X] = snap[Axis2_Y] = df_do_txt_controls(text_info, text_data, ClampBot(num_possible_visible_lines, 10) - 10, &df_regs()->cursor, &df_regs()->mark, &cv->preferred_column); + snap[Axis2_X] = snap[Axis2_Y] = rd_do_txt_controls(text_info, text_data, ClampBot(num_possible_visible_lines, 10) - 10, &rd_regs()->cursor, &rd_regs()->mark, &cv->preferred_column); } } @@ -541,16 +541,16 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie container_box->view_off.y = container_box->view_off_target.y = code_line_height*mod_f32(view->scroll_pos.y.off, 1.f) + code_line_height*(view->scroll_pos.y.off < 0) - code_line_height*(view->scroll_pos.y.off == -1.f && view->scroll_pos.y.idx == 1); //- rjf: build code slice - DF_CodeSliceSignal sig = {0}; + RD_CodeSliceSignal sig = {0}; UI_Focus(UI_FocusKind_On) { - sig = df_code_slicef(&code_slice_params, &df_regs()->cursor, &df_regs()->mark, &cv->preferred_column, "txt_view_%p", view); + sig = rd_code_slicef(&code_slice_params, &rd_regs()->cursor, &rd_regs()->mark, &cv->preferred_column, "txt_view_%p", view); } //- rjf: press code slice? -> focus panel if(ui_pressed(sig.base)) { - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); } //- rjf: dragging & outside region? -> contain cursor @@ -570,21 +570,21 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie if(ui_pressed(sig.base) && sig.base.event_flags & OS_EventFlag_Ctrl) { ui_kill_action(); - df_cmd(DF_CmdKind_GoToName, .string = txt_string_from_info_data_txt_rng(text_info, text_data, sig.mouse_expr_rng)); + rd_cmd(RD_CmdKind_GoToName, .string = txt_string_from_info_data_txt_rng(text_info, text_data, sig.mouse_expr_rng)); } //- rjf: watch expr at mouse if(cv->watch_expr_at_mouse) { cv->watch_expr_at_mouse = 0; - df_cmd(DF_CmdKind_ToggleWatchExpression, .string = txt_string_from_info_data_txt_rng(text_info, text_data, sig.mouse_expr_rng)); + rd_cmd(RD_CmdKind_ToggleWatchExpression, .string = txt_string_from_info_data_txt_rng(text_info, text_data, sig.mouse_expr_rng)); } //- rjf: selected text on single line, no query? -> set search text - if(!txt_pt_match(df_regs()->cursor, df_regs()->mark) && df_regs()->cursor.line == df_regs()->mark.line && search_query.size == 0) + if(!txt_pt_match(rd_regs()->cursor, rd_regs()->mark) && rd_regs()->cursor.line == rd_regs()->mark.line && search_query.size == 0) { - String8 text = txt_string_from_info_data_txt_rng(text_info, text_data, txt_rng(df_regs()->cursor, df_regs()->mark)); - df_set_search_string(text); + String8 text = txt_string_from_info_data_txt_rng(text_info, text_data, txt_rng(rd_regs()->cursor, rd_regs()->mark)); + rd_set_search_string(text); } } @@ -604,8 +604,8 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie if(cv->center_cursor) { cv->center_cursor = 0; - String8 cursor_line = str8_substr(text_data, text_info->lines_ranges[df_regs()->cursor.line-1]); - F32 cursor_advance = fnt_dim_from_tag_size_string(code_font, code_font_size, 0, code_tab_size, str8_prefix(cursor_line, df_regs()->cursor.column-1)).x; + String8 cursor_line = str8_substr(text_data, text_info->lines_ranges[rd_regs()->cursor.line-1]); + F32 cursor_advance = fnt_dim_from_tag_size_string(code_font, code_font_size, 0, code_tab_size, str8_prefix(cursor_line, rd_regs()->cursor.column-1)).x; // rjf: scroll x { @@ -617,7 +617,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: scroll y { - S64 new_idx = (df_regs()->cursor.line-1) - num_possible_visible_lines/2 + 2; + S64 new_idx = (rd_regs()->cursor.line-1) - num_possible_visible_lines/2 + 2; new_idx = Clamp(scroll_idx_rng[Axis2_Y].min, new_idx, scroll_idx_rng[Axis2_Y].max); ui_scroll_pt_target_idx(&view->scroll_pos.y, new_idx); snap[Axis2_Y] = 0; @@ -627,8 +627,8 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: snap in X if(snap[Axis2_X]) { - String8 cursor_line = str8_substr(text_data, text_info->lines_ranges[df_regs()->cursor.line-1]); - S64 cursor_off = (S64)(fnt_dim_from_tag_size_string(code_font, code_font_size, 0, code_tab_size, str8_prefix(cursor_line, df_regs()->cursor.column-1)).x + priority_margin_width_px + catchall_margin_width_px + line_num_width_px); + String8 cursor_line = str8_substr(text_data, text_info->lines_ranges[rd_regs()->cursor.line-1]); + S64 cursor_off = (S64)(fnt_dim_from_tag_size_string(code_font, code_font_size, 0, code_tab_size, str8_prefix(cursor_line, rd_regs()->cursor.column-1)).x + priority_margin_width_px + catchall_margin_width_px + line_num_width_px); Rng1S64 visible_pixel_range = { view->scroll_pos.x.idx, @@ -649,7 +649,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie // rjf: snap in Y if(snap[Axis2_Y]) { - Rng1S64 cursor_visibility_range = r1s64(df_regs()->cursor.line-4, df_regs()->cursor.line+4); + Rng1S64 cursor_visibility_range = r1s64(rd_regs()->cursor.line-4, rd_regs()->cursor.line+4); cursor_visibility_range.min = ClampBot(0, cursor_visibility_range.min); cursor_visibility_range.max = ClampBot(0, cursor_visibility_range.max); S64 min_delta = Min(0, cursor_visibility_range.min-(target_visible_line_num_range.min)); @@ -722,11 +722,11 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie ui_eat_event(evt); if(evt->delta_2f32.y < 0) { - df_cmd(DF_CmdKind_IncCodeFontScale); + rd_cmd(RD_CmdKind_IncCodeFontScale); } else if(evt->delta_2f32.y > 0) { - df_cmd(DF_CmdKind_DecCodeFontScale); + rd_cmd(RD_CmdKind_DecCodeFontScale); } } } @@ -736,7 +736,7 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie ////////////////////////////// //- rjf: build result // - DF_CodeViewBuildResult result = {0}; + RD_CodeViewBuildResult result = {0}; { for(DI_KeyNode *n = code_slice_params.relevant_dbgi_keys.first; n != 0; n = n->next) { @@ -757,12 +757,12 @@ df_code_view_build(Arena *arena, DF_View *view, DF_CodeViewState *cv, DF_CodeVie //- rjf: index -> column -internal DF_WatchViewColumn * -df_watch_view_column_from_x(DF_WatchViewState *wv, S64 index) +internal RD_WatchViewColumn * +rd_watch_view_column_from_x(RD_WatchViewState *wv, S64 index) { - DF_WatchViewColumn *result = wv->first_column; + RD_WatchViewColumn *result = wv->first_column; S64 idx = 0; - for(DF_WatchViewColumn *c = wv->first_column; c != 0; c = c->next, idx += 1) + for(RD_WatchViewColumn *c = wv->first_column; c != 0; c = c->next, idx += 1) { result = c; if(idx == index) @@ -776,17 +776,17 @@ df_watch_view_column_from_x(DF_WatchViewState *wv, S64 index) //- rjf: watch view points <-> table coordinates internal B32 -df_watch_view_point_match(DF_WatchViewPoint a, DF_WatchViewPoint b) +rd_watch_view_point_match(RD_WatchViewPoint a, RD_WatchViewPoint b) { return (a.x == b.x && ev_key_match(a.parent_key, b.parent_key) && ev_key_match(a.key, b.key)); } -internal DF_WatchViewPoint -df_watch_view_point_from_tbl(EV_BlockList *blocks, Vec2S64 tbl) +internal RD_WatchViewPoint +rd_watch_view_point_from_tbl(EV_BlockList *blocks, Vec2S64 tbl) { - DF_WatchViewPoint pt = zero_struct; + RD_WatchViewPoint pt = zero_struct; pt.x = tbl.x; pt.key = ev_key_from_block_list_row_num(blocks, tbl.y); pt.parent_key = ev_parent_key_from_block_list_row_num(blocks, tbl.y); @@ -794,7 +794,7 @@ df_watch_view_point_from_tbl(EV_BlockList *blocks, Vec2S64 tbl) } internal Vec2S64 -df_tbl_from_watch_view_point(EV_BlockList *blocks, DF_WatchViewPoint pt) +rd_tbl_from_watch_view_point(EV_BlockList *blocks, RD_WatchViewPoint pt) { Vec2S64 tbl = {0}; tbl.x = pt.x; @@ -805,44 +805,44 @@ df_tbl_from_watch_view_point(EV_BlockList *blocks, DF_WatchViewPoint pt) //- rjf: table coordinates -> strings internal String8 -df_string_from_eval_viz_row_column(Arena *arena, EV_View *ev, EV_Row *row, DF_WatchViewColumn *col, B32 editable, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px) +rd_string_from_eval_viz_row_column(Arena *arena, EV_View *ev, EV_Row *row, RD_WatchViewColumn *col, B32 editable, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px) { String8 result = {0}; switch(col->kind) { default:{}break; - case DF_WatchViewColumnKind_Expr: + case RD_WatchViewColumnKind_Expr: { result = ev_expr_string_from_row(arena, row); }break; - case DF_WatchViewColumnKind_Value: + case RD_WatchViewColumnKind_Value: { E_Eval eval = e_eval_from_expr(arena, row->expr); - result = df_value_string_from_eval(arena, !editable * EV_StringFlag_ReadOnlyDisplayRules, default_radix, font, font_size, max_size_px, eval, row->member, row->view_rules); + result = rd_value_string_from_eval(arena, !editable * EV_StringFlag_ReadOnlyDisplayRules, default_radix, font, font_size, max_size_px, eval, row->member, row->view_rules); }break; - case DF_WatchViewColumnKind_Type: + case RD_WatchViewColumnKind_Type: { E_IRTreeAndType irtree = e_irtree_and_type_from_expr(arena, row->expr); E_TypeKey type_key = irtree.type_key; result = !e_type_key_match(type_key, e_type_key_zero()) ? e_type_string_from_key(arena, type_key) : str8_zero(); result = str8_skip_chop_whitespace(result); }break; - case DF_WatchViewColumnKind_ViewRule: + case RD_WatchViewColumnKind_ViewRule: { result = ev_view_rule_from_key(ev, row->key); }break; - case DF_WatchViewColumnKind_Module: + case RD_WatchViewColumnKind_Module: { E_Eval eval = e_eval_from_expr(arena, row->expr); - CTRL_Entity *process = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->process); + CTRL_Entity *process = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->process); CTRL_Entity *module = ctrl_module_from_process_vaddr(process, eval.value.u64); result = push_str8_copy(arena, module->string); }break; - case DF_WatchViewColumnKind_Member: + case RD_WatchViewColumnKind_Member: { E_Expr *expr = e_expr_ref_member_access(arena, row->expr, str8(col->string_buffer, col->string_size)); E_Eval eval = e_eval_from_expr(arena, expr); - result = df_value_string_from_eval(arena, !editable * EV_StringFlag_ReadOnlyDisplayRules, default_radix, font, font_size, max_size_px, eval, row->member, row->view_rules); + result = rd_value_string_from_eval(arena, !editable * EV_StringFlag_ReadOnlyDisplayRules, default_radix, font, font_size, max_size_px, eval, row->member, row->view_rules); }break; } if(col->dequote_string && @@ -857,17 +857,17 @@ df_string_from_eval_viz_row_column(Arena *arena, EV_View *ev, EV_Row *row, DF_Wa //- rjf: table coordinates -> text edit state -internal DF_WatchViewTextEditState * -df_watch_view_text_edit_state_from_pt(DF_WatchViewState *wv, DF_WatchViewPoint pt) +internal RD_WatchViewTextEditState * +rd_watch_view_text_edit_state_from_pt(RD_WatchViewState *wv, RD_WatchViewPoint pt) { - DF_WatchViewTextEditState *result = &wv->dummy_text_edit_state; + RD_WatchViewTextEditState *result = &wv->dummy_text_edit_state; if(wv->text_edit_state_slots_count != 0 && wv->text_editing != 0) { U64 hash = ev_hash_from_key(pt.key); U64 slot_idx = hash%wv->text_edit_state_slots_count; - for(DF_WatchViewTextEditState *s = wv->text_edit_state_slots[slot_idx]; s != 0; s = s->pt_hash_next) + for(RD_WatchViewTextEditState *s = wv->text_edit_state_slots[slot_idx]; s != 0; s = s->pt_hash_next) { - if(df_watch_view_point_match(pt, s->pt)) + if(rd_watch_view_point_match(pt, s->pt)) { result = s; break; @@ -879,15 +879,15 @@ df_watch_view_text_edit_state_from_pt(DF_WatchViewState *wv, DF_WatchViewPoint p //- rjf: watch view column state mutation -internal DF_WatchViewColumn * -df_watch_view_column_alloc_(DF_WatchViewState *wv, DF_WatchViewColumnKind kind, F32 pct, DF_WatchViewColumnParams *params) +internal RD_WatchViewColumn * +rd_watch_view_column_alloc_(RD_WatchViewState *wv, RD_WatchViewColumnKind kind, F32 pct, RD_WatchViewColumnParams *params) { if(!wv->free_column) { - DF_WatchViewColumn *col = push_array(wv->column_arena, DF_WatchViewColumn, 1); + RD_WatchViewColumn *col = push_array(wv->column_arena, RD_WatchViewColumn, 1); SLLStackPush(wv->free_column, col); } - DF_WatchViewColumn *col = wv->free_column; + RD_WatchViewColumn *col = wv->free_column; SLLStackPop(wv->free_column); DLLPushBack(wv->first_column, wv->last_column, col); wv->column_count += 1; @@ -905,7 +905,7 @@ df_watch_view_column_alloc_(DF_WatchViewState *wv, DF_WatchViewColumnKind kind, } internal void -df_watch_view_column_release(DF_WatchViewState *wv, DF_WatchViewColumn *col) +rd_watch_view_column_release(RD_WatchViewState *wv, RD_WatchViewColumn *col) { DLLRemove(wv->first_column, wv->last_column, col); SLLStackPush(wv->free_column, col); @@ -915,19 +915,19 @@ df_watch_view_column_release(DF_WatchViewState *wv, DF_WatchViewColumn *col) //- rjf: watch view main hooks internal void -df_watch_view_init(DF_WatchViewState *ewv, DF_View *view, DF_WatchViewFillKind fill_kind) +rd_watch_view_init(RD_WatchViewState *ewv, RD_View *view, RD_WatchViewFillKind fill_kind) { if(ewv->initialized == 0) { ewv->initialized = 1; ewv->fill_kind = fill_kind; - ewv->column_arena = df_view_push_arena_ext(view); - ewv->text_edit_arena = df_view_push_arena_ext(view); + ewv->column_arena = rd_view_push_arena_ext(view); + ewv->text_edit_arena = rd_view_push_arena_ext(view); } } internal void -df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect) +rd_watch_view_build(RD_View *view, RD_WatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect) { ProfBeginFunction(); DI_Scope *di_scope = di_scope_open(); @@ -937,13 +937,13 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d ////////////////////////////// //- rjf: unpack arguments // - FNT_Tag code_font = df_font_from_slot(DF_FontSlot_Code); + FNT_Tag code_font = rd_font_from_slot(RD_FontSlot_Code); String8 eval_view_key_string = push_str8f(scratch.arena, "eval_view_watch_%p", ewv); - EV_View *eval_view = df_ev_view_from_key(d_hash_from_string(eval_view_key_string)); + EV_View *eval_view = rd_ev_view_from_key(d_hash_from_string(eval_view_key_string)); String8 filter = str8(view->query_buffer, view->query_string_size); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); S64 num_possible_visible_rows = (S64)(dim_2f32(rect).y/row_height_px); - DF_EntityKind mutable_entity_kind = DF_EntityKind_Nil; + RD_EntityKind mutable_entity_kind = RD_EntityKind_Nil; F32 row_string_max_size_px = dim_2f32(rect).x; ////////////////////////////// @@ -1004,20 +1004,20 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //- rjf: watch fill -> build blocks from top-level watch expressions // default: - case DF_WatchViewFillKind_Watch: + case RD_WatchViewFillKind_Watch: { - mutable_entity_kind = DF_EntityKind_Watch; - DF_EntityList watches = d_query_cached_entity_list_with_kind(mutable_entity_kind); - for(DF_EntityNode *n = watches.first; n != 0; n = n->next) + mutable_entity_kind = RD_EntityKind_Watch; + RD_EntityList watches = d_query_cached_entity_list_with_kind(mutable_entity_kind); + for(RD_EntityNode *n = watches.first; n != 0; n = n->next) { - DF_Entity *watch = n->entity; - if(watch->flags & DF_EntityFlag_MarkedForDeletion) + RD_Entity *watch = n->entity; + if(watch->flags & RD_EntityFlag_MarkedForDeletion) { continue; } - EV_Key parent_key = df_parent_ev_key_from_entity(watch); - EV_Key key = df_ev_key_from_entity(watch); - DF_Entity *view_rule = df_entity_child_from_kind(watch, DF_EntityKind_ViewRule); + EV_Key parent_key = rd_parent_ev_key_from_entity(watch); + EV_Key key = rd_ev_key_from_entity(watch); + RD_Entity *view_rule = rd_entity_child_from_kind(watch, RD_EntityKind_ViewRule); ev_key_set_view_rule(eval_view, key, view_rule->string); String8 expr_string = watch->string; FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, expr_string); @@ -1032,21 +1032,21 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //////////////////////////// //- rjf: breakpoint fill -> build blocks from all breakpoints // - case DF_WatchViewFillKind_Breakpoints: + case RD_WatchViewFillKind_Breakpoints: { - mutable_entity_kind = DF_EntityKind_Breakpoint; + mutable_entity_kind = RD_EntityKind_Breakpoint; ev_view_rule_list_push_string(scratch.arena, &top_level_view_rules, str8_lit("no_addr")); - DF_EntityList bps = d_query_cached_entity_list_with_kind(mutable_entity_kind); - for(DF_EntityNode *n = bps.first; n != 0; n = n->next) + RD_EntityList bps = d_query_cached_entity_list_with_kind(mutable_entity_kind); + for(RD_EntityNode *n = bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - if(bp->flags & DF_EntityFlag_MarkedForDeletion) + RD_Entity *bp = n->entity; + if(bp->flags & RD_EntityFlag_MarkedForDeletion) { continue; } - EV_Key parent_key = df_parent_ev_key_from_entity(bp); - EV_Key key = df_ev_key_from_entity(bp); - String8 title = df_display_string_from_entity(scratch.arena, bp); + EV_Key parent_key = rd_parent_ev_key_from_entity(bp); + EV_Key key = rd_ev_key_from_entity(bp); + String8 title = rd_display_string_from_entity(scratch.arena, bp); FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, title); if(matches.count == matches.needle_part_count) { @@ -1063,7 +1063,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d E_Expr *bp_expr = e_push_expr(scratch.arena, E_ExprKind_LeafOffset, 0); bp_expr->type_key = bp_type; bp_expr->mode = E_Mode_Offset; - bp_expr->space = d_eval_space_from_entity(bp); + bp_expr->space = rd_eval_space_from_entity(bp); ev_append_expr_blocks__rec(scratch.arena, eval_view, parent_key, key, title, bp_expr, &top_level_view_rules, 0, &blocks); } } @@ -1072,19 +1072,19 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //////////////////////////// //- rjf: watch pin fill -> build blocks from all watch pins // - case DF_WatchViewFillKind_WatchPins: + case RD_WatchViewFillKind_WatchPins: { - mutable_entity_kind = DF_EntityKind_WatchPin; - DF_EntityList wps = d_query_cached_entity_list_with_kind(mutable_entity_kind); - for(DF_EntityNode *n = wps.first; n != 0; n = n->next) + mutable_entity_kind = RD_EntityKind_WatchPin; + RD_EntityList wps = d_query_cached_entity_list_with_kind(mutable_entity_kind); + for(RD_EntityNode *n = wps.first; n != 0; n = n->next) { - DF_Entity *wp = n->entity; - if(wp->flags & DF_EntityFlag_MarkedForDeletion) + RD_Entity *wp = n->entity; + if(wp->flags & RD_EntityFlag_MarkedForDeletion) { continue; } - EV_Key parent_key = df_parent_ev_key_from_entity(wp); - EV_Key key = df_ev_key_from_entity(wp); + EV_Key parent_key = rd_parent_ev_key_from_entity(wp); + EV_Key key = rd_ev_key_from_entity(wp); String8 title = wp->string; FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, filter, title); if(matches.count == matches.needle_part_count) @@ -1098,7 +1098,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d E_Expr *wp_expr = e_push_expr(scratch.arena, E_ExprKind_LeafOffset, 0); wp_expr->type_key = wp_type; wp_expr->mode = E_Mode_Offset; - wp_expr->space = d_eval_space_from_entity(wp); + wp_expr->space = rd_eval_space_from_entity(wp); ev_append_expr_blocks__rec(scratch.arena, eval_view, parent_key, key, title, wp_expr, &top_level_view_rules, 0, &blocks); } } @@ -1107,10 +1107,10 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //////////////////////////// //- rjf: call stack fill -> build blocks for each call frame // - case DF_WatchViewFillKind_CallStack: + case RD_WatchViewFillKind_CallStack: { //- rjf: produce per-row info for callstack - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); CTRL_Unwind base_unwind = d_query_cached_unwind_from_thread(thread); D_Unwind rich_unwind = d_unwind_from_ctrl_unwind(scratch.arena, di_scope, process, &base_unwind); @@ -1170,7 +1170,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d E_Expr *expr = e_push_expr(scratch.arena, E_ExprKind_LeafBytecode, 0); expr->bytecode = bytecode; expr->mode = E_Mode_Value; - expr->space = d_eval_space_from_ctrl_entity(process); + expr->space = rd_eval_space_from_ctrl_entity(process); expr->type_key = type_key; block->expr = expr; block->visual_idx_range = r1u64(row_idx, row_idx+1); @@ -1183,9 +1183,9 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //////////////////////////// //- rjf: registers fill -> build blocks via iterating all registers/aliases as root-level expressions // - case DF_WatchViewFillKind_Registers: + case RD_WatchViewFillKind_Registers: { - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); Arch arch = thread->arch; U64 reg_count = regs_reg_code_count_from_arch(arch); String8 *reg_strings = regs_reg_code_string_table_from_arch(arch); @@ -1221,7 +1221,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //////////////////////////// //- rjf: locals fill -> build blocks via iterating all locals as root-level expressions // - case DF_WatchViewFillKind_Locals: + case RD_WatchViewFillKind_Locals: { E_String2NumMapNodeArray nodes = e_string2num_map_node_array_from_map(scratch.arena, e_parse_ctx->locals_map); e_string2num_map_node_array_sort__in_place(&nodes); @@ -1243,10 +1243,10 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //////////////////////////// //- rjf: debug info table fill -> build split debug info table blocks // - case DF_WatchViewFillKind_Globals: fzy_target = RDI_SectionKind_GlobalVariables; goto dbgi_table; - case DF_WatchViewFillKind_ThreadLocals: fzy_target = RDI_SectionKind_ThreadVariables; goto dbgi_table; - case DF_WatchViewFillKind_Types: fzy_target = RDI_SectionKind_UDTs; goto dbgi_table; - case DF_WatchViewFillKind_Procedures: fzy_target = RDI_SectionKind_Procedures; goto dbgi_table; + case RD_WatchViewFillKind_Globals: fzy_target = RDI_SectionKind_GlobalVariables; goto dbgi_table; + case RD_WatchViewFillKind_ThreadLocals: fzy_target = RDI_SectionKind_ThreadVariables; goto dbgi_table; + case RD_WatchViewFillKind_Types: fzy_target = RDI_SectionKind_UDTs; goto dbgi_table; + case RD_WatchViewFillKind_Procedures: fzy_target = RDI_SectionKind_Procedures; goto dbgi_table; dbgi_table:; { U64 endt_us = os_now_microseconds()+200; @@ -1274,7 +1274,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d FZY_ItemArray items = fzy_items_from_key_params_query(fzy_scope, fuzzy_search_key, ¶ms, filter, endt_us, &items_stale); if(items_stale) { - df_request_frame(); + rd_request_frame(); } //- rjf: gather unsorted child expansion keys @@ -1415,7 +1415,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d cursor_dirty__tbl = 0; struct { - DF_WatchViewPoint *pt_state; + RD_WatchViewPoint *pt_state; Vec2S64 pt_tbl; } points[] = @@ -1427,7 +1427,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d { EV_Key last_key = points[point_idx].pt_state->key; EV_Key last_parent_key = points[point_idx].pt_state->parent_key; - points[point_idx].pt_state[0] = df_watch_view_point_from_tbl(&blocks, points[point_idx].pt_tbl); + points[point_idx].pt_state[0] = rd_watch_view_point_from_tbl(&blocks, points[point_idx].pt_tbl); if(ev_key_match(ev_key_zero(), points[point_idx].pt_state->key)) { points[point_idx].pt_state->key = last_parent_key; @@ -1456,8 +1456,8 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //- rjf: stable cursor state * blocks -> 2D table coordinates // { - cursor_tbl = df_tbl_from_watch_view_point(&blocks, ewv->cursor); - mark_tbl = df_tbl_from_watch_view_point(&blocks, ewv->mark); + cursor_tbl = rd_tbl_from_watch_view_point(&blocks, ewv->cursor); + mark_tbl = rd_tbl_from_watch_view_point(&blocks, ewv->mark); selection_tbl = r2s64p(Min(cursor_tbl.x, mark_tbl.x), Min(cursor_tbl.y, mark_tbl.y), Max(cursor_tbl.x, mark_tbl.x), Max(cursor_tbl.y, mark_tbl.y)); } @@ -1503,7 +1503,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //- rjf: apply cursor/mark rugpull change // B32 cursor_rugpull = 0; - if(!df_watch_view_point_match(ewv->cursor, ewv->next_cursor)) + if(!rd_watch_view_point_match(ewv->cursor, ewv->next_cursor)) { cursor_rugpull = 1; ewv->cursor = ewv->next_cursor; @@ -1542,7 +1542,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d arena_clear(ewv->text_edit_arena); ewv->text_edit_state_slots_count = u64_up_to_pow2(selection_dim.y+1); ewv->text_edit_state_slots_count = Max(ewv->text_edit_state_slots_count, 64); - ewv->text_edit_state_slots = push_array(ewv->text_edit_arena, DF_WatchViewTextEditState*, ewv->text_edit_state_slots_count); + ewv->text_edit_state_slots = push_array(ewv->text_edit_arena, RD_WatchViewTextEditState*, ewv->text_edit_state_slots_count); EV_WindowedRowList rows = ev_windowed_row_list_from_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, selection_tbl.min.y-1), ui_scroll_list_row_from_item(&row_blocks, selection_tbl.max.y-1)+1), &blocks); EV_Row *row = rows.first; @@ -1550,13 +1550,13 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d { for(S64 x = selection_tbl.min.x; x <= selection_tbl.max.x; x += 1) { - DF_WatchViewColumn *col = df_watch_view_column_from_x(ewv, x); - String8 string = df_string_from_eval_viz_row_column(scratch.arena, eval_view, row, col, 1, default_radix, ui_top_font(), ui_top_font_size(), row_string_max_size_px); + RD_WatchViewColumn *col = rd_watch_view_column_from_x(ewv, x); + String8 string = rd_string_from_eval_viz_row_column(scratch.arena, eval_view, row, col, 1, default_radix, ui_top_font(), ui_top_font_size(), row_string_max_size_px); string.size = Min(string.size, sizeof(ewv->dummy_text_edit_state.input_buffer)); - DF_WatchViewPoint pt = {x, row->parent_key, row->key}; + RD_WatchViewPoint pt = {x, row->parent_key, row->key}; U64 hash = ev_hash_from_key(pt.key); U64 slot_idx = hash%ewv->text_edit_state_slots_count; - DF_WatchViewTextEditState *edit_state = push_array(ewv->text_edit_arena, DF_WatchViewTextEditState, 1); + RD_WatchViewTextEditState *edit_state = push_array(ewv->text_edit_arena, RD_WatchViewTextEditState, 1); SLLStackPush_N(ewv->text_edit_state_slots[slot_idx], edit_state, pt_hash_next); edit_state->pt = pt; edit_state->cursor = txt_pt(1, string.size+1); @@ -1585,20 +1585,20 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d B32 is_expanded = ev_expansion_from_key(eval_view, row->key); ev_key_set_expansion(eval_view, row->parent_key, row->key, !is_expanded); } - DF_ViewRuleSpec *block_ui_rule_spec = &df_nil_view_rule_spec; + RD_ViewRuleSpec *block_ui_rule_spec = &rd_nil_view_rule_spec; MD_Node *block_ui_rule_root = &md_nil_node; for(EV_ViewRuleNode *n = row->view_rules->first; n != 0; n = n->next) { - DF_ViewRuleSpec *spec = df_view_rule_spec_from_string(n->v.root->string); - if(spec->info.flags & DF_ViewRuleSpecInfoFlag_ViewUI) + RD_ViewRuleSpec *spec = rd_view_rule_spec_from_string(n->v.root->string); + if(spec->info.flags & RD_ViewRuleSpecInfoFlag_ViewUI) { block_ui_rule_spec = spec; block_ui_rule_root = n->v.root; } } - if(block_ui_rule_spec != &df_nil_view_rule_spec) + if(block_ui_rule_spec != &rd_nil_view_rule_spec) { - df_cmd(DF_CmdKind_OpenTab, + rd_cmd(RD_CmdKind_OpenTab, .string = e_string_from_expr(scratch.arena, row->expr), .params_tree = block_ui_rule_root); } @@ -1622,7 +1622,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d { E_Eval eval = e_eval_from_expr(scratch.arena, row->expr); U64 vaddr = eval.value.u64; - CTRL_Entity *eval_space_ctrl_entity = d_ctrl_entity_from_eval_space(eval.space); + CTRL_Entity *eval_space_ctrl_entity = rd_ctrl_entity_from_eval_space(eval.space); if(eval_space_ctrl_entity->kind == CTRL_EntityKind_Process) { CTRL_Entity *module = ctrl_module_from_process_vaddr(eval_space_ctrl_entity, vaddr); @@ -1636,7 +1636,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d file_path = lines.first->v.file_path; pt = lines.first->v.pt; } - df_cmd(DF_CmdKind_FindCodeLocation, + rd_cmd(RD_CmdKind_FindCodeLocation, .process = eval_space_ctrl_entity->handle, .vaddr = vaddr, .file_path = file_path, @@ -1646,7 +1646,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d if(1 <= selection_tbl.min.y && selection_tbl.min.y <= frame_rows_count) { FrameRow *frame_row = &frame_rows[selection_tbl.min.y-1]; - df_cmd(DF_CmdKind_SelectUnwind, + rd_cmd(RD_CmdKind_SelectUnwind, .unwind_count = frame_row->unwind_idx, .inline_depth = frame_row->inline_depth); } @@ -1671,8 +1671,8 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d { for(S64 x = selection_tbl.min.x; x <= selection_tbl.max.x; x += 1) { - DF_WatchViewPoint pt = df_watch_view_point_from_tbl(&blocks, v2s64(x, y)); - DF_WatchViewTextEditState *edit_state = df_watch_view_text_edit_state_from_pt(ewv, pt); + RD_WatchViewPoint pt = rd_watch_view_point_from_tbl(&blocks, v2s64(x, y)); + RD_WatchViewTextEditState *edit_state = rd_watch_view_text_edit_state_from_pt(ewv, pt); String8 string = str8(edit_state->input_buffer, edit_state->input_size); UI_TxtOp op = ui_single_line_txt_op_from_event(scratch.arena, evt, string, edit_state->cursor, edit_state->mark); @@ -1686,7 +1686,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d if(autocomplete_hint_string.size != 0) { take_autocomplete = 1; - String8 word_query = df_autocomp_query_word_from_input_string_off(string, edit_state->cursor.column-1); + String8 word_query = rd_autocomp_query_word_from_input_string_off(string, edit_state->cursor.column-1); U64 word_off = (U64)(word_query.str - string.str); String8 new_string = ui_push_string_replace_range(scratch.arena, string, r1s64(word_off+1, word_off+1+word_query.size), autocomplete_hint_string); new_string.size = Min(sizeof(edit_state->input_buffer), new_string.size); @@ -1719,34 +1719,34 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d // rjf: commit edited cell string Vec2S64 tbl = v2s64(x, y); - DF_WatchViewColumn *col = df_watch_view_column_from_x(ewv, x); + RD_WatchViewColumn *col = rd_watch_view_column_from_x(ewv, x); switch(col->kind) { default:{}break; - case DF_WatchViewColumnKind_Expr: + case RD_WatchViewColumnKind_Expr: if(modifiable) { - DF_WatchViewPoint pt = df_watch_view_point_from_tbl(&blocks, tbl); - DF_Entity *watch = d_entity_from_ev_key_and_kind(pt.key, mutable_entity_kind); - if(!df_entity_is_nil(watch)) + RD_WatchViewPoint pt = rd_watch_view_point_from_tbl(&blocks, tbl); + RD_Entity *watch = d_entity_from_ev_key_and_kind(pt.key, mutable_entity_kind); + if(!rd_entity_is_nil(watch)) { - df_entity_equip_name(watch, new_string); + rd_entity_equip_name(watch, new_string); state_dirty = 1; snap_to_cursor = 1; } else if(editing_complete && new_string.size != 0 && ev_key_match(pt.key, empty_row_key)) { - watch = df_entity_alloc(df_entity_root(), mutable_entity_kind); - df_entity_equip_cfg_src(watch, DF_CfgSrc_Project); - df_entity_equip_name(watch, new_string); - EV_Key key = df_ev_key_from_entity(watch); + watch = rd_entity_alloc(rd_entity_root(), mutable_entity_kind); + rd_entity_equip_cfg_src(watch, RD_CfgSrc_Project); + rd_entity_equip_name(watch, new_string); + EV_Key key = rd_ev_key_from_entity(watch); ev_key_set_view_rule(eval_view, key, str8_zero()); state_dirty = 1; snap_to_cursor = 1; } }break; - case DF_WatchViewColumnKind_Member: - case DF_WatchViewColumnKind_Value: + case RD_WatchViewColumnKind_Member: + case RD_WatchViewColumnKind_Value: if(editing_complete && evt->slot != UI_EventActionSlot_Cancel) { EV_WindowedRowList rows = ev_windowed_row_list_from_block_list(scratch.arena, eval_view, r1s64(ui_scroll_list_row_from_item(&row_blocks, y-1), @@ -1755,37 +1755,37 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d if(rows.first != 0) { E_Expr *expr = rows.first->expr; - if(col->kind == DF_WatchViewColumnKind_Member) + if(col->kind == RD_WatchViewColumnKind_Member) { expr = e_expr_ref_member_access(scratch.arena, expr, str8(col->string_buffer, col->string_size)); } E_Eval dst_eval = e_eval_from_expr(scratch.arena, expr); - success = d_commit_eval_value_string(dst_eval, new_string); + success = rd_commit_eval_value_string(dst_eval, new_string); } if(!success) { log_user_error(str8_lit("Could not commit value successfully.")); } }break; - case DF_WatchViewColumnKind_Type:{}break; - case DF_WatchViewColumnKind_ViewRule: + case RD_WatchViewColumnKind_Type:{}break; + case RD_WatchViewColumnKind_ViewRule: if(editing_complete) { - DF_WatchViewPoint pt = df_watch_view_point_from_tbl(&blocks, tbl); + RD_WatchViewPoint pt = rd_watch_view_point_from_tbl(&blocks, tbl); ev_key_set_view_rule(eval_view, pt.key, new_string); - DF_Entity *watch = d_entity_from_ev_key_and_kind(pt.key, mutable_entity_kind); - DF_Entity *view_rule = df_entity_child_from_kind(watch, DF_EntityKind_ViewRule); - if(new_string.size != 0 && df_entity_is_nil(view_rule)) + RD_Entity *watch = d_entity_from_ev_key_and_kind(pt.key, mutable_entity_kind); + RD_Entity *view_rule = rd_entity_child_from_kind(watch, RD_EntityKind_ViewRule); + if(new_string.size != 0 && rd_entity_is_nil(view_rule)) { - view_rule = df_entity_alloc(watch, DF_EntityKind_ViewRule); + view_rule = rd_entity_alloc(watch, RD_EntityKind_ViewRule); } - else if(new_string.size == 0 && !df_entity_is_nil(view_rule)) + else if(new_string.size == 0 && !rd_entity_is_nil(view_rule)) { - df_entity_mark_for_deletion(view_rule); + rd_entity_mark_for_deletion(view_rule); } if(new_string.size != 0) { - df_entity_equip_name(view_rule, new_string); + rd_entity_equip_name(view_rule, new_string); } state_dirty = 1; snap_to_cursor = 1; @@ -1814,8 +1814,8 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d { for(S64 x = selection_tbl.min.x; x <= selection_tbl.max.x; x += 1) { - DF_WatchViewColumn *col = df_watch_view_column_from_x(ewv, x); - String8 cell_string = df_string_from_eval_viz_row_column(scratch.arena, eval_view, row, col, 0, default_radix, ui_top_font(), ui_top_font_size(), row_string_max_size_px); + RD_WatchViewColumn *col = rd_watch_view_column_from_x(ewv, x); + String8 cell_string = rd_string_from_eval_viz_row_column(scratch.arena, eval_view, row, col, 0, default_radix, ui_top_font(), ui_top_font_size(), row_string_max_size_px); cell_string = str8_skip_chop_whitespace(cell_string); U64 comma_pos = str8_find_needle(cell_string, 0, str8_lit(","), 0); if(selection_tbl.min.x != selection_tbl.max.x || selection_tbl.min.y != selection_tbl.max.y) @@ -1850,48 +1850,48 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d snap_to_cursor = 1; for(S64 y = selection_tbl.min.y; y <= selection_tbl.max.y; y += 1) { - DF_WatchViewPoint pt = df_watch_view_point_from_tbl(&blocks, v2s64(0, y)); + RD_WatchViewPoint pt = rd_watch_view_point_from_tbl(&blocks, v2s64(0, y)); // rjf: row deletions if(selection_tbl.min.x <= 0) { - DF_WatchViewPoint fallback_pt_prev = df_watch_view_point_from_tbl(&blocks, v2s64(0, y - 1)); - DF_WatchViewPoint fallback_pt_next = df_watch_view_point_from_tbl(&blocks, v2s64(0, y + 1)); - DF_Entity *watch = d_entity_from_ev_key_and_kind(pt.key, mutable_entity_kind); - if(!df_entity_is_nil(watch)) + RD_WatchViewPoint fallback_pt_prev = rd_watch_view_point_from_tbl(&blocks, v2s64(0, y - 1)); + RD_WatchViewPoint fallback_pt_next = rd_watch_view_point_from_tbl(&blocks, v2s64(0, y + 1)); + RD_Entity *watch = d_entity_from_ev_key_and_kind(pt.key, mutable_entity_kind); + if(!rd_entity_is_nil(watch)) { EV_Key new_cursor_key = empty_row_key; EV_Key new_cursor_parent_key = empty_row_parent_key; if((evt->delta_2s32.x < 0 || evt->delta_2s32.y < 0) && !ev_key_match(ev_key_zero(), fallback_pt_prev.key)) { - DF_Entity *fallback_watch = d_entity_from_ev_key_and_kind(fallback_pt_prev.key, mutable_entity_kind); - if(!df_entity_is_nil(fallback_watch)) + RD_Entity *fallback_watch = d_entity_from_ev_key_and_kind(fallback_pt_prev.key, mutable_entity_kind); + if(!rd_entity_is_nil(fallback_watch)) { new_cursor_key = fallback_pt_prev.key; - new_cursor_parent_key = df_parent_ev_key_from_entity(fallback_watch); + new_cursor_parent_key = rd_parent_ev_key_from_entity(fallback_watch); } } else if(!ev_key_match(ev_key_zero(), fallback_pt_next.key)) { - DF_Entity *fallback_watch = d_entity_from_ev_key_and_kind(fallback_pt_next.key, mutable_entity_kind); - if(!df_entity_is_nil(fallback_watch)) + RD_Entity *fallback_watch = d_entity_from_ev_key_and_kind(fallback_pt_next.key, mutable_entity_kind); + if(!rd_entity_is_nil(fallback_watch)) { new_cursor_key = fallback_pt_next.key; - new_cursor_parent_key = df_parent_ev_key_from_entity(fallback_watch); + new_cursor_parent_key = rd_parent_ev_key_from_entity(fallback_watch); } } - DF_WatchViewPoint new_cursor_pt = {0, new_cursor_parent_key, new_cursor_key}; - df_entity_mark_for_deletion(watch); + RD_WatchViewPoint new_cursor_pt = {0, new_cursor_parent_key, new_cursor_key}; + rd_entity_mark_for_deletion(watch); ewv->cursor = ewv->mark = ewv->next_cursor = ewv->next_mark = new_cursor_pt; } } // rjf: view rule deletions - else if(selection_tbl.min.x <= DF_WatchViewColumnKind_ViewRule && DF_WatchViewColumnKind_ViewRule <= selection_tbl.max.x) + else if(selection_tbl.min.x <= RD_WatchViewColumnKind_ViewRule && RD_WatchViewColumnKind_ViewRule <= selection_tbl.max.x) { - DF_Entity *watch = d_entity_from_ev_key_and_kind(pt.key, mutable_entity_kind); - DF_Entity *view_rule = df_entity_child_from_kind(watch, DF_EntityKind_ViewRule); - df_entity_mark_for_deletion(view_rule); + RD_Entity *watch = d_entity_from_ev_key_and_kind(pt.key, mutable_entity_kind); + RD_Entity *view_rule = rd_entity_child_from_kind(watch, RD_EntityKind_ViewRule); + rd_entity_mark_for_deletion(view_rule); ev_key_set_view_rule(eval_view, pt.key, str8_zero()); } } @@ -1992,33 +1992,33 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d EV_Key first_watch_key = ev_key_from_block_list_row_num(&blocks, selection_tbl.min.y); EV_Key reorder_group_prev_watch_key = ev_key_from_block_list_row_num(&blocks, selection_tbl.min.y - 1); EV_Key reorder_group_next_watch_key = ev_key_from_block_list_row_num(&blocks, selection_tbl.max.y + 1); - DF_Entity *reorder_group_prev = d_entity_from_ev_key_and_kind(reorder_group_prev_watch_key, mutable_entity_kind); - DF_Entity *reorder_group_next = d_entity_from_ev_key_and_kind(reorder_group_next_watch_key, mutable_entity_kind); - DF_Entity *first_watch = d_entity_from_ev_key_and_kind(first_watch_key, mutable_entity_kind); - DF_Entity *last_watch = first_watch; - if(!df_entity_is_nil(first_watch)) + RD_Entity *reorder_group_prev = d_entity_from_ev_key_and_kind(reorder_group_prev_watch_key, mutable_entity_kind); + RD_Entity *reorder_group_next = d_entity_from_ev_key_and_kind(reorder_group_next_watch_key, mutable_entity_kind); + RD_Entity *first_watch = d_entity_from_ev_key_and_kind(first_watch_key, mutable_entity_kind); + RD_Entity *last_watch = first_watch; + if(!rd_entity_is_nil(first_watch)) { for(S64 y = selection_tbl.min.y+1; y <= selection_tbl.max.y; y += 1) { EV_Key key = ev_key_from_block_list_row_num(&blocks, y); - DF_Entity *new_last = d_entity_from_ev_key_and_kind(key, mutable_entity_kind); - if(!df_entity_is_nil(new_last)) + RD_Entity *new_last = d_entity_from_ev_key_and_kind(key, mutable_entity_kind); + if(!rd_entity_is_nil(new_last)) { last_watch = new_last; } } } - if(evt->delta_2s32.y < 0 && !df_entity_is_nil(first_watch) && !df_entity_is_nil(reorder_group_prev)) + if(evt->delta_2s32.y < 0 && !rd_entity_is_nil(first_watch) && !rd_entity_is_nil(reorder_group_prev)) { state_dirty = 1; snap_to_cursor = 1; - df_entity_change_parent(reorder_group_prev, reorder_group_prev->parent, reorder_group_prev->parent, last_watch); + rd_entity_change_parent(reorder_group_prev, reorder_group_prev->parent, reorder_group_prev->parent, last_watch); } - if(evt->delta_2s32.y > 0 && !df_entity_is_nil(last_watch) && !df_entity_is_nil(reorder_group_next)) + if(evt->delta_2s32.y > 0 && !rd_entity_is_nil(last_watch) && !rd_entity_is_nil(reorder_group_next)) { state_dirty = 1; snap_to_cursor = 1; - df_entity_change_parent(reorder_group_next, reorder_group_next->parent, reorder_group_next->parent, reorder_group_prev); + rd_entity_change_parent(reorder_group_next, reorder_group_next->parent, reorder_group_next->parent, reorder_group_prev); } } @@ -2049,7 +2049,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d F32 **col_pcts = push_array(scratch.arena, F32*, ewv->column_count); { S64 x = 0; - for(DF_WatchViewColumn *c = ewv->first_column; c != 0; c = c->next, x += 1) + for(RD_WatchViewColumn *c = ewv->first_column; c != 0; c = c->next, x += 1) { col_pcts[x] = &c->pct; } @@ -2097,7 +2097,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d // if(visible_row_rng.min == 0) UI_TableVector UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) { - for(DF_WatchViewColumn *col = ewv->first_column; col != 0; col = col->next) + for(RD_WatchViewColumn *col = ewv->first_column; col != 0; col = col->next) UI_TableCell { String8 name = str8(col->display_string_buffer, col->display_string_size); @@ -2106,12 +2106,12 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d switch(col->kind) { default:{}break; - case DF_WatchViewColumnKind_Expr: {name = str8_lit("Expression");}break; - case DF_WatchViewColumnKind_Value: {name = str8_lit("Value");}break; - case DF_WatchViewColumnKind_Type: {name = str8_lit("Type");}break; - case DF_WatchViewColumnKind_ViewRule:{name = str8_lit("View Rule");}break; - case DF_WatchViewColumnKind_Module: {name = str8_lit("Module");}break; - case DF_WatchViewColumnKind_Member: + case RD_WatchViewColumnKind_Expr: {name = str8_lit("Expression");}break; + case RD_WatchViewColumnKind_Value: {name = str8_lit("Value");}break; + case RD_WatchViewColumnKind_Type: {name = str8_lit("Type");}break; + case RD_WatchViewColumnKind_ViewRule:{name = str8_lit("View Rule");}break; + case RD_WatchViewColumnKind_Module: {name = str8_lit("Module");}break; + case RD_WatchViewColumnKind_Member: { name = str8(col->string_buffer, col->string_size); }break; @@ -2123,37 +2123,37 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d { ui_label(name); }break; - case DF_WatchViewColumnKind_ViewRule: + case RD_WatchViewColumnKind_ViewRule: { - if(df_help_label(name)) UI_Tooltip + if(rd_help_label(name)) UI_Tooltip { F32 max_width = ui_top_font_size()*35; ui_label_multiline(max_width, str8_lit("View rules are used to tweak the way evaluated expressions are visualized. Multiple rules can be specified on each row. They are specified in a key:(value) form. Some examples follow:")); ui_spacer(ui_em(1.5f, 1)); - DF_Font(DF_FontSlot_Code) ui_labelf("array:(N)"); + RD_Font(RD_FontSlot_Code) ui_labelf("array:(N)"); UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label_multiline(max_width, str8_lit("Specifies that a pointer points to N elements, rather than only 1.")); ui_spacer(ui_em(1.5f, 1)); - DF_Font(DF_FontSlot_Code) ui_labelf("omit:(member_1 ... member_n)"); + RD_Font(RD_FontSlot_Code) ui_labelf("omit:(member_1 ... member_n)"); UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label_multiline(max_width, str8_lit("Omits a list of member names from appearing in struct, union, or class evaluations.")); ui_spacer(ui_em(1.5f, 1)); - DF_Font(DF_FontSlot_Code) ui_labelf("only:(member_1 ... member_n)"); + RD_Font(RD_FontSlot_Code) ui_labelf("only:(member_1 ... member_n)"); UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label_multiline(max_width, str8_lit("Specifies that only the specified members should appear in struct, union, or class evaluations.")); - DF_Font(DF_FontSlot_Code) ui_labelf("list:(next_link_member_name)"); + RD_Font(RD_FontSlot_Code) ui_labelf("list:(next_link_member_name)"); UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label_multiline(max_width, str8_lit("Specifies that some struct, union, or class forms the top of a linked list, with next_link_member_name being the member which points at the next element in the list.")); ui_spacer(ui_em(1.5f, 1)); - DF_Font(DF_FontSlot_Code) ui_labelf("dec"); + RD_Font(RD_FontSlot_Code) ui_labelf("dec"); UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label_multiline(max_width, str8_lit("Specifies that all integral evaluations should appear in base-10 form.")); ui_spacer(ui_em(1.5f, 1)); - DF_Font(DF_FontSlot_Code) ui_labelf("hex"); + RD_Font(RD_FontSlot_Code) ui_labelf("hex"); UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label_multiline(max_width, str8_lit("Specifies that all integral evaluations should appear in base-16 form.")); ui_spacer(ui_em(1.5f, 1)); - DF_Font(DF_FontSlot_Code) ui_labelf("oct"); + RD_Font(RD_FontSlot_Code) ui_labelf("oct"); UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label_multiline(max_width, str8_lit("Specifies that all integral evaluations should appear in base-8 form.")); ui_spacer(ui_em(1.5f, 1)); - DF_Font(DF_FontSlot_Code) ui_labelf("bin"); + RD_Font(RD_FontSlot_Code) ui_labelf("bin"); UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label_multiline(max_width, str8_lit("Specifies that all integral evaluations should appear in base-2 form.")); ui_spacer(ui_em(1.5f, 1)); - DF_Font(DF_FontSlot_Code) ui_labelf("no_addr"); + RD_Font(RD_FontSlot_Code) ui_labelf("no_addr"); UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label_multiline(max_width, str8_lit("Displays only what pointers point to, if possible, without the pointer's address value.")); ui_spacer(ui_em(1.5f, 1)); } @@ -2188,19 +2188,19 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d B32 row_is_expandable = ev_row_is_expandable(row); B32 row_is_editable = ev_row_is_editable(row); B32 next_row_expanded = row_expanded; - DF_ViewRuleSpec *value_ui_rule_spec = &df_nil_view_rule_spec; + RD_ViewRuleSpec *value_ui_rule_spec = &rd_nil_view_rule_spec; MD_Node *value_ui_rule_root = &md_nil_node; - DF_ViewRuleSpec *block_ui_rule_spec = &df_nil_view_rule_spec; + RD_ViewRuleSpec *block_ui_rule_spec = &rd_nil_view_rule_spec; MD_Node *block_ui_rule_root = &md_nil_node; for(EV_ViewRuleNode *n = row->view_rules->first; n != 0; n = n->next) { - DF_ViewRuleSpec *spec = df_view_rule_spec_from_string(n->v.root->string); - if(spec->info.flags & DF_ViewRuleSpecInfoFlag_RowUI) + RD_ViewRuleSpec *spec = rd_view_rule_spec_from_string(n->v.root->string); + if(spec->info.flags & RD_ViewRuleSpecInfoFlag_RowUI) { value_ui_rule_spec = spec; value_ui_rule_root = n->v.root; } - if(spec->info.flags & DF_ViewRuleSpecInfoFlag_ViewUI) + if(spec->info.flags & RD_ViewRuleSpecInfoFlag_ViewUI) { block_ui_rule_spec = spec; block_ui_rule_root = n->v.root; @@ -2217,8 +2217,8 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d default:{}break; case E_Mode_Offset: { - DF_Entity *space_entity = d_entity_from_eval_space(row_eval.space); - if(space_entity->kind == DF_EntityKind_Process) + RD_Entity *space_entity = rd_entity_from_eval_space(row_eval.space); + if(space_entity->kind == RD_EntityKind_Process) { U64 size = e_type_byte_size_from_key(row_eval.type_key); size = Min(size, 64); @@ -2247,7 +2247,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d { if(row_is_fresh) { - palette = ui_build_palette(ui_top_palette(), .background = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay)); + palette = ui_build_palette(ui_top_palette(), .background = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlay)); row_flags |= UI_BoxFlag_DrawBackground; } } @@ -2263,8 +2263,8 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d UI_Box *row_box = ui_build_box_from_stringf(row_flags| UI_BoxFlag_DrawSideBottom| UI_BoxFlag_Clickable| - ((block_ui_rule_spec == &df_nil_view_rule_spec) * UI_BoxFlag_DisableFocusOverlay)| - ((block_ui_rule_spec != &df_nil_view_rule_spec) * UI_BoxFlag_Clip), + ((block_ui_rule_spec == &rd_nil_view_rule_spec) * UI_BoxFlag_DisableFocusOverlay)| + ((block_ui_rule_spec != &rd_nil_view_rule_spec) * UI_BoxFlag_Clip), "row_%I64x", row_hash); ui_ts_vector_idx += 1; ui_ts_cell_idx = 0; @@ -2272,17 +2272,17 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //////////////////////// //- rjf: row with expand ui rule -> build large singular row for "escape hatch" ui // - if(block_ui_rule_spec != &df_nil_view_rule_spec) + if(block_ui_rule_spec != &rd_nil_view_rule_spec) UI_Parent(row_box) UI_FocusHot(row_selected ? UI_FocusKind_On : UI_FocusKind_Off) { //- rjf: build canvas row contents - if(block_ui_rule_spec->info.flags & DF_ViewRuleSpecInfoFlag_ViewUI) + if(block_ui_rule_spec->info.flags & RD_ViewRuleSpecInfoFlag_ViewUI) { //- rjf: unpack - DF_WatchViewPoint pt = {0, row->parent_key, row->key}; - DF_ViewSpec *canvas_view_spec = df_view_spec_from_string(block_ui_rule_spec->info.string); - DF_TransientViewNode *canvas_view_node = df_transient_view_node_from_ev_key(view, row->key); - DF_View *canvas_view = canvas_view_node->view; + RD_WatchViewPoint pt = {0, row->parent_key, row->key}; + RD_ViewSpec *canvas_view_spec = rd_view_spec_from_string(block_ui_rule_spec->info.string); + RD_TransientViewNode *canvas_view_node = rd_transient_view_node_from_ev_key(view, row->key); + RD_View *canvas_view = canvas_view_node->view; String8 canvas_view_expr = e_string_from_expr(scratch.arena, row->expr); B32 need_new_spec = (!str8_match(str8(canvas_view->query_buffer, canvas_view->query_string_size), canvas_view_expr, 0) || !md_tree_match(canvas_view_node->initial_params, block_ui_rule_root, 0)); @@ -2290,7 +2290,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d { arena_clear(canvas_view_node->initial_params_arena); canvas_view_node->initial_params = md_tree_copy(canvas_view_node->initial_params_arena, block_ui_rule_root); - df_view_equip_spec(canvas_view, canvas_view_spec, canvas_view_expr, block_ui_rule_root); + rd_view_equip_spec(canvas_view, canvas_view_spec, canvas_view_expr, block_ui_rule_root); } Vec2F32 canvas_dim = v2f32(scroll_list_params.dim_px.x - ui_top_font_size()*1.5f, (row->skipped_size_in_rows+row->size_in_rows+row->chopped_size_in_rows)*scroll_list_params.row_height_px); @@ -2316,7 +2316,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d ui_set_next_pref_height(ui_em(3, 1)); UI_Flags(UI_BoxFlag_DrawDropShadow) UI_CornerRadius(ui_top_font_size()*0.5f) { - UI_Signal sig = df_icon_buttonf(DF_IconKind_Window, 0, "###pop_out"); + UI_Signal sig = rd_icon_buttonf(RD_IconKind_Window, 0, "###pop_out"); if(ui_hovering(sig)) UI_Tooltip { ui_labelf("Pop out"); @@ -2327,7 +2327,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d } if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_OpenTab, + rd_cmd(RD_CmdKind_OpenTab, .string = e_string_from_expr(scratch.arena, row->expr), .params_tree = block_ui_rule_root); } @@ -2341,13 +2341,13 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d UI_Parent(canvas_box) UI_WidthFill UI_HeightFill { //- rjf: loading animation - df_loading_overlay(canvas_rect, canvas_view->loading_t, canvas_view->loading_progress_v, canvas_view->loading_progress_v_target); + rd_loading_overlay(canvas_rect, canvas_view->loading_t, canvas_view->loading_progress_v, canvas_view->loading_progress_v_target); //- rjf: push interaction registers, fill with per-view states - df_push_regs(); + rd_push_regs(); { - df_regs()->view = df_handle_from_view(canvas_view); - df_regs()->file_path = d_file_path_from_eval_string(df_frame_arena(), str8(canvas_view->query_buffer, canvas_view->query_string_size)); + rd_regs()->view = rd_handle_from_view(canvas_view); + rd_regs()->file_path = rd_file_path_from_eval_string(rd_frame_arena(), str8(canvas_view->query_buffer, canvas_view->query_string_size)); } //- rjf: build @@ -2357,7 +2357,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d } //- rjf: pop interaction registers - df_pop_regs(); + rd_pop_regs(); } } } @@ -2365,7 +2365,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //////////////////////// //- rjf: build non-canvas row contents // - if(block_ui_rule_spec == &df_nil_view_rule_spec) UI_Parent(row_box) UI_HeightFill + if(block_ui_rule_spec == &rd_nil_view_rule_spec) UI_Parent(row_box) UI_HeightFill { ////////////////////// //- rjf: draw start of cache lines in expansions @@ -2377,7 +2377,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d ui_set_next_fixed_x(0); ui_set_next_fixed_y(0); ui_set_next_fixed_height(ui_top_font_size()*0.1f); - ui_set_next_palette(ui_build_palette(ui_top_palette(), .background = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay))); + ui_set_next_palette(ui_build_palette(ui_top_palette(), .background = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlay))); ui_build_box_from_key(UI_BoxFlag_Floating|UI_BoxFlag_DrawBackground, ui_key_zero()); } @@ -2395,7 +2395,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d ui_set_next_fixed_x(0); ui_set_next_fixed_y(scroll_list_params.row_height_px - ui_top_font_size()*0.5f); ui_set_next_fixed_height(ui_top_font_size()*1.f); - Vec4F32 boundary_color = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay); + Vec4F32 boundary_color = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlay); ui_set_next_palette(ui_build_palette(ui_top_palette(), .background = boundary_color)); ui_build_box_from_key(UI_BoxFlag_Floating|UI_BoxFlag_DrawBackground, ui_key_zero()); } @@ -2406,13 +2406,13 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d // { S64 x = 0; - for(DF_WatchViewColumn *col = ewv->first_column; col != 0; col = col->next, x += 1) + for(RD_WatchViewColumn *col = ewv->first_column; col != 0; col = col->next, x += 1) { //- rjf: unpack cell info - DF_WatchViewPoint cell_pt = {x, row->parent_key, row->key}; - DF_WatchViewTextEditState *cell_edit_state = df_watch_view_text_edit_state_from_pt(ewv, cell_pt); + RD_WatchViewPoint cell_pt = {x, row->parent_key, row->key}; + RD_WatchViewTextEditState *cell_edit_state = rd_watch_view_text_edit_state_from_pt(ewv, cell_pt); B32 cell_selected = (row_selected && selection_tbl.min.x <= cell_pt.x && cell_pt.x <= selection_tbl.max.x); - String8 cell_pre_edit_string = df_string_from_eval_viz_row_column(scratch.arena, eval_view, row, col, 0, default_radix, ui_top_font(), ui_top_font_size(), row_string_max_size_px); + String8 cell_pre_edit_string = rd_string_from_eval_viz_row_column(scratch.arena, eval_view, row, col, 0, default_radix, ui_top_font(), ui_top_font_size(), row_string_max_size_px); //- rjf: unpack column-kind-specific info E_Eval cell_eval = row_eval; @@ -2421,22 +2421,22 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d String8 cell_inheritance_string = {0}; String8 cell_error_string = {0}; String8 cell_error_tooltip_string = {0}; - DF_AutoCompListerFlags cell_autocomp_flags = 0; - DF_ViewRuleRowUIFunctionType *cell_ui_hook = 0; + RD_AutoCompListerFlags cell_autocomp_flags = 0; + RD_ViewRuleRowUIFunctionType *cell_ui_hook = 0; MD_Node *cell_ui_params = &md_nil_node; Vec4F32 cell_base_color = ui_top_palette()->text; - DF_IconKind cell_icon = DF_IconKind_Null; + RD_IconKind cell_icon = RD_IconKind_Null; switch(col->kind) { default:{}break; - case DF_WatchViewColumnKind_Expr: + case RD_WatchViewColumnKind_Expr: { cell_can_edit = (row->depth == 0 && modifiable); if(filter.size != 0) { cell_matches = fuzzy_match_find(scratch.arena, filter, ev_expr_string_from_row(scratch.arena, row)); } - cell_autocomp_flags = DF_AutoCompListerFlag_Locals; + cell_autocomp_flags = RD_AutoCompListerFlag_Locals; if(row->member != 0 && row->member->inheritance_key_chain.first != 0) { String8List inheritance_chain_type_names = {0}; @@ -2455,10 +2455,10 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d } } }break; - case DF_WatchViewColumnKind_Value: + case RD_WatchViewColumnKind_Value: { }goto value_cell; - case DF_WatchViewColumnKind_Member: + case RD_WatchViewColumnKind_Member: { cell_eval = e_member_eval_from_eval_member_name(cell_eval, str8(col->string_buffer, col->string_size)); }goto value_cell; @@ -2486,29 +2486,29 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d { cell_error_tooltip_string = str8_lit("Could not read memory successfully."); } - cell_autocomp_flags = DF_AutoCompListerFlag_Locals; - if(value_ui_rule_spec != &df_nil_view_rule_spec && value_ui_rule_spec != 0) + cell_autocomp_flags = RD_AutoCompListerFlag_Locals; + if(value_ui_rule_spec != &rd_nil_view_rule_spec && value_ui_rule_spec != 0) { cell_ui_hook = value_ui_rule_spec->info.row_ui; cell_ui_params = value_ui_rule_root; } cell_can_edit = ev_type_key_is_editable(cell_eval.type_key); }break; - case DF_WatchViewColumnKind_Type: + case RD_WatchViewColumnKind_Type: { cell_can_edit = 0; }break; - case DF_WatchViewColumnKind_ViewRule: + case RD_WatchViewColumnKind_ViewRule: { cell_can_edit = 1; - cell_autocomp_flags = DF_AutoCompListerFlag_ViewRules; + cell_autocomp_flags = RD_AutoCompListerFlag_ViewRules; }break; - case DF_WatchViewColumnKind_FrameSelection: + case RD_WatchViewColumnKind_FrameSelection: { - if(semantic_idx == df_regs()->unwind_count - df_regs()->inline_depth) + if(semantic_idx == rd_regs()->unwind_count - rd_regs()->inline_depth) { - cell_icon = DF_IconKind_RightArrow; - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + cell_icon = RD_IconKind_RightArrow; + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); if(thread->rgba != 0) { cell_base_color = rgba_from_u32(thread->rgba); @@ -2525,8 +2525,8 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d for(EV_ViewRuleNode *n = view_rules->first; n != 0; n = n->next) { EV_ViewRule *vr = &n->v; - DF_ViewRuleSpec *spec = df_view_rule_spec_from_string(vr->root->string); - if(spec != &df_nil_view_rule_spec && spec->info.flags & DF_ViewRuleSpecInfoFlag_RowUI) + RD_ViewRuleSpec *spec = rd_view_rule_spec_from_string(vr->root->string); + if(spec != &rd_nil_view_rule_spec && spec->info.flags & RD_ViewRuleSpecInfoFlag_RowUI) { cell_ui_hook = spec->info.row_ui; cell_ui_params = vr->root; @@ -2541,7 +2541,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d if(cell_error_tooltip_string.size != 0 || cell_error_string.size != 0) { - palette = ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextNegative), .text_weak = df_rgba_from_theme_color(DF_ThemeColor_TextNegative), .background = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlayError)); + palette = ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative), .text_weak = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative), .background = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlayError)); cell_flags |= UI_BoxFlag_DrawBackground; } else @@ -2555,17 +2555,17 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d UI_Palette(palette) UI_TableCell UI_FocusHot(cell_selected ? UI_FocusKind_On : UI_FocusKind_Off) UI_FocusActive((cell_selected && ewv->text_editing) ? UI_FocusKind_On : UI_FocusKind_Off) - DF_Font(col->is_non_code ? DF_FontSlot_Main : DF_FontSlot_Code) + RD_Font(col->is_non_code ? RD_FontSlot_Main : RD_FontSlot_Code) UI_FlagsAdd(cell_flags | (row->depth > 0 ? UI_BoxFlag_DrawTextWeak : 0)) { // rjf: cell has errors? -> build error box - if(cell_error_string.size != 0) DF_Font(DF_FontSlot_Main) + if(cell_error_string.size != 0) RD_Font(RD_FontSlot_Main) { UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_Clip|UI_BoxFlag_Clickable, "###%I64x_row_%I64x", x, row_hash); sig = ui_signal_from_box(box); UI_Parent(box) UI_Flags(0) { - df_error_label(cell_error_string); + rd_error_label(cell_error_string); } } @@ -2582,12 +2582,12 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d } // rjf: cell has icon? build icon - else if(cell_icon != DF_IconKind_Null) + else if(cell_icon != RD_IconKind_Null) { UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_Clickable, "###cell_%I64x", row_hash); - UI_Parent(box) DF_Font(DF_FontSlot_Icons) UI_WidthFill UI_TextAlignment(UI_TextAlign_Center) + UI_Parent(box) RD_Font(RD_FontSlot_Icons) UI_WidthFill UI_TextAlignment(UI_TextAlign_Center) { - ui_label(df_g_icon_kind_text_table[cell_icon]); + ui_label(rd_icon_kind_text_table[cell_icon]); } sig = ui_signal_from_box(box); } @@ -2595,12 +2595,12 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d // rjf: build cell line edit else { - sig = df_line_editf((DF_LineEditFlag_CodeContents*(!col->is_non_code)| - DF_LineEditFlag_NoBackground| - DF_LineEditFlag_DisableEdit*(!cell_can_edit)| - DF_LineEditFlag_Expander*!!(x == 0 && row_is_expandable && col->kind == DF_WatchViewColumnKind_Expr)| - DF_LineEditFlag_ExpanderPlaceholder*(x == 0 && row->depth==0 && col->kind == DF_WatchViewColumnKind_Expr)| - DF_LineEditFlag_ExpanderSpace*(x == 0 && row->depth!=0 && col->kind == DF_WatchViewColumnKind_Expr)), + sig = rd_line_editf((RD_LineEditFlag_CodeContents*(!col->is_non_code)| + RD_LineEditFlag_NoBackground| + RD_LineEditFlag_DisableEdit*(!cell_can_edit)| + RD_LineEditFlag_Expander*!!(x == 0 && row_is_expandable && col->kind == RD_WatchViewColumnKind_Expr)| + RD_LineEditFlag_ExpanderPlaceholder*(x == 0 && row->depth==0 && col->kind == RD_WatchViewColumnKind_Expr)| + RD_LineEditFlag_ExpanderSpace*(x == 0 && row->depth!=0 && col->kind == RD_WatchViewColumnKind_Expr)), x == 0 ? row->depth : 0, &cell_matches, &cell_edit_state->cursor, &cell_edit_state->mark, cell_edit_state->input_buffer, sizeof(cell_edit_state->input_buffer), &cell_edit_state->input_size, &next_row_expanded, @@ -2611,16 +2611,16 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d txt_pt_match(cell_edit_state->cursor, cell_edit_state->mark)) { String8 input = str8(cell_edit_state->input_buffer, cell_edit_state->input_size); - DF_AutoCompListerParams params = {cell_autocomp_flags}; - if(col->kind == DF_WatchViewColumnKind_ViewRule) + RD_AutoCompListerParams params = {cell_autocomp_flags}; + if(col->kind == RD_WatchViewColumnKind_ViewRule) { - params = df_view_rule_autocomp_lister_params_from_input_cursor(scratch.arena, input, cell_edit_state->cursor.column-1); + params = rd_view_rule_autocomp_lister_params_from_input_cursor(scratch.arena, input, cell_edit_state->cursor.column-1); if(params.flags == 0) { params.flags = cell_autocomp_flags; } } - df_set_autocomp_lister_query(sig.box->key, ¶ms, input, cell_edit_state->cursor.column-1); + rd_set_autocomp_lister_query(sig.box->key, ¶ms, input, cell_edit_state->cursor.column-1); } } } @@ -2638,14 +2638,14 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d if(ui_double_clicked(sig) && cell_can_edit) { ui_kill_action(); - df_cmd(DF_CmdKind_Edit); + rd_cmd(RD_CmdKind_Edit); } // rjf: double-click, not editable -> go-to-location if(ui_double_clicked(sig) && !cell_can_edit) { U64 vaddr = cell_eval.value.u64; - CTRL_Entity *process = d_ctrl_entity_from_eval_space(cell_eval.space); + CTRL_Entity *process = rd_ctrl_entity_from_eval_space(cell_eval.space); CTRL_Entity *module = ctrl_module_from_process_vaddr(process, vaddr); DI_Key dbgi_key = ctrl_dbgi_key_from_module(module); U64 voff = ctrl_voff_from_vaddr(module, vaddr); @@ -2657,7 +2657,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d file_path = lines.first->v.file_path; pt = lines.first->v.pt; } - df_cmd(DF_CmdKind_FindCodeLocation, + rd_cmd(RD_CmdKind_FindCodeLocation, .process = process->handle, .vaddr = vaddr, .file_path = file_path, @@ -2668,7 +2668,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d if(ui_double_clicked(sig) && !cell_can_edit && semantic_idx < frame_rows_count) { FrameRow *frame_row = &frame_rows[semantic_idx]; - df_cmd(DF_CmdKind_SelectUnwind, + rd_cmd(RD_CmdKind_SelectUnwind, .unwind_count = frame_row->unwind_idx, .inline_depth = frame_row->inline_depth); } @@ -2679,19 +2679,19 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d UI_PrefWidth(ui_children_sum(1)) UI_Row UI_PrefWidth(ui_text_dim(1, 1)) { ui_labelf("Inherited from "); - DF_Font(DF_FontSlot_Code) df_code_label(1.f, 0, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), cell_inheritance_string); + RD_Font(RD_FontSlot_Code) rd_code_label(1.f, 0, rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault), cell_inheritance_string); } } // rjf: hovering with error tooltip -> show tooltip if(ui_hovering(sig) && cell_error_tooltip_string.size != 0) UI_Tooltip { - UI_PrefWidth(ui_children_sum(1)) df_error_label(cell_error_tooltip_string); + UI_PrefWidth(ui_children_sum(1)) rd_error_label(cell_error_tooltip_string); } } //- rjf: [DEV] hovering -> tooltips - if(DEV_eval_compiler_tooltips && x == 0 && ui_hovering(sig)) UI_Tooltip DF_Font(DF_FontSlot_Code) + if(DEV_eval_compiler_tooltips && x == 0 && ui_hovering(sig)) UI_Tooltip RD_Font(RD_FontSlot_Code) { local_persist char *spaces = " "; String8 string = ev_expr_string_from_row(scratch.arena, row); @@ -2854,7 +2854,7 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d // if(pressed) { - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); } scratch_end(scratch); @@ -2866,16 +2866,16 @@ df_watch_view_build(DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 d //////////////////////////////// //~ rjf: null @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(null) {} -DF_VIEW_CMD_FUNCTION_DEF(null) {} -DF_VIEW_UI_FUNCTION_DEF(null) {} +RD_VIEW_SETUP_FUNCTION_DEF(null) {} +RD_VIEW_CMD_FUNCTION_DEF(null) {} +RD_VIEW_UI_FUNCTION_DEF(null) {} //////////////////////////////// //~ rjf: empty @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(empty) {} -DF_VIEW_CMD_FUNCTION_DEF(empty) {} -DF_VIEW_UI_FUNCTION_DEF(empty) +RD_VIEW_SETUP_FUNCTION_DEF(empty) {} +RD_VIEW_CMD_FUNCTION_DEF(empty) {} +RD_VIEW_UI_FUNCTION_DEF(empty) { ui_set_next_flags(UI_BoxFlag_DefaultFocusNav); UI_Focus(UI_FocusKind_On) UI_WidthFill UI_HeightFill UI_NamedColumn(str8_lit("empty_view")) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) @@ -2887,11 +2887,11 @@ DF_VIEW_UI_FUNCTION_DEF(empty) UI_TextAlignment(UI_TextAlign_Center) UI_PrefWidth(ui_em(15.f, 1.f)) UI_CornerRadius(ui_top_font_size()/2.f) - DF_Palette(DF_PaletteCode_NegativePopButton) + RD_Palette(RD_PaletteCode_NegativePopButton) { - if(ui_clicked(df_icon_buttonf(DF_IconKind_X, 0, "Close Panel"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_X, 0, "Close Panel"))) { - df_cmd(DF_CmdKind_ClosePanel); + rd_cmd(RD_CmdKind_ClosePanel); } } } @@ -2900,9 +2900,9 @@ DF_VIEW_UI_FUNCTION_DEF(empty) //////////////////////////////// //~ rjf: getting_started @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(getting_started) {} -DF_VIEW_CMD_FUNCTION_DEF(getting_started) {} -DF_VIEW_UI_FUNCTION_DEF(getting_started) +RD_VIEW_SETUP_FUNCTION_DEF(getting_started) {} +RD_VIEW_CMD_FUNCTION_DEF(getting_started) {} +RD_VIEW_UI_FUNCTION_DEF(getting_started) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); @@ -2911,8 +2911,8 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_Padding(ui_pct(1, 0)) UI_Focus(UI_FocusKind_Null) { - DF_EntityList targets = d_push_active_target_list(scratch.arena); - DF_EntityList processes = d_query_cached_entity_list_with_kind(DF_EntityKind_Process); + RD_EntityList targets = d_push_active_target_list(scratch.arena); + RD_EntityList processes = d_query_cached_entity_list_with_kind(RD_EntityKind_Process); //- rjf: icon & info UI_Padding(ui_em(2.f, 1.f)) @@ -2925,7 +2925,7 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) UI_Padding(ui_pct(1, 0)) UI_PrefWidth(ui_px(icon_dim, 1.f)) { - R_Handle texture = df_state->icon_texture; + R_Handle texture = rd_state->icon_texture; Vec2S32 texture_dim = r_size_from_tex2d(texture); ui_image(texture, R_Tex2DSampleKind_Linear, r2f32p(0, 0, texture_dim.x, texture_dim.y), v4f32(1, 1, 1, 1), 0, str8_lit("")); } @@ -2959,17 +2959,17 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) UI_TextAlignment(UI_TextAlign_Center) UI_PrefWidth(ui_em(22.f, 1.f)) UI_CornerRadius(ui_top_font_size()/2.f) - DF_Palette(DF_PaletteCode_NeutralPopButton) - if(ui_clicked(df_icon_buttonf(DF_IconKind_Add, 0, "Add Target"))) + RD_Palette(RD_PaletteCode_NeutralPopButton) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Add, 0, "Add Target"))) { - df_cmd(DF_CmdKind_RunCommand, .string = df_cmd_kind_info_table[DF_CmdKind_AddTarget].string); + rd_cmd(RD_CmdKind_RunCommand, .string = rd_cmd_kind_info_table[RD_CmdKind_AddTarget].string); } }break; //- rjf: user has 1 target. build helper for launching it case 1: { - DF_Entity *target = df_first_entity_from_list(&targets); + RD_Entity *target = rd_first_entity_from_list(&targets); String8 target_full_path = target->string; String8 target_name = str8_skip_last_slash(target_full_path); UI_PrefHeight(ui_em(3.75f, 1.f)) @@ -2978,16 +2978,16 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) UI_TextAlignment(UI_TextAlign_Center) UI_PrefWidth(ui_em(22.f, 1.f)) UI_CornerRadius(ui_top_font_size()/2.f) - DF_Palette(DF_PaletteCode_PositivePopButton) + RD_Palette(RD_PaletteCode_PositivePopButton) { - if(ui_clicked(df_icon_buttonf(DF_IconKind_Play, 0, "Launch %S", target_name))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Play, 0, "Launch %S", target_name))) { - df_cmd(DF_CmdKind_LaunchAndRun, .entity = df_handle_from_entity(target)); + rd_cmd(RD_CmdKind_LaunchAndRun, .entity = rd_handle_from_entity(target)); } ui_spacer(ui_em(1.5f, 1)); - if(ui_clicked(df_icon_buttonf(DF_IconKind_Play, 0, "Step Into %S", target_name))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Play, 0, "Step Into %S", target_name))) { - df_cmd(DF_CmdKind_LaunchAndInit, .entity = df_handle_from_entity(target)); + rd_cmd(RD_CmdKind_LaunchAndInit, .entity = rd_handle_from_entity(target)); } } }break; @@ -3018,7 +3018,7 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) UI_Padding(ui_pct(1, 0)) { ui_labelf("use"); - UI_Flags(UI_BoxFlag_DrawBorder) UI_TextAlignment(UI_TextAlign_Center) df_cmd_binding_buttons(df_cmd_kind_info_table[DF_CmdKind_RunCommand].string); + UI_Flags(UI_BoxFlag_DrawBorder) UI_TextAlignment(UI_TextAlign_Center) rd_cmd_binding_buttons(rd_cmd_kind_info_table[RD_CmdKind_RunCommand].string); ui_labelf("to open command menu"); } } @@ -3029,8 +3029,8 @@ DF_VIEW_UI_FUNCTION_DEF(getting_started) //////////////////////////////// //~ rjf: commands @view_hook_impl -typedef struct DF_CmdListerItem DF_CmdListerItem; -struct DF_CmdListerItem +typedef struct RD_CmdListerItem RD_CmdListerItem; +struct RD_CmdListerItem { String8 cmd_name; U64 registrar_idx; @@ -3040,38 +3040,38 @@ struct DF_CmdListerItem FuzzyMatchRangeList tags_match_ranges; }; -typedef struct DF_CmdListerItemNode DF_CmdListerItemNode; -struct DF_CmdListerItemNode +typedef struct RD_CmdListerItemNode RD_CmdListerItemNode; +struct RD_CmdListerItemNode { - DF_CmdListerItemNode *next; - DF_CmdListerItem item; + RD_CmdListerItemNode *next; + RD_CmdListerItem item; }; -typedef struct DF_CmdListerItemList DF_CmdListerItemList; -struct DF_CmdListerItemList +typedef struct RD_CmdListerItemList RD_CmdListerItemList; +struct RD_CmdListerItemList { - DF_CmdListerItemNode *first; - DF_CmdListerItemNode *last; + RD_CmdListerItemNode *first; + RD_CmdListerItemNode *last; U64 count; }; -typedef struct DF_CmdListerItemArray DF_CmdListerItemArray; -struct DF_CmdListerItemArray +typedef struct RD_CmdListerItemArray RD_CmdListerItemArray; +struct RD_CmdListerItemArray { - DF_CmdListerItem *v; + RD_CmdListerItem *v; U64 count; }; -internal DF_CmdListerItemList -df_cmd_lister_item_list_from_needle(Arena *arena, String8 needle) +internal RD_CmdListerItemList +rd_cmd_lister_item_list_from_needle(Arena *arena, String8 needle) { Temp scratch = scratch_begin(&arena, 1); - DF_CmdListerItemList result = {0}; + RD_CmdListerItemList result = {0}; // TODO(rjf): @msgs extend this with dynamically-registered command info - for(EachNonZeroEnumVal(DF_CmdKind, k)) + for(EachNonZeroEnumVal(RD_CmdKind, k)) { - DF_CmdKindInfo *info = &df_cmd_kind_info_table[k]; - if(info->flags & DF_CmdKindFlag_ListInUI) + RD_CmdKindInfo *info = &rd_cmd_kind_info_table[k]; + if(info->flags & RD_CmdKindFlag_ListInUI) { String8 cmd_display_name = info->display_name; String8 cmd_desc = info->description; @@ -3084,7 +3084,7 @@ df_cmd_lister_item_list_from_needle(Arena *arena, String8 needle) tags_matches.count > 0 || name_matches.needle_part_count == 0) { - DF_CmdListerItemNode *node = push_array(arena, DF_CmdListerItemNode, 1); + RD_CmdListerItemNode *node = push_array(arena, RD_CmdListerItemNode, 1); node->item.cmd_name = info->string; node->item.registrar_idx = (U64)k; node->item.ordering_idx = (U64)k; @@ -3100,14 +3100,14 @@ df_cmd_lister_item_list_from_needle(Arena *arena, String8 needle) return result; } -internal DF_CmdListerItemArray -df_cmd_lister_item_array_from_list(Arena *arena, DF_CmdListerItemList list) +internal RD_CmdListerItemArray +rd_cmd_lister_item_array_from_list(Arena *arena, RD_CmdListerItemList list) { - DF_CmdListerItemArray result = {0}; + RD_CmdListerItemArray result = {0}; result.count = list.count; - result.v = push_array(arena, DF_CmdListerItem, result.count); + result.v = push_array(arena, RD_CmdListerItem, result.count); U64 idx = 0; - for(DF_CmdListerItemNode *n = list.first; n != 0; n = n->next, idx += 1) + for(RD_CmdListerItemNode *n = list.first; n != 0; n = n->next, idx += 1) { result.v[idx] = n->item; } @@ -3115,7 +3115,7 @@ df_cmd_lister_item_array_from_list(Arena *arena, DF_CmdListerItemList list) } internal int -df_qsort_compare_cmd_lister__strength(DF_CmdListerItem *a, DF_CmdListerItem *b) +rd_qsort_compare_cmd_lister__strength(RD_CmdListerItem *a, RD_CmdListerItem *b) { int result = 0; if(a->name_match_ranges.count > b->name_match_ranges.count) @@ -3162,35 +3162,35 @@ df_qsort_compare_cmd_lister__strength(DF_CmdListerItem *a, DF_CmdListerItem *b) } internal void -df_cmd_lister_item_array_sort_by_strength__in_place(DF_CmdListerItemArray array) +rd_cmd_lister_item_array_sort_by_strength__in_place(RD_CmdListerItemArray array) { - quick_sort(array.v, array.count, sizeof(DF_CmdListerItem), df_qsort_compare_cmd_lister__strength); + quick_sort(array.v, array.count, sizeof(RD_CmdListerItem), rd_qsort_compare_cmd_lister__strength); } -DF_VIEW_SETUP_FUNCTION_DEF(commands) {} -DF_VIEW_CMD_FUNCTION_DEF(commands) {} -DF_VIEW_UI_FUNCTION_DEF(commands) +RD_VIEW_SETUP_FUNCTION_DEF(commands) {} +RD_VIEW_CMD_FUNCTION_DEF(commands) {} +RD_VIEW_UI_FUNCTION_DEF(commands) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); //- rjf: grab state - typedef struct DF_CmdsViewState DF_CmdsViewState; - struct DF_CmdsViewState + typedef struct RD_CmdsViewState RD_CmdsViewState; + struct RD_CmdsViewState { U64 selected_cmd_hash; }; - DF_CmdsViewState *cv = df_view_user_state(view, DF_CmdsViewState); + RD_CmdsViewState *cv = rd_view_user_state(view, RD_CmdsViewState); //- rjf: build filtered array of commands - DF_CmdListerItemList cmd_list = df_cmd_lister_item_list_from_needle(scratch.arena, string); - DF_CmdListerItemArray cmd_array = df_cmd_lister_item_array_from_list(scratch.arena, cmd_list); - df_cmd_lister_item_array_sort_by_strength__in_place(cmd_array); + RD_CmdListerItemList cmd_list = rd_cmd_lister_item_list_from_needle(scratch.arena, string); + RD_CmdListerItemArray cmd_array = rd_cmd_lister_item_array_from_list(scratch.arena, cmd_list); + rd_cmd_lister_item_array_sort_by_strength__in_place(cmd_array); //- rjf: submit best match when hitting enter w/ no selection if(cv->selected_cmd_hash == 0 && ui_slot_press(UI_EventActionSlot_Accept)) { - df_cmd(DF_CmdKind_CompleteQuery, .string = (cmd_array.count > 0 ? cmd_array.v[0].cmd_name : str8_zero())); + rd_cmd(RD_CmdKind_CompleteQuery, .string = (cmd_array.count > 0 ? cmd_array.v[0].cmd_name : str8_zero())); } //- rjf: selected kind -> cursor @@ -3232,8 +3232,8 @@ DF_VIEW_UI_FUNCTION_DEF(commands) row_idx <= visible_row_range.max && row_idx < cmd_array.count; row_idx += 1) { - DF_CmdListerItem *item = &cmd_array.v[row_idx]; - DF_CmdKindInfo *info = df_cmd_kind_info_from_string(item->cmd_name); + RD_CmdListerItem *item = &cmd_array.v[row_idx]; + RD_CmdKindInfo *info = rd_cmd_kind_info_from_string(item->cmd_name); //- rjf: build row contents ui_set_next_hover_cursor(OS_Cursor_HandPoint); @@ -3254,16 +3254,16 @@ DF_VIEW_UI_FUNCTION_DEF(commands) UI_PrefWidth(ui_em(3.f, 1.f)) UI_HeightFill UI_Column - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_HeightFill UI_TextAlignment(UI_TextAlign_Center) { - DF_IconKind icon = info->icon_kind; - if(icon != DF_IconKind_Null) + RD_IconKind icon = info->icon_kind; + if(icon != RD_IconKind_Null) { - ui_label(df_g_icon_kind_text_table[icon]); + ui_label(rd_icon_kind_text_table[icon]); } } @@ -3294,7 +3294,7 @@ DF_VIEW_UI_FUNCTION_DEF(commands) ui_set_next_flags(UI_BoxFlag_Clickable); UI_NamedRow(str8_lit("binding_row")) UI_Padding(ui_em(1.f, 1.f)) { - df_cmd_binding_buttons(item->cmd_name); + rd_cmd_binding_buttons(item->cmd_name); } } } @@ -3303,7 +3303,7 @@ DF_VIEW_UI_FUNCTION_DEF(commands) UI_Signal sig = ui_signal_from_box(box); if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_CompleteQuery, .string = item->cmd_name); + rd_cmd(RD_CmdKind_CompleteQuery, .string = item->cmd_name); } } } @@ -3325,66 +3325,66 @@ DF_VIEW_UI_FUNCTION_DEF(commands) //////////////////////////////// //~ rjf: file_system @view_hook_impl -typedef enum DF_FileSortKind +typedef enum RD_FileSortKind { - DF_FileSortKind_Null, - DF_FileSortKind_Filename, - DF_FileSortKind_LastModified, - DF_FileSortKind_Size, - DF_FileSortKind_COUNT + RD_FileSortKind_Null, + RD_FileSortKind_Filename, + RD_FileSortKind_LastModified, + RD_FileSortKind_Size, + RD_FileSortKind_COUNT } -DF_FileSortKind; +RD_FileSortKind; -typedef struct DF_FileInfo DF_FileInfo; -struct DF_FileInfo +typedef struct RD_FileInfo RD_FileInfo; +struct RD_FileInfo { String8 filename; FileProperties props; FuzzyMatchRangeList match_ranges; }; -typedef struct DF_FileInfoNode DF_FileInfoNode; -struct DF_FileInfoNode +typedef struct RD_FileInfoNode RD_FileInfoNode; +struct RD_FileInfoNode { - DF_FileInfoNode *next; - DF_FileInfo file_info; + RD_FileInfoNode *next; + RD_FileInfo file_info; }; -typedef struct DF_FileSystemViewPathState DF_FileSystemViewPathState; -struct DF_FileSystemViewPathState +typedef struct RD_FileSystemViewPathState RD_FileSystemViewPathState; +struct RD_FileSystemViewPathState { - DF_FileSystemViewPathState *hash_next; + RD_FileSystemViewPathState *hash_next; String8 normalized_path; Vec2S64 cursor; }; -typedef struct DF_FileSystemViewState DF_FileSystemViewState; -struct DF_FileSystemViewState +typedef struct RD_FileSystemViewState RD_FileSystemViewState; +struct RD_FileSystemViewState { B32 initialized; U64 path_state_table_size; - DF_FileSystemViewPathState **path_state_table; - DF_FileSortKind sort_kind; + RD_FileSystemViewPathState **path_state_table; + RD_FileSortKind sort_kind; Side sort_side; Arena *cached_files_arena; String8 cached_files_path; - DF_FileSortKind cached_files_sort_kind; + RD_FileSortKind cached_files_sort_kind; Side cached_files_sort_side; U64 cached_file_count; - DF_FileInfo *cached_files; + RD_FileInfo *cached_files; F32 col_pcts[3]; }; -typedef struct DF_PathQuery DF_PathQuery; -struct DF_PathQuery +typedef struct RD_PathQuery RD_PathQuery; +struct RD_PathQuery { String8 prefix; String8 path; String8 search; }; -internal DF_PathQuery -df_path_query_from_string(String8 string) +internal RD_PathQuery +rd_path_query_from_string(String8 string) { String8 dir_str_in_input = {0}; for(U64 i = 0; i < string.size; i += 1) @@ -3414,7 +3414,7 @@ df_path_query_from_string(String8 string) } } - DF_PathQuery path_query = {0}; + RD_PathQuery path_query = {0}; if(dir_str_in_input.size != 0) { String8 dir = dir_str_in_input; @@ -3437,13 +3437,13 @@ df_path_query_from_string(String8 string) } internal int -df_qsort_compare_file_info__filename(DF_FileInfo *a, DF_FileInfo *b) +rd_qsort_compare_file_info__filename(RD_FileInfo *a, RD_FileInfo *b) { return strncmp((char *)a->filename.str, (char *)b->filename.str, Min(a->filename.size, b->filename.size)); } internal int -df_qsort_compare_file_info__default(DF_FileInfo *a, DF_FileInfo *b) +rd_qsort_compare_file_info__default(RD_FileInfo *a, RD_FileInfo *b) { int result = 0; if(a->props.flags & FilePropertyFlag_IsFolder && !(b->props.flags & FilePropertyFlag_IsFolder)) @@ -3456,13 +3456,13 @@ df_qsort_compare_file_info__default(DF_FileInfo *a, DF_FileInfo *b) } else { - result = df_qsort_compare_file_info__filename(a, b); + result = rd_qsort_compare_file_info__filename(a, b); } return result; } internal int -df_qsort_compare_file_info__default_filtered(DF_FileInfo *a, DF_FileInfo *b) +rd_qsort_compare_file_info__default_filtered(RD_FileInfo *a, RD_FileInfo *b) { int result = 0; if(a->filename.size < b->filename.size) @@ -3477,7 +3477,7 @@ df_qsort_compare_file_info__default_filtered(DF_FileInfo *a, DF_FileInfo *b) } internal int -df_qsort_compare_file_info__last_modified(DF_FileInfo *a, DF_FileInfo *b) +rd_qsort_compare_file_info__last_modified(RD_FileInfo *a, RD_FileInfo *b) { return ((a->props.modified < b->props.modified) ? -1 : (a->props.modified > b->props.modified) ? +1 : @@ -3485,16 +3485,16 @@ df_qsort_compare_file_info__last_modified(DF_FileInfo *a, DF_FileInfo *b) } internal int -df_qsort_compare_file_info__size(DF_FileInfo *a, DF_FileInfo *b) +rd_qsort_compare_file_info__size(RD_FileInfo *a, RD_FileInfo *b) { return ((a->props.size < b->props.size) ? -1 : (a->props.size > b->props.size) ? +1 : 0); } -DF_VIEW_SETUP_FUNCTION_DEF(file_system){} -DF_VIEW_CMD_FUNCTION_DEF(file_system){} -DF_VIEW_UI_FUNCTION_DEF(file_system) +RD_VIEW_SETUP_FUNCTION_DEF(file_system){} +RD_VIEW_CMD_FUNCTION_DEF(file_system){} +RD_VIEW_UI_FUNCTION_DEF(file_system) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); @@ -3502,34 +3502,34 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) String8 query_normalized = path_normalized_from_string(scratch.arena, query); B32 query_has_slash = (query.size != 0 && char_to_correct_slash(query.str[query.size-1]) == '/'); String8 query_normalized_with_opt_slash = push_str8f(scratch.arena, "%S%s", query_normalized, query_has_slash ? "/" : ""); - DF_PathQuery path_query = df_path_query_from_string(query_normalized_with_opt_slash); + RD_PathQuery path_query = rd_path_query_from_string(query_normalized_with_opt_slash); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); F32 scroll_bar_dim = floor_f32(ui_top_font_size()*1.5f); - DF_Window *window = df_window_from_handle(df_regs()->window); - DF_CmdKindInfo *cmd_kind_info = df_cmd_kind_info_from_string(window->query_cmd_name); - B32 file_selection = !!(cmd_kind_info->query.flags & DF_QueryFlag_AllowFiles); - B32 dir_selection = !!(cmd_kind_info->query.flags & DF_QueryFlag_AllowFolders); + RD_Window *window = rd_window_from_handle(rd_regs()->window); + RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(window->query_cmd_name); + B32 file_selection = !!(cmd_kind_info->query.flags & RD_QueryFlag_AllowFiles); + B32 dir_selection = !!(cmd_kind_info->query.flags & RD_QueryFlag_AllowFolders); //- rjf: get extra state for this view - DF_FileSystemViewState *fs = df_view_user_state(view, DF_FileSystemViewState); + RD_FileSystemViewState *fs = rd_view_user_state(view, RD_FileSystemViewState); if(fs->initialized == 0) { fs->initialized = 1; fs->path_state_table_size = 256; - fs->path_state_table = push_array(view->arena, DF_FileSystemViewPathState *, fs->path_state_table_size); - fs->cached_files_arena = df_view_push_arena_ext(view); + fs->path_state_table = push_array(view->arena, RD_FileSystemViewPathState *, fs->path_state_table_size); + fs->cached_files_arena = rd_view_push_arena_ext(view); fs->col_pcts[0] = 0.60f; fs->col_pcts[1] = 0.20f; fs->col_pcts[2] = 0.20f; } //- rjf: grab state for the current path - DF_FileSystemViewPathState *ps = 0; + RD_FileSystemViewPathState *ps = 0; { String8 key = query_normalized; U64 hash = d_hash_from_string(key); U64 slot = hash % fs->path_state_table_size; - for(DF_FileSystemViewPathState *p = fs->path_state_table[slot]; p != 0; p = p->hash_next) + for(RD_FileSystemViewPathState *p = fs->path_state_table[slot]; p != 0; p = p->hash_next) { if(str8_match(p->normalized_path, key, 0)) { @@ -3539,7 +3539,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) } if(ps == 0) { - ps = push_array(view->arena, DF_FileSystemViewPathState, 1); + ps = push_array(view->arena, RD_FileSystemViewPathState, 1); ps->hash_next = fs->path_state_table[slot]; fs->path_state_table[slot] = ps; ps->normalized_path = push_str8_copy(view->arena, key); @@ -3548,7 +3548,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) //- rjf: get file array from the current path U64 file_count = fs->cached_file_count; - DF_FileInfo *files = fs->cached_files; + RD_FileInfo *files = fs->cached_files; if(!str8_match(fs->cached_files_path, query_normalized_with_opt_slash, 0) || fs->cached_files_sort_kind != fs->sort_kind || fs->cached_files_sort_side != fs->sort_side) @@ -3565,13 +3565,13 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) // choose the most recent change to a file browser path, and live with the // consequences). { - df_cmd(DF_CmdKind_SetCurrentPath, .file_path = path_query.path); + rd_cmd(RD_CmdKind_SetCurrentPath, .file_path = path_query.path); } //- rjf: get files, filtered U64 new_file_count = 0; - DF_FileInfoNode *first_file = 0; - DF_FileInfoNode *last_file = 0; + RD_FileInfoNode *first_file = 0; + RD_FileInfoNode *last_file = 0; { OS_FileIter *it = os_file_iter_begin(scratch.arena, path_query.path, 0); for(OS_FileInfo info = {0}; os_file_iter_next(scratch.arena, it, &info);) @@ -3581,7 +3581,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) B32 fits_dir_only = !!(info.props.flags & FilePropertyFlag_IsFolder) || !dir_selection; if(fits_search && fits_dir_only) { - DF_FileInfoNode *node = push_array(scratch.arena, DF_FileInfoNode, 1); + RD_FileInfoNode *node = push_array(scratch.arena, RD_FileInfoNode, 1); node->file_info.filename = push_str8_copy(fs->cached_files_arena, info.name); node->file_info.props = info.props; node->file_info.match_ranges = match_ranges; @@ -3593,10 +3593,10 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) } //- rjf: convert list to array - DF_FileInfo *new_files = push_array(fs->cached_files_arena, DF_FileInfo, new_file_count); + RD_FileInfo *new_files = push_array(fs->cached_files_arena, RD_FileInfo, new_file_count); { U64 idx = 0; - for(DF_FileInfoNode *n = first_file; n != 0; n = n->next, idx += 1) + for(RD_FileInfoNode *n = first_file; n != 0; n = n->next, idx += 1) { new_files[idx] = n->file_info; } @@ -3609,34 +3609,34 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) { if(path_query.search.size != 0) { - quick_sort(new_files, new_file_count, sizeof(DF_FileInfo), df_qsort_compare_file_info__default_filtered); + quick_sort(new_files, new_file_count, sizeof(RD_FileInfo), rd_qsort_compare_file_info__default_filtered); } else { - quick_sort(new_files, new_file_count, sizeof(DF_FileInfo), df_qsort_compare_file_info__default); + quick_sort(new_files, new_file_count, sizeof(RD_FileInfo), rd_qsort_compare_file_info__default); } }break; - case DF_FileSortKind_Filename: + case RD_FileSortKind_Filename: { - quick_sort(new_files, new_file_count, sizeof(DF_FileInfo), df_qsort_compare_file_info__filename); + quick_sort(new_files, new_file_count, sizeof(RD_FileInfo), rd_qsort_compare_file_info__filename); }break; - case DF_FileSortKind_LastModified: + case RD_FileSortKind_LastModified: { - quick_sort(new_files, new_file_count, sizeof(DF_FileInfo), df_qsort_compare_file_info__last_modified); + quick_sort(new_files, new_file_count, sizeof(RD_FileInfo), rd_qsort_compare_file_info__last_modified); }break; - case DF_FileSortKind_Size: + case RD_FileSortKind_Size: { - quick_sort(new_files, new_file_count, sizeof(DF_FileInfo), df_qsort_compare_file_info__size); + quick_sort(new_files, new_file_count, sizeof(RD_FileInfo), rd_qsort_compare_file_info__size); }break; } //- rjf: apply reverse - if(fs->sort_kind != DF_FileSortKind_Null && fs->sort_side == Side_Max) + if(fs->sort_kind != RD_FileSortKind_Null && fs->sort_side == Side_Max) { for(U64 idx = 0; idx < new_file_count/2; idx += 1) { U64 rev_idx = new_file_count - idx - 1; - Swap(DF_FileInfo, new_files[idx], new_files[rev_idx]); + Swap(RD_FileInfo, new_files[idx], new_files[rev_idx]); } } @@ -3653,7 +3653,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) // rjf: command search part is empty, but directory matches some file: if(path_query_path_props.created != 0 && path_query.search.size == 0) { - df_cmd(DF_CmdKind_CompleteQuery, .file_path = query_normalized_with_opt_slash); + rd_cmd(RD_CmdKind_CompleteQuery, .file_path = query_normalized_with_opt_slash); } // rjf: command argument exactly matches some file: @@ -3663,20 +3663,20 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) if(query_normalized_with_opt_slash_props.flags & FilePropertyFlag_IsFolder) { String8 new_path = push_str8f(scratch.arena, "%S%S/", path_query.path, path_query.search); - df_view_equip_query(view, new_path); + rd_view_equip_query(view, new_path); } // rjf: is a file -> complete view else { - df_cmd(DF_CmdKind_CompleteQuery, .file_path = query_normalized_with_opt_slash); + rd_cmd(RD_CmdKind_CompleteQuery, .file_path = query_normalized_with_opt_slash); } } // rjf: command argument is empty, picking folders -> use current folder else if(path_query.search.size == 0 && dir_selection) { - df_cmd(DF_CmdKind_CompleteQuery, .file_path = path_query.path); + rd_cmd(RD_CmdKind_CompleteQuery, .file_path = path_query.path); } // rjf: command argument does not exactly match any file, but lister results are in: @@ -3687,19 +3687,19 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) { String8 existing_path = str8_chop_last_slash(path_query.path); String8 new_path = push_str8f(scratch.arena, "%S/%S/", existing_path, files[0].filename); - df_view_equip_query(view, new_path); + rd_view_equip_query(view, new_path); } else { String8 file_path = push_str8f(scratch.arena, "%S%S", path_query.path, filename); - df_cmd(DF_CmdKind_CompleteQuery, .file_path = file_path); + rd_cmd(RD_CmdKind_CompleteQuery, .file_path = file_path); } } // rjf: command argument does not match any file, and lister is empty (new file) else { - df_cmd(DF_CmdKind_CompleteQuery, .file_path = query); + rd_cmd(RD_CmdKind_CompleteQuery, .file_path = query); } } @@ -3716,14 +3716,14 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) { struct { - DF_FileSortKind kind; + RD_FileSortKind kind; String8 string; } kinds[] = { - { DF_FileSortKind_Filename, str8_lit_comp("Filename") }, - { DF_FileSortKind_LastModified, str8_lit_comp("Last Modified") }, - { DF_FileSortKind_Size, str8_lit_comp("Size") }, + { RD_FileSortKind_Filename, str8_lit_comp("Filename") }, + { RD_FileSortKind_LastModified, str8_lit_comp("Last Modified") }, + { RD_FileSortKind_Size, str8_lit_comp("Size") }, }; for(U64 idx = 0; idx < ArrayCount(kinds); idx += 1) { @@ -3746,7 +3746,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) } else if(fs->sort_kind == kinds[idx].kind && fs->sort_side == Side_Min) { - fs->sort_kind = DF_FileSortKind_Null; + fs->sort_kind = RD_FileSortKind_Null; } } } @@ -3790,12 +3790,12 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) UI_Parent(sig.box) { // rjf: icons - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) UI_PrefWidth(ui_em(3.f, 1.f)) UI_TextAlignment(UI_TextAlign_Center) { - ui_label(df_g_icon_kind_text_table[DF_IconKind_LeftArrow]); + ui_label(rd_icon_kind_text_table[RD_IconKind_LeftArrow]); } // rjf: text @@ -3812,7 +3812,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) String8 new_path = str8_chop_last_slash(str8_chop_last_slash(path_query.path)); new_path = path_normalized_from_string(scratch.arena, new_path); String8 new_cmd = push_str8f(scratch.arena, "%S%s", new_path, new_path.size != 0 ? "/" : ""); - df_view_equip_query(view, new_cmd); + rd_view_equip_query(view, new_cmd); } } @@ -3822,7 +3822,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) row_idx += 1, row_num += 1) { U64 file_idx = row_idx-1; - DF_FileInfo *file = &files[file_idx]; + RD_FileInfo *file = &files[file_idx]; B32 file_kb_focus = (ps->cursor.y == (row_idx+1)); // rjf: make button @@ -3838,20 +3838,20 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) UI_PrefWidth(ui_pct(fs->col_pcts[0], 1)) UI_Row { // rjf: icon to signify directory - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) UI_PrefWidth(ui_em(3.f, 1.f)) UI_TextAlignment(UI_TextAlign_Center) { if(file->props.flags & FilePropertyFlag_IsFolder) { ui_label((ui_key_match(ui_hot_key(), file_sig.box->key) || file_kb_focus) - ? df_g_icon_kind_text_table[DF_IconKind_FolderOpenFilled] - : df_g_icon_kind_text_table[DF_IconKind_FolderClosedFilled]); + ? rd_icon_kind_text_table[RD_IconKind_FolderOpenFilled] + : rd_icon_kind_text_table[RD_IconKind_FolderClosedFilled]); } else { - ui_label(df_g_icon_kind_text_table[DF_IconKind_FileOutline]); + ui_label(rd_icon_kind_text_table[RD_IconKind_FileOutline]); } } @@ -3894,11 +3894,11 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) if(file->props.flags & FilePropertyFlag_IsFolder) { String8 new_cmd = push_str8f(scratch.arena, "%S%s", new_path, new_path.size != 0 ? "/" : ""); - df_view_equip_query(view, new_cmd); + rd_view_equip_query(view, new_cmd); } else { - df_cmd(DF_CmdKind_CompleteQuery, .file_path = new_path); + rd_cmd(RD_CmdKind_CompleteQuery, .file_path = new_path); } } } @@ -3911,8 +3911,8 @@ DF_VIEW_UI_FUNCTION_DEF(file_system) //////////////////////////////// //~ rjf: system_processes @view_hook_impl -typedef struct DF_ProcessInfo DF_ProcessInfo; -struct DF_ProcessInfo +typedef struct RD_ProcessInfo RD_ProcessInfo; +struct RD_ProcessInfo { DMN_ProcessInfo info; B32 is_attached; @@ -3921,30 +3921,30 @@ struct DF_ProcessInfo FuzzyMatchRangeList pid_match_ranges; }; -typedef struct DF_ProcessInfoNode DF_ProcessInfoNode; -struct DF_ProcessInfoNode +typedef struct RD_ProcessInfoNode RD_ProcessInfoNode; +struct RD_ProcessInfoNode { - DF_ProcessInfoNode *next; - DF_ProcessInfo info; + RD_ProcessInfoNode *next; + RD_ProcessInfo info; }; -typedef struct DF_ProcessInfoList DF_ProcessInfoList; -struct DF_ProcessInfoList +typedef struct RD_ProcessInfoList RD_ProcessInfoList; +struct RD_ProcessInfoList { - DF_ProcessInfoNode *first; - DF_ProcessInfoNode *last; + RD_ProcessInfoNode *first; + RD_ProcessInfoNode *last; U64 count; }; -typedef struct DF_ProcessInfoArray DF_ProcessInfoArray; -struct DF_ProcessInfoArray +typedef struct RD_ProcessInfoArray RD_ProcessInfoArray; +struct RD_ProcessInfoArray { - DF_ProcessInfo *v; + RD_ProcessInfo *v; U64 count; }; -internal DF_ProcessInfoList -df_process_info_list_from_query(Arena *arena, String8 query) +internal RD_ProcessInfoList +rd_process_info_list_from_query(Arena *arena, String8 query) { Temp scratch = scratch_begin(&arena, 1); @@ -3952,19 +3952,19 @@ df_process_info_list_from_query(Arena *arena, String8 query) U64 attached_process_count = 0; U32 *attached_process_pids = 0; { - DF_EntityList processes = d_query_cached_entity_list_with_kind(DF_EntityKind_Process); + RD_EntityList processes = d_query_cached_entity_list_with_kind(RD_EntityKind_Process); attached_process_count = processes.count; attached_process_pids = push_array(scratch.arena, U32, attached_process_count); U64 idx = 0; - for(DF_EntityNode *n = processes.first; n != 0; n = n->next, idx += 1) + for(RD_EntityNode *n = processes.first; n != 0; n = n->next, idx += 1) { - DF_Entity *process = n->entity; + RD_Entity *process = n->entity; attached_process_pids[idx] = process->ctrl_id; } } //- rjf: build list - DF_ProcessInfoList list = {0}; + RD_ProcessInfoList list = {0}; { DMN_ProcessIter iter = {0}; dmn_process_iter_begin(&iter); @@ -4005,7 +4005,7 @@ df_process_info_list_from_query(Arena *arena, String8 query) // rjf: push if unfiltered if(matches_query) { - DF_ProcessInfoNode *n = push_array(arena, DF_ProcessInfoNode, 1); + RD_ProcessInfoNode *n = push_array(arena, RD_ProcessInfoNode, 1); n->info.info = info; n->info.info.name = push_str8_copy(arena, info.name); n->info.is_attached = is_attached; @@ -4023,14 +4023,14 @@ df_process_info_list_from_query(Arena *arena, String8 query) return list; } -internal DF_ProcessInfoArray -df_process_info_array_from_list(Arena *arena, DF_ProcessInfoList list) +internal RD_ProcessInfoArray +rd_process_info_array_from_list(Arena *arena, RD_ProcessInfoList list) { - DF_ProcessInfoArray array = {0}; + RD_ProcessInfoArray array = {0}; array.count = list.count; - array.v = push_array(arena, DF_ProcessInfo, array.count); + array.v = push_array(arena, RD_ProcessInfo, array.count); U64 idx = 0; - for(DF_ProcessInfoNode *n = list.first; n != 0; n = n->next, idx += 1) + for(RD_ProcessInfoNode *n = list.first; n != 0; n = n->next, idx += 1) { array.v[idx] = n->info; } @@ -4038,7 +4038,7 @@ df_process_info_array_from_list(Arena *arena, DF_ProcessInfoList list) } internal int -df_qsort_compare_process_info(DF_ProcessInfo *a, DF_ProcessInfo *b) +rd_qsort_compare_process_info(RD_ProcessInfo *a, RD_ProcessInfo *b) { int result = 0; if(a->pid_match_ranges.count > b->pid_match_ranges.count) @@ -4069,57 +4069,57 @@ df_qsort_compare_process_info(DF_ProcessInfo *a, DF_ProcessInfo *b) } internal void -df_process_info_array_sort_by_strength__in_place(DF_ProcessInfoArray array) +rd_process_info_array_sort_by_strength__in_place(RD_ProcessInfoArray array) { - quick_sort(array.v, array.count, sizeof(DF_ProcessInfo), df_qsort_compare_process_info); + quick_sort(array.v, array.count, sizeof(RD_ProcessInfo), rd_qsort_compare_process_info); } -DF_VIEW_SETUP_FUNCTION_DEF(system_processes){} -DF_VIEW_CMD_FUNCTION_DEF(system_processes){} -DF_VIEW_UI_FUNCTION_DEF(system_processes) +RD_VIEW_SETUP_FUNCTION_DEF(system_processes){} +RD_VIEW_CMD_FUNCTION_DEF(system_processes){} +RD_VIEW_UI_FUNCTION_DEF(system_processes) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); //- rjf: grab state - typedef struct DF_SystemProcessesViewState DF_SystemProcessesViewState; - struct DF_SystemProcessesViewState + typedef struct RD_SystemProcessesViewState RD_SystemProcessesViewState; + struct RD_SystemProcessesViewState { B32 initialized; B32 need_initial_gather; U32 selected_pid; Arena *cached_process_arena; String8 cached_process_arg; - DF_ProcessInfoArray cached_process_array; + RD_ProcessInfoArray cached_process_array; }; - DF_SystemProcessesViewState *sp = df_view_user_state(view, DF_SystemProcessesViewState); + RD_SystemProcessesViewState *sp = rd_view_user_state(view, RD_SystemProcessesViewState); if(sp->initialized == 0) { sp->initialized = 1; sp->need_initial_gather = 1; - sp->cached_process_arena = df_view_push_arena_ext(view); + sp->cached_process_arena = rd_view_push_arena_ext(view); } //- rjf: gather list of filtered process infos String8 query = string; - DF_ProcessInfoArray process_info_array = sp->cached_process_array; + RD_ProcessInfoArray process_info_array = sp->cached_process_array; if(sp->need_initial_gather || !str8_match(sp->cached_process_arg, query, 0)) { arena_clear(sp->cached_process_arena); sp->need_initial_gather = 0; sp->cached_process_arg = push_str8_copy(sp->cached_process_arena, query); - DF_ProcessInfoList list = df_process_info_list_from_query(sp->cached_process_arena, query); - sp->cached_process_array = df_process_info_array_from_list(sp->cached_process_arena, list); + RD_ProcessInfoList list = rd_process_info_list_from_query(sp->cached_process_arena, query); + sp->cached_process_array = rd_process_info_array_from_list(sp->cached_process_arena, list); process_info_array = sp->cached_process_array; - df_process_info_array_sort_by_strength__in_place(process_info_array); + rd_process_info_array_sort_by_strength__in_place(process_info_array); } //- rjf: submit best match when hitting enter w/ no selection if(sp->selected_pid == 0 && process_info_array.count > 0 && ui_slot_press(UI_EventActionSlot_Accept)) { - DF_ProcessInfo *info = &process_info_array.v[0]; - df_cmd(DF_CmdKind_CompleteQuery, .pid = info->info.pid); + RD_ProcessInfo *info = &process_info_array.v[0]; + rd_cmd(RD_CmdKind_CompleteQuery, .pid = info->info.pid); } //- rjf: selected PID -> cursor @@ -4162,7 +4162,7 @@ DF_VIEW_UI_FUNCTION_DEF(system_processes) idx <= visible_row_range.max && idx < process_info_array.count; idx += 1) { - DF_ProcessInfo *info = &process_info_array.v[idx]; + RD_ProcessInfo *info = &process_info_array.v[idx]; B32 is_attached = info->is_attached; UI_Signal sig = {0}; UI_FocusHot(cursor.y == idx+1 ? UI_FocusKind_On : UI_FocusKind_Off) @@ -4172,12 +4172,12 @@ DF_VIEW_UI_FUNCTION_DEF(system_processes) UI_Parent(sig.box) { // rjf: icon - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) UI_PrefWidth(ui_em(3.f, 1.f)) UI_TextAlignment(UI_TextAlign_Center) { - ui_label(df_g_icon_kind_text_table[DF_IconKind_Threads]); + ui_label(rd_icon_kind_text_table[RD_IconKind_Threads]); } // rjf: attached indicator @@ -4207,7 +4207,7 @@ DF_VIEW_UI_FUNCTION_DEF(system_processes) // rjf: click => activate this specific process if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_CompleteQuery, .pid = info->info.pid); + rd_cmd(RD_CmdKind_CompleteQuery, .pid = info->info.pid); } } } @@ -4232,51 +4232,51 @@ DF_VIEW_UI_FUNCTION_DEF(system_processes) //////////////////////////////// //~ rjf: entity_lister @view_hook_impl -typedef struct DF_EntityListerItem DF_EntityListerItem; -struct DF_EntityListerItem +typedef struct RD_EntityListerItem RD_EntityListerItem; +struct RD_EntityListerItem { - DF_Entity *entity; + RD_Entity *entity; FuzzyMatchRangeList name_match_ranges; }; -typedef struct DF_EntityListerItemNode DF_EntityListerItemNode; -struct DF_EntityListerItemNode +typedef struct RD_EntityListerItemNode RD_EntityListerItemNode; +struct RD_EntityListerItemNode { - DF_EntityListerItemNode *next; - DF_EntityListerItem item; + RD_EntityListerItemNode *next; + RD_EntityListerItem item; }; -typedef struct DF_EntityListerItemList DF_EntityListerItemList; -struct DF_EntityListerItemList +typedef struct RD_EntityListerItemList RD_EntityListerItemList; +struct RD_EntityListerItemList { - DF_EntityListerItemNode *first; - DF_EntityListerItemNode *last; + RD_EntityListerItemNode *first; + RD_EntityListerItemNode *last; U64 count; }; -typedef struct DF_EntityListerItemArray DF_EntityListerItemArray; -struct DF_EntityListerItemArray +typedef struct RD_EntityListerItemArray RD_EntityListerItemArray; +struct RD_EntityListerItemArray { - DF_EntityListerItem *v; + RD_EntityListerItem *v; U64 count; }; -internal DF_EntityListerItemList -df_entity_lister_item_list_from_needle(Arena *arena, DF_EntityKind kind, DF_EntityFlags omit_flags, String8 needle) +internal RD_EntityListerItemList +rd_entity_lister_item_list_from_needle(Arena *arena, RD_EntityKind kind, RD_EntityFlags omit_flags, String8 needle) { Temp scratch = scratch_begin(&arena, 1); - DF_EntityListerItemList result = {0}; - DF_EntityList ent_list = d_query_cached_entity_list_with_kind(kind); - for(DF_EntityNode *n = ent_list.first; n != 0; n = n->next) + RD_EntityListerItemList result = {0}; + RD_EntityList ent_list = d_query_cached_entity_list_with_kind(kind); + for(RD_EntityNode *n = ent_list.first; n != 0; n = n->next) { - DF_Entity *entity = n->entity; + RD_Entity *entity = n->entity; if(!(entity->flags & omit_flags)) { - String8 display_string = df_display_string_from_entity(scratch.arena, entity); + String8 display_string = rd_display_string_from_entity(scratch.arena, entity); FuzzyMatchRangeList match_rngs = fuzzy_match_find(arena, needle, display_string); if(match_rngs.count != 0 || needle.size == 0) { - DF_EntityListerItemNode *item_n = push_array(arena, DF_EntityListerItemNode, 1); + RD_EntityListerItemNode *item_n = push_array(arena, RD_EntityListerItemNode, 1); item_n->item.entity = entity; item_n->item.name_match_ranges = match_rngs; SLLQueuePush(result.first, result.last, item_n); @@ -4288,15 +4288,15 @@ df_entity_lister_item_list_from_needle(Arena *arena, DF_EntityKind kind, DF_Enti return result; } -internal DF_EntityListerItemArray -df_entity_lister_item_array_from_list(Arena *arena, DF_EntityListerItemList list) +internal RD_EntityListerItemArray +rd_entity_lister_item_array_from_list(Arena *arena, RD_EntityListerItemList list) { - DF_EntityListerItemArray result = {0}; + RD_EntityListerItemArray result = {0}; result.count = list.count; - result.v = push_array(arena, DF_EntityListerItem, result.count); + result.v = push_array(arena, RD_EntityListerItem, result.count); { U64 idx = 0; - for(DF_EntityListerItemNode *n = list.first; n != 0; n = n->next, idx += 1) + for(RD_EntityListerItemNode *n = list.first; n != 0; n = n->next, idx += 1) { result.v[idx] = n->item; } @@ -4305,7 +4305,7 @@ df_entity_lister_item_array_from_list(Arena *arena, DF_EntityListerItemList list } internal int -df_qsort_compare_entity_lister__strength(DF_EntityListerItem *a, DF_EntityListerItem *b) +rd_qsort_compare_entity_lister__strength(RD_EntityListerItem *a, RD_EntityListerItem *b) { int result = 0; if(a->name_match_ranges.count > b->name_match_ranges.count) @@ -4320,44 +4320,44 @@ df_qsort_compare_entity_lister__strength(DF_EntityListerItem *a, DF_EntityLister } internal void -df_entity_lister_item_array_sort_by_strength__in_place(DF_EntityListerItemArray array) +rd_entity_lister_item_array_sort_by_strength__in_place(RD_EntityListerItemArray array) { - quick_sort(array.v, array.count, sizeof(DF_EntityListerItem), df_qsort_compare_entity_lister__strength); + quick_sort(array.v, array.count, sizeof(RD_EntityListerItem), rd_qsort_compare_entity_lister__strength); } -DF_VIEW_SETUP_FUNCTION_DEF(entity_lister){} -DF_VIEW_CMD_FUNCTION_DEF(entity_lister){} -DF_VIEW_UI_FUNCTION_DEF(entity_lister) +RD_VIEW_SETUP_FUNCTION_DEF(entity_lister){} +RD_VIEW_CMD_FUNCTION_DEF(entity_lister){} +RD_VIEW_UI_FUNCTION_DEF(entity_lister) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - DF_Window *window = df_window_from_handle(df_regs()->window); - DF_CmdKindInfo *cmd_kind_info = df_cmd_kind_info_from_string(window->query_cmd_name); - DF_EntityKind entity_kind = cmd_kind_info->query.entity_kind; - DF_EntityFlags entity_flags_omit = DF_EntityFlag_IsFolder; + RD_Window *window = rd_window_from_handle(rd_regs()->window); + RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(window->query_cmd_name); + RD_EntityKind entity_kind = cmd_kind_info->query.entity_kind; + RD_EntityFlags entity_flags_omit = RD_EntityFlag_IsFolder; F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); F32 scroll_bar_dim = floor_f32(ui_top_font_size()*1.5f); //- rjf: grab state - typedef struct DF_EntityListerViewState DF_EntityListerViewState; - struct DF_EntityListerViewState + typedef struct RD_EntityListerViewState RD_EntityListerViewState; + struct RD_EntityListerViewState { - D_Handle selected_entity_handle; + RD_Handle selected_entity_handle; }; - DF_EntityListerViewState *fev = df_view_user_state(view, DF_EntityListerViewState); - D_Handle selected_entity_handle = fev->selected_entity_handle; - DF_Entity *selected_entity = df_entity_from_handle(selected_entity_handle); + RD_EntityListerViewState *fev = rd_view_user_state(view, RD_EntityListerViewState); + RD_Handle selected_entity_handle = fev->selected_entity_handle; + RD_Entity *selected_entity = rd_entity_from_handle(selected_entity_handle); //- rjf: build filtered array of entities - DF_EntityListerItemList ent_list = df_entity_lister_item_list_from_needle(scratch.arena, entity_kind, entity_flags_omit, string); - DF_EntityListerItemArray ent_arr = df_entity_lister_item_array_from_list(scratch.arena, ent_list); - df_entity_lister_item_array_sort_by_strength__in_place(ent_arr); + RD_EntityListerItemList ent_list = rd_entity_lister_item_list_from_needle(scratch.arena, entity_kind, entity_flags_omit, string); + RD_EntityListerItemArray ent_arr = rd_entity_lister_item_array_from_list(scratch.arena, ent_list); + rd_entity_lister_item_array_sort_by_strength__in_place(ent_arr); //- rjf: submit best match when hitting enter w/ no selection - if(df_entity_is_nil(df_entity_from_handle(fev->selected_entity_handle)) && ent_arr.count != 0 && ui_slot_press(UI_EventActionSlot_Accept)) + if(rd_entity_is_nil(rd_entity_from_handle(fev->selected_entity_handle)) && ent_arr.count != 0 && ui_slot_press(UI_EventActionSlot_Accept)) { - DF_Entity *ent = ent_arr.v[0].entity; - df_cmd(DF_CmdKind_CompleteQuery, .entity = df_handle_from_entity(ent)); + RD_Entity *ent = ent_arr.v[0].entity; + rd_cmd(RD_CmdKind_CompleteQuery, .entity = rd_handle_from_entity(ent)); } //- rjf: selected entity -> cursor @@ -4399,8 +4399,8 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) idx <= visible_row_range.max && idx < ent_arr.count; idx += 1) { - DF_EntityListerItem item = ent_arr.v[idx]; - DF_Entity *ent = item.entity; + RD_EntityListerItem item = ent_arr.v[idx]; + RD_Entity *ent = item.entity; ui_set_next_hover_cursor(OS_Cursor_HandPoint); ui_set_next_child_layout_axis(Axis2_X); UI_Box *box = &ui_g_nil_box; @@ -4415,18 +4415,18 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) } UI_Parent(box) { - DF_IconKind icon_kind = df_entity_kind_icon_kind_table[ent->kind]; - if(icon_kind != DF_IconKind_Null) + RD_IconKind icon_kind = rd_entity_kind_icon_kind_table[ent->kind]; + if(icon_kind != RD_IconKind_Null) { UI_TextAlignment(UI_TextAlign_Center) - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_text_dim(10, 1)) - ui_label(df_g_icon_kind_text_table[icon_kind]); + ui_label(rd_icon_kind_text_table[icon_kind]); } - String8 display_string = df_display_string_from_entity(scratch.arena, ent); - Vec4F32 color = df_rgba_from_entity(ent); + String8 display_string = rd_display_string_from_entity(scratch.arena, ent); + Vec4F32 color = rd_rgba_from_entity(ent); if(color.w != 0) { ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = color)); @@ -4436,14 +4436,14 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) } if(ui_clicked(ui_signal_from_box(box))) { - df_cmd(DF_CmdKind_CompleteQuery, .entity = df_handle_from_entity(ent)); + rd_cmd(RD_CmdKind_CompleteQuery, .entity = rd_handle_from_entity(ent)); } } } //- rjf: selected entity num -> handle { - fev->selected_entity_handle = (1 <= cursor.y && cursor.y <= ent_arr.count) ? df_handle_from_entity(ent_arr.v[cursor.y-1].entity) : d_handle_zero(); + fev->selected_entity_handle = (1 <= cursor.y && cursor.y <= ent_arr.count) ? rd_handle_from_entity(ent_arr.v[cursor.y-1].entity) : rd_handle_zero(); } scratch_end(scratch); @@ -4453,9 +4453,9 @@ DF_VIEW_UI_FUNCTION_DEF(entity_lister) //////////////////////////////// //~ rjf: symbol_lister @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(symbol_lister){} -DF_VIEW_CMD_FUNCTION_DEF(symbol_lister){} -DF_VIEW_UI_FUNCTION_DEF(symbol_lister) +RD_VIEW_SETUP_FUNCTION_DEF(symbol_lister){} +RD_VIEW_CMD_FUNCTION_DEF(symbol_lister){} +RD_VIEW_UI_FUNCTION_DEF(symbol_lister) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); @@ -4480,12 +4480,12 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) } //- rjf: grab state - typedef struct DF_SymbolListerViewState DF_SymbolListerViewState; - struct DF_SymbolListerViewState + typedef struct RD_SymbolListerViewState RD_SymbolListerViewState; + struct RD_SymbolListerViewState { Vec2S64 cursor; }; - DF_SymbolListerViewState *slv = df_view_user_state(view, DF_SymbolListerViewState); + RD_SymbolListerViewState *slv = rd_view_user_state(view, RD_SymbolListerViewState); //- rjf: query -> raddbg, filtered items U128 fuzzy_search_key = {(U64)view, d_hash_from_string(str8_struct(&view))}; @@ -4493,7 +4493,7 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) FZY_ItemArray items = fzy_items_from_key_params_query(fzy_scope, fuzzy_search_key, &fuzzy_search_params, string, endt_us, &items_stale); if(items_stale) { - df_request_frame(); + rd_request_frame(); } //- rjf: submit best match when hitting enter w/ no selection @@ -4514,7 +4514,7 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) String8 name = str8(name_base, name_size); if(name.size != 0) { - df_cmd(DF_CmdKind_CompleteQuery, .string = name); + rd_cmd(RD_CmdKind_CompleteQuery, .string = name); } break; } @@ -4543,7 +4543,7 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) &visible_row_range, &scroll_list_sig) UI_Focus(UI_FocusKind_Null) - UI_TextRasterFlags(df_raster_flags_from_slot(DF_FontSlot_Code)) + UI_TextRasterFlags(rd_raster_flags_from_slot(RD_FontSlot_Code)) { //- rjf: build rows for(U64 idx = visible_row_range.min; @@ -4589,14 +4589,14 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) UI_BoxFlag_DrawHotEffects| UI_BoxFlag_DrawActiveEffects, "###procedure_%I64x", item->idx); - UI_Parent(box) UI_PrefWidth(ui_text_dim(10, 1)) DF_Font(DF_FontSlot_Code) + UI_Parent(box) UI_PrefWidth(ui_text_dim(10, 1)) RD_Font(RD_FontSlot_Code) { - UI_Box *box = df_code_label(1.f, 0, df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol), name); + UI_Box *box = rd_code_label(1.f, 0, rd_rgba_from_theme_color(RD_ThemeColor_CodeSymbol), name); ui_box_equip_fuzzy_match_ranges(box, &item->match_ranges); if(!e_type_key_match(e_type_key_zero(), type_key)) { String8 type_string = e_type_string_from_key(scratch.arena, type_key); - df_code_label(0.5f, 0, df_rgba_from_theme_color(DF_ThemeColor_TextWeak), type_string); + rd_code_label(0.5f, 0, rd_rgba_from_theme_color(RD_ThemeColor_TextWeak), type_string); } } @@ -4604,12 +4604,12 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) UI_Signal sig = ui_signal_from_box(box); if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_CompleteQuery, .string = name); + rd_cmd(RD_CmdKind_CompleteQuery, .string = name); } if(ui_hovering(sig)) UI_Tooltip { - DF_Font(DF_FontSlot_Code) df_code_label(1.f, 0, df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol), name); - DF_Font(DF_FontSlot_Main) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) + RD_Font(RD_FontSlot_Code) rd_code_label(1.f, 0, rd_rgba_from_theme_color(RD_ThemeColor_CodeSymbol), name); + RD_Font(RD_FontSlot_Main) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_labelf("Procedure #%I64u", item->idx); U64 binary_voff = d_voff_from_dbgi_key_symbol_name(&dbgi_key, name); D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, binary_voff); @@ -4617,12 +4617,12 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) { String8 file_path = lines.first->v.file_path; S64 line_num = lines.first->v.pt.line; - DF_Font(DF_FontSlot_Main) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) + RD_Font(RD_FontSlot_Main) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_labelf("%S:%I64d", file_path, line_num); } else { - DF_Font(DF_FontSlot_Main) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) + RD_Font(RD_FontSlot_Main) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(str8_lit("(No source code location found)")); } } @@ -4638,13 +4638,13 @@ DF_VIEW_UI_FUNCTION_DEF(symbol_lister) //////////////////////////////// //~ rjf: target @view_hook_impl -typedef struct DF_TargetViewState DF_TargetViewState; -struct DF_TargetViewState +typedef struct RD_TargetViewState RD_TargetViewState; +struct RD_TargetViewState { B32 initialized; // rjf: pick file kind - DF_EntityKind pick_dst_kind; + RD_EntityKind pick_dst_kind; // rjf: selection cursor Vec2S64 cursor; @@ -4661,62 +4661,62 @@ struct DF_TargetViewState F32 value_pct; }; -DF_VIEW_SETUP_FUNCTION_DEF(target) +RD_VIEW_SETUP_FUNCTION_DEF(target) { - DF_TargetViewState *tv = df_view_user_state(view, DF_TargetViewState); + RD_TargetViewState *tv = rd_view_user_state(view, RD_TargetViewState); } -DF_VIEW_CMD_FUNCTION_DEF(target) +RD_VIEW_CMD_FUNCTION_DEF(target) { - DF_TargetViewState *tv = df_view_user_state(view, DF_TargetViewState); - DF_Entity *entity = d_entity_from_eval_string(string); + RD_TargetViewState *tv = rd_view_user_state(view, RD_TargetViewState); + RD_Entity *entity = rd_entity_from_eval_string(string); #if 0 // TODO(rjf): @msgs // rjf: process commands - for(DF_Cmd *cmd = 0; df_next_cmd(&cmd);) + for(RD_Cmd *cmd = 0; rd_next_cmd(&cmd);) { // rjf: mismatched window/panel => skip - if(!d_handle_match(df_regs()->window, cmd->params.window) || - !d_handle_match(df_regs()->panel, cmd->params.panel)) + if(!rd_handle_match(rd_regs()->window, cmd->params.window) || + !rd_handle_match(rd_regs()->panel, cmd->params.panel)) { continue; } // rjf: process command - DF_CmdKind kind = df_cmd_kind_from_string(cmd->spec->info.string); + RD_CmdKind kind = rd_cmd_kind_from_string(cmd->spec->info.string); switch(kind) { default:break; - case DF_CmdKind_PickFile: - case DF_CmdKind_PickFolder: + case RD_CmdKind_PickFile: + case RD_CmdKind_PickFolder: { String8 pick_string = cmd->params.file_path; - DF_Entity *storage_entity = entity; - if(tv->pick_dst_kind != DF_EntityKind_Nil) + RD_Entity *storage_entity = entity; + if(tv->pick_dst_kind != RD_EntityKind_Nil) { - DF_Entity *child = df_entity_child_from_kind(entity, tv->pick_dst_kind); - if(df_entity_is_nil(child)) + RD_Entity *child = rd_entity_child_from_kind(entity, tv->pick_dst_kind); + if(rd_entity_is_nil(child)) { - child = df_entity_alloc(entity, tv->pick_dst_kind); + child = rd_entity_alloc(entity, tv->pick_dst_kind); } storage_entity = child; } - df_entity_equip_name(storage_entity, pick_string); + rd_entity_equip_name(storage_entity, pick_string); }break; } } #endif } -DF_VIEW_UI_FUNCTION_DEF(target) +RD_VIEW_UI_FUNCTION_DEF(target) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - DF_Entity *entity = d_entity_from_eval_string(string); - DF_EntityList custom_entry_points = df_push_entity_child_list_with_kind(scratch.arena, entity, DF_EntityKind_EntryPoint); + RD_Entity *entity = rd_entity_from_eval_string(string); + RD_EntityList custom_entry_points = rd_push_entity_child_list_with_kind(scratch.arena, entity, RD_EntityKind_EntryPoint); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); //- rjf: grab state - DF_TargetViewState *tv = df_view_user_state(view, DF_TargetViewState); + RD_TargetViewState *tv = rd_view_user_state(view, RD_TargetViewState); if(tv->initialized == 0) { tv->initialized = 1; @@ -4731,16 +4731,16 @@ DF_VIEW_UI_FUNCTION_DEF(target) B32 fill_with_folder; B32 use_code_font; String8 key; - DF_EntityKind storage_child_kind; + RD_EntityKind storage_child_kind; String8 current_text; } kv_info[] = { - { 0, 0, 0, str8_lit("Label"), DF_EntityKind_Nil, entity->string }, - { 1, 0, 0, str8_lit("Executable"), DF_EntityKind_Executable, df_entity_child_from_kind(entity, DF_EntityKind_Executable)->string }, - { 0, 0, 0, str8_lit("Arguments"), DF_EntityKind_Arguments, df_entity_child_from_kind(entity, DF_EntityKind_Arguments)->string }, - { 0, 1, 0, str8_lit("Working Directory"), DF_EntityKind_WorkingDirectory, df_entity_child_from_kind(entity, DF_EntityKind_WorkingDirectory)->string }, - { 0, 0, 1, str8_lit("Entry Point Override"), DF_EntityKind_EntryPoint, df_entity_child_from_kind(entity, DF_EntityKind_EntryPoint)->string }, + { 0, 0, 0, str8_lit("Label"), RD_EntityKind_Nil, entity->string }, + { 1, 0, 0, str8_lit("Executable"), RD_EntityKind_Executable, rd_entity_child_from_kind(entity, RD_EntityKind_Executable)->string }, + { 0, 0, 0, str8_lit("Arguments"), RD_EntityKind_Arguments, rd_entity_child_from_kind(entity, RD_EntityKind_Arguments)->string }, + { 0, 1, 0, str8_lit("Working Directory"), RD_EntityKind_WorkingDirectory, rd_entity_child_from_kind(entity, RD_EntityKind_WorkingDirectory)->string }, + { 0, 0, 1, str8_lit("Entry Point Override"), RD_EntityKind_EntryPoint, rd_entity_child_from_kind(entity, RD_EntityKind_EntryPoint)->string }, }; //- rjf: take controls to start/end editing @@ -4796,7 +4796,7 @@ DF_VIEW_UI_FUNCTION_DEF(target) scroll_list_params.item_range = r1s64(0, (S64)ArrayCount(kv_info)); scroll_list_params.cursor_min_is_empty_selection[Axis2_Y] = 1; } - DF_EntityKind commit_storage_child_kind = DF_EntityKind_Nil; + RD_EntityKind commit_storage_child_kind = RD_EntityKind_Nil; Vec2S64 next_cursor = tv->cursor; UI_ScrollListSignal scroll_list_sig = {0}; UI_Focus(UI_FocusKind_On) @@ -4825,13 +4825,13 @@ DF_VIEW_UI_FUNCTION_DEF(target) //- rjf: key (label) UI_TableCell UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) { - if(kv_info[idx].storage_child_kind == DF_EntityKind_EntryPoint) + if(kv_info[idx].storage_child_kind == RD_EntityKind_EntryPoint) { - if(df_help_label(str8_lit("Custom Entry Point"))) UI_Tooltip + if(rd_help_label(str8_lit("Custom Entry Point"))) UI_Tooltip { ui_label_multiline(ui_top_font_size()*30.f, str8_lit("By default, the debugger attempts to find a target's entry point with a set of default names, such as:")); ui_spacer(ui_em(1.5f, 1.f)); - DF_Font(DF_FontSlot_Code) UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol))) + RD_Font(RD_FontSlot_Code) UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_CodeSymbol))) { ui_label(str8_lit("WinMain")); ui_label(str8_lit("wWinMain")); @@ -4854,7 +4854,7 @@ DF_VIEW_UI_FUNCTION_DEF(target) UI_TableCell { // rjf: value editor - UI_WidthFill DF_Font(kv_info[idx].use_code_font ? DF_FontSlot_Code : DF_FontSlot_Main) + UI_WidthFill RD_Font(kv_info[idx].use_code_font ? RD_FontSlot_Code : RD_FontSlot_Main) { // rjf: * => focus B32 value_selected = row_selected && (next_cursor.x == 0 || !has_browse); @@ -4874,14 +4874,14 @@ DF_VIEW_UI_FUNCTION_DEF(target) UI_FocusHot(value_selected ? UI_FocusKind_On : UI_FocusKind_Off) UI_FocusActive((value_selected && tv->input_editing) ? UI_FocusKind_On : UI_FocusKind_Off) { - sig = df_line_editf(DF_LineEditFlag_NoBackground, 0, 0, &tv->input_cursor, &tv->input_mark, tv->input_buffer, sizeof(tv->input_buffer), &tv->input_size, 0, kv_info[idx].current_text, "###kv_editor_%i", (S32)idx); + sig = rd_line_editf(RD_LineEditFlag_NoBackground, 0, 0, &tv->input_cursor, &tv->input_mark, tv->input_buffer, sizeof(tv->input_buffer), &tv->input_size, 0, kv_info[idx].current_text, "###kv_editor_%i", (S32)idx); edit_commit = edit_commit || ui_committed(sig); } // rjf: focus panel on press if(ui_pressed(sig)) { - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); } // rjf: begin editing on double-click @@ -4923,8 +4923,8 @@ DF_VIEW_UI_FUNCTION_DEF(target) UI_TextAlignment(UI_TextAlign_Center) if(ui_clicked(ui_buttonf("Browse..."))) { - DF_CmdKind cmd_kind = kv_info[idx].fill_with_file ? DF_CmdKind_PickFile : DF_CmdKind_PickFolder; - df_cmd(DF_CmdKind_RunCommand, .string = df_cmd_kind_info_table[cmd_kind].string); + RD_CmdKind cmd_kind = kv_info[idx].fill_with_file ? RD_CmdKind_PickFile : RD_CmdKind_PickFolder; + rd_cmd(RD_CmdKind_RunCommand, .string = rd_cmd_kind_info_table[cmd_kind].string); tv->pick_dst_kind = kv_info[idx].storage_child_kind; } } @@ -4941,16 +4941,16 @@ DF_VIEW_UI_FUNCTION_DEF(target) { default: { - DF_Entity *child = df_entity_child_from_kind(entity, commit_storage_child_kind); - if(df_entity_is_nil(child)) + RD_Entity *child = rd_entity_child_from_kind(entity, commit_storage_child_kind); + if(rd_entity_is_nil(child)) { - child = df_entity_alloc(entity, commit_storage_child_kind); + child = rd_entity_alloc(entity, commit_storage_child_kind); } - df_entity_equip_name(child, new_string); + rd_entity_equip_name(child, new_string); }break; - case DF_EntityKind_Nil: + case RD_EntityKind_Nil: { - df_entity_equip_name(entity, new_string); + rd_entity_equip_name(entity, new_string); }break; } } @@ -4975,25 +4975,25 @@ DF_VIEW_UI_FUNCTION_DEF(target) //////////////////////////////// //~ rjf: targets @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(targets){} -DF_VIEW_CMD_FUNCTION_DEF(targets){} -DF_VIEW_UI_FUNCTION_DEF(targets) +RD_VIEW_SETUP_FUNCTION_DEF(targets){} +RD_VIEW_CMD_FUNCTION_DEF(targets){} +RD_VIEW_UI_FUNCTION_DEF(targets) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - DF_EntityList targets_list = d_query_cached_entity_list_with_kind(DF_EntityKind_Target); - DF_EntityFuzzyItemArray targets = df_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &targets_list, string); + RD_EntityList targets_list = d_query_cached_entity_list_with_kind(RD_EntityKind_Target); + RD_EntityFuzzyItemArray targets = rd_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &targets_list, string); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); //- rjf: grab state - typedef struct DF_TargetsViewState DF_TargetsViewState; - struct DF_TargetsViewState + typedef struct RD_TargetsViewState RD_TargetsViewState; + struct RD_TargetsViewState { B32 selected_add; - D_Handle selected_target_handle; + RD_Handle selected_target_handle; S64 selected_column; }; - DF_TargetsViewState *tv = df_view_user_state(view, DF_TargetsViewState); + RD_TargetsViewState *tv = rd_view_user_state(view, RD_TargetsViewState); //- rjf: determine table bounds Vec2S64 table_bounds = {5, (S64)targets.count+1}; @@ -5002,7 +5002,7 @@ DF_VIEW_UI_FUNCTION_DEF(targets) // NOTE(rjf): 0 => nothing, 1 => add new, 2 => first target Vec2S64 cursor = {0}; { - DF_Entity *selected_target = df_entity_from_handle(tv->selected_target_handle); + RD_Entity *selected_target = rd_entity_from_handle(tv->selected_target_handle); for(U64 idx = 0; idx < targets.count; idx += 1) { if(selected_target == targets.v[idx].entity) @@ -5044,10 +5044,10 @@ DF_VIEW_UI_FUNCTION_DEF(targets) { UI_Signal add_sig = {0}; UI_FocusHot(cursor.y == 1 ? UI_FocusKind_On : UI_FocusKind_Off) - add_sig = df_icon_buttonf(DF_IconKind_Add, 0, "Add New Target"); + add_sig = rd_icon_buttonf(RD_IconKind_Add, 0, "Add New Target"); if(ui_clicked(add_sig)) { - df_cmd(DF_CmdKind_RunCommand, .string = df_cmd_kind_info_table[DF_CmdKind_AddTarget].string); + rd_cmd(RD_CmdKind_RunCommand, .string = rd_cmd_kind_info_table[RD_CmdKind_AddTarget].string); } } @@ -5057,24 +5057,24 @@ DF_VIEW_UI_FUNCTION_DEF(targets) row_idx += 1) UI_Row { - DF_Entity *target = targets.v[row_idx-1].entity; + RD_Entity *target = targets.v[row_idx-1].entity; B32 row_selected = ((U64)cursor.y == row_idx+1); // rjf: enabled UI_PrefWidth(ui_em(2.25f, 1)) UI_FocusHot((row_selected && cursor.x == 0) ? UI_FocusKind_On : UI_FocusKind_Off) { - UI_Signal sig = df_icon_buttonf(!target->disabled ? DF_IconKind_CheckFilled : DF_IconKind_CheckHollow, 0, "###ebl_%p", target); + UI_Signal sig = rd_icon_buttonf(!target->disabled ? RD_IconKind_CheckFilled : RD_IconKind_CheckHollow, 0, "###ebl_%p", target); if(ui_clicked(sig)) { - df_cmd(!target->disabled ? DF_CmdKind_DisableTarget : DF_CmdKind_EnableTarget, .entity = df_handle_from_entity(target)); + rd_cmd(!target->disabled ? RD_CmdKind_DisableTarget : RD_CmdKind_EnableTarget, .entity = rd_handle_from_entity(target)); } } // rjf: target name UI_WidthFill UI_FocusHot((row_selected && cursor.x == 1) ? UI_FocusKind_On : UI_FocusKind_Off) { - df_entity_desc_button(target, &targets.v[row_idx-1].matches, string, 0); + rd_entity_desc_button(target, &targets.v[row_idx-1].matches, string, 0); } // rjf: controls @@ -5082,23 +5082,23 @@ DF_VIEW_UI_FUNCTION_DEF(targets) { struct { - DF_IconKind icon; + RD_IconKind icon; String8 text; - DF_CmdKind cmd; + RD_CmdKind cmd; } ctrls[] = { - { DF_IconKind_PlayStepForward, str8_lit("Launch and Initialize"), DF_CmdKind_LaunchAndInit }, - { DF_IconKind_Play, str8_lit("Launch and Run"), DF_CmdKind_LaunchAndRun }, - { DF_IconKind_Pencil, str8_lit("Edit"), DF_CmdKind_Target }, - { DF_IconKind_Trash, str8_lit("Delete"), DF_CmdKind_RemoveTarget }, + { RD_IconKind_PlayStepForward, str8_lit("Launch and Initialize"), RD_CmdKind_LaunchAndInit }, + { RD_IconKind_Play, str8_lit("Launch and Run"), RD_CmdKind_LaunchAndRun }, + { RD_IconKind_Pencil, str8_lit("Edit"), RD_CmdKind_Target }, + { RD_IconKind_Trash, str8_lit("Delete"), RD_CmdKind_RemoveTarget }, }; for(U64 ctrl_idx = 0; ctrl_idx < ArrayCount(ctrls); ctrl_idx += 1) { UI_Signal sig = {0}; UI_FocusHot((row_selected && cursor.x == 2+ctrl_idx) ? UI_FocusKind_On : UI_FocusKind_Off) { - sig = df_icon_buttonf(ctrls[ctrl_idx].icon, 0, "###%p_ctrl_%i", target, (int)ctrl_idx); + sig = rd_icon_buttonf(ctrls[ctrl_idx].icon, 0, "###%p_ctrl_%i", target, (int)ctrl_idx); } if(ui_hovering(sig)) UI_Tooltip { @@ -5106,7 +5106,7 @@ DF_VIEW_UI_FUNCTION_DEF(targets) } if(ui_clicked(sig)) { - df_cmd(ctrls[ctrl_idx].cmd, .entity = df_handle_from_entity(target)); + rd_cmd(ctrls[ctrl_idx].cmd, .entity = rd_handle_from_entity(target)); } } } @@ -5116,7 +5116,7 @@ DF_VIEW_UI_FUNCTION_DEF(targets) //- rjf: commit cursor to selection state { tv->selected_column = cursor.x; - tv->selected_target_handle = (1 < cursor.y && cursor.y < targets.count+2) ? df_handle_from_entity(targets.v[cursor.y-2].entity) : d_handle_zero(); + tv->selected_target_handle = (1 < cursor.y && cursor.y < targets.count+2) ? rd_handle_from_entity(targets.v[cursor.y-2].entity) : rd_handle_zero(); tv->selected_add = (cursor.y == 1); } @@ -5127,8 +5127,8 @@ DF_VIEW_UI_FUNCTION_DEF(targets) //////////////////////////////// //~ rjf: file_path_map @view_hook_impl -typedef struct DF_FilePathMapViewState DF_FilePathMapViewState; -struct DF_FilePathMapViewState +typedef struct RD_FilePathMapViewState RD_FilePathMapViewState; +struct RD_FilePathMapViewState { B32 initialized; Vec2S64 cursor; @@ -5137,15 +5137,15 @@ struct DF_FilePathMapViewState U8 input_buffer[1024]; U64 input_size; B32 input_editing; - D_Handle pick_file_dst_map; + RD_Handle pick_file_dst_map; Side pick_file_dst_side; F32 src_column_pct; F32 dst_column_pct; }; -DF_VIEW_SETUP_FUNCTION_DEF(file_path_map) +RD_VIEW_SETUP_FUNCTION_DEF(file_path_map) { - DF_FilePathMapViewState *fpms = df_view_user_state(view, DF_FilePathMapViewState); + RD_FilePathMapViewState *fpms = rd_view_user_state(view, RD_FilePathMapViewState); if(fpms->initialized == 0) { fpms->initialized = 1; @@ -5154,52 +5154,52 @@ DF_VIEW_SETUP_FUNCTION_DEF(file_path_map) } } -DF_VIEW_CMD_FUNCTION_DEF(file_path_map) +RD_VIEW_CMD_FUNCTION_DEF(file_path_map) { - DF_FilePathMapViewState *fpms = df_view_user_state(view, DF_FilePathMapViewState); + RD_FilePathMapViewState *fpms = rd_view_user_state(view, RD_FilePathMapViewState); // rjf: process commands - for(DF_Cmd *cmd = 0; df_next_cmd(&cmd);) + for(RD_Cmd *cmd = 0; rd_next_cmd(&cmd);) { // rjf: mismatched window/panel => skip - if(!d_handle_match(df_regs()->window, cmd->regs->window) || - !d_handle_match(df_regs()->panel, cmd->regs->panel)) + if(!rd_handle_match(rd_regs()->window, cmd->regs->window) || + !rd_handle_match(rd_regs()->panel, cmd->regs->panel)) { continue; } //rjf: process - DF_CmdKind kind = df_cmd_kind_from_string(cmd->name); + RD_CmdKind kind = rd_cmd_kind_from_string(cmd->name); switch(kind) { default:break; - case DF_CmdKind_PickFile: - case DF_CmdKind_PickFolder: - case DF_CmdKind_PickFileOrFolder: + case RD_CmdKind_PickFile: + case RD_CmdKind_PickFolder: + case RD_CmdKind_PickFileOrFolder: { String8 pick_string = cmd->regs->file_path; Side pick_side = fpms->pick_file_dst_side; - DF_Entity *storage_entity = df_entity_from_handle(fpms->pick_file_dst_map); - df_cmd(pick_side == Side_Min ? - DF_CmdKind_SetFileOverrideLinkSrc : - DF_CmdKind_SetFileOverrideLinkDst, - .entity = df_handle_from_entity(storage_entity), + RD_Entity *storage_entity = rd_entity_from_handle(fpms->pick_file_dst_map); + rd_cmd(pick_side == Side_Min ? + RD_CmdKind_SetFileOverrideLinkSrc : + RD_CmdKind_SetFileOverrideLinkDst, + .entity = rd_handle_from_entity(storage_entity), .file_path = pick_string); }break; } } } -DF_VIEW_UI_FUNCTION_DEF(file_path_map) +RD_VIEW_UI_FUNCTION_DEF(file_path_map) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - DF_EntityList maps_list = d_query_cached_entity_list_with_kind(DF_EntityKind_FilePathMap); - DF_EntityArray maps = df_entity_array_from_list(scratch.arena, &maps_list); + RD_EntityList maps_list = d_query_cached_entity_list_with_kind(RD_EntityKind_FilePathMap); + RD_EntityArray maps = rd_entity_array_from_list(scratch.arena, &maps_list); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); //- rjf: grab state - DF_FilePathMapViewState *fpms = df_view_user_state(view, DF_FilePathMapViewState); + RD_FilePathMapViewState *fpms = rd_view_user_state(view, RD_FilePathMapViewState); //- rjf: take controls to start/end editing B32 edit_begin = 0; @@ -5240,7 +5240,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) } //- rjf: build - D_Handle commit_map = d_handle_zero(); + RD_Handle commit_map = rd_handle_zero(); Side commit_side = Side_Invalid; F32 *col_pcts[] = { &fpms->src_column_pct, &fpms->dst_column_pct }; Vec2S64 next_cursor = fpms->cursor; @@ -5270,7 +5270,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) //- rjf: header if(visible_row_range.min == 0) UI_TableVector UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) { - UI_TableCell if(df_help_label(str8_lit("Source Path"))) UI_Tooltip + UI_TableCell if(rd_help_label(str8_lit("Source Path"))) UI_Tooltip { ui_label_multiline(ui_top_font_size()*30, str8_lit("When the debugger attempts to open a file or folder at a Source Path specified in this table, it will redirect to the file or folder specified by the Destination Path.")); } @@ -5283,9 +5283,9 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) row_idx += 1) UI_TableVector { U64 map_idx = row_idx-1; - DF_Entity *map = (map_idx < maps.count ? maps.v[map_idx] : &d_nil_entity); - DF_Entity *map_src = df_entity_child_from_kind(map, DF_EntityKind_Source); - DF_Entity *map_dst = df_entity_child_from_kind(map, DF_EntityKind_Dest); + RD_Entity *map = (map_idx < maps.count ? maps.v[map_idx] : &d_nil_entity); + RD_Entity *map_src = rd_entity_child_from_kind(map, RD_EntityKind_Source); + RD_Entity *map_dst = rd_entity_child_from_kind(map, RD_EntityKind_Dest); String8 map_src_path = map_src->string; String8 map_dst_path = map_dst->string; B32 row_selected = (fpms->cursor.y == row_idx); @@ -5312,14 +5312,14 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) UI_FocusHot(value_selected ? UI_FocusKind_On : UI_FocusKind_Off) UI_FocusActive((value_selected && fpms->input_editing) ? UI_FocusKind_On : UI_FocusKind_Off) { - sig = df_line_editf(DF_LineEditFlag_NoBackground, 0, 0, &fpms->input_cursor, &fpms->input_mark, fpms->input_buffer, sizeof(fpms->input_buffer), &fpms->input_size, 0, map_src_path, "###src_editor_%p", map); + sig = rd_line_editf(RD_LineEditFlag_NoBackground, 0, 0, &fpms->input_cursor, &fpms->input_mark, fpms->input_buffer, sizeof(fpms->input_buffer), &fpms->input_size, 0, map_src_path, "###src_editor_%p", map); edit_commit = edit_commit || ui_committed(sig); } // rjf: focus panel on press if(ui_pressed(sig)) { - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); } // rjf: begin editing on double-click @@ -5345,7 +5345,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) if(value_selected) { commit_side = Side_Min; - commit_map = df_handle_from_entity(map); + commit_map = rd_handle_from_entity(map); } } @@ -5354,8 +5354,8 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) UI_PrefWidth(ui_text_dim(10, 1)) if(ui_clicked(ui_buttonf("Browse..."))) { - df_cmd(DF_CmdKind_RunCommand, .string = df_cmd_kind_info_table[DF_CmdKind_PickFileOrFolder].string); - fpms->pick_file_dst_map = df_handle_from_entity(map); + rd_cmd(RD_CmdKind_RunCommand, .string = rd_cmd_kind_info_table[RD_CmdKind_PickFileOrFolder].string); + fpms->pick_file_dst_map = rd_handle_from_entity(map); fpms->pick_file_dst_side = Side_Min; } } @@ -5382,14 +5382,14 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) UI_FocusHot(value_selected ? UI_FocusKind_On : UI_FocusKind_Off) UI_FocusActive((value_selected && fpms->input_editing) ? UI_FocusKind_On : UI_FocusKind_Off) { - sig = df_line_editf(DF_LineEditFlag_NoBackground, 0, 0, &fpms->input_cursor, &fpms->input_mark, fpms->input_buffer, sizeof(fpms->input_buffer), &fpms->input_size, 0, map_dst_path, "###dst_editor_%p", map); + sig = rd_line_editf(RD_LineEditFlag_NoBackground, 0, 0, &fpms->input_cursor, &fpms->input_mark, fpms->input_buffer, sizeof(fpms->input_buffer), &fpms->input_size, 0, map_dst_path, "###dst_editor_%p", map); edit_commit = edit_commit || ui_committed(sig); } // rjf: focus panel on press if(ui_pressed(sig)) { - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); } // rjf: begin editing on double-click @@ -5415,7 +5415,7 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) if(value_selected) { commit_side = Side_Max; - commit_map = df_handle_from_entity(map); + commit_map = rd_handle_from_entity(map); } } @@ -5425,8 +5425,8 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) UI_PrefWidth(ui_text_dim(10, 1)) if(ui_clicked(ui_buttonf("Browse..."))) { - df_cmd(DF_CmdKind_RunCommand, .string = df_cmd_kind_info_table[DF_CmdKind_PickFileOrFolder].string); - fpms->pick_file_dst_map = df_handle_from_entity(map); + rd_cmd(RD_CmdKind_RunCommand, .string = rd_cmd_kind_info_table[RD_CmdKind_PickFileOrFolder].string); + fpms->pick_file_dst_map = rd_handle_from_entity(map); fpms->pick_file_dst_side = Side_Max; } } @@ -5438,9 +5438,9 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) if(edit_commit && commit_side != Side_Invalid) { String8 new_string = str8(fpms->input_buffer, fpms->input_size); - df_cmd(commit_side == Side_Min ? - DF_CmdKind_SetFileOverrideLinkSrc : - DF_CmdKind_SetFileOverrideLinkDst, + rd_cmd(commit_side == Side_Min ? + RD_CmdKind_SetFileOverrideLinkSrc : + RD_CmdKind_SetFileOverrideLinkDst, .entity = commit_map, .file_path = new_string); } @@ -5467,106 +5467,106 @@ DF_VIEW_UI_FUNCTION_DEF(file_path_map) //////////////////////////////// //~ rjf: auto_view_rules @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(auto_view_rules){} -DF_VIEW_CMD_FUNCTION_DEF(auto_view_rules){} -DF_VIEW_UI_FUNCTION_DEF(auto_view_rules){} +RD_VIEW_SETUP_FUNCTION_DEF(auto_view_rules){} +RD_VIEW_CMD_FUNCTION_DEF(auto_view_rules){} +RD_VIEW_UI_FUNCTION_DEF(auto_view_rules){} //////////////////////////////// //~ rjf: breakpoints @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(breakpoints) +RD_VIEW_SETUP_FUNCTION_DEF(breakpoints) { - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_init(wv, view, DF_WatchViewFillKind_Breakpoints); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Member, 0.25f, .string = str8_lit("label"), .display_string = str8_lit("Label"), .dequote_string = 1, .is_non_code = 1); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Member, 0.35f, .string = str8_lit("location"), .display_string = str8_lit("Location"), .dequote_string = 1, .is_non_code = 1); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Member, 0.20f, .string = str8_lit("condition"), .display_string = str8_lit("Condition"), .dequote_string = 1); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Member, 0.10f, .string = str8_lit("enabled"), .display_string = str8_lit("Enabled"), .view_rule = str8_lit("checkbox")); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Member, 0.10f, .string = str8_lit("hit_count"), .display_string = str8_lit("Hit Count")); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_init(wv, view, RD_WatchViewFillKind_Breakpoints); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.25f, .string = str8_lit("label"), .display_string = str8_lit("Label"), .dequote_string = 1, .is_non_code = 1); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.35f, .string = str8_lit("location"), .display_string = str8_lit("Location"), .dequote_string = 1, .is_non_code = 1); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.20f, .string = str8_lit("condition"), .display_string = str8_lit("Condition"), .dequote_string = 1); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.10f, .string = str8_lit("enabled"), .display_string = str8_lit("Enabled"), .view_rule = str8_lit("checkbox")); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.10f, .string = str8_lit("hit_count"), .display_string = str8_lit("Hit Count")); } -DF_VIEW_CMD_FUNCTION_DEF(breakpoints){} -DF_VIEW_UI_FUNCTION_DEF(breakpoints) +RD_VIEW_CMD_FUNCTION_DEF(breakpoints){} +RD_VIEW_UI_FUNCTION_DEF(breakpoints) { ProfBeginFunction(); - DF_WatchViewState *ewv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_build(view, ewv, 0, 10, rect); + RD_WatchViewState *ewv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_build(view, ewv, 0, 10, rect); ProfEnd(); } //////////////////////////////// //~ rjf: watch_pins @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(watch_pins) +RD_VIEW_SETUP_FUNCTION_DEF(watch_pins) { - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_init(wv, view, DF_WatchViewFillKind_WatchPins); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Member, 0.5f, .string = str8_lit("Label"), .dequote_string = 1, .is_non_code = 1); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Member, 0.5f, .string = str8_lit("Location"), .dequote_string = 1, .is_non_code = 1); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_init(wv, view, RD_WatchViewFillKind_WatchPins); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.5f, .string = str8_lit("Label"), .dequote_string = 1, .is_non_code = 1); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Member, 0.5f, .string = str8_lit("Location"), .dequote_string = 1, .is_non_code = 1); } -DF_VIEW_CMD_FUNCTION_DEF(watch_pins){} -DF_VIEW_UI_FUNCTION_DEF(watch_pins) +RD_VIEW_CMD_FUNCTION_DEF(watch_pins){} +RD_VIEW_UI_FUNCTION_DEF(watch_pins) { ProfBeginFunction(); - DF_WatchViewState *ewv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_build(view, ewv, 0, 10, rect); + RD_WatchViewState *ewv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_build(view, ewv, 0, 10, rect); ProfEnd(); } //////////////////////////////// //~ rjf: scheduler @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(scheduler) {} -DF_VIEW_CMD_FUNCTION_DEF(scheduler) {} -DF_VIEW_UI_FUNCTION_DEF(scheduler) +RD_VIEW_SETUP_FUNCTION_DEF(scheduler) {} +RD_VIEW_CMD_FUNCTION_DEF(scheduler) {} +RD_VIEW_UI_FUNCTION_DEF(scheduler) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); String8 query = string; //- rjf: get state - typedef struct DF_SchedulerViewState DF_SchedulerViewState; - struct DF_SchedulerViewState + typedef struct RD_SchedulerViewState RD_SchedulerViewState; + struct RD_SchedulerViewState { - D_Handle selected_entity; + RD_Handle selected_entity; S64 selected_column; }; - DF_SchedulerViewState *sv = df_view_user_state(view, DF_SchedulerViewState); + RD_SchedulerViewState *sv = rd_view_user_state(view, RD_SchedulerViewState); //- rjf: get entities - DF_EntityList machines = d_query_cached_entity_list_with_kind(DF_EntityKind_Machine); - DF_EntityList processes = d_query_cached_entity_list_with_kind(DF_EntityKind_Process); - DF_EntityList threads = d_query_cached_entity_list_with_kind(DF_EntityKind_Thread); + RD_EntityList machines = d_query_cached_entity_list_with_kind(RD_EntityKind_Machine); + RD_EntityList processes = d_query_cached_entity_list_with_kind(RD_EntityKind_Process); + RD_EntityList threads = d_query_cached_entity_list_with_kind(RD_EntityKind_Thread); //- rjf: produce list of items; no query -> all entities, in tree; query -> only show threads - DF_EntityFuzzyItemArray items = {0}; + RD_EntityFuzzyItemArray items = {0}; ProfScope("query -> entities") { if(query.size == 0) { //- rjf: build flat array of entities, arranged into row order - DF_EntityArray entities = {0}; + RD_EntityArray entities = {0}; { entities.count = machines.count+processes.count+threads.count; - entities.v = push_array_no_zero(scratch.arena, DF_Entity *, entities.count); + entities.v = push_array_no_zero(scratch.arena, RD_Entity *, entities.count); U64 idx = 0; - for(DF_EntityNode *machine_n = machines.first; machine_n != 0; machine_n = machine_n->next) + for(RD_EntityNode *machine_n = machines.first; machine_n != 0; machine_n = machine_n->next) { - DF_Entity *machine = machine_n->entity; + RD_Entity *machine = machine_n->entity; entities.v[idx] = machine; idx += 1; - for(DF_EntityNode *process_n = processes.first; process_n != 0; process_n = process_n->next) + for(RD_EntityNode *process_n = processes.first; process_n != 0; process_n = process_n->next) { - DF_Entity *process = process_n->entity; - if(df_entity_ancestor_from_kind(process, DF_EntityKind_Machine) != machine) + RD_Entity *process = process_n->entity; + if(rd_entity_ancestor_from_kind(process, RD_EntityKind_Machine) != machine) { continue; } entities.v[idx] = process; idx += 1; - for(DF_EntityNode *thread_n = threads.first; thread_n != 0; thread_n = thread_n->next) + for(RD_EntityNode *thread_n = threads.first; thread_n != 0; thread_n = thread_n->next) { - DF_Entity *thread = thread_n->entity; - if(df_entity_ancestor_from_kind(thread, DF_EntityKind_Process) != process) + RD_Entity *thread = thread_n->entity; + if(rd_entity_ancestor_from_kind(thread, RD_EntityKind_Process) != process) { continue; } @@ -5578,11 +5578,11 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) } //- rjf: entities -> fuzzy-filtered entities - items = df_entity_fuzzy_item_array_from_entity_array_needle(scratch.arena, &entities, query); + items = rd_entity_fuzzy_item_array_from_entity_array_needle(scratch.arena, &entities, query); } else { - items = df_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &threads, query); + items = rd_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &threads, query); } } @@ -5590,7 +5590,7 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) Vec2S64 cursor = {sv->selected_column}; for(U64 idx = 0; idx < items.count; idx += 1) { - if(items.v[idx].entity == df_entity_from_handle(sv->selected_entity)) + if(items.v[idx].entity == rd_entity_from_handle(sv->selected_entity)) { cursor.y = (S64)(idx+1); break; @@ -5624,24 +5624,24 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) idx <= visible_row_range.max && idx < items.count; idx += 1) { - DF_Entity *entity = items.v[idx].entity; + RD_Entity *entity = items.v[idx].entity; CTRL_Entity *entity_ctrl = ctrl_entity_from_handle(d_state->ctrl_entity_store, entity->ctrl_handle); B32 row_is_selected = (cursor.y == (S64)(idx+1)); F32 depth = 0.f; if(query.size == 0) switch(entity->kind) { default:{}break; - case DF_EntityKind_Machine:{depth = 0.f;}break; - case DF_EntityKind_Process:{depth = 1.f;}break; - case DF_EntityKind_Thread: {depth = 2.f;}break; + case RD_EntityKind_Machine:{depth = 0.f;}break; + case RD_EntityKind_Process:{depth = 1.f;}break; + case RD_EntityKind_Thread: {depth = 2.f;}break; } Rng1S64 desc_col_rng = r1s64(1, 1); switch(entity->kind) { default:{}break; - case DF_EntityKind_Machine:{desc_col_rng = r1s64(1, 4);}break; - case DF_EntityKind_Process:{desc_col_rng = r1s64(1, 1);}break; - case DF_EntityKind_Thread: {desc_col_rng = r1s64(1, 1);}break; + case RD_EntityKind_Machine:{desc_col_rng = r1s64(1, 4);}break; + case RD_EntityKind_Process:{desc_col_rng = r1s64(1, 1);}break; + case RD_EntityKind_Thread: {desc_col_rng = r1s64(1, 1);}break; } UI_NamedTableVectorF("entity_row_%p", entity) { @@ -5652,33 +5652,33 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) UI_Palette *palette = ui_top_palette(); if(frozen) { - palette = df_palette_from_code(DF_PaletteCode_NegativePopButton); + palette = rd_palette_from_code(RD_PaletteCode_NegativePopButton); } else { - palette = df_palette_from_code(DF_PaletteCode_PositivePopButton); + palette = rd_palette_from_code(RD_PaletteCode_PositivePopButton); } UI_Signal sig = {0}; - UI_Palette(palette) sig = df_icon_buttonf(frozen ? DF_IconKind_Locked : DF_IconKind_Unlocked, 0, "###lock_%p", entity); + UI_Palette(palette) sig = rd_icon_buttonf(frozen ? RD_IconKind_Locked : RD_IconKind_Unlocked, 0, "###lock_%p", entity); if(ui_clicked(sig)) { D_CmdKind cmd_kind = frozen ? D_CmdKind_ThawEntity : D_CmdKind_FreezeEntity; - df_cmd(cmd_kind, .entity = df_handle_from_entity(entity)); + rd_cmd(cmd_kind, .entity = rd_handle_from_entity(entity)); } } UI_TableCellSized(ui_pct(1, 0)) UI_FocusHot((row_is_selected && desc_col_rng.min <= cursor.x && cursor.x <= desc_col_rng.max) ? UI_FocusKind_On : UI_FocusKind_Off) { - df_entity_desc_button(entity, &items.v[idx].matches, query, 0); + rd_entity_desc_button(entity, &items.v[idx].matches, query, 0); } switch(entity->kind) { default:{}break; - case DF_EntityKind_Machine: + case RD_EntityKind_Machine: { }break; - case DF_EntityKind_Process: + case RD_EntityKind_Process: { UI_TableCellSized(ui_children_sum(1.f)) UI_FocusHot((row_is_selected && cursor.x == 2) ? UI_FocusKind_On : UI_FocusKind_Off) { @@ -5686,31 +5686,31 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) UI_TextAlignment(UI_TextAlign_Center) if(ui_clicked(ui_buttonf("Detach"))) { - df_cmd(D_CmdKind_Detach, .entity = df_handle_from_entity(entity)); + rd_cmd(D_CmdKind_Detach, .entity = rd_handle_from_entity(entity)); } } UI_TableCellSized(ui_em(2.25f, 1.f)) UI_FocusHot((row_is_selected && cursor.x == 3) ? UI_FocusKind_On : UI_FocusKind_Off) { - if(ui_clicked(df_icon_buttonf(DF_IconKind_Redo, 0, "###retry"))) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_Redo, 0, "###retry"))) { - df_cmd(D_CmdKind_Restart, .entity = df_handle_from_entity(entity)); + rd_cmd(D_CmdKind_Restart, .entity = rd_handle_from_entity(entity)); } } UI_TableCellSized(ui_em(2.25f, 1.f)) UI_FocusHot((row_is_selected && cursor.x == 4) ? UI_FocusKind_On : UI_FocusKind_Off) { - DF_Palette(DF_PaletteCode_NegativePopButton) - if(ui_clicked(df_icon_buttonf(DF_IconKind_X, 0, "###kill"))) + RD_Palette(RD_PaletteCode_NegativePopButton) + if(ui_clicked(rd_icon_buttonf(RD_IconKind_X, 0, "###kill"))) { - df_cmd(D_CmdKind_Kill, .entity = df_handle_from_entity(entity)); + rd_cmd(D_CmdKind_Kill, .entity = rd_handle_from_entity(entity)); } } }break; - case DF_EntityKind_Thread: + case RD_EntityKind_Thread: { UI_TableCellSized(ui_children_sum(1.f)) UI_FocusHot((row_is_selected && cursor.x >= 2) ? UI_FocusKind_On : UI_FocusKind_Off) { CTRL_Entity *entity_ctrl = ctrl_entity_from_handle(d_state->ctrl_entity_store, entity->ctrl_handle); - CTRL_Entity *process = ctrl_entity_ancestor_from_kind(entity_ctrl, DF_EntityKind_Process); + CTRL_Entity *process = ctrl_entity_ancestor_from_kind(entity_ctrl, RD_EntityKind_Process); U64 rip_vaddr = d_query_cached_rip_from_thread(entity_ctrl); CTRL_Entity *module = ctrl_module_from_process_vaddr(process, rip_vaddr); U64 rip_voff = ctrl_voff_from_vaddr(module, rip_vaddr); @@ -5718,7 +5718,7 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) D_LineList lines = d_lines_from_dbgi_key_voff(scratch.arena, &dbgi_key, rip_voff); if(lines.first != 0) { - UI_PrefWidth(ui_children_sum(0)) df_src_loc_button(lines.first->v.file_path, lines.first->v.pt); + UI_PrefWidth(ui_children_sum(0)) rd_src_loc_button(lines.first->v.file_path, lines.first->v.pt); } } }break; @@ -5730,7 +5730,7 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) //- rjf: selected num -> selected entity sv->selected_column = cursor.x; - sv->selected_entity = (1 <= cursor.y && cursor.y <= items.count) ? df_handle_from_entity(items.v[cursor.y-1].entity) : d_handle_zero(); + sv->selected_entity = (1 <= cursor.y && cursor.y <= items.count) ? rd_handle_from_entity(items.v[cursor.y-1].entity) : rd_handle_zero(); scratch_end(scratch); ProfEnd(); @@ -5739,20 +5739,20 @@ DF_VIEW_UI_FUNCTION_DEF(scheduler) //////////////////////////////// //~ rjf: call_stack @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(call_stack) +RD_VIEW_SETUP_FUNCTION_DEF(call_stack) { - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_init(wv, view, DF_WatchViewFillKind_CallStack); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_FrameSelection, 0.05f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Value, 0.7f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Module, 0.25f, .is_non_code = 1); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_init(wv, view, RD_WatchViewFillKind_CallStack); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_FrameSelection, 0.05f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.7f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Module, 0.25f, .is_non_code = 1); } -DF_VIEW_CMD_FUNCTION_DEF(call_stack){} -DF_VIEW_UI_FUNCTION_DEF(call_stack) +RD_VIEW_CMD_FUNCTION_DEF(call_stack){} +RD_VIEW_UI_FUNCTION_DEF(call_stack) { ProfBeginFunction(); - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_build(view, wv, 0, 10, rect); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_build(view, wv, 0, 10, rect); ProfEnd(); } @@ -5760,18 +5760,18 @@ DF_VIEW_UI_FUNCTION_DEF(call_stack) //~ rjf: modules @view_hook_impl #if 0 // TODO(rjf): @msgs -typedef struct DF_ModulesViewState DF_ModulesViewState; -struct DF_ModulesViewState +typedef struct RD_ModulesViewState RD_ModulesViewState; +struct RD_ModulesViewState { B32 initialized; - D_Handle selected_entity; + RD_Handle selected_entity; S64 selected_column; B32 txt_editing; TxtPt txt_cursor; TxtPt txt_mark; U8 txt_buffer[1024]; U64 txt_size; - D_Handle pick_file_dst_entity; + RD_Handle pick_file_dst_entity; F32 idx_col_pct; F32 desc_col_pct; F32 range_col_pct; @@ -5779,10 +5779,10 @@ struct DF_ModulesViewState }; #endif -DF_VIEW_SETUP_FUNCTION_DEF(modules) +RD_VIEW_SETUP_FUNCTION_DEF(modules) { #if 0 // TODO(rjf): @msgs - DF_ModulesViewState *mv = df_view_user_state(view, DF_ModulesViewState); + RD_ModulesViewState *mv = rd_view_user_state(view, RD_ModulesViewState); if(mv->initialized == 0) { mv->initialized = 1; @@ -5794,30 +5794,30 @@ DF_VIEW_SETUP_FUNCTION_DEF(modules) #endif } -DF_VIEW_CMD_FUNCTION_DEF(modules) +RD_VIEW_CMD_FUNCTION_DEF(modules) { #if 0 // TODO(rjf): @msgs - DF_ModulesViewState *mv = df_view_user_state(view, DF_ModulesViewState); - for(DF_Cmd *cmd = 0; df_next_cmd(&cmd);) + RD_ModulesViewState *mv = rd_view_user_state(view, RD_ModulesViewState); + for(RD_Cmd *cmd = 0; rd_next_cmd(&cmd);) { // rjf: mismatched window/panel => skip - if(!d_handle_match(df_regs()->window, cmd->regs->window) || - !d_handle_match(df_regs()->panel, cmd->regs->panel)) + if(!rd_handle_match(rd_regs()->window, cmd->regs->window) || + !rd_handle_match(rd_regs()->panel, cmd->regs->panel)) { continue; } //rjf: process - DF_CmdKind kind = df_cmd_kind_from_string(cmd->name); + RD_CmdKind kind = rd_cmd_kind_from_string(cmd->name); switch(kind) { default:break; - case DF_CmdKind_PickFile: + case RD_CmdKind_PickFile: { Temp scratch = scratch_begin(0, 0); String8 pick_string = cmd->regs->file_path; - DF_Entity *module = df_entity_from_handle(mv->pick_file_dst_entity); - if(module->kind == DF_EntityKind_Module) + RD_Entity *module = rd_entity_from_handle(mv->pick_file_dst_entity); + if(module->kind == RD_EntityKind_Module) { String8 exe_path = module->string; String8 dbg_path = pick_string; @@ -5830,7 +5830,7 @@ DF_VIEW_CMD_FUNCTION_DEF(modules) #endif } -DF_VIEW_UI_FUNCTION_DEF(modules) +RD_VIEW_UI_FUNCTION_DEF(modules) { #if 0 // TODO(rjf): @msgs ProfBeginFunction(); @@ -5839,31 +5839,31 @@ DF_VIEW_UI_FUNCTION_DEF(modules) String8 query = str8(view->query_buffer, view->query_string_size); //- rjf: get state - DF_ModulesViewState *mv = df_view_user_state(view, DF_ModulesViewState); + RD_ModulesViewState *mv = rd_view_user_state(view, RD_ModulesViewState); F32 *col_pcts[] = {&mv->idx_col_pct, &mv->desc_col_pct, &mv->range_col_pct, &mv->dbg_col_pct}; //- rjf: get entities - DF_EntityList processes = d_query_cached_entity_list_with_kind(DF_EntityKind_Process); - DF_EntityList modules = d_query_cached_entity_list_with_kind(DF_EntityKind_Module); + RD_EntityList processes = d_query_cached_entity_list_with_kind(RD_EntityKind_Process); + RD_EntityList modules = d_query_cached_entity_list_with_kind(RD_EntityKind_Module); //- rjf: make filtered item array - DF_EntityFuzzyItemArray items = {0}; + RD_EntityFuzzyItemArray items = {0}; if(query.size == 0) { - DF_EntityArray entities = {0}; + RD_EntityArray entities = {0}; { entities.count = processes.count+modules.count; - entities.v = push_array_no_zero(scratch.arena, DF_Entity *, entities.count); + entities.v = push_array_no_zero(scratch.arena, RD_Entity *, entities.count); U64 idx = 0; - for(DF_EntityNode *process_n = processes.first; process_n != 0; process_n = process_n->next) + for(RD_EntityNode *process_n = processes.first; process_n != 0; process_n = process_n->next) { - DF_Entity *process = process_n->entity; + RD_Entity *process = process_n->entity; entities.v[idx] = process; idx += 1; - for(DF_EntityNode *module_n = modules.first; module_n != 0; module_n = module_n->next) + for(RD_EntityNode *module_n = modules.first; module_n != 0; module_n = module_n->next) { - DF_Entity *module = module_n->entity; - if(df_entity_ancestor_from_kind(module, DF_EntityKind_Process) != process) + RD_Entity *module = module_n->entity; + if(rd_entity_ancestor_from_kind(module, RD_EntityKind_Process) != process) { continue; } @@ -5872,18 +5872,18 @@ DF_VIEW_UI_FUNCTION_DEF(modules) } } } - items = df_entity_fuzzy_item_array_from_entity_array_needle(scratch.arena, &entities, query); + items = rd_entity_fuzzy_item_array_from_entity_array_needle(scratch.arena, &entities, query); } else { - items = df_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &modules, query); + items = rd_entity_fuzzy_item_array_from_entity_list_needle(scratch.arena, &modules, query); } //- rjf: selected column/entity -> selected cursor Vec2S64 cursor = {mv->selected_column}; for(U64 idx = 0; idx < items.count; idx += 1) { - if(items.v[idx].entity == df_entity_from_handle(mv->selected_entity)) + if(items.v[idx].entity == rd_entity_from_handle(mv->selected_entity)) { cursor.y = (S64)(idx+1); break; @@ -5928,7 +5928,7 @@ DF_VIEW_UI_FUNCTION_DEF(modules) } //- rjf: build table - DF_Entity *commit_module = &d_nil_entity; + RD_Entity *commit_module = &d_nil_entity; Rng1S64 visible_row_range = {0}; UI_ScrollListParams scroll_list_params = {0}; { @@ -5954,26 +5954,26 @@ DF_VIEW_UI_FUNCTION_DEF(modules) U64 idx_in_process = 0; for(U64 idx = 0; idx < items.count; idx += 1) { - DF_Entity *entity = items.v[idx].entity; + RD_Entity *entity = items.v[idx].entity; B32 row_is_selected = (cursor.y == (S64)(idx+1)); - idx_in_process += (entity->kind == DF_EntityKind_Module); + idx_in_process += (entity->kind == RD_EntityKind_Module); if(visible_row_range.min <= idx && idx <= visible_row_range.max) { switch(entity->kind) { default:{}break; - case DF_EntityKind_Process: + case RD_EntityKind_Process: { UI_NamedTableVectorF("process_%p", entity) { UI_TableCellSized(ui_pct(1, 0)) UI_FocusHot((row_is_selected) ? UI_FocusKind_On : UI_FocusKind_Off) { - df_entity_desc_button(entity, &items.v[idx].matches, query, 0); + rd_entity_desc_button(entity, &items.v[idx].matches, query, 0); } } idx_in_process = 0; }break; - case DF_EntityKind_Module: + case RD_EntityKind_Module: UI_NamedTableVectorF("module_%p", entity) { UI_TableCell UI_TextAlignment(UI_TextAlign_Center) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) @@ -5982,16 +5982,16 @@ DF_VIEW_UI_FUNCTION_DEF(modules) } UI_TableCell UI_FocusHot((row_is_selected && cursor.x == 0) ? UI_FocusKind_On : UI_FocusKind_Off) { - df_entity_desc_button(entity, &items.v[idx].matches, query, 1); + rd_entity_desc_button(entity, &items.v[idx].matches, query, 1); } - UI_TableCell DF_Font(DF_FontSlot_Code) UI_FocusHot((row_is_selected && cursor.x == 1) ? UI_FocusKind_On : UI_FocusKind_Off) + UI_TableCell RD_Font(RD_FontSlot_Code) UI_FocusHot((row_is_selected && cursor.x == 1) ? UI_FocusKind_On : UI_FocusKind_Off) { UI_Box *range_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable|UI_BoxFlag_DrawText, "[0x%I64x, 0x%I64x)###vaddr_range_%p", entity->vaddr_rng.min, entity->vaddr_rng.max, entity); UI_Signal sig = ui_signal_from_box(range_box); if(ui_pressed(sig)) { next_cursor = v2s64(1, (S64)idx+1); - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); } } UI_TableCell @@ -6021,8 +6021,8 @@ DF_VIEW_UI_FUNCTION_DEF(modules) UI_FocusActive((txt_is_selected && mv->txt_editing) ? UI_FocusKind_On : UI_FocusKind_Off) UI_WidthFill { - UI_Palette(dbgi_is_valid ? ui_top_palette() : ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextNegative))) - sig = df_line_editf(DF_LineEditFlag_NoBackground, 0, 0, &mv->txt_cursor, &mv->txt_mark, mv->txt_buffer, sizeof(mv->txt_buffer), &mv->txt_size, 0, dbgi_path, "###dbg_path_%p", entity); + UI_Palette(dbgi_is_valid ? ui_top_palette() : ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative))) + sig = rd_line_editf(RD_LineEditFlag_NoBackground, 0, 0, &mv->txt_cursor, &mv->txt_mark, mv->txt_buffer, sizeof(mv->txt_buffer), &mv->txt_size, 0, dbgi_path, "###dbg_path_%p", entity); edit_commit = (edit_commit || ui_committed(sig)); } @@ -6031,7 +6031,7 @@ DF_VIEW_UI_FUNCTION_DEF(modules) { edit_commit = (mv->txt_editing && !txt_is_selected); next_cursor = v2s64(2, (S64)idx+1); - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); } // rjf: double-click -> begin editing @@ -6056,8 +6056,8 @@ DF_VIEW_UI_FUNCTION_DEF(modules) { if(ui_clicked(ui_buttonf("Browse...")) || (brw_is_selected && edit_begin)) { - df_cmd(DF_CmdKind_RunCommand, .string = df_cmd_kind_info_table[DF_CmdKind_PickFile].string); - mv->pick_file_dst_entity = df_handle_from_entity(entity); + rd_cmd(RD_CmdKind_RunCommand, .string = rd_cmd_kind_info_table[RD_CmdKind_PickFile].string); + mv->pick_file_dst_entity = rd_handle_from_entity(entity); } } } @@ -6072,7 +6072,7 @@ DF_VIEW_UI_FUNCTION_DEF(modules) if(edit_commit) { mv->txt_editing = 0; - if(!df_entity_is_nil(commit_module)) + if(!rd_entity_is_nil(commit_module)) { String8 exe_path = commit_module->string; String8 dbg_path = str8(mv->txt_buffer, mv->txt_size); @@ -6092,7 +6092,7 @@ DF_VIEW_UI_FUNCTION_DEF(modules) //- rjf: selected num -> selected entity mv->selected_column = cursor.x; - mv->selected_entity = (1 <= cursor.y && cursor.y <= items.count) ? df_handle_from_entity(items.v[cursor.y-1].entity) : d_handle_zero(); + mv->selected_entity = (1 <= cursor.y && cursor.y <= items.count) ? rd_handle_from_entity(items.v[cursor.y-1].entity) : rd_handle_zero(); di_scope_close(scope); scratch_end(scratch); @@ -6103,203 +6103,203 @@ DF_VIEW_UI_FUNCTION_DEF(modules) //////////////////////////////// //~ rjf: watch @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(watch) +RD_VIEW_SETUP_FUNCTION_DEF(watch) { - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_init(wv, view, DF_WatchViewFillKind_Watch); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Expr, 0.25f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Value, 0.3f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Type, 0.15f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_ViewRule, 0.30f); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_init(wv, view, RD_WatchViewFillKind_Watch); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Expr, 0.25f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.3f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f); } -DF_VIEW_CMD_FUNCTION_DEF(watch){} -DF_VIEW_UI_FUNCTION_DEF(watch) +RD_VIEW_CMD_FUNCTION_DEF(watch){} +RD_VIEW_UI_FUNCTION_DEF(watch) { ProfBeginFunction(); - DF_WatchViewState *ewv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_build(view, ewv, 1*(view->query_string_size == 0), 10, rect); + RD_WatchViewState *ewv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_build(view, ewv, 1*(view->query_string_size == 0), 10, rect); ProfEnd(); } //////////////////////////////// //~ rjf: locals @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(locals) +RD_VIEW_SETUP_FUNCTION_DEF(locals) { - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_init(wv, view, DF_WatchViewFillKind_Locals); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Expr, 0.25f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Value, 0.3f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Type, 0.15f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_ViewRule, 0.30f); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_init(wv, view, RD_WatchViewFillKind_Locals); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Expr, 0.25f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.3f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f); } -DF_VIEW_CMD_FUNCTION_DEF(locals) {} -DF_VIEW_UI_FUNCTION_DEF(locals) +RD_VIEW_CMD_FUNCTION_DEF(locals) {} +RD_VIEW_UI_FUNCTION_DEF(locals) { ProfBeginFunction(); - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_build(view, wv, 0, 10, rect); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_build(view, wv, 0, 10, rect); ProfEnd(); } //////////////////////////////// //~ rjf: registers @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(registers) +RD_VIEW_SETUP_FUNCTION_DEF(registers) { - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_init(wv, view, DF_WatchViewFillKind_Registers); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Expr, 0.25f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Value, 0.3f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Type, 0.15f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_ViewRule, 0.30f); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_init(wv, view, RD_WatchViewFillKind_Registers); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Expr, 0.25f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.3f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f); } -DF_VIEW_CMD_FUNCTION_DEF(registers) {} -DF_VIEW_UI_FUNCTION_DEF(registers) +RD_VIEW_CMD_FUNCTION_DEF(registers) {} +RD_VIEW_UI_FUNCTION_DEF(registers) { ProfBeginFunction(); - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_build(view, wv, 0, 16, rect); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_build(view, wv, 0, 16, rect); ProfEnd(); } //////////////////////////////// //~ rjf: globals @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(globals) +RD_VIEW_SETUP_FUNCTION_DEF(globals) { - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_init(wv, view, DF_WatchViewFillKind_Globals); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Expr, 0.25f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Value, 0.3f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Type, 0.15f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_ViewRule, 0.30f); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_init(wv, view, RD_WatchViewFillKind_Globals); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Expr, 0.25f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.3f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f); } -DF_VIEW_CMD_FUNCTION_DEF(globals) {} -DF_VIEW_UI_FUNCTION_DEF(globals) +RD_VIEW_CMD_FUNCTION_DEF(globals) {} +RD_VIEW_UI_FUNCTION_DEF(globals) { ProfBeginFunction(); - DF_WatchViewState *ewv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_build(view, ewv, 0, 10, rect); + RD_WatchViewState *ewv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_build(view, ewv, 0, 10, rect); ProfEnd(); } //////////////////////////////// //~ rjf: thread_locals @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(thread_locals) +RD_VIEW_SETUP_FUNCTION_DEF(thread_locals) { - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_init(wv, view, DF_WatchViewFillKind_ThreadLocals); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Expr, 0.25f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Value, 0.3f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Type, 0.15f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_ViewRule, 0.30f); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_init(wv, view, RD_WatchViewFillKind_ThreadLocals); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Expr, 0.25f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.3f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f); } -DF_VIEW_CMD_FUNCTION_DEF(thread_locals) {} -DF_VIEW_UI_FUNCTION_DEF(thread_locals) +RD_VIEW_CMD_FUNCTION_DEF(thread_locals) {} +RD_VIEW_UI_FUNCTION_DEF(thread_locals) { ProfBeginFunction(); - DF_WatchViewState *ewv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_build(view, ewv, 0, 10, rect); + RD_WatchViewState *ewv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_build(view, ewv, 0, 10, rect); ProfEnd(); } //////////////////////////////// //~ rjf: types @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(types) +RD_VIEW_SETUP_FUNCTION_DEF(types) { - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_init(wv, view, DF_WatchViewFillKind_Types); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Expr, 0.25f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Value, 0.3f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Type, 0.15f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_ViewRule, 0.30f); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_init(wv, view, RD_WatchViewFillKind_Types); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Expr, 0.25f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.3f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Type, 0.15f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.30f); } -DF_VIEW_CMD_FUNCTION_DEF(types) {} -DF_VIEW_UI_FUNCTION_DEF(types) +RD_VIEW_CMD_FUNCTION_DEF(types) {} +RD_VIEW_UI_FUNCTION_DEF(types) { ProfBeginFunction(); - DF_WatchViewState *ewv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_build(view, ewv, 0, 10, rect); + RD_WatchViewState *ewv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_build(view, ewv, 0, 10, rect); ProfEnd(); } //////////////////////////////// //~ rjf: procedures @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(procedures) +RD_VIEW_SETUP_FUNCTION_DEF(procedures) { - DF_WatchViewState *wv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_init(wv, view, DF_WatchViewFillKind_Procedures); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Expr, 0.2f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_Value, 0.6f); - df_watch_view_column_alloc(wv, DF_WatchViewColumnKind_ViewRule, 0.2f); + RD_WatchViewState *wv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_init(wv, view, RD_WatchViewFillKind_Procedures); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Expr, 0.2f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.6f); + rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_ViewRule, 0.2f); } -DF_VIEW_CMD_FUNCTION_DEF(procedures) {} -DF_VIEW_UI_FUNCTION_DEF(procedures) +RD_VIEW_CMD_FUNCTION_DEF(procedures) {} +RD_VIEW_UI_FUNCTION_DEF(procedures) { ProfBeginFunction(); - DF_WatchViewState *ewv = df_view_user_state(view, DF_WatchViewState); - df_watch_view_build(view, ewv, 0, 10, rect); + RD_WatchViewState *ewv = rd_view_user_state(view, RD_WatchViewState); + rd_watch_view_build(view, ewv, 0, 10, rect); ProfEnd(); } //////////////////////////////// //~ rjf: pending_file @view_hook_impl -typedef struct DF_PendingFileViewState DF_PendingFileViewState; -struct DF_PendingFileViewState +typedef struct RD_PendingFileViewState RD_PendingFileViewState; +struct RD_PendingFileViewState { Arena *deferred_cmd_arena; - DF_CmdList deferred_cmds; + RD_CmdList deferred_cmds; }; -DF_VIEW_SETUP_FUNCTION_DEF(pending_file) +RD_VIEW_SETUP_FUNCTION_DEF(pending_file) { - DF_PendingFileViewState *pves = df_view_user_state(view, DF_PendingFileViewState); - pves->deferred_cmd_arena = df_view_push_arena_ext(view); + RD_PendingFileViewState *pves = rd_view_user_state(view, RD_PendingFileViewState); + pves->deferred_cmd_arena = rd_view_push_arena_ext(view); } -DF_VIEW_CMD_FUNCTION_DEF(pending_file) +RD_VIEW_CMD_FUNCTION_DEF(pending_file) { Temp scratch = scratch_begin(0, 0); - DF_PendingFileViewState *pves = df_view_user_state(view, DF_PendingFileViewState); + RD_PendingFileViewState *pves = rd_view_user_state(view, RD_PendingFileViewState); //- rjf: process commands - for(DF_Cmd *cmd = 0; df_next_cmd(&cmd);) + for(RD_Cmd *cmd = 0; rd_next_cmd(&cmd);) { // rjf: mismatched window/panel => skip - if(!d_handle_match(df_regs()->window, cmd->regs->window) || - !d_handle_match(df_regs()->panel, cmd->regs->panel)) + if(!rd_handle_match(rd_regs()->window, cmd->regs->window) || + !rd_handle_match(rd_regs()->panel, cmd->regs->panel)) { continue; } // rjf: process - DF_CmdKind kind = df_cmd_kind_from_string(cmd->name); + RD_CmdKind kind = rd_cmd_kind_from_string(cmd->name); switch(kind) { default:break; // rjf: gather deferred commands to redispatch when entity is ready - case DF_CmdKind_GoToLine: - case DF_CmdKind_GoToAddress: - case DF_CmdKind_CenterCursor: - case DF_CmdKind_ContainCursor: + case RD_CmdKind_GoToLine: + case RD_CmdKind_GoToAddress: + case RD_CmdKind_CenterCursor: + case RD_CmdKind_ContainCursor: { - df_cmd_list_push_new(pves->deferred_cmd_arena, &pves->deferred_cmds, cmd->name, cmd->regs); + rd_cmd_list_push_new(pves->deferred_cmd_arena, &pves->deferred_cmds, cmd->name, cmd->regs); }break; } } //- rjf: determine if file is ready, and which viewer to use - String8 file_path = d_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); + String8 file_path = rd_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); Rng1U64 file_range = r1u64(0, 1024); U128 file_hash = fs_hash_from_path_range(file_path, file_range, 0); B32 file_is_ready = 0; - DF_ViewKind viewer_kind = DF_ViewKind_Text; + RD_ViewKind viewer_kind = RD_ViewKind_Text; { HS_Scope *hs_scope = hs_scope_open(); String8 data = hs_data_from_hash(hs_scope, file_hash); @@ -6326,11 +6326,11 @@ DF_VIEW_CMD_FUNCTION_DEF(pending_file) file_is_ready = 1; if(num_utf8_bytes > num_unknown_bytes*4) { - viewer_kind = DF_ViewKind_Text; + viewer_kind = RD_ViewKind_Text; } else { - viewer_kind = DF_ViewKind_Memory; + viewer_kind = RD_ViewKind_Memory; } } hs_scope_close(hs_scope); @@ -6339,10 +6339,10 @@ DF_VIEW_CMD_FUNCTION_DEF(pending_file) //- rjf: if entity is ready, dispatch all deferred commands if(file_is_ready) { - for(DF_CmdNode *cmd_node = pves->deferred_cmds.first; cmd_node != 0; cmd_node = cmd_node->next) + for(RD_CmdNode *cmd_node = pves->deferred_cmds.first; cmd_node != 0; cmd_node = cmd_node->next) { - DF_Cmd *cmd = &cmd_node->cmd; - df_push_cmd(cmd->name, cmd->regs); + RD_Cmd *cmd = &cmd_node->cmd; + rd_push_cmd(cmd->name, cmd->regs); } arena_clear(pves->deferred_cmd_arena); MemoryZeroStruct(&pves->deferred_cmds); @@ -6356,85 +6356,96 @@ DF_VIEW_CMD_FUNCTION_DEF(pending_file) } //- rjf: if entity is ready, replace this view with the correct one, if any viewer is specified - if(file_is_ready && viewer_kind != DF_ViewKind_Null) + if(file_is_ready && viewer_kind != RD_ViewKind_Null) { - DF_ViewSpec *view_spec = df_view_spec_from_string(params_copy->string); - if(view_spec == &df_nil_view_spec) + RD_ViewSpec *view_spec = rd_view_spec_from_string(params_copy->string); + if(view_spec == &rd_nil_view_spec) { - view_spec = df_view_spec_from_kind(viewer_kind); + view_spec = rd_view_spec_from_kind(viewer_kind); } - String8 query = d_eval_string_from_file_path(scratch.arena, file_path); - df_view_equip_spec(view, view_spec, query, params_copy); + String8 query = rd_eval_string_from_file_path(scratch.arena, file_path); + rd_view_equip_spec(view, view_spec, query, params_copy); } //- rjf: if entity is ready, but we have no viewer for it, then just close this tab - if(file_is_ready && viewer_kind == DF_ViewKind_Null) + if(file_is_ready && viewer_kind == RD_ViewKind_Null) { - df_cmd(DF_CmdKind_CloseTab); + rd_cmd(RD_CmdKind_CloseTab); } scratch_end(scratch); } -DF_VIEW_UI_FUNCTION_DEF(pending_file) +RD_VIEW_UI_FUNCTION_DEF(pending_file) { view->loading_t = view->loading_t_target = 1.f; - df_request_frame(); + rd_request_frame(); } //////////////////////////////// //~ rjf: text @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(text) +EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(text) { - DF_CodeViewState *cv = df_view_user_state(view, DF_CodeViewState); - df_code_view_init(cv, view); - df_view_equip_loading_info(view, 1, 0, 0); + EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); + vb->string = string; + vb->expr = expr; + vb->visual_idx_range = r1u64(0, 8); + vb->semantic_idx_range = r1u64(0, 1); + vb->view_rules = view_rules; + ev_block_end(out, vb); +} + +RD_VIEW_SETUP_FUNCTION_DEF(text) +{ + RD_CodeViewState *cv = rd_view_user_state(view, RD_CodeViewState); + rd_code_view_init(cv, view); + rd_view_equip_loading_info(view, 1, 0, 0); view->loading_t = view->loading_t_target = 1.f; } -DF_VIEW_CMD_FUNCTION_DEF(text) +RD_VIEW_CMD_FUNCTION_DEF(text) { - DF_CodeViewState *cv = df_view_user_state(view, DF_CodeViewState); + RD_CodeViewState *cv = rd_view_user_state(view, RD_CodeViewState); Temp scratch = scratch_begin(0, 0); HS_Scope *hs_scope = hs_scope_open(); TXT_Scope *txt_scope = txt_scope_open(); E_Eval eval = e_eval_from_string(scratch.arena, string); - Rng1U64 range = d_range_from_eval_params(eval, params); - df_regs()->text_key = d_key_from_eval_space_range(eval.space, range, 1); - df_regs()->lang_kind = d_lang_kind_from_eval_params(eval, params); + Rng1U64 range = rd_range_from_eval_params(eval, params); + rd_regs()->text_key = rd_key_from_eval_space_range(eval.space, range, 1); + rd_regs()->lang_kind = rd_lang_kind_from_eval_params(eval, params); U128 hash = {0}; - TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, df_regs()->text_key, df_regs()->lang_kind, &hash); + TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, rd_regs()->text_key, rd_regs()->lang_kind, &hash); String8 data = hs_data_from_hash(hs_scope, hash); //- rjf: process general code-view commands - df_code_view_cmds(view, cv, data, &info, 0, r1u64(0, 0), di_key_zero()); + rd_code_view_cmds(view, cv, data, &info, 0, r1u64(0, 0), di_key_zero()); //- rjf: process code-file commands - for(DF_Cmd *cmd = 0; df_next_cmd(&cmd);) + for(RD_Cmd *cmd = 0; rd_next_cmd(&cmd);) { // rjf: mismatched window/panel => skip - if(!d_handle_match(df_regs()->window, cmd->regs->window) || - !d_handle_match(df_regs()->panel, cmd->regs->panel)) + if(!rd_handle_match(rd_regs()->window, cmd->regs->window) || + !rd_handle_match(rd_regs()->panel, cmd->regs->panel)) { continue; } // rjf: process - DF_CmdKind kind = df_cmd_kind_from_string(cmd->name); + RD_CmdKind kind = rd_cmd_kind_from_string(cmd->name); switch(kind) { default:{}break; // rjf: override file picking - case DF_CmdKind_PickFile: + case RD_CmdKind_PickFile: { - String8 src = d_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); + String8 src = rd_file_path_from_eval_string(scratch.arena, str8(view->query_buffer, view->query_string_size)); String8 dst = cmd->regs->file_path; if(src.size != 0 && dst.size != 0) { // rjf: record src -> dst mapping - df_cmd(DF_CmdKind_SetFileReplacementPath, .string = src, .file_path = dst); + rd_cmd(RD_CmdKind_SetFileReplacementPath, .string = src, .file_path = dst); // rjf: switch this view to viewing replacement file view->query_string_size = Min(sizeof(view->query_buffer), dst.size); @@ -6449,9 +6460,9 @@ DF_VIEW_CMD_FUNCTION_DEF(text) scratch_end(scratch); } -DF_VIEW_UI_FUNCTION_DEF(text) +RD_VIEW_UI_FUNCTION_DEF(text) { - DF_CodeViewState *cv = df_view_user_state(view, DF_CodeViewState); + RD_CodeViewState *cv = rd_view_user_state(view, RD_CodeViewState); Temp scratch = scratch_begin(0, 0); HS_Scope *hs_scope = hs_scope_open(); TXT_Scope *txt_scope = txt_scope_open(); @@ -6466,17 +6477,17 @@ DF_VIEW_UI_FUNCTION_DEF(text) ////////////////////////////// //- rjf: unpack parameterization info // - df_regs()->cursor.line = d_value_from_params_key(params, str8_lit("cursor_line")).s64; - df_regs()->cursor.column = d_value_from_params_key(params, str8_lit("cursor_column")).s64; - df_regs()->mark.line = d_value_from_params_key(params, str8_lit("mark_line")).s64; - df_regs()->mark.column = d_value_from_params_key(params, str8_lit("mark_column")).s64; - String8 path = d_file_path_from_eval_string(scratch.arena, string); + rd_regs()->cursor.line = rd_value_from_params_key(params, str8_lit("cursor_line")).s64; + rd_regs()->cursor.column = rd_value_from_params_key(params, str8_lit("cursor_column")).s64; + rd_regs()->mark.line = rd_value_from_params_key(params, str8_lit("mark_line")).s64; + rd_regs()->mark.column = rd_value_from_params_key(params, str8_lit("mark_column")).s64; + String8 path = rd_file_path_from_eval_string(scratch.arena, string); E_Eval eval = e_eval_from_string(scratch.arena, string); - Rng1U64 range = d_range_from_eval_params(eval, params); - df_regs()->text_key = d_key_from_eval_space_range(eval.space, range, 1); - df_regs()->lang_kind = d_lang_kind_from_eval_params(eval, params); + Rng1U64 range = rd_range_from_eval_params(eval, params); + rd_regs()->text_key = rd_key_from_eval_space_range(eval.space, range, 1); + rd_regs()->lang_kind = rd_lang_kind_from_eval_params(eval, params); U128 hash = {0}; - TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, df_regs()->text_key, df_regs()->lang_kind, &hash); + TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, rd_regs()->text_key, rd_regs()->lang_kind, &hash); String8 data = hs_data_from_hash(hs_scope, hash); B32 file_is_missing = (path.size != 0 && os_properties_from_file_path(path).modified == 0); B32 key_has_data = !u128_match(hash, u128_zero()) && info.lines_count; @@ -6492,9 +6503,9 @@ DF_VIEW_UI_FUNCTION_DEF(text) UI_PrefWidth(ui_children_sum(1)) UI_PrefHeight(ui_em(3, 1)) UI_Row UI_Padding(ui_pct(1, 0)) UI_PrefWidth(ui_text_dim(10, 1)) - UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextNegative))) + UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative))) { - DF_Font(DF_FontSlot_Icons) ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]); + RD_Font(RD_FontSlot_Icons) ui_label(rd_icon_kind_text_table[RD_IconKind_WarningBig]); ui_labelf("Could not find \"%S\".", path); } UI_PrefHeight(ui_em(3, 1)) @@ -6503,11 +6514,11 @@ DF_VIEW_UI_FUNCTION_DEF(text) UI_CornerRadius(ui_top_font_size()/3) UI_PrefWidth(ui_text_dim(10, 1)) UI_Focus(UI_FocusKind_On) - DF_Palette(DF_PaletteCode_NeutralPopButton) + RD_Palette(RD_PaletteCode_NeutralPopButton) UI_TextAlignment(UI_TextAlign_Center) if(ui_clicked(ui_buttonf("Find alternative..."))) { - df_cmd(DF_CmdKind_RunCommand, .string = df_cmd_kind_info_table[DF_CmdKind_PickFile].string); + rd_cmd(RD_CmdKind_RunCommand, .string = rd_cmd_kind_info_table[RD_CmdKind_PickFile].string); } scratch_end(scratch); } @@ -6518,7 +6529,7 @@ DF_VIEW_UI_FUNCTION_DEF(text) // if(!file_is_missing && info.lines_count == 0 && eval.msgs.max_kind == E_MsgKind_Null) { - df_view_equip_loading_info(view, 1, info.bytes_processed, info.bytes_to_process); + rd_view_equip_loading_info(view, 1, info.bytes_processed, info.bytes_to_process); } ////////////////////////////// @@ -6527,7 +6538,7 @@ DF_VIEW_UI_FUNCTION_DEF(text) DI_KeyList dbgi_keys = {0}; if(!file_is_missing && key_has_data) { - DF_CodeViewBuildResult result = df_code_view_build(scratch.arena, view, cv, DF_CodeViewBuildFlag_All, code_area_rect, data, &info, 0, r1u64(0, 0), di_key_zero()); + RD_CodeViewBuildResult result = rd_code_view_build(scratch.arena, view, cv, RD_CodeViewBuildFlag_All, code_area_rect, data, &info, 0, r1u64(0, 0), di_key_zero()); dbgi_keys = result.dbgi_keys; } @@ -6536,7 +6547,7 @@ DF_VIEW_UI_FUNCTION_DEF(text) // if(path.size != 0) { - df_regs()->lines = d_lines_from_file_path_line_num(df_frame_arena(), path, df_regs()->cursor.line); + rd_regs()->lines = d_lines_from_file_path_line_num(rd_frame_arena(), path, rd_regs()->cursor.line); } ////////////////////////////// @@ -6571,7 +6582,7 @@ DF_VIEW_UI_FUNCTION_DEF(text) UI_Palette *palette = ui_top_palette(); if(file_is_out_of_date) { - palette = df_palette_from_code(DF_PaletteCode_NegativePopButton); + palette = rd_palette_from_code(RD_PaletteCode_NegativePopButton); } UI_Palette(palette) UI_Row @@ -6582,10 +6593,10 @@ DF_VIEW_UI_FUNCTION_DEF(text) if(file_is_out_of_date) { UI_Box *box = &ui_g_nil_box; - UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextNegative))) - DF_Font(DF_FontSlot_Icons) + UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative))) + RD_Font(RD_FontSlot_Icons) { - box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_Clickable, "%S###file_ood_warning", df_g_icon_kind_text_table[DF_IconKind_WarningBig]); + box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_Clickable, "%S###file_ood_warning", rd_icon_kind_text_table[RD_IconKind_WarningBig]); } UI_Signal sig = ui_signal_from_box(box); if(ui_hovering(sig)) UI_Tooltip @@ -6593,19 +6604,19 @@ DF_VIEW_UI_FUNCTION_DEF(text) UI_PrefWidth(ui_children_sum(1)) UI_Row UI_PrefWidth(ui_text_dim(1, 1)) { ui_labelf("This file has changed since ", out_of_date_dbgi_name); - UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextNeutral))) ui_label(out_of_date_dbgi_name); + UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNeutral))) ui_label(out_of_date_dbgi_name); ui_labelf(" was produced."); } } } - DF_Font(DF_FontSlot_Code) + RD_Font(RD_FontSlot_Code) { if(path.size != 0) { ui_label(path); ui_spacer(ui_em(1.5f, 1)); } - ui_labelf("Line: %I64d, Column: %I64d", df_regs()->cursor.line, df_regs()->cursor.column); + ui_labelf("Line: %I64d, Column: %I64d", rd_regs()->cursor.line, rd_regs()->cursor.column); ui_spacer(ui_pct(1, 0)); ui_labelf("(read only)"); ui_labelf("%s", @@ -6619,10 +6630,10 @@ DF_VIEW_UI_FUNCTION_DEF(text) ////////////////////////////// //- rjf: store params // - df_view_store_param_s64(view, str8_lit("cursor_line"), df_regs()->cursor.line); - df_view_store_param_s64(view, str8_lit("cursor_column"), df_regs()->cursor.column); - df_view_store_param_s64(view, str8_lit("mark_line"), df_regs()->mark.line); - df_view_store_param_s64(view, str8_lit("mark_column"), df_regs()->mark.column); + rd_view_store_param_s64(view, str8_lit("cursor_line"), rd_regs()->cursor.line); + rd_view_store_param_s64(view, str8_lit("cursor_column"), rd_regs()->cursor.column); + rd_view_store_param_s64(view, str8_lit("mark_line"), rd_regs()->mark.line); + rd_view_store_param_s64(view, str8_lit("mark_column"), rd_regs()->mark.column); txt_scope_close(txt_scope); hs_scope_close(hs_scope); @@ -6632,33 +6643,44 @@ DF_VIEW_UI_FUNCTION_DEF(text) //////////////////////////////// //~ rjf: disasm @view_hook_impl -typedef struct DF_DisasmViewState DF_DisasmViewState; -struct DF_DisasmViewState +typedef struct RD_DisasmViewState RD_DisasmViewState; +struct RD_DisasmViewState { B32 initialized; TxtPt cursor; TxtPt mark; DASM_StyleFlags style_flags; U64 goto_vaddr; - DF_CodeViewState cv; + RD_CodeViewState cv; }; -DF_VIEW_SETUP_FUNCTION_DEF(disasm) +EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(disasm) { - DF_DisasmViewState *dv = df_view_user_state(view, DF_DisasmViewState); + EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); + vb->string = string; + vb->expr = expr; + vb->visual_idx_range = r1u64(0, 8); + vb->semantic_idx_range = r1u64(0, 1); + vb->view_rules = view_rules; + ev_block_end(out, vb); +} + +RD_VIEW_SETUP_FUNCTION_DEF(disasm) +{ + RD_DisasmViewState *dv = rd_view_user_state(view, RD_DisasmViewState); if(dv->initialized == 0) { dv->initialized = 1; dv->cursor = txt_pt(1, 1); dv->mark = txt_pt(1, 1); dv->style_flags = DASM_StyleFlag_Addresses|DASM_StyleFlag_SourceFilesNames|DASM_StyleFlag_SourceLines|DASM_StyleFlag_SymbolNames; - df_code_view_init(&dv->cv, view); + rd_code_view_init(&dv->cv, view); } } -DF_VIEW_CMD_FUNCTION_DEF(disasm) +RD_VIEW_CMD_FUNCTION_DEF(disasm) { - DF_DisasmViewState *dv = df_view_user_state(view, DF_DisasmViewState); + RD_DisasmViewState *dv = rd_view_user_state(view, RD_DisasmViewState); Temp scratch = scratch_begin(0, 0); DASM_Scope *dasm_scope = dasm_scope_open(); HS_Scope *hs_scope = hs_scope_open(); @@ -6683,11 +6705,11 @@ DF_VIEW_CMD_FUNCTION_DEF(disasm) E_Space space = eval.space; if(auto_selected_thread) { - space = d_eval_space_from_ctrl_entity(ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->process)); + space = rd_eval_space_from_ctrl_entity(ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->process)); } - Rng1U64 range = d_range_from_eval_params(eval, params); - Arch arch = d_arch_from_eval_params(eval, params); - CTRL_Entity *space_entity = d_ctrl_entity_from_eval_space(space); + Rng1U64 range = rd_range_from_eval_params(eval, params); + Arch arch = rd_arch_from_eval_params(eval, params); + CTRL_Entity *space_entity = rd_ctrl_entity_from_eval_space(space); CTRL_Entity *dasm_module = &ctrl_entity_nil; DI_Key dbgi_key = {0}; U64 base_vaddr = 0; @@ -6702,7 +6724,7 @@ DF_VIEW_CMD_FUNCTION_DEF(disasm) base_vaddr = dasm_module->vaddr_range.min; }break; } - U128 dasm_key = d_key_from_eval_space_range(space, range, 0); + U128 dasm_key = rd_key_from_eval_space_range(space, range, 0); U128 dasm_data_hash = {0}; DASM_Params dasm_params = {0}; { @@ -6714,10 +6736,10 @@ DF_VIEW_CMD_FUNCTION_DEF(disasm) dasm_params.dbgi_key = dbgi_key; } DASM_Info dasm_info = dasm_info_from_key_params(dasm_scope, dasm_key, &dasm_params, &dasm_data_hash); - df_regs()->text_key = dasm_info.text_key; - df_regs()->lang_kind = txt_lang_kind_from_arch(arch); + rd_regs()->text_key = dasm_info.text_key; + rd_regs()->lang_kind = txt_lang_kind_from_arch(arch); U128 dasm_text_hash = {0}; - TXT_TextInfo dasm_text_info = txt_text_info_from_key_lang(txt_scope, df_regs()->text_key, df_regs()->lang_kind, &dasm_text_hash); + TXT_TextInfo dasm_text_info = txt_text_info_from_key_lang(txt_scope, rd_regs()->text_key, rd_regs()->lang_kind, &dasm_text_hash); String8 dasm_text_data = hs_data_from_hash(hs_scope, dasm_text_hash); B32 has_disasm = (dasm_info.lines.count != 0 && dasm_text_info.lines_count != 0); B32 is_loading = (!has_disasm && dim_1u64(range) != 0 && eval.msgs.max_kind == E_MsgKind_Null); @@ -6725,47 +6747,47 @@ DF_VIEW_CMD_FUNCTION_DEF(disasm) ////////////////////////////// //- rjf: process general code-view commands // - df_code_view_cmds(view, &dv->cv, dasm_text_data, &dasm_text_info, &dasm_info.lines, range, dbgi_key); + rd_code_view_cmds(view, &dv->cv, dasm_text_data, &dasm_text_info, &dasm_info.lines, range, dbgi_key); ////////////////////////////// //- rjf: process disassembly-specific commands // - for(DF_Cmd *cmd = 0; df_next_cmd(&cmd);) + for(RD_Cmd *cmd = 0; rd_next_cmd(&cmd);) { // rjf: mismatched window/panel => skip - if(!d_handle_match(df_regs()->window, cmd->regs->window) || - !d_handle_match(df_regs()->panel, cmd->regs->panel)) + if(!rd_handle_match(rd_regs()->window, cmd->regs->window) || + !rd_handle_match(rd_regs()->panel, cmd->regs->panel)) { continue; } // rjf: process - DF_CmdKind kind = df_cmd_kind_from_string(cmd->name); + RD_CmdKind kind = rd_cmd_kind_from_string(cmd->name); switch(kind) { default: break; - case DF_CmdKind_GoToAddress: + case RD_CmdKind_GoToAddress: { - DF_Entity *process = &d_nil_entity; + RD_Entity *process = &d_nil_entity; { - DF_Entity *entity = df_entity_from_handle(cmd->regs->entity); - if(!df_entity_is_nil(entity) && - (entity->kind == DF_EntityKind_Process || - entity->kind == DF_EntityKind_Thread || - entity->kind == DF_EntityKind_Module)) + RD_Entity *entity = rd_entity_from_handle(cmd->regs->entity); + if(!rd_entity_is_nil(entity) && + (entity->kind == RD_EntityKind_Process || + entity->kind == RD_EntityKind_Thread || + entity->kind == RD_EntityKind_Module)) { process = entity; - if(entity->kind == DF_EntityKind_Thread || - entity->kind == DF_EntityKind_Module) + if(entity->kind == RD_EntityKind_Thread || + entity->kind == RD_EntityKind_Module) { - process = df_entity_ancestor_from_kind(process, DF_EntityKind_Process); + process = rd_entity_ancestor_from_kind(process, RD_EntityKind_Process); } } } dv->goto_vaddr = cmd->regs->vaddr; }break; - case DF_CmdKind_ToggleCodeBytesVisibility: {dv->style_flags ^= DASM_StyleFlag_CodeBytes;}break; - case DF_CmdKind_ToggleAddressVisibility: {dv->style_flags ^= DASM_StyleFlag_Addresses;}break; + case RD_CmdKind_ToggleCodeBytesVisibility: {dv->style_flags ^= DASM_StyleFlag_CodeBytes;}break; + case RD_CmdKind_ToggleAddressVisibility: {dv->style_flags ^= DASM_StyleFlag_Addresses;}break; } } @@ -6775,10 +6797,10 @@ DF_VIEW_CMD_FUNCTION_DEF(disasm) scratch_end(scratch); } -DF_VIEW_UI_FUNCTION_DEF(disasm) +RD_VIEW_UI_FUNCTION_DEF(disasm) { - DF_DisasmViewState *dv = df_view_user_state(view, DF_DisasmViewState); - DF_CodeViewState *cv = &dv->cv; + RD_DisasmViewState *dv = rd_view_user_state(view, RD_DisasmViewState); + RD_CodeViewState *cv = &dv->cv; Temp scratch = scratch_begin(0, 0); HS_Scope *hs_scope = hs_scope_open(); DASM_Scope *dasm_scope = dasm_scope_open(); @@ -6802,8 +6824,8 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) F32 bottom_bar_height = ui_top_font_size()*2.f; Rng2F32 code_area_rect = r2f32p(rect.x0, rect.y0, rect.x1, rect.y1 - bottom_bar_height); Rng2F32 bottom_bar_rect = r2f32p(rect.x0, rect.y1 - bottom_bar_height, rect.x1, rect.y1); - df_regs()->cursor = dv->cursor; - df_regs()->mark = dv->mark; + rd_regs()->cursor = dv->cursor; + rd_regs()->mark = dv->mark; ////////////////////////////// //- rjf: unpack parameterization info @@ -6812,11 +6834,11 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) E_Space space = eval.space; if(auto_selected_thread) { - space = d_eval_space_from_ctrl_entity(ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->process)); + space = rd_eval_space_from_ctrl_entity(ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->process)); } - Rng1U64 range = d_range_from_eval_params(eval, params); - Arch arch = d_arch_from_eval_params(eval, params); - CTRL_Entity *space_entity = d_ctrl_entity_from_eval_space(space); + Rng1U64 range = rd_range_from_eval_params(eval, params); + Arch arch = rd_arch_from_eval_params(eval, params); + CTRL_Entity *space_entity = rd_ctrl_entity_from_eval_space(space); CTRL_Entity *dasm_module = &ctrl_entity_nil; DI_Key dbgi_key = {0}; U64 base_vaddr = 0; @@ -6831,7 +6853,7 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) base_vaddr = dasm_module->vaddr_range.min; }break; } - U128 dasm_key = d_key_from_eval_space_range(space, range, 0); + U128 dasm_key = rd_key_from_eval_space_range(space, range, 0); U128 dasm_data_hash = {0}; DASM_Params dasm_params = {0}; { @@ -6843,10 +6865,10 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) dasm_params.dbgi_key = dbgi_key; } DASM_Info dasm_info = dasm_info_from_key_params(dasm_scope, dasm_key, &dasm_params, &dasm_data_hash); - df_regs()->text_key = dasm_info.text_key; - df_regs()->lang_kind = txt_lang_kind_from_arch(arch); + rd_regs()->text_key = dasm_info.text_key; + rd_regs()->lang_kind = txt_lang_kind_from_arch(arch); U128 dasm_text_hash = {0}; - TXT_TextInfo dasm_text_info = txt_text_info_from_key_lang(txt_scope, df_regs()->text_key, df_regs()->lang_kind, &dasm_text_hash); + TXT_TextInfo dasm_text_info = txt_text_info_from_key_lang(txt_scope, rd_regs()->text_key, rd_regs()->lang_kind, &dasm_text_hash); String8 dasm_text_data = hs_data_from_hash(hs_scope, dasm_text_hash); B32 has_disasm = (dasm_info.lines.count != 0 && dasm_text_info.lines_count != 0); B32 is_loading = (!has_disasm && dim_1u64(range) != 0 && eval.msgs.max_kind == E_MsgKind_Null); @@ -6856,7 +6878,7 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) // if(is_loading && !d_ctrl_targets_running()) { - df_view_equip_loading_info(view, is_loading, 0, 0); + rd_view_equip_loading_info(view, is_loading, 0, 0); } ////////////////////////////// @@ -6876,7 +6898,7 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) // if(!is_loading && has_disasm) { - df_code_view_build(scratch.arena, view, cv, DF_CodeViewBuildFlag_All, code_area_rect, dasm_text_data, &dasm_text_info, &dasm_info.lines, range, dbgi_key); + rd_code_view_build(scratch.arena, view, cv, RD_CodeViewBuildFlag_All, code_area_rect, dasm_text_data, &dasm_text_info, &dasm_info.lines, range, dbgi_key); } ////////////////////////////// @@ -6884,10 +6906,10 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) // if(!is_loading && has_disasm) { - U64 off = dasm_line_array_code_off_from_idx(&dasm_info.lines, df_regs()->cursor.line-1); - df_regs()->vaddr_range = r1u64(base_vaddr+off, base_vaddr+off); - df_regs()->voff_range = ctrl_voff_range_from_vaddr_range(dasm_module, df_regs()->vaddr_range); - df_regs()->lines = d_lines_from_dbgi_key_voff(df_frame_arena(), &dbgi_key, df_regs()->voff_range.min); + U64 off = dasm_line_array_code_off_from_idx(&dasm_info.lines, rd_regs()->cursor.line-1); + rd_regs()->vaddr_range = r1u64(base_vaddr+off, base_vaddr+off); + rd_regs()->voff_range = ctrl_voff_range_from_vaddr_range(dasm_module, rd_regs()->vaddr_range); + rd_regs()->lines = d_lines_from_dbgi_key_voff(rd_frame_arena(), &dbgi_key, rd_regs()->voff_range.min); } ////////////////////////////// @@ -6901,15 +6923,15 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) UI_TextAlignment(UI_TextAlign_Center) UI_PrefWidth(ui_text_dim(10, 1)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - DF_Font(DF_FontSlot_Code) + RD_Font(RD_FontSlot_Code) { - U64 cursor_vaddr = (1 <= df_regs()->cursor.line && df_regs()->cursor.line <= dasm_info.lines.count) ? (range.min+dasm_info.lines.v[df_regs()->cursor.line-1].code_off) : 0; + U64 cursor_vaddr = (1 <= rd_regs()->cursor.line && rd_regs()->cursor.line <= dasm_info.lines.count) ? (range.min+dasm_info.lines.v[rd_regs()->cursor.line-1].code_off) : 0; if(dasm_module != &ctrl_entity_nil) { ui_labelf("%S", path_normalized_from_string(scratch.arena, dasm_module->string)); ui_spacer(ui_em(1.5f, 1)); } - ui_labelf("Address: 0x%I64x, Line: %I64d, Column: %I64d", cursor_vaddr, df_regs()->cursor.line, df_regs()->cursor.column); + ui_labelf("Address: 0x%I64x, Line: %I64d, Column: %I64d", cursor_vaddr, rd_regs()->cursor.line, rd_regs()->cursor.column); ui_spacer(ui_pct(1, 0)); ui_labelf("(read only)"); ui_labelf("bin"); @@ -6919,8 +6941,8 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) ////////////////////////////// //- rjf: commit storage // - dv->cursor = df_regs()->cursor; - dv->mark = df_regs()->mark; + dv->cursor = rd_regs()->cursor; + dv->mark = rd_regs()->mark; txt_scope_close(txt_scope); dasm_scope_close(dasm_scope); @@ -6931,32 +6953,32 @@ DF_VIEW_UI_FUNCTION_DEF(disasm) //////////////////////////////// //~ rjf: output @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(output) +RD_VIEW_SETUP_FUNCTION_DEF(output) { - DF_CodeViewState *cv = df_view_user_state(view, DF_CodeViewState); - df_code_view_init(cv, view); + RD_CodeViewState *cv = rd_view_user_state(view, RD_CodeViewState); + rd_code_view_init(cv, view); } -DF_VIEW_CMD_FUNCTION_DEF(output) +RD_VIEW_CMD_FUNCTION_DEF(output) { - DF_CodeViewState *cv = df_view_user_state(view, DF_CodeViewState); + RD_CodeViewState *cv = rd_view_user_state(view, RD_CodeViewState); Temp scratch = scratch_begin(0, 0); HS_Scope *hs_scope = hs_scope_open(); TXT_Scope *txt_scope = txt_scope_open(); - df_regs()->text_key = d_state->output_log_key; - df_regs()->lang_kind = TXT_LangKind_Null; + rd_regs()->text_key = d_state->output_log_key; + rd_regs()->lang_kind = TXT_LangKind_Null; U128 hash = {0}; - TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, df_regs()->text_key, df_regs()->lang_kind, &hash); + TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, rd_regs()->text_key, rd_regs()->lang_kind, &hash); String8 data = hs_data_from_hash(hs_scope, hash); - df_code_view_cmds(view, cv, data, &info, 0, r1u64(0, 0), di_key_zero()); + rd_code_view_cmds(view, cv, data, &info, 0, r1u64(0, 0), di_key_zero()); txt_scope_close(txt_scope); hs_scope_close(hs_scope); scratch_end(scratch); } -DF_VIEW_UI_FUNCTION_DEF(output) +RD_VIEW_UI_FUNCTION_DEF(output) { - DF_CodeViewState *cv = df_view_user_state(view, DF_CodeViewState); + RD_CodeViewState *cv = rd_view_user_state(view, RD_CodeViewState); Temp scratch = scratch_begin(0, 0); HS_Scope *hs_scope = hs_scope_open(); TXT_Scope *txt_scope = txt_scope_open(); @@ -6987,7 +7009,7 @@ DF_VIEW_UI_FUNCTION_DEF(output) //- rjf: build code contents // { - df_code_view_build(scratch.arena, view, cv, 0, code_area_rect, data, &info, 0, r1u64(0, 0), di_key_zero()); + rd_code_view_build(scratch.arena, view, cv, 0, code_area_rect, data, &info, 0, r1u64(0, 0), di_key_zero()); } ////////////////////////////// @@ -7000,11 +7022,11 @@ DF_VIEW_UI_FUNCTION_DEF(output) UI_TextAlignment(UI_TextAlign_Center) UI_PrefWidth(ui_text_dim(10, 1)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - DF_Font(DF_FontSlot_Code) + RD_Font(RD_FontSlot_Code) { ui_labelf("(Debug String Output)"); ui_spacer(ui_em(1.5f, 1)); - ui_labelf("Line: %I64d, Column: %I64d", df_regs()->cursor.line, df_regs()->cursor.column); + ui_labelf("Line: %I64d, Column: %I64d", rd_regs()->cursor.line, rd_regs()->cursor.column); ui_spacer(ui_pct(1, 0)); ui_labelf("(read only)"); } @@ -7018,50 +7040,61 @@ DF_VIEW_UI_FUNCTION_DEF(output) //////////////////////////////// //~ rjf: memory @view_hook_impl -typedef struct DF_MemoryViewState DF_MemoryViewState; -struct DF_MemoryViewState +typedef struct RD_MemoryViewState RD_MemoryViewState; +struct RD_MemoryViewState { B32 center_cursor; B32 contain_cursor; }; -DF_VIEW_SETUP_FUNCTION_DEF(memory) +EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(memory) { - DF_MemoryViewState *mv = df_view_user_state(view, DF_MemoryViewState); + EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); + vb->string = string; + vb->expr = expr; + vb->visual_idx_range = r1u64(0, 16); + vb->semantic_idx_range = r1u64(0, 1); + vb->view_rules = view_rules; + ev_block_end(out, vb); } -DF_VIEW_CMD_FUNCTION_DEF(memory) +RD_VIEW_SETUP_FUNCTION_DEF(memory) { - DF_MemoryViewState *mv = df_view_user_state(view, DF_MemoryViewState); - for(DF_Cmd *cmd = 0; df_next_cmd(&cmd);) + RD_MemoryViewState *mv = rd_view_user_state(view, RD_MemoryViewState); +} + +RD_VIEW_CMD_FUNCTION_DEF(memory) +{ + RD_MemoryViewState *mv = rd_view_user_state(view, RD_MemoryViewState); + for(RD_Cmd *cmd = 0; rd_next_cmd(&cmd);) { - DF_CmdKind kind = df_cmd_kind_from_string(cmd->name); + RD_CmdKind kind = rd_cmd_kind_from_string(cmd->name); switch(kind) { default: break; - case DF_CmdKind_CenterCursor: - if(df_view_from_handle(cmd->regs->view) == view) + case RD_CmdKind_CenterCursor: + if(rd_view_from_handle(cmd->regs->view) == view) { mv->center_cursor = 1; }break; - case DF_CmdKind_ContainCursor: - if(df_view_from_handle(cmd->regs->view) == view) + case RD_CmdKind_ContainCursor: + if(rd_view_from_handle(cmd->regs->view) == view) { mv->contain_cursor = 1; }break; - case DF_CmdKind_GoToAddress: + case RD_CmdKind_GoToAddress: { // NOTE(rjf): go-to-address occurs with disassembly snaps, and we don't // generally want to respond to those in thise view, so just skip any // go-to-address commands that haven't been *explicitly* parameterized // with this view. - if(df_view_from_handle(cmd->regs->view) == view) + if(rd_view_from_handle(cmd->regs->view) == view) { // TODO(rjf) } }break; - case DF_CmdKind_SetColumns: - if(df_view_from_handle(cmd->regs->view) == view) + case RD_CmdKind_SetColumns: + if(rd_view_from_handle(cmd->regs->view) == view) { // TODO(rjf) }break; @@ -7069,12 +7102,12 @@ DF_VIEW_CMD_FUNCTION_DEF(memory) } } -DF_VIEW_UI_FUNCTION_DEF(memory) +RD_VIEW_UI_FUNCTION_DEF(memory) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); HS_Scope *hs_scope = hs_scope_open(); - DF_MemoryViewState *mv = df_view_user_state(view, DF_MemoryViewState); + RD_MemoryViewState *mv = rd_view_user_state(view, RD_MemoryViewState); ////////////////////////////// //- rjf: unpack parameterization info @@ -7082,13 +7115,13 @@ DF_VIEW_UI_FUNCTION_DEF(memory) E_Eval eval = e_eval_from_string(scratch.arena, string); if(eval.space.kind == 0) { - eval.space = d_eval_space_from_ctrl_entity(ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->process)); + eval.space = rd_eval_space_from_ctrl_entity(ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->process)); } - Rng1U64 space_range = d_whole_range_from_eval_space(eval.space); - U64 cursor = d_value_from_params_key(params, str8_lit("cursor_vaddr")).u64; - U64 mark = d_value_from_params_key(params, str8_lit("mark_vaddr")).u64; - U64 bytes_per_cell = d_value_from_params_key(params, str8_lit("bytes_per_cell")).u64; - U64 num_columns = d_value_from_params_key(params, str8_lit("num_columns")).u64; + Rng1U64 space_range = rd_whole_range_from_eval_space(eval.space); + U64 cursor = rd_value_from_params_key(params, str8_lit("cursor_vaddr")).u64; + U64 mark = rd_value_from_params_key(params, str8_lit("mark_vaddr")).u64; + U64 bytes_per_cell = rd_value_from_params_key(params, str8_lit("bytes_per_cell")).u64; + U64 num_columns = rd_value_from_params_key(params, str8_lit("num_columns")).u64; if(num_columns == 0) { num_columns = 16; @@ -7099,8 +7132,8 @@ DF_VIEW_UI_FUNCTION_DEF(memory) ////////////////////////////// //- rjf: unpack visual params // - FNT_Tag font = df_font_from_slot(DF_FontSlot_Code); - F32 font_size = df_font_size_from_slot(DF_FontSlot_Code); + FNT_Tag font = rd_font_from_slot(RD_FontSlot_Code); + F32 font_size = rd_font_size_from_slot(RD_FontSlot_Code); F32 big_glyph_advance = fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_lit("H")).x; F32 row_height_px = floor_f32(font_size*2.f); F32 cell_width_px = floor_f32(font_size*2.f * bytes_per_cell); @@ -7258,8 +7291,8 @@ DF_VIEW_UI_FUNCTION_DEF(memory) // DR_FancyStringList byte_fancy_strings[256] = {0}; { - Vec4F32 full_color = df_rgba_from_theme_color(DF_ThemeColor_TextPositive); - Vec4F32 zero_color = df_rgba_from_theme_color(DF_ThemeColor_TextWeak); + Vec4F32 full_color = rd_rgba_from_theme_color(RD_ThemeColor_TextPositive); + Vec4F32 zero_color = rd_rgba_from_theme_color(RD_ThemeColor_TextWeak); for(U64 idx = 0; idx < ArrayCount(byte_fancy_strings); idx += 1) { U8 byte = (U8)idx; @@ -7304,7 +7337,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) }; AnnotationList *visible_memory_annotations = push_array(scratch.arena, AnnotationList, visible_memory_size); { - CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); CTRL_Unwind unwind = d_query_cached_unwind_from_thread(thread); @@ -7329,7 +7362,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) Annotation *annotation = push_array(scratch.arena, Annotation, 1); annotation->name_string = symbol_name.size != 0 ? symbol_name : str8_lit("[external code]"); annotation->kind_string = str8_lit("Call Stack Frame"); - annotation->color = symbol_name.size != 0 ? df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol) : df_rgba_from_theme_color(DF_ThemeColor_TextWeak); + annotation->color = symbol_name.size != 0 ? rd_rgba_from_theme_color(RD_ThemeColor_CodeSymbol) : rd_rgba_from_theme_color(RD_ThemeColor_TextWeak); annotation->vaddr_range = frame_vaddr_range; for(U64 vaddr = frame_vaddr_range_in_viz.min; vaddr < frame_vaddr_range_in_viz.max; vaddr += 1) { @@ -7352,7 +7385,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) Annotation *annotation = push_array(scratch.arena, Annotation, 1); annotation->name_string = thread->string.size ? thread->string : push_str8f(scratch.arena, "TID: %I64u", thread->id); annotation->kind_string = str8_lit("Stack"); - annotation->color = (thread->rgba != 0) ? rgba_from_u32(thread->rgba) : df_rgba_from_theme_color(DF_ThemeColor_Text); + annotation->color = (thread->rgba != 0) ? rgba_from_u32(thread->rgba) : rd_rgba_from_theme_color(RD_ThemeColor_Text); annotation->vaddr_range = stack_vaddr_range; for(U64 vaddr = stack_vaddr_range_in_viz.min; vaddr < stack_vaddr_range_in_viz.max; vaddr += 1) { @@ -7367,16 +7400,16 @@ DF_VIEW_UI_FUNCTION_DEF(memory) DI_Scope *scope = di_scope_open(); Vec4F32 color_gen_table[] = { - df_rgba_from_theme_color(DF_ThemeColor_Thread0), - df_rgba_from_theme_color(DF_ThemeColor_Thread1), - df_rgba_from_theme_color(DF_ThemeColor_Thread2), - df_rgba_from_theme_color(DF_ThemeColor_Thread3), - df_rgba_from_theme_color(DF_ThemeColor_Thread4), - df_rgba_from_theme_color(DF_ThemeColor_Thread5), - df_rgba_from_theme_color(DF_ThemeColor_Thread6), - df_rgba_from_theme_color(DF_ThemeColor_Thread7), + rd_rgba_from_theme_color(RD_ThemeColor_Thread0), + rd_rgba_from_theme_color(RD_ThemeColor_Thread1), + rd_rgba_from_theme_color(RD_ThemeColor_Thread2), + rd_rgba_from_theme_color(RD_ThemeColor_Thread3), + rd_rgba_from_theme_color(RD_ThemeColor_Thread4), + rd_rgba_from_theme_color(RD_ThemeColor_Thread5), + rd_rgba_from_theme_color(RD_ThemeColor_Thread6), + rd_rgba_from_theme_color(RD_ThemeColor_Thread7), }; - U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, df_regs()->unwind_count); + U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, rd_regs()->unwind_count); for(E_String2NumMapNode *n = e_parse_ctx->locals_map->first; n != 0; n = n->order_next) { String8 local_name = n->string; @@ -7429,7 +7462,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) UI_WidthFill UI_PrefHeight(ui_px(row_height_px, 1.f)) UI_Row header_box = ui_build_box_from_stringf(UI_BoxFlag_DrawSideBottom, "table_header"); UI_Parent(header_box) - DF_Font(DF_FontSlot_Code) + RD_Font(RD_FontSlot_Code) UI_FontSize(font_size) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) { @@ -7543,7 +7576,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) // rjf: press -> focus panel if(ui_pressed(sig)) { - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); } // rjf: click & drag -> select @@ -7570,11 +7603,11 @@ DF_VIEW_UI_FUNCTION_DEF(memory) ui_eat_event(evt); if(evt->delta_2f32.y < 0) { - df_cmd(DF_CmdKind_IncCodeFontScale); + rd_cmd(RD_CmdKind_IncCodeFontScale); } else if(evt->delta_2f32.y > 0) { - df_cmd(DF_CmdKind_DecCodeFontScale); + rd_cmd(RD_CmdKind_DecCodeFontScale); } } } @@ -7584,7 +7617,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) ////////////////////////////// //- rjf: build rows // - UI_Parent(row_container_box) DF_Font(DF_FontSlot_Code) UI_FontSize(font_size) + UI_Parent(row_container_box) RD_Font(RD_FontSlot_Code) UI_FontSize(font_size) { Rng1U64 selection = r1u64(cursor, mark); U8 *row_ascii_buffer = push_array(scratch.arena, U8, num_columns); @@ -7597,7 +7630,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) if(row_range_bytes.min%64 == 0) { row_is_boundary = 1; - row_boundary_color = df_rgba_from_theme_color(DF_ThemeColor_BaseBorder); + row_boundary_color = rd_rgba_from_theme_color(RD_ThemeColor_BaseBorder); } UI_Box *row = ui_build_box_from_stringf(UI_BoxFlag_DrawSideTop*!!row_is_boundary, "row_%I64x", row_range_bytes.min); UI_Parent(row) @@ -7627,7 +7660,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) if(global_byte_num == mouse_hover_byte_num) { cell_flags |= UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawSideTop|UI_BoxFlag_DrawSideBottom|UI_BoxFlag_DrawSideLeft|UI_BoxFlag_DrawSideRight; - cell_border_rgba = df_rgba_from_theme_color(DF_ThemeColor_Hover); + cell_border_rgba = rd_rgba_from_theme_color(RD_ThemeColor_Hover); } if(annotation != 0) { @@ -7645,7 +7678,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) if(selection.min <= global_byte_idx && global_byte_idx <= selection.max) { cell_flags |= UI_BoxFlag_DrawBackground; - cell_bg_rgba = df_rgba_from_theme_color(DF_ThemeColor_SelectionOverlay); + cell_bg_rgba = rd_rgba_from_theme_color(RD_ThemeColor_SelectionOverlay); } ui_set_next_palette(ui_build_palette(ui_top_palette(), .background = cell_bg_rgba)); UI_Box *cell_box = ui_build_box_from_key(UI_BoxFlag_DrawText|cell_flags, ui_key_zero()); @@ -7676,12 +7709,12 @@ DF_VIEW_UI_FUNCTION_DEF(memory) { UI_PrefWidth(ui_children_sum(1)) UI_Row UI_PrefWidth(ui_text_dim(10, 1)) { - DF_Font(DF_FontSlot_Code) ui_label(a->name_string); - DF_Font(DF_FontSlot_Main) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(a->kind_string); + RD_Font(RD_FontSlot_Code) ui_label(a->name_string); + RD_Font(RD_FontSlot_Main) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(a->kind_string); } if(a->type_string.size != 0) { - df_code_label(1.f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeType), a->type_string); + rd_code_label(1.f, 1, rd_rgba_from_theme_color(RD_ThemeColor_CodeType), a->type_string); } UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(str8_from_memory_size(scratch.arena, dim_1u64(a->vaddr_range))); if(a->next != 0) @@ -7718,7 +7751,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) ascii_box->rect.y0, text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, selection_in_row.max+1-row_range_bytes.min)).x + font_size/4.f, ascii_box->rect.y1), - df_rgba_from_theme_color(DF_ThemeColor_SelectionOverlay), + rd_rgba_from_theme_color(RD_ThemeColor_SelectionOverlay), 0, 0, 1.f); } ui_box_equip_draw_bucket(ascii_box, bucket); @@ -7729,7 +7762,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) D_BucketScope(bucket) { Vec2F32 text_pos = ui_box_text_position(ascii_box); - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay); + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlay); dr_rect(r2f32p(text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, mouse_hover_byte_num-1-row_range_bytes.min)).x - font_size/8.f, ascii_box->rect.y0, text_pos.x + fnt_dim_from_tag_size_string(font, font_size, 0, 0, str8_prefix(ascii_text, mouse_hover_byte_num+0-row_range_bytes.min)).x + font_size/4.f, @@ -7755,7 +7788,7 @@ DF_VIEW_UI_FUNCTION_DEF(memory) ui_set_next_fixed_width(dim_2f32(footer_rect).x); ui_set_next_fixed_height(dim_2f32(footer_rect).y); footer_box = ui_build_box_from_stringf(UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawDropShadow, "footer"); - UI_Parent(footer_box) DF_Font(DF_FontSlot_Code) UI_FontSize(font_size) + UI_Parent(footer_box) RD_Font(RD_FontSlot_Code) UI_FontSize(font_size) { UI_PrefWidth(ui_em(7.5f, 1.f)) UI_HeightFill UI_Column UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefHeight(ui_px(row_height_px, 0.f)) @@ -7807,21 +7840,35 @@ DF_VIEW_UI_FUNCTION_DEF(memory) ////////////////////////////// //- rjf: save parameters // - df_view_store_param_u64(view, str8_lit("cursor_vaddr"), cursor); - df_view_store_param_u64(view, str8_lit("mark_vaddr"), mark); - df_view_store_param_u64(view, str8_lit("bytes_per_cell"), bytes_per_cell); - df_view_store_param_u64(view, str8_lit("num_columns"), num_columns); + rd_view_store_param_u64(view, str8_lit("cursor_vaddr"), cursor); + rd_view_store_param_u64(view, str8_lit("mark_vaddr"), mark); + rd_view_store_param_u64(view, str8_lit("bytes_per_cell"), bytes_per_cell); + rd_view_store_param_u64(view, str8_lit("num_columns"), num_columns); hs_scope_close(hs_scope); scratch_end(scratch); ProfEnd(); } +//////////////////////////////// +//~ rjf: "graph" + +EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(graph) +{ + EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); + vb->string = string; + vb->expr = expr; + vb->visual_idx_range = r1u64(0, 8); + vb->semantic_idx_range = r1u64(0, 1); + vb->view_rules = view_rules; + ev_block_end(out, vb); +} + //////////////////////////////// //~ rjf: bitmap @view_hook_impl -typedef struct DF_BitmapBoxDrawData DF_BitmapBoxDrawData; -struct DF_BitmapBoxDrawData +typedef struct RD_BitmapBoxDrawData RD_BitmapBoxDrawData; +struct RD_BitmapBoxDrawData { Rng2F32 src; R_Handle texture; @@ -7831,15 +7878,15 @@ struct DF_BitmapBoxDrawData F32 ui_per_bmp_px; }; -typedef struct DF_BitmapCanvasBoxDrawData DF_BitmapCanvasBoxDrawData; -struct DF_BitmapCanvasBoxDrawData +typedef struct RD_BitmapCanvasBoxDrawData RD_BitmapCanvasBoxDrawData; +struct RD_BitmapCanvasBoxDrawData { Vec2F32 view_center_pos; F32 zoom; }; internal Vec2F32 -df_bitmap_screen_from_canvas_pos(Vec2F32 view_center_pos, F32 zoom, Rng2F32 rect, Vec2F32 cvs) +rd_bitmap_screen_from_canvas_pos(Vec2F32 view_center_pos, F32 zoom, Rng2F32 rect, Vec2F32 cvs) { Vec2F32 scr = { @@ -7850,14 +7897,14 @@ df_bitmap_screen_from_canvas_pos(Vec2F32 view_center_pos, F32 zoom, Rng2F32 rect } internal Rng2F32 -df_bitmap_screen_from_canvas_rect(Vec2F32 view_center_pos, F32 zoom, Rng2F32 rect, Rng2F32 cvs) +rd_bitmap_screen_from_canvas_rect(Vec2F32 view_center_pos, F32 zoom, Rng2F32 rect, Rng2F32 cvs) { - Rng2F32 scr = r2f32(df_bitmap_screen_from_canvas_pos(view_center_pos, zoom, rect, cvs.p0), df_bitmap_screen_from_canvas_pos(view_center_pos, zoom, rect, cvs.p1)); + Rng2F32 scr = r2f32(rd_bitmap_screen_from_canvas_pos(view_center_pos, zoom, rect, cvs.p0), rd_bitmap_screen_from_canvas_pos(view_center_pos, zoom, rect, cvs.p1)); return scr; } internal Vec2F32 -df_bitmap_canvas_from_screen_pos(Vec2F32 view_center_pos, F32 zoom, Rng2F32 rect, Vec2F32 scr) +rd_bitmap_canvas_from_screen_pos(Vec2F32 view_center_pos, F32 zoom, Rng2F32 rect, Vec2F32 scr) { Vec2F32 cvs = { @@ -7868,54 +7915,20 @@ df_bitmap_canvas_from_screen_pos(Vec2F32 view_center_pos, F32 zoom, Rng2F32 rect } internal Rng2F32 -df_bitmap_canvas_from_screen_rect(Vec2F32 view_center_pos, F32 zoom, Rng2F32 rect, Rng2F32 scr) +rd_bitmap_canvas_from_screen_rect(Vec2F32 view_center_pos, F32 zoom, Rng2F32 rect, Rng2F32 scr) { - Rng2F32 cvs = r2f32(df_bitmap_canvas_from_screen_pos(view_center_pos, zoom, rect, scr.p0), df_bitmap_canvas_from_screen_pos(view_center_pos, zoom, rect, scr.p1)); + Rng2F32 cvs = r2f32(rd_bitmap_canvas_from_screen_pos(view_center_pos, zoom, rect, scr.p0), rd_bitmap_canvas_from_screen_pos(view_center_pos, zoom, rect, scr.p1)); return cvs; } -internal UI_BOX_CUSTOM_DRAW(df_bitmap_box_draw) +internal UI_BOX_CUSTOM_DRAW(rd_bitmap_view_canvas_box_draw) { - DF_BitmapBoxDrawData *draw_data = (DF_BitmapBoxDrawData *)user_data; - Vec4F32 bg_color = box->palette->background; - dr_img(box->rect, draw_data->src, draw_data->texture, v4f32(1, 1, 1, 1), 0, 0, 0); - if(draw_data->loaded_t < 0.98f) - { - Rng2F32 clip = box->rect; - for(UI_Box *b = box->parent; !ui_box_is_nil(b); b = b->parent) - { - if(b->flags & UI_BoxFlag_Clip) - { - clip = intersect_2f32(b->rect, clip); - } - } - dr_blur(intersect_2f32(clip, box->rect), 10.f-9.f*draw_data->loaded_t, 0); - } - if(r_handle_match(draw_data->texture, r_handle_zero())) - { - dr_rect(box->rect, v4f32(0, 0, 0, 1), 0, 0, 0); - } - dr_rect(box->rect, v4f32(bg_color.x*bg_color.w, bg_color.y*bg_color.w, bg_color.z*bg_color.w, 1.f-draw_data->loaded_t), 0, 0, 0); - if(draw_data->hovered) - { - Vec4F32 indicator_color = v4f32(1, 1, 1, 1); - dr_rect(pad_2f32(r2f32p(box->rect.x0 + draw_data->mouse_px.x*draw_data->ui_per_bmp_px, - box->rect.y0 + draw_data->mouse_px.y*draw_data->ui_per_bmp_px, - box->rect.x0 + draw_data->mouse_px.x*draw_data->ui_per_bmp_px + draw_data->ui_per_bmp_px, - box->rect.y0 + draw_data->mouse_px.y*draw_data->ui_per_bmp_px + draw_data->ui_per_bmp_px), - 3.f), - indicator_color, 3.f, 4.f, 1.f); - } -} - -internal UI_BOX_CUSTOM_DRAW(df_bitmap_view_canvas_box_draw) -{ - DF_BitmapCanvasBoxDrawData *draw_data = (DF_BitmapCanvasBoxDrawData *)user_data; + RD_BitmapCanvasBoxDrawData *draw_data = (RD_BitmapCanvasBoxDrawData *)user_data; Rng2F32 rect_scrn = box->rect; - Rng2F32 rect_cvs = df_bitmap_canvas_from_screen_rect(draw_data->view_center_pos, draw_data->zoom, rect_scrn, rect_scrn); + Rng2F32 rect_cvs = rd_bitmap_canvas_from_screen_rect(draw_data->view_center_pos, draw_data->zoom, rect_scrn, rect_scrn); F32 grid_cell_size_cvs = box->font_size*10.f; F32 grid_line_thickness_px = Max(2.f, box->font_size*0.1f); - Vec4F32 grid_line_color = df_rgba_from_theme_color(DF_ThemeColor_TextWeak); + Vec4F32 grid_line_color = rd_rgba_from_theme_color(RD_ThemeColor_TextWeak); for(EachEnumVal(Axis2, axis)) { for(F32 v = rect_cvs.p0.v[axis] - mod_f32(rect_cvs.p0.v[axis], grid_cell_size_cvs); @@ -7924,7 +7937,7 @@ internal UI_BOX_CUSTOM_DRAW(df_bitmap_view_canvas_box_draw) { Vec2F32 p_cvs = {0}; p_cvs.v[axis] = v; - Vec2F32 p_scr = df_bitmap_screen_from_canvas_pos(draw_data->view_center_pos, draw_data->zoom, rect_scrn, p_cvs); + Vec2F32 p_scr = rd_bitmap_screen_from_canvas_pos(draw_data->view_center_pos, draw_data->zoom, rect_scrn, p_cvs); Rng2F32 rect = {0}; rect.p0.v[axis] = p_scr.v[axis] - grid_line_thickness_px/2; rect.p1.v[axis] = p_scr.v[axis] + grid_line_thickness_px/2; @@ -7935,13 +7948,24 @@ internal UI_BOX_CUSTOM_DRAW(df_bitmap_view_canvas_box_draw) } } -DF_VIEW_SETUP_FUNCTION_DEF(bitmap) +EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(bitmap) { - df_view_equip_loading_info(view, 1, 0, 0); + EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); + vb->string = string; + vb->expr = expr; + vb->visual_idx_range = r1u64(0, 8); + vb->semantic_idx_range = r1u64(0, 1); + vb->view_rules = view_rules; + ev_block_end(out, vb); +} + +RD_VIEW_SETUP_FUNCTION_DEF(bitmap) +{ + rd_view_equip_loading_info(view, 1, 0, 0); view->loading_t = view->loading_t_target = 1.f; } -DF_VIEW_CMD_FUNCTION_DEF(bitmap) {} -DF_VIEW_UI_FUNCTION_DEF(bitmap) +RD_VIEW_CMD_FUNCTION_DEF(bitmap) {} +RD_VIEW_UI_FUNCTION_DEF(bitmap) { Temp scratch = scratch_begin(0, 0); HS_Scope *hs_scope = hs_scope_open(); @@ -7951,20 +7975,20 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) //- rjf: evaluate expression // E_Eval eval = e_eval_from_string(scratch.arena, string); - Vec2S32 dim = d_dim2s32_from_eval_params(eval, params); - R_Tex2DFormat fmt = d_tex2dformat_from_eval_params(eval, params); - U64 base_offset = d_base_offset_from_eval(eval); + Vec2S32 dim = rd_dim2s32_from_eval_params(eval, params); + R_Tex2DFormat fmt = rd_tex2dformat_from_eval_params(eval, params); + U64 base_offset = rd_base_offset_from_eval(eval); U64 expected_size = dim.x*dim.y*r_tex2d_format_bytes_per_pixel_table[fmt]; Rng1U64 offset_range = r1u64(base_offset, base_offset + expected_size); ////////////////////////////// //- rjf: unpack params // - F32 zoom = d_value_from_params_key(params, str8_lit("zoom")).f32; + F32 zoom = rd_value_from_params_key(params, str8_lit("zoom")).f32; Vec2F32 view_center_pos = { - d_value_from_params_key(params, str8_lit("x")).f32, - d_value_from_params_key(params, str8_lit("y")).f32, + rd_value_from_params_key(params, str8_lit("x")).f32, + rd_value_from_params_key(params, str8_lit("y")).f32, }; if(zoom == 0) { @@ -7983,7 +8007,7 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) ////////////////////////////// //- rjf: map expression artifacts -> texture // - U128 texture_key = d_key_from_eval_space_range(eval.space, offset_range, 0); + U128 texture_key = rd_key_from_eval_space_range(eval.space, offset_range, 0); TEX_Topology topology = tex_topology_make(dim, fmt); U128 data_hash = {0}; R_Handle texture = tex_texture_from_key_topology(tex_scope, texture_key, topology, &data_hash); @@ -7998,7 +8022,7 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) r_handle_match(texture, r_handle_zero()) || data.size == 0)) { - df_view_equip_loading_info(view, 1, 0, 0); + rd_view_equip_loading_info(view, 1, 0, 0); } ////////////////////////////// @@ -8021,7 +8045,7 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) { if(ui_pressed(canvas_sig)) { - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); ui_store_drag_struct(&view_center_pos); } Vec2F32 start_view_center_pos = *ui_get_drag_struct(Vec2F32); @@ -8035,9 +8059,9 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) F32 new_zoom = zoom - zoom*canvas_sig.scroll.y/10.f; new_zoom = Clamp(1.f/256.f, new_zoom, 256.f); Vec2F32 mouse_scr_pre = sub_2f32(ui_mouse(), rect.p0); - Vec2F32 mouse_cvs = df_bitmap_canvas_from_screen_pos(view_center_pos, zoom, canvas_rect, mouse_scr_pre); + Vec2F32 mouse_cvs = rd_bitmap_canvas_from_screen_pos(view_center_pos, zoom, canvas_rect, mouse_scr_pre); zoom = new_zoom; - Vec2F32 mouse_scr_pst = df_bitmap_screen_from_canvas_pos(view_center_pos, zoom, canvas_rect, mouse_cvs); + Vec2F32 mouse_scr_pst = rd_bitmap_screen_from_canvas_pos(view_center_pos, zoom, canvas_rect, mouse_cvs); Vec2F32 drift_scr = sub_2f32(mouse_scr_pst, mouse_scr_pre); view_center_pos = add_2f32(view_center_pos, scale_2f32(drift_scr, 1.f/new_zoom)); } @@ -8053,17 +8077,17 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) //- rjf: equip canvas draw info // { - DF_BitmapCanvasBoxDrawData *draw_data = push_array(ui_build_arena(), DF_BitmapCanvasBoxDrawData, 1); + RD_BitmapCanvasBoxDrawData *draw_data = push_array(ui_build_arena(), RD_BitmapCanvasBoxDrawData, 1); draw_data->view_center_pos = view_center_pos; draw_data->zoom = zoom; - ui_box_equip_custom_draw(canvas_box, df_bitmap_view_canvas_box_draw, draw_data); + ui_box_equip_custom_draw(canvas_box, rd_bitmap_view_canvas_box_draw, draw_data); } ////////////////////////////// //- rjf: calculate image coordinates // Rng2F32 img_rect_cvs = r2f32p(-topology.dim.x/2, -topology.dim.y/2, +topology.dim.x/2, +topology.dim.y/2); - Rng2F32 img_rect_scr = df_bitmap_screen_from_canvas_rect(view_center_pos, zoom, canvas_rect, img_rect_cvs); + Rng2F32 img_rect_scr = rd_bitmap_screen_from_canvas_rect(view_center_pos, zoom, canvas_rect, img_rect_cvs); ////////////////////////////// //- rjf: image-region canvas interaction @@ -8072,7 +8096,7 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) if(ui_hovering(canvas_sig) && !ui_dragging(canvas_sig)) { Vec2F32 mouse_scr = sub_2f32(ui_mouse(), rect.p0); - Vec2F32 mouse_cvs = df_bitmap_canvas_from_screen_pos(view_center_pos, zoom, canvas_rect, mouse_scr); + Vec2F32 mouse_cvs = rd_bitmap_canvas_from_screen_pos(view_center_pos, zoom, canvas_rect, mouse_scr); if(contains_2f32(img_rect_cvs, mouse_cvs)) { mouse_bmp = v2s32((S32)(mouse_cvs.x-img_rect_cvs.x0), (S32)(mouse_cvs.y-img_rect_cvs.y0)); @@ -8132,20 +8156,35 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap) ////////////////////////////// //- rjf: store params // - df_view_store_param_f32(view, str8_lit("zoom"), zoom); - df_view_store_param_f32(view, str8_lit("x"), view_center_pos.x); - df_view_store_param_f32(view, str8_lit("y"), view_center_pos.y); + rd_view_store_param_f32(view, str8_lit("zoom"), zoom); + rd_view_store_param_f32(view, str8_lit("x"), view_center_pos.x); + rd_view_store_param_f32(view, str8_lit("y"), view_center_pos.y); hs_scope_close(hs_scope); tex_scope_close(tex_scope); scratch_end(scratch); } +//////////////////////////////// +//~ rjf: "checkbox" + +RD_VIEW_RULE_ROW_UI_FUNCTION_DEF(checkbox) +{ + Temp scratch = scratch_begin(0, 0); + E_Eval eval = e_eval_from_string(scratch.arena, string); + E_Eval value_eval = e_value_eval_from_eval(eval); + if(ui_clicked(rd_icon_buttonf(value_eval.value.u64 == 0 ? RD_IconKind_CheckHollow : RD_IconKind_CheckFilled, 0, "###check"))) + { + rd_commit_eval_value_string(eval, value_eval.value.u64 == 0 ? str8_lit("1") : str8_lit("0")); + } + scratch_end(scratch); +} + //////////////////////////////// //~ rjf: color_rgba @view_hook_impl internal Vec4F32 -df_rgba_from_eval_params(E_Eval eval, MD_Node *params) +rd_rgba_from_eval_params(E_Eval eval, MD_Node *params) { Vec4F32 rgba = {0}; { @@ -8166,15 +8205,85 @@ df_rgba_from_eval_params(E_Eval eval, MD_Node *params) return rgba; } -DF_VIEW_SETUP_FUNCTION_DEF(color_rgba) {} -DF_VIEW_CMD_FUNCTION_DEF(color_rgba) {} -DF_VIEW_UI_FUNCTION_DEF(color_rgba) +EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(color_rgba) +{ + EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); + vb->string = string; + vb->expr = expr; + vb->visual_idx_range = r1u64(0, 8); + vb->semantic_idx_range = r1u64(0, 1); + vb->view_rules = view_rules; + ev_block_end(out, vb); +} + +RD_VIEW_RULE_ROW_UI_FUNCTION_DEF(color_rgba) +{ + Temp scratch = scratch_begin(0, 0); + E_Eval eval = e_eval_from_string(scratch.arena, string); + Vec4F32 rgba = rd_rgba_from_eval_params(eval, params); + Vec4F32 hsva = hsva_from_rgba(rgba); + + //- rjf: build text box + UI_Box *text_box = &ui_g_nil_box; + UI_WidthFill RD_Font(RD_FontSlot_Code) + { + text_box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); + DR_FancyStringList fancy_strings = {0}; + { + DR_FancyString open_paren = {ui_top_font(), str8_lit("("), ui_top_palette()->text, ui_top_font_size(), 0, 0}; + DR_FancyString comma = {ui_top_font(), str8_lit(", "), ui_top_palette()->text, ui_top_font_size(), 0, 0}; + DR_FancyString r_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.x), v4f32(1.f, 0.25f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; + DR_FancyString g_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.y), v4f32(0.25f, 1.f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; + DR_FancyString b_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.z), v4f32(0.25f, 0.25f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; + DR_FancyString a_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.w), v4f32(1.f, 1.f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; + DR_FancyString clse_paren = {ui_top_font(), str8_lit(")"), ui_top_palette()->text, ui_top_font_size(), 0, 0}; + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &open_paren); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &r_fstr); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &g_fstr); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &b_fstr); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &a_fstr); + dr_fancy_string_list_push(scratch.arena, &fancy_strings, &clse_paren); + } + ui_box_equip_display_fancy_strings(text_box, &fancy_strings); + } + + //- rjf: build color box + UI_Box *color_box = &ui_g_nil_box; + UI_PrefWidth(ui_em(1.875f, 1.f)) UI_ChildLayoutAxis(Axis2_Y) + { + color_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable, "color_box"); + UI_Parent(color_box) UI_PrefHeight(ui_em(1.875f, 1.f)) UI_Padding(ui_pct(1, 0)) + { + UI_Palette(ui_build_palette(ui_top_palette(), .background = rgba)) UI_CornerRadius(ui_top_font_size()*0.5f) + ui_build_box_from_key(UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawBorder, ui_key_zero()); + } + } + + //- rjf: space + ui_spacer(ui_em(0.375f, 1.f)); + + //- rjf: hover color box -> show components + UI_Signal sig = ui_signal_from_box(color_box); + if(ui_hovering(sig)) + { + ui_do_color_tooltip_hsva(hsva); + } + + scratch_end(scratch); +} + +RD_VIEW_SETUP_FUNCTION_DEF(color_rgba) {} +RD_VIEW_CMD_FUNCTION_DEF(color_rgba) {} +RD_VIEW_UI_FUNCTION_DEF(color_rgba) { Temp scratch = scratch_begin(0, 0); Vec2F32 dim = dim_2f32(rect); F32 padding = ui_top_font_size()*3.f; E_Eval eval = e_eval_from_string(scratch.arena, string); - Vec4F32 rgba = df_rgba_from_eval_params(eval, params); + Vec4F32 rgba = rd_rgba_from_eval_params(eval, params); Vec4F32 hsva = hsva_from_rgba(rgba); UI_WidthFill UI_HeightFill UI_Column UI_Padding(ui_px(padding, 1.f)) UI_Row UI_Padding(ui_pct(1.f, 0.f)) UI_HeightFill { @@ -8186,7 +8295,7 @@ DF_VIEW_UI_FUNCTION_DEF(color_rgba) { UI_Signal h_sig = ui_hue_pickerf(&hsva.x, hsva.y, hsva.z, "hue_picker"); } - UI_PrefWidth(ui_children_sum(1)) UI_Column UI_PrefWidth(ui_text_dim(10, 1)) UI_PrefHeight(ui_em(2.f, 0.f)) DF_Font(DF_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) + UI_PrefWidth(ui_children_sum(1)) UI_Column UI_PrefWidth(ui_text_dim(10, 1)) UI_PrefHeight(ui_em(2.f, 0.f)) RD_Font(RD_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) { ui_labelf("Hex"); ui_labelf("R"); @@ -8197,7 +8306,7 @@ DF_VIEW_UI_FUNCTION_DEF(color_rgba) ui_labelf("V"); ui_labelf("A"); } - UI_PrefWidth(ui_children_sum(1)) UI_Column UI_PrefWidth(ui_text_dim(10, 1)) UI_PrefHeight(ui_em(2.f, 0.f)) DF_Font(DF_FontSlot_Code) + UI_PrefWidth(ui_children_sum(1)) UI_Column UI_PrefWidth(ui_text_dim(10, 1)) UI_PrefHeight(ui_em(2.f, 0.f)) RD_Font(RD_FontSlot_Code) { String8 hex_string = hex_string_from_rgba_4f32(scratch.arena, rgba); ui_label(hex_string); @@ -8216,16 +8325,16 @@ DF_VIEW_UI_FUNCTION_DEF(color_rgba) //////////////////////////////// //~ rjf: geo3d @view_hook_impl -typedef struct DF_Geo3DViewState DF_Geo3DViewState; -struct DF_Geo3DViewState +typedef struct RD_Geo3DViewState RD_Geo3DViewState; +struct RD_Geo3DViewState { F32 yaw; F32 pitch; F32 zoom; }; -typedef struct DF_Geo3DBoxDrawData DF_Geo3DBoxDrawData; -struct DF_Geo3DBoxDrawData +typedef struct RD_Geo3DBoxDrawData RD_Geo3DBoxDrawData; +struct RD_Geo3DBoxDrawData { F32 yaw; F32 pitch; @@ -8234,9 +8343,9 @@ struct DF_Geo3DBoxDrawData R_Handle index_buffer; }; -internal UI_BOX_CUSTOM_DRAW(df_geo3d_box_draw) +internal UI_BOX_CUSTOM_DRAW(rd_geo3d_box_draw) { - DF_Geo3DBoxDrawData *draw_data = (DF_Geo3DBoxDrawData *)user_data; + RD_Geo3DBoxDrawData *draw_data = (RD_Geo3DBoxDrawData *)user_data; // rjf: get clip Rng2F32 clip = box->rect; @@ -8263,37 +8372,48 @@ internal UI_BOX_CUSTOM_DRAW(df_geo3d_box_draw) dr_mesh(draw_data->vertex_buffer, draw_data->index_buffer, R_GeoTopologyKind_Triangles, R_GeoVertexFlag_TexCoord|R_GeoVertexFlag_Normals|R_GeoVertexFlag_RGB, r_handle_zero(), mat_4x4f32(1.f)); } -DF_VIEW_SETUP_FUNCTION_DEF(geo3d) +EV_VIEW_RULE_BLOCK_PROD_FUNCTION_DEF(geo3d) { - df_view_equip_loading_info(view, 1, 0, 0); + EV_Block *vb = ev_block_begin(arena, EV_BlockKind_Canvas, key, ev_key_make(ev_hash_from_key(key), 1), depth); + vb->string = string; + vb->expr = expr; + vb->visual_idx_range = r1u64(0, 16); + vb->semantic_idx_range = r1u64(0, 1); + vb->view_rules = view_rules; + ev_block_end(out, vb); +} + +RD_VIEW_SETUP_FUNCTION_DEF(geo3d) +{ + rd_view_equip_loading_info(view, 1, 0, 0); view->loading_t = view->loading_t_target = 1.f; } -DF_VIEW_CMD_FUNCTION_DEF(geo3d) {} -DF_VIEW_UI_FUNCTION_DEF(geo3d) +RD_VIEW_CMD_FUNCTION_DEF(geo3d) {} +RD_VIEW_UI_FUNCTION_DEF(geo3d) { Temp scratch = scratch_begin(0, 0); GEO_Scope *geo_scope = geo_scope_open(); - DF_Geo3DViewState *state = df_view_user_state(view, DF_Geo3DViewState); + RD_Geo3DViewState *state = rd_view_user_state(view, RD_Geo3DViewState); ////////////////////////////// //- rjf: unpack parameters // - U64 count = d_value_from_params_key(params, str8_lit("count")).u64; - U64 vtx_base_off = d_value_from_params_key(params, str8_lit("vtx")).u64; - U64 vtx_size = d_value_from_params_key(params, str8_lit("vtx_size")).u64; - F32 yaw_target = d_value_from_params_key(params, str8_lit("yaw")).f32; - F32 pitch_target = d_value_from_params_key(params, str8_lit("pitch")).f32; - F32 zoom_target = d_value_from_params_key(params, str8_lit("zoom")).f32; + U64 count = rd_value_from_params_key(params, str8_lit("count")).u64; + U64 vtx_base_off = rd_value_from_params_key(params, str8_lit("vtx")).u64; + U64 vtx_size = rd_value_from_params_key(params, str8_lit("vtx_size")).u64; + F32 yaw_target = rd_value_from_params_key(params, str8_lit("yaw")).f32; + F32 pitch_target = rd_value_from_params_key(params, str8_lit("pitch")).f32; + F32 zoom_target = rd_value_from_params_key(params, str8_lit("zoom")).f32; ////////////////////////////// //- rjf: evaluate & unpack expression // E_Eval eval = e_eval_from_string(scratch.arena, string); - U64 base_offset = d_base_offset_from_eval(eval); + U64 base_offset = rd_base_offset_from_eval(eval); Rng1U64 idxs_range = r1u64(base_offset, base_offset+count*sizeof(U32)); Rng1U64 vtxs_range = r1u64(vtx_base_off, vtx_base_off+vtx_size); - U128 idxs_key = d_key_from_eval_space_range(eval.space, idxs_range, 0); - U128 vtxs_key = d_key_from_eval_space_range(eval.space, vtxs_range, 0); + U128 idxs_key = rd_key_from_eval_space_range(eval.space, idxs_range, 0); + U128 vtxs_key = rd_key_from_eval_space_range(eval.space, vtxs_range, 0); R_Handle idxs_buffer = geo_buffer_from_key(geo_scope, idxs_key); R_Handle vtxs_buffer = geo_buffer_from_key(geo_scope, vtxs_key); @@ -8304,7 +8424,7 @@ DF_VIEW_UI_FUNCTION_DEF(geo3d) (r_handle_match(idxs_buffer, r_handle_zero()) || r_handle_match(vtxs_buffer, r_handle_zero()))) { - df_view_equip_loading_info(view, 1, 0, 0); + rd_view_equip_loading_info(view, 1, 0, 0); } ////////////////////////////// @@ -8321,8 +8441,8 @@ DF_VIEW_UI_FUNCTION_DEF(geo3d) //- rjf: animate camera // { - F32 fast_rate = 1 - pow_f32(2, (-60.f * df_state->frame_dt)); - F32 slow_rate = 1 - pow_f32(2, (-30.f * df_state->frame_dt)); + F32 fast_rate = 1 - pow_f32(2, (-60.f * rd_state->frame_dt)); + F32 slow_rate = 1 - pow_f32(2, (-30.f * rd_state->frame_dt)); state->zoom += (zoom_target - state->zoom) * slow_rate; state->yaw += (yaw_target - state->yaw) * fast_rate; state->pitch += (pitch_target - state->pitch) * fast_rate; @@ -8330,7 +8450,7 @@ DF_VIEW_UI_FUNCTION_DEF(geo3d) abs_f32(state->yaw - yaw_target) > 0.001f || abs_f32(state->pitch - pitch_target) > 0.001f) { - df_request_frame(); + rd_request_frame(); } } @@ -8350,7 +8470,7 @@ DF_VIEW_UI_FUNCTION_DEF(geo3d) { if(ui_pressed(sig)) { - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); Vec2F32 data = v2f32(yaw_target, pitch_target); ui_store_drag_struct(&data); } @@ -8362,21 +8482,21 @@ DF_VIEW_UI_FUNCTION_DEF(geo3d) zoom_target += sig.scroll.y; zoom_target = Clamp(0.1f, zoom_target, 100.f); pitch_target = Clamp(-0.49f, pitch_target, -0.01f); - DF_Geo3DBoxDrawData *draw_data = push_array(ui_build_arena(), DF_Geo3DBoxDrawData, 1); + RD_Geo3DBoxDrawData *draw_data = push_array(ui_build_arena(), RD_Geo3DBoxDrawData, 1); draw_data->yaw = state->yaw; draw_data->pitch = state->pitch; draw_data->zoom = state->zoom; draw_data->vertex_buffer = vtxs_buffer; draw_data->index_buffer = idxs_buffer; - ui_box_equip_custom_draw(box, df_geo3d_box_draw, draw_data); + ui_box_equip_custom_draw(box, rd_geo3d_box_draw, draw_data); } ////////////////////////////// //- rjf: commit parameters // - df_view_store_param_f32(view, str8_lit("yaw"), yaw_target); - df_view_store_param_f32(view, str8_lit("pitch"), pitch_target); - df_view_store_param_f32(view, str8_lit("zoom"), zoom_target); + rd_view_store_param_f32(view, str8_lit("yaw"), yaw_target); + rd_view_store_param_f32(view, str8_lit("pitch"), pitch_target); + rd_view_store_param_f32(view, str8_lit("zoom"), zoom_target); geo_scope_close(geo_scope); scratch_end(scratch); @@ -8385,9 +8505,9 @@ DF_VIEW_UI_FUNCTION_DEF(geo3d) //////////////////////////////// //~ rjf: exception_filters @view_hook_impl -DF_VIEW_SETUP_FUNCTION_DEF(exception_filters) {} -DF_VIEW_CMD_FUNCTION_DEF(exception_filters) {} -DF_VIEW_UI_FUNCTION_DEF(exception_filters) +RD_VIEW_SETUP_FUNCTION_DEF(exception_filters) {} +RD_VIEW_CMD_FUNCTION_DEF(exception_filters) {} +RD_VIEW_UI_FUNCTION_DEF(exception_filters) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); @@ -8395,78 +8515,78 @@ DF_VIEW_UI_FUNCTION_DEF(exception_filters) String8 query = string; //- rjf: get state - typedef struct DF_ExceptionFiltersViewState DF_ExceptionFiltersViewState; - struct DF_ExceptionFiltersViewState + typedef struct RD_ExceptionFiltersViewState RD_ExceptionFiltersViewState; + struct RD_ExceptionFiltersViewState { Vec2S64 cursor; }; - DF_ExceptionFiltersViewState *sv = df_view_user_state(view, DF_ExceptionFiltersViewState); + RD_ExceptionFiltersViewState *sv = rd_view_user_state(view, RD_ExceptionFiltersViewState); //- rjf: get list of options - typedef struct DF_ExceptionFiltersOption DF_ExceptionFiltersOption; - struct DF_ExceptionFiltersOption + typedef struct RD_ExceptionFiltersOption RD_ExceptionFiltersOption; + struct RD_ExceptionFiltersOption { String8 name; FuzzyMatchRangeList matches; B32 is_enabled; CTRL_ExceptionCodeKind exception_code_kind; }; - typedef struct DF_ExceptionFiltersOptionChunkNode DF_ExceptionFiltersOptionChunkNode; - struct DF_ExceptionFiltersOptionChunkNode + typedef struct RD_ExceptionFiltersOptionChunkNode RD_ExceptionFiltersOptionChunkNode; + struct RD_ExceptionFiltersOptionChunkNode { - DF_ExceptionFiltersOptionChunkNode *next; - DF_ExceptionFiltersOption *v; + RD_ExceptionFiltersOptionChunkNode *next; + RD_ExceptionFiltersOption *v; U64 cap; U64 count; }; - typedef struct DF_ExceptionFiltersOptionChunkList DF_ExceptionFiltersOptionChunkList; - struct DF_ExceptionFiltersOptionChunkList + typedef struct RD_ExceptionFiltersOptionChunkList RD_ExceptionFiltersOptionChunkList; + struct RD_ExceptionFiltersOptionChunkList { - DF_ExceptionFiltersOptionChunkNode *first; - DF_ExceptionFiltersOptionChunkNode *last; + RD_ExceptionFiltersOptionChunkNode *first; + RD_ExceptionFiltersOptionChunkNode *last; U64 option_count; U64 node_count; }; - typedef struct DF_ExceptionFiltersOptionArray DF_ExceptionFiltersOptionArray; - struct DF_ExceptionFiltersOptionArray + typedef struct RD_ExceptionFiltersOptionArray RD_ExceptionFiltersOptionArray; + struct RD_ExceptionFiltersOptionArray { - DF_ExceptionFiltersOption *v; + RD_ExceptionFiltersOption *v; U64 count; }; - DF_ExceptionFiltersOptionChunkList opts_list = {0}; + RD_ExceptionFiltersOptionChunkList opts_list = {0}; for(CTRL_ExceptionCodeKind k = (CTRL_ExceptionCodeKind)(CTRL_ExceptionCodeKind_Null+1); k < CTRL_ExceptionCodeKind_COUNT; k = (CTRL_ExceptionCodeKind)(k+1)) { - DF_ExceptionFiltersOptionChunkNode *node = opts_list.last; + RD_ExceptionFiltersOptionChunkNode *node = opts_list.last; String8 name = push_str8f(scratch.arena, "0x%x %S", ctrl_exception_code_kind_code_table[k], ctrl_exception_code_kind_display_string_table[k]); FuzzyMatchRangeList matches = fuzzy_match_find(scratch.arena, query, name); if(matches.count >= matches.needle_part_count) { if(node == 0 || node->count >= node->cap) { - node = push_array(scratch.arena, DF_ExceptionFiltersOptionChunkNode, 1); + node = push_array(scratch.arena, RD_ExceptionFiltersOptionChunkNode, 1); node->cap = 256; - node->v = push_array_no_zero(scratch.arena, DF_ExceptionFiltersOption, node->cap); + node->v = push_array_no_zero(scratch.arena, RD_ExceptionFiltersOption, node->cap); SLLQueuePush(opts_list.first, opts_list.last, node); opts_list.node_count += 1; } node->v[node->count].name = name; node->v[node->count].matches = matches; - node->v[node->count].is_enabled = !!(df_state->ctrl_exception_code_filters[k/64] & (1ull<<(k%64))); + node->v[node->count].is_enabled = !!(rd_state->ctrl_exception_code_filters[k/64] & (1ull<<(k%64))); node->v[node->count].exception_code_kind = k; node->count += 1; opts_list.option_count += 1; } } - DF_ExceptionFiltersOptionArray opts = {0}; + RD_ExceptionFiltersOptionArray opts = {0}; { opts.count = opts_list.option_count; - opts.v = push_array_no_zero(scratch.arena, DF_ExceptionFiltersOption, opts.count); + opts.v = push_array_no_zero(scratch.arena, RD_ExceptionFiltersOption, opts.count); U64 idx = 0; - for(DF_ExceptionFiltersOptionChunkNode *n = opts_list.first; n != 0; n = n->next) + for(RD_ExceptionFiltersOptionChunkNode *n = opts_list.first; n != 0; n = n->next) { - MemoryCopy(opts.v+idx, n->v, n->count*sizeof(DF_ExceptionFiltersOption)); + MemoryCopy(opts.v+idx, n->v, n->count*sizeof(RD_ExceptionFiltersOption)); idx += n->count; } } @@ -8496,8 +8616,8 @@ DF_VIEW_UI_FUNCTION_DEF(exception_filters) for(S64 row = visible_row_range.min; row <= visible_row_range.max && row < opts.count; row += 1) UI_FocusHot(sv->cursor.y == row+1 ? UI_FocusKind_On : UI_FocusKind_Off) { - DF_ExceptionFiltersOption *opt = &opts.v[row]; - UI_Signal sig = df_icon_buttonf(opt->is_enabled ? DF_IconKind_CheckFilled : DF_IconKind_CheckHollow, &opt->matches, "%S", opt->name); + RD_ExceptionFiltersOption *opt = &opts.v[row]; + UI_Signal sig = rd_icon_buttonf(opt->is_enabled ? RD_IconKind_CheckFilled : RD_IconKind_CheckHollow, &opt->matches, "%S", opt->name); if(ui_clicked(sig)) { if(opt->exception_code_kind != CTRL_ExceptionCodeKind_Null) @@ -8505,11 +8625,11 @@ DF_VIEW_UI_FUNCTION_DEF(exception_filters) CTRL_ExceptionCodeKind k = opt->exception_code_kind; if(opt->is_enabled) { - df_state->ctrl_exception_code_filters[k/64] &= ~(1ull<<(k%64)); + rd_state->ctrl_exception_code_filters[k/64] &= ~(1ull<<(k%64)); } else { - df_state->ctrl_exception_code_filters[k/64] |= (1ull<<(k%64)); + rd_state->ctrl_exception_code_filters[k/64] |= (1ull<<(k%64)); } } } @@ -8523,56 +8643,56 @@ DF_VIEW_UI_FUNCTION_DEF(exception_filters) //////////////////////////////// //~ rjf: settings @view_hook_impl -typedef enum DF_SettingsItemKind +typedef enum RD_SettingsItemKind { - DF_SettingsItemKind_CategoryHeader, - DF_SettingsItemKind_GlobalSetting, - DF_SettingsItemKind_WindowSetting, - DF_SettingsItemKind_ThemeColor, - DF_SettingsItemKind_ThemePreset, - DF_SettingsItemKind_COUNT + RD_SettingsItemKind_CategoryHeader, + RD_SettingsItemKind_GlobalSetting, + RD_SettingsItemKind_WindowSetting, + RD_SettingsItemKind_ThemeColor, + RD_SettingsItemKind_ThemePreset, + RD_SettingsItemKind_COUNT } -DF_SettingsItemKind; +RD_SettingsItemKind; -typedef struct DF_SettingsItem DF_SettingsItem; -struct DF_SettingsItem +typedef struct RD_SettingsItem RD_SettingsItem; +struct RD_SettingsItem { - DF_SettingsItemKind kind; + RD_SettingsItemKind kind; String8 kind_string; String8 string; FuzzyMatchRangeList kind_string_matches; FuzzyMatchRangeList string_matches; - DF_IconKind icon_kind; - DF_SettingCode code; - DF_ThemeColor color; - DF_ThemePreset preset; - DF_SettingsItemKind category; + RD_IconKind icon_kind; + RD_SettingCode code; + RD_ThemeColor color; + RD_ThemePreset preset; + RD_SettingsItemKind category; }; -typedef struct DF_SettingsItemNode DF_SettingsItemNode; -struct DF_SettingsItemNode +typedef struct RD_SettingsItemNode RD_SettingsItemNode; +struct RD_SettingsItemNode { - DF_SettingsItemNode *next; - DF_SettingsItem v; + RD_SettingsItemNode *next; + RD_SettingsItem v; }; -typedef struct DF_SettingsItemList DF_SettingsItemList; -struct DF_SettingsItemList +typedef struct RD_SettingsItemList RD_SettingsItemList; +struct RD_SettingsItemList { - DF_SettingsItemNode *first; - DF_SettingsItemNode *last; + RD_SettingsItemNode *first; + RD_SettingsItemNode *last; U64 count; }; -typedef struct DF_SettingsItemArray DF_SettingsItemArray; -struct DF_SettingsItemArray +typedef struct RD_SettingsItemArray RD_SettingsItemArray; +struct RD_SettingsItemArray { - DF_SettingsItem *v; + RD_SettingsItem *v; U64 count; }; internal int -df_qsort_compare_settings_item(DF_SettingsItem *a, DF_SettingsItem *b) +rd_qsort_compare_settings_item(RD_SettingsItem *a, RD_SettingsItem *b) { int result = 0; if(a->string_matches.count > b->string_matches.count) @@ -8594,21 +8714,21 @@ df_qsort_compare_settings_item(DF_SettingsItem *a, DF_SettingsItem *b) return result; } -DF_VIEW_SETUP_FUNCTION_DEF(settings){} -DF_VIEW_CMD_FUNCTION_DEF(settings){} -DF_VIEW_UI_FUNCTION_DEF(settings) +RD_VIEW_SETUP_FUNCTION_DEF(settings){} +RD_VIEW_CMD_FUNCTION_DEF(settings){} +RD_VIEW_UI_FUNCTION_DEF(settings) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); F32 row_height_px = floor_f32(ui_top_font_size()*2.5f); String8 query = string; - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Window *window = rd_window_from_handle(rd_regs()->window); ////////////////////////////// //- rjf: get state // - typedef struct DF_SettingsViewState DF_SettingsViewState; - struct DF_SettingsViewState + typedef struct RD_SettingsViewState RD_SettingsViewState; + struct RD_SettingsViewState { B32 initialized; Vec2S64 cursor; @@ -8616,62 +8736,62 @@ DF_VIEW_UI_FUNCTION_DEF(settings) TxtPt txt_mark; U8 txt_buffer[1024]; U64 txt_size; - DF_ThemeColor color_ctx_menu_color; + RD_ThemeColor color_ctx_menu_color; Vec4F32 color_ctx_menu_color_hsva; - DF_ThemePreset preset_apply_confirm; - B32 category_opened[DF_SettingsItemKind_COUNT]; + RD_ThemePreset preset_apply_confirm; + B32 category_opened[RD_SettingsItemKind_COUNT]; }; - DF_SettingsViewState *sv = df_view_user_state(view, DF_SettingsViewState); + RD_SettingsViewState *sv = rd_view_user_state(view, RD_SettingsViewState); if(!sv->initialized) { sv->initialized = 1; - sv->preset_apply_confirm = DF_ThemePreset_COUNT; + sv->preset_apply_confirm = RD_ThemePreset_COUNT; } ////////////////////////////// //- rjf: gather all filtered settings items // - DF_SettingsItemArray items = {0}; + RD_SettingsItemArray items = {0}; { - DF_SettingsItemList items_list = {0}; + RD_SettingsItemList items_list = {0}; //- rjf: global settings header if(query.size == 0) { - DF_SettingsItemNode *n = push_array(scratch.arena, DF_SettingsItemNode, 1); + RD_SettingsItemNode *n = push_array(scratch.arena, RD_SettingsItemNode, 1); SLLQueuePush(items_list.first, items_list.last, n); items_list.count += 1; - n->v.kind = DF_SettingsItemKind_CategoryHeader; + n->v.kind = RD_SettingsItemKind_CategoryHeader; n->v.string = str8_lit("Global Interface Settings"); - n->v.icon_kind = sv->category_opened[DF_SettingsItemKind_GlobalSetting] ? DF_IconKind_DownCaret : DF_IconKind_RightCaret; - n->v.category = DF_SettingsItemKind_GlobalSetting; + n->v.icon_kind = sv->category_opened[RD_SettingsItemKind_GlobalSetting] ? RD_IconKind_DownCaret : RD_IconKind_RightCaret; + n->v.category = RD_SettingsItemKind_GlobalSetting; } //- rjf: gather all global settings - if(sv->category_opened[DF_SettingsItemKind_GlobalSetting] || query.size != 0) + if(sv->category_opened[RD_SettingsItemKind_GlobalSetting] || query.size != 0) { - for(EachEnumVal(DF_SettingCode, code)) + for(EachEnumVal(RD_SettingCode, code)) { - if(df_g_setting_code_default_is_per_window_table[code]) + if(rd_setting_code_default_is_per_window_table[code]) { continue; } String8 kind_string = str8_lit("Global Interface Setting"); - String8 string = df_g_setting_code_display_string_table[code]; + String8 string = rd_setting_code_display_string_table[code]; FuzzyMatchRangeList kind_string_matches = fuzzy_match_find(scratch.arena, query, kind_string); FuzzyMatchRangeList string_matches = fuzzy_match_find(scratch.arena, query, string); if(string_matches.count == string_matches.needle_part_count || kind_string_matches.count == kind_string_matches.needle_part_count) { - DF_SettingsItemNode *n = push_array(scratch.arena, DF_SettingsItemNode, 1); + RD_SettingsItemNode *n = push_array(scratch.arena, RD_SettingsItemNode, 1); SLLQueuePush(items_list.first, items_list.last, n); items_list.count += 1; - n->v.kind = DF_SettingsItemKind_GlobalSetting; + n->v.kind = RD_SettingsItemKind_GlobalSetting; n->v.kind_string = kind_string; n->v.string = string; n->v.kind_string_matches = kind_string_matches; n->v.string_matches = string_matches; - n->v.icon_kind = DF_IconKind_Window; + n->v.icon_kind = RD_IconKind_Window; n->v.code = code; } } @@ -8680,40 +8800,40 @@ DF_VIEW_UI_FUNCTION_DEF(settings) //- rjf: window settings header if(query.size == 0) { - DF_SettingsItemNode *n = push_array(scratch.arena, DF_SettingsItemNode, 1); + RD_SettingsItemNode *n = push_array(scratch.arena, RD_SettingsItemNode, 1); SLLQueuePush(items_list.first, items_list.last, n); items_list.count += 1; - n->v.kind = DF_SettingsItemKind_CategoryHeader; + n->v.kind = RD_SettingsItemKind_CategoryHeader; n->v.string = str8_lit("Window Interface Settings"); - n->v.icon_kind = sv->category_opened[DF_SettingsItemKind_WindowSetting] ? DF_IconKind_DownCaret : DF_IconKind_RightCaret; - n->v.category = DF_SettingsItemKind_WindowSetting; + n->v.icon_kind = sv->category_opened[RD_SettingsItemKind_WindowSetting] ? RD_IconKind_DownCaret : RD_IconKind_RightCaret; + n->v.category = RD_SettingsItemKind_WindowSetting; } //- rjf: gather all window settings - if(sv->category_opened[DF_SettingsItemKind_WindowSetting] || query.size != 0) + if(sv->category_opened[RD_SettingsItemKind_WindowSetting] || query.size != 0) { - for(EachEnumVal(DF_SettingCode, code)) + for(EachEnumVal(RD_SettingCode, code)) { - if(!df_g_setting_code_default_is_per_window_table[code]) + if(!rd_setting_code_default_is_per_window_table[code]) { continue; } String8 kind_string = str8_lit("Window Interface Setting"); - String8 string = df_g_setting_code_display_string_table[code]; + String8 string = rd_setting_code_display_string_table[code]; FuzzyMatchRangeList kind_string_matches = fuzzy_match_find(scratch.arena, query, kind_string); FuzzyMatchRangeList string_matches = fuzzy_match_find(scratch.arena, query, string); if(string_matches.count == string_matches.needle_part_count || kind_string_matches.count == kind_string_matches.needle_part_count) { - DF_SettingsItemNode *n = push_array(scratch.arena, DF_SettingsItemNode, 1); + RD_SettingsItemNode *n = push_array(scratch.arena, RD_SettingsItemNode, 1); SLLQueuePush(items_list.first, items_list.last, n); items_list.count += 1; - n->v.kind = DF_SettingsItemKind_WindowSetting; + n->v.kind = RD_SettingsItemKind_WindowSetting; n->v.kind_string = kind_string; n->v.string = string; n->v.kind_string_matches = kind_string_matches; n->v.string_matches = string_matches; - n->v.icon_kind = DF_IconKind_Window; + n->v.icon_kind = RD_IconKind_Window; n->v.code = code; } } @@ -8722,36 +8842,36 @@ DF_VIEW_UI_FUNCTION_DEF(settings) //- rjf: theme presets header if(query.size == 0) { - DF_SettingsItemNode *n = push_array(scratch.arena, DF_SettingsItemNode, 1); + RD_SettingsItemNode *n = push_array(scratch.arena, RD_SettingsItemNode, 1); SLLQueuePush(items_list.first, items_list.last, n); items_list.count += 1; - n->v.kind = DF_SettingsItemKind_CategoryHeader; + n->v.kind = RD_SettingsItemKind_CategoryHeader; n->v.string = str8_lit("Theme Presets"); - n->v.icon_kind = sv->category_opened[DF_SettingsItemKind_ThemePreset] ? DF_IconKind_DownCaret : DF_IconKind_RightCaret; - n->v.category = DF_SettingsItemKind_ThemePreset; + n->v.icon_kind = sv->category_opened[RD_SettingsItemKind_ThemePreset] ? RD_IconKind_DownCaret : RD_IconKind_RightCaret; + n->v.category = RD_SettingsItemKind_ThemePreset; } //- rjf: gather theme presets - if(sv->category_opened[DF_SettingsItemKind_ThemePreset] || query.size != 0) + if(sv->category_opened[RD_SettingsItemKind_ThemePreset] || query.size != 0) { - for(EachEnumVal(DF_ThemePreset, preset)) + for(EachEnumVal(RD_ThemePreset, preset)) { String8 kind_string = str8_lit("Theme Preset"); - String8 string = df_g_theme_preset_display_string_table[preset]; + String8 string = rd_theme_preset_display_string_table[preset]; FuzzyMatchRangeList kind_string_matches = fuzzy_match_find(scratch.arena, query, kind_string); FuzzyMatchRangeList string_matches = fuzzy_match_find(scratch.arena, query, string); if(string_matches.count == string_matches.needle_part_count || kind_string_matches.count == kind_string_matches.needle_part_count) { - DF_SettingsItemNode *n = push_array(scratch.arena, DF_SettingsItemNode, 1); + RD_SettingsItemNode *n = push_array(scratch.arena, RD_SettingsItemNode, 1); SLLQueuePush(items_list.first, items_list.last, n); items_list.count += 1; - n->v.kind = DF_SettingsItemKind_ThemePreset; + n->v.kind = RD_SettingsItemKind_ThemePreset; n->v.kind_string = kind_string; n->v.string = string; n->v.kind_string_matches = kind_string_matches; n->v.string_matches = string_matches; - n->v.icon_kind = DF_IconKind_Palette; + n->v.icon_kind = RD_IconKind_Palette; n->v.preset = preset; } } @@ -8760,36 +8880,36 @@ DF_VIEW_UI_FUNCTION_DEF(settings) //- rjf: theme colors header if(query.size == 0) { - DF_SettingsItemNode *n = push_array(scratch.arena, DF_SettingsItemNode, 1); + RD_SettingsItemNode *n = push_array(scratch.arena, RD_SettingsItemNode, 1); SLLQueuePush(items_list.first, items_list.last, n); items_list.count += 1; - n->v.kind = DF_SettingsItemKind_CategoryHeader; + n->v.kind = RD_SettingsItemKind_CategoryHeader; n->v.string = str8_lit("Theme Colors"); - n->v.icon_kind = sv->category_opened[DF_SettingsItemKind_ThemeColor] ? DF_IconKind_DownCaret : DF_IconKind_RightCaret; - n->v.category = DF_SettingsItemKind_ThemeColor; + n->v.icon_kind = sv->category_opened[RD_SettingsItemKind_ThemeColor] ? RD_IconKind_DownCaret : RD_IconKind_RightCaret; + n->v.category = RD_SettingsItemKind_ThemeColor; } //- rjf: gather all theme colors - if(sv->category_opened[DF_SettingsItemKind_ThemeColor] || query.size != 0) + if(sv->category_opened[RD_SettingsItemKind_ThemeColor] || query.size != 0) { - for(EachNonZeroEnumVal(DF_ThemeColor, color)) + for(EachNonZeroEnumVal(RD_ThemeColor, color)) { String8 kind_string = str8_lit("Theme Color"); - String8 string = df_g_theme_color_display_string_table[color]; + String8 string = rd_theme_color_display_string_table[color]; FuzzyMatchRangeList kind_string_matches = fuzzy_match_find(scratch.arena, query, kind_string); FuzzyMatchRangeList string_matches = fuzzy_match_find(scratch.arena, query, string); if(string_matches.count == string_matches.needle_part_count || kind_string_matches.count == kind_string_matches.needle_part_count) { - DF_SettingsItemNode *n = push_array(scratch.arena, DF_SettingsItemNode, 1); + RD_SettingsItemNode *n = push_array(scratch.arena, RD_SettingsItemNode, 1); SLLQueuePush(items_list.first, items_list.last, n); items_list.count += 1; - n->v.kind = DF_SettingsItemKind_ThemeColor; + n->v.kind = RD_SettingsItemKind_ThemeColor; n->v.kind_string = kind_string; n->v.string = string; n->v.kind_string_matches = kind_string_matches; n->v.string_matches = string_matches; - n->v.icon_kind = DF_IconKind_Palette; + n->v.icon_kind = RD_IconKind_Palette; n->v.color = color; } } @@ -8797,10 +8917,10 @@ DF_VIEW_UI_FUNCTION_DEF(settings) //- rjf: convert to array items.count = items_list.count; - items.v = push_array(scratch.arena, DF_SettingsItem, items.count); + items.v = push_array(scratch.arena, RD_SettingsItem, items.count); { U64 idx = 0; - for(DF_SettingsItemNode *n = items_list.first; n != 0; n = n->next, idx += 1) + for(RD_SettingsItemNode *n = items_list.first; n != 0; n = n->next, idx += 1) { items.v[idx] = n->v; } @@ -8812,17 +8932,17 @@ DF_VIEW_UI_FUNCTION_DEF(settings) // if(query.size != 0) { - quick_sort(items.v, items.count, sizeof(items.v[0]), df_qsort_compare_settings_item); + quick_sort(items.v, items.count, sizeof(items.v[0]), rd_qsort_compare_settings_item); } ////////////////////////////// //- rjf: produce per-color context menu keys // - UI_Key *color_ctx_menu_keys = push_array(scratch.arena, UI_Key, DF_ThemeColor_COUNT); + UI_Key *color_ctx_menu_keys = push_array(scratch.arena, UI_Key, RD_ThemeColor_COUNT); { - for(DF_ThemeColor color = (DF_ThemeColor)(DF_ThemeColor_Null+1); - color < DF_ThemeColor_COUNT; - color = (DF_ThemeColor)(color+1)) + for(RD_ThemeColor color = (RD_ThemeColor)(RD_ThemeColor_Null+1); + color < RD_ThemeColor_COUNT; + color = (RD_ThemeColor)(color+1)) { color_ctx_menu_keys[color] = ui_key_from_stringf(ui_key_zero(), "###settings_color_ctx_menu_%I64x", (U64)color); } @@ -8831,11 +8951,11 @@ DF_VIEW_UI_FUNCTION_DEF(settings) ////////////////////////////// //- rjf: build color context menus // - for(DF_ThemeColor color = (DF_ThemeColor)(DF_ThemeColor_Null+1); - color < DF_ThemeColor_COUNT; - color = (DF_ThemeColor)(color+1)) + for(RD_ThemeColor color = (RD_ThemeColor)(RD_ThemeColor_Null+1); + color < RD_ThemeColor_COUNT; + color = (RD_ThemeColor)(color+1)) { - DF_Palette(DF_PaletteCode_Floating) + RD_Palette(RD_PaletteCode_Floating) UI_CtxMenu(color_ctx_menu_keys[color]) UI_Padding(ui_em(1.5f, 1.f)) UI_PrefWidth(ui_em(28.5f, 1)) UI_PrefHeight(ui_children_sum(1.f)) @@ -8844,7 +8964,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) UI_Row { ui_spacer(ui_em(1.5f, 1.f)); - UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(df_g_theme_color_display_string_table[color]); + UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_label(rd_theme_color_display_string_table[color]); } ui_spacer(ui_em(1.5f, 1.f)); @@ -8892,10 +9012,10 @@ DF_VIEW_UI_FUNCTION_DEF(settings) String8 s_string = push_str8f(scratch.arena, "%.2f", hsva.y); String8 v_string = push_str8f(scratch.arena, "%.2f", hsva.z); String8 a_string = push_str8f(scratch.arena, "%.2f", rgba.w); - UI_Row DF_Font(DF_FontSlot_Code) + UI_Row RD_Font(RD_FontSlot_Code) { UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_em(4.5f, 1.f)) ui_labelf("Hex"); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, hex_string, "###hex_edit"); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, hex_string, "###hex_edit"); if(ui_committed(sig)) { String8 string = str8(sv->txt_buffer, sv->txt_size); @@ -8908,7 +9028,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) UI_Row { UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_em(4.5f, 1.f)) ui_labelf("R"); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, r_string, "###r_edit"); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, r_string, "###r_edit"); if(ui_committed(sig)) { String8 string = str8(sv->txt_buffer, sv->txt_size); @@ -8920,7 +9040,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) UI_Row { UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_em(4.5f, 1.f)) ui_labelf("G"); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, g_string, "###g_edit"); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, g_string, "###g_edit"); if(ui_committed(sig)) { String8 string = str8(sv->txt_buffer, sv->txt_size); @@ -8932,7 +9052,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) UI_Row { UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_em(4.5f, 1.f)) ui_labelf("B"); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, b_string, "###b_edit"); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, b_string, "###b_edit"); if(ui_committed(sig)) { String8 string = str8(sv->txt_buffer, sv->txt_size); @@ -8945,7 +9065,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) UI_Row { UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_em(4.5f, 1.f)) ui_labelf("H"); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, h_string, "###h_edit"); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, h_string, "###h_edit"); if(ui_committed(sig)) { String8 string = str8(sv->txt_buffer, sv->txt_size); @@ -8956,7 +9076,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) UI_Row { UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_em(4.5f, 1.f)) ui_labelf("S"); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, s_string, "###s_edit"); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, s_string, "###s_edit"); if(ui_committed(sig)) { String8 string = str8(sv->txt_buffer, sv->txt_size); @@ -8967,7 +9087,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) UI_Row { UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_em(4.5f, 1.f)) ui_labelf("V"); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, v_string, "###v_edit"); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, v_string, "###v_edit"); if(ui_committed(sig)) { String8 string = str8(sv->txt_buffer, sv->txt_size); @@ -8979,7 +9099,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) UI_Row { UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_em(4.5f, 1.f)) ui_labelf("A"); - UI_Signal sig = df_line_editf(DF_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, a_string, "###a_edit"); + UI_Signal sig = rd_line_editf(RD_LineEditFlag_Border, 0, 0, &sv->txt_cursor, &sv->txt_mark, sv->txt_buffer, sizeof(sv->txt_buffer), &sv->txt_size, 0, a_string, "###a_edit"); if(ui_committed(sig)) { String8 string = str8(sv->txt_buffer, sv->txt_size); @@ -8994,16 +9114,16 @@ DF_VIEW_UI_FUNCTION_DEF(settings) Vec3F32 hsv = v3f32(hsva.x, hsva.y, hsva.z); Vec3F32 rgb = rgb_from_hsv(hsv); Vec4F32 rgba = v4f32(rgb.x, rgb.y, rgb.z, sv->color_ctx_menu_color_hsva.w); - df_state->cfg_theme_target.colors[sv->color_ctx_menu_color] = rgba; + rd_state->cfg_theme_target.colors[sv->color_ctx_menu_color] = rgba; } } ////////////////////////////// //- rjf: cancels // - UI_Focus(UI_FocusKind_On) if(ui_is_focus_active() && sv->preset_apply_confirm < DF_ThemePreset_COUNT && ui_slot_press(UI_EventActionSlot_Cancel)) + UI_Focus(UI_FocusKind_On) if(ui_is_focus_active() && sv->preset_apply_confirm < RD_ThemePreset_COUNT && ui_slot_press(UI_EventActionSlot_Cancel)) { - sv->preset_apply_confirm = DF_ThemePreset_COUNT; + sv->preset_apply_confirm = RD_ThemePreset_COUNT; } ////////////////////////////// @@ -9028,7 +9148,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) for(S64 row_num = visible_row_range.min; row_num <= visible_row_range.max && row_num < items.count; row_num += 1) { //- rjf: unpack item - DF_SettingsItem *item = &items.v[row_num]; + RD_SettingsItem *item = &items.v[row_num]; UI_Palette *palette = ui_top_palette(); Vec4F32 rgba = ui_top_palette()->text_weak; OS_Cursor cursor = OS_Cursor_HandPoint; @@ -9039,37 +9159,37 @@ DF_VIEW_UI_FUNCTION_DEF(settings) S32 slider_s32_val = 0; F32 slider_pct = 0.f; UI_BoxFlags flags = UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawHotEffects|UI_BoxFlag_DrawActiveEffects; - DF_SettingVal *val_table = &df_state->cfg_setting_vals[DF_CfgSrc_User][0]; + RD_SettingVal *val_table = &rd_state->cfg_setting_vals[RD_CfgSrc_User][0]; switch(item->kind) { - case DF_SettingsItemKind_COUNT:{}break; - case DF_SettingsItemKind_CategoryHeader: + case RD_SettingsItemKind_COUNT:{}break; + case RD_SettingsItemKind_CategoryHeader: { cursor = OS_Cursor_HandPoint; flags = UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawHotEffects; }break; - case DF_SettingsItemKind_ThemePreset: + case RD_SettingsItemKind_ThemePreset: { - Vec4F32 *colors = df_g_theme_preset_colors_table[item->preset]; - Vec4F32 bg_color = colors[DF_ThemeColor_BaseBackground]; - Vec4F32 tx_color = colors[DF_ThemeColor_Text]; - Vec4F32 tw_color = colors[DF_ThemeColor_TextWeak]; - Vec4F32 bd_color = colors[DF_ThemeColor_BaseBorder]; + Vec4F32 *colors = rd_theme_preset_colors_table[item->preset]; + Vec4F32 bg_color = colors[RD_ThemeColor_BaseBackground]; + Vec4F32 tx_color = colors[RD_ThemeColor_Text]; + Vec4F32 tw_color = colors[RD_ThemeColor_TextWeak]; + Vec4F32 bd_color = colors[RD_ThemeColor_BaseBorder]; palette = ui_build_palette(ui_top_palette(), .text = tx_color, .text_weak = tw_color, .border = bd_color, .background = bg_color); }break; - case DF_SettingsItemKind_ThemeColor: + case RD_SettingsItemKind_ThemeColor: { - rgba = df_rgba_from_theme_color(item->color); + rgba = rd_rgba_from_theme_color(item->color); }break; - case DF_SettingsItemKind_WindowSetting: {val_table = &window->setting_vals[0];}goto setting; - case DF_SettingsItemKind_GlobalSetting:{}goto setting; + case RD_SettingsItemKind_WindowSetting: {val_table = &window->setting_vals[0];}goto setting; + case RD_SettingsItemKind_GlobalSetting:{}goto setting; setting:; { - s32_range = df_g_setting_code_s32_range_table[item->code]; + s32_range = rd_setting_code_s32_range_table[item->code]; if(s32_range.min != 0 || s32_range.max != 1) { cursor = OS_Cursor_LeftRight; @@ -9089,7 +9209,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) UI_Box *item_box = &ui_g_nil_box; UI_Row { - if(query.size == 0 && item->kind != DF_SettingsItemKind_CategoryHeader) + if(query.size == 0 && item->kind != RD_SettingsItemKind_CategoryHeader) { ui_set_next_flags(UI_BoxFlag_DrawSideLeft); ui_spacer(ui_em(2.f, 1.f)); @@ -9100,13 +9220,13 @@ DF_VIEW_UI_FUNCTION_DEF(settings) item_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable|flags, "###option_%S_%S", item->kind_string, item->string); UI_Parent(item_box) { - if(item->icon_kind != DF_IconKind_Null) + if(item->icon_kind != RD_IconKind_Null) { UI_PrefWidth(ui_em(3.f, 1.f)) - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) UI_Palette(ui_build_palette(ui_top_palette(), .text = rgba)) UI_TextAlignment(UI_TextAlign_Center) - ui_label(df_g_icon_kind_text_table[item->icon_kind]); + ui_label(rd_icon_kind_text_table[item->icon_kind]); } if(query.size != 0 && item->kind_string.size != 0) UI_PrefWidth(ui_text_dim(10, 1)) { @@ -9123,22 +9243,22 @@ DF_VIEW_UI_FUNCTION_DEF(settings) UI_Flags(UI_BoxFlag_DrawTextWeak) ui_labelf("(%i)", slider_s32_val); UI_PrefWidth(ui_pct(slider_pct, 1.f)) UI_HeightFill UI_FixedX(0) UI_FixedY(0) - UI_Palette(ui_build_palette(ui_top_palette(), .background = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay))) + UI_Palette(ui_build_palette(ui_top_palette(), .background = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlay))) ui_build_box_from_key(UI_BoxFlag_DrawBackground, ui_key_zero()); } if(is_toggler) { ui_spacer(ui_pct(1, 0)); UI_PrefWidth(ui_em(2.5f, 1.f)) - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) UI_Flags(UI_BoxFlag_DrawTextWeak) - ui_label(df_g_icon_kind_text_table[is_toggled ? DF_IconKind_CheckFilled : DF_IconKind_CheckHollow]); + ui_label(rd_icon_kind_text_table[is_toggled ? RD_IconKind_CheckFilled : RD_IconKind_CheckHollow]); } - if(item->kind == DF_SettingsItemKind_ThemePreset && sv->preset_apply_confirm == item->preset) + if(item->kind == RD_SettingsItemKind_ThemePreset && sv->preset_apply_confirm == item->preset) { ui_spacer(ui_pct(1, 0)); UI_PrefWidth(ui_text_dim(10, 1)) - DF_Palette(DF_PaletteCode_NegativePopButton) + RD_Palette(RD_PaletteCode_NegativePopButton) UI_CornerRadius(ui_top_font_size()*0.5f) UI_FontSize(ui_top_font_size()*0.9f) UI_TextAlignment(UI_TextAlign_Center) @@ -9150,7 +9270,7 @@ DF_VIEW_UI_FUNCTION_DEF(settings) //- rjf: interact UI_Signal sig = ui_signal_from_box(item_box); - if(item->kind == DF_SettingsItemKind_ThemeColor && ui_clicked(sig)) + if(item->kind == RD_SettingsItemKind_ThemeColor && ui_clicked(sig)) { Vec3F32 rgb = v3f32(rgba.x, rgba.y, rgba.z); Vec3F32 hsv = hsv_from_rgb(rgb); @@ -9158,15 +9278,15 @@ DF_VIEW_UI_FUNCTION_DEF(settings) ui_ctx_menu_open(color_ctx_menu_keys[item->color], item_box->key, v2f32(0, dim_2f32(item_box->rect).y)); sv->color_ctx_menu_color = item->color; sv->color_ctx_menu_color_hsva = v4f32(hsv.x, hsv.y, hsv.z, rgba.w); - df_cmd(DF_CmdKind_FocusPanel); + rd_cmd(RD_CmdKind_FocusPanel); } - if((item->kind == DF_SettingsItemKind_GlobalSetting || item->kind == DF_SettingsItemKind_WindowSetting) && + if((item->kind == RD_SettingsItemKind_GlobalSetting || item->kind == RD_SettingsItemKind_WindowSetting) && is_toggler && ui_clicked(sig)) { val_table[item->code].s32 ^= 1; val_table[item->code].set = 1; } - if((item->kind == DF_SettingsItemKind_GlobalSetting || item->kind == DF_SettingsItemKind_WindowSetting) && + if((item->kind == RD_SettingsItemKind_GlobalSetting || item->kind == RD_SettingsItemKind_WindowSetting) && is_slider && ui_dragging(sig)) { if(ui_pressed(sig)) @@ -9180,28 +9300,28 @@ DF_VIEW_UI_FUNCTION_DEF(settings) val_table[item->code].s32 = pst_drag_val; val_table[item->code].set = 1; } - if(item->kind == DF_SettingsItemKind_ThemePreset && ui_clicked(sig)) + if(item->kind == RD_SettingsItemKind_ThemePreset && ui_clicked(sig)) { if(sv->preset_apply_confirm == item->preset) { - Vec4F32 *colors = df_g_theme_preset_colors_table[item->preset]; - MemoryCopy(df_state->cfg_theme_target.colors, colors, sizeof(df_state->cfg_theme_target.colors)); - sv->preset_apply_confirm = DF_ThemePreset_COUNT; + Vec4F32 *colors = rd_theme_preset_colors_table[item->preset]; + MemoryCopy(rd_state->cfg_theme_target.colors, colors, sizeof(rd_state->cfg_theme_target.colors)); + sv->preset_apply_confirm = RD_ThemePreset_COUNT; } else { sv->preset_apply_confirm = item->preset; } } - if(item->kind != DF_SettingsItemKind_ThemePreset && ui_pressed(sig)) + if(item->kind != RD_SettingsItemKind_ThemePreset && ui_pressed(sig)) { - sv->preset_apply_confirm = DF_ThemePreset_COUNT; + sv->preset_apply_confirm = RD_ThemePreset_COUNT; } - if(item->kind != DF_SettingsItemKind_ThemePreset && ui_pressed(sig)) + if(item->kind != RD_SettingsItemKind_ThemePreset && ui_pressed(sig)) { - sv->preset_apply_confirm = DF_ThemePreset_COUNT; + sv->preset_apply_confirm = RD_ThemePreset_COUNT; } - if(item->kind == DF_SettingsItemKind_CategoryHeader && ui_pressed(sig)) + if(item->kind == RD_SettingsItemKind_CategoryHeader && ui_pressed(sig)) { sv->category_opened[item->category] ^= 1; } diff --git a/src/raddbg/raddbg_views.h b/src/raddbg/raddbg_views.h new file mode 100644 index 00000000..f4416770 --- /dev/null +++ b/src/raddbg/raddbg_views.h @@ -0,0 +1,183 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#ifndef RADDBG_VIEWS_H +#define RADDBG_VIEWS_H + +//////////////////////////////// +//~ rjf: Code View Types + +typedef U32 RD_CodeViewBuildFlags; +enum +{ + RD_CodeViewBuildFlag_Margins = (1<<0), + RD_CodeViewBuildFlag_All = 0xffffffff, +}; + +typedef struct RD_CodeViewState RD_CodeViewState; +struct RD_CodeViewState +{ + // rjf: stable state + B32 initialized; + S64 preferred_column; + B32 drifted_for_search; + + // rjf: per-frame command info + S64 goto_line_num; + B32 center_cursor; + B32 contain_cursor; + B32 watch_expr_at_mouse; + Arena *find_text_arena; + String8 find_text_fwd; + String8 find_text_bwd; +}; + +typedef struct RD_CodeViewBuildResult RD_CodeViewBuildResult; +struct RD_CodeViewBuildResult +{ + DI_KeyList dbgi_keys; +}; + +//////////////////////////////// +//~ rjf: Watch View Types + +typedef enum RD_WatchViewColumnKind +{ + RD_WatchViewColumnKind_Expr, + RD_WatchViewColumnKind_Value, + RD_WatchViewColumnKind_Type, + RD_WatchViewColumnKind_ViewRule, + RD_WatchViewColumnKind_Module, + RD_WatchViewColumnKind_FrameSelection, + RD_WatchViewColumnKind_Member, + RD_WatchViewColumnKind_COUNT +} +RD_WatchViewColumnKind; + +typedef struct RD_WatchViewColumnParams RD_WatchViewColumnParams; +struct RD_WatchViewColumnParams +{ + String8 string; + String8 display_string; + String8 view_rule; + B32 is_non_code; + B32 dequote_string; +}; + +typedef struct RD_WatchViewColumn RD_WatchViewColumn; +struct RD_WatchViewColumn +{ + RD_WatchViewColumn *next; + RD_WatchViewColumn *prev; + RD_WatchViewColumnKind kind; + F32 pct; + U8 string_buffer[1024]; + U64 string_size; + U8 display_string_buffer[1024]; + U64 display_string_size; + U8 view_rule_buffer[1024]; + U64 view_rule_size; + B32 is_non_code; + B32 dequote_string; +}; + +typedef enum RD_WatchViewFillKind +{ + RD_WatchViewFillKind_Watch, + RD_WatchViewFillKind_Breakpoints, + RD_WatchViewFillKind_WatchPins, + RD_WatchViewFillKind_CallStack, + RD_WatchViewFillKind_Registers, + RD_WatchViewFillKind_Locals, + RD_WatchViewFillKind_Globals, + RD_WatchViewFillKind_ThreadLocals, + RD_WatchViewFillKind_Types, + RD_WatchViewFillKind_Procedures, + RD_WatchViewFillKind_COUNT +} +RD_WatchViewFillKind; + +typedef struct RD_WatchViewPoint RD_WatchViewPoint; +struct RD_WatchViewPoint +{ + S64 x; + EV_Key parent_key; + EV_Key key; +}; + +typedef struct RD_WatchViewTextEditState RD_WatchViewTextEditState; +struct RD_WatchViewTextEditState +{ + RD_WatchViewTextEditState *pt_hash_next; + RD_WatchViewPoint pt; + TxtPt cursor; + TxtPt mark; + U8 input_buffer[1024]; + U64 input_size; + U8 initial_buffer[1024]; + U64 initial_size; +}; + +typedef struct RD_WatchViewState RD_WatchViewState; +struct RD_WatchViewState +{ + B32 initialized; + + // rjf: fill kinds (way that the contents of the watch view are computed) + RD_WatchViewFillKind fill_kind; + + // rjf: column state + Arena *column_arena; + RD_WatchViewColumn *first_column; + RD_WatchViewColumn *last_column; + RD_WatchViewColumn *free_column; + U64 column_count; + + // rjf; table cursor state + RD_WatchViewPoint cursor; + RD_WatchViewPoint mark; + RD_WatchViewPoint next_cursor; + RD_WatchViewPoint next_mark; + + // rjf: text input state + Arena *text_edit_arena; + U64 text_edit_state_slots_count; + RD_WatchViewTextEditState dummy_text_edit_state; + RD_WatchViewTextEditState **text_edit_state_slots; + B32 text_editing; +}; + +//////////////////////////////// +//~ rjf: Code View Functions + +internal void rd_code_view_init(RD_CodeViewState *cv, RD_View *view); +internal void rd_code_view_cmds(RD_View *view, RD_CodeViewState *cv, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); +internal RD_CodeViewBuildResult rd_code_view_build(Arena *arena, RD_View *view, RD_CodeViewState *cv, RD_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); + +//////////////////////////////// +//~ rjf: Watch View Functions + +//- rjf: index -> column +internal RD_WatchViewColumn *rd_watch_view_column_from_x(RD_WatchViewState *wv, S64 index); + +//- rjf: watch view points <-> table coordinates +internal B32 rd_watch_view_point_match(RD_WatchViewPoint a, RD_WatchViewPoint b); +internal RD_WatchViewPoint rd_watch_view_point_from_tbl(EV_BlockList *blocks, Vec2S64 tbl); +internal Vec2S64 rd_tbl_from_watch_view_point(EV_BlockList *blocks, RD_WatchViewPoint pt); + +//- rjf: table coordinates -> strings +internal String8 rd_string_from_eval_viz_row_column(Arena *arena, EV_View *ev, EV_Row *row, RD_WatchViewColumn *col, B32 editable, U32 default_radix, FNT_Tag font, F32 font_size, F32 max_size_px); + +//- rjf: table coordinates -> text edit state +internal RD_WatchViewTextEditState *rd_watch_view_text_edit_state_from_pt(RD_WatchViewState *wv, RD_WatchViewPoint pt); + +//- rjf: watch view column state mutation +internal RD_WatchViewColumn *rd_watch_view_column_alloc_(RD_WatchViewState *wv, RD_WatchViewColumnKind kind, F32 pct, RD_WatchViewColumnParams *params); +#define rd_watch_view_column_alloc(wv, kind, pct, ...) rd_watch_view_column_alloc_((wv), (kind), (pct), &(RD_WatchViewColumnParams){.string = str8_zero(), __VA_ARGS__}) +internal void rd_watch_view_column_release(RD_WatchViewState *wv, RD_WatchViewColumn *col); + +//- rjf: watch view main hooks +internal void rd_watch_view_init(RD_WatchViewState *ewv, RD_View *view, RD_WatchViewFillKind fill_kind); +internal void rd_watch_view_build(RD_View *view, RD_WatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect); + +#endif // RADDBG_VIEWS_H diff --git a/src/dbg_frontend/dbg_frontend_widgets.c b/src/raddbg/raddbg_widgets.c similarity index 81% rename from src/dbg_frontend/dbg_frontend_widgets.c rename to src/raddbg/raddbg_widgets.c index a550fe07..f4dbdf99 100644 --- a/src/dbg_frontend/dbg_frontend_widgets.c +++ b/src/raddbg/raddbg_widgets.c @@ -5,7 +5,7 @@ //~ rjf: UI Widgets: Loading Overlay internal void -df_loading_overlay(Rng2F32 rect, F32 loading_t, U64 progress_v, U64 progress_v_target) +rd_loading_overlay(Rng2F32 rect, F32 loading_t, U64 progress_v, U64 progress_v_target) { if(loading_t >= 0.001f) { @@ -15,13 +15,13 @@ df_loading_overlay(Rng2F32 rect, F32 loading_t, U64 progress_v, U64 progress_v_t F32 height = ui_top_font_size() * 1.f; F32 min_thickness = ui_top_font_size()/2; F32 trail = ui_top_font_size() * 4; - F32 t = pow_f32(sin_f32((F32)df_state->time_in_seconds / 1.8f), 2.f); + F32 t = pow_f32(sin_f32((F32)rd_state->time_in_seconds / 1.8f), 2.f); F64 v = 1.f - abs_f32(0.5f - t); // rjf: colors - Vec4F32 bg_color = df_rgba_from_theme_color(DF_ThemeColor_BaseBackground); - Vec4F32 bd_color = df_rgba_from_theme_color(DF_ThemeColor_FloatingBorder); - Vec4F32 hl_color = df_rgba_from_theme_color(DF_ThemeColor_TextNeutral); + Vec4F32 bg_color = rd_rgba_from_theme_color(RD_ThemeColor_BaseBackground); + Vec4F32 bd_color = rd_rgba_from_theme_color(RD_ThemeColor_FloatingBorder); + Vec4F32 hl_color = rd_rgba_from_theme_color(RD_ThemeColor_TextNeutral); bg_color.w *= loading_t; bd_color.w *= loading_t; hl_color.w *= loading_t; @@ -92,22 +92,22 @@ df_loading_overlay(Rng2F32 rect, F32 loading_t, U64 progress_v, U64 progress_v_t //~ rjf: UI Widgets: Fancy Buttons internal void -df_cmd_binding_buttons(String8 name) +rd_cmd_binding_buttons(String8 name) { Temp scratch = scratch_begin(0, 0); - DF_BindingList bindings = df_bindings_from_name(scratch.arena, name); + RD_BindingList bindings = rd_bindings_from_name(scratch.arena, name); //- rjf: build buttons for each binding - for(DF_BindingNode *n = bindings.first; n != 0; n = n->next) + for(RD_BindingNode *n = bindings.first; n != 0; n = n->next) { - DF_Binding binding = n->binding; - B32 rebinding_active_for_this_binding = (df_state->bind_change_active && - str8_match(df_state->bind_change_cmd_name, name, 0) && - df_state->bind_change_binding.key == binding.key && - df_state->bind_change_binding.flags == binding.flags); + RD_Binding binding = n->binding; + B32 rebinding_active_for_this_binding = (rd_state->bind_change_active && + str8_match(rd_state->bind_change_cmd_name, name, 0) && + rd_state->bind_change_binding.key == binding.key && + rd_state->bind_change_binding.flags == binding.flags); //- rjf: grab all conflicts - String8List specs_with_binding = df_cmd_name_list_from_binding(scratch.arena, binding); + String8List specs_with_binding = rd_cmd_name_list_from_binding(scratch.arena, binding); B32 has_conflicts = 0; for(String8Node *n = specs_with_binding.first; n != 0; n = n->next) { @@ -144,13 +144,13 @@ df_cmd_binding_buttons(String8 name) MemoryCopyStruct(palette, ui_top_palette()); if(has_conflicts) { - palette->colors[UI_ColorCode_Text] = df_rgba_from_theme_color(DF_ThemeColor_TextNegative); - palette->colors[UI_ColorCode_TextWeak] = df_rgba_from_theme_color(DF_ThemeColor_TextNegative); + palette->colors[UI_ColorCode_Text] = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative); + palette->colors[UI_ColorCode_TextWeak] = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative); } if(rebinding_active_for_this_binding) { - palette->colors[UI_ColorCode_Border] = df_rgba_from_theme_color(DF_ThemeColor_Focus); - palette->colors[UI_ColorCode_Background] = df_rgba_from_theme_color(DF_ThemeColor_Focus); + palette->colors[UI_ColorCode_Border] = rd_rgba_from_theme_color(RD_ThemeColor_Focus); + palette->colors[UI_ColorCode_Background] = rd_rgba_from_theme_color(RD_ThemeColor_Focus); palette->colors[UI_ColorCode_Background].w *= 0.25f; } } @@ -173,7 +173,7 @@ df_cmd_binding_buttons(String8 name) UI_Signal sig = ui_signal_from_box(box); { // rjf: click => toggle activity - if(!df_state->bind_change_active && ui_clicked(sig)) + if(!rd_state->bind_change_active && ui_clicked(sig)) { if((binding.key == OS_Key_Esc || binding.key == OS_Key_Delete) && binding.flags == 0) { @@ -181,26 +181,26 @@ df_cmd_binding_buttons(String8 name) } else { - arena_clear(df_state->bind_change_arena); - df_state->bind_change_active = 1; - df_state->bind_change_cmd_name = push_str8_copy(df_state->bind_change_arena, name); - df_state->bind_change_binding = binding; + arena_clear(rd_state->bind_change_arena); + rd_state->bind_change_active = 1; + rd_state->bind_change_cmd_name = push_str8_copy(rd_state->bind_change_arena, name); + rd_state->bind_change_binding = binding; } } - else if(df_state->bind_change_active && ui_clicked(sig)) + else if(rd_state->bind_change_active && ui_clicked(sig)) { - df_state->bind_change_active = 0; + rd_state->bind_change_active = 0; } // rjf: hover w/ conflicts => show conflicts if(ui_hovering(sig) && has_conflicts) UI_Tooltip { - UI_PrefWidth(ui_children_sum(1)) df_error_label(str8_lit("This binding conflicts with those for:")); + UI_PrefWidth(ui_children_sum(1)) rd_error_label(str8_lit("This binding conflicts with those for:")); for(String8Node *n = specs_with_binding.first; n != 0; n = n->next) { if(!str8_match(n->string, name, 0)) { - DF_CmdKindInfo *info = df_cmd_kind_info_from_string(n->string); + RD_CmdKindInfo *info = rd_cmd_kind_info_from_string(n->string); ui_labelf("%S", info->display_name); } } @@ -211,16 +211,16 @@ df_cmd_binding_buttons(String8 name) if(rebinding_active_for_this_binding) UI_PrefWidth(ui_em(2.5f, 1.f)) UI_Palette(ui_build_palette(ui_top_palette(), - .background = df_rgba_from_theme_color(DF_ThemeColor_NegativePopButtonBackground), - .border = df_rgba_from_theme_color(DF_ThemeColor_NegativePopButtonBorder), - .text = df_rgba_from_theme_color(DF_ThemeColor_Text))) + .background = rd_rgba_from_theme_color(RD_ThemeColor_NegativePopButtonBackground), + .border = rd_rgba_from_theme_color(RD_ThemeColor_NegativePopButtonBorder), + .text = rd_rgba_from_theme_color(RD_ThemeColor_Text))) { ui_set_next_group_key(ui_key_zero()); - UI_Signal sig = df_icon_button(DF_IconKind_X, 0, str8_lit("###delete_binding")); + UI_Signal sig = rd_icon_button(RD_IconKind_X, 0, str8_lit("###delete_binding")); if(ui_clicked(sig)) { - df_unbind_name(name, binding); - df_state->bind_change_active = 0; + rd_unbind_name(name, binding); + rd_state->bind_change_active = 0; } } @@ -229,18 +229,18 @@ df_cmd_binding_buttons(String8 name) } //- rjf: build "add new binding" button - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) { UI_Palette *palette = ui_top_palette(); - B32 adding_new_binding = (df_state->bind_change_active && - str8_match(df_state->bind_change_cmd_name, name, 0) && - df_state->bind_change_binding.key == OS_Key_Null && - df_state->bind_change_binding.flags == 0); + B32 adding_new_binding = (rd_state->bind_change_active && + str8_match(rd_state->bind_change_cmd_name, name, 0) && + rd_state->bind_change_binding.key == OS_Key_Null && + rd_state->bind_change_binding.flags == 0); if(adding_new_binding) { palette = ui_build_palette(ui_top_palette()); - palette->colors[UI_ColorCode_Border] = df_rgba_from_theme_color(DF_ThemeColor_Focus); - palette->colors[UI_ColorCode_Background] = df_rgba_from_theme_color(DF_ThemeColor_Focus); + palette->colors[UI_ColorCode_Border] = rd_rgba_from_theme_color(RD_ThemeColor_Focus); + palette->colors[UI_ColorCode_Background] = rd_rgba_from_theme_color(RD_ThemeColor_Focus); palette->colors[UI_ColorCode_Background].w *= 0.25f; } ui_set_next_hover_cursor(OS_Cursor_HandPoint); @@ -254,20 +254,20 @@ df_cmd_binding_buttons(String8 name) UI_BoxFlag_DrawHotEffects| UI_BoxFlag_DrawBorder| UI_BoxFlag_DrawBackground, - "%S###add_binding", df_g_icon_kind_text_table[DF_IconKind_Add]); + "%S###add_binding", rd_icon_kind_text_table[RD_IconKind_Add]); UI_Signal sig = ui_signal_from_box(box); if(ui_clicked(sig)) { - if(!df_state->bind_change_active && ui_clicked(sig)) + if(!rd_state->bind_change_active && ui_clicked(sig)) { - arena_clear(df_state->bind_change_arena); - df_state->bind_change_active = 1; - df_state->bind_change_cmd_name = push_str8_copy(df_state->bind_change_arena, name); - MemoryZeroStruct(&df_state->bind_change_binding); + arena_clear(rd_state->bind_change_arena); + rd_state->bind_change_active = 1; + rd_state->bind_change_cmd_name = push_str8_copy(rd_state->bind_change_arena, name); + MemoryZeroStruct(&rd_state->bind_change_binding); } - else if(df_state->bind_change_active && ui_clicked(sig)) + else if(rd_state->bind_change_active && ui_clicked(sig)) { - df_state->bind_change_active = 0; + rd_state->bind_change_active = 0; } } } @@ -276,7 +276,7 @@ df_cmd_binding_buttons(String8 name) } internal UI_Signal -df_menu_bar_button(String8 string) +rd_menu_bar_button(String8 string) { ui_set_next_hover_cursor(OS_Cursor_HandPoint); UI_Box *box = ui_build_box_from_string(UI_BoxFlag_DrawText|UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawBackground|UI_BoxFlag_Clickable|UI_BoxFlag_DrawHotEffects, string); @@ -285,9 +285,9 @@ df_menu_bar_button(String8 string) } internal UI_Signal -df_cmd_spec_button(String8 name) +rd_cmd_spec_button(String8 name) { - DF_CmdKindInfo *info = df_cmd_kind_info_from_string(name); + RD_CmdKindInfo *info = rd_cmd_kind_info_from_string(name); ui_set_next_hover_cursor(OS_Cursor_HandPoint); ui_set_next_child_layout_axis(Axis2_X); UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_DrawBorder| @@ -298,15 +298,15 @@ df_cmd_spec_button(String8 name) "###cmd_%p", info); UI_Parent(box) UI_HeightFill UI_Padding(ui_em(1.f, 1.f)) { - DF_IconKind canonical_icon = info->icon_kind; - if(canonical_icon != DF_IconKind_Null) + RD_IconKind canonical_icon = info->icon_kind; + if(canonical_icon != RD_IconKind_Null) { - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) UI_PrefWidth(ui_em(2.f, 1.f)) UI_TextAlignment(UI_TextAlign_Center) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) { - ui_label(df_g_icon_kind_text_table[canonical_icon]); + ui_label(rd_icon_kind_text_table[canonical_icon]); } } UI_PrefWidth(ui_text_dim(10, 1.f)) @@ -322,7 +322,7 @@ df_cmd_spec_button(String8 name) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_FastpathCodepoint(0) { - df_cmd_binding_buttons(name); + rd_cmd_binding_buttons(name); } } } @@ -331,18 +331,18 @@ df_cmd_spec_button(String8 name) } internal void -df_cmd_list_menu_buttons(U64 count, String8 *cmd_names, U32 *fastpath_codepoints) +rd_cmd_list_menu_buttons(U64 count, String8 *cmd_names, U32 *fastpath_codepoints) { Temp scratch = scratch_begin(0, 0); for(U64 idx = 0; idx < count; idx += 1) { ui_set_next_fastpath_codepoint(fastpath_codepoints[idx]); - UI_Signal sig = df_cmd_spec_button(cmd_names[idx]); + UI_Signal sig = rd_cmd_spec_button(cmd_names[idx]); if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_RunCommand, .string = cmd_names[idx]); + rd_cmd(RD_CmdKind_RunCommand, .string = cmd_names[idx]); ui_ctx_menu_close(); - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Window *window = rd_window_from_handle(rd_regs()->window); window->menu_bar_focused = 0; } } @@ -350,7 +350,7 @@ df_cmd_list_menu_buttons(U64 count, String8 *cmd_names, U32 *fastpath_codepoints } internal UI_Signal -df_icon_button(DF_IconKind kind, FuzzyMatchRangeList *matches, String8 string) +rd_icon_button(RD_IconKind kind, FuzzyMatchRangeList *matches, String8 string) { String8 display_string = ui_display_part_from_key_string(string); ui_set_next_hover_cursor(OS_Cursor_HandPoint); @@ -372,11 +372,11 @@ df_icon_button(DF_IconKind kind, FuzzyMatchRangeList *matches, String8 string) ui_spacer(ui_em(1.f, 1.f)); } UI_TextAlignment(UI_TextAlign_Center) - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) UI_PrefWidth(ui_em(2.f, 1.f)) UI_PrefHeight(ui_pct(1, 0)) UI_FlagsAdd(UI_BoxFlag_DisableTextTrunc|UI_BoxFlag_DrawTextWeak) - ui_label(df_g_icon_kind_text_table[kind]); + ui_label(rd_icon_kind_text_table[kind]); if(display_string.size != 0) { UI_PrefWidth(ui_pct(1.f, 0.f)) @@ -402,35 +402,35 @@ df_icon_button(DF_IconKind kind, FuzzyMatchRangeList *matches, String8 string) } internal UI_Signal -df_icon_buttonf(DF_IconKind kind, FuzzyMatchRangeList *matches, char *fmt, ...) +rd_icon_buttonf(RD_IconKind kind, FuzzyMatchRangeList *matches, char *fmt, ...) { Temp scratch = scratch_begin(0, 0); va_list args; va_start(args, fmt); String8 string = push_str8fv(scratch.arena, fmt, args); va_end(args); - UI_Signal sig = df_icon_button(kind, matches, string); + UI_Signal sig = rd_icon_button(kind, matches, string); scratch_end(scratch); return sig; } internal void -df_entity_tooltips(DF_Entity *entity) +rd_entity_tooltips(RD_Entity *entity) { Temp scratch = scratch_begin(0, 0); - DF_Palette(DF_PaletteCode_Floating) switch(entity->kind) + RD_Palette(RD_PaletteCode_Floating) switch(entity->kind) { default:{}break; - case DF_EntityKind_File: + case RD_EntityKind_File: UI_Tooltip UI_PrefWidth(ui_text_dim(10, 1)) { - String8 full_path = df_full_path_from_entity(scratch.arena, entity); + String8 full_path = rd_full_path_from_entity(scratch.arena, entity); ui_label(full_path); }break; - case DF_EntityKind_Thread: UI_Flags(0) + case RD_EntityKind_Thread: UI_Flags(0) UI_Tooltip UI_PrefWidth(ui_text_dim(10, 1)) { - String8 display_string = df_display_string_from_entity(scratch.arena, entity); + String8 display_string = rd_display_string_from_entity(scratch.arena, entity); CTRL_Entity *entity_ctrl = ctrl_entity_from_handle(d_state->ctrl_entity_store, entity->ctrl_handle); U64 rip_vaddr = d_query_cached_rip_from_thread(entity_ctrl); Arch arch = entity_ctrl->arch; @@ -438,20 +438,20 @@ df_entity_tooltips(DF_Entity *entity) U32 pid_or_tid = entity->ctrl_id; if(display_string.size != 0) UI_PrefWidth(ui_children_sum(1)) UI_Row { - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & RD_EntityFlag_HasColor) { - ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_entity(entity))); + ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_entity(entity))); } UI_PrefWidth(ui_text_dim(10, 1)) ui_label(display_string); } { CTRL_Event stop_event = d_ctrl_last_stop_event(); - DF_Entity *stopper_thread = df_entity_from_ctrl_handle(stop_event.entity); + RD_Entity *stopper_thread = rd_entity_from_ctrl_handle(stop_event.entity); if(stopper_thread == entity) { ui_spacer(ui_em(1.5f, 1.f)); - DF_IconKind icon_kind = DF_IconKind_Null; - String8 explanation = df_stop_explanation_string_icon_from_ctrl_event(scratch.arena, &stop_event, &icon_kind); + RD_IconKind icon_kind = RD_IconKind_Null; + String8 explanation = rd_stop_explanation_string_icon_from_ctrl_event(scratch.arena, &stop_event, &icon_kind); if(explanation.size != 0) { UI_Palette *palette = ui_top_palette(); @@ -460,13 +460,13 @@ df_entity_tooltips(DF_Entity *entity) stop_event.cause == CTRL_EventCause_InterruptedByTrap || stop_event.cause == CTRL_EventCause_UserBreakpoint) { - palette = ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextNegative)); + palette = ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative)); } UI_PrefWidth(ui_children_sum(1)) UI_Row UI_Palette(palette) { UI_PrefWidth(ui_em(1.5f, 1.f)) - DF_Font(DF_FontSlot_Icons) - ui_label(df_g_icon_kind_text_table[icon_kind]); + RD_Font(RD_FontSlot_Icons) + ui_label(rd_icon_kind_text_table[icon_kind]); UI_PrefWidth(ui_text_dim(10, 1)) ui_label(explanation); } } @@ -503,18 +503,18 @@ df_entity_tooltips(DF_Entity *entity) { String8 name = {0}; name.str = rdi_string_from_idx(rdi, fin->inline_site->name_string_idx, &name.size); - DF_Font(DF_FontSlot_Code) UI_PrefWidth(ui_em(18.f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_labelf("0x%I64x", rip_vaddr); - DF_Font(DF_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_text_dim(10, 1)) ui_label(str8_lit("[inlined]")); + RD_Font(RD_FontSlot_Code) UI_PrefWidth(ui_em(18.f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_labelf("0x%I64x", rip_vaddr); + RD_Font(RD_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_text_dim(10, 1)) ui_label(str8_lit("[inlined]")); if(name.size != 0) { - DF_Font(DF_FontSlot_Code) UI_PrefWidth(ui_text_dim(10, 1)) + RD_Font(RD_FontSlot_Code) UI_PrefWidth(ui_text_dim(10, 1)) { - df_code_label(1.f, 0, df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol), name); + rd_code_label(1.f, 0, rd_rgba_from_theme_color(RD_ThemeColor_CodeSymbol), name); } } else { - DF_Font(DF_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_text_dim(10, 1)) ui_labelf("[??? in %S]", module_name); + RD_Font(RD_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_text_dim(10, 1)) ui_labelf("[??? in %S]", module_name); } } @@ -523,79 +523,79 @@ df_entity_tooltips(DF_Entity *entity) { String8 name = {0}; name.str = rdi_name_from_procedure(rdi, procedure, &name.size); - DF_Font(DF_FontSlot_Code) UI_PrefWidth(ui_em(18.f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_labelf("0x%I64x", rip_vaddr); + RD_Font(RD_FontSlot_Code) UI_PrefWidth(ui_em(18.f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_labelf("0x%I64x", rip_vaddr); if(name.size != 0) { - DF_Font(DF_FontSlot_Code) UI_PrefWidth(ui_text_dim(10, 1)) + RD_Font(RD_FontSlot_Code) UI_PrefWidth(ui_text_dim(10, 1)) { - df_code_label(1.f, 0, df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol), name); + rd_code_label(1.f, 0, rd_rgba_from_theme_color(RD_ThemeColor_CodeSymbol), name); } } else { - DF_Font(DF_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_text_dim(10, 1)) ui_labelf("[??? in %S]", module_name); + RD_Font(RD_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_PrefWidth(ui_text_dim(10, 1)) ui_labelf("[??? in %S]", module_name); } } } di_scope_close(di_scope); }break; - case DF_EntityKind_Breakpoint: UI_Flags(0) + case RD_EntityKind_Breakpoint: UI_Flags(0) UI_Tooltip UI_PrefWidth(ui_text_dim(10, 1)) { - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & RD_EntityFlag_HasColor) { - ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_entity(entity))); + ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_entity(entity))); } - String8 display_string = df_display_string_from_entity(scratch.arena, entity); + String8 display_string = rd_display_string_from_entity(scratch.arena, entity); UI_PrefWidth(ui_text_dim(10, 1)) ui_label(display_string); UI_PrefWidth(ui_children_sum(1)) UI_Row { - String8 stop_condition = df_entity_child_from_kind(entity, DF_EntityKind_Condition)->string; + String8 stop_condition = rd_entity_child_from_kind(entity, RD_EntityKind_Condition)->string; if(stop_condition.size == 0) { stop_condition = str8_lit("true"); } UI_PrefWidth(ui_em(12.f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_labelf("Stop Condition: "); - UI_PrefWidth(ui_text_dim(10, 1)) DF_Font(DF_FontSlot_Code) df_code_label(1.f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), stop_condition); + UI_PrefWidth(ui_text_dim(10, 1)) RD_Font(RD_FontSlot_Code) rd_code_label(1.f, 1, rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault), stop_condition); } UI_PrefWidth(ui_children_sum(1)) UI_Row { U64 hit_count = entity->u64; String8 hit_count_text = str8_from_u64(scratch.arena, hit_count, 10, 0, 0); UI_PrefWidth(ui_em(12.f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) ui_labelf("Hit Count: "); - UI_PrefWidth(ui_text_dim(10, 1)) DF_Font(DF_FontSlot_Code) df_code_label(1.f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), hit_count_text); + UI_PrefWidth(ui_text_dim(10, 1)) RD_Font(RD_FontSlot_Code) rd_code_label(1.f, 1, rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault), hit_count_text); } }break; - case DF_EntityKind_WatchPin: - DF_Font(DF_FontSlot_Code) + case RD_EntityKind_WatchPin: + RD_Font(RD_FontSlot_Code) UI_Tooltip UI_PrefWidth(ui_text_dim(10, 1)) { - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & RD_EntityFlag_HasColor) { - ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_entity(entity))); + ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_entity(entity))); } - String8 display_string = df_display_string_from_entity(scratch.arena, entity); - UI_PrefWidth(ui_text_dim(10, 1)) df_code_label(1.f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), display_string); + String8 display_string = rd_display_string_from_entity(scratch.arena, entity); + UI_PrefWidth(ui_text_dim(10, 1)) rd_code_label(1.f, 1, rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault), display_string); }break; } scratch_end(scratch); } internal UI_Signal -df_entity_desc_button(DF_Entity *entity, FuzzyMatchRangeList *name_matches, String8 fuzzy_query, B32 is_implicit) +rd_entity_desc_button(RD_Entity *entity, FuzzyMatchRangeList *name_matches, String8 fuzzy_query, B32 is_implicit) { ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); UI_Palette *palette = ui_top_palette(); - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == RD_EntityKind_Thread) { CTRL_Event stop_event = d_ctrl_last_stop_event(); CTRL_Entity *entity_ctrl = ctrl_entity_from_handle(d_state->ctrl_entity_store, entity->ctrl_handle); CTRL_Entity *stopped_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, stop_event.entity); - CTRL_Entity *selected_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_base_regs()->thread); + CTRL_Entity *selected_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_base_regs()->thread); if(selected_thread == entity_ctrl) { - palette = df_palette_from_code(DF_PaletteCode_NeutralPopButton); + palette = rd_palette_from_code(RD_PaletteCode_NeutralPopButton); } if(stopped_thread == entity_ctrl && (stop_event.cause == CTRL_EventCause_UserBreakpoint || @@ -603,16 +603,16 @@ df_entity_desc_button(DF_Entity *entity, FuzzyMatchRangeList *name_matches, Stri stop_event.cause == CTRL_EventCause_InterruptedByTrap || stop_event.cause == CTRL_EventCause_InterruptedByHalt)) { - palette = df_palette_from_code(DF_PaletteCode_NegativePopButton); + palette = rd_palette_from_code(RD_PaletteCode_NegativePopButton); } } - if(entity->cfg_src == DF_CfgSrc_CommandLine) + if(entity->cfg_src == RD_CfgSrc_CommandLine) { - palette = df_palette_from_code(DF_PaletteCode_NeutralPopButton); + palette = rd_palette_from_code(RD_PaletteCode_NeutralPopButton); } - else if(entity->kind == DF_EntityKind_Target && !entity->disabled) + else if(entity->kind == RD_EntityKind_Target && !entity->disabled) { - palette = df_palette_from_code(DF_PaletteCode_NeutralPopButton); + palette = rd_palette_from_code(RD_PaletteCode_NeutralPopButton); } ui_set_next_palette(palette); ui_set_next_hover_cursor(OS_Cursor_HandPoint); @@ -626,32 +626,32 @@ df_entity_desc_button(DF_Entity *entity, FuzzyMatchRangeList *name_matches, Stri //- rjf: build contents UI_Parent(box) UI_PrefWidth(ui_text_dim(10, 0)) UI_Padding(ui_em(1.f, 1.f)) { - DF_EntityKindFlags kind_flags = d_entity_kind_flags_table[entity->kind]; - DF_IconKind icon = df_entity_kind_icon_kind_table[entity->kind]; + RD_EntityKindFlags kind_flags = rd_entity_kind_flags_table[entity->kind]; + RD_IconKind icon = rd_entity_kind_icon_kind_table[entity->kind]; Vec4F32 entity_color = palette->colors[UI_ColorCode_Text]; Vec4F32 entity_color_weak = palette->colors[UI_ColorCode_TextWeak]; - if(entity->flags & DF_EntityFlag_HasColor) + if(entity->flags & RD_EntityFlag_HasColor) { - entity_color = df_rgba_from_entity(entity); + entity_color = rd_rgba_from_entity(entity); entity_color_weak = entity_color; entity_color_weak.w *= 0.5f; } UI_TextAlignment(UI_TextAlign_Center) - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) UI_PrefWidth(ui_em(1.875f, 1.f)) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - ui_label(df_g_icon_kind_text_table[icon]); - if(entity->cfg_src == DF_CfgSrc_CommandLine) + ui_label(rd_icon_kind_text_table[icon]); + if(entity->cfg_src == RD_CfgSrc_CommandLine) { UI_TextAlignment(UI_TextAlign_Center) UI_PrefWidth(ui_em(1.875f, 1.f)) { UI_Box *info_box = &ui_g_nil_box; - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) { - info_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_DrawTextWeak|UI_BoxFlag_Clickable, "%S###%p_temp_info", df_g_icon_kind_text_table[DF_IconKind_Info], entity); + info_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_DrawTextWeak|UI_BoxFlag_Clickable, "%S###%p_temp_info", rd_icon_kind_text_table[RD_IconKind_Info], entity); } UI_Signal info_sig = ui_signal_from_box(info_box); if(ui_hovering(info_sig)) UI_Tooltip @@ -660,12 +660,12 @@ df_entity_desc_button(DF_Entity *entity, FuzzyMatchRangeList *name_matches, Stri } } } - String8 label = df_display_string_from_entity(scratch.arena, entity); + String8 label = rd_display_string_from_entity(scratch.arena, entity); UI_Palette(ui_build_palette(ui_top_palette(), .text = entity_color)) - DF_Font(kind_flags&DF_EntityKindFlag_NameIsCode ? DF_FontSlot_Code : DF_FontSlot_Main) - UI_Flags((entity->kind == DF_EntityKind_Thread || - entity->kind == DF_EntityKind_Breakpoint || - entity->kind == DF_EntityKind_WatchPin) + RD_Font(kind_flags&RD_EntityKindFlag_NameIsCode ? RD_FontSlot_Code : RD_FontSlot_Main) + UI_Flags((entity->kind == RD_EntityKind_Thread || + entity->kind == RD_EntityKind_Breakpoint || + entity->kind == RD_EntityKind_WatchPin) ? UI_BoxFlag_DisableTruncatedHover : 0) { @@ -675,19 +675,19 @@ df_entity_desc_button(DF_Entity *entity, FuzzyMatchRangeList *name_matches, Stri ui_box_equip_fuzzy_match_ranges(label_sig.box, name_matches); } } - if(entity->kind == DF_EntityKind_Target) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_FontSize(ui_top_font_size()*0.95f) + if(entity->kind == RD_EntityKind_Target) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_FontSize(ui_top_font_size()*0.95f) { - DF_Entity *args = df_entity_child_from_kind(entity, DF_EntityKind_Arguments); + RD_Entity *args = rd_entity_child_from_kind(entity, RD_EntityKind_Arguments); ui_label(args->string); } - if(kind_flags & DF_EntityKindFlag_CanEnable && entity->disabled) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_FontSize(ui_top_font_size()*0.95f) UI_HeightFill + if(kind_flags & RD_EntityKindFlag_CanEnable && entity->disabled) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_FontSize(ui_top_font_size()*0.95f) UI_HeightFill { ui_label(str8_lit("(Disabled)")); } - if(entity->kind == DF_EntityKind_Thread) + if(entity->kind == RD_EntityKind_Thread) UI_FontSize(ui_top_font_size()*0.75f) - DF_Font(DF_FontSlot_Code) - UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol))) + RD_Font(RD_FontSlot_Code) + UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_CodeSymbol))) UI_Flags(UI_BoxFlag_DisableTruncatedHover) { CTRL_Entity *entity_ctrl = ctrl_entity_from_handle(d_state->ctrl_entity_store, entity->ctrl_handle); @@ -733,33 +733,33 @@ df_entity_desc_button(DF_Entity *entity, FuzzyMatchRangeList *name_matches, Stri //- rjf: do interaction on main box UI_Signal sig = ui_signal_from_box(box); { - if(ui_hovering(sig) && !df_drag_is_active()) + if(ui_hovering(sig) && !rd_drag_is_active()) { - df_entity_tooltips(entity); + rd_entity_tooltips(entity); } // rjf: click => fastpath for this entity if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_EntityRefFastPath, .entity = df_handle_from_entity(entity)); + rd_cmd(RD_CmdKind_EntityRefFastPath, .entity = rd_handle_from_entity(entity)); } // rjf: right-click => context menu for this entity else if(ui_right_clicked(sig)) { - D_Handle handle = df_handle_from_entity(entity); - DF_Window *window = df_window_from_handle(df_regs()->window); - ui_ctx_menu_open(df_state->entity_ctx_menu_key, sig.box->key, v2f32(0, sig.box->rect.y1 - sig.box->rect.y0)); + RD_Handle handle = rd_handle_from_entity(entity); + RD_Window *window = rd_window_from_handle(rd_regs()->window); + ui_ctx_menu_open(rd_state->entity_ctx_menu_key, sig.box->key, v2f32(0, sig.box->rect.y1 - sig.box->rect.y0)); window->entity_ctx_menu_entity = handle; } // rjf: drag+drop else if(ui_dragging(sig) && !contains_2f32(box->rect, ui_mouse())) { - DF_DragDropPayload payload = {0}; + RD_DragDropPayload payload = {0}; payload.key = box->key; - payload.entity = df_handle_from_entity(entity); - df_drag_begin(&payload); + payload.entity = rd_handle_from_entity(entity); + rd_drag_begin(&payload); } } scratch_end(scratch); @@ -768,7 +768,7 @@ df_entity_desc_button(DF_Entity *entity, FuzzyMatchRangeList *name_matches, Stri } internal void -df_src_loc_button(String8 file_path, TxtPt point) +rd_src_loc_button(String8 file_path, TxtPt point) { Temp scratch = scratch_begin(0, 0); String8 filename = str8_skip_last_slash(file_path); @@ -786,19 +786,19 @@ df_src_loc_button(String8 file_path, TxtPt point) // rjf: build contents UI_Parent(box) UI_PrefWidth(ui_text_dim(10, 0)) { - DF_IconKind icon = DF_IconKind_FileOutline; + RD_IconKind icon = RD_IconKind_FileOutline; UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_TextAlignment(UI_TextAlign_Center) - DF_Font(DF_FontSlot_Icons) - UI_FontSize(df_font_size_from_slot(DF_FontSlot_Icons)) - ui_label(df_g_icon_kind_text_table[icon]); + RD_Font(RD_FontSlot_Icons) + UI_FontSize(rd_font_size_from_slot(RD_FontSlot_Icons)) + ui_label(rd_icon_kind_text_table[icon]); ui_labelf("%S:%I64d:%I64d", filename, point.line, point.column); } // rjf: click => find code location if(ui_clicked(sig)) { - df_cmd(DF_CmdKind_FindCodeLocation, .file_path = file_path, .cursor = point); + rd_cmd(RD_CmdKind_FindCodeLocation, .file_path = file_path, .cursor = point); } // rjf: hover => show full path @@ -812,8 +812,8 @@ df_src_loc_button(String8 file_path, TxtPt point) //////////////////////////////// //~ rjf: UI Widgets: Text View -typedef struct DF_ThreadBoxDrawExtData DF_ThreadBoxDrawExtData; -struct DF_ThreadBoxDrawExtData +typedef struct RD_ThreadBoxDrawExtData RD_ThreadBoxDrawExtData; +struct RD_ThreadBoxDrawExtData { Vec4F32 thread_color; F32 progress_t; @@ -824,9 +824,9 @@ struct DF_ThreadBoxDrawExtData B32 do_glow; }; -internal UI_BOX_CUSTOM_DRAW(df_thread_box_draw_extensions) +internal UI_BOX_CUSTOM_DRAW(rd_thread_box_draw_extensions) { - DF_ThreadBoxDrawExtData *u = (DF_ThreadBoxDrawExtData *)box->custom_draw_user_data; + RD_ThreadBoxDrawExtData *u = (RD_ThreadBoxDrawExtData *)box->custom_draw_user_data; // rjf: draw line before next-to-execute line if(u->do_lines) @@ -871,18 +871,18 @@ internal UI_BOX_CUSTOM_DRAW(df_thread_box_draw_extensions) if(u->is_frozen) { F32 lock_icon_off = ui_top_font_size()*0.2f; - Vec4F32 lock_icon_color = df_rgba_from_theme_color(DF_ThemeColor_TextNegative); - dr_text(df_font_from_slot(DF_FontSlot_Icons), + Vec4F32 lock_icon_color = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative); + dr_text(rd_font_from_slot(RD_FontSlot_Icons), box->font_size, 0, 0, FNT_RasterFlag_Smooth, v2f32((box->rect.x0 + box->rect.x1)/2 + lock_icon_off/2, box->rect.y0 + lock_icon_off/2), lock_icon_color, - df_g_icon_kind_text_table[DF_IconKind_Locked]); + rd_icon_kind_text_table[RD_IconKind_Locked]); } } -typedef struct DF_BreakpointBoxDrawExtData DF_BreakpointBoxDrawExtData; -struct DF_BreakpointBoxDrawExtData +typedef struct RD_BreakpointBoxDrawExtData RD_BreakpointBoxDrawExtData; +struct RD_BreakpointBoxDrawExtData { Vec4F32 color; F32 alive_t; @@ -891,9 +891,9 @@ struct DF_BreakpointBoxDrawExtData B32 do_glow; }; -internal UI_BOX_CUSTOM_DRAW(df_bp_box_draw_extensions) +internal UI_BOX_CUSTOM_DRAW(rd_bp_box_draw_extensions) { - DF_BreakpointBoxDrawExtData *u = (DF_BreakpointBoxDrawExtData *)box->custom_draw_user_data; + RD_BreakpointBoxDrawExtData *u = (RD_BreakpointBoxDrawExtData *)box->custom_draw_user_data; // rjf: draw line before next-to-execute line if(u->do_lines) @@ -925,7 +925,7 @@ internal UI_BOX_CUSTOM_DRAW(df_bp_box_draw_extensions) if(u->remap_px_delta != 0) { F32 remap_px_delta = u->remap_px_delta; - F32 circle_advance = fnt_dim_from_tag_size_string(box->font, box->font_size, 0, 0, df_g_icon_kind_text_table[DF_IconKind_CircleFilled]).x; + F32 circle_advance = fnt_dim_from_tag_size_string(box->font, box->font_size, 0, 0, rd_icon_kind_text_table[RD_IconKind_CircleFilled]).x; Vec2F32 bp_text_pos = ui_box_text_position(box); Vec2F32 bp_center = v2f32(bp_text_pos.x + circle_advance/2, bp_text_pos.y); FNT_Metrics icon_font_metrics = fnt_metrics_from_tag_size(box->font, box->font_size); @@ -942,19 +942,19 @@ internal UI_BOX_CUSTOM_DRAW(df_bp_box_draw_extensions) v2f32(bp_text_pos.x, bp_center.y + remap_px_delta), remap_color, - df_g_icon_kind_text_table[DF_IconKind_CircleFilled]); + rd_icon_kind_text_table[RD_IconKind_CircleFilled]); } } -internal DF_CodeSliceSignal -df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *preferred_column, String8 string) +internal RD_CodeSliceSignal +rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *preferred_column, String8 string) { - DF_CodeSliceSignal result = {0}; + RD_CodeSliceSignal result = {0}; ProfBeginFunction(); Temp scratch = scratch_begin(0, 0); - CTRL_Entity *selected_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->thread); + CTRL_Entity *selected_thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->thread); CTRL_Entity *selected_thread_process = ctrl_entity_ancestor_from_kind(selected_thread, CTRL_EntityKind_Process); - U64 selected_thread_rip_unwind_vaddr = d_query_cached_rip_from_thread_unwind(selected_thread, df_regs()->unwind_count); + U64 selected_thread_rip_unwind_vaddr = d_query_cached_rip_from_thread_unwind(selected_thread, rd_regs()->unwind_count); CTRL_Entity *selected_thread_module = ctrl_module_from_process_vaddr(selected_thread_process, selected_thread_rip_unwind_vaddr); F32 selected_thread_module_alive_t = ui_anim(ui_key_from_stringf(ui_key_zero(), "###module_alive_t_%p", selected_thread_module), 1.f); CTRL_Event stop_event = d_ctrl_last_stop_event(); @@ -963,13 +963,13 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe B32 ctrlified = (os_get_event_flags() & OS_EventFlag_Ctrl); Vec4F32 code_line_bgs[] = { - df_rgba_from_theme_color(DF_ThemeColor_LineInfoBackground0), - df_rgba_from_theme_color(DF_ThemeColor_LineInfoBackground1), - df_rgba_from_theme_color(DF_ThemeColor_LineInfoBackground2), - df_rgba_from_theme_color(DF_ThemeColor_LineInfoBackground3), + rd_rgba_from_theme_color(RD_ThemeColor_LineInfoBackground0), + rd_rgba_from_theme_color(RD_ThemeColor_LineInfoBackground1), + rd_rgba_from_theme_color(RD_ThemeColor_LineInfoBackground2), + rd_rgba_from_theme_color(RD_ThemeColor_LineInfoBackground3), }; - UI_Palette *margin_palette = df_palette_from_code(DF_PaletteCode_Floating); - UI_Palette *margin_contents_palette = ui_build_palette(df_palette_from_code(DF_PaletteCode_Floating)); + UI_Palette *margin_palette = rd_palette_from_code(RD_PaletteCode_Floating); + UI_Palette *margin_contents_palette = ui_build_palette(rd_palette_from_code(RD_PaletteCode_Floating)); margin_contents_palette->background = v4f32(0, 0, 0, 0); F32 line_num_padding_px = ui_top_font_size()*1.f; @@ -1009,7 +1009,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { if(n->v == stopper_thread && (stop_event.cause == CTRL_EventCause_InterruptedByTrap || stop_event.cause == CTRL_EventCause_InterruptedByException)) { - line_bg_colors[line_idx] = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlayError); + line_bg_colors[line_idx] = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlayError); } } } @@ -1019,7 +1019,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe //- rjf: build priority margin // UI_Box *priority_margin_container_box = &ui_g_nil_box; - if(params->flags & DF_CodeSliceFlag_PriorityMargin) UI_Focus(UI_FocusKind_Off) UI_Parent(top_container_box) UI_Palette(margin_palette) ProfScope("build priority margins") + if(params->flags & RD_CodeSliceFlag_PriorityMargin) UI_Focus(UI_FocusKind_Off) UI_Parent(top_container_box) UI_Palette(margin_palette) ProfScope("build priority margins") { if(params->margin_float_off_px != 0) { @@ -1031,7 +1031,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe ui_set_next_pref_width(ui_px(params->priority_margin_width_px, 1)); ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f)); ui_set_next_child_layout_axis(Axis2_Y); - priority_margin_container_box = ui_build_box_from_string(UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable), str8_lit("priority_margin_container")); + priority_margin_container_box = ui_build_box_from_string(UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable), str8_lit("priority_margin_container")); UI_Parent(priority_margin_container_box) UI_PrefHeight(ui_px(params->line_height_px, 1.f)) UI_Palette(margin_contents_palette) { U64 line_idx = 0; @@ -1041,7 +1041,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { CTRL_EntityList line_ips = params->line_ips[line_idx]; ui_set_next_hover_cursor(OS_Cursor_HandPoint); - UI_Box *line_margin_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable)|UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawActiveEffects, "line_margin_%I64x", line_num); + UI_Box *line_margin_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)|UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawActiveEffects, "line_margin_%I64x", line_num); UI_Parent(line_margin_box) { //- rjf: build margin thread ip ui @@ -1053,7 +1053,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { continue; } - U64 unwind_count = (thread == selected_thread) ? df_regs()->unwind_count : 0; + U64 unwind_count = (thread == selected_thread) ? rd_regs()->unwind_count : 0; U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count); CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); CTRL_Entity *module = ctrl_module_from_process_vaddr(process, thread_rip_vaddr); @@ -1061,24 +1061,24 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe U64 thread_rip_voff = ctrl_voff_from_vaddr(module, thread_rip_vaddr); // rjf: thread info => color - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Text); + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_Text); { if(unwind_count != 0) { - color = df_rgba_from_theme_color(DF_ThemeColor_ThreadUnwound); + color = rd_rgba_from_theme_color(RD_ThemeColor_ThreadUnwound); } else if(thread == stopper_thread && (stop_event.cause == CTRL_EventCause_InterruptedByHalt || stop_event.cause == CTRL_EventCause_InterruptedByTrap || stop_event.cause == CTRL_EventCause_InterruptedByException)) { - color = df_rgba_from_theme_color(DF_ThemeColor_ThreadError); + color = rd_rgba_from_theme_color(RD_ThemeColor_ThreadError); } else if(thread->rgba != 0) { color = rgba_from_u32(thread->rgba); } - if(d_ctrl_targets_running() && d_ctrl_last_run_frame_idx() < df_state->frame_index) + if(d_ctrl_targets_running() && d_ctrl_last_run_frame_idx() < rd_state->frame_index) { color.w *= 0.5f; } @@ -1090,7 +1090,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe // rjf: build thread box ui_set_next_hover_cursor(OS_Cursor_UpDownLeftRight); - ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons)); + ui_set_next_font(rd_font_from_slot(RD_FontSlot_Icons)); ui_set_next_font_size(params->font_size); ui_set_next_text_raster_flags(FNT_RasterFlag_Smooth); ui_set_next_pref_width(ui_pct(1, 0)); @@ -1099,22 +1099,22 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe ui_set_next_text_alignment(UI_TextAlign_Center); UI_Key thread_box_key = ui_key_from_stringf(top_container_box->key, "###ip_%I64x_%p", line_num, thread); UI_Box *thread_box = ui_build_box_from_key(UI_BoxFlag_DisableTextTrunc| - UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable)| + UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)| UI_BoxFlag_DrawText, thread_box_key); - ui_box_equip_display_string(thread_box, df_g_icon_kind_text_table[DF_IconKind_RightArrow]); + ui_box_equip_display_string(thread_box, rd_icon_kind_text_table[RD_IconKind_RightArrow]); UI_Signal thread_sig = ui_signal_from_box(thread_box); // rjf: custom draw { - DF_ThreadBoxDrawExtData *u = push_array(ui_build_arena(), DF_ThreadBoxDrawExtData, 1); + RD_ThreadBoxDrawExtData *u = push_array(ui_build_arena(), RD_ThreadBoxDrawExtData, 1); u->thread_color = color; u->alive_t = ui_anim(ui_key_from_stringf(top_container_box->key, "###thread_alive_t_%p", thread), 1.f); u->is_selected = (thread == selected_thread); u->is_frozen = !!thread->is_frozen; - u->do_lines = df_setting_val_from_code(DF_SettingCode_ThreadLines).s32; - u->do_glow = df_setting_val_from_code(DF_SettingCode_ThreadGlow).s32; - ui_box_equip_custom_draw(thread_box, df_thread_box_draw_extensions, u); + u->do_lines = rd_setting_val_from_code(RD_SettingCode_ThreadLines).s32; + u->do_glow = rd_setting_val_from_code(RD_SettingCode_ThreadGlow).s32; + ui_box_equip_custom_draw(thread_box, rd_thread_box_draw_extensions, u); // rjf: fill out progress t (progress into range of current line's // voff range) @@ -1143,18 +1143,18 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe } // rjf: hover tooltips - if(ui_hovering(thread_sig) && !df_drag_is_active()) + if(ui_hovering(thread_sig) && !rd_drag_is_active()) { - // TODO(rjf): @msgs df_entity_tooltips(thread); set rich hover info here!!! + // TODO(rjf): @msgs rd_entity_tooltips(thread); set rich hover info here!!! } // rjf: ip right-click menu if(ui_right_clicked(thread_sig)) { // TODO(rjf): @msgs top-level regs-based ctx menu here!!!! - // D_Handle handle = df_handle_from_entity(thread); - // ui_ctx_menu_open(df_state->entity_ctx_menu_key, thread_box->key, v2f32(0, thread_box->rect.y1-thread_box->rect.y0)); - // DF_Window *window = df_window_from_handle(df_regs()->window); + // RD_Handle handle = rd_handle_from_entity(thread); + // ui_ctx_menu_open(rd_state->entity_ctx_menu_key, thread_box->key, v2f32(0, thread_box->rect.y1-thread_box->rect.y0)); + // RD_Window *window = rd_window_from_handle(rd_regs()->window); // window->entity_ctx_menu_entity = handle; } @@ -1162,10 +1162,10 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe if(ui_dragging(thread_sig) && !contains_2f32(thread_box->rect, ui_mouse())) { // TODO(rjf): @msgs top-level regs-based drag/drop here!!! - // DF_DragDropPayload payload = {0}; + // RD_DragDropPayload payload = {0}; // payload.key = thread_box->key; - // payload.entity = df_handle_from_entity(thread); - // df_drag_begin(&payload); + // payload.entity = rd_handle_from_entity(thread); + // rd_drag_begin(&payload); } } } @@ -1177,7 +1177,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe //- rjf: build catchall margin // UI_Box *catchall_margin_container_box = &ui_g_nil_box; - if(params->flags & DF_CodeSliceFlag_CatchallMargin) UI_Focus(UI_FocusKind_Off) UI_Palette(margin_palette) UI_Parent(top_container_box) ProfScope("build catchall margins") + if(params->flags & RD_CodeSliceFlag_CatchallMargin) UI_Focus(UI_FocusKind_Off) UI_Palette(margin_palette) UI_Parent(top_container_box) ProfScope("build catchall margins") { if(params->margin_float_off_px != 0) { @@ -1189,7 +1189,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe ui_set_next_pref_width(ui_px(params->catchall_margin_width_px, 1)); ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f)); ui_set_next_child_layout_axis(Axis2_Y); - catchall_margin_container_box = ui_build_box_from_string(UI_BoxFlag_DrawSideLeft|UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable), str8_lit("catchall_margin_container")); + catchall_margin_container_box = ui_build_box_from_string(UI_BoxFlag_DrawSideLeft|UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable), str8_lit("catchall_margin_container")); UI_Parent(catchall_margin_container_box) UI_PrefHeight(ui_px(params->line_height_px, 1.f)) UI_Palette(margin_contents_palette) { U64 line_idx = 0; @@ -1198,10 +1198,10 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe line_num += 1, line_idx += 1) { CTRL_EntityList line_ips = params->line_ips[line_idx]; - DF_EntityList line_bps = params->line_bps[line_idx]; - DF_EntityList line_pins = params->line_pins[line_idx]; + RD_EntityList line_bps = params->line_bps[line_idx]; + RD_EntityList line_pins = params->line_pins[line_idx]; ui_set_next_hover_cursor(OS_Cursor_HandPoint); - UI_Box *line_margin_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable)|UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawActiveEffects, "line_margin_%I64x", line_num); + UI_Box *line_margin_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)|UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawActiveEffects, "line_margin_%I64x", line_num); UI_Parent(line_margin_box) { //- rjf: build margin thread ip ui @@ -1213,7 +1213,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { continue; } - U64 unwind_count = (thread == selected_thread) ? df_regs()->unwind_count : 0; + U64 unwind_count = (thread == selected_thread) ? rd_regs()->unwind_count : 0; U64 thread_rip_vaddr = d_query_cached_rip_from_thread_unwind(thread, unwind_count); CTRL_Entity *process = ctrl_entity_ancestor_from_kind(thread, CTRL_EntityKind_Process); CTRL_Entity *module = ctrl_module_from_process_vaddr(process, thread_rip_vaddr); @@ -1225,20 +1225,20 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { if(unwind_count != 0) { - color = df_rgba_from_theme_color(DF_ThemeColor_ThreadUnwound); + color = rd_rgba_from_theme_color(RD_ThemeColor_ThreadUnwound); } else if(thread == stopper_thread && (stop_event.cause == CTRL_EventCause_InterruptedByHalt || stop_event.cause == CTRL_EventCause_InterruptedByTrap || stop_event.cause == CTRL_EventCause_InterruptedByException)) { - color = df_rgba_from_theme_color(DF_ThemeColor_ThreadError); + color = rd_rgba_from_theme_color(RD_ThemeColor_ThreadError); } else if(thread->rgba != 0) { color = rgba_from_u32(thread->rgba); } - if(d_ctrl_targets_running() && d_ctrl_last_run_frame_idx() < df_state->frame_index) + if(d_ctrl_targets_running() && d_ctrl_last_run_frame_idx() < rd_state->frame_index) { color.w *= 0.5f; } @@ -1250,7 +1250,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe // rjf: build thread box ui_set_next_hover_cursor(OS_Cursor_UpDownLeftRight); - ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons)); + ui_set_next_font(rd_font_from_slot(RD_FontSlot_Icons)); ui_set_next_font_size(params->font_size); ui_set_next_text_raster_flags(FNT_RasterFlag_Smooth); ui_set_next_pref_width(ui_pct(1, 0)); @@ -1259,24 +1259,24 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe ui_set_next_text_alignment(UI_TextAlign_Center); UI_Key thread_box_key = ui_key_from_stringf(top_container_box->key, "###ip_%I64x_catchall_%p", line_num, thread); UI_Box *thread_box = ui_build_box_from_key(UI_BoxFlag_DisableTextTrunc| - UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable)| + UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)| UI_BoxFlag_DrawText, thread_box_key); - ui_box_equip_display_string(thread_box, df_g_icon_kind_text_table[DF_IconKind_RightArrow]); + ui_box_equip_display_string(thread_box, rd_icon_kind_text_table[RD_IconKind_RightArrow]); UI_Signal thread_sig = ui_signal_from_box(thread_box); // rjf: custom draw { - DF_ThreadBoxDrawExtData *u = push_array(ui_build_arena(), DF_ThreadBoxDrawExtData, 1); + RD_ThreadBoxDrawExtData *u = push_array(ui_build_arena(), RD_ThreadBoxDrawExtData, 1); u->thread_color = color; u->alive_t = ui_anim(ui_key_from_stringf(top_container_box->key, "###thread_alive_t_%p", thread), 1.f); u->is_selected = (thread == selected_thread); u->is_frozen = !!thread->is_frozen; - ui_box_equip_custom_draw(thread_box, df_thread_box_draw_extensions, u); + ui_box_equip_custom_draw(thread_box, rd_thread_box_draw_extensions, u); // rjf: fill out progress t (progress into range of current line's // voff range) - if(df_regs()->file_path.size != 0 && params->line_infos[line_idx].first != 0) + if(rd_regs()->file_path.size != 0 && params->line_infos[line_idx].first != 0) { D_LineList *lines = ¶ms->line_infos[line_idx]; D_Line *line = 0; @@ -1301,25 +1301,25 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe } // rjf: hover tooltips - if(ui_hovering(thread_sig) && !df_drag_is_active()) + if(ui_hovering(thread_sig) && !rd_drag_is_active()) { - // TODO(rjf): @msgs df_entity_tooltips(thread); set rich hover info here!!! + // TODO(rjf): @msgs rd_entity_tooltips(thread); set rich hover info here!!! } // rjf: ip right-click menu if(ui_right_clicked(thread_sig)) { // TODO(rjf): @msgs top-level regs-based ctx menu here!!!! - // D_Handle handle = df_handle_from_entity(thread); - // ui_ctx_menu_open(df_state->entity_ctx_menu_key, thread_box->key, v2f32(0, thread_box->rect.y1-thread_box->rect.y0)); - // DF_Window *window = df_window_from_handle(df_regs()->window); + // RD_Handle handle = rd_handle_from_entity(thread); + // ui_ctx_menu_open(rd_state->entity_ctx_menu_key, thread_box->key, v2f32(0, thread_box->rect.y1-thread_box->rect.y0)); + // RD_Window *window = rd_window_from_handle(rd_regs()->window); // window->entity_ctx_menu_entity = handle; } // rjf: double click => select if(ui_double_clicked(thread_sig)) { - df_cmd(DF_CmdKind_SelectThread, .thread = thread->handle); + rd_cmd(RD_CmdKind_SelectThread, .thread = thread->handle); ui_kill_action(); } @@ -1327,21 +1327,21 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe if(ui_dragging(thread_sig) && !contains_2f32(thread_box->rect, ui_mouse())) { // TODO(rjf): @msgs top-level regs-based drag/drop here!!! - // DF_DragDropPayload payload = {0}; + // RD_DragDropPayload payload = {0}; // payload.key = thread_box->key; - // payload.entity = df_handle_from_entity(thread); - // df_drag_begin(&payload); + // payload.entity = rd_handle_from_entity(thread); + // rd_drag_begin(&payload); } } //- rjf: build margin breakpoint ui - for(DF_EntityNode *n = line_bps.first; n != 0; n = n->next) + for(RD_EntityNode *n = line_bps.first; n != 0; n = n->next) { - DF_Entity *bp = n->entity; - Vec4F32 bp_color = df_rgba_from_theme_color(DF_ThemeColor_Breakpoint); - if(bp->flags & DF_EntityFlag_HasColor) + RD_Entity *bp = n->entity; + Vec4F32 bp_color = rd_rgba_from_theme_color(RD_ThemeColor_Breakpoint); + if(bp->flags & RD_EntityFlag_HasColor) { - bp_color = df_rgba_from_entity(bp); + bp_color = rd_rgba_from_entity(bp); } if(bp->disabled) { @@ -1349,13 +1349,13 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe } // rjf: prep custom rendering data - DF_BreakpointBoxDrawExtData *bp_draw = push_array(ui_build_arena(), DF_BreakpointBoxDrawExtData, 1); + RD_BreakpointBoxDrawExtData *bp_draw = push_array(ui_build_arena(), RD_BreakpointBoxDrawExtData, 1); { bp_draw->color = bp_color; bp_draw->alive_t = bp->alive_t; - bp_draw->do_lines = df_setting_val_from_code(DF_SettingCode_BreakpointLines).s32; - bp_draw->do_glow = df_setting_val_from_code(DF_SettingCode_BreakpointGlow).s32; - if(df_regs()->file_path.size != 0) + bp_draw->do_lines = rd_setting_val_from_code(RD_SettingCode_BreakpointLines).s32; + bp_draw->do_glow = rd_setting_val_from_code(RD_SettingCode_BreakpointGlow).s32; + if(rd_regs()->file_path.size != 0) { D_LineList *lines = ¶ms->line_infos[line_idx]; for(D_LineNode *n = lines->first; n != 0; n = n->next) @@ -1371,7 +1371,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe } // rjf: build box for breakpoint - ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons)); + ui_set_next_font(rd_font_from_slot(RD_FontSlot_Icons)); ui_set_next_font_size(params->font_size * 1.f); ui_set_next_text_raster_flags(FNT_RasterFlag_Smooth); ui_set_next_hover_cursor(OS_Cursor_HandPoint); @@ -1381,56 +1381,56 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe UI_BoxFlag_DrawActiveEffects| UI_BoxFlag_DrawHotEffects| UI_BoxFlag_DrawBorder| - UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable)| + UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)| UI_BoxFlag_DisableTextTrunc, "%S##bp_%p", - df_g_icon_kind_text_table[DF_IconKind_CircleFilled], + rd_icon_kind_text_table[RD_IconKind_CircleFilled], bp); - ui_box_equip_custom_draw(bp_box, df_bp_box_draw_extensions, bp_draw); + ui_box_equip_custom_draw(bp_box, rd_bp_box_draw_extensions, bp_draw); UI_Signal bp_sig = ui_signal_from_box(bp_box); // rjf: bp hovering - if(ui_hovering(bp_sig) && !df_drag_is_active()) + if(ui_hovering(bp_sig) && !rd_drag_is_active()) { - df_entity_tooltips(bp); + rd_entity_tooltips(bp); } // rjf: click => remove breakpoint if(ui_clicked(bp_sig)) { - df_cmd(DF_CmdKind_RemoveBreakpoint, .entity = df_handle_from_entity(bp)); + rd_cmd(RD_CmdKind_RemoveBreakpoint, .entity = rd_handle_from_entity(bp)); } // rjf: drag start if(ui_dragging(bp_sig) && !contains_2f32(bp_box->rect, ui_mouse())) { - DF_DragDropPayload payload = {0}; - payload.entity = df_handle_from_entity(bp); - df_drag_begin(&payload); + RD_DragDropPayload payload = {0}; + payload.entity = rd_handle_from_entity(bp); + rd_drag_begin(&payload); } // rjf: bp right-click menu if(ui_right_clicked(bp_sig)) { - D_Handle handle = df_handle_from_entity(bp); - ui_ctx_menu_open(df_state->entity_ctx_menu_key, bp_box->key, v2f32(0, bp_box->rect.y1-bp_box->rect.y0)); - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Handle handle = rd_handle_from_entity(bp); + ui_ctx_menu_open(rd_state->entity_ctx_menu_key, bp_box->key, v2f32(0, bp_box->rect.y1-bp_box->rect.y0)); + RD_Window *window = rd_window_from_handle(rd_regs()->window); window->entity_ctx_menu_entity = handle; } } //- rjf: build margin watch pin ui - for(DF_EntityNode *n = line_pins.first; n != 0; n = n->next) + for(RD_EntityNode *n = line_pins.first; n != 0; n = n->next) { - DF_Entity *pin = n->entity; - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Text); - if(pin->flags & DF_EntityFlag_HasColor) + RD_Entity *pin = n->entity; + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_Text); + if(pin->flags & RD_EntityFlag_HasColor) { - color = df_rgba_from_entity(pin); + color = rd_rgba_from_entity(pin); } // rjf: build box for watch - ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons)); + ui_set_next_font(rd_font_from_slot(RD_FontSlot_Icons)); ui_set_next_font_size(params->font_size * 1.f); ui_set_next_text_raster_flags(FNT_RasterFlag_Smooth); ui_set_next_hover_cursor(OS_Cursor_HandPoint); @@ -1440,39 +1440,39 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe UI_BoxFlag_DrawActiveEffects| UI_BoxFlag_DrawHotEffects| UI_BoxFlag_DrawBorder| - UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable)| + UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)| UI_BoxFlag_DisableTextTrunc, "%S##watch_%p", - df_g_icon_kind_text_table[DF_IconKind_Pin], + rd_icon_kind_text_table[RD_IconKind_Pin], pin); UI_Signal pin_sig = ui_signal_from_box(pin_box); // rjf: watch hovering - if(ui_hovering(pin_sig) && !df_drag_is_active()) + if(ui_hovering(pin_sig) && !rd_drag_is_active()) { - df_entity_tooltips(pin); + rd_entity_tooltips(pin); } // rjf: click => remove pin if(ui_clicked(pin_sig)) { - df_cmd(DF_CmdKind_RemoveEntity, .entity = df_handle_from_entity(pin)); + rd_cmd(RD_CmdKind_RemoveEntity, .entity = rd_handle_from_entity(pin)); } // rjf: drag start if(ui_dragging(pin_sig) && !contains_2f32(pin_box->rect, ui_mouse())) { - DF_DragDropPayload payload = {0}; - payload.entity = df_handle_from_entity(pin); - df_drag_begin(&payload); + RD_DragDropPayload payload = {0}; + payload.entity = rd_handle_from_entity(pin); + rd_drag_begin(&payload); } // rjf: watch right-click menu if(ui_right_clicked(pin_sig)) { - D_Handle handle = df_handle_from_entity(pin); - ui_ctx_menu_open(df_state->entity_ctx_menu_key, pin_box->key, v2f32(0, pin_box->rect.y1-pin_box->rect.y0)); - DF_Window *window = df_window_from_handle(df_regs()->window); + RD_Handle handle = rd_handle_from_entity(pin); + ui_ctx_menu_open(rd_state->entity_ctx_menu_key, pin_box->key, v2f32(0, pin_box->rect.y1-pin_box->rect.y0)); + RD_Window *window = rd_window_from_handle(rd_regs()->window); window->entity_ctx_menu_entity = handle; } } @@ -1482,8 +1482,8 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe UI_Signal line_margin_sig = ui_signal_from_box(line_margin_box); if(ui_clicked(line_margin_sig)) { - df_cmd(DF_CmdKind_AddBreakpoint, - .file_path = df_regs()->file_path, + rd_cmd(RD_CmdKind_AddBreakpoint, + .file_path = rd_regs()->file_path, .cursor = txt_pt(line_num, 1), .vaddr = params->line_vaddrs[line_idx]); } @@ -1494,18 +1494,18 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe ////////////////////////////// //- rjf: build line numbers // - if(params->flags & DF_CodeSliceFlag_LineNums) UI_Parent(top_container_box) ProfScope("build line numbers") UI_Focus(UI_FocusKind_Off) + if(params->flags & RD_CodeSliceFlag_LineNums) UI_Parent(top_container_box) ProfScope("build line numbers") UI_Focus(UI_FocusKind_Off) { TxtRng select_rng = txt_rng(*cursor, *mark); - Vec4F32 active_color = df_rgba_from_theme_color(DF_ThemeColor_CodeLineNumbersSelected); - Vec4F32 inactive_color = df_rgba_from_theme_color(DF_ThemeColor_CodeLineNumbers); + Vec4F32 active_color = rd_rgba_from_theme_color(RD_ThemeColor_CodeLineNumbersSelected); + Vec4F32 inactive_color = rd_rgba_from_theme_color(RD_ThemeColor_CodeLineNumbers); ui_set_next_fixed_x(floor_f32(params->margin_float_off_px + params->priority_margin_width_px + params->catchall_margin_width_px)); ui_set_next_pref_width(ui_px(params->line_num_width_px, 1.f)); ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f)); ui_set_next_flags(UI_BoxFlag_DrawSideLeft|UI_BoxFlag_DrawSideRight); UI_Column UI_PrefHeight(ui_px(params->line_height_px, 1.f)) - DF_Font(DF_FontSlot_Code) + RD_Font(RD_FontSlot_Code) UI_FontSize(params->font_size) UI_CornerRadius(0) { @@ -1528,7 +1528,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { if(n->v.dbgi_key.min_timestamp >= best_stamp) { - has_line_info = (n->v.pt.line == line_num || df_regs()->file_path.size == 0); + has_line_info = (n->v.pt.line == line_num || rd_regs()->file_path.size == 0); line_info_line_num = n->v.pt.line; best_stamp = n->v.dbgi_key.min_timestamp; } @@ -1552,7 +1552,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe //- rjf: build background for line numbers & margins // { - UI_Parent(top_container_box) DF_Palette(DF_PaletteCode_Floating) + UI_Parent(top_container_box) RD_Palette(RD_PaletteCode_Floating) { ui_set_next_pref_width(ui_px(params->priority_margin_width_px + params->catchall_margin_width_px + params->line_num_width_px, 1)); ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f)); @@ -1569,7 +1569,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { ui_set_next_hover_cursor(ctrlified ? OS_Cursor_HandPoint : OS_Cursor_IBar); ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f)); - text_container_box = ui_build_box_from_string(UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable), str8_lit("text_container")); + text_container_box = ui_build_box_from_string(UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable), str8_lit("text_container")); } ////////////////////////////// @@ -1623,15 +1623,15 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe (stop_event.cause == CTRL_EventCause_InterruptedByException || stop_event.cause == CTRL_EventCause_InterruptedByTrap)) { - DF_IconKind icon = DF_IconKind_WarningBig; - String8 explanation = df_stop_explanation_string_icon_from_ctrl_event(scratch.arena, &stop_event, &icon); + RD_IconKind icon = RD_IconKind_WarningBig; + String8 explanation = rd_stop_explanation_string_icon_from_ctrl_event(scratch.arena, &stop_event, &icon); UI_Parent(line_extras_boxes[line_idx]) UI_PrefWidth(ui_children_sum(1)) UI_PrefHeight(ui_px(params->line_height_px, 1.f)) - UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextNegative))) + UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative))) { UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_DrawBorder, "###exception_info"); UI_Parent(box) UI_PrefWidth(ui_text_dim(10, 1)) { - DF_Font(DF_FontSlot_Icons) ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]); + RD_Font(RD_FontSlot_Icons) ui_label(rd_icon_kind_text_table[RD_IconKind_WarningBig]); ui_label(explanation); } } @@ -1651,64 +1651,64 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe line_num < params->line_num_range.max; line_num += 1, line_idx += 1) { - DF_EntityList pins = params->line_pins[line_idx]; + RD_EntityList pins = params->line_pins[line_idx]; if(pins.count != 0) UI_Parent(line_extras_boxes[line_idx]) - DF_Font(DF_FontSlot_Code) + RD_Font(RD_FontSlot_Code) UI_FontSize(params->font_size) UI_PrefHeight(ui_px(params->line_height_px, 1.f)) { - for(DF_EntityNode *n = pins.first; n != 0; n = n->next) + for(RD_EntityNode *n = pins.first; n != 0; n = n->next) { - DF_Entity *pin = n->entity; + RD_Entity *pin = n->entity; String8 pin_expr = pin->string; E_Eval eval = e_eval_from_string(scratch.arena, pin_expr); String8 eval_string = {0}; if(!e_type_key_match(e_type_key_zero(), eval.type_key)) { EV_ViewRuleList view_rules = {0}; - eval_string = df_value_string_from_eval(scratch.arena, EV_StringFlag_ReadOnlyDisplayRules, 10, params->font, params->font_size, params->font_size*60.f, eval, 0, &view_rules); + eval_string = rd_value_string_from_eval(scratch.arena, EV_StringFlag_ReadOnlyDisplayRules, 10, params->font, params->font_size, params->font_size*60.f, eval, 0, &view_rules); } ui_spacer(ui_em(1.5f, 1.f)); ui_set_next_pref_width(ui_children_sum(1)); UI_Key pin_box_key = ui_key_from_stringf(ui_key_zero(), "###pin_%p", pin); UI_Box *pin_box = ui_build_box_from_key(UI_BoxFlag_AnimatePos| - UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable)| + UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)| UI_BoxFlag_DrawHotEffects| UI_BoxFlag_DrawBorder, pin_box_key); UI_Parent(pin_box) UI_PrefWidth(ui_text_dim(10, 1)) { - Vec4F32 pin_color = df_rgba_from_theme_color(DF_ThemeColor_CodeDefault); - if(pin->flags & DF_EntityFlag_HasColor) + Vec4F32 pin_color = rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault); + if(pin->flags & RD_EntityFlag_HasColor) { - pin_color = df_rgba_from_entity(pin); + pin_color = rd_rgba_from_entity(pin); } UI_PrefWidth(ui_em(1.5f, 1.f)) - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) UI_Palette(ui_build_palette(ui_top_palette(), .text = pin_color)) UI_TextAlignment(UI_TextAlign_Center) UI_Flags(UI_BoxFlag_DisableTextTrunc) { - UI_Signal sig = ui_buttonf("%S###pin_nub", df_g_icon_kind_text_table[DF_IconKind_Pin]); + UI_Signal sig = ui_buttonf("%S###pin_nub", rd_icon_kind_text_table[RD_IconKind_Pin]); if(ui_dragging(sig) && !contains_2f32(sig.box->rect, ui_mouse())) { - DF_DragDropPayload payload = {0}; - payload.entity = df_handle_from_entity(pin); - df_drag_begin(&payload); + RD_DragDropPayload payload = {0}; + payload.entity = rd_handle_from_entity(pin); + rd_drag_begin(&payload); } if(ui_right_clicked(sig)) { - ui_ctx_menu_open(df_state->entity_ctx_menu_key, sig.box->key, v2f32(0, sig.box->rect.y1-sig.box->rect.y0)); - DF_Window *window = df_window_from_handle(df_regs()->window); - window->entity_ctx_menu_entity = df_handle_from_entity(pin); + ui_ctx_menu_open(rd_state->entity_ctx_menu_key, sig.box->key, v2f32(0, sig.box->rect.y1-sig.box->rect.y0)); + RD_Window *window = rd_window_from_handle(rd_regs()->window); + window->entity_ctx_menu_entity = rd_handle_from_entity(pin); } } - df_code_label(0.8f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), pin_expr); - df_code_label(0.6f, 1, df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), eval_string); + rd_code_label(0.8f, 1, rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault), pin_expr); + rd_code_label(0.6f, 1, rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault), eval_string); } UI_Signal pin_sig = ui_signal_from_box(pin_box); if(ui_key_match(pin_box_key, ui_hot_key())) { - df_set_hover_eval(v2f32(pin_box->rect.x0, pin_box->rect.y1-2.f), str8_zero(), txt_pt(1, 1), 0, pin_expr); + rd_set_hover_eval(v2f32(pin_box->rect.x0, pin_box->rect.y1-2.f), str8_zero(), txt_pt(1, 1), 0, pin_expr); } } } @@ -1787,7 +1787,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe UI_Signal priority_margin_container_sig = ui_signal_from_box(priority_margin_container_box); UI_Signal catchall_margin_container_sig = ui_signal_from_box(catchall_margin_container_box); UI_Signal text_container_sig = ui_signal_from_box(text_container_box); - DF_Entity *line_drag_entity = &d_nil_entity; + RD_Entity *line_drag_entity = &d_nil_entity; { //- rjf: determine mouse drag range TxtRng mouse_drag_rng = txt_rng(mouse_pt, mouse_pt); @@ -1838,12 +1838,12 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { *cursor = *mark = mouse_pt; } - ui_ctx_menu_open(df_state->code_ctx_menu_key, ui_key_zero(), sub_2f32(ui_mouse(), v2f32(2, 2))); - DF_Window *window = df_window_from_handle(df_regs()->window); + ui_ctx_menu_open(rd_state->code_ctx_menu_key, ui_key_zero(), sub_2f32(ui_mouse(), v2f32(2, 2))); + RD_Window *window = rd_window_from_handle(rd_regs()->window); arena_clear(window->code_ctx_menu_arena); - window->code_ctx_menu_file_path = push_str8_copy(window->code_ctx_menu_arena, df_regs()->file_path); - window->code_ctx_menu_text_key = df_regs()->text_key; - window->code_ctx_menu_lang_kind = df_regs()->lang_kind; + window->code_ctx_menu_file_path = push_str8_copy(window->code_ctx_menu_arena, rd_regs()->file_path); + window->code_ctx_menu_text_key = rd_regs()->text_key; + window->code_ctx_menu_lang_kind = rd_regs()->lang_kind; window->code_ctx_menu_range = txt_rng(*cursor, *mark); if(params->line_num_range.min <= cursor->line && cursor->line < params->line_num_range.max) { @@ -1857,13 +1857,13 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe //- rjf: dragging threads, breakpoints, or watch pins over this slice -> // drop target - if(df_drag_is_active() && contains_2f32(clipped_top_container_rect, ui_mouse())) + if(rd_drag_is_active() && contains_2f32(clipped_top_container_rect, ui_mouse())) { - DF_DragDropPayload *payload = &df_drag_drop_payload; - DF_Entity *entity = df_entity_from_handle(payload->entity); - if(entity->kind == DF_EntityKind_Thread || - entity->kind == DF_EntityKind_WatchPin || - entity->kind == DF_EntityKind_Breakpoint) + RD_DragDropPayload *payload = &rd_drag_drop_payload; + RD_Entity *entity = rd_entity_from_handle(payload->entity); + if(entity->kind == RD_EntityKind_Thread || + entity->kind == RD_EntityKind_WatchPin || + entity->kind == RD_EntityKind_Breakpoint) { line_drag_entity = entity; } @@ -1871,30 +1871,30 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe //- rjf: drop target is dropped -> process { - DF_DragDropPayload payload = {0}; - if(!df_entity_is_nil(line_drag_entity) && df_drag_drop(&payload) && contains_1s64(params->line_num_range, mouse_pt.line)) + RD_DragDropPayload payload = {0}; + if(!rd_entity_is_nil(line_drag_entity) && rd_drag_drop(&payload) && contains_1s64(params->line_num_range, mouse_pt.line)) { - DF_Entity *dropped_entity = line_drag_entity; + RD_Entity *dropped_entity = line_drag_entity; S64 line_num = mouse_pt.line; U64 line_idx = line_num - params->line_num_range.min; U64 line_vaddr = params->line_vaddrs[line_idx]; switch(dropped_entity->kind) { default:{}break; - case DF_EntityKind_Breakpoint: - case DF_EntityKind_WatchPin: + case RD_EntityKind_Breakpoint: + case RD_EntityKind_WatchPin: { - df_cmd(DF_CmdKind_RelocateEntity, - .entity = df_handle_from_entity(dropped_entity), - .file_path = df_regs()->file_path, + rd_cmd(RD_CmdKind_RelocateEntity, + .entity = rd_handle_from_entity(dropped_entity), + .file_path = rd_regs()->file_path, .cursor = txt_pt(line_num, 1), .vaddr = line_vaddr); }break; - case DF_EntityKind_Thread: + case RD_EntityKind_Thread: { CTRL_Entity *thread = ctrl_entity_from_handle(d_state->ctrl_entity_store, dropped_entity->ctrl_handle); U64 new_rip_vaddr = line_vaddr; - if(df_regs()->file_path.size != 0) + if(rd_regs()->file_path.size != 0) { D_LineList *lines = ¶ms->line_infos[line_idx]; for(D_LineNode *n = lines->first; n != 0; n = n->next) @@ -1908,7 +1908,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe } } } - df_cmd(DF_CmdKind_SetThreadIP, .thread = thread->handle, .vaddr = new_rip_vaddr); + rd_cmd(RD_CmdKind_SetThreadIP, .thread = thread->handle, .vaddr = new_rip_vaddr); }break; } } @@ -1967,15 +1967,15 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { U64 line_slice_idx = mouse_pt.line-params->line_num_range.min; D_LineList *lines = ¶ms->line_infos[line_slice_idx]; - if(lines->first != 0 && (df_regs()->file_path.size == 0 || lines->first->v.pt.line == mouse_pt.line)) + if(lines->first != 0 && (rd_regs()->file_path.size == 0 || lines->first->v.pt.line == mouse_pt.line)) { - DF_RegsScope(.process = selected_thread_process->handle, + RD_RegsScope(.process = selected_thread_process->handle, .vaddr_range = ctrl_vaddr_range_from_voff_range(selected_thread_module, lines->first->v.voff_range), .module = selected_thread_module->handle, .dbgi_key = lines->first->v.dbgi_key, .voff_range = lines->first->v.voff_range) { - df_set_hover_regs(); + rd_set_hover_regs(); } } } @@ -1994,19 +1994,19 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe U64 line_idx = mouse_pt.line-params->line_num_range.min; line_vaddr = params->line_vaddrs[line_idx]; } - df_set_hover_eval(mouse_expr_baseline_pos, df_regs()->file_path, mouse_pt, line_vaddr, mouse_expr); + rd_set_hover_eval(mouse_expr_baseline_pos, rd_regs()->file_path, mouse_pt, line_vaddr, mouse_expr); } } ////////////////////////////// //- rjf: dragging entity which applies to lines over this slice -> visualize // - if(!df_entity_is_nil(line_drag_entity) && contains_2f32(clipped_top_container_rect, ui_mouse())) + if(!rd_entity_is_nil(line_drag_entity) && contains_2f32(clipped_top_container_rect, ui_mouse())) { - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_DropSiteOverlay); - if(line_drag_entity->flags & DF_EntityFlag_HasColor) + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_DropSiteOverlay); + if(line_drag_entity->flags & RD_EntityFlag_HasColor) { - color = df_rgba_from_entity(line_drag_entity); + color = rd_rgba_from_entity(line_drag_entity); color.w /= 2; } DR_Bucket *bucket = dr_bucket_make(); @@ -2048,7 +2048,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { TxtRngColorPairNode *n = push_array(scratch.arena, TxtRngColorPairNode, 1); n->rng = result.mouse_expr_rng; - n->color = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay); + n->color = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlay); SLLQueuePush(first_txt_rng_color_pair, last_txt_rng_color_pair, n); } } @@ -2056,7 +2056,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe ////////////////////////////// //- rjf: build line numbers region (line number interaction should be basically identical to lines) // - if(params->flags & DF_CodeSliceFlag_LineNums) UI_Parent(text_container_box) ProfScope("build line number interaction box") UI_Focus(UI_FocusKind_Off) + if(params->flags & RD_CodeSliceFlag_LineNums) UI_Parent(text_container_box) ProfScope("build line number interaction box") UI_Focus(UI_FocusKind_Off) { ui_set_next_pref_width(ui_px(params->line_num_width_px, 1.f)); ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f)); @@ -2068,7 +2068,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe // UI_Parent(text_container_box) ProfScope("build line text") UI_Focus(UI_FocusKind_Off) { - DF_Regs *hover_regs = df_get_hover_regs(); + RD_Regs *hover_regs = rd_get_hover_regs(); Rng1U64 hover_voff_range = hover_regs->voff_range; if(hover_voff_range.min == 0 && hover_voff_range.max == 0) { @@ -2079,7 +2079,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe UI_WidthFill UI_Column UI_PrefHeight(ui_px(params->line_height_px, 1.f)) - DF_Font(DF_FontSlot_Code) + RD_Font(RD_FontSlot_Code) UI_FontSize(params->font_size) UI_CornerRadius(0) { @@ -2112,7 +2112,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe { params->font, line_string, - df_rgba_from_theme_color(DF_ThemeColor_CodeDefault), + rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault), params->font_size, 0, 0, @@ -2141,9 +2141,9 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe } // rjf: token -> token color - Vec4F32 token_color = df_rgba_from_theme_color(DF_ThemeColor_CodeDefault); + Vec4F32 token_color = rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault); { - DF_ThemeColor new_color_kind = df_theme_color_from_txt_token_kind(token->kind); + RD_ThemeColor new_color_kind = rd_theme_color_from_txt_token_kind(token->kind); F32 mix_t = 1.f; if(token->kind == TXT_TokenKind_Identifier || token->kind == TXT_TokenKind_Keyword) { @@ -2157,7 +2157,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe if(voff != 0) { mapped_special = 1; - new_color_kind = DF_ThemeColor_CodeSymbol; + new_color_kind = RD_ThemeColor_CodeSymbol; mix_t = selected_thread_module_alive_t; } } @@ -2167,7 +2167,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe if(type_num != 0) { mapped_special = 1; - new_color_kind = DF_ThemeColor_CodeType; + new_color_kind = RD_ThemeColor_CodeType; mix_t = selected_thread_module_alive_t; } } @@ -2179,7 +2179,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe if(local_num != 0) { mapped_special = 1; - new_color_kind = DF_ThemeColor_CodeLocal; + new_color_kind = RD_ThemeColor_CodeLocal; mix_t = selected_thread_module_alive_t; } } @@ -2189,7 +2189,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe if(member_num != 0) { mapped_special = 1; - new_color_kind = DF_ThemeColor_CodeLocal; + new_color_kind = RD_ThemeColor_CodeLocal; mix_t = selected_thread_module_alive_t; } } @@ -2199,7 +2199,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe if(reg_num != 0) { mapped_special = 1; - new_color_kind = DF_ThemeColor_CodeRegister; + new_color_kind = RD_ThemeColor_CodeRegister; mix_t = selected_thread_module_alive_t; } } @@ -2209,14 +2209,14 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe if(alias_num != 0) { mapped_special = 1; - new_color_kind = DF_ThemeColor_CodeRegister; + new_color_kind = RD_ThemeColor_CodeRegister; mix_t = selected_thread_module_alive_t; } } } - if(new_color_kind != DF_ThemeColor_Null) + if(new_color_kind != RD_ThemeColor_Null) { - Vec4F32 t_color = df_rgba_from_theme_color(new_color_kind); + Vec4F32 t_color = rd_rgba_from_theme_color(new_color_kind); token_color.x += (t_color.x - token_color.x) * mix_t; token_color.y += (t_color.y - token_color.y) * mix_t; token_color.z += (t_color.z - token_color.z) * mix_t; @@ -2263,7 +2263,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe line_box->rect.x0+line_num_padding_px+match_column_pixel_off_range.max+2.f, line_box->rect.y1, }; - Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay); + Vec4F32 color = rd_rgba_from_theme_color(RD_ThemeColor_HighlightOverlay); if(cursor->line == line_num && needle_pos+1 <= cursor->column && cursor->column < needle_pos+params->search_query.size+1) { color.x += (1.f - color.x) * 0.5f; @@ -2347,7 +2347,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe ui_box_text_position(line_box).x+cursor_off_pixels+cursor_thickness/2.f, line_box->rect.y1+params->font_size*0.25f, }; - dr_rect(cursor_rect, df_rgba_from_theme_color(is_focused ? DF_ThemeColor_Cursor : DF_ThemeColor_CursorInactive), 1.f, 0, 1.f); + dr_rect(cursor_rect, rd_rgba_from_theme_color(is_focused ? RD_ThemeColor_Cursor : RD_ThemeColor_CursorInactive), 1.f, 0, 1.f); } // rjf: extra rendering for lines with line-info that match the hovered @@ -2357,7 +2357,7 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe D_LineList *lines = ¶ms->line_infos[line_idx]; for(D_LineNode *n = lines->first; n != 0; n = n->next) { - if((n->v.pt.line == line_num || df_regs()->file_path.size == 0) && + if((n->v.pt.line == line_num || rd_regs()->file_path.size == 0) && ((di_key_match(&n->v.dbgi_key, &hover_regs->dbgi_key) && n->v.voff_range.min <= hover_voff_range.min && hover_voff_range.min < n->v.voff_range.max) || (params->line_vaddrs[line_idx] == hover_regs->vaddr_range.min && hover_regs->vaddr_range.min != 0))) @@ -2393,21 +2393,21 @@ df_code_slice(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe return result; } -internal DF_CodeSliceSignal -df_code_slicef(DF_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *preferred_column, char *fmt, ...) +internal RD_CodeSliceSignal +rd_code_slicef(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *preferred_column, char *fmt, ...) { Temp scratch = scratch_begin(0, 0); va_list args; va_start(args, fmt); String8 string = push_str8fv(scratch.arena, fmt, args); - DF_CodeSliceSignal sig = df_code_slice(params, cursor, mark, preferred_column, string); + RD_CodeSliceSignal sig = rd_code_slice(params, cursor, mark, preferred_column, string); va_end(args); scratch_end(scratch); return sig; } internal B32 -df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, TxtPt *cursor, TxtPt *mark, S64 *preferred_column) +rd_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, TxtPt *cursor, TxtPt *mark, S64 *preferred_column) { Temp scratch = scratch_begin(0, 0); B32 change = 0; @@ -2589,7 +2589,7 @@ df_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, Tx //~ rjf: UI Widgets: Fancy Labels internal UI_Signal -df_label(String8 string) +rd_label(String8 string) { Temp scratch = scratch_begin(0, 0); typedef U32 StringPartFlags; @@ -2640,8 +2640,8 @@ df_label(String8 string) fstr.size = ui_top_font_size(); if(p->flags & StringPartFlag_Code) { - fstr.font = df_font_from_slot(DF_FontSlot_Code); - fstr.color = df_rgba_from_theme_color(DF_ThemeColor_CodeDefault); + fstr.font = rd_font_from_slot(RD_FontSlot_Code); + fstr.color = rd_rgba_from_theme_color(RD_ThemeColor_CodeDefault); } } dr_fancy_string_list_push(scratch.arena, &fstrs, &fstr); @@ -2654,24 +2654,24 @@ df_label(String8 string) } internal UI_Signal -df_error_label(String8 string) +rd_error_label(String8 string) { UI_Box *box = ui_build_box_from_key(0, ui_key_zero()); UI_Signal sig = ui_signal_from_box(box); - UI_Parent(box) UI_Palette(ui_build_palette(ui_top_palette(), .text = df_rgba_from_theme_color(DF_ThemeColor_TextNegative), .text_weak = df_rgba_from_theme_color(DF_ThemeColor_TextNegative))) + UI_Parent(box) UI_Palette(ui_build_palette(ui_top_palette(), .text = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative), .text_weak = rd_rgba_from_theme_color(RD_ThemeColor_TextNegative))) { - ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons)); + ui_set_next_font(rd_font_from_slot(RD_FontSlot_Icons)); ui_set_next_text_raster_flags(FNT_RasterFlag_Smooth); ui_set_next_text_alignment(UI_TextAlign_Center); ui_set_next_flags(UI_BoxFlag_DrawTextWeak); - UI_PrefWidth(ui_em(2.25f, 1.f)) ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]); - UI_PrefWidth(ui_text_dim(10, 0)) df_label(string); + UI_PrefWidth(ui_em(2.25f, 1.f)) ui_label(rd_icon_kind_text_table[RD_IconKind_WarningBig]); + UI_PrefWidth(ui_text_dim(10, 0)) rd_label(string); } return sig; } internal B32 -df_help_label(String8 string) +rd_help_label(String8 string) { B32 result = 0; UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_Clickable, "###%S_help_label", string); @@ -2682,11 +2682,11 @@ df_help_label(String8 string) if(ui_hovering(sig)) UI_PrefWidth(ui_em(2.25f, 1)) { result = 1; - ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons)); + ui_set_next_font(rd_font_from_slot(RD_FontSlot_Icons)); ui_set_next_text_raster_flags(FNT_RasterFlag_Smooth); ui_set_next_text_alignment(UI_TextAlign_Center); UI_Box *help_hoverer = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawHotEffects, "###help_hoverer_%S", string); - ui_box_equip_display_string(help_hoverer, df_g_icon_kind_text_table[DF_IconKind_QuestionMark]); + ui_box_equip_display_string(help_hoverer, rd_icon_kind_text_table[RD_IconKind_QuestionMark]); if(!contains_2f32(help_hoverer->rect, ui_mouse())) { result = 0; @@ -2697,7 +2697,7 @@ df_help_label(String8 string) } internal DR_FancyStringList -df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string) +rd_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string) { Temp scratch = scratch_begin(&arena, 1); DR_FancyStringList fancy_strings = {0}; @@ -2707,8 +2707,8 @@ df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_s indirection_size_change = 0; for(TXT_Token *token = tokens.v; token < tokens_opl; token += 1) { - DF_ThemeColor token_color = df_theme_color_from_txt_token_kind(token->kind); - Vec4F32 token_color_rgba = df_rgba_from_theme_color(token_color); + RD_ThemeColor token_color = rd_theme_color_from_txt_token_kind(token->kind); + Vec4F32 token_color_rgba = rd_rgba_from_theme_color(token_color); token_color_rgba.w *= alpha; String8 token_string = str8_substr(string, token->range); if(str8_match(token_string, str8_lit("{"), 0)) { indirection_counter += 1; } @@ -2733,16 +2733,16 @@ df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_s Vec4F32 color = base_color; if(!e_type_key_match(e_type_key_zero(), type)) { - color = df_rgba_from_theme_color(DF_ThemeColor_CodeType); + color = rd_rgba_from_theme_color(RD_ThemeColor_CodeType); } else { - CTRL_Entity *module = ctrl_entity_from_handle(d_state->ctrl_entity_store, df_regs()->module); + CTRL_Entity *module = ctrl_entity_from_handle(d_state->ctrl_entity_store, rd_regs()->module); DI_Key dbgi_key = ctrl_dbgi_key_from_module(module); U64 symbol_voff = d_voff_from_dbgi_key_symbol_name(&dbgi_key, token_string); if(symbol_voff != 0) { - color = df_rgba_from_theme_color(DF_ThemeColor_CodeSymbol); + color = rd_rgba_from_theme_color(RD_ThemeColor_CodeSymbol); } } DR_FancyString fancy_string = @@ -2756,7 +2756,7 @@ df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_s }break; case TXT_TokenKind_Numeric: { - Vec4F32 token_color_rgba_alt = df_rgba_from_theme_color(DF_ThemeColor_CodeNumericAltDigitGroup); + Vec4F32 token_color_rgba_alt = rd_rgba_from_theme_color(RD_ThemeColor_CodeNumericAltDigitGroup); token_color_rgba_alt.w *= alpha; F32 font_size = ui_top_font_size() * (1.f - !!indirection_size_change*(indirection_counter/10.f)); @@ -2863,10 +2863,10 @@ df_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_s } internal UI_Box * -df_code_label(F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string) +rd_code_label(F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string) { Temp scratch = scratch_begin(0, 0); - DR_FancyStringList fancy_strings = df_fancy_string_list_from_code_string(scratch.arena, alpha, indirection_size_change, base_color, string); + DR_FancyStringList fancy_strings = rd_fancy_string_list_from_code_string(scratch.arena, alpha, indirection_size_change, base_color, string); UI_Box *box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); ui_box_equip_display_fancy_strings(box, &fancy_strings); scratch_end(scratch); @@ -2877,7 +2877,7 @@ df_code_label(F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String //~ rjf: UI Widgets: Line Edit internal UI_Signal -df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, TxtPt *cursor, TxtPt *mark, U8 *edit_buffer, U64 edit_buffer_size, U64 *edit_string_size_out, B32 *expanded_out, String8 pre_edit_value, String8 string) +rd_line_edit(RD_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, TxtPt *cursor, TxtPt *mark, U8 *edit_buffer, U64 edit_buffer_size, U64 *edit_string_size_out, B32 *expanded_out, String8 pre_edit_value, String8 string) { //- rjf: unpack visual metrics F32 expander_size_px = ui_top_font_size()*1.5f; @@ -2903,8 +2903,8 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx UI_Box *box = ui_build_box_from_key(UI_BoxFlag_MouseClickable| UI_BoxFlag_ClickToFocus| UI_BoxFlag_DrawHotEffects| - (!(flags & DF_LineEditFlag_NoBackground)*UI_BoxFlag_DrawBackground)| - (!!(flags & DF_LineEditFlag_Border)*UI_BoxFlag_DrawBorder)| + (!(flags & RD_LineEditFlag_NoBackground)*UI_BoxFlag_DrawBackground)| + (!!(flags & RD_LineEditFlag_Border)*UI_BoxFlag_DrawBorder)| ((is_auto_focus_hot || is_auto_focus_active)*UI_BoxFlag_KeyboardClickable)| (is_focus_active || is_focus_active_disabled)*(UI_BoxFlag_Clip), key); @@ -2916,7 +2916,7 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx } //- rjf: build expander - if(flags & DF_LineEditFlag_Expander) UI_PrefWidth(ui_px(expander_size_px, 1.f)) UI_Parent(box) + if(flags & RD_LineEditFlag_Expander) UI_PrefWidth(ui_px(expander_size_px, 1.f)) UI_Parent(box) UI_Flags(UI_BoxFlag_DrawSideLeft) UI_Focus(UI_FocusKind_Off) { @@ -2928,17 +2928,17 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx } //- rjf: build expander placeholder - else if(flags & DF_LineEditFlag_ExpanderPlaceholder) UI_Parent(box) UI_PrefWidth(ui_px(expander_size_px, 1.f)) UI_Focus(UI_FocusKind_Off) + else if(flags & RD_LineEditFlag_ExpanderPlaceholder) UI_Parent(box) UI_PrefWidth(ui_px(expander_size_px, 1.f)) UI_Focus(UI_FocusKind_Off) { UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) UI_Flags(UI_BoxFlag_DrawSideLeft) - DF_Font(DF_FontSlot_Icons) + RD_Font(RD_FontSlot_Icons) UI_TextAlignment(UI_TextAlign_Center) - ui_label(df_g_icon_kind_text_table[DF_IconKind_Dot]); + ui_label(rd_icon_kind_text_table[RD_IconKind_Dot]); } //- rjf: build expander space - else if(flags & DF_LineEditFlag_ExpanderSpace) UI_Parent(box) UI_Focus(UI_FocusKind_Off) + else if(flags & RD_LineEditFlag_ExpanderSpace) UI_Parent(box) UI_Focus(UI_FocusKind_Off) { UI_Flags(UI_BoxFlag_DrawSideLeft) ui_spacer(ui_px(expander_size_px, 1.f)); } @@ -3029,7 +3029,7 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx //- rjf: take navigation actions for editing B32 changes_made = 0; - if(!(flags & DF_LineEditFlag_DisableEdit) && (is_focus_active || focus_started)) + if(!(flags & RD_LineEditFlag_DisableEdit) && (is_focus_active || focus_started)) { Temp scratch = scratch_begin(0, 0); for(UI_Event *evt = 0; ui_next_event(&evt);) @@ -3048,7 +3048,7 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx // rjf: any valid op & autocomplete hint? -> perform autocomplete first, then re-compute op if(autocomplete_hint_string.size != 0) { - String8 word_query = df_autocomp_query_word_from_input_string_off(edit_string, cursor->column-1); + String8 word_query = rd_autocomp_query_word_from_input_string_off(edit_string, cursor->column-1); U64 word_off = (U64)(word_query.str - edit_string.str); String8 new_string = ui_push_string_replace_range(scratch.arena, edit_string, r1s64(word_off+1, word_off+1+word_query.size), autocomplete_hint_string); new_string.size = Min(edit_buffer_size, new_string.size); @@ -3093,21 +3093,21 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx F32 cursor_off = 0; UI_Parent(scrollable_box) { - if(!is_focus_active && !is_focus_active_disabled && flags & DF_LineEditFlag_CodeContents) + if(!is_focus_active && !is_focus_active_disabled && flags & RD_LineEditFlag_CodeContents) { String8 display_string = ui_display_part_from_key_string(string); - if(!(flags & DF_LineEditFlag_PreferDisplayString) && pre_edit_value.size != 0) + if(!(flags & RD_LineEditFlag_PreferDisplayString) && pre_edit_value.size != 0) { display_string = pre_edit_value; - UI_Box *box = df_code_label(1.f, 1, ui_top_palette()->text, display_string); + UI_Box *box = rd_code_label(1.f, 1, ui_top_palette()->text, display_string); if(matches != 0) { ui_box_equip_fuzzy_match_ranges(box, matches); } } - else if(flags & DF_LineEditFlag_DisplayStringIsCode) + else if(flags & RD_LineEditFlag_DisplayStringIsCode) { - UI_Box *box = df_code_label(1.f, 1, ui_top_palette()->text, display_string); + UI_Box *box = rd_code_label(1.f, 1, ui_top_palette()->text, display_string); if(matches != 0) { ui_box_equip_fuzzy_match_ranges(box, matches); @@ -3123,10 +3123,10 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx } } } - else if(!is_focus_active && !is_focus_active_disabled && !(flags & DF_LineEditFlag_CodeContents)) + else if(!is_focus_active && !is_focus_active_disabled && !(flags & RD_LineEditFlag_CodeContents)) { String8 display_string = ui_display_part_from_key_string(string); - if(!(flags & DF_LineEditFlag_PreferDisplayString) && pre_edit_value.size != 0) + if(!(flags & RD_LineEditFlag_PreferDisplayString) && pre_edit_value.size != 0) { display_string = pre_edit_value; } @@ -3140,18 +3140,18 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx ui_box_equip_fuzzy_match_ranges(box, matches); } } - else if((is_focus_active || is_focus_active_disabled) && flags & DF_LineEditFlag_CodeContents) + else if((is_focus_active || is_focus_active_disabled) && flags & RD_LineEditFlag_CodeContents) { String8 edit_string = str8(edit_buffer, edit_string_size_out[0]); Temp scratch = scratch_begin(0, 0); F32 total_text_width = fnt_dim_from_tag_size_string(ui_top_font(), ui_top_font_size(), 0, ui_top_tab_size(), edit_string).x; - F32 total_editstr_width = total_text_width - !!(flags & (DF_LineEditFlag_Expander|DF_LineEditFlag_ExpanderSpace|DF_LineEditFlag_ExpanderPlaceholder)) * expander_size_px; + F32 total_editstr_width = total_text_width - !!(flags & (RD_LineEditFlag_Expander|RD_LineEditFlag_ExpanderSpace|RD_LineEditFlag_ExpanderPlaceholder)) * expander_size_px; ui_set_next_pref_width(ui_px(total_editstr_width+ui_top_font_size()*2, 0.f)); UI_Box *editstr_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_DisableTextTrunc, "###editstr"); - DR_FancyStringList code_fancy_strings = df_fancy_string_list_from_code_string(scratch.arena, 1.f, 0, ui_top_palette()->text, edit_string); + DR_FancyStringList code_fancy_strings = rd_fancy_string_list_from_code_string(scratch.arena, 1.f, 0, ui_top_palette()->text, edit_string); if(autocomplete_hint_string.size != 0) { - String8 query_word = df_autocomp_query_word_from_input_string_off(edit_string, cursor->column-1); + String8 query_word = rd_autocomp_query_word_from_input_string_off(edit_string, cursor->column-1); String8 autocomplete_append_string = str8_skip(autocomplete_hint_string, query_word.size); U64 off = 0; U64 cursor_off = cursor->column-1; @@ -3223,11 +3223,11 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx cursor_off = fnt_dim_from_tag_size_string(ui_top_font(), ui_top_font_size(), 0, ui_top_tab_size(), str8_prefix(edit_string, cursor->column-1)).x; scratch_end(scratch); } - else if((is_focus_active || is_focus_active_disabled) && !(flags & DF_LineEditFlag_CodeContents)) + else if((is_focus_active || is_focus_active_disabled) && !(flags & RD_LineEditFlag_CodeContents)) { String8 edit_string = str8(edit_buffer, edit_string_size_out[0]); F32 total_text_width = fnt_dim_from_tag_size_string(ui_top_font(), ui_top_font_size(), 0, ui_top_tab_size(), edit_string).x; - F32 total_editstr_width = total_text_width - !!(flags & (DF_LineEditFlag_Expander|DF_LineEditFlag_ExpanderSpace|DF_LineEditFlag_ExpanderPlaceholder)) * expander_size_px; + F32 total_editstr_width = total_text_width - !!(flags & (RD_LineEditFlag_Expander|RD_LineEditFlag_ExpanderSpace|RD_LineEditFlag_ExpanderPlaceholder)) * expander_size_px; ui_set_next_pref_width(ui_px(total_editstr_width+ui_top_font_size()*2, 0.f)); UI_Box *editstr_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_DisableTextTrunc, "###editstr"); UI_LineEditDrawData *draw_data = push_array(ui_build_arena(), UI_LineEditDrawData, 1); @@ -3285,14 +3285,14 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx } internal UI_Signal -df_line_editf(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, TxtPt *cursor, TxtPt *mark, U8 *edit_buffer, U64 edit_buffer_size, U64 *edit_string_size_out, B32 *expanded_out, String8 pre_edit_value, char *fmt, ...) +rd_line_editf(RD_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, TxtPt *cursor, TxtPt *mark, U8 *edit_buffer, U64 edit_buffer_size, U64 *edit_string_size_out, B32 *expanded_out, String8 pre_edit_value, char *fmt, ...) { Temp scratch = scratch_begin(0, 0); va_list args; va_start(args, fmt); String8 string = push_str8fv(scratch.arena, fmt, args); va_end(args); - UI_Signal sig = df_line_edit(flags, depth, matches, cursor, mark, edit_buffer, edit_buffer_size, edit_string_size_out, expanded_out, pre_edit_value, string); + UI_Signal sig = rd_line_edit(flags, depth, matches, cursor, mark, edit_buffer, edit_buffer_size, edit_string_size_out, expanded_out, pre_edit_value, string); scratch_end(scratch); return sig; } diff --git a/src/raddbg/raddbg_widgets.h b/src/raddbg/raddbg_widgets.h new file mode 100644 index 00000000..4bf7af47 --- /dev/null +++ b/src/raddbg/raddbg_widgets.h @@ -0,0 +1,122 @@ +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#ifndef RADDBG_WIDGETS_H +#define RADDBG_WIDGETS_H + +//////////////////////////////// +//~ rjf: Line Edit Types + +typedef U32 RD_LineEditFlags; +enum +{ + RD_LineEditFlag_Expander = (1<<0), + RD_LineEditFlag_ExpanderSpace = (1<<1), + RD_LineEditFlag_ExpanderPlaceholder = (1<<2), + RD_LineEditFlag_DisableEdit = (1<<3), + RD_LineEditFlag_CodeContents = (1<<4), + RD_LineEditFlag_Border = (1<<5), + RD_LineEditFlag_NoBackground = (1<<6), + RD_LineEditFlag_PreferDisplayString = (1<<7), + RD_LineEditFlag_DisplayStringIsCode = (1<<8), +}; + +//////////////////////////////// +//~ rjf: Code Slice Types + +typedef U32 RD_CodeSliceFlags; +enum +{ + RD_CodeSliceFlag_Clickable = (1<<0), + RD_CodeSliceFlag_PriorityMargin = (1<<1), + RD_CodeSliceFlag_CatchallMargin = (1<<2), + RD_CodeSliceFlag_LineNums = (1<<3), +}; + +typedef struct RD_CodeSliceParams RD_CodeSliceParams; +struct RD_CodeSliceParams +{ + // rjf: content + RD_CodeSliceFlags flags; + Rng1S64 line_num_range; + String8 *line_text; + Rng1U64 *line_ranges; + TXT_TokenArray *line_tokens; + RD_EntityList *line_bps; + CTRL_EntityList *line_ips; + RD_EntityList *line_pins; + U64 *line_vaddrs; + D_LineList *line_infos; + DI_KeyList relevant_dbgi_keys; + + // rjf: visual parameters + FNT_Tag font; + F32 font_size; + F32 tab_size; + String8 search_query; + F32 line_height_px; + F32 priority_margin_width_px; + F32 catchall_margin_width_px; + F32 line_num_width_px; + F32 line_text_max_width_px; + F32 margin_float_off_px; +}; + +typedef struct RD_CodeSliceSignal RD_CodeSliceSignal; +struct RD_CodeSliceSignal +{ + UI_Signal base; + TxtPt mouse_pt; + TxtRng mouse_expr_rng; +}; + +//////////////////////////////// +//~ rjf: UI Building Helpers + +#define RD_Palette(code) UI_Palette(rd_palette_from_code(code)) +#define RD_Font(slot) UI_Font(rd_font_from_slot(slot)) UI_TextRasterFlags(rd_raster_flags_from_slot((slot))) + +//////////////////////////////// +//~ rjf: UI Widgets: Loading Overlay + +internal void rd_loading_overlay(Rng2F32 rect, F32 loading_t, U64 progress_v, U64 progress_v_target); + +//////////////////////////////// +//~ rjf: UI Widgets: Fancy Buttons + +internal void rd_cmd_binding_buttons(String8 name); +internal UI_Signal rd_menu_bar_button(String8 string); +internal UI_Signal rd_cmd_spec_button(String8 name); +internal void rd_cmd_list_menu_buttons(U64 count, String8 *cmd_names, U32 *fastpath_codepoints); +internal UI_Signal rd_icon_button(RD_IconKind kind, FuzzyMatchRangeList *matches, String8 string); +internal UI_Signal rd_icon_buttonf(RD_IconKind kind, FuzzyMatchRangeList *matches, char *fmt, ...); +internal void rd_entity_tooltips(RD_Entity *entity); +internal UI_Signal rd_entity_desc_button(RD_Entity *entity, FuzzyMatchRangeList *name_matches, String8 fuzzy_query, B32 is_implicit); +internal void rd_src_loc_button(String8 file_path, TxtPt point); + +//////////////////////////////// +//~ rjf: UI Widgets: Text View + +internal UI_BOX_CUSTOM_DRAW(rd_thread_box_draw_extensions); +internal UI_BOX_CUSTOM_DRAW(rd_bp_box_draw_extensions); +internal RD_CodeSliceSignal rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *preferred_column, String8 string); +internal RD_CodeSliceSignal rd_code_slicef(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *preferred_column, char *fmt, ...); + +internal B32 rd_do_txt_controls(TXT_TextInfo *info, String8 data, U64 line_count_per_page, TxtPt *cursor, TxtPt *mark, S64 *preferred_column); + +//////////////////////////////// +//~ rjf: UI Widgets: Fancy Labels + +internal UI_Signal rd_label(String8 string); +internal UI_Signal rd_error_label(String8 string); +internal B32 rd_help_label(String8 string); +internal DR_FancyStringList rd_fancy_string_list_from_code_string(Arena *arena, F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string); +internal UI_Box *rd_code_label(F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String8 string); + +//////////////////////////////// +//~ rjf: UI Widgets: Line Edit + +internal UI_Signal rd_line_edit(RD_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, TxtPt *cursor, TxtPt *mark, U8 *edit_buffer, U64 edit_buffer_size, U64 *edit_string_size_out, B32 *expanded_out, String8 pre_edit_value, String8 string); +internal UI_Signal rd_line_editf(RD_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, TxtPt *cursor, TxtPt *mark, U8 *edit_buffer, U64 edit_buffer_size, U64 *edit_string_size_out, B32 *expanded_out, String8 pre_edit_value, char *fmt, ...); + +#endif // RADDBG_WIDGETS_H