Commit Graph

311 Commits

Author SHA1 Message Date
Martín Lucas Golini
e2174aa044 feat(ecode): add Git diff gutter and minimap indicators
Compute document line changes asynchronously against the repository
baseline and render added, modified, and removed markers in the editor
gutter and minimap.

Keep diff indicators disabled by default to avoid unexpected background
work. Add settings for enabling them and configuring the debounce delay,
with translations for all supported locales.

Handle fully added files, stale asynchronous results, document lifetime,
repository changes, and unsaved edits. Add focused Git diff and document
serialization regression coverage.

Vendor a reduced simdutf build and use it to accelerate String UTF-8 and
UTF-32 conversion and codepoint counting. Preserve efficient scalar and
cached-ASCII paths while reusing output storage for document snapshots.
Add simdutf to the Premake 4, Premake 5, and Android builds.

Fix UIConsole wheel and keyboard scrolling, and repair its text cache by
hashing log entries before moving their strings. Initialize cache hashes
and add regression coverage for scrolling and moved log entries.

Preserve debugger response data when notifying multiple listeners by
copying for all but the final listener. Remove an evaluation-order hazard
when capturing and submitting URIs for asynchronous document loading.

Refs SpartanJ/ecode#955.
2026-09-21 18:05:23 -03:00
Martín Lucas Golini
2beab631a2 Implemented the live-indexing fix + Fixed opening and closing the context menu no longer changes the scrollback position.
- Centralized .gitignore, .prjallowed, and .prjdisallowed filtering in src/tools/ecode/projectdirectorytree.cpp:392.
  - Live directories now require an already-admitted parent and use (parentDirectory, filename) matching before insertion.
  - Live file additions use the same shared filtering.
  - Newly admitted directories still load their own nested .gitignore before recursive scanning.
  - Added eight direct regression tests in src/tests/unit_tests/projectdirectorytree_tests.cpp:84.
  - Added the required ecode sources to both Premake unit-test targets.
  - No FileSystemListener changes; directory moves remain outside this Add-focused patch.
  - Context menu issue cause was terminal focus reporting: Codex enables focus events, and opening the popup sent ESC [ O through the ordinary input path, which scrolls to the bottom. Focus reports now use the non-scrolling protocol-write path while still reaching the application correctly.
2026-09-20 14:41:47 -03:00
Martín Lucas Golini
66962c6a82 Merge branch 'develop' of github.com:SpartanJ/eepp into develop 2026-09-20 13:11:55 -03:00
Martín Lucas Golini
cae1af6098 Do not depend on pcap at build time for eproc. 2026-09-20 13:11:45 -03:00
Martín Lucas Golini
7568ec5f22 Fix missing include. 2026-09-20 12:16:01 -03:00
Martín Lucas Golini
e4af29af4b Merge branch 'develop' of github.com:SpartanJ/eepp into develop 2026-09-20 02:37:02 -03:00
Martín Lucas Golini
1ae2b7180b Add initial eproc system monitor
- Add the eproc process-monitoring application and persistent window/table state
  - Implement Linux process, network, GPU, icon, and GUI-window collection
  - Add optional process columns, styling, i18n-ready strings, and command copying
  - Retain exited processes for one update and color them as ended
  - Extend table sizing and header behavior for persisted column layouts
  - Organize Linux-specific sources under platform/linux
  - Keep unsupported platforms buildable with a startup WIP warning
2026-09-20 02:36:54 -03:00
Martín Lucas Golini
cdde2ec49e Fix file associations in macOS. 2026-09-18 20:47:22 -03:00
Martín Lucas Golini
c530e4bd6e feat: add cross-platform file association management
Add an EE::System::FileAssociation abstraction with XDG, Windows,
and macOS implementations.

Expose extensions from syntax predefinitions and add custom widget
support to UISettingsPanel. Add an ecode settings page for selecting
file associations and installing an XDG desktop entry.

Apply changes asynchronously with lifecycle-safe UI handling, disable
controls while applying, and avoid redundant XDG database updates.

Add translations and coverage for the new functionality.

Implements SpartanJ/ecode#192
2026-09-17 11:04:25 -03:00
Martín Lucas Golini
071bc5d697 Add optional smooth scrolling across UI scrollable widgets
Introduce UIScrollController to provide frame-rate-independent wheel
interpolation, touch dragging, and momentum for code editors, terminals,
scroll views, and scrollable widgets while preserving the legacy instant
scrolling path.

Add a UISceneNode-level smooth-scrolling policy. Embedded scenes inherit
the root scene setting, new widgets snapshot it during construction, and
setSmoothScrollEnabled() can optionally apply changes to existing widgets
across the complete embedded-scene hierarchy.

Move native macOS scrolling and title-bar helpers into PlatformHelper,
enable native momentum from UIApplication, and explicitly enable it in
ecode. Preserve precise SDL2 and SDL3 wheel deltas for fractional momentum
events without changing normal integer wheel steps.

Replace the separate editor and terminal preferences in ecode and eterm
with one global smooth-scrolling setting, including legacy configuration
migration, live updates, and localized settings text.

Improve UITouchDraggableWidget momentum handling and add regression tests
for scrolling interpolation, pixel-aligned editor positions, scene
inheritance, widget overrides, and immediate policy application.
2026-09-13 20:27:37 -03:00
Martín Lucas Golini
42de99cf3b Fix GL resource sharing across native application windows
Decouple GL object sharing between native windows from auxiliary worker-thread context support. Platforms without threaded GL contexts, such as Haiku, must still share textures and other GL resources between their window contexts.

Always configure SDL_GL_SHARE_WITH_CURRENT_CONTEXT according to the requested context settings, while continuing to create the auxiliary thread context only on supported platforms. Explicitly reset the SDL attribute for non-shared contexts to avoid leaking state into subsequent window creation.

Apply the fix to both SDL2 and SDL3 backends. Also link the Haiku unit test executable against libbsd and libnetwork to resolve its PTY and socket dependencies.
2026-09-12 01:51:17 -03:00
Martín Lucas Golini
095fe7919e feat(ui): add native multi-window application support
- let UIApplication create, manage, render, and destroy multiple native windows
  - add scoped scene and GL window-context switching
  - route input events to the scene belonging to each native window
  - share application fonts, themes, icons, styles, and graphics resources safely
  - add NewInApplicationWindow factories for UIWindow, UIFileDialog, and UIMessageBox
  - support native parent relationships, modality, minimum sizes, and optional positioning
  - close child windows when the primary application window closes
  - defer native context destruction until the end of the application tick
  - fall back to in-scene windows for Emscripten and terminal rendering
  - reapply renderer state caches when switching OpenGL contexts
  - fix SDL2/SDL3 display bounds and multi-window lifecycle handling
  - add a native file-dialog and message-box multi-window example
  - add integration coverage for context switching, input, resources, modality, and closing
2026-09-10 19:27:29 -03:00
Martín Lucas Golini
a294d78733 eterm: extract settings actions and fix macOS efsw linkage
Build:
  - Link eterm with CoreFoundation and CoreServices on macOS
  - Satisfy the framework dependencies required by efsw's FSEvents backend

  Applications:
  - Move eterm settings operations into a dedicated SettingsActions class
  - Centralize settings window lifecycle and font configuration actions
  - Route settings panel font-size updates through SettingsActions
2026-09-09 17:06:38 -03:00
Martín Lucas Golini
fe91253276 eterm:
- persist keybindings in keybindings.cfg with configurable primary and secondary modifiers
  - hot-reload bindings and merge newly introduced defaults
  - open keybindings.cfg in a terminal-font-sized code editor tab
  - indicate unsaved keybinding changes using the modified-tab marker
  - share tab and split commands between terminals and the keybindings editor
  - add bindings for terminal actions, tab navigation, numbered tabs, splits, renaming, and tab movement
  - expose keybindings through terminal and tab context menus
  - add tab split and move-left/right context menu actions
2026-09-09 14:32:43 -03:00
Martín Lucas Golini
cff165fa37 Build fix for macOS + premake4 + brew sdl2 2026-09-01 03:20:08 -03:00
Martín Lucas Golini
47f9336c0a Add optional LTO and harden Windows clipboard handling
- add --with-lto support to Premake 4 and 5 release builds
  - use ThinLTO with Clang, automatic LTO with GCC, and LTCG with MSVC
  - exclude Emscripten builds from LTO configuration
  - retry SDL2 clipboard writes on Windows when the clipboard is temporarily unavailable
  - make the UIMergeView copy regression test independent of the system clipboard
2026-09-01 00:46:13 -03:00
Martín Lucas Golini
66d22ea5bb Add integrated Git conflict resolution workflow
Introduce a three-pane UIMergeView with an editable shared result
document, conflict navigation and acceptance actions, live diff
highlighting, synchronized scrolling, and contextual pane labels.

Read conflict stages directly from Git's index, detect paused merge
operations, restore conflict sessions, and support resolving, staging,
recreating, continuing, committing, and aborting operations.

Add repository-aware conflict state handling, safe asynchronous
lifetimes, merge operation UI, configurable key modifiers, i18n
strings, and focused merge-view and Git conflict tests.
2026-08-27 22:18:58 -03:00
Martín Lucas Golini
6ff677ff2b Rename macosmenubar.m to .mm to avoid getting compiled as Objective-C and not Objective-C++. 2026-08-24 10:15:28 -03:00
Martín Lucas Golini
9752be89ad Add native macOS global menu bar integration
Mirror UIMenuBar hierarchies into AppKit while keeping eepp menus as the
source of truth.

Add semantic item activation and menu lifecycle hooks so native actions,
lazy menus, checkboxes, radio buttons, visibility, enabled state, and
submenus preserve existing eepp behavior. Support shortcuts and standard
About, Preferences, Quit, Window, Help, and Services menu integration.

Keep the platform adapter private to the UI implementation and support
safe installation, synchronization, and removal of the native menu.

Migrate ecode away from its hand-written Cocoa menu, assign semantic menu
roles, and populate the UI Language submenu synchronously so it is ready
on its first opening.

Add unit tests covering activation, menu lifecycle, roles, and submenu
preparation.

Refs: SpartanJ/ecode#823
2026-08-24 02:38:36 -03:00
Martín Lucas Golini
681841e11d Create unit-test windows hidden from the start while preserving hardware OpenGL rendering. Force double buffering for hidden X11 windows so framebuffer capture reads the rendered back buffer reliably, and keep SDL2/SDL3 behavior consistent. Update unit-test documentation to use direct desktop execution by default, with Xvfb retained for headless environments.
This change might break unit-tests in other platforms, next CI run will let us know.
2026-08-22 14:11:11 -03:00
Martín Lucas Golini
36e54fe2a3 Add reactive UI data binding and observable collections
Introduce observable and computed values, typed widget bindings, validation groups, UI properties, commands, and UI-thread delivery.

Add observable vector and list model support for incrementally updated collections, with filtering and source-row mapping.

Modernize the Flight Booker and CRUD examples and add focused data handling and collection examples demonstrating the new APIs.

Organize the UI binding headers under ui/databinding, expand test coverage for notification and lifetime semantics, and document API selection, validation, ownership, threading, and performance behavior.
2026-08-22 01:00:04 -03:00
Martín Lucas Golini
d31e880cc3 Fix bidirectional clipboard support in Emscripten builds:
SDL2 prevents the default action for Ctrl/Cmd key events on Emscripten,
which stops browsers from emitting the native paste event.

Intercept Ctrl/Cmd+V before SDL2 consumes it, allow the browser paste
event to update the internal clipboard, and replay the keydown so the
application executes its normal paste command.

Also refresh the clipboard through the asynchronous Clipboard API when
opening a context menu, enabling paste actions triggered without a
keyboard shortcut.

Export Emscripten's ccall runtime method so the browser clipboard helper
can reliably invoke its C++ callbacks in optimized builds, and disable
clang-format for the header containing embedded JavaScript.
2026-08-10 00:32:01 -03:00
Martín Lucas Golini
5c957121d9 Link unit-tests against pthread 2026-08-07 01:59:01 -03:00
Martín Lucas Golini
120471343c Fixed both CI issues.
- MSVC:
      - Removed lambda-based eeNew expansion in favor of typed MemoryManager::trackNew().
      - Added macro expansion indirection.
      - Enabled MSVC’s conforming preprocessor with /Zc:preprocessor across Premake 4/5 static libraries, shared libraries, and executables.
      - Verified generated VS2022 projects contain the flag, including eterm-static and eepp-maps-static.
      - Added explicit standard-library includes to memorymanagerglobal.cpp.

  - Linux/macOS release tests:
      - MemoryManager.tracesPlainNew is now compiled only with EE_MEMORY_MANAGER, since global tracing is intentionally debug-only.

Added new plan to improve PropertyIdSet.
2026-08-05 11:53:36 -03:00
Martín Lucas Golini
afb2d44bda core: extend debug allocation tracing and reduce render-time allocations
- intercept global new/delete operations in debug memory-manager builds
  - distinguish anonymous global allocations from source-tracked leaks
  - modernize eeNew to support constructor-expression syntax
  - improve memory reports with tabulated leaks and separate largest allocations
  - cache autocomplete shortcuts instead of hashing string keys on key events
  - reuse UIStyle property sets across state changes
  - reuse Text shadow colors and avoid temporary outline-color copies
  - use inline storage for temporary linear-gradient rendering data
  - make unit tests resolve assets from the executable directory
  - add memory-manager and PropertyIdSet regression coverage
2026-08-05 11:02:35 -03:00
Martín Lucas Golini
51ceff9b08 Move eeiv to the main repo, I'll start modernizing the tool. 2026-07-31 00:04:21 -03:00
Martín Lucas Golini
683b35b249 feat(ecode): add VS Code-compatible user snippets
Add user-defined snippet support to the autocomplete plugin, including
language-specific, global, .vscode, and .ecode project snippets.

Support JSONC parsing, scopes, hot reload, source-aware ranking, exact
prefix replacement, multi-cursor insertion, contextual indentation,
variables, transforms, choices, linked placeholders, and tab navigation.

Recognize .code-snippets files as JSON and preserve existing LSP snippet
completion behavior.

Refs SpartanJ/ecode#111
2026-07-29 01:11:01 -03:00
Martín Lucas Golini
b940407102 ecode: The custom fallback font reused the "fallback-font" resource key, replacing the built-in CJK fallback in FontService.
Fix:

  - User fallback now uses "user-fallback-font".
  - Built-in CJK and custom fallback fonts remain registered together.
  - Added and passed a regression test verifying both fallback resources remain in the chain.

Fixes in premake5.lua:

  - Removed obsolete PRECISE_F32=1; Wasm already provides precise float behavior.
  - Moved ENVIRONMENT=worker,web to final application link options.

Fixed MarkdownView not getting the correct CSS style from the base theme.
2026-07-25 01:36:00 -03:00
Martín Lucas Golini
b0129880d8 Add LSP snippet navigation and expansion support
Implement LSP snippet parsing and editing sessions with tab stops, linked placeholders, choices, variables, transforms, visual feedback, and multi-cursor insertion.
This adds snippet support for LSP completion items. User-defined snippets will be implemented separately.
Refs SpartanJ/ecode#111
2026-07-18 16:51:45 -03:00
Martín Lucas Golini
513ef0f12b Move backward implementation to its own module but still have an special version for ecode. Integrate backward into unit-tests. 2026-07-13 11:00:35 -03:00
Martín Lucas Golini
a3d78a1217 Implemented Built-in Scientific Calculator in the universal bar for ecode (SpartanJ/ecode#701). 2026-07-02 18:51:12 -03:00
Martín Lucas Golini
57cdab7b7f Implemented UIFontPickerDialog.
Fixed alignment in UILinearLayout when padding is used.
2026-06-29 20:32:08 -03:00
Martín Lucas Golini
d939766355 Disable glew by default (entering deprecation). 2026-06-23 22:54:44 -03:00
Martín Lucas Golini
e5f3983c44 Upgrade SOIL2.
Allow to disable GLEW dependency, it will now be disabled by default so we can test. The idea is to remove the dependency completely once this is confirmed to work.
2026-06-22 10:12:02 -03:00
Martín Lucas Golini
19f2f16b8e Damn! Fix CI. 2026-06-06 17:20:22 -03:00
Martín Lucas Golini
3af9e76ae7 Fix CI. 2026-06-06 17:19:50 -03:00
Martín Lucas Golini
ed333b3839 Optimization in RichText and added benchmark. 2026-05-21 19:19:47 -03:00
Martín Lucas Golini
dd2134b0d0 Fix unit-tests build. 2026-05-21 01:02:06 -03:00
Martín Lucas Golini
1af86f9110 Merge branch 'feature/system-font-resolver' into develop 2026-05-15 01:52:29 -03:00
Martín Lucas Golini
b00547655d Some mingw build fixes for my local build. 2026-05-14 19:27:16 -03:00
Martín Lucas Golini
f815d99489 Some extra fixes.
fontconfig is now loaded at runtime.
2026-05-14 02:28:48 -03:00
Martín Lucas Golini
828adf581d Initial work on the system font resolver. 2026-05-13 23:59:36 -03:00
Martín Lucas Golini
7452cbf492 Fix mingw build on openSUSE. 2026-05-08 18:01:41 -03:00
Martín Lucas Golini
a870a278bb Forgot to update versioning. A couple of minor nits. 2026-05-08 16:50:46 -03:00
Martín Lucas Golini
02a9c3708b Pump internal remote SDL2 version. 2026-05-07 20:11:07 -03:00
Martín Lucas Golini
02b6076cee mojoAL SDL3 2026-05-04 11:47:54 -03:00
Martín Lucas Golini
6e65ef31f2 Merge branch 'develop' into feature/sdl3 2026-04-23 17:57:31 -03:00
Martín Lucas Golini
7d09138bb0 Add woff2 font format support.
Try again luck with the test that it's failing in macOS...
2026-04-09 00:54:22 -03:00
Martín Lucas Golini
1be1137ebd Forgot to include dir for args library. 2026-04-06 02:48:33 -03:00
Martín Lucas Golini
aa9138a12e Fix gumbo parser linking in mingw. 2026-03-29 21:21:40 -03:00