diff --git a/4ed.cpp b/4ed.cpp index a4efdd4f..17f37875 100644 --- a/4ed.cpp +++ b/4ed.cpp @@ -748,6 +748,10 @@ App_Step_Sig(app_step){ } } + if (models->whole_screen_render_caller != 0){ + models->whole_screen_render_caller(&app, frame); + } + models->in_render_mode = false; end_render_section(target); } diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index 10539c10..aa5efd9f 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -2234,6 +2234,10 @@ set_custom_hook(Application_Links *app, Hook_ID hook_id, Void_Func *func_ptr){ { models->render_caller = (Render_Caller_Function*)func_ptr; }break; + case HookID_WholeScreenRenderCaller: + { + models->whole_screen_render_caller = (Whole_Screen_Render_Caller_Function*)func_ptr; + }break; case HookID_BufferNameResolver: { models->buffer_name_resolver = (Buffer_Name_Resolver_Function*)func_ptr; diff --git a/4ed_app_models.h b/4ed_app_models.h index 71ea3254..daf24b34 100644 --- a/4ed_app_models.h +++ b/4ed_app_models.h @@ -62,6 +62,7 @@ struct Models{ Tick_Function *tick; Render_Caller_Function *render_caller; + Whole_Screen_Render_Caller_Function *whole_screen_render_caller; Delta_Rule_Function *delta_rule; u64 delta_rule_memory_size; diff --git a/custom/4coder_config.cpp b/custom/4coder_config.cpp index aef8a748..d2134b86 100644 --- a/custom/4coder_config.cpp +++ b/custom/4coder_config.cpp @@ -1367,7 +1367,7 @@ config_parse__file_name(Application_Links *app, Arena *arena, char *file_name, C if (data.data != 0){ parsed = config_parse__data(app, arena, SCu8(file_name), SCu8(data), config); - success = true; + success = true; } } if (!success){ diff --git a/custom/4coder_default_hooks.cpp b/custom/4coder_default_hooks.cpp index 16d8f335..4756c8e2 100644 --- a/custom/4coder_default_hooks.cpp +++ b/custom/4coder_default_hooks.cpp @@ -474,6 +474,20 @@ default_render_caller(Application_Links *app, Frame_Info frame_info, View_ID vie draw_set_clip(app, prev_clip); } +function void +default_whole_screen_render_caller(Application_Links *app, Frame_Info frame_info){ +#if 0 + Rect_f32 region = global_get_screen_rectangle(app); + Vec2_f32 center = rect_center(region); + + Face_ID face_id = get_face_id(app, 0); + Scratch_Block scratch(app); + draw_string_oriented(app, face_id, finalize_color(defcolor_text_default, 0), + SCu8("Hello, World!"), center, + GlyphFlag_Rotate90, V2f32(0.f, 1.f)); +#endif +} + HOOK_SIG(default_view_adjust){ // NOTE(allen): Called whenever the view layout/sizes have been modified, // including by full window resize. @@ -1022,6 +1036,7 @@ set_all_default_hooks(Application_Links *app){ set_custom_hook(app, HookID_ViewEventHandler, default_view_input_handler); set_custom_hook(app, HookID_Tick, default_tick); set_custom_hook(app, HookID_RenderCaller, default_render_caller); + set_custom_hook(app, HookID_WholeScreenRenderCaller, default_whole_screen_render_caller); #if 0 set_custom_hook(app, HookID_DeltaRule, original_delta); set_custom_hook_memory_size(app, HookID_DeltaRule, diff --git a/custom/4coder_types.h b/custom/4coder_types.h index e979bd8c..0898ad28 100644 --- a/custom/4coder_types.h +++ b/custom/4coder_types.h @@ -638,6 +638,7 @@ typedef i32 Hook_ID; enum{ HookID_Tick, HookID_RenderCaller, + HookID_WholeScreenRenderCaller, HookID_DeltaRule, HookID_BufferViewerUpdate, HookID_ViewEventHandler, @@ -695,6 +696,9 @@ typedef void Tick_Function(Application_Links *app, Frame_Info frame_info); api(custom) typedef void Render_Caller_Function(Application_Links *app, Frame_Info frame_info, View_ID view); +api(custom) +typedef void Whole_Screen_Render_Caller_Function(Application_Links *app, Frame_Info frame_info); + api(custom) typedef u32 Layout_Item_Flag; enum{ diff --git a/custom/bin/buildsuper_x64-linux.sh b/custom/bin/buildsuper_x64-linux.sh index 7b975b16..d6f0a00e 100755 --- a/custom/bin/buildsuper_x64-linux.sh +++ b/custom/bin/buildsuper_x64-linux.sh @@ -13,7 +13,7 @@ SOURCE="$1" if [ -z "$SOURCE" ]; then SOURCE="$(readlink -f "$CODE_HOME/4coder_default_bindings.cpp")" fi - +echo SOURCE = $SOURCE opts="-Wno-write-strings -Wno-null-dereference -Wno-comment -Wno-switch -Wno-missing-declarations -Wno-logical-op-parentheses -g -DOS_LINUX=1 -DOS_WINDOWS=0 -DOS_MAC=1" arch=-m64 diff --git a/custom/metadata_generator b/custom/metadata_generator deleted file mode 100755 index 3722d42e..00000000 Binary files a/custom/metadata_generator and /dev/null differ diff --git a/ship_files/changes.txt b/ship_files/changes.txt index 18c6edad..2c75b6d6 100644 --- a/ship_files/changes.txt +++ b/ship_files/changes.txt @@ -12,6 +12,7 @@ + Fix: never miss the most recent post to the clipboard on windows + Fix: command `load_theme_current_buffer` gaurds against destroying the active color palette when bad files are loaded + Fix: project deep copy routine copies strings in the whitelist and blacklist pattern arrays + + Fix: footer panel manipulation functions check if the view exists 4.1.3 + Unkillable buffer setting @@ -85,7 +86,7 @@ New in alpha 4.0.29: -Highlighting and marking API, supporting customizable line higlights, range highlights, cursors and marks -In config.4coder "use_line_highlight" enables the highlight at the cursor in the active view -In config.4coder "use_scope_highlight" enables background highlighting to distinguish scopes in code files --In config.4coder "use_paren_helper" enalbes distinct coloring for matching parentheses +-In config.4coder "use_paren_helper" enalbes distinct coloring for matching parentheses -In config.4coder "use_comment_keyword" enables special coloring for the strings 'TODO' and 'NOTE' anywhere they occur, in code or text -In config.4coder "mode" sets the editing mode "4coder" the default 4coder mode