slint/internal/compiler
Olivier Goffart 2f2116686f C++: forward declare explicitly to make the code more robust
We currently forward declare classes as we use them in functions.
But this breaks if classes with the same name were declared in the
parent namespace. As shown with this example

```C++
// Uncomment that line to make the code break
//struct SharedGlobals;

namespace ns {
    // Is that a forward declaration in `ns`?
    // Depends if it was declared before in the parent namespace
    void foo(struct SharedGlobals *x) {}

    // Actualy define ns::SharedGlobal
    struct SharedGlobals { int x; };

    int xyz() {
        SharedGlobals globals;
        foo(&globals);
    }
}
```

So make sure we forward-declare the classes properly to be more robust
and be able to include generated file with namespace after a file
without namespace

CC #2909
2025-05-26 18:32:09 +02:00
..
generator C++: forward declare explicitly to make the code more robust 2025-05-26 18:32:09 +02:00
LICENSES Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
llr Add Platform.os as well as a rudimentary test 2025-05-06 13:06:27 +02:00
lookup Replace compiler dependency on css-color-parser crate 2024-07-29 13:13:53 +02:00
parser Transition: Introduce in-out to allow writing symmetry animation (#8509) 2025-05-26 09:17:22 +02:00
parser-test-macro A few more format arg inlining 2025-02-07 06:43:19 +01:00
passes compiler: Fix materialize of absolute-position in timer callback 2025-05-26 15:44:11 +02:00
tests Transition: Introduce in-out to allow writing symmetry animation (#8509) 2025-05-26 09:17:22 +02:00
widgets Menus: make it possible to have items with different height 2025-05-19 14:58:31 +02:00
build.rs Auto-fixed clippy::unnecessary_map_or 2025-02-07 09:02:31 +01:00
builtin_macros.rs Refactoring: get rid in the callable in the Expression tree 2025-01-24 20:26:35 +01:00
builtins.slint Add Platform.os as well as a rudimentary test 2025-05-06 13:06:27 +02:00
Cargo.toml Remormat all the toml file again to fix npm upload 2025-04-09 15:06:00 +02:00
diagnostics.rs Auto-fixed clippy::unnecessary_map_or 2025-02-07 09:02:31 +01:00
embedded_resources.rs Signed DistanceField font rendering in swrenderer 2024-10-23 09:12:30 +02:00
expression_tree.rs Add Platform.os as well as a rudimentary test 2025-05-06 13:06:27 +02:00
fileaccess.rs Widget style: simplify -light/-dark handling 2024-08-20 16:55:15 +02:00
generator.rs Auto-fixed clippy::unnecessary_map_or 2025-02-07 09:02:31 +01:00
langtype.rs Fix typos (#8421) 2025-05-12 13:03:59 +02:00
layout.rs Fix layout property set in when deriving components 2025-04-23 09:23:07 +02:00
lexer.rs Auto-fixed clippy::needless_lifetimes 2025-02-07 09:20:49 +01:00
lib.rs live-preview: don't replace the native menu bar with the previewed one 2025-04-17 17:12:23 +02:00
literals.rs Use SmolStr in more places of the compiler infrastructure 2024-10-17 18:04:58 +02:00
llr.rs Improve font embedding for MCUs when bundling translations (#7875) 2025-03-18 11:54:28 +01:00
load_builtins.rs Allow to have builtin item function to return a value 2025-03-31 14:06:24 +02:00
lookup.rs live-preview: Handle colors/brushes using palette names 2025-05-21 16:28:03 +02:00
namedreference.rs Auto-fixed clippy::unnecessary_map_or 2025-02-07 09:02:31 +01:00
object_tree.rs compiler: Fix materialize of absolute-position in timer callback 2025-05-26 15:44:11 +02:00
parser.rs Transition: Introduce in-out to allow writing symmetry animation (#8509) 2025-05-26 09:17:22 +02:00
passes.rs Add Platform.os as well as a rudimentary test 2025-05-06 13:06:27 +02:00
pathutils.rs Auto-fixed clippy::needless_borrow 2025-02-07 09:02:45 +01:00
README.md Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
translations.rs Improve font embedding for MCUs when bundling translations (#7875) 2025-03-18 11:54:28 +01:00
typeloader.rs Transition: Introduce in-out to allow writing symmetry animation (#8509) 2025-05-26 09:17:22 +02:00
typeregister.rs Fix typos (#8421) 2025-05-12 13:03:59 +02:00

The Slint Compiler Library

NOTE: This library is an internal crate of the Slint project. This crate should not be used directly by applications using Slint. You should use the slint crate instead.

WARNING: This crate does not follow the semver convention for versioning and can only be used with version = "=x.y.z" in Cargo.toml.