Commit e1a8af4
committed
Platform: add bring-all-to-front() function
Adds `Platform.bring-all-to-front()` to the Slint language, lowered to
a new `BuiltinFunction::BringAllToFront` via the platform-lowering pass.
On macOS the function calls `[NSApp arrangeInFront:]` via a free function
in `i-slint-core`, using the `objc2-app-kit` dependency that was already
present for the system tray. On all other platforms it is a no-op.
Public-language API only — no `slint::Window::bring_all_to_front()`,
no `WindowAdapter` trait method, and no language-binding wrappers.
The C FFI entry point (`slint_bring_all_to_front`) is private_api,
used only by generated C++ code.
Addresses the review feedback from PR #11692:
- ogoffart: remove from WindowAdapter trait, implement as free function
in i-slint-core using objc2-app-kit directly
- ogoffart: no public Rust/C++/JS Window::bring_all_to_front() API
- Both reviewers: split into its own PR (orthogonal to minimize/maximize/close)1 parent 7bd380d commit e1a8af4
12 files changed
Lines changed: 81 additions & 0 deletions
File tree
- api
- cpp
- include
- rs/slint
- internal
- compiler
- generator
- llr/optim_passes
- passes
- core
- interpreter
- tests/cases/globals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
352 | 357 | | |
353 | 358 | | |
354 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
279 | 284 | | |
280 | 285 | | |
281 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2562 | 2562 | | |
2563 | 2563 | | |
2564 | 2564 | | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
2565 | 2572 | | |
2566 | 2573 | | |
2567 | 2574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
| 307 | + | |
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
| |||
412 | 414 | | |
413 | 415 | | |
414 | 416 | | |
| 417 | + | |
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
| |||
497 | 500 | | |
498 | 501 | | |
499 | 502 | | |
| 503 | + | |
500 | 504 | | |
501 | 505 | | |
502 | 506 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4926 | 4926 | | |
4927 | 4927 | | |
4928 | 4928 | | |
| 4929 | + | |
| 4930 | + | |
| 4931 | + | |
4929 | 4932 | | |
4930 | 4933 | | |
4931 | 4934 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4142 | 4142 | | |
4143 | 4143 | | |
4144 | 4144 | | |
| 4145 | + | |
| 4146 | + | |
| 4147 | + | |
4145 | 4148 | | |
4146 | 4149 | | |
4147 | 4150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
0 commit comments