DioxusLabs / DioxusLabs/dioxus
Impossible/inconvenient to use dioxus_desktop::Config.with_custom_event_handler()
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
**Problem**
It is either impossible or extremely inconvenient to use dioxus_desktop::Config::with_custom_event_handler().
The type signature `f: impl FnMut(&Event<'_, UserWindowEvent>, &EventLoopWindowTarget) + 'static,` is either very difficult or impossible to implement because `dioxus_desktop::ipc::UserWindowEvent`, the type required in the signature, is not public.
**Steps To Reproduce**
Steps to reproduce the behavior:
- Create a dioxus_desktop::Config.
- Attempt to use .with_custom_event_handler() on it.
**Expected behavior**
I expect to be able to use a custom callback to match on event loop events.
**Environment:**
- Dioxus version: 0.6.3
- Rust version: rustc 1.90.0, edition 2021
- OS info: Arch Linux
- App platform: Desktop
**Questionnaire**
I have a workaround for now, but I am wondering if this was an intentional design choice and am hesitant to use it.
The fix is to make the dioxus_desktop::ipc module public.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.