slint/api/cpp/include
Avery Townsend 8c4ccabf7d
Expose FocusReason to .slint as an argument in focus-event-changed and add focus-gained and focus-lost callbacks (#8569)
This exposes FocusReason to .slint, and adds it as an argument to focus-event-changed callback on FocusScope to close #8387. It also adds two new callbacks, focus-gained and focus-lost, which are identical to focus-event-changed but are only invoked on focus gain or loss respectively.

In addition to this, it removes the FocusEventReason::AccessKit variant, replacing it with the mouse variant to hopefully make AccessKit more compatible with any Slint code that will use FocusEventReason.

Finally, I added two tests based on focus_change_event.slint, one for testing the FocusEventReason argument and another for testing the new callbacks.

close #8387

ChangeLog: Added `focus-gained` and `focus-lost` callback to FocusScope.  Pass an `FocusReason` enum to the FocusScope callbacks
2025-06-04 09:51:26 +02:00
..
slint-interpreter.h Testing C++ API: add a visitor over the ElementHandle 2024-06-10 15:52:40 +02:00
slint-platform.h Fix typos (#8421) 2025-05-12 13:03:59 +02:00
slint-stm32.h Revert "stm32: Fix compilation with newer STM BSPs" 2025-02-08 23:18:08 +01:00
slint-testing.h Fix typos (#8421) 2025-05-12 13:03:59 +02:00
slint.h Add Platform.os as well as a rudimentary test 2025-05-06 13:06:27 +02:00
slint_brush.h Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
slint_callbacks.h Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
slint_color.h Re-run clang-format with version 18 2024-06-10 02:25:40 -07:00
slint_config.h Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
slint_image.h Changelog: C++: Add slint::Window::take_snapshot() 2024-11-13 12:38:36 +01:00
slint_interpreter.h Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
slint_item_tree.h C++: move model code to its own file 2025-03-25 10:37:20 +01:00
slint_models.h C++: make sure we do not crash if a Model::row_data returns nullopt 2025-05-30 15:47:13 +02:00
slint_pathdata.h Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
slint_point.h infra: Test out mise 2025-03-20 16:33:00 +01:00
slint_properties.h Implement Property::set_constant in C++ 2025-03-03 00:50:09 +01:00
slint_sharedvector.h Re-run clang-format with version 18 2024-06-10 02:25:40 -07:00
slint_size.h Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
slint_string.h cpp: added to_lowercase and to_uppercase to SharedString (#6869) 2024-11-21 18:53:02 +00:00
slint_tests_helpers.h Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
slint_timer.h C++: add asserts that we are in the main thread 2025-05-28 11:29:48 +02:00
slint_window.h Expose FocusReason to .slint as an argument in focus-event-changed and add focus-gained and focus-lost callbacks (#8569) 2025-06-04 09:51:26 +02:00
vtable.h C++: put the parent in a weak pointer 2025-03-28 17:24:14 +01:00