Commit graph

34 commits

Author SHA1 Message Date
Simon Hausmann
a7a3b3f9ee Changelog: C++: Add slint::Window::take_snapshot()
Corresponds to the Rust API.
2024-11-13 12:38:36 +01:00
Simon Hausmann
7db5024c52
Generate bindings of Image::to_rgb8/to_rgba8/to_rgba8_premultiplied f… (#6405)
ChangeLog: [C++] Add `Image::to_rgb8/to_rgba8/to_rgba8_premultiplied` pixel buffer accessors.

Fixes #6399
2024-10-01 10:55:11 +02:00
Simon Hausmann
27dc6e53c0
API review: enable all features in the C++ docs (#5592)
And make sure that functions excluded when freestanding is enabled are included in the docs.
2024-07-11 08:29:51 +02:00
Simon Hausmann
650f19a33c Re-run clang-format with version 18 2024-06-10 02:25:40 -07:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License (#4994)
Updated the version from 1.1 to 1.2 
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Olivier Goffart
97067c3d65 Add 9slice information at runtime 2024-02-13 14:46:27 +01:00
Tobias Hunger
b12575a4c4 janitor: Go over our spell checking setup
* Extend the cspell word list
* Remove those extensions from individual source files
* white-list licenses and such as we should not meddle with those
* Fix spelling
2023-10-16 09:01:51 +02:00
Olivier Goffart
146ed520e8
C++: rename SLINT_FEATURE_STD in SLINT_FEATURE_FREESTANDING with the opposite meaning 2023-08-21 16:52:30 +02:00
Simon Hausmann
0c9199b17f
Add support for flipping borrowed OpenGL textures vertically (#3205)
Closes #2986

Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
2023-08-02 13:11:13 +02:00
Olivier Goffart
7cffad2c3f C++: add a STD feature enabled by default 2023-07-18 12:44:20 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
Olivier Goffart
69567b49ef C++: fix the signature of Size
otherwise compiler complains that "long unsigned int" != "int" on 32bit
2023-07-05 21:48:01 +02:00
Simon Hausmann
d1daa8dbe4 doc: Document coordinate system expectations for borrowed textures 2023-06-26 12:49:22 +02:00
Simon Hausmann
aa41277df1 Improve safety notes on the slint::Image texture import functions
Elaborate how to call this function safely, and copy the same description to the C++ docs.
2023-06-22 22:31:51 +02:00
Olivier Goffart
11dea135f7 Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs (#2888) 2023-06-15 11:20:50 +02:00
Simon Hausmann
e7320607a3 Remove BorrowedOpenGLTexture from the public API again and just provide a factory function in slint::Image 2023-06-01 15:56:55 +02:00
Simon Hausmann
084ff70079 C++: Improve reliability of comparison operator of slint::Image
Call into the Rust implementation, so that we have to maintain only one
implementation.
2023-06-01 15:56:55 +02:00
Simon Hausmann
f51ca82f10 Add C++ API and example for borrowing OpenGL textures 2023-06-01 15:56:55 +02:00
Simon Hausmann
77645d9908 C++: Warn when the return value of slint::Image::load_from_path is not used
Somebody recently accidentally wrote this code:

```cpp
slint::Image image;
image.load_from_path(...);
```

and that should have produced a warning.
2023-05-10 11:46:00 +02:00
Simon Hausmann
e3800fd3c3
Fix incorrectly rendered C++ docs code fence 2023-03-24 20:39:27 +01:00
Olivier Goffart
c82bb1515e C++ image: add some docs
Note: Don't use cbindgen to generate `operator==` for public types.
Because it doesn't have docs and the documentation show warnings
otherwise
2023-03-20 17:22:56 +01:00
Olivier Goffart
ef7fb6422a C++ Image API: introduce the SharedPixelBuffer 2023-03-20 17:22:56 +01:00
Olivier Goffart
be47c8464c C++: implement creation of image from raw data
Issue #616
2023-03-20 17:22:56 +01:00
Olivier Goffart
ccf3e8e9e9 C++: Generate image texture data for software renderer 2022-12-09 09:25:48 +01:00
Olivier Goffart
ca6dfc0cb5 Run clang-format over C++ files 2022-08-17 07:44:22 +02:00
Olivier Goffart
65346c699c Attempt to get the "image-in-corelib" feature compile with C++ 2022-07-20 12:57:37 +02:00
Simon Hausmann
67a2f0ce3f WIP: Make image decoding a feature of the core library
This includes the cache of decoded images, the HTMLImage element support
and the SVG rendering adapter.

The objective is that Image holds an ImageInner, which is not a path
anymore that the backend has to process, but instead always either
decoded image data, a pointer to a static texture or an SVG tree that
can be rendered to the desired size.
2022-07-20 12:57:37 +02:00
Simon Hausmann
583c7a1b80 Fix C++ build
With ImageInner::StaticTextures (the variant) and StaticTextures (the
struct), we need to disambiguate for the generated enum contructor
functions. This is done by prefixing the enum variant with their name.
2022-03-03 14:39:11 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Olivier Goffart
753784c331
C++: drops IntSize in favor of Size<T> (#922)
Fixes #909

Since we declare the struct in C++, we don't need to declare it in
rust for cbindgen anymore, as long as we expose the Size2D type from
euclid to the cbindgen_private namespace
2022-02-08 14:12:52 +01:00
Simon Hausmann
fcf59f3793 Rename the C++ header files 2022-02-02 13:07:26 +01:00
Renamed from api/cpp/include/sixtyfps_image.h (Browse further)