Commit graph

56 commits

Author SHA1 Message Date
omahs
74232eae8d
Fix typos (#8421) 2025-05-12 13:03:59 +02:00
Olivier Goffart
3a9ae8af0e Remove CompositionMode enum
It was used in the previous TargetPixelBuffer interface, but this is no
longer the case
2025-05-07 15:49:58 +02:00
Olivier Goffart
e42c4b18c2
swrenderer: interface for hw rendering of rectangle with border or gradients (#8384) 2025-05-06 15:53:53 +02:00
Olivier Goffart
c8138ff1db
swrenderer: rewrite TargetPixelBuffer::draw_texture interface
Instead of using datastructure that are tailored to our line by line
renderer and draw functions, use more generic and future proof data that
are easier to handle by hardware accelerator, and may be easier to
stabilize.

The screenshots from the screenshots test have to be re-done
because the rounding is different

Note: the C++ API DrawTextureArgs is not exposed yet
2025-04-29 23:26:02 +02:00
Tobias Hunger
e5ecb9cf6c infra: Test out mise
I found `mise` a tool to help manage development projects.
https://mise.jdx.dev/

It basically can manage ENV vars based on the directory you are in,
manages tools you need (and makes thoser available based on the
directory you are in), and allows to define simple tasks that can
then be shared between developers.

Tools can be found in npm, pipx, aqua, binaries on github, ...
and it tries to verify signatures and all that (if supported by the
repo the data comes from).

I replaces the entire autofix workflow with mise tooling and tasks,
just to give it a try :-)

To reproduce:

```sh
> cargo install mise # to get the tool itself

# Follow the necessary step
# https://mise.jdx.dev/installing-mise.html#shells
# to intergate into your shell

> cd /your/slint/folder

# Mise will now ask whether or not to trust this dir and prints the
# command needed to do so. Run that.

> mise install # Install all the tools defined in .mise/config.toml

# Add a .mise.local.toml with local overrides. Git will ignore this file.
# Or add tasks into .mise/tasks/local ... Git will also ignore those.

> mise run 'ci:autofix:**:all' # To run all the ci:autofix tasks.
```

It is so much fatser to see these checks fail locally than it is to
bother CI with them :-)
2025-03-20 16:33:00 +01:00
Simon Hausmann
beebffe829 C++ cleanup: Move the experimental render() overloads after the stable functions 2025-02-25 17:23:11 +01:00
Simon Hausmann
4d8f99e35d c++: Mark experimental target pixel buffer as experimental in the docs 2025-02-25 17:23:11 +01:00
Simon Hausmann
910d45a01f Fix window background fill
Don't blend the background but fill it when going through ProcessScene.
2025-02-24 17:02:10 +01:00
Simon Hausmann
247074b5e7 Simplify accelerated texture and rectangle fills
There's no need to split the areas to span lines.
2025-02-24 17:02:10 +01:00
Simon Hausmann
5518720391 Fix docs about fixed point format for source texture offsets 2025-02-24 17:02:10 +01:00
Simon Hausmann
f6d61c1b09 Improve API for C++ TargetPixelBuffer::draw_texture's blending color 2025-02-24 17:02:10 +01:00
Simon Hausmann
efb2223db0 Some C++ docs for TargetPixelBuffer and related types 2025-02-24 17:02:10 +01:00
Simon Hausmann
9e515710ed Expose screen rotation in the TargetPixelBuffer's draw_texture as integral angle 2025-02-24 17:02:10 +01:00
Simon Hausmann
df6c99871d Change TargetPixelBuffer's draw_texture function to take a data structure instead of many arguments 2025-02-24 17:02:10 +01:00
Sam Cristall
491cb2f911 Add span_y to draw_texture to fix partial texture draws 2025-02-24 17:02:10 +01:00
Sam Cristall
3855cf6b9c Add draw_texture/process_texture and use accelerated fill_rectangle for background draw 2025-02-24 17:02:10 +01:00
Simon Hausmann
fbee7f9566 WIP: Start wrapping TargetPIxelBuffer in C++ 2025-02-24 17:02:10 +01:00
Olivier Goffart
290468fb55 C++: Stabilize line by line renderer
Fixes https://github.com/slint-ui/slint/issues/7505

ChangeLog: C++: Added `SoftwareRenderer::render_by_line`.
2025-02-21 16:24:03 +01:00
Olivier Goffart
07803ccd6c
C++: support for RGB8 in the line by line rendering
Note: this adds a mendatory template parametter to the
(experimental) `render_by_line` function.
I tried to get the PixelType auto-detected from the callback but i
didn't manage
2025-02-19 09:11:10 +01:00
Olivier Goffart
42d7661ec6 C++: make the PhysicalRegion::rectangles non-overlapping 2024-07-10 10:58:27 +02:00
Simon Hausmann
88e1a366a3 Make rendering rotation a public feature of the software renderer
Fixes #5372
2024-06-10 05:24:48 -07: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
Olivier Goffart
5955d19706 Expose the individual rectangle in the dirty region 2024-04-26 14:45:23 +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
31219223e5 C++: Gate the line by line rendering behind experimental flag 2024-04-04 10:23:00 +02:00
Olivier Goffart
48d1b96441 esp-idf: cleanup the line_by_line rendering 2024-04-04 10:23:00 +02:00
Simon Hausmann
042bde7883 esp-idf: Add support for line-by-line rendering
Rendering by line into a line buffer that's in IRAM can be faster than accessing framebuffers in slower PSRAM, so offer this by allowing users
to omit even the initial framebuffer.
2024-04-04 10:23:00 +02:00
Olivier Goffart
9f0c3c94a9 C++: minimize/maximize/fullscreen API on Window 2024-02-22 13:17:50 +01:00
Ralph Minderhoud
9cb1a4a4e0
Add API for minimize/maximize on Window component (#4581)
Closes #4400
2024-02-22 10:40:36 +01:00
Simon Hausmann
438b9afeaa
Reduce WindowAdapter API slightly (#4304)
Move the set_fullscreen function added to the WindowAdapter trait in 779aff0b39
to be a function in WindowProperties instead.
That way it'll be easier in the future to extend this with other window states without
having to modify or break the WindowAdapter trait API.
2024-01-09 18:55:06 +01:00
Simon Hausmann
95044c3a09
Rename WindowRotation to RenderingRotation in the software renderer (#4181)
Same term as we're going to use in the linuxkms backend.
2023-12-19 08:47:55 +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
347b2d0fbf C++: Don't use optional::value
It is not available when targetting older macOs since it can throw an
exception that needs library support
2023-10-11 07:57:57 +02:00
Olivier Goffart
b88a3caacd swrenderer: Put the rotation feature behind a freature gate
We're not ready to make the API public as we want to have the API as
part of the Window rather than part of the renderer
2023-10-09 18:07:23 +02:00
Olivier Goffart
414a9e85e7 Expose swrenderer screen rotation to C++ and esp-idf 2023-10-09 18:07:23 +02:00
Olivier Goffart
73ff86cf5a C++: Move the PhysicalRegion in the SofwtareRenderer 2023-08-30 14:59:41 +02:00
Olivier Goffart
932db7ac38 C++: make Platform::duration_since_start non-const and pure
When SLINT_FEATURE_FREESTANDING is set, it must be re-implemented
otherwise the time doesn't pass
2023-08-30 14:59:41 +02:00
Olivier Goffart
c47e6cd029 C++: Api changes in the WindowAdapter
- s/physical_size/size/ (consistant with the slint::Window API)
 - remove const of virtual function  (they don't need to be const and
   make implementation potentially easier)
 - Move the WindowProperties in it
2023-08-30 14:59:41 +02:00
Simon Hausmann
040019c7b6
doc: Fix link to set_physical_size 2023-08-29 07:02:31 +02:00
Simon Hausmann
d160eb7a31
Add support for set_position(), position(), and set_physical_size() to the C++ WindowAdapter (#3367)
Closes #3349
2023-08-28 18:43:04 +02:00
Olivier Goffart
ded66231d1 C++: polish the clipboard patch
- make sure the Platform::Clipboard type is properly documented
 - Use the actual enum in the interface (even though it is
   #[non_exhaustive] so we need to slience a warning)

CC: #3265
2023-08-28 14:34:23 +02:00
Simon Hausmann
67423b288f Add documentation to the WindowAdapters to explain the basic message passing protocol
... and provide hints in there about implementing window close requests.

Note: The links to set_size() and set_position() are not resolved, as
these virtual functions are still missing from the WindowAdapter base
class.
2023-08-28 13:45:28 +02:00
Ian McFarlane
1de7b1512c
Expose clipboard_text accessors to C++ (#3265) 2023-08-28 12:26:40 +02:00
Olivier Goffart
d23ba885ca
C++: add WindowAdaptor::update_window_properties 2023-08-25 13:58:55 +02:00
Olivier Goffart
541e7137c6
Backends: don't resize the WindowItem in set_visible
We already query the size right after the call to set_visible in the
WindowInner::show()
2023-08-24 13:15:28 +02:00
Olivier Goffart
f611091470 C++ docs: don't use backtick for Class or method name
because otherwise doxygen don't make links

(also implements the `renderer()` funciton in the doc example)
2023-08-22 11:29:57 +02:00
Olivier Goffart
3e46680c16
C++: improve slint::platform docs (#3319) 2023-08-22 11:24:30 +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