Commit Graph
290 Commits
Author SHA1 Message Date
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
Martín Lucas Golini 0f8bacf6dd Fix br element tag.
Fix gumbo dependency in ecode.
Fix crash in StyleSheet::getStyleSheetStyleByAtRule.
Plus some minor nits.
2026-03-29 20:18:19 -03:00
Martín Lucas Golini b7726b8767 Should fix MSVC build.
As for the MingW build I'll check if `--cc=gcc` works in the CI environments, since premake5-beta8 deprecated `--cc=mingw` which was an alias of `gcc`.
2026-03-29 15:11:41 -03:00
Martín Lucas Golini 26a97be74d Added HTML native linting.
Added HTML folding-ranges.
Fixed HTMLFormatter::HTMLtoXML.
Added `TextDocument::toString` and `TextDocument::toUtf8String`.
Fixed incorrect check for emojis in Text.
Fixed potential crash due to CSS parsing issues in StyleSheetSpecification.
2026-03-29 14:31:26 -03:00
Martín Lucas Golini a14b8f4de0 Minor fix in UIHTMLTable layouting.
Add *very* basic HTML test. And *very* basic HTML demo. This is more than basic, it's just that I need something to quickly test stuff.
2026-03-28 02:45:24 -03:00
Martín Lucas Golini 47dca8a803 Some clean up. 2026-03-27 12:11:34 -03:00
Martín Lucas Golini affd3737b5 Merge branch 'develop' into feature/sdl3 2026-03-22 17:50:28 -03:00
Martín Lucas Golini dd039fc233 Improve stack-trace for ecode symbols.
Fix demangling in stack-trace for mingw builds.
Fix all stat calls in windows mingw builds that fail to detect files / dirs when the path ends with a path separator (this is an old bug, as old as I can remember, I thought it was fixed on mingw side but it seems only works for the cross compiled build, windows mingw build was failing catastrophically and never saw it).
There was also a very old minor bug in Sys::getProcessPath.
2026-03-22 18:41:47 -03:00
Martín Lucas Golini 70cec917da SDL3 port WIP. 2026-03-21 19:06:19 -03:00
Martín Lucas Golini 05d6d3e2a3 Redesigned LLM model selection in AI Assistant chat UI (now it's possible to search by filtering its name).
Redesigned UIDropDownList to inherit from UIDropDown which is a base class to handle different types of drop-downs. Added UIDropDownModelList which is the same as UIDropDownList but uses a UIListView by default so it's a model/view based DropDown.
Fix crash when changing states of the buttons in the build panel.
Increased the default animations speed.
2026-03-21 15:02:50 -03:00
Martín Lucas Golini ceef7532b6 premake4: I've found an issue with 4.4-beta5 when changing the soname it needs to have the .so. premake 4.3 seem to add it automatically and if it's present it does work the same.
Some minor adjustment in UISceneNode::loadLayout* functions.
2026-03-17 11:09:03 -03:00
Martín Lucas Golini 382a5d2476 Terminal selection reflow fixes. 2026-03-12 15:41:42 -03:00
Martín Lucas Golini d6fa55a696 Added UIMarkdownView and Markdown class (integrated md4c into eepp).
Fixes in HTML rendering.
Fix deadlock in Http pool shutdown.
2026-03-05 01:31:25 -03:00
Martín Lucas Golini fc0f33201c RichText class now can hold any Drawable.
Added UIRichText with spans (UITextSpan). Still a WIP but core is working.
2026-03-02 00:20:24 -03:00
Martín Lucas Golini f6a33a408a Should fix windows build. 2026-02-28 13:05:52 -03:00
Martín Lucas Golini cfc6b546ac Added native support for YAML linting (SpartanJ/ecode#829). 2026-02-28 12:29:56 -03:00
Martín Lucas Golini 677aab8e0c UIAbstractView::findRowWithText now accepts FindRowWithTextMatchKind instead of a boolean to force equal comparison.
Refactor of some examples, added a new hello world example but using UIApplication.
ecode: Fixed how it filters the `sbt`, `srt` and `sb` universal locator switches.
2026-02-26 00:32:48 -03:00
Martín Lucas Golini 7977cd99dd Minor changes in DropDownList style.
Added StringMapModel and an example.
2026-02-09 13:37:18 -03:00
Martín Lucas Golini e0bf0a23e5 Added a basic RichText class (and added tests and an example).
Fixed LineWrap when using initial X offset and the word does not fit in the current line but it fits in the next.
Added basic agent rules.
2026-02-08 13:35:16 -03:00
Martín Lucas Golini 0f8f15fa53 Pump ecode and eepp versions.
Fix sharedir option in premake files.
Minor logic fix in copy file buffer.
2026-01-13 00:05:20 -03:00
Martín Lucas Golini caebfc4d81 premake projects now enable text shaping by default. 2026-01-08 19:23:22 -03:00
Martín Lucas Golini c08687c9fe Fix iOS build. 2025-12-31 13:17:32 -03:00