Finished reorganizing everything for the shift into exposing system api right into the custom layer

master
Allen Webster 2019-10-07 18:42:23 -07:00
parent b1548f3a43
commit 28c3715073
27 changed files with 131 additions and 338 deletions

19
4ed.cpp
View File

@ -9,21 +9,6 @@
// TOP
Mutex_Lock::Mutex_Lock(System_Mutex m){
system_mutex_acquire(m);
this->mutex = m;
}
Mutex_Lock::~Mutex_Lock(){
system_mutex_release(this->mutex);
}
Mutex_Lock::operator System_Mutex(){
return(this->mutex);
}
////////////////////////////////
internal App_Coroutine_State
get_state(Application_Links *app){
App_Coroutine_State state = {};
@ -825,7 +810,9 @@ App_Init_Sig(app_init){
API_VTable_custom custom_vtable = {};
custom_api_fill_vtable(&custom_vtable);
api.init_apis(&custom_vtable);
API_VTable_system system_vtable = {};
system_api_fill_vtable(&system_vtable);
api.init_apis(&custom_vtable, &system_vtable);
// NOTE(allen): coroutines
coroutine_system_init(&models->coroutines);

View File

@ -716,36 +716,6 @@ buffer_set_setting(Application_Links *app, Buffer_ID buffer_id, Buffer_Setting_I
}
}break;
case BufferSetting_VirtualWhitespace:
{
#if 0
b32 full_remeasure = false;
if (value){
if (!file->settings.virtual_white){
if (!file->settings.tokens_exist){
file_first_lex_serial(system, models, file);
}
file->settings.virtual_white = true;
full_remeasure = true;
}
}
else{
if (file->settings.virtual_white){
file->settings.virtual_white = false;
full_remeasure = true;
}
}
if (full_remeasure){
Face *face = font_set_face_from_id(&models->font_set, file->settings.font_id);
file_allocate_character_starts_as_needed(&models->mem.heap, file);
buffer_measure_character_starts(system, &file->state.buffer, file->state.character_starts, 0, file->settings.virtual_white);
file_measure_wraps(system, &models->mem, file, face);
adjust_views_looking_at_file_to_new_cursor(system, models, file);
}
#endif
}break;
case BufferSetting_RecordsHistory:
{
if (value){
@ -2587,17 +2557,6 @@ set_hot_directory(Application_Links *app, String_Const_u8 string)
return(true);
}
api(custom) function File_List
get_file_list(Application_Links *app, Arena *arena, String_Const_u8 directory){
Models *models = (Models*)app->cmd_context;
String_Const_u8 canonical_directory = system_get_canonical(arena, directory);
File_List list = {};
if (canonical_directory.str != 0){
list = system_get_file_list(arena, canonical_directory);
}
return(list);
}
api(custom) function void
set_gui_up_down_keys(Application_Links *app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier)
{
@ -2608,43 +2567,6 @@ set_gui_up_down_keys(Application_Links *app, Key_Code up_key, Key_Modifier up_ke
models->user_down_key_modifier = down_key_modifier;
}
api(custom) function void*
memory_allocate(Application_Links *app, i32 size)
{
Models *models = (Models*)app->cmd_context;
void *result = system_memory_allocate(size);
return(result);
}
api(custom) function b32
memory_set_protection(Application_Links *app, void *ptr, i32 size, Memory_Protect_Flags flags)
{
Models *models = (Models*)app->cmd_context;
return(system_memory_set_protection(ptr, size, flags));
}
api(custom) function void
memory_free(Application_Links *app, void *ptr, i32 size)
{
Models *models = (Models*)app->cmd_context;
system_memory_free(ptr, size);
}
api(custom) function String_Const_u8
push_4ed_path(Application_Links *app, Arena *arena)
{
Models *models = (Models*)app->cmd_context;
return(system_get_path(arena, SystemPath_Binary));
}
// TODO(allen): do(add a "shown but auto-hides on timer" setting for cursor show type)
api(custom) function void
show_mouse_cursor(Application_Links *app, Mouse_Cursor_Show_Type show)
{
Models *models = (Models*)app->cmd_context;
system_show_mouse_cursor(show);
}
api(custom) function b32
set_edit_finished_hook_repeat_speed(Application_Links *app, u32 milliseconds){
Models *models = (Models*)app->cmd_context;
@ -2652,25 +2574,6 @@ set_edit_finished_hook_repeat_speed(Application_Links *app, u32 milliseconds){
return(true);
}
api(custom) function b32
set_fullscreen(Application_Links *app, b32 full_screen)
{
Models *models = (Models*)app->cmd_context;
b32 success = system_set_fullscreen(full_screen);
if (!success){
print_message(app, string_u8_litexpr("ERROR: Failed to go fullscreen.\n"));
}
return(success);
}
api(custom) function b32
is_fullscreen(Application_Links *app)
{
Models *models = (Models*)app->cmd_context;
b32 result = system_is_fullscreen();
return(result);
}
api(custom) function void
send_exit_signal(Application_Links *app)
{
@ -2690,14 +2593,6 @@ set_window_title(Application_Links *app, String_Const_u8 title)
return(true);
}
api(custom) function Microsecond_Time_Stamp
get_microseconds_timestamp(Application_Links *app)
{
// TODO(allen): do(decrease indirection in API calls)
Models *models = (Models*)app->cmd_context;
return(system_now_time());
}
api(custom) function Vec2
draw_string_oriented(Application_Links *app, Face_ID font_id, String_Const_u8 str, Vec2 point, int_color color, u32 flags, Vec2 delta)
{
@ -2965,7 +2860,7 @@ api(custom) function void
open_color_picker(Application_Links *app, Color_Picker *picker)
{
Models *models = (Models*)app->cmd_context;
if (picker->finished){
if (picker->finished != 0){
*picker->finished = false;
}
system_open_color_picker(picker);

View File

@ -205,15 +205,6 @@ enum{
AppCoroutineRequest_ModifyFace = 2,
};
////////////////////////////////
struct Mutex_Lock{
Mutex_Lock(System_Mutex mutex);
~Mutex_Lock();
operator System_Mutex();
System_Mutex mutex;
};
#endif
// BOTTOM

View File

@ -12,19 +12,20 @@
#define REMOVE_OLD_STRING
#include "4coder_base_types.h"
#include "api/4coder_version.h"
#include "api/4coder_keycodes.h"
#include "api/4coder_default_colors.h"
#include "api/4coder_types.h"
#include "4coder_version.h"
#include "4coder_keycodes.h"
#include "4coder_default_colors.h"
#include "4coder_types.h"
#define STATIC_LINK_API
#include "generated/custom_api.h"
#include "4coder_table.h"
#include "4ed_font_interface.h"
#include "4ed_system_types.h"
#include "4coder_system_types.h"
#define DYNAMIC_LINK_API
#include "generated/system_api.h"
#include "4ed_font_interface.h"
#define DYNAMIC_LINK_API
#include "generated/graphics_api.h"
#define DYNAMIC_LINK_API
@ -36,7 +37,7 @@
#include "4coder_string_match.cpp"
#include "4coder_stringf.cpp"
#include "4coder_app_links_allocator.cpp"
#include "4ed_system_allocator.cpp"
#include "4coder_system_allocator.cpp"
#include "4coder_hash_functions.cpp"
#include "4coder_table.cpp"
@ -76,6 +77,7 @@
#define DYNAMIC_LINK_API
#include "generated/font_api.cpp"
#include "4coder_system_helpers.cpp"
#include "4ed_allocator_models.cpp"
#include "4ed_log.cpp"
#include "4coder_log.cpp"

View File

@ -12,7 +12,7 @@
//#define FM_PRINT_COMMANDS
#include "4coder_base_types.h"
#include "api/4coder_version.h"
#include "4coder_version.h"
#include "4coder_base_types.cpp"
#include "4coder_malloc_allocator.cpp"

View File

@ -710,8 +710,8 @@ CUSTOM_DOC("Decrease the size of the face used by the current buffer.")
CUSTOM_COMMAND_SIG(mouse_wheel_change_face_size)
CUSTOM_DOC("Reads the state of the mouse wheel and uses it to either increase or decrease the face size.")
{
static Microsecond_Time_Stamp next_resize_time = 0;
Microsecond_Time_Stamp now = get_microseconds_timestamp(app);
static u64 next_resize_time = 0;
u64 now = system_now_time();
if (now >= next_resize_time){
next_resize_time = now + 50*1000;
Mouse_State mouse = get_mouse_state(app);
@ -729,9 +729,8 @@ CUSTOM_DOC("Toggles the current buffer's virtual whitespace status.")
{
View_ID view = get_active_view(app, AccessProtected);
Buffer_ID buffer = view_get_buffer(app, view, AccessProtected);
i32 vwhite = 0;
buffer_get_setting(app, buffer, BufferSetting_VirtualWhitespace, &vwhite);
buffer_set_setting(app, buffer, BufferSetting_VirtualWhitespace, !vwhite);
(void)buffer;
NotImplemented;
}
CUSTOM_COMMAND_SIG(toggle_show_whitespace)

View File

@ -4,17 +4,15 @@
// TOP
#define DYNAMIC_LINK_API
#include "generated/custom_api.cpp"
extern "C" b32
get_version(i32 maj, i32 min, i32 patch){
return(maj == MAJOR && min == MINOR && patch == PATCH);
}
extern "C" void
init_apis(API_VTable_custom *custom_vtable){
init_apis(API_VTable_custom *custom_vtable, API_VTable_system *system_vtable){
custom_api_read_vtable(custom_vtable);
system_api_read_vtable(system_vtable);
}
// BOTTOM

View File

@ -274,34 +274,34 @@ create_or_switch_to_buffer_and_clear_by_name(Application_Links *app, String_Cons
////////////////////////////////
static void
set_mouse_suppression(Application_Links *app, b32 suppress){
function void
set_mouse_suppression(b32 suppress){
if (suppress){
suppressing_mouse = true;
show_mouse_cursor(app, MouseCursorShow_Never);
system_show_mouse_cursor(MouseCursorShow_Never);
}
else{
suppressing_mouse = false;
show_mouse_cursor(app, MouseCursorShow_Always);
system_show_mouse_cursor(MouseCursorShow_Always);
}
}
CUSTOM_COMMAND_SIG(suppress_mouse)
CUSTOM_DOC("Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.")
{
set_mouse_suppression(app, true);
set_mouse_suppression(true);
}
CUSTOM_COMMAND_SIG(allow_mouse)
CUSTOM_DOC("Shows the mouse and causes all mouse input to be processed normally.")
{
set_mouse_suppression(app, false);
set_mouse_suppression(false);
}
CUSTOM_COMMAND_SIG(toggle_mouse)
CUSTOM_DOC("Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.")
{
set_mouse_suppression(app, !suppressing_mouse);
set_mouse_suppression(!suppressing_mouse);
}
CUSTOM_COMMAND_SIG(set_mode_to_original)
@ -337,7 +337,7 @@ CUSTOM_DOC("In code files matching parentheses pairs are colored with distinguis
CUSTOM_COMMAND_SIG(toggle_fullscreen)
CUSTOM_DOC("Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.")
{
set_fullscreen(app, !is_fullscreen(app));
system_set_fullscreen(!system_is_fullscreen());
}
////////////////////////////////

View File

@ -1016,17 +1016,9 @@ BUFFER_HOOK_SIG(default_file_settings){
buffer_get_setting(app, buffer_id, BufferSetting_MapID, &map_id_query);
Assert(map_id_query == default_lister_ui_map);
// TODO(allen): kill all concepts of wrap width as settings
#if 0
buffer_set_setting(app, buffer_id, BufferSetting_WrapPosition, global_config.default_wrap_width);
buffer_set_setting(app, buffer_id, BufferSetting_MinimumBaseWrapPosition, global_config.default_min_base_width);
#endif
buffer_set_setting(app, buffer_id, BufferSetting_MapID, map_id);
buffer_get_setting(app, buffer_id, BufferSetting_MapID, &map_id_query);
Assert(map_id_query == map_id);
#if 0
buffer_set_setting(app, buffer_id, BufferSetting_ParserContext, parse_context_id);
#endif
// NOTE(allen): Decide buffer settings
b32 wrap_lines = true;
@ -1047,19 +1039,6 @@ BUFFER_HOOK_SIG(default_file_settings){
do_full_lex(app, buffer_id);
}
#if 0
// NOTE(allen|a4.0.12): There is a little bit of grossness going on here.
// If we set BufferSetting_Lex to true, it will launch a lexing job.
// If a lexing job is active when we set BufferSetting_VirtualWhitespace, the call can fail.
// Unfortunantely without tokens virtual whitespace doesn't really make sense.
// So for now I have it automatically turning on lexing when virtual whitespace is turned on.
// Cleaning some of that up is a goal for future versions.
buffer_set_setting(app, buffer_id, BufferSetting_LexWithoutStrings, lex_without_strings);
buffer_set_setting(app, buffer_id, BufferSetting_WrapLine, wrap_lines);
buffer_set_setting(app, buffer_id, BufferSetting_VirtualWhitespace, use_virtual_whitespace);
buffer_set_setting(app, buffer_id, BufferSetting_Lex, use_lexer);
#endif
// no meaning for return
return(0);
}
@ -1073,10 +1052,8 @@ BUFFER_HOOK_SIG(default_new_file){
BUFFER_HOOK_SIG(default_file_save){
b32 is_virtual = false;
if (global_config.automatically_indent_text_on_save &&
buffer_get_setting(app, buffer_id, BufferSetting_VirtualWhitespace, &is_virtual)){
if (is_virtual){
auto_indent_buffer(app, buffer_id, buffer_range(app, buffer_id));
}
is_virtual){
auto_indent_buffer(app, buffer_id, buffer_range(app, buffer_id));
}
// no meaning for return
return(0);

View File

@ -8,7 +8,15 @@
#define FCODER_DEFAULT_INCLUDE_CPP
#include "4coder_base_types.h"
#include "api/4coder_custom.h"
#include "4coder_version.h"
#include "4coder_keycodes.h"
#include "4coder_default_colors.h"
#include "4coder_types.h"
#define DYNAMIC_LINK_API
#include "generated/custom_api.h"
#include "4coder_system_types.h"
#define DYNAMIC_LINK_API
#include "generated/system_api.h"
#include "generated/command_metadata.h"
#include "4coder_base_types.cpp"
@ -38,7 +46,14 @@
#include "4coder_combined_write_commands.h"
#include "4coder_log_parser.h"
#include "api/4coder_custom.cpp"
////////////////////////////////
#define DYNAMIC_LINK_API
#include "generated/custom_api.cpp"
#define DYNAMIC_LINK_API
#include "generated/system_api.cpp"
#include "4coder_system_helpers.cpp"
#include "4coder_custom.cpp"
#include "4coder_log.cpp"
#include "4coder_hash_functions.cpp"
#include "4coder_table.cpp"
@ -64,7 +79,7 @@
#include "4coder_jump_lister.cpp"
#include "4coder_log_parser.cpp"
#include "4coder_clipboard.cpp"
#include "4coder_system_command.cpp"
#include "4coder_cli_command.cpp"
#include "4coder_build_commands.cpp"
#include "4coder_project_commands.cpp"
#include "4coder_function_list.cpp"

View File

@ -2052,7 +2052,7 @@ open_file_try_current_path_then_binary_path(Application_Links *app, char *file_n
if (file == 0){
Scratch_Block scratch(app);
List_String_Const_u8 list = {};
string_list_push(scratch, &list, push_4ed_path(app, scratch));
string_list_push(scratch, &list, system_get_path(scratch, SystemPath_Binary));
string_list_push_overlap(scratch, &list, '/', SCu8(file_name));
String_Const_u8 str = string_list_flatten(scratch, list, StringFill_NullTerminate);
file = fopen((char*)str.str, "rb");

View File

@ -534,7 +534,7 @@ generate_hot_directory_file_list(Application_Links *app, Lister *lister){
lister_set_text_field(lister, hot);
lister_set_key(lister, string_front_of_path(hot));
File_List file_list = get_file_list(app, scratch, hot);
File_List file_list = system_get_file_list(scratch, hot);
end_temp(temp);
File_Info **one_past_last = file_list.infos + file_list.count;

View File

@ -91,7 +91,7 @@ open_all_files_in_directory_pattern_match__recursive(Application_Links *app,
Project_File_Pattern_Array blacklist,
u32 flags){
Scratch_Block scratch(app);
File_List list = get_file_list(app, scratch, path);
File_List list = system_get_file_list(scratch, path);
File_Info **info = list.infos;
for (u32 i = 0; i < list.count; ++i, ++info){

View File

@ -0,0 +1,21 @@
/*
* 4coder_system_types.h - Implementation of universal (cross platform) helpers
*/
// TOP
Mutex_Lock::Mutex_Lock(System_Mutex m){
system_mutex_acquire(m);
this->mutex = m;
}
Mutex_Lock::~Mutex_Lock(){
system_mutex_release(this->mutex);
}
Mutex_Lock::operator System_Mutex(){
return(this->mutex);
}
// BOTTOM

View File

@ -1,10 +1,5 @@
/*
* Mr. 4th Dimention - Allen Webster
*
* 21.01.2015
*
* System API types.
*
* 4coder_system_types.h - Types relating to the system api.
*/
// TOP
@ -36,6 +31,13 @@ enum{
SystemPath_Binary,
};
struct Mutex_Lock{
Mutex_Lock(System_Mutex mutex);
~Mutex_Lock();
operator System_Mutex();
System_Mutex mutex;
};
#endif
// BOTTOM

View File

@ -19,7 +19,8 @@ struct Application_Links{
i32 type_coroutine;
};
typedef b32 _Get_Version_Function(i32 maj, i32 min, i32 patch);
typedef void _Init_APIs(struct API_VTable_custom *custom_vtable);
typedef void _Init_APIs(struct API_VTable_custom *custom_vtable,
struct API_VTable_system *system_vtable);
////////////////////////////////
@ -106,7 +107,6 @@ ENUM(i32, Buffer_Setting_ID){
BufferSetting_Eol,
BufferSetting_Unimportant,
BufferSetting_ReadOnly,
BufferSetting_VirtualWhitespace,
BufferSetting_RecordsHistory,
};
@ -257,8 +257,6 @@ STRUCT Parser_String_And_Type{
u32 type;
};
TYPEDEF u64 Microsecond_Time_Stamp;
ENUM(u32, File_Attribute_Flag){
FileAttribute_IsDirectory = 1,
};

View File

@ -1,20 +0,0 @@
/*
4coder_custom.h
*/
// TOP
#ifndef FCODER_CUSTOM_H
#define FCODER_CUSTOM_H
#include "api/4coder_version.h"
#include "api/4coder_keycodes.h"
#include "api/4coder_default_colors.h"
#include "api/4coder_types.h"
#define DYNAMIC_LINK_API
#include "generated/custom_api.h"
#endif
// BOTTOM

View File

@ -327,43 +327,43 @@ static Command_Metadata fcoder_metacmd_table[226] = {
{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 699 },
{ PROC_LINKS(mouse_wheel_change_face_size, 0), "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 710 },
{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 727 },
{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 737 },
{ PROC_LINKS(toggle_line_numbers, 0), "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 746 },
{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 752 },
{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 760 },
{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 768 },
{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 776 },
{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 967 },
{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 973 },
{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 979 },
{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 990 },
{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for a needle and string. Replaces all occurences of needle with string in the range between cursor and the mark in the active buffer.", 150, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1041 },
{ PROC_LINKS(replace_in_buffer, 0), "replace_in_buffer", 17, "Queries the user for a needle and string. Replaces all occurences of needle with string in the active buffer.", 109, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1050 },
{ PROC_LINKS(replace_in_all_buffers, 0), "replace_in_all_buffers", 22, "Queries the user for a needle and string. Replaces all occurences of needle with string in all editable buffers.", 112, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1059 },
{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1147 },
{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1167 },
{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1183 },
{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1218 },
{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1243 },
{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1281 },
{ PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1313 },
{ PROC_LINKS(make_directory_query, 0), "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1350 },
{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1383 },
{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1389 },
{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1395 },
{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1409 },
{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1474 },
{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1506 },
{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1519 },
{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1531 },
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1567 },
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1575 },
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1585 },
{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1812 },
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1825 },
{ PROC_LINKS(undo_all_buffers, 0), "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1839 },
{ PROC_LINKS(redo_all_buffers, 0), "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1910 },
{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 2011 },
{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 736 },
{ PROC_LINKS(toggle_line_numbers, 0), "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 745 },
{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 751 },
{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 759 },
{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 767 },
{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 775 },
{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 966 },
{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 972 },
{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 978 },
{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 989 },
{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for a needle and string. Replaces all occurences of needle with string in the range between cursor and the mark in the active buffer.", 150, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1040 },
{ PROC_LINKS(replace_in_buffer, 0), "replace_in_buffer", 17, "Queries the user for a needle and string. Replaces all occurences of needle with string in the active buffer.", 109, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1049 },
{ PROC_LINKS(replace_in_all_buffers, 0), "replace_in_all_buffers", 22, "Queries the user for a needle and string. Replaces all occurences of needle with string in all editable buffers.", 112, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1058 },
{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1146 },
{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1166 },
{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1182 },
{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1217 },
{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1242 },
{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1280 },
{ PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1312 },
{ PROC_LINKS(make_directory_query, 0), "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1349 },
{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1382 },
{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1388 },
{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1394 },
{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1408 },
{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1473 },
{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1505 },
{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1518 },
{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1530 },
{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1566 },
{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1574 },
{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1584 },
{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1811 },
{ PROC_LINKS(redo, 0), "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1824 },
{ PROC_LINKS(undo_all_buffers, 0), "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1838 },
{ PROC_LINKS(redo_all_buffers, 0), "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 1909 },
{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 2010 },
{ PROC_LINKS(lister__quit, 0), "lister__quit", 12, "A lister mode command that quits the list without executing any actions.", 72, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 8 },
{ PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 15 },
{ PROC_LINKS(lister__write_character, 0), "lister__write_character", 23, "A lister mode command that dispatches to the lister's write character handler.", 78, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 30 },
@ -426,8 +426,8 @@ static Command_Metadata fcoder_metacmd_table[226] = {
{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 73 },
{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 115 },
{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 122 },
{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "w:\\4ed\\code\\custom\\4coder_system_command.cpp", 44, 7 },
{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "w:\\4ed\\code\\custom\\4coder_system_command.cpp", 44, 22 },
{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "w:\\4ed\\code\\custom\\4coder_cli_command.cpp", 41, 7 },
{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "w:\\4ed\\code\\custom\\4coder_cli_command.cpp", 41, 22 },
{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "w:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 128 },
{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "w:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 163 },
{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "w:\\4ed\\code\\custom\\4coder_build_commands.cpp", 44, 178 },

View File

@ -149,19 +149,10 @@ vtable->get_theme_colors = get_theme_colors;
vtable->finalize_color = finalize_color;
vtable->push_hot_directory = push_hot_directory;
vtable->set_hot_directory = set_hot_directory;
vtable->get_file_list = get_file_list;
vtable->set_gui_up_down_keys = set_gui_up_down_keys;
vtable->memory_allocate = memory_allocate;
vtable->memory_set_protection = memory_set_protection;
vtable->memory_free = memory_free;
vtable->push_4ed_path = push_4ed_path;
vtable->show_mouse_cursor = show_mouse_cursor;
vtable->set_edit_finished_hook_repeat_speed = set_edit_finished_hook_repeat_speed;
vtable->set_fullscreen = set_fullscreen;
vtable->is_fullscreen = is_fullscreen;
vtable->send_exit_signal = send_exit_signal;
vtable->set_window_title = set_window_title;
vtable->get_microseconds_timestamp = get_microseconds_timestamp;
vtable->draw_string_oriented = draw_string_oriented;
vtable->get_string_advance = get_string_advance;
vtable->draw_rectangle = draw_rectangle;
@ -333,19 +324,10 @@ get_theme_colors = vtable->get_theme_colors;
finalize_color = vtable->finalize_color;
push_hot_directory = vtable->push_hot_directory;
set_hot_directory = vtable->set_hot_directory;
get_file_list = vtable->get_file_list;
set_gui_up_down_keys = vtable->set_gui_up_down_keys;
memory_allocate = vtable->memory_allocate;
memory_set_protection = vtable->memory_set_protection;
memory_free = vtable->memory_free;
push_4ed_path = vtable->push_4ed_path;
show_mouse_cursor = vtable->show_mouse_cursor;
set_edit_finished_hook_repeat_speed = vtable->set_edit_finished_hook_repeat_speed;
set_fullscreen = vtable->set_fullscreen;
is_fullscreen = vtable->is_fullscreen;
send_exit_signal = vtable->send_exit_signal;
set_window_title = vtable->set_window_title;
get_microseconds_timestamp = vtable->get_microseconds_timestamp;
draw_string_oriented = vtable->draw_string_oriented;
get_string_advance = vtable->get_string_advance;
draw_rectangle = vtable->draw_rectangle;

View File

@ -147,19 +147,10 @@
#define custom_finalize_color_sig() argb_color custom_finalize_color(Application_Links* app, int_color color)
#define custom_push_hot_directory_sig() String_Const_u8 custom_push_hot_directory(Application_Links* app, Arena* arena)
#define custom_set_hot_directory_sig() b32 custom_set_hot_directory(Application_Links* app, String_Const_u8 string)
#define custom_get_file_list_sig() File_List custom_get_file_list(Application_Links* app, Arena* arena, String_Const_u8 directory)
#define custom_set_gui_up_down_keys_sig() void custom_set_gui_up_down_keys(Application_Links* app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier)
#define custom_memory_allocate_sig() void* custom_memory_allocate(Application_Links* app, i32 size)
#define custom_memory_set_protection_sig() b32 custom_memory_set_protection(Application_Links* app, void* ptr, i32 size, Memory_Protect_Flags flags)
#define custom_memory_free_sig() void custom_memory_free(Application_Links* app, void* ptr, i32 size)
#define custom_push_4ed_path_sig() String_Const_u8 custom_push_4ed_path(Application_Links* app, Arena* arena)
#define custom_show_mouse_cursor_sig() void custom_show_mouse_cursor(Application_Links* app, Mouse_Cursor_Show_Type show)
#define custom_set_edit_finished_hook_repeat_speed_sig() b32 custom_set_edit_finished_hook_repeat_speed(Application_Links* app, u32 milliseconds)
#define custom_set_fullscreen_sig() b32 custom_set_fullscreen(Application_Links* app, b32 full_screen)
#define custom_is_fullscreen_sig() b32 custom_is_fullscreen(Application_Links* app)
#define custom_send_exit_signal_sig() void custom_send_exit_signal(Application_Links* app)
#define custom_set_window_title_sig() b32 custom_set_window_title(Application_Links* app, String_Const_u8 title)
#define custom_get_microseconds_timestamp_sig() Microsecond_Time_Stamp custom_get_microseconds_timestamp(Application_Links* app)
#define custom_draw_string_oriented_sig() Vec2 custom_draw_string_oriented(Application_Links* app, Face_ID font_id, String_Const_u8 str, Vec2 point, int_color color, u32 flags, Vec2 delta)
#define custom_get_string_advance_sig() f32 custom_get_string_advance(Application_Links* app, Face_ID font_id, String_Const_u8 str)
#define custom_draw_rectangle_sig() void custom_draw_rectangle(Application_Links* app, Rect_f32 rect, int_color color)
@ -327,19 +318,10 @@ typedef void custom_get_theme_colors_type(Application_Links* app, Theme_Color* c
typedef argb_color custom_finalize_color_type(Application_Links* app, int_color color);
typedef String_Const_u8 custom_push_hot_directory_type(Application_Links* app, Arena* arena);
typedef b32 custom_set_hot_directory_type(Application_Links* app, String_Const_u8 string);
typedef File_List custom_get_file_list_type(Application_Links* app, Arena* arena, String_Const_u8 directory);
typedef void custom_set_gui_up_down_keys_type(Application_Links* app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier);
typedef void* custom_memory_allocate_type(Application_Links* app, i32 size);
typedef b32 custom_memory_set_protection_type(Application_Links* app, void* ptr, i32 size, Memory_Protect_Flags flags);
typedef void custom_memory_free_type(Application_Links* app, void* ptr, i32 size);
typedef String_Const_u8 custom_push_4ed_path_type(Application_Links* app, Arena* arena);
typedef void custom_show_mouse_cursor_type(Application_Links* app, Mouse_Cursor_Show_Type show);
typedef b32 custom_set_edit_finished_hook_repeat_speed_type(Application_Links* app, u32 milliseconds);
typedef b32 custom_set_fullscreen_type(Application_Links* app, b32 full_screen);
typedef b32 custom_is_fullscreen_type(Application_Links* app);
typedef void custom_send_exit_signal_type(Application_Links* app);
typedef b32 custom_set_window_title_type(Application_Links* app, String_Const_u8 title);
typedef Microsecond_Time_Stamp custom_get_microseconds_timestamp_type(Application_Links* app);
typedef Vec2 custom_draw_string_oriented_type(Application_Links* app, Face_ID font_id, String_Const_u8 str, Vec2 point, int_color color, u32 flags, Vec2 delta);
typedef f32 custom_get_string_advance_type(Application_Links* app, Face_ID font_id, String_Const_u8 str);
typedef void custom_draw_rectangle_type(Application_Links* app, Rect_f32 rect, int_color color);
@ -508,19 +490,10 @@ custom_get_theme_colors_type *get_theme_colors;
custom_finalize_color_type *finalize_color;
custom_push_hot_directory_type *push_hot_directory;
custom_set_hot_directory_type *set_hot_directory;
custom_get_file_list_type *get_file_list;
custom_set_gui_up_down_keys_type *set_gui_up_down_keys;
custom_memory_allocate_type *memory_allocate;
custom_memory_set_protection_type *memory_set_protection;
custom_memory_free_type *memory_free;
custom_push_4ed_path_type *push_4ed_path;
custom_show_mouse_cursor_type *show_mouse_cursor;
custom_set_edit_finished_hook_repeat_speed_type *set_edit_finished_hook_repeat_speed;
custom_set_fullscreen_type *set_fullscreen;
custom_is_fullscreen_type *is_fullscreen;
custom_send_exit_signal_type *send_exit_signal;
custom_set_window_title_type *set_window_title;
custom_get_microseconds_timestamp_type *get_microseconds_timestamp;
custom_draw_string_oriented_type *draw_string_oriented;
custom_get_string_advance_type *get_string_advance;
custom_draw_rectangle_type *draw_rectangle;
@ -690,19 +663,10 @@ internal void get_theme_colors(Application_Links* app, Theme_Color* colors, i32
internal argb_color finalize_color(Application_Links* app, int_color color);
internal String_Const_u8 push_hot_directory(Application_Links* app, Arena* arena);
internal b32 set_hot_directory(Application_Links* app, String_Const_u8 string);
internal File_List get_file_list(Application_Links* app, Arena* arena, String_Const_u8 directory);
internal void set_gui_up_down_keys(Application_Links* app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier);
internal void* memory_allocate(Application_Links* app, i32 size);
internal b32 memory_set_protection(Application_Links* app, void* ptr, i32 size, Memory_Protect_Flags flags);
internal void memory_free(Application_Links* app, void* ptr, i32 size);
internal String_Const_u8 push_4ed_path(Application_Links* app, Arena* arena);
internal void show_mouse_cursor(Application_Links* app, Mouse_Cursor_Show_Type show);
internal b32 set_edit_finished_hook_repeat_speed(Application_Links* app, u32 milliseconds);
internal b32 set_fullscreen(Application_Links* app, b32 full_screen);
internal b32 is_fullscreen(Application_Links* app);
internal void send_exit_signal(Application_Links* app);
internal b32 set_window_title(Application_Links* app, String_Const_u8 title);
internal Microsecond_Time_Stamp get_microseconds_timestamp(Application_Links* app);
internal Vec2 draw_string_oriented(Application_Links* app, Face_ID font_id, String_Const_u8 str, Vec2 point, int_color color, u32 flags, Vec2 delta);
internal f32 get_string_advance(Application_Links* app, Face_ID font_id, String_Const_u8 str);
internal void draw_rectangle(Application_Links* app, Rect_f32 rect, int_color color);
@ -872,19 +836,10 @@ global custom_get_theme_colors_type *get_theme_colors = 0;
global custom_finalize_color_type *finalize_color = 0;
global custom_push_hot_directory_type *push_hot_directory = 0;
global custom_set_hot_directory_type *set_hot_directory = 0;
global custom_get_file_list_type *get_file_list = 0;
global custom_set_gui_up_down_keys_type *set_gui_up_down_keys = 0;
global custom_memory_allocate_type *memory_allocate = 0;
global custom_memory_set_protection_type *memory_set_protection = 0;
global custom_memory_free_type *memory_free = 0;
global custom_push_4ed_path_type *push_4ed_path = 0;
global custom_show_mouse_cursor_type *show_mouse_cursor = 0;
global custom_set_edit_finished_hook_repeat_speed_type *set_edit_finished_hook_repeat_speed = 0;
global custom_set_fullscreen_type *set_fullscreen = 0;
global custom_is_fullscreen_type *is_fullscreen = 0;
global custom_send_exit_signal_type *send_exit_signal = 0;
global custom_set_window_title_type *set_window_title = 0;
global custom_get_microseconds_timestamp_type *get_microseconds_timestamp = 0;
global custom_draw_string_oriented_type *draw_string_oriented = 0;
global custom_get_string_advance_type *get_string_advance = 0;
global custom_draw_rectangle_type *draw_rectangle = 0;

View File

@ -147,19 +147,10 @@ api(custom) function void get_theme_colors(Application_Links* app, Theme_Color*
api(custom) function argb_color finalize_color(Application_Links* app, int_color color);
api(custom) function String_Const_u8 push_hot_directory(Application_Links* app, Arena* arena);
api(custom) function b32 set_hot_directory(Application_Links* app, String_Const_u8 string);
api(custom) function File_List get_file_list(Application_Links* app, Arena* arena, String_Const_u8 directory);
api(custom) function void set_gui_up_down_keys(Application_Links* app, Key_Code up_key, Key_Modifier up_key_modifier, Key_Code down_key, Key_Modifier down_key_modifier);
api(custom) function void* memory_allocate(Application_Links* app, i32 size);
api(custom) function b32 memory_set_protection(Application_Links* app, void* ptr, i32 size, Memory_Protect_Flags flags);
api(custom) function void memory_free(Application_Links* app, void* ptr, i32 size);
api(custom) function String_Const_u8 push_4ed_path(Application_Links* app, Arena* arena);
api(custom) function void show_mouse_cursor(Application_Links* app, Mouse_Cursor_Show_Type show);
api(custom) function b32 set_edit_finished_hook_repeat_speed(Application_Links* app, u32 milliseconds);
api(custom) function b32 set_fullscreen(Application_Links* app, b32 full_screen);
api(custom) function b32 is_fullscreen(Application_Links* app);
api(custom) function void send_exit_signal(Application_Links* app);
api(custom) function b32 set_window_title(Application_Links* app, String_Const_u8 title);
api(custom) function Microsecond_Time_Stamp get_microseconds_timestamp(Application_Links* app);
api(custom) function Vec2 draw_string_oriented(Application_Links* app, Face_ID font_id, String_Const_u8 str, Vec2 point, int_color color, u32 flags, Vec2 delta);
api(custom) function f32 get_string_advance(Application_Links* app, Face_ID font_id, String_Const_u8 str);
api(custom) function void draw_rectangle(Application_Links* app, Rect_f32 rect, int_color color);

View File

@ -14,16 +14,17 @@
#include "4coder_base_types.h"
#include "4coder_table.h"
#include "api/4coder_version.h"
#include "4coder_version.h"
#include "api/4coder_keycodes.h"
#include "api/4coder_default_colors.h"
#include "api/4coder_types.h"
#include "4coder_keycodes.h"
#include "4coder_default_colors.h"
#include "4coder_types.h"
#include "4ed_font_interface.h"
#include "4ed_system_types.h"
#include "4coder_system_types.h"
#define STATIC_LINK_API
#include "generated/system_api.h"
#include "4ed_font_interface.h"
#define STATIC_LINK_API
#include "generated/graphics_api.h"
#define STATIC_LINK_API
@ -106,12 +107,11 @@ struct Win32_Input_Chunk{
#define SLASH '\\'
#define DLL "dll"
#include "4ed_font_face.cpp"
#include "4ed_mem.cpp"
#include "4coder_hash_functions.cpp"
#include "4coder_system_allocator.cpp"
#include "4ed_system_allocator.cpp"
#include "4ed_font_face.cpp"
#include "4ed_mem.cpp"
#include "4ed_font_set.cpp"
////////////////////////////////