From: Brendan Hansen Date: Fri, 12 Nov 2021 20:56:33 +0000 (-0600) Subject: changed #private to #package and #private_file to #local X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;p=onyx-wasm-analyzer.git changed #private to #package and #private_file to #local --- diff --git a/data/test_console.onyx b/data/test_console.onyx index b738107..afde052 100644 --- a/data/test_console.onyx +++ b/data/test_console.onyx @@ -3,7 +3,7 @@ } use package core -#private_file wasm :: package wasm_utils +#local wasm :: package wasm_utils // Testing running on the console main :: (args: [] cstr) { diff --git a/src/app/app.onyx b/src/app/app.onyx index a082166..ac4eead 100644 --- a/src/app/app.onyx +++ b/src/app/app.onyx @@ -1,6 +1,6 @@ package app -#private_file { +#local { events :: package js_events gl :: package gl gfx :: package immediate_mode @@ -48,7 +48,7 @@ Active_File :: struct { data := (#type [] u8).{ null, 0 }; } -#private_file MAXIMUM_WINDOWS :: 128 +#local MAXIMUM_WINDOWS :: 128 Application_Window :: struct { id: str; @@ -412,7 +412,7 @@ open_tool_opener :: macro () { } @Relocate // This should be moved to somewhere else when the code base. -#private_file { +#local { background_tile_texture : gfx.Texture; draw_background_lines :: (width, height: f32, line_color := gfx.Color4.{0.2, 0.2, 0.2}, line_spacing := 32.0f) { diff --git a/src/app/colors.onyx b/src/app/colors.onyx index 6a49d35..c051432 100644 --- a/src/app/colors.onyx +++ b/src/app/colors.onyx @@ -2,7 +2,7 @@ package app use package core -#private_file { +#local { events :: package js_events gl :: package gl gfx :: package immediate_mode diff --git a/src/app/debug_log.onyx b/src/app/debug_log.onyx index f703cef..35ba67d 100644 --- a/src/app/debug_log.onyx +++ b/src/app/debug_log.onyx @@ -2,14 +2,14 @@ package debug use package core -#private_file { +#local { app :: package app ui :: package ui gfx :: package immediate_mode config :: package config } -#private { +#package { scrollable_region := ui.Scrollable_Region_State.{}; debug_log_y_offset := 0.0f; @@ -145,7 +145,7 @@ draw_debug_log :: (window_rectangle: ui.Rectangle, site := #callsite) { ui.draw_text(r, conv.str_format(buf, "H: {}\n", alloc.heap.get_watermark())); } -#private_file log_buffer : struct { +#local log_buffer : struct { line_arena : alloc.arena.ArenaState; lines : [..] str; } diff --git a/src/app/editor.onyx b/src/app/editor.onyx index 1d86b61..1e4b22e 100644 --- a/src/app/editor.onyx +++ b/src/app/editor.onyx @@ -1,6 +1,6 @@ package editor -#private_file { +#local { app :: package app ui :: package ui config :: package config @@ -46,7 +46,7 @@ editor_window_draw :: (obj: any, win: ^app.Application_Window, site := #callsite // The nitty-gritty of how everything is rendered. // -#private_file { +#local { __counter : i32; msg_buffer : [512] u8; @@ -186,7 +186,7 @@ editor_window_draw :: (obj: any, win: ^app.Application_Window, site := #callsite } } -#private_file gfx :: package immediate_mode +#local gfx :: package immediate_mode #tag gfx.Color4.r, Slider_Float.{ 0, 1 } #tag gfx.Color4.g, Slider_Float.{ 0, 1 } #tag gfx.Color4.b, Slider_Float.{ 0, 1 } diff --git a/src/app/settings.onyx b/src/app/settings.onyx index f70efd1..e6c6cfd 100644 --- a/src/app/settings.onyx +++ b/src/app/settings.onyx @@ -1,6 +1,6 @@ package app -#private_file { +#local { config :: package config editor :: package editor @@ -58,7 +58,7 @@ settings_apply :: (settings: ^Application_Settings) { // Settings Window // -#private_file { +#local { window_id :: "settings" window_name :: "Settings" @@ -71,7 +71,7 @@ settings_window_show :: () { move_window_to_top(window_id); } -#private_file +#local settings_window_draw :: (_, win) => { editor.editor_window_draw(^state.settings, win); diff --git a/src/app/storage.onyx b/src/app/storage.onyx index baa670c..a8b0600 100644 --- a/src/app/storage.onyx +++ b/src/app/storage.onyx @@ -2,7 +2,7 @@ package app.storage -#private_file { +#local { memory :: package core.memory } @@ -19,7 +19,7 @@ load :: (key: str, allocator := context.allocator) -> str { return buffer; } -#private_file { +#local { __local_storage_store :: (key: str, value: str) -> void #foreign "decompiler" "local_storage_store" --- __local_storage_value_length :: (key: str) -> i32 #foreign "decompiler" "local_storage_value_length" --- __local_storage_load :: (key: str, buffer: str) -> void #foreign "decompiler" "local_storage_load" --- diff --git a/src/app/window_management.onyx b/src/app/window_management.onyx index 2168f66..8c9e660 100644 --- a/src/app/window_management.onyx +++ b/src/app/window_management.onyx @@ -2,7 +2,7 @@ package app use package core -#private_file { +#local { events :: package js_events gl :: package gl gfx :: package immediate_mode diff --git a/src/app/window_switcher.onyx b/src/app/window_switcher.onyx index 933f80f..2e29e9e 100644 --- a/src/app/window_switcher.onyx +++ b/src/app/window_switcher.onyx @@ -1,6 +1,6 @@ package app -#private_file { +#local { ui :: package ui gfx :: package immediate_mode config :: package config diff --git a/src/app/work_units.onyx b/src/app/work_units.onyx index 0f3c2c0..b8d1583 100644 --- a/src/app/work_units.onyx +++ b/src/app/work_units.onyx @@ -56,7 +56,7 @@ workers_being_used :: () -> [WORKER_COUNT] bool { } -#private_file { +#local { WORKER_COUNT :: 4 MAXIMUM_WORK_UNITS :: 64 diff --git a/src/config.onyx b/src/config.onyx index 7d9156b..53cdb84 100644 --- a/src/config.onyx +++ b/src/config.onyx @@ -30,7 +30,7 @@ Colors : struct { } -// This should be #private at some point, however right now it cannot be as this symbol is needed to query the fonts to load. +// This should be #package at some point, however right now it cannot be as this symbol is needed to query the fonts to load. Fonts_Container :: struct { FontData :: struct (index: i32, fnt_file: str, tex_file: str) {} diff --git a/src/features/hex_editor/hex_viewer.onyx b/src/features/hex_editor/hex_viewer.onyx index 5b844f9..2a57ba3 100644 --- a/src/features/hex_editor/hex_viewer.onyx +++ b/src/features/hex_editor/hex_viewer.onyx @@ -1,6 +1,6 @@ package feature.hex_viewer -#private_file { +#local { app :: package app editor :: package editor ui :: package ui @@ -24,7 +24,7 @@ Hex_Viewer_State :: struct { } // Should this be global? Or should each viewer window get their own? -#private global_viewer_state := Hex_Viewer_State.{}; +#package global_viewer_state := Hex_Viewer_State.{}; hex_window: ^app.Application_Window; diff --git a/src/features/text_editor/text_editor.onyx b/src/features/text_editor/text_editor.onyx index 31e1ae6..5c55fcf 100644 --- a/src/features/text_editor/text_editor.onyx +++ b/src/features/text_editor/text_editor.onyx @@ -1,6 +1,6 @@ package feature.text_editor -#private_file { +#local { app :: package app ui :: package ui config :: package config diff --git a/src/features/wasm/wasm.onyx b/src/features/wasm/wasm.onyx index ade7ef6..46bf84e 100644 --- a/src/features/wasm/wasm.onyx +++ b/src/features/wasm/wasm.onyx @@ -1,6 +1,6 @@ package feature.wasm -#private_file { +#local { app :: package app ui :: package ui config :: package config @@ -13,7 +13,7 @@ package feature.wasm use package debug { debug_log } } -#private { +#package { wasm_state : WasmBinary; wasm_sections : WasmSections; diff --git a/src/main.onyx b/src/main.onyx index 32b35e5..93c5dd6 100644 --- a/src/main.onyx +++ b/src/main.onyx @@ -1,5 +1,5 @@ -#private_file { +#local { events :: package js_events config :: package config app :: package app diff --git a/src/ui/menubar.onyx b/src/ui/menubar.onyx index 638c884..f78842e 100644 --- a/src/ui/menubar.onyx +++ b/src/ui/menubar.onyx @@ -2,7 +2,7 @@ package ui -#private_file { +#local { iter :: package core.iter config :: package config diff --git a/src/ui/window.onyx b/src/ui/window.onyx index 2b99ea9..ac4dab5 100644 --- a/src/ui/window.onyx +++ b/src/ui/window.onyx @@ -1,6 +1,6 @@ package ui -#private_file { +#local { map :: package core.map editor :: package editor } diff --git a/src/wasm.onyx b/src/wasm.onyx index a1db1f5..73c6d74 100644 --- a/src/wasm.onyx +++ b/src/wasm.onyx @@ -2,7 +2,7 @@ package app use package core -#private_file { +#local { ui :: package ui gfx :: package immediate_mode config :: package config