diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 000000000..35095d989
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,42 @@
+# Commits that changed file headers, copyright lines or version constants across
+# the whole tree. They carry no behavioural change, so `git blame` should look
+# through them to the commit that last touched the code itself.
+#
+# GitHub applies this file automatically. To use it locally, run once:
+#
+# git config blame.ignoreRevsFile .git-blame-ignore-revs
+#
+# Add a commit here only when it is mechanical and repository-wide. A commit
+# that changes behaviour does not belong in this file, however large it is.
+
+# 2024-01-29 Update copyright.
+# 1472 files
+db360a10fa19060b0af93141fe9854e83be40152
+
+# 2024-01-30 Update version id string.
+# 52 files
+6982945ebbaf3458f96fd2c25556dd35dba6f97e
+
+# 2024-02-28 Update version to 6.4.1
+# 49 files
+36193be68800023f837c3629017ff04c5b342bf4
+
+# 2026-03-06 Updated ports copyright headers and version number
+# 46 files
+262702f19a0e52fe53b08156077275b900a8d06b
+
+# 2026-03-06 Updated copyright headers and removed revision history
+# 2275 files
+c40927a49065de48dab53e0efb49b6f7c3f31223
+
+# 2026-05-28 Updated version constants ahead of the v6.5.1.202602 release (#154)
+# 1475 files
+2fdd6e0a47818b687cb241c59266429b846c1834
+
+# 2026-05-28 Added missing copyright headers
+# 3004 files
+6ba13dbdb753d1a6ab64c8497a11d9f682d65d15
+
+# 2026-09-15 Normalized the AI disclosure comment to one fixed line per file (#188)
+# 70 files
+ab87d54f238141331f1295d957f68350c3ecf546
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index c34e84e89..dcfda04fb 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -33,14 +33,11 @@ version: 2
# Dependabot ecosystem can parse. That pin moves by hand.
updates:
- package-ecosystem: "github-actions"
- # "/" is the only accepted value for this ecosystem; it covers
- # .github/workflows and .github/actions. The cross-repository reusable
- # workflow in regression_test.yml
- # (eclipse-threadx/threadx/.github/workflows/regression_template.yml@master)
- # is correctly left alone: it references a branch, not a version, so there
- # is nothing for Dependabot to move. Tracking that branch is deliberate --
- # it is first-party, in the same organisation, and it means this repository
- # picks up harness fixes without a bump here.
+ # Reusable workflow revisions are reviewed with the dependency bootstrap.
+ # Keep those pins outside automated version updates.
+ ignore:
+ - dependency-name: "eclipse-threadx/threadx"
+ - dependency-name: "eclipse-threadx/threadx/.github/workflows/regression_template.yml"
directory: "/"
schedule:
diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml
index b16f8bbf7..3d139c408 100644
--- a/.github/workflows/regression_test.yml
+++ b/.github/workflows/regression_test.yml
@@ -1,29 +1,22 @@
# Copyright (c) 2024 Microsoft Corporation
# Copyright (c) 2026 Eclipse ThreadX contributors
-#
-# This program and the accompanying materials are made available under the
-# terms of the MIT License which is available at
-# https://opensource.org/licenses/MIT.
-#
# SPDX-License-Identifier: MIT
-
-# This is a basic workflow that is manually triggered
-
name: GUIX Regression Test
-# Controls when the action will run. Triggers the workflow on push or pull request
-# events but only for the master branch
on:
- workflow_dispatch:
+ workflow_dispatch:
push:
- branches: [ master ]
+ branches: [master, dev]
pull_request:
- branches: [ master ]
-
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+ branches: [master, dev]
+
+permissions:
+ contents: read
+
jobs:
- # This workflow contains a single job called "linux_job"
guix:
+ # GitHub validates deployment permissions even when deployment is skipped.
+ # The called test job narrows its own token and cannot deploy Pages.
permissions:
contents: read
issues: read
@@ -31,9 +24,23 @@ jobs:
pull-requests: write
pages: write
id-token: write
-
- uses: eclipse-threadx/threadx/.github/workflows/regression_template.yml@master
+ uses: eclipse-threadx/threadx/.github/workflows/regression_template.yml@729959fed0fc380d68c2bdcb2b4d7a5430f5c21a
with:
+ install_script: ./scripts/ci_install.sh
+ build_script: ./scripts/ci_build.sh
+ test_script: ./scripts/ci_test.sh
cmake_path: ./test/guix_test/cmake
result_affix: GUIX
-
+ # The install step here also builds default_build_coverage, because the
+ # suite is staged across the three steps to fit their limits. The best run
+ # on record took 8.2 of the default ten minutes and four have been lost at
+ # the cap, so the packages and the checkout have been leaving too little
+ # of it for the build. See issue #205 for moving that build out.
+ install_timeout_minutes: 20
+ # Five configurations are built here, and the best run on record took 11.8
+ # of the default fifteen minutes. Six advisories added regression tests
+ # this week, so that margin is closing rather than steady.
+ build_timeout_minutes: 25
+ coverage_name: merged
+ coverage_thresholds: '98 100'
+ skip_deploy: ${{ github.ref != 'refs/heads/master' || (github.event_name != 'push' && github.event_name != 'workflow_dispatch') }}
diff --git a/.github/workflows/repo_checks.yml b/.github/workflows/repo_checks.yml
new file mode 100644
index 000000000..955e6ddd1
--- /dev/null
+++ b/.github/workflows/repo_checks.yml
@@ -0,0 +1,63 @@
+###############################################################################
+# Copyright (c) 2026 Eclipse ThreadX contributors
+#
+# This program and the accompanying materials are made available under the
+# terms of the MIT License which is available at
+# https://opensource.org/licenses/MIT.
+#
+# AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5).
+# The AI-generated portions may be considered public domain (CC0-1.0)
+# and not subject to the project's licence. The human contributor has
+# reviewed and verified that the code is correct.
+#
+# SPDX-License-Identifier: MIT and CC0-1.0
+###############################################################################
+
+name: repo_checks
+
+# Repository-wide text checks.
+#
+# THIS LIVES IN ITS OWN WORKFLOW BECAUSE IT MUST NOT BE PATH-FILTERED, and a
+# path filter is a property of a workflow rather than of a job. The check
+# selects its input with `git ls-files` and scans every tracked file, so any
+# file at all can carry a finding.
+#
+# That is not hypothetical here. The pass that introduced the fixed
+# disclosure line covered source files only, and the drift it was meant to end
+# survived for months afterwards in CMake files, toolchain files, shell and
+# PowerShell scripts, a GDB script and a Visual Studio manifest -- precisely
+# the files a source-path filter would have skipped. A workflow that gates no
+# pull request anybody opens is worse than no workflow, because it looks like
+# coverage.
+#
+# Cheap enough that running it on everything costs nothing worth measuring: it
+# is grep over a repository this size, with no toolchain, no build and no
+# cache.
+
+on:
+ # No `paths:` on either trigger, deliberately. See above.
+ push:
+ branches: [ dev, master ]
+ pull_request:
+ branches: [ dev, master ]
+
+# A second push to the same branch makes the first answer irrelevant.
+concurrency:
+ group: repo-checks-${{ github.ref }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+
+jobs:
+ checks:
+ runs-on: ubuntu-24.04
+ steps:
+ # Actions are pinned to a commit SHA with the version in the trailing
+ # comment. A tag can be moved; a SHA cannot, which is what makes "which
+ # code ran in our CI" answerable from the repository.
+ - name: Check out the repository
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+
+ - name: Check the AI disclosure comments
+ run: scripts/check_ai_disclosure.sh
diff --git a/.github/workflows/studio_demo_test.yml b/.github/workflows/studio_demo_test.yml
index ac48a7d75..b03d75df3 100644
--- a/.github/workflows/studio_demo_test.yml
+++ b/.github/workflows/studio_demo_test.yml
@@ -6,7 +6,7 @@
# https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: MIT
-# Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
# This is a basic workflow that is manually triggered
@@ -27,6 +27,7 @@ on:
jobs:
# This workflow contains a single job called "linux_job"
run_tests:
+ name: GUIX Studio Demo
permissions:
contents: read
issues: read
diff --git a/.github/workflows/studio_demo_test_compile.yml b/.github/workflows/studio_demo_test_compile.yml
index a5c9142c9..5d6f57d47 100644
--- a/.github/workflows/studio_demo_test_compile.yml
+++ b/.github/workflows/studio_demo_test_compile.yml
@@ -6,7 +6,7 @@
# https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: MIT
-# Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
# This is a basic workflow that is manually triggered
@@ -27,6 +27,7 @@ on:
jobs:
# This workflow contains a single job called "linux_job"
run_tests:
+ name: GUIX Studio Demo Compile
permissions:
contents: read
issues: read
diff --git a/.github/workflows/studio_msix_package.yml b/.github/workflows/studio_msix_package.yml
index cce0d49da..53531d86e 100644
--- a/.github/workflows/studio_msix_package.yml
+++ b/.github/workflows/studio_msix_package.yml
@@ -6,7 +6,7 @@
# https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: MIT
-# Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
# This is a basic workflow that is manually triggered
diff --git a/.github/workflows/studio_view_test.yml b/.github/workflows/studio_view_test.yml
index cc4b2cb2d..e515be520 100644
--- a/.github/workflows/studio_view_test.yml
+++ b/.github/workflows/studio_view_test.yml
@@ -6,25 +6,26 @@
# https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: MIT
-# Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
# This is a basic workflow that is manually triggered
name: GUIX Studio View Test
# Controls when the action will run. Triggers the workflow on push or pull request
-# events but only for the master branch
+# events for the master and dev branches
on:
workflow_dispatch:
push:
- branches: [ master ]
+ branches: [ master, dev ]
pull_request:
- branches: [ master ]
+ branches: [ master, dev ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job
run_tests:
+ name: GUIX Studio View
permissions:
contents: read
issues: read
diff --git a/.gitignore b/.gitignore
index 0fb7e0f18..5a4a53ede 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,10 @@ CTestTestfile.cmake
/guix_studio/installer/vc_runtime/
/guix_studio/studiox.aps
*.user
+
+.venv-ci/
+/test/guix_test/cmake/build/
+/test/guix_test/cmake/threadx/
+/test/guix_test/cmake/.run.sh
+/test/guix_test/cmake/coverage_report/
+__pycache__/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a327a0bc9..58f8ed7f6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,72 +1,368 @@
-# Contributing to Eclipse ThreadX
+# Contributing to Eclipse ThreadX GUIX
Thanks for your interest in this project.
## Project description
-Eclipse ThreadX provides a vendor-neutral, open source, safety certified OS for
-real-time applications published on under a permissive license. The Eclipse
-ThreadX suite encompasses:
-* ThreadX - advanced real-time operating system (RTOS) designed specifically for deeply embedded applications
-* NetX Duo - advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications
-* FileX - high-performance, FAT-compatible file system that’s fully integrated with ThreadX kernel
-* GUIX - provides a complete, embedded graphical user interface (GUI) library
-* USBX - high-performance USB host, device, and on-the-go (OTG) embedded stack, that is fully integrated with ThreadX kernel
-* LevelX - Flash Wear Leveling for FileX and stand-alone purposes
-* GuiX Studio - design environment, facilitating the creation and maintenance of all graphical elements for GUIX
-* TraceX - analysis tool that provides a graphical view of real-time system events to better understand the behavior of real-time systems
+GUIX is the embedded graphical user interface library for ThreadX applications. It provides drawing, widgets, animation, text, and display-driver interfaces. This repository also contains GUIX Studio, the Windows design tool used to create GUIX screens and resources.
-Project site: https://projects.eclipse.org/projects/iot.threadx
+Eclipse ThreadX provides a vendor-neutral, open source, safety-certified OS for real-time applications, published under a permissive license. The Eclipse ThreadX suite encompasses:
+
+* **ThreadX** - advanced real-time operating system (RTOS) designed specifically for deeply embedded applications
+* **NetX Duo** - advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications
+* **FileX** - high-performance, FAT-compatible file system that is fully integrated with the ThreadX kernel
+* **GUIX** - complete, embedded graphical user interface (GUI) library
+* **GUIX Studio** - design environment, facilitating the creation and maintenance of all graphical elements for GUIX
+* **USBX** - high-performance USB host, device, and on-the-go (OTG) embedded stack, fully integrated with the ThreadX kernel
+* **LevelX** - flash wear levelling for FileX and stand-alone purposes
+* **TraceX** - analysis tool that provides a graphical view of real-time system events to better understand the behaviour of real-time systems
+* **ZoneX** - deterministic partitioning hypervisor for mixed-criticality embedded systems
+* **SampleX** - samples and demos for the components above
+
+Project websites:
+
+* https://threadx.io
+* https://projects.eclipse.org/projects/iot.threadx
+
+This file describes how to contribute to **GUIX and GUIX Studio**. General contribution conventions are shared across the Eclipse ThreadX repositories; build and test instructions differ by component.
## Terms of Use
-This repository is subject to the Terms of Use of the Eclipse Foundation
-https://www.eclipse.org/legal/termsofuse.php
+This repository is subject to the Terms of Use of the Eclipse Foundation: https://www.eclipse.org/legal/termsofuse.php
-## Developer resources
+## New contributors
-Information regarding source code management, builds, coding standards, and more.
-https://projects.eclipse.org/projects/iot.threadx/developer
+Welcome. Here is the shortest path from zero to a merged pull request.
-The project maintains the following source code repositories
+1. **Create an Eclipse Foundation account.** https://accounts.eclipse.org/user/register
-* https://github.com/eclipse-threadx/.github
-* https://github.com/eclipse-threadx/cmsis-packs
-* https://github.com/eclipse-threadx/filex
-* https://github.com/eclipse-threadx/getting-started
-* https://github.com/eclipse-threadx/guix
-* https://github.com/eclipse-threadx/levelx
-* https://github.com/eclipse-threadx/netxduo
-* https://github.com/eclipse-threadx/rtos-docs
-* https://github.com/eclipse-threadx/samples
-* https://github.com/eclipse-threadx/threadx
-* https://github.com/eclipse-threadx/threadx-learn-samples
-* https://github.com/eclipse-threadx/tracex
-* https://github.com/eclipse-threadx/usbx
+ The email address on that account matters: it must be the same address you use as the `Author` of your Git commits. If the two do not match, the ECA check on your pull request will fail.
+
+2. **Sign the Eclipse Contributor Agreement (ECA).** See the section below. This is a one-time step and covers every Eclipse Foundation project.
+
+
+
+3. **Configure Git accordingly.**
+
+ ```
+ git config user.name "Your Name"
+ git config user.email "the-address-on-your-eclipse-account@example.org"
+ ```
+
+4. **Pick something to work on.** Open issues are fair game, including ones nobody has assigned. Please leave a comment on the issue saying you intend to work on it, so two people do not solve the same problem twice. If an issue carries a `good first issue` label, it is a reasonable starting point.
+
+5. **Have an idea for a new feature? Discuss it first.** Open a thread in [GitHub Discussions](https://github.com/orgs/eclipse-threadx/discussions) or raise it on the [developer mailing list](https://accounts.eclipse.org/mailing-list/threadx-dev) before writing code. Widget, rendering, and resource-format changes can affect existing GUIX applications and Studio projects, so discuss the shape of a feature before submitting a finished implementation.
+
+Bug fixes and documentation corrections need no prior discussion. Send them straight in.
## Eclipse Development Process
-This Eclipse Foundation open project is governed by the Eclipse Foundation
-Development Process and operates under the terms of the Eclipse IP Policy.
+This Eclipse Foundation open project is governed by the Eclipse Foundation Development Process and operates under the terms of the Eclipse IP Policy.
* https://eclipse.org/projects/dev_process
* https://www.eclipse.org/org/documents/Eclipse_IP_Policy.pdf
## Eclipse Contributor Agreement
-In order to be able to contribute to Eclipse Foundation projects you must electronically sign the Eclipse Contributor Agreement (ECA).
-https://www.eclipse.org/legal/ECA.php
+In order to be able to contribute to Eclipse Foundation projects you must electronically sign the Eclipse Contributor Agreement (ECA): https://www.eclipse.org/legal/ECA.php
+
+The ECA provides the Eclipse Foundation with a permanent record that you agree that each of your contributions will comply with the commitments documented in the Developer Certificate of Origin (DCO). Having an ECA on file associated with the email address matching the "Author" field of your contribution's Git commits fulfills the DCO's requirement that you sign-off on your contributions.
+
+For more information, please see the Eclipse Committer Handbook: https://www.eclipse.org/projects/handbook/#resources-commit
+
+## Required tooling
+
+Build and test GUIX with CMake and Ninja. The root and regression projects require CMake 3.13 or later. The Linux regression suite uses GCC 14 with matching gcov and compiles GUIX sources as C99. It builds 32-bit by default, so install the GCC multilib toolchain. On Ubuntu, `scripts/install.sh` installs the host tools and pins `gcovr` 8.6 in `.venv-ci/`.
+
+The GUIX CMake target links ThreadX. The Linux regression runner obtains a pinned ThreadX revision under `test/guix_test/cmake/threadx/` and builds it for the host tests. Embedded ports need their target compiler and toolchain files; use GCC syntax for assembly built with GNU toolchains.
+
+GUIX Studio tests run on Windows with the Visual Studio 2022 MSBuild tools, CMake, CTest, and Python. The CI jobs use `windows-2022`. A full Visual Studio IDE is not required for the scripts, but the matching Build Tools and Windows SDK must be available.
+
+## Building and testing
+
+The GUIX library regression suite lives under `test/guix_test/cmake/`. The top-level scripts build and test all 18 configurations:
+
+```sh
+scripts/install.sh
+scripts/build.sh all
+scripts/test.sh all
+```
+
+For a focused run, use the same configuration in both steps:
+
+```sh
+scripts/build.sh default_build_coverage
+scripts/test.sh default_build_coverage
+```
+
+The configurations cover error checking, UTF-8 and extended Unicode, mouse and font options, bidirectional text, legacy compatibility, palette modes, deprecated APIs, and partial canvas refresh. The runner uses GCC 14 and instruments every selected configuration. Select the configurations affected by your change and run the full suite before review when feasible. [The GUIX regression test guide](test/README.md) describes golden-file comparisons, individual tests, and debugging.
+
+GUIX Studio has three Windows validation paths. Run the pair relevant to your change from a Windows command prompt with the MSBuild environment available:
+
+| Scripts under `scripts/` | What they check |
+| ------------------------ | --------------- |
+| `build_guix_studio.cmd`, `test_studio_demo.cmd` | GUIX Studio demo generation. |
+| `build_guix.cmd`, `test_studio_demo_compile.cmd` | Compilation of generated demos. |
+| `install_studio_view.cmd`, `test_studio_view.cmd` | GUIX Studio View. |
+
+All Linux regression configurations produce JSON, XML and HTML coverage reports under `test/guix_test/cmake/coverage_report/`. A full run merges the 18 reports; a selected subset produces a partial report. The merged report measures GUIX sources across configurations without dropping optional or untested code. CI requires at least 98.3% line and 96.0% branch coverage. These floors do not replace the project's 100% coverage goal: add or update regression tests for new behaviour and explain any relevant gaps. Studio jobs do not collect this Linux coverage. Host tests do not replace testing a changed display driver on the affected hardware.
+
+## Continuous integration
+
+Four GitHub Actions workflows run on pushes and pull requests to `dev` and `master`, and by manual dispatch:
+
+| Workflow | What it checks |
+| -------- | -------------- |
+| `regression_test.yml` | All 18 Linux GUIX configurations, merged coverage, and the coverage floors through the pinned ThreadX reusable workflow. |
+| `studio_demo_test.yml` | GUIX Studio demo generation on Windows. |
+| `studio_demo_test_compile.yml` | Compilation of GUIX Studio generated demos on Windows. |
+| `studio_view_test.yml` | GUIX Studio View tests on Windows. |
+
+`studio_msix_package.yml` builds a Studio package only when manually dispatched; it is not an automatic pull-request check. The Studio View workflow does not publish packages. Run changed display drivers on the affected hardware where available and report the result separately. Do not describe an unrun test or hardware target as verified.
+
+## Pull request acceptance criteria
+
+**Pull requests must target the `dev` branch.** `master` holds the latest release; see [Release model and support](#release-model-and-support) below. A pull request opened against `master` will be asked to retarget.
+
+Before requesting a review, check your contribution against this list.
+
+**Process**
+
+* The branch is a feature branch based on `dev`. Never commit directly to `master` or `dev`.
+* Your ECA is signed and the commit `Author` email matches your Eclipse account.
+* The pull request is one logical change. Unrelated fixes belong in separate pull requests.
+* Commit subject lines start with a past-tense verb, for example `Fixed the memory allocator`.
+* The pull request explains what changed and why, and how you verified it.
+
+**Code**
+
+* GUIX C code is C99-compatible.
+* It follows the coding style of the surrounding code.
+* New functions and structures are documented in comments, as in existing code.
+* MISRA C rules are followed as closely as practical, taking MISRA C 2004, 2012 and 2023 into account. Any deviation is explicit, names the rule being circumvented, and justifies it in a comment.
+* `goto` is not used.
+* Do not add new external dependencies. This is a hard rule. ThreadX is an existing library dependency for the configured GUIX build.
+* When implementing an industry standard, code is not copied from an existing implementation. Existing implementations may inform your work, but you must identify those sources clearly.
+* Code is written with the suite's priorities in mind: runtime speed and small code size.
+* New C and assembly files, and edited C and assembly files, carry the appropriate header and attribution (see below).
+
+**Verification**
+
+* All applicable CI checks are green, including the Linux regression and GUIX Studio workflows on a pull request to `dev`.
+* The change builds without new warnings on the reference toolchains.
+* Regression tests covering the change are added or updated. The project targets 100% test coverage; a pull request that lowers coverage needs a stated reason. State which GUIX configurations or Studio validation paths ran and any relevant coverage gap.
+* API or behaviour changes come with a matching documentation pull request against [rtos-docs-asciidoc](https://github.com/eclipse-threadx/rtos-docs-asciidoc).
+
+**Security**
+
+If you discover a security issue while working on a change, do not describe it in a public pull request. Follow [SECURITY.md](SECURITY.md) instead.
+
+## AI-assisted contributions
+
+**AI-assisted contributions are welcome**, provided they are attributed.
+
+Two things are non-negotiable:
+
+1. **Attribution.** Mark AI-assisted C and assembly files as described below, and identify the tool and model in the commit message.
+2. **Human responsibility.** The human contributor submitting the pull request is responsible for the contribution - technically and legally. Signing the ECA means *you* certify the contribution's provenance. An AI tool cannot sign the ECA and cannot hold that responsibility. Review what the tool produced, understand it, and verify that it is correct and that you have the right to contribute it. "The model wrote it" is not a defence.
+
+This is consistent with the Eclipse Foundation's [Generative AI Usage Guidelines](https://www.eclipse.org/projects/guidelines/genai/) and the [Eclipse Project Handbook](https://www.eclipse.org/projects/handbook/#genai). Please read them before submitting AI-assisted work.
+
+### Using a coding agent
+
+Give a coding agent this contribution guide and the build instructions for the area it changes. Review its output against the same acceptance criteria as any other contribution. In particular, check C99 compatibility for GUIX C code, surrounding style, test coverage, and the affected rendering path, widget behaviour, resource, or Studio workflow.
+
+### Header for new files
+
+Add this header when creating a new C or assembly (`.S`) file:
+
+```c
+/***************************************************************************
+ * Copyright (c) Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * AI Disclosure: This file was largely AI-generated by ().
+ * The AI-generated portions may be considered public domain (CC0-1.0)
+ * and not subject to the project's licence. The human contributor has
+ * reviewed and verified that the code is correct.
+ *
+ * SPDX-License-Identifier: MIT and CC0-1.0
+ **************************************************************************/
+```
+
+Substitute the current year, product name, and model and version. If a file was written without AI assistance, omit the AI Disclosure paragraph and use `SPDX-License-Identifier: MIT`.
+
+### Header for existing files
+
+When editing an existing C or assembly file whose copyright is from 2025 or earlier, and which does not already mention Eclipse ThreadX contributors, add this line to the header:
+
+```c
+ * Copyright (c) Eclipse ThreadX contributors
+```
+
+It goes *below* the older copyright. All copyright lines must stay in chronological order. For example:
+
+```c
+/***************************************************************************
+ * Copyright (c) 2024 Microsoft Corporation
+ * Copyright (c) 2026 Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * SPDX-License-Identifier: MIT
+ **************************************************************************/
+```
+
+If the edit was AI-assisted and the file does not already carry an AI disclosure line, add this line just under the header:
-The ECA provides the Eclipse Foundation with a permanent record that you agree
-that each of your contributions will comply with the commitments documented in
-the Developer Certificate of Origin (DCO). Having an ECA on file associated with
-the email address matching the "Author" field of your contribution's Git commits
-fulfills the DCO's requirement that you sign-off on your contributions.
+```c
+// Portions of this file were generated with AI assistance.
+```
-For more information, please see the Eclipse Committer Handbook:
-https://www.eclipse.org/projects/handbook/#resources-commit
+Use the comment marker already used by the file. Keep an existing disclosure line unchanged and never add a second one. If you copy an existing file to get started on a new one, treat the result as a new file: use the new-file header, do not carry the old one over.
+
+### Commit attribution
+
+Attribute AI assistance with an `Assisted-by` trailer in each commit that contains AI-assisted changes:
+
+```text
+Fixed the widget event handling status
+
+A completed widget event could report an out-of-date status.
+
+The event path now returns the status set by the completed operation.
+
+The affected GUIX regression configurations passed all tests.
+
+Assisted-by: ()
+```
+
+Use the product's accepted name (`Claude Code`, `Copilot`, `Codex`, or `Gemini`) and the model string reported by the tool. Do not use `Co-Authored-By` for AI attribution. Commit subjects and pull request titles start with a past-tense verb and stay within 72 characters. The message body states the cause, fix, and test result in that order; wrap commit bodies at 88 characters. Pull request descriptions use one line per paragraph.
+
+## Release model and support
+
+This section summarises the project's [Release Model and Support Policy](https://github.com/eclipse-threadx/rtos-docs-asciidoc/blob/main/rtos-docs/home/modules/ROOT/pages/releases-and-support.adoc), which is the authoritative version.
+
+### Version numbers
+
+Eclipse ThreadX releases generally follow [Semantic Versioning](https://semver.org/). Given a version number **X.Y.Z.Bh**, for example `6.5.0.202601a`:
+
+* **X** increases for a *milestone release*. Components currently stay at version 6.
+* **Y** increases for a *feature release* adding a major feature.
+* **Z** increases for a *maintenance release* of minor fixes and improvements.
+* **B** is a *build number* identifying the quarter of publication - `202601` is Q1 2026.
+* **h** denotes a *hotfix release*, identified by a letter. Hotfix releases are component-specific.
+
+### Release cadence
+
+The project adopted a predictable quarterly release model in September 2025 and has published a release every quarter since.
+
+Quarterly releases ship new versions of every component, whether or not that component saw code changes, so that version numbers do not drift apart between components. A release shipping no code changes for a component says so in its release notes.
+
+Urgent fixes between quarterly releases ship as *hotfix* releases. Those contain only security fixes, or fixes for serious problems that prevent building or testing applications.
+
+### Branches
+
+The project runs a time-based release train on trunk-based development. There are no long-term support branches and no backports to older releases.
+
+* `master` always contains the latest quarterly or hotfix release.
+* `dev` is the integration branch. Pull requests are merged there during the quarter. Track `dev` if you want to test new features and fixes ahead of a release.
+* A quarterly release is performed by merging `dev` into `master`.
+
+### Support policy
+
+Issues in the codebase are fixed on a best-effort basis, and pull requests fixing existing or new issues are gladly accepted.
+
+Security vulnerabilities disclosed confidentially are handled under the [Eclipse Foundation's security policy](https://www.eclipse.org/security/policy/). Once a candidate vulnerability is confirmed, the team works to deliver a fix as soon as possible, shipping it in the next quarterly release or as a hotfix depending on timing. Resolved vulnerabilities are disclosed immediately after a release containing the fix becomes available. The team aims to resolve newly confirmed vulnerabilities within three months; that period may be extended by the Project Leadership Chain together with the Eclipse Foundation Security team where appropriate.
+
+See [SECURITY.md](SECURITY.md) for how to report a vulnerability.
+
+### Roadmap
+
+The project team plans its work on a [public GitHub project board](https://github.com/orgs/eclipse-threadx/projects/2/views/2).
+
+### A note on older releases
+
+Microsoft contributed only the Azure RTOS codebase v6.x to the Eclipse Foundation. Older ThreadX releases (v5.x and lower) sold by Express Logic were never made open source, and Microsoft has discontinued sales and support for them. Users of ThreadX 5.x and lower should upgrade to the latest release of Eclipse ThreadX as soon as possible.
+
+## Documentation
+
+The documentation is published at **https://threadx.io**. PDF manuals for every component, in A4 and US Letter formats, are attached as assets to each GitHub release.
+
+### The stack
+
+Documentation is written in [AsciiDoc](https://asciidoc.org/) and built with [Antora](https://antora.org/). PDF manuals are produced by the [Antora Assembler](https://docs.antora.org/assembler/latest/) with `asciidoctor-pdf`.
+
+### The workflow
+
+1. The single source of truth is [rtos-docs-asciidoc](https://github.com/eclipse-threadx/rtos-docs-asciidoc). All documentation changes are made there, as pull requests, following the same branch rules as the code repositories.
+2. At release time the site is generated from that source into [rtos-docs-html](https://github.com/eclipse-threadx/rtos-docs-html), which holds the rendered HTML and exists solely for website integration. Do not edit it by hand - your changes will be overwritten by the next build.
+3. The website then serves the generated content from `rtos-docs-html`.
+
+The older `rtos-docs` repository, which held the documentation in Markdown, is archived and superseded by `rtos-docs-asciidoc`. Do not send changes there.
+
+If your contribution adds or changes an API or a feature, open a matching pull request against `rtos-docs-asciidoc`.
+
+## Developer resources
+
+Information regarding source code management, builds, coding standards, and more: https://projects.eclipse.org/projects/iot.threadx/developer
+
+The project maintains the following repositories:
+
+**Components**
+
+* https://github.com/eclipse-threadx/threadx
+* https://github.com/eclipse-threadx/netxduo
+* https://github.com/eclipse-threadx/filex
+* https://github.com/eclipse-threadx/guix
+* https://github.com/eclipse-threadx/usbx
+* https://github.com/eclipse-threadx/levelx
+* https://github.com/eclipse-threadx/tracex
+* https://github.com/eclipse-threadx/zonex
+
+**Samples and platforms**
+
+* https://github.com/eclipse-threadx/samplex
+* https://github.com/eclipse-threadx/supported-platforms
+
+**Documentation**
+
+* https://github.com/eclipse-threadx/rtos-docs-asciidoc
+* https://github.com/eclipse-threadx/rtos-docs-html
+
+**Community and process**
+
+* https://github.com/eclipse-threadx/discussions
+* https://github.com/eclipse-threadx/trustedx
+* https://github.com/eclipse-threadx/.github
## Contact
-Contact the project developers via the project's "dev" list.
+### GitHub Discussions
+
+https://github.com/orgs/eclipse-threadx/discussions
+
+Q&A, feedback, and announcements. Decisions taken by the project team are documented here as well. This is usually the fastest way to reach both the team and other users.
+
+### Main ThreadX mailing list
+
+https://accounts.eclipse.org/mailing-list/threadx
+
+News and updates about the ThreadX project and the ThreadX Alliance.
+
+### Developer mailing list
+
https://accounts.eclipse.org/mailing-list/threadx-dev
+
+Project team conversations. Feel free to jump in and ask non-technical questions there.
+
+### User mailing list
+
+https://accounts.eclipse.org/mailing-list/threadx-users
+
+Ask your technical questions and discuss issues here.
diff --git a/README.md b/README.md
index 92f5dea99..dd86c65e0 100644
--- a/README.md
+++ b/README.md
@@ -4,8 +4,8 @@ Eclipse ThreadX GUIX is a professional-quality package, created to meet the need
Eclipse ThreadX GUIX Studio provides a complete, embedded graphical user interface (GUI) application design environment, facilitating the creation and maintenance of all graphical elements in the application’s GUI. Eclipse ThreadX GUIX Studio automatically generates C code that’s compatible with the Eclipse ThreadX GUIX library, ready to be compiled and run on the target.
-The latest Eclipse ThreadX GUIX Studio installer is available here:
-https://github.com/eclipse-threadx/guix/releases/download/v6.5.1.202602a_rel/guix_studio_setup_version_6.5.1.202602a.exe
+The latest Eclipse ThreadX GUIX Studio installer is attached to the most recent release:
+https://github.com/eclipse-threadx/guix/releases/latest
Here are the key features and modules of GUIX:
@@ -17,7 +17,7 @@ GUIX as part of Eclipse ThreadX has been integrated to the semiconductor's SDKs
We also [samples](https://github.com/eclipse-threadx/samples) using hero development boards from semiconductors you can build and test with.
-See [Overview of Eclipse ThreadX GUIX](https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/guix/overview-guix.md) for the high-level overview.
+See [Overview of Eclipse ThreadX GUIX](https://threadx.io/releases/6.5.2/guix/main/overview-guix.html) for the high-level overview.
## Repository Structure and Usage
@@ -137,7 +137,7 @@ License terms for using Eclipse ThreadX are defined in the LICENSE.txt file of t
The following are references to additional Eclipse ThreadX resources:
-- **Product introduction**: https://github.com/eclipse-threadx/rtos-docs
+- **Product introduction**: https://threadx.io/releases/latest
- **Product issues and bugs, or feature requests**: https://github.com/eclipse-threadx/guix/issues
- **TraceX Installer**: https://aka.ms/azrtos-tracex-installer
diff --git a/common/inc/gx_api.h b/common/inc/gx_api.h
index b47dc46f3..e17780eb1 100644
--- a/common/inc/gx_api.h
+++ b/common/inc/gx_api.h
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/**************************************************************************/
/**************************************************************************/
@@ -24,7 +26,7 @@
/* APPLICATION INTERFACE DEFINITION RELEASE */
/* */
/* gx_api.h PORTABLE C */
-/* 6.5.1 */
+/* 6.5.2 */
/* AUTHOR */
/* */
/* Kenneth Maxwell, Microsoft Corporation */
@@ -59,9 +61,9 @@ extern "C" {
#define AZURE_RTOS_GUIX
#define GUIX_MAJOR_VERSION 6
#define GUIX_MINOR_VERSION 5
-#define GUIX_PATCH_VERSION 1
-#define GUIX_BUILD_VERSION 202602
-#define GUIX_HOTFIX_VERSION 'a'
+#define GUIX_PATCH_VERSION 2
+#define GUIX_BUILD_VERSION 202603
+#define GUIX_HOTFIX_VERSION ' '
/* The following symbols are defined for backward compatibility reasons.*/
#define __PRODUCT_GUIX__
@@ -174,6 +176,14 @@ typedef struct GX_STRING_STRUCT
#ifndef GX_DISABLE_BINARY_RESOURCE_SUPPORT
#define GX_BINARY_RESOURCE_SUPPORT
+
+#ifndef GX_DISABLE_DEPRECATED_BINRES_API
+#define GX_ENABLE_DEPRECATED_BINRES_API
+#pragma message("GUIX deprecated binary resource API is enabled. The loaders that " \
+ "take no resource length cannot bound a resource built to mislead. " \
+ "Define GX_DISABLE_DEPRECATED_BINRES_API and migrate to the _ext " \
+ "variants.")
+#endif
#endif
#ifndef GX_DISABLE_BRUSH_ALPHA_SUPPORT
@@ -666,7 +676,7 @@ typedef struct GX_STRING_STRUCT
#define GX_TYPE_RICH_TEXT_VIEW 144
#define GX_TYPE_GENERIC_SCROLL_WHEEL 145
-/* A pseudo-type, used by Studio code generator */
+/* A pseudo-type, used by Studio code generator */
#define GX_TYPE_TEMPLATE 200
/* Applications can define their own window types */
@@ -1031,7 +1041,7 @@ typedef GX_UBYTE GX_CHAR_CODE;
#if !defined(GX_MOUSE_MAX_RESOLUTION)
#define GX_MOUSE_MAX_RESOLUTION 32
#endif
-#endif
+#endif
#if defined(GX_DYNAMIC_BIDI_TEXT_SUPPORT)
#define GX_PROMPT_BIDI_RESOLVED_TEXT_INFO GX_BIDI_RESOLVED_TEXT_INFO *gx_prompt_bidi_resolved_text_info;
@@ -1103,7 +1113,7 @@ typedef struct GX_VIEW_STRUCT
GX_UBYTE gx_glyph_advance; /* Glyph advance */ \
GX_BYTE gx_glyph_leading; /* Pen x-pre-advance */ \
GX_UBYTE gx_glyph_width; \
- GX_UBYTE gx_glyph_height;
+ GX_UBYTE gx_glyph_height;
/* Define the Glyph type. */
typedef struct GX_GLYPH_STRUCT
@@ -1115,15 +1125,15 @@ typedef struct GX_GLYPH_STRUCT
/* Define the Kerning Glyph type. */
typedef struct GX_KERNING_GLYPH_STRUCT
{
- GX_GLYPH_MEMBERS_DECLARE
- GX_CONST GX_UBYTE *gx_kerning_table; /* Kerning table */
+ GX_GLYPH_MEMBERS_DECLARE
+ GX_CONST GX_UBYTE *gx_kerning_table; /* Kerning table */
} GX_KERNING_GLYPH;
#endif
/* Define the Compressed Glyph type. */
typedef struct GX_COMPRESSED_GLYPH_STRUCT
{
- GX_GLYPH_MEMBERS_DECLARE
+ GX_GLYPH_MEMBERS_DECLARE
USHORT gx_glyph_map_size; /* Glyph size */
} GX_COMPRESSED_GLYPH;
@@ -1253,7 +1263,7 @@ typedef struct GX_EVENT_STRUCT
USHORT gx_event_sender; /* ID of the event sender */
union
{
- UINT gx_event_timer_id;
+ UINT gx_event_timer_id;
GX_POINT gx_event_pointdata;
GX_UBYTE gx_event_uchardata[4];
USHORT gx_event_ushortdata[2];
@@ -1360,7 +1370,7 @@ typedef struct GX_RADIAL_PROGRESS_BAR_INFO_STRUCT
GX_VALUE gx_radial_progress_bar_info_selected_brush_width; /* width of upper track. */
GX_RESOURCE_ID gx_radial_progress_bar_info_normal_brush_color; /* resource ID of color for lower track. */
GX_RESOURCE_ID gx_radial_progress_bar_info_selected_brush_color; /* resource ID of color for upper track. */
-
+
} GX_RADIAL_PROGRESS_BAR_INFO;
/* Define radial slider information structure, this structure is used to
@@ -2903,14 +2913,14 @@ typedef struct GX_FIXED_POINT_STRUCT
#define GX_FIXED_VAL_ONE 1024
#define GX_FIXED_VAL_FRACTION_MASK 0x3ff
-#define GX_FIXED_VAL_MAKE(_a) (((int)_a) << GX_FIXED_VAL_SHIFT)
-#define GX_FIXED_VAL_TO_INT(_a) ((int)(((int)_a) >> GX_FIXED_VAL_SHIFT))
-#define GX_FIXED_VAL_MUL(_a, _b) ((((int)_a) * (_b)) >> GX_FIXED_VAL_SHIFT)
-#define GX_FIXED_VAL_DIV(_a, _b) ((((int)_a) << GX_FIXED_VAL_SHIFT) / ((int)_b))
-#define GX_FIXED_VAL_RND(_a) (GX_VALUE)((((GX_FIXED_VAL)_a) + GX_FIXED_VAL_HALF) >> GX_FIXED_VAL_SHIFT)
-#define GX_FIXED_VAL_RND_UP(_a) ((((GX_FIXED_VAL)_a) + GX_FIXED_VAL_ONE - 1) >> GX_FIXED_VAL_SHIFT)
-#define GX_FIXED_VAL_ADD_ONE(_a) (((int)_a) + GX_FIXED_VAL_ONE)
-#define GX_FIXED_VAL_SUB_ONE(_a) (((int)_a) - GX_FIXED_VAL_ONE)
+#define GX_FIXED_VAL_MAKE(_a) (((int)(_a)) << GX_FIXED_VAL_SHIFT)
+#define GX_FIXED_VAL_TO_INT(_a) ((int)(((int)(_a)) >> GX_FIXED_VAL_SHIFT))
+#define GX_FIXED_VAL_MUL(_a, _b) ((((int)(_a)) * (_b)) >> GX_FIXED_VAL_SHIFT)
+#define GX_FIXED_VAL_DIV(_a, _b) ((((int)(_a)) << GX_FIXED_VAL_SHIFT) / ((int)(_b)))
+#define GX_FIXED_VAL_RND(_a) (GX_VALUE)((((GX_FIXED_VAL)(_a)) + GX_FIXED_VAL_HALF) >> GX_FIXED_VAL_SHIFT)
+#define GX_FIXED_VAL_RND_UP(_a) ((((GX_FIXED_VAL)(_a)) + GX_FIXED_VAL_ONE - 1) >> GX_FIXED_VAL_SHIFT)
+#define GX_FIXED_VAL_ADD_ONE(_a) (((int)(_a)) + GX_FIXED_VAL_ONE)
+#define GX_FIXED_VAL_SUB_ONE(_a) (((int)(_a)) - GX_FIXED_VAL_ONE)
/* Define the system API mappings based on the error checking
selected by the user. Note: this section is only applicable to
@@ -2944,6 +2954,7 @@ typedef struct GX_FIXED_POINT_STRUCT
#define gx_animation_start _gx_animation_start
#define gx_animation_stop _gx_animation_stop
+#if defined(GX_ENABLE_DEPRECATED_BINRES_API)
#define gx_binres_language_count_get _gx_binres_language_count_get
#define gx_binres_language_info_load _gx_binres_language_info_load
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
@@ -2953,6 +2964,13 @@ typedef struct GX_FIXED_POINT_STRUCT
#define gx_binres_theme_load _gx_binres_theme_load
#define gx_binres_pixelmap_load _gx_binres_pixelmap_load
#define gx_binres_font_load _gx_binres_font_load
+#endif
+#define gx_binres_language_count_get_ext _gx_binres_language_count_get_ext
+#define gx_binres_language_info_load_ext _gx_binres_language_info_load_ext
+#define gx_binres_language_table_load_ext2 _gx_binres_language_table_load_ext2
+#define gx_binres_theme_load_ext _gx_binres_theme_load_ext
+#define gx_binres_pixelmap_load_ext _gx_binres_pixelmap_load_ext
+#define gx_binres_font_load_ext _gx_binres_font_load_ext
#define gx_brush_default _gx_brush_default
#define gx_brush_define _gx_brush_define
@@ -3164,7 +3182,7 @@ typedef struct GX_FIXED_POINT_STRUCT
#define gx_multi_line_text_view_line_space_set _gx_multi_line_text_view_line_space_set
#define gx_multi_line_text_view_scroll_info_get _gx_multi_line_text_view_scroll_info_get
#if defined(GUIX_5_4_0_COMPATIBILITY)
-#define gx_multi_line_text_view_text_color_set(a, b, c) _gx_multi_line_text_view_text_color_set((GX_MUILTI_LINE_TEXT_VIEW *)a, b, c, b)
+#define gx_multi_line_text_view_text_color_set(a, b, c) _gx_multi_line_text_view_text_color_set((GX_MULTI_LINE_TEXT_VIEW *)a, b, c, b)
#else
#define gx_multi_line_text_view_text_color_set _gx_multi_line_text_view_text_color_set
#endif
@@ -3227,7 +3245,7 @@ typedef struct GX_FIXED_POINT_STRUCT
#define gx_prompt_font_set _gx_prompt_font_set
#if defined(GUIX_5_4_0_COMPATIBILITY)
-#define gx_prompt_text_color_set(a, b, c) _gx_prompt_text_color_set((GX_PROGRESS_BAR *)a, b, c, b)
+#define gx_prompt_text_color_set(a, b, c) _gx_prompt_text_color_set((GX_PROMPT *)a, b, c, b)
#else
#define gx_prompt_text_color_set _gx_prompt_text_color_set
#endif
@@ -3257,7 +3275,7 @@ typedef struct GX_FIXED_POINT_STRUCT
#define gx_radial_progress_bar_text_draw _gx_radial_progress_bar_text_draw
#define gx_radial_progress_bar_value_set _gx_radial_progress_bar_value_set
-#define gx_radial_slider_anchor_angles_set _gx_radial_slider_anchor_anglees_set
+#define gx_radial_slider_anchor_angles_set _gx_radial_slider_anchor_angles_set
#define gx_radial_slider_animation_set _gx_radial_slider_animation_set
#define gx_radial_slider_animation_start _gx_radial_slider_animation_start
#define gx_radial_slider_create _gx_radial_slider_create
@@ -3312,7 +3330,7 @@ typedef struct GX_FIXED_POINT_STRUCT
#define gx_single_line_text_input_left_arrow(a) _gx_single_line_text_input_left_arrow((GX_SINGLE_LINE_TEXT_INPUT *)a)
#define gx_single_line_text_input_position_get(a, b) _gx_single_line_text_input_position_get(a, b)
#define gx_single_line_text_input_right_arrow(a) _gx_single_line_text_input_right_arrow((GX_SINGLE_LINE_TEXT_INPUT *)a)
-#define gx_single_line_text_input_style_add(a, b) _gx_single_line_text_input_style_add((GX_SINGLE_LINE_TEXT_INPUT *)a, b);
+#define gx_single_line_text_input_style_add(a, b) _gx_single_line_text_input_style_add((GX_SINGLE_LINE_TEXT_INPUT *)a, b)
#define gx_single_line_text_input_style_remove(a, b) _gx_single_line_text_input_style_remove((GX_SINGLE_LINE_TEXT_INPUT *)a, b)
#define gx_single_line_text_input_style_set(a, b) _gx_single_line_text_input_style_set((GX_SINGLE_LINE_TEXT_INPUT *)a, b)
#define gx_single_line_text_input_text_color_set(a, b, c, d, e) _gx_single_line_text_input_text_color_set((GX_SINGLE_LINE_TEXT_INPUT *)a, b, c, d, e)
@@ -3365,7 +3383,7 @@ typedef struct GX_FIXED_POINT_STRUCT
#endif
#define gx_system_canvas_refresh _gx_system_canvas_refresh
-#define gx_system_dirty_mark(a) _gx_system_dirty_mark((GX_WIDGET *)a);
+#define gx_system_dirty_mark(a) _gx_system_dirty_mark((GX_WIDGET *)a)
#define gx_system_dirty_partial_add(a, b) _gx_system_dirty_partial_add((GX_WIDGET *)a, b)
#define gx_system_draw_context_get _gx_system_draw_context_get
#define gx_system_event_fold _gx_system_event_fold
@@ -3406,7 +3424,7 @@ typedef struct GX_FIXED_POINT_STRUCT
#define gx_text_button_event_process _gx_text_button_event_process
#define gx_text_button_font_set _gx_text_button_font_set
#if defined(GUIX_5_4_0_COMPATIBILITY)
-#define gx_text_button_text_color_set(a, b, c) _gx_text_button_text_color_set((GX_TEXT_BUTTON *)a, b, c)
+#define gx_text_button_text_color_set(a, b, c) _gx_text_button_text_color_set((GX_TEXT_BUTTON *)a, b, c, b)
#else
#define gx_text_button_text_color_set _gx_text_button_text_color_set
#endif
@@ -3604,6 +3622,7 @@ UINT _gx_animation_landing_speed_set(GX_ANIMATION *animation, USHORT shift_per_s
UINT _gx_animation_start(GX_ANIMATION *animation, GX_ANIMATION_INFO *info);
UINT _gx_animation_stop(GX_ANIMATION *animation);
+#if defined(GX_ENABLE_DEPRECATED_BINRES_API)
UINT _gx_binres_language_count_get(GX_UBYTE *root_address, GX_VALUE *put_count);
UINT _gx_binres_language_info_load(GX_UBYTE *root_address, GX_LANGUAGE_HEADER *put_info);
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
@@ -3613,6 +3632,13 @@ UINT _gx_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***ret
UINT _gx_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme);
UINT _gx_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap);
UINT _gx_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size);
+#endif
+UINT _gx_binres_language_count_get_ext(GX_UBYTE *root_address, ULONG root_size, GX_VALUE *put_count);
+UINT _gx_binres_language_info_load_ext(GX_UBYTE *root_address, ULONG root_size, GX_LANGUAGE_HEADER *put_info);
+UINT _gx_binres_language_table_load_ext2(GX_UBYTE *root_address, ULONG root_size, GX_STRING ***returned_language_table);
+UINT _gx_binres_theme_load_ext(GX_UBYTE *root_address, ULONG root_size, INT theme_id, GX_THEME **returned_theme);
+UINT _gx_binres_pixelmap_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT map_index, GX_PIXELMAP *pixelmap);
+UINT _gx_binres_font_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size);
UINT _gx_brush_default(GX_BRUSH *brush);
UINT _gx_brush_define(GX_BRUSH *brush, GX_COLOR line_color, GX_COLOR fill_color, UINT style);
@@ -3851,7 +3877,7 @@ UINT _gx_multi_line_text_button_text_id_set(GX_MULTI_LINE_TEXT_BUTTON *button, G
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
UINT _gx_multi_line_text_button_text_set(GX_MULTI_LINE_TEXT_BUTTON *button, GX_CONST GX_CHAR *text);
#endif
-UINT _gx_multi_line_text_button_text_set_ext(GX_MULTI_LINE_TEXT_BUTTON *button, GX_CONST GX_STRING text);
+UINT _gx_multi_line_text_button_text_set_ext(GX_MULTI_LINE_TEXT_BUTTON *button, GX_CONST GX_STRING *text);
UINT _gx_multi_line_text_input_backspace(GX_MULTI_LINE_TEXT_INPUT *text_input);
UINT _gx_multi_line_text_input_buffer_clear(GX_MULTI_LINE_TEXT_INPUT *text_input_ptr);
@@ -4220,6 +4246,7 @@ UINT _gx_text_button_text_color_set(GX_TEXT_BUTTON *text_button,
GX_RESOURCE_ID disabled_text_color_id);
VOID _gx_text_button_text_draw(GX_TEXT_BUTTON *button);
UINT _gx_text_button_text_get(GX_TEXT_BUTTON *button, GX_CONST GX_CHAR **return_text);
+UINT _gx_text_button_text_get_ext(GX_TEXT_BUTTON *button, GX_STRING *return_text);
UINT _gx_text_button_text_id_set(GX_TEXT_BUTTON *button, GX_RESOURCE_ID string_id);
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
UINT _gx_text_button_text_set(GX_TEXT_BUTTON *button, GX_CONST GX_CHAR *text);
@@ -4428,6 +4455,7 @@ UINT _gx_window_wallpaper_set(GX_WINDOW *window, GX_RESOURCE_ID wallpaper_id, GX
#define gx_animation_start _gxe_animation_start
#define gx_animation_stop _gxe_animation_stop
+#if defined(GX_ENABLE_DEPRECATED_BINRES_API)
#define gx_binres_language_count_get _gxe_binres_language_count_get
#define gx_binres_language_info_load _gxe_binres_language_info_load
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
@@ -4437,6 +4465,13 @@ UINT _gx_window_wallpaper_set(GX_WINDOW *window, GX_RESOURCE_ID wallpaper_id, GX
#define gx_binres_theme_load _gxe_binres_theme_load
#define gx_binres_pixelmap_load _gxe_binres_pixelmap_load
#define gx_binres_font_load _gxe_binres_font_load
+#endif
+#define gx_binres_language_count_get_ext _gxe_binres_language_count_get_ext
+#define gx_binres_language_info_load_ext _gxe_binres_language_info_load_ext
+#define gx_binres_language_table_load_ext2 _gxe_binres_language_table_load_ext2
+#define gx_binres_theme_load_ext _gxe_binres_theme_load_ext
+#define gx_binres_pixelmap_load_ext _gxe_binres_pixelmap_load_ext
+#define gx_binres_font_load_ext _gxe_binres_font_load_ext
#define gx_brush_default _gxe_brush_default
#define gx_brush_define _gxe_brush_define
@@ -4694,7 +4729,7 @@ UINT _gx_window_wallpaper_set(GX_WINDOW *window, GX_RESOURCE_ID wallpaper_id, GX
#define gx_progress_bar_draw _gx_progress_bar_draw
#define gx_progress_bar_event_process _gxe_progress_bar_event_process
#define gx_progress_bar_font_set _gxe_progress_bar_font_set
-#define gx_progress_bar_info_set(a, b) _gxe_progress_bar_info_set((GX_PROGRESS_BAR *)a, b);
+#define gx_progress_bar_info_set(a, b) _gxe_progress_bar_info_set((GX_PROGRESS_BAR *)a, b)
#define gx_progress_bar_pixelmap_set _gxe_progress_bar_pixelmap_set
#define gx_progress_bar_range_set _gxe_progress_bar_range_set
#if defined(GUIX_5_4_0_COMPATIBILITY)
@@ -4848,7 +4883,7 @@ UINT _gx_window_wallpaper_set(GX_WINDOW *window, GX_RESOURCE_ID wallpaper_id, GX
#endif
#define gx_system_canvas_refresh _gxe_system_canvas_refresh
-#define gx_system_dirty_mark(a) _gxe_system_dirty_mark((GX_WIDGET *)a);
+#define gx_system_dirty_mark(a) _gxe_system_dirty_mark((GX_WIDGET *)a)
#define gx_system_dirty_partial_add(a, b) _gxe_system_dirty_partial_add((GX_WIDGET *)a, b)
#define gx_system_draw_context_get _gxe_system_draw_context_get
#define gx_system_event_fold _gxe_system_event_fold
@@ -5085,6 +5120,7 @@ UINT _gxe_animation_landing_speed_set(GX_ANIMATION *animation, USHORT shift_per_
UINT _gxe_animation_start(GX_ANIMATION *animation, GX_ANIMATION_INFO *info);
UINT _gxe_animation_stop(GX_ANIMATION *animation);
+#if defined(GX_ENABLE_DEPRECATED_BINRES_API)
UINT _gxe_binres_language_count_get(GX_UBYTE *root_address, GX_VALUE *put_count);
UINT _gxe_binres_language_info_load(GX_UBYTE *root_address, GX_LANGUAGE_HEADER *put_info);
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
@@ -5094,6 +5130,13 @@ UINT _gxe_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***re
UINT _gxe_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme);
UINT _gxe_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap);
UINT _gxe_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size);
+#endif
+UINT _gxe_binres_language_count_get_ext(GX_UBYTE *root_address, ULONG root_size, GX_VALUE *put_count);
+UINT _gxe_binres_language_info_load_ext(GX_UBYTE *root_address, ULONG root_size, GX_LANGUAGE_HEADER *put_info);
+UINT _gxe_binres_language_table_load_ext2(GX_UBYTE *root_address, ULONG root_size, GX_STRING ***returned_language_table);
+UINT _gxe_binres_theme_load_ext(GX_UBYTE *root_address, ULONG root_size, INT theme_id, GX_THEME **returned_theme);
+UINT _gxe_binres_pixelmap_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT map_index, GX_PIXELMAP *pixelmap);
+UINT _gxe_binres_font_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size);
UINT _gxe_brush_default(GX_BRUSH *brush);
UINT _gxe_brush_define(GX_BRUSH *brush, GX_COLOR line_color, GX_COLOR fill_color, UINT style);
diff --git a/common/inc/gx_binres_loader.h b/common/inc/gx_binres_loader.h
index 67f10bff0..64ec46c2c 100644
--- a/common/inc/gx_binres_loader.h
+++ b/common/inc/gx_binres_loader.h
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -55,6 +57,13 @@
typedef struct GX_BINRES_DATA_INFO_STRUCT
{
GX_UBYTE *gx_binres_root_address;
+
+ /* Extent of the resource at gx_binres_root_address. Every read is checked
+ against it, because the counts and offsets that drive those reads come
+ from the resource itself. Zero means the extent is unknown and no read
+ can be checked, which is the state a caller that supplies no length
+ leaves this in. */
+ ULONG gx_binres_root_size;
UINT gx_binres_read_offset;
GX_UBYTE *gx_binres_buffer;
UINT gx_binres_buffer_size;
@@ -70,6 +79,14 @@ UINT _gx_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****returne
#endif
UINT _gx_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table);
UINT _gx_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme);
+UINT _gx_binres_theme_load_ext(GX_UBYTE *root_address, ULONG root_size, INT theme_id, GX_THEME **returned_theme);
+UINT _gx_binres_language_count_get_ext(GX_UBYTE *root_address, ULONG root_size, GX_VALUE *put_count);
+UINT _gx_binres_language_info_load_ext(GX_UBYTE *root_address, ULONG root_size, GX_LANGUAGE_HEADER *put_info);
+UINT _gx_binres_language_table_load_ext2(GX_UBYTE *root_address, ULONG root_size, GX_STRING ***returned_language_table);
+UINT _gx_binres_pixelmap_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT map_index, GX_PIXELMAP *pixelmap);
+UINT _gx_binres_font_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size);
+UINT _gx_binres_range_check(GX_BINRES_DATA_INFO *info, ULONG offset, ULONG length);
+UINT _gx_binres_declared_size_get(GX_UBYTE *root_address, ULONG *returned_size);
UINT _gx_binres_resource_header_load(GX_BINRES_DATA_INFO *info, GX_RESOURCE_HEADER *header);
UINT _gx_binres_string_header_load(GX_BINRES_DATA_INFO *info, GX_STRING_HEADER *header);
@@ -94,6 +111,12 @@ UINT _gxe_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***re
UINT _gxe_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme);
UINT _gxe_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap);
UINT _gxe_binres_font_load(GX_UBYTE *root_address, UINT res_index, GX_UBYTE *buffer, ULONG *buffer_size);
+UINT _gxe_binres_language_count_get_ext(GX_UBYTE *root_address, ULONG root_size, GX_VALUE *put_count);
+UINT _gxe_binres_language_info_load_ext(GX_UBYTE *root_address, ULONG root_size, GX_LANGUAGE_HEADER *put_info);
+UINT _gxe_binres_language_table_load_ext2(GX_UBYTE *root_address, ULONG root_size, GX_STRING ***returned_language_table);
+UINT _gxe_binres_theme_load_ext(GX_UBYTE *root_address, ULONG root_size, INT theme_id, GX_THEME **returned_theme);
+UINT _gxe_binres_pixelmap_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT map_index, GX_PIXELMAP *pixelmap);
+UINT _gxe_binres_font_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size);
#endif
diff --git a/common/src/gx_animation_drag_tracking_start.c b/common/src/gx_animation_drag_tracking_start.c
index 105c60d15..82f6ac8ab 100644
--- a/common/src/gx_animation_drag_tracking_start.c
+++ b/common/src/gx_animation_drag_tracking_start.c
@@ -8,8 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Claude Sonnet 4.6).
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gx_animation_start.c b/common/src/gx_animation_start.c
index 7392ca6a7..0b81ce587 100644
--- a/common/src/gx_animation_start.c
+++ b/common/src/gx_animation_start.c
@@ -8,8 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Claude Sonnet 4.6).
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
@@ -200,7 +199,7 @@ GX_VALUE top;
#ifdef GX_THREADX_BINDING
#ifndef GX_DISABLE_THREADX_TIMER_SOURCE
/* if the low-level timer is not active, start it */
- tx_timer_info_get(&_gx_system_timer, (CHAR **)TX_NULL, &tx_timer_active,
+ tx_timer_info_get(&_gx_system_timer, TX_NULL, &tx_timer_active,
(ULONG *)TX_NULL, (ULONG *)TX_NULL, (TX_TIMER **)TX_NULL);
if (!tx_timer_active)
diff --git a/common/src/gx_binres_font_load.c b/common/src/gx_binres_font_load.c
index 1ab0ad97f..26ee1a0d9 100644
--- a/common/src/gx_binres_font_load.c
+++ b/common/src/gx_binres_font_load.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -73,7 +75,7 @@
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
-UINT _gx_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size)
+UINT _gx_binres_font_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size)
{
UINT status = GX_SUCCESS;
GX_BINRES_DATA_INFO info;
@@ -105,6 +107,7 @@ UINT required_size;
memset(&info, 0, sizeof(GX_BINRES_DATA_INFO));
info.gx_binres_root_address = (GX_UBYTE *)root_address;
+ info.gx_binres_root_size = root_size;
info.gx_binres_buffer = (GX_UBYTE *)buffer;
info.gx_binres_buffer_size = *buffer_size;
@@ -133,3 +136,54 @@ UINT required_size;
return status;
}
#endif
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gx_binres_font_load PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is the form that takes no resource length. */
+/* */
+/* */
+/* A standalone resource declares no total size, so nothing can be */
+/* derived here and the reads stay unbounded, as they have always been. */
+/* Callers that know the length should use the _ext form, which bounds */
+/* every read by it. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* font_index Font index to load */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_declared_size_get Derive the resource extent */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
+UINT _gx_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size)
+{
+ /* A standalone resource carries no total size, only a type, a count and the
+ offsets of what it holds, so there is nothing here to derive an extent
+ from. The reads are left unbounded, which is what this entry point has
+ always done; _gx_binres_font_load_ext takes the length that bounds them. */
+ return _gx_binres_font_load_ext(root_address, 0, font_index, buffer, buffer_size);
+}
+#endif
+#endif
diff --git a/common/src/gx_binres_language_count_get.c b/common/src/gx_binres_language_count_get.c
index 2366cfe6a..bbe6b6e55 100644
--- a/common/src/gx_binres_language_count_get.c
+++ b/common/src/gx_binres_language_count_get.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -63,7 +65,7 @@
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
-UINT _gx_binres_language_count_get(GX_UBYTE *root_address, GX_VALUE *put_count)
+UINT _gx_binres_language_count_get_ext(GX_UBYTE *root_address, ULONG root_size, GX_VALUE *put_count)
{
UINT status = GX_SUCCESS;
GX_BINRES_DATA_INFO info;
@@ -73,10 +75,16 @@ GX_STRING_HEADER string_header;
memset(&info, 0, sizeof(GX_BINRES_DATA_INFO));
info.gx_binres_root_address = root_address;
+ info.gx_binres_root_size = root_size;
/* Read Resource header. */
info.gx_binres_read_offset = 0;
- _gx_binres_resource_header_load(&info, &header);
+ status = _gx_binres_resource_header_load(&info, &header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
/* Skip theme info. */
info.gx_binres_read_offset += header.gx_resource_header_theme_data_size;
@@ -87,7 +95,12 @@ GX_STRING_HEADER string_header;
}
/* Read string header. */
- _gx_binres_string_header_load(&info, &string_header);
+ status = _gx_binres_string_header_load(&info, &string_header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
if (string_header.gx_string_header_magic_number != GX_MAGIC_NUMBER)
{
@@ -102,3 +115,59 @@ GX_STRING_HEADER string_header;
}
#endif
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gx_binres_language_count_get PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is the form that takes no resource length. It derives */
+/* one from the size the resource declares and defers to language_coun */
+/* */
+/* A truncated resource is rejected, because its declared size still */
+/* describes the whole of it. A resource built to mislead is not: the */
+/* same attacker chose that size. Callers that can supply the real */
+/* length should use the _ext form, which bounds every read by it. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* put_count Destination for the count */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_declared_size_get Derive the resource extent */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
+UINT _gx_binres_language_count_get(GX_UBYTE *root_address, GX_VALUE *put_count)
+{
+ULONG root_size;
+UINT status;
+
+ status = _gx_binres_declared_size_get(root_address, &root_size);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
+ return _gx_binres_language_count_get_ext(root_address, root_size, put_count);
+}
+#endif
+#endif
diff --git a/common/src/gx_binres_language_info_load.c b/common/src/gx_binres_language_info_load.c
index 6358addb5..605f1d818 100644
--- a/common/src/gx_binres_language_info_load.c
+++ b/common/src/gx_binres_language_info_load.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -62,7 +64,7 @@
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
-UINT _gx_binres_language_info_load(GX_UBYTE *root_address, GX_LANGUAGE_HEADER *put_info)
+UINT _gx_binres_language_info_load_ext(GX_UBYTE *root_address, ULONG root_size, GX_LANGUAGE_HEADER *put_info)
{
UINT status = GX_SUCCESS;
GX_BINRES_DATA_INFO info;
@@ -73,10 +75,16 @@ UINT lang_index;
memset(&info, 0, sizeof(GX_BINRES_DATA_INFO));
info.gx_binres_root_address = root_address;
+ info.gx_binres_root_size = root_size;
/* Read Resource header. */
info.gx_binres_read_offset = 0;
- _gx_binres_resource_header_load(&info, &header);
+ status = _gx_binres_resource_header_load(&info, &header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
/* Skip theme info. */
info.gx_binres_read_offset += header.gx_resource_header_theme_data_size;
@@ -87,7 +95,12 @@ UINT lang_index;
}
/* Read string header. */
- _gx_binres_string_header_load(&info, &string_header);
+ status = _gx_binres_string_header_load(&info, &string_header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
if (string_header.gx_string_header_magic_number != GX_MAGIC_NUMBER)
{
@@ -98,7 +111,12 @@ UINT lang_index;
for (lang_index = 0; lang_index < string_header.gx_string_header_language_count; lang_index++)
{
/* Read language header. */
- _gx_binres_language_header_load(&info, put_info);
+ status = _gx_binres_language_header_load(&info, put_info);
+
+ if (status != GX_SUCCESS)
+ {
+ break;
+ }
if (put_info -> gx_language_header_magic_number != GX_MAGIC_NUMBER)
{
@@ -114,3 +132,59 @@ UINT lang_index;
}
#endif
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gx_binres_language_info_load PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is the form that takes no resource length. It derives */
+/* one from the size the resource declares and defers to language_info */
+/* */
+/* A truncated resource is rejected, because its declared size still */
+/* describes the whole of it. A resource built to mislead is not: the */
+/* same attacker chose that size. Callers that can supply the real */
+/* length should use the _ext form, which bounds every read by it. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* put_info Destination for the info */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_declared_size_get Derive the resource extent */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
+UINT _gx_binres_language_info_load(GX_UBYTE *root_address, GX_LANGUAGE_HEADER *put_info)
+{
+ULONG root_size;
+UINT status;
+
+ status = _gx_binres_declared_size_get(root_address, &root_size);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
+ return _gx_binres_language_info_load_ext(root_address, root_size, put_info);
+}
+#endif
+#endif
diff --git a/common/src/gx_binres_language_table_load.c b/common/src/gx_binres_language_table_load.c
index d38a7a0e1..7c11bb19e 100644
--- a/common/src/gx_binres_language_table_load.c
+++ b/common/src/gx_binres_language_table_load.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -61,9 +63,154 @@
/* GUIX Internal Code */
/* */
/**************************************************************************/
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gx_binres_range_check PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks that length bytes at the given offset lie */
+/* inside the resource. */
+/* */
+/* The counts and offsets that drive every read come from the resource */
+/* itself, so a resource declaring more data than it holds would */
+/* otherwise be read past its end. An extent of zero means the caller */
+/* supplied no length, and nothing can be checked. */
+/* */
+/* INPUT */
+/* */
+/* info Binary resource data info */
+/* offset Offset the read starts at */
+/* length Number of bytes to be read */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* GUIX Internal Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+UINT _gx_binres_range_check(GX_BINRES_DATA_INFO *info, ULONG offset, ULONG length)
+{
+ if (info -> gx_binres_root_size == 0)
+ {
+ return GX_SUCCESS;
+ }
+
+ /* Written as a subtraction so that the sum cannot wrap past the extent. */
+ if ((offset > info -> gx_binres_root_size) ||
+ (length > (info -> gx_binres_root_size - offset)))
+ {
+ return GX_INVALID_FORMAT;
+ }
+
+ return GX_SUCCESS;
+}
+#endif
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gx_binres_declared_size_get PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function derives the extent of a resource from the size its */
+/* own header declares. */
+/* */
+/* It is what the entry points that take no length fall back on. A */
+/* resource that is merely truncated is caught, because the declared */
+/* size still describes the whole of it. A resource built to mislead */
+/* is not, because the same attacker chose that size: only a length */
+/* from the caller bounds that, which is what the _ext entry points */
+/* take. The header itself is read before anything is known, so the */
+/* caller must supply at least that much. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* returned_size Destination for the extent */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_resource_header_load Read resource header */
+/* */
+/* CALLED BY */
+/* */
+/* GUIX Internal Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+UINT _gx_binres_declared_size_get(GX_UBYTE *root_address, ULONG *returned_size)
+{
+GX_BINRES_DATA_INFO info;
+GX_RESOURCE_HEADER header;
+
+ memset(&info, 0, sizeof(GX_BINRES_DATA_INFO));
+ info.gx_binres_root_address = root_address;
+
+ /* The extent is not known yet, so the header read cannot be refused. */
+ (VOID)_gx_binres_resource_header_load(&info, &header);
+
+ if (header.gx_resource_header_magic_number != GX_MAGIC_NUMBER)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
+ if (header.gx_resource_header_data_size == 0)
+ {
+ /* A resource that declares no size says nothing about its extent, and
+ older ones leave the field empty. Reporting the extent as unknown
+ keeps those loading, rather than rejecting every read past the
+ header. */
+ *returned_size = 0;
+
+ return GX_SUCCESS;
+ }
+
+ if (header.gx_resource_header_data_size > (~(ULONG)0 - GX_RESOURCE_HEADER_SIZE))
+ {
+ return GX_MATH_OVERFLOW;
+ }
+
+ *returned_size = header.gx_resource_header_data_size + GX_RESOURCE_HEADER_SIZE;
+
+ return GX_SUCCESS;
+}
+#endif
+
#ifdef GX_BINARY_RESOURCE_SUPPORT
UINT _gx_binres_resource_header_load(GX_BINRES_DATA_INFO *info, GX_RESOURCE_HEADER *header)
{
+ /* The resource declares what follows, so the bytes this header occupies are
+ checked to be present before any of them is read. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_RESOURCE_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(header -> gx_resource_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -124,6 +271,13 @@ UINT _gx_binres_resource_header_load(GX_BINRES_DATA_INFO *info, GX_RESOURCE_HEAD
#ifdef GX_BINARY_RESOURCE_SUPPORT
UINT _gx_binres_string_header_load(GX_BINRES_DATA_INFO *info, GX_STRING_HEADER *header)
{
+ /* The resource declares what follows, so the bytes this header occupies are
+ checked to be present before any of them is read. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_STRING_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(header -> gx_string_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -175,6 +329,13 @@ UINT _gx_binres_string_header_load(GX_BINRES_DATA_INFO *info, GX_STRING_HEADER *
#ifdef GX_BINARY_RESOURCE_SUPPORT
UINT _gx_binres_language_header_load(GX_BINRES_DATA_INFO *info, GX_LANGUAGE_HEADER *header)
{
+ /* The resource declares what follows, so the bytes this header occupies are
+ checked to be present before any of them is read. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_LANGUAGE_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(header -> gx_language_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -237,11 +398,17 @@ USHORT language_count;
USHORT string_count;
UINT language_table_size;
UINT string_table_size;
+UINT status;
info -> gx_binres_read_offset = 0;
/* Read resource header. */
- _gx_binres_resource_header_load(info, &res_header);
+ status = _gx_binres_resource_header_load(info, &res_header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
info -> gx_binres_read_offset += res_header.gx_resource_header_theme_data_size;
if (res_header.gx_resource_header_magic_number != GX_MAGIC_NUMBER)
@@ -249,7 +416,12 @@ UINT string_table_size;
return GX_INVALID_FORMAT;
}
- _gx_binres_string_header_load(info, &string_header);
+ status = _gx_binres_string_header_load(info, &string_header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
if (string_header.gx_string_header_magic_number != GX_MAGIC_NUMBER)
{
@@ -315,6 +487,7 @@ UINT string_table_size;
/* */
/* CALLS */
/* */
+/* _gx_binres_declared_size_get Get declared resource size */
/* _gx_binres_language_table_buffer_allocate */
/* Allocate needed buffer for */
/* loading language table */
@@ -331,6 +504,7 @@ UINT string_table_size;
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
#ifdef GX_ENABLE_DEPRECATED_STRING_API
UINT _gx_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****returned_language_table)
{
@@ -349,28 +523,37 @@ GX_CHAR get_char;
info.gx_binres_root_address = root_address;
+ /* No length is given, so the resource is bounded by the size it declares. */
+ status = _gx_binres_declared_size_get(root_address, &info.gx_binres_root_size);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
/* Allocate memory that needed for language table. */
status = _gx_binres_language_table_buffer_allocate(&info, sizeof(GX_UBYTE * *), sizeof(GX_UBYTE *));
- /* Read Resource header. */
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
+ /* Read Resource header. The allocation has already read and checked
+ both headers, so reading them again cannot fail. */
info.gx_binres_read_offset = 0;
- _gx_binres_resource_header_load(&info, &header);
+ (VOID)_gx_binres_resource_header_load(&info, &header);
/* Skip theme info. */
info.gx_binres_read_offset += header.gx_resource_header_theme_data_size;
- if (header.gx_resource_header_magic_number != GX_MAGIC_NUMBER)
- {
- return GX_INVALID_FORMAT;
- }
-
language_table = GX_NULL;
/* Read language table. */
if (status == GX_SUCCESS)
{
/* Read string header. */
- _gx_binres_string_header_load(&info, &string_header);
+ (VOID)_gx_binres_string_header_load(&info, &string_header);
language_table = (GX_UBYTE ***)(info.gx_binres_buffer + info.gx_binres_buffer_index);
info.gx_binres_buffer_index += sizeof(GX_UBYTE * *) * string_header.gx_string_header_language_count;
@@ -378,7 +561,12 @@ GX_CHAR get_char;
for (lang_index = 0; lang_index < string_header.gx_string_header_language_count; lang_index++)
{
/* Read language header. */
- _gx_binres_language_header_load(&info, &language_header);
+ status = _gx_binres_language_header_load(&info, &language_header);
+
+ if (status != GX_SUCCESS)
+ {
+ break;
+ }
if (language_header.gx_language_header_magic_number != GX_MAGIC_NUMBER)
{
@@ -395,6 +583,12 @@ GX_CHAR get_char;
for (string_index = 1; string_index < string_header.gx_string_header_string_count; string_index++)
{
/* Read string length. */
+ if (_gx_binres_range_check(&info, info.gx_binres_read_offset, sizeof(USHORT)) != GX_SUCCESS)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
GX_BINRES_READ_USHORT(string_length, info.gx_binres_root_address + info.gx_binres_read_offset);
info.gx_binres_read_offset += sizeof(USHORT);
@@ -404,6 +598,16 @@ GX_CHAR get_char;
}
else
{
+ /* The string and its terminator are addressed by a pointer
+ that is kept and read later, so they have to lie inside
+ the resource. */
+ if (_gx_binres_range_check(&info, info.gx_binres_read_offset,
+ (ULONG)string_length + 1) != GX_SUCCESS)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
language_table[lang_index][string_index] = (GX_UBYTE *)(info.gx_binres_root_address + info.gx_binres_read_offset);
info.gx_binres_read_offset += (UINT)(string_length + 1);
}
@@ -417,6 +621,14 @@ GX_CHAR get_char;
{
string_length++;
+ /* This format carries no length, so the scan runs to a
+ terminator and the resource is what stops it. */
+ if (_gx_binres_range_check(&info, info.gx_binres_read_offset, 1) != GX_SUCCESS)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
get_char = (GX_CHAR)info.gx_binres_root_address[info.gx_binres_read_offset];
info.gx_binres_read_offset++;
@@ -436,6 +648,11 @@ GX_CHAR get_char;
}
}
}
+
+ if (status != GX_SUCCESS)
+ {
+ break;
+ }
}
}
@@ -459,6 +676,7 @@ GX_CHAR get_char;
}
#endif
#endif
+#endif
/**************************************************************************/
/* */
@@ -503,7 +721,7 @@ GX_CHAR get_char;
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
-UINT _gx_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table)
+UINT _gx_binres_language_table_load_ext2(GX_UBYTE *root_address, ULONG root_size, GX_STRING ***returned_language_table)
{
UINT status;
GX_BINRES_DATA_INFO info;
@@ -519,29 +737,31 @@ GX_UBYTE *get_data;
memset(&info, 0, sizeof(GX_BINRES_DATA_INFO));
info.gx_binres_root_address = root_address;
+ info.gx_binres_root_size = root_size;
/* Allocate memory that needed for language table. */
status = _gx_binres_language_table_buffer_allocate(&info, sizeof(GX_STRING *), sizeof(GX_STRING));
- /* Read Resource header. */
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
+ /* Read Resource header. The allocation has already read and checked
+ both headers, so reading them again cannot fail. */
info.gx_binres_read_offset = 0;
- _gx_binres_resource_header_load(&info, &header);
+ (VOID)_gx_binres_resource_header_load(&info, &header);
/* Skip theme info. */
info.gx_binres_read_offset += header.gx_resource_header_theme_data_size;
- if (header.gx_resource_header_magic_number != GX_MAGIC_NUMBER)
- {
- return GX_INVALID_FORMAT;
- }
-
language_table = GX_NULL;
/* Read language table. */
if (status == GX_SUCCESS)
{
/* Read string header. */
- _gx_binres_string_header_load(&info, &string_header);
+ (VOID)_gx_binres_string_header_load(&info, &string_header);
language_table = (GX_STRING **)(info.gx_binres_buffer + info.gx_binres_buffer_index);
info.gx_binres_buffer_index += sizeof(GX_STRING *) * string_header.gx_string_header_language_count;
@@ -549,7 +769,12 @@ GX_UBYTE *get_data;
for (lang_index = 0; lang_index < string_header.gx_string_header_language_count; lang_index++)
{
/* Read language header. */
- _gx_binres_language_header_load(&info, &language_header);
+ status = _gx_binres_language_header_load(&info, &language_header);
+
+ if (status != GX_SUCCESS)
+ {
+ break;
+ }
if (language_header.gx_language_header_magic_number != GX_MAGIC_NUMBER)
{
@@ -564,12 +789,28 @@ GX_UBYTE *get_data;
for (string_index = 1; string_index < string_header.gx_string_header_string_count; string_index++)
{
/* Read string length. */
+ if (_gx_binres_range_check(&info, info.gx_binres_read_offset, sizeof(USHORT)) != GX_SUCCESS)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
get_data = info.gx_binres_root_address + info.gx_binres_read_offset;
string_length = *(get_data + 1);
string_length = (USHORT)(string_length << 8);
string_length = (USHORT)(string_length | (*get_data));
info.gx_binres_read_offset += sizeof(USHORT);
+ /* The string and its terminator are addressed by a pointer that
+ is kept and read later, so they have to lie inside the
+ resource. */
+ if (_gx_binres_range_check(&info, info.gx_binres_read_offset,
+ (ULONG)string_length + 1) != GX_SUCCESS)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
if (string_length)
{
language_table[lang_index][string_index].gx_string_ptr = (GX_CHAR *)(info.gx_binres_root_address + info.gx_binres_read_offset);
@@ -582,6 +823,11 @@ GX_UBYTE *get_data;
language_table[lang_index][string_index].gx_string_length = string_length;
info.gx_binres_read_offset += (UINT)(string_length + 1);
}
+
+ if (status != GX_SUCCESS)
+ {
+ break;
+ }
}
}
@@ -605,3 +851,59 @@ GX_UBYTE *get_data;
}
#endif
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gx_binres_language_table_load_ext PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is the form that takes no resource length. It derives */
+/* one from the size the resource declares and defers to language_tabl */
+/* */
+/* A truncated resource is rejected, because its declared size still */
+/* describes the whole of it. A resource built to mislead is not: the */
+/* same attacker chose that size. Callers that can supply the real */
+/* length should use the _ext form, which bounds every read by it. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* returned_language_table Destination for the table */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_declared_size_get Derive the resource extent */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
+UINT _gx_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table)
+{
+ULONG root_size;
+UINT status;
+
+ status = _gx_binres_declared_size_get(root_address, &root_size);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
+ return _gx_binres_language_table_load_ext2(root_address, root_size, returned_language_table);
+}
+#endif
+#endif
diff --git a/common/src/gx_binres_pixelmap_load.c b/common/src/gx_binres_pixelmap_load.c
index 705c76df7..21bf81ddc 100644
--- a/common/src/gx_binres_pixelmap_load.c
+++ b/common/src/gx_binres_pixelmap_load.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -67,6 +69,13 @@ UINT _gx_binres_standalone_resource_seek(GX_BINRES_DATA_INFO *info, UINT res_ind
USHORT type;
ULONG count;
+ /* Type, version and resource count. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset,
+ (sizeof(USHORT) * 2) + sizeof(ULONG)) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(type, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -88,7 +97,21 @@ ULONG count;
if (count > 1)
{
+ /* The offset table, and then the offset it yields, both have to address
+ data inside the resource: the second is a file value that becomes the
+ position every later read starts from. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset + (sizeof(ULONG) * res_index),
+ sizeof(ULONG)) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_ULONG(info -> gx_binres_read_offset, info -> gx_binres_root_address + info -> gx_binres_read_offset + sizeof(ULONG) * res_index);
+
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, 1) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
}
return GX_SUCCESS;
@@ -133,7 +156,7 @@ ULONG count;
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
-UINT _gx_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap)
+UINT _gx_binres_pixelmap_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT map_index, GX_PIXELMAP *pixelmap)
{
UINT status = GX_SUCCESS;
GX_BINRES_DATA_INFO info;
@@ -164,6 +187,7 @@ GX_BINRES_DATA_INFO info;
memset(&info, 0, sizeof(GX_BINRES_DATA_INFO));
info.gx_binres_root_address = (GX_UBYTE *)root_address;
+ info.gx_binres_root_size = root_size;
info.gx_binres_buffer = (GX_UBYTE *)pixelmap;
info.gx_binres_buffer_size = sizeof(GX_PIXELMAP);
@@ -177,3 +201,54 @@ GX_BINRES_DATA_INFO info;
return status;
}
#endif
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gx_binres_pixelmap_load PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is the form that takes no resource length. */
+/* */
+/* */
+/* A standalone resource declares no total size, so nothing can be */
+/* derived here and the reads stay unbounded, as they have always been. */
+/* Callers that know the length should use the _ext form, which bounds */
+/* every read by it. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* map_index Pixelmap index to load */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_declared_size_get Derive the resource extent */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
+UINT _gx_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap)
+{
+ /* A standalone resource carries no total size, only a type, a count and the
+ offsets of what it holds, so there is nothing here to derive an extent
+ from. The reads are left unbounded, which is what this entry point has
+ always done; _gx_binres_pixelmap_load_ext takes the length that bounds them. */
+ return _gx_binres_pixelmap_load_ext(root_address, 0, map_index, pixelmap);
+}
+#endif
+#endif
diff --git a/common/src/gx_binres_theme_load.c b/common/src/gx_binres_theme_load.c
index 83ede82c4..ad07ed7dc 100644
--- a/common/src/gx_binres_theme_load.c
+++ b/common/src/gx_binres_theme_load.c
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
/**************************************************************************/
@@ -69,6 +69,13 @@ extern GX_CONST GX_FONT _gx_system_font_8bpp;
static UINT _gx_binres_theme_header_load(GX_BINRES_DATA_INFO *info, GX_THEME_HEADER *header)
{
+ /* The resource declares what follows, so the bytes this header occupies are
+ checked to be present before any of them is read. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_THEME_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(header -> gx_theme_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -219,6 +226,13 @@ static UINT _gx_binres_theme_header_load(GX_BINRES_DATA_INFO *info, GX_THEME_HEA
#ifdef GX_BINARY_RESOURCE_SUPPORT
static UINT _gx_binres_color_header_load(GX_BINRES_DATA_INFO *info, GX_COLOR_HEADER *header)
{
+ /* The resource declares what follows, so the bytes this header occupies are
+ checked to be present before any of them is read. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_COLOR_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(header -> gx_color_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -267,6 +281,13 @@ static UINT _gx_binres_color_header_load(GX_BINRES_DATA_INFO *info, GX_COLOR_HEA
#ifdef GX_BINARY_RESOURCE_SUPPORT
static UINT _gx_binres_palette_header_load(GX_BINRES_DATA_INFO *info, GX_PALETTE_HEADER *header)
{
+ /* The resource declares what follows, so the bytes this header occupies are
+ checked to be present before any of them is read. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_PALETTE_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(header -> gx_palette_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -315,6 +336,13 @@ static UINT _gx_binres_palette_header_load(GX_BINRES_DATA_INFO *info, GX_PALETTE
#ifdef GX_BINARY_RESOURCE_SUPPORT
UINT _gx_binres_font_header_load(GX_BINRES_DATA_INFO *info, GX_FONT_HEADER *header)
{
+ /* The resource declares what follows, so the bytes this header occupies are
+ checked to be present before any of them is read. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_FONT_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(header -> gx_font_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -381,6 +409,13 @@ UINT _gx_binres_font_header_load(GX_BINRES_DATA_INFO *info, GX_FONT_HEADER *head
static UINT _gx_binres_page_header_load(GX_BINRES_DATA_INFO *info, GX_PAGE_HEADER *header)
{
ULONG read_data = 0;
+ /* The resource declares what follows, so the bytes this header occupies are
+ checked to be present before any of them is read. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_PAGE_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(header -> gx_page_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -421,6 +456,22 @@ ULONG read_data = 0;
GX_BINRES_READ_ULONG(header -> gx_page_header_data_size, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(ULONG);
+ /* The glyph range arrives verbatim from the file, and every consumer of this
+ header turns it into a count as last - first + 1. Validate it here, at the
+ one point both the sizing pass and the load pass read a page header
+ through, so neither can be handed a range that underflows. */
+#if defined(GX_EXTENDED_UNICODE_SUPPORT)
+ if (header -> gx_page_header_last_glyph > GX_MAX_GLYPH_CODE)
+ {
+ return GX_INVALID_FONT;
+ }
+#endif
+
+ if (header -> gx_page_header_first_glyph > header -> gx_page_header_last_glyph)
+ {
+ return GX_INVALID_FONT;
+ }
+
return GX_SUCCESS;
}
#endif
@@ -460,6 +511,13 @@ ULONG read_data = 0;
#ifdef GX_BINARY_RESOURCE_SUPPORT
static UINT _gx_binres_glyph_header_load(GX_BINRES_DATA_INFO *info, GX_GLYPH_HEADER *header)
{
+ /* The resource declares what follows, so the bytes this header occupies are
+ checked to be present before any of them is read. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_GLYPH_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(header -> gx_glyph_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -534,7 +592,21 @@ static UINT _gx_binres_glyph_header_load(GX_BINRES_DATA_INFO *info, GX_GLYPH_HEA
#ifdef GX_BINARY_RESOURCE_SUPPORT
static UINT _gx_binres_kerning_glyph_header_load(GX_BINRES_DATA_INFO *info, GX_KERNING_GLYPH_HEADER *header)
{
- _gx_binres_glyph_header_load(info, (GX_GLYPH_HEADER *)header);
+UINT status;
+
+ /* A kerning record is a glyph record plus one field. The whole of it is
+ checked here, so the extra field is covered as well. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_KERNING_GLYPH_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
+ status = _gx_binres_glyph_header_load(info, (GX_GLYPH_HEADER *)header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
GX_BINRES_READ_USHORT(header -> gx_glyph_header_kerning_table_size, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -579,6 +651,13 @@ static UINT _gx_binres_kerning_glyph_header_load(GX_BINRES_DATA_INFO *info, GX_K
#ifdef GX_BINARY_RESOURCE_SUPPORT
static UINT _gx_binres_pixelmap_header_load(GX_BINRES_DATA_INFO *info, GX_PIXELMAP_HEADER *header)
{
+ /* The resource declares what follows, so the bytes this header occupies are
+ checked to be present before any of them is read. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset, GX_PIXELMAP_HEADER_SIZE) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
GX_BINRES_READ_USHORT(header -> gx_pixelmap_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += sizeof(USHORT);
@@ -669,6 +748,7 @@ GX_FONT_HEADER font_header;
GX_PAGE_HEADER page_header;
USHORT page_index;
UINT glyph_count;
+UINT glyph_size;
UINT read_offset = 0;
UINT temp;
UINT size = 0;
@@ -699,7 +779,12 @@ UINT old_offset;
info -> gx_binres_read_offset = font_header.gx_font_header_data_offset;
/* Load font header. */
- _gx_binres_font_header_load(info, &font_header);
+ status = _gx_binres_font_header_load(info, &font_header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
}
for (page_index = 0; page_index < font_header.gx_font_header_page_count; page_index++)
@@ -721,28 +806,39 @@ UINT old_offset;
}
#endif
- /* Max glyph code is 0x10f000, overflow cannot occur. */
+ /* _gx_binres_page_header_load() has rejected an inverted range, so this
+ cannot underflow. Bounding the glyph code alone would not have been
+ enough: it limits where a range ends, not how wide it is. */
glyph_count = (UINT)(page_header.gx_page_header_last_glyph - page_header.gx_page_header_first_glyph + 1);
/* Calculate size for loading font page. */
temp = sizeof(GX_FONT);
- /* Calculate size for loading glyphs. */
+ /* Calculate size for loading glyphs. The multiply is checked as well as
+ the addition below: a wrapped product here would reserve a buffer far
+ smaller than the load pass goes on to write.
+
+ The record size is the second argument on purpose. The checked
+ multiply divides by that argument, and a sizeof() is never zero,
+ whereas a glyph count could be if this were ever reached with an
+ empty range. */
if (page_header.gx_page_header_format & GX_FONT_FORMAT_COMPRESSED)
{
- temp += sizeof(GX_COMPRESSED_GLYPH) * glyph_count;
+ GX_UTILITY_MATH_UINT_MULT(glyph_count, sizeof(GX_COMPRESSED_GLYPH), glyph_size);
}
#if defined(GX_FONT_KERNING_SUPPORT)
else if (page_header.gx_page_header_format & GX_FONT_FORMAT_KERNING)
{
- temp += sizeof(GX_KERNING_GLYPH) * glyph_count;
+ GX_UTILITY_MATH_UINT_MULT(glyph_count, sizeof(GX_KERNING_GLYPH), glyph_size);
}
#endif
else
{
- temp += sizeof(GX_GLYPH) * glyph_count;
+ GX_UTILITY_MATH_UINT_MULT(glyph_count, sizeof(GX_GLYPH), glyph_size);
}
+ GX_UTILITY_MATH_UINT_ADD(temp, glyph_size, temp);
+
GX_UTILITY_MATH_UINT_ADD(size, temp, size);
}
@@ -814,18 +910,36 @@ UINT temp;
/* Read resource header. */
info -> gx_binres_read_offset = 0;
- _gx_binres_resource_header_load(info, &res_header);
+ status = _gx_binres_resource_header_load(info, &res_header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
if (res_header.gx_resource_header_magic_number != GX_MAGIC_NUMBER)
{
return GX_INVALID_FORMAT;
}
+ /* A theme the resource does not hold would be sized at nothing, and the
+ load pass would still write it. A negative id converts to a count no
+ resource can declare, so it is refused by the same test. */
+ if ((UINT)theme_id >= res_header.gx_resource_header_theme_count)
+ {
+ return GX_INVALID_VALUE;
+ }
+
info -> gx_binres_buffer_size = 0;
for (theme_index = 0; theme_index < res_header.gx_resource_header_theme_count; theme_index++)
{
- _gx_binres_theme_header_load(info, &theme_header);
+ status = _gx_binres_theme_header_load(info, &theme_header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
if (theme_header.gx_theme_header_magic_number != GX_MAGIC_NUMBER)
{
@@ -940,18 +1054,151 @@ UINT temp;
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
-static UINT _gx_binres_glyphs_address_get(GX_BINRES_DATA_INFO *info, USHORT glyph_count, GX_CONST GX_GLYPH **returned_glyphs)
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gx_binres_buffer_reserve PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function reserves room for count records of record_size in the */
+/* load buffer and returns the address to write them at. */
+/* */
+/* The sizing pass is expected to have reserved this space already. */
+/* It is checked again here because the two passes are separate code: */
+/* any disagreement between them has to end in a rejected font rather */
+/* than a write past the end of the buffer. The buffer index is only */
+/* advanced once the records are known to fit. */
+/* */
+/* INPUT */
+/* */
+/* info Binary resource data info */
+/* record_size Size of one record */
+/* count Number of records to reserve */
+/* returned_address Destination for the address */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* None */
+/* */
+/* CALLED BY */
+/* */
+/* _gx_binres_glyphs_address_get */
+/* _gx_binres_kerning_glyphs_address_get */
+/* _gx_binres_compressed_glyphs_address_get */
+/* _gx_binres_one_font_load */
+/* */
+/**************************************************************************/
+static UINT _gx_binres_buffer_reserve(GX_BINRES_DATA_INFO *info, UINT record_size, UINT count, GX_UBYTE **returned_address)
+{
+UINT required;
+
+ /* record_size is a sizeof() and so is never zero, which the checked
+ multiply requires of its second argument. */
+ GX_UTILITY_MATH_UINT_MULT(count, record_size, required);
+
+ if ((required > info -> gx_binres_buffer_size) ||
+ (info -> gx_binres_buffer_index > (info -> gx_binres_buffer_size - required)))
+ {
+ return GX_INVALID_MEMORY_SIZE;
+ }
+
+ *returned_address = info -> gx_binres_buffer + info -> gx_binres_buffer_index;
+ info -> gx_binres_buffer_index += required;
+
+ return GX_SUCCESS;
+}
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gx_binres_glyph_data_check PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks that a glyph's data block, which starts at the */
+/* read offset, lies inside the resource, and that the glyph's map */
+/* offset addresses a position inside that block. */
+/* */
+/* The map offset is a file value turned into a pointer that is kept */
+/* and followed when the glyph is drawn, so it has to address data the */
+/* resource holds. It is bounded by the block rather than by its own */
+/* offset because the block is padded at the front to align the map: */
+/* the map starts inside the block and ends with it. */
+/* */
+/* INPUT */
+/* */
+/* info Binary resource data info */
+/* map_offset Glyph map offset */
+/* data_size Glyph data block size */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_range_check Check a range of the resource */
+/* */
+/* CALLED BY */
+/* */
+/* _gx_binres_glyphs_address_get */
+/* _gx_binres_kerning_glyphs_address_get */
+/* _gx_binres_compressed_glyphs_address_get */
+/* */
+/**************************************************************************/
+static UINT _gx_binres_glyph_data_check(GX_BINRES_DATA_INFO *info, ULONG map_offset, ULONG data_size)
+{
+ULONG data_start = info -> gx_binres_read_offset;
+
+ if ((_gx_binres_range_check(info, data_start, data_size) != GX_SUCCESS) ||
+ (map_offset < data_start) || ((map_offset - data_start) > data_size))
+ {
+ return GX_INVALID_FORMAT;
+ }
+
+ return GX_SUCCESS;
+}
+
+static UINT _gx_binres_glyphs_address_get(GX_BINRES_DATA_INFO *info, UINT glyph_count, GX_CONST GX_GLYPH **returned_glyphs)
{
GX_GLYPH_HEADER header;
GX_GLYPH *glyphs;
-USHORT index = 0;
+GX_UBYTE *address;
+UINT status;
+UINT index = 0;
+
+ status = _gx_binres_buffer_reserve(info, sizeof(GX_GLYPH), glyph_count, &address);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
- glyphs = (GX_GLYPH *)(info -> gx_binres_buffer + info -> gx_binres_buffer_index);
- info -> gx_binres_buffer_index += sizeof(GX_GLYPH) * glyph_count;
+ glyphs = (GX_GLYPH *)address;
for (index = 0; index < glyph_count; index++)
{
- _gx_binres_glyph_header_load(info, &header);
+ status = _gx_binres_glyph_header_load(info, &header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
if (header.gx_glyph_header_magic_number != GX_MAGIC_NUMBER)
{
@@ -968,6 +1215,12 @@ USHORT index = 0;
/* Read glyph data. */
if (header.gx_glyph_header_data_size)
{
+ if (_gx_binres_glyph_data_check(info, header.gx_glyph_header_map_offset,
+ header.gx_glyph_header_data_size) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
glyphs[index].gx_glyph_map = (GX_UBYTE *)(info -> gx_binres_root_address + header.gx_glyph_header_map_offset);
info -> gx_binres_read_offset += header.gx_glyph_header_data_size;
}
@@ -1021,19 +1274,32 @@ USHORT index = 0;
/**************************************************************************/
#ifdef GX_FONT_KERNING_SUPPORT
#ifdef GX_BINARY_RESOURCE_SUPPORT
-static UINT _gx_binres_kerning_glyphs_address_get(GX_BINRES_DATA_INFO *info, USHORT glyph_count,
+static UINT _gx_binres_kerning_glyphs_address_get(GX_BINRES_DATA_INFO *info, UINT glyph_count,
GX_CONST GX_KERNING_GLYPH **returned_glyphs)
{
GX_KERNING_GLYPH_HEADER header;
GX_KERNING_GLYPH *glyphs;
-USHORT index = 0;
+GX_UBYTE *address;
+UINT status;
+UINT index = 0;
- glyphs = (GX_KERNING_GLYPH *)(info -> gx_binres_buffer + info -> gx_binres_buffer_index);
- info -> gx_binres_buffer_index += sizeof(GX_KERNING_GLYPH) * glyph_count;
+ status = _gx_binres_buffer_reserve(info, sizeof(GX_KERNING_GLYPH), glyph_count, &address);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
+ glyphs = (GX_KERNING_GLYPH *)address;
for (index = 0; index < glyph_count; index++)
{
- _gx_binres_kerning_glyph_header_load(info, &header);
+ status = _gx_binres_kerning_glyph_header_load(info, &header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
if (header.gx_glyph_header_magic_number != GX_MAGIC_NUMBER)
{
@@ -1050,6 +1316,12 @@ USHORT index = 0;
/* Read glyph data. */
if (header.gx_glyph_header_data_size)
{
+ if (_gx_binres_glyph_data_check(info, header.gx_glyph_header_map_offset,
+ header.gx_glyph_header_data_size) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
glyphs[index].gx_glyph_map = (GX_UBYTE *)(info -> gx_binres_root_address + header.gx_glyph_header_map_offset);
info -> gx_binres_read_offset += header.gx_glyph_header_data_size;
}
@@ -1061,6 +1333,14 @@ USHORT index = 0;
/* Set glyph kerning table. */
if (header.gx_glyph_header_kerning_table_size)
{
+ /* The kerning table is kept as a pointer and read when the glyph
+ is drawn, so it has to lie inside the resource. */
+ if (_gx_binres_range_check(info, info -> gx_binres_read_offset,
+ header.gx_glyph_header_kerning_table_size) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
glyphs[index].gx_kerning_table = (GX_UBYTE *)(info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += header.gx_glyph_header_kerning_table_size;
}
@@ -1109,19 +1389,32 @@ USHORT index = 0;
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
-static UINT _gx_binres_compressed_glyphs_address_get(GX_BINRES_DATA_INFO *info, USHORT glyph_count,
+static UINT _gx_binres_compressed_glyphs_address_get(GX_BINRES_DATA_INFO *info, UINT glyph_count,
GX_CONST GX_COMPRESSED_GLYPH **returned_glyphs)
{
GX_GLYPH_HEADER header;
GX_COMPRESSED_GLYPH *glyphs;
-USHORT index = 0;
+GX_UBYTE *address;
+UINT status;
+UINT index = 0;
+
+ status = _gx_binres_buffer_reserve(info, sizeof(GX_COMPRESSED_GLYPH), glyph_count, &address);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
- glyphs = (GX_COMPRESSED_GLYPH *)(info -> gx_binres_buffer + info -> gx_binres_buffer_index);
- info -> gx_binres_buffer_index += sizeof(GX_COMPRESSED_GLYPH) * glyph_count;
+ glyphs = (GX_COMPRESSED_GLYPH *)address;
for (index = 0; index < glyph_count; index++)
{
- _gx_binres_glyph_header_load(info, &header);
+ status = _gx_binres_glyph_header_load(info, &header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
if (header.gx_glyph_header_magic_number != GX_MAGIC_NUMBER)
{
@@ -1139,6 +1432,12 @@ USHORT index = 0;
/* Read glyph data. */
if (header.gx_glyph_header_data_size)
{
+ if (_gx_binres_glyph_data_check(info, header.gx_glyph_header_map_offset,
+ header.gx_glyph_header_data_size) != GX_SUCCESS)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
glyphs[index].gx_glyph_map = (GX_UBYTE *)(info -> gx_binres_root_address + header.gx_glyph_header_map_offset);
info -> gx_binres_read_offset += header.gx_glyph_header_data_size;
}
@@ -1198,8 +1497,9 @@ GX_PAGE_HEADER header;
GX_FONT *font;
GX_FONT *head_page = GX_NULL;
GX_FONT *pre_page = GX_NULL;
+GX_UBYTE *address;
USHORT index;
-USHORT glyph_count;
+UINT glyph_count;
UINT read_offset = 0;
/* Read font header. */
@@ -1242,7 +1542,12 @@ UINT read_offset = 0;
info -> gx_binres_read_offset = font_header.gx_font_header_data_offset;
/* Read font header. */
- _gx_binres_font_header_load(info, &font_header);
+ status = _gx_binres_font_header_load(info, &font_header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
}
for (index = 0; index < font_header.gx_font_header_page_count; index++)
@@ -1255,8 +1560,18 @@ UINT read_offset = 0;
return status;
}
- font = (GX_FONT *)(info -> gx_binres_buffer + info -> gx_binres_buffer_index);
- info -> gx_binres_buffer_index += sizeof(GX_FONT);
+ /* The page's own record is reserved through the same bound as its
+ glyphs. The sizing pass counts one of these per page, but it
+ derives the page count from the header a second time, so the
+ agreement is checked here rather than assumed. */
+ status = _gx_binres_buffer_reserve(info, sizeof(GX_FONT), 1, &address);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
+ font = (GX_FONT *)address;
font -> gx_font_baseline = header.gx_page_header_baseline;
font -> gx_font_first_glyph = header.gx_page_header_first_glyph;
@@ -1267,7 +1582,10 @@ UINT read_offset = 0;
font -> gx_font_prespace = header.gx_page_header_prespace;
/* Read glyphs data. */
- glyph_count = (USHORT)(font -> gx_font_last_glyph - font -> gx_font_first_glyph + 1);
+ /* Use the same width the sizing pass used. Truncating here is what
+ let the two passes disagree: the reservation was made for one
+ count and the write performed with another. */
+ glyph_count = (UINT)(font -> gx_font_last_glyph - font -> gx_font_first_glyph + 1);
if (font -> gx_font_format & GX_FONT_FORMAT_COMPRESSED)
{
@@ -1358,6 +1676,7 @@ static UINT _gx_binres_color_table_load(GX_BINRES_DATA_INFO *info, USHORT color_
{
GX_COLOR_HEADER header;
GX_COLOR *color_table = GX_NULL;
+UINT status;
if (!color_count)
{
@@ -1365,13 +1684,26 @@ GX_COLOR *color_table = GX_NULL;
}
/* Read color table header. */
- _gx_binres_color_header_load(info, &header);
+ status = _gx_binres_color_header_load(info, &header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
if (header.gx_color_header_magic_number != GX_MAGIC_NUMBER)
{
return GX_INVALID_FORMAT;
}
+ /* The table is kept as a pointer and read when the theme is drawn, so the
+ entries the theme declares have to lie inside the resource. */
+ if ((header.gx_color_header_data_size < ((ULONG)color_count * sizeof(GX_COLOR))) ||
+ (_gx_binres_range_check(info, info -> gx_binres_read_offset, header.gx_color_header_data_size) != GX_SUCCESS))
+ {
+ return GX_INVALID_FORMAT;
+ }
+
color_table = (GX_COLOR *)(info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += header.gx_color_header_data_size;
@@ -1419,6 +1751,7 @@ static UINT _gx_binres_palette_table_load(GX_BINRES_DATA_INFO *info, USHORT colo
{
GX_PALETTE_HEADER header;
GX_COLOR *palette_table = GX_NULL;
+UINT status;
if (!color_count)
{
@@ -1426,13 +1759,26 @@ GX_COLOR *palette_table = GX_NULL;
}
/* Read palette table header. */
- _gx_binres_palette_header_load(info, &header);
+ status = _gx_binres_palette_header_load(info, &header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
if (header.gx_palette_header_magic_number != GX_MAGIC_NUMBER)
{
return GX_INVALID_FORMAT;
}
+ /* The table is kept as a pointer and read when the theme is drawn, so the
+ entries the theme declares have to lie inside the resource. */
+ if ((header.gx_palette_header_data_size < ((ULONG)color_count * sizeof(GX_COLOR))) ||
+ (_gx_binres_range_check(info, info -> gx_binres_read_offset, header.gx_palette_header_data_size) != GX_SUCCESS))
+ {
+ return GX_INVALID_FORMAT;
+ }
+
palette_table = (GX_COLOR *)(info -> gx_binres_root_address + info -> gx_binres_read_offset);
info -> gx_binres_read_offset += header.gx_palette_header_data_size;
@@ -1480,10 +1826,17 @@ static UINT _gx_binres_font_table_load(GX_BINRES_DATA_INFO *info, USHORT table_s
{
UINT status = GX_SUCCESS;
GX_FONT **font_table = GX_NULL;
+GX_UBYTE *address;
USHORT index;
- font_table = (GX_FONT **)(info -> gx_binres_buffer + info -> gx_binres_buffer_index);
- info -> gx_binres_buffer_index += sizeof(GX_FONT *) * table_size;
+ status = _gx_binres_buffer_reserve(info, sizeof(GX_FONT *), table_size, &address);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
+ font_table = (GX_FONT **)address;
for (index = 0; index < table_size; index++)
{
@@ -1543,6 +1896,7 @@ ULONG size;
UINT read_offset = 0;
GX_PIXELMAP *pixelmap;
+GX_UBYTE *address;
/* Read pixelmap header. */
status = _gx_binres_pixelmap_header_load(info, &header);
@@ -1565,12 +1919,23 @@ GX_PIXELMAP *pixelmap;
info -> gx_binres_read_offset = header.gx_pixelmap_header_data_offset;
/* Read pixelmap header. */
- _gx_binres_pixelmap_header_load(info, &header);
+ status = _gx_binres_pixelmap_header_load(info, &header);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
}
/* Allocate memory for pixelmap. */
- pixelmap = (GX_PIXELMAP *)(info -> gx_binres_buffer + info -> gx_binres_buffer_index);
- info -> gx_binres_buffer_index += sizeof(GX_PIXELMAP);
+ status = _gx_binres_buffer_reserve(info, sizeof(GX_PIXELMAP), 1, &address);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
+ pixelmap = (GX_PIXELMAP *)address;
pixelmap -> gx_pixelmap_aux_data_size = header.gx_pixelmap_header_aux_data_size;
pixelmap -> gx_pixelmap_data_size = header.gx_pixelmap_header_map_size;
@@ -1659,24 +2024,32 @@ static UINT _gx_binres_pixelmap_table_load(GX_BINRES_DATA_INFO *info, USHORT tab
{
UINT status = GX_SUCCESS;
USHORT index;
-USHORT map_id;
-GX_PIXELMAP *pixelmap;
+USHORT map_id = 0;
+GX_PIXELMAP *pixelmap = GX_NULL;
for (index = 1; index < table_size; index++)
{
status = _gx_binres_one_pixelmap_load(info, &pixelmap, &map_id);
- while (index < map_id)
+ /* A failed load leaves map_id and pixelmap unset, so nothing is stored. */
+ if (status != GX_SUCCESS)
{
- pixelmap_table[index++] = GX_NULL;
+ return status;
}
- pixelmap_table[index] = pixelmap;
+ /* map_id is read from the resource, while the table is sized from the
+ theme header's pixelmap count, so it must be bounded here. */
+ if (map_id >= table_size)
+ {
+ return GX_INVALID_FORMAT;
+ }
- if (status)
+ while (index < map_id)
{
- return status;
+ pixelmap_table[index++] = GX_NULL;
}
+
+ pixelmap_table[index] = pixelmap;
}
return status;
@@ -1726,19 +2099,21 @@ GX_PIXELMAP *pixelmap;
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
-UINT _gx_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme)
+UINT _gx_binres_theme_load_ext(GX_UBYTE *root_address, ULONG root_size, INT theme_id, GX_THEME **returned_theme)
{
UINT status;
GX_BINRES_DATA_INFO info;
GX_RESOURCE_HEADER header;
GX_THEME_HEADER theme_header;
GX_THEME *theme;
+GX_UBYTE *address;
INT index;
memset(&info, 0, sizeof(GX_BINRES_DATA_INFO));
memset(&theme_header, 0, sizeof(GX_THEME_HEADER));
info.gx_binres_root_address = (GX_UBYTE *)root_address;
+ info.gx_binres_root_size = root_size;
/* Allocate memory that needed for theme table. */
status = _gx_binres_theme_buffer_allocate(&info, theme_id);
@@ -1757,12 +2132,23 @@ INT index;
{
/* Read theme header. */
- _gx_binres_theme_header_load(&info, &theme_header);
+ status = _gx_binres_theme_header_load(&info, &theme_header);
+
+ if (status != GX_SUCCESS)
+ {
+ break;
+ }
if (index == theme_id)
{
- theme = (GX_THEME *)(info.gx_binres_buffer + info.gx_binres_buffer_index);
- info.gx_binres_buffer_index += sizeof(GX_THEME);
+ status = _gx_binres_buffer_reserve(&info, sizeof(GX_THEME), 1, &address);
+
+ if (status != GX_SUCCESS)
+ {
+ break;
+ }
+
+ theme = (GX_THEME *)address;
theme -> theme_color_table_size = theme_header.gx_theme_header_color_count;
theme -> theme_palette_size = theme_header.gx_theme_header_palette_count;
@@ -1798,26 +2184,23 @@ INT index;
if ((status == GX_SUCCESS) && theme_header.gx_theme_header_pixelmap_data_size && theme_header.gx_theme_header_pixelmap_count)
{
/* Allocate pixelmap table size. */
- theme -> theme_pixelmap_table = (GX_PIXELMAP **)(info.gx_binres_buffer + info.gx_binres_buffer_index);
- info.gx_binres_buffer_index += sizeof(GX_PIXELMAP *) * (UINT)(theme_header.gx_theme_header_pixelmap_count + 1);
+ status = _gx_binres_buffer_reserve(&info, sizeof(GX_PIXELMAP *),
+ (UINT)(theme_header.gx_theme_header_pixelmap_count + 1), &address);
+ theme -> theme_pixelmap_table = (GX_PIXELMAP **)address;
/* Load pixelmap table. */
- status = _gx_binres_pixelmap_table_load(&info,
- theme -> theme_pixelmap_table_size,
- theme -> theme_pixelmap_table);
+ if (status == GX_SUCCESS)
+ {
+ status = _gx_binres_pixelmap_table_load(&info,
+ theme -> theme_pixelmap_table_size,
+ theme -> theme_pixelmap_table);
+ }
}
if (status == GX_SUCCESS)
{
*returned_theme = theme;
}
- else
- {
- /* Free allocated buffer if theme loading failed. */
- _gx_system_memory_free(info.gx_binres_buffer);
-
- *returned_theme = GX_NULL;
- }
break;
}
@@ -1828,7 +2211,71 @@ INT index;
}
}
+ if ((status != GX_SUCCESS) && (info.gx_binres_buffer != GX_NULL))
+ {
+ /* Free allocated buffer if theme loading failed. */
+ _gx_system_memory_free(info.gx_binres_buffer);
+
+ *returned_theme = GX_NULL;
+ }
+
return status;
}
#endif
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gx_binres_theme_load PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function is the form that takes no resource length. It derives */
+/* one from the size the resource declares and defers to theme_load_ex */
+/* */
+/* A truncated resource is rejected, because its declared size still */
+/* describes the whole of it. A resource built to mislead is not: the */
+/* same attacker chose that size. Callers that can supply the real */
+/* length should use the _ext form, which bounds every read by it. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* theme_id Theme index to load */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_declared_size_get Derive the resource extent */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
+UINT _gx_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme)
+{
+ULONG root_size;
+UINT status;
+
+ status = _gx_binres_declared_size_get(root_address, &root_size);
+
+ if (status != GX_SUCCESS)
+ {
+ return status;
+ }
+
+ return _gx_binres_theme_load_ext(root_address, root_size, theme_id, returned_theme);
+}
+#endif
+#endif
diff --git a/common/src/gx_image_reader_jpeg_decode.c b/common/src/gx_image_reader_jpeg_decode.c
index ec487d5a6..a365a69aa 100644
--- a/common/src/gx_image_reader_jpeg_decode.c
+++ b/common/src/gx_image_reader_jpeg_decode.c
@@ -8,6 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
@@ -128,6 +129,13 @@ GX_UBYTE table_index;
GX_UBYTE *jpeg_data = jpeg_info -> gx_jpeg_data + jpeg_info -> gx_jpeg_data_index;
INT index;
+ /* The declared length includes its own two bytes, so anything shorter than
+ that is malformed and would underflow the subtraction below. */
+ if (segment_len < 2)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
/* Minus two-byte length. */
jpeg_info -> gx_jpeg_data_index += (INT)segment_len;
segment_len -= 2;
@@ -135,6 +143,13 @@ INT index;
while (segment_len)
{
+ /* Each table is one precision and destination byte followed by 64
+ entries, so check that the segment holds them before reading. */
+ if (segment_len < 65)
+ {
+ return GX_INVALID_FORMAT;
+ }
+
/* The upper 4 bits specify the element precision: 0 indicates 8-bit, 1 indecates 16-bit. */
if ((*jpeg_data) & 0xf0)
{
@@ -151,10 +166,6 @@ INT index;
jpeg_info -> gx_jpeg_quantization_table[table_index][index] = *jpeg_data++;
}
- if (segment_len < 65)
- {
- return GX_INVALID_FORMAT;
- }
segment_len -= 65;
}
@@ -375,6 +386,15 @@ static UINT _gx_image_reader_jpeg_frame_header_read(GX_JPEG_INFO *jpeg_info, UIN
{
GX_UBYTE *jpeg_data = jpeg_info -> gx_jpeg_data + jpeg_info -> gx_jpeg_data_index;
INT i_component;
+GX_UBYTE num_components;
+
+ /* Two length bytes, one precision byte, two each for height and width, and
+ the component count. The dispatcher bounded segment_len against the
+ buffer; this bounds what is read against segment_len. */
+ if (segment_len < 8)
+ {
+ return GX_INVALID_FORMAT;
+ }
jpeg_info -> gx_jpeg_data_index += (INT)segment_len;
jpeg_data += 2;
@@ -405,13 +425,23 @@ INT i_component;
}
/* Read image components. */
- jpeg_info -> gx_jpeg_num_of_components = *jpeg_data++;
+ /* Validate before storing, so that a rejected count never reaches the
+ decoder state. */
+ num_components = *jpeg_data++;
- if (jpeg_info -> gx_jpeg_num_of_components > JPG_MAX_COMPONENTS)
+ if (num_components > JPG_MAX_COMPONENTS)
{
return GX_FAILURE;
}
+ /* Three bytes per component follow the fixed part. */
+ if (segment_len < (8 + ((UINT)num_components * 3)))
+ {
+ return GX_INVALID_FORMAT;
+ }
+
+ jpeg_info -> gx_jpeg_num_of_components = num_components;
+
for (i_component = 0; i_component < jpeg_info -> gx_jpeg_num_of_components; i_component++)
{
/* Read component id */
@@ -463,18 +493,34 @@ static UINT _gx_image_reader_jpeg_scan_header_read(GX_JPEG_INFO *jpeg_info, UINT
{
GX_UBYTE *jpeg_data = jpeg_info -> gx_jpeg_data + jpeg_info -> gx_jpeg_data_index;
INT index;
+GX_UBYTE num_components;
+
+ /* Two length bytes and the component count. */
+ if (segment_len < 3)
+ {
+ return GX_INVALID_FORMAT;
+ }
jpeg_data += 2;
jpeg_info -> gx_jpeg_data_index += (INT)segment_len;
- /* Read the number of image components. */
- jpeg_info -> gx_jpeg_num_of_components = *jpeg_data++;
+ /* Read the number of image components. Validate before storing, so that a
+ rejected count never reaches the decoder state. */
+ num_components = *jpeg_data++;
- if (jpeg_info -> gx_jpeg_num_of_components > JPG_MAX_COMPONENTS)
+ if (num_components > JPG_MAX_COMPONENTS)
{
return GX_FAILURE;
}
+ /* Two bytes per component follow the count. */
+ if (segment_len < (3 + ((UINT)num_components * 2)))
+ {
+ return GX_INVALID_FORMAT;
+ }
+
+ jpeg_info -> gx_jpeg_num_of_components = num_components;
+
for (index = 0; index < jpeg_info -> gx_jpeg_num_of_components; index++)
{
/* skip image component */
@@ -2253,7 +2299,9 @@ UINT (*one_mcu_write)(GX_JPEG_INFO *jpeg_info, INT xpos, INT ypos, INT h, INT v)
h = (jpeg_info -> gx_jpeg_sample_factor[0] >> 4);
v = (jpeg_info -> gx_jpeg_sample_factor[0] & 0x0f);
- if (v > 2)
+ /* h and v step the decode loops below, so neither may be zero. The luma
+ blocks of one MCU, 64 bytes each, must fit in gx_jpeg_Y_block. */
+ if ((h == 0) || (v == 0) || (v > 2) || ((h * v) > 4))
{
return GX_INVALID_FORMAT;
}
@@ -2353,6 +2401,8 @@ GX_UBYTE *jpeg_data;
GX_UBYTE marker;
UINT segment_len;
UINT status = GX_SUCCESS;
+GX_BOOL sof0_done = GX_FALSE;
+GX_BOOL sos_done = GX_FALSE;
if (jpeg_info -> gx_jpeg_data == GX_NULL || jpeg_info -> gx_jpeg_data_size < 10)
{
@@ -2401,6 +2451,17 @@ UINT status = GX_SUCCESS;
case 0xc0:
/* Start of Frame */
+
+ /* A JPEG carries one frame header, before the scan. Another would
+ change the image dimensions after the output buffer is sized. */
+ if (sof0_done || sos_done)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
+ sof0_done = GX_TRUE;
+
status = _gx_image_reader_jpeg_frame_header_read(jpeg_info, segment_len);
break;
@@ -2411,6 +2472,17 @@ UINT status = GX_SUCCESS;
case 0xdd:
/* Read restart interval which specifies the number of MCU in restart interval. */
+
+ /* The two length bytes are followed by the two-byte interval, so
+ the segment has to be at least four bytes long. The dispatcher
+ above bounded segment_len against the buffer; this bounds the
+ read against segment_len. */
+ if (segment_len < 4)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
jpeg_data += 2;
jpeg_info -> gx_jpeg_restart_interval = *jpeg_data++;
jpeg_info -> gx_jpeg_restart_interval <<= 8;
@@ -2421,7 +2493,25 @@ UINT status = GX_SUCCESS;
case 0xda:
/* Start of Scan, stores which Huffman tables are associated with which components
The program start decoding the data section directly after it reads in this header. */
- _gx_image_reader_jpeg_scan_header_read(jpeg_info, segment_len);
+
+ /* The scan is decoded against the dimensions and sampling factors
+ the frame header supplies, so refuse a scan without one, and
+ refuse a second scan. */
+ if ((!sof0_done) || sos_done)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
+ sos_done = GX_TRUE;
+
+ /* A rejected scan header stops the decode. */
+ status = _gx_image_reader_jpeg_scan_header_read(jpeg_info, segment_len);
+
+ if (status != GX_SUCCESS)
+ {
+ break;
+ }
/* Start decoding jpeg data stream. */
status = _gx_image_reader_jpeg_decompress(jpeg_info);
@@ -2523,10 +2613,12 @@ GX_JPEG_INFO *jpeg_info;
if (status == GX_SUCCESS)
{
+ /* Describe the allocated buffer, from the output geometry latched when
+ it was created. */
outmap -> gx_pixelmap_data = jpeg_info -> gx_jpeg_output_buffer;
- outmap -> gx_pixelmap_data_size = (ULONG)(jpeg_info -> gx_jpeg_output_stride * jpeg_info -> gx_jpeg_height);
- outmap -> gx_pixelmap_width = (GX_VALUE)jpeg_info -> gx_jpeg_width;
- outmap -> gx_pixelmap_height = (GX_VALUE)jpeg_info -> gx_jpeg_height;
+ outmap -> gx_pixelmap_data_size = (ULONG)(jpeg_info -> gx_jpeg_output_stride * jpeg_info -> gx_jpeg_output_height);
+ outmap -> gx_pixelmap_width = (GX_VALUE)jpeg_info -> gx_jpeg_output_width;
+ outmap -> gx_pixelmap_height = (GX_VALUE)jpeg_info -> gx_jpeg_output_height;
outmap -> gx_pixelmap_flags = 0;
outmap -> gx_pixelmap_format = jpeg_info -> gx_jpeg_output_color_format;
}
diff --git a/common/src/gx_image_reader_png_decode.c b/common/src/gx_image_reader_png_decode.c
index d2de0161c..9eaad5fea 100644
--- a/common/src/gx_image_reader_png_decode.c
+++ b/common/src/gx_image_reader_png_decode.c
@@ -1759,6 +1759,23 @@ INT y;
byte_width = (png -> gx_png_width * bpp + 7) >> 3;
bpp = (bpp + 7) >> 3;
+ if ((png -> gx_png_width <= 0) || (png -> gx_png_height <= 0) || (byte_width <= 0))
+ {
+ return GX_FAILURE;
+ }
+
+ /* Confirm the walk below fits the data that was actually decoded. The buffer
+ was allocated and filled against the dimensions in force at the time, and
+ this pass derives its own extent from the current ones. Those are normally
+ the same, and the check costs nothing when they are; when they are not,
+ this is what keeps a dimension change from becoming a write past the end
+ of the allocation. Each row is a filter byte followed by byte_width bytes
+ of pixel data, so the walk spans height * (byte_width + 1). */
+ if ((UINT)png -> gx_png_height > ((UINT)png -> gx_png_decoded_data_len / (UINT)(byte_width + 1)))
+ {
+ return GX_FAILURE;
+ }
+
for (y = 0; y < png -> gx_png_height; y++)
{
filter_type = png -> gx_png_decoded_data[y * byte_width + y];
@@ -1903,6 +1920,8 @@ INT data_len;
CHAR chunk_type[4];
INT checksum;
GX_BOOL idat_done = GX_FALSE;
+GX_BOOL ihdr_done = GX_FALSE;
+GX_BOOL plte_done = GX_FALSE;
INT *scratch_buffer;
INT scratch_index = 0;
GX_BOOL decoded_done = GX_FALSE;
@@ -1977,12 +1996,33 @@ GX_BOOL decoded_done = GX_FALSE;
if ((strncmp(chunk_type, "IDAT", 4) == 0) && (!idat_done))
{
+ /* IHDR carries the dimensions the decoded data buffer is sized
+ from, so it has to have been seen already. */
+ if (!ihdr_done)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
idat_done = GX_TRUE;
status = _gx_image_reader_png_IDAT_chunk_read(&png);
}
else if (strncmp(chunk_type, "IHDR", 4) == 0)
{
+ /* A PNG carries exactly one IHDR, and it comes first. Accepting
+ a second one let a file change the width, height and pixel
+ depth after the decoded data buffer had been allocated from
+ the original values, leaving every later consumer working to
+ dimensions the allocation was never sized for. */
+ if (ihdr_done)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
+ ihdr_done = GX_TRUE;
+
status = _gx_image_reader_png_IHDR_chunk_read(&png);
}
else if (strncmp(chunk_type, "gAMA", 4) == 0)
@@ -1991,6 +2031,16 @@ GX_BOOL decoded_done = GX_FALSE;
}
else if (strncmp(chunk_type, "PLTE", 4) == 0)
{
+ /* One palette per image, for the same reason: the palette is
+ allocated when it is read. */
+ if (plte_done)
+ {
+ status = GX_INVALID_FORMAT;
+ break;
+ }
+
+ plte_done = GX_TRUE;
+
status = _gx_image_reader_png_PLTE_chunk_read(&png);
}
else if ((strncmp(chunk_type, "tRNS", 4) == 0) && (png.gx_png_trans == GX_NULL))
diff --git a/common/src/gx_multi_line_text_input_draw.c b/common/src/gx_multi_line_text_input_draw.c
index 8a6b6f96e..01f2f5c11 100644
--- a/common/src/gx_multi_line_text_input_draw.c
+++ b/common/src/gx_multi_line_text_input_draw.c
@@ -8,8 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Claude Sonnet 4.6).
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gx_multi_line_text_input_text_set.c b/common/src/gx_multi_line_text_input_text_set.c
index acb4ed823..9edf433d8 100644
--- a/common/src/gx_multi_line_text_input_text_set.c
+++ b/common/src/gx_multi_line_text_input_text_set.c
@@ -9,7 +9,7 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gx_multi_line_text_view_display_info_get.c b/common/src/gx_multi_line_text_view_display_info_get.c
index 4379efb58..1e3c33056 100644
--- a/common/src/gx_multi_line_text_view_display_info_get.c
+++ b/common/src/gx_multi_line_text_view_display_info_get.c
@@ -9,8 +9,7 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Sonnet 4.6).
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gx_multi_line_text_view_text_draw.c b/common/src/gx_multi_line_text_view_text_draw.c
index 186ffc125..7f58d5d8e 100644
--- a/common/src/gx_multi_line_text_view_text_draw.c
+++ b/common/src/gx_multi_line_text_view_text_draw.c
@@ -8,8 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Claude Sonnet 4.6).
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gx_radial_progress_bar_background_draw.c b/common/src/gx_radial_progress_bar_background_draw.c
index 0448cc4b0..d3f247528 100644
--- a/common/src/gx_radial_progress_bar_background_draw.c
+++ b/common/src/gx_radial_progress_bar_background_draw.c
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Claude Sonnet 4.6).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gx_rich_text_view_text_draw.c b/common/src/gx_rich_text_view_text_draw.c
index 6da05aa84..6fea4cf9c 100644
--- a/common/src/gx_rich_text_view_text_draw.c
+++ b/common/src/gx_rich_text_view_text_draw.c
@@ -8,8 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Claude Sonnet 4.6).
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gx_single_line_text_input_draw.c b/common/src/gx_single_line_text_input_draw.c
index 11a7c2ca9..3ce0788f2 100644
--- a/common/src/gx_single_line_text_input_draw.c
+++ b/common/src/gx_single_line_text_input_draw.c
@@ -8,8 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Claude Sonnet 4.6).
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gx_system_canvas_refresh.c b/common/src/gx_system_canvas_refresh.c
index 510eda9a8..acd2de4c6 100644
--- a/common/src/gx_system_canvas_refresh.c
+++ b/common/src/gx_system_canvas_refresh.c
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Claude Sonnet 4.6).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gx_system_error_process.c b/common/src/gx_system_error_process.c
index 9c808bc48..993531193 100644
--- a/common/src/gx_system_error_process.c
+++ b/common/src/gx_system_error_process.c
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Claude Sonnet 4.6).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gx_system_timer_start.c b/common/src/gx_system_timer_start.c
index aa7822865..1bdb37b1c 100644
--- a/common/src/gx_system_timer_start.c
+++ b/common/src/gx_system_timer_start.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/**************************************************************************/
/**************************************************************************/
@@ -128,7 +130,7 @@ UINT tx_timer_active;
#ifdef GX_THREADX_BINDING
#ifndef GX_DISABLE_THREADX_TIMER_SOURCE
/* if the low-level timer is not active, start it */
- tx_timer_info_get(&_gx_system_timer, (CHAR **)TX_NULL, &tx_timer_active,
+ tx_timer_info_get(&_gx_system_timer, TX_NULL, &tx_timer_active,
(ULONG *)TX_NULL, (ULONG *)TX_NULL, (TX_TIMER **)TX_NULL);
if (!tx_timer_active)
@@ -144,4 +146,3 @@ UINT tx_timer_active;
GX_EXIT_CRITICAL
return GX_SUCCESS;
}
-
diff --git a/common/src/gx_utility_circle_point_get.c b/common/src/gx_utility_circle_point_get.c
index 1463725b8..fdfec3565 100644
--- a/common/src/gx_utility_circle_point_get.c
+++ b/common/src/gx_utility_circle_point_get.c
@@ -106,8 +106,10 @@ GX_BOOL swap = GX_FALSE;
}
else
{
- point -> gx_point_x = (GX_VALUE)(GX_FIXED_VAL_TO_INT(r * _gx_utility_math_cos(GX_FIXED_VAL_MAKE(angle))));
- point -> gx_point_y = (GX_VALUE)(GX_FIXED_VAL_TO_INT(r * _gx_utility_math_sin(GX_FIXED_VAL_MAKE(angle))));
+ /* The radius is unsigned and the sine and cosine are not, so the radius
+ is made signed before the product is formed. */
+ point -> gx_point_x = (GX_VALUE)(GX_FIXED_VAL_TO_INT((INT)r * _gx_utility_math_cos(GX_FIXED_VAL_MAKE(angle))));
+ point -> gx_point_y = (GX_VALUE)(GX_FIXED_VAL_TO_INT((INT)r * _gx_utility_math_sin(GX_FIXED_VAL_MAKE(angle))));
if (angle <= 90)
{
diff --git a/common/src/gx_widget_block_move.c b/common/src/gx_widget_block_move.c
index cf612c212..d4054684a 100644
--- a/common/src/gx_widget_block_move.c
+++ b/common/src/gx_widget_block_move.c
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Copilot (Claude Sonnet 4.6).
+// Portions of this file were generated with AI assistance.
/**************************************************************************/
diff --git a/common/src/gxe_binres_font_load.c b/common/src/gxe_binres_font_load.c
index cd19678b4..95dd7a848 100644
--- a/common/src/gxe_binres_font_load.c
+++ b/common/src/gxe_binres_font_load.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -72,6 +74,7 @@
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
UINT _gxe_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size)
{
if (root_address == GX_NULL || buffer == GX_NULL || buffer_size == GX_NULL)
@@ -82,3 +85,62 @@ UINT _gxe_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *bu
return _gx_binres_font_load(root_address, font_index, buffer, buffer_size);
}
#endif
+#endif
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gxe_binres_font_load_ext PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the resource load with a length. */
+/* */
+/* A length of zero is rejected rather than treated as unknown: a */
+/* caller reaching this entry point is supplying one, and accepting */
+/* zero would silently leave every read unbounded. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* root_size Extent of the resource */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_font_load_ext */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+UINT _gxe_binres_font_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size)
+{
+UINT status;
+
+ if ((root_address == GX_NULL) || (buffer_size == GX_NULL))
+ {
+ return GX_PTR_ERROR;
+ }
+
+ if (root_size == 0)
+ {
+ return GX_INVALID_SIZE;
+ }
+
+ status = _gx_binres_font_load_ext(root_address, root_size, font_index, buffer, buffer_size);
+
+ /* Return completion status code. */
+ return(status);
+}
+#endif
diff --git a/common/src/gxe_binres_language_count_get.c b/common/src/gxe_binres_language_count_get.c
index a3f155b7d..61cbb12dd 100644
--- a/common/src/gxe_binres_language_count_get.c
+++ b/common/src/gxe_binres_language_count_get.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -63,6 +65,7 @@
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
UINT _gxe_binres_language_count_get(GX_UBYTE *root_address, GX_VALUE *put_count)
{
UINT status;
@@ -78,4 +81,62 @@ UINT status;
return(status);
}
#endif
+#endif
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gxe_binres_language_count_get_ext PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the resource load with a length. */
+/* */
+/* A length of zero is rejected rather than treated as unknown: a */
+/* caller reaching this entry point is supplying one, and accepting */
+/* zero would silently leave every read unbounded. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* root_size Extent of the resource */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_language_count_get_ext */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+UINT _gxe_binres_language_count_get_ext(GX_UBYTE *root_address, ULONG root_size, GX_VALUE *put_count)
+{
+UINT status;
+
+ if ((root_address == GX_NULL) || (put_count == GX_NULL))
+ {
+ return GX_PTR_ERROR;
+ }
+
+ if (root_size == 0)
+ {
+ return GX_INVALID_SIZE;
+ }
+ status = _gx_binres_language_count_get_ext(root_address, root_size, put_count);
+
+ /* Return completion status code. */
+ return(status);
+}
+#endif
diff --git a/common/src/gxe_binres_language_info_load.c b/common/src/gxe_binres_language_info_load.c
index 07bddccc1..902f05ff7 100644
--- a/common/src/gxe_binres_language_info_load.c
+++ b/common/src/gxe_binres_language_info_load.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -63,6 +65,7 @@
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
UINT _gxe_binres_language_info_load(GX_UBYTE *root_address, GX_LANGUAGE_HEADER *put_info)
{
UINT status;
@@ -78,4 +81,62 @@ UINT status;
return(status);
}
#endif
+#endif
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gxe_binres_language_info_load_ext PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the resource load with a length. */
+/* */
+/* A length of zero is rejected rather than treated as unknown: a */
+/* caller reaching this entry point is supplying one, and accepting */
+/* zero would silently leave every read unbounded. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* root_size Extent of the resource */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_language_info_load_ext */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+UINT _gxe_binres_language_info_load_ext(GX_UBYTE *root_address, ULONG root_size, GX_LANGUAGE_HEADER *put_info)
+{
+UINT status;
+
+ if ((root_address == GX_NULL) || (put_info == GX_NULL))
+ {
+ return GX_PTR_ERROR;
+ }
+
+ if (root_size == 0)
+ {
+ return GX_INVALID_SIZE;
+ }
+ status = _gx_binres_language_info_load_ext(root_address, root_size, put_info);
+
+ /* Return completion status code. */
+ return(status);
+}
+#endif
diff --git a/common/src/gxe_binres_language_table_load.c b/common/src/gxe_binres_language_table_load.c
index b07d0401b..f725d69bb 100644
--- a/common/src/gxe_binres_language_table_load.c
+++ b/common/src/gxe_binres_language_table_load.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -66,6 +68,7 @@
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
#ifdef GX_ENABLE_DEPRECATED_STRING_API
UINT _gxe_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****returned_language_table)
{
@@ -89,6 +92,7 @@ UINT status;
}
#endif
#endif
+#endif
/**************************************************************************/
/* */
@@ -127,6 +131,7 @@ UINT status;
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
UINT _gxe_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table)
{
UINT status;
@@ -148,4 +153,68 @@ UINT status;
return(status);
}
#endif
+#endif
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gxe_binres_language_table_load_ext2 PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the resource load with a length. */
+/* */
+/* A length of zero is rejected rather than treated as unknown: a */
+/* caller reaching this entry point is supplying one, and accepting */
+/* zero would silently leave every read unbounded. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* root_size Extent of the resource */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_language_table_load_ext2 */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+UINT _gxe_binres_language_table_load_ext2(GX_UBYTE *root_address, ULONG root_size, GX_STRING ***returned_language_table)
+{
+UINT status;
+
+ if ((root_address == GX_NULL) || (returned_language_table == GX_NULL))
+ {
+ return GX_PTR_ERROR;
+ }
+
+ if ((_gx_system_memory_allocator == GX_NULL) ||
+ (_gx_system_memory_free == GX_NULL))
+ {
+ return GX_SYSTEM_MEMORY_ERROR;
+ }
+
+ if (root_size == 0)
+ {
+ return GX_INVALID_SIZE;
+ }
+
+ status = _gx_binres_language_table_load_ext2(root_address, root_size, returned_language_table);
+
+ /* Return completion status code. */
+ return(status);
+}
+#endif
diff --git a/common/src/gxe_binres_pixelmap_load.c b/common/src/gxe_binres_pixelmap_load.c
index 14827b3d5..b52a12535 100644
--- a/common/src/gxe_binres_pixelmap_load.c
+++ b/common/src/gxe_binres_pixelmap_load.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -67,6 +69,7 @@
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
UINT _gxe_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap)
{
if (root_address == GX_NULL || pixelmap == GX_NULL)
@@ -77,3 +80,62 @@ UINT _gxe_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELM
return _gx_binres_pixelmap_load(root_address, map_index, pixelmap);
}
#endif
+#endif
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gxe_binres_pixelmap_load_ext PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the resource load with a length. */
+/* */
+/* A length of zero is rejected rather than treated as unknown: a */
+/* caller reaching this entry point is supplying one, and accepting */
+/* zero would silently leave every read unbounded. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* root_size Extent of the resource */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_pixelmap_load_ext */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+UINT _gxe_binres_pixelmap_load_ext(GX_UBYTE *root_address, ULONG root_size, UINT map_index, GX_PIXELMAP *pixelmap)
+{
+UINT status;
+
+ if ((root_address == GX_NULL) || (pixelmap == GX_NULL))
+ {
+ return GX_PTR_ERROR;
+ }
+
+ if (root_size == 0)
+ {
+ return GX_INVALID_SIZE;
+ }
+
+ status = _gx_binres_pixelmap_load_ext(root_address, root_size, map_index, pixelmap);
+
+ /* Return completion status code. */
+ return(status);
+}
+#endif
diff --git a/common/src/gxe_binres_theme_load.c b/common/src/gxe_binres_theme_load.c
index 1b7dded60..f19d588b5 100644
--- a/common/src/gxe_binres_theme_load.c
+++ b/common/src/gxe_binres_theme_load.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/**************************************************************************/
/**************************************************************************/
@@ -65,6 +67,7 @@
/* */
/**************************************************************************/
#ifdef GX_BINARY_RESOURCE_SUPPORT
+#ifdef GX_ENABLE_DEPRECATED_BINRES_API
UINT _gxe_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme)
{
UINT status;
@@ -91,3 +94,73 @@ UINT status;
return(status);
}
#endif
+#endif
+
+/**************************************************************************/
+/* */
+/* FUNCTION RELEASE */
+/* */
+/* _gxe_binres_theme_load_ext PORTABLE C */
+/* 6.5.1 */
+/* AUTHOR */
+/* */
+/* Eclipse ThreadX contributors */
+/* */
+/* DESCRIPTION */
+/* */
+/* This function checks for errors in the resource load with a length. */
+/* */
+/* A length of zero is rejected rather than treated as unknown: a */
+/* caller reaching this entry point is supplying one, and accepting */
+/* zero would silently leave every read unbounded. */
+/* */
+/* INPUT */
+/* */
+/* root_address Resource address */
+/* root_size Extent of the resource */
+/* */
+/* OUTPUT */
+/* */
+/* status Completion status */
+/* */
+/* CALLS */
+/* */
+/* _gx_binres_theme_load_ext */
+/* */
+/* CALLED BY */
+/* */
+/* Application Code */
+/* */
+/**************************************************************************/
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+UINT _gxe_binres_theme_load_ext(GX_UBYTE *root_address, ULONG root_size, INT theme_id, GX_THEME **returned_theme)
+{
+UINT status;
+
+ if ((root_address == GX_NULL) || (returned_theme == GX_NULL))
+ {
+ return GX_PTR_ERROR;
+ }
+
+ if (theme_id < 0)
+ {
+ return GX_INVALID_VALUE;
+ }
+
+ if ((_gx_system_memory_allocator == GX_NULL) ||
+ (_gx_system_memory_free == GX_NULL))
+ {
+ return GX_SYSTEM_MEMORY_ERROR;
+ }
+
+ if (root_size == 0)
+ {
+ return GX_INVALID_SIZE;
+ }
+
+ status = _gx_binres_theme_load_ext(root_address, root_size, theme_id, returned_theme);
+
+ /* Return completion status code. */
+ return(status);
+}
+#endif
diff --git a/guix_studio/CommandInfo.cpp b/guix_studio/CommandInfo.cpp
index e785ad3fc..5b396f8b7 100644
--- a/guix_studio/CommandInfo.cpp
+++ b/guix_studio/CommandInfo.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/MainFrm.cpp b/guix_studio/MainFrm.cpp
index 8796f5642..54b461212 100644
--- a/guix_studio/MainFrm.cpp
+++ b/guix_studio/MainFrm.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
// MainFrm.cpp : implementation of the CMainFrame class
//
diff --git a/guix_studio/MainFrm.h b/guix_studio/MainFrm.h
index feef0270f..8910c74bd 100644
--- a/guix_studio/MainFrm.h
+++ b/guix_studio/MainFrm.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
// MainFrm.h : interface of the CMainFrame class
//
diff --git a/guix_studio/ProjectConfigDlg.cpp b/guix_studio/ProjectConfigDlg.cpp
index 498cac4a7..60f3fc7f1 100644
--- a/guix_studio/ProjectConfigDlg.cpp
+++ b/guix_studio/ProjectConfigDlg.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
// ProjectConfigDlg.cpp : implementation file
//
diff --git a/guix_studio/StudioXProject.cpp b/guix_studio/StudioXProject.cpp
index 517a99537..b49794cff 100644
--- a/guix_studio/StudioXProject.cpp
+++ b/guix_studio/StudioXProject.cpp
@@ -8,8 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
#include "system_pngs.h"
diff --git a/guix_studio/StudioXProject.h b/guix_studio/StudioXProject.h
index a2d47d418..a1d68962d 100644
--- a/guix_studio/StudioXProject.h
+++ b/guix_studio/StudioXProject.h
@@ -21,7 +21,7 @@
#define PROJECT_VERSION 56
// Sequential number of studio version
-#define STUDIOX_VERSION_NUMBER 202602
+#define STUDIOX_VERSION_NUMBER 202603
/* This enabled checking if the project was created by a newer version of Studio.
Turn this off for testing when the Studio version number is not accurate
diff --git a/guix_studio/binary_resource_gen.cpp b/guix_studio/binary_resource_gen.cpp
index 534908053..22849b375 100644
--- a/guix_studio/binary_resource_gen.cpp
+++ b/guix_studio/binary_resource_gen.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/build/vs_2022/guix_for_studiox.vcxproj b/guix_studio/build/vs_2022/guix_for_studiox.vcxproj
index b7bc08152..710105a28 100644
--- a/guix_studio/build/vs_2022/guix_for_studiox.vcxproj
+++ b/guix_studio/build/vs_2022/guix_for_studiox.vcxproj
@@ -9,7 +9,7 @@
SPDX-License-Identifier: MIT
-->
-
+
diff --git a/guix_studio/build/vs_2022/msix_package_project/Package.appxmanifest b/guix_studio/build/vs_2022/msix_package_project/Package.appxmanifest
index f5405142c..8f08267eb 100644
--- a/guix_studio/build/vs_2022/msix_package_project/Package.appxmanifest
+++ b/guix_studio/build/vs_2022/msix_package_project/Package.appxmanifest
@@ -22,7 +22,7 @@
+ Version="6.5.2.03" />
Eclipse ThreadX GUIX Studio
diff --git a/guix_studio/build/vs_2022/studiox.vcxproj b/guix_studio/build/vs_2022/studiox.vcxproj
index 854111893..488a718fb 100644
--- a/guix_studio/build/vs_2022/studiox.vcxproj
+++ b/guix_studio/build/vs_2022/studiox.vcxproj
@@ -9,7 +9,7 @@
SPDX-License-Identifier: MIT
-->
-
+
diff --git a/guix_studio/csv_read_write.cpp b/guix_studio/csv_read_write.cpp
index 02e684759..1a70a27fa 100644
--- a/guix_studio/csv_read_write.cpp
+++ b/guix_studio/csv_read_write.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
diff --git a/guix_studio/express_dialog.cpp b/guix_studio/express_dialog.cpp
index 09abb00fa..a8ba2551b 100644
--- a/guix_studio/express_dialog.cpp
+++ b/guix_studio/express_dialog.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/express_dialog.h b/guix_studio/express_dialog.h
index cf4835c19..9bdea6696 100644
--- a/guix_studio/express_dialog.h
+++ b/guix_studio/express_dialog.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#ifndef _EXPRESS_DIALOG_
#define _EXPRESS_DIALOG_
diff --git a/guix_studio/gx_studio_font_util.cpp b/guix_studio/gx_studio_font_util.cpp
index ade268b27..6ab48c9cd 100644
--- a/guix_studio/gx_studio_font_util.cpp
+++ b/guix_studio/gx_studio_font_util.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/image_reader.cpp b/guix_studio/image_reader.cpp
index 30333dbf1..79904e310 100644
--- a/guix_studio/image_reader.cpp
+++ b/guix_studio/image_reader.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/installer/guix_installer_release.iss b/guix_studio/installer/guix_installer_release.iss
index 5bf79a43d..742bbbdca 100644
--- a/guix_studio/installer/guix_installer_release.iss
+++ b/guix_studio/installer/guix_installer_release.iss
@@ -11,16 +11,16 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#ifndef StudioFullVersion
-#define StudioFullVersion "6.5.1.202602a"
+#define StudioFullVersion "6.5.2.202603"
#endif
#ifndef StudioShortVersion
-#define StudioShortVersion "6.5.1"
+#define StudioShortVersion "6.5.2"
#endif
#ifndef StudioMajorMinorVersion
#define StudioMajorMinorVersion "6.5"
#endif
#ifndef StudioVersionInfoVersion
-#define StudioVersionInfoVersion "6.5.1.3"
+#define StudioVersionInfoVersion "6.5.2.3"
#endif
[Setup]
@@ -83,8 +83,8 @@ Source: "installer\vc_runtime\x86\*"; DestDir: "{app}\studio"; Flags: ignorevers
[Icons]
Name: "{group}\GUIX Studio {#StudioMajorMinorVersion}\GUIX Studio"; Filename: "{app}\studio\GUIX_Studio.exe"
-Name: "{group}\GUIX Studio {#StudioMajorMinorVersion}\GUIX Studio User's Guide"; Filename: "https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/guix/about-guix-studio.md"
-Name: "{group}\GUIX Studio {#StudioMajorMinorVersion}\GUIX User's Guide"; Filename: "https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/guix/about-guix-studio.md"
+Name: "{group}\GUIX Studio {#StudioMajorMinorVersion}\GUIX Studio User's Guide"; Filename: "https://threadx.io/releases/6.5.2/guix/main/about-guix-studio.html"
+Name: "{group}\GUIX Studio {#StudioMajorMinorVersion}\GUIX User's Guide"; Filename: "https://threadx.io/releases/6.5.2/guix/main/about-guix.html"
Name: "{group}\GUIX Studio {#StudioMajorMinorVersion}\{cm:UninstallProgram,GUIX Studio}"; Filename: "{uninstallexe}"
Name: "{userdesktop}\GUIX Studio {#StudioFullVersion}"; Filename: "{app}\studio\GUIX_Studio.exe"; Tasks: desktopicon
diff --git a/guix_studio/jpg_reader.cpp b/guix_studio/jpg_reader.cpp
index 960231cb6..4415f043e 100644
--- a/guix_studio/jpg_reader.cpp
+++ b/guix_studio/jpg_reader.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/left_panel_frame.cpp b/guix_studio/left_panel_frame.cpp
index 7bebee92d..2305fcc6b 100644
--- a/guix_studio/left_panel_frame.cpp
+++ b/guix_studio/left_panel_frame.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/left_panel_frame.h b/guix_studio/left_panel_frame.h
index b3edb4cbc..54992fe9a 100644
--- a/guix_studio/left_panel_frame.h
+++ b/guix_studio/left_panel_frame.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#ifndef _LEFT_PANEL_FRAME_
diff --git a/guix_studio/message_dialog.cpp b/guix_studio/message_dialog.cpp
index dc0866e20..b7e573a07 100644
--- a/guix_studio/message_dialog.cpp
+++ b/guix_studio/message_dialog.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
#include "message_dialog.h"
diff --git a/guix_studio/png_reader.cpp b/guix_studio/png_reader.cpp
index d149362a5..77313de2b 100644
--- a/guix_studio/png_reader.cpp
+++ b/guix_studio/png_reader.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/ports/gx_port.h b/guix_studio/ports/gx_port.h
index c77e062b3..0e27b08f5 100644
--- a/guix_studio/ports/gx_port.h
+++ b/guix_studio/ports/gx_port.h
@@ -193,7 +193,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Win32/Visual Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Win32/Visual Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/guix_studio/project_view.cpp b/guix_studio/project_view.cpp
index 7dd22d4e9..ad1af4234 100644
--- a/guix_studio/project_view.cpp
+++ b/guix_studio/project_view.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/project_view.h b/guix_studio/project_view.h
index e0214ae92..7af370965 100644
--- a/guix_studio/project_view.h
+++ b/guix_studio/project_view.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
diff --git a/guix_studio/properties_win.cpp b/guix_studio/properties_win.cpp
index 1cf92dcab..4296bb9a8 100644
--- a/guix_studio/properties_win.cpp
+++ b/guix_studio/properties_win.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
@@ -30,7 +30,7 @@ extern CFont NormalFont;
#define LEFT_COLUMN_WIDTH 140
///////////////////////////////////////////////////////////////////////////////
-enum CONTROL_IDS {
+enum CONTROL_IDS {
ID_WIDGET_NAME = 4096,
ID_WIDGET_ID,
ID_USER_DATA,
@@ -712,7 +712,7 @@ BOOL properties_win::PreTranslateMessage(MSG* pMsg)
break;
}
}
-
+
return CDialog::PreTranslateMessage(pMsg);
}
@@ -797,7 +797,7 @@ void properties_win::OnPaint()
///////////////////////////////////////////////////////////////////////////////
HBRUSH properties_win::OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor)
{
- int nCtrlId = pWnd->GetDlgCtrlID();
+ int nCtrlId = pWnd->GetDlgCtrlID();
HBRUSH hbr = CWnd::OnCtlColor(pDC, pWnd, nCtlColor);
return hbr;
@@ -909,7 +909,7 @@ void properties_win::AddComboBox(char *label, int res_type, int id, ULONG curren
start_id++;
end_id++;
}
-
+
int active_theme = mpProject->mDisplays[active_display].active_theme;
for (res_id = start_id; res_id < end_id; res_id++)
@@ -967,7 +967,7 @@ void properties_win::AddStringSelect(int current_val)
if (table)
{
-
+
if (current_val >= 0 && current_val < table->CountStrings())
{
string_ref = current_val;
@@ -978,7 +978,7 @@ void properties_win::AddStringSelect(int current_val)
box_index = pBox->AddString(table->GetResourceIdName(string_id));
pBox->SetItemData(box_index, string_id);
string_id++;
- }
+ }
CString id_name = table->GetResourceIdName(string_ref);
m_top_pos += m_row_height;
AddRichEditControl("Text", table->GetString(id_name), ID_STRING_VAL);
@@ -1055,7 +1055,7 @@ CButton *properties_win::AddRadioButton(char *description, ULONG checked, int id
CRect groupsize;
CString cs(description);
GetClientRect(&size);
-
+
size.top += m_top_pos;
size.left += m_item_space;
size.right -= m_item_space;
@@ -1080,7 +1080,7 @@ CButton *properties_win::AddRadioButton(char *description, ULONG checked, int id
{
pButton->SetCheck(BST_UNCHECKED);
}
-
+
m_top_pos += m_row_height;
return pButton;
}
@@ -1091,7 +1091,7 @@ CButton *properties_win::AddCheckBox(char *description, ULONG checked, int id)
CRect size;
CString cs(description);
GetClientRect(&size);
-
+
size.top += m_top_pos;
size.left += m_item_space;
size.right -= m_item_space;
@@ -1099,7 +1099,7 @@ CButton *properties_win::AddCheckBox(char *description, ULONG checked, int id)
CButton *pButton = new CButton();
pButton->Create(cs, WS_CHILD|WS_TABSTOP|BS_LEFTTEXT|BS_AUTOCHECKBOX, size, this, id);
-
+
if (checked)
{
pButton->SetCheck(BST_CHECKED);
@@ -1108,7 +1108,7 @@ CButton *properties_win::AddCheckBox(char *description, ULONG checked, int id)
{
pButton->SetCheck(BST_UNCHECKED);
}
-
+
m_top_pos += m_row_height;
return pButton;
}
@@ -1119,7 +1119,7 @@ void properties_win::AddPushButton(char *description, int id)
CRect size;
CString cs(description);
GetClientRect(&size);
-
+
size.top += m_top_pos;
size.left += m_item_space;
size.right -= m_item_space;
@@ -1136,7 +1136,7 @@ void properties_win::AddPushButton(char *description, int id)
void properties_win::AddEditControl(char *description, int value, int id)
{
CString valstring;
- valstring.Format(_T("%d"), value);
+ valstring.Format(_T("%d"), value);
AddEditControl(description, valstring, id);
}
@@ -1153,7 +1153,7 @@ void properties_win::AddEditControl(char *description, CString &name, int id)
size.right -= m_item_space;
right = size.right;
-
+
size.top += m_top_pos;
size.bottom = size.top + m_item_height;
size.right = size.left + m_leftcol_width;
@@ -1167,7 +1167,7 @@ void properties_win::AddEditControl(char *description, CString &name, int id)
CEdit *pEdit = new CEdit();
pEdit->Create(WS_CHILD|WS_TABSTOP|SS_LEFT|ES_AUTOHSCROLL, size, this, id);
pEdit->SetWindowText(name);
-
+
m_top_pos += m_row_height;
}
@@ -1183,7 +1183,7 @@ void properties_win::AddRichEditControl(char *description, CString &name, int id
size.right -= m_item_space;
right = size.right;
-
+
size.top += m_top_pos;
size.bottom = size.top + m_item_height;
size.right = size.left + m_leftcol_width;
@@ -1204,7 +1204,7 @@ void properties_win::AddRichEditControl(char *description, CString &name, int id
pEdit->Create(style, size, this, id);
//pEdit->SetWindowText(name);
SetUtf8Text(pEdit, name);
-
+
SetAccessibleHelpString(pEdit->GetSafeHwnd(), name);
m_top_pos += m_row_height;
}
@@ -1222,7 +1222,7 @@ void properties_win::AddPromptControl(char *description, CString &name)
size.right -= m_item_space;
right = size.right;
-
+
size.top += m_top_pos;
size.bottom = size.top + m_item_height;
size.right = size.left + m_leftcol_width;
@@ -1235,7 +1235,7 @@ void properties_win::AddPromptControl(char *description, CString &name)
CStatic *pval = new CStatic();
pval->Create(name, WS_CHILD|SS_LEFT, size, this);
-
+
m_top_pos += m_row_height;
}
@@ -1334,7 +1334,7 @@ void properties_win::AddWidgetProps()
break;
}
}
-
+
if (GetProjectView()->IsTopLevelWidget(mpInfo))
{
AddCheckBox("Template", mpInfo->is_template, ID_TEMPLATE);
@@ -1463,7 +1463,7 @@ void properties_win::AddPixelmapButtonProps(widget_info *info)
AddComboBox("Disabled Pixelmap", RES_TYPE_PIXELMAP, ID_PIXELMAP_2, info->pixelmap_id[DISABLED_PIXELMAP_INDEX]);
INT style = ValidateAlignStyle(info->style);
-
+
AddComboBox("Horizontal Align", button_halign_styles, ID_PIXMAP_HALIGN, style & GX_PIXELMAP_HALIGN_MASK);
AddComboBox("Vertical Align", button_valign_styles, ID_PIXMAP_VALIGN, style & GX_PIXELMAP_VALIGN_MASK);
}
@@ -1514,7 +1514,7 @@ void properties_win::AddIconProps(widget_info *info)
AddComboBox("Selected Pixelmap", RES_TYPE_PIXELMAP, ID_PIXELMAP_1, info->pixelmap_id[SELECTED_PIXELMAP_INDEX]);
INT style = ValidateAlignStyle(info->style);
-
+
AddComboBox("Horizontal Align", button_halign_styles, ID_PIXMAP_HALIGN, style & GX_PIXELMAP_HALIGN_MASK);
AddComboBox("Vertical Align", button_valign_styles, ID_PIXMAP_VALIGN, style & GX_PIXELMAP_VALIGN_MASK);
}
@@ -1705,7 +1705,7 @@ void properties_win::AddTreeViewProps(widget_info *info)
void properties_win::AddSliderProps(widget_info *info)
{
AddCheckBox("Vertical", info->style & GX_STYLE_SLIDER_VERTICAL, ID_SLIDER_VERTICAL);
-
+
if (info->basetype == GX_TYPE_SLIDER)
{
AddCheckBox("Show Tickmarks", info->style & GX_STYLE_SHOW_TICKMARKS, ID_SHOW_TICKMARKS);
@@ -1740,7 +1740,7 @@ void properties_win::AddProgressBarProps(widget_info *info)
AddCheckBox("Vertical", info->style & GX_STYLE_PROGRESS_VERTICAL, ID_PROGRESS_VERTICAL);
AddCheckBox("Show Text", info->style & GX_STYLE_PROGRESS_TEXT_DRAW, ID_PROGRESS_SHOW_TEXT);
AddCheckBox("Show Percentage", info->style & GX_STYLE_PROGRESS_PERCENT, ID_PROGRESS_PERCENT);
-
+
AddEditControl("Min Value", info->ewi.progress.min_val, ID_PROGRESS_MINVAL);
AddEditControl("Max Value", info->ewi.progress.max_val, ID_PROGRESS_MAXVAL);
AddEditControl("Current Value", info->ewi.progress.current_val, ID_PROGRESS_CURRENTVAL);
@@ -1836,7 +1836,7 @@ void properties_win::AddScrollbarProps(widget_info *info)
{
AddComboBox("Left Pixelmap", RES_TYPE_PIXELMAP, ID_PIXELMAP_2, info->ewi.scroll.gx_scroll_up_pixelmap);
AddComboBox("Right Pixelmap", RES_TYPE_PIXELMAP, ID_PIXELMAP_3, info->ewi.scroll.gx_scroll_down_pixelmap);
- }
+ }
AddCheckBox("End Buttons", info ->style & GX_SCROLLBAR_END_BUTTONS, ID_SCROLL_END_BUTTONS);
AddCheckBox("Tile Background", info->style & GX_STYLE_TILE_BACKGROUND, ID_SCROLL_TILE_BKGND);
AddCheckBox("Relative Thumb Size", info ->style & GX_SCROLLBAR_RELATIVE_THUMB, ID_SCROLL_RELATIVE_THUMB);
@@ -1897,7 +1897,7 @@ void properties_win::WidgetWasMoved()
mpInfo->size.gx_rectangle_bottom - mpInfo->size.gx_rectangle_top + 1);
SetDlgItemText(ID_HEIGHT, val);
}
-
+
mpProject->SetModified();
}
}
@@ -1952,7 +1952,7 @@ void properties_win::OnWidgetSelect(widget_info *info)
CRect winrect;
mpInfo = info;
mpProject = NULL;
-
+
if (info)
{
mpProject = GetOpenProject();
@@ -2216,7 +2216,7 @@ void properties_win::OnChangeWidgetName()
ErrorMsg("Widget name already exists!");
}
-
+
new_name = mpInfo->app_name;
if(save && TestInputName(edit, "Widget Name", new_name))
{
@@ -2366,7 +2366,7 @@ void properties_win::OnChangeWidgetId()
{
mpProject->AddToIdDictionary(display, ID_TYPE_WIDGET, new_name);
}
-
+
if (!old_id_name.IsEmpty())
{
mpProject->RemoveFromIdDictionary(display, ID_TYPE_WIDGET, old_id_name);
@@ -2590,7 +2590,7 @@ void properties_win::OnChangeDynamicBuffer()
if (mpProject && mpInfo && GetDlgItem(ID_DYNAMIC_BUFFER))
{
UndoManager()->AddEntry(UNDO_TYPE_DYNAMIC_TEXT_BUFFER, mpInfo);
-
+
if (IsDlgButtonChecked(ID_DYNAMIC_BUFFER))
{
mpInfo->ewi.text_info.dynamic_buffer = true;
@@ -2702,7 +2702,7 @@ void properties_win::OnChangeBorder()
child = child->gx_widget_next;
}
- gx_system_dirty_mark(mpInfo->widget)
+ gx_system_dirty_mark(mpInfo->widget);
mpProject->SetModified();
}
@@ -2967,7 +2967,7 @@ void properties_win::OnChangeNumericPrompt()
{
int numeric_value = GetDlgItemInt(ID_NUMERIC_PROMPT_VALUE, 0, TRUE);
CString format_func;
-
+
GetDlgItemText(ID_FORMAT_FUNC, format_func);
if (numeric_value != mpInfo->ewi.numeric_prompt_value)
@@ -3236,7 +3236,7 @@ void properties_win::OnTextAlignmentChange()
{
CComboBox *pAlign = (CComboBox *) GetDlgItem(ID_TEXT_ALIGN);
ULONG style = 0;
-
+
if (mpProject && mpInfo && pAlign)
{
int selected = pAlign->GetCurSel();
@@ -3279,7 +3279,7 @@ void properties_win::OnChangePixmapAlign()
}
selected = pVAlign->GetCurSel();
-
+
if (selected >= 0)
{
vStyle = (ULONG) pVAlign->GetItemData(selected);
@@ -3324,7 +3324,7 @@ void properties_win::OnButtonStyleChange()
{
style &= ~GX_STYLE_BUTTON_TOGGLE;
}
-
+
if (IsDlgButtonChecked(ID_BUTTON_STYLE_RADIO))
{
style |= GX_STYLE_BUTTON_RADIO;
@@ -3378,7 +3378,7 @@ void properties_win::OnDropListStyleChange()
style &= ~GX_STYLE_TILE_WALLPAPER;
gx_widget_style_remove((GX_WIDGET *)&(((GX_DROP_LIST *)mpInfo->widget)->gx_drop_list_popup.gx_popup_list_list), GX_STYLE_TILE_WALLPAPER);
}
-
+
mpInfo->style = style;
mpProject->SetModified();
}
@@ -3480,7 +3480,7 @@ void properties_win::AssignProgressBarInfo(widget_info *wi)
info.gx_progress_bar_selected_text_color = wi->color_id[SELECTED_TEXT_COLOR_INDEX];
info.gx_progress_bar_disabled_text_color = wi->color_id[DISABLED_TEXT_COLOR_INDEX];
- GX_PROGRESS_BAR *bar = (GX_PROGRESS_BAR *) wi->widget;
+ GX_PROGRESS_BAR *bar = (GX_PROGRESS_BAR *) wi->widget;
gx_progress_bar_info_set(bar, &info);
}
@@ -3888,7 +3888,7 @@ void properties_win::OnChangeTextScrollWheelProps()
CComboBox *pFontBox = (CComboBox *)GetDlgItem(ID_TEXT_SCROLL_WHEEL_NORMAL_FONT);
int box_index = pFontBox->GetCurSel();
int normal_font = pFontBox->GetItemData(box_index);
-
+
pFontBox = (CComboBox *)GetDlgItem(ID_TEXT_SCROLL_WHEEL_SELECTED_FONT);
box_index = pFontBox->GetCurSel();
int selected_font = pFontBox->GetItemData(box_index);
@@ -4275,7 +4275,7 @@ void properties_win::OnChangeStringId()
UndoManager()->AddEntry(UNDO_TYPE_STRING, mpInfo, 0);
mpInfo->string_id[0] = text_id;
widget_service_provider *provider = widget_factory::GetServiceProvider(mpInfo->basetype);
-
+
if (provider)
{
provider->AssignText(mpInfo, 0, text_id);
@@ -4745,7 +4745,7 @@ LRESULT properties_win::OnTestMessage(WPARAM wParam, LPARAM lParam)
TCHAR class_name[MAX_PATH];
GetClassName(pWnd->GetSafeHwnd(), class_name, MAX_PATH - 1);
-
+
switch (class_name[0])
{
case 'R':
diff --git a/guix_studio/properties_win.h b/guix_studio/properties_win.h
index 8cca46c7f..cd60474f7 100644
--- a/guix_studio/properties_win.h
+++ b/guix_studio/properties_win.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#ifndef _PROPERTIES_WIN_
diff --git a/guix_studio/recent_project_win.cpp b/guix_studio/recent_project_win.cpp
index 15688f291..560cfd37f 100644
--- a/guix_studio/recent_project_win.cpp
+++ b/guix_studio/recent_project_win.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
// recent_project_win.cpp : implementation file
//
diff --git a/guix_studio/recent_project_win.h b/guix_studio/recent_project_win.h
index c9f96e5fa..fc28c02c4 100644
--- a/guix_studio/recent_project_win.h
+++ b/guix_studio/recent_project_win.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#pragma once
#include "express_dialog.h"
diff --git a/guix_studio/resource_gen.cpp b/guix_studio/resource_gen.cpp
index cc24e35ab..5e50d7d1d 100644
--- a/guix_studio/resource_gen.cpp
+++ b/guix_studio/resource_gen.cpp
@@ -8,8 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
diff --git a/guix_studio/resource_item.cpp b/guix_studio/resource_item.cpp
index 05601bc90..42716287c 100644
--- a/guix_studio/resource_item.cpp
+++ b/guix_studio/resource_item.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/resource_view.h b/guix_studio/resource_view.h
index 8c6dcc452..87386733c 100644
--- a/guix_studio/resource_view.h
+++ b/guix_studio/resource_view.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
diff --git a/guix_studio/screen_generator.cpp b/guix_studio/screen_generator.cpp
index 61be10f45..eb4a242a0 100644
--- a/guix_studio/screen_generator.cpp
+++ b/guix_studio/screen_generator.cpp
@@ -8,8 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
#ifdef _DEBUG
diff --git a/guix_studio/splash_screen.cpp b/guix_studio/splash_screen.cpp
index c35321434..dad290f79 100644
--- a/guix_studio/splash_screen.cpp
+++ b/guix_studio/splash_screen.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
#include "splash_screen.h"
diff --git a/guix_studio/splash_screen.h b/guix_studio/splash_screen.h
index ec37df4aa..2058e4ae8 100644
--- a/guix_studio/splash_screen.h
+++ b/guix_studio/splash_screen.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#ifndef _SPLASH_SCREEN_
diff --git a/guix_studio/stdafx.h b/guix_studio/stdafx.h
index 1fd29fa86..261869b42 100644
--- a/guix_studio/stdafx.h
+++ b/guix_studio/stdafx.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
diff --git a/guix_studio/string_table_edit_dlg.cpp b/guix_studio/string_table_edit_dlg.cpp
index 4ed95ace5..fe801597a 100644
--- a/guix_studio/string_table_edit_dlg.cpp
+++ b/guix_studio/string_table_edit_dlg.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
// string_table_edit_dlg.cpp : implementation file
//
diff --git a/guix_studio/studiox.cpp b/guix_studio/studiox.cpp
index f77d95e8b..d95967130 100644
--- a/guix_studio/studiox.cpp
+++ b/guix_studio/studiox.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
// studiox.cpp : Defines the class behaviors for the application.
//
@@ -482,7 +482,7 @@ void CstudioxApp::OnAppAbout()
void CstudioxApp::OnUsersGuide()
{
- ShellExecute(NULL, _T("open"), _T("https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/guix/about-guix-studio.md"), NULL, NULL, SW_SHOW);
+ ShellExecute(NULL, _T("open"), _T("https://threadx.io/releases/6.5.2/guix/main/about-guix-studio.html"), NULL, NULL, SW_SHOW);
}
void CstudioxApp::OnProjectNew()
diff --git a/guix_studio/studiox.h b/guix_studio/studiox.h
index 7a01afbce..027834b17 100644
--- a/guix_studio/studiox.h
+++ b/guix_studio/studiox.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
// studiox.h : main header file for the studiox application
//
diff --git a/guix_studio/studiox.manifest b/guix_studio/studiox.manifest
index 5cad09334..d72306af8 100644
--- a/guix_studio/studiox.manifest
+++ b/guix_studio/studiox.manifest
@@ -9,7 +9,7 @@
SPDX-License-Identifier: MIT
-->
-
+
diff --git a/guix_studio/studiox.rc b/guix_studio/studiox.rc
index e65446258..f40e93113 100644
--- a/guix_studio/studiox.rc
+++ b/guix_studio/studiox.rc
@@ -1767,8 +1767,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 6,5,1,3
- PRODUCTVERSION 6,5,1,3
+ FILEVERSION 6,5,2,3
+ PRODUCTVERSION 6,5,2,3
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -1785,12 +1785,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Eclipse Foundation"
VALUE "FileDescription", "GUIX Studio Application"
- VALUE "FileVersion", "6.5.1.202602a"
+ VALUE "FileVersion", "6.5.2.202603"
VALUE "InternalName", "studiox.exe"
VALUE "LegalCopyright", "(c) Eclipse ThreadX contributors"
VALUE "OriginalFilename", "studiox.exe"
VALUE "ProductName", "Eclipse ThreadX GUIX Studio"
- VALUE "ProductVersion", "6.5.1.202602a"
+ VALUE "ProductVersion", "6.5.2.202603"
END
END
BLOCK "VarFileInfo"
diff --git a/guix_studio/studiox_constants.h b/guix_studio/studiox_constants.h
index 531c7e9f3..41054dff9 100644
--- a/guix_studio/studiox_constants.h
+++ b/guix_studio/studiox_constants.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#define COLOR_BLACK 0xff000000
diff --git a/guix_studio/studiox_util.cpp b/guix_studio/studiox_util.cpp
index ab7a0b8fe..20652642d 100644
--- a/guix_studio/studiox_util.cpp
+++ b/guix_studio/studiox_util.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
#include "direct.h"
diff --git a/guix_studio/studiox_util.h b/guix_studio/studiox_util.h
index 9bf33a9f2..5dbb68fdb 100644
--- a/guix_studio/studiox_util.h
+++ b/guix_studio/studiox_util.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#ifndef _STUDIOX_UTIL_
diff --git a/guix_studio/system_pngs.cpp b/guix_studio/system_pngs.cpp
index b4fd771cb..edab0b1be 100644
--- a/guix_studio/system_pngs.cpp
+++ b/guix_studio/system_pngs.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
#include "system_pngs.h"
diff --git a/guix_studio/system_pngs.h b/guix_studio/system_pngs.h
index 1b3cff036..16754c3d2 100644
--- a/guix_studio/system_pngs.h
+++ b/guix_studio/system_pngs.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
#ifndef _SYSTEM_PNGS_
#define _SYSTEM_PNGS_
diff --git a/guix_studio/target_view.cpp b/guix_studio/target_view.cpp
index c8da7d089..93ef8c95d 100644
--- a/guix_studio/target_view.cpp
+++ b/guix_studio/target_view.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/view_header.cpp b/guix_studio/view_header.cpp
index f24f77509..8678b49d5 100644
--- a/guix_studio/view_header.cpp
+++ b/guix_studio/view_header.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/view_header.h b/guix_studio/view_header.h
index aed99205a..ec3b9ef3b 100644
--- a/guix_studio/view_header.h
+++ b/guix_studio/view_header.h
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include
diff --git a/guix_studio/widget_service_provider.cpp b/guix_studio/widget_service_provider.cpp
index cc7a514c1..9a4600d65 100644
--- a/guix_studio/widget_service_provider.cpp
+++ b/guix_studio/widget_service_provider.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
#include "studiox_includes.h"
diff --git a/guix_studio/xml_reader.cpp b/guix_studio/xml_reader.cpp
index 9fedebcc8..0e34f0ed4 100644
--- a/guix_studio/xml_reader.cpp
+++ b/guix_studio/xml_reader.cpp
@@ -8,7 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
-// Some portions generated by Codex (OpenAI GPT-5.5).
+// Portions of this file were generated with AI assistance.
diff --git a/ports/arc_em/metaware/inc/gx_port.h b/ports/arc_em/metaware/inc/gx_port.h
index 01aa24127..0f2636b1c 100644
--- a/ports/arc_em/metaware/inc/gx_port.h
+++ b/ports/arc_em/metaware/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX ARCv2_EM/MetaWare Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX ARCv2_EM/MetaWare Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/arc_hs/metaware/inc/gx_port.h b/ports/arc_hs/metaware/inc/gx_port.h
index b65b97043..6b1c1d03d 100644
--- a/ports/arc_hs/metaware/inc/gx_port.h
+++ b/ports/arc_hs/metaware/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX ARC_HS/MetaWare Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX ARC_HS/MetaWare Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/arm9/ac5/inc/gx_port.h b/ports/arm9/ac5/inc/gx_port.h
index 2379034b1..0cca537c6 100644
--- a/ports/arm9/ac5/inc/gx_port.h
+++ b/ports/arm9/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX ARM9/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX ARM9/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/arm9/gnu/inc/gx_port.h b/ports/arm9/gnu/inc/gx_port.h
index 14faebe45..19a852a64 100644
--- a/ports/arm9/gnu/inc/gx_port.h
+++ b/ports/arm9/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX ARM9/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX ARM9/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/arm9/iar/inc/gx_port.h b/ports/arm9/iar/inc/gx_port.h
index a2266679b..130efd67e 100644
--- a/ports/arm9/iar/inc/gx_port.h
+++ b/ports/arm9/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX ARM9/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX ARM9/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/c667x/ccs/inc/gx_port.h b/ports/c667x/ccs/inc/gx_port.h
index 15ed57ef4..da8c20cb8 100644
--- a/ports/c667x/ccs/inc/gx_port.h
+++ b/ports/c667x/ccs/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX C6xxx/TI Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX C6xxx/TI Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/ccrx/inc/gx_port.h b/ports/ccrx/inc/gx_port.h
index 8c0ae1eee..48ad2d8cc 100644
--- a/ports/ccrx/inc/gx_port.h
+++ b/ports/ccrx/inc/gx_port.h
@@ -140,7 +140,7 @@ typedef unsigned char GX_UCHAR;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a15/gnu/inc/gx_port.h b/ports/cortex_a15/gnu/inc/gx_port.h
index 9d7776cb7..6613cb937 100644
--- a/ports/cortex_a15/gnu/inc/gx_port.h
+++ b/ports/cortex_a15/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A15/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A15/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a5/ac5/inc/gx_port.h b/ports/cortex_a5/ac5/inc/gx_port.h
index 4f9f726d6..91a1696b7 100644
--- a/ports/cortex_a5/ac5/inc/gx_port.h
+++ b/ports/cortex_a5/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A5/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A5/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a5/gnu/inc/gx_port.h b/ports/cortex_a5/gnu/inc/gx_port.h
index c8bc7e737..e040d8030 100644
--- a/ports/cortex_a5/gnu/inc/gx_port.h
+++ b/ports/cortex_a5/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A5/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A5/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a5/iar/inc/gx_port.h b/ports/cortex_a5/iar/inc/gx_port.h
index eeeeb1064..af4987966 100644
--- a/ports/cortex_a5/iar/inc/gx_port.h
+++ b/ports/cortex_a5/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A5/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A5/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a5x/ac6/inc/gx_port.h b/ports/cortex_a5x/ac6/inc/gx_port.h
index f7be078d8..bbd13fc23 100644
--- a/ports/cortex_a5x/ac6/inc/gx_port.h
+++ b/ports/cortex_a5x/ac6/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A5x/AC6 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A5x/AC6 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a7/ac5/inc/gx_port.h b/ports/cortex_a7/ac5/inc/gx_port.h
index 12f77f60e..281d73678 100644
--- a/ports/cortex_a7/ac5/inc/gx_port.h
+++ b/ports/cortex_a7/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A7/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A7/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a7/gnu/inc/gx_port.h b/ports/cortex_a7/gnu/inc/gx_port.h
index b9c451d62..b1bcaea06 100644
--- a/ports/cortex_a7/gnu/inc/gx_port.h
+++ b/ports/cortex_a7/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A7/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A7/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a7/iar/inc/gx_port.h b/ports/cortex_a7/iar/inc/gx_port.h
index dabdbc50b..b2948d7f1 100644
--- a/ports/cortex_a7/iar/inc/gx_port.h
+++ b/ports/cortex_a7/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A7/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A7/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a8/ac5/inc/gx_port.h b/ports/cortex_a8/ac5/inc/gx_port.h
index 5d0ee0a2e..6557a0723 100644
--- a/ports/cortex_a8/ac5/inc/gx_port.h
+++ b/ports/cortex_a8/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A8/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A8/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a8/gnu/inc/gx_port.h b/ports/cortex_a8/gnu/inc/gx_port.h
index 011ccc268..6f333fc37 100644
--- a/ports/cortex_a8/gnu/inc/gx_port.h
+++ b/ports/cortex_a8/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A8/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A8/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a8/iar/inc/gx_port.h b/ports/cortex_a8/iar/inc/gx_port.h
index 2490244eb..313661fdf 100644
--- a/ports/cortex_a8/iar/inc/gx_port.h
+++ b/ports/cortex_a8/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A8/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A8/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a9/ac5/inc/gx_port.h b/ports/cortex_a9/ac5/inc/gx_port.h
index 798bba73f..931d139ec 100644
--- a/ports/cortex_a9/ac5/inc/gx_port.h
+++ b/ports/cortex_a9/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A9/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A9/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a9/gnu/inc/gx_port.h b/ports/cortex_a9/gnu/inc/gx_port.h
index c97ab73a7..6c39fd136 100644
--- a/ports/cortex_a9/gnu/inc/gx_port.h
+++ b/ports/cortex_a9/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A9/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A9/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_a9/iar/inc/gx_port.h b/ports/cortex_a9/iar/inc/gx_port.h
index 9a38832f6..1eebbad7b 100644
--- a/ports/cortex_a9/iar/inc/gx_port.h
+++ b/ports/cortex_a9/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A9/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-A9/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m0/ac5/inc/gx_port.h b/ports/cortex_m0/ac5/inc/gx_port.h
index ebb977928..98f0e96f3 100644
--- a/ports/cortex_m0/ac5/inc/gx_port.h
+++ b/ports/cortex_m0/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M0/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M0/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m0/gnu/inc/gx_port.h b/ports/cortex_m0/gnu/inc/gx_port.h
index 56689e65b..098e2ca4a 100644
--- a/ports/cortex_m0/gnu/inc/gx_port.h
+++ b/ports/cortex_m0/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M0/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M0/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m0/iar/inc/gx_port.h b/ports/cortex_m0/iar/inc/gx_port.h
index 2f441d8f5..bba777496 100644
--- a/ports/cortex_m0/iar/inc/gx_port.h
+++ b/ports/cortex_m0/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M0/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M0/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m3/ac5/inc/gx_port.h b/ports/cortex_m3/ac5/inc/gx_port.h
index 089b9bba3..8ef04151f 100644
--- a/ports/cortex_m3/ac5/inc/gx_port.h
+++ b/ports/cortex_m3/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M3/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M3/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m3/gnu/inc/gx_port.h b/ports/cortex_m3/gnu/inc/gx_port.h
index 8183bd8c7..dab94be5f 100644
--- a/ports/cortex_m3/gnu/inc/gx_port.h
+++ b/ports/cortex_m3/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M3/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M3/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m3/iar/inc/gx_port.h b/ports/cortex_m3/iar/inc/gx_port.h
index f46a80955..124fe94c4 100644
--- a/ports/cortex_m3/iar/inc/gx_port.h
+++ b/ports/cortex_m3/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M3/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M3/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m3/keil/inc/gx_port.h b/ports/cortex_m3/keil/inc/gx_port.h
index 27d2e85b8..61f0c764a 100644
--- a/ports/cortex_m3/keil/inc/gx_port.h
+++ b/ports/cortex_m3/keil/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M3/KEIL Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M3/KEIL Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m4/ac5/inc/gx_port.h b/ports/cortex_m4/ac5/inc/gx_port.h
index 74b66fca5..f9ebc8769 100644
--- a/ports/cortex_m4/ac5/inc/gx_port.h
+++ b/ports/cortex_m4/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M4/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M4/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m4/gnu/inc/gx_port.h b/ports/cortex_m4/gnu/inc/gx_port.h
index ba1cfb2eb..a0f673ee3 100644
--- a/ports/cortex_m4/gnu/inc/gx_port.h
+++ b/ports/cortex_m4/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M4/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M4/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m4/iar/inc/gx_port.h b/ports/cortex_m4/iar/inc/gx_port.h
index 2564b5897..deb197925 100644
--- a/ports/cortex_m4/iar/inc/gx_port.h
+++ b/ports/cortex_m4/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M4/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M4/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m4/keil/inc/gx_port.h b/ports/cortex_m4/keil/inc/gx_port.h
index 485250b73..79077de82 100644
--- a/ports/cortex_m4/keil/inc/gx_port.h
+++ b/ports/cortex_m4/keil/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M4/KEIL Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M4/KEIL Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m7/ac5/inc/gx_port.h b/ports/cortex_m7/ac5/inc/gx_port.h
index 34d1dd7e4..7933bb082 100644
--- a/ports/cortex_m7/ac5/inc/gx_port.h
+++ b/ports/cortex_m7/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M7/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M7/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m7/gnu/inc/gx_port.h b/ports/cortex_m7/gnu/inc/gx_port.h
index da31dcd95..72c9367f4 100644
--- a/ports/cortex_m7/gnu/inc/gx_port.h
+++ b/ports/cortex_m7/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M7/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M7/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_m7/iar/inc/gx_port.h b/ports/cortex_m7/iar/inc/gx_port.h
index 1ab1da137..245ca7972 100644
--- a/ports/cortex_m7/iar/inc/gx_port.h
+++ b/ports/cortex_m7/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M7/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-M7/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_r4/ac5/inc/gx_port.h b/ports/cortex_r4/ac5/inc/gx_port.h
index a25231550..b93ef5aef 100644
--- a/ports/cortex_r4/ac5/inc/gx_port.h
+++ b/ports/cortex_r4/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R4/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R4/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_r4/ac6/inc/gx_port.h b/ports/cortex_r4/ac6/inc/gx_port.h
index 1faaba1d2..4f21dfec7 100644
--- a/ports/cortex_r4/ac6/inc/gx_port.h
+++ b/ports/cortex_r4/ac6/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R4/AC6 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R4/AC6 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_r4/gnu/inc/gx_port.h b/ports/cortex_r4/gnu/inc/gx_port.h
index 0af060f64..1cb14d07f 100644
--- a/ports/cortex_r4/gnu/inc/gx_port.h
+++ b/ports/cortex_r4/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R4/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R4/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_r4/iar/inc/gx_port.h b/ports/cortex_r4/iar/inc/gx_port.h
index 1b3af8f08..e0266fc3f 100644
--- a/ports/cortex_r4/iar/inc/gx_port.h
+++ b/ports/cortex_r4/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R4/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R4/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_r5/ac5/inc/gx_port.h b/ports/cortex_r5/ac5/inc/gx_port.h
index a15636b1c..4cb1bafbb 100644
--- a/ports/cortex_r5/ac5/inc/gx_port.h
+++ b/ports/cortex_r5/ac5/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R5/AC5 Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R5/AC5 Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_r5/gnu/inc/gx_port.h b/ports/cortex_r5/gnu/inc/gx_port.h
index 7e7db2303..2230dffb3 100644
--- a/ports/cortex_r5/gnu/inc/gx_port.h
+++ b/ports/cortex_r5/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R5/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R5/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/cortex_r5/iar/inc/gx_port.h b/ports/cortex_r5/iar/inc/gx_port.h
index 08de499e0..ad6752162 100644
--- a/ports/cortex_r5/iar/inc/gx_port.h
+++ b/ports/cortex_r5/iar/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R5/IAR Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Cortex-R5/IAR Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/generic/inc/gx_port.h b/ports/generic/inc/gx_port.h
index 4e039d0a1..e246d31e0 100644
--- a/ports/generic/inc/gx_port.h
+++ b/ports/generic/inc/gx_port.h
@@ -132,7 +132,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/linux/gnu/inc/gx_port.h b/ports/linux/gnu/inc/gx_port.h
index d3ac3b968..62dfded56 100644
--- a/ports/linux/gnu/inc/gx_port.h
+++ b/ports/linux/gnu/inc/gx_port.h
@@ -127,7 +127,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Linux/GNU Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Linux/GNU Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/win32/inc/gx_port.h b/ports/win32/inc/gx_port.h
index ab31cb420..2cc3b125e 100644
--- a/ports/win32/inc/gx_port.h
+++ b/ports/win32/inc/gx_port.h
@@ -147,7 +147,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Win32/Visual Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Win32/Visual Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/ports/win32/vs_2019_standalone/inc/gx_port.h b/ports/win32/vs_2019_standalone/inc/gx_port.h
index 1b21b49b5..7f932a8be 100644
--- a/ports/win32/vs_2019_standalone/inc/gx_port.h
+++ b/ports/win32/vs_2019_standalone/inc/gx_port.h
@@ -90,7 +90,7 @@ typedef SHORT GX_VALUE;
#ifdef GX_SYSTEM_INIT
CHAR _gx_version_id[] =
- "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Win32/Standalone/Visual Version 6.5.1.202602a *";
+ "(c) 2024 Microsoft Corp. (c) 2026 Eclipse ThreadX contributors. * GUIX Win32/Standalone/Visual Version 6.5.2.202603 *";
#else
extern CHAR _gx_version_id[];
#endif
diff --git a/scripts/build.sh b/scripts/build.sh
index 568818198..7d7c5d22d 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -8,4 +8,8 @@
#
# SPDX-License-Identifier: MIT
-$(dirname `realpath $0`)/../test/guix_test/cmake/run.sh build all
+set -euo pipefail
+cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
+python3 test/guix_test/cmake/test_report.py
+if [[ $# == 0 ]]; then set -- all; fi
+exec test/guix_test/cmake/run.sh build "$@"
diff --git a/scripts/build_guix.cmd b/scripts/build_guix.cmd
index 647d4ca44..fd79e8935 100644
--- a/scripts/build_guix.cmd
+++ b/scripts/build_guix.cmd
@@ -6,8 +6,7 @@
@rem https://opensource.org/licenses/MIT.
@rem
@rem SPDX-License-Identifier: MIT
-@rem Some portions generated by Codex (OpenAI GPT-5.5).
-@rem Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
rem Initialize the developer environment just like a developer box. The Visual
rem Studio edition differs between a developer machine and a GitHub runner, so
diff --git a/scripts/build_guix_studio.cmd b/scripts/build_guix_studio.cmd
index 600a05ed3..f6ebd2e3b 100644
--- a/scripts/build_guix_studio.cmd
+++ b/scripts/build_guix_studio.cmd
@@ -6,7 +6,7 @@
@rem https://opensource.org/licenses/MIT.
@rem
@rem SPDX-License-Identifier: MIT
-@rem Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
@echo off
diff --git a/scripts/build_guix_studio_msix_package.cmd b/scripts/build_guix_studio_msix_package.cmd
index 544b92dac..504472d8b 100644
--- a/scripts/build_guix_studio_msix_package.cmd
+++ b/scripts/build_guix_studio_msix_package.cmd
@@ -6,7 +6,7 @@
@rem https://opensource.org/licenses/MIT.
@rem
@rem SPDX-License-Identifier: MIT
-@rem Some portions generated by Codex (OpenAI GPT-5.5).
+# Portions of this file were generated with AI assistance.
@echo off
setlocal
diff --git a/scripts/check_ai_disclosure.sh b/scripts/check_ai_disclosure.sh
new file mode 100755
index 000000000..6dc8a2f2e
--- /dev/null
+++ b/scripts/check_ai_disclosure.sh
@@ -0,0 +1,126 @@
+#!/bin/bash
+###############################################################################
+# Copyright (c) 2026 Eclipse ThreadX contributors
+#
+# This program and the accompanying materials are made available under the
+# terms of the MIT License which is available at
+# https://opensource.org/licenses/MIT.
+#
+# AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5).
+# The AI-generated portions may be considered public domain (CC0-1.0)
+# and not subject to the project's licence. The human contributor has
+# reviewed and verified that the code is correct.
+#
+# SPDX-License-Identifier: MIT and CC0-1.0
+###############################################################################
+#
+# Fail the build if a file's AI disclosure comment has drifted from the one
+# accepted form.
+#
+# A file that was edited with AI assistance carries exactly one line:
+#
+# Portions of this file were generated with AI assistance.
+#
+# written with the comment character that file already uses. It names no
+# product, no model and no version, and a file carries at most one of it, ever.
+#
+# The text is fixed for a reason that is easy to miss. An earlier convention
+# named the product and the model -- "Some portions generated by
+# ()" -- and the result was not attribution but accumulation: each tool
+# that touched a file failed to recognise the line another tool had left, and
+# appended its own. Files reached three stacked lines, and one product ended
+# up spelled four different ways across the tree, which made the record
+# unusable for the one question it was meant to answer.
+#
+# Precise attribution lives on the commit instead, where the Assisted-by
+# trailer is dated and attached to the diff it describes:
+#
+# git log --format='%h %(trailers:key=Assisted-by,valueonly)' --
+#
+# A file-level flag answers WHETHER; the history answers WHO. A header line
+# cannot hold the second honestly, because the code it names gets rewritten
+# and the line stays.
+#
+# The AI Disclosure paragraph in a new file's copyright header is different and
+# is not checked here: it keeps its product and model version, because a file
+# is created once and that record cannot grow.
+#
+# This script is excluded from its own scan. It has to spell the rejected
+# forms in order to look for them.
+
+set -euo pipefail
+
+readonly ROOT="$(cd "$(dirname "$(realpath "$0")")/.." && pwd)"
+readonly SELF='scripts/check_ai_disclosure.sh'
+
+# The contribution guide is excluded for the same reason this script is: it has
+# to spell the disclosure text in order to explain it, and it discusses AI
+# assistance in prose besides. Scanning it turns documenting the rule into a
+# violation of it.
+readonly GUIDE='CONTRIBUTING.md'
+readonly FIXED='Portions of this file were generated with AI assistance.'
+
+cd "${ROOT}"
+
+# Tracked files only. A build tree is not this repository's text to police,
+# and scanning one would make the check depend on whether somebody had built.
+mapfile -d '' -t FILES < <(git ls-files -z | grep -zZv "^${SELF}$" | grep -zZv "^${GUIDE}$")
+
+status=0
+
+report() {
+ printf '%s\n\n' "$1" >&2
+ printf '%s\n\n' "$2" >&2
+ status=1
+}
+
+# 1. The superseded per-edit form, which names a product and a model.
+hits="$(grep -nI 'Some portions generated by' -- "${FILES[@]}" 2>/dev/null || true)"
+if [ -n "${hits}" ]; then
+ report "AI disclosure check FAILED: superseded per-edit form.
+
+Replace each of these with the fixed line, keeping the file's comment
+character:
+
+ ${FIXED}" "${hits}"
+fi
+
+# 2. A doubled comment marker, such as '; //' or '@ //'. Assembly dialects
+# differ -- armasm and IAR use ';', GNU as uses '@' or '//' -- and writing
+# both is a symptom of a tool guessing rather than reading the file.
+hits="$(grep -nIE '(//|[;@#])[[:space:]]*//[[:space:]]*Portions of this file were generated' \
+ -- "${FILES[@]}" 2>/dev/null || true)"
+if [ -n "${hits}" ]; then
+ report "AI disclosure check FAILED: doubled comment marker.
+
+Use the single comment character the rest of the file uses." "${hits}"
+fi
+
+# 3. More than one disclosure line in a file. This is the failure the fixed
+# text exists to prevent, so it is worth catching directly rather than
+# inferring it from the form.
+hits="$(grep -cIF "${FIXED}" -- "${FILES[@]}" 2>/dev/null | awk -F: '$NF > 1' || true)"
+if [ -n "${hits}" ]; then
+ report "AI disclosure check FAILED: more than one disclosure line.
+
+A file carries at most one, ever. Keep the first and delete the rest; the
+commit trailer, not the header, records which agents have touched the file." "${hits}"
+fi
+
+# 4. A near miss. A line that is clearly meant to be the disclosure but is
+# not spelled exactly right defeats every deduplication that follows it.
+hits="$(grep -nIF 'AI assistance' -- "${FILES[@]}" 2>/dev/null \
+ | grep -vF "${FIXED}" || true)"
+if [ -n "${hits}" ]; then
+ report "AI disclosure check FAILED: the text is not spelled exactly.
+
+The accepted text, character for character, is:
+
+ ${FIXED}" "${hits}"
+fi
+
+if [ "${status}" -eq 0 ]; then
+ echo "AI disclosure check passed."
+fi
+
+exit "${status}"
diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
new file mode 100755
index 000000000..19b232b10
--- /dev/null
+++ b/scripts/ci_build.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Copyright (c) 2026 Eclipse ThreadX contributors
+#
+# This program and the accompanying materials are made available under the
+# terms of the MIT License which is available at
+# https://opensource.org/licenses/MIT.
+#
+# SPDX-License-Identifier: MIT
+
+set -euo pipefail
+cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
+mapfile -t profiles < <(python3 test/guix_test/cmake/report.py profiles)
+[[ ${#profiles[@]} -ge 7 && ${profiles[0]} == default_build_coverage ]]
+./scripts/build.sh "${profiles[@]:1:5}"
+cp test/guix_test/cmake/build/build-profiles.txt test/guix_test/cmake/build/staged-build-profiles.txt
+cp test/guix_test/cmake/build/build-times.txt test/guix_test/cmake/build/staged-build-times.txt
diff --git a/scripts/ci_install.sh b/scripts/ci_install.sh
new file mode 100755
index 000000000..5ed469e5e
--- /dev/null
+++ b/scripts/ci_install.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Copyright (c) 2026 Eclipse ThreadX contributors
+#
+# This program and the accompanying materials are made available under the
+# terms of the MIT License which is available at
+# https://opensource.org/licenses/MIT.
+#
+# SPDX-License-Identifier: MIT
+
+set -euo pipefail
+cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
+./scripts/install.sh
+./scripts/build.sh default_build_coverage
+cp test/guix_test/cmake/build/build-profiles.txt test/guix_test/cmake/build/install-build-profiles.txt
+cp test/guix_test/cmake/build/build-times.txt test/guix_test/cmake/build/install-build-times.txt
diff --git a/scripts/ci_test.sh b/scripts/ci_test.sh
new file mode 100755
index 000000000..778c9f37d
--- /dev/null
+++ b/scripts/ci_test.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# Copyright (c) 2026 Eclipse ThreadX contributors
+#
+# This program and the accompanying materials are made available under the
+# terms of the MIT License which is available at
+# https://opensource.org/licenses/MIT.
+#
+# SPDX-License-Identifier: MIT
+
+set -euo pipefail
+cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
+mapfile -t profiles < <(python3 test/guix_test/cmake/report.py profiles)
+[[ ${#profiles[@]} -ge 7 && ${profiles[0]} == default_build_coverage ]]
+./scripts/build.sh "${profiles[@]:6}"
+cp test/guix_test/cmake/build/build-profiles.txt test/guix_test/cmake/build/final-build-profiles.txt
+cp test/guix_test/cmake/build/build-times.txt test/guix_test/cmake/build/final-build-times.txt
+GX_CI_CONCURRENT_TESTS=1 ./scripts/test.sh all
diff --git a/scripts/generate_studio_installer.ps1 b/scripts/generate_studio_installer.ps1
index 5288ace02..30670e25b 100644
--- a/scripts/generate_studio_installer.ps1
+++ b/scripts/generate_studio_installer.ps1
@@ -30,10 +30,10 @@ $isccArgs = @('/Q')
if ($Version) {
$release = Get-StudioReleaseVersion -Version $Version
$isccArgs += @(
- "/DStudioFullVersion=`"$($release.FullVersion)`"",
- "/DStudioShortVersion=`"$($release.ShortVersion)`"",
- "/DStudioMajorMinorVersion=`"$($release.MajorMinorVersion)`"",
- "/DStudioVersionInfoVersion=`"$($release.Win32Version)`""
+ "/DStudioFullVersion=$($release.FullVersion)",
+ "/DStudioShortVersion=$($release.ShortVersion)",
+ "/DStudioMajorMinorVersion=$($release.MajorMinorVersion)",
+ "/DStudioVersionInfoVersion=$($release.Win32Version)"
)
}
diff --git a/scripts/guix_studio_release.psm1 b/scripts/guix_studio_release.psm1
index a892e7870..3662d3696 100644
--- a/scripts/guix_studio_release.psm1
+++ b/scripts/guix_studio_release.psm1
@@ -5,7 +5,7 @@
# https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: MIT
-# Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
function Get-StudioReleaseVersion {
[CmdletBinding()]
diff --git a/scripts/install.sh b/scripts/install.sh
index 5ca827cfe..fcdf60ed0 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -8,30 +8,37 @@
#
# SPDX-License-Identifier: MIT
-#
-
-# Remove large folder
-rm -rf /opt/hostedtoolcache
-
-# Install necessary softwares for Ubuntu.
+set -euo pipefail
+cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
-sudo apt-get update
-sudo apt-get install -y \
- gcc-multilib \
- git \
- g++ \
- python3-pip \
- ninja-build \
- unifdef \
- p7zip-full \
- tofrodos \
- gawk \
- software-properties-common
-
-wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -
-CODENAME=$(lsb_release -c | cut -f2 -d':' | sed 's/\t//')
-apt-add-repository "deb https://apt.kitware.com/ubuntu/ $CODENAME main"
+# Every command below reaches the network, and each already carries its own
+# timeout. What was missing is a second attempt: a single slow mirror minute
+# ended the run, and the package install is 41 MB across 34 packages, so it is
+# the one that runs out. Three attempts with a widening pause between them.
+#
+# The worst case is no worse than before. If all three attempts fail the run
+# fails, as it did with one; what the loop buys is the common case, where the
+# mirror is slow once and not twice, and a log that names the attempt.
+retry() {
+ local attempt
+ for attempt in 1 2 3; do
+ if "$@"; then
+ return 0
+ fi
+ echo "install.sh: '$*' failed or timed out on attempt ${attempt}" >&2
+ sleep $((attempt * 10))
+ done
+ echo "install.sh: '$*' failed after 3 attempts" >&2
+ return 1
+}
-python3 -m pip install --upgrade pip
-pip3 install gcovr==4.1
-pip install --upgrade cmake
+retry timeout 180 sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 update
+retry timeout 360 sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y \
+ gcc-14 g++-14 gcc-14-multilib g++-14-multilib cmake ninja-build \
+ python3-venv git unifdef p7zip-full tofrodos gawk
+python3 -m venv .venv-ci
+retry timeout 180 .venv-ci/bin/python -m pip install --disable-pip-version-check \
+ --timeout 30 --retries 2 'gcovr==8.6'
+gcc-14 --version
+gcov-14 --version
+.venv-ci/bin/gcovr --version
diff --git a/scripts/prepare_release.sh b/scripts/prepare_release.sh
index e832e92fd..7fff73870 100755
--- a/scripts/prepare_release.sh
+++ b/scripts/prepare_release.sh
@@ -16,7 +16,7 @@
#
# Copyright (C) 2026 Eclipse ThreadX contributors
# SPDX-License-Identifier: MIT
-# Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
set -eu
@@ -122,8 +122,6 @@ sed -i -E "s|(#define GUIX_HOTFIX_VERSION[[:space:]]+)'[^']*'|\1${HOTFIX_DEFINE}
git -C "${REPO_ROOT}" add "${API_HEADER}"
git -C "${REPO_ROOT}" commit -F - <<'COMMIT_EOF'
Updated version number constants
-
-Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
COMMIT_EOF
printf "Committed version constant updates.\n"
@@ -148,23 +146,48 @@ PORT_FILES=$(printf "%s" "${PORT_FILES}" | grep -v '^[[:space:]]*$' || true)
if [ -z "${PORT_FILES}" ]; then
printf "Warning: No port header files found. Skipping port version string commit.\n"
else
+ # A port advertises its release in the string the library reports at run time.
+ # The pattern accepts three or four dotted numbers and tolerates a stray
+ # letter before the first one, so a port that writes its version slightly
+ # differently is still reached.
+ VERSION_RE='Version[[:space:]]+[A-Za-z]?[0-9]+(\.[0-9]+)+[a-z]*'
while IFS= read -r port_file; do
- if [ -n "${port_file}" ] && grep -qE "Version [0-9]" "${port_file}" 2>/dev/null; then
- sed -i -E "s/Version [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[a-z]*/Version ${VERSION}/g" "${port_file}"
+ if [ -n "${port_file}" ] && grep -qE "${VERSION_RE}" "${port_file}" 2>/dev/null; then
+ sed -i -E "s/${VERSION_RE}/Version ${VERSION}/g" "${port_file}"
printf " Updated: %s\n" "${port_file#${REPO_ROOT}/}"
fi
done </dev/null || true)
+ [ -n "${advertised}" ] || continue
+ if ! printf "%s" "${advertised}" | grep -qF "${VERSION}"; then
+ STALE="${STALE} ${port_file#${REPO_ROOT}/}
+"
+ fi
+ done <&2
+ printf "Correct them so the substitution above reaches them, then re-run.\n" >&2
+ exit 1
+ fi
+
git -C "${REPO_ROOT}" add -u
if git -C "${REPO_ROOT}" diff --cached --quiet; then
printf "No port version string changes staged. Skipping commit.\n"
else
git -C "${REPO_ROOT}" commit -F - <<'COMMIT_EOF'
Updated port version strings
-
-Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
COMMIT_EOF
printf "Committed port version string updates.\n"
fi
diff --git a/scripts/test.sh b/scripts/test.sh
index a9227adbb..2107ec07c 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -8,4 +8,7 @@
#
# SPDX-License-Identifier: MIT
-CTEST_PARALLEL_LEVEL=4 $(dirname `realpath $0`)/../test/guix_test/cmake/run.sh test all
+set -euo pipefail
+cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
+if [[ $# == 0 ]]; then set -- all; fi
+exec test/guix_test/cmake/run.sh test "$@"
diff --git a/scripts/test_studio_demo.cmd b/scripts/test_studio_demo.cmd
index 4a6bbca64..6ea8e8fd2 100644
--- a/scripts/test_studio_demo.cmd
+++ b/scripts/test_studio_demo.cmd
@@ -6,8 +6,7 @@
@rem https://opensource.org/licenses/MIT.
@rem
@rem SPDX-License-Identifier: MIT
-@rem Some portions generated by Codex (OpenAI GPT-5.5).
-@rem Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
rem Initialize the developer environment just like a developer box. The Visual
rem Studio edition differs between a developer machine and a GitHub runner, so
diff --git a/scripts/test_studio_demo_compile.cmd b/scripts/test_studio_demo_compile.cmd
index 217cff9a1..e99d5c3f3 100644
--- a/scripts/test_studio_demo_compile.cmd
+++ b/scripts/test_studio_demo_compile.cmd
@@ -6,8 +6,7 @@
@rem https://opensource.org/licenses/MIT.
@rem
@rem SPDX-License-Identifier: MIT
-@rem Some portions generated by Codex (OpenAI GPT-5.5).
-@rem Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
rem Initialize the developer environment just like a developer box. The Visual
rem Studio edition differs between a developer machine and a GitHub runner, so
diff --git a/scripts/test_studio_view.cmd b/scripts/test_studio_view.cmd
index 2bcda14b6..7f7ea13a2 100644
--- a/scripts/test_studio_view.cmd
+++ b/scripts/test_studio_view.cmd
@@ -6,8 +6,7 @@
@rem https://opensource.org/licenses/MIT.
@rem
@rem SPDX-License-Identifier: MIT
-@rem Some portions generated by Codex (OpenAI GPT-5.5).
-@rem Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
rem Initialize the developer environment just like a developer box. The Visual
rem Studio edition differs between a developer machine and a GitHub runner, so
diff --git a/scripts/update_studio_release_version.ps1 b/scripts/update_studio_release_version.ps1
index 46807434c..0b389d946 100644
--- a/scripts/update_studio_release_version.ps1
+++ b/scripts/update_studio_release_version.ps1
@@ -5,7 +5,7 @@
# https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: MIT
-# Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
[CmdletBinding()]
param(
diff --git a/test/COVERAGE.md b/test/COVERAGE.md
new file mode 100644
index 000000000..a122bab46
--- /dev/null
+++ b/test/COVERAGE.md
@@ -0,0 +1,73 @@
+# Linux regression measurements
+
+The matrix contains 18 configurations. The baseline at `ab87d54f238141331f1295d957f68350c3ecf546`, using GCC 14 and ThreadX `44d7c95c582d415c4ad84527180b29c93c3bf664`, registered 1,849 tests. Four configurations built completely; 14 had compilation failures. CTest executed 488 tests successfully and could not execute 1,361 missing binaries. These are incomplete baseline results, not a passing regression run.
+
+The baseline coverage was 25,581/44,475 lines and 11,874/24,432 branches for the default configuration, and 3,700/44,330 lines and 1,498/24,352 branches without UTF-8. Other configurations were not instrumented. The following durations are CTest wall times in seconds; unavailable tests are included in the registered count.
+
+| Configuration | Baseline executed/registered | CTest seconds |
+|---|---:|---:|
+| default_build_coverage | 216/734 | 120.638 |
+| disable_error_check_build | 216/734 | 35.942 |
+| no_utf8_build_coverage | 14/135 | 28.204 |
+| no_utf8_no_checking_build | 14/135 | 8.987 |
+| ex_unicode_build | 1/2 | 0.010 |
+| ex_unicode_no_checking_build | 1/2 | 0.011 |
+| mouse_support_build | 2/56 | 8.641 |
+| font_kerning_support_build | 3/3 | 0.146 |
+| dynamic_bidi_text_build | 1/3 | 0.034 |
+| dynamic_bidi_text_no_checking_build | 1/3 | 0.024 |
+| _5_4_0_compatible_no_checking_build | 0/1 | 0.004 |
+| synergy_font_support_build | 15/16 | 0.490 |
+| thai_glyph_shaping_support_build | 1/1 | 0.028 |
+| palette_mode_aa_text_colors_16_build | 2/2 | 0.796 |
+| disable_deprecated_string_api_build | 1/1 | 1.024 |
+| partial_canvas_support_build | 0/7 | 0.007 |
+| partial_canvas_support_vertical_refresh_build | 0/7 | 0.006 |
+| partial_canvas_support_horizontal_refresh_build | 0/7 | 0.011 |
+
+## Complete instrumented matrix
+
+GCC 14, CMake/Ninja and CTest passed 1,849/1,849 tests across all 18 configurations, with no retries, skipped tests, or disabled tests. The summed per-profile CTest wall time was 2,337.18 seconds. The reviewed ThreadX dependency and reusable workflow are pinned to `b37cd4a81a1cb8c2ebefc438220ab7f009e13362`; coverage uses gcovr 8.6 and gcov 14.
+
+The merged report covers **46,115/46,888 lines (98.3514%)** and **25,635/26,675 branches (96.1012%)**. Its source-line and covered-line sets exactly equal the respective raw-trace unions. Every expected JSON, XML, HTML index, and linked source page is nonempty, and source paths are repository-relative. The harness enforces floors of **98.3% lines** and **96.0% branches**; the reusable summary action also enforces its integer line floor of 98%.
+
+“Added covered lines” counts lines covered by a profile but not by the default profile. These contributions overlap and must not be summed. “Additional source lines” includes newly exposed but unexecuted code, which remains in the merged denominator.
+
+| Configuration | Passed | CTest seconds | Lines covered/total | Branches covered/total | Added covered lines | Additional source lines |
+|---|---:|---:|---:|---:|---:|---:|
+| default_build_coverage | 734 | 202.18 | 44379/44475 | 24282/24432 | 0 | 0 |
+| disable_error_check_build | 734 | 202.06 | 41317/44468 | 20373/24428 | 0 | 0 |
+| no_utf8_build_coverage | 135 | 65.56 | 22107/44330 | 10364/24352 | 31 | 34 |
+| no_utf8_no_checking_build | 135 | 65.23 | 20969/44323 | 9504/24348 | 31 | 34 |
+| ex_unicode_build | 2 | 0.08 | 2176/44477 | 827/24434 | 1 | 2 |
+| ex_unicode_no_checking_build | 2 | 0.08 | 1972/44470 | 661/24430 | 1 | 2 |
+| mouse_support_build | 56 | 56.26 | 14215/45073 | 6196/24739 | 77 | 598 |
+| font_kerning_support_build | 3 | 0.26 | 3374/44600 | 1239/24510 | 119 | 125 |
+| dynamic_bidi_text_build | 3 | 739.61 | 5076/45760 | 2161/25246 | 1168 | 1285 |
+| dynamic_bidi_text_no_checking_build | 3 | 737.16 | 4595/45753 | 1811/25242 | 1163 | 1285 |
+| _5_4_0_compatible_no_checking_build | 1 | 0.18 | 5973/44507 | 2005/24458 | 37 | 39 |
+| synergy_font_support_build | 16 | 3.61 | 9863/44566 | 4127/24488 | 90 | 91 |
+| thai_glyph_shaping_support_build | 1 | 0.07 | 2002/44607 | 804/24561 | 121 | 132 |
+| palette_mode_aa_text_colors_16_build | 2 | 5.25 | 3055/44475 | 1151/24432 | 1 | 2 |
+| disable_deprecated_string_api_build | 1 | 4.26 | 2134/43892 | 812/23986 | 1 | 8 |
+| partial_canvas_support_build | 7 | 76.47 | 10098/44545 | 4364/24478 | 70 | 77 |
+| partial_canvas_support_vertical_refresh_build | 7 | 76.02 | 10130/44547 | 4392/24482 | 72 | 79 |
+| partial_canvas_support_horizontal_refresh_build | 7 | 102.84 | 10168/44548 | 4403/24482 | 73 | 80 |
+
+## Remaining coverage
+
+The complete denominator leaves **773 lines and 1,040 branches** uncovered. The following counts retain all source code, including optional feature paths and defensive checks. They are gaps to investigate, not claims of unreachable code. Source-level HTML and the merged JSON identify each line and branch in the downloadable CI artifacts.
+
+| Area | Uncovered lines | Uncovered branches |
+|---|---:|---:|
+| Animation drag, landing and update decisions | 8 | 20 |
+| Bidi allocation, shaping, explicit levels and reordering | 101 | 146 |
+| Binary resource and image-decoder error paths | 20 | 43 |
+| Canvas refresh, driver setup, blending and drawing | 108 | 112 |
+| Font formats, glyph shaping and drawing | 20 | 73 |
+| Mouse cursor definition, visibility, capture and restore | 453 | 281 |
+| Widget, text-editing, scrolling and system decisions | 63 | 365 |
+
+The mouse configuration covers 77 lines beyond the default but leaves most cursor capture/restore and checked mouse APIs unexercised. Dedicated cursor and framebuffer assertions are needed for those paths. Bidi and font follow-up work needs allocation-failure cases, shaping boundaries and text-editing decisions; canvas and driver follow-up needs refresh-direction boundaries and rotated blending. Widget, animation, binary-resource and decoder gaps require focused state and invalid-input cases. None are excluded to meet the floors.
+
+New assertions exercise view-pool exhaustion, checked cursor-height rejection, the core cursor-height reset, and invalid checkbox validation. Checkout failure, dependency-build failure, a failing CTest case, and missing/empty coverage input probes all returned nonzero. A failing test retained partial coverage; missing or empty traces could not produce a merged report. Report tests also verify stale-artifact removal, partial selections, exact unions, repository-relative paths, all required formats, and both coverage floors.
diff --git a/test/README.md b/test/README.md
index 384c3399a..f2e45c76c 100644
--- a/test/README.md
+++ b/test/README.md
@@ -52,7 +52,7 @@ The GUIX regression test is built on top of the CMake build system and organize
- In this type of test code, the test code typically checks the API return status or the values of a variable to verify the correctness of the test case.
### Prerequisites
-1. Linux environment.
+1. Ubuntu 24.04 with GCC/gcov 14, CMake, Ninja, and Python 3.
2. Clone the GUIX repository.
3. Install required packages using script `install.sh` located in the `scripts` directory.
@@ -62,13 +62,13 @@ The GUIX regression test is built on top of the CMake build system and organize
2. To build and run all the tests, use the following commands.
```bash
./run.sh build all
-./run.sh run all
+./run.sh test all
```
3. To build and run a specific test suite, use the following commands.
```bash
./run.sh build
-./run.sh run
+./run.sh test
```
The available build types are as follows:
@@ -76,8 +76,8 @@ The available build types are as follows:
|Build Types|Description|Build Configuration Settings|
|--------------|-----------|----------------------------|
|default_build_coverage|Build with default configuration settings and generate coverage report|N/A|
-|disable_error_checking_build|Build with error checking disabled|*GX_DISABLE_ERROR_CHECKING*|
-|no_utf8_build_coverage|Build with UTF-8 support disabled and generate coverage report|GX_DISABLE_UTF8_SUPPORT and GX_DISABLE_ERROR_CHECKING|
+|disable_error_check_build|Build with error checking disabled|*GX_DISABLE_ERROR_CHECKING*|
+|no_utf8_build_coverage|Build with UTF-8 support disabled|GX_DISABLE_UTF8_SUPPORT|
|no_utf8_no_checking_build|Build with UTF-8 support disabled and error checking disabled|GX_DISABLE_UTF8_SUPPORT and GX_DISABLE_ERROR_CHECKING|
|ex_unicode_build|Build with extended Unicode support|GX_EXTENDED_UNICODE_SUPPORT|
|ex_unicode_no_checking_build|Build with extended Unicode support and error checking disabled|GX_EXTENDED_UNICODE_SUPPORT and GX_DISABLE_ERROR_CHECKING|
@@ -90,6 +90,7 @@ The available build types are as follows:
|thai_glyph_shaping_support_build|Build with Thai glyph shaping support|GX_THAI_GLYPH_SHAPING_SUPPORT|
|palette_mode_aa_text_colors_16_build|Build with palette mode with 16 colors for text drawing support|GX_PALETTE_MODE_AA_TEXT_COLORS=16|
|disable_deprecated_string_api_build|Build with deprecated string API disabled|GX_DISABLE_DEPRECATED_STRING_API|
+|disable_deprecated_binres_api_build|Build with deprecated binary resource API disabled|GX_DISABLE_DEPRECATED_BINRES_API|
|partial_canvas_support_build|Build with partial canvas support|GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER|
|partial_canvas_support_vertical_refresh_build|Build with partial canvas support and vertical refresh|GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER and GX_CANVAS_REFRESH_DIRECTION_VERTICAL|
|partial_canvas_support_horizontal_refresh_build|Build with partial canvas support and horizontal refresh|GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER and GX_CANVAS_REFRESH_DIRECTION_HORIZONTAL|
@@ -97,7 +98,21 @@ The available build types are as follows:
The **test reports** for each build type will be generated in the `test\guix_test\cmake\build\` directory.
-The **coverage report** for `default_build_covearge` and `no_utf8_build_coverage` will be generated in the `test\guix_test\cmake\coverage_report` directory. For other build types, no coverage report is generated.
+Every configuration instruments GUIX common sources. The installer creates a `.venv-ci` virtual environment with gcovr 8.6. The runner checks out a reviewed ThreadX commit, fails on dependency setup errors, and uses its CMake/Ninja bootstrap and JUnit support. It audits feature definitions and coverage flags in the actual compile commands.
+
+Each test invocation clears old coverage counters and reports. JSON, Cobertura XML, and HTML reports appear under `coverage_report/per_configuration`. A full selection produces `merged.json`, `merged.xml`, and `merged/index.html`; a manual subset produces `partial` reports instead. `profiles.json` records the selection and source-line counts. The merge checks every input and requires its source-line denominator to equal the exact union of the raw traces. Raster loops can exceed 2³² hits in one profile. The gcovr suspicious-hit threshold is 10¹¹, retaining the measured counts and every source line. All reports include the same `common/src` sources, including unexecuted code; diagnostic filtering must not change that denominator.
+
+`build/build-profiles.txt` and `build/test-profiles.txt` list the requested configurations. Build durations, diagnostics, JUnit results, and the test summary remain under `build`. Test failures propagate to the runner while available coverage is retained. Complete runs enforce the line and branch floors in `coverage_floors.json`. Run `python3 test_report.py` from the CMake test directory to check the report validators.
+
+On hosted Linux runners, the reusable workflow stages compilation across its bounded install, build, and test steps. All configured profiles are still built and tested; the three `build/*-build-times.txt` files record each compilation stage. The test stage runs all CTest profiles concurrently before collecting coverage reports serially.
+
+The Linux regression and three distinct Studio validation jobs run on every pull request to `dev` or `master`. Studio View validates the application without publishing packages. MSIX packaging remains manually dispatched. Pages deployment requires a successful complete run on `master`; required merge checks are administered separately from workflow triggers.
+
+Invalid-input regressions call the `_gxe_` checking entry points explicitly. Valid-input cases also exercise the unchecked public API mappings.
+
+The regression fixtures use explicit conversions from generated widget control blocks to their GUIX base types. These follow GUIX's control-block layout contract and deviate from MISRA C:2004 Rule 11.4 and MISRA C:2012/2023 Rule 11.3. Their regression assertions and golden-image comparisons exercise the resulting objects.
+
+Measured counts, durations, feature contributions, and remaining gaps are recorded in [Linux regression measurements](COVERAGE.md).
### Run One Test Case
@@ -352,7 +367,7 @@ If the available build types lack the configuration settings required for your t
1. Open the `test\guix_test\cmake\CMakeLists.txt` file.
2. Add a new build type using the following example:
```cmake
-set(disable_error_checking_build -DGX_DISABLE_ERROR_CHECKING)
+set(disable_error_check_build -DGX_DISABLE_ERROR_CHECKING)
```
3. Include the new build type in the `BUILD_CONFIGURATIONS` list.
```cmake
diff --git a/test/example_internal/bidi_text_line_break_static/demo_guix_bidi_text_line_break_static.c b/test/example_internal/bidi_text_line_break_static/demo_guix_bidi_text_line_break_static.c
index 38ee4b8a0..8837e7aa9 100644
--- a/test/example_internal/bidi_text_line_break_static/demo_guix_bidi_text_line_break_static.c
+++ b/test/example_internal/bidi_text_line_break_static/demo_guix_bidi_text_line_break_static.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -151,7 +153,7 @@ static VOID load_theme_2()
gx_display_theme_install(root->gx_window_root_canvas->gx_canvas_display, theme);
}
- return status;
+ return;
}
VOID demo_thread_entry(ULONG thread_input)
diff --git a/test/example_internal/generic_scroll_wheel/demo_guix_generic_scroll_wheel.c b/test/example_internal/generic_scroll_wheel/demo_guix_generic_scroll_wheel.c
index 6a7618dbe..2f4de38f5 100644
--- a/test/example_internal/generic_scroll_wheel/demo_guix_generic_scroll_wheel.c
+++ b/test/example_internal/generic_scroll_wheel/demo_guix_generic_scroll_wheel.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -162,7 +164,7 @@ void widget_scroll_callback(GX_GENERIC_SCROLL_WHEEL* wheel, GX_WIDGET* widget, I
GX_BOOL created;
GX_RECTANGLE size;
SCROLL_WHEEL_ROW* row = (SCROLL_WHEEL_ROW*)widget;
- int width;
+ GX_VALUE width;
gx_widget_created_test(widget, &created);
@@ -171,7 +173,7 @@ void widget_scroll_callback(GX_GENERIC_SCROLL_WHEEL* wheel, GX_WIDGET* widget, I
gx_window_client_width_get((GX_WINDOW *)wheel, &width);
gx_utility_rectangle_define(&size, 0, 0, width - 1, wheel->gx_scroll_wheel_row_height - 1);
- gx_numeric_prompt_create((GX_NUMERIC_PROMPT*)&row->prompt, "", wheel, 0, GX_STYLE_ENABLED | GX_STYLE_TRANSPARENT, 0, &size);
+ gx_numeric_prompt_create((GX_NUMERIC_PROMPT*)&row->prompt, "", (GX_WIDGET *)wheel, 0, GX_STYLE_ENABLED | GX_STYLE_TRANSPARENT, 0, &size);
size.gx_rectangle_top = (size.gx_rectangle_top + size.gx_rectangle_bottom - SCROLL_WHEEL_ICON_HEIGHT) >> 1;
size.gx_rectangle_left = size.gx_rectangle_right - SCROLL_WHEEL_ICON_WIDTH - 1;
@@ -194,8 +196,8 @@ void widget_scroll_wheel_init()
while (index <= SCROLL_WHEEL_VISIBLE_ROWS)
{
- widget_scroll_callback(nowrap_wheel, &scroll_wheel_nowrap_rows[index], index);
- widget_scroll_callback(wrap_wheel, &scroll_wheel_wrap_rows[index], index);
+ widget_scroll_callback(nowrap_wheel, (GX_WIDGET *)&scroll_wheel_nowrap_rows[index], index);
+ widget_scroll_callback(wrap_wheel, (GX_WIDGET *)&scroll_wheel_wrap_rows[index], index);
index++;
}
diff --git a/test/example_internal/graphics_32bpp/demo_guix_graphics_32bpp.c b/test/example_internal/graphics_32bpp/demo_guix_graphics_32bpp.c
index 8d97c56d8..f31bae7d4 100644
--- a/test/example_internal/graphics_32bpp/demo_guix_graphics_32bpp.c
+++ b/test/example_internal/graphics_32bpp/demo_guix_graphics_32bpp.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -372,7 +374,10 @@ GX_RECTANGLE rect;
break;
case ELLIPSE:
- gx_canvas_ellipse_draw(xcenter, ycenter, a, b);
+ if ((a > 0) && (b > 0))
+ {
+ gx_canvas_ellipse_draw(xcenter, ycenter, a, b);
+ }
break;
case RECTANGLE:
diff --git a/test/example_internal/non_linear_animation/demo_guix_non_linear_animation.c b/test/example_internal/non_linear_animation/demo_guix_non_linear_animation.c
index a99d0bff0..fd74a5a74 100644
--- a/test/example_internal/non_linear_animation/demo_guix_non_linear_animation.c
+++ b/test/example_internal/non_linear_animation/demo_guix_non_linear_animation.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -85,7 +87,11 @@ void animation_start()
animation_info.gx_animation_target = (GX_WIDGET *)&main_screen.main_screen_icon_button;
animation_info.gx_animation_parent = (GX_WIDGET *)&main_screen;
animation_info.gx_animation_style = animation_style;
- gx_animation_start(&animation, &animation_info);
+ /* Start only an idle animation. */
+ if (animation.gx_animation_status == GX_ANIMATION_IDLE)
+ {
+ gx_animation_start(&animation, &animation_info);
+ }
}
void generate_line_chart_data()
diff --git a/test/example_internal/partial_frame_buffer_16bpp/demo_guix_partial_frame_buffer_16bpp.c b/test/example_internal/partial_frame_buffer_16bpp/demo_guix_partial_frame_buffer_16bpp.c
index 296d75c2f..f2067aa8c 100644
--- a/test/example_internal/partial_frame_buffer_16bpp/demo_guix_partial_frame_buffer_16bpp.c
+++ b/test/example_internal/partial_frame_buffer_16bpp/demo_guix_partial_frame_buffer_16bpp.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -76,7 +78,7 @@ INT button_focus_gain_count = 0;
/* Define radial slider anchor angle list. */
GX_VALUE radial_slider_anchor_list[] = { 242, 214, 191, 168, 142, 112, 67, 38, 13, -10, -34, -63 };
-GX_CHAR canvas_buffer[PRIMARY_X_RESOLUTION * 20];
+GX_COLOR canvas_buffer[PRIMARY_X_RESOLUTION * 20 / sizeof(GX_COLOR)];
/* Define screen toggle function that used for resgression tests. */
void ToggleScreen(GX_WINDOW *new_win, GX_WINDOW *old_win)
diff --git a/test/example_internal/screen_drag_animation_with_block_move/demo_screen_drag_animation_with_block_move.c b/test/example_internal/screen_drag_animation_with_block_move/demo_screen_drag_animation_with_block_move.c
index c8b59e278..49a04ab39 100644
--- a/test/example_internal/screen_drag_animation_with_block_move/demo_screen_drag_animation_with_block_move.c
+++ b/test/example_internal/screen_drag_animation_with_block_move/demo_screen_drag_animation_with_block_move.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -113,10 +115,10 @@ VOID create_screen_drag_animations()
gx_animation_create(&h_screen_drag_animation);
gx_animation_create(&v_screen_drag_animation);
- enable_screen_drag_animation(&h_screen_drag_animation, h_screen_list, &main_screen.main_screen_h_menu_window,
+ enable_screen_drag_animation(&h_screen_drag_animation, h_screen_list, (GX_WIDGET *)&main_screen.main_screen_h_menu_window,
GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_HORIZONTAL | GX_ANIMATION_WRAP | GX_ANIMATION_BLOCK_MOVE, ANIMATION_ID_H_SCREEN_DRAG);
- enable_screen_drag_animation(&v_screen_drag_animation, v_screen_list, &main_screen.main_screen_v_menu_window,
+ enable_screen_drag_animation(&v_screen_drag_animation, v_screen_list, (GX_WIDGET *)&main_screen.main_screen_v_menu_window,
GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_VERTICAL | GX_ANIMATION_WRAP | GX_ANIMATION_BLOCK_MOVE, ANIMATION_ID_V_SCREEN_DRAG);
}
diff --git a/test/example_internal/screen_drag_animation_with_canvas/demo_screen_drag_animation_with_canvas.c b/test/example_internal/screen_drag_animation_with_canvas/demo_screen_drag_animation_with_canvas.c
index d1e47be31..a0c6f3b71 100644
--- a/test/example_internal/screen_drag_animation_with_canvas/demo_screen_drag_animation_with_canvas.c
+++ b/test/example_internal/screen_drag_animation_with_canvas/demo_screen_drag_animation_with_canvas.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -159,10 +161,10 @@ VOID create_screen_drag_animations()
gx_animation_canvas_define(&h_screen_drag_animation, &h_animation_canvas);
gx_animation_canvas_define(&v_screen_drag_animation, &v_animation_canvas);
- enable_screen_drag_animation(&h_screen_drag_animation, h_screen_list, &main_screen.main_screen_h_menu_window,
+ enable_screen_drag_animation(&h_screen_drag_animation, h_screen_list, (GX_WIDGET *)&main_screen.main_screen_h_menu_window,
GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_HORIZONTAL | GX_ANIMATION_WRAP, ANIMATION_ID_H_SCREEN_DRAG);
- enable_screen_drag_animation(&v_screen_drag_animation, v_screen_list, &main_screen.main_screen_v_menu_window,
+ enable_screen_drag_animation(&v_screen_drag_animation, v_screen_list, (GX_WIDGET *)&main_screen.main_screen_v_menu_window,
GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_VERTICAL | GX_ANIMATION_WRAP, ANIMATION_ID_V_SCREEN_DRAG);
}
diff --git a/test/guix_studio_test/test_demo/test_animation_pool_size.py b/test/guix_studio_test/test_demo/test_animation_pool_size.py
index 6691569e7..b3f1062b7 100644
--- a/test/guix_studio_test/test_demo/test_animation_pool_size.py
+++ b/test/guix_studio_test/test_demo/test_animation_pool_size.py
@@ -5,7 +5,7 @@
# https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: MIT
-# Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
"""Regression test for https://github.com/eclipse-threadx/guix/issues/172.
diff --git a/test/guix_studio_test/test_view/test_utils.py b/test/guix_studio_test/test_view/test_utils.py
index ae1849e1c..4be863bf2 100644
--- a/test/guix_studio_test/test_view/test_utils.py
+++ b/test/guix_studio_test/test_view/test_utils.py
@@ -7,7 +7,7 @@
# https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: MIT
-# Some portions generated by Claude Code (Opus 5).
+# Portions of this file were generated with AI assistance.
import os
import sys
diff --git a/test/guix_test/cmake/CMakeLists.txt b/test/guix_test/cmake/CMakeLists.txt
index 8f8be13da..4f8c97222 100644
--- a/test/guix_test/cmake/CMakeLists.txt
+++ b/test/guix_test/cmake/CMakeLists.txt
@@ -5,6 +5,9 @@ cmake_policy(SET CMP0077 NEW)
project(guix_test LANGUAGES C)
+option(GX_COVERAGE "Instrument every GUIX regression configuration" ON)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
# Set build configurations
set(BUILD_CONFIGURATIONS
default_build_coverage
@@ -22,6 +25,7 @@ set(BUILD_CONFIGURATIONS
thai_glyph_shaping_support_build
palette_mode_aa_text_colors_16_build
disable_deprecated_string_api_build
+ disable_deprecated_binres_api_build
partial_canvas_support_build
partial_canvas_support_vertical_refresh_build
partial_canvas_support_horizontal_refresh_build)
@@ -44,7 +48,7 @@ message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}.")
set(default_build_coverage "")
-set(disable_error_checking_build -DGX_DISABLE_ERROR_CHECKING)
+set(disable_error_check_build -DGX_DISABLE_ERROR_CHECKING)
set(no_utf8_build_coverage -DGX_DISABLE_UTF8_SUPPORT)
set(no_utf8_no_checking_build -DGX_DISABLE_UTF8_SUPPORT
-DGX_DISABLE_ERROR_CHECKING)
@@ -58,15 +62,16 @@ set(dynamic_bidi_text_build -DGX_DYNAMIC_BIDI_TEXT_SUPPORT
set(dynamic_bidi_text_no_checking_build
-DGX_DYNAMIC_BIDI_TEXT_SUPPORT -DGX_DYNAMIC_ARABIC_SHAPING_SUPPORT
-DGX_DISABLE_ERROR_CHECKING)
-set(_5_4_0_compatible_no_checking_build -DGX_DISABLED_ERROR_CHECKING
+set(_5_4_0_compatible_no_checking_build -DGX_DISABLE_ERROR_CHECKING
-DGUIX_5_4_0_COMPATIBILITY)
set(synergy_font_support_build -DGX_SYNERGY_FONT_FORMAT_SUPPORT)
set(thai_glyph_shaping_support_build -DGX_THAI_GLYPH_SHAPING_SUPPORT)
set(palette_mode_aa_text_colors_16_build -DGX_PALETTE_MODE_AA_TEXT_COLORS=16)
set(disable_deprecated_string_api_build -DGX_DISABLE_DEPRECATED_STRING_API)
+set(disable_deprecated_binres_api_build -DGX_DISABLE_DEPRECATED_BINRES_API)
set(partial_canvas_support_build -DGX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER)
-set(partial_canvas_support_vertical_refresh_build -DGX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER -DGX_CANVAS_REFRESH_DIRECTION_HORIZONTAL)
-set(partial_canvas_support_horizontal_refresh_build -DGX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER -DGX_CANVAS_REFRESH_DIRECTION_VERTICAL)
+set(partial_canvas_support_vertical_refresh_build -DGX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER -DGX_CANVAS_REFRESH_DIRECTION_VERTICAL)
+set(partial_canvas_support_horizontal_refresh_build -DGX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER -DGX_CANVAS_REFRESH_DIRECTION_HORIZONTAL)
if($ENV{ENABLE_64})
message(STATUS "Building for 64bit")
@@ -77,6 +82,7 @@ else()
endif()
add_compile_options(
-std=c99
+ -D_DEFAULT_SOURCE
-ggdb
-g3
-gdwarf-2
@@ -118,13 +124,17 @@ add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/regression regression)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/regression/output_files)
# Coverage
-if(CMAKE_BUILD_TYPE MATCHES ".*_coverage")
+if(GX_COVERAGE)
target_compile_options(guix PRIVATE -fprofile-arcs -ftest-coverage)
target_link_options(guix PRIVATE -fprofile-arcs -ftest-coverage)
endif()
# Build ThreadX library once
-execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/run.sh build_libs)
+execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/run.sh build_libs
+ RESULT_VARIABLE dependency_result)
+if(NOT dependency_result EQUAL 0)
+ message(FATAL_ERROR "ThreadX dependency build failed: ${dependency_result}")
+endif()
add_custom_target(build_libs ALL COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/run.sh
build_libs)
add_dependencies(guix build_libs)
diff --git a/test/guix_test/cmake/coverage.sh b/test/guix_test/cmake/coverage.sh
index 1b0e075f7..933b88437 100755
--- a/test/guix_test/cmake/coverage.sh
+++ b/test/guix_test/cmake/coverage.sh
@@ -8,10 +8,6 @@
#
# SPDX-License-Identifier: MIT
-
-set -e
-
-cd $(dirname $0)
-mkdir -p coverage_report/$1
-gcovr --object-directory=build/$1/guix/CMakeFiles/guix.dir/common/src -r ../../../common/src --xml-pretty --output coverage_report/$1.xml
-gcovr --object-directory=build/$1/guix/CMakeFiles/guix.dir/common/src -r ../../../common/src --html --html-details --output coverage_report/$1/index.html
+set -euo pipefail
+cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
+python3 report.py coverage "$@"
diff --git a/test/guix_test/cmake/coverage_floors.json b/test/guix_test/cmake/coverage_floors.json
new file mode 100644
index 000000000..92a2998ab
--- /dev/null
+++ b/test/guix_test/cmake/coverage_floors.json
@@ -0,0 +1 @@
+{"line": 98.3, "branch": 96.0}
diff --git a/test/guix_test/cmake/regression/CMakeLists.txt b/test/guix_test/cmake/regression/CMakeLists.txt
index 30d8b8b50..279054d86 100644
--- a/test/guix_test/cmake/regression/CMakeLists.txt
+++ b/test/guix_test/cmake/regression/CMakeLists.txt
@@ -1366,7 +1366,8 @@ set(kerning_glyph_draw_32bpp_screen_FILE_LIST
set(kerning_glyph_draw_32bpp_screen_REG_TESTS
guix_kerning_glyph_draw_32bpp_screen
- guix_kerning_glyph_draw_32bpp_screen_binary_source)
+ guix_kerning_glyph_draw_32bpp_screen_binary_source
+ guix_binres_font_glyph_range_kerning_no_output)
set(kerning_glyph_in_string_table_FILE_LIST
demo_kerning_glyph_in_string_table.c
@@ -1520,7 +1521,8 @@ set(multi_themes_16bpp_FILE_LIST
set(multi_themes_16bpp_REG_TESTS
guix_multi_themes_16bpp guix_binres_language_info_get_no_output
guix_binres_language_table_load guix_binres_language_table_load_use_old_api
- guix_binres_theme_load)
+ guix_binres_theme_load guix_binres_theme_id_bound_no_output
+ guix_binres_font_glyph_range_no_output guix_binres_ext_api_no_output)
set(multi_themes_16bpp_synergy_FILE_LIST
demo_guix_multi_themes_16bpp_synergy.c
@@ -1717,7 +1719,8 @@ set(standalone_binres_load_extended_unicode_32bpp_FILE_LIST
standalone_binres_load_extended_unicode_32bpp_specifications.c)
set(standalone_binres_load_extended_unicode_32bpp_REG_TESTS
- guix_standalone_binres_load_extended_unicode_32bpp)
+ guix_standalone_binres_load_extended_unicode_32bpp
+ guix_binres_font_glyph_range_ex_unicode_no_output)
set(all_widgets_synergy_565rgb_FILE_LIST
demo_guix_all_widgets_synergy_565rgb.c
@@ -2320,6 +2323,8 @@ elseif("-DGX_PALETTE_MODE_AA_TEXT_COLORS=16" IN_LIST ${CMAKE_BUILD_TYPE})
set(demos ${PALETTE_MODE_AA_TEXT_COLORS_16_DEMOS})
elseif("-DGX_DISABLE_DEPRECATED_STRING_API" IN_LIST ${CMAKE_BUILD_TYPE})
set(demos ${DEMO_IN_EXAMPLES} ${DEMO_IN_TUTORIALS})
+elseif("-DGX_DISABLE_DEPRECATED_BINRES_API" IN_LIST ${CMAKE_BUILD_TYPE})
+ set(demos ${DEMO_IN_EXAMPLES} ${DEMO_IN_TUTORIALS})
elseif("-DGX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER" IN_LIST ${CMAKE_BUILD_TYPE})
set(demos ${PARTIAL_CANVAS_SUPPORT_DEMOS})
else()
diff --git a/test/guix_test/cmake/report.py b/test/guix_test/cmake/report.py
new file mode 100644
index 000000000..a5f7b4872
--- /dev/null
+++ b/test/guix_test/cmake/report.py
@@ -0,0 +1,241 @@
+#!/usr/bin/env python3
+# Copyright (c) 2026 Eclipse ThreadX contributors
+# SPDX-License-Identifier: MIT
+"""Validate GUIX profiles, test results, and raw coverage unions."""
+import json
+import os
+from pathlib import Path
+import re
+import shlex
+import shutil
+import subprocess
+import sys
+import xml.etree.ElementTree as ET
+
+HERE = Path(__file__).resolve().parent
+ROOT = HERE.parents[2]
+BUILD = HERE / 'build'
+REPORT = HERE / 'coverage_report'
+
+
+def profiles():
+ """Read the authoritative CMake matrix."""
+ return re.search(r'set\(BUILD_CONFIGURATIONS(.*?)\)',
+ (HERE / 'CMakeLists.txt').read_text(), re.S)[1].split()
+
+
+def validate(selected):
+ """Reject unknown, duplicate, or empty selections."""
+ if not selected or len(set(selected)) != len(selected) or set(selected) - set(profiles()):
+ raise ValueError('Invalid profile selection: ' + ' '.join(selected))
+
+
+def audit(selected):
+ """Check definitions and instrumentation in every GUIX compile command."""
+ source = (HERE / 'CMakeLists.txt').read_text()
+ mappings = {}
+ for name in profiles():
+ match = re.search(r'set\(' + re.escape(name) + r'\s+(.*?)\)', source, re.S)
+ if not match:
+ raise ValueError('Missing macro mapping: ' + name)
+ mappings[name] = set(re.findall(r'-D(\S+)', match[1]))
+ feature_macros = set().union(*mappings.values())
+ for name in selected:
+ commands = json.loads((BUILD / name / 'compile_commands.json').read_text())
+ objects = [item for item in commands
+ if Path(item['file']).is_relative_to(ROOT / 'common' / 'src')]
+ if not objects:
+ raise ValueError('No GUIX compile commands: ' + name)
+ for item in objects:
+ args = shlex.split(item['command'])
+ definitions = {arg[2:] for arg in args if arg.startswith('-D')}
+ if definitions & feature_macros != mappings[name]:
+ raise ValueError('Incorrect feature definitions: ' + name)
+ if '-fprofile-arcs' not in args or '-ftest-coverage' not in args:
+ raise ValueError('GUIX instrumentation missing: ' + name)
+ print(name + ': ' + ' '.join(sorted(mappings[name])))
+
+
+def inventory(name):
+ """Require a nonempty CTest inventory with existing executables."""
+ result = subprocess.run(['ctest', '--test-dir', str(BUILD / name),
+ '--show-only=json-v1'], check=True,
+ capture_output=True, text=True)
+ tests = json.loads(result.stdout)['tests']
+ if not tests or any(not item.get('command') for item in tests):
+ raise ValueError('Missing tests or binaries: ' + name)
+ return tests
+
+
+def prepare(selected):
+ """Clear previous reports and counters before starting a new selection."""
+ if REPORT.exists():
+ shutil.rmtree(REPORT)
+ REPORT.mkdir()
+ (REPORT / 'profiles.json').write_text(json.dumps({
+ 'profiles': selected, 'complete': set(selected) == set(profiles())}, indent=2))
+ for path in BUILD.rglob('*.gcda'):
+ path.unlink()
+ for name in profiles():
+ for suffix in ('.xml', '.txt'):
+ (BUILD / name / (name + suffix)).unlink(missing_ok=True)
+ (BUILD / (name + '.txt')).unlink(missing_ok=True)
+ testing = BUILD / name / 'Testing'
+ if testing.exists():
+ shutil.rmtree(testing)
+ for name in ('results.txt', 'test.txt'):
+ (BUILD / name).unlink(missing_ok=True)
+ audit(selected)
+ for name in selected:
+ inventory(name)
+
+
+def nonempty(path):
+ """Reject absent and empty artifacts."""
+ if not path.is_file() or path.stat().st_size == 0:
+ raise ValueError('Missing or empty report: ' + str(path.relative_to(HERE)))
+
+
+def trace_lines(path):
+ """Return the exact source-line denominator of an unfiltered raw trace."""
+ nonempty(path)
+ data = json.loads(path.read_text())
+ lines = set()
+ for item in data['files']:
+ name = item['file']
+ if not name.startswith('common/src/') or '..' in Path(name).parts or Path(name).is_absolute():
+ raise ValueError('Coverage path is outside GUIX common sources: ' + name)
+ lines.update((name, line['line_number']) for line in item['lines'])
+ if not lines:
+ raise ValueError('Empty source-line denominator: ' + path.name)
+ return lines
+
+
+def reports(base):
+ """Validate all report formats and matching source-line denominators."""
+ lines = trace_lines(base.with_suffix('.json'))
+ xml = base.with_suffix('.xml')
+ nonempty(xml)
+ nonempty(base / 'index.html')
+ for link in re.findall(r'href="([^"#]+\.html)(?:#[^"]*)?"', (base / 'index.html').read_text()):
+ if '://' not in link:
+ if Path(link).is_absolute() or '..' in Path(link).parts:
+ raise ValueError('Non-relative HTML report link')
+ nonempty(base / link)
+ for detail in base.glob('*.html'):
+ nonempty(detail)
+ tree = ET.parse(xml).getroot()
+ xml_lines = {(node.attrib['filename'], int(line.attrib['number']))
+ for node in tree.findall('.//class') for line in node.findall('./lines/line')}
+ if xml_lines != lines:
+ raise ValueError('XML and JSON source-line denominators differ: ' + base.name)
+ for source in tree.findall('./sources/source'):
+ if source.text not in ('.', ''):
+ raise ValueError('Non-relative XML source root')
+ return lines
+
+
+def relative_xml(path):
+ """Use the repository root as the portable Cobertura source root."""
+ tree = ET.parse(path)
+ for source in tree.findall('./sources/source'):
+ source.text = '.'
+ tree.write(path, encoding='utf-8', xml_declaration=True)
+
+
+def gcovr(arguments, base):
+ """Use one inclusion policy for collection and merging."""
+ base.parent.mkdir(parents=True, exist_ok=True)
+ base.mkdir(exist_ok=True)
+ executable = ROOT / '.venv-ci' / 'bin' / 'gcovr'
+ subprocess.run([str(executable), '--root', str(ROOT), '--filter', 'common/src/',
+ '--gcov-executable', 'gcov-14', '--gcov-suspicious-hits-threshold', '100000000000',
+ '--merge-mode-functions', 'merge-use-line-min',
+ '--json', str(base.with_suffix('.json')),
+ '--xml-pretty', '--xml', str(base.with_suffix('.xml')),
+ '--html-details', str(base / 'index.html'),
+ '--html-title', 'GUIX ' + base.name, '--print-summary', *arguments],
+ cwd=ROOT, check=True, timeout=600)
+ relative_xml(base.with_suffix('.xml'))
+ return reports(base)
+
+
+def coverage(selected):
+ """Collect each profile or merge exactly the profiles tested in this run."""
+ metadata = json.loads((REPORT / 'profiles.json').read_text())
+ names = metadata['profiles']
+ validate(names)
+ if selected != ['--merge']:
+ if len(selected) != 1 or selected[0] not in names:
+ raise ValueError('Coverage profile was not selected for testing')
+ name = selected[0]
+ objects = BUILD / name / 'guix' / 'CMakeFiles' / 'guix.dir'
+ if not list(objects.rglob('*.gcda')):
+ raise ValueError('No executed GUIX objects: ' + name)
+ gcovr(['--object-directory', str(objects), str(objects)],
+ REPORT / 'per_configuration' / name)
+ return
+ union = set()
+ arguments = []
+ contributions = {}
+ for name in names:
+ base = REPORT / 'per_configuration' / name
+ lines = reports(base)
+ contributions[name] = len(lines)
+ union |= lines
+ arguments += ['--add-tracefile', str(base.with_suffix('.json'))]
+ complete = set(names) == set(profiles())
+ base = REPORT / ('merged' if complete else 'partial')
+ actual = gcovr(arguments, base)
+ if union != actual:
+ raise ValueError('Merged source-line denominator differs from input union')
+ metadata.update(complete=complete, source_lines=len(union), contributions=contributions)
+ (REPORT / 'profiles.json').write_text(json.dumps(metadata, indent=2))
+ if complete:
+ floors = json.loads((HERE / 'coverage_floors.json').read_text())
+ xml = ET.parse(base.with_suffix('.xml')).getroot()
+ for metric in ('line', 'branch'):
+ measured = float(xml.attrib[metric + '-rate']) * 100
+ if measured < floors[metric]:
+ raise ValueError(f'{metric} coverage {measured:.4f}% is below {floors[metric]}%')
+ else:
+ print('PARTIAL coverage: ' + ', '.join(names))
+
+
+def results(selected):
+ """Record exact JUnit counts and elapsed durations for every selected profile."""
+ summary = []
+ failed = False
+ for name in selected:
+ path = BUILD / name / (name + '.xml')
+ nonempty(path)
+ (BUILD / name / 'Testing').mkdir(exist_ok=True)
+ shutil.copyfile(path, BUILD / name / 'Testing' / 'JUnit.xml')
+ suite = ET.parse(path).getroot()
+ counts = {key: int(suite.attrib.get(key, 0)) for key in ('tests', 'failures', 'disabled', 'skipped')}
+ if counts['tests'] != len(inventory(name)):
+ raise ValueError('JUnit count does not match CTest inventory: ' + name)
+ failed |= bool(counts['failures'] or counts['disabled'] or counts['skipped'])
+ log = (BUILD / name / (name + '.txt')).read_text()
+ elapsed = re.search(r'Total Test time \(real\) =\s*([0-9.]+)', log)
+ summary.append(dict(profile=name, seconds=float(elapsed[1] if elapsed else suite.attrib['time']), **counts))
+ (BUILD / 'results.txt').write_text(json.dumps(summary, indent=2))
+ print(json.dumps(summary, indent=2))
+ if failed:
+ raise ValueError('CTest reported failing or unexecuted tests')
+
+
+if __name__ == '__main__':
+ try:
+ command, *selection = sys.argv[1:]
+ if command == 'profiles':
+ print('\n'.join(profiles()))
+ elif command in ('validate', 'audit', 'prepare', 'results'):
+ validate(selection)
+ globals()[command](selection)
+ elif command == 'coverage':
+ coverage(selection)
+ else:
+ raise ValueError('Unknown report command')
+ except (ValueError, OSError, KeyError, subprocess.SubprocessError, ET.ParseError) as error:
+ sys.exit(str(error))
diff --git a/test/guix_test/cmake/run.sh b/test/guix_test/cmake/run.sh
index b2ba56039..2b11f6653 100755
--- a/test/guix_test/cmake/run.sh
+++ b/test/guix_test/cmake/run.sh
@@ -8,14 +8,75 @@
#
# SPDX-License-Identifier: MIT
+set -euo pipefail
+cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
+export CC=gcc-14 CXX=g++-14
+export CMAKE_BUILD_PARALLEL_LEVEL=${CMAKE_BUILD_PARALLEL_LEVEL:-4}
+if [[ ${GX_CI_CONCURRENT_TESTS:-0} == 1 ]]; then
+ unset CTEST_PARALLEL_LEVEL
+else
+ export CTEST_PARALLEL_LEVEL=${CTEST_PARALLEL_LEVEL:-4}
+fi
+export CTEST_REPEAT_FAIL=1
+export TX_COVERAGE=ON
+revision=b37cd4a81a1cb8c2ebefc438220ab7f009e13362
-cd $(dirname $0)
+# Serialize checkout and dependency builds, including recursive CMake calls.
+mkdir -p build
+exec 9>build/dependency.lock
+flock -w 300 9
+fresh_checkout=false
+if [[ ! -d threadx/.git ]]; then
+ # --filter=blob:none, because only one revision is ever checked out. A full
+ # clone transfers the whole 27 MB history; blobless is under 4 MB, and the
+ # checkout below fetches just the blobs that revision needs. The 180 second
+ # budget has to cover whichever of the two it is, and it has run out.
+ timeout 180 git clone --filter=blob:none --no-checkout https://github.com/eclipse-threadx/threadx.git threadx
+ fresh_checkout=true
+fi
+if ! git -C threadx cat-file -e "$revision^{commit}"; then
+ timeout 180 git -C threadx fetch origin "$revision"
+fi
+if [[ $fresh_checkout == false && -n $(git -C threadx status --porcelain --untracked-files=no) ]]; then
+ echo 'ThreadX checkout contains local modifications.' >&2
+ exit 1
+fi
+git -C threadx checkout --quiet --detach "$revision"
+[[ $(git -C threadx rev-parse HEAD) == "$revision" ]]
+ln -sfn threadx/scripts/cmake_bootstrap.sh .run.sh
+if [[ ${1:-} == build_libs ]]; then
+ timeout 300 ./.run.sh build_libs
+ exit
+fi
+flock -u 9
+exec 9>&-
-# if threadx repo does not exist, clone it
-[ -d threadx ] ||
-git clone https://github.com/eclipse-threadx/threadx.git
-
-[ -f .run.sh ] || ln -sf threadx/scripts/cmake_bootstrap.sh .run.sh
-./.run.sh $*
-
-#!/bin/bash
+command=${1:-}
+[[ $command == build || $command == test ]] || { echo 'Usage: run.sh build|test [all|profiles...]' >&2; exit 2; }
+shift
+mapfile -t available < <(python3 report.py profiles)
+if [[ $# == 0 ]]; then
+ selected=("${available[0]}")
+elif [[ $* == all ]]; then
+ selected=("${available[@]}")
+else
+ selected=("$@")
+fi
+python3 report.py validate "${selected[@]}"
+printf '%s\n' "${selected[@]}" > "build/${command}-profiles.txt"
+status=0
+if [[ $command == build ]]; then
+ : > build/build-times.txt
+ for profile in "${selected[@]}"; do
+ start=$SECONDS
+ timeout 900 ./.run.sh build "$profile" > "build/$profile-build.txt" 2>&1 || status=$?
+ cat "build/$profile-build.txt"
+ printf '%s\t%d\n' "$profile" "$((SECONDS-start))" >> build/build-times.txt
+ done
+ python3 report.py audit "${selected[@]}" || status=$?
+else
+ python3 report.py prepare "${selected[@]}"
+ timeout 3300 ./.run.sh test "${selected[@]}" 2>&1 | tee build/test.txt || status=$?
+ python3 report.py results "${selected[@]}" || status=$?
+fi
+exit "$status"
diff --git a/test/guix_test/cmake/test_report.py b/test/guix_test/cmake/test_report.py
new file mode 100644
index 000000000..50a79f139
--- /dev/null
+++ b/test/guix_test/cmake/test_report.py
@@ -0,0 +1,156 @@
+#!/usr/bin/env python3
+# Copyright (c) 2026 Eclipse ThreadX contributors
+# SPDX-License-Identifier: MIT
+"""Regression tests for coverage artifacts and profile selection."""
+import json
+from pathlib import Path
+import tempfile
+import unittest
+from unittest import mock
+import report
+
+
+class CoverageReports(unittest.TestCase):
+ """Exercise report validation using independent minimal artifacts."""
+
+ def setUp(self):
+ """Isolate generated artifacts from real measurements."""
+ self.directory = tempfile.TemporaryDirectory()
+ self.addCleanup(self.directory.cleanup)
+ self.root = Path(self.directory.name)
+ self.patch = mock.patch.multiple(report, HERE=self.root, BUILD=self.root / 'build', REPORT=self.root / 'coverage_report')
+ self.patch.start()
+ self.addCleanup(self.patch.stop)
+
+ def artifact(self, name='one', lines=(10, 20)):
+ """Write matching JSON, Cobertura, and HTML input reports."""
+ base = report.REPORT / 'per_configuration' / name
+ base.mkdir(parents=True, exist_ok=True)
+ base.with_suffix('.json').write_text(json.dumps({'files': [{
+ 'file': 'common/src/example.c', 'lines': [{'line_number': n, 'count': 1} for n in lines]}]}))
+ base.with_suffix('.xml').write_text('.'
+ '' +
+ ''.join(f'' for n in lines) +
+ '')
+ (base / 'index.html').write_text('coverage')
+ return base
+
+ def test_missing_and_empty_formats(self):
+ """Every expected format must exist and contain data."""
+ for suffix in ('.json', '.xml', '/index.html'):
+ for missing in (True, False):
+ with self.subTest(suffix=suffix, missing=missing):
+ base = self.artifact()
+ path = Path(str(base) + suffix)
+ path.unlink() if missing else path.write_text('')
+ with self.assertRaises(ValueError):
+ report.reports(base)
+
+ def test_missing_html_detail(self):
+ """A summary cannot link to a missing source detail page."""
+ base = self.artifact()
+ (base / 'index.html').write_text('source')
+ with self.assertRaises(ValueError):
+ report.reports(base)
+
+ def test_empty_denominator(self):
+ """An empty trace must not be accepted as full coverage."""
+ with self.assertRaisesRegex(ValueError, 'Empty source-line'):
+ report.reports(self.artifact(lines=()))
+
+ def test_mismatched_xml(self):
+ """XML cannot silently omit lines present in raw JSON."""
+ base = self.artifact()
+ path = base.with_suffix('.xml')
+ path.write_text(path.read_text().replace('', ''))
+ with self.assertRaisesRegex(ValueError, 'denominators differ'):
+ report.reports(base)
+
+ def test_external_paths(self):
+ """Only repository-relative common source paths are admissible."""
+ for name in ('/common/src/example.c', 'common/src/../example.c', 'test/example.c'):
+ base = self.artifact()
+ path = base.with_suffix('.json')
+ path.write_text(path.read_text().replace('common/src/example.c', name))
+ with self.assertRaises(ValueError):
+ report.reports(base)
+
+ def test_union_and_partial_selection(self):
+ """Partial selections retain their exact union without a complete label."""
+ first = self.artifact('one', (10, 20))
+ self.artifact('two', (20, 30))
+ (report.REPORT / 'profiles.json').write_text(json.dumps({'profiles': ['one', 'two']}))
+ expected = {('common/src/example.c', line) for line in (10, 20, 30)}
+ with mock.patch.object(report, 'profiles', return_value=['one', 'two', 'three']):
+ with mock.patch.object(report, 'gcovr', return_value=expected) as collect:
+ report.coverage(['--merge'])
+ self.assertEqual(collect.call_args.args[1].name, 'partial')
+ self.assertFalse(json.loads((report.REPORT / 'profiles.json').read_text())['complete'])
+ with mock.patch.object(report, 'gcovr', return_value=report.trace_lines(first.with_suffix('.json'))):
+ with self.assertRaisesRegex(ValueError, 'differs from input union'):
+ report.coverage(['--merge'])
+
+ def test_missing_profile_aborts_merge(self):
+ """A merge cannot hide a selected profile that produced no report."""
+ self.artifact('one')
+ (report.REPORT / 'profiles.json').write_text(json.dumps({'profiles': ['one', 'two']}))
+ with mock.patch.object(report, 'profiles', return_value=['one', 'two']):
+ with mock.patch.object(report, 'gcovr') as collect:
+ with self.assertRaises(ValueError):
+ report.coverage(['--merge'])
+ collect.assert_not_called()
+
+ def test_stale_reports_and_counters(self):
+ """A subset cannot retain test or coverage artifacts from earlier profiles."""
+ stale = []
+ for name in ('one', 'two'):
+ for suffix in (name + '.xml', name + '.txt', 'Testing/JUnit.xml',
+ 'Testing/old/Test.xml', 'guix/object.gcda'):
+ path = report.BUILD / name / suffix
+ path.parent.mkdir(parents=True, exist_ok=True)
+ path.write_text('stale')
+ stale.append(path)
+ path = report.BUILD / (name + '.txt')
+ path.write_text('stale')
+ stale.append(path)
+ for name in ('results.txt', 'test.txt'):
+ path = report.BUILD / name
+ path.write_text('stale')
+ stale.append(path)
+ self.artifact('old')
+ with mock.patch.object(report, 'profiles', return_value=['one', 'two']), \
+ mock.patch.object(report, 'audit'), mock.patch.object(report, 'inventory'):
+ report.prepare(['one'])
+ self.assertTrue(all(not path.exists() for path in stale))
+ self.assertFalse((report.REPORT / 'per_configuration').exists())
+ self.assertEqual(json.loads((report.REPORT / 'profiles.json').read_text()),
+ {'profiles': ['one'], 'complete': False})
+
+ def test_complete_coverage_floors(self):
+ """Complete runs enforce line and branch floors independently."""
+ base = self.artifact('one')
+ expected = report.trace_lines(base.with_suffix('.json'))
+ (report.HERE / 'coverage_floors.json').write_text('{"line": 90, "branch": 80}')
+ (report.REPORT / 'profiles.json').write_text('{"profiles": ["one"]}')
+ with mock.patch.object(report, 'profiles', return_value=['one']), \
+ mock.patch.object(report, 'gcovr', return_value=expected):
+ for line, branch, failure in ((0.89, 1, 'line'), (1, 0.79, 'branch'), (0.9, 0.8, None)):
+ (report.REPORT / 'merged.xml').write_text(
+ f'')
+ if failure:
+ with self.assertRaisesRegex(ValueError, failure + ' coverage'):
+ report.coverage(['--merge'])
+ else:
+ report.coverage(['--merge'])
+
+ def test_profile_selection(self):
+ """Reject unknown, repeated, and empty manual selections."""
+ with mock.patch.object(report, 'profiles', return_value=['one', 'two']):
+ for selected in ([], ['unknown'], ['one', 'one']):
+ with self.assertRaises(ValueError):
+ report.validate(selected)
+ report.validate(['two'])
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/guix_test/regression_test/tests/validation_guix_animation_delete_no_output.c b/test/guix_test/regression_test/tests/validation_guix_animation_delete_no_output.c
index db3914796..ea2041d0d 100644
--- a/test/guix_test/regression_test/tests/validation_guix_animation_delete_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_animation_delete_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -83,8 +85,8 @@ GX_ANIMATION_INFO info;
EXPECT_EQ(status, GX_SUCCESS);
memset(&info, 0, sizeof(GX_ANIMATION_INFO));
- info.gx_animation_parent = &button_screen;
- info.gx_animation_target = &button_screen.button_screen_title_1;
+ info.gx_animation_parent = (GX_WIDGET *)&button_screen;
+ info.gx_animation_target = (GX_WIDGET *)&button_screen.button_screen_title_1;
info.gx_animation_start_alpha = 255;
info.gx_animation_end_alpha = 255;
info.gx_animation_start_position.gx_point_x = button_screen.gx_widget_size.gx_rectangle_left;
@@ -99,8 +101,8 @@ GX_ANIMATION_INFO info;
status = gx_system_animation_get(&animation2);
EXPECT_EQ(status, GX_SUCCESS);
- info.gx_animation_target = &button_screen.button_screen_icon_button_6;
- info.gx_animation_parent = &button_screen.button_screen_text_button_1;
+ info.gx_animation_target = (GX_WIDGET *)&button_screen.button_screen_icon_button_6;
+ info.gx_animation_parent = (GX_WIDGET *)&button_screen.button_screen_text_button_1;
status = gx_animation_start(animation2, &info);
EXPECT_EQ(status, GX_SUCCESS);
diff --git a/test/guix_test/regression_test/tests/validation_guix_binres_ext_api_no_output.c b/test/guix_test/regression_test/tests/validation_guix_binres_ext_api_no_output.c
new file mode 100644
index 000000000..a31edd4cc
--- /dev/null
+++ b/test/guix_test/regression_test/tests/validation_guix_binres_ext_api_no_output.c
@@ -0,0 +1,610 @@
+/***************************************************************************
+ * Copyright (c) 2026 Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5.5).
+ * The AI-generated portions may be considered public domain (CC0-1.0)
+ * and not subject to the project's licence. The human contributor has
+ * reviewed and verified that the code is correct.
+ *
+ * SPDX-License-Identifier: MIT and CC0-1.0
+ **************************************************************************/
+
+// Portions of this file were generated with AI assistance.
+
+/* Exercises the binary resource loaders that take the length of the resource:
+ the parameter checks of each one, a load given the true length, a load given
+ every shorter length, and the release of everything a failed load allocated. */
+
+#include
+#include
+#include "tx_api.h"
+#include "gx_api.h"
+#include "gx_validation_utility.h"
+#include "gx_system.h"
+
+TEST_PARAM test_parameter = {0};
+
+int main(int argc, char ** argv)
+{
+ /* Start ThreadX system */
+ tx_kernel_enter();
+ return(0);
+}
+
+static TX_THREAD Guix_API_Test;
+static VOID control_thread_entry(ULONG);
+static ULONG control_thread_stack[1024];
+
+VOID tx_application_define(void *first_unused_memory)
+{
+ gx_validation_application_define(first_unused_memory);
+
+ /* Termiante the test if it runs for more than 100 ticks */
+ /* This function is not implemented yet. */
+ gx_validation_watchdog_create(100);
+
+ tx_thread_create(&Guix_API_Test, "GUIX API Test", control_thread_entry,
+ 0, control_thread_stack, sizeof(control_thread_stack),
+ GX_SYSTEM_THREAD_PRIORITY + 1, GX_SYSTEM_THREAD_PRIORITY + 1,
+ TX_NO_TIME_SLICE, TX_AUTO_START);
+}
+
+/* Replace the default graphics driver with the validation driver. */
+#ifdef win32_graphics_driver_setup_24xrgb
+#undef win32_graphics_driver_setup_24xrgb
+#endif
+#define win32_graphics_driver_setup_24xrgb gx_validation_graphics_driver_setup_24xrgb
+
+#ifdef WIN32
+#undef WIN32
+#endif
+
+#include "gx_validation_wrapper.h"
+#include "demo_guix_multi_themes_16bpp.c"
+
+#define TEST_FONT_BUFFER_SIZE 32768
+
+#define EXPECT_TRUE(condition) EXPECT_EQ(1, ((condition) ? 1 : 0))
+
+static GX_UBYTE font_buffer[TEST_FONT_BUFFER_SIZE];
+static GX_CHAR path[512];
+static GX_LANGUAGE_HEADER info[8];
+static INT path_length;
+
+/* Outstanding allocations made through the counting allocator. */
+static INT outstanding_allocations = 0;
+
+/* Every allocation is followed by guard bytes, checked when it is released,
+ so a write past the end of a buffer the loader sized is caught. A request
+ for zero bytes is served, so that the loader can be driven past an
+ allocation it sizes at zero. */
+#define GUARD_SIZE 64
+#define GUARD_BYTE 0xa5
+
+static INT guard_failures = 0;
+
+static VOID *counting_allocate(ULONG size)
+{
+GX_UBYTE *memptr;
+
+ memptr = memory_allocate(size + sizeof(ULONG) + GUARD_SIZE);
+
+ if (memptr == GX_NULL)
+ {
+ return GX_NULL;
+ }
+
+ memcpy(memptr, &size, sizeof(ULONG));
+ memset(memptr + sizeof(ULONG) + size, GUARD_BYTE, GUARD_SIZE);
+ outstanding_allocations++;
+
+ return memptr + sizeof(ULONG);
+}
+
+static VOID counting_free(VOID *mem)
+{
+GX_UBYTE *memptr = (GX_UBYTE *)mem - sizeof(ULONG);
+ULONG size;
+INT index;
+
+ memcpy(&size, memptr, sizeof(ULONG));
+
+ for (index = 0; index < GUARD_SIZE; index++)
+ {
+ if (memptr[sizeof(ULONG) + size + index] != GUARD_BYTE)
+ {
+ guard_failures++;
+ break;
+ }
+ }
+
+ outstanding_allocations--;
+ memory_free(memptr);
+}
+
+/* Reads a whole file into memory from the pool, returning its length. */
+static GX_UBYTE *test_file_load(GX_CONST GX_CHAR *path, ULONG *size)
+{
+FILE *p_file;
+long total_length;
+GX_UBYTE *address = GX_NULL;
+
+ *size = 0;
+ p_file = fopen(path, "rb");
+
+ if (!p_file)
+ {
+ printf("Cannot open file:%s\n", path);
+ return GX_NULL;
+ }
+
+ fseek(p_file, 0, SEEK_END);
+ total_length = ftell(p_file);
+ fseek(p_file, 0, SEEK_SET);
+
+ if (total_length > 0)
+ {
+ address = memory_allocate((ULONG)total_length);
+
+ if (address && (fread(address, 1, (size_t)total_length, p_file) == (size_t)total_length))
+ {
+ *size = (ULONG)total_length;
+ }
+ }
+
+ fclose(p_file);
+
+ return address;
+}
+
+/* Loads the first theme of a resource at every length short of it, or short of
+ limit when limit is not zero, and returns the number of loads that broke the
+ rule that a loader fails below some length and succeeds at every length from
+ there up, or leaked. */
+static INT theme_truncation_sweep(GX_CONST GX_CHAR *file, ULONG limit)
+{
+INT failures = 0;
+GX_UBYTE *root;
+ULONG root_size;
+ULONG size;
+ULONG threshold = 0;
+UINT loaded;
+GX_THEME *loaded_theme;
+
+ strcpy(path + path_length, file);
+ root = test_file_load(path, &root_size);
+
+ if (root == GX_NULL)
+ {
+ return 1;
+ }
+
+ if ((limit == 0) || (limit > root_size))
+ {
+ limit = root_size;
+ }
+
+ for (size = 1; size < limit; size++)
+ {
+ loaded_theme = GX_NULL;
+ loaded = (gx_binres_theme_load_ext(root, size, 0, &loaded_theme) == GX_SUCCESS);
+ threshold = ((threshold == 0) && loaded) ? size : threshold;
+
+ if (loaded)
+ {
+ counting_free(loaded_theme);
+ }
+
+ if ((loaded != (threshold != 0)) || (outstanding_allocations != 0))
+ {
+ failures++;
+ }
+ }
+
+ memory_free(root);
+
+ return failures;
+}
+
+/* Loads the first theme of a resource with each of its bytes in turn replaced
+ by 0x00 and by 0xff, and returns the number of loads that leaked. Whatever a
+ corrupted resource makes the loader decide, it must release what it took. */
+static INT theme_mutation_sweep(GX_CONST GX_CHAR *file)
+{
+INT failures = 0;
+GX_UBYTE *root;
+ULONG root_size;
+ULONG position;
+GX_UBYTE original;
+GX_UBYTE value;
+INT pass;
+GX_THEME *loaded_theme;
+
+ strcpy(path + path_length, file);
+ root = test_file_load(path, &root_size);
+
+ if (root == GX_NULL)
+ {
+ return 1;
+ }
+
+ for (position = 0; position < root_size; position++)
+ {
+ original = root[position];
+
+ for (pass = 0; pass < 2; pass++)
+ {
+ value = (pass == 0) ? 0x00 : 0xff;
+
+ if (value == original)
+ {
+ continue;
+ }
+
+ root[position] = value;
+ loaded_theme = GX_NULL;
+
+ if (gx_binres_theme_load_ext(root, root_size, 0, &loaded_theme) == GX_SUCCESS)
+ {
+ counting_free(loaded_theme);
+ }
+
+ if (outstanding_allocations != 0)
+ {
+ failures++;
+ outstanding_allocations = 0;
+ }
+ }
+
+ root[position] = original;
+ }
+
+ memory_free(root);
+
+ return failures;
+}
+
+/* Loads a language table through the entry points that take no length, which
+ bound the resource by the size its header declares, at every declared size
+ short of the resource. The GX_STRING table reads every byte of its resource,
+ so it may never succeed. The char table does not read the padding at the
+ end, so it fails below some size and succeeds from there up. None may leak. */
+static INT language_declared_size_sweep(GX_UBYTE *root, ULONG root_size)
+{
+INT failures = 0;
+ULONG declared;
+ULONG threshold = 0;
+UINT loaded;
+GX_STRING **string_table;
+GX_UBYTE ***char_table;
+
+ for (declared = 1; declared < root_size - GX_RESOURCE_HEADER_SIZE; declared++)
+ {
+ /* The declared size is the last field of the resource header. */
+ root[16] = (GX_UBYTE)declared;
+ root[17] = (GX_UBYTE)(declared >> 8);
+ root[18] = (GX_UBYTE)(declared >> 16);
+ root[19] = (GX_UBYTE)(declared >> 24);
+
+ if (gx_binres_language_table_load_ext(root, &string_table) == GX_SUCCESS)
+ {
+ counting_free(string_table);
+ failures++;
+ }
+#if defined(GX_ENABLE_DEPRECATED_STRING_API)
+ loaded = (gx_binres_language_table_load(root, &char_table) == GX_SUCCESS);
+ threshold = ((threshold == 0) && loaded) ? declared : threshold;
+
+ if (loaded)
+ {
+ counting_free(char_table);
+ }
+
+ if (loaded != (threshold != 0))
+ {
+ failures++;
+ }
+#else
+ GX_PARAMETER_NOT_USED(char_table);
+ GX_PARAMETER_NOT_USED(loaded);
+ GX_PARAMETER_NOT_USED(threshold);
+#endif
+
+ if (outstanding_allocations != 0)
+ {
+ failures++;
+ }
+ }
+
+ return failures;
+}
+
+static VOID control_thread_entry(ULONG input)
+{
+int failed_tests = 0;
+UINT status;
+GX_UBYTE *themes_root;
+ULONG themes_size;
+GX_UBYTE *language_root;
+ULONG language_size;
+GX_UBYTE *bad_header_root;
+GX_UBYTE *old_language_root;
+ULONG old_language_size;
+ULONG bad_header_size;
+GX_UBYTE *font_root;
+ULONG font_size;
+GX_UBYTE *pixelmap_root;
+ULONG pixelmap_size;
+ULONG buffer_size;
+ULONG required_size;
+GX_THEME *loaded_theme;
+GX_STRING **loaded_table;
+GX_VALUE count;
+GX_PIXELMAP pixelmap;
+ULONG size;
+INT theme_id;
+ULONG threshold[5];
+UINT loaded;
+UINT map_index;
+#ifndef GX_DISABLE_ERROR_CHECKING
+GX_UBYTE *dummy = (GX_UBYTE *)0x60000;
+#endif
+
+ /* The loaders run with GUIX idle, so that every allocation and release
+ made while the counting allocator is installed is the loader's. */
+ tx_thread_suspend(&_gx_system_thread);
+
+ gx_validation_extract_path(__FILE__, path, &path_length);
+
+ strcpy(path + path_length, "..//..//..//example_internal//multi_themes_16bpp//multi_themes_16bpp_resources.bin");
+ themes_root = test_file_load(path, &themes_size);
+ EXPECT_TRUE(themes_size != 0);
+
+ strcpy(path + path_length, "..//..//..//example_internal//multi_themes_16bpp//Japanese.bin");
+ language_root = test_file_load(path, &language_size);
+ EXPECT_TRUE(language_size != 0);
+
+ strcpy(path + path_length, "..//..//..//example_internal//multi_themes_16bpp//binary_files_for_regression//English_invalid_language_resource_header.bin");
+ bad_header_root = test_file_load(path, &bad_header_size);
+ EXPECT_TRUE(bad_header_size != 0);
+
+ strcpy(path + path_length, "..//..//..//example_internal//standalone_binres_load_16bpp//font_4bpp.bin");
+ font_root = test_file_load(path, &font_size);
+ EXPECT_TRUE(font_size != 0);
+
+ /* Four pixelmaps, so the offset table is read. */
+ strcpy(path + path_length, "..//..//..//example_internal//standalone_binres_load_16bpp//pixelmap_565rgb.bin");
+ pixelmap_root = test_file_load(path, &pixelmap_size);
+ EXPECT_TRUE(pixelmap_size != 0);
+
+#ifndef GX_DISABLE_ERROR_CHECKING
+
+ /* The _gxe_ wrappers raise these, and error checking compiles them out,
+ so without it a null argument reaches the loader itself. */
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_theme_load_ext(GX_NULL, themes_size, 0, &loaded_theme));
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_theme_load_ext(dummy, themes_size, 0, GX_NULL));
+ EXPECT_EQ(GX_INVALID_VALUE, gx_binres_theme_load_ext(dummy, themes_size, -1, &loaded_theme));
+ EXPECT_EQ(GX_INVALID_SIZE, gx_binres_theme_load_ext(dummy, 0, 0, &loaded_theme));
+
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_language_table_load_ext2(GX_NULL, language_size, &loaded_table));
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_language_table_load_ext2(dummy, language_size, GX_NULL));
+ EXPECT_EQ(GX_INVALID_SIZE, gx_binres_language_table_load_ext2(dummy, 0, &loaded_table));
+
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_language_count_get_ext(GX_NULL, language_size, &count));
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_language_count_get_ext(dummy, language_size, GX_NULL));
+ EXPECT_EQ(GX_INVALID_SIZE, gx_binres_language_count_get_ext(dummy, 0, &count));
+
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_language_info_load_ext(GX_NULL, language_size, info));
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_language_info_load_ext(dummy, language_size, GX_NULL));
+ EXPECT_EQ(GX_INVALID_SIZE, gx_binres_language_info_load_ext(dummy, 0, info));
+
+ buffer_size = TEST_FONT_BUFFER_SIZE;
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_font_load_ext(GX_NULL, font_size, 0, font_buffer, &buffer_size));
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_font_load_ext(dummy, font_size, 0, font_buffer, GX_NULL));
+ EXPECT_EQ(GX_INVALID_SIZE, gx_binres_font_load_ext(dummy, 0, 0, font_buffer, &buffer_size));
+
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_pixelmap_load_ext(GX_NULL, pixelmap_size, 0, &pixelmap));
+ EXPECT_EQ(GX_PTR_ERROR, gx_binres_pixelmap_load_ext(dummy, pixelmap_size, 0, GX_NULL));
+ EXPECT_EQ(GX_INVALID_SIZE, gx_binres_pixelmap_load_ext(dummy, 0, 0, &pixelmap));
+
+ /* The two loaders that allocate refuse to run without an allocator and a
+ release function. */
+ gx_system_memory_allocator_set(GX_NULL, counting_free);
+ EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, gx_binres_theme_load_ext(dummy, themes_size, 0, &loaded_theme));
+ EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, gx_binres_language_table_load_ext2(dummy, language_size, &loaded_table));
+
+ gx_system_memory_allocator_set(counting_allocate, GX_NULL);
+ EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, gx_binres_theme_load_ext(dummy, themes_size, 0, &loaded_theme));
+ EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, gx_binres_language_table_load_ext2(dummy, language_size, &loaded_table));
+
+#endif
+
+ gx_system_memory_allocator_set(counting_allocate, counting_free);
+
+ /* A load given the true length succeeds. */
+ loaded_theme = GX_NULL;
+ EXPECT_EQ(GX_SUCCESS, gx_binres_theme_load_ext(themes_root, themes_size, 0, &loaded_theme));
+ EXPECT_TRUE(loaded_theme != GX_NULL);
+ if (loaded_theme)
+ {
+ counting_free(loaded_theme);
+ }
+ EXPECT_EQ(0, outstanding_allocations);
+
+ loaded_table = GX_NULL;
+ EXPECT_EQ(GX_SUCCESS, gx_binres_language_table_load_ext2(language_root, language_size, &loaded_table));
+ EXPECT_TRUE(loaded_table != GX_NULL);
+ if (loaded_table)
+ {
+ counting_free(loaded_table);
+ }
+ EXPECT_EQ(0, outstanding_allocations);
+
+ count = 0;
+ EXPECT_EQ(GX_SUCCESS, gx_binres_language_count_get_ext(language_root, language_size, &count));
+ EXPECT_EQ(1, count);
+ EXPECT_EQ(GX_SUCCESS, gx_binres_language_info_load_ext(language_root, language_size, info));
+
+ buffer_size = TEST_FONT_BUFFER_SIZE;
+ EXPECT_EQ(GX_SUCCESS, gx_binres_font_load_ext(font_root, font_size, 0, font_buffer, &buffer_size));
+
+ for (map_index = 0; map_index < 4; map_index++)
+ {
+ EXPECT_EQ(GX_SUCCESS, gx_binres_pixelmap_load_ext(pixelmap_root, pixelmap_size, map_index, &pixelmap));
+ }
+ EXPECT_EQ(GX_NOT_FOUND, gx_binres_pixelmap_load_ext(pixelmap_root, pixelmap_size, 4, &pixelmap));
+
+ /* A font buffer too small for the font is refused, and told the size it needs. */
+ buffer_size = TEST_FONT_BUFFER_SIZE;
+ EXPECT_EQ(GX_SUCCESS, gx_binres_font_load_ext(font_root, font_size, 0, font_buffer, &buffer_size));
+ required_size = 1;
+ EXPECT_EQ(GX_INVALID_MEMORY_SIZE, gx_binres_font_load_ext(font_root, font_size, 0, font_buffer, &required_size));
+ EXPECT_TRUE((required_size > 1) && (required_size <= TEST_FONT_BUFFER_SIZE));
+
+ /* A resource whose header carries the wrong magic number is refused. */
+ EXPECT_EQ(GX_INVALID_FORMAT, gx_binres_language_count_get_ext(bad_header_root, bad_header_size, &count));
+ EXPECT_EQ(GX_INVALID_FORMAT, gx_binres_language_info_load_ext(bad_header_root, bad_header_size, info));
+ EXPECT_EQ(GX_INVALID_FORMAT, gx_binres_language_table_load_ext2(bad_header_root, bad_header_size, &loaded_table));
+ EXPECT_EQ(0, outstanding_allocations);
+
+ /* Every length short of the resource. A loader refuses a resource cut
+ short of the data it reads, so each one fails below some length and
+ succeeds at every length from there up; a failed load leaves nothing
+ allocated. The language table reads every byte of its resource, so it
+ fails at every shorter length. */
+ memset(threshold, 0, sizeof(threshold));
+
+ for (size = 1; size < language_size; size++)
+ {
+ loaded = (gx_binres_language_count_get_ext(language_root, size, &count) == GX_SUCCESS);
+ threshold[0] = ((threshold[0] == 0) && loaded) ? size : threshold[0];
+ EXPECT_EQ((threshold[0] != 0), loaded);
+
+ loaded = (gx_binres_language_info_load_ext(language_root, size, info) == GX_SUCCESS);
+ threshold[1] = ((threshold[1] == 0) && loaded) ? size : threshold[1];
+ EXPECT_EQ((threshold[1] != 0), loaded);
+
+ EXPECT_TRUE(gx_binres_language_table_load_ext2(language_root, size, &loaded_table) != GX_SUCCESS);
+ EXPECT_EQ(0, outstanding_allocations);
+ }
+
+ for (size = 1; size < font_size; size++)
+ {
+ buffer_size = TEST_FONT_BUFFER_SIZE;
+ loaded = (gx_binres_font_load_ext(font_root, size, 0, font_buffer, &buffer_size) == GX_SUCCESS);
+ threshold[2] = ((threshold[2] == 0) && loaded) ? size : threshold[2];
+ EXPECT_EQ((threshold[2] != 0), loaded);
+ }
+
+ for (size = 1; size < pixelmap_size; size++)
+ {
+ loaded = (gx_binres_pixelmap_load_ext(pixelmap_root, size, 3, &pixelmap) == GX_SUCCESS);
+ threshold[3] = ((threshold[3] == 0) && loaded) ? size : threshold[3];
+ EXPECT_EQ((threshold[3] != 0), loaded);
+ }
+
+ for (size = 1; size < themes_size; size += ((size < 4096) ? 1 : 509))
+ {
+ loaded_theme = GX_NULL;
+ loaded = (gx_binres_theme_load_ext(themes_root, size, 0, &loaded_theme) == GX_SUCCESS);
+ threshold[4] = ((threshold[4] == 0) && loaded) ? size : threshold[4];
+ EXPECT_EQ((threshold[4] != 0), loaded);
+
+ if (loaded)
+ {
+ counting_free(loaded_theme);
+ }
+ EXPECT_EQ(0, outstanding_allocations);
+ }
+
+ /* A header alone loads nothing. */
+ EXPECT_TRUE((threshold[0] == 0) || (threshold[0] > 20));
+ EXPECT_TRUE((threshold[1] == 0) || (threshold[1] > 20));
+ EXPECT_TRUE((threshold[2] == 0) || (threshold[2] > 8));
+ EXPECT_TRUE((threshold[3] == 0) || (threshold[3] > 24));
+ EXPECT_TRUE((threshold[4] == 0) || (threshold[4] > 20));
+
+ /* A theme past the last one is refused before anything is allocated. */
+ for (theme_id = 0; theme_id < 16; theme_id++)
+ {
+ loaded_theme = GX_NULL;
+ status = gx_binres_theme_load_ext(themes_root, themes_size, theme_id, &loaded_theme);
+
+ if (status != GX_SUCCESS)
+ {
+ break;
+ }
+
+ counting_free(loaded_theme);
+ }
+ EXPECT_EQ(2, theme_id);
+ EXPECT_EQ(GX_INVALID_VALUE, status);
+ EXPECT_TRUE(loaded_theme == GX_NULL);
+ EXPECT_EQ(0, outstanding_allocations);
+
+ loaded_theme = GX_NULL;
+ EXPECT_EQ(GX_INVALID_VALUE, gx_binres_theme_load_ext(themes_root, themes_size, 1000, &loaded_theme));
+ EXPECT_TRUE(loaded_theme == GX_NULL);
+ EXPECT_EQ(0, outstanding_allocations);
+
+ /* A font-only theme, a theme with compressed glyphs and a theme with a
+ palette, cut short at every length. */
+ EXPECT_EQ(0, theme_truncation_sweep("..//..//..//example_internal//multi_themes_16bpp//binary_files_for_regression//theme_4_no_pixelmap.bin", 0));
+ EXPECT_EQ(0, theme_truncation_sweep("..//..//..//example_internal//multi_themes_16bpp//binary_files_for_regression//theme_4_invalid_compressed_glyph_magic_number.bin", 0));
+ EXPECT_EQ(0, theme_truncation_sweep("..//..//..//example_internal//multi_themes_16bpp//binary_files_for_regression//theme_4_invalid_palette_magic_number.bin", 0));
+
+ /* Themes whose color and palette tables are not followed by font data, so
+ the sizing pass never reads past them; a theme with pixelmaps; and fonts
+ of many pages. The larger resources are swept over the tables that
+ precede their pixelmap data. */
+ EXPECT_EQ(0, theme_truncation_sweep("..//..//..//example_internal//multi_themes_16bpp//binary_files_for_regression//theme_4_invalid_theme_pixelmap_font_data_size.bin", 1024));
+ EXPECT_EQ(0, theme_truncation_sweep("..//..//..//example_internal//multi_themes_16bpp//binary_files_for_regression//theme_4_invalid_palette_color_count.bin", 2048));
+ EXPECT_EQ(0, theme_truncation_sweep("..//..//..//example_internal//two_displays_binres//two_displays_binres_MAIN_DISPLAY_resources.bin", 0));
+ EXPECT_EQ(0, theme_truncation_sweep("..//..//..//example_internal//multi_themes_16bpp//binary_files_for_regression//theme_5_font_pages_5460.bin", 46000));
+
+ /* The same themes with each byte corrupted in turn. */
+ EXPECT_EQ(0, theme_mutation_sweep("..//..//..//example_internal//multi_themes_16bpp//binary_files_for_regression//theme_4_no_pixelmap.bin"));
+ EXPECT_EQ(0, theme_mutation_sweep("..//..//..//example_internal//multi_themes_16bpp//binary_files_for_regression//theme_4_invalid_palette_magic_number.bin"));
+
+ /* A resource whose header carries the wrong magic number is refused before
+ anything is allocated. */
+ strcpy(path + path_length, "..//..//..//example_internal//multi_themes_16bpp//binary_files_for_regression//theme_4_invalid_res_magic_number.bin");
+ bad_header_root = test_file_load(path, &bad_header_size);
+ EXPECT_EQ(GX_INVALID_FORMAT, gx_binres_theme_load_ext(bad_header_root, bad_header_size, 0, &loaded_theme));
+ EXPECT_EQ(0, outstanding_allocations);
+
+ /* A resource from before strings carried their length, whose strings are
+ found by scanning for their terminators. */
+ strcpy(path + path_length, "..//..//..//example_internal//multi_themes_16bpp//Japanese_5_5_1.bin");
+ old_language_root = test_file_load(path, &old_language_size);
+ EXPECT_TRUE(old_language_size != 0);
+ EXPECT_EQ(0, language_declared_size_sweep(old_language_root, old_language_size));
+
+ /* A declared size of zero leaves the extent unknown, and one that cannot be
+ added to the header size is refused. */
+ EXPECT_EQ(0, language_declared_size_sweep(language_root, language_size));
+ memset(language_root + 16, 0, 4);
+ EXPECT_EQ(GX_SUCCESS, gx_binres_language_count_get(language_root, &count));
+ memset(language_root + 16, 0xff, 4);
+ EXPECT_EQ(GX_MATH_OVERFLOW, gx_binres_language_count_get(language_root, &count));
+
+ EXPECT_EQ(0, guard_failures);
+
+ gx_system_memory_allocator_set(memory_allocate, memory_free);
+ tx_thread_resume(&_gx_system_thread);
+
+ if(failed_tests == 0)
+ {
+ printf("Guix Test: guix_binres_ext_api_no_output...............................................Success!\n");
+ exit(0);
+ }
+ else
+ {
+ printf("Guix Test: guix_binres_ext_api_no_output................................................Failed!\n");
+ exit(1);
+ }
+}
diff --git a/test/guix_test/regression_test/tests/validation_guix_binres_font_glyph_range_ex_unicode_no_output.c b/test/guix_test/regression_test/tests/validation_guix_binres_font_glyph_range_ex_unicode_no_output.c
new file mode 100644
index 000000000..00c0f4bbe
--- /dev/null
+++ b/test/guix_test/regression_test/tests/validation_guix_binres_font_glyph_range_ex_unicode_no_output.c
@@ -0,0 +1,83 @@
+/***************************************************************************
+ * Copyright (c) 2026 Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5).
+ * The AI-generated portions may be considered public domain (CC0-1.0)
+ * and not subject to the project's licence. The human contributor has
+ * reviewed and verified that the code is correct.
+ *
+ * SPDX-License-Identifier: MIT and CC0-1.0
+ **************************************************************************/
+
+/* Glyph range and glyph buffer bounds in the binary resource font loader, in
+ the extended Unicode configuration. A 32-bit character code is what lets a
+ page declare a span wide enough for the reservation multiply to wrap, so the
+ reported chain is only reachable in a build like this one.
+
+ The cases themselves live in gx_validation_binres_glyph_range.h, which each
+ font configuration runs in turn. */
+
+#include
+#include "tx_api.h"
+#include "gx_api.h"
+#include "gx_validation_utility.h"
+#include "gx_system.h"
+
+TEST_PARAM test_parameter = {0};
+
+int main(int argc, char ** argv)
+{
+ /* Start ThreadX system */
+ tx_kernel_enter();
+ return(0);
+}
+
+static TX_THREAD Guix_API_Test;
+static VOID control_thread_entry(ULONG);
+static ULONG control_thread_stack[1024];
+
+VOID tx_application_define(void *first_unused_memory)
+{
+ gx_validation_application_define(first_unused_memory);
+
+ /* Termiante the test if it runs for more than 100 ticks */
+ /* This function is not implemented yet. */
+ gx_validation_watchdog_create(100);
+
+ tx_thread_create(&Guix_API_Test, "GUIX API Test", control_thread_entry,
+ 0, control_thread_stack, sizeof(control_thread_stack),
+ GX_SYSTEM_THREAD_PRIORITY + 1, GX_SYSTEM_THREAD_PRIORITY + 1,
+ TX_NO_TIME_SLICE, TX_AUTO_START);
+}
+
+/* Replace the default graphics driver with the validation driver. */
+#ifdef win32_graphics_driver_setup_24xrgb
+#undef win32_graphics_driver_setup_24xrgb
+#endif
+#define win32_graphics_driver_setup_24xrgb gx_validation_graphics_driver_setup_24xrgb
+
+#ifdef WIN32
+#undef WIN32
+#endif
+
+#include "gx_validation_wrapper.h"
+#include "demo_guix_standalone_binres_load_extended_unicode_32bpp.c"
+#include "gx_validation_binres_glyph_range.h"
+
+static VOID control_thread_entry(ULONG input)
+{
+ if (gx_validation_binres_glyph_range_run() == 0)
+ {
+ printf("Guix Test: guix_binres_font_glyph_range_ex_unicode_no_output.........................................Success!\n");
+ exit(0);
+ }
+ else
+ {
+ printf("Guix Test: guix_binres_font_glyph_range_ex_unicode_no_output..........................................Failed!\n");
+ exit(1);
+ }
+}
diff --git a/test/guix_test/regression_test/tests/validation_guix_binres_font_glyph_range_kerning_no_output.c b/test/guix_test/regression_test/tests/validation_guix_binres_font_glyph_range_kerning_no_output.c
new file mode 100644
index 000000000..3ed1f18e3
--- /dev/null
+++ b/test/guix_test/regression_test/tests/validation_guix_binres_font_glyph_range_kerning_no_output.c
@@ -0,0 +1,82 @@
+/***************************************************************************
+ * Copyright (c) 2026 Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5).
+ * The AI-generated portions may be considered public domain (CC0-1.0)
+ * and not subject to the project's licence. The human contributor has
+ * reviewed and verified that the code is correct.
+ *
+ * SPDX-License-Identifier: MIT and CC0-1.0
+ **************************************************************************/
+
+/* Glyph range and glyph buffer bounds in the binary resource font loader, in
+ the kerning configuration. The kerning glyph format reserves and writes
+ through code that no other configuration compiles.
+
+ The cases themselves live in gx_validation_binres_glyph_range.h, which each
+ font configuration runs in turn. */
+
+#include
+#include "tx_api.h"
+#include "gx_api.h"
+#include "gx_validation_utility.h"
+#include "gx_system.h"
+
+TEST_PARAM test_parameter = {0};
+
+int main(int argc, char ** argv)
+{
+ /* Start ThreadX system */
+ tx_kernel_enter();
+ return(0);
+}
+
+static TX_THREAD Guix_API_Test;
+static VOID control_thread_entry(ULONG);
+static ULONG control_thread_stack[1024];
+
+VOID tx_application_define(void *first_unused_memory)
+{
+ gx_validation_application_define(first_unused_memory);
+
+ /* Termiante the test if it runs for more than 100 ticks */
+ /* This function is not implemented yet. */
+ gx_validation_watchdog_create(100);
+
+ tx_thread_create(&Guix_API_Test, "GUIX API Test", control_thread_entry,
+ 0, control_thread_stack, sizeof(control_thread_stack),
+ GX_SYSTEM_THREAD_PRIORITY + 1, GX_SYSTEM_THREAD_PRIORITY + 1,
+ TX_NO_TIME_SLICE, TX_AUTO_START);
+}
+
+/* Replace the default graphics driver with the validation driver. */
+#ifdef win32_graphics_driver_setup_24xrgb
+#undef win32_graphics_driver_setup_24xrgb
+#endif
+#define win32_graphics_driver_setup_24xrgb gx_validation_graphics_driver_setup_24xrgb
+
+#ifdef WIN32
+#undef WIN32
+#endif
+
+#include "gx_validation_wrapper.h"
+#include "demo_kerning_glyph_draw_32bpp_screen.c"
+#include "gx_validation_binres_glyph_range.h"
+
+static VOID control_thread_entry(ULONG input)
+{
+ if (gx_validation_binres_glyph_range_run() == 0)
+ {
+ printf("Guix Test: guix_binres_font_glyph_range_kerning_no_output.........................................Success!\n");
+ exit(0);
+ }
+ else
+ {
+ printf("Guix Test: guix_binres_font_glyph_range_kerning_no_output..........................................Failed!\n");
+ exit(1);
+ }
+}
diff --git a/test/guix_test/regression_test/tests/validation_guix_binres_font_glyph_range_no_output.c b/test/guix_test/regression_test/tests/validation_guix_binres_font_glyph_range_no_output.c
new file mode 100644
index 000000000..c6ef0a517
--- /dev/null
+++ b/test/guix_test/regression_test/tests/validation_guix_binres_font_glyph_range_no_output.c
@@ -0,0 +1,81 @@
+/***************************************************************************
+ * Copyright (c) 2026 Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5).
+ * The AI-generated portions may be considered public domain (CC0-1.0)
+ * and not subject to the project's licence. The human contributor has
+ * reviewed and verified that the code is correct.
+ *
+ * SPDX-License-Identifier: MIT and CC0-1.0
+ **************************************************************************/
+
+/* Glyph range and glyph buffer bounds in the binary resource font loader, in
+ the default font configuration.
+
+ The cases themselves live in gx_validation_binres_glyph_range.h, which each
+ font configuration runs in turn. */
+
+#include
+#include "tx_api.h"
+#include "gx_api.h"
+#include "gx_validation_utility.h"
+#include "gx_system.h"
+
+TEST_PARAM test_parameter = {0};
+
+int main(int argc, char ** argv)
+{
+ /* Start ThreadX system */
+ tx_kernel_enter();
+ return(0);
+}
+
+static TX_THREAD Guix_API_Test;
+static VOID control_thread_entry(ULONG);
+static ULONG control_thread_stack[1024];
+
+VOID tx_application_define(void *first_unused_memory)
+{
+ gx_validation_application_define(first_unused_memory);
+
+ /* Termiante the test if it runs for more than 100 ticks */
+ /* This function is not implemented yet. */
+ gx_validation_watchdog_create(100);
+
+ tx_thread_create(&Guix_API_Test, "GUIX API Test", control_thread_entry,
+ 0, control_thread_stack, sizeof(control_thread_stack),
+ GX_SYSTEM_THREAD_PRIORITY + 1, GX_SYSTEM_THREAD_PRIORITY + 1,
+ TX_NO_TIME_SLICE, TX_AUTO_START);
+}
+
+/* Replace the default graphics driver with the validation driver. */
+#ifdef win32_graphics_driver_setup_24xrgb
+#undef win32_graphics_driver_setup_24xrgb
+#endif
+#define win32_graphics_driver_setup_24xrgb gx_validation_graphics_driver_setup_24xrgb
+
+#ifdef WIN32
+#undef WIN32
+#endif
+
+#include "gx_validation_wrapper.h"
+#include "demo_guix_multi_themes_16bpp.c"
+#include "gx_validation_binres_glyph_range.h"
+
+static VOID control_thread_entry(ULONG input)
+{
+ if (gx_validation_binres_glyph_range_run() == 0)
+ {
+ printf("Guix Test: guix_binres_font_glyph_range_no_output.........................................Success!\n");
+ exit(0);
+ }
+ else
+ {
+ printf("Guix Test: guix_binres_font_glyph_range_no_output..........................................Failed!\n");
+ exit(1);
+ }
+}
diff --git a/test/guix_test/regression_test/tests/validation_guix_binres_language_info_get_no_output.c b/test/guix_test/regression_test/tests/validation_guix_binres_language_info_get_no_output.c
index a8bb147e4..6278712de 100644
--- a/test/guix_test/regression_test/tests/validation_guix_binres_language_info_get_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_binres_language_info_get_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_binres_loader.h"
#include "gx_validation_utility.h"
#include "gx_system.h"
@@ -120,16 +123,16 @@ INT pathlen;
gx_validation_extract_path(__FILE__, binres_file, &pathlen);
- status = gx_binres_language_count_get(GX_NULL, &count);
+ status = _gxe_binres_language_count_get(GX_NULL, &count);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_binres_language_count_get((GX_UBYTE *)0x60000, GX_NULL);
+ status = _gxe_binres_language_count_get((GX_UBYTE *)0x60000, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_binres_language_info_load(GX_NULL, &info);
+ status = _gxe_binres_language_info_load(GX_NULL, &info);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_binres_language_info_load((GX_UBYTE *)0x60000, GX_NULL);
+ status = _gxe_binres_language_info_load((GX_UBYTE *)0x60000, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
for(index = 0; index < BINRES_TEST_SIZE; index++)
@@ -164,11 +167,11 @@ INT pathlen;
if(index != BINRES_INVALID_LANGUAGE_HEADER)
{
- status = gx_binres_language_count_get(test_binres_root_address, &count);
+ status = _gxe_binres_language_count_get(test_binres_root_address, &count);
EXPECT_EQ(expected_status, status);
}
- status = gx_binres_language_info_load(test_binres_root_address, &info);
+ status = _gxe_binres_language_info_load(test_binres_root_address, &info);
EXPECT_EQ(expected_status, status);
}
diff --git a/test/guix_test/regression_test/tests/validation_guix_binres_language_table_load_no_output.c b/test/guix_test/regression_test/tests/validation_guix_binres_language_table_load_no_output.c
index f2654978f..72a71684f 100644
--- a/test/guix_test/regression_test/tests/validation_guix_binres_language_table_load_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_binres_language_table_load_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_binres_loader.h"
#include "gx_validation_utility.h"
#include "gx_system.h"
@@ -59,18 +62,18 @@ UINT status;
GX_STRING **language_table;
GX_UBYTE *root_address = (GX_UBYTE *)0x6000000;
- status = gx_binres_language_table_load_ext(GX_NULL, &language_table);
+ status = _gxe_binres_language_table_load_ext(GX_NULL, &language_table);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_binres_language_table_load_ext(root_address, GX_NULL);
+ status = _gxe_binres_language_table_load_ext(root_address, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
gx_system_memory_allocator_set(rotate_memory_allocate, GX_NULL);
- status = gx_binres_language_table_load_ext(root_address, &language_table);
+ status = _gxe_binres_language_table_load_ext(root_address, &language_table);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
gx_system_memory_allocator_set(GX_NULL, rotate_memory_free);
- status = gx_binres_language_table_load_ext(root_address, &language_table);
+ status = _gxe_binres_language_table_load_ext(root_address, &language_table);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_binres_theme_id_bound_no_output.c b/test/guix_test/regression_test/tests/validation_guix_binres_theme_id_bound_no_output.c
new file mode 100644
index 000000000..fc8260034
--- /dev/null
+++ b/test/guix_test/regression_test/tests/validation_guix_binres_theme_id_bound_no_output.c
@@ -0,0 +1,213 @@
+/***************************************************************************
+ * Copyright (c) 2026 Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5.5).
+ * The AI-generated portions may be considered public domain (CC0-1.0)
+ * and not subject to the project's licence. The human contributor has
+ * reviewed and verified that the code is correct.
+ *
+ * SPDX-License-Identifier: MIT and CC0-1.0
+ **************************************************************************/
+
+/* Loads themes by id from a resource that declares two, through an allocator
+ that serves a request for zero bytes, as malloc() does, and guards the end
+ of every allocation. A theme the resource does not hold must be refused
+ before anything is allocated or written. */
+
+#include
+#include
+#include "tx_api.h"
+#include "gx_api.h"
+#include "gx_validation_utility.h"
+#include "gx_system.h"
+
+TEST_PARAM test_parameter = {0};
+
+int main(int argc, char ** argv)
+{
+ /* Start ThreadX system */
+ tx_kernel_enter();
+ return(0);
+}
+
+static TX_THREAD Guix_API_Test;
+static VOID control_thread_entry(ULONG);
+static ULONG control_thread_stack[1024];
+
+VOID tx_application_define(void *first_unused_memory)
+{
+ gx_validation_application_define(first_unused_memory);
+
+ /* Termiante the test if it runs for more than 100 ticks */
+ /* This function is not implemented yet. */
+ gx_validation_watchdog_create(100);
+
+ tx_thread_create(&Guix_API_Test, "GUIX API Test", control_thread_entry,
+ 0, control_thread_stack, sizeof(control_thread_stack),
+ GX_SYSTEM_THREAD_PRIORITY + 1, GX_SYSTEM_THREAD_PRIORITY + 1,
+ TX_NO_TIME_SLICE, TX_AUTO_START);
+}
+
+/* Replace the default graphics driver with the validation driver. */
+#ifdef win32_graphics_driver_setup_24xrgb
+#undef win32_graphics_driver_setup_24xrgb
+#endif
+#define win32_graphics_driver_setup_24xrgb gx_validation_graphics_driver_setup_24xrgb
+
+#ifdef WIN32
+#undef WIN32
+#endif
+
+#include "gx_validation_wrapper.h"
+#include "demo_guix_multi_themes_16bpp.c"
+
+#define GUARD_SIZE 64
+#define GUARD_BYTE 0xa5
+
+static INT outstanding_allocations = 0;
+static INT guard_failures = 0;
+
+/* Each allocation carries its size in front and guard bytes behind, and a
+ request for zero bytes is served rather than refused. */
+static VOID *guarded_allocate(ULONG size)
+{
+GX_UBYTE *memptr;
+
+ memptr = memory_allocate(size + sizeof(ULONG) + GUARD_SIZE);
+
+ if (memptr == GX_NULL)
+ {
+ return GX_NULL;
+ }
+
+ memcpy(memptr, &size, sizeof(ULONG));
+ memset(memptr + sizeof(ULONG) + size, GUARD_BYTE, GUARD_SIZE);
+ outstanding_allocations++;
+
+ return memptr + sizeof(ULONG);
+}
+
+static VOID guarded_free(VOID *mem)
+{
+GX_UBYTE *memptr = (GX_UBYTE *)mem - sizeof(ULONG);
+ULONG size;
+INT index;
+
+ memcpy(&size, memptr, sizeof(ULONG));
+
+ for (index = 0; index < GUARD_SIZE; index++)
+ {
+ if (memptr[sizeof(ULONG) + size + index] != GUARD_BYTE)
+ {
+ guard_failures++;
+ break;
+ }
+ }
+
+ outstanding_allocations--;
+ memory_free(memptr);
+}
+
+/* Reads a whole file into memory from the pool. */
+static GX_UBYTE *test_file_load(GX_CONST GX_CHAR *path)
+{
+FILE *p_file;
+long total_length;
+GX_UBYTE *address = GX_NULL;
+
+ p_file = fopen(path, "rb");
+
+ if (!p_file)
+ {
+ printf("Cannot open file:%s\n", path);
+ return GX_NULL;
+ }
+
+ fseek(p_file, 0, SEEK_END);
+ total_length = ftell(p_file);
+ fseek(p_file, 0, SEEK_SET);
+
+ if (total_length > 0)
+ {
+ address = memory_allocate((ULONG)total_length);
+
+ if (address && (fread(address, 1, (size_t)total_length, p_file) != (size_t)total_length))
+ {
+ memory_free(address);
+ address = GX_NULL;
+ }
+ }
+
+ fclose(p_file);
+
+ return address;
+}
+
+static VOID control_thread_entry(ULONG input)
+{
+int failed_tests = 0;
+GX_THEME *loaded_theme;
+INT theme_id;
+INT invalid_ids[] = {2, 3, 100, 0x7fffffff};
+UINT index;
+GX_UBYTE *root;
+GX_CHAR path[512];
+INT path_length;
+
+ /* The loads run with GUIX idle, so that every allocation made while the
+ guarded allocator is installed is the loader's. */
+ tx_thread_suspend(&_gx_system_thread);
+
+ gx_validation_extract_path(__FILE__, path, &path_length);
+ strcpy(path + path_length, "..//..//..//example_internal//multi_themes_16bpp//multi_themes_16bpp_resources.bin");
+ root = test_file_load(path);
+ EXPECT_EQ(1, (root != GX_NULL) ? 1 : 0);
+
+ gx_system_memory_allocator_set(guarded_allocate, guarded_free);
+
+ /* The two themes the resource holds load. */
+ for (theme_id = 0; theme_id < 2; theme_id++)
+ {
+ loaded_theme = GX_NULL;
+ EXPECT_EQ(GX_SUCCESS, gx_binres_theme_load(root, theme_id, &loaded_theme));
+
+ if (loaded_theme)
+ {
+ guarded_free(loaded_theme);
+ }
+ }
+
+ /* A theme past the last one is refused, with nothing allocated. */
+ for (index = 0; index < sizeof(invalid_ids) / sizeof(invalid_ids[0]); index++)
+ {
+ loaded_theme = GX_NULL;
+ EXPECT_EQ(GX_INVALID_VALUE, gx_binres_theme_load(root, invalid_ids[index], &loaded_theme));
+ EXPECT_EQ(GX_NULL, loaded_theme);
+ EXPECT_EQ(0, outstanding_allocations);
+
+ if (loaded_theme)
+ {
+ guarded_free(loaded_theme);
+ }
+ }
+
+ EXPECT_EQ(0, guard_failures);
+
+ gx_system_memory_allocator_set(memory_allocate, memory_free);
+ tx_thread_resume(&_gx_system_thread);
+
+ if(failed_tests == 0)
+ {
+ printf("Guix Test: guix_binres_theme_id_bound_no_output............................................Success!\n");
+ exit(0);
+ }
+ else
+ {
+ printf("Guix Test: guix_binres_theme_id_bound_no_output.............................................Failed!\n");
+ exit(1);
+ }
+}
diff --git a/test/guix_test/regression_test/tests/validation_guix_canvas_hardware_layer.c b/test/guix_test/regression_test/tests/validation_guix_canvas_hardware_layer.c
index a75050f68..6ef68a9f2 100644
--- a/test/guix_test/regression_test/tests/validation_guix_canvas_hardware_layer.c
+++ b/test/guix_test/regression_test/tests/validation_guix_canvas_hardware_layer.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_canvas.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -136,15 +139,15 @@ GX_DISPLAY *display;
gx_validation_set_frame_comment("Original window screen. ");
gx_validation_screen_refresh();
- gx_canvas_hardware_layer_bind(&animation_canvas, 1); // should return GX_INVALID_DISPLAY
+ _gxe_canvas_hardware_layer_bind(&animation_canvas, 1); // should return GX_INVALID_DISPLAY
display = root->gx_window_root_canvas->gx_canvas_display;
display->gx_display_layer_services = &display_layer_services_1;
- gx_canvas_hardware_layer_bind(&animation_canvas, 1); // should return GX_INVALID_DISPLAY
+ _gxe_canvas_hardware_layer_bind(&animation_canvas, 1); // should return GX_INVALID_DISPLAY
display->gx_display_layer_services = &display_layer_services;
- gx_canvas_hardware_layer_bind(&animation_canvas, 1); // should return GX_SUCCESS
+ _gxe_canvas_hardware_layer_bind(&animation_canvas, 1); // should return GX_SUCCESS
gx_validation_set_frame_id(frame_id++);
gx_validation_set_frame_comment("Bound animation_canvas to layer 1.");
gx_validation_screen_refresh();
@@ -171,7 +174,7 @@ GX_DISPLAY *display;
display->gx_display_layer_services = &display_layer_services_2;
- if(gx_canvas_hardware_layer_bind(&animation_canvas, 1) != GX_FAILURE)
+ if(_gxe_canvas_hardware_layer_bind(&animation_canvas, 1) != GX_FAILURE)
{
exit(1);
}
diff --git a/test/guix_test/regression_test/tests/validation_guix_canvas_pixelmap_get_no_output.c b/test/guix_test/regression_test/tests/validation_guix_canvas_pixelmap_get_no_output.c
index dde27a70e..75fdaae29 100644
--- a/test/guix_test/regression_test/tests/validation_guix_canvas_pixelmap_get_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_canvas_pixelmap_get_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_canvas.h"
#include "gx_validation_utility.h"
#include "gx_system.h"
@@ -64,27 +67,27 @@ GX_RECTANGLE size = {0};
canvas = root->gx_window_root_canvas;
display = canvas->gx_canvas_display;
- status = gx_canvas_pixelmap_get(GX_NULL);
+ status = _gxe_canvas_pixelmap_get(GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_canvas_pixelmap_get(&return_map);
+ status = _gxe_canvas_pixelmap_get(&return_map);
EXPECT_EQ(GX_INVALID_CONTEXT, status);
gx_canvas_drawing_initiate(canvas, root, &size);
- status = gx_canvas_pixelmap_get(&return_map);
+ status = _gxe_canvas_pixelmap_get(&return_map);
gx_canvas_drawing_complete(canvas, GX_FALSE);
EXPECT_EQ(GX_SUCCESS, status);
gx_canvas_drawing_initiate(canvas, root, &size);
_gx_system_current_draw_context->gx_draw_context_display = GX_NULL;
- status = gx_canvas_pixelmap_get(&return_map);
+ status = _gxe_canvas_pixelmap_get(&return_map);
_gx_system_current_draw_context->gx_draw_context_display = display;
gx_canvas_drawing_complete(canvas, GX_FALSE);
EXPECT_EQ(GX_INVALID_DISPLAY, status);
gx_canvas_drawing_initiate(canvas, root, &size);
_gx_system_current_draw_context->gx_draw_context_canvas = GX_NULL;
- status = gx_canvas_pixelmap_get(&return_map);
+ status = _gxe_canvas_pixelmap_get(&return_map);
gx_canvas_drawing_complete(canvas, GX_FALSE);
EXPECT_EQ(GX_INVALID_CANVAS, status);
diff --git a/test/guix_test/regression_test/tests/validation_guix_canvas_rotated_text_draw_no_output.c b/test/guix_test/regression_test/tests/validation_guix_canvas_rotated_text_draw_no_output.c
index a86be24b8..9778c76e0 100644
--- a/test/guix_test/regression_test/tests/validation_guix_canvas_rotated_text_draw_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_canvas_rotated_text_draw_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_canvas.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -65,42 +68,42 @@ GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
#ifdef GX_ENABLE_DEPRECATED_STRING_API
memset(invalid_string, 'x', GX_MAX_STRING_LENGTH + 1);
- status = gx_canvas_rotated_text_draw(invalid_string, 0, 0, 90);
+ status = _gxe_canvas_rotated_text_draw(invalid_string, 0, 0, 90);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
#endif
- status = gx_canvas_rotated_text_draw_ext(GX_NULL, 0, 0, 90);
+ status = _gxe_canvas_rotated_text_draw_ext(GX_NULL, 0, 0, 90);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&string, 0, sizeof(GX_STRING));
- status = gx_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
+ status = _gxe_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
EXPECT_EQ(GX_PTR_ERROR, status);
string.gx_string_ptr = "test";
string.gx_string_length = 5;
- status = gx_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
+ status = _gxe_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_ptr = "test";
string.gx_string_length = 3;
- status = gx_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
+ status = _gxe_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_ptr = "test";
string.gx_string_length = 4;
gx_system_memory_allocator_set(rotate_memory_allocate, GX_NULL);
- status = gx_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
+ status = _gxe_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
gx_system_memory_allocator_set(GX_NULL, rotate_memory_free);
- status = gx_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
+ status = _gxe_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
/* Complete drawing context. */
gx_canvas_drawing_complete(root->gx_window_root_canvas, GX_FALSE);
- status = gx_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
+ status = _gxe_canvas_rotated_text_draw_ext(&string, 0, 0, 90);
EXPECT_EQ(GX_INVALID_CONTEXT, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_canvas_text_draw_no_output.c b/test/guix_test/regression_test/tests/validation_guix_canvas_text_draw_no_output.c
index 0851646e3..da31eebf0 100644
--- a/test/guix_test/regression_test/tests/validation_guix_canvas_text_draw_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_canvas_text_draw_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_canvas.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -66,31 +69,31 @@ GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
#ifdef GX_ENABLE_DEPRECATED_STRING_API
memset(invalid_string, 'x', sizeof(invalid_string));
- status = gx_canvas_text_draw(0, 0, invalid_string, -1);
+ status = _gxe_canvas_text_draw(0, 0, invalid_string, -1);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
#endif
- status = gx_canvas_text_draw_ext(0, 0, GX_NULL);
+ status = _gxe_canvas_text_draw_ext(0, 0, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&string, 0, sizeof(GX_STRING));
- status = gx_canvas_text_draw_ext(0, 0, &string);
+ status = _gxe_canvas_text_draw_ext(0, 0, &string);
EXPECT_EQ(GX_PTR_ERROR, status);
string.gx_string_ptr = test_string;
string.gx_string_length = sizeof(test_string) - 2;
- status = gx_canvas_text_draw_ext(0, 0, &string);
+ status = _gxe_canvas_text_draw_ext(0, 0, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_length = sizeof(test_string);
- status = gx_canvas_text_draw_ext(0, 0, &string);
+ status = _gxe_canvas_text_draw_ext(0, 0, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
/* Complete drawing. */
gx_canvas_drawing_complete(root->gx_window_root_canvas, GX_FALSE);
string.gx_string_length = sizeof(test_string) - 1;
- status = gx_canvas_text_draw_ext(0, 0, &string);
+ status = _gxe_canvas_text_draw_ext(0, 0, &string);
EXPECT_EQ(GX_INVALID_CONTEXT, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_context_string_get_no_output.c b/test/guix_test/regression_test/tests/validation_guix_context_string_get_no_output.c
index fb91ca0e8..9fad25d12 100644
--- a/test/guix_test/regression_test/tests/validation_guix_context_string_get_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_context_string_get_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_context.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -60,19 +63,19 @@ GX_STRING string;
#ifdef GX_ENABLE_DEPRECATED_STRING_API
gx_canvas_drawing_initiate(root->gx_window_root_canvas, &button_screen, &button_screen.gx_widget_size);
- status = gx_context_string_get(0, GX_NULL);
+ status = _gxe_context_string_get(0, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
gx_canvas_drawing_complete(root->gx_window_root_canvas, GX_FALSE);
- status = gx_context_string_get(1, &string.gx_string_ptr);
+ status = _gxe_context_string_get(1, &string.gx_string_ptr);
EXPECT_EQ(GX_INVALID_CONTEXT, status);
#endif
gx_canvas_drawing_initiate(root->gx_window_root_canvas, &button_screen, &button_screen.gx_widget_size);
- status = gx_context_string_get_ext(0, GX_NULL);
+ status = _gxe_context_string_get_ext(0, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
gx_canvas_drawing_complete(root->gx_window_root_canvas, GX_FALSE);
- status = gx_context_string_get_ext(1, &string);
+ status = _gxe_context_string_get_ext(1, &string);
EXPECT_EQ(GX_INVALID_CONTEXT, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_display_create_no_output.c b/test/guix_test/regression_test/tests/validation_guix_display_create_no_output.c
index 60fffed93..55aacb1cb 100644
--- a/test/guix_test/regression_test/tests/validation_guix_display_create_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_display_create_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -68,19 +70,19 @@ static GX_DISPLAY display1;
display1.gx_display_id = GX_DISPLAY_ID;
- if (gx_display_create(&display1, "display1", gx_validation_display_driver_setup_24xrgb, 0, 0) != GX_ALREADY_CREATED)
+ if (_gxe_display_create(&display1, "display1", gx_validation_display_driver_setup_24xrgb, 0, 0, sizeof(GX_DISPLAY)) != GX_ALREADY_CREATED)
{
failed_tests++;
}
display1.gx_display_id = 0;
- if (gx_display_create(&display1, "display1", display_setup_func, 0, 0) != GX_SYSTEM_ERROR)
+ if (_gxe_display_create(&display1, "display1", display_setup_func, 0, 0, sizeof(GX_DISPLAY)) != GX_SYSTEM_ERROR)
{
failed_tests++;
}
- if (gx_display_create(&display1, "display1", gx_validation_display_driver_setup_24xrgb, 0, 0) != GX_SUCCESS)
+ if (_gxe_display_create(&display1, "display1", gx_validation_display_driver_setup_24xrgb, 0, 0, sizeof(GX_DISPLAY)) != GX_SUCCESS)
{
failed_tests++;
}
diff --git a/test/guix_test/regression_test/tests/validation_guix_display_language_table_get_no_output.c b/test/guix_test/regression_test/tests/validation_guix_display_language_table_get_no_output.c
index 688de5214..5e9338535 100644
--- a/test/guix_test/regression_test/tests/validation_guix_display_language_table_get_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_display_language_table_get_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_display.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -63,19 +66,19 @@ UINT string_count;
display = root->gx_window_root_canvas->gx_canvas_display;
#ifdef GX_ENABLE_DEPRECATED_STRING_API
- status = gx_display_language_table_get(display, 0, 0, 0);
+ status = _gxe_display_language_table_get(display, 0, 0, 0);
EXPECT_EQ(GX_SUCCESS, status);
#endif
- status = gx_display_language_table_get_ext(GX_NULL, &language_table, &language_count, &string_count);
+ status = _gxe_display_language_table_get_ext(GX_NULL, &language_table, &language_count, &string_count);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_display_language_table_get_ext(display, &language_table, &language_count, &string_count);
+ status = _gxe_display_language_table_get_ext(display, &language_table, &language_count, &string_count);
EXPECT_EQ(GX_SUCCESS, status);
EXPECT_EQ(display->gx_display_language_table_size, language_count);
EXPECT_EQ(display->gx_display_string_table_size, string_count);
- status = gx_display_language_table_get_ext(display, GX_NULL, GX_NULL, GX_NULL);
+ status = _gxe_display_language_table_get_ext(display, GX_NULL, GX_NULL, GX_NULL);
EXPECT_EQ(GX_SUCCESS, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_display_language_table_set_no_output.c b/test/guix_test/regression_test/tests/validation_guix_display_language_table_set_no_output.c
index 6e3ebcc8b..524a4b1a6 100644
--- a/test/guix_test/regression_test/tests/validation_guix_display_language_table_set_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_display_language_table_set_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_display.h"
#include "gx_validation_utility.h"
#include "gx_system.h"
@@ -92,27 +95,27 @@ int failed_tests = 0;
UINT status;
GX_DISPLAY *display = root->gx_window_root_canvas->gx_canvas_display;
- status = gx_display_language_table_set_ext(GX_NULL, language_table_1, LANGUAGE_TABLE_SIZE, STRING_TABLE_SIZE);
+ status = _gxe_display_language_table_set_ext(GX_NULL, language_table_1, LANGUAGE_TABLE_SIZE, STRING_TABLE_SIZE);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_display_language_table_set_ext(display, GX_NULL, LANGUAGE_TABLE_SIZE, STRING_TABLE_SIZE);
+ status = _gxe_display_language_table_set_ext(display, GX_NULL, LANGUAGE_TABLE_SIZE, STRING_TABLE_SIZE);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_display_language_table_set_ext(display, language_table_1, LANGUAGE_TABLE_SIZE, STRING_TABLE_SIZE);
+ status = _gxe_display_language_table_set_ext(display, language_table_1, LANGUAGE_TABLE_SIZE, STRING_TABLE_SIZE);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
- status = gx_display_language_table_set_ext(display, language_table_2, LANGUAGE_TABLE_SIZE, STRING_TABLE_SIZE);
+ status = _gxe_display_language_table_set_ext(display, language_table_2, LANGUAGE_TABLE_SIZE, STRING_TABLE_SIZE);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
- status = gx_display_language_table_set_ext(display, GX_NULL, 0, 0);
+ status = _gxe_display_language_table_set_ext(display, GX_NULL, 0, 0);
EXPECT_EQ(GX_SUCCESS, status);
- status = gx_display_language_table_set_ext(display, language_table_3, LANGUAGE_TABLE_SIZE, STRING_TABLE_SIZE);
+ status = _gxe_display_language_table_set_ext(display, language_table_3, LANGUAGE_TABLE_SIZE, STRING_TABLE_SIZE);
EXPECT_EQ(GX_SUCCESS, status);
gx_widget_hide(root);
root->gx_window_root_canvas = GX_NULL;
- status = gx_display_language_table_set_ext(display, GX_NULL, 0, 0);
+ status = _gxe_display_language_table_set_ext(display, GX_NULL, 0, 0);
EXPECT_EQ(GX_SUCCESS, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_display_string_get_no_output.c b/test/guix_test/regression_test/tests/validation_guix_display_string_get_no_output.c
index 8c28438e9..e82236d72 100644
--- a/test/guix_test/regression_test/tests/validation_guix_display_string_get_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_display_string_get_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_display.h"
#include "gx_validation_utility.h"
#include "gx_system.h"
@@ -112,74 +115,74 @@ GX_STRING string;
GX_DISPLAY *display = root->gx_window_root_canvas->gx_canvas_display;
/* Test invalid pointers. */
- status = gx_display_string_get_ext(GX_NULL, 0, &string);
+ status = _gxe_display_string_get_ext(GX_NULL, 0, &string);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_display_string_get_ext(display, 0, GX_NULL);
+ status = _gxe_display_string_get_ext(display, 0, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
/* Test invalid resource id. */
- status = gx_display_string_get_ext(display, 1024, &string);
+ status = _gxe_display_string_get_ext(display, 1024, &string);
EXPECT_EQ(GX_INVALID_RESOURCE_ID, status);
- status = gx_display_string_get_ext(display, 0, &string);
+ status = _gxe_display_string_get_ext(display, 0, &string);
EXPECT_EQ(GX_SUCCESS, status);
#ifdef GX_ENABLE_DEPRECATED_STRING_API
/* Test invalid pointers. */
- status = gx_display_string_get(0, 0, 0);
+ status = _gxe_display_string_get(0, 0, 0);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_display_string_get(display, 0, 0);
+ status = _gxe_display_string_get(display, 0, 0);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_system_string_get(0, 0);
+ status = _gxe_system_string_get(0, 0);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_system_string_get(0, &string.gx_string_ptr);
+ status = _gxe_system_string_get(0, &string.gx_string_ptr);
EXPECT_EQ(GX_SUCCESS, status);
/* Test invalid resource id*/
- status = gx_display_string_get(display, 1024, &string.gx_string_ptr);
+ status = _gxe_display_string_get(display, 1024, &string.gx_string_ptr);
EXPECT_EQ(GX_INVALID_RESOURCE_ID, status);
- status = gx_display_string_get(display, 2, &string.gx_string_ptr);
+ status = _gxe_display_string_get(display, 2, &string.gx_string_ptr);
EXPECT_EQ(GX_SUCCESS, status);
memset(test_string_invalid, 'x', GX_MAX_STRING_LENGTH + 1);
/* Set new version language table. */
- status = gx_display_language_table_set_ext(display, (GX_CONST GX_STRING **)test_language_table_ext, TEST_LANGUAGE_TABLE_SIZE, TEST_STRING_TABLE_SIZE);
+ status = _gxe_display_language_table_set_ext(display, (GX_CONST GX_STRING **)test_language_table_ext, TEST_LANGUAGE_TABLE_SIZE, TEST_STRING_TABLE_SIZE);
EXPECT_EQ(GX_SUCCESS, status);
/* Set active language. */
- status = gx_system_active_language_set(TEST_LANGUAGE_ID_2);
+ status = _gxe_system_active_language_set(TEST_LANGUAGE_ID_2);
EXPECT_EQ(GX_SUCCESS, status);
/* Test get a string that is null pointer in active string table. */
- status = gx_display_string_get(display, TEST_STRING_ID_NULL, &string.gx_string_ptr);
+ status = _gxe_display_string_get(display, TEST_STRING_ID_NULL, &string.gx_string_ptr);
if(strcmp(string.gx_string_ptr, test_string_table_ext_1[TEST_STRING_ID_NULL].gx_string_ptr) != 0)
{
failed_tests++;
}
/* Test get a string from active string table. */
- status = gx_display_string_get(display, TEST_STRING_ID_VALID, &string.gx_string_ptr);
+ status = _gxe_display_string_get(display, TEST_STRING_ID_VALID, &string.gx_string_ptr);
if(strcmp(string.gx_string_ptr, test_string_table_ext_2[TEST_STRING_ID_VALID].gx_string_ptr) != 0)
{
failed_tests++;
}
/* Set old version language table that contains invalid string. */
- status = gx_display_language_table_set(display, (GX_CHAR ***)test_language_table, TEST_LANGUAGE_TABLE_SIZE, TEST_STRING_TABLE_SIZE);
+ status = _gxe_display_language_table_set(display, (GX_CHAR ***)test_language_table, TEST_LANGUAGE_TABLE_SIZE, TEST_STRING_TABLE_SIZE);
EXPECT_EQ(GX_SUCCESS, status);
/* Test invalid string with extended API. */
- status = gx_display_string_get_ext(display, TEST_STRING_ID_INVALID, &string);
+ status = _gxe_display_string_get_ext(display, TEST_STRING_ID_INVALID, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
/* Test get a string that is null pointer in active string table. */
- status = gx_display_string_get(display, TEST_STRING_ID_NULL, &string.gx_string_ptr);
+ status = _gxe_display_string_get(display, TEST_STRING_ID_NULL, &string.gx_string_ptr);
if(strcmp(string.gx_string_ptr, test_string_table_1[TEST_STRING_ID_NULL]) != 0)
{
failed_tests++;
@@ -187,7 +190,7 @@ GX_DISPLAY *display = root->gx_window_root_canvas->gx_canvas_display;
/* Set deprecated language table to NULL. */
display->gx_display_language_table_deprecated = GX_NULL;
- status = gx_display_string_get(display, TEST_STRING_ID_VALID, &string.gx_string_ptr);
+ status = _gxe_display_string_get(display, TEST_STRING_ID_VALID, &string.gx_string_ptr);
if(string.gx_string_ptr != GX_NULL)
{
failed_tests++;
@@ -196,7 +199,7 @@ GX_DISPLAY *display = root->gx_window_root_canvas->gx_canvas_display;
/* Set langauge table to null, and call display string get. */
display->gx_display_language_table = GX_NULL;
- status = gx_display_string_get_ext(display, 1, &string);
+ status = _gxe_display_string_get_ext(display, 1, &string);
if(string.gx_string_ptr != GX_NULL)
{
failed_tests++;
diff --git a/test/guix_test/regression_test/tests/validation_guix_display_string_table_get_no_output.c b/test/guix_test/regression_test/tests/validation_guix_display_string_table_get_no_output.c
index ebb7c7b38..fb659c848 100644
--- a/test/guix_test/regression_test/tests/validation_guix_display_string_table_get_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_display_string_table_get_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_display.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -74,37 +77,37 @@ GX_DISPLAY new_display;
display = root->gx_window_root_canvas->gx_canvas_display;
#ifdef GX_ENABLE_DEPRECATED_STRING_API
- status = gx_display_string_table_get(display, LANGUAGE_ENGLISH, &table, &table_size);
+ status = _gxe_display_string_table_get(display, LANGUAGE_ENGLISH, &table, &table_size);
EXPECT_EQ(GX_SUCCESS, status);
EXPECT_EQ(table_size, display->gx_display_string_table_size);
- status = gx_display_create(&new_display, "new_display", gx_validation_display_driver_setup_24xrgb, 10, 10);
+ status = _gxe_display_create(&new_display, "new_display", gx_validation_display_driver_setup_24xrgb, 10, 10, sizeof(GX_DISPLAY));
EXPECT_EQ(GX_SUCCESS, status);
new_display.gx_display_language_table_size = 2;
- status = gx_display_string_table_get(&new_display, LANGUAGE_ENGLISH, &table, &table_size);
+ status = _gxe_display_string_table_get(&new_display, LANGUAGE_ENGLISH, &table, &table_size);
EXPECT_EQ(GX_SUCCESS, status);
EXPECT_EQ(GX_NULL, table_size);
#endif
/* Test _gx_display_string_table_get_ext. */
- status = gx_display_string_table_get_ext(GX_NULL, LANGUAGE_ENGLISH, &table_ext, &table_size);
+ status = _gxe_display_string_table_get_ext(GX_NULL, LANGUAGE_ENGLISH, &table_ext, &table_size);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_display_string_table_get_ext(display, 10, &table_ext, &table_size);
+ status = _gxe_display_string_table_get_ext(display, 10, &table_ext, &table_size);
EXPECT_EQ(GX_NOT_FOUND, status);
- status = gx_display_string_table_get_ext(display, LANGUAGE_ENGLISH, &table_ext, &table_size);
+ status = _gxe_display_string_table_get_ext(display, LANGUAGE_ENGLISH, &table_ext, &table_size);
if((table_ext == GX_NULL) || (table_size != display -> gx_display_string_table_size))
{
failed_tests++;
}
- gx_display_string_table_get_ext(display, LANGUAGE_ENGLISH, GX_NULL, GX_NULL);
+ _gxe_display_string_table_get_ext(display, LANGUAGE_ENGLISH, GX_NULL, GX_NULL);
display->gx_display_language_table = GX_NULL;
- gx_display_string_table_get_ext(display, LANGUAGE_ENGLISH, &table_ext, &table_size);
+ _gxe_display_string_table_get_ext(display, LANGUAGE_ENGLISH, &table_ext, &table_size);
if(table_ext != GX_NULL || table_size != display->gx_display_string_table_size)
{
diff --git a/test/guix_test/regression_test/tests/validation_guix_error_checking_api_coverage_no_output.c b/test/guix_test/regression_test/tests/validation_guix_error_checking_api_coverage_no_output.c
index d7739dfea..42895f538 100644
--- a/test/guix_test/regression_test/tests/validation_guix_error_checking_api_coverage_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_error_checking_api_coverage_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -157,7 +159,7 @@ GX_PIXELMAP *return_pixelmap;
GX_POINT point;
GX_RECTANGLE size, rec1, rec2;
GX_THEME * returned_theme = GX_NULL;
-GX_TIMER * timer, gtimer;
+GX_TIMER timer, gtimer;
GX_UBYTE *** returned_language_table = GX_NULL;
GX_CHAR ** langugage_table = GX_NULL;
GX_WIDGET parent;
@@ -389,16 +391,16 @@ GX_STRING string;
status = gx_binres_pixelmap_load(GX_NULL, 0, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_binres_pixelmap_load(0x80000, 0, GX_NULL);
+ status = gx_binres_pixelmap_load((GX_UBYTE *)buffer, 0, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
status = gx_binres_font_load(GX_NULL, 0, GX_NULL, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_binres_font_load(0x80000, 0, GX_NULL, GX_NULL);
+ status = gx_binres_font_load((GX_UBYTE *)buffer, 0, GX_NULL, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_binres_font_load(0x80000, 0, (GX_UBYTE *)buffer, 0);
+ status = gx_binres_font_load((GX_UBYTE *)buffer, 0, (GX_UBYTE *)buffer, 0);
EXPECT_EQ(GX_PTR_ERROR, status);
/* brush */
@@ -838,7 +840,12 @@ GX_STRING string;
status = gx_checkbox_event_process(&checkbox, 0); // event_ptr is NULL
EXPECT_EQ(GX_PTR_ERROR, status);
- gx_checkbox_pixelmap_set(0, 0, 0, 0, 0); // should return GX_PTR_ERROR
+ status = gx_checkbox_pixelmap_set(0, 0, 0, 0, 0);
+ EXPECT_EQ(GX_PTR_ERROR, status);
+
+ checkbox.gx_widget_type = 0;
+ status = gx_checkbox_pixelmap_set(&checkbox, 0, 0, 0, 0);
+ EXPECT_EQ(GX_INVALID_WIDGET, status);
memset(&checkbox, 0, sizeof(GX_CHECKBOX));
status = gx_checkbox_select(&checkbox);// should return GX_PTR_ERROR
@@ -2963,7 +2970,7 @@ GX_STRING string;
status = gx_system_timer_start(0, 0, 0, 0); //should return GX_OUT_OF_TIMERS;
EXPECT_EQ(GX_OUT_OF_TIMERS, status);
- _gx_system_free_timer_list = (GX_TIMER *)&timer;
+ _gx_system_free_timer_list = &timer;
status = gx_system_timer_start(0, 0, 0, 0); //should return GX_PTR_ERROR;
EXPECT_EQ(GX_PTR_ERROR, status);
@@ -2987,7 +2994,7 @@ GX_STRING string;
EXPECT_EQ(GX_NOT_FOUND, status);
memset(&timer, 0, sizeof(GX_TIMER));
- _gx_system_free_timer_list = (GX_TIMER *)&timer;
+ _gx_system_free_timer_list = &timer;
status = gx_system_timer_stop(0, 0); //should return GX_PTR_ERROR;
EXPECT_EQ(GX_PTR_ERROR, status);
diff --git a/test/guix_test/regression_test/tests/validation_guix_generic_scroll_wheel_no_output.c b/test/guix_test/regression_test/tests/validation_guix_generic_scroll_wheel_no_output.c
index 7c0577465..372018026 100644
--- a/test/guix_test/regression_test/tests/validation_guix_generic_scroll_wheel_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_generic_scroll_wheel_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -63,73 +65,73 @@ GX_WINDOW parent;
GX_EVENT myevent;
GX_GENERIC_SCROLL_WHEEL *wheel_wrap = &main_screen.main_screen_scroll_wheel_wrap;
- status = gx_generic_scroll_wheel_create(0, 0, 0, 0, 0, 0, 0, 0);
+ status = _gxe_generic_scroll_wheel_create(0, 0, 0, 0, 0, 0, 0, 0, sizeof(GX_GENERIC_SCROLL_WHEEL));
EXPECT_EQ(status, GX_PTR_ERROR);
memset(&wheel, 0, sizeof(GX_GENERIC_SCROLL_WHEEL));
- status = gx_generic_scroll_wheel_children_position(&wheel);
+ status = _gxe_generic_scroll_wheel_children_position(&wheel);
EXPECT_EQ(status, GX_INVALID_WIDGET);
- status = gx_generic_scroll_wheel_event_process(&wheel, &myevent);
+ status = _gxe_generic_scroll_wheel_event_process(&wheel, &myevent);
EXPECT_EQ(status, GX_INVALID_WIDGET);
- status = gx_generic_scroll_wheel_row_height_set(&wheel, 50);
+ status = _gxe_generic_scroll_wheel_row_height_set(&wheel, 50);
EXPECT_EQ(status, GX_INVALID_WIDGET);
- status = gx_generic_scroll_wheel_total_rows_set(&wheel, 50);
+ status = _gxe_generic_scroll_wheel_total_rows_set(&wheel, 50);
EXPECT_EQ(status, GX_INVALID_WIDGET);
- status = gx_generic_scroll_wheel_create(&wheel, "", GX_NULL, 10, GX_NULL, 0, 0, GX_NULL);
+ status = _gxe_generic_scroll_wheel_create(&wheel, "", GX_NULL, 10, GX_NULL, 0, 0, GX_NULL, sizeof(GX_GENERIC_SCROLL_WHEEL));
EXPECT_EQ(status, GX_PTR_ERROR);
/* Invalid total rows. */
- status = gx_generic_scroll_wheel_create(&wheel, "", GX_NULL, 0, GX_NULL, 0, 0, &size);
+ status = _gxe_generic_scroll_wheel_create(&wheel, "", GX_NULL, 0, GX_NULL, 0, 0, &size, sizeof(GX_GENERIC_SCROLL_WHEEL));
EXPECT_EQ(status, GX_INVALID_VALUE);
memset(&parent, 0, sizeof(GX_WINDOW));
/* Invalid parent widget. */
- status = gx_generic_scroll_wheel_create(&wheel, "", &parent, 10, GX_NULL, 0, 0, &size);
+ status = _gxe_generic_scroll_wheel_create(&wheel, "", (GX_WIDGET *)&parent, 10, GX_NULL, 0, 0, &size, sizeof(GX_GENERIC_SCROLL_WHEEL));
EXPECT_EQ(status, GX_INVALID_WIDGET);
/* Invalid control block size. */
status = _gxe_generic_scroll_wheel_create(&wheel, "", GX_NULL, 10, GX_NULL, 0 , 0, &size, 0);
EXPECT_EQ(status, GX_INVALID_SIZE);
- status = gx_generic_scroll_wheel_create(&wheel, "", GX_NULL, 10, GX_NULL, 0, 0, &size);
+ status = _gxe_generic_scroll_wheel_create(&wheel, "", GX_NULL, 10, GX_NULL, 0, 0, &size, sizeof(GX_GENERIC_SCROLL_WHEEL));
EXPECT_EQ(status, GX_SUCCESS);
- status = gx_generic_scroll_wheel_create(&wheel, "", GX_NULL, 10, GX_NULL, 0, 0, &size);
+ status = _gxe_generic_scroll_wheel_create(&wheel, "", GX_NULL, 10, GX_NULL, 0, 0, &size, sizeof(GX_GENERIC_SCROLL_WHEEL));
EXPECT_EQ(status, GX_ALREADY_CREATED);
- status = gx_generic_scroll_wheel_event_process(GX_NULL, GX_NULL);
+ status = _gxe_generic_scroll_wheel_event_process(GX_NULL, GX_NULL);
EXPECT_EQ(status, GX_PTR_ERROR);
- status = gx_generic_scroll_wheel_event_process(&wheel, GX_NULL);
+ status = _gxe_generic_scroll_wheel_event_process(&wheel, GX_NULL);
EXPECT_EQ(status, GX_PTR_ERROR);
memset(&myevent, 0, sizeof(GX_EVENT));
myevent.gx_event_type = GX_EVENT_SHOW;
- status = gx_generic_scroll_wheel_event_process(&wheel, &myevent);
+ status = _gxe_generic_scroll_wheel_event_process(&wheel, &myevent);
EXPECT_EQ(status, GX_SUCCESS);
- status = gx_generic_scroll_wheel_row_height_set(GX_NULL, 10);
+ status = _gxe_generic_scroll_wheel_row_height_set(GX_NULL, 10);
EXPECT_EQ(status, GX_PTR_ERROR);
- status = gx_generic_scroll_wheel_row_height_set(&wheel, 0);
+ status = _gxe_generic_scroll_wheel_row_height_set(&wheel, 0);
EXPECT_EQ(status, GX_INVALID_VALUE);
- status = gx_generic_scroll_wheel_total_rows_set(GX_NULL, 10);
+ status = _gxe_generic_scroll_wheel_total_rows_set(GX_NULL, 10);
EXPECT_EQ(status, GX_PTR_ERROR);
- status = gx_generic_scroll_wheel_total_rows_set(&wheel, -1);
+ status = _gxe_generic_scroll_wheel_total_rows_set(&wheel, -1);
EXPECT_EQ(status, GX_INVALID_VALUE);
- status = gx_generic_scroll_wheel_children_position(GX_NULL);
+ status = _gxe_generic_scroll_wheel_children_position(GX_NULL);
EXPECT_EQ(status, GX_PTR_ERROR);
- status = gx_generic_scroll_wheel_total_rows_set(wheel_wrap, 0);
+ status = _gxe_generic_scroll_wheel_total_rows_set(wheel_wrap, 0);
EXPECT_EQ(status, GX_SUCCESS);
wheel_wrap->gx_scroll_wheel_total_rows = 10;
diff --git a/test/guix_test/regression_test/tests/validation_guix_horizontal_list_scroll_with_large_value.c b/test/guix_test/regression_test/tests/validation_guix_horizontal_list_scroll_with_large_value.c
index 8f9679995..d6b6b05e4 100644
--- a/test/guix_test/regression_test/tests/validation_guix_horizontal_list_scroll_with_large_value.c
+++ b/test/guix_test/regression_test/tests/validation_guix_horizontal_list_scroll_with_large_value.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_system.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
diff --git a/test/guix_test/regression_test/tests/validation_guix_horizontal_screen_drag_animation_with_block_move.c b/test/guix_test/regression_test/tests/validation_guix_horizontal_screen_drag_animation_with_block_move.c
index b02ae7798..2595a2580 100644
--- a/test/guix_test/regression_test/tests/validation_guix_horizontal_screen_drag_animation_with_block_move.c
+++ b/test/guix_test/regression_test/tests/validation_guix_horizontal_screen_drag_animation_with_block_move.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -134,8 +136,8 @@ INT style_index;
{
if(style_index)
{
- gx_animation_drag_disable(&h_screen_drag_animation, &main_screen.main_screen_h_menu_window);
- enable_screen_drag_animation(&h_screen_drag_animation, h_screen_list, &main_screen.main_screen_h_menu_window,
+ gx_animation_drag_disable(&h_screen_drag_animation, (GX_WIDGET *)&main_screen.main_screen_h_menu_window);
+ enable_screen_drag_animation(&h_screen_drag_animation, h_screen_list, (GX_WIDGET *)&main_screen.main_screen_h_menu_window,
GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_HORIZONTAL | GX_ANIMATION_BLOCK_MOVE,
ANIMATION_ID_H_SCREEN_DRAG);
}
diff --git a/test/guix_test/regression_test/tests/validation_guix_horizontal_screen_drag_animation_with_canvas.c b/test/guix_test/regression_test/tests/validation_guix_horizontal_screen_drag_animation_with_canvas.c
index 37f6fe8d5..daf31b6fc 100644
--- a/test/guix_test/regression_test/tests/validation_guix_horizontal_screen_drag_animation_with_canvas.c
+++ b/test/guix_test/regression_test/tests/validation_guix_horizontal_screen_drag_animation_with_canvas.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -134,8 +136,8 @@ INT style_index;
{
if(style_index)
{
- gx_animation_drag_disable(&h_screen_drag_animation, &main_screen.main_screen_h_menu_window);
- enable_screen_drag_animation(&h_screen_drag_animation, h_screen_list, &main_screen.main_screen_h_menu_window,
+ gx_animation_drag_disable(&h_screen_drag_animation, (GX_WIDGET *)&main_screen.main_screen_h_menu_window);
+ enable_screen_drag_animation(&h_screen_drag_animation, h_screen_list, (GX_WIDGET *)&main_screen.main_screen_h_menu_window,
GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_HORIZONTAL,
ANIMATION_ID_H_SCREEN_DRAG);
}
diff --git a/test/guix_test/regression_test/tests/validation_guix_image_reader_jpeg_decode_no_output.c b/test/guix_test/regression_test/tests/validation_guix_image_reader_jpeg_decode_no_output.c
index 46118a04c..710d67ac6 100644
--- a/test/guix_test/regression_test/tests/validation_guix_image_reader_jpeg_decode_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_image_reader_jpeg_decode_no_output.c
@@ -8,6 +8,7 @@
*
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
/* This is a small demo of the high-performance GUIX graphics framework. */
@@ -206,11 +207,129 @@ static GX_CONST GX_UBYTE test_data_6[] =
0x2d, 0xfe, 0xdd, 0x88, 0xff, 0x00, 0x67, 0xc0, 0xde, 0x72, 0xe6, 0x9b, 0xa1, 0x4b, 0xf7, 0xb5, 0xf4, 0xf8, 0xe1, 0xa7, 0x3c, 0x0f, 0xff, 0xd9
};
+/* Marker-ordering, segment-length and sampling-factor cases, each of which the
+ decoder must reject. */
+
+/* A DQT segment declaring five bytes, too short for the 65-byte table it starts.
+ A segment declaring only its own length carries no tables and is valid. */
+GX_CONST GX_UBYTE test_data_short_dqt[]={
+ 0xff, 0xd8, 0xff, 0xdb, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* A frame header declaring only its own length, so the precision, dimensions
+ and component count lie outside the segment. */
+GX_CONST GX_UBYTE test_data_short_sof0[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* A valid frame followed by a scan header declaring only its own length, so the
+ component count lies outside the segment. */
+GX_CONST GX_UBYTE test_data_short_sos[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x0b, 0x08, 0x00, 0x08, 0x00, 0x08, 0x01, 0x01, 0x11, 0x00, 0xff,
+ 0xda, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* A restart interval segment declaring only its own length, so the two-byte
+ interval lies outside the segment. */
+GX_CONST GX_UBYTE test_data_short_dri[]={
+ 0xff, 0xd8, 0xff, 0xdd, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* Two frame headers. A JPEG carries one, and a second could change the image
+ dimensions after the output buffer is allocated. */
+GX_CONST GX_UBYTE test_data_duplicate_sof0[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x08, 0x00, 0x08, 0x03, 0x01, 0x11, 0x00, 0x02,
+ 0x11, 0x01, 0x03, 0x11, 0x01, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x08, 0x00, 0x08, 0x03, 0x01,
+ 0x11, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01
+};
+
+/* A scan with no frame header before it, so the dimensions the decode works
+ from are never supplied. */
+GX_CONST GX_UBYTE test_data_sos_without_sof0[]={
+ 0xff, 0xd8, 0xff, 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00
+};
+
+/* A frame header declaring one component but too short to hold its three
+ component bytes. */
+GX_CONST GX_UBYTE test_data_sof0_short_components[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x08, 0x08, 0x00, 0x08, 0x00, 0x08, 0x01, 0x01, 0x11, 0x00, 0x00
+};
+
+/* A valid frame followed by a scan declaring one component but too short to
+ hold its two component bytes. */
+GX_CONST GX_UBYTE test_data_sos_short_components[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x0b, 0x08, 0x00, 0x08, 0x00, 0x08, 0x01, 0x01, 0x11, 0x00, 0xff,
+ 0xda, 0x00, 0x03, 0x01, 0x01, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* A DQT segment declaring a length of one, shorter than its own length field. */
+GX_CONST GX_UBYTE test_data_dqt_length_one[]={
+ 0xff, 0xd8, 0xff, 0xdb, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* A single-component frame with a horizontal sampling factor of zero, which
+ would give the decode loop a zero step. */
+GX_CONST GX_UBYTE test_data_zero_h_sample_factor[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x0b, 0x08, 0x00, 0x08, 0x00, 0x08, 0x01, 0x01, 0x01, 0x00, 0xff,
+ 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* The same frame with a vertical sampling factor of zero. */
+GX_CONST GX_UBYTE test_data_zero_v_sample_factor[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x0b, 0x08, 0x00, 0x08, 0x00, 0x08, 0x01, 0x01, 0x10, 0x00, 0xff,
+ 0xda, 0x00, 0x08, 0x01, 0x01, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/* A three-component frame with 3x2 luma sampling. Its six luma blocks per MCU
+ do not fit the decoder's four-block luma buffer. */
+GX_CONST GX_UBYTE test_data_h3v2_sample_factor[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x20, 0x03, 0x01, 0x32, 0x00, 0x02,
+ 0x11, 0x00, 0x03, 0x11, 0x00, 0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00,
+ 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xd9
+};
+
+/* The same frame with 4x2 luma sampling, eight luma blocks per MCU. */
+GX_CONST GX_UBYTE test_data_h4v2_sample_factor[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x20, 0x03, 0x01, 0x42, 0x00, 0x02,
+ 0x11, 0x00, 0x03, 0x11, 0x00, 0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00,
+ 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xd9
+};
+
+/* The same frame with 1x3 luma sampling, beyond the decoder's vertical limit of 2. */
+GX_CONST GX_UBYTE test_data_h1v3_sample_factor[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x11, 0x08, 0x00, 0x10, 0x00, 0x20, 0x03, 0x01, 0x13, 0x00, 0x02,
+ 0x11, 0x00, 0x03, 0x11, 0x00, 0xff, 0xda, 0x00, 0x0c, 0x03, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00,
+ 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xd9
+};
+
+/* A valid single-component frame followed by a scan declaring four components,
+ one more than the decoder supports. */
+GX_CONST GX_UBYTE test_data_sos_too_many_components[]={
+ 0xff, 0xd8, 0xff, 0xc0, 0x00, 0x0b, 0x08, 0x00, 0x08, 0x00, 0x08, 0x01, 0x01, 0x11, 0x00, 0xff,
+ 0xda, 0x00, 0x0e, 0x04, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x04, 0x11, 0x00, 0x3f, 0x00, 0x00,
+ 0x00, 0x00, 0x00
+};
+
TEST test_list[]={
{test_data_1, sizeof(test_data_1)},
{test_data_2, sizeof(test_data_2)},
{test_data_3, sizeof(test_data_3)},
{test_data_4, sizeof(test_data_4)},
+{test_data_short_dqt, sizeof(test_data_short_dqt)},
+{test_data_short_sof0, sizeof(test_data_short_sof0)},
+{test_data_short_sos, sizeof(test_data_short_sos)},
+{test_data_short_dri, sizeof(test_data_short_dri)},
+{test_data_duplicate_sof0, sizeof(test_data_duplicate_sof0)},
+{test_data_sos_without_sof0, sizeof(test_data_sos_without_sof0)},
+{test_data_sof0_short_components, sizeof(test_data_sof0_short_components)},
+{test_data_sos_short_components, sizeof(test_data_sos_short_components)},
+{test_data_dqt_length_one, sizeof(test_data_dqt_length_one)},
+{test_data_zero_h_sample_factor, sizeof(test_data_zero_h_sample_factor)},
+{test_data_zero_v_sample_factor, sizeof(test_data_zero_v_sample_factor)},
+{test_data_sos_too_many_components, sizeof(test_data_sos_too_many_components)},
+{test_data_h3v2_sample_factor, sizeof(test_data_h3v2_sample_factor)},
+{test_data_h4v2_sample_factor, sizeof(test_data_h4v2_sample_factor)},
+{test_data_h1v3_sample_factor, sizeof(test_data_h1v3_sample_factor)},
{GX_NULL, 0}
};
diff --git a/test/guix_test/regression_test/tests/validation_guix_image_reader_png_decode_no_output.c b/test/guix_test/regression_test/tests/validation_guix_image_reader_png_decode_no_output.c
index 852a3d73d..d8e0e01d3 100644
--- a/test/guix_test/regression_test/tests/validation_guix_image_reader_png_decode_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_image_reader_png_decode_no_output.c
@@ -1050,6 +1050,60 @@ static GX_CONST GX_UBYTE test_data_memory_leak[] =
};
+/* Chunk-ordering cases. A PNG carries exactly one IHDR and it comes first, and
+ one PLTE. Accepting a repeat let a file change the image geometry after the
+ decoded data buffer had been allocated from the original values. */
+
+/* A second IHDR after IDAT. The image dimensions change after the decoded
+ data buffer has been allocated from the first IHDR, which used to leave the
+ unfilter pass walking the old allocation to the new dimensions. */
+static GX_CONST GX_UBYTE test_data_double_ihdr_after_idat[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
+ 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x64, 0xe1, 0x57, 0x00, 0x00, 0x00,
+ 0x0c, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0xa0, 0x0e, 0x00,
+ 0x00, 0x00, 0x48, 0x00, 0x01, 0x2e, 0xb8, 0x3c, 0x7e, 0x00, 0x00, 0x00,
+ 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01,
+ 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x9f, 0x39, 0xa9, 0x92, 0x00, 0x00,
+ 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
+/* A second IHDR before IDAT. Same duplication, other placement, so the
+ ordering state is tested rather than only the after-IDAT case. */
+static GX_CONST GX_UBYTE test_data_double_ihdr_before_idat[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
+ 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x64, 0xe1, 0x57, 0x00, 0x00, 0x00,
+ 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01,
+ 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x9f, 0x39, 0xa9, 0x92, 0x00, 0x00,
+ 0x00, 0x0c, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0xa0, 0x0e,
+ 0x00, 0x00, 0x00, 0x48, 0x00, 0x01, 0x2e, 0xb8, 0x3c, 0x7e, 0x00, 0x00,
+ 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
+/* IDAT with no IHDR at all, so the buffer would be sized from nothing. */
+static GX_CONST GX_UBYTE test_data_idat_without_ihdr[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0c,
+ 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0xa0, 0x0e, 0x00, 0x00,
+ 0x00, 0x48, 0x00, 0x01, 0x2e, 0xb8, 0x3c, 0x7e, 0x00, 0x00, 0x00, 0x00,
+ 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
+/* A re-entered PLTE, which the chunk loop also accepted. */
+static GX_CONST GX_UBYTE test_data_double_plte[] = {
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
+ 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08,
+ 0x08, 0x03, 0x00, 0x00, 0x00, 0xf3, 0xd1, 0x4e, 0xb9, 0x00, 0x00, 0x00,
+ 0x0c, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x05, 0x0a, 0x0f, 0x14, 0x19, 0x1e,
+ 0x23, 0x28, 0x2d, 0x32, 0x37, 0x39, 0xf1, 0xb7, 0x23, 0x00, 0x00, 0x00,
+ 0x18, 0x50, 0x4c, 0x54, 0x45, 0x00, 0x05, 0x0a, 0x0f, 0x14, 0x19, 0x1e,
+ 0x23, 0x28, 0x2d, 0x32, 0x37, 0x3c, 0x41, 0x46, 0x4b, 0x50, 0x55, 0x5a,
+ 0x5f, 0x64, 0x69, 0x6e, 0x73, 0x24, 0xfd, 0xd2, 0xd7, 0x00, 0x00, 0x00,
+ 0x0c, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0xa0, 0x0e, 0x00,
+ 0x00, 0x00, 0x48, 0x00, 0x01, 0x2e, 0xb8, 0x3c, 0x7e, 0x00, 0x00, 0x00,
+ 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
+};
+
typedef struct TEST_DATA_STRUCT
{
GX_UBYTE *test_data;
@@ -1126,6 +1180,10 @@ TEST_DATA test_data_list[]={
{(GX_UBYTE *)test_data_41, sizeof(test_data_41), GX_FAILURE},
{(GX_UBYTE *)test_data_42, sizeof(test_data_42), GX_INVALID_WIDTH},
{(GX_UBYTE *)test_data_43, sizeof(test_data_43), GX_FAILURE},
+{(GX_UBYTE *)test_data_double_ihdr_after_idat, sizeof(test_data_double_ihdr_after_idat), GX_INVALID_FORMAT},
+{(GX_UBYTE *)test_data_double_ihdr_before_idat, sizeof(test_data_double_ihdr_before_idat), GX_INVALID_FORMAT},
+{(GX_UBYTE *)test_data_idat_without_ihdr, sizeof(test_data_idat_without_ihdr), GX_INVALID_FORMAT},
+{(GX_UBYTE *)test_data_double_plte, sizeof(test_data_double_plte), GX_INVALID_FORMAT},
{0, 0, 0}
};
diff --git a/test/guix_test/regression_test/tests/validation_guix_line_1bpp.c b/test/guix_test/regression_test/tests/validation_guix_line_1bpp.c
index bafc59361..6210aaa87 100644
--- a/test/guix_test/regression_test/tests/validation_guix_line_1bpp.c
+++ b/test/guix_test/regression_test/tests/validation_guix_line_1bpp.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_context.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -176,7 +179,7 @@ GX_RECTANGLE size;
size.gx_rectangle_right = 179;
size.gx_rectangle_bottom = 179;
gx_widget_resize(&line_window, &size);
- gx_context_raw_brush_define(0x0, 0xffffff, 0);
+ _gxe_context_raw_brush_define(0x0, 0xffffff, 0);
for(line_width = 1; line_width < 15 ; line_width += 6)
{
@@ -215,7 +218,7 @@ GX_RECTANGLE size;
size.gx_rectangle_right = 400;
size.gx_rectangle_bottom = 460;
gx_widget_resize(&line_window, &size);
- gx_context_raw_brush_define(0xffffff, 0, 0);
+ _gxe_context_raw_brush_define(0xffffff, 0, 0);
/* Reset line wind draw function because line color is hard-coded in original draw function in demo file,
Rewrite this draw function to change line color. */
gx_widget_draw_set((GX_WIDGET *)&line_window, test_line_win_draw);
@@ -255,7 +258,7 @@ GX_RECTANGLE size;
size.gx_rectangle_right = 260;
size.gx_rectangle_bottom = 260;
gx_widget_resize(&line_window, &size);
- gx_context_raw_brush_define(0xffffff, 0, 0);
+ _gxe_context_raw_brush_define(0xffffff, 0, 0);
for(line_width = 1; line_width < 20 ; line_width += 6)
{
for(line_angle = 0; line_angle < 360; line_angle += 30)
@@ -287,7 +290,7 @@ GX_RECTANGLE size;
size.gx_rectangle_right = 179;
size.gx_rectangle_bottom = 179;
gx_widget_resize(&line_window, &size);
- gx_context_raw_brush_define(0xffffff, 0, 0);
+ _gxe_context_raw_brush_define(0xffffff, 0, 0);
for(line_width = 1; line_width < 15 ; line_width += 6)
{
diff --git a/test/guix_test/regression_test/tests/validation_guix_menu_event_process_no_output.c b/test/guix_test/regression_test/tests/validation_guix_menu_event_process_no_output.c
index 77e5ce744..ce6fc702e 100644
--- a/test/guix_test/regression_test/tests/validation_guix_menu_event_process_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_menu_event_process_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_menu.h"
#include "gx_validation_utility.h"
#include "gx_scroll_wheel.h"
@@ -61,22 +64,22 @@ GX_MENU menu;
GX_EVENT myevent;
GX_RECTANGLE size;
- status = gx_menu_event_process(GX_NULL, GX_NULL);
+ status = _gxe_menu_event_process(GX_NULL, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_menu_event_process(&menu, GX_NULL);
+ status = _gxe_menu_event_process(&menu, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&menu, 0, sizeof(GX_MENU));
- status = gx_menu_event_process(&menu, &myevent);
+ status = _gxe_menu_event_process(&menu, &myevent);
EXPECT_EQ(GX_INVALID_WIDGET, status);
gx_utility_rectangle_define(&size, 0, 0, 100, 100);
- status = gx_menu_create(&menu, "menu", GX_NULL, 0, 0, 0, 0, &size);
+ status = _gxe_menu_create((GX_MENU *)&menu, "menu", (GX_WIDGET *)GX_NULL, 0, 0, 0, 0, &size, sizeof(GX_MENU));
EXPECT_EQ(GX_SUCCESS, status);
myevent.gx_event_type = GX_EVENT_DELETE;
- status = gx_menu_event_process(&menu, &myevent);
+ status = _gxe_menu_event_process(&menu, &myevent);
EXPECT_EQ(GX_SUCCESS, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_menu_text_alignment.c b/test/guix_test/regression_test/tests/validation_guix_menu_text_alignment.c
index 62f23cbd9..59bb62c74 100644
--- a/test/guix_test/regression_test/tests/validation_guix_menu_text_alignment.c
+++ b/test/guix_test/regression_test/tests/validation_guix_menu_text_alignment.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
@@ -79,7 +81,7 @@ static VOID control_thread_entry(ULONG input)
int frame_id = 1;
GX_MENU *menu;
- ToggleScreen(&menu_screen, pButtonScreen);
+ ToggleScreen((GX_WINDOW *)&menu_screen, pButtonScreen);
/* Set tree view menu 1 text right aligned. */
gx_widget_style_remove(&menu_screen.menu_screen_tree_menu_1, GX_STYLE_TEXT_ALIGNMENT_MASK);
diff --git a/test/guix_test/regression_test/tests/validation_guix_ml_button_text_set_no_output.c b/test/guix_test/regression_test/tests/validation_guix_ml_button_text_set_no_output.c
index 82aa4c1f9..d5c9c6d07 100644
--- a/test/guix_test/regression_test/tests/validation_guix_ml_button_text_set_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_ml_button_text_set_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_button.h"
#include "gx_validation_utility.h"
#include "gx_scroll_wheel.h"
@@ -61,19 +64,19 @@ GX_STRING string;
GX_CONST GX_CHAR test_string[] = "test";
GX_MULTI_LINE_TEXT_BUTTON *button = &button_screen.button_screen_multi_line_button_1;
- status = gx_multi_line_text_button_text_set_ext(GX_NULL, GX_NULL);
+ status = _gxe_multi_line_text_button_text_set_ext(GX_NULL, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_multi_line_text_button_text_set_ext(button, GX_NULL);
+ status = _gxe_multi_line_text_button_text_set_ext(button, GX_NULL);
EXPECT_EQ(GX_SUCCESS, status);
string.gx_string_ptr = test_string;
string.gx_string_length = sizeof(test_string) - 2;
- status = gx_multi_line_text_button_text_set_ext(button, &string);
+ status = _gxe_multi_line_text_button_text_set_ext(button, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_ptr = GX_NULL;
- status = gx_multi_line_text_button_text_set_ext(button, &string);
+ status = _gxe_multi_line_text_button_text_set_ext(button, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_ml_input_char_insert_no_output.c b/test/guix_test/regression_test/tests/validation_guix_ml_input_char_insert_no_output.c
index 243221950..04dade386 100644
--- a/test/guix_test/regression_test/tests/validation_guix_ml_input_char_insert_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_ml_input_char_insert_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_multi_line_text_input.h"
#include "gx_validation_utility.h"
#include "gx_scroll_wheel.h"
@@ -63,27 +66,27 @@ GX_MULTI_LINE_TEXT_INPUT ml_input;
memset(&ml_input, 0, sizeof(GX_MULTI_LINE_TEXT_INPUT));
- status = gx_multi_line_text_input_char_insert_ext(GX_NULL, GX_NULL);
+ status = _gxe_multi_line_text_input_char_insert_ext(GX_NULL, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_multi_line_text_input_char_insert_ext(&ml_input, GX_NULL);
+ status = _gxe_multi_line_text_input_char_insert_ext(&ml_input, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&string, 0, sizeof(GX_STRING));
- status = gx_multi_line_text_input_char_insert_ext(&ml_input, &string);
+ status = _gxe_multi_line_text_input_char_insert_ext(&ml_input, &string);
EXPECT_EQ(GX_PTR_ERROR, status);
string.gx_string_ptr = test_string;
string.gx_string_length = sizeof(test_string) - 2;
- status = gx_multi_line_text_input_char_insert_ext(&ml_input, &string);
+ status = _gxe_multi_line_text_input_char_insert_ext(&ml_input, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_length = sizeof(test_string);
- status = gx_multi_line_text_input_char_insert_ext(&ml_input, &string);
+ status = _gxe_multi_line_text_input_char_insert_ext(&ml_input, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_length = sizeof(test_string) - 1;
- status = gx_multi_line_text_input_char_insert_ext(&ml_input, &string);
+ status = _gxe_multi_line_text_input_char_insert_ext(&ml_input, &string);
EXPECT_EQ(GX_INVALID_WIDGET, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_ml_input_text_set_no_output.c b/test/guix_test/regression_test/tests/validation_guix_ml_input_text_set_no_output.c
index 5dd7939bf..b5e23dafe 100644
--- a/test/guix_test/regression_test/tests/validation_guix_ml_input_text_set_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_ml_input_text_set_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_multi_line_text_input.h"
#include "gx_validation_utility.h"
#include "gx_scroll_wheel.h"
@@ -64,27 +67,27 @@ GX_MULTI_LINE_TEXT_INPUT *ml_input = &text_screen.text_screen_text_input_2;
GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
memset(invalid_string, 'x', sizeof(invalid_string));
- status = gx_multi_line_text_input_text_set(ml_input, invalid_string);
+ status = _gxe_multi_line_text_input_text_set(ml_input, invalid_string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
#endif
- status = gx_multi_line_text_input_text_set_ext(GX_NULL, GX_NULL);
+ status = _gxe_multi_line_text_input_text_set_ext(GX_NULL, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_multi_line_text_input_text_set_ext(ml_input, GX_NULL);
+ status = _gxe_multi_line_text_input_text_set_ext(ml_input, GX_NULL);
EXPECT_EQ(GX_SUCCESS, status);
string.gx_string_ptr = GX_NULL;
string.gx_string_length = 2;
- status = gx_multi_line_text_input_text_set_ext(ml_input, &string);
+ status = _gxe_multi_line_text_input_text_set_ext(ml_input, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
memset(&string, 0, sizeof(GX_STRING));
- status = gx_multi_line_text_input_text_set_ext(ml_input, &string);
+ status = _gxe_multi_line_text_input_text_set_ext(ml_input, &string);
EXPECT_EQ(GX_SUCCESS, status);
string.gx_string_ptr = test_string;
string.gx_string_length = sizeof(test_string) - 2;
- status = gx_multi_line_text_input_text_set_ext(ml_input, &string);
+ status = _gxe_multi_line_text_input_text_set_ext(ml_input, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_ml_text_view_word_wrap_no_output.c b/test/guix_test/regression_test/tests/validation_guix_ml_text_view_word_wrap_no_output.c
index a75aef7db..a885888a3 100644
--- a/test/guix_test/regression_test/tests/validation_guix_ml_text_view_word_wrap_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_ml_text_view_word_wrap_no_output.c
@@ -13,7 +13,7 @@
* SPDX-License-Identifier: MIT and CC0-1.0
**************************************************************************/
-// Some portions generated by Claude Code (Opus 5).
+// Portions of this file were generated with AI assistance.
/* Regression test for issue #130 (word wrapping broken for UTF-8 strings) and
* for the blank row that its first fix introduced.
diff --git a/test/guix_test/regression_test/tests/validation_guix_ml_view_no_output.c b/test/guix_test/regression_test/tests/validation_guix_ml_view_no_output.c
index 7fe6d4291..b1e1591d8 100644
--- a/test/guix_test/regression_test/tests/validation_guix_ml_view_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_ml_view_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -71,7 +73,7 @@ GX_CHAR string_buffer[] = "test string";
string.gx_string_ptr = string_buffer;
string.gx_string_length = sizeof(string_buffer) - 1;
- status = gx_multi_line_text_view_text_set(&text_view, &string);
+ status = gx_multi_line_text_view_text_set_ext(&text_view, &string);
EXPECT_EQ(GX_SUCCESS, status);
gx_system_memory_allocator_set(GX_NULL, GX_NULL);
diff --git a/test/guix_test/regression_test/tests/validation_guix_ml_view_text_set_no_output.c b/test/guix_test/regression_test/tests/validation_guix_ml_view_text_set_no_output.c
index aa7111b0d..1ee6e7ac7 100644
--- a/test/guix_test/regression_test/tests/validation_guix_ml_view_text_set_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_ml_view_text_set_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_multi_line_text_view.h"
#include "gx_validation_utility.h"
#include "gx_system.h"
@@ -64,28 +67,28 @@ GX_MULTI_LINE_TEXT_VIEW *view = &text_screen.text_screen_text_view_1;
GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
memset(invalid_string, 'x', GX_MAX_STRING_LENGTH + 1);
- status = gx_multi_line_text_view_text_set(view, invalid_string);
+ status = _gxe_multi_line_text_view_text_set(view, invalid_string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
#endif
- status = gx_multi_line_text_view_text_set_ext(GX_NULL, GX_NULL);
+ status = _gxe_multi_line_text_view_text_set_ext(GX_NULL, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_multi_line_text_view_text_set_ext(view, GX_NULL);
+ status = _gxe_multi_line_text_view_text_set_ext(view, GX_NULL);
EXPECT_EQ(GX_SUCCESS, status);
string.gx_string_ptr = GX_NULL;
string.gx_string_length = 2;
- status = gx_multi_line_text_view_text_set_ext(view, &string);
+ status = _gxe_multi_line_text_view_text_set_ext(view, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_ptr = "test";
string.gx_string_length = 5;
- status = gx_multi_line_text_view_text_set_ext(view, &string);
+ status = _gxe_multi_line_text_view_text_set_ext(view, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_ptr = "test";
string.gx_string_length = 3;
- status = gx_multi_line_text_view_text_set_ext(view, &string);
+ status = _gxe_multi_line_text_view_text_set_ext(view, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_partial_frame_buffer_16bpp.c b/test/guix_test/regression_test/tests/validation_guix_partial_frame_buffer_16bpp.c
index 16d67ab86..4c74dedaa 100644
--- a/test/guix_test/regression_test/tests/validation_guix_partial_frame_buffer_16bpp.c
+++ b/test/guix_test/regression_test/tests/validation_guix_partial_frame_buffer_16bpp.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -73,21 +75,21 @@ GX_CHAR *name;
}SCREEN_INFO;
SCREEN_INFO screen_list[]={
- {&button_screen, "button_screen"},
- {&window_screen, "window_screen"},
- {&indicator_screen, "indicator_screen"},
- {&text_screen, "text_screen"},
- {&gauge_screen, "gauge_screen"},
- {&sprite_screen, "sprite_screen"},
- {&menu_screen, "menu_screen"},
- {&rotate_screen, "rotate_screen"},
- {&radial_slider_screen, "radial_slider_screen"},
- {&rich_text_view_screen, "rich_text_view_screen"},
- {&line_screen, "line_screen"},
- {&pic_screen, "pic_screen"},
- {&shapes_screen, "shapes_screen"},
- {&resize_screen, "resize_screen"},
- {&glyph_screen, "glyph_screen"},
+ {(GX_WINDOW *)&button_screen, "button_screen"},
+ {(GX_WINDOW *)&window_screen, "window_screen"},
+ {(GX_WINDOW *)&indicator_screen, "indicator_screen"},
+ {(GX_WINDOW *)&text_screen, "text_screen"},
+ {(GX_WINDOW *)&gauge_screen, "gauge_screen"},
+ {(GX_WINDOW *)&sprite_screen, "sprite_screen"},
+ {(GX_WINDOW *)&menu_screen, "menu_screen"},
+ {(GX_WINDOW *)&rotate_screen, "rotate_screen"},
+ {(GX_WINDOW *)&radial_slider_screen, "radial_slider_screen"},
+ {(GX_WINDOW *)&rich_text_view_screen, "rich_text_view_screen"},
+ {(GX_WINDOW *)&line_screen, "line_screen"},
+ {(GX_WINDOW *)&pic_screen, "pic_screen"},
+ {(GX_WINDOW *)&shapes_screen, "shapes_screen"},
+ {(GX_WINDOW *)&resize_screen, "resize_screen"},
+ {(GX_WINDOW *)&glyph_screen, "glyph_screen"},
{GX_NULL, GX_NULL}
};
diff --git a/test/guix_test/regression_test/tests/validation_guix_partial_frame_buffer_16bpp_rotate_screen.c b/test/guix_test/regression_test/tests/validation_guix_partial_frame_buffer_16bpp_rotate_screen.c
index caf2c0935..25bbe44fe 100644
--- a/test/guix_test/regression_test/tests/validation_guix_partial_frame_buffer_16bpp_rotate_screen.c
+++ b/test/guix_test/regression_test/tests/validation_guix_partial_frame_buffer_16bpp_rotate_screen.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
@@ -96,7 +98,7 @@ static VOID control_thread_entry(ULONG input)
int frame_id = 1;
MAP_INFO *entry = resize_pixelmap_id_list;
- ToggleScreen((GX_WINDOW *)&rotate_screen, &button_screen);
+ ToggleScreen((GX_WINDOW *)&rotate_screen, (GX_WINDOW *)&button_screen);
while(entry->id)
{
diff --git a/test/guix_test/regression_test/tests/validation_guix_prompt_event_process_no_output.c b/test/guix_test/regression_test/tests/validation_guix_prompt_event_process_no_output.c
index 7066176a8..a899ec722 100644
--- a/test/guix_test/regression_test/tests/validation_guix_prompt_event_process_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_prompt_event_process_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_prompt.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -67,14 +70,14 @@ GX_STRING string;
GX_CHAR string_buffer[] = "test string";
GX_EVENT my_event;
- status = gx_prompt_event_process(GX_NULL, &my_event);
+ status = _gxe_prompt_event_process(GX_NULL, &my_event);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_prompt_event_process(&test_prompt, GX_NULL);
+ status = _gxe_prompt_event_process(&test_prompt, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&test_prompt, 0, sizeof(GX_PROMPT));
- status = gx_prompt_event_process(&test_prompt, &my_event);
+ status = _gxe_prompt_event_process(&test_prompt, &my_event);
EXPECT_EQ(GX_INVALID_WIDGET, status);
gx_widget_hide(&button_screen);
@@ -90,7 +93,7 @@ GX_EVENT my_event;
memset(&my_event, 0, sizeof(GX_EVENT));
my_event.gx_event_type = GX_EVENT_DELETE;
- status = gx_prompt_event_process(prompt, &my_event);
+ status = _gxe_prompt_event_process(prompt, &my_event);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_prompt_text_set_no_output.c b/test/guix_test/regression_test/tests/validation_guix_prompt_text_set_no_output.c
index 118ec33f8..c991b6b7b 100644
--- a/test/guix_test/regression_test/tests/validation_guix_prompt_text_set_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_prompt_text_set_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_prompt.h"
#include "gx_validation_utility.h"
#include "gx_scroll_wheel.h"
@@ -64,7 +67,7 @@ GX_PROMPT prompt;
#ifdef GX_ENABLE_DEPRECATED_STRING_API
GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
#endif
- status = gx_prompt_text_set_ext(GX_NULL, GX_NULL);
+ status = _gxe_prompt_text_set_ext(GX_NULL, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&prompt, 0, sizeof(GX_PROMPT));
@@ -73,22 +76,22 @@ GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
#ifdef GX_ENABLE_DEPRECATED_STRING_API
memset(invalid_string, 'x', sizeof(invalid_string));
- status = gx_prompt_text_set(&prompt, invalid_string);
+ status = _gxe_prompt_text_set(&prompt, invalid_string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
#endif
string.gx_string_ptr = test_string;
string.gx_string_length = sizeof(test_string) - 2;
- status = gx_prompt_text_set_ext(&prompt, &string);
+ status = _gxe_prompt_text_set_ext(&prompt, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_ptr = GX_NULL;
string.gx_string_length = 2;
- status = gx_prompt_text_set_ext(&prompt, &string);
+ status = _gxe_prompt_text_set_ext(&prompt, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_ptr = test_string;
string.gx_string_length = sizeof(test_string) - 1;
- status = gx_prompt_text_set_ext(&prompt, &string);
+ status = _gxe_prompt_text_set_ext(&prompt, &string);
EXPECT_EQ(GX_SUCCESS, status);
/* Test if text been set successfully. */
@@ -98,7 +101,7 @@ GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
failed_tests++;
}
- status = gx_prompt_text_set_ext(&prompt, GX_NULL);
+ status = _gxe_prompt_text_set_ext(&prompt, GX_NULL);
EXPECT_EQ(GX_SUCCESS, status);
/* Test if text been set successfully. */
diff --git a/test/guix_test/regression_test/tests/validation_guix_scroll_wheel_callback_set_no_output.c b/test/guix_test/regression_test/tests/validation_guix_scroll_wheel_callback_set_no_output.c
index 466b1d037..5cf8d72a8 100644
--- a/test/guix_test/regression_test/tests/validation_guix_scroll_wheel_callback_set_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_scroll_wheel_callback_set_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_scroll_wheel.h"
#include "gx_validation_utility.h"
#include "gx_system.h"
@@ -90,14 +93,14 @@ int failed_tests = 0;
UINT status;
GX_TEXT_SCROLL_WHEEL widget;
- status = gx_text_scroll_wheel_callback_set_ext(GX_NULL, test_callback);
+ status = _gxe_text_scroll_wheel_callback_set_ext((GX_TEXT_SCROLL_WHEEL *)GX_NULL, (UINT(*)(GX_TEXT_SCROLL_WHEEL *, INT, GX_STRING *)) test_callback);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&widget, 0, sizeof(GX_TEXT_SCROLL_WHEEL));
- status = gx_text_scroll_wheel_callback_set_ext(&widget, GX_NULL);
+ status = _gxe_text_scroll_wheel_callback_set_ext((GX_TEXT_SCROLL_WHEEL *)&widget, (UINT(*)(GX_TEXT_SCROLL_WHEEL *, INT, GX_STRING *)) GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_text_scroll_wheel_callback_set_ext(&widget, test_callback);
+ status = _gxe_text_scroll_wheel_callback_set_ext((GX_TEXT_SCROLL_WHEEL *)&widget, (UINT(*)(GX_TEXT_SCROLL_WHEEL *, INT, GX_STRING *)) test_callback);
EXPECT_EQ(GX_INVALID_WIDGET, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_scrollbar_value_set.c b/test/guix_test/regression_test/tests/validation_guix_scrollbar_value_set.c
index ba6c51a52..d6c36384d 100644
--- a/test/guix_test/regression_test/tests/validation_guix_scrollbar_value_set.c
+++ b/test/guix_test/regression_test/tests/validation_guix_scrollbar_value_set.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_scrollbar.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -87,16 +90,16 @@ GX_SCROLLBAR scrollbar;
UINT status;
INT failed_tests = 0;
- status = gx_scrollbar_value_set(GX_NULL, 0);
+ status = _gxe_scrollbar_value_set(GX_NULL, 0);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&scrollbar, 0, sizeof(GX_SCROLLBAR));
- status = gx_scrollbar_value_set(&scrollbar, 0);
+ status = _gxe_scrollbar_value_set(&scrollbar, 0);
EXPECT_EQ(GX_INVALID_WIDGET, status);
ToggleScreen(pWindowScreen, pButtonScreen);
- gx_scrollbar_value_set(test_scroll, 100);
+ _gxe_scrollbar_value_set(test_scroll, 100);
gx_validation_set_frame_id(frame_id++);
gx_validation_set_frame_comment("set vertical scroll value to 100");
diff --git a/test/guix_test/regression_test/tests/validation_guix_sl_input_text_set_no_output.c b/test/guix_test/regression_test/tests/validation_guix_sl_input_text_set_no_output.c
index faaf5bf73..f402d397d 100644
--- a/test/guix_test/regression_test/tests/validation_guix_sl_input_text_set_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_sl_input_text_set_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_single_line_text_input.h"
#include "gx_validation_utility.h"
#include "gx_scroll_wheel.h"
@@ -65,11 +68,11 @@ GX_CHAR input_buffer[20];
GX_STRING string;
GX_CONST GX_CHAR test_string[] = "test";
- status = gx_single_line_text_input_text_set_ext(GX_NULL, GX_NULL);
+ status = _gxe_single_line_text_input_text_set_ext(GX_NULL, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&sl_input, 0, sizeof(GX_SINGLE_LINE_TEXT_INPUT));
- status = gx_single_line_text_input_text_set_ext(&sl_input, GX_NULL);
+ status = _gxe_single_line_text_input_text_set_ext(&sl_input, GX_NULL);
EXPECT_EQ(GX_INVALID_WIDGET, status);
gx_utility_rectangle_define(&size, 0, 0, 100, 100);
@@ -77,24 +80,24 @@ GX_CONST GX_CHAR test_string[] = "test";
string.gx_string_ptr = test_string;
string.gx_string_length = sizeof(test_string) - 2;
- status = gx_single_line_text_input_text_set_ext(&sl_input, &string);
+ status = _gxe_single_line_text_input_text_set_ext(&sl_input, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_length = sizeof(test_string);
- status = gx_single_line_text_input_text_set_ext(&sl_input, &string);
+ status = _gxe_single_line_text_input_text_set_ext(&sl_input, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
- status = gx_single_line_text_input_text_set_ext(&sl_input, GX_NULL);
+ status = _gxe_single_line_text_input_text_set_ext(&sl_input, GX_NULL);
EXPECT_EQ(GX_SUCCESS, status);
string.gx_string_ptr = GX_NULL;
string.gx_string_length = 1;
- status = gx_single_line_text_input_text_set_ext(&sl_input, &string);
+ status = _gxe_single_line_text_input_text_set_ext(&sl_input, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
#ifdef GX_ENABLE_DEPRECATED_STRING_API
memset(invalid_string, 'x', sizeof(invalid_string));
- status = gx_single_line_text_input_text_set(&sl_input, invalid_string);
+ status = _gxe_single_line_text_input_text_set(&sl_input, invalid_string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
#endif
diff --git a/test/guix_test/regression_test/tests/validation_guix_standalone_binres_load_16bpp.c b/test/guix_test/regression_test/tests/validation_guix_standalone_binres_load_16bpp.c
index 8b9c05ffb..d4074422b 100644
--- a/test/guix_test/regression_test/tests/validation_guix_standalone_binres_load_16bpp.c
+++ b/test/guix_test/regression_test/tests/validation_guix_standalone_binres_load_16bpp.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
@@ -89,23 +91,23 @@ static VOID control_thread_entry(ULONG input)
int frame_id = 1;
int failed_tests = 0;
UINT status;
-UINT buffer_size;
+ULONG buffer_size;
gx_validation_set_frame_id(frame_id++);
gx_validation_set_frame_comment("565rgb screen");
gx_validation_screen_refresh();
- ToggleScreen(&screen_4444argb, &main_screen);
+ ToggleScreen((GX_WINDOW *)&screen_4444argb, (GX_WINDOW *)&main_screen);
gx_validation_set_frame_id(frame_id++);
gx_validation_set_frame_comment("444argb screen");
gx_validation_screen_refresh();
- ToggleScreen(&screen_8bit_palette, &screen_4444argb);
+ ToggleScreen((GX_WINDOW *)&screen_8bit_palette, (GX_WINDOW *)&screen_4444argb);
gx_validation_set_frame_id(frame_id++);
gx_validation_set_frame_comment("8bit palette screen");
gx_validation_screen_refresh();
- ToggleScreen(&screen_alphamap, &screen_8bit_palette);
+ ToggleScreen((GX_WINDOW *)&screen_alphamap, (GX_WINDOW *)&screen_8bit_palette);
gx_validation_set_frame_id(frame_id++);
gx_validation_set_frame_comment("alphamap screen");
gx_validation_screen_refresh();
diff --git a/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_create_no_output.c b/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_create_no_output.c
index a66b01ad0..9052909d7 100644
--- a/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_create_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_create_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -77,36 +79,36 @@ GX_STRING_SCROLL_WHEEL wheel;
GX_RECTANGLE size;
GX_WIDGET parent;
- status = gx_string_scroll_wheel_create_ext(GX_NULL, "", GX_NULL, 0, GX_NULL, 0, 0, GX_NULL);
+ status = _gxe_string_scroll_wheel_create_ext(GX_NULL, "", GX_NULL, 0, GX_NULL, 0, 0, GX_NULL, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&wheel, 0, sizeof(GX_STRING_SCROLL_WHEEL));
- status = gx_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, 0, GX_NULL, 0, 0, GX_NULL);
+ status = _gxe_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, 0, GX_NULL, 0, 0, GX_NULL, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_PTR_ERROR, status);
gx_utility_rectangle_define(&size, 0, 0, 100, 100);
memset(&parent, 0, sizeof(GX_WIDGET));
- status = gx_string_scroll_wheel_create_ext(&wheel, "", &parent, 0, GX_NULL, 0, 0, &size);
+ status = _gxe_string_scroll_wheel_create_ext(&wheel, "", &parent, 0, GX_NULL, 0, 0, &size, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_INVALID_WIDGET, status);
status = _gxe_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, 0, GX_NULL, 0, 0, &size, 0);
EXPECT_EQ(GX_INVALID_SIZE, status);
- status = gx_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, sizeof(test_string_list_1)/sizeof(GX_STRING), test_string_list_1, 0, 0, &size);
+ status = _gxe_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, sizeof(test_string_list_1)/sizeof(GX_STRING), test_string_list_1, 0, 0, &size, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
- status = gx_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, sizeof(test_string_list_2)/sizeof(GX_STRING), test_string_list_2, 0, 0, &size);
+ status = _gxe_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, sizeof(test_string_list_2)/sizeof(GX_STRING), test_string_list_2, 0, 0, &size, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
- status = gx_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, sizeof(test_string_list_3)/sizeof(GX_STRING), test_string_list_3, 0, 0, &size);
+ status = _gxe_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, sizeof(test_string_list_3)/sizeof(GX_STRING), test_string_list_3, 0, 0, &size, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_SUCCESS, status);
- status = gx_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, 0, GX_NULL, 0, 0, &size);
+ status = _gxe_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, 0, GX_NULL, 0, 0, &size, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_ALREADY_CREATED, status);
#ifdef GX_ENABLE_DEPRECATED_STRING_API
memset(&wheel, 0, sizeof(GX_STRING_SCROLL_WHEEL));
- status = gx_string_scroll_wheel_create(&wheel, "", (GX_WIDGET *)root, 0, GX_NULL, 0, 0, &size);
+ status = _gxe_string_scroll_wheel_create(&wheel, "", (GX_WIDGET *)root, 0, GX_NULL, 0, 0, &size, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_SUCCESS, status);
#endif
diff --git a/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_event_process_no_output.c b/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_event_process_no_output.c
index 21fdd1185..eaa6de593 100644
--- a/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_event_process_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_event_process_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_scroll_wheel.h"
#include "gx_validation_utility.h"
#include "gx_widget.h"
@@ -88,40 +91,40 @@ GX_EVENT my_event;
gx_utility_rectangle_define(&size, 0, 0, 100, 100);
- status = gx_string_scroll_wheel_event_process(GX_NULL, &my_event);
+ status = _gxe_string_scroll_wheel_event_process(GX_NULL, &my_event);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_string_scroll_wheel_event_process(&wheel, GX_NULL);
+ status = _gxe_string_scroll_wheel_event_process(&wheel, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&wheel, 0, sizeof(GX_STRING_SCROLL_WHEEL));
- status = gx_string_scroll_wheel_event_process(&wheel, &my_event);
+ status = _gxe_string_scroll_wheel_event_process(&wheel, &my_event);
EXPECT_EQ(GX_INVALID_WIDGET, status);
- status = gx_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, 0, GX_NULL, GX_STYLE_TEXT_COPY, 0, &size);
+ status = _gxe_string_scroll_wheel_create_ext(&wheel, "", GX_NULL, 0, GX_NULL, GX_STYLE_TEXT_COPY, 0, &size, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_SUCCESS, status);
- status = gx_string_scroll_wheel_string_list_set_ext(&wheel, test_string_list, STRING_COUNT);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(&wheel, test_string_list, STRING_COUNT);
EXPECT_EQ(GX_SUCCESS, status);
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
memset(&wheel_2, 0, sizeof(GX_STRING_SCROLL_WHEEL));
- status = gx_string_scroll_wheel_create(&wheel_2, "", GX_NULL, 0, GX_NULL, GX_STYLE_TEXT_COPY, 0, &size);
+ status = _gxe_string_scroll_wheel_create(&wheel_2, "", GX_NULL, 0, GX_NULL, GX_STYLE_TEXT_COPY, 0, &size, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_SUCCESS, status);
- status = gx_string_scroll_wheel_string_list_set(&wheel_2, test_deprecated_string_list, STRING_COUNT);
+ status = _gxe_string_scroll_wheel_string_list_set(&wheel_2, test_deprecated_string_list, STRING_COUNT);
EXPECT_EQ(GX_SUCCESS, status);
#endif
gx_system_memory_allocator_set(GX_NULL, GX_NULL);
my_event.gx_event_type = GX_EVENT_DELETE;
- status = gx_string_scroll_wheel_event_process(&wheel, &my_event);
+ status = _gxe_string_scroll_wheel_event_process(&wheel, &my_event);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
#if defined(GX_ENABLE_DEPRECATED_STRING_API)
- status = gx_string_scroll_wheel_event_process(&wheel_2, &my_event);
+ status = _gxe_string_scroll_wheel_event_process(&wheel_2, &my_event);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
#endif
diff --git a/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_string_list_set_no_output.c b/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_string_list_set_no_output.c
index 6a49bb101..6055ac86e 100644
--- a/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_string_list_set_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_string_scroll_wheel_string_list_set_no_output.c
@@ -9,11 +9,15 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_scroll_wheel.h"
+#include "gx_widget.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -90,40 +94,40 @@ GX_STRING_SCROLL_WHEEL wheel;
GX_RECTANGLE size;
/* Call with Null pointer widget. */
- status = gx_string_scroll_wheel_string_list_set_ext(GX_NULL, GX_NULL, 0);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(GX_NULL, GX_NULL, 0);
EXPECT_EQ(GX_PTR_ERROR, status);
/* Call with invalid widget. */
memset(&wheel, 0, sizeof(GX_STRING_SCROLL_WHEEL));
- status = gx_string_scroll_wheel_string_list_set_ext(&wheel, test_string_list_1, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(&wheel, test_string_list_1, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_INVALID_WIDGET, status);
/* Create string scroll wheel for testing. */
gx_utility_rectangle_define(&size, 0, 0, 100, 100);
- status = gx_string_scroll_wheel_create_ext(&wheel, "test_wheel", NULL, 0, GX_NULL, GX_STYLE_ENABLED, 1024, &size);
+ status = _gxe_string_scroll_wheel_create_ext(&wheel, "test_wheel", NULL, 0, GX_NULL, GX_STYLE_ENABLED, 1024, &size, sizeof(GX_STRING_SCROLL_WHEEL));
EXPECT_EQ(GX_SUCCESS, status);
/* Set string list that contains invalid string. */
- status = gx_string_scroll_wheel_string_list_set_ext(&wheel, test_string_list_1, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(&wheel, test_string_list_1, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
/* Set string list that contains invalid string. */
- status = gx_string_scroll_wheel_string_list_set_ext(&wheel, test_string_list_2, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(&wheel, test_string_list_2, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
/* Set string list with invalid string list count. */
- status = gx_string_scroll_wheel_string_list_set_ext(&wheel, test_string_list_2, -1);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(&wheel, test_string_list_2, -1);
EXPECT_EQ(GX_INVALID_VALUE, status);
/* Set null pointer string list. */
- status = gx_string_scroll_wheel_string_list_set_ext(&wheel, GX_NULL, 0);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(&wheel, GX_NULL, 0);
EXPECT_EQ(GX_SUCCESS, status);
/* Added text copy style. */
gx_widget_style_add(&wheel, GX_STYLE_TEXT_COPY);
/* Set new version string list. */
- status = gx_string_scroll_wheel_string_list_set_ext(&wheel, test_valid_string_list, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(&wheel, test_valid_string_list, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_SUCCESS, status);
/* Set memory allocator and free funciton to NULL. */
@@ -131,43 +135,43 @@ GX_RECTANGLE size;
#ifdef GX_ENABLE_DEPRECATED_STRING_API
/* Set old version string list. */
- status = gx_string_scroll_wheel_string_list_set(&wheel, test_valid_old_string_list, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_list_set(&wheel, test_valid_old_string_list, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
#endif
/* Set string id list. */
- status = gx_string_scroll_wheel_string_id_list_set(&wheel, test_string_id_list, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_id_list_set(&wheel, test_string_id_list, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
#ifdef GX_ENABLE_DEPRECATED_STRING_API
/* Set valid memory allocator and free function, and set old version string list. */
gx_system_memory_allocator_set(rotate_memory_allocate, rotate_memory_free);
- status = gx_string_scroll_wheel_string_list_set(&wheel, test_valid_old_string_list, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_list_set(&wheel, test_valid_old_string_list, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_SUCCESS, status);
/* Set memory allocator and free function to NULL, and set new version string list. */
gx_system_memory_allocator_set(GX_NULL, GX_NULL);
- status = gx_string_scroll_wheel_string_list_set_ext(&wheel, test_valid_string_list, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(&wheel, test_valid_string_list, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
/* Set string id list. */
- status = gx_string_scroll_wheel_string_id_list_set(&wheel, test_string_id_list, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_id_list_set(&wheel, test_string_id_list, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
#endif
gx_system_memory_allocator_set(test_memory_allocate, rotate_memory_free);
- status = gx_string_scroll_wheel_string_list_set_ext(&wheel, test_valid_string_list, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(&wheel, test_valid_string_list, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
/* Set valid memory allocate and free function. */
gx_system_memory_allocator_set(rotate_memory_allocate, rotate_memory_free);
/* Set new version string list. */
- status = gx_string_scroll_wheel_string_list_set_ext(&wheel, test_valid_string_list, TEST_STRING_LIST_SIZE);
+ status = _gxe_string_scroll_wheel_string_list_set_ext(&wheel, test_valid_string_list, TEST_STRING_LIST_SIZE);
EXPECT_EQ(GX_SUCCESS, status);
/* Delete string scroll wheel widget. */
- status = gx_widget_delete(&wheel);
+ status = _gxe_widget_delete((GX_WIDGET *)&wheel);
EXPECT_EQ(GX_SUCCESS, status);
/* Test if string list been freed. */
diff --git a/test/guix_test/regression_test/tests/validation_guix_string_to_alphamap_no_output.c b/test/guix_test/regression_test/tests/validation_guix_string_to_alphamap_no_output.c
index fafa72d9b..d8e8a8990 100644
--- a/test/guix_test/regression_test/tests/validation_guix_string_to_alphamap_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_string_to_alphamap_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_utility.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -65,39 +68,39 @@ GX_CONST GX_CHAR test_string[] = "test";
GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
memset(invalid_string, 'x', GX_MAX_STRING_LENGTH + 1);
- status = gx_utility_string_to_alphamap(invalid_string, font, &textmap);
+ status = _gxe_utility_string_to_alphamap(invalid_string, font, &textmap);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
#endif
- status = gx_utility_string_to_alphamap_ext(GX_NULL, font, &textmap);
+ status = _gxe_utility_string_to_alphamap_ext(GX_NULL, font, &textmap);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&string, 0, sizeof(GX_STRING));
- status = gx_utility_string_to_alphamap_ext(&string, font, &textmap);
+ status = _gxe_utility_string_to_alphamap_ext(&string, font, &textmap);
EXPECT_EQ(GX_PTR_ERROR, status);
string.gx_string_ptr = test_string;
string.gx_string_length = sizeof(test_string) - 1;
- status = gx_utility_string_to_alphamap_ext(&string, GX_NULL, &textmap);
+ status = _gxe_utility_string_to_alphamap_ext(&string, GX_NULL, &textmap);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_utility_string_to_alphamap_ext(&string, font, GX_NULL);
+ status = _gxe_utility_string_to_alphamap_ext(&string, font, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
string.gx_string_length = sizeof(test_string) - 2;
- status = gx_utility_string_to_alphamap_ext(&string, font, &textmap);
+ status = _gxe_utility_string_to_alphamap_ext(&string, font, &textmap);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_length = sizeof(test_string);
- status = gx_utility_string_to_alphamap_ext(&string, font, &textmap);
+ status = _gxe_utility_string_to_alphamap_ext(&string, font, &textmap);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_length = sizeof(test_string) - 1;
gx_system_memory_allocator_set(rotate_memory_allocate, GX_NULL);
- status = gx_utility_string_to_alphamap_ext(&string, font, &textmap);
+ status = _gxe_utility_string_to_alphamap_ext(&string, font, &textmap);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
gx_system_memory_allocator_set(GX_NULL, rotate_memory_free);
- status = gx_utility_string_to_alphamap_ext(&string, font, &textmap);
+ status = _gxe_utility_string_to_alphamap_ext(&string, font, &textmap);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_system_free_view_get_no_output.c b/test/guix_test/regression_test/tests/validation_guix_system_free_view_get_no_output.c
index 157ede5c8..5a06cb2f7 100644
--- a/test/guix_test/regression_test/tests/validation_guix_system_free_view_get_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_system_free_view_get_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -52,61 +54,37 @@ VOID tx_application_define(void *first_unused_memory)
#include "gx_validation_wrapper.h"
#include "demo_guix_all_widgets.c"
+/* Exhaust and restore the available view pool while drawing is locked. */
static VOID control_thread_entry(ULONG input)
{
-INT failed_tests = 0;
-GX_WINDOW window[GX_MAX_VIEWS / 2];
-int width;
-int height;
-GX_RECTANGLE size;
-int widget_width;
-int widget_height;
-int x_count;
-int y_count;
-int x, y;
-int index = 0;
-GX_EVENT my_event;
-
- gx_widget_detach(&button_screen);
- gx_widget_width_get(root, (GX_VALUE *)&width);
- gx_widget_height_get(root, (GX_VALUE *)&height);
-
- width -= 20;
- height -= 20;
+INT failed_tests = 0;
+UINT views_used = 0;
+GX_VIEW *saved_views;
+GX_VIEW *view;
- y_count = 4;
- x_count = GX_MAX_VIEWS / 2 / y_count;
+ GX_ENTER_CRITICAL
+ saved_views = _gx_system_free_views;
- widget_width = width / x_count;
- widget_height = height / y_count;
-
- for(y = 0; y < y_count; y++)
+ while ((_gx_system_free_views != GX_NULL) && (views_used < GX_MAX_VIEWS))
{
- size.gx_rectangle_top = 10 + y * widget_height;
- size.gx_rectangle_bottom = size.gx_rectangle_top + widget_height - 10;
- for(x = 0; x < x_count; x++)
- {
- size.gx_rectangle_left = 10 + y + x * widget_width;
- size.gx_rectangle_right = size.gx_rectangle_left + widget_width - 10;
-
- gx_window_create(&window[index], "test_window", root, 0, 1024 + index, &size);
- index++;
- }
+ view = _gx_system_free_view_get();
+ EXPECT_EQ(GX_TRUE, view != GX_NULL);
+ views_used++;
}
- memset(&my_event, 0, sizeof(GX_EVENT));
- my_event.gx_event_type = GX_EVENT_SHOW;
- my_event.gx_event_target = (GX_WIDGET *)root;
- gx_system_event_send(&my_event);
-
+ EXPECT_EQ(GX_TRUE, views_used > 0);
+ EXPECT_EQ(GX_NULL, _gx_system_free_views);
+ EXPECT_EQ(GX_NULL, _gx_system_free_view_get());
EXPECT_EQ(GX_SYSTEM_OUT_OF_VIEWS, _gx_system_last_error);
+ _gx_system_free_views = saved_views;
+ GX_EXIT_CRITICAL
- if(!failed_tests)
+ if (!failed_tests)
{
gx_validation_print_test_result(TEST_SUCCESS);
exit(0);
}
- else
+ else
{
gx_validation_print_test_result(TEST_FAIL);
exit(1);
diff --git a/test/guix_test/regression_test/tests/validation_guix_system_screen_stack_no_output.c b/test/guix_test/regression_test/tests/validation_guix_system_screen_stack_no_output.c
index dff8648cb..68729976b 100644
--- a/test/guix_test/regression_test/tests/validation_guix_system_screen_stack_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_system_screen_stack_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -16,6 +18,7 @@
#include "gx_api.h"
#include "gx_validation_utility.h"
#include "gx_utility.h"
+#include "gx_system.h"
TEST_PARAM test_parameter = {
"guix_system_screen_stack_no_output", /* Test name */
@@ -69,13 +72,13 @@ UINT status;
int failed_count = 0;
GX_WIDGET *parent = (GX_WIDGET *)&button_screen;
- status = gx_system_screen_stack_create(GX_NULL, 0);
+ status = _gxe_system_screen_stack_create(GX_NULL, 0, sizeof(GX_SCREEN_STACK_CONTROL));
if(status != GX_PTR_ERROR)
{
failed_count++;
}
- status = gx_system_screen_stack_create(screen_stack_memory, 0);
+ status = _gxe_system_screen_stack_create(screen_stack_memory, 0, sizeof(GX_SCREEN_STACK_CONTROL));
if(status != GX_INVALID_VALUE)
{
failed_count++;
@@ -87,46 +90,46 @@ GX_WIDGET *parent = (GX_WIDGET *)&button_screen;
failed_count++;
}
- status = gx_system_screen_stack_pop();
+ status = _gxe_system_screen_stack_pop();
if(status != GX_PTR_ERROR)
{
failed_count++;
}
- status = gx_system_screen_stack_get(GX_NULL, GX_NULL);
+ status = _gxe_system_screen_stack_get(GX_NULL, GX_NULL);
if(status != GX_PTR_ERROR)
{
failed_count++;
}
- status = gx_system_screen_stack_push(GX_NULL);
+ status = _gxe_system_screen_stack_push(GX_NULL);
if(status != GX_PTR_ERROR)
{
failed_count++;
}
- gx_system_screen_stack_create(screen_stack_memory, sizeof(GX_WIDGET *) * SCREEN_STACK_SIZE);
- status = gx_system_screen_stack_pop();
+ _gxe_system_screen_stack_create(screen_stack_memory, sizeof(GX_WIDGET *) * SCREEN_STACK_SIZE, sizeof(GX_SCREEN_STACK_CONTROL));
+ status = _gxe_system_screen_stack_pop();
if(status != GX_FAILURE)
{
failed_count++;
}
- gx_system_screen_stack_push((GX_WIDGET *)&window_screen);
- status = gx_system_screen_stack_push((GX_WIDGET *)&button_screen);
+ _gxe_system_screen_stack_push((GX_WIDGET *)&window_screen);
+ status = _gxe_system_screen_stack_push((GX_WIDGET *)&button_screen);
if(status != GX_FAILURE)
{
failed_count++;
}
- gx_system_screen_stack_get(&parent, GX_NULL);
+ _gxe_system_screen_stack_get(&parent, GX_NULL);
if(parent != GX_NULL)
{
failed_count++;
}
- gx_system_screen_stack_push((GX_WIDGET *)&window_screen);
- gx_system_screen_stack_pop();
+ _gxe_system_screen_stack_push((GX_WIDGET *)&window_screen);
+ _gxe_system_screen_stack_pop();
if(failed_count == 0)
{
diff --git a/test/guix_test/regression_test/tests/validation_guix_system_string_width_get_no_output.c b/test/guix_test/regression_test/tests/validation_guix_system_string_width_get_no_output.c
index 02eb67307..bb6401ba7 100644
--- a/test/guix_test/regression_test/tests/validation_guix_system_string_width_get_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_system_string_width_get_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -67,35 +69,35 @@ GX_FONT invalid_font = { 0x08, 0, 0, 18, 13, 0x20, 0x7e, {GX_NULL}, NU
GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
memset(invalid_string, 'x', GX_MAX_STRING_LENGTH + 1);
- status = gx_system_string_width_get(font, invalid_string, GX_MAX_STRING_LENGTH, &width);
+ status = _gxe_system_string_width_get(font, invalid_string, GX_MAX_STRING_LENGTH, &width);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
- status = gx_system_string_width_get(font, invalid_string, -1, &width);
+ status = _gxe_system_string_width_get(font, invalid_string, -1, &width);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
- status = gx_system_string_width_get(font, test_string, -1, &width);
+ status = _gxe_system_string_width_get(font, test_string, -1, &width);
EXPECT_EQ(GX_SUCCESS, status);
#endif
string.gx_string_ptr = test_string;
string.gx_string_length = sizeof(test_string) - 1;
- status = gx_system_string_width_get_ext(GX_NULL, &string, &width);
+ status = _gxe_system_string_width_get_ext(GX_NULL, &string, &width);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_system_string_width_get_ext(font, GX_NULL, &width);
+ status = _gxe_system_string_width_get_ext(font, GX_NULL, &width);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_system_string_width_get_ext(font, &string, GX_NULL);
+ status = _gxe_system_string_width_get_ext(font, &string, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_system_string_width_get_ext(&invalid_font, &string, &width);
+ status = _gxe_system_string_width_get_ext(&invalid_font, &string, &width);
EXPECT_EQ(GX_INVALID_FONT, status);
string.gx_string_length = sizeof(test_string) - 2;
- status = gx_system_string_width_get_ext(font, &string, &width);
+ status = _gxe_system_string_width_get_ext(font, &string, &width);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_length = sizeof(test_string);
- status = gx_system_string_width_get_ext(font, &string, &width);
+ status = _gxe_system_string_width_get_ext(font, &string, &width);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_system_version_string_get_no_output.c b/test/guix_test/regression_test/tests/validation_guix_system_version_string_get_no_output.c
index 52d7e652b..29ebd9525 100644
--- a/test/guix_test/regression_test/tests/validation_guix_system_version_string_get_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_system_version_string_get_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -59,14 +61,14 @@ int failed_tests = 0;
UINT status;
GX_STRING string;
- status = gx_system_version_string_get_ext(GX_NULL);
+ status = _gxe_system_version_string_get_ext(GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_system_version_string_get_ext(&string);
+ status = _gxe_system_version_string_get_ext(&string);
EXPECT_EQ(GX_SUCCESS, status);
memset(_gx_system_version_string, 'x', sizeof(_gx_system_version_string));
- status = gx_system_version_string_get_ext(&string);
+ status = _gxe_system_version_string_get_ext(&string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_text_button_event_process_no_output.c b/test/guix_test/regression_test/tests/validation_guix_text_button_event_process_no_output.c
index cfd360a11..bfd4e6d1c 100644
--- a/test/guix_test/regression_test/tests/validation_guix_text_button_event_process_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_text_button_event_process_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_button.h"
#include "gx_validation_utility.h"
#include "gx_system.h"
@@ -63,32 +66,32 @@ GX_TEXT_BUTTON button;
GX_RECTANGLE size;
GX_EVENT my_event;
- status = gx_text_button_event_process(GX_NULL, &my_event);
+ status = _gxe_text_button_event_process(GX_NULL, &my_event);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_text_button_event_process(&button, GX_NULL);
+ status = _gxe_text_button_event_process(&button, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
gx_utility_rectangle_define(&size, 0, 0, 100, 100);
memset(&button, 0, sizeof(GX_TEXT_BUTTON));
- status = gx_text_button_event_process(&button, &my_event);
+ status = _gxe_text_button_event_process(&button, &my_event);
EXPECT_EQ(GX_INVALID_WIDGET, status);
- status = gx_text_button_create(&button, "text button", GX_NULL, 0, GX_STYLE_TEXT_COPY, 0, &size);
+ status = _gxe_text_button_create(&button, "text button", (GX_WIDGET *)GX_NULL, 0, GX_STYLE_TEXT_COPY, 0, &size, sizeof(GX_TEXT_BUTTON));
EXPECT_EQ(GX_SUCCESS, status);
string.gx_string_ptr = string_buffer;
string.gx_string_length = sizeof(string_buffer) - 1;
- status = gx_text_button_text_set_ext(&button, &string);
+ status = _gxe_text_button_text_set_ext(&button, &string);
EXPECT_EQ(GX_SUCCESS, status);
gx_system_memory_allocator_set(GX_NULL, GX_NULL);
memset(&my_event, 0, sizeof(GX_EVENT));
my_event.gx_event_type = GX_EVENT_DELETE;
- status = gx_text_button_event_process(&button, &my_event);
+ status = _gxe_text_button_event_process(&button, &my_event);
EXPECT_EQ(GX_SYSTEM_MEMORY_ERROR, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_text_button_text_get_no_output.c b/test/guix_test/regression_test/tests/validation_guix_text_button_text_get_no_output.c
index dae817ea7..c63536c05 100644
--- a/test/guix_test/regression_test/tests/validation_guix_text_button_text_get_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_text_button_text_get_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_button.h"
#include "gx_validation_utility.h"
#include "gx_system.h"
@@ -61,18 +64,18 @@ GX_STRING string;
GX_TEXT_BUTTON button;
GX_CONST GX_CHAR *text;
- status = gx_text_button_text_get_ext(GX_NULL, &string);
+ status = _gxe_text_button_text_get_ext(GX_NULL, &string);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&button, 0, sizeof(GX_BUTTON));
- status = gx_text_button_text_get_ext(&button, GX_NULL);
+ status = _gxe_text_button_text_get_ext(&button, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_text_button_text_get_ext(&button, &string);
+ status = _gxe_text_button_text_get_ext(&button, &string);
EXPECT_EQ(GX_INVALID_WIDGET, status);
gx_widget_hide(&button_screen);
- status = gx_text_button_text_get(&button_screen.button_screen_text_button_1, &text);
+ status = _gxe_text_button_text_get(&button_screen.button_screen_text_button_1, &text);
EXPECT_EQ(GX_INVALID_CANVAS, status);
diff --git a/test/guix_test/regression_test/tests/validation_guix_text_button_text_set_no_output.c b/test/guix_test/regression_test/tests/validation_guix_text_button_text_set_no_output.c
index f545bdb31..b2ca8c846 100644
--- a/test/guix_test/regression_test/tests/validation_guix_text_button_text_set_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_text_button_text_set_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_button.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
@@ -65,11 +68,11 @@ GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
#endif
string.gx_string_ptr = test_string;
string.gx_string_length = sizeof(test_string) - 1;
- status = gx_text_button_text_set_ext(GX_NULL, &string);
+ status = _gxe_text_button_text_set_ext(GX_NULL, &string);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&button, 0, sizeof(GX_TEXT_BUTTON));
- status = gx_text_button_text_set_ext(&button, &string);
+ status = _gxe_text_button_text_set_ext(&button, &string);
EXPECT_EQ(GX_INVALID_WIDGET, status);
gx_utility_rectangle_define(&size, 0, 0, 100, 100);
@@ -77,19 +80,19 @@ GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
#ifdef GX_ENABLE_DEPRECATED_STRING_API
memset(invalid_string, 'x', sizeof(invalid_string));
- status = gx_text_button_text_set(&button, invalid_string);
+ status = _gxe_text_button_text_set(&button, invalid_string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
#endif
- status = gx_text_button_text_set_ext(&button, GX_NULL);
+ status = _gxe_text_button_text_set_ext(&button, GX_NULL);
EXPECT_EQ(GX_SUCCESS, status);
string.gx_string_length = sizeof(test_string) - 2;
- status = gx_text_button_text_set_ext(&button, &string);
+ status = _gxe_text_button_text_set_ext(&button, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
string.gx_string_length = sizeof(test_string);
- status = gx_text_button_text_set_ext(&button, &string);
+ status = _gxe_text_button_text_set_ext(&button, &string);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_text_scroll_wheel_event_process_no_output.c b/test/guix_test/regression_test/tests/validation_guix_text_scroll_wheel_event_process_no_output.c
index ac0d88182..5d377aa4f 100644
--- a/test/guix_test/regression_test/tests/validation_guix_text_scroll_wheel_event_process_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_text_scroll_wheel_event_process_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_scroll_wheel.h"
#include "gx_validation_utility.h"
#include "gx_widget.h"
@@ -60,23 +63,23 @@ GX_TEXT_SCROLL_WHEEL wheel;
GX_EVENT my_event;
GX_RECTANGLE size;
- status = gx_text_scroll_wheel_event_process(GX_NULL, &my_event);
+ status = _gxe_text_scroll_wheel_event_process(GX_NULL, &my_event);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_text_scroll_wheel_event_process(&wheel, GX_NULL);
+ status = _gxe_text_scroll_wheel_event_process(&wheel, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
memset(&wheel, 0, sizeof(GX_TEXT_SCROLL_WHEEL));
- status = gx_text_scroll_wheel_event_process(&wheel, &my_event);
+ status = _gxe_text_scroll_wheel_event_process(&wheel, &my_event);
EXPECT_EQ(GX_INVALID_WIDGET, status);
gx_utility_rectangle_define(&size, 0, 0, 100, 100);
- status = gx_text_scroll_wheel_create(&wheel, "", GX_NULL, 10, 0, 0, &size);
+ status = _gxe_text_scroll_wheel_create(&wheel, "", GX_NULL, 10, 0, 0, &size, sizeof(GX_TEXT_SCROLL_WHEEL));
EXPECT_EQ(GX_SUCCESS, status);
memset(&my_event, 0, sizeof(GX_EVENT));
my_event.gx_event_type = GX_EVENT_DELETE;
- status = gx_text_scroll_wheel_event_process(&wheel, &my_event);
+ status = _gxe_text_scroll_wheel_event_process(&wheel, &my_event);
EXPECT_EQ(GX_SUCCESS, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/tests/validation_guix_utility_no_output.c b/test/guix_test/regression_test/tests/validation_guix_utility_no_output.c
index 395253d3e..25d883230 100644
--- a/test/guix_test/regression_test/tests/validation_guix_utility_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_utility_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -16,6 +18,7 @@
#include "gx_api.h"
#include "gx_validation_utility.h"
#include "gx_utility.h"
+#include "gx_text_input_cursor.h"
TEST_PARAM test_parameter = {
"guix_utility_no_output", /* Test name */
@@ -78,6 +81,7 @@ UINT expect_status;
GX_POINT point;
GX_STRING string_1;
GX_STRING string_2;
+GX_TEXT_INPUT_CURSOR cursor;
/* Test invalid call to gx_utility_canvas_to_bmp. */
for(index = 0; index < 3; index++)
@@ -103,7 +107,7 @@ GX_STRING string_2;
}
gx_utility_rectangle_define(&rect, 0, 0, 100, 100);
- status = gx_utility_canvas_to_bmp(root->gx_window_root_canvas, &rect, write_data_callback);
+ status = _gxe_utility_canvas_to_bmp(root->gx_window_root_canvas, &rect, write_data_callback);
EXPECT_EQ(expect_status, status);
}
@@ -115,28 +119,28 @@ GX_STRING string_2;
memset(&map, 0, sizeof(GX_PIXELMAP));
map.gx_pixelmap_width = 50;
map.gx_pixelmap_height = 50;
- status = gx_utility_pixelmap_resize(&map, &destination, 100, 100);
+ status = _gxe_utility_pixelmap_resize(&map, &destination, 100, 100);
EXPECT_EQ(GX_NOT_SUPPORTED, status);
/* Test gx_utility_pixelmap_rotate. */
- status = gx_utility_pixelmap_rotate(&map, 30, &destination, GX_NULL, GX_NULL);
+ status = _gxe_utility_pixelmap_rotate(&map, 30, &destination, GX_NULL, GX_NULL);
EXPECT_EQ(GX_INVALID_FORMAT, status);
map.gx_pixelmap_format = GX_COLOR_FORMAT_32ARGB;
map.gx_pixelmap_flags = GX_PIXELMAP_COMPRESSED;
- status = gx_utility_pixelmap_rotate(&map, 30, &destination, GX_NULL, GX_NULL);
+ status = _gxe_utility_pixelmap_rotate(&map, 30, &destination, GX_NULL, GX_NULL);
EXPECT_EQ(GX_INVALID_FORMAT, status);
/* Test gx_utility_pixelmap_simple_rotate. */
- status = gx_utility_pixelmap_simple_rotate(&map, 30, &destination, GX_NULL, GX_NULL);
+ status = _gxe_utility_pixelmap_simple_rotate(&map, 30, &destination, GX_NULL, GX_NULL);
EXPECT_EQ(GX_INVALID_VALUE, status);
- status = gx_utility_pixelmap_simple_rotate(&map, 90, &destination, GX_NULL, GX_NULL);
+ status = _gxe_utility_pixelmap_simple_rotate(&map, 90, &destination, GX_NULL, GX_NULL);
EXPECT_EQ(GX_INVALID_FORMAT, status);
map.gx_pixelmap_flags = 0;
map.gx_pixelmap_format = 0;
- status = gx_utility_pixelmap_simple_rotate(&map, 90, &destination, GX_NULL, GX_NULL);
+ status = _gxe_utility_pixelmap_simple_rotate(&map, 90, &destination, GX_NULL, GX_NULL);
EXPECT_EQ(GX_INVALID_FORMAT, status);
/* Test _gx_utility_gradient_create. */
@@ -169,6 +173,19 @@ GX_STRING string_2;
failed_tests++;
}
+ /* The core setter clears custom height; the checked API rejects zero. */
+ memset(&cursor, 0, sizeof(GX_TEXT_INPUT_CURSOR));
+ status = _gxe_text_input_cursor_height_set((GX_TEXT_INPUT_CURSOR *)&cursor, 5);
+ EXPECT_EQ(GX_SUCCESS, status);
+ EXPECT_EQ(5, cursor.gx_text_input_cursor_height);
+ EXPECT_EQ(GX_CURSOR_USE_CUSTOM_HEIGHT, cursor.gx_text_input_cursor_flags & GX_CURSOR_USE_CUSTOM_HEIGHT);
+ status = _gxe_text_input_cursor_height_set(&cursor, 0);
+ EXPECT_EQ(GX_INVALID_VALUE, status);
+ EXPECT_EQ(GX_CURSOR_USE_CUSTOM_HEIGHT, cursor.gx_text_input_cursor_flags & GX_CURSOR_USE_CUSTOM_HEIGHT);
+ status = _gx_text_input_cursor_height_set(&cursor, 0);
+ EXPECT_EQ(GX_SUCCESS, status);
+ EXPECT_EQ(0, cursor.gx_text_input_cursor_flags & GX_CURSOR_USE_CUSTOM_HEIGHT);
+
/* Test gx_utility_math_asin. */
angle = gx_utility_math_asin(GX_FIXED_VAL_MAKE(300));
EXPECT_EQ(0, angle);
@@ -177,13 +194,13 @@ GX_STRING string_2;
status = _gx_utility_string_length_check("test", GX_NULL, 4);
EXPECT_EQ(GX_SUCCESS, status);
- status = gx_utility_circle_point_get(0, 0, 100, -90, &point);
+ status = _gxe_utility_circle_point_get(0, 0, 100, -90, &point);
EXPECT_EQ(GX_SUCCESS, status);
- status = gx_utility_circle_point_get(0, 0, 100, 90, GX_NULL);
+ status = _gxe_utility_circle_point_get(0, 0, 100, 90, GX_NULL);
EXPECT_EQ(GX_PTR_ERROR, status);
- status = gx_utility_circle_point_get(0, 0, 0, 90, &point);
+ status = _gxe_utility_circle_point_get(0, 0, 0, 90, &point);
EXPECT_EQ(GX_INVALID_VALUE, status);
string_1.gx_string_ptr = text_short;
diff --git a/test/guix_test/regression_test/tests/validation_guix_vertical_list_scroll_with_large_value.c b/test/guix_test/regression_test/tests/validation_guix_vertical_list_scroll_with_large_value.c
index afc7c36c2..bf1b616c0 100644
--- a/test/guix_test/regression_test/tests/validation_guix_vertical_list_scroll_with_large_value.c
+++ b/test/guix_test/regression_test/tests/validation_guix_vertical_list_scroll_with_large_value.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_system.h"
#include "gx_validation_utility.h"
TEST_PARAM test_parameter = {
diff --git a/test/guix_test/regression_test/tests/validation_guix_vertical_screen_drag_animation_with_block_move.c b/test/guix_test/regression_test/tests/validation_guix_vertical_screen_drag_animation_with_block_move.c
index 19e1dcb99..774cdcb28 100644
--- a/test/guix_test/regression_test/tests/validation_guix_vertical_screen_drag_animation_with_block_move.c
+++ b/test/guix_test/regression_test/tests/validation_guix_vertical_screen_drag_animation_with_block_move.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -129,8 +131,8 @@ INT style_index;
{
if(style_index)
{
- gx_animation_drag_disable(&v_screen_drag_animation, &main_screen.main_screen_v_menu_window);
- enable_screen_drag_animation(&v_screen_drag_animation, v_screen_list, &main_screen.main_screen_v_menu_window,
+ gx_animation_drag_disable(&v_screen_drag_animation, (GX_WIDGET *)&main_screen.main_screen_v_menu_window);
+ enable_screen_drag_animation(&v_screen_drag_animation, v_screen_list, (GX_WIDGET *)&main_screen.main_screen_v_menu_window,
GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_VERTICAL | GX_ANIMATION_BLOCK_MOVE,
ANIMATION_ID_V_SCREEN_DRAG);
}
diff --git a/test/guix_test/regression_test/tests/validation_guix_vertical_screen_drag_animation_with_canvas.c b/test/guix_test/regression_test/tests/validation_guix_vertical_screen_drag_animation_with_canvas.c
index 5fc23be50..2ba2478dd 100644
--- a/test/guix_test/regression_test/tests/validation_guix_vertical_screen_drag_animation_with_canvas.c
+++ b/test/guix_test/regression_test/tests/validation_guix_vertical_screen_drag_animation_with_canvas.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -129,8 +131,8 @@ INT style_index;
{
if(style_index)
{
- gx_animation_drag_disable(&v_screen_drag_animation, &main_screen.main_screen_v_menu_window);
- enable_screen_drag_animation(&v_screen_drag_animation, v_screen_list, &main_screen.main_screen_v_menu_window,
+ gx_animation_drag_disable(&v_screen_drag_animation, (GX_WIDGET *)&main_screen.main_screen_v_menu_window);
+ enable_screen_drag_animation(&v_screen_drag_animation, v_screen_list, (GX_WIDGET *)&main_screen.main_screen_v_menu_window,
GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_VERTICAL,
ANIMATION_ID_V_SCREEN_DRAG);
}
diff --git a/test/guix_test/regression_test/tests/validation_guix_widget_no_output.c b/test/guix_test/regression_test/tests/validation_guix_widget_no_output.c
index 0b544349f..63f55342e 100644
--- a/test/guix_test/regression_test/tests/validation_guix_widget_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_widget_no_output.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -220,10 +222,10 @@ GX_EVENT my_event;
EXPECT_EQ(GX_SUCCESS, status);
gx_widget_detach(&window_screen.window_screen_window_4);
- widget = _gx_widget_first_visible_client_child_get(&window_screen.window_screen_scroll_frame_1);
+ widget = _gx_widget_first_visible_client_child_get((GX_WIDGET *)&window_screen.window_screen_scroll_frame_1);
EXPECT_EQ(widget, GX_NULL);
- widget = _gx_widget_last_visible_client_child_get(&window_screen.window_screen_scroll_frame_1);
+ widget = _gx_widget_last_visible_client_child_get((GX_WIDGET *)&window_screen.window_screen_scroll_frame_1);
EXPECT_EQ(widget, GX_NULL);
widget = window_screen.window_screen_scroll_frame_1.gx_widget_first_child;
diff --git a/test/guix_test/regression_test/tests/validation_guix_widget_text_blend_no_output.c b/test/guix_test/regression_test/tests/validation_guix_widget_text_blend_no_output.c
index 59574f2b0..2259544c0 100644
--- a/test/guix_test/regression_test/tests/validation_guix_widget_text_blend_no_output.c
+++ b/test/guix_test/regression_test/tests/validation_guix_widget_text_blend_no_output.c
@@ -9,11 +9,14 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+/* Portions of this file were generated with AI assistance. */
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
#include "tx_api.h"
#include "gx_api.h"
+#include "gx_widget.h"
#include "gx_validation_utility.h"
#include "gx_system.h"
@@ -63,15 +66,15 @@ GX_WIDGET widget;
GX_CHAR invalid_string[GX_MAX_STRING_LENGTH + 1];
memset(&widget, 0, sizeof(GX_WIDGET));
- status = gx_widget_text_blend(&widget, 0, 0, GX_NULL, 0, 0, 128);
+ status = _gxe_widget_text_blend((GX_WIDGET *)&widget, 0, 0, GX_NULL, 0, 0, 128);
EXPECT_EQ(GX_INVALID_WIDGET, status);
memset(invalid_string, 'x', GX_MAX_STRING_LENGTH + 1);
- status = gx_widget_text_blend(button, 0, 0, invalid_string, 0, 0, 128);
+ status = _gxe_widget_text_blend((GX_WIDGET *)button, 0, 0, invalid_string, 0, 0, 128);
EXPECT_EQ(GX_INVALID_STRING_LENGTH, status);
#endif
- status = gx_widget_text_blend_ext(button, 0, 0, GX_NULL, 0, 0, 128);
+ status = _gxe_widget_text_blend_ext((GX_WIDGET *)button, 0, 0, GX_NULL, 0, 0, 128);
EXPECT_EQ(GX_SUCCESS, status);
if(failed_tests == 0)
diff --git a/test/guix_test/regression_test/utility/gx_validation_binres_glyph_range.h b/test/guix_test/regression_test/utility/gx_validation_binres_glyph_range.h
new file mode 100644
index 000000000..ac1b65577
--- /dev/null
+++ b/test/guix_test/regression_test/utility/gx_validation_binres_glyph_range.h
@@ -0,0 +1,445 @@
+/***************************************************************************
+ * Copyright (c) 2026 Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5).
+ * The AI-generated portions may be considered public domain (CC0-1.0)
+ * and not subject to the project's licence. The human contributor has
+ * reviewed and verified that the code is correct.
+ *
+ * SPDX-License-Identifier: MIT and CC0-1.0
+ **************************************************************************/
+
+/* Glyph range and glyph buffer bound checks for the binary resource font
+ loader, shared by the tests that run them in each font configuration.
+
+ A font page header carries its glyph range as two values read verbatim from
+ the resource, and every consumer turns them into a count as
+ last - first + 1. Only the upper end was validated, so a page declaring a
+ first glyph above its last glyph made that count underflow to a very large
+ unsigned value. The reservation multiply then wrapped, and the buffer the
+ loader allocated was far smaller than the load pass went on to fill.
+
+ Both passes are driven. The size pass is where the range is first turned
+ into a count, and the load pass is where the glyph records are written. Each
+ is reached identically from both public entry points, gx_binres_theme_load()
+ and gx_binres_font_load(), because both call _gx_binres_font_buffer_size_get()
+ and _gx_binres_one_font_load().
+
+ The glyph formats are covered separately. Each reserves through its own
+ multiply and writes through its own writer, so a fix applied to the normal
+ format alone would leave the compressed and kerning formats reachable. A
+ build compiles the formats it supports, so which of them run here follows the
+ configuration the including test is built in. */
+
+#ifndef GX_VALIDATION_BINRES_GLYPH_RANGE_H
+#define GX_VALIDATION_BINRES_GLYPH_RANGE_H
+
+#include "gx_binres_loader.h"
+
+#ifdef GX_BINARY_RESOURCE_SUPPORT
+
+/* A font header followed by one page header and its glyph records. In the
+ resource format a glyph code is always stored as four bytes, independently of
+ how wide GX_CHAR_CODE is in the build. A kerning record carries one extra
+ USHORT after the fields the other formats share. */
+#define BINRES_FONT_HEADER_SIZE 16
+#define BINRES_PAGE_HEADER_SIZE 21
+#define BINRES_GLYPH_HEADER_SIZE 22
+#define BINRES_KERNING_GLYPH_HEADER_SIZE 24
+
+/* The range the well-formed cases use, 'A' through 'Z'. */
+#define BINRES_TEST_FIRST_GLYPH 0x00000041UL
+#define BINRES_TEST_LAST_GLYPH 0x0000005AUL
+#define BINRES_TEST_GLYPH_COUNT 26
+
+#define BINRES_TEST_FONT_SIZE (BINRES_FONT_HEADER_SIZE + BINRES_PAGE_HEADER_SIZE + \
+ (BINRES_TEST_GLYPH_COUNT * BINRES_KERNING_GLYPH_HEADER_SIZE))
+
+/* The widest glyph record the build compiles, which is what the load buffer has
+ to be sized against. */
+#if defined(GX_FONT_KERNING_SUPPORT)
+#define BINRES_TEST_MAX_RECORD sizeof(GX_KERNING_GLYPH)
+#else
+#define BINRES_TEST_MAX_RECORD sizeof(GX_COMPRESSED_GLYPH)
+#endif
+
+/* Room for one GX_FONT per page plus the widest glyph record for every glyph. */
+#define BINRES_TEST_BUFFER_SIZE (sizeof(GX_FONT) + \
+ (BINRES_TEST_GLYPH_COUNT * BINRES_TEST_MAX_RECORD))
+
+/* The load buffer is followed by a filled margin, so that a write past the size
+ the loader was given is caught wherever it comes from. Checking the returned
+ status is not enough on its own: a writer that overruns its bound can still
+ be stopped by a later one, and the load would report a rejection it did not
+ really make. */
+#define BINRES_MARGIN_SIZE 16
+#define BINRES_MARGIN_BYTE 0xA5
+
+static GX_UBYTE binres_test_font[BINRES_TEST_FONT_SIZE];
+static GX_UBYTE binres_test_buffer[BINRES_TEST_BUFFER_SIZE + BINRES_MARGIN_SIZE];
+static GX_BOOL binres_margin_intact;
+
+static VOID binres_put_u16(GX_UBYTE *p, ULONG value)
+{
+ p[0] = (GX_UBYTE)(value & 0xff);
+ p[1] = (GX_UBYTE)((value >> 8) & 0xff);
+}
+
+static VOID binres_put_u32(GX_UBYTE *p, ULONG value)
+{
+ p[0] = (GX_UBYTE)(value & 0xff);
+ p[1] = (GX_UBYTE)((value >> 8) & 0xff);
+ p[2] = (GX_UBYTE)((value >> 16) & 0xff);
+ p[3] = (GX_UBYTE)((value >> 24) & 0xff);
+}
+
+/* Return the size one glyph record occupies in the resource. */
+static UINT binres_record_size_get(GX_UBYTE format)
+{
+UINT size = BINRES_GLYPH_HEADER_SIZE;
+
+ if (format & GX_FONT_FORMAT_KERNING)
+ {
+ size = BINRES_KERNING_GLYPH_HEADER_SIZE;
+ }
+
+ return size;
+}
+
+/* Build a one-page font declaring the given glyph range and format, followed by
+ glyph_count well-formed glyph records. The records are what the load pass
+ writes into the buffer the size pass reserved. */
+static VOID binres_font_build(ULONG first_glyph, ULONG last_glyph, GX_UBYTE format, UINT glyph_count)
+{
+GX_UBYTE *p = binres_test_font;
+UINT record_size = binres_record_size_get(format);
+UINT index;
+
+ memset(binres_test_font, 0, sizeof(binres_test_font));
+
+ /* Font header. */
+ binres_put_u16(p, GX_MAGIC_NUMBER); p += 2; /* magic */
+ binres_put_u16(p, 0); p += 2; /* index */
+ binres_put_u16(p, 1); p += 2; /* page count */
+ *p++ = 0; /* default */
+ *p++ = 1; /* bits */
+ binres_put_u32(p, 0); p += 4; /* data size */
+ binres_put_u32(p, 0); p += 4; /* data offset */
+
+ /* Page header. */
+ binres_put_u16(p, GX_MAGIC_NUMBER); p += 2; /* magic */
+ binres_put_u16(p, 0); p += 2; /* index */
+ *p++ = format; /* format */
+ *p++ = 0; /* prespace */
+ *p++ = 0; /* postspace */
+ *p++ = 16; /* line height */
+ *p++ = 12; /* baseline */
+ binres_put_u32(p, first_glyph); p += 4;
+ binres_put_u32(p, last_glyph); p += 4;
+ binres_put_u32(p, glyph_count * record_size); /* data size */
+ p += 4;
+
+ /* Glyph records, each carrying a valid magic number and no glyph data, so
+ the load pass runs to completion on a well-formed font. */
+ for (index = 0; index < glyph_count; index++)
+ {
+ binres_put_u16(p, GX_MAGIC_NUMBER); p += 2; /* magic */
+ binres_put_u16(p, 0); p += 2; /* map size */
+ binres_put_u32(p, 0); p += 4; /* map offset */
+ binres_put_u16(p, index); p += 2; /* index */
+ binres_put_u16(p, 0); p += 2; /* ascent */
+ binres_put_u16(p, 0); p += 2; /* descent */
+ *p++ = 0; /* advance */
+ *p++ = 0; /* leading */
+ *p++ = 0; /* width */
+ *p++ = 0; /* height */
+ binres_put_u32(p, 0); p += 4; /* data size */
+
+ if (format & GX_FONT_FORMAT_KERNING)
+ {
+ binres_put_u16(p, 0); p += 2; /* kerning table size */
+ }
+ }
+}
+
+/* The extent declared for the font built above. Zero leaves it unknown, which
+ is what an entry point that takes no length and cannot derive one passes. */
+static ULONG binres_test_root_size = 0;
+
+/* Point a read control block at the font just built. */
+static VOID binres_info_reset(GX_BINRES_DATA_INFO *info)
+{
+ memset(info, 0, sizeof(GX_BINRES_DATA_INFO));
+ info -> gx_binres_root_address = binres_test_font;
+ info -> gx_binres_root_size = binres_test_root_size;
+ info -> gx_binres_read_offset = 0;
+}
+
+/* The size of a font carrying glyph_count records of the given format. */
+static UINT binres_font_extent_get(GX_UBYTE format, UINT glyph_count)
+{
+ return (UINT)(BINRES_FONT_HEADER_SIZE + BINRES_PAGE_HEADER_SIZE +
+ (glyph_count * binres_record_size_get(format)));
+}
+
+/* Run the size pass over a font declaring the given range and format. */
+static UINT binres_font_size_get(ULONG first_glyph, ULONG last_glyph, GX_UBYTE format,
+ UINT glyph_count, UINT *buffer_size)
+{
+GX_BINRES_DATA_INFO info;
+
+ binres_font_build(first_glyph, last_glyph, format, glyph_count);
+ binres_info_reset(&info);
+
+ *buffer_size = 0;
+
+ return _gx_binres_font_buffer_size_get(&info, buffer_size, GX_TRUE);
+}
+
+/* Run the load pass over a font declaring the given range and format, into a
+ buffer of the given size. Passing a size smaller than the size pass asked for
+ is how the writers' own bounds are reached. */
+static UINT binres_font_load(ULONG first_glyph, ULONG last_glyph, GX_UBYTE format,
+ UINT glyph_count, UINT buffer_size, GX_FONT **returned_font)
+{
+GX_BINRES_DATA_INFO info;
+UINT status;
+UINT index;
+
+ binres_font_build(first_glyph, last_glyph, format, glyph_count);
+ binres_info_reset(&info);
+
+ memset(binres_test_buffer, 0, sizeof(binres_test_buffer));
+ memset(binres_test_buffer + buffer_size, BINRES_MARGIN_BYTE, BINRES_MARGIN_SIZE);
+
+ info.gx_binres_buffer = binres_test_buffer;
+ info.gx_binres_buffer_size = buffer_size;
+ info.gx_binres_buffer_index = 0;
+
+ *returned_font = GX_NULL;
+
+ status = _gx_binres_one_font_load(&info, returned_font);
+
+ binres_margin_intact = GX_TRUE;
+
+ for (index = 0; index < BINRES_MARGIN_SIZE; index++)
+ {
+ if (binres_test_buffer[buffer_size + index] != BINRES_MARGIN_BYTE)
+ {
+ binres_margin_intact = GX_FALSE;
+ }
+ }
+
+ return status;
+}
+
+/* The glyph formats the build compiles, and the record each reserves per glyph. */
+typedef struct BINRES_TEST_FORMAT_STRUCT
+{
+ GX_UBYTE binres_format;
+ UINT binres_record_size;
+ GX_CHAR *binres_format_name;
+} BINRES_TEST_FORMAT;
+
+static BINRES_TEST_FORMAT binres_test_formats[] =
+{
+ {0, sizeof(GX_GLYPH), "normal"},
+ {GX_FONT_FORMAT_COMPRESSED, sizeof(GX_COMPRESSED_GLYPH), "compressed"},
+#if defined(GX_FONT_KERNING_SUPPORT)
+ {GX_FONT_FORMAT_KERNING, sizeof(GX_KERNING_GLYPH), "kerning"},
+#endif
+ {0, 0, GX_NULL}
+};
+
+/* Run every case and return the number that failed. */
+static INT gx_validation_binres_glyph_range_run(VOID)
+{
+INT failed_tests = 0;
+UINT status;
+UINT size_inverted = 0;
+UINT size_single = 0;
+UINT size_range = 0;
+UINT size_valid = 0;
+UINT small_size;
+GX_FONT *font;
+BINRES_TEST_FORMAT *format;
+
+ /* An inverted range, which is the reported defect. Rejecting it is what stops
+ the count underflowing and the reservation multiply wrapping. The value is
+ chosen to stay inverted however wide GX_CHAR_CODE is in this build. */
+ status = binres_font_size_get(0xEAAAAAABUL, 0x00000000UL, 0, 0, &size_inverted);
+ EXPECT_EQ(GX_INVALID_FONT, status);
+
+ /* Inverted by one, so the boundary is covered rather than only an extreme. */
+ status = binres_font_size_get(0x00000002UL, 0x00000001UL, 0, 0, &size_inverted);
+ EXPECT_EQ(GX_INVALID_FONT, status);
+
+ /* Well-formed ranges have to keep working, and to reserve the same space as
+ before: a single glyph, and a range covering the printable ASCII block. */
+ status = binres_font_size_get(0x00000041UL, 0x00000041UL, 0, 1, &size_single);
+ EXPECT_EQ(GX_SUCCESS, status);
+
+ status = binres_font_size_get(0x00000020UL, 0x0000007EUL, 0, 0, &size_range);
+ EXPECT_EQ(GX_SUCCESS, status);
+
+ /* The wider range must reserve more than the single glyph, and both must
+ reserve something. A wrapped multiply shows up here as a size that is far
+ too small rather than as a failure status. */
+ if ((size_single == 0) || (size_range <= size_single))
+ {
+ printf("\nERROR! File: %s Line: %d\n", __FILE__, __LINE__);
+ printf("Reserved sizes are not consistent: single %u, range %u\n",
+ size_single, size_range);
+ failed_tests++;
+ }
+
+ for (format = binres_test_formats; format -> binres_format_name; format++)
+ {
+ /* An inverted range is rejected whichever format the page declares. */
+ status = binres_font_size_get(0x00000002UL, 0x00000001UL, format -> binres_format,
+ 0, &size_inverted);
+ EXPECT_EQ(GX_INVALID_FONT, status);
+
+ /* A well-formed font of the same format still sizes and loads, reserving
+ exactly one record per glyph, and reports back the range the resource
+ declared. */
+ status = binres_font_size_get(BINRES_TEST_FIRST_GLYPH, BINRES_TEST_LAST_GLYPH,
+ format -> binres_format, BINRES_TEST_GLYPH_COUNT,
+ &size_valid);
+ EXPECT_EQ(GX_SUCCESS, status);
+
+ if (size_valid != (sizeof(GX_FONT) + (BINRES_TEST_GLYPH_COUNT * format -> binres_record_size)))
+ {
+ printf("\nERROR! File: %s Line: %d\n", __FILE__, __LINE__);
+ printf("Format %s reserved %u bytes for %d glyphs\n",
+ format -> binres_format_name, size_valid, BINRES_TEST_GLYPH_COUNT);
+ failed_tests++;
+ }
+
+ status = binres_font_load(BINRES_TEST_FIRST_GLYPH, BINRES_TEST_LAST_GLYPH,
+ format -> binres_format, BINRES_TEST_GLYPH_COUNT,
+ size_valid, &font);
+ EXPECT_EQ(GX_SUCCESS, status);
+ EXPECT_EQ(GX_TRUE, binres_margin_intact);
+
+ if (font)
+ {
+ EXPECT_EQ(BINRES_TEST_FIRST_GLYPH, font -> gx_font_first_glyph);
+ EXPECT_EQ(BINRES_TEST_LAST_GLYPH, font -> gx_font_last_glyph);
+ }
+ else
+ {
+ printf("\nERROR! File: %s Line: %d\n", __FILE__, __LINE__);
+ printf("Format %s loaded no font\n", format -> binres_format_name);
+ failed_tests++;
+ }
+
+ /* The same font into a buffer too small for its glyphs. The size pass and
+ the load pass are separate code, so the writers carry their own bound:
+ a disagreement between the two has to end in a rejected font rather
+ than a write past the end of the buffer. Room is left for the page's
+ GX_FONT so that only the glyph records are made not to fit. */
+ small_size = (UINT)sizeof(GX_FONT) + format -> binres_record_size;
+
+ status = binres_font_load(BINRES_TEST_FIRST_GLYPH, BINRES_TEST_LAST_GLYPH,
+ format -> binres_format, BINRES_TEST_GLYPH_COUNT,
+ small_size, &font);
+ EXPECT_EQ(GX_INVALID_MEMORY_SIZE, status);
+ EXPECT_EQ(GX_TRUE, binres_margin_intact);
+
+ /* And into a buffer with no room at all, so that the page record is the
+ first thing that does not fit. It is reserved through the same bound
+ as the glyphs that follow it. The rejection alone would come out the
+ same either way, because the glyph reservation fails too; the margin
+ is what says the page record was not written first. */
+ status = binres_font_load(BINRES_TEST_FIRST_GLYPH, BINRES_TEST_LAST_GLYPH,
+ format -> binres_format, BINRES_TEST_GLYPH_COUNT,
+ 0, &font);
+ EXPECT_EQ(GX_INVALID_MEMORY_SIZE, status);
+ EXPECT_EQ(GX_TRUE, binres_margin_intact);
+ }
+
+#if defined(GX_UTF8_SUPPORT)
+ /* The widest range the build can represent spans more glyphs than a USHORT
+ can count. The size pass reserves for the whole span, and has to keep
+ doing so: the span is well formed, and a character code wide enough to
+ index it renders it, so capping it here would reject a usable font. */
+ status = binres_font_size_get(0x00000000UL, (ULONG)GX_MAX_GLYPH_CODE, 0, 0, &size_range);
+ EXPECT_EQ(GX_SUCCESS, status);
+
+ if (size_range != (sizeof(GX_FONT) + (((UINT)GX_MAX_GLYPH_CODE + 1) * sizeof(GX_GLYPH))))
+ {
+ printf("\nERROR! File: %s Line: %d\n", __FILE__, __LINE__);
+ printf("The widest representable span reserved %u bytes\n", size_range);
+ failed_tests++;
+ }
+
+ /* The load pass has to count that span the same way. Counting it in a USHORT
+ truncated it to nothing, so records were written for a remainder while
+ space had been reserved for the whole span. Loading it into a buffer that
+ holds a single record has to be refused, which only happens if the load
+ pass counts the whole span. */
+ status = binres_font_load(0x00000000UL, (ULONG)GX_MAX_GLYPH_CODE, 0, 1,
+ (UINT)sizeof(GX_FONT) + (UINT)sizeof(GX_GLYPH), &font);
+ EXPECT_EQ(GX_INVALID_MEMORY_SIZE, status);
+ EXPECT_EQ(GX_TRUE, binres_margin_intact);
+#endif
+
+ /* A resource is read at offsets and for counts it declares itself, so a
+ page claiming more glyph records than the resource carries would be read
+ past its end. The extent is what stops that, and it has to stop it
+ whatever the span is: a well formed, narrow range reaches this too. */
+ for (format = binres_test_formats; format -> binres_format_name; format++)
+ {
+ /* Declared and present agree, and the extent covers the whole font. */
+ binres_test_root_size = binres_font_extent_get(format -> binres_format,
+ BINRES_TEST_GLYPH_COUNT);
+
+ status = binres_font_size_get(BINRES_TEST_FIRST_GLYPH, BINRES_TEST_LAST_GLYPH,
+ format -> binres_format, BINRES_TEST_GLYPH_COUNT,
+ &size_valid);
+ EXPECT_EQ(GX_SUCCESS, status);
+
+ status = binres_font_load(BINRES_TEST_FIRST_GLYPH, BINRES_TEST_LAST_GLYPH,
+ format -> binres_format, BINRES_TEST_GLYPH_COUNT,
+ size_valid, &font);
+ EXPECT_EQ(GX_SUCCESS, status);
+ EXPECT_EQ(GX_TRUE, binres_margin_intact);
+
+ /* The same font, with the extent cut back so that the records the page
+ declares run past the end of the resource. */
+ binres_test_root_size = binres_font_extent_get(format -> binres_format, 2);
+
+ status = binres_font_load(BINRES_TEST_FIRST_GLYPH, BINRES_TEST_LAST_GLYPH,
+ format -> binres_format, BINRES_TEST_GLYPH_COUNT,
+ size_valid, &font);
+ EXPECT_EQ(GX_INVALID_FORMAT, status);
+
+ /* An extent too small even for the headers the loader starts with. */
+ binres_test_root_size = BINRES_FONT_HEADER_SIZE;
+
+ status = binres_font_size_get(BINRES_TEST_FIRST_GLYPH, BINRES_TEST_LAST_GLYPH,
+ format -> binres_format, BINRES_TEST_GLYPH_COUNT,
+ &size_valid);
+ EXPECT_EQ(GX_INVALID_FORMAT, status);
+
+ binres_test_root_size = 0;
+ }
+
+ return failed_tests;
+}
+
+#else /* GX_BINARY_RESOURCE_SUPPORT */
+
+static INT gx_validation_binres_glyph_range_run(VOID)
+{
+ return 0;
+}
+
+#endif
+
+#endif
diff --git a/tutorials/demo_guix_binres/demo_guix_binres.c b/tutorials/demo_guix_binres/demo_guix_binres.c
index 910312eb5..1e1b31989 100644
--- a/tutorials/demo_guix_binres/demo_guix_binres.c
+++ b/tutorials/demo_guix_binres/demo_guix_binres.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -23,6 +25,10 @@
#ifdef STM32F439xx
#include "stm32f4xx_hal.h"
+
+/* Size of the resource image programmed to FLASH at 0x60000000. Set it to the size
+ of the image actually programmed: the loaders refuse any read beyond it. */
+#define BINRES_FLASH_IMAGE_SIZE 0x00100000
#endif
#define GUIX_POOL_SIZE (MAIN_DISPLAY_X_RESOLUTION * MAIN_DISPLAY_Y_RESOLUTION)
@@ -51,6 +57,7 @@ extern GX_CONST GX_UBYTE **main_display_language_table[];
GX_THEME *theme = GX_NULL;
GX_STRING **language_table = GX_NULL;
GX_UBYTE *binres_root_address = GX_NULL;
+ULONG binres_size = 0;
GX_CHAR binres_pathname[] = "..//..//demo_guix_binres_resources.bin";
/* Define prototypes. */
@@ -241,6 +248,7 @@ VOID demo_thread_entry(ULONG thread_input)
/* This suit the case that we generate a .srec format resource file. */
/* .srec file should be programed to the target device memory first. */
binres_root_address = (GX_UBYTE *)0x60000000;
+ binres_size = BINRES_FLASH_IMAGE_SIZE;
#endif
/* Load language table. */
@@ -252,8 +260,8 @@ VOID demo_thread_entry(ULONG thread_input)
/* Create the "simple_window" screen. */
gx_studio_named_widget_create("simple_window", (GX_WIDGET *)root, GX_NULL);
- gx_binres_language_count_get(binres_root_address, &language_count);
- gx_binres_language_info_load(binres_root_address, language_info);
+ gx_binres_language_count_get_ext(binres_root_address, binres_size, &language_count);
+ gx_binres_language_info_load_ext(binres_root_address, binres_size, language_info);
/* Show the root window to make "simple_window" screen visible. */
gx_widget_show(root);
@@ -331,7 +339,12 @@ UCHAR *address = GX_NULL;
fseek(p_file, SEEK_SET, SEEK_SET);
address = memory_allocate(total_length);
- fread(address, 1, total_length, p_file);
+
+ if (address)
+ {
+ fread(address, 1, total_length, p_file);
+ binres_size = (ULONG)total_length;
+ }
fclose(p_file);
}
@@ -353,9 +366,10 @@ UINT status = GX_SUCCESS;
}
/* Load a theme from binary data memory. */
- status = gx_binres_theme_load(root_address,/* Address of binary resource data. */
- theme_id, /* Theme identification, 0, 1, 2: 1th, 2nd, 3rd theme in the binary resource data. */
- &theme); /* Loaded theme. */
+ status = gx_binres_theme_load_ext(root_address, /* Address of binary resource data. */
+ binres_size, /* Size of binary resource data. */
+ theme_id, /* Theme identification, 0, 1, 2: 1th, 2nd, 3rd theme in the binary resource data. */
+ &theme); /* Loaded theme. */
if (status == GX_SUCCESS)
{
@@ -380,8 +394,9 @@ UINT status = GX_SUCCESS;
}
/* Load language table from binary data memory. */
- status = gx_binres_language_table_load_ext(root_address, /* Address of binary resource data. */
- &language_table); /* Loaded language table that contains all languages in the specified binary resource data. */
+ status = gx_binres_language_table_load_ext2(root_address, /* Address of binary resource data. */
+ binres_size, /* Size of binary resource data. */
+ &language_table); /* Loaded language table that contains all languages in the specified binary resource data. */
if (language_table)
{
diff --git a/tutorials/demo_guix_binres_standalone/demo_guix_binres_standalone.c b/tutorials/demo_guix_binres_standalone/demo_guix_binres_standalone.c
index 1e703cccd..3fec6a09a 100644
--- a/tutorials/demo_guix_binres_standalone/demo_guix_binres_standalone.c
+++ b/tutorials/demo_guix_binres_standalone/demo_guix_binres_standalone.c
@@ -9,6 +9,8 @@
* SPDX-License-Identifier: MIT
**************************************************************************/
+// Portions of this file were generated with AI assistance.
+
/* This is a small demo of the high-performance GUIX graphics framework. */
#include
@@ -31,11 +33,13 @@ GX_PIXELMAP pixelmap_red_apple;
GX_UBYTE font_vera_buffer[FONT_BUFFER_SIZE];
VOID *root_address_pixelmap_red_apple = GX_NULL;
VOID *root_address_font_vera = GX_NULL;
+ULONG size_pixelmap_red_apple = 0;
+ULONG size_font_vera = 0;
/* Define prototypes. */
extern UINT win32_graphics_driver_setup_565rgb(GX_DISPLAY *display);
VOID demo_thread_entry(ULONG thread_input);
-VOID *load_binary_resource_data_to_ram(GX_CHAR* pathname);
+VOID *load_binary_resource_data_to_ram(GX_CHAR* pathname, ULONG *size);
UINT load_standalone_resources();
/************************************************************************************/
@@ -122,7 +126,7 @@ VOID demo_thread_entry(ULONG thread_input)
/* targets, the binary resource data has been directly programmed to FLASH rather */
/* than saved in a filesytem. */
/************************************************************************************/
-VOID *load_binary_resource_data_to_ram(GX_CHAR *pathname)
+VOID *load_binary_resource_data_to_ram(GX_CHAR *pathname, ULONG *size)
{
UCHAR *address = GX_NULL;
@@ -146,6 +150,7 @@ VOID *load_binary_resource_data_to_ram(GX_CHAR *pathname)
if (address)
{
fread(address, 1, total_length, p_file);
+ *size = (ULONG)total_length;
}
fclose(p_file);
@@ -163,7 +168,7 @@ UINT load_standalone_resources()
ULONG buffer_size;
/* Load binary file into ram. */
- root_address_pixelmap_red_apple = load_binary_resource_data_to_ram("..\\..\\pixelmap_red_apple.bin");
+ root_address_pixelmap_red_apple = load_binary_resource_data_to_ram("..\\..\\pixelmap_red_apple.bin", &size_pixelmap_red_apple);
if (!root_address_pixelmap_red_apple)
{
@@ -171,7 +176,7 @@ UINT load_standalone_resources()
}
/* Load binary file into ram. */
- root_address_font_vera = load_binary_resource_data_to_ram("..\\..\\font_vera.bin");
+ root_address_font_vera = load_binary_resource_data_to_ram("..\\..\\font_vera.bin", &size_font_vera);
if (!root_address_font_vera)
{
@@ -179,7 +184,7 @@ UINT load_standalone_resources()
}
/* Load a pixelmap from the standalone binary data. */
- status = gx_binres_pixelmap_load(root_address_pixelmap_red_apple, 0, &pixelmap_red_apple);
+ status = gx_binres_pixelmap_load_ext(root_address_pixelmap_red_apple, size_pixelmap_red_apple, 0, &pixelmap_red_apple);
if (status != GX_SUCCESS)
{
@@ -189,7 +194,7 @@ UINT load_standalone_resources()
buffer_size = FONT_BUFFER_SIZE;
/* Load a font from the standalone binary data. */
- status = gx_binres_font_load(root_address_font_vera, 0, font_vera_buffer, &buffer_size);
+ status = gx_binres_font_load_ext(root_address_font_vera, size_font_vera, 0, font_vera_buffer, &buffer_size);
if (status != GX_SUCCESS)
{